Skip to contentSkip to conversation

i2c: rcar: Add R-Car S4-8 support

PATCH Applied Geert Uytterhoeven 4 participants 13 messages Feb 3, 2022 – Feb 11, 2022

Subsystems (4)

v1 of 2 Applied Latest is v2 →

lore
Share & tools
lore

Geert Uytterhoeven

author maintainer
#0 lore raw

cover i2c: rcar: Add R-Car S4-8 support

Hi all,

This patch series adds support for the I2C Bus Interfaces in the R-Car S4-8 (R8A779F0) SoC, to both DT bindings and driver code. It has been tested on the Renesas Spider development board.

Thanks for your comments!

Geert Uytterhoeven (2):
dt-bindings: i2c: renesas,rcar-i2c: Add r8a779f0 support
i2c: rcar: Add R-Car Gen4 support

 Documentation/devicetree/bindings/i2c/renesas,rcar-i2c.yaml | 6 ++++++
 drivers/i2c/busses/i2c-rcar.c                               | 1 +
 2 files changed, 7 insertions(+)
Signature · 12 lines
2.25.1

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds
author maintainer
#1 lore raw

PATCH 1/2 dt-bindings: i2c: renesas,rcar-i2c: Add r8a779f0 support

Document support for the I2C Bus Interfaces in the Renesas R-Car S4-8 (R8A779F0) SoC, including a new family-specific compatible value for the R-Car Gen4 family.

---
 Documentation/devicetree/bindings/i2c/renesas,rcar-i2c.yaml | 6 ++++++
 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/i2c/renesas,rcar-i2c.yaml +6 -0
index 052aad44e781a561..c30107833a5145f9 100644
@@ -49,6 +49,11 @@ properties:
               - renesas,i2c-r8a779a0     # R-Car V3U
           - const: renesas,rcar-gen3-i2c # R-Car Gen3 and RZ/G2
 
+      - items:
+          - enum:
+              - renesas,i2c-r8a779f0     # R-Car S4-8
+          - const: renesas,rcar-gen4-i2c # R-Car Gen4
+
   reg:
     maxItems: 1
 
@@ -132,6 +137,7 @@ allOf:
             enum:
               - renesas,rcar-gen2-i2c
               - renesas,rcar-gen3-i2c
+              - renesas,rcar-gen4-i2c
     then:
       required:
         - resets
Signature · 1 line
2.25.1
maintainer Acked-by on v1 1/2
#3 lore raw

Re: [PATCH 1/2] dt-bindings: i2c: renesas,rcar-i2c: Add r8a779f0 support

In reply to Geert Uytterhoeven
Quoted 9 lines · Geert Uytterhoeven

Document support for the I2C Bus Interfaces in the Renesas R-Car S4-8 (R8A779F0) SoC, including a new family-specific compatible value for the R-Car Gen4 family.

---
 Documentation/devicetree/bindings/i2c/renesas,rcar-i2c.yaml | 6 ++++++
 1 file changed, 6 insertions(+)
author maintainer
#5 lore raw

PATCH 2/2 i2c: rcar: Add R-Car Gen4 support

In reply to Geert Uytterhoeven

Add support for the I2C Bus Interface on R-Car Gen4 SoCs (e.g. R-Car S4-8) by matching on a family-specific compatible value.

While I2C on R-Car Gen4 does support some extra features (Slave Clock Stretch Select, Fast-mode Plus), for now it is treated the same as I2C on R-Car Gen3.

---
 drivers/i2c/busses/i2c-rcar.c | 1 +
 1 file changed, 1 insertion(+)
drivers/i2c/busses/i2c-rcar.c +1 -0
index f71c730f9838d89c..0db3d755906627d7 100644
@@ -1008,6 +1008,7 @@ static const struct of_device_id rcar_i2c_dt_ids[] = {
 	{ .compatible = "renesas,rcar-gen1-i2c", .data = (void *)I2C_RCAR_GEN1 },
 	{ .compatible = "renesas,rcar-gen2-i2c", .data = (void *)I2C_RCAR_GEN2 },
 	{ .compatible = "renesas,rcar-gen3-i2c", .data = (void *)I2C_RCAR_GEN3 },
+	{ .compatible = "renesas,rcar-gen4-i2c", .data = (void *)I2C_RCAR_GEN3 },
 	{},
 };
 MODULE_DEVICE_TABLE(of, rcar_i2c_dt_ids);
Signature · 1 line
2.25.1
#6 lore raw

Re: [PATCH 2/2] i2c: rcar: Add R-Car Gen4 support

Quoted 5 lines · Geert Uytterhoeven

Add support for the I2C Bus Interface on R-Car Gen4 SoCs (e.g. R-Car S4-8) by matching on a family-specific compatible value.

While I2C on R-Car Gen4 does support some extra features (Slave Clock Stretch Select, Fast-mode Plus), for now it is treated the same as I2C

Correction: R-Car S4 does not support Fast-mode Plus, so there will be a v2 of this patch, eventually.

