All of lore.kernel.org
 help / color / mirror / Atom feed
From: maxime.ripard@free-electrons.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/5] pinctrl: sun6i: Add some missing functions, fix i2c3 muxing
Date: Wed, 26 Nov 2014 19:44:08 +0100	[thread overview]
Message-ID: <20141126184408.GL25249@lukather> (raw)
In-Reply-To: <54758FB0.4010503@redhat.com>

On Wed, Nov 26, 2014 at 09:30:40AM +0100, Hans de Goede wrote:
> Hi,
> 
> On 11/25/2014 07:04 PM, Maxime Ripard wrote:
> >Hi,
> >
> >On Sun, Nov 23, 2014 at 01:54:39PM +0100, Hans de Goede wrote:
> >>While working on pinctrl for the A31s, I noticed that function 4 of
> >>PA15 - PA18 was missing, add these.
> >>
> >>I also noticed that i2c3 sck / sda got assigned to PB5 & PB6, this should
> >>be PB4 & PB5, fix this as well.
> >>
> >>Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> >>---
> >>  drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c | 9 +++++++--
> >>  1 file changed, 7 insertions(+), 2 deletions(-)
> >>
> >>diff --git a/drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c b/drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c
> >>index a2b4b85..fb19e15 100644
> >>--- a/drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c
> >>+++ b/drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c
> >>@@ -134,24 +134,28 @@ static const struct sunxi_desc_pin sun6i_a31_pins[] = {
> >>  		  SUNXI_FUNCTION(0x1, "gpio_out"),
> >>  		  SUNXI_FUNCTION(0x2, "gmac"),		/* RXD4 */
> >>  		  SUNXI_FUNCTION(0x3, "lcd1"),		/* D15 */
> >>+		  SUNXI_FUNCTION(0x4, "clk_a_out"),
> >
> >It's called clk_out_a on the A20, I'd rather stick with the same
> >scheme here.
> 
> Will fix.
> 
> >>  		  SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 15)),	/* PA_EINT15 */
> >>  	SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 16),
> >>  		  SUNXI_FUNCTION(0x0, "gpio_in"),
> >>  		  SUNXI_FUNCTION(0x1, "gpio_out"),
> >>  		  SUNXI_FUNCTION(0x2, "gmac"),		/* RXD5 */
> >>  		  SUNXI_FUNCTION(0x3, "lcd1"),		/* D16 */
> >>+		  SUNXI_FUNCTION(0x4, "dmic"),		/* CLK */
> >>  		  SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 16)),	/* PA_EINT16 */
> >>  	SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 17),
> >>  		  SUNXI_FUNCTION(0x0, "gpio_in"),
> >>  		  SUNXI_FUNCTION(0x1, "gpio_out"),
> >>  		  SUNXI_FUNCTION(0x2, "gmac"),		/* RXD6 */
> >>  		  SUNXI_FUNCTION(0x3, "lcd1"),		/* D17 */
> >>+		  SUNXI_FUNCTION(0x4, "dmic"),		/* DIN */
> >>  		  SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 17)),	/* PA_EINT17 */
> >>  	SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 18),
> >>  		  SUNXI_FUNCTION(0x0, "gpio_in"),
> >>  		  SUNXI_FUNCTION(0x1, "gpio_out"),
> >>  		  SUNXI_FUNCTION(0x2, "gmac"),		/* RXD7 */
> >>  		  SUNXI_FUNCTION(0x3, "lcd1"),		/* D18 */
> >>+		  SUNXI_FUNCTION(0x4, "clk_b_out"),
> >>  		  SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 18)),	/* PA_EINT18 */
> >>  	SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 19),
> >>  		  SUNXI_FUNCTION(0x0, "gpio_in"),
> >>@@ -207,6 +211,7 @@ static const struct sunxi_desc_pin sun6i_a31_pins[] = {
> >>  		  SUNXI_FUNCTION(0x1, "gpio_out"),
> >>  		  SUNXI_FUNCTION(0x2, "gmac"),		/* MDC */
> >>  		  SUNXI_FUNCTION(0x3, "lcd1"),		/* HSYNC */
> >>+		  SUNXI_FUNCTION(0x4, "clk_c_out"),
> >>  		  SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 26)),	/* PA_EINT26 */
> >>  	SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 27),
> >>  		  SUNXI_FUNCTION(0x0, "gpio_in"),
> >>@@ -242,20 +247,20 @@ static const struct sunxi_desc_pin sun6i_a31_pins[] = {
> >>  		  SUNXI_FUNCTION(0x1, "gpio_out"),
> >>  		  SUNXI_FUNCTION(0x2, "i2s0"),		/* DO1 */
> >>  		  SUNXI_FUNCTION(0x3, "uart3"),		/* RTS */
> >>+		  SUNXI_FUNCTION(0x4, "i2c3"),		/* SCK */
> >>  		  SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 4)),	/* PB_EINT4 */
> >>  	SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 5),
> >>  		  SUNXI_FUNCTION(0x0, "gpio_in"),
> >>  		  SUNXI_FUNCTION(0x1, "gpio_out"),
> >>  		  SUNXI_FUNCTION(0x2, "i2s0"),		/* DO2 */
> >>  		  SUNXI_FUNCTION(0x3, "uart3"),		/* TX */
> >>-		  SUNXI_FUNCTION(0x4, "i2c3"),		/* SCK */
> >>+		  SUNXI_FUNCTION(0x4, "i2c3"),		/* SDA */
> >>  		  SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 5)),	/* PB_EINT5 */
> >>  	SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 6),
> >>  		  SUNXI_FUNCTION(0x0, "gpio_in"),
> >>  		  SUNXI_FUNCTION(0x1, "gpio_out"),
> >>  		  SUNXI_FUNCTION(0x2, "i2s0"),		/* DO3 */
> >>  		  SUNXI_FUNCTION(0x3, "uart3"),		/* RX */
> >>-		  SUNXI_FUNCTION(0x4, "i2c3"),		/* SDA */
> >
> >Where did you get that info from? The datasheet still reports that
> >information.
> 
> I assume with the datasheet you mean "A31 User Manual V1.20.pdf", which
> was last updated on September 20, 2013. I did not check that one, now I
> see where the original pinctrl code from.
>
> So I've done some more digging:
> 
> "A31 Datasheet - v1.00 (2012-12-24).pdf" also has twi3 sck / sda on pin
> PB5 / PB6 like the current pinctrl code.
> 
> But "A31 Datasheet V1.40.pdf" which has the following in its revision log:
> "1.4 Dec 10,2013 Modify Pin Description"
> 
> Moves them to PB4 / PB5 and that is where I got this from (and was the only
> place I initially looked), I think that this is an intentional change, and
> that PB4 / PB5 are the correct pins.

