linux/arch/arm64/boot/dts/amlogic
Martin Blumenstingl ed5e8f6891 arm64: dts: meson: g12a: x96-max: fix the Ethernet PHY reset line
The Odroid-N2 schematics show that the following pins are used for the
reset and interrupt lines:
- GPIOZ_14 is the PHY interrupt line
- GPIOZ_15 is the PHY reset line

The GPIOZ_14 and GPIOZ_15 pins are special. The datasheet describes that
they are "3.3V input tolerant open drain (OD) output pins". This means
the GPIO controller can drive the output LOW to reset the PHY. To
release the reset it can only switch the pin to input mode. The output
cannot be driven HIGH for these pins.
This requires configuring the reset line as GPIO_OPEN_DRAIN because
otherwise the PHY will be stuck in "reset" state (because driving the
pin HIGH seems to result in the same signal as driving it LOW).

The reset line works together with a pull-up resistor (R143 in the
Odroid-N2 schematics). The SoC can drive GPIOZ_14 LOW to assert the PHY
reset. However, since the SoC can't drive the pin HIGH (to release the
reset) we switch the mode to INPUT and let the pull-up resistor take
care of driving the reset line HIGH.

Switch to GPIOZ_15 for the PHY reset line instead of using GPIOZ_14
(which actually is the interrupt line).
Move from the "snps" specific resets to the MDIO framework's
reset-gpios because only the latter honors the GPIO flags.
Use the GPIO flags (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN) to match with
the pull-up resistor because this will:
- drive the output LOW to reset the PHY (= active low)
- switch the pin to INPUT mode so the pull-up will take the PHY out of
  reset

