devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] dt-bindings: i2c: mv64xxx: Add variants with offload support
@ 2022-07-02  5:25 Samuel Holland
  2022-07-02  5:25 ` [PATCH 2/2] arm64: dts: allwinner: a100: Update I2C controller fallback Samuel Holland
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Samuel Holland @ 2022-07-02  5:25 UTC (permalink / raw)
  To: Chen-Yu Tsai, Jernej Skrabec
  Cc: Andre Przywara, Wolfram Sang, Samuel Holland, Gregory CLEMENT,
	Krzysztof Kozlowski, Rob Herring, devicetree, linux-i2c,
	linux-kernel

V536 and newer Allwinner SoCs contain an updated I2C controller which
includes an offload engine for master mode. The controller retains the
existing register interface, so the A31 compatible still applies.

Add the V536 compatible and use it as a fallback for other SoCs with the
updated hardware. This includes two SoCs that were already documented
(H616 and A100) and two new SoCs (R329 and D1).

Signed-off-by: Samuel Holland <samuel@sholland.org>
---

 .../devicetree/bindings/i2c/marvell,mv64xxx-i2c.yaml   | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/i2c/marvell,mv64xxx-i2c.yaml b/Documentation/devicetree/bindings/i2c/marvell,mv64xxx-i2c.yaml
index f771c09aabfc..0ec033e48830 100644
--- a/Documentation/devicetree/bindings/i2c/marvell,mv64xxx-i2c.yaml
+++ b/Documentation/devicetree/bindings/i2c/marvell,mv64xxx-i2c.yaml
@@ -21,10 +21,18 @@ properties:
           - enum:
               - allwinner,sun8i-a23-i2c
               - allwinner,sun8i-a83t-i2c
+              - allwinner,sun8i-v536-i2c
               - allwinner,sun50i-a64-i2c
-              - allwinner,sun50i-a100-i2c
               - allwinner,sun50i-h6-i2c
+          - const: allwinner,sun6i-a31-i2c
+      - description: Allwinner SoCs with offload support
+        items:
+          - enum:
+              - allwinner,sun20i-d1-i2c
+              - allwinner,sun50i-a100-i2c
               - allwinner,sun50i-h616-i2c
+              - allwinner,sun50i-r329-i2c
+          - const: allwinner,sun8i-v536-i2c
           - const: allwinner,sun6i-a31-i2c
       - const: marvell,mv64xxx-i2c
       - const: marvell,mv78230-i2c
-- 
2.35.1


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

* [PATCH 2/2] arm64: dts: allwinner: a100: Update I2C controller fallback
  2022-07-02  5:25 [PATCH 1/2] dt-bindings: i2c: mv64xxx: Add variants with offload support Samuel Holland
@ 2022-07-02  5:25 ` Samuel Holland
  2022-07-05 19:45   ` Jernej Škrabec
  2022-07-04  8:37 ` [PATCH 1/2] dt-bindings: i2c: mv64xxx: Add variants with offload support Krzysztof Kozlowski
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 8+ messages in thread
From: Samuel Holland @ 2022-07-02  5:25 UTC (permalink / raw)
  To: Chen-Yu Tsai, Jernej Skrabec
  Cc: Andre Przywara, Wolfram Sang, Samuel Holland, Gregory CLEMENT,
	Krzysztof Kozlowski, Rob Herring, devicetree, linux-i2c,
	linux-kernel, linux-arm-kernel, linux-sunxi

The I2C controllers in the A100 SoC are newer-generation hardware
which includes an offload engine. Signify that by including the
allwinner,sun8i-v536-i2c fallback compatible, as V536 is the first
SoC with this generation of I2C controller.

Signed-off-by: Samuel Holland <samuel@sholland.org>
---

 arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
