1*455a4c46SDmitry Baryshkov// SPDX-License-Identifier: BSD-3-Clause 2*455a4c46SDmitry Baryshkov#include <dt-bindings/iio/qcom,spmi-vadc.h> 3*455a4c46SDmitry Baryshkov#include <dt-bindings/input/linux-event-codes.h> 4*455a4c46SDmitry Baryshkov#include <dt-bindings/interrupt-controller/irq.h> 5*455a4c46SDmitry Baryshkov#include <dt-bindings/spmi/spmi.h> 6*455a4c46SDmitry Baryshkov 7*455a4c46SDmitry Baryshkov/ { 8*455a4c46SDmitry Baryshkov thermal-zones { 9*455a4c46SDmitry Baryshkov pm8226-thermal { 10*455a4c46SDmitry Baryshkov polling-delay-passive = <100>; 11*455a4c46SDmitry Baryshkov polling-delay = <0>; 12*455a4c46SDmitry Baryshkov thermal-sensors = <&pm8226_temp>; 13*455a4c46SDmitry Baryshkov 14*455a4c46SDmitry Baryshkov trips { 15*455a4c46SDmitry Baryshkov trip0 { 16*455a4c46SDmitry Baryshkov temperature = <105000>; 17*455a4c46SDmitry Baryshkov hysteresis = <2000>; 18*455a4c46SDmitry Baryshkov type = "passive"; 19*455a4c46SDmitry Baryshkov }; 20*455a4c46SDmitry Baryshkov 21*455a4c46SDmitry Baryshkov trip1 { 22*455a4c46SDmitry Baryshkov temperature = <125000>; 23*455a4c46SDmitry Baryshkov hysteresis = <2000>; 24*455a4c46SDmitry Baryshkov type = "hot"; 25*455a4c46SDmitry Baryshkov }; 26*455a4c46SDmitry Baryshkov 27*455a4c46SDmitry Baryshkov crit { 28*455a4c46SDmitry Baryshkov temperature = <145000>; 29*455a4c46SDmitry Baryshkov hysteresis = <2000>; 30*455a4c46SDmitry Baryshkov type = "critical"; 31*455a4c46SDmitry Baryshkov }; 32*455a4c46SDmitry Baryshkov }; 33*455a4c46SDmitry Baryshkov }; 34*455a4c46SDmitry Baryshkov }; 35*455a4c46SDmitry Baryshkov}; 36*455a4c46SDmitry Baryshkov 37*455a4c46SDmitry Baryshkov&spmi_bus { 38*455a4c46SDmitry Baryshkov pm8226_0: pm8226@0 { 39*455a4c46SDmitry Baryshkov compatible = "qcom,pm8226", "qcom,spmi-pmic"; 40*455a4c46SDmitry Baryshkov reg = <0x0 SPMI_USID>; 41*455a4c46SDmitry Baryshkov #address-cells = <1>; 42*455a4c46SDmitry Baryshkov #size-cells = <0>; 43*455a4c46SDmitry Baryshkov 44*455a4c46SDmitry Baryshkov pon@800 { 45*455a4c46SDmitry Baryshkov compatible = "qcom,pm8916-pon"; 46*455a4c46SDmitry Baryshkov reg = <0x800>; 47*455a4c46SDmitry Baryshkov 48*455a4c46SDmitry Baryshkov pwrkey { 49*455a4c46SDmitry Baryshkov compatible = "qcom,pm8941-pwrkey"; 50*455a4c46SDmitry Baryshkov interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>; 51*455a4c46SDmitry Baryshkov debounce = <15625>; 52*455a4c46SDmitry Baryshkov bias-pull-up; 53*455a4c46SDmitry Baryshkov linux,code = <KEY_POWER>; 54*455a4c46SDmitry Baryshkov }; 55*455a4c46SDmitry Baryshkov 56*455a4c46SDmitry Baryshkov pm8226_resin: resin { 57*455a4c46SDmitry Baryshkov compatible = "qcom,pm8941-resin"; 58*455a4c46SDmitry Baryshkov interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>; 59*455a4c46SDmitry Baryshkov debounce = <15625>; 60*455a4c46SDmitry Baryshkov bias-pull-up; 61*455a4c46SDmitry Baryshkov status = "disabled"; 62*455a4c46SDmitry Baryshkov }; 63*455a4c46SDmitry Baryshkov }; 64*455a4c46SDmitry Baryshkov 65*455a4c46SDmitry Baryshkov smbb: charger@1000 { 66*455a4c46SDmitry Baryshkov compatible = "qcom,pm8226-charger"; 67*455a4c46SDmitry Baryshkov reg = <0x1000>; 68*455a4c46SDmitry Baryshkov interrupts = <0x0 0x10 7 IRQ_TYPE_EDGE_BOTH>, 69*455a4c46SDmitry Baryshkov <0x0 0x10 5 IRQ_TYPE_EDGE_BOTH>, 70*455a4c46SDmitry Baryshkov <0x0 0x10 4 IRQ_TYPE_EDGE_BOTH>, 71*455a4c46SDmitry Baryshkov <0x0 0x12 1 IRQ_TYPE_EDGE_BOTH>, 72*455a4c46SDmitry Baryshkov <0x0 0x12 0 IRQ_TYPE_EDGE_BOTH>, 73*455a4c46SDmitry Baryshkov <0x0 0x13 2 IRQ_TYPE_EDGE_BOTH>, 74*455a4c46SDmitry Baryshkov <0x0 0x13 1 IRQ_TYPE_EDGE_BOTH>, 75*455a4c46SDmitry Baryshkov <0x0 0x14 1 IRQ_TYPE_EDGE_BOTH>; 76*455a4c46SDmitry Baryshkov interrupt-names = "chg-done", 77*455a4c46SDmitry Baryshkov "chg-fast", 78*455a4c46SDmitry Baryshkov "chg-trkl", 79*455a4c46SDmitry Baryshkov "bat-temp-ok", 80*455a4c46SDmitry Baryshkov "bat-present", 81*455a4c46SDmitry Baryshkov "chg-gone", 82*455a4c46SDmitry Baryshkov "usb-valid", 83*455a4c46SDmitry Baryshkov "dc-valid"; 84*455a4c46SDmitry Baryshkov 85*455a4c46SDmitry Baryshkov chg_otg: otg-vbus { }; 86*455a4c46SDmitry Baryshkov }; 87*455a4c46SDmitry Baryshkov 88*455a4c46SDmitry Baryshkov pm8226_temp: temp-alarm@2400 { 89*455a4c46SDmitry Baryshkov compatible = "qcom,spmi-temp-alarm"; 90*455a4c46SDmitry Baryshkov reg = <0x2400>; 91*455a4c46SDmitry Baryshkov interrupts = <0 0x24 0 IRQ_TYPE_EDGE_RISING>; 92*455a4c46SDmitry Baryshkov io-channels = <&pm8226_vadc VADC_DIE_TEMP>; 93*455a4c46SDmitry Baryshkov io-channel-names = "thermal"; 94*455a4c46SDmitry Baryshkov #thermal-sensor-cells = <0>; 95*455a4c46SDmitry Baryshkov }; 96*455a4c46SDmitry Baryshkov 97*455a4c46SDmitry Baryshkov pm8226_vadc: adc@3100 { 98*455a4c46SDmitry Baryshkov compatible = "qcom,spmi-vadc"; 99*455a4c46SDmitry Baryshkov reg = <0x3100>; 100*455a4c46SDmitry Baryshkov interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>; 101*455a4c46SDmitry Baryshkov #address-cells = <1>; 102*455a4c46SDmitry Baryshkov #size-cells = <0>; 103*455a4c46SDmitry Baryshkov #io-channel-cells = <1>; 104*455a4c46SDmitry Baryshkov 105*455a4c46SDmitry Baryshkov channel@7 { 106*455a4c46SDmitry Baryshkov reg = <VADC_VSYS>; 107*455a4c46SDmitry Baryshkov qcom,pre-scaling = <1 3>; 108*455a4c46SDmitry Baryshkov label = "vph_pwr"; 109*455a4c46SDmitry Baryshkov }; 110*455a4c46SDmitry Baryshkov channel@8 { 111*455a4c46SDmitry Baryshkov reg = <VADC_DIE_TEMP>; 112*455a4c46SDmitry Baryshkov label = "die_temp"; 113*455a4c46SDmitry Baryshkov }; 114*455a4c46SDmitry Baryshkov channel@9 { 115*455a4c46SDmitry Baryshkov reg = <VADC_REF_625MV>; 116*455a4c46SDmitry Baryshkov label = "ref_625mv"; 117*455a4c46SDmitry Baryshkov }; 118*455a4c46SDmitry Baryshkov channel@a { 119*455a4c46SDmitry Baryshkov reg = <VADC_REF_1250MV>; 120*455a4c46SDmitry Baryshkov label = "ref_1250mv"; 121*455a4c46SDmitry Baryshkov }; 122*455a4c46SDmitry Baryshkov channel@e { 123*455a4c46SDmitry Baryshkov reg = <VADC_GND_REF>; 124*455a4c46SDmitry Baryshkov }; 125*455a4c46SDmitry Baryshkov channel@f { 126*455a4c46SDmitry Baryshkov reg = <VADC_VDD_VADC>; 127*455a4c46SDmitry Baryshkov }; 128*455a4c46SDmitry Baryshkov }; 129*455a4c46SDmitry Baryshkov 130*455a4c46SDmitry Baryshkov pm8226_iadc: adc@3600 { 131*455a4c46SDmitry Baryshkov compatible = "qcom,pm8226-iadc", "qcom,spmi-iadc"; 132*455a4c46SDmitry Baryshkov reg = <0x3600>; 133*455a4c46SDmitry Baryshkov interrupts = <0x0 0x36 0x0 IRQ_TYPE_EDGE_RISING>; 134*455a4c46SDmitry Baryshkov }; 135*455a4c46SDmitry Baryshkov 136*455a4c46SDmitry Baryshkov rtc@6000 { 137*455a4c46SDmitry Baryshkov compatible = "qcom,pm8941-rtc"; 138*455a4c46SDmitry Baryshkov reg = <0x6000>, <0x6100>; 139*455a4c46SDmitry Baryshkov reg-names = "rtc", "alarm"; 140*455a4c46SDmitry Baryshkov interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>; 141*455a4c46SDmitry Baryshkov }; 142*455a4c46SDmitry Baryshkov 143*455a4c46SDmitry Baryshkov pm8226_mpps: mpps@a000 { 144*455a4c46SDmitry Baryshkov compatible = "qcom,pm8226-mpp", "qcom,spmi-mpp"; 145*455a4c46SDmitry Baryshkov reg = <0xa000>; 146*455a4c46SDmitry Baryshkov gpio-controller; 147*455a4c46SDmitry Baryshkov #gpio-cells = <2>; 148*455a4c46SDmitry Baryshkov gpio-ranges = <&pm8226_mpps 0 0 8>; 149*455a4c46SDmitry Baryshkov interrupt-controller; 150*455a4c46SDmitry Baryshkov #interrupt-cells = <2>; 151*455a4c46SDmitry Baryshkov }; 152*455a4c46SDmitry Baryshkov 153*455a4c46SDmitry Baryshkov pm8226_gpios: gpio@c000 { 154*455a4c46SDmitry Baryshkov compatible = "qcom,pm8226-gpio", "qcom,spmi-gpio"; 155*455a4c46SDmitry Baryshkov reg = <0xc000>; 156*455a4c46SDmitry Baryshkov gpio-controller; 157*455a4c46SDmitry Baryshkov #gpio-cells = <2>; 158*455a4c46SDmitry Baryshkov gpio-ranges = <&pm8226_gpios 0 0 8>; 159*455a4c46SDmitry Baryshkov interrupt-controller; 160*455a4c46SDmitry Baryshkov #interrupt-cells = <2>; 161*455a4c46SDmitry Baryshkov }; 162*455a4c46SDmitry Baryshkov }; 163*455a4c46SDmitry Baryshkov 164*455a4c46SDmitry Baryshkov pm8226_1: pm8226@1 { 165*455a4c46SDmitry Baryshkov compatible = "qcom,pm8226", "qcom,spmi-pmic"; 166*455a4c46SDmitry Baryshkov reg = <0x1 SPMI_USID>; 167*455a4c46SDmitry Baryshkov #address-cells = <1>; 168*455a4c46SDmitry Baryshkov #size-cells = <0>; 169*455a4c46SDmitry Baryshkov 170*455a4c46SDmitry Baryshkov pm8226_spmi_regulators: regulators { 171*455a4c46SDmitry Baryshkov compatible = "qcom,pm8226-regulators"; 172*455a4c46SDmitry Baryshkov }; 173*455a4c46SDmitry Baryshkov 174*455a4c46SDmitry Baryshkov pm8226_vib: vibrator@c000 { 175*455a4c46SDmitry Baryshkov compatible = "qcom,pm8916-vib"; 176*455a4c46SDmitry Baryshkov reg = <0xc000>; 177*455a4c46SDmitry Baryshkov status = "disabled"; 178*455a4c46SDmitry Baryshkov }; 179*455a4c46SDmitry Baryshkov }; 180*455a4c46SDmitry Baryshkov}; 181