Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 #include <dt-bindings/iio/qcom,spmi-vadc.h>
0003 #include <dt-bindings/input/linux-event-codes.h>
0004 #include <dt-bindings/interrupt-controller/irq.h>
0005 #include <dt-bindings/spmi/spmi.h>
0006 
0007 &spmi_bus {
0008 
0009         pm8916_0: pmic@0 {
0010                 compatible = "qcom,pm8916", "qcom,spmi-pmic";
0011                 reg = <0x0 SPMI_USID>;
0012                 #address-cells = <1>;
0013                 #size-cells = <0>;
0014 
0015                 pon@800 {
0016                         compatible = "qcom,pm8916-pon";
0017                         reg = <0x800>;
0018                         mode-bootloader = <0x2>;
0019                         mode-recovery = <0x1>;
0020 
0021                         pwrkey {
0022                                 compatible = "qcom,pm8941-pwrkey";
0023                                 interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
0024                                 debounce = <15625>;
0025                                 bias-pull-up;
0026                                 linux,code = <KEY_POWER>;
0027                         };
0028 
0029                         pm8916_resin: resin {
0030                                 compatible = "qcom,pm8941-resin";
0031                                 interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
0032                                 debounce = <15625>;
0033                                 bias-pull-up;
0034                                 status = "disabled";
0035                         };
0036 
0037                         watchdog {
0038                                 compatible = "qcom,pm8916-wdt";
0039                                 interrupts = <0x0 0x8 6 IRQ_TYPE_EDGE_RISING>;
0040                                 timeout-sec = <60>;
0041                         };
0042                 };
0043 
0044                 pm8916_usbin: extcon@1300 {
0045                         compatible = "qcom,pm8941-misc";
0046                         reg = <0x1300>;
0047                         interrupts = <0x0 0x13 1 IRQ_TYPE_EDGE_BOTH>;
0048                         interrupt-names = "usb_vbus";
0049                         status = "disabled";
0050                 };
0051 
0052                 pm8916_temp: temp-alarm@2400 {
0053                         compatible = "qcom,spmi-temp-alarm";
0054                         reg = <0x2400>;
0055                         interrupts = <0 0x24 0 IRQ_TYPE_EDGE_RISING>;
0056                         io-channels = <&pm8916_vadc VADC_DIE_TEMP>;
0057                         io-channel-names = "thermal";
0058                         #thermal-sensor-cells = <0>;
0059                 };
0060 
0061                 pm8916_vadc: adc@3100 {
0062                         compatible = "qcom,spmi-vadc";
0063                         reg = <0x3100>;
0064                         interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
0065                         #address-cells = <1>;
0066                         #size-cells = <0>;
0067                         #io-channel-cells = <1>;
0068 
0069                         adc-chan@0 {
0070                                 reg = <VADC_USBIN>;
0071                                 qcom,pre-scaling = <1 10>;
0072                         };
0073                         adc-chan@7 {
0074                                 reg = <VADC_VSYS>;
0075                                 qcom,pre-scaling = <1 3>;
0076                         };
0077                         adc-chan@8 {
0078                                 reg = <VADC_DIE_TEMP>;
0079                         };
0080                         adc-chan@9 {
0081                                 reg = <VADC_REF_625MV>;
0082                         };
0083                         adc-chan@a {
0084                                 reg = <VADC_REF_1250MV>;
0085                         };
0086                         adc-chan@e {
0087                                 reg = <VADC_GND_REF>;
0088                         };
0089                         adc-chan@f {
0090                                 reg = <VADC_VDD_VADC>;
0091                         };
0092                 };
0093 
0094                 rtc@6000 {
0095                         compatible = "qcom,pm8941-rtc";
0096                         reg = <0x6000>;
0097                         interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
0098                 };
0099 
0100                 pm8916_mpps: mpps@a000 {
0101                         compatible = "qcom,pm8916-mpp", "qcom,spmi-mpp";
0102                         reg = <0xa000>;
0103                         gpio-controller;
0104                         #gpio-cells = <2>;
0105                         gpio-ranges = <&pm8916_mpps 0 0 4>;
0106                         interrupt-controller;
0107                         #interrupt-cells = <2>;
0108                 };
0109 
0110                 pm8916_gpios: gpios@c000 {
0111                         compatible = "qcom,pm8916-gpio", "qcom,spmi-gpio";
0112                         reg = <0xc000>;
0113                         gpio-controller;
0114                         gpio-ranges = <&pm8916_gpios 0 0 4>;
0115                         #gpio-cells = <2>;
0116                         interrupt-controller;
0117                         #interrupt-cells = <2>;
0118                 };
0119         };
0120 
0121         pm8916_1: pmic@1 {
0122                 compatible = "qcom,pm8916", "qcom,spmi-pmic";
0123                 reg = <0x1 SPMI_USID>;
0124                 #address-cells = <1>;
0125                 #size-cells = <0>;
0126 
0127                 pm8916_pwm: pwm {
0128                         compatible = "qcom,pm8916-pwm";
0129 
0130                         #pwm-cells = <2>;
0131 
0132                         status = "disabled";
0133                 };
0134 
0135                 pm8916_vib: vibrator@c000 {
0136                         compatible = "qcom,pm8916-vib";
0137                         reg = <0xc000>;
0138                         status = "disabled";
0139                 };
0140 
0141                 wcd_codec: audio-codec@f000 {
0142                         compatible = "qcom,pm8916-wcd-analog-codec";
0143                         reg = <0xf000>;
0144                         reg-names = "pmic-codec-core";
0145                         clocks = <&gcc GCC_CODEC_DIGCODEC_CLK>;
0146                         clock-names = "mclk";
0147                         interrupt-parent = <&spmi_bus>;
0148                         interrupts = <0x1 0xf0 0x0 IRQ_TYPE_NONE>,
0149                                      <0x1 0xf0 0x1 IRQ_TYPE_NONE>,
0150                                      <0x1 0xf0 0x2 IRQ_TYPE_NONE>,
0151                                      <0x1 0xf0 0x3 IRQ_TYPE_NONE>,
0152                                      <0x1 0xf0 0x4 IRQ_TYPE_NONE>,
0153                                      <0x1 0xf0 0x5 IRQ_TYPE_NONE>,
0154                                      <0x1 0xf0 0x6 IRQ_TYPE_NONE>,
0155                                      <0x1 0xf0 0x7 IRQ_TYPE_NONE>,
0156                                      <0x1 0xf1 0x0 IRQ_TYPE_NONE>,
0157                                      <0x1 0xf1 0x1 IRQ_TYPE_NONE>,
0158                                      <0x1 0xf1 0x2 IRQ_TYPE_NONE>,
0159                                      <0x1 0xf1 0x3 IRQ_TYPE_NONE>,
0160                                      <0x1 0xf1 0x4 IRQ_TYPE_NONE>,
0161                                      <0x1 0xf1 0x5 IRQ_TYPE_NONE>;
0162                         interrupt-names = "cdc_spk_cnp_int",
0163                                           "cdc_spk_clip_int",
0164                                           "cdc_spk_ocp_int",
0165                                           "mbhc_ins_rem_det1",
0166                                           "mbhc_but_rel_det",
0167                                           "mbhc_but_press_det",
0168                                           "mbhc_ins_rem_det",
0169                                           "mbhc_switch_int",
0170                                           "cdc_ear_ocp_int",
0171                                           "cdc_hphr_ocp_int",
0172                                           "cdc_hphl_ocp_det",
0173                                           "cdc_ear_cnp_int",
0174                                           "cdc_hphr_cnp_int",
0175                                           "cdc_hphl_cnp_int";
0176                         vdd-cdc-io-supply = <&pm8916_l5>;
0177                         vdd-cdc-tx-rx-cx-supply = <&pm8916_l5>;
0178                         vdd-micbias-supply = <&pm8916_l13>;
0179                         #sound-dai-cells = <1>;
0180                 };
0181         };
0182 };