Fixes: 51d116557b2044 ("arm64: dts: meson-g12a-x96-max: Add Gigabit Ethernet Support")
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2019-06-19 20:34:09 -07:00
..
Makefile arm64: dts: meson: Add minimal support for Odroid-N2 2019-06-11 15:50:03 -07:00
meson-axg-s400.dts arm64: dts: meson: fix mmc pin bias 2019-05-21 10:58:40 -07:00
meson-axg.dtsi arm64: dts: meson: add dwmac-3.70a to ethmac compatible list 2019-06-11 15:50:01 -07:00
meson-g12a-sei510.dts arm64: dts: meson: sei510: add sound card 2019-06-14 15:55:56 -07:00
meson-g12a-u200.dts arm64: dts: meson: u200: add internal network 2019-06-11 15:50:01 -07:00
meson-g12a-x96-max.dts arm64: dts: meson: g12a: x96-max: fix the Ethernet PHY reset line 2019-06-19 20:34:09 -07:00
meson-g12a.dtsi arm64: dts: meson: g12a: sort sdio nodes correctly 2019-06-19 20:28:08 -07:00
meson-g12b-odroid-n2.dts arm64: dts: meson-g12b-odroid-n2: add sound card 2019-06-14 15:55:56 -07:00
meson-g12b.dtsi arm64: dts: meson: Add minimal support for Odroid-N2 2019-06-11 15:50:03 -07:00
meson-gx-p23x-q20x.dtsi arm64: dts: meson: fix mmc v2 chips max frequencies 2019-05-21 10:58:40 -07:00
meson-gx.dtsi arm64: dts: meson: add dwmac-3.70a to ethmac compatible list 2019-06-11 15:50:01 -07:00
meson-gxbb-nanopi-k2.dts arm64: dts: meson: nanopi k2: add sd DDR50 2019-05-21 10:58:40 -07:00
meson-gxbb-nexbox-a95x.dts arm64: dts: meson: fix mmc v2 chips max frequencies 2019-05-21 10:58:40 -07:00
meson-gxbb-odroidc2.dts arm64: dts: meson: odroid-c2: add missing mmc modes 2019-05-21 10:58:41 -07:00
meson-gxbb-p20x.dtsi arm64: dts: meson: fix mmc v2 chips max frequencies 2019-05-21 10:58:40 -07:00
meson-gxbb-p200.dts ARM64: dts: amlogic: Convert to new-style SPDX license identifiers 2018-03-07 17:21:58 -08:00
meson-gxbb-p201.dts ARM64: dts: amlogic: Convert to new-style SPDX license identifiers 2018-03-07 17:21:58 -08:00
meson-gxbb-vega-s95-meta.dts ARM64: dts: amlogic: Convert to new-style SPDX license identifiers 2018-03-07 17:21:58 -08:00
meson-gxbb-vega-s95-pro.dts ARM64: dts: amlogic: Convert to new-style SPDX license identifiers 2018-03-07 17:21:58 -08:00
meson-gxbb-vega-s95-telos.dts ARM64: dts: amlogic: Convert to new-style SPDX license identifiers 2018-03-07 17:21:58 -08:00
meson-gxbb-vega-s95.dtsi arm64: dts: meson-gxbb-vega-s95: add ethernet PHY interrupt 2019-06-11 15:50:03 -07:00
meson-gxbb-wetek-hub.dts ARM64: dts: meson-gxbb-wetek: add a wetek specific dtsi to cleanup hub and play2 2018-03-07 17:25:56 -08:00
meson-gxbb-wetek-play2.dts ARM64: dts: meson-gxbb-wetek: add a wetek specific dtsi to cleanup hub and play2 2018-03-07 17:25:56 -08:00
meson-gxbb-wetek.dtsi arm64: dts: meson-gxbb-wetek: enable bluetooth 2019-06-11 15:50:02 -07:00
meson-gxbb.dtsi arm64: dts: meson: fix mmc pin bias 2019-05-21 10:58:40 -07:00
meson-gxl-mali.dtsi ARM64: dts: meson-gxl: fix Mali GPU compatible string 2018-06-27 16:48:25 -07:00
meson-gxl-s805x-libretech-ac.dts arm64: dts: meson: add libretech aml-s805x-ac board 2018-11-29 12:30:08 -08:00
meson-gxl-s805x-p241.dts arm64: dts: meson: fix mmc v2 chips max frequencies 2019-05-21 10:58:40 -07:00
meson-gxl-s905d-p230.dts arm64: dts: amlogic: remove ethernet-phy-idAAAA.BBBB compatible strings 2019-05-21 10:58:40 -07:00
meson-gxl-s905d-p231.dts ARM64: dts: meson-gx-p23x-q20x: move the wifi node to each board's .dts 2018-07-20 08:18:22 -07:00
meson-gxl-s905d-phicomm-n1.dts arm64: dts: meson-gxl-s905d-phicomm-n1: add status LED 2019-03-18 09:07:15 -07:00
meson-gxl-s905d.dtsi ARM64: dts: amlogic: Convert to new-style SPDX license identifiers 2018-03-07 17:21:58 -08:00
meson-gxl-s905w-p281.dts ARM64: dts: meson-gxl: add support for the S905W SoC and the P281 board 2018-07-20 09:02:22 -07:00
meson-gxl-s905w-tx3-mini.dts ARM64: dts: meson-gxl: add support for the Oranth Tanix TX3 Mini 2018-07-20 09:02:22 -07:00
meson-gxl-s905x-hwacom-amazetv.dts arm64: dts: meson: Fix mmc cd-gpios polarity 2019-01-14 07:59:40 -08:00
meson-gxl-s905x-khadas-vim.dts arm64: dts: meson-gx: Add hdmi_5v regulator as hdmi tx supply 2018-11-29 12:29:56 -08:00
meson-gxl-s905x-libretech-cc.dts arm64: dts: meson: fix mmc v2 chips max frequencies 2019-05-21 10:58:40 -07:00
meson-gxl-s905x-nexbox-a95x.dts arm64: dts: meson: fix mmc v2 chips max frequencies 2019-05-21 10:58:40 -07:00
meson-gxl-s905x-p212.dts arm64: dts: meson-gx: Add hdmi_5v regulator as hdmi tx supply 2018-11-29 12:29:56 -08:00
meson-gxl-s905x-p212.dtsi arm64: dts: meson: fix mmc v2 chips max frequencies 2019-05-21 10:58:40 -07:00
meson-gxl-s905x.dtsi ARM64: dts: amlogic: Convert to new-style SPDX license identifiers 2018-03-07 17:21:58 -08:00
meson-gxl.dtsi arm64: dts: meson: fix mmc pin bias 2019-05-21 10:58:40 -07:00
meson-gxm-khadas-vim2.dts arm64: dts: meson-gxm-khadas-vim2: fix Bluetooth support 2019-06-11 15:50:02 -07:00
meson-gxm-nexbox-a1.dts arm64: dts: amlogic: remove ethernet-phy-idAAAA.BBBB compatible strings 2019-05-21 10:58:40 -07:00
meson-gxm-q200.dts arm64: dts: amlogic: remove ethernet-phy-idAAAA.BBBB compatible strings 2019-05-21 10:58:40 -07:00
meson-gxm-q201.dts ARM64: dts: meson-gx-p23x-q20x: move the wifi node to each board's .dts 2018-07-20 08:18:22 -07:00
meson-gxm-rbox-pro.dts arm64: dts: amlogic: remove ethernet-phy-idAAAA.BBBB compatible strings 2019-05-21 10:58:40 -07:00
meson-gxm-vega-s96.dts ARM64: dts: amlogic: Convert to new-style SPDX license identifiers 2018-03-07 17:21:58 -08:00
meson-gxm.dtsi arm64: dts: meson-gxm: Add Mali-T820 node 2019-04-01 21:42:01 -07:00