Akash Gajjar | 6cd6ed9 | 2023-02-14 21:01:09 +0530 | [diff] [blame] | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 2 | /* |
| 3 | * Copyright (c) 2019 Fuzhou Rockchip Electronics Co., Ltd |
| 4 | * Copyright (C) 2023 Akash Gajjar <gajjar04akash@gmail.com> |
| 5 | * Copyright (c) 2023 Jagan Teki <jagan@openedev.com> |
| 6 | */ |
| 7 | |
| 8 | /dts-v1/; |
| 9 | #include <dt-bindings/input/input.h> |
| 10 | #include "rk3308.dtsi" |
| 11 | |
| 12 | / { |
| 13 | model = "Radxa ROCK Pi S"; |
| 14 | compatible = "radxa,rockpis", "rockchip,rk3308"; |
| 15 | |
| 16 | aliases { |
| 17 | ethernet0 = &mac; |
| 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_gio>, <&heartbeat_led_gpio>; |
| 30 | |
| 31 | green-led { |
| 32 | default-state = "on"; |
| 33 | gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>; |
| 34 | label = "rockpis:green:power"; |
| 35 | linux,default-trigger = "default-on"; |
| 36 | }; |
| 37 | |
| 38 | blue-led { |
| 39 | default-state = "on"; |
| 40 | gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>; |
| 41 | label = "rockpis:blue:user"; |
| 42 | linux,default-trigger = "heartbeat"; |
| 43 | }; |
| 44 | }; |
| 45 | |
| 46 | sdio_pwrseq: sdio-pwrseq { |
| 47 | compatible = "mmc-pwrseq-simple"; |
| 48 | pinctrl-0 = <&wifi_enable_h>; |
| 49 | pinctrl-names = "default"; |
| 50 | reset-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>; |
| 51 | }; |
| 52 | |
| 53 | vcc_1v8: vcc-1v8 { |
| 54 | compatible = "regulator-fixed"; |
| 55 | regulator-name = "vcc_1v8"; |
| 56 | regulator-always-on; |
| 57 | regulator-boot-on; |
| 58 | regulator-min-microvolt = <1800000>; |
| 59 | regulator-max-microvolt = <1800000>; |
| 60 | vin-supply = <&vcc_io>; |
| 61 | }; |
| 62 | |
| 63 | vcc_io: vcc-io { |
| 64 | compatible = "regulator-fixed"; |
| 65 | regulator-name = "vcc_io"; |
| 66 | regulator-always-on; |
| 67 | regulator-boot-on; |
| 68 | regulator-min-microvolt = <3300000>; |
| 69 | regulator-max-microvolt = <3300000>; |
| 70 | vin-supply = <&vcc5v0_sys>; |
| 71 | }; |
| 72 | |
| 73 | vcc_ddr: vcc-ddr { |
| 74 | compatible = "regulator-fixed"; |
| 75 | regulator-name = "vcc_ddr"; |
| 76 | regulator-always-on; |
| 77 | regulator-boot-on; |
| 78 | regulator-min-microvolt = <1500000>; |
| 79 | regulator-max-microvolt = <1500000>; |
| 80 | vin-supply = <&vcc5v0_sys>; |
| 81 | }; |
| 82 | |
| 83 | vcc5v0_otg: vcc5v0-otg { |
| 84 | compatible = "regulator-fixed"; |
| 85 | enable-active-high; |
| 86 | gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>; |
| 87 | pinctrl-names = "default"; |
| 88 | pinctrl-0 = <&otg_vbus_drv>; |
| 89 | regulator-name = "vcc5v0_otg"; |
| 90 | regulator-always-on; |
| 91 | vin-supply = <&vcc5v0_sys>; |
| 92 | }; |
| 93 | |
| 94 | vcc5v0_sys: vcc5v0-sys { |
| 95 | compatible = "regulator-fixed"; |
| 96 | regulator-name = "vcc5v0_sys"; |
| 97 | regulator-always-on; |
| 98 | regulator-boot-on; |
| 99 | regulator-min-microvolt = <5000000>; |
| 100 | regulator-max-microvolt = <5000000>; |
| 101 | }; |
| 102 | |
| 103 | vdd_core: vdd-core { |
| 104 | compatible = "pwm-regulator"; |
| 105 | pwms = <&pwm0 0 5000 1>; |
| 106 | pwm-supply = <&vcc5v0_sys>; |
| 107 | regulator-name = "vdd_core"; |
| 108 | regulator-min-microvolt = <827000>; |
| 109 | regulator-max-microvolt = <1340000>; |
| 110 | regulator-init-microvolt = <1015000>; |
| 111 | regulator-settling-time-up-us = <250>; |
| 112 | regulator-always-on; |
| 113 | regulator-boot-on; |
| 114 | }; |
| 115 | |
| 116 | vdd_log: vdd-log { |
| 117 | compatible = "regulator-fixed"; |
| 118 | regulator-name = "vdd_log"; |
| 119 | regulator-always-on; |
| 120 | regulator-boot-on; |
| 121 | regulator-min-microvolt = <1050000>; |
| 122 | regulator-max-microvolt = <1050000>; |
| 123 | vin-supply = <&vcc5v0_sys>; |
| 124 | }; |
| 125 | }; |
| 126 | |
| 127 | &cpu0 { |
| 128 | cpu-supply = <&vdd_core>; |
| 129 | }; |
| 130 | |
| 131 | &emmc { |
| 132 | bus-width = <4>; |
| 133 | cap-mmc-highspeed; |
| 134 | mmc-hs200-1_8v; |
| 135 | non-removable; |
| 136 | vmmc-supply = <&vcc_io>; |
| 137 | status = "okay"; |
| 138 | }; |
| 139 | |
| 140 | &mac { |
| 141 | clock_in_out = "output"; |
| 142 | phy-supply = <&vcc_io>; |
| 143 | snps,reset-gpio = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>; |
| 144 | snps,reset-active-low; |
| 145 | snps,reset-delays-us = <0 50000 50000>; |
| 146 | status = "okay"; |
| 147 | }; |
| 148 | |
| 149 | &i2c1 { |
| 150 | status = "okay"; |
| 151 | }; |
| 152 | |
| 153 | &pinctrl { |
| 154 | pinctrl-names = "default"; |
| 155 | pinctrl-0 = <&rtc_32k>; |
| 156 | |
| 157 | leds { |
| 158 | green_led_gio: green-led-gpio { |
| 159 | rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>; |
| 160 | }; |
| 161 | |
| 162 | heartbeat_led_gpio: heartbeat-led-gpio { |
| 163 | rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>; |
| 164 | }; |
| 165 | }; |
| 166 | |
| 167 | usb { |
| 168 | otg_vbus_drv: otg-vbus-drv { |
| 169 | rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>; |
| 170 | }; |
| 171 | }; |
| 172 | |
| 173 | sdio-pwrseq { |
| 174 | wifi_enable_h: wifi-enable-h { |
| 175 | rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; |
| 176 | }; |
| 177 | |
| 178 | wifi_host_wake: wifi-host-wake { |
| 179 | rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_down>; |
| 180 | }; |
| 181 | }; |
| 182 | }; |
| 183 | |
| 184 | &pwm0 { |
| 185 | status = "okay"; |
| 186 | pinctrl-0 = <&pwm0_pin_pull_down>; |
| 187 | }; |
| 188 | |
| 189 | &saradc { |
| 190 | vref-supply = <&vcc_1v8>; |
| 191 | status = "okay"; |
| 192 | }; |
| 193 | |
| 194 | &sdio { |
| 195 | #address-cells = <1>; |
| 196 | #size-cells = <0>; |
| 197 | cap-sd-highspeed; |
| 198 | cap-sdio-irq; |
| 199 | keep-power-in-suspend; |
| 200 | max-frequency = <1000000>; |
| 201 | mmc-pwrseq = <&sdio_pwrseq>; |
| 202 | non-removable; |
| 203 | sd-uhs-sdr104; |
| 204 | status = "okay"; |
| 205 | }; |
| 206 | |
| 207 | &sdmmc { |
| 208 | cap-sd-highspeed; |
| 209 | status = "okay"; |
| 210 | }; |
| 211 | |
| 212 | &uart0 { |
| 213 | status = "okay"; |
| 214 | }; |
| 215 | |
| 216 | &uart4 { |
| 217 | status = "okay"; |
| 218 | |
| 219 | bluetooth { |
| 220 | compatible = "realtek,rtl8723bs-bt"; |
| 221 | device-wake-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>; |
| 222 | host-wake-gpios = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>; |
| 223 | }; |
| 224 | }; |
| 225 | |
| 226 | &wdt { |
| 227 | status = "okay"; |
| 228 | }; |