linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bindings: add clocks optional binding for imx gpio
@ 2018-06-29  3:30 Anson Huang
  2018-07-02 13:45 ` Linus Walleij
  0 siblings, 1 reply; 4+ messages in thread
From: Anson Huang @ 2018-06-29  3:30 UTC (permalink / raw)
  To: linus.walleij, robh+dt, mark.rutland, linux-gpio, devicetree,
	linux-kernel
  Cc: Linux-imx

Some i.MX SoCs have GPIO clock gate in CCM, accessing
GPIO registers needs to enable GPIO clock gate first,
i.MX GPIO driver will enable clock gate if there is
clock property in GPIO node of dtb, add optional property
to i.MX GPIO binding doc.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
 Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt b/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt
index dbd22e0..1b3eed0 100644
--- a/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt
+++ b/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt
@@ -19,6 +19,9 @@ Required properties:
       4 = active high level-sensitive.
       8 = active low level-sensitive.
 
+Optional properties:
+- clocks: the clocks used by gpio bank
+
 Example:
 
 gpio0: gpio@73f84000 {
-- 
2.7.4


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

* Re: [PATCH] bindings: add clocks optional binding for imx gpio
  2018-06-29  3:30 [PATCH] bindings: add clocks optional binding for imx gpio Anson Huang
@ 2018-07-02 13:45 ` Linus Walleij
  2018-07-02 13:54   ` Fabio Estevam
  2018-07-03  1:14   ` Anson Huang
  0 siblings, 2 replies; 4+ messages in thread
From: Linus Walleij @ 2018-07-02 13:45 UTC (permalink / raw)
  To: Anson Huang, Fabio Estevam
  Cc: Rob Herring, Mark Rutland, open list:GPIO SUBSYSTEM,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-kernel, NXP Linux Team

On Fri, Jun 29, 2018 at 5:34 AM Anson Huang <Anson.Huang@nxp.com> wrote:

> Some i.MX SoCs have GPIO clock gate in CCM, accessing
> GPIO registers needs to enable GPIO clock gate first,
> i.MX GPIO driver will enable clock gate if there is
> clock property in GPIO node of dtb, add optional property
> to i.MX GPIO binding doc.
>
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>

Make sense since the gpio-mxc driver already supports this :)

> +Optional properties:
> +- clocks: the clocks used by gpio bank

Should the text be "the clock for clocking the GPIO silicon"
I guess that is what it is. And singularis?

Does it hurt to give the clock a name? Like the common
"pclk" for peripheral clock or something similar that other
i.MX silicon uses?

Fabio: can we have your ACK on this too.

Yours,
Linus Walleij

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

* Re: [PATCH] bindings: add clocks optional binding for imx gpio
  2018-07-02 13:45 ` Linus Walleij
@ 2018-07-02 13:54   ` Fabio Estevam
  2018-07-03  1:14   ` Anson Huang
  1 sibling, 0 replies; 4+ messages in thread
From: Fabio Estevam @ 2018-07-02 13:54 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Anson Huang, Fabio Estevam, Rob Herring, Mark Rutland,
	open list:GPIO SUBSYSTEM,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-kernel, NXP Linux Team

On Mon, Jul 2, 2018 at 10:45 AM, Linus Walleij <linus.walleij@linaro.org> wrote:
> On Fri, Jun 29, 2018 at 5:34 AM Anson Huang <Anson.Huang@nxp.com> wrote:
>
>> Some i.MX SoCs have GPIO clock gate in CCM, accessing
>> GPIO registers needs to enable GPIO clock gate first,
>> i.MX GPIO driver will enable clock gate if there is
>> clock property in GPIO node of dtb, add optional property
>> to i.MX GPIO binding doc.
>>
>> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
>
> Make sense since the gpio-mxc driver already supports this :)
>
>> +Optional properties:
>> +- clocks: the clocks used by gpio bank
>
> Should the text be "the clock for clocking the GPIO silicon"
> I guess that is what it is. And singularis?
>
> Does it hurt to give the clock a name? Like the common
> "pclk" for peripheral clock or something similar that other
> i.MX silicon uses?
>
> Fabio: can we have your ACK on this too.

In case a respin will be made for this one I would suggest to add the
name of the SoCs that need to pass the GPIO clock like imx6ul, imx6sll
in the commit log.

Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>

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

* RE: [PATCH] bindings: add clocks optional binding for imx gpio
  2018-07-02 13:45 ` Linus Walleij
  2018-07-02 13:54   ` Fabio Estevam
@ 2018-07-03  1:14   ` Anson Huang
  1 sibling, 0 replies; 4+ messages in thread
From: Anson Huang @ 2018-07-03  1:14 UTC (permalink / raw)
  To: Linus Walleij, Fabio Estevam
  Cc: Rob Herring, Mark Rutland, open list:GPIO SUBSYSTEM,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-kernel, dl-linux-imx

Hi, Linus

Anson Huang
Best Regards!


> -----Original Message-----
> From: Linus Walleij [mailto:linus.walleij@linaro.org]
> Sent: Monday, July 2, 2018 9:46 PM
> To: Anson Huang <anson.huang@nxp.com>; Fabio Estevam
> <fabio.estevam@nxp.com>
> Cc: Rob Herring <robh+dt@kernel.org>; Mark Rutland
> <mark.rutland@arm.com>; open list:GPIO SUBSYSTEM
> <linux-gpio@vger.kernel.org>; open list:OPEN FIRMWARE AND FLATTENED
> DEVICE TREE BINDINGS <devicetree@vger.kernel.org>;
> linux-kernel@vger.kernel.org; dl-linux-imx <linux-imx@nxp.com>
> Subject: Re: [PATCH] bindings: add clocks optional binding for imx gpio
> 
> On Fri, Jun 29, 2018 at 5:34 AM Anson Huang <Anson.Huang@nxp.com>
> wrote:
> 
> > Some i.MX SoCs have GPIO clock gate in CCM, accessing GPIO registers
> > needs to enable GPIO clock gate first, i.MX GPIO driver will enable
> > clock gate if there is clock property in GPIO node of dtb, add
> > optional property to i.MX GPIO binding doc.
> >
> > Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> 
> Make sense since the gpio-mxc driver already supports this :)
> 
> > +Optional properties:
> > +- clocks: the clocks used by gpio bank
> 
> Should the text be "the clock for clocking the GPIO silicon"
> I guess that is what it is. And singularis?

Yes, it is singularis, I will improve the text.

> 
> Does it hurt to give the clock a name? Like the common "pclk" for peripheral
> clock or something similar that other i.MX silicon uses?

It is just because GPIO only needs one clock, and the driver does NOT get the
clock using clock name, so the GPIO node in dtb also has no clock name specified,
if we add a clock name here, dtb also need to be updated? And I saw other i.MX
modules which have only one clock, they also have no clock name specified, like I2C
on i.MX6QDL, I will send a V2 patch with text improved, thanks.

Anson.

> 
> Fabio: can we have your ACK on this too.
> 
> Yours,
> Linus Walleij

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

end of thread, other threads:[~2018-07-03  1:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-29  3:30 [PATCH] bindings: add clocks optional binding for imx gpio Anson Huang
2018-07-02 13:45 ` Linus Walleij
2018-07-02 13:54   ` Fabio Estevam
2018-07-03  1:14   ` Anson Huang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).