1
0
Fork 0
alistair23-linux/drivers/net/phy
Sergei Shtylyov bafbdd527d phylib: Add device reset GPIO support
The PHY devices sometimes do have their reset signal (maybe even power
supply?) tied to some GPIO and sometimes it also does happen that a boot
loader does not leave it deasserted. So far this issue has been attacked
from (as I believe) a wrong angle: by teaching the MAC driver to manipulate
the GPIO in question; that solution, when applied to the device trees, led
to adding the PHY reset GPIO properties to the MAC device node, with one
exception: Cadence MACB driver which could handle the "reset-gpios" prop
in a PHY device subnode. I believe that the correct approach is to teach
the 'phylib' to get the MDIO device reset GPIO from the device tree node
corresponding to this device -- which this patch is doing...

Note that I had to modify the AT803x PHY driver as it would stop working
otherwise -- it made use of the reset GPIO for its own purposes...

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Rob Herring <robh@kernel.org>
[geert: Propagate actual errors from fwnode_get_named_gpiod()]
[geert: Avoid destroying initial setup]
[geert: Consolidate GPIO descriptor acquiring code]
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Richard Leitner <richard.leitner@skidata.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-12-05 12:51:19 -05:00
..
Kconfig net: phy: leds: Add support for "link" trigger 2017-11-08 10:24:14 +09:00
Makefile Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-11-04 09:26:51 +09:00
amd.c net: phy: remove generic settings for callbacks config_aneg and read_status from drivers 2017-12-01 15:42:21 -05:00
aquantia.c net: phy: aquantia: add PHY ID of AQR106 and AQR107 2016-10-20 14:25:23 -04:00
at803x.c phylib: Add device reset GPIO support 2017-12-05 12:51:19 -05:00
bcm-cygnus.c net: phy: remove generic settings for callbacks config_aneg and read_status from drivers 2017-12-01 15:42:21 -05:00
bcm-phy-lib.c net: phy: switch remaining users to phy_(read|write)_mmd() 2017-03-22 12:43:00 -07:00
bcm-phy-lib.h net: phy: broadcom: Add support code for reading PHY counters 2016-11-30 10:22:27 -05:00
bcm7xxx.c net: phy: remove generic settings for callbacks config_aneg and read_status from drivers 2017-12-01 15:42:21 -05:00
bcm63xx.c net: phy: remove generic settings for callbacks config_aneg and read_status from drivers 2017-12-01 15:42:21 -05:00
bcm87xx.c phy: Centralize setting driver module owner 2016-01-07 14:31:27 -05:00
broadcom.c net: phy: broadcom: re-add mistakenly removed config settings 2017-12-04 11:17:08 -05:00
cicada.c net: phy: remove generic settings for callbacks config_aneg and read_status from drivers 2017-12-01 15:42:21 -05:00
cortina.c net: phy: cortina: add missing MODULE_DESCRIPTION/AUTHOR/LICENSE 2017-11-24 01:23:49 +09:00
davicom.c net: phy: remove generic settings for callbacks config_aneg and read_status from drivers 2017-12-01 15:42:21 -05:00
dp83640.c net: phy: remove generic settings for callbacks config_aneg and read_status from drivers 2017-12-01 15:42:21 -05:00
dp83640_reg.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dp83822.c net: phy: remove generic settings for callbacks config_aneg and read_status from drivers 2017-12-01 15:42:21 -05:00
dp83848.c net: phy: remove generic settings for callbacks config_aneg and read_status from drivers 2017-12-01 15:42:21 -05:00
dp83867.c net: phy: remove generic settings for callbacks config_aneg and read_status from drivers 2017-12-01 15:42:21 -05:00
et1011c.c phy: Centralize setting driver module owner 2016-01-07 14:31:27 -05:00
fixed_phy.c net: phy: fixed_phy: fix of_node leak in fixed_phy_unregister 2016-11-17 12:05:05 -05:00
icplus.c net: phy: remove generic settings for callbacks config_aneg and read_status from drivers 2017-12-01 15:42:21 -05:00
intel-xway.c net: phy: remove generic settings for callbacks config_aneg and read_status from drivers 2017-12-01 15:42:21 -05:00
lxt.c net: phy: remove generic settings for callbacks config_aneg and read_status from drivers 2017-12-01 15:42:21 -05:00
marvell.c net: phy: remove generic settings for callbacks config_aneg and read_status from drivers 2017-12-01 15:42:21 -05:00
marvell10g.c net: phy: marvell10g: fix the PHY id mask 2017-11-28 10:30:38 -05:00
mdio-bcm-iproc.c net: phy: Initialize mdio clock at probe function 2017-02-09 17:10:23 -05:00
mdio-bcm-unimac.c net: phy: mdio-bcm-unimac: Use correct I/O accessors 2017-08-29 14:42:17 -07:00
mdio-bitbang.c net: phy: mdio-gpio: Handle phy_ignore_ta_mask 2015-05-14 13:40:55 -04:00
mdio-boardinfo.c net: phy: Allow building mdio-boardinfo into the kernel 2017-03-29 10:32:32 -07:00
mdio-boardinfo.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mdio-cavium.c phy: mdio-cavium: Add missing MODULE_* annotations. 2016-03-16 19:55:37 -04:00
mdio-cavium.h phy: mdio-octeon: Refactor into two files/modules 2016-03-14 15:27:22 -04:00
mdio-gpio.c net: mdio-gpio: make mdiobb_ops const 2017-08-22 14:22:18 -07:00
mdio-hisi-femac.c net: Add MDIO bus driver for the Hisilicon FEMAC 2016-07-16 21:32:58 -07:00
mdio-i2c.c net: phy: add I2C mdio bus 2017-08-06 20:55:28 -07:00
mdio-i2c.h net: phy: add I2C mdio bus 2017-08-06 20:55:28 -07:00
mdio-moxart.c mdio: Move allocation of interrupts into core 2016-01-07 14:31:26 -05:00
mdio-mux-bcm-iproc.c net: mdio-mux: add mdio_mux parameter to mdio_mux_init() 2017-09-05 14:42:52 -07:00
mdio-mux-gpio.c net: mdio-mux: add mdio_mux parameter to mdio_mux_init() 2017-09-05 14:42:52 -07:00
mdio-mux-mmioreg.c net: mdio-mux: add mdio_mux parameter to mdio_mux_init() 2017-09-05 14:42:52 -07:00
mdio-mux.c net: mdio-mux: add mdio_mux parameter to mdio_mux_init() 2017-09-05 14:42:52 -07:00
mdio-octeon.c phy: mdio-octeon: Refactor into two files/modules 2016-03-14 15:27:22 -04:00
mdio-sun4i.c mdio-sun4i: oops in error handling in probe 2016-03-21 11:30:01 -04:00
mdio-thunder.c phy: mdio-thunder: Add driver for Cavium Thunder SoC MDIO buses. 2016-03-14 15:27:22 -04:00
mdio-xgene.c drivers: net: phy: xgene: Add lock to protect mac access 2017-05-16 11:41:08 -04:00
mdio-xgene.h drivers: net: phy: xgene: Add lock to protect mac access 2017-05-16 11:41:08 -04:00
mdio_bus.c phylib: Add device reset GPIO support 2017-12-05 12:51:19 -05:00
mdio_device.c phylib: Add device reset GPIO support 2017-12-05 12:51:19 -05:00
meson-gxl.c net: phy: remove generic settings for callbacks config_aneg and read_status from drivers 2017-12-01 15:42:21 -05:00
micrel.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-12-05 10:44:19 -05:00
microchip.c net: phy: remove generic settings for callbacks config_aneg and read_status from drivers 2017-12-01 15:42:21 -05:00
mscc.c net: phy: Add LED mode driver for Microsemi PHYs. 2017-02-08 13:29:04 -05:00
national.c net: phy: remove generic settings for callbacks config_aneg and read_status from drivers 2017-12-01 15:42:21 -05:00
phy-c45.c net: phy: split out 10G genphy support 2017-06-06 21:14:13 -04:00
phy-core.c net: phy: add 1000Base-X to phy settings table 2017-08-06 20:55:28 -07:00
phy.c net: phy: core: don't disable device interrupts in phy_change 2017-12-04 10:23:42 -05:00
phy_device.c phylib: Add device reset GPIO support 2017-12-05 12:51:19 -05:00
phy_led_triggers.c net: phy: leds: Add support for "link" trigger 2017-11-08 10:24:14 +09:00
phylink.c phylink: convert to fwnode 2017-12-05 11:16:19 -05:00
qsemi.c net: phy: remove generic settings for callbacks config_aneg and read_status from drivers 2017-12-01 15:42:21 -05:00
realtek.c net: phy: realtek: add utility functions to read/write page addresses 2017-12-03 09:38:17 -05:00
rockchip.c net: phy: remove generic settings for callbacks config_aneg and read_status from drivers 2017-12-01 15:42:21 -05:00
sfp-bus.c sfp: convert to fwnode 2017-12-05 11:16:19 -05:00
sfp.c sfp: warn about modules requiring address change sequence 2017-12-01 15:18:42 -05:00
sfp.h sfp: add sfp-bus to bridge between network devices and sfp cages 2017-08-06 20:55:29 -07:00
smsc.c net: phy: remove generic settings for callbacks config_aneg and read_status from drivers 2017-12-01 15:42:21 -05:00
spi_ks8995.c spi_ks8995: regs_size incorrect for some devices 2017-03-07 13:33:24 -08:00
ste10Xp.c net: phy: remove generic settings for callbacks config_aneg and read_status from drivers 2017-12-01 15:42:21 -05:00
swphy.c phy: generate swphy registers on the fly 2016-06-27 10:40:57 -04:00
swphy.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
teranetics.c phy: Centralize setting driver module owner 2016-01-07 14:31:27 -05:00
uPD60620.c net: phy: remove generic settings for callbacks config_aneg and read_status from drivers 2017-12-01 15:42:21 -05:00
vitesse.c net: phy: remove generic settings for callbacks config_aneg and read_status from drivers 2017-12-01 15:42:21 -05:00
xilinx_gmii2rgmii.c net: phy: Fix mask value write on gmii2rgmii converter speed register 2017-09-18 16:33:18 -07:00