Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: BSD-3-Clause
0002 /*
0003  * Copyright (c) 2020, Konrad Dybcio
0004  */
0005 
0006 #include <dt-bindings/iio/qcom,spmi-vadc.h>
0007 #include <dt-bindings/input/linux-event-codes.h>
0008 #include <dt-bindings/interrupt-controller/irq.h>
0009 #include <dt-bindings/spmi/spmi.h>
0010 #include <dt-bindings/thermal/thermal.h>
0011 
0012 / {
0013         thermal-zones {
0014                 pm660 {
0015                         polling-delay-passive = <250>;
0016                         polling-delay = <1000>;
0017 
0018                         thermal-sensors = <&pm660_temp>;
0019 
0020                         trips {
0021                                 pm660_alert0: pm660-alert0 {
0022                                         temperature = <95000>;
0023                                         hysteresis = <2000>;
0024                                         type = "passive";
0025                                 };
0026                                 pm660_crit: pm660-crit {
0027                                         temperature = <125000>;
0028                                         hysteresis = <2000>;
0029                                         type = "critical";
0030                                 };
0031                         };
0032                 };
0033         };
0034 };
0035 
0036 &spmi_bus {
0037 
0038         pmic@0 {
0039                 compatible = "qcom,pm660", "qcom,spmi-pmic";
0040                 reg = <0x0 SPMI_USID>;
0041                 #address-cells = <1>;
0042                 #size-cells = <0>;
0043 
0044                 rtc@6000 {
0045                         compatible = "qcom,pm8941-rtc";
0046                         reg = <0x6000>, <0x6100>;
0047                         reg-names = "rtc", "alarm";
0048                         interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
0049                 };
0050 
0051                 pon: pon@800 {
0052                         compatible = "qcom,pm8998-pon";
0053                         reg = <0x800>;
0054                         mode-bootloader = <0x2>;
0055                         mode-recovery = <0x1>;
0056 
0057                         pon_pwrkey: pwrkey {
0058                                 compatible = "qcom,pm8941-pwrkey";
0059                                 interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
0060                                 debounce = <15625>;
0061                                 bias-pull-up;
0062                                 linux,code = <KEY_POWER>;
0063 
0064                                 status = "disabled";
0065                         };
0066 
0067                         pon_resin: resin {
0068                                 compatible = "qcom,pm8941-resin";
0069                                 interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
0070                                 debounce = <15625>;
0071                                 bias-pull-up;
0072 
0073                                 status = "disabled";
0074                         };
0075                 };
0076 
0077                 pm660_temp: temp-alarm@2400 {
0078                         compatible = "qcom,spmi-temp-alarm";
0079                         reg = <0x2400>;
0080                         interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>;
0081                         io-channels = <&pm660_adc ADC5_DIE_TEMP>;
0082                         io-channel-names = "thermal";
0083                         #thermal-sensor-cells = <0>;
0084                 };
0085 
0086                 pm660_adc: adc@3100 {
0087                         compatible = "qcom,spmi-adc-rev2";
0088                         reg = <0x3100>;
0089                         interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
0090                         #address-cells = <1>;
0091                         #size-cells = <0>;
0092                         #io-channel-cells = <1>;
0093 
0094                         ref_gnd: ref_gnd@0 {
0095                                 reg = <ADC5_REF_GND>;
0096                                 qcom,decimation = <1024>;
0097                                 qcom,pre-scaling = <1 1>;
0098                         };
0099 
0100                         vref_1p25: vref_1p25@1 {
0101                                 reg = <ADC5_1P25VREF>;
0102                                 qcom,decimation = <1024>;
0103                                 qcom,pre-scaling = <1 1>;
0104                         };
0105 
0106                         die_temp: die_temp@6 {
0107                                 reg = <ADC5_DIE_TEMP>;
0108                                 qcom,decimation = <1024>;
0109                                 qcom,pre-scaling = <1 1>;
0110                         };
0111 
0112                         xo_therm: xo_therm@4c {
0113                                 reg = <ADC5_XO_THERM_100K_PU>;
0114                                 qcom,pre-scaling = <1 1>;
0115                                 qcom,decimation = <1024>;
0116                                 qcom,hw-settle-time = <200>;
0117                                 qcom,ratiometric;
0118                         };
0119 
0120                         msm_therm: msm_therm@4d {
0121                                 reg = <ADC5_AMUX_THM1_100K_PU>;
0122                                 qcom,pre-scaling = <1 1>;
0123                                 qcom,decimation = <1024>;
0124                                 qcom,hw-settle-time = <200>;
0125                                 qcom,ratiometric;
0126                         };
0127 
0128                         emmc_therm: emmc_therm@4e {
0129                                 reg = <ADC5_AMUX_THM2_100K_PU>;
0130                                 qcom,pre-scaling = <1 1>;
0131                                 qcom,decimation = <1024>;
0132                                 qcom,hw-settle-time = <200>;
0133                                 qcom,ratiometric;
0134                         };
0135 
0136                         pa_therm0: thermistor0@4f {
0137                                 reg = <ADC5_AMUX_THM3_100K_PU>;
0138                                 qcom,pre-scaling = <1 1>;
0139                                 qcom,decimation = <1024>;
0140                                 qcom,hw-settle-time = <200>;
0141                                 qcom,ratiometric;
0142                         };
0143 
0144                         pa_therm1: thermistor1@50 {
0145                                 reg = <ADC5_AMUX_THM4_100K_PU>;
0146                                 qcom,pre-scaling = <1 1>;
0147                                 qcom,decimation = <1024>;
0148                                 qcom,hw-settle-time = <200>;
0149                                 qcom,ratiometric;
0150                         };
0151 
0152                         quiet_therm: quiet_therm@51 {
0153                                 reg = <ADC5_AMUX_THM5_100K_PU>;
0154                                 qcom,pre-scaling = <1 1>;
0155                                 qcom,decimation = <1024>;
0156                                 qcom,hw-settle-time = <200>;
0157                                 qcom,ratiometric;
0158                         };
0159 
0160                         vadc_vph_pwr: vph_pwr@83 {
0161                                 reg = <ADC5_VPH_PWR>;
0162                                 qcom,decimation = <1024>;
0163                                 qcom,pre-scaling = <1 3>;
0164                         };
0165 
0166                         vcoin: vcoin@83 {
0167                                 reg = <ADC5_VCOIN>;
0168                                 qcom,decimation = <1024>;
0169                                 qcom,pre-scaling = <1 3>;
0170                         };
0171                 };
0172 
0173                 pm660_gpios: gpios@c000 {
0174                         compatible = "qcom,pm660-gpio", "qcom,spmi-gpio";
0175                         reg = <0xc000>;
0176                         gpio-controller;
0177                         gpio-ranges = <&pm660_gpios 0 0 13>;
0178                         #gpio-cells = <2>;
0179                         interrupt-controller;
0180                         #interrupt-cells = <2>;
0181                 };
0182         };
0183 
0184         pmic@1 {
0185                 compatible = "qcom,pm660", "qcom,spmi-pmic";
0186                 reg = <0x1 SPMI_USID>;
0187                 #address-cells = <1>;
0188                 #size-cells = <0>;
0189 
0190                 pm660_spmi_regulators: pm660-regulators {
0191                         compatible = "qcom,pm660-regulators";
0192                 };
0193         };
0194 };