linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] dt-bindings: gpio: rockchip: add clock-names
  2022-09-01  1:29 [PATCH 0/2] gpio clock-names Jianqun Xu
@ 2022-09-01  1:29 ` Jianqun Xu
  2022-09-01 11:48   ` Rob Herring
  0 siblings, 1 reply; 10+ messages in thread
From: Jianqun Xu @ 2022-09-01  1:29 UTC (permalink / raw)
  To: linus.walleij, heiko
  Cc: robh+dt, krzysztof.kozlowski+dt, linux-gpio, linux-rockchip,
	Jianqun Xu

Add 'clock-names' to the gpio dt node. so the driver could get clocks by
a const char id, this patch names the clock-names as
  - 'bus': the apb clock for cpu to access the gpio controller
  - 'db': the debounce clock for cpu to set debounce clock rate

Since the old dt nodes may have no clock-names, this patch not make them
as part of 'required properties'.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
---
 .../devicetree/bindings/gpio/rockchip,gpio-bank.yaml        | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml b/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml
index affd823c881d..d43d4c71bebf 100644
--- a/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml
+++ b/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml
@@ -27,6 +27,12 @@ properties:
       - description: APB interface clock source
       - description: GPIO debounce reference clock source
 
+  clock-names:
+    minItems: 1
+    items:
+      - const: bus
+      - const: db
+
   gpio-ranges: true
 
   gpio-controller: true
-- 
2.25.1


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

* [PATCH 1/2] dt-bindings: gpio: rockchip: add clock-names
  2022-09-01  1:30 [PATCH 0/2] gpio clock-names Jianqun Xu
@ 2022-09-01  1:31 ` Jianqun Xu
  2022-09-08 10:58   ` Krzysztof Kozlowski
  0 siblings, 1 reply; 10+ messages in thread
From: Jianqun Xu @ 2022-09-01  1:31 UTC (permalink / raw)
  To: linus.walleij, heiko
  Cc: robh+dt, krzysztof.kozlowski+dt, linux-gpio, linux-rockchip,
	Jianqun Xu

Add 'clock-names' to the gpio dt node. so the driver could get clocks by
a const char id, this patch names the clock-names as
  - 'bus': the apb clock for cpu to access the gpio controller
  - 'db': the debounce clock for cpu to set debounce clock rate

Since the old dt nodes may have no clock-names, this patch not make them
as part of 'required properties'.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
---
 .../devicetree/bindings/gpio/rockchip,gpio-bank.yaml        | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml b/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml
index affd823c881d..d43d4c71bebf 100644
--- a/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml
+++ b/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml
@@ -27,6 +27,12 @@ properties:
       - description: APB interface clock source
       - description: GPIO debounce reference clock source
 
+  clock-names:
+    minItems: 1
+    items:
+      - const: bus
+      - const: db
+
   gpio-ranges: true
 
   gpio-controller: true
-- 
2.25.1


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

* Re: [PATCH 1/2] dt-bindings: gpio: rockchip: add clock-names
  2022-09-01  1:29 ` [PATCH 1/2] dt-bindings: gpio: rockchip: add clock-names Jianqun Xu
@ 2022-09-01 11:48   ` Rob Herring
  0 siblings, 0 replies; 10+ messages in thread
From: Rob Herring @ 2022-09-01 11:48 UTC (permalink / raw)
  To: Jianqun Xu
  Cc: Linus Walleij, heiko@sntech.de, Krzysztof Kozlowski,
	open list:GPIO SUBSYSTEM, open list:ARM/Rockchip SoC...

On Wed, Aug 31, 2022 at 8:36 PM Jianqun Xu <jay.xu@rock-chips.com> wrote:
>
> Add 'clock-names' to the gpio dt node. so the driver could get clocks by
> a const char id, this patch names the clock-names as
>   - 'bus': the apb clock for cpu to access the gpio controller
>   - 'db': the debounce clock for cpu to set debounce clock rate
>
> Since the old dt nodes may have no clock-names, this patch not make them
> as part of 'required properties'.
>
> Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
> ---
>  .../devicetree/bindings/gpio/rockchip,gpio-bank.yaml        | 6 ++++++
>  1 file changed, 6 insertions(+)

Please resend DT patches to the DT list, so they are tested and reviewed.

Rob

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

