Add en8811h phy driver and devicetree binding doc
Subsystems (4)
v3 cover Add en8811h phy driver and devicetree binding doc
This patch series adds the driver and the devicetree binding documentation for the Airoha en8811h PHY.
Changes in PATCH v3:
air_en8811h.c:
* Dedicated __air_buckpbus_reg_modify()
* Renamed host to mcu
* Append 'S' to AIR_PHY_LED_DUR_BLINK_xxxM
* Handle hw-leds as in mt798x_phy_led_hw_control_set(), add 2500Mbps
* Moved firmware loading to .probe()
* Disable leds after firmware load
* Moved 'waiting for mcu ready' to dedicated function
* Return -EINVAL from .config_aneg() when auto-neg is turned off
* Removed check for AUTONEG_ENABLE from .read_status()
* Added more details about mode 1
* Use macros from wordpart.h
* Set rate_matching in .read_status(), fixes 100Mbps traffic
Changes in PATCH v2:
air_en8811h.c:
* Implement air_buckpbus_reg_modify()
* Added if (saved_page >= 0)
* Use linkmode_adv_to_mii_10gbt_adv_t()
* Check led index within limit, before using it
* Renamed AIR_PBUS_XXX to AIR_BPBUS_XXX to indicate buckpbus, not pbus
* Cosmetic changes
airoha,en8811h.yaml:
* Add compatible
* Add description
* Cosmetic changes
Changes in PATCH (mistakenly considered as v1):
air_en8811h.c:
* Use the correct order in Kconfig and Makefile
* Change some register naming to correspond with datasheet
* Use phy_driver .read_page() and .write_page()
* Use module_phy_driver()
* Use get_unaligned_le16() instead of macro
* In .config_aneg() and .read_status() use genphy_xxx() C22
* Use another vendor register to read real speed
* Load firmware only once and store firmware version
* Apply 2.5G LPA work-around (firmware before 24011202)
* Read 2.5G LPA from vendor register (firmware 24011202 and later)
airoha,en8811h.yaml:
* Explicitly describe which pins are reversed in polarity.
Notes for original RFC patch:
* Source originated from airoha's en8811h v1.2.1 driver
* Moved air_en8811h.h to air_en8811h.c
* Removed air_pbus_reg_write() as it writes to another device on mdio-bus (Confirmed by Airoha, register on pbus does not need to be written to)
* Load firmware from /lib/firmware/airoha/ instead of /lib/firmware/
* Added .get_rate_matching()
* Use generic phy_read/write() and phy_read/write_mmd()
* Edited .get_features() to use generic C45 functions
* Edited .config_aneg() and .read_status() to use a mix of generic C22/C45
* Use led handling functions from mediatek-ge-soc.c
* Simplified led handling by storing led rules
* Cleanup macro definitions
* Cleanup code to pass checkpatch.pl
* General code cleanup
Eric Woudstra (2):
dt-bindings: net: airoha,en8811h: Add en8811h
net: phy: air_en8811h: Add the Airoha EN8811H PHY driver
.../bindings/net/airoha,en8811h.yaml | 56 + drivers/net/phy/Kconfig | 5 + drivers/net/phy/Makefile | 1 + drivers/net/phy/air_en8811h.c | 1086 +++++++++++++++++ 4 files changed, 1148 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/airoha,en8811h.yaml create mode 100644 drivers/net/phy/air_en8811h.c
Signature · 1 line
2.42.1
PATCH v3 1/2 dt-bindings: net: airoha,en8811h: Add en8811h
Add the Airoha EN8811H 2.5 Gigabit PHY.
The en8811h phy can be set with serdes polarity reversed on rx and/or tx.
--- .../bindings/net/airoha,en8811h.yaml | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/airoha,en8811h.yaml
Documentation/devicetree/bindings/net/airoha,en8811h.yaml new file +56 -0
@@ -0,0 +1,56 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/airoha,en8811h.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Airoha EN8811H PHY + +maintainers: + - Eric Woudstra <[email protected]> + +description: + The Airoha EN8811H PHY has the ability to reverse polarity + on the lines to and/or from the MAC. It is reversed by + the booleans in the devicetree node of the phy. + +allOf: + - $ref: ethernet-phy.yaml# + +properties: + compatible: + enum: + - ethernet-phy-id03a2.a411 + + reg: + maxItems: 1 + + airoha,pnswap-rx: + type: boolean + description: + Reverse rx polarity of the SERDES. This is the receiving + side of the lines from the MAC towards the EN881H. + + airoha,pnswap-tx: + type: boolean + description: + Reverse tx polarity of SERDES. This is the transmitting + side of the lines from EN8811H towards the MAC. + +required: + - reg + +unevaluatedProperties: false + +examples: + - | + mdio { + #address-cells = <1>; + #size-cells = <0>; + + ethernet-phy@1 { + compatible = "ethernet-phy-id03a2.a411"; + reg = <1>; + airoha,pnswap-rx; + }; + };
Signature · 1 line
2.42.1
PATCH v3 2/2 net: phy: air_en8811h: Add the Airoha EN8811H PHY driver
In reply to Eric WoudstraAdd the driver for the Airoha EN8811H 2.5 Gigabit PHY. The phy supports 100/1000/2500 Mbps with auto negotiation only.
The driver uses two firmware files, for which updated versions are added to linux-firmware already.
Note: At phy-address + 8 there is another device on the mdio bus, that belongs to the EN881H. While the original driver writes to it, Airoha has confirmed this is not needed. Therefore, communication with this device is not included in this driver.
--- drivers/net/phy/Kconfig | 5 + drivers/net/phy/Makefile | 1 + drivers/net/phy/air_en8811h.c | 1086 +++++++++++++++++++++++++++++++++ 3 files changed, 1092 insertions(+) create mode 100644 drivers/net/phy/air_en8811h.c
drivers/net/phy/Kconfig +5 -0
@@ -76,6 +76,11 @@ config SFP comment "MII PHY device drivers" +config AIR_EN8811H_PHY + tristate "Airoha EN8811H 2.5 Gigabit PHY" + help + Currently supports the Airoha EN8811H PHY. + config AMD_PHY tristate "AMD and Altima PHYs" help
drivers/net/phy/Makefile +1 -0
@@ -34,6 +34,7 @@ obj-y += $(sfp-obj-y) $(sfp-obj-m) obj-$(CONFIG_ADIN_PHY) += adin.o obj-$(CONFIG_ADIN1100_PHY) += adin1100.o +obj-$(CONFIG_AIR_EN8811H_PHY) += air_en8811h.o obj-$(CONFIG_AMD_PHY) += amd.o obj-$(CONFIG_AQUANTIA_PHY) += aquantia/ ifdef CONFIG_AX88796B_RUST_PHY
drivers/net/phy/air_en8811h.c new file +1086 -0
1,086 lines not on this page · raw message
Signature · 1 line
2.42.1
Re: [PATCH v3 net-next 1/2] dt-bindings: net: airoha,en8811h: Add en8811h
In reply to Eric WoudstraQuoted 5 lines · Eric Woudstra
Add the Airoha EN8811H 2.5 Gigabit PHY.
The en8811h phy can be set with serdes polarity reversed on rx and/or tx.
Signed-off-by Eric Woudstra <[email protected]>
Andrew
Re: [PATCH v3 net-next 2/2] net: phy: air_en8811h: Add the Airoha EN8811H PHY driver
In reply to Eric WoudstraQuoted 6 lines · Eric Woudstra
Add the driver for the Airoha EN8811H 2.5 Gigabit PHY. The phy supports 100/1000/2500 Mbps with auto negotiation only.
The driver uses two firmware files, for which updated versions are added to linux-firmware already.
Quoted 6 lines
Note: At phy-address + 8 there is another device on the mdio bus, that belongs to the EN881H. While the original driver writes to it, Airoha has confirmed this is not needed. Therefore, communication with this device is not included in this driver.
Signed-off-by Eric Woudstra <[email protected]>
Andrew
Rob Herring
maintainerRe: [PATCH v3 net-next 1/2] dt-bindings: net: airoha,en8811h: Add en8811h
In reply to Eric WoudstraQuoted 5 lines · Eric Woudstra
Add the Airoha EN8811H 2.5 Gigabit PHY.
The en8811h phy can be set with serdes polarity reversed on rx and/or tx.
Signed-off-by Eric Woudstra <[email protected]>
Did you change something or forget to add Krzysztof's Reviewed-by?
Quoted 4 lines
--- .../bindings/net/airoha,en8811h.yaml | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/airoha,en8811h.yaml
Re: [PATCH v3 net-next 1/2] dt-bindings: net: airoha,en8811h: Add en8811h
Hi Rob,
Quoted 8 lines · Rob Herring
Quoted 5 lines · Eric Woudstra
Add the Airoha EN8811H 2.5 Gigabit PHY.
The en8811h phy can be set with serdes polarity reversed on rx and/or tx.
Signed-off-by Eric Woudstra <[email protected]>Did you change something or forget to add Krzysztof's Reviewed-by?
Nothing has changed in this commit. I was wondering if I should do this, so I should have added the Reviewed-by Krzysztof.
Best regards,
Eric Woudstra
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 19 lines · On Tue, 26 Mar 2024 17:23:03 +0100 you wrote:
This patch series adds the driver and the devicetree binding documentation for the Airoha en8811h PHY.
Changes in PATCH v3:
air_en8811h.c:
* Dedicated__air_buckpbus_reg_modify()
* Renamed host to mcu
* Append 'S' toAIR_PHY_LED_DUR_BLINK_xxxM
* Handle hw-leds as inmt798x_phy_led_hw_control_set(), add 2500Mbps
* Moved firmware loading to .probe()
* Disable leds after firmware load
* Moved 'waiting for mcu ready' to dedicated function
* Return-EINVALfrom .config_aneg() when auto-neg is turned off
* Removed check forAUTONEG_ENABLEfrom .read_status()
* Added more details about mode 1
* Use macros fromwordpart.h
* Setrate_matchingin .read_status(), fixes 100Mbps traffic
Quoted 1 line
[...]
Here is the summary with links:
- [v3,net-next,1/2] dt-bindings: net: airoha,en8811h: Add en8811h
https://git.kernel.org/netdev/net-next/c/2434ba2bc851 - [v3,net-next,2/2] net: phy: air_en8811h: Add the Airoha EN8811H PHY driver https://git.kernel.org/netdev/net-next/c/71e79430117d
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
Re: [PATCH v3 net-next 1/2] dt-bindings: net: airoha,en8811h: Add en8811h
In reply to Eric WoudstraQuoted 6 lines · Eric Woudstra
Hi Rob,
Quoted 3 lines · Rob Herring
Quoted 2 lines · Eric Woudstra
Add the Airoha EN8811H 2.5 Gigabit PHY.
Quoted 9 lines
Quoted 5 lines
Quoted 3 lines
The en8811h phy can be set with serdes polarity reversed on rx and/or tx.
Signed-off-by Eric Woudstra <[email protected]>Did you change something or forget to add Krzysztof's Reviewed-by?
Nothing has changed in this commit. I was wondering if I should do this, so I should have added the Reviewed-by Krzysztof.
Please add Acked-by/Reviewed-by/Tested-by tags when posting new versions, under or above your Signed-off-by tag. Tag is "received", when provided in a message replied to you on the mailing list. Tools like b4 can help here. However, there's no need to repost patches *only* to add the tags. The upstream maintainer will do that for tags received on the version they apply.
https://elixir.bootlin.com/linux/v6.5-rc3/source/Documentation/process/submitting-patches.rst#L577
Please carefully read above guideline. Entire.
Best regards,
Krzysztof