]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
arm64: dts: qcom: sc7180-trogdor: Make pp3300_a the default supply for pp3300_hub
authorMatthias Kaehlcke <mka@chromium.org>
Wed, 25 Nov 2020 00:48:13 +0000 (16:48 -0800)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Thu, 26 Nov 2020 00:07:40 +0000 (18:07 -0600)
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>
arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r0.dts
arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1.dts
arch/arm64/boot/dts/qcom/sc7180-trogdor-r1.dts
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi

index ae4c23a4fe65808d7cbf475f9ca61dc0d4580658..30e3e769d2b4f7644090da755e7d7a1a6d58dc69 100644 (file)
        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
index 9354d4c5ef7dfad82060d68f6e9ad01a41b47b56..c2ef06367baf729819cdceb62822ad673c7a7dd6 100644 (file)
        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;
+};
index 59d67fb0efe866ee6393e21647d7de6cb549b25a..2cb522d6962e5fa3d86975af0d452bdcc0abcaeb 100644 (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";
 };
index e9b1182b37151fd2c331a5aa091326911cd0e4b0..8ed7dd39f6e342a8827f2a9479a709056572bdfe 100644 (file)
                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 {
                        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";