1724ba675SRob Herring// SPDX-License-Identifier: GPL-2.0 2724ba675SRob Herring#include "qcom-ipq8064.dtsi" 3724ba675SRob Herring#include <dt-bindings/input/input.h> 4724ba675SRob Herring#include <dt-bindings/leds/common.h> 5724ba675SRob Herring 6724ba675SRob Herring/ { 7724ba675SRob Herring model = "MikroTik RB3011UiAS-RM"; 8724ba675SRob Herring compatible = "mikrotik,rb3011", "qcom,ipq8064"; 9724ba675SRob Herring 10724ba675SRob Herring aliases { 11724ba675SRob Herring serial0 = &gsbi7_serial; 12724ba675SRob Herring ethernet0 = &gmac0; 13724ba675SRob Herring ethernet1 = &gmac3; 14724ba675SRob Herring mdio-gpio0 = &mdio0; 15724ba675SRob Herring mdio-gpio1 = &mdio1; 16724ba675SRob Herring }; 17724ba675SRob Herring 18724ba675SRob Herring chosen { 19724ba675SRob Herring bootargs = "loglevel=8 console=ttyMSM0,115200"; 20724ba675SRob Herring stdout-path = "serial0:115200n8"; 21724ba675SRob Herring }; 22724ba675SRob Herring 232138c32aSKrzysztof Kozlowski gpio-keys { 242138c32aSKrzysztof Kozlowski compatible = "gpio-keys"; 252138c32aSKrzysztof Kozlowski pinctrl-0 = <&buttons_pins>; 262138c32aSKrzysztof Kozlowski pinctrl-names = "default"; 272138c32aSKrzysztof Kozlowski 282138c32aSKrzysztof Kozlowski button { 292138c32aSKrzysztof Kozlowski label = "reset"; 302138c32aSKrzysztof Kozlowski linux,code = <KEY_RESTART>; 312138c32aSKrzysztof Kozlowski gpios = <&qcom_pinmux 66 GPIO_ACTIVE_LOW>; 322138c32aSKrzysztof Kozlowski linux,input-type = <1>; 332138c32aSKrzysztof Kozlowski debounce-interval = <60>; 342138c32aSKrzysztof Kozlowski }; 352138c32aSKrzysztof Kozlowski }; 362138c32aSKrzysztof Kozlowski 372138c32aSKrzysztof Kozlowski leds { 382138c32aSKrzysztof Kozlowski compatible = "gpio-leds"; 392138c32aSKrzysztof Kozlowski pinctrl-0 = <&leds_pins>; 402138c32aSKrzysztof Kozlowski pinctrl-names = "default"; 412138c32aSKrzysztof Kozlowski 422138c32aSKrzysztof Kozlowski led-0 { 432138c32aSKrzysztof Kozlowski label = "rb3011:green:user"; 442138c32aSKrzysztof Kozlowski color = <LED_COLOR_ID_GREEN>; 452138c32aSKrzysztof Kozlowski gpios = <&qcom_pinmux 33 GPIO_ACTIVE_HIGH>; 462138c32aSKrzysztof Kozlowski default-state = "off"; 472138c32aSKrzysztof Kozlowski }; 482138c32aSKrzysztof Kozlowski }; 492138c32aSKrzysztof Kozlowski 50724ba675SRob Herring memory@42000000 { 51724ba675SRob Herring reg = <0x42000000 0x3e000000>; 52724ba675SRob Herring device_type = "memory"; 53724ba675SRob Herring }; 54724ba675SRob Herring 55724ba675SRob Herring mdio0: mdio-0 { 56724ba675SRob Herring status = "okay"; 57724ba675SRob Herring compatible = "virtual,mdio-gpio"; 58724ba675SRob Herring gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH>, 59724ba675SRob Herring <&qcom_pinmux 0 GPIO_ACTIVE_HIGH>; 60724ba675SRob Herring #address-cells = <1>; 61724ba675SRob Herring #size-cells = <0>; 62724ba675SRob Herring 63724ba675SRob Herring pinctrl-0 = <&mdio0_pins>; 64724ba675SRob Herring pinctrl-names = "default"; 65724ba675SRob Herring 66724ba675SRob Herring switch0: switch@10 { 67724ba675SRob Herring compatible = "qca,qca8337"; 68724ba675SRob Herring 69724ba675SRob Herring dsa,member = <0 0>; 70724ba675SRob Herring 71724ba675SRob Herring pinctrl-0 = <&sw0_reset_pin>; 72724ba675SRob Herring pinctrl-names = "default"; 73724ba675SRob Herring 74724ba675SRob Herring reset-gpios = <&qcom_pinmux 16 GPIO_ACTIVE_LOW>; 75724ba675SRob Herring reg = <0x10>; 76724ba675SRob Herring 77724ba675SRob Herring ports { 78724ba675SRob Herring #address-cells = <1>; 79724ba675SRob Herring #size-cells = <0>; 80724ba675SRob Herring 81724ba675SRob Herring switch0cpu: port@0 { 82724ba675SRob Herring reg = <0>; 83724ba675SRob Herring label = "cpu"; 84724ba675SRob Herring ethernet = <&gmac0>; 85724ba675SRob Herring phy-mode = "rgmii-id"; 86724ba675SRob Herring fixed-link { 87724ba675SRob Herring speed = <1000>; 88724ba675SRob Herring full-duplex; 89724ba675SRob Herring }; 90724ba675SRob Herring }; 91724ba675SRob Herring 92724ba675SRob Herring port@1 { 93724ba675SRob Herring reg = <1>; 94724ba675SRob Herring label = "sw1"; 95724ba675SRob Herring 96724ba675SRob Herring leds { 97724ba675SRob Herring #address-cells = <1>; 98724ba675SRob Herring #size-cells = <0>; 99724ba675SRob Herring 100724ba675SRob Herring led@0 { 101724ba675SRob Herring reg = <0>; 102724ba675SRob Herring color = <LED_COLOR_ID_GREEN>; 103724ba675SRob Herring function = LED_FUNCTION_LAN; 104724ba675SRob Herring default-state = "keep"; 105724ba675SRob Herring }; 106724ba675SRob Herring }; 107724ba675SRob Herring }; 108724ba675SRob Herring 109724ba675SRob Herring port@2 { 110724ba675SRob Herring reg = <2>; 111724ba675SRob Herring label = "sw2"; 112724ba675SRob Herring 113724ba675SRob Herring leds { 114724ba675SRob Herring #address-cells = <1>; 115724ba675SRob Herring #size-cells = <0>; 116724ba675SRob Herring 117724ba675SRob Herring led@0 { 118724ba675SRob Herring reg = <0>; 119724ba675SRob Herring color = <LED_COLOR_ID_GREEN>; 120724ba675SRob Herring function = LED_FUNCTION_LAN; 121724ba675SRob Herring default-state = "keep"; 122724ba675SRob Herring }; 123724ba675SRob Herring }; 124724ba675SRob Herring }; 125724ba675SRob Herring 126724ba675SRob Herring port@3 { 127724ba675SRob Herring reg = <3>; 128724ba675SRob Herring label = "sw3"; 129724ba675SRob Herring 130724ba675SRob Herring leds { 131724ba675SRob Herring #address-cells = <1>; 132724ba675SRob Herring #size-cells = <0>; 133724ba675SRob Herring 134724ba675SRob Herring led@0 { 135724ba675SRob Herring reg = <0>; 136724ba675SRob Herring color = <LED_COLOR_ID_GREEN>; 137724ba675SRob Herring function = LED_FUNCTION_LAN; 138724ba675SRob Herring default-state = "keep"; 139724ba675SRob Herring }; 140724ba675SRob Herring }; 141724ba675SRob Herring }; 142724ba675SRob Herring 143724ba675SRob Herring port@4 { 144724ba675SRob Herring reg = <4>; 145724ba675SRob Herring label = "sw4"; 146724ba675SRob Herring 147724ba675SRob Herring leds { 148724ba675SRob Herring #address-cells = <1>; 149724ba675SRob Herring #size-cells = <0>; 150724ba675SRob Herring 151724ba675SRob Herring led@0 { 152724ba675SRob Herring reg = <0>; 153724ba675SRob Herring color = <LED_COLOR_ID_GREEN>; 154724ba675SRob Herring function = LED_FUNCTION_LAN; 155724ba675SRob Herring default-state = "keep"; 156724ba675SRob Herring }; 157724ba675SRob Herring }; 158724ba675SRob Herring }; 159724ba675SRob Herring 160724ba675SRob Herring port@5 { 161724ba675SRob Herring reg = <5>; 162724ba675SRob Herring label = "sw5"; 163724ba675SRob Herring 164724ba675SRob Herring leds { 165724ba675SRob Herring #address-cells = <1>; 166724ba675SRob Herring #size-cells = <0>; 167724ba675SRob Herring 168724ba675SRob Herring led@0 { 169724ba675SRob Herring reg = <0>; 170724ba675SRob Herring color = <LED_COLOR_ID_GREEN>; 171724ba675SRob Herring function = LED_FUNCTION_LAN; 172724ba675SRob Herring default-state = "keep"; 173724ba675SRob Herring }; 174724ba675SRob Herring }; 175724ba675SRob Herring }; 176724ba675SRob Herring }; 177724ba675SRob Herring }; 178724ba675SRob Herring }; 179724ba675SRob Herring 180724ba675SRob Herring mdio1: mdio-1 { 181724ba675SRob Herring status = "okay"; 182724ba675SRob Herring compatible = "virtual,mdio-gpio"; 183724ba675SRob Herring gpios = <&qcom_pinmux 11 GPIO_ACTIVE_HIGH>, 184724ba675SRob Herring <&qcom_pinmux 10 GPIO_ACTIVE_HIGH>; 185724ba675SRob Herring #address-cells = <1>; 186724ba675SRob Herring #size-cells = <0>; 187724ba675SRob Herring 188724ba675SRob Herring pinctrl-0 = <&mdio1_pins>; 189724ba675SRob Herring pinctrl-names = "default"; 190724ba675SRob Herring 191724ba675SRob Herring switch1: switch@14 { 192724ba675SRob Herring compatible = "qca,qca8337"; 193724ba675SRob Herring 194724ba675SRob Herring dsa,member = <1 0>; 195724ba675SRob Herring 196724ba675SRob Herring pinctrl-0 = <&sw1_reset_pin>; 197724ba675SRob Herring pinctrl-names = "default"; 198724ba675SRob Herring 199724ba675SRob Herring reset-gpios = <&qcom_pinmux 17 GPIO_ACTIVE_LOW>; 200724ba675SRob Herring reg = <0x10>; 201724ba675SRob Herring 202724ba675SRob Herring ports { 203724ba675SRob Herring #address-cells = <1>; 204724ba675SRob Herring #size-cells = <0>; 205724ba675SRob Herring 206724ba675SRob Herring switch1cpu: port@0 { 207724ba675SRob Herring reg = <0>; 208724ba675SRob Herring label = "cpu"; 209724ba675SRob Herring ethernet = <&gmac3>; 210724ba675SRob Herring phy-mode = "sgmii"; 211724ba675SRob Herring fixed-link { 212724ba675SRob Herring speed = <1000>; 213724ba675SRob Herring full-duplex; 214724ba675SRob Herring }; 215724ba675SRob Herring }; 216724ba675SRob Herring 217724ba675SRob Herring port@1 { 218724ba675SRob Herring reg = <1>; 219724ba675SRob Herring label = "sw6"; 220724ba675SRob Herring 221724ba675SRob Herring leds { 222724ba675SRob Herring #address-cells = <1>; 223724ba675SRob Herring #size-cells = <0>; 224724ba675SRob Herring 225724ba675SRob Herring led@0 { 226724ba675SRob Herring reg = <0>; 227724ba675SRob Herring color = <LED_COLOR_ID_GREEN>; 228724ba675SRob Herring function = LED_FUNCTION_LAN; 229724ba675SRob Herring default-state = "keep"; 230724ba675SRob Herring }; 231724ba675SRob Herring }; 232724ba675SRob Herring }; 233724ba675SRob Herring 234724ba675SRob Herring port@2 { 235724ba675SRob Herring reg = <2>; 236724ba675SRob Herring label = "sw7"; 237724ba675SRob Herring 238724ba675SRob Herring leds { 239724ba675SRob Herring #address-cells = <1>; 240724ba675SRob Herring #size-cells = <0>; 241724ba675SRob Herring 242724ba675SRob Herring led@0 { 243724ba675SRob Herring reg = <0>; 244724ba675SRob Herring color = <LED_COLOR_ID_GREEN>; 245724ba675SRob Herring function = LED_FUNCTION_LAN; 246724ba675SRob Herring default-state = "keep"; 247724ba675SRob Herring }; 248724ba675SRob Herring }; 249724ba675SRob Herring }; 250724ba675SRob Herring 251724ba675SRob Herring port@3 { 252724ba675SRob Herring reg = <3>; 253724ba675SRob Herring label = "sw8"; 254724ba675SRob Herring 255724ba675SRob Herring leds { 256724ba675SRob Herring #address-cells = <1>; 257724ba675SRob Herring #size-cells = <0>; 258724ba675SRob Herring 259724ba675SRob Herring led@0 { 260724ba675SRob Herring reg = <0>; 261724ba675SRob Herring color = <LED_COLOR_ID_GREEN>; 262724ba675SRob Herring function = LED_FUNCTION_LAN; 263724ba675SRob Herring default-state = "keep"; 264724ba675SRob Herring }; 265724ba675SRob Herring }; 266724ba675SRob Herring }; 267724ba675SRob Herring 268724ba675SRob Herring port@4 { 269724ba675SRob Herring reg = <4>; 270724ba675SRob Herring label = "sw9"; 271724ba675SRob Herring 272724ba675SRob Herring leds { 273724ba675SRob Herring #address-cells = <1>; 274724ba675SRob Herring #size-cells = <0>; 275724ba675SRob Herring 276724ba675SRob Herring led@0 { 277724ba675SRob Herring reg = <0>; 278724ba675SRob Herring color = <LED_COLOR_ID_GREEN>; 279724ba675SRob Herring function = LED_FUNCTION_LAN; 280724ba675SRob Herring default-state = "keep"; 281724ba675SRob Herring }; 282724ba675SRob Herring }; 283724ba675SRob Herring }; 284724ba675SRob Herring 285724ba675SRob Herring port@5 { 286724ba675SRob Herring reg = <5>; 287724ba675SRob Herring label = "sw10"; 288724ba675SRob Herring 289724ba675SRob Herring leds { 290724ba675SRob Herring #address-cells = <1>; 291724ba675SRob Herring #size-cells = <0>; 292724ba675SRob Herring 293724ba675SRob Herring led@0 { 294724ba675SRob Herring reg = <0>; 295724ba675SRob Herring color = <LED_COLOR_ID_GREEN>; 296724ba675SRob Herring function = LED_FUNCTION_LAN; 297724ba675SRob Herring default-state = "keep"; 298724ba675SRob Herring }; 299724ba675SRob Herring }; 300724ba675SRob Herring }; 301724ba675SRob Herring }; 302724ba675SRob Herring }; 303724ba675SRob Herring }; 304724ba675SRob Herring 305724ba675SRob Herring soc { 306724ba675SRob Herring gsbi5: gsbi@1a200000 { 307724ba675SRob Herring qcom,mode = <GSBI_PROT_SPI>; 308724ba675SRob Herring status = "okay"; 309724ba675SRob Herring 310724ba675SRob Herring spi4: spi@1a280000 { 311724ba675SRob Herring status = "okay"; 312724ba675SRob Herring 313724ba675SRob Herring pinctrl-0 = <&spi_pins>; 314724ba675SRob Herring pinctrl-names = "default"; 315724ba675SRob Herring 316724ba675SRob Herring cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>; 317724ba675SRob Herring 318724ba675SRob Herring norflash: flash@0 { 319724ba675SRob Herring compatible = "jedec,spi-nor"; 320724ba675SRob Herring #address-cells = <1>; 321724ba675SRob Herring #size-cells = <1>; 322724ba675SRob Herring spi-max-frequency = <50000000>; 323724ba675SRob Herring reg = <0>; 324724ba675SRob Herring 325724ba675SRob Herring partition@0 { 326724ba675SRob Herring label = "RouterBoot"; 327724ba675SRob Herring reg = <0x0 0x40000>; 328724ba675SRob Herring }; 329724ba675SRob Herring }; 330724ba675SRob Herring }; 331724ba675SRob Herring }; 332724ba675SRob Herring }; 333724ba675SRob Herring}; 334724ba675SRob Herring 335724ba675SRob Herring&adm_dma { 336724ba675SRob Herring status = "okay"; 337724ba675SRob Herring}; 338724ba675SRob Herring 339724ba675SRob Herring&gmac0 { 340724ba675SRob Herring status = "okay"; 341724ba675SRob Herring 342724ba675SRob Herring phy-mode = "rgmii"; 343724ba675SRob Herring qcom,id = <0>; 344724ba675SRob Herring phy-handle = <&switch0cpu>; 345724ba675SRob Herring 346724ba675SRob Herring fixed-link { 347724ba675SRob Herring speed = <1000>; 348724ba675SRob Herring full-duplex; 349724ba675SRob Herring }; 350724ba675SRob Herring}; 351724ba675SRob Herring 352724ba675SRob Herring&gmac3 { 353724ba675SRob Herring status = "okay"; 354724ba675SRob Herring 355724ba675SRob Herring phy-mode = "sgmii"; 356724ba675SRob Herring qcom,id = <3>; 357724ba675SRob Herring phy-handle = <&switch1cpu>; 358724ba675SRob Herring 359724ba675SRob Herring fixed-link { 360724ba675SRob Herring speed = <1000>; 361724ba675SRob Herring full-duplex; 362724ba675SRob Herring }; 363724ba675SRob Herring}; 364724ba675SRob Herring 365724ba675SRob Herring&gsbi7 { 366724ba675SRob Herring status = "okay"; 367724ba675SRob Herring qcom,mode = <GSBI_PROT_I2C_UART>; 368724ba675SRob Herring}; 369724ba675SRob Herring 370724ba675SRob Herring&gsbi7_serial { 371724ba675SRob Herring status = "okay"; 372724ba675SRob Herring}; 373724ba675SRob Herring 374724ba675SRob Herring&hs_phy_1 { 375724ba675SRob Herring status = "okay"; 376724ba675SRob Herring}; 377724ba675SRob Herring 378724ba675SRob Herring&nand { 379724ba675SRob Herring status = "okay"; 380724ba675SRob Herring 381724ba675SRob Herring nand@0 { 382724ba675SRob Herring reg = <0>; 383724ba675SRob Herring 384724ba675SRob Herring nand-ecc-strength = <4>; 385724ba675SRob Herring nand-bus-width = <8>; 386724ba675SRob Herring nand-ecc-step-size = <512>; 387724ba675SRob Herring 388724ba675SRob Herring partitions { 389724ba675SRob Herring compatible = "fixed-partitions"; 390724ba675SRob Herring #address-cells = <1>; 391724ba675SRob Herring #size-cells = <1>; 392724ba675SRob Herring 393724ba675SRob Herring boot@0 { 394724ba675SRob Herring label = "RouterBoard NAND 1 Boot"; 395724ba675SRob Herring reg = <0x0000000 0x0800000>; 396724ba675SRob Herring }; 397724ba675SRob Herring 398724ba675SRob Herring main@800000 { 399724ba675SRob Herring label = "RouterBoard NAND 1 Main"; 400724ba675SRob Herring reg = <0x0800000 0x7800000>; 401724ba675SRob Herring }; 402724ba675SRob Herring }; 403724ba675SRob Herring }; 404724ba675SRob Herring}; 405724ba675SRob Herring 406724ba675SRob Herring&qcom_pinmux { 407*de52c020SRayyan Ansari buttons_pins: buttons-state { 408724ba675SRob Herring pins = "gpio66"; 409*de52c020SRayyan Ansari function = "gpio"; 410724ba675SRob Herring drive-strength = <16>; 411724ba675SRob Herring bias-disable; 412724ba675SRob Herring }; 413724ba675SRob Herring 414*de52c020SRayyan Ansari leds_pins: leds-state { 415724ba675SRob Herring pins = "gpio33"; 416*de52c020SRayyan Ansari function = "gpio"; 417724ba675SRob Herring drive-strength = <16>; 418724ba675SRob Herring bias-disable; 419724ba675SRob Herring }; 420724ba675SRob Herring 421*de52c020SRayyan Ansari mdio1_pins: mdio1-state { 422724ba675SRob Herring pins = "gpio10", "gpio11"; 423724ba675SRob Herring function = "gpio"; 424724ba675SRob Herring drive-strength = <8>; 425724ba675SRob Herring bias-disable; 426724ba675SRob Herring }; 427724ba675SRob Herring 428*de52c020SRayyan Ansari sw0_reset_pin: sw0-reset-state { 429724ba675SRob Herring pins = "gpio16"; 430724ba675SRob Herring drive-strength = <16>; 431724ba675SRob Herring function = "gpio"; 432724ba675SRob Herring bias-disable; 433724ba675SRob Herring input-disable; 434724ba675SRob Herring }; 435724ba675SRob Herring 436*de52c020SRayyan Ansari sw1_reset_pin: sw1-reset-state { 437724ba675SRob Herring pins = "gpio17"; 438724ba675SRob Herring drive-strength = <16>; 439724ba675SRob Herring function = "gpio"; 440724ba675SRob Herring bias-disable; 441724ba675SRob Herring input-disable; 442724ba675SRob Herring }; 443724ba675SRob Herring 444*de52c020SRayyan Ansari usb1_pwr_en_pins: usb1-pwr-en-state { 445724ba675SRob Herring pins = "gpio4"; 446724ba675SRob Herring function = "gpio"; 447724ba675SRob Herring drive-strength = <16>; 448724ba675SRob Herring bias-disable; 449724ba675SRob Herring output-high; 450724ba675SRob Herring }; 451724ba675SRob Herring}; 452724ba675SRob Herring 453724ba675SRob Herring&ss_phy_1 { 454724ba675SRob Herring status = "okay"; 455724ba675SRob Herring}; 456724ba675SRob Herring 457724ba675SRob Herring&usb3_1 { 458724ba675SRob Herring pinctrl-0 = <&usb1_pwr_en_pins>; 459724ba675SRob Herring pinctrl-names = "default"; 460724ba675SRob Herring 461724ba675SRob Herring status = "okay"; 462724ba675SRob Herring}; 463