1*724ba675SRob Herring/* 2*724ba675SRob Herring * Copyright 2017-2018 Sean Wang <sean.wang@mediatek.com> 3*724ba675SRob Herring * 4*724ba675SRob Herring * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 5*724ba675SRob Herring */ 6*724ba675SRob Herring 7*724ba675SRob Herring/dts-v1/; 8*724ba675SRob Herring#include <dt-bindings/input/input.h> 9*724ba675SRob Herring#include "mt7623n.dtsi" 10*724ba675SRob Herring#include "mt6323.dtsi" 11*724ba675SRob Herring 12*724ba675SRob Herring/ { 13*724ba675SRob Herring model = "Bananapi BPI-R2"; 14*724ba675SRob Herring compatible = "bananapi,bpi-r2", "mediatek,mt7623"; 15*724ba675SRob Herring 16*724ba675SRob Herring aliases { 17*724ba675SRob Herring serial2 = &uart2; 18*724ba675SRob Herring }; 19*724ba675SRob Herring 20*724ba675SRob Herring chosen { 21*724ba675SRob Herring stdout-path = "serial2:115200n8"; 22*724ba675SRob Herring }; 23*724ba675SRob Herring 24*724ba675SRob Herring connector { 25*724ba675SRob Herring compatible = "hdmi-connector"; 26*724ba675SRob Herring label = "hdmi"; 27*724ba675SRob Herring type = "d"; 28*724ba675SRob Herring ddc-i2c-bus = <&hdmiddc0>; 29*724ba675SRob Herring 30*724ba675SRob Herring port { 31*724ba675SRob Herring hdmi_connector_in: endpoint { 32*724ba675SRob Herring remote-endpoint = <&hdmi0_out>; 33*724ba675SRob Herring }; 34*724ba675SRob Herring }; 35*724ba675SRob Herring }; 36*724ba675SRob Herring 37*724ba675SRob Herring cpus { 38*724ba675SRob Herring cpu@0 { 39*724ba675SRob Herring proc-supply = <&mt6323_vproc_reg>; 40*724ba675SRob Herring }; 41*724ba675SRob Herring 42*724ba675SRob Herring cpu@1 { 43*724ba675SRob Herring proc-supply = <&mt6323_vproc_reg>; 44*724ba675SRob Herring }; 45*724ba675SRob Herring 46*724ba675SRob Herring cpu@2 { 47*724ba675SRob Herring proc-supply = <&mt6323_vproc_reg>; 48*724ba675SRob Herring }; 49*724ba675SRob Herring 50*724ba675SRob Herring cpu@3 { 51*724ba675SRob Herring proc-supply = <&mt6323_vproc_reg>; 52*724ba675SRob Herring }; 53*724ba675SRob Herring }; 54*724ba675SRob Herring 55*724ba675SRob Herring reg_1p8v: regulator-1p8v { 56*724ba675SRob Herring compatible = "regulator-fixed"; 57*724ba675SRob Herring regulator-name = "fixed-1.8V"; 58*724ba675SRob Herring regulator-min-microvolt = <1800000>; 59*724ba675SRob Herring regulator-max-microvolt = <1800000>; 60*724ba675SRob Herring regulator-boot-on; 61*724ba675SRob Herring regulator-always-on; 62*724ba675SRob Herring }; 63*724ba675SRob Herring 64*724ba675SRob Herring reg_3p3v: regulator-3p3v { 65*724ba675SRob Herring compatible = "regulator-fixed"; 66*724ba675SRob Herring regulator-name = "fixed-3.3V"; 67*724ba675SRob Herring regulator-min-microvolt = <3300000>; 68*724ba675SRob Herring regulator-max-microvolt = <3300000>; 69*724ba675SRob Herring regulator-boot-on; 70*724ba675SRob Herring regulator-always-on; 71*724ba675SRob Herring }; 72*724ba675SRob Herring 73*724ba675SRob Herring reg_5v: regulator-5v { 74*724ba675SRob Herring compatible = "regulator-fixed"; 75*724ba675SRob Herring regulator-name = "fixed-5V"; 76*724ba675SRob Herring regulator-min-microvolt = <5000000>; 77*724ba675SRob Herring regulator-max-microvolt = <5000000>; 78*724ba675SRob Herring regulator-boot-on; 79*724ba675SRob Herring regulator-always-on; 80*724ba675SRob Herring }; 81*724ba675SRob Herring 82*724ba675SRob Herring reg_vgpu: fixedregulator@0 { 83*724ba675SRob Herring compatible = "regulator-fixed"; 84*724ba675SRob Herring regulator-name = "vdd_fixed_vgpu"; 85*724ba675SRob Herring regulator-min-microvolt = <1150000>; 86*724ba675SRob Herring regulator-max-microvolt = <1150000>; 87*724ba675SRob Herring }; 88*724ba675SRob Herring 89*724ba675SRob Herring gpio-keys { 90*724ba675SRob Herring compatible = "gpio-keys"; 91*724ba675SRob Herring pinctrl-names = "default"; 92*724ba675SRob Herring pinctrl-0 = <&key_pins_a>; 93*724ba675SRob Herring 94*724ba675SRob Herring button-factory { 95*724ba675SRob Herring label = "factory"; 96*724ba675SRob Herring linux,code = <BTN_0>; 97*724ba675SRob Herring gpios = <&pio 256 GPIO_ACTIVE_LOW>; 98*724ba675SRob Herring }; 99*724ba675SRob Herring 100*724ba675SRob Herring button-wps { 101*724ba675SRob Herring label = "wps"; 102*724ba675SRob Herring linux,code = <KEY_WPS_BUTTON>; 103*724ba675SRob Herring gpios = <&pio 257 GPIO_ACTIVE_HIGH>; 104*724ba675SRob Herring }; 105*724ba675SRob Herring }; 106*724ba675SRob Herring 107*724ba675SRob Herring leds { 108*724ba675SRob Herring compatible = "gpio-leds"; 109*724ba675SRob Herring pinctrl-names = "default"; 110*724ba675SRob Herring pinctrl-0 = <&led_pins_a>; 111*724ba675SRob Herring 112*724ba675SRob Herring blue { 113*724ba675SRob Herring label = "bpi-r2:pio:blue"; 114*724ba675SRob Herring gpios = <&pio 240 GPIO_ACTIVE_LOW>; 115*724ba675SRob Herring default-state = "off"; 116*724ba675SRob Herring }; 117*724ba675SRob Herring 118*724ba675SRob Herring green { 119*724ba675SRob Herring label = "bpi-r2:pio:green"; 120*724ba675SRob Herring gpios = <&pio 241 GPIO_ACTIVE_LOW>; 121*724ba675SRob Herring default-state = "off"; 122*724ba675SRob Herring }; 123*724ba675SRob Herring 124*724ba675SRob Herring red { 125*724ba675SRob Herring label = "bpi-r2:pio:red"; 126*724ba675SRob Herring gpios = <&pio 239 GPIO_ACTIVE_LOW>; 127*724ba675SRob Herring default-state = "off"; 128*724ba675SRob Herring }; 129*724ba675SRob Herring }; 130*724ba675SRob Herring 131*724ba675SRob Herring memory@80000000 { 132*724ba675SRob Herring device_type = "memory"; 133*724ba675SRob Herring reg = <0 0x80000000 0 0x80000000>; 134*724ba675SRob Herring }; 135*724ba675SRob Herring}; 136*724ba675SRob Herring 137*724ba675SRob Herring&bls { 138*724ba675SRob Herring status = "okay"; 139*724ba675SRob Herring}; 140*724ba675SRob Herring 141*724ba675SRob Herring&btif { 142*724ba675SRob Herring status = "okay"; 143*724ba675SRob Herring}; 144*724ba675SRob Herring 145*724ba675SRob Herring&cec { 146*724ba675SRob Herring status = "okay"; 147*724ba675SRob Herring}; 148*724ba675SRob Herring 149*724ba675SRob Herring&cir { 150*724ba675SRob Herring pinctrl-names = "default"; 151*724ba675SRob Herring pinctrl-0 = <&cir_pins_a>; 152*724ba675SRob Herring status = "okay"; 153*724ba675SRob Herring}; 154*724ba675SRob Herring 155*724ba675SRob Herring&crypto { 156*724ba675SRob Herring status = "okay"; 157*724ba675SRob Herring}; 158*724ba675SRob Herring 159*724ba675SRob Herring&dpi0 { 160*724ba675SRob Herring status = "okay"; 161*724ba675SRob Herring 162*724ba675SRob Herring ports { 163*724ba675SRob Herring #address-cells = <1>; 164*724ba675SRob Herring #size-cells = <0>; 165*724ba675SRob Herring port@0 { 166*724ba675SRob Herring reg = <0>; 167*724ba675SRob Herring dpi0_out: endpoint { 168*724ba675SRob Herring remote-endpoint = <&hdmi0_in>; 169*724ba675SRob Herring }; 170*724ba675SRob Herring }; 171*724ba675SRob Herring }; 172*724ba675SRob Herring}; 173*724ba675SRob Herring 174*724ba675SRob Herring&gmac0 { 175*724ba675SRob Herring status = "okay"; 176*724ba675SRob Herring phy-mode = "trgmii"; 177*724ba675SRob Herring 178*724ba675SRob Herring fixed-link { 179*724ba675SRob Herring speed = <1000>; 180*724ba675SRob Herring full-duplex; 181*724ba675SRob Herring pause; 182*724ba675SRob Herring }; 183*724ba675SRob Herring}; 184*724ba675SRob Herring 185*724ba675SRob Herring&gmac1 { 186*724ba675SRob Herring status = "okay"; 187*724ba675SRob Herring phy-mode = "rgmii"; 188*724ba675SRob Herring 189*724ba675SRob Herring fixed-link { 190*724ba675SRob Herring speed = <1000>; 191*724ba675SRob Herring full-duplex; 192*724ba675SRob Herring pause; 193*724ba675SRob Herring }; 194*724ba675SRob Herring}; 195*724ba675SRob Herring 196*724ba675SRob Herringð { 197*724ba675SRob Herring status = "okay"; 198*724ba675SRob Herring 199*724ba675SRob Herring mdio-bus { 200*724ba675SRob Herring #address-cells = <1>; 201*724ba675SRob Herring #size-cells = <0>; 202*724ba675SRob Herring 203*724ba675SRob Herring switch@1f { 204*724ba675SRob Herring compatible = "mediatek,mt7530"; 205*724ba675SRob Herring reg = <0x1f>; 206*724ba675SRob Herring reset-gpios = <&pio 33 0>; 207*724ba675SRob Herring core-supply = <&mt6323_vpa_reg>; 208*724ba675SRob Herring io-supply = <&mt6323_vemc3v3_reg>; 209*724ba675SRob Herring 210*724ba675SRob Herring ports { 211*724ba675SRob Herring #address-cells = <1>; 212*724ba675SRob Herring #size-cells = <0>; 213*724ba675SRob Herring 214*724ba675SRob Herring port@0 { 215*724ba675SRob Herring reg = <0>; 216*724ba675SRob Herring label = "wan"; 217*724ba675SRob Herring }; 218*724ba675SRob Herring 219*724ba675SRob Herring port@1 { 220*724ba675SRob Herring reg = <1>; 221*724ba675SRob Herring label = "lan0"; 222*724ba675SRob Herring }; 223*724ba675SRob Herring 224*724ba675SRob Herring port@2 { 225*724ba675SRob Herring reg = <2>; 226*724ba675SRob Herring label = "lan1"; 227*724ba675SRob Herring }; 228*724ba675SRob Herring 229*724ba675SRob Herring port@3 { 230*724ba675SRob Herring reg = <3>; 231*724ba675SRob Herring label = "lan2"; 232*724ba675SRob Herring }; 233*724ba675SRob Herring 234*724ba675SRob Herring port@4 { 235*724ba675SRob Herring reg = <4>; 236*724ba675SRob Herring label = "lan3"; 237*724ba675SRob Herring }; 238*724ba675SRob Herring 239*724ba675SRob Herring port@5 { 240*724ba675SRob Herring reg = <5>; 241*724ba675SRob Herring label = "cpu"; 242*724ba675SRob Herring ethernet = <&gmac1>; 243*724ba675SRob Herring phy-mode = "rgmii"; 244*724ba675SRob Herring 245*724ba675SRob Herring fixed-link { 246*724ba675SRob Herring speed = <1000>; 247*724ba675SRob Herring full-duplex; 248*724ba675SRob Herring pause; 249*724ba675SRob Herring }; 250*724ba675SRob Herring }; 251*724ba675SRob Herring 252*724ba675SRob Herring port@6 { 253*724ba675SRob Herring reg = <6>; 254*724ba675SRob Herring label = "cpu"; 255*724ba675SRob Herring ethernet = <&gmac0>; 256*724ba675SRob Herring phy-mode = "trgmii"; 257*724ba675SRob Herring 258*724ba675SRob Herring fixed-link { 259*724ba675SRob Herring speed = <1000>; 260*724ba675SRob Herring full-duplex; 261*724ba675SRob Herring pause; 262*724ba675SRob Herring }; 263*724ba675SRob Herring }; 264*724ba675SRob Herring }; 265*724ba675SRob Herring }; 266*724ba675SRob Herring }; 267*724ba675SRob Herring}; 268*724ba675SRob Herring 269*724ba675SRob Herring&hdmi0 { 270*724ba675SRob Herring pinctrl-names = "default"; 271*724ba675SRob Herring pinctrl-0 = <&hdmi_pins_a>; 272*724ba675SRob Herring status = "okay"; 273*724ba675SRob Herring 274*724ba675SRob Herring ports { 275*724ba675SRob Herring #address-cells = <1>; 276*724ba675SRob Herring #size-cells = <0>; 277*724ba675SRob Herring port@0 { 278*724ba675SRob Herring reg = <0>; 279*724ba675SRob Herring hdmi0_in: endpoint { 280*724ba675SRob Herring remote-endpoint = <&dpi0_out>; 281*724ba675SRob Herring }; 282*724ba675SRob Herring }; 283*724ba675SRob Herring 284*724ba675SRob Herring port@1 { 285*724ba675SRob Herring reg = <1>; 286*724ba675SRob Herring hdmi0_out: endpoint { 287*724ba675SRob Herring remote-endpoint = <&hdmi_connector_in>; 288*724ba675SRob Herring }; 289*724ba675SRob Herring }; 290*724ba675SRob Herring }; 291*724ba675SRob Herring}; 292*724ba675SRob Herring 293*724ba675SRob Herring&hdmiddc0 { 294*724ba675SRob Herring pinctrl-names = "default"; 295*724ba675SRob Herring pinctrl-0 = <&hdmi_ddc_pins_a>; 296*724ba675SRob Herring status = "okay"; 297*724ba675SRob Herring}; 298*724ba675SRob Herring 299*724ba675SRob Herring&hdmi_phy { 300*724ba675SRob Herring mediatek,ibias = <0xa>; 301*724ba675SRob Herring mediatek,ibias_up = <0x1c>; 302*724ba675SRob Herring status = "okay"; 303*724ba675SRob Herring}; 304*724ba675SRob Herring 305*724ba675SRob Herring&i2c0 { 306*724ba675SRob Herring pinctrl-names = "default"; 307*724ba675SRob Herring pinctrl-0 = <&i2c0_pins_a>; 308*724ba675SRob Herring status = "okay"; 309*724ba675SRob Herring}; 310*724ba675SRob Herring 311*724ba675SRob Herring&i2c1 { 312*724ba675SRob Herring pinctrl-names = "default"; 313*724ba675SRob Herring pinctrl-0 = <&i2c1_pins_a>; 314*724ba675SRob Herring status = "okay"; 315*724ba675SRob Herring}; 316*724ba675SRob Herring 317*724ba675SRob Herring&mali { 318*724ba675SRob Herring mali-supply = <®_vgpu>; 319*724ba675SRob Herring status = "okay"; 320*724ba675SRob Herring}; 321*724ba675SRob Herring 322*724ba675SRob Herring&mmc0 { 323*724ba675SRob Herring pinctrl-names = "default", "state_uhs"; 324*724ba675SRob Herring pinctrl-0 = <&mmc0_pins_default>; 325*724ba675SRob Herring pinctrl-1 = <&mmc0_pins_uhs>; 326*724ba675SRob Herring status = "okay"; 327*724ba675SRob Herring bus-width = <8>; 328*724ba675SRob Herring max-frequency = <50000000>; 329*724ba675SRob Herring cap-mmc-highspeed; 330*724ba675SRob Herring vmmc-supply = <®_3p3v>; 331*724ba675SRob Herring vqmmc-supply = <®_1p8v>; 332*724ba675SRob Herring non-removable; 333*724ba675SRob Herring}; 334*724ba675SRob Herring 335*724ba675SRob Herring&mmc1 { 336*724ba675SRob Herring pinctrl-names = "default", "state_uhs"; 337*724ba675SRob Herring pinctrl-0 = <&mmc1_pins_default>; 338*724ba675SRob Herring pinctrl-1 = <&mmc1_pins_uhs>; 339*724ba675SRob Herring status = "okay"; 340*724ba675SRob Herring bus-width = <4>; 341*724ba675SRob Herring max-frequency = <50000000>; 342*724ba675SRob Herring cap-sd-highspeed; 343*724ba675SRob Herring cd-gpios = <&pio 261 GPIO_ACTIVE_LOW>; 344*724ba675SRob Herring vmmc-supply = <®_3p3v>; 345*724ba675SRob Herring vqmmc-supply = <®_3p3v>; 346*724ba675SRob Herring}; 347*724ba675SRob Herring 348*724ba675SRob Herring&mt6323keys { 349*724ba675SRob Herring home { 350*724ba675SRob Herring status = "disabled"; 351*724ba675SRob Herring }; 352*724ba675SRob Herring}; 353*724ba675SRob Herring 354*724ba675SRob Herring&mt6323_leds { 355*724ba675SRob Herring status = "okay"; 356*724ba675SRob Herring 357*724ba675SRob Herring led@0 { 358*724ba675SRob Herring reg = <0>; 359*724ba675SRob Herring label = "bpi-r2:isink:green"; 360*724ba675SRob Herring default-state = "off"; 361*724ba675SRob Herring }; 362*724ba675SRob Herring 363*724ba675SRob Herring led@1 { 364*724ba675SRob Herring reg = <1>; 365*724ba675SRob Herring label = "bpi-r2:isink:red"; 366*724ba675SRob Herring default-state = "off"; 367*724ba675SRob Herring }; 368*724ba675SRob Herring 369*724ba675SRob Herring led@2 { 370*724ba675SRob Herring reg = <2>; 371*724ba675SRob Herring label = "bpi-r2:isink:blue"; 372*724ba675SRob Herring default-state = "off"; 373*724ba675SRob Herring }; 374*724ba675SRob Herring}; 375*724ba675SRob Herring 376*724ba675SRob Herring&pcie { 377*724ba675SRob Herring pinctrl-names = "default"; 378*724ba675SRob Herring pinctrl-0 = <&pcie_default>; 379*724ba675SRob Herring status = "okay"; 380*724ba675SRob Herring 381*724ba675SRob Herring pcie@0,0 { 382*724ba675SRob Herring status = "okay"; 383*724ba675SRob Herring }; 384*724ba675SRob Herring 385*724ba675SRob Herring pcie@1,0 { 386*724ba675SRob Herring status = "okay"; 387*724ba675SRob Herring }; 388*724ba675SRob Herring}; 389*724ba675SRob Herring 390*724ba675SRob Herring&pcie0_phy { 391*724ba675SRob Herring status = "okay"; 392*724ba675SRob Herring}; 393*724ba675SRob Herring 394*724ba675SRob Herring&pcie1_phy { 395*724ba675SRob Herring status = "okay"; 396*724ba675SRob Herring}; 397*724ba675SRob Herring 398*724ba675SRob Herring&pio { 399*724ba675SRob Herring musb_pins: musb { 400*724ba675SRob Herring pins-musb { 401*724ba675SRob Herring pinmux = <MT7623_PIN_237_EXT_SDIO2_FUNC_DRV_VBUS>; 402*724ba675SRob Herring }; 403*724ba675SRob Herring }; 404*724ba675SRob Herring}; 405*724ba675SRob Herring 406*724ba675SRob Herring&pwm { 407*724ba675SRob Herring pinctrl-names = "default"; 408*724ba675SRob Herring pinctrl-0 = <&pwm_pins_a>; 409*724ba675SRob Herring status = "okay"; 410*724ba675SRob Herring}; 411*724ba675SRob Herring 412*724ba675SRob Herring&spi0 { 413*724ba675SRob Herring pinctrl-names = "default"; 414*724ba675SRob Herring pinctrl-0 = <&spi0_pins_a>; 415*724ba675SRob Herring status = "okay"; 416*724ba675SRob Herring}; 417*724ba675SRob Herring 418*724ba675SRob Herring&uart0 { 419*724ba675SRob Herring pinctrl-names = "default"; 420*724ba675SRob Herring pinctrl-0 = <&uart0_pins_a>; 421*724ba675SRob Herring status = "okay"; 422*724ba675SRob Herring}; 423*724ba675SRob Herring 424*724ba675SRob Herring&uart1 { 425*724ba675SRob Herring pinctrl-names = "default"; 426*724ba675SRob Herring pinctrl-0 = <&uart1_pins_a>; 427*724ba675SRob Herring status = "okay"; 428*724ba675SRob Herring}; 429*724ba675SRob Herring 430*724ba675SRob Herring&uart2 { 431*724ba675SRob Herring pinctrl-names = "default"; 432*724ba675SRob Herring pinctrl-0 = <&uart2_pins_a>; 433*724ba675SRob Herring status = "okay"; 434*724ba675SRob Herring}; 435*724ba675SRob Herring 436*724ba675SRob Herring&usb0 { 437*724ba675SRob Herring pinctrl-names = "default"; 438*724ba675SRob Herring pinctrl-0 = <&musb_pins>; 439*724ba675SRob Herring status = "okay"; 440*724ba675SRob Herring usb-role-switch; 441*724ba675SRob Herring 442*724ba675SRob Herring connector { 443*724ba675SRob Herring compatible = "gpio-usb-b-connector", "usb-b-connector"; 444*724ba675SRob Herring type = "micro"; 445*724ba675SRob Herring id-gpios = <&pio 44 GPIO_ACTIVE_HIGH>; 446*724ba675SRob Herring }; 447*724ba675SRob Herring}; 448*724ba675SRob Herring 449*724ba675SRob Herring&usb1 { 450*724ba675SRob Herring vusb33-supply = <®_3p3v>; 451*724ba675SRob Herring vbus-supply = <®_5v>; 452*724ba675SRob Herring status = "okay"; 453*724ba675SRob Herring}; 454*724ba675SRob Herring 455*724ba675SRob Herring&usb2 { 456*724ba675SRob Herring vusb33-supply = <®_3p3v>; 457*724ba675SRob Herring vbus-supply = <®_5v>; 458*724ba675SRob Herring status = "okay"; 459*724ba675SRob Herring}; 460*724ba675SRob Herring 461*724ba675SRob Herring&u2phy1 { 462*724ba675SRob Herring status = "okay"; 463*724ba675SRob Herring}; 464*724ba675SRob Herring 465*724ba675SRob Herring&u3phy1 { 466*724ba675SRob Herring status = "okay"; 467*724ba675SRob Herring}; 468*724ba675SRob Herring 469*724ba675SRob Herring&u3phy2 { 470*724ba675SRob Herring status = "okay"; 471*724ba675SRob Herring}; 472