dt-bindings: phy: Convert marvell,comphy-cp110 to DT schema
Rob Herring (Arm)
maintainerPATCH 1/1 dt-bindings: phy: Convert marvell,comphy-cp110 to DT schema
Convert the Marvell CP110 combo PHY binding to DT schema format. It's a straight forward conversion.
--- .../bindings/phy/marvell,comphy-cp110.yaml | 154 ++++++++++++++++++ .../bindings/phy/phy-mvebu-comphy.txt | 94 ----------- MAINTAINERS | 2 +- 3 files changed, 155 insertions(+), 95 deletions(-) create mode 100644 Documentation/devicetree/bindings/phy/marvell,comphy-cp110.yaml delete mode 100644 Documentation/devicetree/bindings/phy/phy-mvebu-comphy.txt
Documentation/devicetree/bindings/phy/marvell,comphy-cp110.yaml new file +154 -0
@@ -0,0 +1,154 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/phy/marvell,comphy-cp110.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Marvell MVEBU COMPHY Controller + +maintainers: + - Miquel Raynal <[email protected]> + +description: > + COMPHY controllers can be found on the following Marvell MVEBU SoCs: + + * Armada 7k/8k (on the CP110) + * Armada 3700 + + It provides a number of shared PHYs used by various interfaces (network, SATA, + USB, PCIe...). + +properties: + compatible: + enum: + - marvell,comphy-cp110 + - marvell,comphy-a3700 + + reg: + minItems: 1 + items: + - description: Generic COMPHY registers + - description: Lane 1 (PCIe/GbE) registers (Armada 3700) + - description: Lane 0 (USB3/GbE) registers (Armada 3700) + - description: Lane 2 (SATA/USB3) registers (Armada 3700) + + reg-names: + minItems: 1 + items: + - const: comphy + - const: lane1_pcie_gbe + - const: lane0_usb3_gbe + - const: lane2_sata_usb3 + + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + + clocks: + maxItems: 3 + description: Reference clocks for CP110; MG clock, MG Core clock, AXI clock + + clock-names: + items: + - const: mg_clk + - const: mg_core_clk + - const: axi_clk + + marvell,system-controller: + description: Phandle to the Marvell system controller (CP110 only) + $ref: /schemas/types.yaml#/definitions/phandle + +patternProperties: + '^phy@[0-2]$': + description: A COMPHY lane child node + type: object + additionalProperties: false + + properties: + reg: + description: COMPHY lane number + + '#phy-cells': + const: 1 + + required: + - reg + - '#phy-cells' + +required: + - compatible + - reg + +additionalProperties: false + +allOf: + - if: + properties: + compatible: + const: marvell,comphy-a3700 + + then: + properties: + clocks: false + clock-names: false + + required: + - reg-names + + else: + required: + - marvell,system-controller + +examples: + - | + phy@120000 { + compatible = "marvell,comphy-cp110"; + reg = <0x120000 0x6000>; + clocks = <&clk 1 5>, <&clk 1 6>, <&clk 1 18>; + clock-names = "mg_clk", "mg_core_clk", "axi_clk"; + #address-cells = <1>; + #size-cells = <0>; + marvell,system-controller = <&syscon0>; + + phy@0 { + reg = <0>; + #phy-cells = <1>; + }; + + phy@1 { + reg = <1>; + #phy-cells = <1>; + }; + }; + + - | + phy@18300 { + compatible = "marvell,comphy-a3700"; + reg = <0x18300 0x300>, + <0x1F000 0x400>, + <0x5C000 0x400>, + <0xe0178 0x8>; + reg-names = "comphy", + "lane1_pcie_gbe", + "lane0_usb3_gbe", + "lane2_sata_usb3"; + #address-cells = <1>; + #size-cells = <0>; + + comphy0: phy@0 { + reg = <0>; + #phy-cells = <1>; + }; + + comphy1: phy@1 { + reg = <1>; + #phy-cells = <1>; + }; + + comphy2: phy@2 { + reg = <2>; + #phy-cells = <1>; + }; + };
Documentation/devicetree/bindings/phy/phy-mvebu-comphy.txt deleted +0 -94
94 lines not on this page · raw message
MAINTAINERS +1 -1
@@ -14495,7 +14495,7 @@ MARVELL ARMADA 3700 PHY DRIVERS M: Miquel Raynal <[email protected]> S: Maintained F: Documentation/devicetree/bindings/phy/marvell,armada-3700-utmi-phy.yaml -F: Documentation/devicetree/bindings/phy/phy-mvebu-comphy.txt +F: Documentation/devicetree/bindings/phy/marvell,comphy-cp110.yaml F: drivers/phy/marvell/phy-mvebu-a3700-comphy.c F: drivers/phy/marvell/phy-mvebu-a3700-utmi.c
Signature · 1 line
2.47.2
Miquel Raynal
maintainerHi Rob,
Thanks for the conversion.
Quoted 4 lines · Rob Herring (Arm)
Convert the Marvell CP110 combo PHY binding to DT schema format. It's a straight forward conversion.
Signed-off-by Rob Herring (Arm) <[email protected]>
[...]
Documentation/devicetree/bindings/phy/marvell,comphy-cp110.yaml line 30
Quoted 10 lines
Documentation/devicetree/bindings/phy/marvell,comphy-cp110.yaml new file +10
-0+properties: + compatible: + enum: + - marvell,comphy-cp110 + - marvell,comphy-a3700 + + reg: + minItems: 1 + items: + - description: Generic COMPHY registers
Would you mind to add "(Armada 7k/8k)" here? This information was in the description and got lost. Armada 7k/8k had (IIRC) a number of Application Processors and Co-Processors, it might not be straightforward to guess what "cp110" means to people not familiar with Marvell naming otherwise?
Documentation/devicetree/bindings/phy/marvell,comphy-cp110.yaml line 36
Quoted 6 lines
Documentation/devicetree/bindings/phy/marvell,comphy-cp110.yaml new file +6
-0+ - description: Lane 1 (PCIe/GbE) registers (Armada 3700) + - description: Lane 0 (USB3/GbE) registers (Armada 3700) + - description: Lane 2 (SATA/USB3) registers (Armada 3700) + + reg-names: + minItems: 1
minItems should probably be 4 as it is only required (and mandatory) for the marvell,comphy-a3700 compatible? I do not think we intended to ask for a reg-names property when there was just one entry (see armada-cp11x.dtsi).
Documentation/devicetree/bindings/phy/marvell,comphy-cp110.yaml line 44
Quoted 8 lines
Documentation/devicetree/bindings/phy/marvell,comphy-cp110.yaml new file +8
-0+ items: + - const: comphy + - const: lane1_pcie_gbe + - const: lane0_usb3_gbe + - const: lane2_sata_usb3 + + '#address-cells': + const: 1
Should be required?
Documentation/devicetree/bindings/phy/marvell,comphy-cp110.yaml line 47
Quoted 3 lines
Documentation/devicetree/bindings/phy/marvell,comphy-cp110.yaml new file +3
-0+ + '#size-cells': + const: 0
Should be required as well?
Quoted 7 lines
Documentation/devicetree/bindings/phy/marvell,comphy-cp110.yaml new file +7
-0+ + clocks: + maxItems: 3 + description: Reference clocks for CP110; MG clock, MG Core clock, AXI clock + + clock-names: + items:
Documentation/devicetree/bindings/phy/marvell,comphy-cp110.yaml line 64
Quoted 10 lines
Documentation/devicetree/bindings/phy/marvell,comphy-cp110.yaml new file +10
-0+ - const: mg_clk + - const: mg_core_clk + - const: axi_clk + + marvell,system-controller: + description: Phandle to the Marvell system controller (CP110 only) + $ref: /schemas/types.yaml#/definitions/phandle + +patternProperties: + '^phy@[0-2]$':
Technically, these nodes are also mandatory, I don't remember if we can mark them as such in the "required" section though.
Quoted 10 lines
Documentation/devicetree/bindings/phy/marvell,comphy-cp110.yaml new file +10
-0+ description: A COMPHY lane child node + type: object + additionalProperties: false + + properties: + reg: + description: COMPHY lane number + + '#phy-cells': + const: 1
Documentation/devicetree/bindings/phy/marvell,comphy-cp110.yaml line 84
Quoted 10 lines
Documentation/devicetree/bindings/phy/marvell,comphy-cp110.yaml new file +10
-0+ + required: + - reg + - '#phy-cells' + +required: + - compatible + - reg + +additionalProperties: false
Thanks,
Miquèl
Signature · 3 lines
linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy