public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: ezequiel.garcia@free-electrons.com (Ezequiel Garcia)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/6] ARM: mvebu: Add proper pin muxing on Globalscale Mirabox board
Date: Fri, 8 Aug 2014 16:47:39 -0300	[thread overview]
Message-ID: <20140808194739.GA17826@arch.cereza> (raw)
In-Reply-To: <20140808192106.GD26751@lunn.ch>

On 08 Aug 09:21 PM, Andrew Lunn wrote:
> On Fri, Aug 08, 2014 at 03:21:56PM -0300, Ezequiel Garcia wrote:
> > On 08 Aug 07:12 PM, Andrew Lunn wrote:
> > > On Fri, Aug 08, 2014 at 12:18:52PM -0300, Ezequiel Garcia wrote:
> > > > This commit adds the required pin muxing for the network interfaces and
> > > > the MDIO interface to be properly initialized. For instance, this makes
> > > > it possible for a bootloader to initialize and access the network interfaces.
> > > > 
> > > > Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
> > > > ---
> > > >  arch/arm/boot/dts/armada-370-mirabox.dts | 6 ++++++
> > > >  1 file changed, 6 insertions(+)
> > > > 
> > > > diff --git a/arch/arm/boot/dts/armada-370-mirabox.dts b/arch/arm/boot/dts/armada-370-mirabox.dts
> > > > index 097df7d8..c745256 100644
> > > > --- a/arch/arm/boot/dts/armada-370-mirabox.dts
> > > > +++ b/arch/arm/boot/dts/armada-370-mirabox.dts
> > > > @@ -91,6 +91,8 @@
> > > >  			};
> > > >  
> > > >  			mdio {
> > > > +				pinctrl-0 = <&mdio_pins>;
> > > > +				pinctrl-names = "default";
> > > >  				phy0: ethernet-phy at 0 {
> > > >  					reg = <0>;
> > > >  				};
> > > > @@ -100,11 +102,15 @@
> > > >  				};
> > > >  			};
> > > >  			ethernet at 70000 {
> > > > +				pinctrl-0 = <&ge0_pins>;
> > > > +				pinctrl-names = "default";
> > > 
> > > Hi Ezequiel
> > > 
> > > Could you put these one level higher in the DT hierarchy? i.e. once in
> > > armada-370.dtsi and not in every board .dts file?
> > > 
> > 
> > Are you sure that's the correct approach?
> > 
> > As explained on the cover letter, these MAC MPP mux are not required in the
> > SGMII case. Moreover, this is not the only way to wire the MAC0 and MAC1
> > controllers, so I even considered pushing down the pinmux to the dts files!
> 
> Hi Ezequiel
> 
> At least at the moment, it seems like RGMII is the norm, and SGMII is
> the exception. So having the default as RGMII probably makes
> sense. Boards which don't require it can then override this in there
> .dts file. If we see this changes with time, we can swap it around.
> 

OK.

> > The devicetree location of the pinmux is something that still confuses me,
> > so I'm more than open to directions here.
> 
> Patch #1 comment is not really correct. It defines a number of pin
> configuration nodes. These nodes can then be used via phandles.  What
> might help is naming these differently. Name them
> ge[01]_rgmii_pins. It is then clear when they should be used. You can
> also add ge[0]_sgmii_pins, which would be an empty set. You can then
> use ge[01]_rgmii_pins as the default in armada-370.dtsi and override
> them with ge[0]_sgmii_pins for the 370 RD.
> 

OK.

> Experience from Kirkwood is that it also has multiple ways to wire up
> MAC0 and MAC1, but in practice, nobody ever does. And if they did, it
> can be overridden in the .dts file.
> 

The above sounds good, although I don't have a strong opinion.

If everybody is happy with the approach, I'll prepare a v2 changing the .dtsi
with RGMII as the default mux, and overriding it in the A370-RD dts.

Jason, Thomas, Greg: Any objections?
-- 
Ezequiel Garc?a, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com

  reply	other threads:[~2014-08-08 19:47 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-08 15:18 [PATCH 0/6] mvebu: Network devicetree pin muxing Ezequiel Garcia
2014-08-08 15:18 ` [PATCH 1/6] ARM: mvebu: Add required ethernet muxing for the Armada 370 SoC Ezequiel Garcia
2014-08-09 15:19   ` Thomas Petazzoni
2014-08-09 16:31     ` Ezequiel Garcia
2014-08-10 12:16   ` Sebastian Hesselbarth
2014-08-11 11:38     ` Ezequiel Garcia
2014-08-10 12:21   ` Sebastian Hesselbarth
2014-08-08 15:18 ` [PATCH 2/6] ARM: mvebu: Add proper pin muxing on Globalscale Mirabox board Ezequiel Garcia
2014-08-08 17:12   ` Andrew Lunn
2014-08-08 18:21     ` Ezequiel Garcia
2014-08-08 19:21       ` Andrew Lunn
2014-08-08 19:47         ` Ezequiel Garcia [this message]
2014-08-09 15:21         ` Thomas Petazzoni
2014-08-09 15:52           ` Ezequiel Garcia
2014-08-09 15:57           ` Jason Cooper
2014-08-10 17:38             ` Thomas Petazzoni
2014-08-10 21:23               ` Andrew Lunn
2014-08-08 15:18 ` [PATCH 3/6] ARM: mvebu: Add proper pin muxing on the Armada 370 DB board Ezequiel Garcia
2014-08-08 15:18 ` [PATCH 4/6] ARM: mvebu: Add proper pin muxing on Netgear ReadyNAS 102 Ezequiel Garcia
2014-08-08 15:18 ` [PATCH 5/6] ARM: mvebu: Add proper pin muxing on Netgear ReadyNAS 104 Ezequiel Garcia
2014-08-08 15:18 ` [PATCH 6/6] ARM: mvebu: Add proper pin muxing on Armada 370 RD board Ezequiel Garcia

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=20140808194739.GA17826@arch.cereza \
    --to=ezequiel.garcia@free-electrons.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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