From 2bc2a3185ffbff1bd80318989d57cdee7c2a83d3 Mon Sep 17 00:00:00 2001 From: David Collins Date: Fri, 29 Jan 2021 16:45:22 -0800 Subject: [PATCH] ARM: dts: qcom: support PM8008 vs PM8010 detection for Waipio boards Existing Waipio MTP, CDP, and QRD boards utilize two PM8008 PMICs to power camera supplies. New boards will instead use two PM8010 PMICs. Add device tree files for the new boards and update existing ones so that the correct device tree overlay can be chosen at runtime for boards with PM8008 or PM8010. Change-Id: I7a5383b34d571198b71530058fbcb937c74e277a --- qcom/Makefile | 27 ++- ...rlay.dts => waipio-cdp-pm8008-overlay.dts} | 3 +- .../{waipio-cdp.dts => waipio-cdp-pm8008.dts} | 3 +- qcom/waipio-cdp-pm8010-overlay.dts | 12 + qcom/waipio-cdp-pm8010.dts | 11 + ...rlay.dts => waipio-mtp-pm8008-overlay.dts} | 3 +- .../{waipio-mtp.dts => waipio-mtp-pm8008.dts} | 3 +- qcom/waipio-mtp-pm8010-overlay.dts | 12 + qcom/waipio-mtp-pm8010.dts | 11 + qcom/waipio-pm8008.dtsi | 224 +++++++++++++++++ qcom/waipio-pm8010-i2c.dtsi | 224 +++++++++++++++++ qcom/waipio-pm8010-spmi.dtsi | 226 ++++++++++++++++++ qcom/waipio-pmic-overlay.dtsi | 218 ----------------- ...rlay.dts => waipio-qrd-pm8008-overlay.dts} | 3 +- .../{waipio-qrd.dts => waipio-qrd-pm8008.dts} | 3 +- qcom/waipio-qrd-pm8010-overlay.dts | 12 + qcom/waipio-qrd-pm8010.dts | 11 + 17 files changed, 773 insertions(+), 233 deletions(-) rename qcom/{waipio-cdp-overlay.dts => waipio-cdp-pm8008-overlay.dts} (65%) rename qcom/{waipio-cdp.dts => waipio-cdp-pm8008.dts} (62%) create mode 100644 qcom/waipio-cdp-pm8010-overlay.dts create mode 100644 qcom/waipio-cdp-pm8010.dts rename qcom/{waipio-mtp-overlay.dts => waipio-mtp-pm8008-overlay.dts} (65%) rename qcom/{waipio-mtp.dts => waipio-mtp-pm8008.dts} (62%) create mode 100644 qcom/waipio-mtp-pm8010-overlay.dts create mode 100644 qcom/waipio-mtp-pm8010.dts create mode 100644 qcom/waipio-pm8008.dtsi create mode 100644 qcom/waipio-pm8010-i2c.dtsi create mode 100644 qcom/waipio-pm8010-spmi.dtsi rename qcom/{waipio-qrd-overlay.dts => waipio-qrd-pm8008-overlay.dts} (65%) rename qcom/{waipio-qrd.dts => waipio-qrd-pm8008.dts} (62%) create mode 100644 qcom/waipio-qrd-pm8010-overlay.dts create mode 100644 qcom/waipio-qrd-pm8010.dts diff --git a/qcom/Makefile b/qcom/Makefile index 09c3b5b2..d2ee974f 100644 --- a/qcom/Makefile +++ b/qcom/Makefile @@ -77,19 +77,28 @@ endif ifeq ($(CONFIG_BUILD_ARM64_DT_OVERLAY),y) dtbo-$(CONFIG_ARCH_WAIPIO) += waipio-rumi-overlay.dtbo \ - waipio-mtp-overlay.dtbo \ - waipio-cdp-overlay.dtbo \ - waipio-qrd-overlay.dtbo + waipio-mtp-pm8008-overlay.dtbo \ + waipio-cdp-pm8008-overlay.dtbo \ + waipio-qrd-pm8008-overlay.dtbo \ + waipio-mtp-pm8010-overlay.dtbo \ + waipio-cdp-pm8010-overlay.dtbo \ + waipio-qrd-pm8010-overlay.dtbo waipio-rumi-overlay.dtbo-base := waipio.dtb -waipio-mtp-overlay.dtbo-base := waipio.dtb -waipio-cdp-overlay.dtbo-base := waipio.dtb -waipio-qrd-overlay.dtbo-base := waipio.dtb +waipio-mtp-pm8008-overlay.dtbo-base := waipio.dtb +waipio-cdp-pm8008-overlay.dtbo-base := waipio.dtb +waipio-qrd-pm8008-overlay.dtbo-base := waipio.dtb +waipio-mtp-pm8010-overlay.dtbo-base := waipio.dtb +waipio-cdp-pm8010-overlay.dtbo-base := waipio.dtb +waipio-qrd-pm8010-overlay.dtbo-base := waipio.dtb else dtb-$(CONFIG_ARCH_WAIPIO) += waipio-rumi.dtb \ - waipio-mtp.dtb \ - waipio-cdp.dtb \ - waipio-qrd.dtb + waipio-mtp-pm8008.dtb \ + waipio-cdp-pm8008.dtb \ + waipio-qrd-pm8008.dtb \ + waipio-mtp-pm8010.dtb \ + waipio-cdp-pm8010.dtb \ + waipio-qrd-pm8010.dtb endif ifeq ($(CONFIG_BUILD_ARM64_DT_OVERLAY),y) diff --git a/qcom/waipio-cdp-overlay.dts b/qcom/waipio-cdp-pm8008-overlay.dts similarity index 65% rename from qcom/waipio-cdp-overlay.dts rename to qcom/waipio-cdp-pm8008-overlay.dts index c893c64f..6a235484 100644 --- a/qcom/waipio-cdp-overlay.dts +++ b/qcom/waipio-cdp-pm8008-overlay.dts @@ -2,9 +2,10 @@ /plugin/; #include "waipio-cdp.dtsi" +#include "waipio-pm8008.dtsi" / { - model = "Qualcomm Technologies, Inc. Waipio CDP"; + model = "Qualcomm Technologies, Inc. Waipio CDP with PM8008"; compatible = "qcom,waipio-cdp", "qcom,waipio", "qcom,cdp"; qcom,msm-id = <457 0x10000>; qcom,board-id = <0x10001 0>; diff --git a/qcom/waipio-cdp.dts b/qcom/waipio-cdp-pm8008.dts similarity index 62% rename from qcom/waipio-cdp.dts rename to qcom/waipio-cdp-pm8008.dts index 27cfd85c..e44a7e53 100644 --- a/qcom/waipio-cdp.dts +++ b/qcom/waipio-cdp-pm8008.dts @@ -2,9 +2,10 @@ #include "waipio.dtsi" #include "waipio-cdp.dtsi" +#include "waipio-pm8008.dtsi" / { - model = "Qualcomm Technologies, Inc. Waipio CDP"; + model = "Qualcomm Technologies, Inc. Waipio CDP with PM8008"; compatible = "qcom,waipio-cdp", "qcom,waipio", "qcom,cdp"; qcom,board-id = <1 0>; }; diff --git a/qcom/waipio-cdp-pm8010-overlay.dts b/qcom/waipio-cdp-pm8010-overlay.dts new file mode 100644 index 00000000..e7e69a59 --- /dev/null +++ b/qcom/waipio-cdp-pm8010-overlay.dts @@ -0,0 +1,12 @@ +/dts-v1/; +/plugin/; + +#include "waipio-cdp.dtsi" +#include "waipio-pm8010-spmi.dtsi" + +/ { + model = "Qualcomm Technologies, Inc. Waipio CDP with PM8010"; + compatible = "qcom,waipio-cdp", "qcom,waipio", "qcom,cdp"; + qcom,msm-id = <457 0x10000>; + qcom,board-id = <0x10001 0>; +}; diff --git a/qcom/waipio-cdp-pm8010.dts b/qcom/waipio-cdp-pm8010.dts new file mode 100644 index 00000000..a276d4a0 --- /dev/null +++ b/qcom/waipio-cdp-pm8010.dts @@ -0,0 +1,11 @@ +/dts-v1/; + +#include "waipio.dtsi" +#include "waipio-cdp.dtsi" +#include "waipio-pm8010-spmi.dtsi" + +/ { + model = "Qualcomm Technologies, Inc. Waipio CDP with PM8010"; + compatible = "qcom,waipio-cdp", "qcom,waipio", "qcom,cdp"; + qcom,board-id = <0x10001 0>; +}; diff --git a/qcom/waipio-mtp-overlay.dts b/qcom/waipio-mtp-pm8008-overlay.dts similarity index 65% rename from qcom/waipio-mtp-overlay.dts rename to qcom/waipio-mtp-pm8008-overlay.dts index 50ca68ac..28d456d2 100644 --- a/qcom/waipio-mtp-overlay.dts +++ b/qcom/waipio-mtp-pm8008-overlay.dts @@ -2,9 +2,10 @@ /plugin/; #include "waipio-mtp.dtsi" +#include "waipio-pm8008.dtsi" / { - model = "Qualcomm Technologies, Inc. Waipio MTP"; + model = "Qualcomm Technologies, Inc. Waipio MTP with PM8008"; compatible = "qcom,waipio-mtp", "qcom,waipio", "qcom,mtp"; qcom,msm-id = <457 0x10000>; qcom,board-id = <0x10008 0>; diff --git a/qcom/waipio-mtp.dts b/qcom/waipio-mtp-pm8008.dts similarity index 62% rename from qcom/waipio-mtp.dts rename to qcom/waipio-mtp-pm8008.dts index 176aaff0..cc5c8e22 100644 --- a/qcom/waipio-mtp.dts +++ b/qcom/waipio-mtp-pm8008.dts @@ -2,9 +2,10 @@ #include "waipio.dtsi" #include "waipio-mtp.dtsi" +#include "waipio-pm8008.dtsi" / { - model = "Qualcomm Technologies, Inc. Waipio MTP"; + model = "Qualcomm Technologies, Inc. Waipio MTP with PM8008"; compatible = "qcom,waipio-mtp", "qcom,waipio", "qcom,mtp"; qcom,board-id = <8 0>; }; diff --git a/qcom/waipio-mtp-pm8010-overlay.dts b/qcom/waipio-mtp-pm8010-overlay.dts new file mode 100644 index 00000000..5b839ec7 --- /dev/null +++ b/qcom/waipio-mtp-pm8010-overlay.dts @@ -0,0 +1,12 @@ +/dts-v1/; +/plugin/; + +#include "waipio-mtp.dtsi" +#include "waipio-pm8010-spmi.dtsi" + +/ { + model = "Qualcomm Technologies, Inc. Waipio MTP with PM8010"; + compatible = "qcom,waipio-mtp", "qcom,waipio", "qcom,mtp"; + qcom,msm-id = <457 0x10000>; + qcom,board-id = <0x10008 0>; +}; diff --git a/qcom/waipio-mtp-pm8010.dts b/qcom/waipio-mtp-pm8010.dts new file mode 100644 index 00000000..a0dc118e --- /dev/null +++ b/qcom/waipio-mtp-pm8010.dts @@ -0,0 +1,11 @@ +/dts-v1/; + +#include "waipio.dtsi" +#include "waipio-mtp.dtsi" +#include "waipio-pm8010-spmi.dtsi" + +/ { + model = "Qualcomm Technologies, Inc. Waipio MTP with PM8010"; + compatible = "qcom,waipio-mtp", "qcom,waipio", "qcom,mtp"; + qcom,board-id = <0x10008 0>; +}; diff --git a/qcom/waipio-pm8008.dtsi b/qcom/waipio-pm8008.dtsi new file mode 100644 index 00000000..2d5acc9e --- /dev/null +++ b/qcom/waipio-pm8008.dtsi @@ -0,0 +1,224 @@ +/* Waipio configurations for PM8008I and PM8008J connected via I2C */ + +/ { + qcom,pmic-id = <0x2f 0x0 0x0 0x0 0x0 0x0 0x0 0x0>; + qcom,pmic-id-size = <8>; +}; + +/* + * Each QUP device that's a parent to PMIC must be listed as a critical device + * to GCC. + */ +&clock_gcc { + qcom,critical-devices = <&qupv3_se5_i2c>; +}; + +&qupv3_se5_i2c { + #address-cells = <1>; + #size-cells = <0>; + status = "ok"; + + pm8008i@8 { + compatible = "qcom,i2c-pmic"; + reg = <0x8>; + #address-cells = <1>; + #size-cells = <0>; + + pinctrl-names = "default"; + pinctrl-0 = <&pm8008i_active>; + + pm8008-chip@900 { + compatible = "qcom,pm8008-chip"; + reg = <0x900>; + + PM8008I_EN: qcom,pm8008-chip-en { + regulator-name = "pm8008i-chip-en"; + }; + }; + + qcom,revid@100 { + compatible = "qcom,qpnp-revid"; + reg = <0x100>; + }; + }; + + pm8008i@9 { + compatible = "qcom,i2c-pmic"; + reg = <0x9>; + #address-cells = <1>; + #size-cells = <0>; + + qcom,pm8008i-regulator { + compatible = "qcom,pm8008-regulator"; + #address-cells = <1>; + #size-cells = <0>; + + pm8008_en-supply = <&PM8008I_EN>; + vdd_l1_l2-supply = <&S12B>; + vdd_l3_l4-supply = <&BOB>; + vdd_l5-supply = <&S1C>; + vdd_l6-supply = <&BOB>; + vdd_l7-supply = <&BOB>; + + L1I: pm8008i_l1: regulator@4000 { + reg = <0x4000>; + regulator-name = "pm8008i_l1"; + regulator-min-microvolt = <480000>; + regulator-max-microvolt = <1104000>; + qcom,min-dropout-voltage = <24000>; + qcom,hpm-min-load = <30000>; + }; + + L2I: pm8008i_l2: regulator@4100 { + reg = <0x4100>; + regulator-name = "pm8008i_l2"; + regulator-min-microvolt = <1056000>; + regulator-max-microvolt = <1056000>; + qcom,min-dropout-voltage = <56000>; + qcom,hpm-min-load = <30000>; + }; + + L3I: pm8008i_l3: regulator@4200 { + reg = <0x4200>; + regulator-name = "pm8008i_l3"; + regulator-min-microvolt = <2784000>; + regulator-max-microvolt = <2904000>; + qcom,min-dropout-voltage = <224000>; + }; + + L4I: pm8008i_l4: regulator@4300 { + reg = <0x4300>; + regulator-name = "pm8008i_l4"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + qcom,min-dropout-voltage = <152000>; + }; + + L5I: pm8008i_l5: regulator@4400 { + reg = <0x4400>; + regulator-name = "pm8008i_l5"; + regulator-min-microvolt = <1776000>; + regulator-max-microvolt = <1800000>; + qcom,min-dropout-voltage = <24000>; + }; + + L6I: pm8008i_l6: regulator@4500 { + reg = <0x4500>; + regulator-name = "pm8008i_l6"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + qcom,min-dropout-voltage = <208000>; + }; + + L7I: pm8008i_l7: regulator@4600 { + reg = <0x4600>; + regulator-name = "pm8008i_l7"; + regulator-min-microvolt = <2712000>; + regulator-max-microvolt = <2960000>; + qcom,min-dropout-voltage = <296000>; + }; + }; + }; + + pm8008j@c { + compatible = "qcom,i2c-pmic"; + reg = <0xc>; + #address-cells = <1>; + #size-cells = <0>; + + pinctrl-names = "default"; + pinctrl-0 = <&pm8008j_active>; + + pm8008-chip@900 { + compatible = "qcom,pm8008-chip"; + reg = <0x900>; + + PM8008J_EN: qcom,pm8008-chip-en { + regulator-name = "pm8008j-chip-en"; + }; + }; + + qcom,revid@100 { + compatible = "qcom,qpnp-revid"; + reg = <0x100>; + }; + }; + + pm8008j@d { + compatible = "qcom,i2c-pmic"; + reg = <0xd>; + #address-cells = <1>; + #size-cells = <0>; + + qcom,pm8008j-regulator { + compatible = "qcom,pm8008-regulator"; + #address-cells = <1>; + #size-cells = <0>; + + pm8008_en-supply = <&PM8008J_EN>; + vdd_l1_l2-supply = <&S12B>; + vdd_l3_l4-supply = <&S1C>; + vdd_l5-supply = <&BOB>; + vdd_l6-supply = <&BOB>; + vdd_l7-supply = <&BOB>; + + L1J: pm8008j_l1: regulator@4000 { + reg = <0x4000>; + regulator-name = "pm8008j_l1"; + regulator-min-microvolt = <1104000>; + regulator-max-microvolt = <1104000>; + qcom,min-dropout-voltage = <64000>; + qcom,hpm-min-load = <30000>; + }; + + L2J: pm8008j_l2: regulator@4100 { + reg = <0x4100>; + regulator-name = "pm8008j_l2"; + regulator-min-microvolt = <1056000>; + regulator-max-microvolt = <1056000>; + qcom,min-dropout-voltage = <24000>; + qcom,hpm-min-load = <30000>; + }; + + L3J: pm8008j_l3: regulator@4200 { + reg = <0x4200>; + regulator-name = "pm8008j_l3"; + regulator-min-microvolt = <1576000>; + regulator-max-microvolt = <1800000>; + qcom,min-dropout-voltage = <224000>; + }; + + L4J: pm8008j_l4: regulator@4300 { + reg = <0x4300>; + regulator-name = "pm8008j_l4"; + regulator-min-microvolt = <1608000>; + regulator-max-microvolt = <1800000>; + qcom,min-dropout-voltage = <192000>; + }; + + L5J: pm8008j_l5: regulator@4400 { + reg = <0x4400>; + regulator-name = "pm8008j_l5"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + qcom,min-dropout-voltage = <56000>; + }; + + L6J: pm8008j_l6: regulator@4500 { + reg = <0x4500>; + regulator-name = "pm8008j_l6"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + qcom,min-dropout-voltage = <120000>; + }; + + L7J: pm8008j_l7: regulator@4600 { + reg = <0x4600>; + regulator-name = "pm8008j_l7"; + regulator-min-microvolt = <2912000>; + regulator-max-microvolt = <3304000>; + qcom,min-dropout-voltage = <96000>; + }; + }; + }; +}; diff --git a/qcom/waipio-pm8010-i2c.dtsi b/qcom/waipio-pm8010-i2c.dtsi new file mode 100644 index 00000000..48bfc147 --- /dev/null +++ b/qcom/waipio-pm8010-i2c.dtsi @@ -0,0 +1,224 @@ +/* Waipio configurations for PM8010I and PM8010J connected via I2C */ + +/ { + qcom,pmic-id = <0x2f 0x0 0x0 0x0 0x0 0x0 0x0 0x0>; + qcom,pmic-id-size = <8>; +}; + +/* + * Each QUP device that's a parent to PMIC must be listed as a critical device + * to GCC. + */ +&clock_gcc { + qcom,critical-devices = <&qupv3_se5_i2c>; +}; + +&qupv3_se5_i2c { + #address-cells = <1>; + #size-cells = <0>; + status = "ok"; + + pm8010i@8 { + compatible = "qcom,i2c-pmic"; + reg = <0x8>; + #address-cells = <1>; + #size-cells = <0>; + + pinctrl-names = "default"; + pinctrl-0 = <&pm8008i_active>; + + pm8010-chip@900 { + compatible = "qcom,pm8008-chip"; + reg = <0x900>; + + PM8010I_EN: qcom,pm8008-chip-en { + regulator-name = "pm8010i-chip-en"; + }; + }; + + qcom,revid@100 { + compatible = "qcom,qpnp-revid"; + reg = <0x100>; + }; + }; + + pm8010i@9 { + compatible = "qcom,i2c-pmic"; + reg = <0x9>; + #address-cells = <1>; + #size-cells = <0>; + + qcom,pm8010i-regulator { + compatible = "qcom,pm8008-regulator"; + #address-cells = <1>; + #size-cells = <0>; + + pm8008_en-supply = <&PM8010I_EN>; + vdd_l1_l2-supply = <&S12B>; + vdd_l3_l4-supply = <&BOB>; + vdd_l5-supply = <&S1C>; + vdd_l6-supply = <&BOB>; + vdd_l7-supply = <&BOB>; + + L1I: pm8010i_l1: regulator@4000 { + reg = <0x4000>; + regulator-name = "pm8010i_l1"; + regulator-min-microvolt = <480000>; + regulator-max-microvolt = <1104000>; + qcom,min-dropout-voltage = <24000>; + qcom,hpm-min-load = <30000>; + }; + + L2I: pm8010i_l2: regulator@4100 { + reg = <0x4100>; + regulator-name = "pm8010i_l2"; + regulator-min-microvolt = <1056000>; + regulator-max-microvolt = <1056000>; + qcom,min-dropout-voltage = <56000>; + qcom,hpm-min-load = <30000>; + }; + + L3I: pm8010i_l3: regulator@4200 { + reg = <0x4200>; + regulator-name = "pm8010i_l3"; + regulator-min-microvolt = <2784000>; + regulator-max-microvolt = <2904000>; + qcom,min-dropout-voltage = <224000>; + }; + + L4I: pm8010i_l4: regulator@4300 { + reg = <0x4300>; + regulator-name = "pm8010i_l4"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + qcom,min-dropout-voltage = <152000>; + }; + + L5I: pm8010i_l5: regulator@4400 { + reg = <0x4400>; + regulator-name = "pm8010i_l5"; + regulator-min-microvolt = <1776000>; + regulator-max-microvolt = <1800000>; + qcom,min-dropout-voltage = <24000>; + }; + + L6I: pm8010i_l6: regulator@4500 { + reg = <0x4500>; + regulator-name = "pm8010i_l6"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + qcom,min-dropout-voltage = <208000>; + }; + + L7I: pm8010i_l7: regulator@4600 { + reg = <0x4600>; + regulator-name = "pm8010i_l7"; + regulator-min-microvolt = <2712000>; + regulator-max-microvolt = <2960000>; + qcom,min-dropout-voltage = <296000>; + }; + }; + }; + + pm8010j@c { + compatible = "qcom,i2c-pmic"; + reg = <0xc>; + #address-cells = <1>; + #size-cells = <0>; + + pinctrl-names = "default"; + pinctrl-0 = <&pm8008j_active>; + + pm8010-chip@900 { + compatible = "qcom,pm8008-chip"; + reg = <0x900>; + + PM8010J_EN: qcom,pm8008-chip-en { + regulator-name = "pm8010j-chip-en"; + }; + }; + + qcom,revid@100 { + compatible = "qcom,qpnp-revid"; + reg = <0x100>; + }; + }; + + pm8010j@d { + compatible = "qcom,i2c-pmic"; + reg = <0xd>; + #address-cells = <1>; + #size-cells = <0>; + + qcom,pm8010j-regulator { + compatible = "qcom,pm8008-regulator"; + #address-cells = <1>; + #size-cells = <0>; + + pm8008_en-supply = <&PM8010J_EN>; + vdd_l1_l2-supply = <&S12B>; + vdd_l3_l4-supply = <&S1C>; + vdd_l5-supply = <&BOB>; + vdd_l6-supply = <&BOB>; + vdd_l7-supply = <&BOB>; + + L1J: pm8010j_l1: regulator@4000 { + reg = <0x4000>; + regulator-name = "pm8010j_l1"; + regulator-min-microvolt = <1104000>; + regulator-max-microvolt = <1104000>; + qcom,min-dropout-voltage = <64000>; + qcom,hpm-min-load = <30000>; + }; + + L2J: pm8010j_l2: regulator@4100 { + reg = <0x4100>; + regulator-name = "pm8010j_l2"; + regulator-min-microvolt = <1056000>; + regulator-max-microvolt = <1056000>; + qcom,min-dropout-voltage = <24000>; + qcom,hpm-min-load = <30000>; + }; + + L3J: pm8010j_l3: regulator@4200 { + reg = <0x4200>; + regulator-name = "pm8010j_l3"; + regulator-min-microvolt = <1576000>; + regulator-max-microvolt = <1800000>; + qcom,min-dropout-voltage = <224000>; + }; + + L4J: pm8010j_l4: regulator@4300 { + reg = <0x4300>; + regulator-name = "pm8010j_l4"; + regulator-min-microvolt = <1608000>; + regulator-max-microvolt = <1800000>; + qcom,min-dropout-voltage = <192000>; + }; + + L5J: pm8010j_l5: regulator@4400 { + reg = <0x4400>; + regulator-name = "pm8010j_l5"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + qcom,min-dropout-voltage = <56000>; + }; + + L6J: pm8010j_l6: regulator@4500 { + reg = <0x4500>; + regulator-name = "pm8010j_l6"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + qcom,min-dropout-voltage = <120000>; + }; + + L7J: pm8010j_l7: regulator@4600 { + reg = <0x4600>; + regulator-name = "pm8010j_l7"; + regulator-min-microvolt = <2912000>; + regulator-max-microvolt = <3304000>; + qcom,min-dropout-voltage = <96000>; + }; + }; + }; +}; diff --git a/qcom/waipio-pm8010-spmi.dtsi b/qcom/waipio-pm8010-spmi.dtsi new file mode 100644 index 00000000..dfdc29b5 --- /dev/null +++ b/qcom/waipio-pm8010-spmi.dtsi @@ -0,0 +1,226 @@ +/* Waipio configurations for PM8010I and PM8010J connected via SPMI */ + +#include + +/ { + qcom,pmic-id = <0x2f 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x41 0x41>; + qcom,pmic-id-size = <10>; +}; + +&apps_rsc { + rpmh-regulator-ldoi2 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoi2"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 30000>; + L2I: pm8010i_l2: regulator-pm8010i-l2 { + regulator-name = "pm8010i_l2"; + qcom,set = ; + regulator-min-microvolt = <1056000>; + regulator-max-microvolt = <1056000>; + qcom,init-voltage = <1056000>; + qcom,init-mode = ; + }; + }; + + rpmh-regulator-ldoi3 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoi3"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 10000>; + L3I: pm8010i_l3: regulator-pm8010i-l3 { + regulator-name = "pm8010i_l3"; + qcom,set = ; + regulator-min-microvolt = <2904000>; + regulator-max-microvolt = <2904000>; + qcom,init-voltage = <2904000>; + qcom,init-mode = ; + }; + }; + + rpmh-regulator-ldoi4 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoi4"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 10000>; + L4I: pm8010i_l4: regulator-pm8010i-l4 { + regulator-name = "pm8010i_l4"; + qcom,set = ; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + qcom,init-voltage = <2800000>; + qcom,init-mode = ; + }; + }; + + rpmh-regulator-ldoi6 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoi6"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 10000>; + L6I: pm8010i_l6: regulator-pm8010i-l6 { + regulator-name = "pm8010i_l6"; + qcom,set = ; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + qcom,init-voltage = <2800000>; + qcom,init-mode = ; + }; + }; + + rpmh-regulator-ldoi7 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoi7"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 10000>; + L7I: pm8010i_l7: regulator-pm8010i-l7 { + regulator-name = "pm8010i_l7"; + qcom,set = ; + regulator-min-microvolt = <2960000>; + regulator-max-microvolt = <2960000>; + qcom,init-voltage = <2960000>; + qcom,init-mode = ; + }; + }; + + rpmh-regulator-ldoj1 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoj1"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 30000>; + L1J: pm8010j_l1: regulator-pm8010j-l1 { + regulator-name = "pm8010j_l1"; + qcom,set = ; + regulator-min-microvolt = <1104000>; + regulator-max-microvolt = <1104000>; + qcom,init-voltage = <1104000>; + qcom,init-mode = ; + }; + }; + + rpmh-regulator-ldoj2 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoj2"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 30000>; + L2J: pm8010j_l2: regulator-pm8010j-l2 { + regulator-name = "pm8010j_l2"; + qcom,set = ; + regulator-min-microvolt = <1056000>; + regulator-max-microvolt = <1056000>; + qcom,init-voltage = <1056000>; + qcom,init-mode = ; + }; + }; + + rpmh-regulator-ldoj3 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoj3"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 10000>; + L3J: pm8010j_l3: regulator-pm8010j-l3 { + regulator-name = "pm8010j_l3"; + qcom,set = ; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + qcom,init-voltage = <1800000>; + qcom,init-mode = ; + }; + }; + + rpmh-regulator-ldoj4 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoj4"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 10000>; + L4J: pm8010j_l4: regulator-pm8010j-l4 { + regulator-name = "pm8010j_l4"; + qcom,set = ; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + qcom,init-voltage = <1800000>; + qcom,init-mode = ; + }; + }; + + rpmh-regulator-ldoj5 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoj5"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 10000>; + L5J: pm8010j_l5: regulator-pm8010j-l5 { + regulator-name = "pm8010j_l5"; + qcom,set = ; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + qcom,init-voltage = <2800000>; + qcom,init-mode = ; + }; + }; + + rpmh-regulator-ldoj6 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoj6"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 10000>; + L6J: pm8010j_l6: regulator-pm8010j-l6 { + regulator-name = "pm8010j_l6"; + qcom,set = ; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + qcom,init-voltage = <2800000>; + qcom,init-mode = ; + }; + }; + + rpmh-regulator-ldoj7 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoj7"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 10000>; + L7J: pm8010j_l7: regulator-pm8010j-l7 { + regulator-name = "pm8010j_l7"; + qcom,set = ; + regulator-min-microvolt = <3304000>; + regulator-max-microvolt = <3304000>; + qcom,init-voltage = <3304000>; + qcom,init-mode = ; + }; + }; +}; diff --git a/qcom/waipio-pmic-overlay.dtsi b/qcom/waipio-pmic-overlay.dtsi index 317f16c3..61942ed4 100644 --- a/qcom/waipio-pmic-overlay.dtsi +++ b/qcom/waipio-pmic-overlay.dtsi @@ -79,224 +79,6 @@ }; }; -/* - * Each QUP device that's a parent to PMIC must be listed as a critical device - * to GCC. - */ -&clock_gcc { - qcom,critical-devices = <&qupv3_se5_i2c>; -}; - -&qupv3_se5_i2c { - #address-cells = <1>; - #size-cells = <0>; - status = "ok"; - - pm8008i@8 { - compatible = "qcom,i2c-pmic"; - reg = <0x8>; - #address-cells = <1>; - #size-cells = <0>; - - pinctrl-names = "default"; - pinctrl-0 = <&pm8008i_active>; - - pm8008-chip@900 { - compatible = "qcom,pm8008-chip"; - reg = <0x900>; - - PM8008I_EN: qcom,pm8008-chip-en { - regulator-name = "pm8008i-chip-en"; - }; - }; - - qcom,revid@100 { - compatible = "qcom,qpnp-revid"; - reg = <0x100>; - }; - }; - - pm8008i@9 { - compatible = "qcom,i2c-pmic"; - reg = <0x9>; - #address-cells = <1>; - #size-cells = <0>; - - qcom,pm8008i-regulator { - compatible = "qcom,pm8008-regulator"; - #address-cells = <1>; - #size-cells = <0>; - - pm8008_en-supply = <&PM8008I_EN>; - vdd_l1_l2-supply = <&S12B>; - vdd_l3_l4-supply = <&BOB>; - vdd_l5-supply = <&S1C>; - vdd_l6-supply = <&BOB>; - vdd_l7-supply = <&BOB>; - - L1I: pm8008i_l1: regulator@4000 { - reg = <0x4000>; - regulator-name = "pm8008i_l1"; - regulator-min-microvolt = <480000>; - regulator-max-microvolt = <1104000>; - qcom,min-dropout-voltage = <24000>; - qcom,hpm-min-load = <30000>; - }; - - L2I: pm8008i_l2: regulator@4100 { - reg = <0x4100>; - regulator-name = "pm8008i_l2"; - regulator-min-microvolt = <1056000>; - regulator-max-microvolt = <1056000>; - qcom,min-dropout-voltage = <56000>; - qcom,hpm-min-load = <30000>; - }; - - L3I: pm8008i_l3: regulator@4200 { - reg = <0x4200>; - regulator-name = "pm8008i_l3"; - regulator-min-microvolt = <2784000>; - regulator-max-microvolt = <2904000>; - qcom,min-dropout-voltage = <224000>; - }; - - L4I: pm8008i_l4: regulator@4300 { - reg = <0x4300>; - regulator-name = "pm8008i_l4"; - regulator-min-microvolt = <2800000>; - regulator-max-microvolt = <2800000>; - qcom,min-dropout-voltage = <152000>; - }; - - L5I: pm8008i_l5: regulator@4400 { - reg = <0x4400>; - regulator-name = "pm8008i_l5"; - regulator-min-microvolt = <1776000>; - regulator-max-microvolt = <1800000>; - qcom,min-dropout-voltage = <24000>; - }; - - L6I: pm8008i_l6: regulator@4500 { - reg = <0x4500>; - regulator-name = "pm8008i_l6"; - regulator-min-microvolt = <2800000>; - regulator-max-microvolt = <2800000>; - qcom,min-dropout-voltage = <208000>; - }; - - L7I: pm8008i_l7: regulator@4600 { - reg = <0x4600>; - regulator-name = "pm8008i_l7"; - regulator-min-microvolt = <2712000>; - regulator-max-microvolt = <2960000>; - qcom,min-dropout-voltage = <296000>; - }; - }; - }; - - pm8008j@c { - compatible = "qcom,i2c-pmic"; - reg = <0xc>; - #address-cells = <1>; - #size-cells = <0>; - - pinctrl-names = "default"; - pinctrl-0 = <&pm8008j_active>; - - pm8008-chip@900 { - compatible = "qcom,pm8008-chip"; - reg = <0x900>; - - PM8008J_EN: qcom,pm8008-chip-en { - regulator-name = "pm8008j-chip-en"; - }; - }; - - qcom,revid@100 { - compatible = "qcom,qpnp-revid"; - reg = <0x100>; - }; - }; - - pm8008j@d { - compatible = "qcom,i2c-pmic"; - reg = <0xd>; - #address-cells = <1>; - #size-cells = <0>; - - qcom,pm8008j-regulator { - compatible = "qcom,pm8008-regulator"; - #address-cells = <1>; - #size-cells = <0>; - - pm8008_en-supply = <&PM8008J_EN>; - vdd_l1_l2-supply = <&S12B>; - vdd_l3_l4-supply = <&S1C>; - vdd_l5-supply = <&BOB>; - vdd_l6-supply = <&BOB>; - vdd_l7-supply = <&BOB>; - - L1J: pm8008j_l1: regulator@4000 { - reg = <0x4000>; - regulator-name = "pm8008j_l1"; - regulator-min-microvolt = <1104000>; - regulator-max-microvolt = <1104000>; - qcom,min-dropout-voltage = <64000>; - qcom,hpm-min-load = <30000>; - }; - - L2J: pm8008j_l2: regulator@4100 { - reg = <0x4100>; - regulator-name = "pm8008j_l2"; - regulator-min-microvolt = <1056000>; - regulator-max-microvolt = <1056000>; - qcom,min-dropout-voltage = <24000>; - qcom,hpm-min-load = <30000>; - }; - - L3J: pm8008j_l3: regulator@4200 { - reg = <0x4200>; - regulator-name = "pm8008j_l3"; - regulator-min-microvolt = <1576000>; - regulator-max-microvolt = <1800000>; - qcom,min-dropout-voltage = <224000>; - }; - - L4J: pm8008j_l4: regulator@4300 { - reg = <0x4300>; - regulator-name = "pm8008j_l4"; - regulator-min-microvolt = <1608000>; - regulator-max-microvolt = <1800000>; - qcom,min-dropout-voltage = <192000>; - }; - - L5J: pm8008j_l5: regulator@4400 { - reg = <0x4400>; - regulator-name = "pm8008j_l5"; - regulator-min-microvolt = <2800000>; - regulator-max-microvolt = <2800000>; - qcom,min-dropout-voltage = <56000>; - }; - - L6J: pm8008j_l6: regulator@4500 { - reg = <0x4500>; - regulator-name = "pm8008j_l6"; - regulator-min-microvolt = <2800000>; - regulator-max-microvolt = <2800000>; - qcom,min-dropout-voltage = <120000>; - }; - - L7J: pm8008j_l7: regulator@4600 { - reg = <0x4600>; - regulator-name = "pm8008j_l7"; - regulator-min-microvolt = <2912000>; - regulator-max-microvolt = <3304000>; - qcom,min-dropout-voltage = <96000>; - }; - }; - }; -}; - &pmk8350_vadc { pinctrl-names = "default"; pinctrl-0 = <&pm8350_rear_tof_therm_default>; diff --git a/qcom/waipio-qrd-overlay.dts b/qcom/waipio-qrd-pm8008-overlay.dts similarity index 65% rename from qcom/waipio-qrd-overlay.dts rename to qcom/waipio-qrd-pm8008-overlay.dts index 698ff6e1..4e56346d 100644 --- a/qcom/waipio-qrd-overlay.dts +++ b/qcom/waipio-qrd-pm8008-overlay.dts @@ -2,9 +2,10 @@ /plugin/; #include "waipio-qrd.dtsi" +#include "waipio-pm8008.dtsi" / { - model = "Qualcomm Technologies, Inc. Waipio QRD"; + model = "Qualcomm Technologies, Inc. Waipio QRD with PM8008"; compatible = "qcom,waipio-qrd", "qcom,waipio", "qcom,qrd"; qcom,msm-id = <457 0x10000>; qcom,board-id = <0x1000B 0>; diff --git a/qcom/waipio-qrd.dts b/qcom/waipio-qrd-pm8008.dts similarity index 62% rename from qcom/waipio-qrd.dts rename to qcom/waipio-qrd-pm8008.dts index 782ad392..2364b024 100644 --- a/qcom/waipio-qrd.dts +++ b/qcom/waipio-qrd-pm8008.dts @@ -2,9 +2,10 @@ #include "waipio.dtsi" #include "waipio-qrd.dtsi" +#include "waipio-pm8008.dtsi" / { - model = "Qualcomm Technologies, Inc. Waipio QRD"; + model = "Qualcomm Technologies, Inc. Waipio QRD with PM8008"; compatible = "qcom,waipio-qrd", "qcom,waipio", "qcom,qrd"; qcom,board-id = <11 0>; }; diff --git a/qcom/waipio-qrd-pm8010-overlay.dts b/qcom/waipio-qrd-pm8010-overlay.dts new file mode 100644 index 00000000..6ee3fd53 --- /dev/null +++ b/qcom/waipio-qrd-pm8010-overlay.dts @@ -0,0 +1,12 @@ +/dts-v1/; +/plugin/; + +#include "waipio-qrd.dtsi" +#include "waipio-pm8010-spmi.dtsi" + +/ { + model = "Qualcomm Technologies, Inc. Waipio QRD with PM8010"; + compatible = "qcom,waipio-qrd", "qcom,waipio", "qcom,qrd"; + qcom,msm-id = <457 0x10000>; + qcom,board-id = <0x1000b 0>; +}; diff --git a/qcom/waipio-qrd-pm8010.dts b/qcom/waipio-qrd-pm8010.dts new file mode 100644 index 00000000..ae26154e --- /dev/null +++ b/qcom/waipio-qrd-pm8010.dts @@ -0,0 +1,11 @@ +/dts-v1/; + +#include "waipio.dtsi" +#include "waipio-qrd.dtsi" +#include "waipio-pm8010-spmi.dtsi" + +/ { + model = "Qualcomm Technologies, Inc. Waipio QRD with PM8010"; + compatible = "qcom,waipio-qrd", "qcom,waipio", "qcom,qrd"; + qcom,board-id = <0x1000b 0>; +};