xref: /freebsd/sys/contrib/device-tree/Bindings/mfd/sprd,sc2731.yaml (revision 2846c90520eb4cc74e24d586a0ea0f4a0006bc73)
15f62a964SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
25f62a964SEmmanuel Vadot%YAML 1.2
35f62a964SEmmanuel Vadot---
45f62a964SEmmanuel Vadot$id: http://devicetree.org/schemas/mfd/sprd,sc2731.yaml#
55f62a964SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
65f62a964SEmmanuel Vadot
75f62a964SEmmanuel Vadottitle: Spreadtrum SC27xx PMIC
85f62a964SEmmanuel Vadot
95f62a964SEmmanuel Vadotmaintainers:
105f62a964SEmmanuel Vadot  - Orson Zhai <orsonzhai@gmail.com>
115f62a964SEmmanuel Vadot  - Baolin Wang <baolin.wang7@gmail.com>
125f62a964SEmmanuel Vadot  - Chunyan Zhang <zhang.lyra@gmail.com>
135f62a964SEmmanuel Vadot
145f62a964SEmmanuel Vadotdescription: |
155f62a964SEmmanuel Vadot  Spreadtrum PMICs belonging to the SC27xx series integrate all mobile handset
165f62a964SEmmanuel Vadot  power management, audio codec, battery management and user interface support
175f62a964SEmmanuel Vadot  functions in a single chip. They have 6 major functional blocks:
185f62a964SEmmanuel Vadot    - DCDCs to support CPU, memory
195f62a964SEmmanuel Vadot    - LDOs to support both internal and external requirements
205f62a964SEmmanuel Vadot    - Battery management system, such as charger, fuel gauge
215f62a964SEmmanuel Vadot    - Audio codec
225f62a964SEmmanuel Vadot    - User interface functions, such as indicator, flash LED and so on
235f62a964SEmmanuel Vadot    - IC level interface, such as power on/off control, RTC, typec and so on
245f62a964SEmmanuel Vadot
255f62a964SEmmanuel Vadotproperties:
265f62a964SEmmanuel Vadot  $nodename:
275f62a964SEmmanuel Vadot    pattern: '^pmic@[0-9a-f]+$'
285f62a964SEmmanuel Vadot
295f62a964SEmmanuel Vadot  compatible:
305f62a964SEmmanuel Vadot    enum:
315f62a964SEmmanuel Vadot      - sprd,sc2720
325f62a964SEmmanuel Vadot      - sprd,sc2721
335f62a964SEmmanuel Vadot      - sprd,sc2723
345f62a964SEmmanuel Vadot      - sprd,sc2730
355f62a964SEmmanuel Vadot      - sprd,sc2731
365f62a964SEmmanuel Vadot
375f62a964SEmmanuel Vadot  reg:
385f62a964SEmmanuel Vadot    maxItems: 1
395f62a964SEmmanuel Vadot
405f62a964SEmmanuel Vadot  interrupts:
415f62a964SEmmanuel Vadot    maxItems: 1
425f62a964SEmmanuel Vadot
435f62a964SEmmanuel Vadot  interrupt-controller: true
445f62a964SEmmanuel Vadot  spi-max-frequency: true
455f62a964SEmmanuel Vadot
465f62a964SEmmanuel Vadot  '#address-cells':
475f62a964SEmmanuel Vadot    const: 1
485f62a964SEmmanuel Vadot
495f62a964SEmmanuel Vadot  '#interrupt-cells':
505f62a964SEmmanuel Vadot    const: 1
515f62a964SEmmanuel Vadot
525f62a964SEmmanuel Vadot  '#size-cells':
535f62a964SEmmanuel Vadot    const: 0
545f62a964SEmmanuel Vadot
555f62a964SEmmanuel Vadot  regulators:
565f62a964SEmmanuel Vadot    type: object
575f62a964SEmmanuel Vadot    $ref: /schemas/regulator/sprd,sc2731-regulator.yaml#
585f62a964SEmmanuel Vadot
595f62a964SEmmanuel VadotpatternProperties:
605f62a964SEmmanuel Vadot  "^adc@[0-9a-f]+$":
615f62a964SEmmanuel Vadot    type: object
625f62a964SEmmanuel Vadot    $ref: /schemas/iio/adc/sprd,sc2720-adc.yaml#
635f62a964SEmmanuel Vadot
645f62a964SEmmanuel Vadot  "^charger@[0-9a-f]+$":
655f62a964SEmmanuel Vadot    type: object
665f62a964SEmmanuel Vadot    $ref: /schemas/power/supply/sc2731-charger.yaml#
675f62a964SEmmanuel Vadot
685f62a964SEmmanuel Vadot  "^efuse@[0-9a-f]+$":
695f62a964SEmmanuel Vadot    type: object
70*2846c905SEmmanuel Vadot    $ref: /schemas/nvmem/sprd,sc2731-efuse.yaml#
715f62a964SEmmanuel Vadot
725f62a964SEmmanuel Vadot  "^fuel-gauge@[0-9a-f]+$":
735f62a964SEmmanuel Vadot    type: object
745f62a964SEmmanuel Vadot    $ref: /schemas/power/supply/sc27xx-fg.yaml#
755f62a964SEmmanuel Vadot
765f62a964SEmmanuel Vadot  "^gpio@[0-9a-f]+$":
775f62a964SEmmanuel Vadot    type: object
785f62a964SEmmanuel Vadot    $ref: /schemas/gpio/sprd,gpio-eic.yaml#
795f62a964SEmmanuel Vadot
805f62a964SEmmanuel Vadot  "^led-controller@[0-9a-f]+$":
815f62a964SEmmanuel Vadot    type: object
825f62a964SEmmanuel Vadot    $ref: /schemas/leds/sprd,sc2731-bltc.yaml#
835f62a964SEmmanuel Vadot
845f62a964SEmmanuel Vadot  "^rtc@[0-9a-f]+$":
855f62a964SEmmanuel Vadot    type: object
865f62a964SEmmanuel Vadot    $ref: /schemas/rtc/sprd,sc2731-rtc.yaml#
875f62a964SEmmanuel Vadot
885f62a964SEmmanuel Vadot  "^vibrator@[0-9a-f]+$":
895f62a964SEmmanuel Vadot    type: object
905f62a964SEmmanuel Vadot    $ref: /schemas/input/sprd,sc27xx-vibrator.yaml#
915f62a964SEmmanuel Vadot
925f62a964SEmmanuel Vadotrequired:
935f62a964SEmmanuel Vadot  - compatible
945f62a964SEmmanuel Vadot  - reg
955f62a964SEmmanuel Vadot  - interrupts
965f62a964SEmmanuel Vadot  - interrupt-controller
975f62a964SEmmanuel Vadot  - spi-max-frequency
985f62a964SEmmanuel Vadot  - '#address-cells'
995f62a964SEmmanuel Vadot  - '#interrupt-cells'
1005f62a964SEmmanuel Vadot  - '#size-cells'
1015f62a964SEmmanuel Vadot
1025f62a964SEmmanuel VadotadditionalProperties: false
1035f62a964SEmmanuel Vadot
1045f62a964SEmmanuel Vadotexamples:
1055f62a964SEmmanuel Vadot  - |
1065f62a964SEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
1075f62a964SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
1085f62a964SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
1095f62a964SEmmanuel Vadot    #include <dt-bindings/leds/common.h>
1105f62a964SEmmanuel Vadot
1115f62a964SEmmanuel Vadot    spi {
1125f62a964SEmmanuel Vadot      #address-cells = <1>;
1135f62a964SEmmanuel Vadot      #size-cells = <0>;
1145f62a964SEmmanuel Vadot
1155f62a964SEmmanuel Vadot      sc2731_pmic: pmic@0 {
1165f62a964SEmmanuel Vadot        compatible = "sprd,sc2731";
1175f62a964SEmmanuel Vadot        reg = <0>;
1185f62a964SEmmanuel Vadot        interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
1195f62a964SEmmanuel Vadot        interrupt-controller;
1205f62a964SEmmanuel Vadot        spi-max-frequency = <26000000>;
1215f62a964SEmmanuel Vadot        #address-cells = <1>;
1225f62a964SEmmanuel Vadot        #interrupt-cells = <1>;
1235f62a964SEmmanuel Vadot        #size-cells = <0>;
1245f62a964SEmmanuel Vadot
1255f62a964SEmmanuel Vadot        charger@0 {
1265f62a964SEmmanuel Vadot          compatible = "sprd,sc2731-charger";
1275f62a964SEmmanuel Vadot          reg = <0x0>;
1285f62a964SEmmanuel Vadot          phys = <&ssphy>;
1295f62a964SEmmanuel Vadot          monitored-battery = <&bat>;
1305f62a964SEmmanuel Vadot        };
1315f62a964SEmmanuel Vadot
1325f62a964SEmmanuel Vadot        led-controller@200 {
1335f62a964SEmmanuel Vadot          compatible = "sprd,sc2731-bltc";
1345f62a964SEmmanuel Vadot          reg = <0x200>;
1355f62a964SEmmanuel Vadot          #address-cells = <1>;
1365f62a964SEmmanuel Vadot          #size-cells = <0>;
1375f62a964SEmmanuel Vadot
1385f62a964SEmmanuel Vadot          led@0 {
1395f62a964SEmmanuel Vadot            reg = <0x0>;
1405f62a964SEmmanuel Vadot            color = <LED_COLOR_ID_RED>;
1415f62a964SEmmanuel Vadot          };
1425f62a964SEmmanuel Vadot
1435f62a964SEmmanuel Vadot          led@1 {
1445f62a964SEmmanuel Vadot            reg = <0x1>;
1455f62a964SEmmanuel Vadot            color = <LED_COLOR_ID_GREEN>;
1465f62a964SEmmanuel Vadot          };
1475f62a964SEmmanuel Vadot
1485f62a964SEmmanuel Vadot          led@2 {
1495f62a964SEmmanuel Vadot            reg = <0x2>;
1505f62a964SEmmanuel Vadot            color = <LED_COLOR_ID_BLUE>;
1515f62a964SEmmanuel Vadot          };
1525f62a964SEmmanuel Vadot        };
1535f62a964SEmmanuel Vadot
1545f62a964SEmmanuel Vadot        rtc@280 {
1555f62a964SEmmanuel Vadot          compatible = "sprd,sc2731-rtc";
1565f62a964SEmmanuel Vadot          reg = <0x280>;
1575f62a964SEmmanuel Vadot          interrupt-parent = <&sc2731_pmic>;
1585f62a964SEmmanuel Vadot          interrupts = <2>;
1595f62a964SEmmanuel Vadot        };
1605f62a964SEmmanuel Vadot
1615f62a964SEmmanuel Vadot        pmic_eic: gpio@300 {
1625f62a964SEmmanuel Vadot          compatible = "sprd,sc2731-eic";
1635f62a964SEmmanuel Vadot          reg = <0x300>;
1645f62a964SEmmanuel Vadot          interrupt-parent = <&sc2731_pmic>;
1655f62a964SEmmanuel Vadot          interrupts = <5>;
1665f62a964SEmmanuel Vadot          gpio-controller;
1675f62a964SEmmanuel Vadot          #gpio-cells = <2>;
1685f62a964SEmmanuel Vadot          interrupt-controller;
1695f62a964SEmmanuel Vadot          #interrupt-cells = <2>;
1705f62a964SEmmanuel Vadot        };
1715f62a964SEmmanuel Vadot
1725f62a964SEmmanuel Vadot        efuse@380 {
1735f62a964SEmmanuel Vadot          compatible = "sprd,sc2731-efuse";
1745f62a964SEmmanuel Vadot          reg = <0x380>;
1755f62a964SEmmanuel Vadot          hwlocks = <&hwlock 12>;
1765f62a964SEmmanuel Vadot          #address-cells = <1>;
1775f62a964SEmmanuel Vadot          #size-cells = <1>;
1785f62a964SEmmanuel Vadot
1795f62a964SEmmanuel Vadot          /* Data cells */
1805f62a964SEmmanuel Vadot          fgu_calib: calib@6 {
1815f62a964SEmmanuel Vadot            reg = <0x6 0x2>;
1825f62a964SEmmanuel Vadot            bits = <0 9>;
1835f62a964SEmmanuel Vadot          };
1845f62a964SEmmanuel Vadot
1855f62a964SEmmanuel Vadot          adc_big_scale: calib@24 {
1865f62a964SEmmanuel Vadot            reg = <0x24 0x2>;
1875f62a964SEmmanuel Vadot          };
1885f62a964SEmmanuel Vadot
1895f62a964SEmmanuel Vadot          adc_small_scale: calib@26 {
1905f62a964SEmmanuel Vadot            reg = <0x26 0x2>;
1915f62a964SEmmanuel Vadot          };
1925f62a964SEmmanuel Vadot        };
1935f62a964SEmmanuel Vadot
194*2846c905SEmmanuel Vadot        pmic_adc: adc@480 {
1955f62a964SEmmanuel Vadot          compatible = "sprd,sc2731-adc";
1965f62a964SEmmanuel Vadot          reg = <0x480>;
1975f62a964SEmmanuel Vadot          interrupt-parent = <&sc2731_pmic>;
1985f62a964SEmmanuel Vadot          interrupts = <0>;
1995f62a964SEmmanuel Vadot          #io-channel-cells = <1>;
2005f62a964SEmmanuel Vadot          hwlocks = <&hwlock 4>;
2015f62a964SEmmanuel Vadot          nvmem-cells = <&adc_big_scale>, <&adc_small_scale>;
2025f62a964SEmmanuel Vadot          nvmem-cell-names = "big_scale_calib", "small_scale_calib";
2035f62a964SEmmanuel Vadot        };
2045f62a964SEmmanuel Vadot
2055f62a964SEmmanuel Vadot        fuel-gauge@a00 {
2065f62a964SEmmanuel Vadot          compatible = "sprd,sc2731-fgu";
2075f62a964SEmmanuel Vadot          reg = <0xa00>;
2085f62a964SEmmanuel Vadot          battery-detect-gpios = <&pmic_eic 9 GPIO_ACTIVE_HIGH>;
2095f62a964SEmmanuel Vadot          interrupt-parent = <&sc2731_pmic>;
2105f62a964SEmmanuel Vadot          interrupts = <4>;
2115f62a964SEmmanuel Vadot          io-channels = <&pmic_adc 5>, <&pmic_adc 14>;
2125f62a964SEmmanuel Vadot          io-channel-names = "bat-temp", "charge-vol";
2135f62a964SEmmanuel Vadot          nvmem-cells = <&fgu_calib>;
2145f62a964SEmmanuel Vadot          nvmem-cell-names = "fgu_calib";
2155f62a964SEmmanuel Vadot          monitored-battery = <&bat>;
2165f62a964SEmmanuel Vadot          sprd,calib-resistance-micro-ohms = <21500>;
2175f62a964SEmmanuel Vadot        };
2185f62a964SEmmanuel Vadot
2195f62a964SEmmanuel Vadot        vibrator@ec8 {
2205f62a964SEmmanuel Vadot          compatible = "sprd,sc2731-vibrator";
2215f62a964SEmmanuel Vadot          reg = <0xec8>;
2225f62a964SEmmanuel Vadot        };
2235f62a964SEmmanuel Vadot
2245f62a964SEmmanuel Vadot        regulators {
2255f62a964SEmmanuel Vadot          compatible = "sprd,sc2731-regulator";
2265f62a964SEmmanuel Vadot
2275f62a964SEmmanuel Vadot          BUCK_CPU0 {
2285f62a964SEmmanuel Vadot            regulator-name = "vddarm0";
2295f62a964SEmmanuel Vadot            regulator-min-microvolt = <400000>;
2305f62a964SEmmanuel Vadot            regulator-max-microvolt = <1996875>;
2315f62a964SEmmanuel Vadot            regulator-ramp-delay = <25000>;
2325f62a964SEmmanuel Vadot            regulator-always-on;
2335f62a964SEmmanuel Vadot          };
2345f62a964SEmmanuel Vadot
2355f62a964SEmmanuel Vadot          LDO_CAMA0 {
2365f62a964SEmmanuel Vadot            regulator-name = "vddcama0";
2375f62a964SEmmanuel Vadot            regulator-min-microvolt = <1200000>;
2385f62a964SEmmanuel Vadot            regulator-max-microvolt = <3750000>;
2395f62a964SEmmanuel Vadot            regulator-enable-ramp-delay = <100>;
2405f62a964SEmmanuel Vadot          };
2415f62a964SEmmanuel Vadot        };
2425f62a964SEmmanuel Vadot      };
2435f62a964SEmmanuel Vadot    };
2445f62a964SEmmanuel Vadot...
245