Linux GPIO subsystem development
 help / color / mirror / Atom feed
* [PATCH 1/3] dt-bindings: pinctrl: samsung: use Exynos7 fallbacks for newer wake-up controllers
@ 2023-11-22 20:04 ` Krzysztof Kozlowski
  2023-11-22 20:04   ` [PATCH 2/3] arm64: dts: exynos850: use Exynos7 fallbacks for pin " Krzysztof Kozlowski
                     ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2023-11-22 20:04 UTC (permalink / raw)
  To: Tomasz Figa, Krzysztof Kozlowski, Sylwester Nawrocki, Alim Akhtar,
	Linus Walleij, Rob Herring, Conor Dooley, linux-arm-kernel,
	linux-samsung-soc, linux-gpio, devicetree, linux-kernel
  Cc: Peter Griffin, semen.protsenko, Jaewon Kim

Older ARM8 SoCs like Exynos5433, Exynos7 and Exynos7885 have the pin
controller with wake-up interrupts muxed, thus the wake-up interrupt
controller device node has interrupts property, while its pin banks
might not (because they are muxed by the wake-up controller).

Newer SoCs like Exynos850 and ExynosAutov9 do not used muxed wake-up
interrupts:
1. Wake-up interrupt controller device node has no interrupts,
2. Its pin banks have interrupts (since there is no muxing).

Their programming interface is however still compatible with Exynos7,
thus change the bindings to express this: retain compatibility with
Exynos7 and add new compatibility fallback of Exynos850 in newer
designs.

No driver changes are needed.  This is necessary only to properly
describe DTS.

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

---

