1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
4 $id: http://devicetree.org/schemas/net/dsa/qca8k.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Qualcomm Atheros QCA83xx switch family
10 - John Crispin <john@phrozen.org>
13 If the QCA8K switch is connect to an SoC's external mdio-bus, each subnode
14 describing a port needs to have a valid phandle referencing the internal PHY
15 it is connected to. This is because there is no N:N mapping of port and PHY
16 ID. To declare the internal mdio-bus configuration, declare an MDIO node in
17 the switch node and declare the phandle for the port, referencing the internal
18 PHY it is connected to. In this config, an internal mdio-bus is registered and
19 the MDIO master is used for communication. Mixed external and internal
20 mdio-bus configurations are not supported by the hardware.
21 Each phy has at most 3 LEDs connected and can be declared
22 using the standard LEDs structure.
33 qca,qca8328: referenced as AR8328(N)-AK1(A/B) QFN 176 pin package
34 qca,qca8327: referenced as AR8327(N)-AL1A DR-QFN 148 pin package
35 qca,qca8334: referenced as QCA8334-AL3C QFN 88 pin package
36 qca,qca8337: referenced as QCA8337N-AL3(B/C) DR-QFN 148 pin package
43 GPIO to be used to reset the whole device
46 qca,ignore-power-on-sel:
47 $ref: /schemas/types.yaml#/definitions/flag
49 Ignore power-on pin strapping to configure LED open-drain or EEPROM
50 presence. This is needed for devices with incorrect configuration or when
51 the OEM has decided not to use pin strapping and falls back to SW regs.
54 $ref: /schemas/types.yaml#/definitions/flag
56 Set LEDs to open-drain mode. This requires the qca,ignore-power-on-sel to
57 be set, otherwise the driver will fail at probe. This is required if the
58 OEM does not use pin strapping to set this mode and prefers to set it
59 using SW regs. The pin strappings related to LED open-drain mode are
60 B68 on the QCA832x and B49 on the QCA833x.
63 $ref: /schemas/net/mdio.yaml#
64 unevaluatedProperties: false
65 description: Qca8k switch have an internal mdio to access switch port.
66 If this is not present, the legacy mapping is used and the
67 internal mdio access is used.
68 With the legacy mapping the reg corresponding to the internal
69 mdio is the switch reg with an offset of -1.
74 "^(ethernet-)?ports$":
77 "^(ethernet-)?port@[0-6]$":
79 description: Ethernet switch ports
84 qca,sgmii-rxclk-falling-edge:
85 $ref: /schemas/types.yaml#/definitions/flag
87 Set the receive clock phase to falling edge. Mostly commonly used on
88 the QCA8327 with CPU port 0 set to SGMII.
90 qca,sgmii-txclk-falling-edge:
91 $ref: /schemas/types.yaml#/definitions/flag
93 Set the transmit clock phase to falling edge.
96 $ref: /schemas/types.yaml#/definitions/flag
98 For SGMII CPU port, explicitly enable PLL, TX and RX chain along with
99 Signal Detection. On the QCA8327 this should not be enabled, otherwise
100 the SGMII port will not initialize. When used on the QCA8337, revision 3
101 or greater, a warning will be displayed. When the CPU port is set to
102 SGMII on the QCA8337, it is advised to set this unless a communication
105 unevaluatedProperties: false
117 unevaluatedProperties: false
121 #include <dt-bindings/gpio/gpio.h>
122 #include <dt-bindings/leds/common.h>
125 #address-cells = <1>;
128 external_phy_port1: ethernet-phy@0 {
132 external_phy_port2: ethernet-phy@1 {
136 external_phy_port3: ethernet-phy@2 {
140 external_phy_port4: ethernet-phy@3 {
144 external_phy_port5: ethernet-phy@4 {
149 compatible = "qca,qca8337";
150 reset-gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
154 #address-cells = <1>;
171 phy-handle = <&external_phy_port1>;
177 phy-handle = <&external_phy_port2>;
183 phy-handle = <&external_phy_port3>;
189 phy-handle = <&external_phy_port4>;
195 phy-handle = <&external_phy_port5>;
201 #include <dt-bindings/gpio/gpio.h>
204 #address-cells = <1>;
208 compatible = "qca,qca8337";
209 reset-gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
213 #address-cells = <1>;
230 phy-mode = "internal";
231 phy-handle = <&internal_phy_port1>;
234 #address-cells = <1>;
239 color = <LED_COLOR_ID_WHITE>;
240 function = LED_FUNCTION_LAN;
241 default-state = "keep";
246 color = <LED_COLOR_ID_AMBER>;
247 function = LED_FUNCTION_LAN;
248 default-state = "keep";
256 phy-mode = "internal";
257 phy-handle = <&internal_phy_port2>;
263 phy-mode = "internal";
264 phy-handle = <&internal_phy_port3>;
270 phy-mode = "internal";
271 phy-handle = <&internal_phy_port4>;
277 phy-mode = "internal";
278 phy-handle = <&internal_phy_port5>;
286 qca,sgmii-rxclk-falling-edge;
296 #address-cells = <1>;
299 internal_phy_port1: ethernet-phy@0 {
303 internal_phy_port2: ethernet-phy@1 {
307 internal_phy_port3: ethernet-phy@2 {
311 internal_phy_port4: ethernet-phy@3 {
315 internal_phy_port5: ethernet-phy@4 {