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