* [PATCH 0/2] gpio clock-names
@ 2022-09-02  6:04 Jianqun Xu
  2022-09-02  6:04 ` [PATCH 1/2] dt-bindings: gpio: rockchip: add clock-names Jianqun Xu
  2022-09-02  6:04 ` [PATCH 2/2] arm64: dts: rockchip: rk356x add 'clock-names' for gpio nodes Jianqun Xu
  0 siblings, 2 replies; 10+ messages in thread
From: Jianqun Xu @ 2022-09-02  6:04 UTC (permalink / raw)
  To: linus.walleij, heiko
  Cc: devicetree, linux-kernel, robh+dt, krzysztof.kozlowski+dt,
	linux-gpio, linux-rockchip, Jianqun Xu

Add 'clock-names' for gpio dt nodes.

Jianqun Xu (2):
  dt-bindings: gpio: rockchip: add clock-names
  arm64: dts: rockchip: rk356x add 'clock-names' for gpio nodes

 .../devicetree/bindings/gpio/rockchip,gpio-bank.yaml        | 6 ++++++
 arch/arm64/boot/dts/rockchip/rk356x.dtsi                    | 5 +++++
 2 files changed, 11 insertions(+)

-- 
2.25.1


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

* [PATCH 1/2] dt-bindings: gpio: rockchip: add clock-names
  2022-09-02  6:04 [PATCH 0/2] gpio clock-names Jianqun Xu
@ 2022-09-02  6:04 ` Jianqun Xu
  2022-09-02 21:05   ` Rob Herring
                     ` (2 more replies)
  2022-09-02  6:04 ` [PATCH 2/2] arm64: dts: rockchip: rk356x add 'clock-names' for gpio nodes Jianqun Xu
  1 sibling, 3 replies; 10+ messages in thread
From: Jianqun Xu @ 2022-09-02  6:04 UTC (permalink / raw)
  To: linus.walleij, heiko
  Cc: devicetree, linux-kernel, robh+dt, krzysztof.kozlowski+dt,
	linux-gpio, linux-rockchip, Jianqun Xu

Add 'clock-names' to the gpio dt node. so the driver could get clocks by
a const char id, this patch names the clock-names as
  - 'bus': the apb clock for cpu to access the gpio controller
  - 'db': the debounce clock for cpu to set debounce clock rate

Since the old dt nodes may have no clock-names, this patch not make them
as part of 'required properties'.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
---
 .../devicetree/bindings/gpio/rockchip,gpio-bank.yaml        | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml b/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml
index affd823c881d..d43d4c71bebf 100644
--- a/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml
+++ b/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml
@@ -27,6 +27,12 @@ properties:
       - description: APB interface clock source
       - description: GPIO debounce reference clock source
 
+  clock-names:
+    minItems: 1
+    items:
+      - const: bus
+      - const: db
+
   gpio-ranges: true
 
   gpio-controller: true
-- 
2.25.1


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

* [PATCH 2/2] arm64: dts: rockchip: rk356x add 'clock-names' for gpio nodes
  2022-09-02  6:04 [PATCH 0/2] gpio clock-names Jianqun Xu
  2022-09-02  6:04 ` [PATCH 1/2] dt-bindings: gpio: rockchip: add clock-names Jianqun Xu
@ 2022-09-02  6:04 ` Jianqun Xu
  1 sibling, 0 replies; 10+ messages in thread
From: Jianqun Xu @ 2022-09-02  6:04 UTC (permalink / raw)
  To: linus.walleij, heiko
  Cc: devicetree, linux-kernel, robh+dt, krzysztof.kozlowski+dt,
	linux-gpio, linux-rockchip, Jianqun Xu

Add 'clock-names' for gpio nodes on rk356x SoCs, after this patch, the
gpio driver can get the clocks by a const char id, 'bus' for apb clock
and 'db' for the debounce clock.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
---
 arch/arm64/boot/dts/rockchip/rk356x.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk356x.dtsi b/arch/arm64/boot/dts/rockchip/rk356x.dtsi
