From: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
To: Adam Sampson <ats-G+91BasbrijYtjvyW6yDsg@public.gmane.org>
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: [PATCH] ARM: dts: sun7i: Add dts file for pcDuino 3 Nano board
Date: Tue, 27 Jan 2015 18:00:35 +0100 [thread overview]
Message-ID: <20150127170035.GJ7200@lukather> (raw)
In-Reply-To: <20150126135931.GB871-dFjyuVMluBNBLe56cvE0J2D2FQJk+8+b@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 2163 bytes --]
On Mon, Jan 26, 2015 at 01:59:31PM +0000, Adam Sampson wrote:
> Hi Maxime,
>
> On Mon, Jan 26, 2015 at 11:09:21AM +0100, Maxime Ripard wrote:
> > If you read Documentation/leds/leds-class.txt, the pattern to follow is:
> > "devicename:colour:function"
> > so it should rather be pcduino3-nano:green:usr1 and usr2, or some
> > other thing.
>
> How about pcduino3-nano:green:usr-led3/4? Or ...:usr1/2, and a comment
> in the .dts explaining how they're labelled on the board?
The latter looks better yes. tx and rx would do too, if you know what
tx and what rx we're talking about here.
> There are a couple of other sunxi boards that have the same problem
> (multiple user-controllable LEDs of the same colour):
>
> sun4i-a10-marsboard.dts: label = "marsboard:red1:usr";
> sun4i-a10-marsboard.dts: label = "marsboard:red2:usr";
> sun4i-a10-marsboard.dts: label = "marsboard:red3:usr";
> sun4i-a10-marsboard.dts: label = "marsboard:red4:usr";
> sun9i-a80-optimus.dts: label = "optimus:led2:usr";
> sun9i-a80-optimus.dts: label = "optimus:led4:usr";
Thing is, it's too late for those. If we change the label, we would
break the user space scripts that might depend on these names.
> > > More generally, is it correct to add nodes like these (uart2, spi0,
> > > i2c2) for features that appear on the Arduino GPIO headers?
> > If those pins are specifically dedicated to this feature, then yes.
>
> They're multipurpose pins on Arduino-compatible headers:
> http://learn.linksprite.com/wp-content/uploads/2014/10/pcDuino3-Nano_header-Model.jpg
>
> How you want them to be configured will depend on what you have plugged
> in; for example, some Arduino add-on boards will expect J11 P1/2 to be
> serial RX/TX and some will expect them to be GPIOs. So should we
> configure i2c2 etc. by default (and let the user turn them into GPIOs
> if required), or just provide the GPIOs (and require the user to adjust
> the .dts)?
None of the above, if there's no hardware default, we won't enforce
any default either. This is a case for the DT overlays.
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2015-01-27 17:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-25 15:32 [PATCH] ARM: dts: sun7i: Add dts file for pcDuino 3 Nano board Adam Sampson
[not found] ` <1422199921-325-1-git-send-email-ats-G+91BasbrijYtjvyW6yDsg@public.gmane.org>
2015-01-25 16:48 ` Maxime Ripard
2015-01-26 0:35 ` Adam Sampson
[not found] ` <20150126003520.GA871-dFjyuVMluBNBLe56cvE0J2D2FQJk+8+b@public.gmane.org>
2015-01-26 10:09 ` Maxime Ripard
2015-01-26 13:59 ` Adam Sampson
[not found] ` <20150126135931.GB871-dFjyuVMluBNBLe56cvE0J2D2FQJk+8+b@public.gmane.org>
2015-01-27 17:00 ` Maxime Ripard [this message]
2015-01-27 18:25 ` Adam Sampson
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=20150127170035.GJ7200@lukather \
--to=maxime.ripard-wi1+55scjutkeb57/3fjtnbpr1lh4cv8@public.gmane.org \
--cc=ats-G+91BasbrijYtjvyW6yDsg@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.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;
as well as URLs for NNTP newsgroup(s).