Cc: Peter Griffin <peter.griffin@linaro.org>
Cc: semen.protsenko@linaro.org
Cc: Jaewon Kim <jaewon02.kim@samsung.com>
---
 .../samsung,pinctrl-wakeup-interrupt.yaml     | 25 +++++++++++--------
 1 file changed, 15 insertions(+), 10 deletions(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/samsung,pinctrl-wakeup-interrupt.yaml b/Documentation/devicetree/bindings/pinctrl/samsung,pinctrl-wakeup-interrupt.yaml
index 1b75abebb953..2bafa867aea2 100644
--- a/Documentation/devicetree/bindings/pinctrl/samsung,pinctrl-wakeup-interrupt.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/samsung,pinctrl-wakeup-interrupt.yaml
@@ -36,13 +36,17 @@ properties:
           - samsung,s5pv210-wakeup-eint
           - samsung,exynos4210-wakeup-eint
           - samsung,exynos7-wakeup-eint
-          - samsung,exynos850-wakeup-eint
-          - samsung,exynosautov9-wakeup-eint
-          - samsung,exynosautov920-wakeup-eint
       - items:
           - enum:
               - samsung,exynos5433-wakeup-eint
               - samsung,exynos7885-wakeup-eint
+              - samsung,exynos850-wakeup-eint
+          - const: samsung,exynos7-wakeup-eint
+      - items:
+          - enum:
+              - samsung,exynosautov9-wakeup-eint
+              - samsung,exynosautov920-wakeup-eint
+          - const: samsung,exynos850-wakeup-eint
           - const: samsung,exynos7-wakeup-eint
 
   interrupts:
@@ -86,11 +90,14 @@ allOf:
   - if:
       properties:
         compatible:
-          contains:
-            enum:
-              - samsung,s5pv210-wakeup-eint
-              - samsung,exynos4210-wakeup-eint
-              - samsung,exynos7-wakeup-eint
+          # Match without "contains", to skip newer variants which are still
+          # compatible with samsung,exynos7-wakeup-eint
+          enum:
+            - samsung,s5pv210-wakeup-eint
+            - samsung,exynos4210-wakeup-eint
+            - samsung,exynos5433-wakeup-eint
+            - samsung,exynos7-wakeup-eint
+            - samsung,exynos7885-wakeup-eint
     then:
       properties:
         interrupts:
@@ -105,8 +112,6 @@ allOf:
           contains:
             enum:
               - samsung,exynos850-wakeup-eint
-              - samsung,exynosautov9-wakeup-eint
-              - samsung,exynosautov920-wakeup-eint
     then:
       properties:
         interrupts: false
-- 
2.34.1


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

* [PATCH 2/3] arm64: dts: exynos850: use Exynos7 fallbacks for pin wake-up controllers
  2023-11-22 20:04 ` [PATCH 1/3] dt-bindings: pinctrl: samsung: use Exynos7 fallbacks for newer wake-up controllers Krzysztof Kozlowski
@ 2023-11-22 20:04   ` Krzysztof Kozlowski
  2023-11-24  7:43     ` (subset) " Krzysztof Kozlowski
  2023-11-22 20:04   ` [PATCH 3/3] arm64: dts: exynosautov9: " Krzysztof Kozlowski
                     ` (3 subsequent siblings)
  4 siblings, 1 reply; 8+ messages in thread
From: Krzysztof Kozlowski @ 2023-11-22 20:04 UTC (permalink / raw)
  To: Tomasz Figa, Krzysztof Kozlowski, Sylwester Nawrocki, Alim Akhtar,
	Linus Walleij, Rob Herring, Conor Dooley, linux-arm-kernel,
	linux-samsung-soc, linux-gpio, devicetree, linux-kernel
  Cc: Peter Griffin, semen.protsenko, Jaewon Kim

Exynos850 pin controller capable of wake-ups is still compatible with
Exynos7, however it does not mux interrupts. Add Exynos7 compatible
fallback to annotate that compatibility and match the bindings.

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

---

Cc: Peter Griffin <peter.griffin@linaro.org>
Cc: semen.protsenko@linaro.org
Cc: Jaewon Kim <jaewon02.kim@samsung.com>
---
 arch/arm64/boot/dts/exynos/exynos850.dtsi | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/exynos/exynos850.dtsi b/arch/arm64/boot/dts/exynos/exynos850.dtsi
index df5ea43ebcad..da3f4a791e68 100644
--- a/arch/arm64/boot/dts/exynos/exynos850.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynos850.dtsi
@@ -359,7 +359,8 @@ pinctrl_alive: pinctrl@11850000 {
 			reg = <0x11850000 0x1000>;
 
 			wakeup-interrupt-controller {
-				compatible = "samsung,exynos850-wakeup-eint";
+				compatible = "samsung,exynos850-wakeup-eint",
+					     "samsung,exynos7-wakeup-eint";
 			};
 		};
 
@@ -368,7 +369,8 @@ pinctrl_cmgp: pinctrl@11c30000 {
 			reg = <0x11c30000 0x1000>;
 
 			wakeup-interrupt-controller {
-				compatible = "samsung,exynos850-wakeup-eint";
+				compatible = "samsung,exynos850-wakeup-eint",
+					     "samsung,exynos7-wakeup-eint";
 			};
 		};
 
-- 
2.34.1


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

* [PATCH 3/3] arm64: dts: exynosautov9: use Exynos7 fallbacks for pin wake-up controllers
  2023-11-22 20:04 ` [PATCH 1/3] dt-bindings: pinctrl: samsung: use Exynos7 fallbacks for newer wake-up controllers Krzysztof Kozlowski
  2023-11-22 20:04   ` [PATCH 2/3] arm64: dts: exynos850: use Exynos7 fallbacks for pin " Krzysztof Kozlowski
@ 2023-11-22 20:04   ` Krzysztof Kozlowski
  2023-11-24  7:43     ` (subset) " Krzysztof Kozlowski
  2023-11-23  7:06   ` [PATCH 1/3] dt-bindings: pinctrl: samsung: use Exynos7 fallbacks for newer " Jaewon Kim
                     ` (2 subsequent siblings)
  4 siblings, 1 reply; 8+ messages in thread
From: Krzysztof Kozlowski @ 2023-11-22 20:04 UTC (permalink / raw)
  To: Tomasz Figa, Krzysztof Kozlowski, Sylwester Nawrocki, Alim Akhtar,
	Linus Walleij, Rob Herring, Conor Dooley, linux-arm-kernel,
	linux-samsung-soc, linux-gpio, devicetree, linux-kernel
  Cc: Peter Griffin, semen.protsenko, Jaewon Kim

ExynosAutov9 pin controller capable of wake-ups is still compatible with
Exynos7, however it does not mux interrupts. Add Exynos7 compatible
fallback to annotate that compatibility and match the bindings.

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

---

Cc: Peter Griffin <peter.griffin@linaro.org>
Cc: semen.protsenko@linaro.org
Cc: Jaewon Kim <jaewon02.kim@samsung.com>
---
 arch/arm64/boot/dts/exynos/exynosautov9.dtsi | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/exynos/exynosautov9.dtsi b/arch/arm64/boot/dts/exynos/exynosautov9.dtsi
index 417aa56a81f6..c871a2f49fda 100644
--- a/arch/arm64/boot/dts/exynos/exynosautov9.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynosautov9.dtsi
@@ -310,7 +310,9 @@ pinctrl_alive: pinctrl@10450000 {
 			reg = <0x10450000 0x1000>;
 
 			wakeup-interrupt-controller {
-				compatible = "samsung,exynosautov9-wakeup-eint";
+				compatible = "samsung,exynosautov9-wakeup-eint",
+					     "samsung,exynos850-wakeup-eint",
+					     "samsung,exynos7-wakeup-eint";
 			};
 		};
 
-- 
2.34.1


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

* Re: [PATCH 1/3] dt-bindings: pinctrl: samsung: use Exynos7 fallbacks for newer wake-up controllers
  2023-11-22 20:04 ` [PATCH 1/3] dt-bindings: pinctrl: samsung: use Exynos7 fallbacks for newer wake-up controllers Krzysztof Kozlowski
  2023-11-22 20:04   ` [PATCH 2/3] arm64: dts: exynos850: use Exynos7 fallbacks for pin " Krzysztof Kozlowski
  2023-11-22 20:04   ` [PATCH 3/3] arm64: dts: exynosautov9: " Krzysztof Kozlowski
@ 2023-11-23  7:06   ` Jaewon Kim
  2023-11-23 17:42   ` Conor Dooley
  2023-11-24  7:41   ` (subset) " Krzysztof Kozlowski
  4 siblings, 0 replies; 8+ messages in thread
From: Jaewon Kim @ 2023-11-23  7:06 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Tomasz Figa, Sylwester Nawrocki, Alim Akhtar,
	Linus Walleij, Rob Herring, Conor Dooley, linux-arm-kernel,
	linux-samsung-soc, linux-gpio, devicetree, linux-kernel
  Cc: Peter Griffin, semen.protsenko


On 23. 11. 23. 05:04, Krzysztof Kozlowski wrote:
> Older ARM8 SoCs like Exynos5433, Exynos7 and Exynos7885 have the pin
> controller with wake-up interrupts muxed, thus the wake-up interrupt
> controller device node has interrupts property, while its pin banks
> might not (because they are muxed by the wake-up controller).
>
> Newer SoCs like Exynos850 and ExynosAutov9 do not used muxed wake-up
> interrupts:
> 1. Wake-up interrupt controller device node has no interrupts,
> 2. Its pin banks have interrupts (since there is no muxing).
>
> Their programming interface is however still compatible with Exynos7,
> thus change the bindings to express this: retain compatibility with
> Exynos7 and add new compatibility fallback of Exynos850 in newer
> designs.
>
> No driver changes are needed.  This is necessary only to properly
> describe DTS.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Acked-by: Jaewon Kim <jaewon02.kim@samsung.com>


I will also apply it to ExynosAutov920 DT patch.


Thanks

Jaewon Kim


>
> ---
>
> Cc: Peter Griffin <peter.griffin@linaro.org>
> Cc: semen.protsenko@linaro.org
> Cc: Jaewon Kim <jaewon02.kim@samsung.com>
> ---
>   .../samsung,pinctrl-wakeup-interrupt.yaml     | 25 +++++++++++--------
>   1 file changed, 15 insertions(+), 10 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/pinctrl/samsung,pinctrl-wakeup-interrupt.yaml b/Documentation/devicetree/bindings/pinctrl/samsung,pinctrl-wakeup-interrupt.yaml
> index 1b75abebb953..2bafa867aea2 100644
> --- a/Documentation/devicetree/bindings/pinctrl/samsung,pinctrl-wakeup-interrupt.yaml
> +++ b/Documentation/devicetree/bindings/pinctrl/samsung,pinctrl-wakeup-interrupt.yaml
> @@ -36,13 +36,17 @@ properties:
>             - samsung,s5pv210-wakeup-eint
>             - samsung,exynos4210-wakeup-eint
>             - samsung,exynos7-wakeup-eint
> -          - samsung,exynos850-wakeup-eint
> -          - samsung,exynosautov9-wakeup-eint
> -          - samsung,exynosautov920-wakeup-eint
>         - items:
>             - enum:
>                 - samsung,exynos5433-wakeup-eint
>                 - samsung,exynos7885-wakeup-eint
> +              - samsung,exynos850-wakeup-eint
> +          - const: samsung,exynos7-wakeup-eint
> +      - items:
> +          - enum:
> +              - samsung,exynosautov9-wakeup-eint
> +              - samsung,exynosautov920-wakeup-eint
> +          - const: samsung,exynos850-wakeup-eint
>             - const: samsung,exynos7-wakeup-eint
>   
>     interrupts:
> @@ -86,11 +90,14 @@ allOf:
>     - if:
>         properties:
>           compatible:
> -          contains:
> -            enum:
> -              - samsung,s5pv210-wakeup-eint
> -              - samsung,exynos4210-wakeup-eint
> -              - samsung,exynos7-wakeup-eint
> +          # Match without "contains", to skip newer variants which are still
> +          # compatible with samsung,exynos7-wakeup-eint
> +          enum:
> +            - samsung,s5pv210-wakeup-eint
> +            - samsung,exynos4210-wakeup-eint
> +            - samsung,exynos5433-wakeup-eint
> +            - samsung,exynos7-wakeup-eint
> +            - samsung,exynos7885-wakeup-eint
>       then:
>         properties:
>           interrupts:
> @@ -105,8 +112,6 @@ allOf:
>             contains:
>               enum:
>                 - samsung,exynos850-wakeup-eint
> -              - samsung,exynosautov9-wakeup-eint
> -              - samsung,exynosautov920-wakeup-eint
>       then:
>         properties:
>           interrupts: false

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

* Re: [PATCH 1/3] dt-bindings: pinctrl: samsung: use Exynos7 fallbacks for newer wake-up controllers
  2023-11-22 20:04 ` [PATCH 1/3] dt-bindings: pinctrl: samsung: use Exynos7 fallbacks for newer wake-up controllers Krzysztof Kozlowski
                     ` (2 preceding siblings ...)
  2023-11-23  7:06   ` [PATCH 1/3] dt-bindings: pinctrl: samsung: use Exynos7 fallbacks for newer " Jaewon Kim
@ 2023-11-23 17:42   ` Conor Dooley
  2023-11-24  7:41   ` (subset) " Krzysztof Kozlowski
  4 siblings, 0 replies; 8+ messages in thread
From: Conor Dooley @ 2023-11-23 17:42 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Tomasz Figa, Sylwester Nawrocki, Alim Akhtar, Linus Walleij,
	Rob Herring, Conor Dooley, linux-arm-kernel, linux-samsung-soc,
	linux-gpio, devicetree, linux-kernel, Peter Griffin,
	semen.protsenko, Jaewon Kim

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

On Wed, Nov 22, 2023 at 09:04:05PM +0100, Krzysztof Kozlowski wrote:
> Older ARM8 SoCs like Exynos5433, Exynos7 and Exynos7885 have the pin
> controller with wake-up interrupts muxed, thus the wake-up interrupt
> controller device node has interrupts property, while its pin banks
> might not (because they are muxed by the wake-up controller).
> 
> Newer SoCs like Exynos850 and ExynosAutov9 do not used muxed wake-up
> interrupts:
> 1. Wake-up interrupt controller device node has no interrupts,
> 2. Its pin banks have interrupts (since there is no muxing).
> 
> Their programming interface is however still compatible with Exynos7,
> thus change the bindings to express this: retain compatibility with
> Exynos7 and add new compatibility fallback of Exynos850 in newer
> designs.
> 
> No driver changes are needed.  This is necessary only to properly
> describe DTS.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Acked-by: Conor Dooley <conor.dooley@microchip.com>

Cheers,
Conor.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: (subset) [PATCH 1/3] dt-bindings: pinctrl: samsung: use Exynos7 fallbacks for newer wake-up controllers
  2023-11-22 20:04 ` [PATCH 1/3] dt-bindings: pinctrl: samsung: use Exynos7 fallbacks for newer wake-up controllers Krzysztof Kozlowski
                     ` (3 preceding siblings ...)
  2023-11-23 17:42   ` Conor Dooley
@ 2023-11-24  7:41   ` Krzysztof Kozlowski
  4 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2023-11-24  7:41 UTC (permalink / raw)
  To: Tomasz Figa, Sylwester Nawrocki, Alim Akhtar, Linus Walleij,
	Rob Herring, Conor Dooley, linux-arm-kernel, linux-samsung-soc,
	linux-gpio, devicetree, linux-kernel, Krzysztof Kozlowski
  Cc: Peter Griffin, semen.protsenko, Jaewon Kim


On Wed, 22 Nov 2023 21:04:05 +0100, Krzysztof Kozlowski wrote:
> Older ARM8 SoCs like Exynos5433, Exynos7 and Exynos7885 have the pin
> controller with wake-up interrupts muxed, thus the wake-up interrupt
> controller device node has interrupts property, while its pin banks
> might not (because they are muxed by the wake-up controller).
> 
> Newer SoCs like Exynos850 and ExynosAutov9 do not used muxed wake-up
> interrupts:
> 1. Wake-up interrupt controller device node has no interrupts,
> 2. Its pin banks have interrupts (since there is no muxing).
> 
> [...]

Applied, thanks!

[1/3] dt-bindings: pinctrl: samsung: use Exynos7 fallbacks for newer wake-up controllers
      https://git.kernel.org/pinctrl/samsung/c/904140fa45533f6d05071e24492013da16c46b7f

Best regards,
-- 
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

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

* Re: (subset) [PATCH 2/3] arm64: dts: exynos850: use Exynos7 fallbacks for pin wake-up controllers
  2023-11-22 20:04   ` [PATCH 2/3] arm64: dts: exynos850: use Exynos7 fallbacks for pin " Krzysztof Kozlowski
@ 2023-11-24  7:43     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2023-11-24  7:43 UTC (permalink / raw)
  To: Tomasz Figa, Sylwester Nawrocki, Alim Akhtar, Linus Walleij,
	Rob Herring, Conor Dooley, linux-arm-kernel, linux-samsung-soc,
	linux-gpio, devicetree, linux-kernel, Krzysztof Kozlowski
  Cc: Peter Griffin, semen.protsenko, Jaewon Kim


On Wed, 22 Nov 2023 21:04:06 +0100, Krzysztof Kozlowski wrote:
> Exynos850 pin controller capable of wake-ups is still compatible with
> Exynos7, however it does not mux interrupts. Add Exynos7 compatible
> fallback to annotate that compatibility and match the bindings.
> 
> 

Applied, thanks!

[2/3] arm64: dts: exynos850: use Exynos7 fallbacks for pin wake-up controllers
      https://git.kernel.org/krzk/linux/c/2d8f82dd322fbaafc9c1a70d70efb6efe42c973b

Best regards,
-- 
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


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

* Re: (subset) [PATCH 3/3] arm64: dts: exynosautov9: use Exynos7 fallbacks for pin wake-up controllers
  2023-11-22 20:04   ` [PATCH 3/3] arm64: dts: exynosautov9: " Krzysztof Kozlowski
@ 2023-11-24  7:43     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2023-11-24  7:43 UTC (permalink / raw)
  To: Tomasz Figa, Sylwester Nawrocki, Alim Akhtar, Linus Walleij,
	Rob Herring, Conor Dooley, linux-arm-kernel, linux-samsung-soc,
	linux-gpio, devicetree, linux-kernel, Krzysztof Kozlowski
  Cc: Peter Griffin, semen.protsenko, Jaewon Kim


On Wed, 22 Nov 2023 21:04:07 +0100, Krzysztof Kozlowski wrote:
> ExynosAutov9 pin controller capable of wake-ups is still compatible with
> Exynos7, however it does not mux interrupts. Add Exynos7 compatible
> fallback to annotate that compatibility and match the bindings.
> 
> 

Applied, thanks!

[3/3] arm64: dts: exynosautov9: use Exynos7 fallbacks for pin wake-up controllers
      https://git.kernel.org/krzk/linux/c/7c1156d8a719d5fca39e0e40e4465e4cbd765e89

Best regards,
-- 
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


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

end of thread, other threads:[~2023-11-24  7:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CGME20231122200609epcas2p1da5f138359da3a0be4af4fbc25f2a8f5@epcas2p1.samsung.com>
2023-11-22 20:04 ` [PATCH 1/3] dt-bindings: pinctrl: samsung: use Exynos7 fallbacks for newer wake-up controllers Krzysztof Kozlowski
2023-11-22 20:04   ` [PATCH 2/3] arm64: dts: exynos850: use Exynos7 fallbacks for pin " Krzysztof Kozlowski
2023-11-24  7:43     ` (subset) " Krzysztof Kozlowski
2023-11-22 20:04   ` [PATCH 3/3] arm64: dts: exynosautov9: " Krzysztof Kozlowski
2023-11-24  7:43     ` (subset) " Krzysztof Kozlowski
2023-11-23  7:06   ` [PATCH 1/3] dt-bindings: pinctrl: samsung: use Exynos7 fallbacks for newer " Jaewon Kim
2023-11-23 17:42   ` Conor Dooley
2023-11-24  7:41   ` (subset) " Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox