1*4882a593SmuzhiyunRK817 Power Management Integrated Circuit 2*4882a593Smuzhiyun 3*4882a593SmuzhiyunRequired properties: 4*4882a593Smuzhiyun- compatible: "rockchip,rk817" 5*4882a593Smuzhiyun- reg: I2C slave address 6*4882a593Smuzhiyun- interrupt-parent: The parent interrupt controller. 7*4882a593Smuzhiyun- interrupts: the interrupt outputs of the controller. 8*4882a593Smuzhiyun- #clock-cells: from common clock binding; shall be set to 1 (multiple clock 9*4882a593Smuzhiyun outputs). See <dt-bindings/clock/rockchip,rk808.h> for clock IDs. 10*4882a593Smuzhiyun 11*4882a593SmuzhiyunOptional properties: 12*4882a593Smuzhiyun- clock-output-names: From common clock binding to override the 13*4882a593Smuzhiyun default output clock name 14*4882a593Smuzhiyun- rockchip,system-power-controller: Telling whether or not this pmic is controlling 15*4882a593Smuzhiyun the system power. 16*4882a593Smuzhiyun- vcc1-supply: The input supply for DCDC_REG1 17*4882a593Smuzhiyun- vcc2-supply: The input supply for DCDC_REG2 18*4882a593Smuzhiyun- vcc3-supply: The input supply for DCDC_REG3 19*4882a593Smuzhiyun- vcc4-supply: The input supply for DCDC_REG4 20*4882a593Smuzhiyun- vcc5-supply: The input supply for LDO_REG1, LDO_REG2, LDO_REG3 21*4882a593Smuzhiyun- vcc6-supply: The input supply for LDO_REG4, LDO_REG5, LDO_REG6 22*4882a593Smuzhiyun- vcc7-supply: The input supply for LDO_REG7, LDO_REG8, LDO_REG9 23*4882a593Smuzhiyun- vcc8-supply: The input supply for BOOST 24*4882a593Smuzhiyun- vcc9-supply: The input supply for OTG_SWITCH 25*4882a593Smuzhiyun 26*4882a593SmuzhiyunRegulators: All the regulators of RK817 to be instantiated shall be 27*4882a593Smuzhiyunlisted in a child node named 'regulators'. Each regulator is represented 28*4882a593Smuzhiyunby a child node of the 'regulators' node. 29*4882a593Smuzhiyun 30*4882a593Smuzhiyun regulator-name { 31*4882a593Smuzhiyun /* standard regulator bindings here */ 32*4882a593Smuzhiyun }; 33*4882a593Smuzhiyun 34*4882a593SmuzhiyunFollowing regulators of the RK817 PMIC block are supported. Note that 35*4882a593Smuzhiyunthe 'n' in regulator name, as in DCDC_REGn or LDOn, represents the DCDC or LDO 36*4882a593Smuzhiyunnumber as described in RK808 datasheet. 37*4882a593Smuzhiyun 38*4882a593Smuzhiyun - DCDC_REGn 39*4882a593Smuzhiyun - valid values for n are 1 to 4. 40*4882a593Smuzhiyun - LDO_REGn 41*4882a593Smuzhiyun - valid values for n are 1 to 9. 42*4882a593Smuzhiyun 43*4882a593SmuzhiyunThere are three pins needed config, named "gpio_ts" "gpio_gt" "gpio_slp". 44*4882a593Smuzhiyun The gpio_gt and gpio_ts pins support the gpio function. 45*4882a593Smuzhiyun For using a gpio function, dtsi need the following info: 46*4882a593Smuzhiyun pinctrl-names = "default"; 47*4882a593Smuzhiyun pinctrl-0 = <&rk817_ts_gpio1>, <&rk817_gt_gpio2>; 48*4882a593Smuzhiyun gpios = <&pinctrl_rk8xx 1 GPIO_ACTIVE_HIGH>, 49*4882a593Smuzhiyun <&pinctrl_rk8xx 2 GPIO_ACTIVE_HIGH>; 50*4882a593Smuzhiyun The gpio_slp pin is for controlling the pmic states, as below: 51*4882a593Smuzhiyun reset 52*4882a593Smuzhiyun power down 53*4882a593Smuzhiyun sleep 54*4882a593Smuzhiyun 55*4882a593SmuzhiyunStandard regulator bindings are used inside regulator subnodes. Check 56*4882a593Smuzhiyun Documentation/devicetree/bindings/regulator/regulator.txt 57*4882a593Smuzhiyunfor more details 58*4882a593Smuzhiyun 59*4882a593SmuzhiyunExample: 60*4882a593Smuzhiyun rk817: pmic@20 { 61*4882a593Smuzhiyun compatible = "rockchip,rk817"; 62*4882a593Smuzhiyun reg = <0x20>; 63*4882a593Smuzhiyun interrupt-parent = <&gpio0>; 64*4882a593Smuzhiyun interrupts = <7 IRQ_TYPE_LEVEL_LOW>; 65*4882a593Smuzhiyun pinctrl-names = "default", "pmic-sleep", 66*4882a593Smuzhiyun "pmic-power-off", "pmic-reset"; 67*4882a593Smuzhiyun pinctrl-0 = <&pmic_int>; 68*4882a593Smuzhiyun pinctrl-1 = <&soc_slppin_slp>, <&rk817_slppin_slp>; 69*4882a593Smuzhiyun pinctrl-2 = <&soc_slppin_gpio>, <&rk817_slppin_pwrdn>; 70*4882a593Smuzhiyun pinctrl-3 = <&soc_slppin_rst>, <&rk817_slppin_rst>; 71*4882a593Smuzhiyun rockchip,system-power-controller; 72*4882a593Smuzhiyun wakeup-source; 73*4882a593Smuzhiyun #clock-cells = <1>; 74*4882a593Smuzhiyun clock-output-names = "rk808-clkout1", "rk808-clkout2"; 75*4882a593Smuzhiyun 76*4882a593Smuzhiyun vcc1-supply = <&vccsys>; 77*4882a593Smuzhiyun vcc2-supply = <&vccsys>; 78*4882a593Smuzhiyun vcc3-supply = <&vccsys>; 79*4882a593Smuzhiyun vcc4-supply = <&vccsys>; 80*4882a593Smuzhiyun vcc5-supply = <&vccsys>; 81*4882a593Smuzhiyun vcc6-supply = <&vccsys>; 82*4882a593Smuzhiyun vcc7-supply = <&vcc_3v0>; 83*4882a593Smuzhiyun vcc8-supply = <&vccsys>; 84*4882a593Smuzhiyun vcc9-supply = <&dcdc_boost>; 85*4882a593Smuzhiyun 86*4882a593Smuzhiyun pwrkey { 87*4882a593Smuzhiyun status = "okay"; 88*4882a593Smuzhiyun }; 89*4882a593Smuzhiyun 90*4882a593Smuzhiyun pinctrl_rk8xx: pinctrl_rk8xx { 91*4882a593Smuzhiyun gpio-controller; 92*4882a593Smuzhiyun #gpio-cells = <2>; 93*4882a593Smuzhiyun 94*4882a593Smuzhiyun rk817_ts_gpio1: rk817_ts_gpio1 { 95*4882a593Smuzhiyun pins = "gpio_ts"; 96*4882a593Smuzhiyun function = "pin_fun1"; 97*4882a593Smuzhiyun /* output-low; */ 98*4882a593Smuzhiyun /* input-enable; */ 99*4882a593Smuzhiyun }; 100*4882a593Smuzhiyun 101*4882a593Smuzhiyun rk817_gt_gpio2: rk817_gt_gpio2 { 102*4882a593Smuzhiyun pins = "gpio_gt"; 103*4882a593Smuzhiyun function = "pin_fun1"; 104*4882a593Smuzhiyun }; 105*4882a593Smuzhiyun 106*4882a593Smuzhiyun rk817_pin_ts: rk817_pin_ts { 107*4882a593Smuzhiyun pins = "gpio_ts"; 108*4882a593Smuzhiyun function = "pin_fun0"; 109*4882a593Smuzhiyun }; 110*4882a593Smuzhiyun 111*4882a593Smuzhiyun rk817_pin_gt: rk817_pin_gt { 112*4882a593Smuzhiyun pins = "gpio_gt"; 113*4882a593Smuzhiyun function = "pin_fun0"; 114*4882a593Smuzhiyun }; 115*4882a593Smuzhiyun 116*4882a593Smuzhiyun rk817_slppin_null: rk817_slppin_null { 117*4882a593Smuzhiyun pins = "gpio_slp"; 118*4882a593Smuzhiyun function = "pin_fun0"; 119*4882a593Smuzhiyun }; 120*4882a593Smuzhiyun 121*4882a593Smuzhiyun rk817_slppin_slp: rk817_slppin_slp { 122*4882a593Smuzhiyun pins = "gpio_slp"; 123*4882a593Smuzhiyun function = "pin_fun1"; 124*4882a593Smuzhiyun }; 125*4882a593Smuzhiyun 126*4882a593Smuzhiyun rk817_slppin_pwrdn: rk817_slppin_pwrdn { 127*4882a593Smuzhiyun pins = "gpio_slp"; 128*4882a593Smuzhiyun function = "pin_fun2"; 129*4882a593Smuzhiyun }; 130*4882a593Smuzhiyun 131*4882a593Smuzhiyun rk817_slppin_rst: rk817_slppin_rst { 132*4882a593Smuzhiyun pins = "gpio_slp"; 133*4882a593Smuzhiyun function = "pin_fun3"; 134*4882a593Smuzhiyun }; 135*4882a593Smuzhiyun }; 136*4882a593Smuzhiyun 137*4882a593Smuzhiyun regulators { 138*4882a593Smuzhiyun vdd_logic: DCDC_REG1 { 139*4882a593Smuzhiyun regulator-always-on; 140*4882a593Smuzhiyun regulator-boot-on; 141*4882a593Smuzhiyun regulator-min-microvolt = <950000>; 142*4882a593Smuzhiyun regulator-max-microvolt = <1350000>; 143*4882a593Smuzhiyun regulator-ramp-delay = <6001>; 144*4882a593Smuzhiyun regulator-initial-mode = <0x1>; 145*4882a593Smuzhiyun regulator-name = "vdd_logic"; 146*4882a593Smuzhiyun regulator-state-mem { 147*4882a593Smuzhiyun regulator-on-in-suspend; 148*4882a593Smuzhiyun regulator-suspend-microvolt = <950000>; 149*4882a593Smuzhiyun }; 150*4882a593Smuzhiyun }; 151*4882a593Smuzhiyun 152*4882a593Smuzhiyun vdd_arm: DCDC_REG2 { 153*4882a593Smuzhiyun regulator-always-on; 154*4882a593Smuzhiyun regulator-boot-on; 155*4882a593Smuzhiyun regulator-min-microvolt = <950000>; 156*4882a593Smuzhiyun regulator-max-microvolt = <1350000>; 157*4882a593Smuzhiyun regulator-ramp-delay = <6001>; 158*4882a593Smuzhiyun regulator-initial-mode = <0x1>; 159*4882a593Smuzhiyun regulator-name = "vdd_arm"; 160*4882a593Smuzhiyun regulator-state-mem { 161*4882a593Smuzhiyun regulator-off-in-suspend; 162*4882a593Smuzhiyun regulator-suspend-microvolt = <950000>; 163*4882a593Smuzhiyun }; 164*4882a593Smuzhiyun }; 165*4882a593Smuzhiyun 166*4882a593Smuzhiyun vcc_ddr: DCDC_REG3 { 167*4882a593Smuzhiyun regulator-always-on; 168*4882a593Smuzhiyun regulator-boot-on; 169*4882a593Smuzhiyun regulator-initial-mode = <0x1>; 170*4882a593Smuzhiyun regulator-name = "vcc_ddr"; 171*4882a593Smuzhiyun regulator-state-mem { 172*4882a593Smuzhiyun regulator-on-in-suspend; 173*4882a593Smuzhiyun }; 174*4882a593Smuzhiyun }; 175*4882a593Smuzhiyun 176*4882a593Smuzhiyun vcc_3v0: DCDC_REG4 { 177*4882a593Smuzhiyun regulator-always-on; 178*4882a593Smuzhiyun regulator-boot-on; 179*4882a593Smuzhiyun regulator-min-microvolt = <3000000>; 180*4882a593Smuzhiyun regulator-max-microvolt = <3000000>; 181*4882a593Smuzhiyun regulator-initial-mode = <0x1>; 182*4882a593Smuzhiyun regulator-name = "vcc_3v0"; 183*4882a593Smuzhiyun regulator-state-mem { 184*4882a593Smuzhiyun regulator-off-in-suspend; 185*4882a593Smuzhiyun regulator-suspend-microvolt = <3000000>; 186*4882a593Smuzhiyun }; 187*4882a593Smuzhiyun }; 188*4882a593Smuzhiyun 189*4882a593Smuzhiyun vcc2v5_ddr: LDO_REG1 { 190*4882a593Smuzhiyun regulator-always-on; 191*4882a593Smuzhiyun regulator-boot-on; 192*4882a593Smuzhiyun regulator-min-microvolt = <2500000>; 193*4882a593Smuzhiyun regulator-max-microvolt = <2500000>; 194*4882a593Smuzhiyun regulator-name = "vcc2v5_ddr"; 195*4882a593Smuzhiyun regulator-state-mem { 196*4882a593Smuzhiyun regulator-on-in-suspend; 197*4882a593Smuzhiyun regulator-suspend-microvolt = <2500000>; 198*4882a593Smuzhiyun }; 199*4882a593Smuzhiyun }; 200*4882a593Smuzhiyun 201*4882a593Smuzhiyun vcc1v8_soc: LDO_REG2 { 202*4882a593Smuzhiyun regulator-always-on; 203*4882a593Smuzhiyun regulator-boot-on; 204*4882a593Smuzhiyun regulator-min-microvolt = <1800000>; 205*4882a593Smuzhiyun regulator-max-microvolt = <1800000>; 206*4882a593Smuzhiyun 207*4882a593Smuzhiyun regulator-name = "vcc1v8_soc"; 208*4882a593Smuzhiyun regulator-state-mem { 209*4882a593Smuzhiyun regulator-on-in-suspend; 210*4882a593Smuzhiyun regulator-suspend-microvolt = <1800000>; 211*4882a593Smuzhiyun }; 212*4882a593Smuzhiyun }; 213*4882a593Smuzhiyun 214*4882a593Smuzhiyun vdd1v0_soc: LDO_REG3 { 215*4882a593Smuzhiyun regulator-always-on; 216*4882a593Smuzhiyun regulator-boot-on; 217*4882a593Smuzhiyun regulator-min-microvolt = <1000000>; 218*4882a593Smuzhiyun regulator-max-microvolt = <1000000>; 219*4882a593Smuzhiyun 220*4882a593Smuzhiyun regulator-name = "vcc1v0_soc"; 221*4882a593Smuzhiyun regulator-state-mem { 222*4882a593Smuzhiyun regulator-on-in-suspend; 223*4882a593Smuzhiyun regulator-suspend-microvolt = <1000000>; 224*4882a593Smuzhiyun }; 225*4882a593Smuzhiyun }; 226*4882a593Smuzhiyun 227*4882a593Smuzhiyun vcc3v0_pmu: LDO_REG4 { 228*4882a593Smuzhiyun regulator-always-on; 229*4882a593Smuzhiyun regulator-boot-on; 230*4882a593Smuzhiyun regulator-min-microvolt = <3000000>; 231*4882a593Smuzhiyun regulator-max-microvolt = <3000000>; 232*4882a593Smuzhiyun 233*4882a593Smuzhiyun regulator-name = "vcc3v0_pmu"; 234*4882a593Smuzhiyun regulator-state-mem { 235*4882a593Smuzhiyun regulator-on-in-suspend; 236*4882a593Smuzhiyun regulator-suspend-microvolt = <3000000>; 237*4882a593Smuzhiyun 238*4882a593Smuzhiyun }; 239*4882a593Smuzhiyun }; 240*4882a593Smuzhiyun 241*4882a593Smuzhiyun vccio_sd: LDO_REG5 { 242*4882a593Smuzhiyun regulator-always-on; 243*4882a593Smuzhiyun regulator-boot-on; 244*4882a593Smuzhiyun regulator-min-microvolt = <3300000>; 245*4882a593Smuzhiyun regulator-max-microvolt = <3300000>; 246*4882a593Smuzhiyun 247*4882a593Smuzhiyun regulator-name = "vccio_sd"; 248*4882a593Smuzhiyun regulator-state-mem { 249*4882a593Smuzhiyun regulator-on-in-suspend; 250*4882a593Smuzhiyun regulator-suspend-microvolt = <3300000>; 251*4882a593Smuzhiyun }; 252*4882a593Smuzhiyun }; 253*4882a593Smuzhiyun 254*4882a593Smuzhiyun vcc_sd: LDO_REG6 { 255*4882a593Smuzhiyun regulator-always-on; 256*4882a593Smuzhiyun regulator-boot-on; 257*4882a593Smuzhiyun regulator-min-microvolt = <3300000>; 258*4882a593Smuzhiyun regulator-max-microvolt = <3300000>; 259*4882a593Smuzhiyun 260*4882a593Smuzhiyun regulator-name = "vcc_sd"; 261*4882a593Smuzhiyun regulator-state-mem { 262*4882a593Smuzhiyun regulator-on-in-suspend; 263*4882a593Smuzhiyun regulator-suspend-microvolt = <3300000>; 264*4882a593Smuzhiyun 265*4882a593Smuzhiyun }; 266*4882a593Smuzhiyun }; 267*4882a593Smuzhiyun 268*4882a593Smuzhiyun vcc2v8_dvp: LDO_REG7 { 269*4882a593Smuzhiyun regulator-always-on; 270*4882a593Smuzhiyun regulator-boot-on; 271*4882a593Smuzhiyun regulator-min-microvolt = <2800000>; 272*4882a593Smuzhiyun regulator-max-microvolt = <2800000>; 273*4882a593Smuzhiyun 274*4882a593Smuzhiyun regulator-name = "vcc2v8_dvp"; 275*4882a593Smuzhiyun regulator-state-mem { 276*4882a593Smuzhiyun regulator-off-in-suspend; 277*4882a593Smuzhiyun regulator-suspend-microvolt = <2800000>; 278*4882a593Smuzhiyun }; 279*4882a593Smuzhiyun }; 280*4882a593Smuzhiyun 281*4882a593Smuzhiyun vcc1v8_dvp: LDO_REG8 { 282*4882a593Smuzhiyun regulator-always-on; 283*4882a593Smuzhiyun regulator-boot-on; 284*4882a593Smuzhiyun regulator-min-microvolt = <1800000>; 285*4882a593Smuzhiyun regulator-max-microvolt = <1800000>; 286*4882a593Smuzhiyun 287*4882a593Smuzhiyun regulator-name = "vcc1v8_dvp"; 288*4882a593Smuzhiyun regulator-state-mem { 289*4882a593Smuzhiyun regulator-on-in-suspend; 290*4882a593Smuzhiyun regulator-suspend-microvolt = <1800000>; 291*4882a593Smuzhiyun }; 292*4882a593Smuzhiyun }; 293*4882a593Smuzhiyun 294*4882a593Smuzhiyun vdd1v5_dvp: LDO_REG9 { 295*4882a593Smuzhiyun regulator-always-on; 296*4882a593Smuzhiyun regulator-boot-on; 297*4882a593Smuzhiyun regulator-min-microvolt = <1500000>; 298*4882a593Smuzhiyun regulator-max-microvolt = <1500000>; 299*4882a593Smuzhiyun 300*4882a593Smuzhiyun regulator-name = "vdd1v5_dvp"; 301*4882a593Smuzhiyun regulator-state-mem { 302*4882a593Smuzhiyun regulator-off-in-suspend; 303*4882a593Smuzhiyun regulator-suspend-microvolt = <1500000>; 304*4882a593Smuzhiyun }; 305*4882a593Smuzhiyun }; 306*4882a593Smuzhiyun 307*4882a593Smuzhiyun dcdc_boost: BOOST { 308*4882a593Smuzhiyun regulator-always-on; 309*4882a593Smuzhiyun regulator-boot-on; 310*4882a593Smuzhiyun regulator-min-microvolt = <4700000>; 311*4882a593Smuzhiyun regulator-max-microvolt = <5400000>; 312*4882a593Smuzhiyun regulator-name = "boost"; 313*4882a593Smuzhiyun }; 314*4882a593Smuzhiyun 315*4882a593Smuzhiyun otg_switch: OTG_SWITCH { 316*4882a593Smuzhiyun regulator-boot-on; 317*4882a593Smuzhiyun regulator-name = "otg_switch"; 318*4882a593Smuzhiyun }; 319*4882a593Smuzhiyun }; 320*4882a593Smuzhiyun 321*4882a593Smuzhiyun battery { 322*4882a593Smuzhiyun compatible = "rk817,battery"; 323*4882a593Smuzhiyun ocv_table = <3500 3625 3685 3697 3718 3735 3748 324*4882a593Smuzhiyun 3760 3774 3788 3802 3816 3834 3853 325*4882a593Smuzhiyun 3877 3908 3946 3975 4018 4071 4106>; 326*4882a593Smuzhiyun design_capacity = <2500>; 327*4882a593Smuzhiyun design_qmax = <2750>; 328*4882a593Smuzhiyun bat_res = <100>; 329*4882a593Smuzhiyun sleep_enter_current = <300>; 330*4882a593Smuzhiyun sleep_exit_current = <300>; 331*4882a593Smuzhiyun sleep_filter_current = <100>; 332*4882a593Smuzhiyun power_off_thresd = <3500>; 333*4882a593Smuzhiyun zero_algorithm_vol = <3850>; 334*4882a593Smuzhiyun max_soc_offset = <60>; 335*4882a593Smuzhiyun monitor_sec = <5>; 336*4882a593Smuzhiyun sample_res = <10>; 337*4882a593Smuzhiyun virtual_power = <1>; 338*4882a593Smuzhiyun }; 339*4882a593Smuzhiyun 340*4882a593Smuzhiyun charger { 341*4882a593Smuzhiyun compatible = "rk817,charger"; 342*4882a593Smuzhiyun min_input_voltage = <4500>; 343*4882a593Smuzhiyun max_input_current = <1500>; 344*4882a593Smuzhiyun max_chrg_current = <1300>; 345*4882a593Smuzhiyun max_chrg_voltage = <4200>; 346*4882a593Smuzhiyun chrg_term_mode = <1>; 347*4882a593Smuzhiyun chrg_finish_cur = <300>; 348*4882a593Smuzhiyun virtual_power = <0>; 349*4882a593Smuzhiyun dc_det_adc = <0>; 350*4882a593Smuzhiyun extcon = <&u2phy>; 351*4882a593Smuzhiyun }; 352*4882a593Smuzhiyun 353*4882a593Smuzhiyun rk817_codec: codec { 354*4882a593Smuzhiyun #sound-dai-cells = <0>; 355*4882a593Smuzhiyun compatible = "rockchip,rk817-codec"; 356*4882a593Smuzhiyun clocks = <&cru SCLK_I2S1_OUT>; 357*4882a593Smuzhiyun clock-names = "mclk"; 358*4882a593Smuzhiyun pinctrl-names = "default"; 359*4882a593Smuzhiyun pinctrl-0 = <&i2s1_2ch_mclk>; 360*4882a593Smuzhiyun hp-volume = <20>; 361*4882a593Smuzhiyun spk-volume = <3>; 362*4882a593Smuzhiyun status = "okay"; 363*4882a593Smuzhiyun }; 364*4882a593Smuzhiyun } 365