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@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20201124164714.v4.1.I0ed4abdd2b2916fbedf76be254bc3457fb8b9655@changeid
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
This commit is contained in:
Matthias Kaehlcke 2020-11-24 16:48:13 -08:00 committed by Bjorn Andersson
parent 3c9c31c252
commit 066c2a9448
4 changed files with 64 additions and 3 deletions

View File

@ -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

View File

@ -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;
};

View File

@ -53,6 +53,17 @@ ap_ts_pen_1v8: &i2c4 {
};
};
&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";
};

View File

@ -191,6 +191,24 @@
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 {
@ -495,13 +513,10 @@
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:
@ -1221,6 +1236,19 @@ ap_spi_fp: &spi10 {
};
};
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";