1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/mfd/sprd,sc2731.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Spreadtrum SC27xx PMIC 8 9maintainers: 10 - Orson Zhai <orsonzhai@gmail.com> 11 - Baolin Wang <baolin.wang7@gmail.com> 12 - Chunyan Zhang <zhang.lyra@gmail.com> 13 14description: | 15 Spreadtrum PMICs belonging to the SC27xx series integrate all mobile handset 16 power management, audio codec, battery management and user interface support 17 functions in a single chip. They have 6 major functional blocks: 18 - DCDCs to support CPU, memory 19 - LDOs to support both internal and external requirements 20 - Battery management system, such as charger, fuel gauge 21 - Audio codec 22 - User interface functions, such as indicator, flash LED and so on 23 - IC level interface, such as power on/off control, RTC, typec and so on 24 25properties: 26 $nodename: 27 pattern: '^pmic@[0-9a-f]+$' 28 29 compatible: 30 enum: 31 - sprd,sc2720 32 - sprd,sc2721 33 - sprd,sc2723 34 - sprd,sc2730 35 - sprd,sc2731 36 37 reg: 38 maxItems: 1 39 40 interrupts: 41 maxItems: 1 42 43 interrupt-controller: true 44 spi-max-frequency: true 45 46 '#address-cells': 47 const: 1 48 49 '#interrupt-cells': 50 const: 1 51 52 '#size-cells': 53 const: 0 54 55 regulators: 56 type: object 57 oneOf: 58 - $ref: /schemas/regulator/sprd,sc2730-regulator.yaml# 59 - $ref: /schemas/regulator/sprd,sc2731-regulator.yaml# 60 61patternProperties: 62 "^adc@[0-9a-f]+$": 63 type: object 64 $ref: /schemas/iio/adc/sprd,sc2720-adc.yaml# 65 66 "^charger@[0-9a-f]+$": 67 type: object 68 $ref: /schemas/power/supply/sc2731-charger.yaml# 69 70 "^efuse@[0-9a-f]+$": 71 type: object 72 $ref: /schemas/nvmem/sprd,sc2731-efuse.yaml# 73 74 "^fuel-gauge@[0-9a-f]+$": 75 type: object 76 $ref: /schemas/power/supply/sc27xx-fg.yaml# 77 78 "^gpio@[0-9a-f]+$": 79 type: object 80 $ref: /schemas/gpio/sprd,gpio-eic.yaml# 81 82 "^led-controller@[0-9a-f]+$": 83 type: object 84 $ref: /schemas/leds/sprd,sc2731-bltc.yaml# 85 86 "^rtc@[0-9a-f]+$": 87 type: object 88 $ref: /schemas/rtc/sprd,sc2731-rtc.yaml# 89 90 "^vibrator@[0-9a-f]+$": 91 type: object 92 $ref: /schemas/input/sprd,sc27xx-vibrator.yaml# 93 94required: 95 - compatible 96 - reg 97 - interrupts 98 - interrupt-controller 99 - spi-max-frequency 100 - '#address-cells' 101 - '#interrupt-cells' 102 - '#size-cells' 103 104additionalProperties: false 105 106examples: 107 - | 108 #include <dt-bindings/gpio/gpio.h> 109 #include <dt-bindings/interrupt-controller/arm-gic.h> 110 #include <dt-bindings/interrupt-controller/irq.h> 111 #include <dt-bindings/leds/common.h> 112 113 spi { 114 #address-cells = <1>; 115 #size-cells = <0>; 116 117 sc2731_pmic: pmic@0 { 118 compatible = "sprd,sc2731"; 119 reg = <0>; 120 interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>; 121 interrupt-controller; 122 spi-max-frequency = <26000000>; 123 #address-cells = <1>; 124 #interrupt-cells = <1>; 125 #size-cells = <0>; 126 127 charger@0 { 128 compatible = "sprd,sc2731-charger"; 129 reg = <0x0>; 130 phys = <&ssphy>; 131 monitored-battery = <&bat>; 132 }; 133 134 led-controller@200 { 135 compatible = "sprd,sc2731-bltc"; 136 reg = <0x200>; 137 #address-cells = <1>; 138 #size-cells = <0>; 139 140 led@0 { 141 reg = <0x0>; 142 color = <LED_COLOR_ID_RED>; 143 }; 144 145 led@1 { 146 reg = <0x1>; 147 color = <LED_COLOR_ID_GREEN>; 148 }; 149 150 led@2 { 151 reg = <0x2>; 152 color = <LED_COLOR_ID_BLUE>; 153 }; 154 }; 155 156 rtc@280 { 157 compatible = "sprd,sc2731-rtc"; 158 reg = <0x280>; 159 interrupt-parent = <&sc2731_pmic>; 160 interrupts = <2>; 161 }; 162 163 pmic_eic: gpio@300 { 164 compatible = "sprd,sc2731-eic"; 165 reg = <0x300>; 166 interrupt-parent = <&sc2731_pmic>; 167 interrupts = <5>; 168 gpio-controller; 169 #gpio-cells = <2>; 170 interrupt-controller; 171 #interrupt-cells = <2>; 172 }; 173 174 efuse@380 { 175 compatible = "sprd,sc2731-efuse"; 176 reg = <0x380>; 177 hwlocks = <&hwlock 12>; 178 #address-cells = <1>; 179 #size-cells = <1>; 180 181 /* Data cells */ 182 fgu_calib: calib@6 { 183 reg = <0x6 0x2>; 184 bits = <0 9>; 185 }; 186 187 adc_big_scale: calib@24 { 188 reg = <0x24 0x2>; 189 }; 190 191 adc_small_scale: calib@26 { 192 reg = <0x26 0x2>; 193 }; 194 }; 195 196 pmic_adc: adc@480 { 197 compatible = "sprd,sc2731-adc"; 198 reg = <0x480>; 199 interrupt-parent = <&sc2731_pmic>; 200 interrupts = <0>; 201 #io-channel-cells = <1>; 202 hwlocks = <&hwlock 4>; 203 nvmem-cells = <&adc_big_scale>, <&adc_small_scale>; 204 nvmem-cell-names = "big_scale_calib", "small_scale_calib"; 205 }; 206 207 fuel-gauge@a00 { 208 compatible = "sprd,sc2731-fgu"; 209 reg = <0xa00>; 210 battery-detect-gpios = <&pmic_eic 9 GPIO_ACTIVE_HIGH>; 211 interrupt-parent = <&sc2731_pmic>; 212 interrupts = <4>; 213 io-channels = <&pmic_adc 5>, <&pmic_adc 14>; 214 io-channel-names = "bat-temp", "charge-vol"; 215 nvmem-cells = <&fgu_calib>; 216 nvmem-cell-names = "fgu_calib"; 217 monitored-battery = <&bat>; 218 sprd,calib-resistance-micro-ohms = <21500>; 219 }; 220 221 vibrator@ec8 { 222 compatible = "sprd,sc2731-vibrator"; 223 reg = <0xec8>; 224 }; 225 226 regulators { 227 compatible = "sprd,sc2731-regulator"; 228 229 BUCK_CPU0 { 230 regulator-name = "vddarm0"; 231 regulator-min-microvolt = <400000>; 232 regulator-max-microvolt = <1996875>; 233 regulator-ramp-delay = <25000>; 234 regulator-always-on; 235 }; 236 237 LDO_CAMA0 { 238 regulator-name = "vddcama0"; 239 regulator-min-microvolt = <1200000>; 240 regulator-max-microvolt = <3750000>; 241 regulator-enable-ramp-delay = <100>; 242 }; 243 }; 244 }; 245 }; 246... 247