All of lore.kernel.org
 help / color / mirror / Atom feed
From: b.galvani@gmail.com (Beniamino Galvani)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] pinctrl: rockchip: fix offset of mux registers for rk3188
Date: Tue, 25 Mar 2014 20:43:59 +0100	[thread overview]
Message-ID: <20140325194357.GA27520@gmail.com> (raw)
In-Reply-To: <2790002.5U2DHYmUbK@diego>

On Tue, Mar 25, 2014 at 12:14:42AM +0100, Heiko St?bner wrote:
> Am Montag, 24. M?rz 2014, 23:36:01 schrieb Beniamino Galvani:
> > The correct value of .mux_offset for rk3188 seems to be 0x60
> > instead of 0x68.
> 
> Executive summary: the offset-change itself is correct, therefore
> 
> Reviewed-by: Heiko Stuebner <heiko@sntech.de>
> 
> That is what one gets when the only source is a vendor tree.
> I've looked it up again, and it seems you're right with the offset, but there 
> seems to be more to it ;-)
> 
> GPIO0 only has the second two IOMUX registers:
> - GRF_GPIO0C_IOMUX at 0x68
> - GRF_GPIO0D_IOMUX at 0x6c
> which I guess is where my mistake comes from.
> 
> It looks like there does no iomux register exist at all for the first 16 pins.
> 
> In any case, the current number is wrong, and the 0x60 offset is the correct 
> one, but I guess we need to determine what the affected pins do - do they 
> always have a gpio mux or such?

On radxa rock schematic pins GPIO0A* and GPIO0B* are labeled only as
gpios, without alternate functions like other pins; my guess is that
on rk3188 they can only act as gpios and so mux registers are not
needed for them.

Beniamino

> 
> Thanks for catching the mistake.
> 
> Heiko
> 
> > Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
> > ---
> >  drivers/pinctrl/pinctrl-rockchip.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/pinctrl/pinctrl-rockchip.c
> > b/drivers/pinctrl/pinctrl-rockchip.c index 46dddc1..23e8812 100644
> > --- a/drivers/pinctrl/pinctrl-rockchip.c
> > +++ b/drivers/pinctrl/pinctrl-rockchip.c
> > @@ -1534,7 +1534,7 @@ static struct rockchip_pin_ctrl rk3188_pin_ctrl = {
> >  		.nr_banks		= ARRAY_SIZE(rk3188_pin_banks),
> >  		.label			= "RK3188-GPIO",
> >  		.type			= RK3188,
> > -		.mux_offset		= 0x68,
> > +		.mux_offset		= 0x60,
> >  		.pull_calc_reg		= rk3188_calc_pull_reg_and_bit,
> >  };
> 

WARNING: multiple messages have this Message-ID (diff)
From: Beniamino Galvani <b.galvani@gmail.com>
To: "Heiko Stübner" <heiko@sntech.de>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pinctrl: rockchip: fix offset of mux registers for rk3188
Date: Tue, 25 Mar 2014 20:43:59 +0100	[thread overview]
Message-ID: <20140325194357.GA27520@gmail.com> (raw)
In-Reply-To: <2790002.5U2DHYmUbK@diego>

On Tue, Mar 25, 2014 at 12:14:42AM +0100, Heiko Stübner wrote:
> Am Montag, 24. März 2014, 23:36:01 schrieb Beniamino Galvani:
> > The correct value of .mux_offset for rk3188 seems to be 0x60
> > instead of 0x68.
> 
> Executive summary: the offset-change itself is correct, therefore
> 
> Reviewed-by: Heiko Stuebner <heiko@sntech.de>
> 
> That is what one gets when the only source is a vendor tree.
> I've looked it up again, and it seems you're right with the offset, but there 
> seems to be more to it ;-)
> 
> GPIO0 only has the second two IOMUX registers:
> - GRF_GPIO0C_IOMUX at 0x68
> - GRF_GPIO0D_IOMUX at 0x6c
> which I guess is where my mistake comes from.
> 
> It looks like there does no iomux register exist at all for the first 16 pins.
> 
> In any case, the current number is wrong, and the 0x60 offset is the correct 
> one, but I guess we need to determine what the affected pins do - do they 
> always have a gpio mux or such?

On radxa rock schematic pins GPIO0A* and GPIO0B* are labeled only as
gpios, without alternate functions like other pins; my guess is that
on rk3188 they can only act as gpios and so mux registers are not
needed for them.

Beniamino

> 
> Thanks for catching the mistake.
> 
> Heiko
> 
> > Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
> > ---
> >  drivers/pinctrl/pinctrl-rockchip.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/pinctrl/pinctrl-rockchip.c
> > b/drivers/pinctrl/pinctrl-rockchip.c index 46dddc1..23e8812 100644
> > --- a/drivers/pinctrl/pinctrl-rockchip.c
> > +++ b/drivers/pinctrl/pinctrl-rockchip.c
> > @@ -1534,7 +1534,7 @@ static struct rockchip_pin_ctrl rk3188_pin_ctrl = {
> >  		.nr_banks		= ARRAY_SIZE(rk3188_pin_banks),
> >  		.label			= "RK3188-GPIO",
> >  		.type			= RK3188,
> > -		.mux_offset		= 0x68,
> > +		.mux_offset		= 0x60,
> >  		.pull_calc_reg		= rk3188_calc_pull_reg_and_bit,
> >  };
> 

  reply	other threads:[~2014-03-25 19:43 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-24 22:36 [PATCH] pinctrl: rockchip: fix offset of mux registers for rk3188 Beniamino Galvani
2014-03-24 22:36 ` Beniamino Galvani
2014-03-24 23:14 ` Heiko Stübner
2014-03-24 23:14   ` Heiko Stübner
2014-03-25 19:43   ` Beniamino Galvani [this message]
2014-03-25 19:43     ` Beniamino Galvani
2014-03-25 23:56     ` [PATCH 0/2] pinctrl: rockchip: fix handling of first pinbank Heiko Stübner
2014-03-25 23:56       ` Heiko Stübner
2014-03-25 23:57       ` [PATCH 1/2] pinctrl: rockchip: add return value to rockchip_set_mux Heiko Stübner
2014-03-25 23:57         ` Heiko Stübner
2014-03-25 23:57       ` [PATCH 2/2] pinctrl: rockchip: handle first half of rk3188-bank0 correctly Heiko Stübner
2014-03-25 23:57         ` Heiko Stübner
2014-04-03 14:13       ` [PATCH 0/2] pinctrl: rockchip: fix handling of first pinbank Linus Walleij
2014-04-03 14:13         ` Linus Walleij
2014-04-03 14:10 ` [PATCH] pinctrl: rockchip: fix offset of mux registers for rk3188 Linus Walleij
2014-04-03 14:10   ` Linus Walleij
2014-04-03 14:20   ` Heiko Stübner
2014-04-03 14:20     ` Heiko Stübner
2014-04-03 15:27     ` Linus Walleij
2014-04-03 15:27       ` Linus Walleij

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=20140325194357.GA27520@gmail.com \
    --to=b.galvani@gmail.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.