Skip to content

Commit e5240c3

Browse files
arinc9mbgg
authored andcommitted
arm: dts: mt7623: add mt7530 switch to mt7623a.dtsi
The MT7530 switch is included as a part of the multi-chip module on the MT7623AI SoC. Add it to mt7623a.dtsi and adjust DTs that call mt7623a.dtsi. Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com> Link: https://lore.kernel.org/r/20230210182505.24597-3-arinc.unal@arinc9.com Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
1 parent f847a3a commit e5240c3

3 files changed

Lines changed: 118 additions & 130 deletions

File tree

arch/arm/boot/dts/mt7623a-rfb-emmc.dts

Lines changed: 22 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -112,74 +112,31 @@
112112
status = "okay";
113113
};
114114

115-
&gmac0 {
116-
status = "okay";
117-
phy-mode = "trgmii";
115+
&switch0 {
116+
ports {
117+
port@0 {
118+
status = "okay";
119+
label = "lan0";
120+
};
118121

119-
fixed-link {
120-
speed = <1000>;
121-
full-duplex;
122-
pause;
123-
};
124-
};
122+
port@1 {
123+
status = "okay";
124+
label = "lan1";
125+
};
125126

126-
&eth {
127-
status = "okay";
127+
port@2 {
128+
status = "okay";
129+
label = "lan2";
130+
};
131+
132+
port@3 {
133+
status = "okay";
134+
label = "lan3";
135+
};
128136

129-
mdio-bus {
130-
#address-cells = <1>;
131-
#size-cells = <0>;
132-
133-
switch@0 {
134-
compatible = "mediatek,mt7530";
135-
reg = <0>;
136-
mediatek,mcm;
137-
resets = <&ethsys MT2701_ETHSYS_MCM_RST>;
138-
reset-names = "mcm";
139-
core-supply = <&mt6323_vpa_reg>;
140-
io-supply = <&mt6323_vemc3v3_reg>;
141-
142-
ports {
143-
#address-cells = <1>;
144-
#size-cells = <0>;
145-
146-
port@0 {
147-
reg = <0>;
148-
label = "lan0";
149-
};
150-
151-
port@1 {
152-
reg = <1>;
153-
label = "lan1";
154-
};
155-
156-
port@2 {
157-
reg = <2>;
158-
label = "lan2";
159-
};
160-
161-
port@3 {
162-
reg = <3>;
163-
label = "lan3";
164-
};
165-
166-
port@4 {
167-
reg = <4>;
168-
label = "wan";
169-
};
170-
171-
port@6 {
172-
reg = <6>;
173-
label = "cpu";
174-
ethernet = <&gmac0>;
175-
phy-mode = "trgmii";
176-
177-
fixed-link {
178-
speed = <1000>;
179-
full-duplex;
180-
};
181-
};
182-
};
137+
port@4 {
138+
status = "okay";
139+
label = "wan";
183140
};
184141
};
185142
};

arch/arm/boot/dts/mt7623a-rfb-nand.dts

Lines changed: 22 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -116,74 +116,31 @@
116116
status = "okay";
117117
};
118118

119-
&gmac0 {
120-
status = "okay";
121-
phy-mode = "trgmii";
119+
&switch0 {
120+
ports {
121+
port@0 {
122+
status = "okay";
123+
label = "lan0";
124+
};
122125

123-
fixed-link {
124-
speed = <1000>;
125-
full-duplex;
126-
pause;
127-
};
128-
};
126+
port@1 {
127+
status = "okay";
128+
label = "lan1";
129+
};
129130

130-
&eth {
131-
status = "okay";
131+
port@2 {
132+
status = "okay";
133+
label = "lan2";
134+
};
132135

133-
mdio-bus {
134-
#address-cells = <1>;
135-
#size-cells = <0>;
136-
137-
switch@0 {
138-
compatible = "mediatek,mt7530";
139-
reg = <0>;
140-
mediatek,mcm;
141-
resets = <&ethsys MT2701_ETHSYS_MCM_RST>;
142-
reset-names = "mcm";
143-
core-supply = <&mt6323_vpa_reg>;
144-
io-supply = <&mt6323_vemc3v3_reg>;
145-
146-
ports {
147-
#address-cells = <1>;
148-
#size-cells = <0>;
149-
150-
port@0 {
151-
reg = <0>;
152-
label = "lan0";
153-
};
154-
155-
port@1 {
156-
reg = <1>;
157-
label = "lan1";
158-
};
159-
160-
port@2 {
161-
reg = <2>;
162-
label = "lan2";
163-
};
164-
165-
port@3 {
166-
reg = <3>;
167-
label = "lan3";
168-
};
169-
170-
port@4 {
171-
reg = <4>;
172-
label = "wan";
173-
};
174-
175-
port@6 {
176-
reg = <6>;
177-
label = "cpu";
178-
ethernet = <&gmac0>;
179-
phy-mode = "trgmii";
180-
181-
fixed-link {
182-
speed = <1000>;
183-
full-duplex;
184-
};
185-
};
186-
};
136+
port@3 {
137+
status = "okay";
138+
label = "lan3";
139+
};
140+
141+
port@4 {
142+
status = "okay";
143+
label = "wan";
187144
};
188145
};
189146
};

arch/arm/boot/dts/mt7623a.dtsi

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,82 @@
1717
power-domains = <&scpsys MT7623A_POWER_DOMAIN_ETH>;
1818
};
1919

20+
&gmac0 {
21+
status = "okay";
22+
phy-mode = "trgmii";
23+
24+
fixed-link {
25+
speed = <1000>;
26+
full-duplex;
27+
pause;
28+
};
29+
};
30+
2031
&eth {
32+
status = "okay";
2133
power-domains = <&scpsys MT7623A_POWER_DOMAIN_ETH>;
34+
35+
mdio: mdio-bus {
36+
#address-cells = <1>;
37+
#size-cells = <0>;
38+
39+
switch0: switch@0 {
40+
compatible = "mediatek,mt7530";
41+
reg = <0>;
42+
mediatek,mcm;
43+
resets = <&ethsys MT2701_ETHSYS_MCM_RST>;
44+
reset-names = "mcm";
45+
core-supply = <&mt6323_vpa_reg>;
46+
io-supply = <&mt6323_vemc3v3_reg>;
47+
48+
ports {
49+
#address-cells = <1>;
50+
#size-cells = <0>;
51+
52+
port@0 {
53+
status = "disabled";
54+
reg = <0>;
55+
label = "swp0";
56+
};
57+
58+
port@1 {
59+
status = "disabled";
60+
reg = <1>;
61+
label = "swp1";
62+
};
63+
64+
port@2 {
65+
status = "disabled";
66+
reg = <2>;
67+
label = "swp2";
68+
};
69+
70+
port@3 {
71+
status = "disabled";
72+
reg = <3>;
73+
label = "swp3";
74+
};
75+
76+
port@4 {
77+
status = "disabled";
78+
reg = <4>;
79+
label = "swp4";
80+
};
81+
82+
port@6 {
83+
reg = <6>;
84+
label = "cpu";
85+
ethernet = <&gmac0>;
86+
phy-mode = "trgmii";
87+
88+
fixed-link {
89+
speed = <1000>;
90+
full-duplex;
91+
};
92+
};
93+
};
94+
};
95+
};
2296
};
2397

2498
&nandc {

0 commit comments

Comments
 (0)