Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dt-bindings: net: qca,ar9331: convert to DT schema

Convert the Qualcomm Atheros AR9331 built-in switch bindings to DT
schema.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://lore.kernel.org/r/20240212182911.233819-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Krzysztof Kozlowski and committed by
Jakub Kicinski
4a78f017 f7859a03

+161 -147
-147
Documentation/devicetree/bindings/net/dsa/ar9331.txt
··· 1 - Atheros AR9331 built-in switch 2 - ============================= 3 - 4 - It is a switch built-in to Atheros AR9331 WiSoC and addressable over internal 5 - MDIO bus. All PHYs are built-in as well. 6 - 7 - Required properties: 8 - 9 - - compatible: should be: "qca,ar9331-switch" 10 - - reg: Address on the MII bus for the switch. 11 - - resets : Must contain an entry for each entry in reset-names. 12 - - reset-names : Must include the following entries: "switch" 13 - - interrupt-parent: Phandle to the parent interrupt controller 14 - - interrupts: IRQ line for the switch 15 - - interrupt-controller: Indicates the switch is itself an interrupt 16 - controller. This is used for the PHY interrupts. 17 - - #interrupt-cells: must be 1 18 - - mdio: Container of PHY and devices on the switches MDIO bus. 19 - 20 - See Documentation/devicetree/bindings/net/dsa/dsa.txt for a list of additional 21 - required and optional properties. 22 - Examples: 23 - 24 - eth0: ethernet@19000000 { 25 - compatible = "qca,ar9330-eth"; 26 - reg = <0x19000000 0x200>; 27 - interrupts = <4>; 28 - 29 - resets = <&rst 9>, <&rst 22>; 30 - reset-names = "mac", "mdio"; 31 - clocks = <&pll ATH79_CLK_AHB>, <&pll ATH79_CLK_AHB>; 32 - clock-names = "eth", "mdio"; 33 - 34 - phy-mode = "mii"; 35 - phy-handle = <&phy_port4>; 36 - }; 37 - 38 - eth1: ethernet@1a000000 { 39 - compatible = "qca,ar9330-eth"; 40 - reg = <0x1a000000 0x200>; 41 - interrupts = <5>; 42 - resets = <&rst 13>, <&rst 23>; 43 - reset-names = "mac", "mdio"; 44 - clocks = <&pll ATH79_CLK_AHB>, <&pll ATH79_CLK_AHB>; 45 - clock-names = "eth", "mdio"; 46 - 47 - phy-mode = "gmii"; 48 - 49 - fixed-link { 50 - speed = <1000>; 51 - full-duplex; 52 - }; 53 - 54 - mdio { 55 - #address-cells = <1>; 56 - #size-cells = <0>; 57 - 58 - switch10: switch@10 { 59 - #address-cells = <1>; 60 - #size-cells = <0>; 61 - 62 - compatible = "qca,ar9331-switch"; 63 - reg = <0x10>; 64 - resets = <&rst 8>; 65 - reset-names = "switch"; 66 - 67 - interrupt-parent = <&miscintc>; 68 - interrupts = <12>; 69 - 70 - interrupt-controller; 71 - #interrupt-cells = <1>; 72 - 73 - ports { 74 - #address-cells = <1>; 75 - #size-cells = <0>; 76 - 77 - switch_port0: port@0 { 78 - reg = <0x0>; 79 - ethernet = <&eth1>; 80 - 81 - phy-mode = "gmii"; 82 - 83 - fixed-link { 84 - speed = <1000>; 85 - full-duplex; 86 - }; 87 - }; 88 - 89 - switch_port1: port@1 { 90 - reg = <0x1>; 91 - phy-handle = <&phy_port0>; 92 - phy-mode = "internal"; 93 - }; 94 - 95 - switch_port2: port@2 { 96 - reg = <0x2>; 97 - phy-handle = <&phy_port1>; 98 - phy-mode = "internal"; 99 - }; 100 - 101 - switch_port3: port@3 { 102 - reg = <0x3>; 103 - phy-handle = <&phy_port2>; 104 - phy-mode = "internal"; 105 - }; 106 - 107 - switch_port4: port@4 { 108 - reg = <0x4>; 109 - phy-handle = <&phy_port3>; 110 - phy-mode = "internal"; 111 - }; 112 - }; 113 - 114 - mdio { 115 - #address-cells = <1>; 116 - #size-cells = <0>; 117 - 118 - interrupt-parent = <&switch10>; 119 - 120 - phy_port0: phy@0 { 121 - reg = <0x0>; 122 - interrupts = <0>; 123 - }; 124 - 125 - phy_port1: phy@1 { 126 - reg = <0x1>; 127 - interrupts = <0>; 128 - }; 129 - 130 - phy_port2: phy@2 { 131 - reg = <0x2>; 132 - interrupts = <0>; 133 - }; 134 - 135 - phy_port3: phy@3 { 136 - reg = <0x3>; 137 - interrupts = <0>; 138 - }; 139 - 140 - phy_port4: phy@4 { 141 - reg = <0x4>; 142 - interrupts = <0>; 143 - }; 144 - }; 145 - }; 146 - }; 147 - };
+161
Documentation/devicetree/bindings/net/dsa/qca,ar9331.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/net/dsa/qca,ar9331.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm Atheros AR9331 built-in switch 8 + 9 + maintainers: 10 + - Oleksij Rempel <o.rempel@pengutronix.de> 11 + 12 + description: 13 + Qualcomm Atheros AR9331 is a switch built-in to Atheros AR9331 WiSoC and 14 + addressable over internal MDIO bus. All PHYs are built-in as well. 15 + 16 + properties: 17 + compatible: 18 + const: qca,ar9331-switch 19 + 20 + reg: 21 + maxItems: 1 22 + 23 + interrupts: 24 + maxItems: 1 25 + 26 + interrupt-controller: true 27 + 28 + '#interrupt-cells': 29 + const: 1 30 + 31 + mdio: 32 + $ref: /schemas/net/mdio.yaml# 33 + unevaluatedProperties: false 34 + properties: 35 + interrupt-parent: true 36 + 37 + patternProperties: 38 + '(ethernet-)?phy@[0-4]+$': 39 + type: object 40 + unevaluatedProperties: false 41 + 42 + properties: 43 + reg: true 44 + interrupts: 45 + maxItems: 1 46 + 47 + resets: 48 + maxItems: 1 49 + 50 + reset-names: 51 + items: 52 + - const: switch 53 + 54 + required: 55 + - compatible 56 + - reg 57 + - interrupts 58 + - interrupt-controller 59 + - '#interrupt-cells' 60 + - mdio 61 + - ports 62 + - resets 63 + - reset-names 64 + 65 + allOf: 66 + - $ref: dsa.yaml#/$defs/ethernet-ports 67 + 68 + unevaluatedProperties: false 69 + 70 + examples: 71 + - | 72 + mdio { 73 + #address-cells = <1>; 74 + #size-cells = <0>; 75 + 76 + switch10: switch@10 { 77 + compatible = "qca,ar9331-switch"; 78 + reg = <0x10>; 79 + 80 + interrupt-parent = <&miscintc>; 81 + interrupts = <12>; 82 + interrupt-controller; 83 + #interrupt-cells = <1>; 84 + 85 + resets = <&rst 8>; 86 + reset-names = "switch"; 87 + 88 + ports { 89 + #address-cells = <1>; 90 + #size-cells = <0>; 91 + 92 + port@0 { 93 + reg = <0x0>; 94 + ethernet = <&eth1>; 95 + 96 + phy-mode = "gmii"; 97 + 98 + fixed-link { 99 + speed = <1000>; 100 + full-duplex; 101 + }; 102 + }; 103 + 104 + port@1 { 105 + reg = <0x1>; 106 + phy-handle = <&phy_port0>; 107 + phy-mode = "internal"; 108 + }; 109 + 110 + port@2 { 111 + reg = <0x2>; 112 + phy-handle = <&phy_port1>; 113 + phy-mode = "internal"; 114 + }; 115 + 116 + port@3 { 117 + reg = <0x3>; 118 + phy-handle = <&phy_port2>; 119 + phy-mode = "internal"; 120 + }; 121 + 122 + port@4 { 123 + reg = <0x4>; 124 + phy-handle = <&phy_port3>; 125 + phy-mode = "internal"; 126 + }; 127 + }; 128 + 129 + mdio { 130 + #address-cells = <1>; 131 + #size-cells = <0>; 132 + 133 + interrupt-parent = <&switch10>; 134 + 135 + phy_port0: ethernet-phy@0 { 136 + reg = <0x0>; 137 + interrupts = <0>; 138 + }; 139 + 140 + phy_port1: ethernet-phy@1 { 141 + reg = <0x1>; 142 + interrupts = <0>; 143 + }; 144 + 145 + phy_port2: ethernet-phy@2 { 146 + reg = <0x2>; 147 + interrupts = <0>; 148 + }; 149 + 150 + phy_port3: ethernet-phy@3 { 151 + reg = <0x3>; 152 + interrupts = <0>; 153 + }; 154 + 155 + phy_port4: ethernet-phy@4 { 156 + reg = <0x4>; 157 + interrupts = <0>; 158 + }; 159 + }; 160 + }; 161 + };