0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003 * Device tree file for Firefly Rockchip RK3288 Core board
0004 * Copyright (c) 2016 Randy Li <ayaka@soulik.info>
0005 */
0006
0007 /dts-v1/;
0008 #include "rk3288-firefly-reload-core.dtsi"
0009
0010 / {
0011 model = "Firefly-RK3288-reload";
0012 compatible = "firefly,firefly-rk3288-reload", "rockchip,rk3288";
0013
0014 adc-keys {
0015 compatible = "adc-keys";
0016 io-channels = <&saradc 1>;
0017 io-channel-names = "buttons";
0018 keyup-threshold-microvolt = <1800000>;
0019
0020 button-recovery {
0021 label = "Recovery";
0022 linux,code = <KEY_VENDOR>;
0023 press-threshold-microvolt = <0>;
0024 };
0025 };
0026
0027 gpio-keys {
0028 compatible = "gpio-keys";
0029
0030 key-power {
0031 wakeup-source;
0032 gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
0033 label = "GPIO Power";
0034 linux,code = <KEY_POWER>;
0035 pinctrl-names = "default";
0036 pinctrl-0 = <&pwr_key>;
0037 };
0038 };
0039
0040 ir-receiver {
0041 compatible = "gpio-ir-receiver";
0042 gpios = <&gpio7 RK_PA0 GPIO_ACTIVE_LOW>;
0043 };
0044
0045 leds {
0046 compatible = "gpio-leds";
0047
0048 power_led: led-0 {
0049 gpios = <&gpio8 RK_PA2 GPIO_ACTIVE_LOW>;
0050 label = "firefly:blue:power";
0051 pinctrl-names = "default";
0052 pinctrl-0 = <&power_led_pin>;
0053 panic-indicator;
0054 };
0055
0056 work_led: led-1 {
0057 gpios = <&gpio8 RK_PA1 GPIO_ACTIVE_LOW>;
0058 label = "firefly:blue:user";
0059 linux,default-trigger = "rc-feedback";
0060 pinctrl-names = "default";
0061 pinctrl-0 = <&work_led_pin>;
0062 };
0063 };
0064
0065 sdio_pwrseq: sdio-pwrseq {
0066 compatible = "mmc-pwrseq-simple";
0067 clocks = <&hym8563>;
0068 clock-names = "ext_clock";
0069 pinctrl-names = "default";
0070 pinctrl-0 = <&wifi_enable>;
0071 reset-gpios = <&gpio4 RK_PD4 GPIO_ACTIVE_LOW>;
0072 };
0073
0074 sound {
0075 compatible = "simple-audio-card";
0076 simple-audio-card,name = "SPDIF";
0077 simple-audio-card,dai-link@1 { /* S/PDIF - S/PDIF */
0078 cpu { sound-dai = <&spdif>; };
0079 codec { sound-dai = <&spdif_out>; };
0080 };
0081 };
0082
0083 spdif_out: spdif-out {
0084 compatible = "linux,spdif-dit";
0085 #sound-dai-cells = <0>;
0086 };
0087
0088 vcc_host_5v: usb-host-regulator {
0089 compatible = "regulator-fixed";
0090 enable-active-high;
0091 gpio = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
0092 pinctrl-names = "default";
0093 pinctrl-0 = <&host_vbus_drv>;
0094 regulator-name = "vcc_host_5v";
0095 regulator-min-microvolt = <5000000>;
0096 regulator-max-microvolt = <5000000>;
0097 regulator-always-on;
0098 vin-supply = <&vcc_5v>;
0099 };
0100
0101 vcc_5v: vcc_sys: vsys-regulator {
0102 compatible = "regulator-fixed";
0103 regulator-name = "vcc_5v";
0104 regulator-min-microvolt = <5000000>;
0105 regulator-max-microvolt = <5000000>;
0106 regulator-always-on;
0107 regulator-boot-on;
0108 };
0109
0110 vcc_sd: sdmmc-regulator {
0111 compatible = "regulator-fixed";
0112 gpio = <&gpio7 RK_PB3 GPIO_ACTIVE_LOW>;
0113 pinctrl-names = "default";
0114 pinctrl-0 = <&sdmmc_pwr>;
0115 regulator-name = "vcc_sd";
0116 regulator-min-microvolt = <3300000>;
0117 regulator-max-microvolt = <3300000>;
0118 startup-delay-us = <100000>;
0119 vin-supply = <&vcc_io>;
0120 };
0121
0122 vcc_otg_5v: usb-otg-regulator {
0123 compatible = "regulator-fixed";
0124 enable-active-high;
0125 gpio = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>;
0126 pinctrl-names = "default";
0127 pinctrl-0 = <&otg_vbus_drv>;
0128 regulator-name = "vcc_otg_5v";
0129 regulator-min-microvolt = <5000000>;
0130 regulator-max-microvolt = <5000000>;
0131 regulator-always-on;
0132 vin-supply = <&vcc_5v>;
0133 };
0134
0135 dovdd_1v8: dovdd-1v8-regulator {
0136 compatible = "regulator-fixed";
0137 enable-active-high;
0138 gpio = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
0139 pinctrl-names = "default";
0140 pinctrl-0 = <&dvp_pwr>;
0141 regulator-name = "dovdd_1v8";
0142 regulator-min-microvolt = <1800000>;
0143 regulator-max-microvolt = <1800000>;
0144 vin-supply = <&vcc_io>;
0145 };
0146
0147 vcc28_dvp: vcc28-dvp-regulator {
0148 compatible = "regulator-fixed";
0149 enable-active-high;
0150 gpio = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
0151 pinctrl-names = "default";
0152 pinctrl-0 = <&dvp_pwr>;
0153 regulator-name = "vcc28_dvp";
0154 regulator-min-microvolt = <2800000>;
0155 regulator-max-microvolt = <2800000>;
0156 vin-supply = <&vcc_io>;
0157 };
0158
0159 af_28: af_28-regulator {
0160 compatible = "regulator-fixed";
0161 enable-active-high;
0162 gpio = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
0163 pinctrl-names = "default";
0164 pinctrl-0 = <&dvp_pwr>;
0165 regulator-name = "af_28";
0166 regulator-min-microvolt = <2800000>;
0167 regulator-max-microvolt = <2800000>;
0168 vin-supply = <&vcc_io>;
0169 };
0170
0171 dvdd_1v2: af_28-regulator {
0172 compatible = "regulator-fixed";
0173 enable-active-high;
0174 gpio = <&gpio7 RK_PB4 GPIO_ACTIVE_HIGH>;
0175 pinctrl-names = "default";
0176 pinctrl-0 = <&cif_pwr>;
0177 regulator-name = "dvdd_1v2";
0178 regulator-min-microvolt = <1200000>;
0179 regulator-max-microvolt = <1200000>;
0180 vin-supply = <&vcc_io>;
0181 };
0182
0183 vbat_wl: wifi-regulator {
0184 compatible = "regulator-fixed";
0185 regulator-name = "vbat_wl";
0186 regulator-min-microvolt = <3300000>;
0187 regulator-max-microvolt = <3300000>;
0188 vin-supply = <&vcc_io>;
0189 };
0190 };
0191
0192 &hdmi {
0193 ddc-i2c-bus = <&i2c5>;
0194 pinctrl-names = "default";
0195 pinctrl-0 = <&hdmi_cec_c0>;
0196 status = "okay";
0197 };
0198
0199 &i2c0 {
0200 hym8563: hym8563@51 {
0201 compatible = "haoyu,hym8563";
0202 reg = <0x51>;
0203 #clock-cells = <0>;
0204 clock-frequency = <32768>;
0205 clock-output-names = "xin32k";
0206 interrupt-parent = <&gpio7>;
0207 interrupts = <RK_PA4 IRQ_TYPE_EDGE_FALLING>;
0208 pinctrl-names = "default";
0209 pinctrl-0 = <&rtc_int>;
0210 };
0211 };
0212
0213 &i2c2 {
0214 status = "okay";
0215
0216 codec: es8328@10 {
0217 compatible = "everest,es8328";
0218 DVDD-supply = <&vcca_33>;
0219 AVDD-supply = <&vcca_33>;
0220 PVDD-supply = <&vcca_33>;
0221 HPVDD-supply = <&vcca_33>;
0222 clocks = <&cru HCLK_I2S0>, <&cru SCLK_I2S0>;
0223 clock-names = "i2s_hclk", "i2s_clk";
0224 reg = <0x10>;
0225 };
0226 };
0227
0228 &i2c5 {
0229 status = "okay";
0230 };
0231
0232 &i2s {
0233 status = "okay";
0234 };
0235
0236 &saradc {
0237 vref-supply = <&vcc_18>;
0238 status = "okay";
0239 };
0240
0241 &sdmmc {
0242 bus-width = <4>;
0243 cap-mmc-highspeed;
0244 cap-sd-highspeed;
0245 card-detect-delay = <200>;
0246 disable-wp;
0247 pinctrl-names = "default";
0248 pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>;
0249 vmmc-supply = <&vcc_sd>;
0250 vqmmc-supply = <&vccio_sd>;
0251 status = "okay";
0252 };
0253
0254 &sdio0 {
0255 bus-width = <4>;
0256 cap-sd-highspeed;
0257 cap-sdio-irq;
0258 mmc-pwrseq = <&sdio_pwrseq>;
0259 non-removable;
0260 pinctrl-names = "default";
0261 pinctrl-0 = <&sdio0_bus4>, <&sdio0_cmd>, <&sdio0_clk>, <&sdio0_int>;
0262 sd-uhs-sdr12;
0263 sd-uhs-sdr25;
0264 sd-uhs-sdr50;
0265 sd-uhs-ddr50;
0266 vmmc-supply = <&vbat_wl>;
0267 vqmmc-supply = <&vccio_wl>;
0268 status = "okay";
0269 };
0270
0271 &spdif {
0272 status = "okay";
0273 };
0274
0275 &uart0 {
0276 pinctrl-names = "default";
0277 pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>;
0278 status = "okay";
0279 };
0280
0281 &uart1 {
0282 status = "okay";
0283 };
0284
0285 &uart2 {
0286 status = "okay";
0287 };
0288
0289 &uart3 {
0290 status = "okay";
0291 };
0292
0293 &usbphy {
0294 status = "okay";
0295 };
0296
0297 &usb_host1 {
0298 pinctrl-names = "default";
0299 pinctrl-0 = <&usbhub_rst>;
0300 status = "okay";
0301 };
0302
0303 &usb_otg {
0304 status = "okay";
0305 };
0306
0307 &pinctrl {
0308 ir {
0309 ir_int: ir-int {
0310 rockchip,pins = <7 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
0311 };
0312 };
0313
0314 dvp {
0315 dvp_pwr: dvp-pwr {
0316 rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
0317 };
0318
0319 cif_pwr: cif-pwr {
0320 rockchip,pins = <7 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
0321 };
0322 };
0323
0324 hym8563 {
0325 rtc_int: rtc-int {
0326 rockchip,pins = <7 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
0327 };
0328 };
0329
0330 keys {
0331 pwr_key: pwr-key {
0332 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
0333 };
0334 };
0335
0336 leds {
0337 power_led_pin: power-led-pin {
0338 rockchip,pins = <8 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
0339 };
0340
0341 work_led_pin: work-led-pin {
0342 rockchip,pins = <8 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
0343 };
0344 };
0345
0346 sdmmc {
0347 /*
0348 * Default drive strength isn't enough to achieve even
0349 * high-speed mode on firefly board so bump up to 12ma.
0350 */
0351 sdmmc_bus4: sdmmc-bus4 {
0352 rockchip,pins = <6 RK_PC0 1 &pcfg_pull_up_drv_12ma>,
0353 <6 RK_PC1 1 &pcfg_pull_up_drv_12ma>,
0354 <6 RK_PC2 1 &pcfg_pull_up_drv_12ma>,
0355 <6 RK_PC3 1 &pcfg_pull_up_drv_12ma>;
0356 };
0357
0358 sdmmc_clk: sdmmc-clk {
0359 rockchip,pins = <6 RK_PC4 1 &pcfg_pull_none_12ma>;
0360 };
0361
0362 sdmmc_cmd: sdmmc-cmd {
0363 rockchip,pins = <6 RK_PC5 1 &pcfg_pull_up_drv_12ma>;
0364 };
0365
0366 sdmmc_pwr: sdmmc-pwr {
0367 rockchip,pins = <7 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
0368 };
0369 };
0370
0371 sdio {
0372 wifi_enable: wifi-enable {
0373 rockchip,pins = <4 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
0374 };
0375 };
0376
0377 usb_host {
0378 host_vbus_drv: host-vbus-drv {
0379 rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
0380 };
0381
0382 usbhub_rst: usbhub-rst {
0383 rockchip,pins = <8 RK_PA3 RK_FUNC_GPIO &pcfg_output_high>;
0384 };
0385 };
0386
0387 usb_otg {
0388 otg_vbus_drv: otg-vbus-drv {
0389 rockchip,pins = <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
0390 };
0391 };
0392 };