136c15a678ef2c1e4324149dbb6e6f3c86f4c763
[openwrt/staging/hauke.git] / target / linux / ipq40xx / patches-6.1 / 707-arm-dts-ipq4019-add-switch-node.patch
1 From 19c507c3fe4a6fc60317dcae2c55de452aecb7d5 Mon Sep 17 00:00:00 2001
2 From: Robert Marko <robert.marko@sartura.hr>
3 Date: Mon, 1 Nov 2021 18:15:04 +0100
4 Subject: [PATCH] arm: dts: ipq4019: add switch node
5
6 Since the built-in IPQ40xx switch now has a driver, add the required node
7 for it to work.
8
9 Signed-off-by: Robert Marko <robert.marko@sartura.hr>
10 ---
11 arch/arm/boot/dts/qcom-ipq4019.dtsi | 76 +++++++++++++++++++++++++++++
12 1 file changed, 76 insertions(+)
13
14 --- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
15 +++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
16 @@ -591,6 +591,82 @@
17 status = "disabled";
18 };
19
20 + switch: switch@c000000 {
21 + compatible = "qca,ipq4019-qca8337n";
22 + reg = <0xc000000 0x80000>, <0x98000 0x800>;
23 + reg-names = "base", "psgmii_phy";
24 + resets = <&gcc ESS_PSGMII_ARES>;
25 + reset-names = "psgmii_rst";
26 + mdio = <&mdio>;
27 + psgmii-ethphy = <&psgmiiphy>;
28 +
29 + status = "disabled";
30 +
31 + ports {
32 + #address-cells = <1>;
33 + #size-cells = <0>;
34 +
35 + port@0 { /* MAC0 */
36 + reg = <0>;
37 + label = "cpu";
38 + ethernet = <&gmac>;
39 + phy-mode = "internal";
40 +
41 + fixed-link {
42 + speed = <1000>;
43 + full-duplex;
44 + pause;
45 + asym-pause;
46 + };
47 + };
48 +
49 + swport1: port@1 { /* MAC1 */
50 + reg = <1>;
51 + label = "lan1";
52 + phy-handle = <&ethphy0>;
53 + phy-mode = "psgmii";
54 +
55 + status = "disabled";
56 + };
57 +
58 + swport2: port@2 { /* MAC2 */
59 + reg = <2>;
60 + label = "lan2";
61 + phy-handle = <&ethphy1>;
62 + phy-mode = "psgmii";
63 +
64 + status = "disabled";
65 + };
66 +
67 + swport3: port@3 { /* MAC3 */
68 + reg = <3>;
69 + label = "lan3";
70 + phy-handle = <&ethphy2>;
71 + phy-mode = "psgmii";
72 +
73 + status = "disabled";
74 + };
75 +
76 + swport4: port@4 { /* MAC4 */
77 + reg = <4>;
78 + label = "lan4";
79 + phy-handle = <&ethphy3>;
80 + phy-mode = "psgmii";
81 +
82 + status = "disabled";
83 + };
84 +
85 + swport5: port@5 { /* MAC5 */
86 + reg = <5>;
87 + label = "wan";
88 + phy-handle = <&ethphy4>;
89 + phy-mode = "psgmii";
90 +
91 + status = "disabled";
92 + };
93 + };
94 + };
95 +
96 gmac: ethernet@c080000 {
97 compatible = "qcom,ipq4019-ess-edma";
98 reg = <0xc080000 0x8000>;