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 rk809: pmic@20 { 14 compatible = "rockchip,rk809"; 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 /* not save the PMIC_POWER_EN register in uboot */ 32 not-save-power-en = <1>; 33 34 vcc1-supply = <&vcc3v3_sys>; 35 vcc2-supply = <&vcc3v3_sys>; 36 vcc3-supply = <&vcc3v3_sys>; 37 vcc4-supply = <&vcc3v3_sys>; 38 vcc5-supply = <&vcc3v3_sys>; 39 vcc6-supply = <&vcc3v3_sys>; 40 vcc7-supply = <&vcc3v3_sys>; 41 vcc8-supply = <&vcc3v3_sys>; 42 vcc9-supply = <&vcc3v3_sys>; 43 44 pwrkey { 45 status = "okay"; 46 }; 47 48 pinctrl_rk8xx: pinctrl_rk8xx { 49 gpio-controller; 50 #gpio-cells = <2>; 51 52 rk817_slppin_null: rk817_slppin_null { 53 pins = "gpio_slp"; 54 function = "pin_fun0"; 55 }; 56 57 rk817_slppin_slp: rk817_slppin_slp { 58 pins = "gpio_slp"; 59 function = "pin_fun1"; 60 }; 61 62 rk817_slppin_pwrdn: rk817_slppin_pwrdn { 63 pins = "gpio_slp"; 64 function = "pin_fun2"; 65 }; 66 67 rk817_slppin_rst: rk817_slppin_rst { 68 pins = "gpio_slp"; 69 function = "pin_fun3"; 70 }; 71 }; 72 73 regulators { 74 vdd_logic: DCDC_REG1 { 75 regulator-always-on; 76 regulator-boot-on; 77 regulator-min-microvolt = <500000>; 78 regulator-max-microvolt = <1350000>; 79 regulator-init-microvolt = <900000>; 80 regulator-ramp-delay = <6001>; 81 regulator-initial-mode = <0x2>; 82 regulator-name = "vdd_logic"; 83 regulator-state-mem { 84 regulator-off-in-suspend; 85 }; 86 }; 87 88 vdd_cpu: DCDC_REG2 { 89 regulator-always-on; 90 regulator-boot-on; 91 regulator-min-microvolt = <500000>; 92 regulator-max-microvolt = <1350000>; 93 regulator-init-microvolt = <900000>; 94 regulator-ramp-delay = <6001>; 95 regulator-initial-mode = <0x2>; 96 regulator-name = "vdd_cpu"; 97 regulator-state-mem { 98 regulator-off-in-suspend; 99 }; 100 }; 101 102 vcc_ddr: DCDC_REG3 { 103 regulator-always-on; 104 regulator-boot-on; 105 regulator-initial-mode = <0x2>; 106 regulator-name = "vcc_ddr"; 107 regulator-state-mem { 108 regulator-on-in-suspend; 109 }; 110 }; 111 112 vdd_gpu: DCDC_REG4 { 113 regulator-always-on; 114 regulator-boot-on; 115 regulator-min-microvolt = <500000>; 116 regulator-max-microvolt = <1350000>; 117 regulator-init-microvolt = <900000>; 118 regulator-ramp-delay = <6001>; 119 regulator-initial-mode = <0x2>; 120 regulator-name = "vdd_gpu"; 121 regulator-state-mem { 122 regulator-off-in-suspend; 123 }; 124 }; 125 126 vcc2v8_dvp: LDO_REG1 { 127 regulator-min-microvolt = <2800000>; 128 regulator-max-microvolt = <2800000>; 129 regulator-name = "vcc2v8_dvp"; 130 regulator-state-mem { 131 regulator-off-in-suspend; 132 }; 133 }; 134 135 vdda_0v9: LDO_REG2 { 136 regulator-always-on; 137 regulator-boot-on; 138 regulator-min-microvolt = <900000>; 139 regulator-max-microvolt = <900000>; 140 regulator-name = "vdda_0v9"; 141 regulator-state-mem { 142 regulator-off-in-suspend; 143 }; 144 }; 145 146 vdda0v9_pmu: LDO_REG3 { 147 regulator-always-on; 148 regulator-boot-on; 149 regulator-min-microvolt = <900000>; 150 regulator-max-microvolt = <900000>; 151 regulator-name = "vdda0v9_pmu"; 152 regulator-state-mem { 153 regulator-on-in-suspend; 154 regulator-suspend-microvolt = <900000>; 155 }; 156 }; 157 158 vccio_acodec: LDO_REG4 { 159 regulator-always-on; 160 regulator-boot-on; 161 regulator-min-microvolt = <3000000>; 162 regulator-max-microvolt = <3000000>; 163 regulator-name = "vccio_acodec"; 164 regulator-state-mem { 165 regulator-off-in-suspend; 166 }; 167 }; 168 169 vccio_sd: LDO_REG5 { 170 regulator-always-on; 171 regulator-boot-on; 172 regulator-min-microvolt = <1800000>; 173 regulator-max-microvolt = <3300000>; 174 regulator-name = "vccio_sd"; 175 regulator-state-mem { 176 regulator-off-in-suspend; 177 }; 178 }; 179 180 vcc3v3_pmu: LDO_REG6 { 181 regulator-always-on; 182 regulator-boot-on; 183 regulator-min-microvolt = <3300000>; 184 regulator-max-microvolt = <3300000>; 185 regulator-name = "vcc3v3_pmu"; 186 regulator-state-mem { 187 regulator-on-in-suspend; 188 regulator-suspend-microvolt = <3300000>; 189 }; 190 }; 191 192 vcca_1v8: LDO_REG7 { 193 regulator-always-on; 194 regulator-boot-on; 195 regulator-min-microvolt = <1800000>; 196 regulator-max-microvolt = <1800000>; 197 regulator-name = "vcca_1v8"; 198 regulator-state-mem { 199 regulator-off-in-suspend; 200 }; 201 }; 202 203 vcca1v8_pmu: LDO_REG8 { 204 regulator-always-on; 205 regulator-boot-on; 206 regulator-min-microvolt = <1800000>; 207 regulator-max-microvolt = <1800000>; 208 regulator-name = "vcca1v8_pmu"; 209 regulator-state-mem { 210 regulator-on-in-suspend; 211 regulator-suspend-microvolt = <1800000>; 212 }; 213 }; 214 215 vcc1v8_dvp: LDO_REG9 { 216 regulator-min-microvolt = <1800000>; 217 regulator-max-microvolt = <1800000>; 218 regulator-name = "vcc1v8_dvp"; 219 regulator-state-mem { 220 regulator-off-in-suspend; 221 }; 222 }; 223 224 vcc_1v8: DCDC_REG5 { 225 regulator-always-on; 226 regulator-boot-on; 227 regulator-min-microvolt = <1800000>; 228 regulator-max-microvolt = <1800000>; 229 regulator-name = "vcc_1v8"; 230 regulator-state-mem { 231 regulator-off-in-suspend; 232 }; 233 }; 234 235 vcc_3v3: SWITCH_REG1 { 236 regulator-always-on; 237 regulator-boot-on; 238 regulator-name = "vcc_3v3"; 239 regulator-state-mem { 240 regulator-off-in-suspend; 241 }; 242 }; 243 244 vcc3v3_sd: SWITCH_REG2 { 245 regulator-always-on; 246 regulator-boot-on; 247 regulator-name = "vcc3v3_sd"; 248 regulator-state-mem { 249 regulator-off-in-suspend; 250 }; 251 }; 252 }; 253 254 rk809_codec: codec { 255 #sound-dai-cells = <1>; 256 compatible = "rockchip,rk809-codec", "rockchip,rk817-codec"; 257 clocks = <&mclkout_sai0>; 258 clock-names = "mclk"; 259 assigned-clocks = <&mclkout_sai0>; 260 assigned-clock-rates = <12288000>; 261 pinctrl-names = "default"; 262 pinctrl-0 = <&i2s0m0_mclk>; 263 hp-volume = <20>; 264 spk-volume = <3>; 265 mic-in-differential; 266 status = "okay"; 267 }; 268 }; 269}; 270