ARM64: Add Internal PHY support for Meson GXL
Subsystems (5)
cover ARM64: Add Internal PHY support for Meson GXL
The Amlogic Meson GXL SoCs have an internal RMII PHY that is muxed with the external RGMII pins.
In order to support switching between the two PHYs links, extended registers size for mdio-mux-mmioreg must be added.
The DT related patches submitted as RFC in [3] will be sent in a separate patchset due to multiple patchsets and DTSI migrations.
Changes since v2 RFC patchset at : [3]
- Change phy Kconfig/Makefile alphabetic order
- GXL dtsi cleanup
Changes since original RFC patchset at : [2]
- Remove meson8b experimental phy switching
- Switch to mdio-mux-mmioreg with extennded size support
- Add internal phy support for S905x and p231
- Add external PHY support for p230
[1] http://lkml.kernel.org/r/1477932286-27482-1-git-send-email-narmstrong at baylibre.com
[2] http://lkml.kernel.org/r/1477060838-14164-1-git-send-email-narmstrong at baylibre.com
[3] http://lkml.kernel.org/r/1477932987-27871-1-git-send-email-narmstrong at baylibre.com
Neil Armstrong (2):
net: mdio-mux-mmioreg: Add support for 16bit and 32bit register sizes
net: phy: Add Meson GXL Internal PHY driver
.../devicetree/bindings/net/mdio-mux-mmioreg.txt | 4 +- drivers/net/phy/Kconfig | 5 ++ drivers/net/phy/Makefile | 1 + drivers/net/phy/mdio-mux-mmioreg.c | 60 ++++++++++++---- drivers/net/phy/meson-gxl.c | 81 ++++++++++++++++++++++ 5 files changed, 136 insertions(+), 15 deletions(-) create mode 100644 drivers/net/phy/meson-gxl.c
Signature · 1 line
1.9.1
PATCH 1/2 net: mdio-mux-mmioreg: Add support for 16bit and 32bit register sizes
In order to support PHY switching on Amlogic GXL SoCs, add support for 16bit and 32bit registers sizes.
--- .../devicetree/bindings/net/mdio-mux-mmioreg.txt | 4 +- drivers/net/phy/mdio-mux-mmioreg.c | 60 +++++++++++++++++----- 2 files changed, 49 insertions(+), 15 deletions(-)
Documentation/devicetree/bindings/net/mdio-mux-mmioreg.txt +2 -2
@@ -3,7 +3,7 @@ Properties for an MDIO bus multiplexer controlled by a memory-mapped device This is a special case of a MDIO bus multiplexer. A memory-mapped device, like an FPGA, is used to control which child bus is connected. The mdio-mux node must be a child of the memory-mapped device. The driver currently only -supports devices with eight-bit registers. +supports devices with 8, 16 or 32-bit registers. Required properties in addition to the generic multiplexer properties:
@@ -11,7 +11,7 @@ Required properties in addition to the generic multiplexer properties: - reg : integer, contains the offset of the register that controls the bus multiplexer. The size field in the 'reg' property is the size of - register, and must therefore be 1. + register, and must therefore be 1, 2, or 4. - mux-mask : integer, contains an eight-bit mask that specifies which bits in the register control the actual bus multiplexer. The
drivers/net/phy/mdio-mux-mmioreg.c +47 -13
87 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH 2/2 net: phy: Add Meson GXL Internal PHY driver
In reply to Neil ArmstrongAdd driver for the Internal RMII PHY found in the Amlogic Meson GXL SoCs.
This PHY seems to only implement some standard registers and need some workarounds to provide autoneg values from vendor registers.
Some magic values are currently used to configure the PHY, and this a temporary setup until clarification about these registers names and registers fields are provided by Amlogic.
--- drivers/net/phy/Kconfig | 5 +++ drivers/net/phy/Makefile | 1 + drivers/net/phy/meson-gxl.c | 81 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+) create mode 100644 drivers/net/phy/meson-gxl.c
drivers/net/phy/Kconfig +5 -0
@@ -264,6 +264,11 @@ config MARVELL_PHY ---help--- Currently has a driver for the 88E1011S +config MESON_GXL_PHY + tristate "Amlogic Meson GXL Internal PHY" + ---help--- + Currently has a driver for the Amlogic Meson GXL Internal PHY + config MICREL_PHY tristate "Micrel PHYs" ---help---
drivers/net/phy/Makefile +1 -0
@@ -41,6 +41,7 @@ obj-$(CONFIG_INTEL_XWAY_PHY) += intel-xway.o obj-$(CONFIG_LSI_ET1011C_PHY) += et1011c.o obj-$(CONFIG_LXT_PHY) += lxt.o obj-$(CONFIG_MARVELL_PHY) += marvell.o +obj-$(CONFIG_MESON_GXL_PHY) += meson-gxl.o obj-$(CONFIG_MICREL_KS8995MA) += spi_ks8995.o obj-$(CONFIG_MICREL_PHY) += micrel.o obj-$(CONFIG_MICROCHIP_PHY) += microchip.o
drivers/net/phy/meson-gxl.c new file +81 -0
81 lines not on this page · raw message
Signature · 1 line
1.9.1
Re: [PATCH net-next 2/2] net: phy: Add Meson GXL Internal PHY driver
Quoted 10 lines · Neil Armstrong
Add driver for the Internal RMII PHY found in the Amlogic Meson GXL SoCs.
This PHY seems to only implement some standard registers and need some workarounds to provide autoneg values from vendor registers.
Some magic values are currently used to configure the PHY, and this a temporary setup until clarification about these registers names and registers fields are provided by Amlogic.
Signed-off-by Neil Armstrong <[email protected]>
Signature · 1 line
Florian
Re: [PATCH net-next 1/2] net: mdio-mux-mmioreg: Add support for 16bit and 32bit register sizes
In reply to Neil ArmstrongQuoted 5 lines · Neil Armstrong
In order to support PHY switching on Amlogic GXL SoCs, add support for 16bit and 32bit registers sizes.
Reviewed-by Andrew Lunn <[email protected]>Signed-off-by Neil Armstrong <[email protected]>
Signature · 1 line
Florian
Re: [PATCH net-next 2/2] net: phy: Add Meson GXL Internal PHY driver
In reply to Neil ArmstrongQuoted 10 lines · Neil Armstrong
Add driver for the Internal RMII PHY found in the Amlogic Meson GXL SoCs.
This PHY seems to only implement some standard registers and need some workarounds to provide autoneg values from vendor registers.
Some magic values are currently used to configure the PHY, and this a temporary setup until clarification about these registers names and registers fields are provided by Amlogic.
Signed-off-by Neil Armstrong <[email protected]>
Andrew
David Miller
maintainerFrom: Neil Armstrong <[email protected]>
Date: Fri, 4 Nov 2016 16:51:21 +0100
Quoted 19 lines
The Amlogic Meson GXL SoCs have an internal RMII PHY that is muxed with the external RGMII pins.
In order to support switching between the two PHYs links, extended registers size for mdio-mux-mmioreg must be added.
The DT related patches submitted as RFC in [3] will be sent in a separate patchset due to multiple patchsets and DTSI migrations.
Changes since v2 RFC patchset at : [3]
- Change phy Kconfig/Makefile alphabetic order
- GXL dtsi cleanupChanges since original RFC patchset at : [2]
- Remove meson8b experimental phy switching
- Switch to mdio-mux-mmioreg with extennded size support
- Add internal phy support for S905x and p231
- Add external PHY support for p230
Quoted 3 lines
[1] http://lkml.kernel.org/r/1477932286-27482-1-git-send-email-narmstrong at baylibre.com
[2] http://lkml.kernel.org/r/1477060838-14164-1-git-send-email-narmstrong at baylibre.com
[3] http://lkml.kernel.org/r/1477932987-27871-1-git-send-email-narmstrong at baylibre.com
Series applied, thanks.