#include <dt-bindings/interrupt-controller/irq.h>

pm8008_8: qcom,pm8008@8 {
	compatible = "qcom,i2c-pmic";
	reg = <0x8>;
	#address-cells = <1>;
	#size-cells = <0>;
	interrupt-controller;
	#interrupt-cells = <3>;

	interrupt-names = "pm8008";
	qcom,periph-map = <0x09 0x24 0xc0 0xc1>;

	pm8008_chip: qcom,pm8008-chip@900 {
		compatible = "qcom,pm8008-chip";
		reg = <0x900>;
		interrupts = <0x09 4 IRQ_TYPE_EDGE_RISING>;
		interrupt-names = "ocp";

		PM8008_EN: qcom,pm8008-chip-en {
			regulator-name = "pm8008-chip-en";
		};
	};

	pm8008_gpios: pinctrl@c000 {
		compatible = "qcom,pm8008-gpio";
		reg = <0xc000>;
		gpio-controller;
		#gpio-cells = <2>;
		interrupt-controller;
		#interrupt-cells = <2>;

		pm8008_gpio1_active: pm8008_gpio1_active {
			pins = "gpio1";
			function = "func1";
			power-source = <1>;
			output-enable;
			input-disable;
			bias-disable;
		};
	};
};

pm8008_9: qcom,pm8008@9 {
	compatible = "qcom,i2c-pmic";
	reg = <0x9>;
	#address-cells = <1>;
	#size-cells = <0>;

	pinctrl-names = "default";
	pinctrl-0 = <&pm8008_gpio1_active>;

	pm8008_regulators: qcom,pm8008-regulator {
		compatible = "qcom,pm8008-regulator";
		pm8008_en-supply = <&PM8008_EN>;
		qcom,enable-ocp-broadcast;

		L1P: qcom,pm8008-l1@4000 {
			reg = <0x4000>;
			regulator-name = "pm8008_l1";
			regulator-min-microvolt = <528000>;
			regulator-max-microvolt = <1504000>;
			qcom,min-dropout-voltage = <225000>;
			qcom,hpm-min-load = <0>;
		};

		L2P: qcom,pm8008-l2@4100 {
			reg = <0x4100>;
			regulator-name = "pm8008_l2";
			regulator-min-microvolt = <528000>;
			regulator-max-microvolt = <1504000>;
			qcom,min-dropout-voltage = <225000>;
			qcom,hpm-min-load = <0>;
		};

		L3P: qcom,pm8008-l3@4200 {
			reg = <0x4200>;
			regulator-name = "pm8008_l3";
			regulator-min-microvolt = <1500000>;
			regulator-max-microvolt = <3400000>;
			qcom,min-dropout-voltage = <200000>;
			qcom,hpm-min-load = <0>;
		};

		L4P: qcom,pm8008-l4@4300 {
			reg = <0x4300>;
			regulator-name = "pm8008_l4";
			regulator-min-microvolt = <1500000>;
			regulator-max-microvolt = <3400000>;
			qcom,min-dropout-voltage = <200000>;
			qcom,hpm-min-load = <0>;
		};

		L5P: qcom,pm8008-l5@4400 {
			reg = <0x4400>;
			regulator-name = "pm8008_l5";
			regulator-min-microvolt = <1500000>;
			regulator-max-microvolt = <3400000>;
			qcom,min-dropout-voltage = <300000>;
			qcom,hpm-min-load = <0>;
		};

		L6P: qcom,pm8008-l6@4400 {
			reg = <0x4500>;
			regulator-name = "pm8008_l6";
			regulator-min-microvolt = <1500000>;
			regulator-max-microvolt = <3400000>;
			qcom,min-dropout-voltage = <300000>;
			qcom,hpm-min-load = <0>;
		};

		L7P: qcom,pm8008-l7@4400 {
			reg = <0x4600>;
			regulator-name = "pm8008_l7";
			regulator-min-microvolt = <1500000>;
			regulator-max-microvolt = <3400000>;
			qcom,min-dropout-voltage = <300000>;
			qcom,hpm-min-load = <0>;
		};
	};
};
