[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20201124164714.v4.1.I0ed4abdd2b2916fbedf76be254bc3457fb8b9655@changeid>
Date: Tue, 24 Nov 2020 16:48:13 -0800
From: Matthias Kaehlcke <mka@...omium.org>
To: Andy Gross <agross@...nel.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Rob Herring <robh+dt@...nel.org>
Cc: linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
linux-arm-msm@...r.kernel.org,
Douglas Anderson <dianders@...omium.org>,
Matthias Kaehlcke <mka@...omium.org>
Subject: [PATCH v4] arm64: dts: qcom: sc7180-trogdor: Make pp3300_a the default supply for pp3300_hub
The trogdor design has two options for supplying the 'pp3300_hub' power
rail, it can be supplied by 'pp3300_l7c' or 'pp3300_a'. The 'pp3300_a'
path includes a load switch that can be controlled through GPIO84.
Initially trogdor boards used 'pp3300_l7c' to power the USB hub, newer
revisions (will) use 'pp3300_a' as supply for 'pp3300_hub'.
Add a DT node for the 'pp3300_a' path and a pinctrl entry for the GPIO.
Make this path the default and keep trogdor rev1, lazor rev0 and rev1
on 'pp3300_l7c'. These earlier revisions also allocated the GPIO to the
purpose of controlling the power switch, so there is no need to limit
the pinctrl config to newer revisions. Remove the platform-wide
'always/boot-on' properties from 'pp3300_l7c' and add them to the
boards that use this supply. Also delete the 'always/boot-on'
properties of 'pp3300_hub' for these boards.
Signed-off-by: Matthias Kaehlcke <mka@...omium.org>
Reviewed-by: Douglas Anderson <dianders@...omium.org>
---
Changes in v4:
- removed references to the 'usb_hub' node, which currently doesn't
exist upstream
Changes in v3:
- removed 'always-on' and 'boot-on' from 'pp3300_l7c'
- always pair 'always-on' and 'boot-on' properties
- removed comment for 'pp3300_hub' 'always-on' and 'boot-on' properties
Changes in v2:
- added 'always-on' and 'boot-on' properties for new 'pp3300_hub'
- removed platform-wide 'always-on' property for 'pp3300_l7c'
- added 'always-on' property to 'pp3300_l7c' for boards that still
use 'pp3300_l7c'
- delete 'always-on' property of 'pp3300_hub' for boards that still
use 'pp3300_l7c'
- got rid of 'pp3300_hub_7c' label, just use 'pp3300_l7c'
- fixed position of 'en_pp3300_hub' node to respect ordering
- updated commit message
.../boot/dts/qcom/sc7180-trogdor-lazor-r0.dts | 11 ++++++
.../boot/dts/qcom/sc7180-trogdor-lazor-r1.dts | 11 ++++++
.../arm64/boot/dts/qcom/sc7180-trogdor-r1.dts | 11 ++++++
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 34 +++++++++++++++++--
4 files changed, 64 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r0.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r0.dts
index ae4c23a4fe65..30e3e769d2b4 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r0.dts
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r0.dts
@@ -14,6 +14,17 @@ / {
compatible = "google,lazor-rev0", "qcom,sc7180";
};
+&pp3300_hub {
+ /* pp3300_l7c is used to power the USB hub */
+ /delete-property/regulator-always-on;
+ /delete-property/regulator-boot-on;
+};
+
+&pp3300_l7c {
+ regulator-always-on;
+ regulator-boot-on;
+};
+
&sn65dsi86_out {
/*
* Lane 0 was incorrectly mapped on the cable, but we've now decided
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1.dts
index 9354d4c5ef7d..c2ef06367baf 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1.dts
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1.dts
@@ -13,3 +13,14 @@ / {
model = "Google Lazor (rev1 - 2)";
compatible = "google,lazor-rev1", "google,lazor-rev2", "qcom,sc7180";
};
+
+&pp3300_hub {
+ /* pp3300_l7c is used to power the USB hub */
+ /delete-property/regulator-always-on;
+ /delete-property/regulator-boot-on;
+};
+
+&pp3300_l7c {
+ regulator-always-on;
+ regulator-boot-on;
+};
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-r1.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-r1.dts
index 59d67fb0efe8..2cb522d6962e 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-r1.dts
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-r1.dts
@@ -53,6 +53,17 @@ ap_ts: touchscreen@10 {
};
};
+&pp3300_hub {
+ /* pp3300_l7c is used to power the USB hub */
+ /delete-property/regulator-always-on;
+ /delete-property/regulator-boot-on;
+};
+
+&pp3300_l7c {
+ regulator-always-on;
+ regulator-boot-on;
+};
+
&sdhc_2 {
status = "okay";
};
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
index 3eb1ff2483be..28b0ad1ed157 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
@@ -174,6 +174,24 @@ pp3300_fp_tp: pp3300-fp-tp-regulator {
vin-supply = <&pp3300_a>;
};
+ pp3300_hub: pp3300-hub {
+ compatible = "regulator-fixed";
+ regulator-name = "pp3300_hub";
+
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+
+ gpio = <&tlmm 84 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ pinctrl-names = "default";
+ pinctrl-0 = <&en_pp3300_hub>;
+
+ regulator-always-on;
+ regulator-boot-on;
+
+ vin-supply = <&pp3300_a>;
+ };
+
/* BOARD-SPECIFIC TOP LEVEL NODES */
backlight: backlight {
@@ -478,13 +496,10 @@ ppvar_l6c: ldo6 {
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
- pp3300_hub:
pp3300_l7c: ldo7 {
regulator-min-microvolt = <3304000>;
regulator-max-microvolt = <3304000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
- regulator-always-on;
- regulator-boot-on;
};
pp1800_brij_vccio:
@@ -1185,6 +1200,19 @@ pinconf {
};
};
+ en_pp3300_hub: en-pp3300-hub {
+ pinmux {
+ pins = "gpio84";
+ function = "gpio";
+ };
+
+ pinconf {
+ pins = "gpio84";
+ drive-strength = <2>;
+ bias-disable;
+ };
+ };
+
fpmcu_boot0: fpmcu-boot0 {
pinmux {
pins = "gpio10";
--
2.29.2.454.gaff20da3a2-goog
Powered by blists - more mailing lists