1 // SPDX-License-Identifier: GPL-2.0 1 // SPDX-License-Identifier: GPL-2.0 2 #include "qcom-ipq8064.dtsi" 2 #include "qcom-ipq8064.dtsi" 3 #include <dt-bindings/input/input.h> 3 #include <dt-bindings/input/input.h> 4 #include <dt-bindings/leds/common.h> 4 #include <dt-bindings/leds/common.h> 5 5 6 / { 6 / { 7 model = "MikroTik RB3011UiAS-RM"; 7 model = "MikroTik RB3011UiAS-RM"; 8 compatible = "mikrotik,rb3011", "qcom, 8 compatible = "mikrotik,rb3011", "qcom,ipq8064"; 9 9 10 aliases { 10 aliases { 11 serial0 = &gsbi7_serial; 11 serial0 = &gsbi7_serial; 12 ethernet0 = &gmac0; 12 ethernet0 = &gmac0; 13 ethernet1 = &gmac3; 13 ethernet1 = &gmac3; 14 mdio-gpio0 = &mdio0; 14 mdio-gpio0 = &mdio0; 15 mdio-gpio1 = &mdio1; 15 mdio-gpio1 = &mdio1; 16 }; 16 }; 17 17 18 chosen { 18 chosen { 19 bootargs = "loglevel=8 console 19 bootargs = "loglevel=8 console=ttyMSM0,115200"; 20 stdout-path = "serial0:115200n 20 stdout-path = "serial0:115200n8"; 21 }; 21 }; 22 22 23 gpio-keys { 23 gpio-keys { 24 compatible = "gpio-keys"; 24 compatible = "gpio-keys"; 25 pinctrl-0 = <&buttons_pins>; 25 pinctrl-0 = <&buttons_pins>; 26 pinctrl-names = "default"; 26 pinctrl-names = "default"; 27 27 28 button { 28 button { 29 label = "reset"; 29 label = "reset"; 30 linux,code = <KEY_REST 30 linux,code = <KEY_RESTART>; 31 gpios = <&qcom_pinmux 31 gpios = <&qcom_pinmux 66 GPIO_ACTIVE_LOW>; 32 linux,input-type = <1> 32 linux,input-type = <1>; 33 debounce-interval = <6 33 debounce-interval = <60>; 34 }; 34 }; 35 }; 35 }; 36 36 37 leds { 37 leds { 38 compatible = "gpio-leds"; 38 compatible = "gpio-leds"; 39 pinctrl-0 = <&leds_pins>; 39 pinctrl-0 = <&leds_pins>; 40 pinctrl-names = "default"; 40 pinctrl-names = "default"; 41 41 42 led-0 { 42 led-0 { 43 label = "rb3011:green: 43 label = "rb3011:green:user"; 44 color = <LED_COLOR_ID_ 44 color = <LED_COLOR_ID_GREEN>; 45 gpios = <&qcom_pinmux 45 gpios = <&qcom_pinmux 33 GPIO_ACTIVE_HIGH>; 46 default-state = "off"; 46 default-state = "off"; 47 }; 47 }; 48 }; 48 }; 49 49 50 memory@42000000 { 50 memory@42000000 { 51 reg = <0x42000000 0x3e000000>; 51 reg = <0x42000000 0x3e000000>; 52 device_type = "memory"; 52 device_type = "memory"; 53 }; 53 }; 54 54 55 mdio0: mdio-0 { 55 mdio0: mdio-0 { 56 status = "okay"; 56 status = "okay"; 57 compatible = "virtual,mdio-gpi 57 compatible = "virtual,mdio-gpio"; 58 gpios = <&qcom_pinmux 1 GPIO_A 58 gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH>, 59 <&qcom_pinmux 0 GPIO_A 59 <&qcom_pinmux 0 GPIO_ACTIVE_HIGH>; 60 #address-cells = <1>; 60 #address-cells = <1>; 61 #size-cells = <0>; 61 #size-cells = <0>; 62 62 63 pinctrl-0 = <&mdio0_pins>; 63 pinctrl-0 = <&mdio0_pins>; 64 pinctrl-names = "default"; 64 pinctrl-names = "default"; 65 65 66 switch0: switch@10 { 66 switch0: switch@10 { 67 compatible = "qca,qca8 67 compatible = "qca,qca8337"; 68 68 69 dsa,member = <0 0>; 69 dsa,member = <0 0>; 70 70 71 pinctrl-0 = <&sw0_rese 71 pinctrl-0 = <&sw0_reset_pin>; 72 pinctrl-names = "defau 72 pinctrl-names = "default"; 73 73 74 reset-gpios = <&qcom_p 74 reset-gpios = <&qcom_pinmux 16 GPIO_ACTIVE_LOW>; 75 reg = <0x10>; 75 reg = <0x10>; 76 76 77 ports { 77 ports { 78 #address-cells 78 #address-cells = <1>; 79 #size-cells = 79 #size-cells = <0>; 80 80 81 switch0cpu: po 81 switch0cpu: port@0 { 82 reg = 82 reg = <0>; 83 label 83 label = "cpu"; 84 ethern 84 ethernet = <&gmac0>; 85 phy-mo 85 phy-mode = "rgmii-id"; 86 fixed- 86 fixed-link { 87 87 speed = <1000>; 88 88 full-duplex; 89 }; 89 }; 90 }; 90 }; 91 91 92 port@1 { 92 port@1 { 93 reg = 93 reg = <1>; 94 label 94 label = "sw1"; 95 95 96 leds { 96 leds { 97 97 #address-cells = <1>; 98 98 #size-cells = <0>; 99 99 100 100 led@0 { 101 101 reg = <0>; 102 102 color = <LED_COLOR_ID_GREEN>; 103 103 function = LED_FUNCTION_LAN; 104 104 default-state = "keep"; 105 105 }; 106 }; 106 }; 107 }; 107 }; 108 108 109 port@2 { 109 port@2 { 110 reg = 110 reg = <2>; 111 label 111 label = "sw2"; 112 112 113 leds { 113 leds { 114 114 #address-cells = <1>; 115 115 #size-cells = <0>; 116 116 117 117 led@0 { 118 118 reg = <0>; 119 119 color = <LED_COLOR_ID_GREEN>; 120 120 function = LED_FUNCTION_LAN; 121 121 default-state = "keep"; 122 122 }; 123 }; 123 }; 124 }; 124 }; 125 125 126 port@3 { 126 port@3 { 127 reg = 127 reg = <3>; 128 label 128 label = "sw3"; 129 129 130 leds { 130 leds { 131 131 #address-cells = <1>; 132 132 #size-cells = <0>; 133 133 134 134 led@0 { 135 135 reg = <0>; 136 136 color = <LED_COLOR_ID_GREEN>; 137 137 function = LED_FUNCTION_LAN; 138 138 default-state = "keep"; 139 139 }; 140 }; 140 }; 141 }; 141 }; 142 142 143 port@4 { 143 port@4 { 144 reg = 144 reg = <4>; 145 label 145 label = "sw4"; 146 146 147 leds { 147 leds { 148 148 #address-cells = <1>; 149 149 #size-cells = <0>; 150 150 151 151 led@0 { 152 152 reg = <0>; 153 153 color = <LED_COLOR_ID_GREEN>; 154 154 function = LED_FUNCTION_LAN; 155 155 default-state = "keep"; 156 156 }; 157 }; 157 }; 158 }; 158 }; 159 159 160 port@5 { 160 port@5 { 161 reg = 161 reg = <5>; 162 label 162 label = "sw5"; 163 163 164 leds { 164 leds { 165 165 #address-cells = <1>; 166 166 #size-cells = <0>; 167 167 168 168 led@0 { 169 169 reg = <0>; 170 170 color = <LED_COLOR_ID_GREEN>; 171 171 function = LED_FUNCTION_LAN; 172 172 default-state = "keep"; 173 173 }; 174 }; 174 }; 175 }; 175 }; 176 }; 176 }; 177 }; 177 }; 178 }; 178 }; 179 179 180 mdio1: mdio-1 { 180 mdio1: mdio-1 { 181 status = "okay"; 181 status = "okay"; 182 compatible = "virtual,mdio-gpi 182 compatible = "virtual,mdio-gpio"; 183 gpios = <&qcom_pinmux 11 GPIO_ 183 gpios = <&qcom_pinmux 11 GPIO_ACTIVE_HIGH>, 184 <&qcom_pinmux 10 GPIO_ 184 <&qcom_pinmux 10 GPIO_ACTIVE_HIGH>; 185 #address-cells = <1>; 185 #address-cells = <1>; 186 #size-cells = <0>; 186 #size-cells = <0>; 187 187 188 pinctrl-0 = <&mdio1_pins>; 188 pinctrl-0 = <&mdio1_pins>; 189 pinctrl-names = "default"; 189 pinctrl-names = "default"; 190 190 191 switch1: switch@14 { 191 switch1: switch@14 { 192 compatible = "qca,qca8 192 compatible = "qca,qca8337"; 193 193 194 dsa,member = <1 0>; 194 dsa,member = <1 0>; 195 195 196 pinctrl-0 = <&sw1_rese 196 pinctrl-0 = <&sw1_reset_pin>; 197 pinctrl-names = "defau 197 pinctrl-names = "default"; 198 198 199 reset-gpios = <&qcom_p 199 reset-gpios = <&qcom_pinmux 17 GPIO_ACTIVE_LOW>; 200 reg = <0x10>; 200 reg = <0x10>; 201 201 202 ports { 202 ports { 203 #address-cells 203 #address-cells = <1>; 204 #size-cells = 204 #size-cells = <0>; 205 205 206 switch1cpu: po 206 switch1cpu: port@0 { 207 reg = 207 reg = <0>; 208 label 208 label = "cpu"; 209 ethern 209 ethernet = <&gmac3>; 210 phy-mo 210 phy-mode = "sgmii"; 211 fixed- 211 fixed-link { 212 212 speed = <1000>; 213 213 full-duplex; 214 }; 214 }; 215 }; 215 }; 216 216 217 port@1 { 217 port@1 { 218 reg = 218 reg = <1>; 219 label 219 label = "sw6"; 220 220 221 leds { 221 leds { 222 222 #address-cells = <1>; 223 223 #size-cells = <0>; 224 224 225 225 led@0 { 226 226 reg = <0>; 227 227 color = <LED_COLOR_ID_GREEN>; 228 228 function = LED_FUNCTION_LAN; 229 229 default-state = "keep"; 230 230 }; 231 }; 231 }; 232 }; 232 }; 233 233 234 port@2 { 234 port@2 { 235 reg = 235 reg = <2>; 236 label 236 label = "sw7"; 237 237 238 leds { 238 leds { 239 239 #address-cells = <1>; 240 240 #size-cells = <0>; 241 241 242 242 led@0 { 243 243 reg = <0>; 244 244 color = <LED_COLOR_ID_GREEN>; 245 245 function = LED_FUNCTION_LAN; 246 246 default-state = "keep"; 247 247 }; 248 }; 248 }; 249 }; 249 }; 250 250 251 port@3 { 251 port@3 { 252 reg = 252 reg = <3>; 253 label 253 label = "sw8"; 254 254 255 leds { 255 leds { 256 256 #address-cells = <1>; 257 257 #size-cells = <0>; 258 258 259 259 led@0 { 260 260 reg = <0>; 261 261 color = <LED_COLOR_ID_GREEN>; 262 262 function = LED_FUNCTION_LAN; 263 263 default-state = "keep"; 264 264 }; 265 }; 265 }; 266 }; 266 }; 267 267 268 port@4 { 268 port@4 { 269 reg = 269 reg = <4>; 270 label 270 label = "sw9"; 271 271 272 leds { 272 leds { 273 273 #address-cells = <1>; 274 274 #size-cells = <0>; 275 275 276 276 led@0 { 277 277 reg = <0>; 278 278 color = <LED_COLOR_ID_GREEN>; 279 279 function = LED_FUNCTION_LAN; 280 280 default-state = "keep"; 281 281 }; 282 }; 282 }; 283 }; 283 }; 284 284 285 port@5 { 285 port@5 { 286 reg = 286 reg = <5>; 287 label 287 label = "sw10"; 288 288 289 leds { 289 leds { 290 290 #address-cells = <1>; 291 291 #size-cells = <0>; 292 292 293 293 led@0 { 294 294 reg = <0>; 295 295 color = <LED_COLOR_ID_GREEN>; 296 296 function = LED_FUNCTION_LAN; 297 297 default-state = "keep"; 298 298 }; 299 }; 299 }; 300 }; 300 }; 301 }; 301 }; 302 }; 302 }; 303 }; 303 }; 304 304 305 soc { 305 soc { 306 gsbi5: gsbi@1a200000 { 306 gsbi5: gsbi@1a200000 { 307 qcom,mode = <GSBI_PROT 307 qcom,mode = <GSBI_PROT_SPI>; 308 status = "okay"; 308 status = "okay"; 309 309 310 spi4: spi@1a280000 { 310 spi4: spi@1a280000 { 311 status = "okay 311 status = "okay"; 312 312 313 pinctrl-0 = <& 313 pinctrl-0 = <&spi_pins>; 314 pinctrl-names 314 pinctrl-names = "default"; 315 315 316 cs-gpios = <&q 316 cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>; 317 317 318 norflash: flas 318 norflash: flash@0 { 319 compat 319 compatible = "jedec,spi-nor"; 320 #addre 320 #address-cells = <1>; 321 #size- 321 #size-cells = <1>; 322 spi-ma 322 spi-max-frequency = <50000000>; 323 reg = 323 reg = <0>; 324 324 325 partit 325 partition@0 { 326 326 label = "RouterBoot"; 327 327 reg = <0x0 0x40000>; 328 }; 328 }; 329 }; 329 }; 330 }; 330 }; 331 }; 331 }; 332 }; 332 }; 333 }; 333 }; 334 334 335 &adm_dma { 335 &adm_dma { 336 status = "okay"; 336 status = "okay"; 337 }; 337 }; 338 338 339 &gmac0 { 339 &gmac0 { 340 status = "okay"; 340 status = "okay"; 341 341 342 phy-mode = "rgmii"; 342 phy-mode = "rgmii"; 343 qcom,id = <0>; 343 qcom,id = <0>; 344 phy-handle = <&switch0cpu>; 344 phy-handle = <&switch0cpu>; 345 345 346 fixed-link { 346 fixed-link { 347 speed = <1000>; 347 speed = <1000>; 348 full-duplex; 348 full-duplex; 349 }; 349 }; 350 }; 350 }; 351 351 352 &gmac3 { 352 &gmac3 { 353 status = "okay"; 353 status = "okay"; 354 354 355 phy-mode = "sgmii"; 355 phy-mode = "sgmii"; 356 qcom,id = <3>; 356 qcom,id = <3>; 357 phy-handle = <&switch1cpu>; 357 phy-handle = <&switch1cpu>; 358 358 359 fixed-link { 359 fixed-link { 360 speed = <1000>; 360 speed = <1000>; 361 full-duplex; 361 full-duplex; 362 }; 362 }; 363 }; 363 }; 364 364 365 &gsbi7 { 365 &gsbi7 { 366 status = "okay"; 366 status = "okay"; 367 qcom,mode = <GSBI_PROT_I2C_UART>; 367 qcom,mode = <GSBI_PROT_I2C_UART>; 368 }; 368 }; 369 369 370 &gsbi7_serial { 370 &gsbi7_serial { 371 status = "okay"; 371 status = "okay"; 372 }; 372 }; 373 373 374 &hs_phy_1 { 374 &hs_phy_1 { 375 status = "okay"; 375 status = "okay"; 376 }; 376 }; 377 377 378 &nand { 378 &nand { 379 status = "okay"; 379 status = "okay"; 380 380 381 nand@0 { 381 nand@0 { 382 reg = <0>; 382 reg = <0>; 383 383 384 nand-ecc-strength = <4>; 384 nand-ecc-strength = <4>; 385 nand-bus-width = <8>; 385 nand-bus-width = <8>; 386 nand-ecc-step-size = <512>; 386 nand-ecc-step-size = <512>; 387 387 388 partitions { 388 partitions { 389 compatible = "fixed-pa 389 compatible = "fixed-partitions"; 390 #address-cells = <1>; 390 #address-cells = <1>; 391 #size-cells = <1>; 391 #size-cells = <1>; 392 392 393 boot@0 { 393 boot@0 { 394 label = "Route 394 label = "RouterBoard NAND 1 Boot"; 395 reg = <0x00000 395 reg = <0x0000000 0x0800000>; 396 }; 396 }; 397 397 398 main@800000 { 398 main@800000 { 399 label = "Route 399 label = "RouterBoard NAND 1 Main"; 400 reg = <0x08000 400 reg = <0x0800000 0x7800000>; 401 }; 401 }; 402 }; 402 }; 403 }; 403 }; 404 }; 404 }; 405 405 406 &qcom_pinmux { 406 &qcom_pinmux { 407 buttons_pins: buttons-state { 407 buttons_pins: buttons-state { 408 pins = "gpio66"; 408 pins = "gpio66"; 409 function = "gpio"; 409 function = "gpio"; 410 drive-strength = <16>; 410 drive-strength = <16>; 411 bias-disable; 411 bias-disable; 412 }; 412 }; 413 413 414 leds_pins: leds-state { 414 leds_pins: leds-state { 415 pins = "gpio33"; 415 pins = "gpio33"; 416 function = "gpio"; 416 function = "gpio"; 417 drive-strength = <16>; 417 drive-strength = <16>; 418 bias-disable; 418 bias-disable; 419 }; 419 }; 420 420 421 mdio1_pins: mdio1-state { 421 mdio1_pins: mdio1-state { 422 pins = "gpio10", "gpio11"; 422 pins = "gpio10", "gpio11"; 423 function = "gpio"; 423 function = "gpio"; 424 drive-strength = <8>; 424 drive-strength = <8>; 425 bias-disable; 425 bias-disable; 426 }; 426 }; 427 427 428 sw0_reset_pin: sw0-reset-state { 428 sw0_reset_pin: sw0-reset-state { 429 pins = "gpio16"; 429 pins = "gpio16"; 430 drive-strength = <16>; 430 drive-strength = <16>; 431 function = "gpio"; 431 function = "gpio"; 432 bias-disable; 432 bias-disable; 433 input-disable; 433 input-disable; 434 }; 434 }; 435 435 436 sw1_reset_pin: sw1-reset-state { 436 sw1_reset_pin: sw1-reset-state { 437 pins = "gpio17"; 437 pins = "gpio17"; 438 drive-strength = <16>; 438 drive-strength = <16>; 439 function = "gpio"; 439 function = "gpio"; 440 bias-disable; 440 bias-disable; 441 input-disable; 441 input-disable; 442 }; 442 }; 443 443 444 usb1_pwr_en_pins: usb1-pwr-en-state { 444 usb1_pwr_en_pins: usb1-pwr-en-state { 445 pins = "gpio4"; 445 pins = "gpio4"; 446 function = "gpio"; 446 function = "gpio"; 447 drive-strength = <16>; 447 drive-strength = <16>; 448 bias-disable; 448 bias-disable; 449 output-high; 449 output-high; 450 }; 450 }; 451 }; 451 }; 452 452 453 &ss_phy_1 { 453 &ss_phy_1 { 454 status = "okay"; 454 status = "okay"; 455 }; 455 }; 456 456 457 &usb3_1 { 457 &usb3_1 { 458 pinctrl-0 = <&usb1_pwr_en_pins>; 458 pinctrl-0 = <&usb1_pwr_en_pins>; 459 pinctrl-names = "default"; 459 pinctrl-names = "default"; 460 460 461 status = "okay"; 461 status = "okay"; 462 }; 462 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.