1// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2/* 3 * Copyright (c) 2019 Akash Gajjar <akash@openedev.com> 4 * Copyright (c) 2019 Jagan Teki <jagan@openedev.com> 5 */ 6 7/dts-v1/; 8 9#include <dt-bindings/leds/common.h> 10#include "rk3308.dtsi" 11 12/ { 13 model = "Radxa ROCK Pi S"; 14 compatible = "radxa,rockpis", "rockchip,rk3308"; 15 16 aliases { 17 ethernet0 = &gmac; 18 mmc0 = &emmc; 19 mmc1 = &sdmmc; 20 }; 21 22 chosen { 23 stdout-path = "serial0:1500000n8"; 24 }; 25 26 leds { 27 compatible = "gpio-leds"; 28 pinctrl-names = "default"; 29 pinctrl-0 = <&green_led>, <&heartbeat_led>; 30 31 green-led { 32 color = <LED_COLOR_ID_GREEN>; 33 default-state = "on"; 34 function = LED_FUNCTION_POWER; 35 gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>; 36 label = "rockpis:green:power"; 37 linux,default-trigger = "default-on"; 38 }; 39 40 blue-led { 41 color = <LED_COLOR_ID_BLUE>; 42 default-state = "on"; 43 function = LED_FUNCTION_HEARTBEAT; 44 gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>; 45 label = "rockpis:blue:user"; 46 linux,default-trigger = "heartbeat"; 47 }; 48 }; 49 50 sdio_pwrseq: sdio-pwrseq { 51 compatible = "mmc-pwrseq-simple"; 52 pinctrl-0 = <&wifi_enable_h>; 53 pinctrl-names = "default"; 54 reset-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>; 55 }; 56 57 vcc_1v8: vcc-1v8 { 58 compatible = "regulator-fixed"; 59 regulator-name = "vcc_1v8"; 60 regulator-always-on; 61 regulator-boot-on; 62 regulator-min-microvolt = <1800000>; 63 regulator-max-microvolt = <1800000>; 64 vin-supply = <&vcc_io>; 65 }; 66 67 vcc_io: vcc-io { 68 compatible = "regulator-fixed"; 69 regulator-name = "vcc_io"; 70 regulator-always-on; 71 regulator-boot-on; 72 regulator-min-microvolt = <3300000>; 73 regulator-max-microvolt = <3300000>; 74 vin-supply = <&vcc5v0_sys>; 75 }; 76 77 vcc_ddr: vcc-ddr { 78 compatible = "regulator-fixed"; 79 regulator-name = "vcc_ddr"; 80 regulator-always-on; 81 regulator-boot-on; 82 regulator-min-microvolt = <1500000>; 83 regulator-max-microvolt = <1500000>; 84 vin-supply = <&vcc5v0_sys>; 85 }; 86 87 vcc5v0_otg: vcc5v0-otg { 88 compatible = "regulator-fixed"; 89 enable-active-high; 90 gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>; 91 pinctrl-names = "default"; 92 pinctrl-0 = <&otg_vbus_drv>; 93 regulator-name = "vcc5v0_otg"; 94 regulator-always-on; 95 vin-supply = <&vcc5v0_sys>; 96 }; 97 98 vcc5v0_sys: vcc5v0-sys { 99 compatible = "regulator-fixed"; 100 regulator-name = "vcc5v0_sys"; 101 regulator-always-on; 102 regulator-boot-on; 103 regulator-min-microvolt = <5000000>; 104 regulator-max-microvolt = <5000000>; 105 }; 106 107 vdd_core: vdd-core { 108 compatible = "pwm-regulator"; 109 pwms = <&pwm0 0 5000 1>; 110 pwm-supply = <&vcc5v0_sys>; 111 regulator-name = "vdd_core"; 112 regulator-min-microvolt = <827000>; 113 regulator-max-microvolt = <1340000>; 114 regulator-settling-time-up-us = <250>; 115 regulator-always-on; 116 regulator-boot-on; 117 }; 118 119 vdd_log: vdd-log { 120 compatible = "regulator-fixed"; 121 regulator-name = "vdd_log"; 122 regulator-always-on; 123 regulator-boot-on; 124 regulator-min-microvolt = <1050000>; 125 regulator-max-microvolt = <1050000>; 126 vin-supply = <&vcc5v0_sys>; 127 }; 128}; 129 130&cpu0 { 131 cpu-supply = <&vdd_core>; 132}; 133 134&emmc { 135 cap-mmc-highspeed; 136 cap-sd-highspeed; 137 no-sdio; 138 non-removable; 139 pinctrl-names = "default"; 140 pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd>; 141 vmmc-supply = <&vcc_io>; 142 status = "okay"; 143}; 144 145&gmac { 146 clock_in_out = "output"; 147 phy-supply = <&vcc_io>; 148 snps,reset-gpio = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>; 149 snps,reset-active-low; 150 snps,reset-delays-us = <0 50000 50000>; 151 status = "okay"; 152}; 153 154&i2c1 { 155 status = "okay"; 156}; 157 158&pinctrl { 159 pinctrl-names = "default"; 160 pinctrl-0 = <&rtc_32k>; 161 162 leds { 163 green_led: green-led { 164 rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>; 165 }; 166 167 heartbeat_led: heartbeat-led { 168 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>; 169 }; 170 }; 171 172 usb { 173 otg_vbus_drv: otg-vbus-drv { 174 rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>; 175 }; 176 }; 177 178 sdio-pwrseq { 179 wifi_enable_h: wifi-enable-h { 180 rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; 181 }; 182 183 wifi_host_wake: wifi-host-wake { 184 rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_down>; 185 }; 186 }; 187}; 188 189&pwm0 { 190 status = "okay"; 191 pinctrl-0 = <&pwm0_pin_pull_down>; 192}; 193 194&saradc { 195 vref-supply = <&vcc_1v8>; 196 status = "okay"; 197}; 198 199&sdio { 200 #address-cells = <1>; 201 #size-cells = <0>; 202 cap-sd-highspeed; 203 cap-sdio-irq; 204 keep-power-in-suspend; 205 max-frequency = <1000000>; 206 mmc-pwrseq = <&sdio_pwrseq>; 207 non-removable; 208 sd-uhs-sdr104; 209 status = "okay"; 210}; 211 212&sdmmc { 213 cap-sd-highspeed; 214 status = "okay"; 215}; 216 217&u2phy { 218 status = "okay"; 219 220 u2phy_host: host-port { 221 phy-supply = <&vcc5v0_otg>; 222 status = "okay"; 223 }; 224 225 u2phy_otg: otg-port { 226 phy-supply = <&vcc5v0_otg>; 227 status = "okay"; 228 }; 229}; 230 231&uart0 { 232 status = "okay"; 233}; 234 235&uart4 { 236 status = "okay"; 237 238 bluetooth { 239 compatible = "realtek,rtl8723bs-bt"; 240 device-wake-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>; 241 host-wake-gpios = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>; 242 }; 243}; 244 245&usb_host_ehci { 246 status = "okay"; 247}; 248 249&usb_host_ohci { 250 status = "okay"; 251}; 252 253&usb20_otg { 254 dr_mode = "peripheral"; 255 status = "okay"; 256}; 257 258&wdt { 259 status = "okay"; 260}; 261