index f6d7d7f7fdab..548539c93ab0 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
@@ -203,6 +203,7 @@ uart4: serial@5001000 {
 
 		i2c0: i2c@5002000 {
 			compatible = "allwinner,sun50i-a100-i2c",
+				     "allwinner,sun8i-v536-i2c",
 				     "allwinner,sun6i-a31-i2c";
 			reg = <0x05002000 0x400>;
 			interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
@@ -215,6 +216,7 @@ i2c0: i2c@5002000 {
 
 		i2c1: i2c@5002400 {
 			compatible = "allwinner,sun50i-a100-i2c",
+				     "allwinner,sun8i-v536-i2c",
 				     "allwinner,sun6i-a31-i2c";
 			reg = <0x05002400 0x400>;
 			interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
@@ -227,6 +229,7 @@ i2c1: i2c@5002400 {
 
 		i2c2: i2c@5002800 {
 			compatible = "allwinner,sun50i-a100-i2c",
+				     "allwinner,sun8i-v536-i2c",
 				     "allwinner,sun6i-a31-i2c";
 			reg = <0x05002800 0x400>;
 			interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
@@ -239,6 +242,7 @@ i2c2: i2c@5002800 {
 
 		i2c3: i2c@5002c00 {
 			compatible = "allwinner,sun50i-a100-i2c",
+				     "allwinner,sun8i-v536-i2c",
 				     "allwinner,sun6i-a31-i2c";
 			reg = <0x05002c00 0x400>;
 			interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
@@ -315,6 +319,7 @@ r_uart: serial@7080000 {
 
 		r_i2c0: i2c@7081400 {
 			compatible = "allwinner,sun50i-a100-i2c",
+				     "allwinner,sun8i-v536-i2c",
 				     "allwinner,sun6i-a31-i2c";
 			reg = <0x07081400 0x400>;
 			interrupts = <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
@@ -329,6 +334,7 @@ r_i2c0: i2c@7081400 {
 
 		r_i2c1: i2c@7081800 {
 			compatible = "allwinner,sun50i-a100-i2c",
+				     "allwinner,sun8i-v536-i2c",
 				     "allwinner,sun6i-a31-i2c";
 			reg = <0x07081800 0x400>;
 			interrupts = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>;
-- 
2.35.1


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

* Re: [PATCH 1/2] dt-bindings: i2c: mv64xxx: Add variants with offload support
  2022-07-02  5:25 [PATCH 1/2] dt-bindings: i2c: mv64xxx: Add variants with offload support Samuel Holland
  2022-07-02  5:25 ` [PATCH 2/2] arm64: dts: allwinner: a100: Update I2C controller fallback Samuel Holland
@ 2022-07-04  8:37 ` Krzysztof Kozlowski
  2022-07-05 10:42 ` Andre Przywara
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-04  8:37 UTC (permalink / raw)
  To: Samuel Holland, Chen-Yu Tsai, Jernej Skrabec
  Cc: Andre Przywara, Wolfram Sang, Gregory CLEMENT,
	Krzysztof Kozlowski, Rob Herring, devicetree, linux-i2c,
	linux-kernel

On 02/07/2022 07:25, Samuel Holland wrote:
> V536 and newer Allwinner SoCs contain an updated I2C controller which
> includes an offload engine for master mode. The controller retains the
> existing register interface, so the A31 compatible still applies.
> 
> Add the V536 compatible and use it as a fallback for other SoCs with the
> updated hardware. This includes two SoCs that were already documented
> (H616 and A100) and two new SoCs (R329 and D1).
> 
> Signed-off-by: Samuel Holland <samuel@sholland.org>
> ---


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


Best regards,
Krzysztof

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

* Re: [PATCH 1/2] dt-bindings: i2c: mv64xxx: Add variants with offload support
  2022-07-02  5:25 [PATCH 1/2] dt-bindings: i2c: mv64xxx: Add variants with offload support Samuel Holland
  2022-07-02  5:25 ` [PATCH 2/2] arm64: dts: allwinner: a100: Update I2C controller fallback Samuel Holland
  2022-07-04  8:37 ` [PATCH 1/2] dt-bindings: i2c: mv64xxx: Add variants with offload support Krzysztof Kozlowski
@ 2022-07-05 10:42 ` Andre Przywara
  2022-07-05 19:51 ` Jernej Škrabec
  2022-07-06 19:28 ` Wolfram Sang
  4 siblings, 0 replies; 8+ messages in thread
From: Andre Przywara @ 2022-07-05 10:42 UTC (permalink / raw)
  To: Samuel Holland
  Cc: Chen-Yu Tsai, Jernej Skrabec, Wolfram Sang, Gregory CLEMENT,
	Krzysztof Kozlowski, Rob Herring, devicetree, linux-i2c,
	linux-kernel

On Sat,  2 Jul 2022 00:25:42 -0500
Samuel Holland <samuel@sholland.org> wrote:

Hi,

> V536 and newer Allwinner SoCs contain an updated I2C controller which
> includes an offload engine for master mode. The controller retains the
> existing register interface, so the A31 compatible still applies.
> 
> Add the V536 compatible and use it as a fallback for other SoCs with the
> updated hardware. This includes two SoCs that were already documented
> (H616 and A100) and two new SoCs (R329 and D1).
> 
> Signed-off-by: Samuel Holland <samuel@sholland.org>

That seems correct to me: I couldn't get hold of manuals of some of the new
SoCs, but at least the D1 and H616 indeed add an extra set of registers
for this "TWI driver" offload engine. But the basic operation is still
supported, so the two fallbacks make sense.

Reviewed-by: Andre Przywara <andre.przywara@arm.com>

Cheers,
Andre

> ---
> 
>  .../devicetree/bindings/i2c/marvell,mv64xxx-i2c.yaml   | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/i2c/marvell,mv64xxx-i2c.yaml b/Documentation/devicetree/bindings/i2c/marvell,mv64xxx-i2c.yaml
> index f771c09aabfc..0ec033e48830 100644
> --- a/Documentation/devicetree/bindings/i2c/marvell,mv64xxx-i2c.yaml
> +++ b/Documentation/devicetree/bindings/i2c/marvell,mv64xxx-i2c.yaml
> @@ -21,10 +21,18 @@ properties:
>            - enum:
>                - allwinner,sun8i-a23-i2c
>                - allwinner,sun8i-a83t-i2c
> +              - allwinner,sun8i-v536-i2c
>                - allwinner,sun50i-a64-i2c
> -              - allwinner,sun50i-a100-i2c
>                - allwinner,sun50i-h6-i2c
> +          - const: allwinner,sun6i-a31-i2c
> +      - description: Allwinner SoCs with offload support
> +        items:
> +          - enum:
> +              - allwinner,sun20i-d1-i2c
> +              - allwinner,sun50i-a100-i2c
>                - allwinner,sun50i-h616-i2c
> +              - allwinner,sun50i-r329-i2c
> +          - const: allwinner,sun8i-v536-i2c
>            - const: allwinner,sun6i-a31-i2c
>        - const: marvell,mv64xxx-i2c
>        - const: marvell,mv78230-i2c


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

* Re: [PATCH 2/2] arm64: dts: allwinner: a100: Update I2C controller fallback
  2022-07-02  5:25 ` [PATCH 2/2] arm64: dts: allwinner: a100: Update I2C controller fallback Samuel Holland
@ 2022-07-05 19:45   ` Jernej Škrabec
  2022-07-05 19:51     ` Jernej Škrabec
  0 siblings, 1 reply; 8+ messages in thread
From: Jernej Škrabec @ 2022-07-05 19:45 UTC (permalink / raw)
  To: Chen-Yu Tsai, Samuel Holland
  Cc: Andre Przywara, Wolfram Sang, Samuel Holland, Gregory CLEMENT,
	Krzysztof Kozlowski, Rob Herring, devicetree, linux-i2c,
	linux-kernel, linux-arm-kernel, linux-sunxi

Dne sobota, 02. julij 2022 ob 07:25:43 CEST je Samuel Holland napisal(a):
> The I2C controllers in the A100 SoC are newer-generation hardware
> which includes an offload engine. Signify that by including the
> allwinner,sun8i-v536-i2c fallback compatible, as V536 is the first
> SoC with this generation of I2C controller.
> 
> Signed-off-by: Samuel Holland <samuel@sholland.org>

Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej



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

* Re: [PATCH 1/2] dt-bindings: i2c: mv64xxx: Add variants with offload support
  2022-07-02  5:25 [PATCH 1/2] dt-bindings: i2c: mv64xxx: Add variants with offload support Samuel Holland
                   ` (2 preceding siblings ...)
  2022-07-05 10:42 ` Andre Przywara
@ 2022-07-05 19:51 ` Jernej Škrabec
  2022-07-06 19:28 ` Wolfram Sang
  4 siblings, 0 replies; 8+ messages in thread
From: Jernej Škrabec @ 2022-07-05 19:51 UTC (permalink / raw)
  To: Chen-Yu Tsai, Samuel Holland
  Cc: Andre Przywara, Wolfram Sang, Samuel Holland, Gregory CLEMENT,
	Krzysztof Kozlowski, Rob Herring, devicetree, linux-i2c,
	linux-kernel

Dne sobota, 02. julij 2022 ob 07:25:42 CEST je Samuel Holland napisal(a):
> V536 and newer Allwinner SoCs contain an updated I2C controller which
> includes an offload engine for master mode. The controller retains the
> existing register interface, so the A31 compatible still applies.
> 
> Add the V536 compatible and use it as a fallback for other SoCs with the
> updated hardware. This includes two SoCs that were already documented
> (H616 and A100) and two new SoCs (R329 and D1).
> 
> Signed-off-by: Samuel Holland <samuel@sholland.org>

Applied, thanks!

Best regards,
Jernej



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

* Re: Re: [PATCH 2/2] arm64: dts: allwinner: a100: Update I2C controller fallback
  2022-07-05 19:45   ` Jernej Škrabec
@ 2022-07-05 19:51     ` Jernej Škrabec
  0 siblings, 0 replies; 8+ messages in thread
From: Jernej Škrabec @ 2022-07-05 19:51 UTC (permalink / raw)
  To: Chen-Yu Tsai, Samuel Holland
  Cc: Andre Przywara, Wolfram Sang, Samuel Holland, Gregory CLEMENT,
	Krzysztof Kozlowski, Rob Herring, devicetree, linux-i2c,
	linux-kernel, linux-arm-kernel, linux-sunxi

Dne torek, 05. julij 2022 ob 21:45:31 CEST je Jernej Škrabec napisal(a):
> Dne sobota, 02. julij 2022 ob 07:25:43 CEST je Samuel Holland napisal(a):
> > The I2C controllers in the A100 SoC are newer-generation hardware
> > which includes an offload engine. Signify that by including the
> > allwinner,sun8i-v536-i2c fallback compatible, as V536 is the first
> > SoC with this generation of I2C controller.
> > 
> > Signed-off-by: Samuel Holland <samuel@sholland.org>
> 
> Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Applied, thanks!

Best regards,
Jernej



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

* Re: [PATCH 1/2] dt-bindings: i2c: mv64xxx: Add variants with offload support
  2022-07-02  5:25 [PATCH 1/2] dt-bindings: i2c: mv64xxx: Add variants with offload support Samuel Holland
                   ` (3 preceding siblings ...)
  2022-07-05 19:51 ` Jernej Škrabec
@ 2022-07-06 19:28 ` Wolfram Sang
  4 siblings, 0 replies; 8+ messages in thread
From: Wolfram Sang @ 2022-07-06 19:28 UTC (permalink / raw)
  To: Samuel Holland
  Cc: Chen-Yu Tsai, Jernej Skrabec, Andre Przywara, Gregory CLEMENT,
	Krzysztof Kozlowski, Rob Herring, devicetree, linux-i2c,
	linux-kernel

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

On Sat, Jul 02, 2022 at 12:25:42AM -0500, Samuel Holland wrote:
> V536 and newer Allwinner SoCs contain an updated I2C controller which
> includes an offload engine for master mode. The controller retains the
> existing register interface, so the A31 compatible still applies.
> 
> Add the V536 compatible and use it as a fallback for other SoCs with the
> updated hardware. This includes two SoCs that were already documented
> (H616 and A100) and two new SoCs (R329 and D1).
> 
> Signed-off-by: Samuel Holland <samuel@sholland.org>

Acked-by: Wolfram Sang <wsa@kernel.org>


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

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

end of thread, other threads:[~2022-07-06 19:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-02  5:25 [PATCH 1/2] dt-bindings: i2c: mv64xxx: Add variants with offload support Samuel Holland
2022-07-02  5:25 ` [PATCH 2/2] arm64: dts: allwinner: a100: Update I2C controller fallback Samuel Holland
2022-07-05 19:45   ` Jernej Škrabec
2022-07-05 19:51     ` Jernej Škrabec
2022-07-04  8:37 ` [PATCH 1/2] dt-bindings: i2c: mv64xxx: Add variants with offload support Krzysztof Kozlowski
2022-07-05 10:42 ` Andre Przywara
2022-07-05 19:51 ` Jernej Škrabec
2022-07-06 19:28 ` Wolfram Sang

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