xref: /OK3568_Linux_fs/kernel/arch/arm64/boot/dts/rockchip/rk3562-rk817.dtsi (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2022 Rockchip Electronics Co., Ltd.
4 *
5 */
6
7#include <dt-bindings/gpio/gpio.h>
8#include <dt-bindings/pinctrl/rockchip.h>
9
10&i2c0 {
11	status = "okay";
12
13	rk817: pmic@20 {
14		compatible = "rockchip,rk817";
15		reg = <0x20>;
16		interrupt-parent = <&gpio0>;
17		interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
18
19		pinctrl-names = "default", "pmic-sleep",
20			"pmic-power-off", "pmic-reset";
21		pinctrl-0 = <&pmic_int>;
22		pinctrl-1 = <&soc_slppin_slp>, <&rk817_slppin_slp>;
23		pinctrl-2 = <&soc_slppin_gpio>, <&rk817_slppin_pwrdn>;
24		pinctrl-3 = <&soc_slppin_gpio>, <&rk817_slppin_rst>;
25		rockchip,system-power-controller;
26		wakeup-source;
27		#clock-cells = <1>;
28		clock-output-names = "rk808-clkout1", "rk808-clkout2";
29		/* 1: rst regs (default in codes), 0: rst the pmic */
30		pmic-reset-func = <0>;
31		vcc1-supply = <&vcc_sys>;
32		vcc2-supply = <&vcc_sys>;
33		vcc3-supply = <&vcc_sys>;
34		vcc4-supply = <&vcc_sys>;
35		vcc5-supply = <&vcc_sys>;
36		vcc6-supply = <&vcc_sys>;
37		vcc7-supply = <&vcc_sys>;
38		vcc8-supply = <&vcc_sys>;
39		vcc9-supply = <&dcdc_boost>;
40		pwrkey {
41			status = "okay";
42		};
43
44		pinctrl_rk8xx: pinctrl_rk8xx {
45			gpio-controller;
46			#gpio-cells = <2>;
47
48			rk817_slppin_null: rk817_slppin_null {
49				pins = "gpio_slp";
50				function = "pin_fun0";
51			};
52
53			rk817_slppin_slp: rk817_slppin_slp {
54				pins = "gpio_slp";
55				function = "pin_fun1";
56			};
57
58			rk817_slppin_pwrdn: rk817_slppin_pwrdn {
59				pins = "gpio_slp";
60				function = "pin_fun2";
61			};
62
63			rk817_slppin_rst: rk817_slppin_rst {
64				pins = "gpio_slp";
65				function = "pin_fun3";
66			};
67		};
68
69		regulators {
70			vdd_logic: DCDC_REG1 {
71				regulator-always-on;
72				regulator-boot-on;
73				regulator-min-microvolt = <500000>;
74				regulator-max-microvolt = <1350000>;
75				regulator-init-microvolt = <900000>;
76				regulator-ramp-delay = <6001>;
77				regulator-initial-mode = <0x2>;
78				regulator-name = "vdd_logic";
79				regulator-state-mem {
80					regulator-off-in-suspend;
81					regulator-suspend-microvolt = <900000>;
82				};
83			};
84
85			vdd_cpu: DCDC_REG2 {
86				regulator-always-on;
87				regulator-boot-on;
88				regulator-min-microvolt = <500000>;
89				regulator-max-microvolt = <1350000>;
90				regulator-init-microvolt = <900000>;
91				regulator-ramp-delay = <6001>;
92				regulator-initial-mode = <0x2>;
93				regulator-name = "vdd_cpu";
94				regulator-state-mem {
95					regulator-off-in-suspend;
96				};
97			};
98
99			vcc_ddr: DCDC_REG3 {
100				regulator-always-on;
101				regulator-boot-on;
102				regulator-initial-mode = <0x2>;
103				regulator-name = "vcc_ddr";
104				regulator-state-mem {
105					regulator-on-in-suspend;
106				};
107			};
108
109			vcc_3v3: DCDC_REG4 {
110				regulator-always-on;
111				regulator-boot-on;
112				regulator-min-microvolt = <3300000>;
113				regulator-max-microvolt = <3300000>;
114				regulator-initial-mode = <0x2>;
115				regulator-name = "vcc_3v3";
116				regulator-state-mem {
117					regulator-off-in-suspend;
118				};
119			};
120
121			vcca1v8_pmu: LDO_REG1 {
122				regulator-always-on;
123				regulator-boot-on;
124				regulator-min-microvolt = <1800000>;
125				regulator-max-microvolt = <1800000>;
126				regulator-name = "vcca1v8_pmu";
127				regulator-state-mem {
128				regulator-on-in-suspend;
129					regulator-suspend-microvolt = <1800000>;
130				};
131			};
132
133			vdda_0v9: LDO_REG2 {
134				regulator-always-on;
135				regulator-boot-on;
136				regulator-min-microvolt = <900000>;
137				regulator-max-microvolt = <900000>;
138				regulator-name = "vdda_0v9";
139				regulator-state-mem {
140					regulator-off-in-suspend;
141				};
142			};
143
144			vdda0v9_pmu: LDO_REG3 {
145				regulator-always-on;
146				regulator-boot-on;
147				regulator-min-microvolt = <900000>;
148				regulator-max-microvolt = <900000>;
149				regulator-name = "vdda0v9_pmu";
150				regulator-state-mem {
151				regulator-on-in-suspend;
152					regulator-suspend-microvolt = <900000>;
153				};
154			};
155
156			vccio_acodec: LDO_REG4 {
157				regulator-always-on;
158				regulator-boot-on;
159				regulator-min-microvolt = <3000000>;
160				regulator-max-microvolt = <3000000>;
161				regulator-name = "vccio_acodec";
162				regulator-state-mem {
163					regulator-off-in-suspend;
164				};
165			};
166
167			vccio_sd: LDO_REG5 {
168				regulator-always-on;
169				regulator-boot-on;
170				regulator-min-microvolt = <1800000>;
171				regulator-max-microvolt = <3300000>;
172				regulator-name = "vccio_sd";
173				regulator-state-mem {
174					regulator-off-in-suspend;
175				};
176			};
177
178			vcc3v3_pmu: LDO_REG6 {
179				regulator-always-on;
180				regulator-boot-on;
181				regulator-min-microvolt = <3300000>;
182				regulator-max-microvolt = <3300000>;
183				regulator-name = "vcc3v3_pmu";
184				regulator-state-mem {
185					regulator-on-in-suspend;
186					regulator-suspend-microvolt = <3000000>;
187				};
188			};
189
190			vcc_1v8: LDO_REG7 {
191				regulator-always-on;
192				regulator-boot-on;
193				regulator-min-microvolt = <1800000>;
194				regulator-max-microvolt = <1800000>;
195				regulator-name = "vcc_1v8";
196				regulator-state-mem {
197					regulator-off-in-suspend;
198				};
199			};
200
201			vcc1v8_dvp: LDO_REG8 {
202				regulator-min-microvolt = <1800000>;
203				regulator-max-microvolt = <1800000>;
204				regulator-name = "vcc1v8_dvp";
205				regulator-state-mem {
206					regulator-off-in-suspend;
207				};
208			};
209
210			vcc2v8_dvp: LDO_REG9 {
211				regulator-min-microvolt = <2800000>;
212				regulator-max-microvolt = <2800000>;
213				regulator-name = "vcc2v8_dvp";
214				regulator-state-mem {
215					regulator-off-in-suspend;
216				};
217			};
218
219			dcdc_boost: BOOST {
220				regulator-always-on;
221				regulator-boot-on;
222				regulator-min-microvolt = <4700000>;
223				regulator-max-microvolt = <5400000>;
224				regulator-name = "boost";
225				regulator-state-mem {
226					regulator-off-in-suspend;
227				};
228			};
229
230			otg_switch: OTG_SWITCH {
231				regulator-name = "otg_switch";
232				regulator-state-mem {
233					regulator-off-in-suspend;
234				};
235			};
236		};
237
238		rk817_codec: codec {
239			#sound-dai-cells = <0>;
240			compatible = "rockchip,rk817-codec";
241			clocks = <&mclkout_sai0>;
242			clock-names = "mclk";
243			assigned-clocks = <&mclkout_sai0>;
244			assigned-clock-rates = <12288000>;
245			pinctrl-names = "default";
246			pinctrl-0 = <&i2s0m0_mclk>;
247			hp-volume = <20>;
248			spk-volume = <3>;
249			mic-in-differential;
250			status = "okay";
251		};
252	};
253};
254