Quoted 3 lines

on R-Car Gen3.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

maintainer
#7 lore raw

Re: [PATCH 2/2] i2c: rcar: Add R-Car Gen4 support

Quoted 6 lines
Quoted 3 lines

While I2C on R-Car Gen4 does support some extra features (Slave Clock Stretch Select, Fast-mode Plus), for now it is treated the same as I2C

Correction: R-Car S4 does not support Fast-mode Plus, so there will be a v2 of this patch, eventually.

But why? Unless we implement slave clock stretching, we can still keep it at Gen3 level. Which does also not have FM+.

#8 lore raw

Re: [PATCH 2/2] i2c: rcar: Add R-Car Gen4 support

Hi Wolfram,

Quoted 8 lines · Wolfram Sang
Quoted 5 lines
Quoted 2 lines

While I2C on R-Car Gen4 does support some extra features (Slave Clock Stretch Select, Fast-mode Plus), for now it is treated the same as I2C

Correction: R-Car S4 does not support Fast-mode Plus, so there will be a v2 of this patch, eventually.

But why? Unless we implement slave clock stretching, we can still keep it at Gen3 level. Which does also not have FM+.

Don't we want to introduce a family-specific compatible value for R-Car Gen4? At least the SCSS seems to be a new R-Car Gen4 feature common to R-Car S4 and R-Car V3U (yes, the latter is advertised as the first member of the R-Car Gen4 family, so I intend to move it over to renesas,rcar-gen4-* where it makes sense).

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

maintainer
#9 lore raw

Re: [PATCH 2/2] i2c: rcar: Add R-Car Gen4 support

Quoted 6 lines

Don't we want to introduce a family-specific compatible value for R-Car Gen4? At least the SCSS seems to be a new R-Car Gen4 feature common to R-Car S4 and R-Car V3U (yes, the latter is advertised as the first member of the R-Car Gen4 family, so I intend to move it over to renesas,rcar-gen4-* where it makes sense).

Yeah, sure we want the family compatible. But for now it can point to I2C_RCAR_GEN3, so the patch can stay as is. That is what I was wondering about why a v2 was needed. If we add SCSS, we can update the family compatible data for Gen4 to I2C_RCAR_GEN4. Unless I miss something.

#10 lore raw

Re: [PATCH 2/2] i2c: rcar: Add R-Car Gen4 support

Hi Wolfram,

Quoted 10 lines · Wolfram Sang
Quoted 5 lines

Don't we want to introduce a family-specific compatible value for R-Car Gen4? At least the SCSS seems to be a new R-Car Gen4 feature common to R-Car S4 and R-Car V3U (yes, the latter is advertised as the first member of the R-Car Gen4 family, so I intend to move it over to renesas,rcar-gen4-* where it makes sense).

Yeah, sure we want the family compatible. But for now it can point to I2C_RCAR_GEN3, so the patch can stay as is. That is what I was wondering about why a v2 was needed. If we add SCSS, we can update the family compatible data for Gen4 to I2C_RCAR_GEN4. Unless I miss something.

Ah, there's the source of the confusion! ;-)

There's a need for a v2 because the patch description says R-Car S4 supports FM+, which is false.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

maintainer Reviewed-by
#11 lore raw

Re: [PATCH 2/2] i2c: rcar: Add R-Car Gen4 support

Quoted 15 lines · Geert Uytterhoeven

Hi Wolfram,

Quoted 10 lines · Wolfram Sang
Quoted 5 lines

Don't we want to introduce a family-specific compatible value for R-Car Gen4? At least the SCSS seems to be a new R-Car Gen4 feature common to R-Car S4 and R-Car V3U (yes, the latter is advertised as the first member of the R-Car Gen4 family, so I intend to move it over to renesas,rcar-gen4-* where it makes sense).

Yeah, sure we want the family compatible. But for now it can point to I2C_RCAR_GEN3, so the patch can stay as is. That is what I was wondering about why a v2 was needed. If we add SCSS, we can update the family compatible data for Gen4 to I2C_RCAR_GEN4. Unless I miss something.

Quoted 4 lines

Ah, there's the source of the confusion! ;-)

There's a need for a v2 because the patch description says R-Car S4 supports FM+, which is false.

Now we got it! :)

Well, I can simply remove FM+ from the message when applying?

Anyway, with the above fixed:

maintainer
#12 lore raw

Re: [PATCH 2/2] i2c: rcar: Add R-Car Gen4 support

In reply to Geert Uytterhoeven
Quoted 8 lines · Geert Uytterhoeven

Add support for the I2C Bus Interface on R-Car Gen4 SoCs (e.g. R-Car S4-8) by matching on a family-specific compatible value.

While I2C on R-Car Gen4 does support some extra features (Slave Clock Stretch Select, Fast-mode Plus), for now it is treated the same as I2C on R-Car Gen3.

Fixed commit message and applied to for-next, thanks!