Hi,
On Fri, Mar 20, 2020 at 4:39 PM Chuanhong Guo <[email protected]> wrote:
>
> Hi!
>
> On Fri, Mar 20, 2020 at 11:29 PM Sergio Paracuellos
> <[email protected]> wrote:
> > > This pin conflict comes from incorrectly occupying pins that are not
> > > used by pcie,
> > > and should be fixed by not occupying those pins in the first place.
> > > Releasing all
> > > gpios isn't the proper way to go.
> >
> > So, you are saying we just have to get gpio for the pin 19 and forget
> > about the others?
>
> Not really "forget about the others". We should use only gpio19
> in mt7621.dtsi and others should be added to device dts if it's
> actually needed. e.g. if pcie cards can't be detected on a specific
> board without gpio7 and/or gpio8, override gpio-resets in dts of
> that board.
If I am understanding correctly for example for my gnubee this should
be as follows:
diff --git a/drivers/staging/mt7621-dts/mt7621.dtsi
b/drivers/staging/mt7621-dts/mt7621.dtsi
index 10fb497cf81a..9e5cf68731bb 100644
--- a/drivers/staging/mt7621-dts/mt7621.dtsi
+++ b/drivers/staging/mt7621-dts/mt7621.dtsi
@@ -538,9 +538,7 @@ pcie: pcie@1e140000 {
phys = <&pcie0_phy 1>, <&pcie2_phy 0>;
phy-names = "pcie-phy0", "pcie-phy2";
- reset-gpios = <&gpio 19 GPIO_ACTIVE_LOW>,
- <&gpio 8 GPIO_ACTIVE_LOW>,
- <&gpio 7 GPIO_ACTIVE_LOW>;
+ reset-gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
pcie@0,0 {
reg = <0x0000 0 0 0 0>;
sergio@camaron:~/staging$ git diff drivers/staging/mt7621-dts/gbpc1.dts
diff --git a/drivers/staging/mt7621-dts/gbpc1.dts
b/drivers/staging/mt7621-dts/gbpc1.dts
index 1fb560ff059c..a7c0d3115d72 100644
--- a/drivers/staging/mt7621-dts/gbpc1.dts
+++ b/drivers/staging/mt7621-dts/gbpc1.dts
@@ -114,6 +114,10 @@ &cpuclock {
&pcie {
pinctrl-names = "default";
pinctrl-0 = <&pcie_pins>;
+
+ reset-gpios = <&gpio 19 GPIO_ACTIVE_LOW>,
+ <&gpio 8 GPIO_ACTIVE_LOW>,
+ <&gpio 7 GPIO_ACTIVE_LOW>;
status = "okay";
};
Is this true? So changes will be only in the device tree but driver is
ok as it is.
>
> --
> Regards,
> Chuanhong Guo
Best regards,
Sergio Paracuellos
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel