The AC200 and AC300 MDIO link interfaces report the same Clause 22 identifier and use a compatible link-side paged register layout, but need different package control interfaces before that identifier can be read. Describe the forced-ID PHY and require exactly one reference to an enabled AC200 or AC300 control device. The PHY node's reg value is programmed through the AC200 control interface. For AC300, it must match the address selected by the package straps and is therefore limited to 0 through 7. Allow a system to provide its optional two-bit SID configuration field. Bit 0 identifies the AC200 or AC300 package and must agree with the described control device. Bit 1 selects the AC300 low-calibration tuning sequence. Omitting the field skips package validation and selects the normal calibration sequence. Also describe the optional xMII receive-clock inversion needed by some integrations. Requiring an X-Powers control reference distinguishes these integrations from the Rockchip RK630 PHY, which reports the same identifier. Signed-off-by: James Hilliard --- .../bindings/net/x-powers,acx00-ephy.yaml | 117 +++++++++++++++++++++ 1 file changed, 117 insertions(+) diff --git a/Documentation/devicetree/bindings/net/x-powers,acx00-ephy.yaml b/Documentation/devicetree/bindings/net/x-powers,acx00-ephy.yaml new file mode 100644 index 000000000000..c280bcf8aa25 --- /dev/null +++ b/Documentation/devicetree/bindings/net/x-powers,acx00-ephy.yaml @@ -0,0 +1,117 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/x-powers,acx00-ephy.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: X-Powers AC200 and AC300 Ethernet PHY + +maintainers: + - James Hilliard + +description: + The AC200 and AC300 expose Fast Ethernet MDIO link interfaces which report + the same PHY ID and use a compatible link-side paged register layout. Each + package uses a different control interface to make its MDIO endpoint + accessible. A fixed board references its enabled AC200 or AC300 control + device. The PHY node's reg value is programmed through the AC200 interface; + for AC300 it must match the address selected by the package straps. + +select: + properties: + compatible: + contains: + const: ethernet-phy-id0044.1400 + required: + - compatible + anyOf: + - required: + - x-powers,ac200-control + - required: + - x-powers,ac300-control + +properties: + compatible: + const: ethernet-phy-id0044.1400 + + nvmem-cells: + maxItems: 1 + description: + Optional two-bit SoC SID configuration field. Bit 0 selects the package + variant, with zero for AC200 and one for AC300, and must agree with the + described control device. Bit 1 selects the AC300 vendor low-calibration + tuning sequence. Omitting the field selects the normal tuning sequence + without validating the package variant. + + nvmem-cell-names: + const: configuration + + x-powers,ac200-control: + $ref: /schemas/types.yaml#/definitions/phandle + description: Reference to the AC200 Ethernet PHY control function + + x-powers,ac300-control: + $ref: /schemas/types.yaml#/definitions/phandle + description: Reference to the AC300 MDIO Ethernet PHY control device + + x-powers,xmii-rx-clock-inverted: + type: boolean + description: + Invert the xMII receive clock inside the PHY. This is required by some + SoC integrations, including the Allwinner H6 AC200 connection. + +required: + - compatible + +oneOf: + - properties: + x-powers,ac300-control: false + required: + - x-powers,ac200-control + - properties: + x-powers,ac200-control: false + required: + - x-powers,ac300-control + +dependentRequired: + nvmem-cells: [ nvmem-cell-names ] + +allOf: + - $ref: ethernet-phy.yaml# + - if: + required: + - x-powers,ac300-control + then: + properties: + reg: + maximum: 7 + +unevaluatedProperties: false + +examples: + - | + mdio { + #address-cells = <1>; + #size-cells = <0>; + + ethernet-phy@0 { + compatible = "ethernet-phy-id0044.1400"; + reg = <0>; + nvmem-cells = <&ephy_configuration>; + nvmem-cell-names = "configuration"; + x-powers,ac300-control = <&ac300_ephy_ctl>; + }; + }; + + - | + mdio { + #address-cells = <1>; + #size-cells = <0>; + + ethernet-phy@1 { + compatible = "ethernet-phy-id0044.1400"; + reg = <1>; + x-powers,ac200-control = <&ac200_ephy_ctl>; + }; + }; +... -- 2.53.0