Funny, I was looking at the A31 datasheet v1.4 from 10/12/2013 that is
in the allwinner's repo, and that's where I got this from (or some
earlier version of it)

https://github.com/allwinner-zh/documents/blob/master/A31/A31%20datasheet%20V1.4%2020131210.pdf

Something's weird here :)

> I will ask Allwinner which is correct, so that we know for sure.

Yep, I saw that, thanks for clearing that up.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141126/a6b869b9/attachment.sig>

WARNING: multiple messages have this Message-ID (diff)
From: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
To: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Linus Walleij
	<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>,
	devicetree <devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: [PATCH 1/5] pinctrl: sun6i: Add some missing functions, fix i2c3 muxing
Date: Wed, 26 Nov 2014 19:44:08 +0100	[thread overview]
Message-ID: <20141126184408.GL25249@lukather> (raw)
In-Reply-To: <54758FB0.4010503-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 5124 bytes --]

On Wed, Nov 26, 2014 at 09:30:40AM +0100, Hans de Goede wrote:
> Hi,
> 
> On 11/25/2014 07:04 PM, Maxime Ripard wrote:
> >Hi,
> >
> >On Sun, Nov 23, 2014 at 01:54:39PM +0100, Hans de Goede wrote:
> >>While working on pinctrl for the A31s, I noticed that function 4 of
> >>PA15 - PA18 was missing, add these.
> >>
> >>I also noticed that i2c3 sck / sda got assigned to PB5 & PB6, this should
> >>be PB4 & PB5, fix this as well.
> >>
> >>Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> >>---
> >>  drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c | 9 +++++++--
> >>  1 file changed, 7 insertions(+), 2 deletions(-)
> >>
> >>diff --git a/drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c b/drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c
> >>index a2b4b85..fb19e15 100644
> >>--- a/drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c
> >>+++ b/drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c
> >>@@ -134,24 +134,28 @@ static const struct sunxi_desc_pin sun6i_a31_pins[] = {
> >>  		  SUNXI_FUNCTION(0x1, "gpio_out"),
> >>  		  SUNXI_FUNCTION(0x2, "gmac"),		/* RXD4 */
> >>  		  SUNXI_FUNCTION(0x3, "lcd1"),		/* D15 */
> >>+		  SUNXI_FUNCTION(0x4, "clk_a_out"),
> >
> >It's called clk_out_a on the A20, I'd rather stick with the same
> >scheme here.
> 
> Will fix.
> 
> >>  		  SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 15)),	/* PA_EINT15 */
> >>  	SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 16),
> >>  		  SUNXI_FUNCTION(0x0, "gpio_in"),
> >>  		  SUNXI_FUNCTION(0x1, "gpio_out"),
> >>  		  SUNXI_FUNCTION(0x2, "gmac"),		/* RXD5 */
> >>  		  SUNXI_FUNCTION(0x3, "lcd1"),		/* D16 */
> >>+		  SUNXI_FUNCTION(0x4, "dmic"),		/* CLK */
> >>  		  SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 16)),	/* PA_EINT16 */
> >>  	SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 17),
> >>  		  SUNXI_FUNCTION(0x0, "gpio_in"),
> >>  		  SUNXI_FUNCTION(0x1, "gpio_out"),
> >>  		  SUNXI_FUNCTION(0x2, "gmac"),		/* RXD6 */
> >>  		  SUNXI_FUNCTION(0x3, "lcd1"),		/* D17 */
> >>+		  SUNXI_FUNCTION(0x4, "dmic"),		/* DIN */
> >>  		  SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 17)),	/* PA_EINT17 */
> >>  	SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 18),
> >>  		  SUNXI_FUNCTION(0x0, "gpio_in"),
> >>  		  SUNXI_FUNCTION(0x1, "gpio_out"),
> >>  		  SUNXI_FUNCTION(0x2, "gmac"),		/* RXD7 */
> >>  		  SUNXI_FUNCTION(0x3, "lcd1"),		/* D18 */
> >>+		  SUNXI_FUNCTION(0x4, "clk_b_out"),
> >>  		  SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 18)),	/* PA_EINT18 */
> >>  	SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 19),
> >>  		  SUNXI_FUNCTION(0x0, "gpio_in"),
> >>@@ -207,6 +211,7 @@ static const struct sunxi_desc_pin sun6i_a31_pins[] = {
> >>  		  SUNXI_FUNCTION(0x1, "gpio_out"),
> >>  		  SUNXI_FUNCTION(0x2, "gmac"),		/* MDC */
> >>  		  SUNXI_FUNCTION(0x3, "lcd1"),		/* HSYNC */
> >>+		  SUNXI_FUNCTION(0x4, "clk_c_out"),
> >>  		  SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 26)),	/* PA_EINT26 */
> >>  	SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 27),
> >>  		  SUNXI_FUNCTION(0x0, "gpio_in"),
> >>@@ -242,20 +247,20 @@ static const struct sunxi_desc_pin sun6i_a31_pins[] = {
> >>  		  SUNXI_FUNCTION(0x1, "gpio_out"),
> >>  		  SUNXI_FUNCTION(0x2, "i2s0"),		/* DO1 */
> >>  		  SUNXI_FUNCTION(0x3, "uart3"),		/* RTS */
> >>+		  SUNXI_FUNCTION(0x4, "i2c3"),		/* SCK */
> >>  		  SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 4)),	/* PB_EINT4 */
> >>  	SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 5),
> >>  		  SUNXI_FUNCTION(0x0, "gpio_in"),
> >>  		  SUNXI_FUNCTION(0x1, "gpio_out"),
> >>  		  SUNXI_FUNCTION(0x2, "i2s0"),		/* DO2 */
> >>  		  SUNXI_FUNCTION(0x3, "uart3"),		/* TX */
> >>-		  SUNXI_FUNCTION(0x4, "i2c3"),		/* SCK */
> >>+		  SUNXI_FUNCTION(0x4, "i2c3"),		/* SDA */
> >>  		  SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 5)),	/* PB_EINT5 */
> >>  	SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 6),
> >>  		  SUNXI_FUNCTION(0x0, "gpio_in"),
> >>  		  SUNXI_FUNCTION(0x1, "gpio_out"),
> >>  		  SUNXI_FUNCTION(0x2, "i2s0"),		/* DO3 */
> >>  		  SUNXI_FUNCTION(0x3, "uart3"),		/* RX */
> >>-		  SUNXI_FUNCTION(0x4, "i2c3"),		/* SDA */
> >
> >Where did you get that info from? The datasheet still reports that
> >information.
> 
> I assume with the datasheet you mean "A31 User Manual V1.20.pdf", which
> was last updated on September 20, 2013. I did not check that one, now I
> see where the original pinctrl code from.
>
> So I've done some more digging:
> 
> "A31 Datasheet - v1.00 (2012-12-24).pdf" also has twi3 sck / sda on pin
> PB5 / PB6 like the current pinctrl code.
> 
> But "A31 Datasheet V1.40.pdf" which has the following in its revision log:
> "1.4 Dec 10,2013 Modify Pin Description"
> 
> Moves them to PB4 / PB5 and that is where I got this from (and was the only
> place I initially looked), I think that this is an intentional change, and
> that PB4 / PB5 are the correct pins.

