0001 // SPDX-License-Identifier: GPL-2.0
0002 #include <dt-bindings/iio/qcom,spmi-vadc.h>
0003 #include <dt-bindings/interrupt-controller/irq.h>
0004 #include <dt-bindings/spmi/spmi.h>
0005
0006 &spmi_bus {
0007
0008 pm8941_0: pm8941@0 {
0009 compatible = "qcom,pm8941", "qcom,spmi-pmic";
0010 reg = <0x0 SPMI_USID>;
0011 #address-cells = <1>;
0012 #size-cells = <0>;
0013
0014 rtc@6000 {
0015 compatible = "qcom,pm8941-rtc";
0016 reg = <0x6000>,
0017 <0x6100>;
0018 reg-names = "rtc", "alarm";
0019 interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
0020 };
0021
0022 pwrkey@800 {
0023 compatible = "qcom,pm8941-pwrkey";
0024 reg = <0x800>;
0025 interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
0026 debounce = <15625>;
0027 bias-pull-up;
0028 };
0029
0030 usb_id: misc@900 {
0031 compatible = "qcom,pm8941-misc";
0032 reg = <0x900>;
0033 interrupts = <0x0 0x9 0 IRQ_TYPE_EDGE_BOTH>;
0034 interrupt-names = "usb_id";
0035 };
0036
0037 smbb: charger@1000 {
0038 compatible = "qcom,pm8941-charger";
0039 reg = <0x1000>;
0040 interrupts = <0x0 0x10 7 IRQ_TYPE_EDGE_BOTH>,
0041 <0x0 0x10 5 IRQ_TYPE_EDGE_BOTH>,
0042 <0x0 0x10 4 IRQ_TYPE_EDGE_BOTH>,
0043 <0x0 0x12 1 IRQ_TYPE_EDGE_BOTH>,
0044 <0x0 0x12 0 IRQ_TYPE_EDGE_BOTH>,
0045 <0x0 0x13 2 IRQ_TYPE_EDGE_BOTH>,
0046 <0x0 0x13 1 IRQ_TYPE_EDGE_BOTH>,
0047 <0x0 0x14 1 IRQ_TYPE_EDGE_BOTH>;
0048 interrupt-names = "chg-done",
0049 "chg-fast",
0050 "chg-trkl",
0051 "bat-temp-ok",
0052 "bat-present",
0053 "chg-gone",
0054 "usb-valid",
0055 "dc-valid";
0056
0057 usb-otg-in-supply = <&pm8941_5vs1>;
0058
0059 chg_otg: otg-vbus { };
0060 };
0061
0062 pm8941_gpios: gpios@c000 {
0063 compatible = "qcom,pm8941-gpio", "qcom,spmi-gpio";
0064 reg = <0xc000>;
0065 gpio-controller;
0066 gpio-ranges = <&pm8941_gpios 0 0 36>;
0067 #gpio-cells = <2>;
0068 interrupt-controller;
0069 #interrupt-cells = <2>;
0070
0071 boost_bypass_n_pin: boost-bypass-state {
0072 pins = "gpio21";
0073 function = "normal";
0074 };
0075 };
0076
0077 pm8941_mpps: mpps@a000 {
0078 compatible = "qcom,pm8941-mpp", "qcom,spmi-mpp";
0079 reg = <0xa000>;
0080 gpio-controller;
0081 #gpio-cells = <2>;
0082 gpio-ranges = <&pm8941_mpps 0 0 8>;
0083 interrupt-controller;
0084 #interrupt-cells = <2>;
0085 };
0086
0087 pm8941_temp: temp-alarm@2400 {
0088 compatible = "qcom,spmi-temp-alarm";
0089 reg = <0x2400>;
0090 interrupts = <0 0x24 0 IRQ_TYPE_EDGE_RISING>;
0091 io-channels = <&pm8941_vadc VADC_DIE_TEMP>;
0092 io-channel-names = "thermal";
0093 #thermal-sensor-cells = <0>;
0094 };
0095
0096 pm8941_vadc: vadc@3100 {
0097 compatible = "qcom,spmi-vadc";
0098 reg = <0x3100>;
0099 interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
0100 #address-cells = <1>;
0101 #size-cells = <0>;
0102 #io-channel-cells = <1>;
0103
0104 bat_temp {
0105 reg = <VADC_LR_MUX1_BAT_THERM>;
0106 };
0107 die_temp {
0108 reg = <VADC_DIE_TEMP>;
0109 };
0110 ref_625mv {
0111 reg = <VADC_REF_625MV>;
0112 };
0113 ref_1250v {
0114 reg = <VADC_REF_1250MV>;
0115 };
0116 ref_gnd {
0117 reg = <VADC_GND_REF>;
0118 };
0119 ref_vdd {
0120 reg = <VADC_VDD_VADC>;
0121 };
0122 vbat_sns {
0123 reg = <VADC_VBAT_SNS>;
0124 };
0125 };
0126
0127 pm8941_iadc: iadc@3600 {
0128 compatible = "qcom,pm8941-iadc", "qcom,spmi-iadc";
0129 reg = <0x3600>;
0130 interrupts = <0x0 0x36 0x0 IRQ_TYPE_EDGE_RISING>;
0131 qcom,external-resistor-micro-ohms = <10000>;
0132 };
0133
0134 pm8941_coincell: coincell@2800 {
0135 compatible = "qcom,pm8941-coincell";
0136 reg = <0x2800>;
0137 status = "disabled";
0138 };
0139 };
0140
0141 pm8941_1: pm8941@1 {
0142 compatible = "qcom,pm8941", "qcom,spmi-pmic";
0143 reg = <0x1 SPMI_USID>;
0144 #address-cells = <1>;
0145 #size-cells = <0>;
0146
0147 pm8941_lpg: lpg {
0148 compatible = "qcom,pm8941-lpg";
0149
0150 #address-cells = <1>;
0151 #size-cells = <0>;
0152 #pwm-cells = <2>;
0153
0154 status = "disabled";
0155 };
0156
0157 pm8941_wled: wled@d800 {
0158 compatible = "qcom,pm8941-wled";
0159 reg = <0xd800>;
0160 label = "backlight";
0161
0162 status = "disabled";
0163 };
0164
0165 regulators {
0166 compatible = "qcom,pm8941-regulators";
0167 interrupts = <0x1 0x83 0x2 0>, <0x1 0x84 0x2 0>;
0168 interrupt-names = "ocp-5vs1", "ocp-5vs2";
0169 vin_5vs-supply = <&pm8941_5v>;
0170
0171 pm8941_5v: s4 {
0172 regulator-min-microvolt = <5000000>;
0173 regulator-max-microvolt = <5000000>;
0174 regulator-enable-ramp-delay = <500>;
0175 };
0176
0177 pm8941_5vs1: 5vs1 {
0178 regulator-enable-ramp-delay = <1000>;
0179 regulator-pull-down;
0180 regulator-over-current-protection;
0181 qcom,ocp-max-retries = <10>;
0182 qcom,ocp-retry-delay = <30>;
0183 qcom,vs-soft-start-strength = <0>;
0184 regulator-initial-mode = <1>;
0185 };
0186
0187 pm8941_5vs2: 5vs2 {
0188 regulator-enable-ramp-delay = <1000>;
0189 regulator-pull-down;
0190 regulator-over-current-protection;
0191 qcom,ocp-max-retries = <10>;
0192 qcom,ocp-retry-delay = <30>;
0193 qcom,vs-soft-start-strength = <0>;
0194 regulator-initial-mode = <1>;
0195 };
0196 };
0197 };
0198 };