18c2ecf20Sopenharmony_ciRK8XX Power Management Integrated Circuit
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciThe rk8xx family current members:
48c2ecf20Sopenharmony_cirk805
58c2ecf20Sopenharmony_cirk808
68c2ecf20Sopenharmony_cirk809
78c2ecf20Sopenharmony_cirk817
88c2ecf20Sopenharmony_cirk818
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ciRequired properties:
118c2ecf20Sopenharmony_ci- compatible: "rockchip,rk805"
128c2ecf20Sopenharmony_ci- compatible: "rockchip,rk808"
138c2ecf20Sopenharmony_ci- compatible: "rockchip,rk809"
148c2ecf20Sopenharmony_ci- compatible: "rockchip,rk817"
158c2ecf20Sopenharmony_ci- compatible: "rockchip,rk818"
168c2ecf20Sopenharmony_ci- reg: I2C slave address
178c2ecf20Sopenharmony_ci- interrupts: the interrupt outputs of the controller.
188c2ecf20Sopenharmony_ci- #clock-cells: from common clock binding; shall be set to 1 (multiple clock
198c2ecf20Sopenharmony_ci  outputs). See <dt-bindings/clock/rockchip,rk808.h> for clock IDs.
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ciOptional properties:
228c2ecf20Sopenharmony_ci- clock-output-names: From common clock binding to override the
238c2ecf20Sopenharmony_ci  default output clock name
248c2ecf20Sopenharmony_ci- rockchip,system-power-controller: Telling whether or not this pmic is controlling
258c2ecf20Sopenharmony_ci  the system power.
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ciOptional RK805 properties:
288c2ecf20Sopenharmony_ci- vcc1-supply:  The input supply for DCDC_REG1
298c2ecf20Sopenharmony_ci- vcc2-supply:  The input supply for DCDC_REG2
308c2ecf20Sopenharmony_ci- vcc3-supply:  The input supply for DCDC_REG3
318c2ecf20Sopenharmony_ci- vcc4-supply:  The input supply for DCDC_REG4
328c2ecf20Sopenharmony_ci- vcc5-supply:  The input supply for LDO_REG1 and LDO_REG2
338c2ecf20Sopenharmony_ci- vcc6-supply:  The input supply for LDO_REG3
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ciOptional RK808 properties:
368c2ecf20Sopenharmony_ci- vcc1-supply:  The input supply for DCDC_REG1
378c2ecf20Sopenharmony_ci- vcc2-supply:  The input supply for DCDC_REG2
388c2ecf20Sopenharmony_ci- vcc3-supply:  The input supply for DCDC_REG3
398c2ecf20Sopenharmony_ci- vcc4-supply:  The input supply for DCDC_REG4
408c2ecf20Sopenharmony_ci- vcc6-supply:  The input supply for LDO_REG1 and LDO_REG2
418c2ecf20Sopenharmony_ci- vcc7-supply:  The input supply for LDO_REG3 and LDO_REG7
428c2ecf20Sopenharmony_ci- vcc8-supply:  The input supply for SWITCH_REG1
438c2ecf20Sopenharmony_ci- vcc9-supply:  The input supply for LDO_REG4 and LDO_REG5
448c2ecf20Sopenharmony_ci- vcc10-supply: The input supply for LDO_REG6
458c2ecf20Sopenharmony_ci- vcc11-supply: The input supply for LDO_REG8
468c2ecf20Sopenharmony_ci- vcc12-supply: The input supply for SWITCH_REG2
478c2ecf20Sopenharmony_ci- dvs-gpios:  buck1/2 can be controlled by gpio dvs, this is GPIO specifiers
488c2ecf20Sopenharmony_ci  for 2 host gpio's used for dvs. The format of the gpio specifier depends in
498c2ecf20Sopenharmony_ci  the gpio controller. If DVS GPIOs aren't present, voltage changes will happen
508c2ecf20Sopenharmony_ci  very quickly with no slow ramp time.
518c2ecf20Sopenharmony_ci
528c2ecf20Sopenharmony_ciOptional shared RK809 and RK817 properties:
538c2ecf20Sopenharmony_ci- vcc1-supply:  The input supply for DCDC_REG1
548c2ecf20Sopenharmony_ci- vcc2-supply:  The input supply for DCDC_REG2
558c2ecf20Sopenharmony_ci- vcc3-supply:  The input supply for DCDC_REG3
568c2ecf20Sopenharmony_ci- vcc4-supply:  The input supply for DCDC_REG4
578c2ecf20Sopenharmony_ci- vcc5-supply:  The input supply for LDO_REG1, LDO_REG2, LDO_REG3
588c2ecf20Sopenharmony_ci- vcc6-supply:  The input supply for LDO_REG4, LDO_REG5, LDO_REG6
598c2ecf20Sopenharmony_ci- vcc7-supply:  The input supply for LDO_REG7, LDO_REG8, LDO_REG9
608c2ecf20Sopenharmony_ci
618c2ecf20Sopenharmony_ciOptional RK809 properties:
628c2ecf20Sopenharmony_ci- vcc8-supply:  The input supply for SWITCH_REG1
638c2ecf20Sopenharmony_ci- vcc9-supply:  The input supply for DCDC_REG5, SWITCH_REG2
648c2ecf20Sopenharmony_ci
658c2ecf20Sopenharmony_ciOptional RK817 properties:
668c2ecf20Sopenharmony_ci- vcc8-supply:  The input supply for BOOST
678c2ecf20Sopenharmony_ci- vcc9-supply:  The input supply for OTG_SWITCH
688c2ecf20Sopenharmony_ci
698c2ecf20Sopenharmony_ciOptional RK818 properties:
708c2ecf20Sopenharmony_ci- vcc1-supply:  The input supply for DCDC_REG1
718c2ecf20Sopenharmony_ci- vcc2-supply:  The input supply for DCDC_REG2
728c2ecf20Sopenharmony_ci- vcc3-supply:  The input supply for DCDC_REG3
738c2ecf20Sopenharmony_ci- vcc4-supply:  The input supply for DCDC_REG4
748c2ecf20Sopenharmony_ci- boost-supply: The input supply for DCDC_BOOST
758c2ecf20Sopenharmony_ci- vcc6-supply:  The input supply for LDO_REG1 and LDO_REG2
768c2ecf20Sopenharmony_ci- vcc7-supply:  The input supply for LDO_REG3, LDO_REG5 and LDO_REG7
778c2ecf20Sopenharmony_ci- vcc8-supply:  The input supply for LDO_REG4, LDO_REG6 and LDO_REG8
788c2ecf20Sopenharmony_ci- vcc9-supply:  The input supply for LDO_REG9 and SWITCH_REG
798c2ecf20Sopenharmony_ci- h_5v-supply:  The input supply for HDMI_SWITCH
808c2ecf20Sopenharmony_ci- usb-supply:   The input supply for OTG_SWITCH
818c2ecf20Sopenharmony_ci
828c2ecf20Sopenharmony_ciRegulators: All the regulators of RK8XX to be instantiated shall be
838c2ecf20Sopenharmony_cilisted in a child node named 'regulators'. Each regulator is represented
848c2ecf20Sopenharmony_ciby a child node of the 'regulators' node.
858c2ecf20Sopenharmony_ci
868c2ecf20Sopenharmony_ci	regulator-name {
878c2ecf20Sopenharmony_ci		/* standard regulator bindings here */
888c2ecf20Sopenharmony_ci	};
898c2ecf20Sopenharmony_ci
908c2ecf20Sopenharmony_ciFollowing regulators of the RK805 PMIC regulators are supported. Note that
918c2ecf20Sopenharmony_cithe 'n' in regulator name, as in DCDC_REGn or LDOn, represents the DCDC or LDO
928c2ecf20Sopenharmony_cinumber as described in RK805 datasheet.
938c2ecf20Sopenharmony_ci
948c2ecf20Sopenharmony_ci	- DCDC_REGn
958c2ecf20Sopenharmony_ci		- valid values for n are 1 to 4.
968c2ecf20Sopenharmony_ci	- LDO_REGn
978c2ecf20Sopenharmony_ci		- valid values for n are 1 to 3
988c2ecf20Sopenharmony_ci
998c2ecf20Sopenharmony_ciFollowing regulators of the RK808 PMIC block are supported. Note that
1008c2ecf20Sopenharmony_cithe 'n' in regulator name, as in DCDC_REGn or LDOn, represents the DCDC or LDO
1018c2ecf20Sopenharmony_cinumber as described in RK808 datasheet.
1028c2ecf20Sopenharmony_ci
1038c2ecf20Sopenharmony_ci	- DCDC_REGn
1048c2ecf20Sopenharmony_ci		- valid values for n are 1 to 4.
1058c2ecf20Sopenharmony_ci	- LDO_REGn
1068c2ecf20Sopenharmony_ci		- valid values for n are 1 to 8.
1078c2ecf20Sopenharmony_ci	- SWITCH_REGn
1088c2ecf20Sopenharmony_ci		- valid values for n are 1 to 2
1098c2ecf20Sopenharmony_ci
1108c2ecf20Sopenharmony_ciFollowing regulators of the RK809 and RK817 PMIC blocks are supported. Note that
1118c2ecf20Sopenharmony_cithe 'n' in regulator name, as in DCDC_REGn or LDOn, represents the DCDC or LDO
1128c2ecf20Sopenharmony_cinumber as described in RK809 and RK817 datasheets.
1138c2ecf20Sopenharmony_ci
1148c2ecf20Sopenharmony_ci	- DCDC_REGn
1158c2ecf20Sopenharmony_ci		- valid values for n are 1 to 5 for RK809.
1168c2ecf20Sopenharmony_ci		- valid values for n are 1 to 4 for RK817.
1178c2ecf20Sopenharmony_ci	- LDO_REGn
1188c2ecf20Sopenharmony_ci		- valid values for n are 1 to 9 for RK809.
1198c2ecf20Sopenharmony_ci		- valid values for n are 1 to 9 for RK817.
1208c2ecf20Sopenharmony_ci	- SWITCH_REGn
1218c2ecf20Sopenharmony_ci		- valid values for n are 1 to 2 for RK809.
1228c2ecf20Sopenharmony_ci	- BOOST for RK817
1238c2ecf20Sopenharmony_ci	- OTG_SWITCH for RK817
1248c2ecf20Sopenharmony_ci
1258c2ecf20Sopenharmony_ciFollowing regulators of the RK818 PMIC block are supported. Note that
1268c2ecf20Sopenharmony_cithe 'n' in regulator name, as in DCDC_REGn or LDOn, represents the DCDC or LDO
1278c2ecf20Sopenharmony_cinumber as described in RK818 datasheet.
1288c2ecf20Sopenharmony_ci
1298c2ecf20Sopenharmony_ci	- DCDC_REGn
1308c2ecf20Sopenharmony_ci		- valid values for n are 1 to 4.
1318c2ecf20Sopenharmony_ci	- LDO_REGn
1328c2ecf20Sopenharmony_ci		- valid values for n are 1 to 9.
1338c2ecf20Sopenharmony_ci	- SWITCH_REG
1348c2ecf20Sopenharmony_ci	- HDMI_SWITCH
1358c2ecf20Sopenharmony_ci	- OTG_SWITCH
1368c2ecf20Sopenharmony_ci
1378c2ecf20Sopenharmony_ciIt is necessary to configure three pins for both the RK809 and RK817, the three
1388c2ecf20Sopenharmony_cipins are "gpio_ts" "gpio_gt" "gpio_slp".
1398c2ecf20Sopenharmony_ci	The gpio_gt and gpio_ts pins support the gpio function.
1408c2ecf20Sopenharmony_ci	The gpio_slp pin is for controlling the pmic states, as below:
1418c2ecf20Sopenharmony_ci		- reset
1428c2ecf20Sopenharmony_ci		- power down
1438c2ecf20Sopenharmony_ci		- sleep
1448c2ecf20Sopenharmony_ci
1458c2ecf20Sopenharmony_ciStandard regulator bindings are used inside regulator subnodes. Check
1468c2ecf20Sopenharmony_ci  Documentation/devicetree/bindings/regulator/regulator.txt
1478c2ecf20Sopenharmony_cifor more details
1488c2ecf20Sopenharmony_ci
1498c2ecf20Sopenharmony_ciExample:
1508c2ecf20Sopenharmony_ci	rk808: pmic@1b {
1518c2ecf20Sopenharmony_ci		compatible = "rockchip,rk808";
1528c2ecf20Sopenharmony_ci		clock-output-names = "xin32k", "rk808-clkout2";
1538c2ecf20Sopenharmony_ci		interrupt-parent = <&gpio0>;
1548c2ecf20Sopenharmony_ci		interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
1558c2ecf20Sopenharmony_ci		pinctrl-names = "default";
1568c2ecf20Sopenharmony_ci		pinctrl-0 = <&pmic_int &dvs_1 &dvs_2>;
1578c2ecf20Sopenharmony_ci		dvs-gpios = <&gpio7 11 GPIO_ACTIVE_HIGH>,
1588c2ecf20Sopenharmony_ci			    <&gpio7 15 GPIO_ACTIVE_HIGH>;
1598c2ecf20Sopenharmony_ci		reg = <0x1b>;
1608c2ecf20Sopenharmony_ci		rockchip,system-power-controller;
1618c2ecf20Sopenharmony_ci		wakeup-source;
1628c2ecf20Sopenharmony_ci		#clock-cells = <1>;
1638c2ecf20Sopenharmony_ci
1648c2ecf20Sopenharmony_ci		vcc8-supply = <&vcc_18>;
1658c2ecf20Sopenharmony_ci		vcc9-supply = <&vcc_io>;
1668c2ecf20Sopenharmony_ci		vcc10-supply = <&vcc_io>;
1678c2ecf20Sopenharmony_ci		vcc12-supply = <&vcc_io>;
1688c2ecf20Sopenharmony_ci		vddio-supply = <&vccio_pmu>;
1698c2ecf20Sopenharmony_ci
1708c2ecf20Sopenharmony_ci		regulators {
1718c2ecf20Sopenharmony_ci			vdd_cpu: DCDC_REG1 {
1728c2ecf20Sopenharmony_ci				regulator-always-on;
1738c2ecf20Sopenharmony_ci				regulator-boot-on;
1748c2ecf20Sopenharmony_ci				regulator-min-microvolt = <750000>;
1758c2ecf20Sopenharmony_ci				regulator-max-microvolt = <1300000>;
1768c2ecf20Sopenharmony_ci				regulator-name = "vdd_arm";
1778c2ecf20Sopenharmony_ci			};
1788c2ecf20Sopenharmony_ci
1798c2ecf20Sopenharmony_ci			vdd_gpu: DCDC_REG2 {
1808c2ecf20Sopenharmony_ci				regulator-always-on;
1818c2ecf20Sopenharmony_ci				regulator-boot-on;
1828c2ecf20Sopenharmony_ci				regulator-min-microvolt = <850000>;
1838c2ecf20Sopenharmony_ci				regulator-max-microvolt = <1250000>;
1848c2ecf20Sopenharmony_ci				regulator-name = "vdd_gpu";
1858c2ecf20Sopenharmony_ci			};
1868c2ecf20Sopenharmony_ci
1878c2ecf20Sopenharmony_ci			vcc_ddr: DCDC_REG3 {
1888c2ecf20Sopenharmony_ci				regulator-always-on;
1898c2ecf20Sopenharmony_ci				regulator-boot-on;
1908c2ecf20Sopenharmony_ci				regulator-name = "vcc_ddr";
1918c2ecf20Sopenharmony_ci			};
1928c2ecf20Sopenharmony_ci
1938c2ecf20Sopenharmony_ci			vcc_io: DCDC_REG4 {
1948c2ecf20Sopenharmony_ci				regulator-always-on;
1958c2ecf20Sopenharmony_ci				regulator-boot-on;
1968c2ecf20Sopenharmony_ci				regulator-min-microvolt = <3300000>;
1978c2ecf20Sopenharmony_ci				regulator-max-microvolt = <3300000>;
1988c2ecf20Sopenharmony_ci				regulator-name = "vcc_io";
1998c2ecf20Sopenharmony_ci			};
2008c2ecf20Sopenharmony_ci
2018c2ecf20Sopenharmony_ci			vccio_pmu: LDO_REG1 {
2028c2ecf20Sopenharmony_ci				regulator-always-on;
2038c2ecf20Sopenharmony_ci				regulator-boot-on;
2048c2ecf20Sopenharmony_ci				regulator-min-microvolt = <3300000>;
2058c2ecf20Sopenharmony_ci				regulator-max-microvolt = <3300000>;
2068c2ecf20Sopenharmony_ci				regulator-name = "vccio_pmu";
2078c2ecf20Sopenharmony_ci			};
2088c2ecf20Sopenharmony_ci
2098c2ecf20Sopenharmony_ci			vcc_tp: LDO_REG2 {
2108c2ecf20Sopenharmony_ci				regulator-always-on;
2118c2ecf20Sopenharmony_ci				regulator-boot-on;
2128c2ecf20Sopenharmony_ci				regulator-min-microvolt = <3300000>;
2138c2ecf20Sopenharmony_ci				regulator-max-microvolt = <3300000>;
2148c2ecf20Sopenharmony_ci				regulator-name = "vcc_tp";
2158c2ecf20Sopenharmony_ci			};
2168c2ecf20Sopenharmony_ci
2178c2ecf20Sopenharmony_ci			vdd_10: LDO_REG3 {
2188c2ecf20Sopenharmony_ci				regulator-always-on;
2198c2ecf20Sopenharmony_ci				regulator-boot-on;
2208c2ecf20Sopenharmony_ci				regulator-min-microvolt = <1000000>;
2218c2ecf20Sopenharmony_ci				regulator-max-microvolt = <1000000>;
2228c2ecf20Sopenharmony_ci				regulator-name = "vdd_10";
2238c2ecf20Sopenharmony_ci			};
2248c2ecf20Sopenharmony_ci
2258c2ecf20Sopenharmony_ci			vcc18_lcd: LDO_REG4 {
2268c2ecf20Sopenharmony_ci				regulator-always-on;
2278c2ecf20Sopenharmony_ci				regulator-boot-on;
2288c2ecf20Sopenharmony_ci				regulator-min-microvolt = <1800000>;
2298c2ecf20Sopenharmony_ci				regulator-max-microvolt = <1800000>;
2308c2ecf20Sopenharmony_ci				regulator-name = "vcc18_lcd";
2318c2ecf20Sopenharmony_ci			};
2328c2ecf20Sopenharmony_ci
2338c2ecf20Sopenharmony_ci			vccio_sd: LDO_REG5 {
2348c2ecf20Sopenharmony_ci				regulator-always-on;
2358c2ecf20Sopenharmony_ci				regulator-boot-on;
2368c2ecf20Sopenharmony_ci				regulator-min-microvolt = <1800000>;
2378c2ecf20Sopenharmony_ci				regulator-max-microvolt = <3300000>;
2388c2ecf20Sopenharmony_ci				regulator-name = "vccio_sd";
2398c2ecf20Sopenharmony_ci			};
2408c2ecf20Sopenharmony_ci
2418c2ecf20Sopenharmony_ci			vdd10_lcd: LDO_REG6 {
2428c2ecf20Sopenharmony_ci				regulator-always-on;
2438c2ecf20Sopenharmony_ci				regulator-boot-on;
2448c2ecf20Sopenharmony_ci				regulator-min-microvolt = <1000000>;
2458c2ecf20Sopenharmony_ci				regulator-max-microvolt = <1000000>;
2468c2ecf20Sopenharmony_ci				regulator-name = "vdd10_lcd";
2478c2ecf20Sopenharmony_ci			};
2488c2ecf20Sopenharmony_ci
2498c2ecf20Sopenharmony_ci			vcc_18: LDO_REG7 {
2508c2ecf20Sopenharmony_ci				regulator-always-on;
2518c2ecf20Sopenharmony_ci				regulator-boot-on;
2528c2ecf20Sopenharmony_ci				regulator-min-microvolt = <1800000>;
2538c2ecf20Sopenharmony_ci				regulator-max-microvolt = <1800000>;
2548c2ecf20Sopenharmony_ci				regulator-name = "vcc_18";
2558c2ecf20Sopenharmony_ci			};
2568c2ecf20Sopenharmony_ci
2578c2ecf20Sopenharmony_ci			vcca_codec: LDO_REG8 {
2588c2ecf20Sopenharmony_ci				regulator-always-on;
2598c2ecf20Sopenharmony_ci				regulator-boot-on;
2608c2ecf20Sopenharmony_ci				regulator-min-microvolt = <3300000>;
2618c2ecf20Sopenharmony_ci				regulator-max-microvolt = <3300000>;
2628c2ecf20Sopenharmony_ci				regulator-name = "vcca_codec";
2638c2ecf20Sopenharmony_ci			};
2648c2ecf20Sopenharmony_ci
2658c2ecf20Sopenharmony_ci			vcc_wl: SWITCH_REG1 {
2668c2ecf20Sopenharmony_ci				regulator-always-on;
2678c2ecf20Sopenharmony_ci				regulator-boot-on;
2688c2ecf20Sopenharmony_ci				regulator-name = "vcc_wl";
2698c2ecf20Sopenharmony_ci			};
2708c2ecf20Sopenharmony_ci
2718c2ecf20Sopenharmony_ci			vcc_lcd: SWITCH_REG2 {
2728c2ecf20Sopenharmony_ci				regulator-always-on;
2738c2ecf20Sopenharmony_ci				regulator-boot-on;
2748c2ecf20Sopenharmony_ci				regulator-name = "vcc_lcd";
2758c2ecf20Sopenharmony_ci			};
2768c2ecf20Sopenharmony_ci		};
2778c2ecf20Sopenharmony_ci	};
278