|
105 | 105 | interrupt-parent = <&pio>; |
106 | 106 | interrupts = <38 IRQ_TYPE_LEVEL_HIGH>; |
107 | 107 | }; |
| 108 | + |
| 109 | + mfd: mfd@1 { |
| 110 | + compatible = "airoha,an8855-mfd"; |
| 111 | + reg = <1>; |
| 112 | + }; |
108 | 113 | }; |
109 | 114 |
|
110 | 115 | &switch { |
|
141 | 146 | }; |
142 | 147 | }; |
143 | 148 |
|
| 149 | +&mfd { |
| 150 | + efuse { |
| 151 | + compatible = "airoha,an8855-efuse"; |
| 152 | + #nvmem-cell-cells = <0>; |
| 153 | + |
| 154 | + nvmem-layout { |
| 155 | + compatible = "fixed-layout"; |
| 156 | + #address-cells = <1>; |
| 157 | + #size-cells = <1>; |
| 158 | + |
| 159 | + shift_sel_port0_tx_a: shift-sel-port0-tx-a@c { |
| 160 | + reg = <0xc 0x4>; |
| 161 | + }; |
| 162 | + |
| 163 | + shift_sel_port0_tx_b: shift-sel-port0-tx-b@10 { |
| 164 | + reg = <0x10 0x4>; |
| 165 | + }; |
| 166 | + |
| 167 | + shift_sel_port0_tx_c: shift-sel-port0-tx-c@14 { |
| 168 | + reg = <0x14 0x4>; |
| 169 | + }; |
| 170 | + |
| 171 | + shift_sel_port0_tx_d: shift-sel-port0-tx-d@18 { |
| 172 | + reg = <0x18 0x4>; |
| 173 | + }; |
| 174 | + |
| 175 | + shift_sel_port1_tx_a: shift-sel-port1-tx-a@1c { |
| 176 | + reg = <0x1c 0x4>; |
| 177 | + }; |
| 178 | + |
| 179 | + shift_sel_port1_tx_b: shift-sel-port1-tx-b@20 { |
| 180 | + reg = <0x20 0x4>; |
| 181 | + }; |
| 182 | + |
| 183 | + shift_sel_port1_tx_c: shift-sel-port1-tx-c@24 { |
| 184 | + reg = <0x24 0x4>; |
| 185 | + }; |
| 186 | + |
| 187 | + shift_sel_port1_tx_d: shift-sel-port1-tx-d@28 { |
| 188 | + reg = <0x28 0x4>; |
| 189 | + }; |
| 190 | + |
| 191 | + shift_sel_port2_tx_a: shift-sel-port2-tx-a@2c { |
| 192 | + reg = <0x2c 0x4>; |
| 193 | + }; |
| 194 | + |
| 195 | + shift_sel_port2_tx_b: shift-sel-port2-tx-b@30 { |
| 196 | + reg = <0x30 0x4>; |
| 197 | + }; |
| 198 | + |
| 199 | + shift_sel_port2_tx_c: shift-sel-port2-tx-c@34 { |
| 200 | + reg = <0x34 0x4>; |
| 201 | + }; |
| 202 | + |
| 203 | + shift_sel_port2_tx_d: shift-sel-port2-tx-d@38 { |
| 204 | + reg = <0x38 0x4>; |
| 205 | + }; |
| 206 | + }; |
| 207 | + }; |
| 208 | + |
| 209 | + ethernet-switch { |
| 210 | + compatible = "airoha,an8855-switch"; |
| 211 | + reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>; |
| 212 | + airoha,ext-surge; |
| 213 | + |
| 214 | + ports { |
| 215 | + #address-cells = <1>; |
| 216 | + #size-cells = <0>; |
| 217 | + |
| 218 | + port@0 { |
| 219 | + reg = <0>; |
| 220 | + label = "lan3"; |
| 221 | + phy-mode = "internal"; |
| 222 | + phy-handle = <&internal_phy1>; |
| 223 | + }; |
| 224 | + |
| 225 | + port@1 { |
| 226 | + reg = <1>; |
| 227 | + label = "lan2"; |
| 228 | + phy-mode = "internal"; |
| 229 | + phy-handle = <&internal_phy2>; |
| 230 | + }; |
| 231 | + |
| 232 | + port@2 { |
| 233 | + reg = <2>; |
| 234 | + label = "lan1"; |
| 235 | + phy-mode = "internal"; |
| 236 | + phy-handle = <&internal_phy3>; |
| 237 | + }; |
| 238 | + |
| 239 | + port@5 { |
| 240 | + reg = <5>; |
| 241 | + label = "cpu"; |
| 242 | + ethernet = <&gmac0>; |
| 243 | + phy-mode = "2500base-x"; |
| 244 | + |
| 245 | + fixed-link { |
| 246 | + speed = <2500>; |
| 247 | + full-duplex; |
| 248 | + pause; |
| 249 | + }; |
| 250 | + }; |
| 251 | + }; |
| 252 | + }; |
| 253 | + |
| 254 | + mdio { |
| 255 | + compatible = "airoha,an8855-mdio"; |
| 256 | + #address-cells = <1>; |
| 257 | + #size-cells = <0>; |
| 258 | + |
| 259 | + internal_phy1: phy@1 { |
| 260 | + reg = <1>; |
| 261 | + |
| 262 | + nvmem-cells = <&shift_sel_port0_tx_a>, |
| 263 | + <&shift_sel_port0_tx_b>, |
| 264 | + <&shift_sel_port0_tx_c>, |
| 265 | + <&shift_sel_port0_tx_d>; |
| 266 | + nvmem-cell-names = "tx_a", "tx_b", "tx_c", "tx_d"; |
| 267 | + }; |
| 268 | + |
| 269 | + internal_phy2: phy@2 { |
| 270 | + reg = <2>; |
| 271 | + |
| 272 | + nvmem-cells = <&shift_sel_port1_tx_a>, |
| 273 | + <&shift_sel_port1_tx_b>, |
| 274 | + <&shift_sel_port1_tx_c>, |
| 275 | + <&shift_sel_port1_tx_d>; |
| 276 | + nvmem-cell-names = "tx_a", "tx_b", "tx_c", "tx_d"; |
| 277 | + }; |
| 278 | + |
| 279 | + internal_phy3: phy@3 { |
| 280 | + reg = <3>; |
| 281 | + |
| 282 | + nvmem-cells = <&shift_sel_port2_tx_a>, |
| 283 | + <&shift_sel_port2_tx_b>, |
| 284 | + <&shift_sel_port2_tx_c>, |
| 285 | + <&shift_sel_port2_tx_d>; |
| 286 | + nvmem-cell-names = "tx_a", "tx_b", "tx_c", "tx_d"; |
| 287 | + }; |
| 288 | + }; |
| 289 | +}; |
| 290 | + |
144 | 291 | &uart0 { |
145 | 292 | status = "okay"; |
146 | 293 | }; |
|
0 commit comments