xref: /openbmc/u-boot/arch/arm/dts/rk3368-sheep.dts (revision 12308b12)
1// SPDX-License-Identifier: GPL-2.0+
2/*
3 * (C) Copyright 2017 Rockchip Electronics Co., Ltd
4 */
5
6/dts-v1/;
7#include "rk3368.dtsi"
8#include <dt-bindings/input/input.h>
9
10/ {
11	model = "Rockchip sheep board";
12	compatible = "rockchip,sheep", "rockchip,rk3368";
13
14	chosen {
15		stdout-path = "serial2:115200n8";
16	};
17
18	memory@0 {
19		device_type = "memory";
20		reg = <0x0 0x0 0x0 0x80000000>;
21	};
22
23	ext_gmac: gmac-clk {
24		compatible = "fixed-clock";
25		clock-frequency = <125000000>;
26		clock-output-names = "ext_gmac";
27		#clock-cells = <0>;
28	};
29
30	ir: ir-receiver {
31		compatible = "gpio-ir-receiver";
32		gpios = <&gpio3 30 GPIO_ACTIVE_LOW>;
33		pinctrl-names = "default";
34		pinctrl-0 = <&ir_int>;
35	};
36
37	keys: gpio-keys {
38		compatible = "gpio-keys";
39		pinctrl-names = "default";
40		pinctrl-0 = <&pwr_key>;
41
42		power {
43			gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
44			label = "GPIO Power";
45			linux,code = <KEY_POWER>;
46			wakeup-source;
47		};
48	};
49
50	leds: gpio-leds {
51		compatible = "gpio-leds";
52
53		blue {
54			gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
55			label = "geekbox:blue:led";
56			default-state = "on";
57		};
58
59		red {
60			gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>;
61			label = "geekbox:red:led";
62			default-state = "off";
63		};
64	};
65
66	vcc_sys: vcc-sys-regulator {
67		compatible = "regulator-fixed";
68		regulator-name = "vcc_sys";
69		regulator-min-microvolt = <5000000>;
70		regulator-max-microvolt = <5000000>;
71		regulator-always-on;
72		regulator-boot-on;
73	};
74};
75
76&emmc {
77	status = "okay";
78	bus-width = <8>;
79	cap-mmc-highspeed;
80	clock-frequency = <150000000>;
81	disable-wp;
82	keep-power-in-suspend;
83	non-removable;
84	num-slots = <1>;
85	vmmc-supply = <&vcc_io>;
86	vqmmc-supply = <&vcc18_flash>;
87	pinctrl-names = "default";
88	pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_bus8>;
89};
90
91&gmac {
92	status = "okay";
93	phy-supply = <&vcc_lan>;
94	phy-mode = "rgmii";
95	clock_in_out = "input";
96	assigned-clocks = <&cru SCLK_MAC>;
97	assigned-clock-parents = <&ext_gmac>;
98	pinctrl-names = "default";
99	pinctrl-0 = <&rgmii_pins>;
100	tx_delay = <0x30>;
101	rx_delay = <0x10>;
102};
103
104&i2c0 {
105	status = "okay";
106
107	rk808: pmic@1b {
108		compatible = "rockchip,rk808";
109		reg = <0x1b>;
110		pinctrl-names = "default";
111		pinctrl-0 = <&pmic_int>, <&pmic_sleep>;
112		interrupt-parent = <&gpio0>;
113		interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
114		rockchip,system-power-controller;
115		vcc1-supply = <&vcc_sys>;
116		vcc2-supply = <&vcc_sys>;
117		vcc3-supply = <&vcc_sys>;
118		vcc4-supply = <&vcc_sys>;
119		vcc6-supply = <&vcc_sys>;
120		vcc7-supply = <&vcc_sys>;
121		vcc8-supply = <&vcc_io>;
122		vcc9-supply = <&vcc_sys>;
123		vcc10-supply = <&vcc_sys>;
124		vcc11-supply = <&vcc_sys>;
125		vcc12-supply = <&vcc_io>;
126		clock-output-names = "xin32k", "rk808-clkout2";
127		#clock-cells = <1>;
128
129		regulators {
130			vdd_cpu: DCDC_REG1 {
131				regulator-always-on;
132				regulator-boot-on;
133				regulator-min-microvolt = <700000>;
134				regulator-max-microvolt = <1500000>;
135				regulator-name = "vdd_cpu";
136			};
137
138			vdd_log: DCDC_REG2 {
139				regulator-always-on;
140				regulator-boot-on;
141				regulator-min-microvolt = <700000>;
142				regulator-max-microvolt = <1500000>;
143				regulator-name = "vdd_log";
144			};
145
146			vcc_ddr: DCDC_REG3 {
147				regulator-always-on;
148				regulator-boot-on;
149				regulator-name = "vcc_ddr";
150			};
151
152			vcc_io: DCDC_REG4 {
153				regulator-always-on;
154				regulator-boot-on;
155				regulator-min-microvolt = <3300000>;
156				regulator-max-microvolt = <3300000>;
157				regulator-name = "vcc_io";
158			};
159
160			vcc18_flash: LDO_REG1 {
161				regulator-always-on;
162				regulator-boot-on;
163				regulator-min-microvolt = <1800000>;
164				regulator-max-microvolt = <1800000>;
165				regulator-name = "vcc18_flash";
166			};
167
168			vcc33_lcd: LDO_REG2 {
169				regulator-always-on;
170				regulator-boot-on;
171				regulator-min-microvolt = <3300000>;
172				regulator-max-microvolt = <3300000>;
173				regulator-name = "vcc33_lcd";
174			};
175
176			vdd_10: LDO_REG3 {
177				regulator-always-on;
178				regulator-boot-on;
179				regulator-min-microvolt = <1000000>;
180				regulator-max-microvolt = <1000000>;
181				regulator-name = "vdd_10";
182			};
183
184			vcca_18: LDO_REG4 {
185				regulator-boot-on;
186				regulator-min-microvolt = <1800000>;
187				regulator-max-microvolt = <1800000>;
188				regulator-name = "vcca_18";
189			};
190
191			vccio_sd: LDO_REG5 {
192				regulator-always-on;
193				regulator-boot-on;
194				regulator-min-microvolt = <1800000>;
195				regulator-max-microvolt = <3300000>;
196				regulator-name = "vccio_sd";
197			};
198
199			vdd10_lcd: LDO_REG6 {
200				regulator-always-on;
201				regulator-boot-on;
202				regulator-min-microvolt = <1000000>;
203				regulator-max-microvolt = <1000000>;
204				regulator-name = "vdd10_lcd";
205			};
206
207			vcc_18: LDO_REG7 {
208				regulator-always-on;
209				regulator-boot-on;
210				regulator-min-microvolt = <1800000>;
211				regulator-max-microvolt = <1800000>;
212				regulator-name = "vcc_18";
213			};
214
215			vcc18_lcd: LDO_REG8 {
216				regulator-always-on;
217				regulator-boot-on;
218				regulator-min-microvolt = <1800000>;
219				regulator-max-microvolt = <1800000>;
220				regulator-name = "vcc18_lcd";
221			};
222
223			vcc_sd: SWITCH_REG1 {
224				regulator-always-on;
225				regulator-boot-on;
226				regulator-name = "vcc_sd";
227			};
228
229			vcc_lan: SWITCH_REG2 {
230				regulator-always-on;
231				regulator-boot-on;
232				regulator-name = "vcc_lan";
233			};
234		};
235	};
236};
237
238&pinctrl {
239	ir {
240		ir_int: ir-int {
241			rockchip,pins = <3 30 RK_FUNC_GPIO &pcfg_pull_none>;
242		};
243	};
244
245	keys {
246		pwr_key: pwr-key {
247			rockchip,pins = <0 2 RK_FUNC_GPIO &pcfg_pull_none>;
248		};
249	};
250
251	pmic {
252		pmic_sleep: pmic-sleep {
253			rockchip,pins = <0 0 RK_FUNC_2 &pcfg_pull_none>;
254		};
255
256		pmic_int: pmic-int {
257			rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
258		};
259	};
260};
261
262&saradc {
263	status = "okay";
264};
265
266&tsadc {
267	status = "okay";
268	rockchip,hw-tshut-mode = <0>; /* CRU */
269	rockchip,hw-tshut-polarity = <1>; /* high */
270};
271
272&uart4 {
273	status = "okay";
274};
275
276&usb_host0_ehci {
277	status = "okay";
278};
279
280&usb_otg {
281	status = "okay";
282};
283
284&wdt {
285	status = "okay";
286};
287