1*0e8011faSEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2*0e8011faSEmmanuel Vadot 3*0e8011faSEmmanuel Vadot/dts-v1/; 4*0e8011faSEmmanuel Vadot 5*0e8011faSEmmanuel Vadot#include <dt-bindings/leds/common.h> 6*0e8011faSEmmanuel Vadot#include "rk3308.dtsi" 7*0e8011faSEmmanuel Vadot 8*0e8011faSEmmanuel Vadot/ { 9*0e8011faSEmmanuel Vadot model = "Radxa ROCK S0"; 10*0e8011faSEmmanuel Vadot compatible = "radxa,rock-s0", "rockchip,rk3308"; 11*0e8011faSEmmanuel Vadot 12*0e8011faSEmmanuel Vadot aliases { 13*0e8011faSEmmanuel Vadot ethernet0 = &gmac; 14*0e8011faSEmmanuel Vadot mmc0 = &emmc; 15*0e8011faSEmmanuel Vadot mmc1 = &sdmmc; 16*0e8011faSEmmanuel Vadot mmc2 = &sdio; 17*0e8011faSEmmanuel Vadot }; 18*0e8011faSEmmanuel Vadot 19*0e8011faSEmmanuel Vadot chosen { 20*0e8011faSEmmanuel Vadot stdout-path = "serial0:1500000n8"; 21*0e8011faSEmmanuel Vadot }; 22*0e8011faSEmmanuel Vadot 23*0e8011faSEmmanuel Vadot leds { 24*0e8011faSEmmanuel Vadot compatible = "gpio-leds"; 25*0e8011faSEmmanuel Vadot pinctrl-names = "default"; 26*0e8011faSEmmanuel Vadot pinctrl-0 = <&pwr_led>; 27*0e8011faSEmmanuel Vadot 28*0e8011faSEmmanuel Vadot led-green { 29*0e8011faSEmmanuel Vadot color = <LED_COLOR_ID_GREEN>; 30*0e8011faSEmmanuel Vadot default-state = "on"; 31*0e8011faSEmmanuel Vadot function = LED_FUNCTION_HEARTBEAT; 32*0e8011faSEmmanuel Vadot gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>; 33*0e8011faSEmmanuel Vadot linux,default-trigger = "heartbeat"; 34*0e8011faSEmmanuel Vadot }; 35*0e8011faSEmmanuel Vadot }; 36*0e8011faSEmmanuel Vadot 37*0e8011faSEmmanuel Vadot vdd_log: regulator-1v04-vdd-log { 38*0e8011faSEmmanuel Vadot compatible = "regulator-fixed"; 39*0e8011faSEmmanuel Vadot regulator-name = "vdd_log"; 40*0e8011faSEmmanuel Vadot regulator-always-on; 41*0e8011faSEmmanuel Vadot regulator-boot-on; 42*0e8011faSEmmanuel Vadot regulator-min-microvolt = <1040000>; 43*0e8011faSEmmanuel Vadot regulator-max-microvolt = <1040000>; 44*0e8011faSEmmanuel Vadot vin-supply = <&vcc5v0_sys>; 45*0e8011faSEmmanuel Vadot }; 46*0e8011faSEmmanuel Vadot 47*0e8011faSEmmanuel Vadot vcc_ddr: regulator-1v5-vcc-ddr { 48*0e8011faSEmmanuel Vadot compatible = "regulator-fixed"; 49*0e8011faSEmmanuel Vadot regulator-name = "vcc_ddr"; 50*0e8011faSEmmanuel Vadot regulator-always-on; 51*0e8011faSEmmanuel Vadot regulator-boot-on; 52*0e8011faSEmmanuel Vadot regulator-min-microvolt = <1500000>; 53*0e8011faSEmmanuel Vadot regulator-max-microvolt = <1500000>; 54*0e8011faSEmmanuel Vadot vin-supply = <&vcc5v0_sys>; 55*0e8011faSEmmanuel Vadot }; 56*0e8011faSEmmanuel Vadot 57*0e8011faSEmmanuel Vadot vcc_1v8: regulator-1v8-vcc { 58*0e8011faSEmmanuel Vadot compatible = "regulator-fixed"; 59*0e8011faSEmmanuel Vadot regulator-name = "vcc_1v8"; 60*0e8011faSEmmanuel Vadot regulator-always-on; 61*0e8011faSEmmanuel Vadot regulator-boot-on; 62*0e8011faSEmmanuel Vadot regulator-min-microvolt = <1800000>; 63*0e8011faSEmmanuel Vadot regulator-max-microvolt = <1800000>; 64*0e8011faSEmmanuel Vadot vin-supply = <&vcc_io>; 65*0e8011faSEmmanuel Vadot }; 66*0e8011faSEmmanuel Vadot 67*0e8011faSEmmanuel Vadot vcc_io: regulator-3v3-vcc-io { 68*0e8011faSEmmanuel Vadot compatible = "regulator-fixed"; 69*0e8011faSEmmanuel Vadot regulator-name = "vcc_io"; 70*0e8011faSEmmanuel Vadot regulator-always-on; 71*0e8011faSEmmanuel Vadot regulator-boot-on; 72*0e8011faSEmmanuel Vadot regulator-min-microvolt = <3300000>; 73*0e8011faSEmmanuel Vadot regulator-max-microvolt = <3300000>; 74*0e8011faSEmmanuel Vadot vin-supply = <&vcc5v0_sys>; 75*0e8011faSEmmanuel Vadot }; 76*0e8011faSEmmanuel Vadot 77*0e8011faSEmmanuel Vadot vcc5v0_sys: regulator-5v0-vcc-sys { 78*0e8011faSEmmanuel Vadot compatible = "regulator-fixed"; 79*0e8011faSEmmanuel Vadot regulator-name = "vcc5v0_sys"; 80*0e8011faSEmmanuel Vadot regulator-always-on; 81*0e8011faSEmmanuel Vadot regulator-boot-on; 82*0e8011faSEmmanuel Vadot regulator-min-microvolt = <5000000>; 83*0e8011faSEmmanuel Vadot regulator-max-microvolt = <5000000>; 84*0e8011faSEmmanuel Vadot }; 85*0e8011faSEmmanuel Vadot 86*0e8011faSEmmanuel Vadot vdd_core: regulator-vdd-core { 87*0e8011faSEmmanuel Vadot compatible = "pwm-regulator"; 88*0e8011faSEmmanuel Vadot pwms = <&pwm0 0 5000 1>; 89*0e8011faSEmmanuel Vadot pwm-supply = <&vcc5v0_sys>; 90*0e8011faSEmmanuel Vadot regulator-name = "vdd_core"; 91*0e8011faSEmmanuel Vadot regulator-always-on; 92*0e8011faSEmmanuel Vadot regulator-boot-on; 93*0e8011faSEmmanuel Vadot regulator-min-microvolt = <827000>; 94*0e8011faSEmmanuel Vadot regulator-max-microvolt = <1340000>; 95*0e8011faSEmmanuel Vadot regulator-settling-time-up-us = <250>; 96*0e8011faSEmmanuel Vadot }; 97*0e8011faSEmmanuel Vadot 98*0e8011faSEmmanuel Vadot sdio_pwrseq: sdio-pwrseq { 99*0e8011faSEmmanuel Vadot compatible = "mmc-pwrseq-simple"; 100*0e8011faSEmmanuel Vadot pinctrl-names = "default"; 101*0e8011faSEmmanuel Vadot pinctrl-0 = <&wifi_reg_on>; 102*0e8011faSEmmanuel Vadot reset-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>; 103*0e8011faSEmmanuel Vadot }; 104*0e8011faSEmmanuel Vadot}; 105*0e8011faSEmmanuel Vadot 106*0e8011faSEmmanuel Vadot&cpu0 { 107*0e8011faSEmmanuel Vadot cpu-supply = <&vdd_core>; 108*0e8011faSEmmanuel Vadot}; 109*0e8011faSEmmanuel Vadot 110*0e8011faSEmmanuel Vadot&emmc { 111*0e8011faSEmmanuel Vadot cap-mmc-highspeed; 112*0e8011faSEmmanuel Vadot no-sd; 113*0e8011faSEmmanuel Vadot no-sdio; 114*0e8011faSEmmanuel Vadot non-removable; 115*0e8011faSEmmanuel Vadot pinctrl-names = "default"; 116*0e8011faSEmmanuel Vadot pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_pwren>; 117*0e8011faSEmmanuel Vadot vmmc-supply = <&vcc_io>; 118*0e8011faSEmmanuel Vadot status = "okay"; 119*0e8011faSEmmanuel Vadot}; 120*0e8011faSEmmanuel Vadot 121*0e8011faSEmmanuel Vadot&gmac { 122*0e8011faSEmmanuel Vadot clock_in_out = "output"; 123*0e8011faSEmmanuel Vadot phy-handle = <&rtl8201f>; 124*0e8011faSEmmanuel Vadot phy-supply = <&vcc_io>; 125*0e8011faSEmmanuel Vadot status = "okay"; 126*0e8011faSEmmanuel Vadot 127*0e8011faSEmmanuel Vadot mdio { 128*0e8011faSEmmanuel Vadot compatible = "snps,dwmac-mdio"; 129*0e8011faSEmmanuel Vadot #address-cells = <1>; 130*0e8011faSEmmanuel Vadot #size-cells = <0>; 131*0e8011faSEmmanuel Vadot 132*0e8011faSEmmanuel Vadot rtl8201f: ethernet-phy@1 { 133*0e8011faSEmmanuel Vadot compatible = "ethernet-phy-ieee802.3-c22"; 134*0e8011faSEmmanuel Vadot reg = <1>; 135*0e8011faSEmmanuel Vadot pinctrl-names = "default"; 136*0e8011faSEmmanuel Vadot pinctrl-0 = <&mac_rst>; 137*0e8011faSEmmanuel Vadot reset-assert-us = <20000>; 138*0e8011faSEmmanuel Vadot reset-deassert-us = <50000>; 139*0e8011faSEmmanuel Vadot reset-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>; 140*0e8011faSEmmanuel Vadot }; 141*0e8011faSEmmanuel Vadot }; 142*0e8011faSEmmanuel Vadot}; 143*0e8011faSEmmanuel Vadot 144*0e8011faSEmmanuel Vadot&io_domains { 145*0e8011faSEmmanuel Vadot vccio0-supply = <&vcc_io>; 146*0e8011faSEmmanuel Vadot vccio1-supply = <&vcc_io>; 147*0e8011faSEmmanuel Vadot vccio2-supply = <&vcc_io>; 148*0e8011faSEmmanuel Vadot vccio3-supply = <&vcc_io>; 149*0e8011faSEmmanuel Vadot vccio4-supply = <&vcc_1v8>; 150*0e8011faSEmmanuel Vadot vccio5-supply = <&vcc_io>; 151*0e8011faSEmmanuel Vadot status = "okay"; 152*0e8011faSEmmanuel Vadot}; 153*0e8011faSEmmanuel Vadot 154*0e8011faSEmmanuel Vadot&pinctrl { 155*0e8011faSEmmanuel Vadot pinctrl-names = "default"; 156*0e8011faSEmmanuel Vadot pinctrl-0 = <&rtc_32k>; 157*0e8011faSEmmanuel Vadot 158*0e8011faSEmmanuel Vadot bluetooth { 159*0e8011faSEmmanuel Vadot bt_reg_on: bt-reg-on { 160*0e8011faSEmmanuel Vadot rockchip,pins = <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>; 161*0e8011faSEmmanuel Vadot }; 162*0e8011faSEmmanuel Vadot 163*0e8011faSEmmanuel Vadot bt_wake_host: bt-wake-host { 164*0e8011faSEmmanuel Vadot rockchip,pins = <4 RK_PB4 RK_FUNC_GPIO &pcfg_pull_down>; 165*0e8011faSEmmanuel Vadot }; 166*0e8011faSEmmanuel Vadot 167*0e8011faSEmmanuel Vadot host_wake_bt: host-wake-bt { 168*0e8011faSEmmanuel Vadot rockchip,pins = <4 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>; 169*0e8011faSEmmanuel Vadot }; 170*0e8011faSEmmanuel Vadot }; 171*0e8011faSEmmanuel Vadot 172*0e8011faSEmmanuel Vadot gmac { 173*0e8011faSEmmanuel Vadot mac_rst: mac-rst { 174*0e8011faSEmmanuel Vadot rockchip,pins = <0 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>; 175*0e8011faSEmmanuel Vadot }; 176*0e8011faSEmmanuel Vadot }; 177*0e8011faSEmmanuel Vadot 178*0e8011faSEmmanuel Vadot leds { 179*0e8011faSEmmanuel Vadot pwr_led: pwr-led { 180*0e8011faSEmmanuel Vadot rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>; 181*0e8011faSEmmanuel Vadot }; 182*0e8011faSEmmanuel Vadot }; 183*0e8011faSEmmanuel Vadot 184*0e8011faSEmmanuel Vadot wifi { 185*0e8011faSEmmanuel Vadot wifi_reg_on: wifi-reg-on { 186*0e8011faSEmmanuel Vadot rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; 187*0e8011faSEmmanuel Vadot }; 188*0e8011faSEmmanuel Vadot 189*0e8011faSEmmanuel Vadot wifi_wake_host: wifi-wake-host { 190*0e8011faSEmmanuel Vadot rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_down>; 191*0e8011faSEmmanuel Vadot }; 192*0e8011faSEmmanuel Vadot }; 193*0e8011faSEmmanuel Vadot}; 194*0e8011faSEmmanuel Vadot 195*0e8011faSEmmanuel Vadot&pwm0 { 196*0e8011faSEmmanuel Vadot pinctrl-names = "default"; 197*0e8011faSEmmanuel Vadot pinctrl-0 = <&pwm0_pin_pull_down>; 198*0e8011faSEmmanuel Vadot status = "okay"; 199*0e8011faSEmmanuel Vadot}; 200*0e8011faSEmmanuel Vadot 201*0e8011faSEmmanuel Vadot&saradc { 202*0e8011faSEmmanuel Vadot vref-supply = <&vcc_1v8>; 203*0e8011faSEmmanuel Vadot status = "okay"; 204*0e8011faSEmmanuel Vadot}; 205*0e8011faSEmmanuel Vadot 206*0e8011faSEmmanuel Vadot&sdio { 207*0e8011faSEmmanuel Vadot #address-cells = <1>; 208*0e8011faSEmmanuel Vadot #size-cells = <0>; 209*0e8011faSEmmanuel Vadot cap-sd-highspeed; 210*0e8011faSEmmanuel Vadot cap-sdio-irq; 211*0e8011faSEmmanuel Vadot keep-power-in-suspend; 212*0e8011faSEmmanuel Vadot max-frequency = <50000000>; 213*0e8011faSEmmanuel Vadot mmc-pwrseq = <&sdio_pwrseq>; 214*0e8011faSEmmanuel Vadot no-mmc; 215*0e8011faSEmmanuel Vadot no-sd; 216*0e8011faSEmmanuel Vadot non-removable; 217*0e8011faSEmmanuel Vadot vmmc-supply = <&vcc_io>; 218*0e8011faSEmmanuel Vadot vqmmc-supply = <&vcc_1v8>; 219*0e8011faSEmmanuel Vadot status = "okay"; 220*0e8011faSEmmanuel Vadot 221*0e8011faSEmmanuel Vadot brcmf: wifi@1 { 222*0e8011faSEmmanuel Vadot compatible = "brcm,bcm43430a1-fmac", "brcm,bcm4329-fmac"; 223*0e8011faSEmmanuel Vadot reg = <1>; 224*0e8011faSEmmanuel Vadot interrupt-parent = <&gpio0>; 225*0e8011faSEmmanuel Vadot interrupts = <RK_PA0 IRQ_TYPE_LEVEL_HIGH>; 226*0e8011faSEmmanuel Vadot interrupt-names = "host-wake"; 227*0e8011faSEmmanuel Vadot pinctrl-names = "default"; 228*0e8011faSEmmanuel Vadot pinctrl-0 = <&wifi_wake_host>; 229*0e8011faSEmmanuel Vadot }; 230*0e8011faSEmmanuel Vadot}; 231*0e8011faSEmmanuel Vadot 232*0e8011faSEmmanuel Vadot&sdmmc { 233*0e8011faSEmmanuel Vadot cap-mmc-highspeed; 234*0e8011faSEmmanuel Vadot cap-sd-highspeed; 235*0e8011faSEmmanuel Vadot disable-wp; 236*0e8011faSEmmanuel Vadot vmmc-supply = <&vcc_io>; 237*0e8011faSEmmanuel Vadot status = "okay"; 238*0e8011faSEmmanuel Vadot}; 239*0e8011faSEmmanuel Vadot 240*0e8011faSEmmanuel Vadot&u2phy { 241*0e8011faSEmmanuel Vadot status = "okay"; 242*0e8011faSEmmanuel Vadot}; 243*0e8011faSEmmanuel Vadot 244*0e8011faSEmmanuel Vadot&u2phy_host { 245*0e8011faSEmmanuel Vadot status = "okay"; 246*0e8011faSEmmanuel Vadot}; 247*0e8011faSEmmanuel Vadot 248*0e8011faSEmmanuel Vadot&u2phy_otg { 249*0e8011faSEmmanuel Vadot status = "okay"; 250*0e8011faSEmmanuel Vadot}; 251*0e8011faSEmmanuel Vadot 252*0e8011faSEmmanuel Vadot&uart0 { 253*0e8011faSEmmanuel Vadot pinctrl-names = "default"; 254*0e8011faSEmmanuel Vadot pinctrl-0 = <&uart0_xfer>; 255*0e8011faSEmmanuel Vadot status = "okay"; 256*0e8011faSEmmanuel Vadot}; 257*0e8011faSEmmanuel Vadot 258*0e8011faSEmmanuel Vadot&uart4 { 259*0e8011faSEmmanuel Vadot uart-has-rtscts; 260*0e8011faSEmmanuel Vadot status = "okay"; 261*0e8011faSEmmanuel Vadot 262*0e8011faSEmmanuel Vadot bluetooth { 263*0e8011faSEmmanuel Vadot compatible = "brcm,bcm43430a1-bt"; 264*0e8011faSEmmanuel Vadot clocks = <&cru SCLK_RTC32K>; 265*0e8011faSEmmanuel Vadot clock-names = "lpo"; 266*0e8011faSEmmanuel Vadot interrupt-parent = <&gpio4>; 267*0e8011faSEmmanuel Vadot interrupts = <RK_PB4 IRQ_TYPE_LEVEL_HIGH>; 268*0e8011faSEmmanuel Vadot interrupt-names = "host-wakeup"; 269*0e8011faSEmmanuel Vadot device-wakeup-gpios = <&gpio4 RK_PB2 GPIO_ACTIVE_HIGH>; 270*0e8011faSEmmanuel Vadot shutdown-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>; 271*0e8011faSEmmanuel Vadot pinctrl-names = "default"; 272*0e8011faSEmmanuel Vadot pinctrl-0 = <&bt_reg_on &bt_wake_host &host_wake_bt>; 273*0e8011faSEmmanuel Vadot vbat-supply = <&vcc_io>; 274*0e8011faSEmmanuel Vadot vddio-supply = <&vcc_1v8>; 275*0e8011faSEmmanuel Vadot }; 276*0e8011faSEmmanuel Vadot}; 277*0e8011faSEmmanuel Vadot 278*0e8011faSEmmanuel Vadot&usb_host_ehci { 279*0e8011faSEmmanuel Vadot status = "okay"; 280*0e8011faSEmmanuel Vadot}; 281*0e8011faSEmmanuel Vadot 282*0e8011faSEmmanuel Vadot&usb_host_ohci { 283*0e8011faSEmmanuel Vadot status = "okay"; 284*0e8011faSEmmanuel Vadot}; 285*0e8011faSEmmanuel Vadot 286*0e8011faSEmmanuel Vadot&usb20_otg { 287*0e8011faSEmmanuel Vadot dr_mode = "peripheral"; 288*0e8011faSEmmanuel Vadot status = "okay"; 289*0e8011faSEmmanuel Vadot}; 290*0e8011faSEmmanuel Vadot 291*0e8011faSEmmanuel Vadot&wdt { 292*0e8011faSEmmanuel Vadot status = "okay"; 293*0e8011faSEmmanuel Vadot}; 294