mirror of
				https://github.com/oplus-giulia-dev/android_kernel_oneplus_sm8650-devicetrees
				synced 2025-11-04 06:44:04 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			163 lines
		
	
	
		
			3.5 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			163 lines
		
	
	
		
			3.5 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
#include <dt-bindings/input/input.h>
 | 
						|
#include <dt-bindings/interrupt-controller/irq.h>
 | 
						|
#include <dt-bindings/spmi/spmi.h>
 | 
						|
#include <dt-bindings/iio/qcom,spmi-adc5-gen4-pmar2230.h>
 | 
						|
 | 
						|
&spmi_bus {
 | 
						|
	#address-cells = <2>;
 | 
						|
	#size-cells = <0>;
 | 
						|
	interrupt-controller;
 | 
						|
	#interrupt-cells = <4>;
 | 
						|
 | 
						|
	pmar2230@0 {
 | 
						|
		compatible = "qcom,spmi-pmic";
 | 
						|
		reg = <0 SPMI_USID>;
 | 
						|
		#address-cells = <1>;
 | 
						|
		#size-cells = <0>;
 | 
						|
 | 
						|
		pmar2230_tz: pmar2230-temp-alarm@a00 {
 | 
						|
			compatible = "qcom,spmi-temp-alarm";
 | 
						|
			reg = <0xa00>;
 | 
						|
			interrupts = <0x0 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
 | 
						|
			#thermal-sensor-cells = <0>;
 | 
						|
			io-channels = <&pmar2230_vadc PMAR2230_ADC5_GEN4_DIE_TEMP>;
 | 
						|
			io-channel-names = "thermal";
 | 
						|
		};
 | 
						|
 | 
						|
		pmar2230_gpios: pinctrl@8800 {
 | 
						|
			compatible = "qcom,pmar2230-gpio";
 | 
						|
			reg = <0x8800>;
 | 
						|
			gpio-controller;
 | 
						|
			#gpio-cells = <2>;
 | 
						|
			interrupt-controller;
 | 
						|
			#interrupt-cells = <2>;
 | 
						|
		};
 | 
						|
 | 
						|
		pon_hlos@C00 {
 | 
						|
			compatible = "qcom,pmk8350-pon";
 | 
						|
			reg = <0xC00>, <0x800>;
 | 
						|
			reg-names = "hlos", "pbs";
 | 
						|
 | 
						|
			pwrkey {
 | 
						|
				compatible = "qcom,pmk8350-pwrkey";
 | 
						|
				interrupts = <0x0 0xC 0x7 IRQ_TYPE_EDGE_BOTH>;
 | 
						|
				linux,code = <KEY_POWER>;
 | 
						|
			};
 | 
						|
 | 
						|
			resin {
 | 
						|
				compatible = "qcom,pmk8350-resin";
 | 
						|
				interrupts = <0x0 0xC 0x6 IRQ_TYPE_EDGE_BOTH>;
 | 
						|
				linux,code = <KEY_VOLUMEDOWN>;
 | 
						|
			};
 | 
						|
		};
 | 
						|
 | 
						|
		pmar2230_rtc: rtc@6400 {
 | 
						|
			compatible = "qcom,pm5100-rtc";
 | 
						|
			reg = <0x6400>, <0x6500>;
 | 
						|
			reg-names = "rtc", "alarm";
 | 
						|
			interrupts = <0x0 0x65 0x1 IRQ_TYPE_EDGE_RISING>;
 | 
						|
		};
 | 
						|
 | 
						|
		pmar2230_sdam_1: sdam@7000 {
 | 
						|
			compatible = "qcom,spmi-sdam";
 | 
						|
			reg = <0x7000>;
 | 
						|
			#address-cells = <1>;
 | 
						|
			#size-cells = <1>;
 | 
						|
		};
 | 
						|
 | 
						|
		pmar2230_sdam_2: sdam@7100 {
 | 
						|
			compatible = "qcom,spmi-sdam";
 | 
						|
			reg = <0x7100>;
 | 
						|
			#address-cells = <1>;
 | 
						|
			#size-cells = <1>;
 | 
						|
		};
 | 
						|
 | 
						|
		pmar2230_sdam_5: sdam@7400 {
 | 
						|
			compatible = "qcom,spmi-sdam";
 | 
						|
			reg = <0x7400>;
 | 
						|
		};
 | 
						|
 | 
						|
		pmar2230_pwm_1: pwms@e800 {
 | 
						|
			compatible = "qcom,pwm-lpg";
 | 
						|
			reg = <0xe800>;
 | 
						|
			reg-names = "lpg-base";
 | 
						|
			#pwm-cells = <2>;
 | 
						|
			qcom,num-lpg-channels = <1>;
 | 
						|
		};
 | 
						|
 | 
						|
		pmar2230_pwm_2: pwms@e900 {
 | 
						|
			compatible = "qcom,pwm-lpg";
 | 
						|
			reg = <0xe900>;
 | 
						|
			reg-names = "lpg-base";
 | 
						|
			#pwm-cells = <2>;
 | 
						|
			qcom,num-lpg-channels = <1>;
 | 
						|
		};
 | 
						|
 | 
						|
		pmar2230_vadc: vadc@7900 {
 | 
						|
			compatible = "qcom,spmi-adc5-gen4";
 | 
						|
			reg = <0x7900>;
 | 
						|
			#address-cells = <1>;
 | 
						|
			#size-cells = <0>;
 | 
						|
			interrupts = <0x0 0x79 0x1 IRQ_TYPE_EDGE_RISING>;
 | 
						|
			interrupt-names = "adc-sdam0";
 | 
						|
			#thermal-sensor-cells = <1>;
 | 
						|
			#io-channel-cells = <1>;
 | 
						|
			io-channel-ranges;
 | 
						|
 | 
						|
			/* PMAR2230 Channel nodes */
 | 
						|
			pmar2230_offset_ref {
 | 
						|
				reg = <PMAR2230_ADC5_GEN4_OFFSET_REF>;
 | 
						|
				label = "pmar2230_offset_ref";
 | 
						|
				qcom,pre-scaling = <1 1>;
 | 
						|
			};
 | 
						|
 | 
						|
			pmar2230_vref_1p25 {
 | 
						|
				reg = <PMAR2230_ADC5_GEN4_1P25VREF>;
 | 
						|
				label = "pmar2230_vref_1p25";
 | 
						|
				qcom,pre-scaling = <1 1>;
 | 
						|
			};
 | 
						|
 | 
						|
			pmar2230_die_temp {
 | 
						|
				reg = <PMAR2230_ADC5_GEN4_DIE_TEMP>;
 | 
						|
				label = "pmar2230_die_temp";
 | 
						|
				qcom,pre-scaling = <1 1>;
 | 
						|
			};
 | 
						|
 | 
						|
			pmar2230_vph_pwr {
 | 
						|
				reg = <PMAR2230_ADC5_GEN4_VPH_PWR>;
 | 
						|
				label = "pm2230_vph_pwr";
 | 
						|
				qcom,pre-scaling = <1 3>;
 | 
						|
			};
 | 
						|
		};
 | 
						|
	};
 | 
						|
};
 | 
						|
 | 
						|
&thermal_zones {
 | 
						|
	pmar2230_temp_alarm: pmar2230_tz {
 | 
						|
		polling-delay-passive = <100>;
 | 
						|
		polling-delay = <0>;
 | 
						|
		thermal-governor = "step_wise";
 | 
						|
		thermal-sensors = <&pmar2230_tz>;
 | 
						|
 | 
						|
		trips {
 | 
						|
			pmar2230_trip0: trip0 {
 | 
						|
				temperature = <95000>;
 | 
						|
				hysteresis = <0>;
 | 
						|
				type = "passive";
 | 
						|
			};
 | 
						|
 | 
						|
			pmar2230_trip1: trip1 {
 | 
						|
				temperature = <115000>;
 | 
						|
				hysteresis = <0>;
 | 
						|
				type = "hot";
 | 
						|
			};
 | 
						|
 | 
						|
			pmar2230_trip2: trip2 {
 | 
						|
				temperature = <145000>;
 | 
						|
				hysteresis = <0>;
 | 
						|
				type = "critical";
 | 
						|
			};
 | 
						|
		};
 | 
						|
	};
 | 
						|
};
 |