driverdev-devel.linuxdriverproject.org archive mirror
 help / color / mirror / Atom feed
From: Sergio Paracuellos <sergio.paracuellos@gmail.com>
To: Chuanhong Guo <gch981213@gmail.com>
Cc: ryder.lee@mediatek.com,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	driverdev-devel@linuxdriverproject.org, weijie.gao@mediatek.com,
	Greg Ungerer <gerg@kernel.org>, NeilBrown <neil@brown.name>
Subject: Re: [PATCH v4 5/6] staging: mt7621-pci: release gpios after pci initialization
Date: Fri, 20 Mar 2020 17:34:46 +0100	[thread overview]
Message-ID: <CAMhs-H-jB3LT_hfZ2+FiqjmqaTRJwUfTGKxF852xBny-mMEO7Q@mail.gmail.com> (raw)
In-Reply-To: <CAMhs-H9MdudEij_D84gFNSt70r_gv5joOxCCB+X4foHGeLTpEA@mail.gmail.com>

On Fri, Mar 20, 2020 at 5:32 PM Sergio Paracuellos
<sergio.paracuellos@gmail.com> wrote:
>
> Hi,
>
> On Fri, Mar 20, 2020 at 4:39 PM Chuanhong Guo <gch981213@gmail.com> wrote:
> >
> > Hi!
> >
> > On Fri, Mar 20, 2020 at 11:29 PM Sergio Paracuellos
> > <sergio.paracuellos@gmail.com> 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.

Well, I mean I should only remove the release part for gpios, right?
>
> >
> > --
> > Regards,
> > Chuanhong Guo
>
> Best regards,
>     Sergio Paracuellos
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  reply	other threads:[~2020-03-20 16:35 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-13 20:09 [PATCH v4 0/6] staging: mt7621-pci: re-do reset boot process Sergio Paracuellos
2020-03-13 20:09 ` [PATCH v4 1/6] staging: mt7621-pci: use gpios for properly reset Sergio Paracuellos
2020-03-13 20:09 ` [PATCH v4 2/6] staging: mt7621-pci: change value for 'PERST_DELAY_MS' Sergio Paracuellos
2020-03-13 20:09 ` [PATCH v4 3/6] staging: mt7621-dts: make use of 'reset-gpios' property for pci Sergio Paracuellos
2020-03-13 20:09 ` [PATCH v4 4/6] staging: mt7621-pci: bindings: update doc accordly to last changes Sergio Paracuellos
2020-03-13 20:09 ` [PATCH v4 5/6] staging: mt7621-pci: release gpios after pci initialization Sergio Paracuellos
2020-03-20 14:59   ` Chuanhong Guo
2020-03-20 15:28     ` Sergio Paracuellos
2020-03-20 15:39       ` Chuanhong Guo
2020-03-20 16:32         ` Sergio Paracuellos
2020-03-20 16:34           ` Sergio Paracuellos [this message]
2020-03-21  6:36             ` Chuanhong Guo
2020-03-21  7:28               ` Sergio Paracuellos
2020-03-13 20:09 ` [PATCH v4 6/6] staging: mt7621-pci: delete no more needed 'mt7621_reset_port' Sergio Paracuellos
2020-03-14 10:42 ` [PATCH v4 0/6] staging: mt7621-pci: re-do reset boot process Sergio Paracuellos
2020-03-15 12:35   ` Sergio Paracuellos
2020-03-19 12:42 ` Greg Ungerer
2020-03-19 13:43   ` Sergio Paracuellos
2020-03-19 13:47     ` Sergio Paracuellos
2020-03-19 14:28     ` Greg Ungerer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMhs-H-jB3LT_hfZ2+FiqjmqaTRJwUfTGKxF852xBny-mMEO7Q@mail.gmail.com \
    --to=sergio.paracuellos@gmail.com \
    --cc=driverdev-devel@linuxdriverproject.org \
    --cc=gch981213@gmail.com \
    --cc=gerg@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=neil@brown.name \
    --cc=ryder.lee@mediatek.com \
    --cc=weijie.gao@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).