Funny, I was looking at the A31 datasheet v1.4 from 10/12/2013 that is
in the allwinner's repo, and that's where I got this from (or some
earlier version of it)

https://github.com/allwinner-zh/documents/blob/master/A31/A31%20datasheet%20V1.4%2020131210.pdf

Something's weird here :)

> I will ask Allwinner which is correct, so that we know for sure.

Yep, I saw that, thanks for clearing that up.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2014-11-26 18:44 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-23 12:54 [PATCH 0/5] sun6i: Add A31s (pinctrl) support Hans de Goede
2014-11-23 12:54 ` Hans de Goede
2014-11-23 12:54 ` [PATCH 1/5] pinctrl: sun6i: Add some missing functions, fix i2c3 muxing Hans de Goede
2014-11-23 12:54   ` Hans de Goede
2014-11-25 18:04   ` Maxime Ripard
2014-11-25 18:04     ` Maxime Ripard
2014-11-26  8:30     ` Hans de Goede
2014-11-26  8:30       ` Hans de Goede
2014-11-26 18:44       ` Maxime Ripard [this message]
2014-11-26 18:44         ` Maxime Ripard
2014-11-27  8:28         ` Hans de Goede
2014-11-27  8:28           ` Hans de Goede
2014-11-23 12:54 ` [PATCH 2/5] pinctrl: sun6i: Add A31s pinctrl support Hans de Goede
2014-11-23 12:54   ` Hans de Goede
2014-11-25 18:08   ` Maxime Ripard
2014-11-25 18:08     ` Maxime Ripard
2014-11-26  8:11     ` Hans de Goede
2014-11-26  8:11       ` Hans de Goede
2014-11-26 18:37       ` Maxime Ripard
2014-11-26 18:37         ` Maxime Ripard
2014-11-23 12:54 ` [PATCH 3/5] ARM: sunxi: Add "allwinner,sun6i-a31s" to mach-sunxi Hans de Goede
2014-11-23 12:54   ` Hans de Goede
2014-11-25 18:24   ` Maxime Ripard
2014-11-25 18:24     ` Maxime Ripard
2014-11-23 12:54 ` [PATCH 4/5] ARM: dts: sun6i: Add sun6i-a31s.dtsi Hans de Goede
2014-11-23 12:54   ` Hans de Goede
2014-11-25 18:18   ` Maxime Ripard
2014-11-25 18:18     ` Maxime Ripard
2014-11-25 23:45     ` Chen-Yu Tsai
2014-11-25 23:45       ` Chen-Yu Tsai
2014-11-26  9:05       ` Hans de Goede
2014-11-26  9:05         ` Hans de Goede
2014-11-26  9:39         ` Chen-Yu Tsai
2014-11-26  9:39           ` Chen-Yu Tsai
2014-12-04 14:13           ` Maxime Ripard
2014-12-04 14:13             ` Maxime Ripard
2014-11-26  8:44     ` [linux-sunxi] " Hans de Goede
2014-11-26  8:44       ` Hans de Goede
2014-11-23 12:54 ` [PATCH 5/5] ARM: dts: sun6i: Add dts file for CSQ CS908 board Hans de Goede
2014-11-23 12:54   ` Hans de Goede
2014-11-25 18:21   ` Maxime Ripard
2014-11-25 18:21     ` Maxime Ripard
2014-11-26  8:58     ` Hans de Goede
2014-11-26  8:58       ` Hans de Goede
2014-12-04 16:33       ` Maxime Ripard
2014-12-04 16:33         ` Maxime Ripard
     [not found]       ` <5475962A.4090508-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-12-15 10:21         ` Code Kipper
     [not found]           ` <CAEKpxBnm2w9pcuf_T1HaO8ACz+94U9G3MeYKNhtzph+9fPtPWg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-12-15 11:38             ` Hans de Goede
2014-11-28 12:01 ` [PATCH 0/5] sun6i: Add A31s (pinctrl) support Linus Walleij
2014-11-28 12:01   ` Linus Walleij
2014-11-28 12:59   ` Hans de Goede
2014-11-28 12:59     ` Hans de Goede

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=20141126184408.GL25249@lukather \
    --to=maxime.ripard@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 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.