Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /* Copyright 2018 Google LLC. */
0003 
0004 #include <dt-bindings/iio/qcom,spmi-vadc.h>
0005 #include <dt-bindings/input/linux-event-codes.h>
0006 #include <dt-bindings/interrupt-controller/irq.h>
0007 #include <dt-bindings/spmi/spmi.h>
0008 #include <dt-bindings/thermal/thermal.h>
0009 
0010 / {
0011         thermal-zones {
0012                 pm8998-thermal {
0013                         polling-delay-passive = <250>;
0014                         polling-delay = <1000>;
0015 
0016                         thermal-sensors = <&pm8998_temp>;
0017 
0018                         trips {
0019                                 pm8998_alert0: pm8998-alert0 {
0020                                         temperature = <105000>;
0021                                         hysteresis = <2000>;
0022                                         type = "passive";
0023                                 };
0024                                 pm8998_crit: pm8998-crit {
0025                                         temperature = <125000>;
0026                                         hysteresis = <2000>;
0027                                         type = "critical";
0028                                 };
0029                         };
0030                 };
0031         };
0032 };
0033 
0034 &spmi_bus {
0035         pm8998_lsid0: pmic@0 {
0036                 compatible = "qcom,pm8998", "qcom,spmi-pmic";
0037                 reg = <0x0 SPMI_USID>;
0038                 #address-cells = <1>;
0039                 #size-cells = <0>;
0040 
0041                 pm8998_pon: pon@800 {
0042                         compatible = "qcom,pm8998-pon";
0043 
0044                         reg = <0x800>;
0045                         mode-bootloader = <0x2>;
0046                         mode-recovery = <0x1>;
0047 
0048                         pm8998_pwrkey: pwrkey {
0049                                 compatible = "qcom,pm8941-pwrkey";
0050                                 interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
0051                                 debounce = <15625>;
0052                                 bias-pull-up;
0053                                 linux,code = <KEY_POWER>;
0054                         };
0055                 };
0056 
0057                 pm8998_temp: temp-alarm@2400 {
0058                         compatible = "qcom,spmi-temp-alarm";
0059                         reg = <0x2400>;
0060                         interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>;
0061                         io-channels = <&pm8998_adc ADC5_DIE_TEMP>;
0062                         io-channel-names = "thermal";
0063                         #thermal-sensor-cells = <0>;
0064                 };
0065 
0066                 pm8998_coincell: coincell@2800 {
0067                         compatible = "qcom,pm8941-coincell";
0068                         reg = <0x2800>;
0069 
0070                         status = "disabled";
0071                 };
0072 
0073                 pm8998_adc: adc@3100 {
0074                         compatible = "qcom,spmi-adc-rev2";
0075                         reg = <0x3100>;
0076                         interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
0077                         #address-cells = <1>;
0078                         #size-cells = <0>;
0079                         #io-channel-cells = <1>;
0080 
0081                         adc-chan@6 {
0082                                 reg = <ADC5_DIE_TEMP>;
0083                                 label = "die_temp";
0084                         };
0085                 };
0086 
0087                 pm8998_adc_tm: adc-tm@3400 {
0088                         compatible = "qcom,spmi-adc-tm-hc";
0089                         reg = <0x3400>;
0090                         interrupts = <0x0 0x34 0x0 IRQ_TYPE_EDGE_RISING>;
0091                         #thermal-sensor-cells = <1>;
0092                         #address-cells = <1>;
0093                         #size-cells = <0>;
0094                         status = "disabled";
0095                 };
0096 
0097                 rtc@6000 {
0098                         compatible = "qcom,pm8941-rtc";
0099                         reg = <0x6000>, <0x6100>;
0100                         reg-names = "rtc", "alarm";
0101                         interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
0102                 };
0103 
0104                 pm8998_gpio: gpios@c000 {
0105                         compatible = "qcom,pm8998-gpio", "qcom,spmi-gpio";
0106                         reg = <0xc000>;
0107                         gpio-controller;
0108                         gpio-ranges = <&pm8998_gpio 0 0 26>;
0109                         #gpio-cells = <2>;
0110                         interrupt-controller;
0111                         #interrupt-cells = <2>;
0112                 };
0113 
0114         };
0115 
0116         pm8998_lsid1: pmic@1 {
0117                 compatible = "qcom,pm8998", "qcom,spmi-pmic";
0118                 reg = <0x1 SPMI_USID>;
0119                 #address-cells = <1>;
0120                 #size-cells = <0>;
0121         };
0122 };