1*2846c905SEmmanuel Vadot// SPDX-License-Identifier: BSD-3-Clause 2*2846c905SEmmanuel Vadot/* 3*2846c905SEmmanuel Vadot * Copyright (c) 2023, Dang Huynh <danct12@riseup.net> 4*2846c905SEmmanuel Vadot */ 5*2846c905SEmmanuel Vadot 6*2846c905SEmmanuel Vadot#include <dt-bindings/iio/qcom,spmi-vadc.h> 7*2846c905SEmmanuel Vadot#include <dt-bindings/input/linux-event-codes.h> 8*2846c905SEmmanuel Vadot#include <dt-bindings/spmi/spmi.h> 9*2846c905SEmmanuel Vadot 10*2846c905SEmmanuel Vadot/ { 11*2846c905SEmmanuel Vadot thermal-zones { 12*2846c905SEmmanuel Vadot pm8937-thermal { 13*2846c905SEmmanuel Vadot polling-delay-passive = <0>; 14*2846c905SEmmanuel Vadot polling-delay = <0>; 15*2846c905SEmmanuel Vadot thermal-sensors = <&pm8937_temp>; 16*2846c905SEmmanuel Vadot 17*2846c905SEmmanuel Vadot trips { 18*2846c905SEmmanuel Vadot trip0 { 19*2846c905SEmmanuel Vadot temperature = <105000>; 20*2846c905SEmmanuel Vadot hysteresis = <0>; 21*2846c905SEmmanuel Vadot type = "passive"; 22*2846c905SEmmanuel Vadot }; 23*2846c905SEmmanuel Vadot 24*2846c905SEmmanuel Vadot trip1 { 25*2846c905SEmmanuel Vadot temperature = <125000>; 26*2846c905SEmmanuel Vadot hysteresis = <0>; 27*2846c905SEmmanuel Vadot type = "hot"; 28*2846c905SEmmanuel Vadot }; 29*2846c905SEmmanuel Vadot 30*2846c905SEmmanuel Vadot trip2 { 31*2846c905SEmmanuel Vadot temperature = <145000>; 32*2846c905SEmmanuel Vadot hysteresis = <0>; 33*2846c905SEmmanuel Vadot type = "critical"; 34*2846c905SEmmanuel Vadot }; 35*2846c905SEmmanuel Vadot }; 36*2846c905SEmmanuel Vadot }; 37*2846c905SEmmanuel Vadot }; 38*2846c905SEmmanuel Vadot}; 39*2846c905SEmmanuel Vadot 40*2846c905SEmmanuel Vadot&spmi_bus { 41*2846c905SEmmanuel Vadot pmic@0 { 42*2846c905SEmmanuel Vadot compatible = "qcom,pm8937", "qcom,spmi-pmic"; 43*2846c905SEmmanuel Vadot reg = <0x0 SPMI_USID>; 44*2846c905SEmmanuel Vadot #address-cells = <1>; 45*2846c905SEmmanuel Vadot #size-cells = <0>; 46*2846c905SEmmanuel Vadot 47*2846c905SEmmanuel Vadot pon@800 { 48*2846c905SEmmanuel Vadot compatible = "qcom,pm8916-pon"; 49*2846c905SEmmanuel Vadot reg = <0x800>; 50*2846c905SEmmanuel Vadot mode-bootloader = <0x2>; 51*2846c905SEmmanuel Vadot mode-recovery = <0x1>; 52*2846c905SEmmanuel Vadot 53*2846c905SEmmanuel Vadot pm8937_pwrkey: pwrkey { 54*2846c905SEmmanuel Vadot compatible = "qcom,pm8941-pwrkey"; 55*2846c905SEmmanuel Vadot interrupts = <0 0x8 0 IRQ_TYPE_EDGE_BOTH>; 56*2846c905SEmmanuel Vadot debounce = <15625>; 57*2846c905SEmmanuel Vadot bias-pull-up; 58*2846c905SEmmanuel Vadot linux,code = <KEY_POWER>; 59*2846c905SEmmanuel Vadot }; 60*2846c905SEmmanuel Vadot 61*2846c905SEmmanuel Vadot pm8937_resin: resin { 62*2846c905SEmmanuel Vadot compatible = "qcom,pm8941-resin"; 63*2846c905SEmmanuel Vadot interrupts = <0 0x8 1 IRQ_TYPE_EDGE_BOTH>; 64*2846c905SEmmanuel Vadot debounce = <15625>; 65*2846c905SEmmanuel Vadot bias-pull-up; 66*2846c905SEmmanuel Vadot status = "disabled"; 67*2846c905SEmmanuel Vadot }; 68*2846c905SEmmanuel Vadot }; 69*2846c905SEmmanuel Vadot 70*2846c905SEmmanuel Vadot pm8937_gpios: gpio@c000 { 71*2846c905SEmmanuel Vadot compatible = "qcom,pm8937-gpio", "qcom,spmi-gpio"; 72*2846c905SEmmanuel Vadot reg = <0xc000>; 73*2846c905SEmmanuel Vadot gpio-controller; 74*2846c905SEmmanuel Vadot gpio-ranges = <&pm8937_gpios 0 0 8>; 75*2846c905SEmmanuel Vadot #gpio-cells = <2>; 76*2846c905SEmmanuel Vadot interrupt-controller; 77*2846c905SEmmanuel Vadot #interrupt-cells = <2>; 78*2846c905SEmmanuel Vadot }; 79*2846c905SEmmanuel Vadot 80*2846c905SEmmanuel Vadot pm8937_mpps: mpps@a000 { 81*2846c905SEmmanuel Vadot compatible = "qcom,pm8937-mpp", "qcom,spmi-mpp"; 82*2846c905SEmmanuel Vadot reg = <0xa000>; 83*2846c905SEmmanuel Vadot gpio-controller; 84*2846c905SEmmanuel Vadot gpio-ranges = <&pm8937_mpps 0 0 4>; 85*2846c905SEmmanuel Vadot #gpio-cells = <2>; 86*2846c905SEmmanuel Vadot interrupt-controller; 87*2846c905SEmmanuel Vadot #interrupt-cells = <2>; 88*2846c905SEmmanuel Vadot }; 89*2846c905SEmmanuel Vadot 90*2846c905SEmmanuel Vadot pm8937_temp: temp-alarm@2400 { 91*2846c905SEmmanuel Vadot compatible = "qcom,spmi-temp-alarm"; 92*2846c905SEmmanuel Vadot reg = <0x2400>; 93*2846c905SEmmanuel Vadot interrupts = <0 0x24 0 IRQ_TYPE_EDGE_RISING>; 94*2846c905SEmmanuel Vadot io-channels = <&pm8937_vadc VADC_DIE_TEMP>; 95*2846c905SEmmanuel Vadot io-channel-names = "thermal"; 96*2846c905SEmmanuel Vadot #thermal-sensor-cells = <0>; 97*2846c905SEmmanuel Vadot }; 98*2846c905SEmmanuel Vadot 99*2846c905SEmmanuel Vadot pm8937_vadc: adc@3100 { 100*2846c905SEmmanuel Vadot compatible = "qcom,spmi-vadc"; 101*2846c905SEmmanuel Vadot reg = <0x3100>; 102*2846c905SEmmanuel Vadot interrupts = <0 0x31 0 IRQ_TYPE_EDGE_RISING>; 103*2846c905SEmmanuel Vadot #address-cells = <1>; 104*2846c905SEmmanuel Vadot #size-cells = <0>; 105*2846c905SEmmanuel Vadot #io-channel-cells = <1>; 106*2846c905SEmmanuel Vadot 107*2846c905SEmmanuel Vadot channel@8 { 108*2846c905SEmmanuel Vadot reg = <VADC_DIE_TEMP>; 109*2846c905SEmmanuel Vadot }; 110*2846c905SEmmanuel Vadot 111*2846c905SEmmanuel Vadot channel@9 { 112*2846c905SEmmanuel Vadot reg = <VADC_REF_625MV>; 113*2846c905SEmmanuel Vadot }; 114*2846c905SEmmanuel Vadot 115*2846c905SEmmanuel Vadot channel@a { 116*2846c905SEmmanuel Vadot reg = <VADC_REF_1250MV>; 117*2846c905SEmmanuel Vadot }; 118*2846c905SEmmanuel Vadot 119*2846c905SEmmanuel Vadot channel@c { 120*2846c905SEmmanuel Vadot reg = <VADC_SPARE1>; 121*2846c905SEmmanuel Vadot }; 122*2846c905SEmmanuel Vadot 123*2846c905SEmmanuel Vadot channel@e { 124*2846c905SEmmanuel Vadot reg = <VADC_GND_REF>; 125*2846c905SEmmanuel Vadot }; 126*2846c905SEmmanuel Vadot 127*2846c905SEmmanuel Vadot channel@f { 128*2846c905SEmmanuel Vadot reg = <VADC_VDD_VADC>; 129*2846c905SEmmanuel Vadot }; 130*2846c905SEmmanuel Vadot }; 131*2846c905SEmmanuel Vadot 132*2846c905SEmmanuel Vadot rtc@6000 { 133*2846c905SEmmanuel Vadot compatible = "qcom,pm8941-rtc"; 134*2846c905SEmmanuel Vadot reg = <0x6000>, <0x6100>; 135*2846c905SEmmanuel Vadot reg-names = "rtc", "alarm"; 136*2846c905SEmmanuel Vadot interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>; 137*2846c905SEmmanuel Vadot }; 138*2846c905SEmmanuel Vadot }; 139*2846c905SEmmanuel Vadot 140*2846c905SEmmanuel Vadot pmic@1 { 141*2846c905SEmmanuel Vadot compatible = "qcom,pm8937", "qcom,spmi-pmic"; 142*2846c905SEmmanuel Vadot reg = <0x1 SPMI_USID>; 143*2846c905SEmmanuel Vadot #address-cells = <1>; 144*2846c905SEmmanuel Vadot #size-cells = <0>; 145*2846c905SEmmanuel Vadot 146*2846c905SEmmanuel Vadot pm8937_spmi_regulators: regulators { 147*2846c905SEmmanuel Vadot compatible = "qcom,pm8937-regulators"; 148*2846c905SEmmanuel Vadot }; 149*2846c905SEmmanuel Vadot }; 150*2846c905SEmmanuel Vadot}; 151