xref: /freebsd/sys/contrib/device-tree/src/arm64/qcom/pmi8950.dtsi (revision aa1a8ff2d6dbc51ef058f46f3db5a8bb77967145)
18bab661aSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0
28bab661aSEmmanuel Vadot// Copyright (c) 2019, AngeloGioacchino Del Regno <kholk11@gmail.com>
38bab661aSEmmanuel Vadot
48bab661aSEmmanuel Vadot#include <dt-bindings/iio/qcom,spmi-vadc.h>
58bab661aSEmmanuel Vadot#include <dt-bindings/interrupt-controller/irq.h>
68bab661aSEmmanuel Vadot#include <dt-bindings/spmi/spmi.h>
78bab661aSEmmanuel Vadot
88bab661aSEmmanuel Vadot&spmi_bus {
98bab661aSEmmanuel Vadot	pmic@2 {
108bab661aSEmmanuel Vadot		compatible = "qcom,pmi8950", "qcom,spmi-pmic";
118bab661aSEmmanuel Vadot		reg = <0x2 SPMI_USID>;
128bab661aSEmmanuel Vadot		#address-cells = <1>;
138bab661aSEmmanuel Vadot		#size-cells = <0>;
148bab661aSEmmanuel Vadot
158bab661aSEmmanuel Vadot		pmi8950_vadc: adc@3100 {
168bab661aSEmmanuel Vadot			compatible = "qcom,spmi-vadc";
178bab661aSEmmanuel Vadot			reg = <0x3100>;
188bab661aSEmmanuel Vadot			interrupts = <0x2 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
198bab661aSEmmanuel Vadot			#address-cells = <1>;
208bab661aSEmmanuel Vadot			#size-cells = <0>;
218bab661aSEmmanuel Vadot			#io-channel-cells = <1>;
228bab661aSEmmanuel Vadot
23*aa1a8ff2SEmmanuel Vadot			channel@0 {
248bab661aSEmmanuel Vadot				reg = <VADC_USBIN>;
258bab661aSEmmanuel Vadot				qcom,pre-scaling = <1 4>;
268bab661aSEmmanuel Vadot				label = "usbin";
278bab661aSEmmanuel Vadot			};
288bab661aSEmmanuel Vadot
29*aa1a8ff2SEmmanuel Vadot			channel@1 {
308bab661aSEmmanuel Vadot				reg = <VADC_DCIN>;
318bab661aSEmmanuel Vadot				qcom,pre-scaling = <1 4>;
328bab661aSEmmanuel Vadot				label = "dcin";
338bab661aSEmmanuel Vadot			};
348bab661aSEmmanuel Vadot
35*aa1a8ff2SEmmanuel Vadot			channel@2 {
368bab661aSEmmanuel Vadot				reg = <VADC_VCHG_SNS>;
378bab661aSEmmanuel Vadot				qcom,pre-scaling = <1 1>;
388bab661aSEmmanuel Vadot				label = "vchg_sns";
398bab661aSEmmanuel Vadot			};
408bab661aSEmmanuel Vadot
41*aa1a8ff2SEmmanuel Vadot			channel@9 {
428bab661aSEmmanuel Vadot				reg = <VADC_REF_625MV>;
438bab661aSEmmanuel Vadot				qcom,pre-scaling = <1 1>;
448bab661aSEmmanuel Vadot				label = "ref_625mv";
458bab661aSEmmanuel Vadot			};
468bab661aSEmmanuel Vadot
47*aa1a8ff2SEmmanuel Vadot			channel@a {
488bab661aSEmmanuel Vadot				reg = <VADC_REF_1250MV>;
498bab661aSEmmanuel Vadot				qcom,pre-scaling = <1 1>;
50cb7aa33aSEmmanuel Vadot				label = "ref_1250mv";
518bab661aSEmmanuel Vadot			};
528bab661aSEmmanuel Vadot
53*aa1a8ff2SEmmanuel Vadot			channel@d {
548bab661aSEmmanuel Vadot				reg = <VADC_SPARE2>;
558bab661aSEmmanuel Vadot				qcom,pre-scaling = <1 1>;
568bab661aSEmmanuel Vadot				label = "chg_temp";
578bab661aSEmmanuel Vadot			};
588bab661aSEmmanuel Vadot		};
598bab661aSEmmanuel Vadot
608bab661aSEmmanuel Vadot		pmi8950_mpps: mpps@a000 {
618bab661aSEmmanuel Vadot			compatible = "qcom,pmi8950-mpp", "qcom,spmi-mpp";
628bab661aSEmmanuel Vadot			reg = <0xa000>;
638bab661aSEmmanuel Vadot			gpio-controller;
648bab661aSEmmanuel Vadot			gpio-ranges = <&pmi8950_mpps 0 0 4>;
658bab661aSEmmanuel Vadot			#gpio-cells = <2>;
668bab661aSEmmanuel Vadot			interrupt-controller;
678bab661aSEmmanuel Vadot			#interrupt-cells = <2>;
688bab661aSEmmanuel Vadot		};
698bab661aSEmmanuel Vadot
70cb7aa33aSEmmanuel Vadot		pmi8950_gpios: gpio@c000 {
718bab661aSEmmanuel Vadot			compatible = "qcom,pmi8950-gpio", "qcom,spmi-gpio";
728bab661aSEmmanuel Vadot			reg = <0xc000>;
738bab661aSEmmanuel Vadot			gpio-controller;
74cb7aa33aSEmmanuel Vadot			gpio-ranges = <&pmi8950_gpios 0 0 2>;
758bab661aSEmmanuel Vadot			#gpio-cells = <2>;
768bab661aSEmmanuel Vadot			interrupt-controller;
778bab661aSEmmanuel Vadot			#interrupt-cells = <2>;
788bab661aSEmmanuel Vadot		};
798bab661aSEmmanuel Vadot	};
808bab661aSEmmanuel Vadot
818bab661aSEmmanuel Vadot	pmic@3 {
828bab661aSEmmanuel Vadot		compatible = "qcom,pmi8950", "qcom,spmi-pmic";
838bab661aSEmmanuel Vadot		reg = <0x3 SPMI_USID>;
848bab661aSEmmanuel Vadot		#address-cells = <1>;
858bab661aSEmmanuel Vadot		#size-cells = <0>;
868bab661aSEmmanuel Vadot
878bab661aSEmmanuel Vadot		pmi8950_wled: leds@d800 {
888bab661aSEmmanuel Vadot			compatible = "qcom,pmi8950-wled";
898bab661aSEmmanuel Vadot			reg = <0xd800>, <0xd900>;
90*aa1a8ff2SEmmanuel Vadot			interrupts = <0x3 0xd8 0x1 IRQ_TYPE_EDGE_RISING>,
91*aa1a8ff2SEmmanuel Vadot				     <0x3 0xd8 0x2 IRQ_TYPE_EDGE_RISING>;
92*aa1a8ff2SEmmanuel Vadot			interrupt-names = "ovp", "short";
938bab661aSEmmanuel Vadot			label = "backlight";
948bab661aSEmmanuel Vadot
958bab661aSEmmanuel Vadot			status = "disabled";
968bab661aSEmmanuel Vadot		};
978bab661aSEmmanuel Vadot	};
988bab661aSEmmanuel Vadot};
99