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