All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] pinctrl: sirf: add sirf atlas7 pinctrl and gpio support
       [not found] <1431934112-16132-1-git-send-email-21cnbao@gmail.com>
@ 2015-05-19 13:59 ` Linus Walleij
  2015-05-20  8:54   ` Barry Song
  0 siblings, 1 reply; 3+ messages in thread
From: Linus Walleij @ 2015-05-19 13:59 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, May 18, 2015 at 9:28 AM, Barry Song <21cnbao@gmail.com> wrote:

> From: Wei Chen <Wei.Chen@csr.com>
>
> The Pinctrl module (ioc) controls the Pad's function select
> (each pad can have 8 functions), Pad's Drive Strength, Pad's
> Pull Select and Pad's Input Disable status.
>
> The ioc has two modules, ioc_top & ioc_rtc. Both of these two
> modules have function select/clear, Pull select and Drive
> Strength registers. But only ioc_rtc has input-disable
> registers. The Pads on ioc_top have to access ioc_rtc to set
> their input-disable status and intpu-disable-value.
>
> So have to use one ioc driver instance to drive these two
> ioc modules at the same time, and each ioc module will be
> treat as one bank on the "IOC Device".
>
> The GPIO Controller controls the GPIO status if the Pad has
> been config as GPIO by Pinctrl already. Includes the GPIO
> Input/output, Interrupt type, Interrupt Status, and Set/Get
> Values.
> The GPIO pull up/down are controlled by Pinctrl.
>
> There are 7 GPIO Groups and splited into 3 MACROs in atlas7.
> The GPIO Groups in one MACRO share one GPIO controllers, each
> GPIO Group are treated as one GPIO bank.
>
> For example:
> In VDIFM macro, there is one GPIO Controller, it has 3 banks
> to control 3 gpio groups. Its gpio name space is from 0 to 95.
>
> The Device Tree can be written as following:
>
> gpio-ranges = <&pinctrl 0 0 0>,
> <&pinctrl 32 0 0>,
> <&pinctrl 64 0 0>;
>
> gpio-ranges-group-names = "gnss_gpio_grp",
> "lcd_vip_gpio_grp",
> "sdio_i2s_gpio_grp";
>
> bank#0 is from 0~31, the pins are from pinctrl's "gnss_gpio_grp".
> bank#2 is from 32~63, the pins are from pinctrl's "lcd_vip_gpio_grp".
> bank#3 is from 64~95, the pins are from pinctrl's "sdio_i2s_gpio_grp".
>
> Signed-off-by: Wei Chen <Wei.Chen@csr.com>
> Signed-off-by: Barry Song <Baohua.Song@csr.com>
> ---
>  -v3: use generic pinconf to replace self-defined APIs

Awesome job Barry, well done.

Patch applied!

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v3] pinctrl: sirf: add sirf atlas7 pinctrl and gpio support
  2015-05-19 13:59 ` [PATCH v3] pinctrl: sirf: add sirf atlas7 pinctrl and gpio support Linus Walleij
@ 2015-05-20  8:54   ` Barry Song
  2015-05-20 12:54     ` Linus Walleij
  0 siblings, 1 reply; 3+ messages in thread
From: Barry Song @ 2015-05-20  8:54 UTC (permalink / raw)
  To: linux-arm-kernel

2015-05-19 21:59 GMT+08:00 Linus Walleij <linus.walleij@linaro.org>:
> On Mon, May 18, 2015 at 9:28 AM, Barry Song <21cnbao@gmail.com> wrote:
>
>> From: Wei Chen <Wei.Chen@csr.com>
>>
>> The Pinctrl module (ioc) controls the Pad's function select
>> (each pad can have 8 functions), Pad's Drive Strength, Pad's
>> Pull Select and Pad's Input Disable status.
>>
>> The ioc has two modules, ioc_top & ioc_rtc. Both of these two
>> modules have function select/clear, Pull select and Drive
>> Strength registers. But only ioc_rtc has input-disable
>> registers. The Pads on ioc_top have to access ioc_rtc to set
>> their input-disable status and intpu-disable-value.
>>
>> So have to use one ioc driver instance to drive these two
>> ioc modules at the same time, and each ioc module will be
>> treat as one bank on the "IOC Device".
>>
>> The GPIO Controller controls the GPIO status if the Pad has
>> been config as GPIO by Pinctrl already. Includes the GPIO
>> Input/output, Interrupt type, Interrupt Status, and Set/Get
>> Values.
>> The GPIO pull up/down are controlled by Pinctrl.
>>
>> There are 7 GPIO Groups and splited into 3 MACROs in atlas7.
>> The GPIO Groups in one MACRO share one GPIO controllers, each
>> GPIO Group are treated as one GPIO bank.
>>
>> For example:
>> In VDIFM macro, there is one GPIO Controller, it has 3 banks
>> to control 3 gpio groups. Its gpio name space is from 0 to 95.
>>
>> The Device Tree can be written as following:
>>
>> gpio-ranges = <&pinctrl 0 0 0>,
>> <&pinctrl 32 0 0>,
>> <&pinctrl 64 0 0>;
>>
>> gpio-ranges-group-names = "gnss_gpio_grp",
>> "lcd_vip_gpio_grp",
>> "sdio_i2s_gpio_grp";
>>
>> bank#0 is from 0~31, the pins are from pinctrl's "gnss_gpio_grp".
>> bank#2 is from 32~63, the pins are from pinctrl's "lcd_vip_gpio_grp".
>> bank#3 is from 64~95, the pins are from pinctrl's "sdio_i2s_gpio_grp".
>>
>> Signed-off-by: Wei Chen <Wei.Chen@csr.com>
>> Signed-off-by: Barry Song <Baohua.Song@csr.com>
>> ---
>>  -v3: use generic pinconf to replace self-defined APIs
>
> Awesome job Barry, well done.
>

thanks, Linus, for your hard review and good suggestions to improve
the codes. it is mainly a job of Chen Wei. i am only a s-o-b :-)

> Patch applied!

i sent the dts stuff just now.

>
> Yours,
> Linus Walleij

-barry

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v3] pinctrl: sirf: add sirf atlas7 pinctrl and gpio support
  2015-05-20  8:54   ` Barry Song
@ 2015-05-20 12:54     ` Linus Walleij
  0 siblings, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2015-05-20 12:54 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, May 20, 2015 at 10:54 AM, Barry Song <21cnbao@gmail.com> wrote:
> 2015-05-19 21:59 GMT+08:00 Linus Walleij <linus.walleij@linaro.org>:

>> Awesome job Barry, well done.
>>
>
> thanks, Linus, for your hard review and good suggestions to improve
> the codes. it is mainly a job of Chen Wei. i am only a s-o-b :-)

Aw typical I just go for names I recognize.

Sorry: credit where credit is due.

Awesome job Chen Wei.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-05-20 12:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1431934112-16132-1-git-send-email-21cnbao@gmail.com>
2015-05-19 13:59 ` [PATCH v3] pinctrl: sirf: add sirf atlas7 pinctrl and gpio support Linus Walleij
2015-05-20  8:54   ` Barry Song
2015-05-20 12:54     ` Linus Walleij

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.