public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Ian Campbell <ijc@hellion.org.uk>
To: u-boot@lists.denx.de
Subject: [U-Boot] [linux-sunxi] Re: [PATCH 6/9] ARM: sunxi: Add support for R_PIO gpio banks
Date: Tue, 21 Oct 2014 19:55:32 +0100	[thread overview]
Message-ID: <1413917732.20604.34.camel@hellion.org.uk> (raw)
In-Reply-To: <CAGb2v64Ni43E4K_rEEvqKYz0A8Qp2JCrjeM=_nLnVHouSq2F6g@mail.gmail.com>

On Fri, 2014-10-17 at 22:48 +0800, Chen-Yu Tsai wrote:
> Hi Ian,
> 
> On Mon, Oct 13, 2014 at 8:57 PM, Maxime Ripard
> <maxime.ripard@free-electrons.com> wrote:
> > On Sun, Oct 12, 2014 at 04:23:05PM +0800, Chen-Yu Tsai wrote:
> >> On Sun, Oct 12, 2014 at 12:05 AM, Ian Campbell <ijc@hellion.org.uk> wrote:
> >> > On Tue, 2014-10-07 at 15:11 +0800, Chen-Yu Tsai wrote:
> >> >> From: Hans de Goede <hdegoede@redhat.com>
> >> >>
> >> >> The A31, A23 and later SoCs have an extra pin controller, called CPUs_PIO
> >> >> or R_PIO, which handles pin banks L and beyond.
> >> >
> >> > Does it also have enough space for 9 banks? Since you overlay a struct
> >> > sunxi_gpio_reg on it which has a gpio_bank[SUNXI_GPIO_BANKS] over it.
> >>
> >> Yes it does, as seen in the latest A31 manuals released by Allwinner.
> >>
> >> > SUNXI_GPIO_BANKS is now also confusingly named since it is really
> >> > "number of banks on the first/original GPIO controller". Eventually
> >> > someone will use it as the actual total and be very sad.
> >> >
> >> > I think it might be best if we retcon some distinct name onto the
> >> > original GPIO controller so we can have SUNXIO_GPIO_BLA_BANKS and
> >> > SUNXI_GPIO_R_BANKS (or even just call them controller 0 and 1 and have
> >> > SUNXI_GPIO0_BANKS and SUNXI_GPIO1_BANKS, if that's not too confusing)
> >>
> >> The latest manuals have "CPUx-PORT" and "CPUs-PORT" for the respective
> >> chapters. I'm guessing "x" is for 0~3 cores, and s is for standby or
> >> something.
> >
> > iirc, it was meant for "special".
> 
> I'd like to keep it as SUNXI_GPIO_BANKS if possible. The GPIO and R_GPIO
> prefixes match what we see in Allwinner's sources and what we use in the
> mainline kernel.

OK, matching the mainline kernel is a sound plan.

> The comment section above it could be made clearer about it.
> 
> Also that number would be bumped up for A80, which has pin bank J.
> I will change some of the R_PIO code to check/use the starting pin bank L
> number instead of checking against SUNXI_GPIO_BANKS. Wonder why I didn't
> do it before...

Sounds good.

> >> Of course it's also confusing that Allwinner's sources use the "R_"
> >> prefix for all hardware in that address range, while the datasheet
> >> lists the GPIO function names as "s_something".
> >
> > We use the same pin convention than in the datasheet in mainline (but
> > starting from PL for the special pins). And it's true that we do
> > prefix all the functions by s_, once again, just like the datasheet
> > does.
> >
> > The fact that it comes from a different controller is only expressed
> > by where the pinctrl pins node is defined in the DT.
> 
> I'm a bit undecided about how we should name the pin definitions.
> In the kernel, we named the function s_uart, but the pinconf node
> r_uart.
> 
> In u-boot there isn't this separation. I'm wondering which would be
> easier to understand and relate to the underlying peripheral.
> At the moment I prefer R_UART.

Either is fine for me.

Ian.

  reply	other threads:[~2014-10-21 18:55 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-07  7:11 [U-Boot] [PATCH 0/9] ARM: sunxi: Add Allwinner A23 (sun8i) support Chen-Yu Tsai
2014-10-07  7:11 ` [U-Boot] [PATCH 1/9] ARM: sunxi: Fix build break when CONFIG_MMC is not defined Chen-Yu Tsai
2014-10-11 15:50   ` Ian Campbell
2014-10-12  8:58     ` Hans de Goede
2014-10-07  7:11 ` [U-Boot] [PATCH 2/9] ARM: sunxi: Add sun8i (A23) UART0 pin mux support Chen-Yu Tsai
2014-10-11 15:51   ` Ian Campbell
2014-10-07  7:11 ` [U-Boot] [PATCH 3/9] ARM: sunxi: Add support for uart0 on port F (mmc0) Chen-Yu Tsai
2014-10-11 15:53   ` Ian Campbell
2014-10-07  7:11 ` [U-Boot] [PATCH 4/9] mmc: sunxi: Add support for sun8i (A23) Chen-Yu Tsai
2014-10-11 15:54   ` Ian Campbell
2014-10-07  7:11 ` [U-Boot] [PATCH 5/9] ARM: sunxi: Add basic A23 support Chen-Yu Tsai
2014-10-11 15:58   ` Ian Campbell
2014-10-12  2:43     ` Chen-Yu Tsai
2014-10-12  9:33       ` Ian Campbell
2014-10-07  7:11 ` [U-Boot] [PATCH 6/9] ARM: sunxi: Add support for R_PIO gpio banks Chen-Yu Tsai
2014-10-11 16:05   ` Ian Campbell
2014-10-12  8:23     ` Chen-Yu Tsai
2014-10-12  9:34       ` Ian Campbell
2014-10-13 12:57       ` Maxime Ripard
2014-10-17 14:48         ` [U-Boot] [linux-sunxi] " Chen-Yu Tsai
2014-10-21 18:55           ` Ian Campbell [this message]
2014-10-07  7:11 ` [U-Boot] [PATCH 7/9] ARM: sunxi: Allow specifying module in prcm apb0 init function Chen-Yu Tsai
2014-10-11 16:11   ` Ian Campbell
2014-10-11 16:13     ` Ian Campbell
2014-10-12  8:15       ` Chen-Yu Tsai
2014-10-07  7:11 ` [U-Boot] [PATCH 8/9] ARM: sunxi: Add support for using R_UART as console Chen-Yu Tsai
2014-10-11 16:15   ` Ian Campbell
2014-10-07  7:11 ` [U-Boot] [PATCH 9/9] ARM: sunxi: Add Ippo-q8h-v5 A23 tablet board defconfig Chen-Yu Tsai
2014-10-11 16:17   ` Ian Campbell
2014-10-12  8:13     ` Chen-Yu Tsai

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=1413917732.20604.34.camel@hellion.org.uk \
    --to=ijc@hellion.org.uk \
    --cc=u-boot@lists.denx.de \
    /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