0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003 * Copyright (c) 2019 Fuzhou Rockchip Electronics Co., Ltd
0004 */
0005
0006 /dts-v1/;
0007 #include "rk3308.dtsi"
0008
0009 / {
0010 model = "Firefly ROC-RK3308-CC board";
0011 compatible = "firefly,roc-rk3308-cc", "rockchip,rk3308";
0012
0013 aliases {
0014 mmc0 = &sdmmc;
0015 mmc1 = &emmc;
0016 };
0017
0018 chosen {
0019 stdout-path = "serial2:1500000n8";
0020 };
0021
0022 ir_rx {
0023 compatible = "gpio-ir-receiver";
0024 gpios = <&gpio0 RK_PC0 GPIO_ACTIVE_HIGH>;
0025 pinctrl-names = "default";
0026 pinctrl-0 = <&ir_recv_pin>;
0027 };
0028
0029 ir_tx {
0030 compatible = "pwm-ir-tx";
0031 pwms = <&pwm5 0 25000 0>;
0032 };
0033
0034 leds {
0035 compatible = "gpio-leds";
0036
0037 power_led: led-0 {
0038 label = "firefly:red:power";
0039 linux,default-trigger = "ir-power-click";
0040 default-state = "on";
0041 gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
0042 };
0043
0044 user_led: led-1 {
0045 label = "firefly:blue:user";
0046 linux,default-trigger = "ir-user-click";
0047 default-state = "off";
0048 gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_HIGH>;
0049 };
0050 };
0051
0052 typec_vcc5v: typec-vcc5v {
0053 compatible = "regulator-fixed";
0054 regulator-name = "typec_vcc5v";
0055 regulator-min-microvolt = <5000000>;
0056 regulator-max-microvolt = <5000000>;
0057 regulator-always-on;
0058 regulator-boot-on;
0059 };
0060
0061 vcc5v0_sys: vcc5v0-sys {
0062 compatible = "regulator-fixed";
0063 regulator-name = "vcc5v0_sys";
0064 regulator-min-microvolt = <5000000>;
0065 regulator-max-microvolt = <5000000>;
0066 regulator-always-on;
0067 regulator-boot-on;
0068 vin-supply = <&typec_vcc5v>;
0069 };
0070
0071 vcc_io: vcc-io {
0072 compatible = "regulator-fixed";
0073 regulator-name = "vcc_io";
0074 regulator-min-microvolt = <3300000>;
0075 regulator-max-microvolt = <3300000>;
0076 regulator-always-on;
0077 regulator-boot-on;
0078 vin-supply = <&vcc5v0_sys>;
0079 };
0080
0081 vcc_sdmmc: vcc-sdmmc {
0082 compatible = "regulator-gpio";
0083 regulator-name = "vcc_sdmmc";
0084 regulator-min-microvolt = <1800000>;
0085 regulator-max-microvolt = <3300000>;
0086 gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_HIGH>;
0087 states = <1800000 0x0>,
0088 <3300000 0x1>;
0089 vin-supply = <&vcc5v0_sys>;
0090 };
0091
0092 vcc_sd: vcc-sd {
0093 compatible = "regulator-fixed";
0094 gpio = <&gpio4 RK_PD6 GPIO_ACTIVE_LOW>;
0095 regulator-name = "vcc_sd";
0096 regulator-min-microvolt = <3300000>;
0097 regulator-max-microvolt = <3300000>;
0098 regulator-always-on;
0099 regulator-boot-on;
0100 vin-supply = <&vcc_io>;
0101 };
0102
0103 vdd_core: vdd-core {
0104 compatible = "pwm-regulator";
0105 pwms = <&pwm0 0 5000 1>;
0106 regulator-name = "vdd_core";
0107 regulator-min-microvolt = <827000>;
0108 regulator-max-microvolt = <1340000>;
0109 regulator-init-microvolt = <1015000>;
0110 regulator-settling-time-up-us = <250>;
0111 regulator-always-on;
0112 regulator-boot-on;
0113 pwm-supply = <&vcc5v0_sys>;
0114 };
0115
0116 vdd_log: vdd-log {
0117 compatible = "regulator-fixed";
0118 regulator-name = "vdd_log";
0119 regulator-min-microvolt = <1050000>;
0120 regulator-max-microvolt = <1050000>;
0121 regulator-always-on;
0122 regulator-boot-on;
0123 vin-supply = <&vcc5v0_sys>;
0124 };
0125 };
0126
0127 &cpu0 {
0128 cpu-supply = <&vdd_core>;
0129 };
0130
0131 &emmc {
0132 cap-mmc-highspeed;
0133 mmc-hs200-1_8v;
0134 non-removable;
0135 status = "okay";
0136 };
0137
0138 &i2c1 {
0139 clock-frequency = <400000>;
0140 status = "okay";
0141
0142 rtc: rtc@51 {
0143 compatible = "nxp,pcf8563";
0144 reg = <0x51>;
0145 #clock-cells = <0>;
0146 };
0147 };
0148
0149 &pwm5 {
0150 status = "okay";
0151 pinctrl-names = "active";
0152 pinctrl-0 = <&pwm5_pin_pull_down>;
0153 };
0154
0155 &pinctrl {
0156 pinctrl-names = "default";
0157 pinctrl-0 = <&rtc_32k>;
0158
0159 ir-receiver {
0160 ir_recv_pin: ir-recv-pin {
0161 rockchip,pins = <0 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
0162 };
0163 };
0164
0165 buttons {
0166 pwr_key: pwr-key {
0167 rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
0168 };
0169 };
0170 };
0171
0172 &pwm0 {
0173 status = "okay";
0174 pinctrl-0 = <&pwm0_pin_pull_down>;
0175 };
0176
0177 &sdmmc {
0178 cap-mmc-highspeed;
0179 cap-sd-highspeed;
0180 card-detect-delay = <300>;
0181 sd-uhs-sdr25;
0182 sd-uhs-sdr50;
0183 sd-uhs-sdr104;
0184 vmmc-supply = <&vcc_sd>;
0185 vqmmc-supply = <&vcc_sdmmc>;
0186 status = "okay";
0187 };
0188
0189 &uart2 {
0190 status = "okay";
0191 };