Re: [PATCH 3/3] arm64: dts: qcom: sa8775p-ride: add PMIC regulators

From: Konrad Dybcio
Date: Thu Apr 06 2023 - 16:41:28 EST




On 6.04.2023 21:28, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
>
> Add PMIC regulators for sa8775p-ride.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxx>

Konrad
> arch/arm64/boot/dts/qcom/sa8775p-ride.dts | 233 ++++++++++++++++++++++
> 1 file changed, 233 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
> index a0d2024a69df..f238a02a5448 100644
> --- a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
> +++ b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts
> @@ -5,6 +5,8 @@
>
> /dts-v1/;
>
> +#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
> +
> #include "sa8775p.dtsi"
> #include "sa8775p-pmics.dtsi"
>
> @@ -25,6 +27,237 @@ chosen {
> };
> };
>
> +&apps_rsc {
> + regulators-0 {
> + compatible = "qcom,pmm8654au-rpmh-regulators";
> + qcom,pmic-id = "a";
> +
> + vreg_s4a: smps4 {
> + regulator-name = "vreg_s4a";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1816000>;
> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> + };
> +
> + vreg_s5a: smps5 {
> + regulator-name = "vreg_s5a";
> + regulator-min-microvolt = <1850000>;
> + regulator-max-microvolt = <1996000>;
> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> + };
> +
> + vreg_s9a: smps9 {
> + regulator-name = "vreg_s9a";
> + regulator-min-microvolt = <535000>;
> + regulator-max-microvolt = <1120000>;
> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> + };
> +
> + vreg_l4a: ldo4 {
> + regulator-name = "vreg_l4a";
> + regulator-min-microvolt = <788000>;
> + regulator-max-microvolt = <1050000>;
> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> + regulator-allow-set-load;
> + regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
> + RPMH_REGULATOR_MODE_HPM>;
> + };
> +
> + vreg_l5a: ldo5 {
> + regulator-name = "vreg_l5a";
> + regulator-min-microvolt = <870000>;
> + regulator-max-microvolt = <950000>;
> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> + regulator-allow-set-load;
> + regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
> + RPMH_REGULATOR_MODE_HPM>;
> + };
> +
> + vreg_l6a: ldo6 {
> + regulator-name = "vreg_l6a";
> + regulator-min-microvolt = <870000>;
> + regulator-max-microvolt = <970000>;
> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> + regulator-allow-set-load;
> + regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
> + RPMH_REGULATOR_MODE_HPM>;
> + };
> +
> + vreg_l7a: ldo7 {
> + regulator-name = "vreg_l7a";
> + regulator-min-microvolt = <720000>;
> + regulator-max-microvolt = <950000>;
> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> + regulator-allow-set-load;
> + regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
> + RPMH_REGULATOR_MODE_HPM>;
> + };
> +
> + vreg_l8a: ldo8 {
> + regulator-name = "vreg_l8a";
> + regulator-min-microvolt = <2504000>;
> + regulator-max-microvolt = <3300000>;
> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> + regulator-allow-set-load;
> + regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
> + RPMH_REGULATOR_MODE_HPM>;
> + };
> +
> + vreg_l9a: ldo9 {
> + regulator-name = "vreg_l9a";
> + regulator-min-microvolt = <2970000>;
> + regulator-max-microvolt = <3544000>;
> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> + regulator-allow-set-load;
> + regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
> + RPMH_REGULATOR_MODE_HPM>;
> + };
> + };
> +
> + regulators-1 {
> + compatible = "qcom,pmm8654au-rpmh-regulators";
> + qcom,pmic-id = "c";
> +
> + vreg_l1c: ldo1 {
> + regulator-name = "vreg_l1c";
> + regulator-min-microvolt = <1140000>;
> + regulator-max-microvolt = <1260000>;
> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> + regulator-allow-set-load;
> + regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
> + RPMH_REGULATOR_MODE_HPM>;
> + };
> +
> + vreg_l2c: ldo2 {
> + regulator-name = "vreg_l2c";
> + regulator-min-microvolt = <900000>;
> + regulator-max-microvolt = <1100000>;
> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> + regulator-allow-set-load;
> + regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
> + RPMH_REGULATOR_MODE_HPM>;
> + };
> +
> + vreg_l3c: ldo3 {
> + regulator-name = "vreg_l3c";
> + regulator-min-microvolt = <1100000>;
> + regulator-max-microvolt = <1300000>;
> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> + regulator-allow-set-load;
> + regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
> + RPMH_REGULATOR_MODE_HPM>;
> + };
> +
> + vreg_l4c: ldo4 {
> + regulator-name = "vreg_l4c";
> + regulator-min-microvolt = <1100000>;
> + regulator-max-microvolt = <1300000>;
> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> + /*
> + * FIXME: This should have regulator-allow-set-load but
> + * we're getting an over-current fault from the PMIC
> + * when switching to LPM.
> + */
> + };
> +
> + vreg_l5c: ldo5 {
> + regulator-name = "vreg_l5c";
> + regulator-min-microvolt = <1100000>;
> + regulator-max-microvolt = <1300000>;
> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> + regulator-allow-set-load;
> + regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
> + RPMH_REGULATOR_MODE_HPM>;
> + };
> +
> + vreg_l6c: ldo6 {
> + regulator-name = "vreg_l6c";
> + regulator-min-microvolt = <1620000>;
> + regulator-max-microvolt = <1980000>;
> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> + regulator-allow-set-load;
> + regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
> + RPMH_REGULATOR_MODE_HPM>;
> + };
> +
> + vreg_l7c: ldo7 {
> + regulator-name = "vreg_l7c";
> + regulator-min-microvolt = <1620000>;
> + regulator-max-microvolt = <2000000>;
> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> + regulator-allow-set-load;
> + regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
> + RPMH_REGULATOR_MODE_HPM>;
> + };
> +
> + vreg_l8c: ldo8 {
> + regulator-name = "vreg_l8c";
> + regulator-min-microvolt = <2400000>;
> + regulator-max-microvolt = <3300000>;
> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> + regulator-allow-set-load;
> + regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
> + RPMH_REGULATOR_MODE_HPM>;
> + };
> +
> + vreg_l9c: ldo9 {
> + regulator-name = "vreg_l9c";
> + regulator-min-microvolt = <1650000>;
> + regulator-max-microvolt = <2700000>;
> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> + regulator-allow-set-load;
> + regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
> + RPMH_REGULATOR_MODE_HPM>;
> + };
> + };
> +
> + regulators-2 {
> + compatible = "qcom,pmm8654au-rpmh-regulators";
> + qcom,pmic-id = "e";
> +
> + vreg_s4e: smps4 {
> + regulator-name = "vreg_s4e";
> + regulator-min-microvolt = <970000>;
> + regulator-max-microvolt = <1520000>;
> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> + };
> +
> + vreg_s7e: smps7 {
> + regulator-name = "vreg_s7e";
> + regulator-min-microvolt = <1010000>;
> + regulator-max-microvolt = <1170000>;
> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> + };
> +
> + vreg_s9e: smps9 {
> + regulator-name = "vreg_s9e";
> + regulator-min-microvolt = <300000>;
> + regulator-max-microvolt = <570000>;
> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> + };
> +
> + vreg_l6e: ldo6 {
> + regulator-name = "vreg_l6e";
> + regulator-min-microvolt = <1280000>;
> + regulator-max-microvolt = <1450000>;
> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> + regulator-allow-set-load;
> + regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
> + RPMH_REGULATOR_MODE_HPM>;
> + };
> +
> + vreg_l8e: ldo8 {
> + regulator-name = "vreg_l8e";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1950000>;
> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> + regulator-allow-set-load;
> + regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
> + RPMH_REGULATOR_MODE_HPM>;
> + };
> + };
> +};
> +
> &i2c18 {
> clock-frequency = <400000>;
> pinctrl-0 = <&qup_i2c18_default>;