/* * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and * only version 2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ #include #include #include #include #include #include &spmi_bus { #address-cells = <2>; #size-cells = <0>; interrupt-controller; #interrupt-cells = <4>; qcom,pmxprairie@8 { compatible = "qcom,spmi-pmic"; reg = <0x8 SPMI_USID>; #address-cells = <2>; #size-cells = <0>; qcom,power-on@800 { compatible = "qcom,qpnp-power-on"; reg = <0x800 0x100>; interrupts = <0x8 0x8 0x0 IRQ_TYPE_EDGE_BOTH>, <0x8 0x8 0x1 IRQ_TYPE_EDGE_BOTH>; interrupt-names = "kpdpwr", "resin"; qcom,pon-dbc-delay = <15625>; qcom,kpdpwr-sw-debounce; qcom,system-reset; qcom,store-hard-reset-reason; qcom,pon_1 { qcom,pon-type = ; linux,code = ; qcom,pull-up; }; qcom,pon_2 { qcom,pon-type = ; linux,code = ; qcom,pull-up; }; }; pmxprairie_tz: qcom,temp-alarm@2400 { compatible = "qcom,spmi-temp-alarm"; reg = <0x2400 0x100>; interrupts = <0x8 0x24 0x0 IRQ_TYPE_EDGE_BOTH>; io-channels = <&pmxprairie_vadc ADC_DIE_TEMP>; io-channel-names = "thermal"; #thermal-sensor-cells = <0>; qcom,temperature-threshold-set = <1>; }; pmxprairie_clkdiv: clock-controller@5b00 { compatible = "qcom,spmi-clkdiv"; reg = <0x5b00 0x100>; #clock-cells = <1>; qcom,num-clkdivs = <1>; clock-output-names = "pmxprairie_div_clk1"; clocks = <&clock_rpmh RPMH_CXO_CLK>; clock-names = "xo"; }; pmxprairie_rtc: qcom,rtc@6000 { compatible = "qcom,qpnp-rtc"; #address-cells = <1>; #size-cells = <1>; qcom,qpnp-rtc-write = <0>; qcom,qpnp-rtc-alarm-pwrup = <0>; qcom,pmxprairie_rtc_rw@6000 { reg = <0x6000 0x100>; }; qcom,pmxprairie_rtc_alarm@6100 { reg = <0x6100 0x100>; interrupts = <0x8 0x61 0x1 IRQ_TYPE_EDGE_RISING>; }; }; pmxprairie_gpios: pinctrl@c000 { compatible = "qcom,spmi-gpio"; reg = <0xc000 0xb00>; interrupts = <0x8 0xc0 0x0 IRQ_TYPE_NONE>, <0x8 0xc1 0x0 IRQ_TYPE_NONE>, <0x8 0xc3 0x0 IRQ_TYPE_NONE>, <0x8 0xc4 0x0 IRQ_TYPE_NONE>, <0x8 0xc5 0x0 IRQ_TYPE_NONE>, <0x8 0xc7 0x0 IRQ_TYPE_NONE>, <0x8 0xc8 0x0 IRQ_TYPE_NONE>; interrupt-names = "pmxprairie_gpio1", "pmxprairie_gpio2", "pmxprairie_gpio4", "pmxprairie_gpio5", "pmxprairie_gpio6", "pmxprairie_gpio8", "pmxprairie_gpio9"; gpio-controller; #gpio-cells = <2>; qcom,gpios-disallowed = <3 7 10 11>; }; pmxprairie_vadc: vadc@3100 { compatible = "qcom,spmi-adc5"; reg = <0x3100 0x100>; #address-cells = <1>; #size-cells = <0>; interrupts = <0x8 0x31 0x0 IRQ_TYPE_EDGE_RISING>; interrupt-names = "eoc-int-en-set"; qcom,adc-vdd-reference = <1875>; #io-channel-cells = <1>; io-channel-ranges; /* Channel node */ ref_gnd { reg = ; label = "ref_gnd"; qcom,pre-scaling = <1 1>; }; vref_1p25 { reg = ; label = "vref_1p25"; qcom,pre-scaling = <1 1>; }; die_temp { reg = ; label = "die_temp"; qcom,pre-scaling = <1 1>; }; }; pmxprairie_adc_tm_iio: adc_tm@3500 { compatible = "qcom,adc-tm5-iio"; reg = <0x3500 0x100>; #address-cells = <1>; #size-cells = <0>; #thermal-sensor-cells = <1>; io-channels = <&pmxprairie_vadc ADC_XO_THERM_PU2>, <&pmxprairie_vadc ADC_AMUX_THM1_PU2>, <&pmxprairie_vadc ADC_AMUX_THM2_PU2>, <&pmxprairie_vadc ADC_AMUX_THM3_PU2>, <&pmxprairie_vadc ADC_GPIO1_PU2>; }; }; qcom,pmxprairie@9 { compatible ="qcom,spmi-pmic"; reg = <0x9 SPMI_USID>; #address-cells = <2>; #size-cells = <0>; }; }; &thermal_zones { pmxprairie_temp_alarm: pmxprairie_tz { polling-delay-passive = <0>; polling-delay = <0>; thermal-governor = "step_wise"; thermal-sensors = <&pmxprairie_tz>; wake-capable-sensor; trips { pmxprairie_trip0: trip0 { temperature = <95000>; hysteresis = <0>; type = "passive"; }; pmxprairie_trip1: trip1 { temperature = <115000>; hysteresis = <0>; type = "passive"; }; pmxprairie_trip2: trip2 { temperature = <145000>; hysteresis = <0>; type = "passive"; }; }; }; }; &soc { vbus_detect: qcom,pmd-vbus-det { compatible = "qcom,pmd-vbus-det"; interrupt-parent = <&spmi_bus>; interrupts = <0x8 0x0d 0x0 IRQ_TYPE_NONE>; interrupt-names = "usb_vbus"; status = "disabled"; }; };