1f126890aSEmmanuel Vadot// SPDX-License-Identifier: BSD-3-Clause 2f126890aSEmmanuel Vadot/* 3f126890aSEmmanuel Vadot * Copyright (C) 2023 Luca Weiss <luca@z3ntu.xyz> 4f126890aSEmmanuel Vadot */ 5f126890aSEmmanuel Vadot 6f126890aSEmmanuel Vadot#include <dt-bindings/iio/qcom,spmi-vadc.h> 7f126890aSEmmanuel Vadot#include <dt-bindings/interrupt-controller/irq.h> 8f126890aSEmmanuel Vadot#include <dt-bindings/spmi/spmi.h> 9f126890aSEmmanuel Vadot 10f126890aSEmmanuel Vadot/ { 11f126890aSEmmanuel Vadot thermal-zones { 12f126890aSEmmanuel Vadot pmi632-thermal { 13f126890aSEmmanuel Vadot polling-delay-passive = <100>; 14f126890aSEmmanuel Vadot 15f126890aSEmmanuel Vadot thermal-sensors = <&pmi632_temp>; 16f126890aSEmmanuel Vadot 17f126890aSEmmanuel Vadot trips { 18f126890aSEmmanuel Vadot trip0 { 19f126890aSEmmanuel Vadot temperature = <95000>; 20f126890aSEmmanuel Vadot hysteresis = <0>; 21f126890aSEmmanuel Vadot type = "passive"; 22f126890aSEmmanuel Vadot }; 23f126890aSEmmanuel Vadot 24f126890aSEmmanuel Vadot trip1 { 25f126890aSEmmanuel Vadot temperature = <115000>; 26f126890aSEmmanuel Vadot hysteresis = <0>; 27f126890aSEmmanuel Vadot type = "hot"; 28f126890aSEmmanuel Vadot }; 29f126890aSEmmanuel Vadot 30f126890aSEmmanuel Vadot trip2 { 31f126890aSEmmanuel Vadot temperature = <125000>; 32f126890aSEmmanuel Vadot hysteresis = <0>; 33f126890aSEmmanuel Vadot type = "critical"; 34f126890aSEmmanuel Vadot }; 35f126890aSEmmanuel Vadot }; 36f126890aSEmmanuel Vadot }; 37f126890aSEmmanuel Vadot }; 38f126890aSEmmanuel Vadot}; 39f126890aSEmmanuel Vadot 40f126890aSEmmanuel Vadot&spmi_bus { 41f126890aSEmmanuel Vadot pmic@2 { 42f126890aSEmmanuel Vadot compatible = "qcom,pmi632", "qcom,spmi-pmic"; 43f126890aSEmmanuel Vadot reg = <0x2 SPMI_USID>; 44f126890aSEmmanuel Vadot #address-cells = <1>; 45f126890aSEmmanuel Vadot #size-cells = <0>; 46f126890aSEmmanuel Vadot 4701950c46SEmmanuel Vadot pmi632_vbus: usb-vbus-regulator@1100 { 4801950c46SEmmanuel Vadot compatible = "qcom,pmi632-vbus-reg", "qcom,pm8150b-vbus-reg"; 4901950c46SEmmanuel Vadot reg = <0x1100>; 5001950c46SEmmanuel Vadot status = "disabled"; 5101950c46SEmmanuel Vadot }; 5201950c46SEmmanuel Vadot 5301950c46SEmmanuel Vadot pmi632_typec: typec@1500 { 5401950c46SEmmanuel Vadot compatible = "qcom,pmi632-typec"; 5501950c46SEmmanuel Vadot reg = <0x1500>; 5601950c46SEmmanuel Vadot interrupts = <0x2 0x15 0x00 IRQ_TYPE_EDGE_RISING>, 5701950c46SEmmanuel Vadot <0x2 0x15 0x01 IRQ_TYPE_EDGE_BOTH>, 5801950c46SEmmanuel Vadot <0x2 0x15 0x02 IRQ_TYPE_EDGE_RISING>, 5901950c46SEmmanuel Vadot <0x2 0x15 0x03 IRQ_TYPE_EDGE_BOTH>, 6001950c46SEmmanuel Vadot <0x2 0x15 0x04 IRQ_TYPE_EDGE_RISING>, 6101950c46SEmmanuel Vadot <0x2 0x15 0x05 IRQ_TYPE_EDGE_RISING>, 6201950c46SEmmanuel Vadot <0x2 0x15 0x06 IRQ_TYPE_EDGE_BOTH>, 6301950c46SEmmanuel Vadot <0x2 0x15 0x07 IRQ_TYPE_EDGE_RISING>; 6401950c46SEmmanuel Vadot interrupt-names = "or-rid-detect-change", 6501950c46SEmmanuel Vadot "vpd-detect", 6601950c46SEmmanuel Vadot "cc-state-change", 6701950c46SEmmanuel Vadot "vconn-oc", 6801950c46SEmmanuel Vadot "vbus-change", 6901950c46SEmmanuel Vadot "attach-detach", 7001950c46SEmmanuel Vadot "legacy-cable-detect", 7101950c46SEmmanuel Vadot "try-snk-src-detect"; 7201950c46SEmmanuel Vadot vdd-vbus-supply = <&pmi632_vbus>; 7301950c46SEmmanuel Vadot 7401950c46SEmmanuel Vadot status = "disabled"; 7501950c46SEmmanuel Vadot }; 7601950c46SEmmanuel Vadot 77f126890aSEmmanuel Vadot pmi632_temp: temp-alarm@2400 { 78f126890aSEmmanuel Vadot compatible = "qcom,spmi-temp-alarm"; 79f126890aSEmmanuel Vadot reg = <0x2400>; 80f126890aSEmmanuel Vadot interrupts = <0x2 0x24 0x0 IRQ_TYPE_EDGE_BOTH>; 81f126890aSEmmanuel Vadot #thermal-sensor-cells = <0>; 82f126890aSEmmanuel Vadot }; 83f126890aSEmmanuel Vadot 84f126890aSEmmanuel Vadot pmi632_adc: adc@3100 { 85f126890aSEmmanuel Vadot compatible = "qcom,spmi-adc5"; 86f126890aSEmmanuel Vadot reg = <0x3100>; 87f126890aSEmmanuel Vadot #address-cells = <1>; 88f126890aSEmmanuel Vadot #size-cells = <0>; 89f126890aSEmmanuel Vadot #io-channel-cells = <1>; 90f126890aSEmmanuel Vadot interrupts = <0x2 0x31 0x0 IRQ_TYPE_EDGE_RISING>; 91f126890aSEmmanuel Vadot 92f126890aSEmmanuel Vadot channel@0 { 93f126890aSEmmanuel Vadot reg = <ADC5_REF_GND>; 94f126890aSEmmanuel Vadot qcom,pre-scaling = <1 1>; 95f126890aSEmmanuel Vadot label = "ref_gnd"; 96f126890aSEmmanuel Vadot }; 97f126890aSEmmanuel Vadot 98f126890aSEmmanuel Vadot channel@1 { 99f126890aSEmmanuel Vadot reg = <ADC5_1P25VREF>; 100f126890aSEmmanuel Vadot qcom,pre-scaling = <1 1>; 101f126890aSEmmanuel Vadot label = "vref_1p25"; 102f126890aSEmmanuel Vadot }; 103f126890aSEmmanuel Vadot 104f126890aSEmmanuel Vadot channel@6 { 105f126890aSEmmanuel Vadot reg = <ADC5_DIE_TEMP>; 106f126890aSEmmanuel Vadot qcom,pre-scaling = <1 1>; 107f126890aSEmmanuel Vadot label = "die_temp"; 108f126890aSEmmanuel Vadot }; 109f126890aSEmmanuel Vadot 110f126890aSEmmanuel Vadot channel@7 { 111f126890aSEmmanuel Vadot reg = <ADC5_USB_IN_I>; 112f126890aSEmmanuel Vadot qcom,pre-scaling = <1 1>; 113f126890aSEmmanuel Vadot label = "usb_in_i_uv"; 114f126890aSEmmanuel Vadot }; 115f126890aSEmmanuel Vadot 116f126890aSEmmanuel Vadot channel@8 { 117f126890aSEmmanuel Vadot reg = <ADC5_USB_IN_V_16>; 118f126890aSEmmanuel Vadot qcom,pre-scaling = <1 16>; 119f126890aSEmmanuel Vadot label = "usb_in_v_div_16"; 120f126890aSEmmanuel Vadot }; 121f126890aSEmmanuel Vadot 122f126890aSEmmanuel Vadot channel@9 { 123f126890aSEmmanuel Vadot reg = <ADC5_CHG_TEMP>; 124f126890aSEmmanuel Vadot qcom,pre-scaling = <1 1>; 125f126890aSEmmanuel Vadot label = "chg_temp"; 126f126890aSEmmanuel Vadot }; 127f126890aSEmmanuel Vadot 128f126890aSEmmanuel Vadot channel@4b { 129f126890aSEmmanuel Vadot reg = <ADC5_BAT_ID_100K_PU>; 130f126890aSEmmanuel Vadot qcom,hw-settle-time = <200>; 131f126890aSEmmanuel Vadot qcom,pre-scaling = <1 1>; 132f126890aSEmmanuel Vadot qcom,ratiometric; 133f126890aSEmmanuel Vadot label = "bat_id"; 134f126890aSEmmanuel Vadot }; 135f126890aSEmmanuel Vadot 136f126890aSEmmanuel Vadot channel@83 { 137f126890aSEmmanuel Vadot reg = <ADC5_VPH_PWR>; 138f126890aSEmmanuel Vadot qcom,pre-scaling = <1 3>; 139f126890aSEmmanuel Vadot label = "vph_pwr"; 140f126890aSEmmanuel Vadot }; 141f126890aSEmmanuel Vadot 142f126890aSEmmanuel Vadot channel@84 { 143f126890aSEmmanuel Vadot reg = <ADC5_VBAT_SNS>; 144f126890aSEmmanuel Vadot qcom,pre-scaling = <1 3>; 145f126890aSEmmanuel Vadot label = "vbat_sns"; 146f126890aSEmmanuel Vadot }; 147f126890aSEmmanuel Vadot }; 148f126890aSEmmanuel Vadot 149f126890aSEmmanuel Vadot pmi632_adc_tm: adc-tm@3500 { 150f126890aSEmmanuel Vadot compatible = "qcom,spmi-adc-tm5"; 151f126890aSEmmanuel Vadot reg = <0x3500>; 152f126890aSEmmanuel Vadot interrupts = <0x2 0x35 0x0 IRQ_TYPE_EDGE_RISING>; 153f126890aSEmmanuel Vadot #thermal-sensor-cells = <1>; 154f126890aSEmmanuel Vadot #address-cells = <1>; 155f126890aSEmmanuel Vadot #size-cells = <0>; 156f126890aSEmmanuel Vadot status = "disabled"; 157f126890aSEmmanuel Vadot }; 158f126890aSEmmanuel Vadot 15901950c46SEmmanuel Vadot pmi632_pbs_client3: pbs@7400 { 16001950c46SEmmanuel Vadot compatible = "qcom,pmi632-pbs", "qcom,pbs"; 16101950c46SEmmanuel Vadot reg = <0x7400>; 16201950c46SEmmanuel Vadot }; 16301950c46SEmmanuel Vadot 164f126890aSEmmanuel Vadot pmi632_sdam_7: nvram@b600 { 165f126890aSEmmanuel Vadot compatible = "qcom,spmi-sdam"; 166f126890aSEmmanuel Vadot reg = <0xb600>; 167f126890aSEmmanuel Vadot #address-cells = <1>; 168f126890aSEmmanuel Vadot #size-cells = <1>; 169f126890aSEmmanuel Vadot ranges = <0 0xb600 0x100>; 170f126890aSEmmanuel Vadot }; 171f126890aSEmmanuel Vadot 172f126890aSEmmanuel Vadot pmi632_gpios: gpio@c000 { 173f126890aSEmmanuel Vadot compatible = "qcom,pmi632-gpio", "qcom,spmi-gpio"; 174f126890aSEmmanuel Vadot reg = <0xc000>; 175f126890aSEmmanuel Vadot gpio-controller; 176f126890aSEmmanuel Vadot gpio-ranges = <&pmi632_gpios 0 0 8>; 177f126890aSEmmanuel Vadot #gpio-cells = <2>; 178f126890aSEmmanuel Vadot interrupt-controller; 179f126890aSEmmanuel Vadot #interrupt-cells = <2>; 180f126890aSEmmanuel Vadot }; 181f126890aSEmmanuel Vadot }; 182f126890aSEmmanuel Vadot 183f126890aSEmmanuel Vadot pmic@3 { 184f126890aSEmmanuel Vadot compatible = "qcom,pmi632", "qcom,spmi-pmic"; 185f126890aSEmmanuel Vadot reg = <0x3 SPMI_USID>; 186f126890aSEmmanuel Vadot #address-cells = <1>; 187f126890aSEmmanuel Vadot #size-cells = <0>; 188f126890aSEmmanuel Vadot 189f126890aSEmmanuel Vadot pmi632_lpg: pwm { 190f126890aSEmmanuel Vadot compatible = "qcom,pmi632-lpg"; 191f126890aSEmmanuel Vadot 19201950c46SEmmanuel Vadot nvmem = <&pmi632_sdam_7>; 19301950c46SEmmanuel Vadot nvmem-names = "lpg_chan_sdam"; 19401950c46SEmmanuel Vadot qcom,pbs = <&pmi632_pbs_client3>; 19501950c46SEmmanuel Vadot 196f126890aSEmmanuel Vadot #address-cells = <1>; 197f126890aSEmmanuel Vadot #size-cells = <0>; 198f126890aSEmmanuel Vadot #pwm-cells = <2>; 199f126890aSEmmanuel Vadot 200f126890aSEmmanuel Vadot status = "disabled"; 201f126890aSEmmanuel Vadot }; 202*0e8011faSEmmanuel Vadot 203*0e8011faSEmmanuel Vadot pmi632_vib: vibrator@5700 { 204*0e8011faSEmmanuel Vadot compatible = "qcom,pmi632-vib"; 205*0e8011faSEmmanuel Vadot reg = <0x5700>; 206*0e8011faSEmmanuel Vadot status = "disabled"; 207*0e8011faSEmmanuel Vadot }; 208f126890aSEmmanuel Vadot }; 209f126890aSEmmanuel Vadot}; 210