index 319981c3e9f7..66d038720e65 100644
--- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi
@@ -1650,6 +1650,7 @@ gpio0: gpio@fdd60000 {
 			compatible = "rockchip,gpio-bank";
 			reg = <0x0 0xfdd60000 0x0 0x100>;
 			interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
+			clock-names = "bus", "db";
 			clocks = <&pmucru PCLK_GPIO0>, <&pmucru DBCLK_GPIO0>;
 			gpio-controller;
 			#gpio-cells = <2>;
@@ -1661,6 +1662,7 @@ gpio1: gpio@fe740000 {
 			compatible = "rockchip,gpio-bank";
 			reg = <0x0 0xfe740000 0x0 0x100>;
 			interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
+			clock-names = "bus", "db";
 			clocks = <&cru PCLK_GPIO1>, <&cru DBCLK_GPIO1>;
 			gpio-controller;
 			#gpio-cells = <2>;
@@ -1672,6 +1674,7 @@ gpio2: gpio@fe750000 {
 			compatible = "rockchip,gpio-bank";
 			reg = <0x0 0xfe750000 0x0 0x100>;
 			interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
+			clock-names = "bus", "db";
 			clocks = <&cru PCLK_GPIO2>, <&cru DBCLK_GPIO2>;
 			gpio-controller;
 			#gpio-cells = <2>;
@@ -1683,6 +1686,7 @@ gpio3: gpio@fe760000 {
 			compatible = "rockchip,gpio-bank";
 			reg = <0x0 0xfe760000 0x0 0x100>;
 			interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
+			clock-names = "bus", "db";
 			clocks = <&cru PCLK_GPIO3>, <&cru DBCLK_GPIO3>;
 			gpio-controller;
 			#gpio-cells = <2>;
@@ -1694,6 +1698,7 @@ gpio4: gpio@fe770000 {
 			compatible = "rockchip,gpio-bank";
 			reg = <0x0 0xfe770000 0x0 0x100>;
 			interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
+			clock-names = "bus", "db";
 			clocks = <&cru PCLK_GPIO4>, <&cru DBCLK_GPIO4>;
 			gpio-controller;
 			#gpio-cells = <2>;
-- 
2.25.1


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

* Re: [PATCH 1/2] dt-bindings: gpio: rockchip: add clock-names
  2022-09-02  6:04 ` [PATCH 1/2] dt-bindings: gpio: rockchip: add clock-names Jianqun Xu
@ 2022-09-02 21:05   ` Rob Herring
  2022-09-07 12:24   ` Krzysztof Kozlowski
  2022-09-07 14:32   ` Heiko Stübner
  2 siblings, 0 replies; 10+ messages in thread
From: Rob Herring @ 2022-09-02 21:05 UTC (permalink / raw)
  To: Jianqun Xu
  Cc: Linus Walleij, heiko@sntech.de, devicetree,
	linux-kernel@vger.kernel.org, Krzysztof Kozlowski,
	open list:GPIO SUBSYSTEM, open list:ARM/Rockchip SoC...

On Fri, Sep 2, 2022 at 1:04 AM Jianqun Xu <jay.xu@rock-chips.com> wrote:
>
> Add 'clock-names' to the gpio dt node. so the driver could get clocks by
> a const char id, this patch names the clock-names as
>   - 'bus': the apb clock for cpu to access the gpio controller
>   - 'db': the debounce clock for cpu to set debounce clock rate
>
> Since the old dt nodes may have no clock-names, this patch not make them
> as part of 'required properties'.
>
> Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
> ---
>  .../devicetree/bindings/gpio/rockchip,gpio-bank.yaml        | 6 ++++++
>  1 file changed, 6 insertions(+)

Can Rockchip please address DT binding header licensing:

https://lore.kernel.org/all/20220630220409.GA3396626-robh@kernel.org/
https://lore.kernel.org/all/20220902210141.GA403234-robh@kernel.org/

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

* Re: [PATCH 1/2] dt-bindings: gpio: rockchip: add clock-names
  2022-09-02  6:04 ` [PATCH 1/2] dt-bindings: gpio: rockchip: add clock-names Jianqun Xu
  2022-09-02 21:05   ` Rob Herring
@ 2022-09-07 12:24   ` Krzysztof Kozlowski
  2022-09-07 14:32   ` Heiko Stübner
  2 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-07 12:24 UTC (permalink / raw)
  To: Jianqun Xu, linus.walleij, heiko
  Cc: devicetree, linux-kernel, robh+dt, krzysztof.kozlowski+dt,
	linux-gpio, linux-rockchip

On 02/09/2022 08:04, Jianqun Xu wrote:
> Add 'clock-names' to the gpio dt node. so the driver could get clocks by
> a const char id, this patch names the clock-names as
>   - 'bus': the apb clock for cpu to access the gpio controller
>   - 'db': the debounce clock for cpu to set debounce clock rate
> 
> Since the old dt nodes may have no clock-names, this patch not make them
> as part of 'required properties'.
> 
> Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


Best regards,
Krzysztof

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

* Re: [PATCH 1/2] dt-bindings: gpio: rockchip: add clock-names
  2022-09-02  6:04 ` [PATCH 1/2] dt-bindings: gpio: rockchip: add clock-names Jianqun Xu
  2022-09-02 21:05   ` Rob Herring
  2022-09-07 12:24   ` Krzysztof Kozlowski
@ 2022-09-07 14:32   ` Heiko Stübner
  2 siblings, 0 replies; 10+ messages in thread
From: Heiko Stübner @ 2022-09-07 14:32 UTC (permalink / raw)
  To: linus.walleij, Jianqun Xu
  Cc: devicetree, linux-kernel, robh+dt, krzysztof.kozlowski+dt,
	linux-gpio, linux-rockchip, Jianqun Xu

Am Freitag, 2. September 2022, 08:04:25 CEST schrieb Jianqun Xu:
> Add 'clock-names' to the gpio dt node. so the driver could get clocks by
> a const char id, this patch names the clock-names as
>   - 'bus': the apb clock for cpu to access the gpio controller
>   - 'db': the debounce clock for cpu to set debounce clock rate
> 
> Since the old dt nodes may have no clock-names, this patch not make them
> as part of 'required properties'.
> 
> Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>

Acked-by: Heiko Stuebner <heiko@sntech.de>

> ---
>  .../devicetree/bindings/gpio/rockchip,gpio-bank.yaml        | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml b/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml
> index affd823c881d..d43d4c71bebf 100644
> --- a/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml
> +++ b/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml
> @@ -27,6 +27,12 @@ properties:
>        - description: APB interface clock source
>        - description: GPIO debounce reference clock source
>  
> +  clock-names:
> +    minItems: 1
> +    items:
> +      - const: bus
> +      - const: db
> +
>    gpio-ranges: true
>  
>    gpio-controller: true
> 





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

* Re: [PATCH 1/2] dt-bindings: gpio: rockchip: add clock-names
  2022-09-01  1:31 ` [PATCH 1/2] dt-bindings: gpio: rockchip: add clock-names Jianqun Xu
@ 2022-09-08 10:58   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-08 10:58 UTC (permalink / raw)
  To: Jianqun Xu, linus.walleij, heiko
  Cc: robh+dt, krzysztof.kozlowski+dt, linux-gpio, linux-rockchip

On 01/09/2022 03:31, Jianqun Xu wrote:
> Add 'clock-names' to the gpio dt node. so the driver could get clocks by
> a const char id, this patch names the clock-names as
>   - 'bus': the apb clock for cpu to access the gpio controller
>   - 'db': the debounce clock for cpu to set debounce clock rate
> 
> Since the old dt nodes may have no clock-names, this patch not make them
> as part of 'required properties'.
> 
> Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>

I see this patch sent three times... version your patches.

Best regards,
Krzysztof

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

end of thread, other threads:[~2022-09-08 10:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-02  6:04 [PATCH 0/2] gpio clock-names Jianqun Xu
2022-09-02  6:04 ` [PATCH 1/2] dt-bindings: gpio: rockchip: add clock-names Jianqun Xu
2022-09-02 21:05   ` Rob Herring
2022-09-07 12:24   ` Krzysztof Kozlowski
2022-09-07 14:32   ` Heiko Stübner
2022-09-02  6:04 ` [PATCH 2/2] arm64: dts: rockchip: rk356x add 'clock-names' for gpio nodes Jianqun Xu
  -- strict thread matches above, loose matches on Subject: below --
2022-09-01  1:30 [PATCH 0/2] gpio clock-names Jianqun Xu
2022-09-01  1:31 ` [PATCH 1/2] dt-bindings: gpio: rockchip: add clock-names Jianqun Xu
2022-09-08 10:58   ` Krzysztof Kozlowski
2022-09-01  1:29 [PATCH 0/2] gpio clock-names Jianqun Xu
2022-09-01  1:29 ` [PATCH 1/2] dt-bindings: gpio: rockchip: add clock-names Jianqun Xu
2022-09-01 11:48   ` Rob Herring

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).