blob: e10aa638a305b9a57e01b6e46d3f2d2373769b19 [file] [log] [blame]
Andy Yan9ce3de12019-11-14 11:22:47 +08001// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2019 Fuzhou Rockchip Electronics Co., Ltd
4 */
5
6/dts-v1/;
7#include "rk3308.dtsi"
8
9/ {
10 model = "Firefly ROC-RK3308-CC board";
11 compatible = "firefly,roc-rk3308-cc", "rockchip,rk3308";
12 chosen {
13 stdout-path = "serial2:1500000n8";
14 };
15
16 ir_rx {
17 compatible = "gpio-ir-receiver";
18 gpios = <&gpio0 RK_PC0 GPIO_ACTIVE_HIGH>;
19 pinctrl-names = "default";
20 pinctrl-0 = <&ir_recv_pin>;
21 };
22
23 ir_tx {
24 compatible = "pwm-ir-tx";
25 pwms = <&pwm5 0 25000 0>;
26 };
27
28 leds {
29 compatible = "gpio-leds";
30 power {
31 label = "firefly:red:power";
32 linux,default-trigger = "ir-power-click";
33 default-state = "on";
34 gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
35 };
36
37 user {
38 label = "firefly:blue:user";
39 linux,default-trigger = "ir-user-click";
40 default-state = "off";
41 gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_HIGH>;
42 };
43 };
44
45 typec_vcc5v: typec-vcc5v {
46 compatible = "regulator-fixed";
47 regulator-name = "typec_vcc5v";
48 regulator-always-on;
49 regulator-boot-on;
50 regulator-min-microvolt = <5000000>;
51 regulator-max-microvolt = <5000000>;
52 };
53
54 vcc5v0_sys: vcc5v0-sys {
55 compatible = "regulator-fixed";
56 regulator-name = "vcc5v0_sys";
57 regulator-min-microvolt = <5000000>;
58 regulator-max-microvolt = <5000000>;
59 regulator-always-on;
60 regulator-boot-on;
61 vin-supply = <&typec_vcc5v>;
62 };
63
64 vdd_core: vdd-core {
65 compatible = "pwm-regulator";
66 pwms = <&pwm0 0 5000 1>;
67 regulator-name = "vdd_core";
68 regulator-min-microvolt = <827000>;
69 regulator-max-microvolt = <1340000>;
70 regulator-init-microvolt = <1015000>;
71 regulator-always-on;
72 regulator-boot-on;
73 regulator-settling-time-up-us = <250>;
74 pwm-supply = <&vcc5v0_sys>;
75 };
76
77 vdd_log: vdd-log {
78 compatible = "regulator-fixed";
79 regulator-name = "vdd_log";
80 regulator-always-on;
81 regulator-boot-on;
82 regulator-min-microvolt = <1050000>;
83 regulator-max-microvolt = <1050000>;
84 vin-supply = <&vcc5v0_sys>;
85 };
86
87 vcc_io: vcc-io {
88 compatible = "regulator-fixed";
89 regulator-name = "vcc_io";
90 regulator-min-microvolt = <3300000>;
91 regulator-max-microvolt = <3300000>;
92 regulator-always-on;
93 regulator-boot-on;
94 vin-supply = <&vcc5v0_sys>;
95 };
96
97 vcc_sdmmc: vcc-sdmmc {
98 compatible = "regulator-gpio";
99 regulator-name = "vcc_sdmmc";
100 regulator-min-microvolt = <1800000>;
101 regulator-max-microvolt = <3300000>;
102 gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_HIGH>;
103 states = <1800000 0x0
104 3300000 0x1>;
105 vin-supply = <&vcc5v0_sys>;
106 };
107
108 vcc_sd: vcc-sd {
109 compatible = "regulator-fixed";
110 gpio = <&gpio4 RK_PD6 GPIO_ACTIVE_LOW>;
111 regulator-name = "vcc_sd";
112 regulator-min-microvolt = <3300000>;
113 regulator-max-microvolt = <3300000>;
114 regulator-always-on;
115 regulator-boot-on;
116 vim-supply = <&vcc_io>;
117 };
118
119};
120
121&cpu0 {
122 cpu-supply = <&vdd_core>;
123};
124
125&emmc {
126 bus-width = <8>;
127 cap-mmc-highspeed;
128 supports-emmc;
129 disable-wp;
130 non-removable;
131 num-slots = <1>;
132 status = "okay";
133};
134
135&i2c1 {
136 clock-frequency = <400000>;
137 status = "okay";
138
139 rtc: rtc@51 {
140 compatible = "nxp,pcf8563";
141 reg = <0x51>;
142 #clock-cells = <0>;
143 };
144};
145
146&pwm5 {
147 status = "okay";
148 pinctrl-names = "active";
149 pinctrl-0 = <&pwm5_pin_pull_down>;
150};
151
152&pinctrl {
153 pinctrl-names = "default";
154 pinctrl-0 = <&rtc_32k>;
155
156 ir-receiver {
157 ir_recv_pin: ir-recv-pin {
158 rockchip,pins = <0 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
159 };
160 };
161
162 buttons {
163 pwr_key: pwr-key {
164 rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
165 };
166 };
167};
168
169&pwm0 {
170 status = "okay";
171 pinctrl-0 = <&pwm0_pin_pull_down>;
172};
173
174&sdmmc {
175 bus-width = <4>;
176 cap-mmc-highspeed;
177 cap-sd-highspeed;
178 supports-sd;
179 card-detect-delay = <300>;
180 sd-uhs-sdr25;
181 sd-uhs-sdr50;
182 sd-uhs-sdr104;
183 vmmc-supply = <&vcc_sd>;
184 vqmmc-supply = <&vcc_sdmmc>;
185 status = "okay";
186};
187
188&uart2 {
189 status = "okay";
190};