0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003 * Copyright (c) 2015 Heiko Stuebner <heiko@sntech.de>
0004 */
0005
0006 /dts-v1/;
0007 #include "rk3368.dtsi"
0008 #include <dt-bindings/input/input.h>
0009
0010 / {
0011 model = "Rockchip R88";
0012 compatible = "rockchip,r88", "rockchip,rk3368";
0013
0014 aliases {
0015 mmc0 = &sdio0;
0016 mmc1 = &emmc;
0017 };
0018
0019 chosen {
0020 stdout-path = "serial2:115200n8";
0021 };
0022
0023 memory {
0024 device_type = "memory";
0025 reg = <0x0 0x0 0x0 0x40000000>;
0026 };
0027
0028 emmc_pwrseq: emmc-pwrseq {
0029 compatible = "mmc-pwrseq-emmc";
0030 pinctrl-0 = <&emmc_reset>;
0031 pinctrl-names = "default";
0032 reset-gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_HIGH>;
0033 };
0034
0035 keys: gpio-keys {
0036 compatible = "gpio-keys";
0037 pinctrl-names = "default";
0038 pinctrl-0 = <&pwr_key>;
0039
0040 key-power {
0041 wakeup-source;
0042 gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>;
0043 label = "GPIO Power";
0044 linux,code = <KEY_POWER>;
0045 };
0046 };
0047
0048 leds: gpio-leds {
0049 compatible = "gpio-leds";
0050
0051 work_led: led-0 {
0052 gpios = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>;
0053 label = "r88:green:led";
0054 pinctrl-names = "default";
0055 pinctrl-0 = <&led_ctl>;
0056 };
0057 };
0058
0059 ir: ir-receiver {
0060 compatible = "gpio-ir-receiver";
0061 gpios = <&gpio3 RK_PD6 GPIO_ACTIVE_LOW>;
0062 pinctrl-names = "default";
0063 pinctrl-0 = <&ir_int>;
0064 };
0065
0066 sdio_pwrseq: sdio-pwrseq {
0067 compatible = "mmc-pwrseq-simple";
0068 clocks = <&hym8563>;
0069 clock-names = "ext_clock";
0070 pinctrl-names = "default";
0071 pinctrl-0 = <&bt_rst>, <&wifi_reg_on>;
0072
0073 reset-gpios =
0074 /* BT_RST_N */
0075 <&gpio3 RK_PA5 GPIO_ACTIVE_LOW>,
0076
0077 /* WL_REG_ON */
0078 <&gpio3 RK_PA4 GPIO_ACTIVE_LOW>;
0079 };
0080
0081 vcc_18: vcc18-regulator {
0082 compatible = "regulator-fixed";
0083 regulator-name = "vcc_18";
0084 regulator-min-microvolt = <1800000>;
0085 regulator-max-microvolt = <1800000>;
0086 regulator-always-on;
0087 regulator-boot-on;
0088 vin-supply = <&vcc_sys>;
0089 };
0090
0091 /* supplies both host and otg */
0092 vcc_host: vcc-host-regulator {
0093 compatible = "regulator-fixed";
0094 enable-active-high;
0095 gpio = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
0096 pinctrl-names = "default";
0097 pinctrl-0 = <&host_vbus_drv>;
0098 regulator-name = "vcc_host";
0099 regulator-always-on;
0100 regulator-boot-on;
0101 vin-supply = <&vcc_sys>;
0102 };
0103
0104 vcc_io: vcc-io-regulator {
0105 compatible = "regulator-fixed";
0106 regulator-name = "vcc_io";
0107 regulator-min-microvolt = <3300000>;
0108 regulator-max-microvolt = <3300000>;
0109 regulator-always-on;
0110 regulator-boot-on;
0111 vin-supply = <&vcc_sys>;
0112 };
0113
0114 vcc_lan: vcc-lan-regulator {
0115 compatible = "regulator-fixed";
0116 regulator-name = "vcc_lan";
0117 regulator-min-microvolt = <3300000>;
0118 regulator-max-microvolt = <3300000>;
0119 regulator-always-on;
0120 regulator-boot-on;
0121 vin-supply = <&vcc_io>;
0122 };
0123
0124 vcc_sys: vcc-sys-regulator {
0125 compatible = "regulator-fixed";
0126 regulator-name = "vcc_sys";
0127 regulator-min-microvolt = <5000000>;
0128 regulator-max-microvolt = <5000000>;
0129 regulator-always-on;
0130 regulator-boot-on;
0131 };
0132
0133 vccio_wl: vccio-wl-regulator {
0134 compatible = "regulator-fixed";
0135 regulator-name = "vccio_wl";
0136 regulator-min-microvolt = <3300000>;
0137 regulator-max-microvolt = <3300000>;
0138 regulator-always-on;
0139 regulator-boot-on;
0140 vin-supply = <&vcc_io>;
0141 };
0142
0143 vdd_10: vdd-10-regulator {
0144 compatible = "regulator-fixed";
0145 regulator-name = "vdd_10";
0146 regulator-min-microvolt = <1000000>;
0147 regulator-max-microvolt = <1000000>;
0148 regulator-always-on;
0149 regulator-boot-on;
0150 vin-supply = <&vcc_sys>;
0151 };
0152 };
0153
0154 &emmc {
0155 bus-width = <8>;
0156 cap-mmc-highspeed;
0157 mmc-pwrseq = <&emmc_pwrseq>;
0158 non-removable;
0159 pinctrl-names = "default";
0160 pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
0161 status = "okay";
0162 };
0163
0164 &gmac {
0165 phy-supply = <&vcc_lan>;
0166 phy-mode = "rmii";
0167 clock_in_out = "output";
0168 snps,reset-gpio = <&gpio3 RK_PB4 GPIO_ACTIVE_HIGH>;
0169 snps,reset-active-low;
0170 snps,reset-delays-us = <0 10000 1000000>;
0171 pinctrl-names = "default";
0172 pinctrl-0 = <&rmii_pins>;
0173 tx_delay = <0x30>;
0174 rx_delay = <0x10>;
0175 status = "okay";
0176 };
0177
0178 &i2c0 {
0179 status = "okay";
0180
0181 vdd_cpu: syr827@40 {
0182 compatible = "silergy,syr827";
0183 reg = <0x40>;
0184 fcs,suspend-voltage-selector = <1>;
0185 regulator-name = "vdd_cpu";
0186 regulator-enable-ramp-delay = <300>;
0187 regulator-min-microvolt = <712500>;
0188 regulator-max-microvolt = <1500000>;
0189 regulator-ramp-delay = <8000>;
0190 regulator-always-on;
0191 regulator-boot-on;
0192 vin-supply = <&vcc_sys>;
0193 };
0194
0195 hym8563: hym8563@51 {
0196 compatible = "haoyu,hym8563";
0197 reg = <0x51>;
0198 #clock-cells = <0>;
0199 clock-frequency = <32768>;
0200 clock-output-names = "xin32k";
0201 /* rtc_int is not connected */
0202 };
0203 };
0204
0205 &io_domains {
0206 status = "okay";
0207
0208 audio-supply = <&vcc_io>;
0209 gpio30-supply = <&vcc_io>;
0210 gpio1830-supply = <&vcc_io>;
0211 wifi-supply = <&vccio_wl>;
0212 };
0213
0214 &sdio0 {
0215 assigned-clocks = <&cru SCLK_SDIO0>;
0216 assigned-clock-parents = <&cru PLL_CPLL>;
0217 bus-width = <4>;
0218 cap-sd-highspeed;
0219 cap-sdio-irq;
0220 keep-power-in-suspend;
0221 mmc-pwrseq = <&sdio_pwrseq>;
0222 non-removable;
0223 pinctrl-names = "default";
0224 pinctrl-0 = <&sdio0_clk &sdio0_cmd &sdio0_bus4>;
0225 vmmc-supply = <&vcc_io>;
0226 vqmmc-supply = <&vccio_wl>;
0227 status = "okay";
0228 };
0229
0230 &pinctrl {
0231 pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma {
0232 bias-disable;
0233 drive-strength = <8>;
0234 };
0235
0236 pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma {
0237 bias-pull-up;
0238 drive-strength = <8>;
0239 };
0240
0241 emmc {
0242 emmc_bus8: emmc-bus8 {
0243 rockchip,pins = <1 RK_PC2 2 &pcfg_pull_up_drv_8ma>,
0244 <1 RK_PC3 2 &pcfg_pull_up_drv_8ma>,
0245 <1 RK_PC4 2 &pcfg_pull_up_drv_8ma>,
0246 <1 RK_PC5 2 &pcfg_pull_up_drv_8ma>,
0247 <1 RK_PC6 2 &pcfg_pull_up_drv_8ma>,
0248 <1 RK_PC7 2 &pcfg_pull_up_drv_8ma>,
0249 <1 RK_PD0 2 &pcfg_pull_up_drv_8ma>,
0250 <1 RK_PD1 2 &pcfg_pull_up_drv_8ma>;
0251 };
0252
0253 emmc-clk {
0254 rockchip,pins = <2 RK_PA4 2 &pcfg_pull_none_drv_8ma>;
0255 };
0256
0257 emmc-cmd {
0258 rockchip,pins = <1 RK_PD2 2 &pcfg_pull_up_drv_8ma>;
0259 };
0260
0261 emmc_reset: emmc-reset {
0262 rockchip,pins = <2 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
0263 };
0264 };
0265
0266 ir {
0267 ir_int: ir-int {
0268 rockchip,pins = <3 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>;
0269 };
0270 };
0271
0272 keys {
0273 pwr_key: pwr-key {
0274 rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
0275 };
0276 };
0277
0278 leds {
0279 stby_pwren: stby-pwren {
0280 rockchip,pins = <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
0281 };
0282
0283 led_ctl: led-ctl {
0284 rockchip,pins = <3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
0285 };
0286 };
0287
0288 sdio {
0289 wifi_reg_on: wifi-reg-on {
0290 rockchip,pins = <3 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
0291 };
0292
0293 bt_rst: bt-rst {
0294 rockchip,pins = <3 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
0295 };
0296 };
0297
0298 usb {
0299 host_vbus_drv: host-vbus-drv {
0300 rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
0301 };
0302 };
0303 };
0304
0305 &pmu_io_domains {
0306 status = "okay";
0307
0308 pmu-supply = <&vcc_io>;
0309 vop-supply = <&vcc_io>;
0310 };
0311
0312 &saradc {
0313 vref-supply = <&vcc_18>;
0314 status = "okay";
0315 };
0316
0317 &tsadc {
0318 rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU 1:GPIO */
0319 rockchip,hw-tshut-polarity = <0>; /* tshut polarity 0:LOW 1:HIGH */
0320 status = "okay";
0321 };
0322
0323 &uart2 {
0324 status = "okay";
0325 };
0326
0327 &usb_host0_ehci {
0328 status = "okay";
0329 };
0330
0331 &usb_otg {
0332 dr_mode = "host";
0333 status = "okay";
0334 };
0335
0336 &wdt {
0337 status = "okay";
0338 };