arm64: dts: qcom: sm8250: Commonize PCIe pins
authorKonrad Dybcio <konrad.dybcio@somainline.org>
Wed, 16 Jun 2021 12:27:04 +0000 (14:27 +0200)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Fri, 18 Jun 2021 17:41:55 +0000 (12:41 -0500)
Commonize PCIe pins, as the configuration is SoC-common
and doesn't change (or at least doesn't change much) between
boards.

While at it, remove "output-low" from the RB5 board, as it's
not necessary - we already explicitly pull the perst pin low.

Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
Link: https://lore.kernel.org/r/20210616122708.144770-2-konrad.dybcio@somainline.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
arch/arm64/boot/dts/qcom/qrb5165-rb5.dts
arch/arm64/boot/dts/qcom/sm8250.dtsi

index d5a4f5a..8ac96f8 100644 (file)
 
 &pcie0 {
        status = "okay";
-       perst-gpio = <&tlmm 79 GPIO_ACTIVE_LOW>;
-       wake-gpio = <&tlmm 81 GPIO_ACTIVE_HIGH>;
-       pinctrl-names = "default";
-       pinctrl-0 = <&pcie0_default_state>;
 };
 
 &pcie0_phy {
 
 &pcie1 {
        status = "okay";
-       perst-gpio = <&tlmm 82 GPIO_ACTIVE_LOW>;
-       wake-gpio = <&tlmm 84 GPIO_ACTIVE_HIGH>;
-       pinctrl-names = "default";
-       pinctrl-0 = <&pcie1_default_state>;
 };
 
 &pcie1_phy {
 
 &pcie2 {
        status = "okay";
-       perst-gpio = <&tlmm 85 GPIO_ACTIVE_LOW>;
-       wake-gpio = <&tlmm 87 GPIO_ACTIVE_HIGH>;
-       pinctrl-names = "default";
-       pinctrl-0 = <&pcie2_default_state>;
 };
 
 &pcie2_phy {
                bias-disable;
        };
 
-       pcie0_default_state: pcie0-default {
-               clkreq {
-                       pins = "gpio80";
-                       function = "pci_e0";
-                       bias-pull-up;
-               };
-
-               reset-n {
-                       pins = "gpio79";
-                       function = "gpio";
-
-                       drive-strength = <2>;
-                       output-low;
-                       bias-pull-down;
-               };
-
-               wake-n {
-                       pins = "gpio81";
-                       function = "gpio";
-
-                       drive-strength = <2>;
-                       bias-pull-up;
-               };
-       };
-
-       pcie1_default_state: pcie1-default {
-               clkreq {
-                       pins = "gpio83";
-                       function = "pci_e1";
-                       bias-pull-up;
-               };
-
-               reset-n {
-                       pins = "gpio82";
-                       function = "gpio";
-
-                       drive-strength = <2>;
-                       output-low;
-                       bias-pull-down;
-               };
-
-               wake-n {
-                       pins = "gpio84";
-                       function = "gpio";
-
-                       drive-strength = <2>;
-                       bias-pull-up;
-               };
-       };
-
-       pcie2_default_state: pcie2-default {
-               clkreq {
-                       pins = "gpio86";
-                       function = "pci_e2";
-                       bias-pull-up;
-               };
-
-               reset-n {
-                       pins = "gpio85";
-                       function = "gpio";
-
-                       drive-strength = <2>;
-                       output-low;
-                       bias-pull-down;
-               };
-
-               wake-n {
-                       pins = "gpio87";
-                       function = "gpio";
-
-                       drive-strength = <2>;
-                       bias-pull-up;
-               };
-       };
-
        sdc2_default_state: sdc2-default {
                clk {
                        pins = "sdc2_clk";
index b8d76b3..4798368 100644 (file)
                        phys = <&pcie0_lane>;
                        phy-names = "pciephy";
 
+                       perst-gpio = <&tlmm 79 GPIO_ACTIVE_LOW>;
+                       enable-gpio = <&tlmm 81 GPIO_ACTIVE_HIGH>;
+
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pcie0_default_state>;
+
                        status = "disabled";
                };
 
                        phys = <&pcie1_lane>;
                        phy-names = "pciephy";
 
+                       perst-gpio = <&tlmm 82 GPIO_ACTIVE_LOW>;
+                       enable-gpio = <&tlmm 84 GPIO_ACTIVE_HIGH>;
+
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pcie1_default_state>;
+
                        status = "disabled";
                };
 
                        phys = <&pcie2_lane>;
                        phy-names = "pciephy";
 
+                       perst-gpio = <&tlmm 85 GPIO_ACTIVE_LOW>;
+                       enable-gpio = <&tlmm 87 GPIO_ACTIVE_HIGH>;
+
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pcie2_default_state>;
+
                        status = "disabled";
                };
 
                                        bias-pull-up;
                                };
                        };
+
+                       pcie0_default_state: pcie0-default {
+                               perst {
+                                       pins = "gpio79";
+                                       function = "gpio";
+                                       drive-strength = <2>;
+                                       bias-pull-down;
+                               };
+
+                               clkreq {
+                                       pins = "gpio80";
+                                       function = "pci_e0";
+                                       drive-strength = <2>;
+                                       bias-pull-up;
+                               };
+
+                               wake {
+                                       pins = "gpio81";
+                                       function = "gpio";
+                                       drive-strength = <2>;
+                                       bias-pull-up;
+                               };
+                       };
+
+                       pcie1_default_state: pcie1-default {
+                               perst {
+                                       pins = "gpio82";
+                                       function = "gpio";
+                                       drive-strength = <2>;
+                                       bias-pull-down;
+                               };
+
+                               clkreq {
+                                       pins = "gpio83";
+                                       function = "pci_e1";
+                                       drive-strength = <2>;
+                                       bias-pull-up;
+                               };
+
+                               wake {
+                                       pins = "gpio84";
+                                       function = "gpio";
+                                       drive-strength = <2>;
+                                       bias-pull-up;
+                               };
+                       };
+
+                       pcie2_default_state: pcie2-default {
+                               perst {
+                                       pins = "gpio85";
+                                       function = "gpio";
+                                       drive-strength = <2>;
+                                       bias-pull-down;
+                               };
+
+                               clkreq {
+                                       pins = "gpio86";
+                                       function = "pci_e2";
+                                       drive-strength = <2>;
+                                       bias-pull-up;
+                               };
+
+                               wake {
+                                       pins = "gpio87";
+                                       function = "gpio";
+                                       drive-strength = <2>;
+                                       bias-pull-up;
+                               };
+                       };
                };
 
                apps_smmu: iommu@15000000 {