From: linux@prisktech.co.nz (Tony Prisk)
To: linux-arm-kernel@lists.infradead.org
Subject: [Bulk] Re: [PATCH 2/6] pinctrl: gpio: vt8500: Add pincontrol driver for arch-vt8500
Date: Thu, 14 Mar 2013 08:08:41 +1300 [thread overview]
Message-ID: <1363201721.2452.8.camel@gitbox> (raw)
In-Reply-To: <CACRpkdYTKk-fPkUX_jOoHoqxgpsEh2L1ryGC7VSNiAbsmOtcEg@mail.gmail.com>
On Wed, 2013-03-13 at 15:29 +0100, Linus Walleij wrote:
> On Tue, Mar 12, 2013 at 5:21 AM, Tony Prisk <linux@prisktech.co.nz> wrote:
> > On Mon, 2013-03-11 at 10:44 -0600, Stephen Warren wrote:
>
> >> > +Required subnode-properties:
> >> > +- wm,pins: An array of cells. Each cell contains the ID of a pin.
> >>
> >> That's a little odd. Presumably this is to allow configuring "pin
> >> configuration" data beyond the mux function and pull. Why aren't those
> >> options exposed as explicit properties, rather than allowing manual
> >> register tweaking?
> >
> > Little confused about this one - wm,pins is the same as the brcm binding
> > and is the pins being configured.
> >
> > I assume you mean wm,pinmux is confusing.
> >
> > The wm,pinmux does, as you guessed, control some addition pinmux
> > alternate features. I exposed it this way because we don't know what
> > most of the bits in the register do (There is no vendor hardware
> > documentation for these SoCs), and rather than having to churn the code
> > constantly to add the new configurations it seemed to make sense to just
> > expose the register this way and let people configure it in the DT. It
> > is masked so that we can change only the bits we know and leave the rest
> > as configured by the bootloader.
> >
> > Also, it would also add a lot of complexity to the pinctrl code to
> > support the few additional functions we know this register provides
> > because each SoC has a different layout for bits in this register, and
> > we don't actually know which pins/pads are controlled by each bit
> > (again, lack of documentation).
> >
> > I realise this is contradictory to the point of having a pinctrl driver,
> > but it was the best I could come up with given the poor information we
> > have.
> >
> > Always open to suggestions..
>
> In that case I strongly prefer that you try to encode this into the driver
> as such if that is possible. Putting it into the device tree will be
> subject to flux, and while we can handle some drastic code changes
> internally in the kernel, device trees will need to stay
> backward-compatible.
>
> Isn't it possible to put a table for this into the kernel code and just
> switch the right numbers in from the compatible= string?
>
> Yours,
> Linus Walleij
To give an example of what this register does...
On VT8500 we have some basic hardware docs which show this register as:
bit 0 - CCIR/LCD selection
bit 1:2 - AC97/PCM/I2S/Reserved
bit 3:4 - NOR+GUP/SF+NAND/SF+NAND/SF+PATA
bit 5:6 - UART2 disabled/UART1+UART2 pin shared/4 full function UARTS
bit 7 - PATA enable/disable
bit 8:31 - Reserved
It doesn't have any details about which pads are related to which
function, so implementing a proper pinmux feature would be next to
impossible.
The only reason we use this register at present is to enable the LCD
selection (bit 0 in this example - bit 31 on the other SoCs).
Other than that, we rely on uboot to have 'done the right thing'.
Regards
Tony P
next prev parent reply other threads:[~2013-03-13 19:08 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-09 5:39 [PATCH 0/6] arm: vt8500: Add support for pinctrl/gpio module Tony Prisk
2013-03-09 5:39 ` [PATCH 1/6] arm: vt8500: Increase available GPIOs on arch-vt8500 Tony Prisk
2013-03-11 16:38 ` Russell King - ARM Linux
2013-03-12 4:04 ` Tony Prisk
2013-03-09 5:39 ` [PATCH 2/6] pinctrl: gpio: vt8500: Add pincontrol driver for arch-vt8500 Tony Prisk
2013-03-11 16:44 ` Stephen Warren
2013-03-12 4:21 ` [Bulk] " Tony Prisk
2013-03-13 14:29 ` Linus Walleij
2013-03-13 19:08 ` Tony Prisk [this message]
2013-03-13 19:13 ` Linus Walleij
2013-03-14 5:59 ` Tony Prisk
2013-03-27 8:40 ` Linus Walleij
2013-03-13 16:11 ` Linus Walleij
2013-03-13 18:26 ` Stephen Warren
2013-03-13 18:52 ` Linus Walleij
2013-03-13 18:59 ` Tony Prisk
2013-03-13 19:00 ` Tony Prisk
2013-03-09 5:39 ` [PATCH 3/6] arm: dts: vt8500: Update Wondermedia SoC dtsi files for pinctrl driver Tony Prisk
2013-03-11 16:46 ` Stephen Warren
2013-03-12 4:10 ` Tony Prisk
2013-03-09 5:39 ` [PATCH 4/6] arm: vt8500: Remove gpio devicetree nodes Tony Prisk
2013-03-13 16:14 ` Linus Walleij
2013-03-13 16:26 ` Arnd Bergmann
2013-03-09 5:39 ` [PATCH 5/6] gpio: vt8500: Remove arch-vt8500 gpio driver Tony Prisk
2013-03-09 5:39 ` [PATCH 6/6] arm: vt8500: Remove pinmux configuration from mach-vt8500/vt8500.c Tony Prisk
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=1363201721.2452.8.camel@gitbox \
--to=linux@prisktech.co.nz \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.