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 pm660l {
0015 polling-delay-passive = <250>;
0016 polling-delay = <1000>;
0017
0018 thermal-sensors = <&pm660l_temp>;
0019
0020 trips {
0021 pm660l_alert0: pm660l-alert0 {
0022 temperature = <95000>;
0023 hysteresis = <2000>;
0024 type = "passive";
0025 };
0026 pm660l_crit: pm660l-crit {
0027 temperature = <125000>;
0028 hysteresis = <2000>;
0029 type = "critical";
0030 };
0031 };
0032 };
0033 };
0034 };
0035
0036 &spmi_bus {
0037
0038 pmic@2 {
0039 compatible = "qcom,pm660l", "qcom,spmi-pmic";
0040 reg = <0x2 SPMI_USID>;
0041 #address-cells = <1>;
0042 #size-cells = <0>;
0043
0044 pm660l_temp: temp-alarm@2400 {
0045 compatible = "qcom,spmi-temp-alarm";
0046 reg = <0x2400>;
0047 interrupts = <0x2 0x24 0x0 IRQ_TYPE_EDGE_BOTH>;
0048 #thermal-sensor-cells = <0>;
0049 };
0050
0051 pm660l_gpios: gpios@c000 {
0052 compatible = "qcom,pm660l-gpio", "qcom,spmi-gpio";
0053 reg = <0xc000>;
0054 gpio-controller;
0055 gpio-ranges = <&pm660l_gpios 0 0 12>;
0056 #gpio-cells = <2>;
0057 interrupt-controller;
0058 #interrupt-cells = <2>;
0059 };
0060 };
0061
0062 pmic@3 {
0063 compatible = "qcom,pm660l", "qcom,spmi-pmic";
0064 reg = <0x3 SPMI_USID>;
0065 #address-cells = <1>;
0066 #size-cells = <0>;
0067
0068 pm660l_lpg: lpg@b100 {
0069 compatible = "qcom,pm660l-lpg";
0070
0071 status = "disabled";
0072 };
0073
0074 pm660l_wled: leds@d800 {
0075 compatible = "qcom,pm660l-wled";
0076 reg = <0xd800>, <0xd900>;
0077 interrupts = <0x3 0xd8 0x1 IRQ_TYPE_EDGE_RISING>;
0078 interrupt-names = "ovp";
0079 label = "backlight";
0080
0081 status = "disabled";
0082 };
0083
0084 pm660l_spmi_regulators: pm660l-regulators {
0085 compatible = "qcom,pm660l-regulators";
0086 };
0087 };
0088 };
0089