Skip to contentSkip to conversation

R-Car D3 (r8a77995) I2C integration

PATCH Applied Ulrich Hecht 5 participants 23 messages Nov 15, 2017 – Jan 29, 2018

Subsystems (5)

v1 of 2 Applied Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover R-Car D3 (r8a77995) I2C integration

Hi!

This adds I2C controllers to the D3 device tree and enables I2C busses 0 and 1 on the Draak board. (I2C2 is not connected on that board.)

Includes missing pins, DMA support and the Draak's serial EEPROM.

CU
Uli

Ulrich Hecht (6):
pinctrl: sh-pfc: r8a77995: add missing pins SCL0 and SDA0 to pinmux
data
i2c: rcar: enable for R-Car D3 (r8a77995)
arm64: renesas: r8a77995: add I2C support
arm64: renesas: draak: enable I2C controller 0 and EEPROM
arm64: renesas: draak: enable I2C controller 1
i2c: rcar: document R8A77970 bindings

 Documentation/devicetree/bindings/i2c/i2c-rcar.txt |  1 +
 arch/arm64/boot/dts/renesas/r8a77995-draak.dts     | 28 ++++++++++
 arch/arm64/boot/dts/renesas/r8a77995.dtsi          | 64 ++++++++++++++++++++++
 drivers/i2c/busses/i2c-rcar.c                      |  1 +
 drivers/pinctrl/sh-pfc/pfc-r8a77995.c              |  2 +
 5 files changed, 96 insertions(+)
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/6 pinctrl: sh-pfc: r8a77995: add missing pins SCL0 and SDA0 to pinmux data

Required for I2C0 operation.

---
 drivers/pinctrl/sh-pfc/pfc-r8a77995.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/pinctrl/sh-pfc/pfc-r8a77995.c +2 -0
index 89b7541..2c9a71a 100644
@@ -518,6 +518,8 @@ static const u16 pinmux_data[] = {
 	PINMUX_SINGLE(QSPI0_MISO_IO1),
 	PINMUX_SINGLE(QSPI0_MOSI_IO0),
 	PINMUX_SINGLE(QSPI0_SPCLK),
+	PINMUX_SINGLE(SCL0),
+	PINMUX_SINGLE(SDA0),
 
 	/* IPSR0 */
 	PINMUX_IPSR_MSEL(IP0_3_0,	IRQ0_A, SEL_IRQ_0_0),
Signature · 1 line
2.7.4
Reviewed-by on v1 1/6
#2 lore raw

Re: [PATCH 1/6] pinctrl: sh-pfc: r8a77995: add missing pins SCL0 and SDA0 to pinmux data

Quoted 3 lines · Ulrich Hecht

Required for I2C0 operation.

i.e. will queue in sh-pfc-for-v4.16.

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

#3 lore raw

PATCH 2/6 i2c: rcar: enable for R-Car D3 (r8a77995)

In reply to Ulrich Hecht

Same as other Gen3 SoCs.

---
 drivers/i2c/busses/i2c-rcar.c | 1 +
 1 file changed, 1 insertion(+)
drivers/i2c/busses/i2c-rcar.c +1 -0
index 15d764a..9469f01 100644
@@ -809,6 +809,7 @@ static const struct of_device_id rcar_i2c_dt_ids[] = {
 	{ .compatible = "renesas,i2c-r8a7794", .data = (void *)I2C_RCAR_GEN2 },
 	{ .compatible = "renesas,i2c-r8a7795", .data = (void *)I2C_RCAR_GEN3 },
 	{ .compatible = "renesas,i2c-r8a7796", .data = (void *)I2C_RCAR_GEN3 },
+	{ .compatible = "renesas,i2c-r8a77995", .data = (void *)I2C_RCAR_GEN3 },
 	{ .compatible = "renesas,i2c-rcar", .data = (void *)I2C_RCAR_GEN1 },	/* Deprecated */
 	{ .compatible = "renesas,rcar-gen1-i2c", .data = (void *)I2C_RCAR_GEN1 },
 	{ .compatible = "renesas,rcar-gen2-i2c", .data = (void *)I2C_RCAR_GEN2 },
Signature · 1 line
2.7.4
#4 lore raw

Re: [PATCH 2/6] i2c: rcar: enable for R-Car D3 (r8a77995)

Hi Ulrich,

Quoted 3 lines · Ulrich Hecht

Same as other Gen3 SoCs.

Thanks for your patch!

drivers/i2c/busses/i2c-rcar.c static const struct of_device_id rcar_i2c_dt_ids[] = { · line 812

Quoted 7 lines
drivers/i2c/busses/i2c-rcar.c +1 -0
@@ -809,6 +809,7 @@ static const struct of_device_id rcar_i2c_dt_ids[] = {
        { .compatible = "renesas,i2c-r8a7794", .data = (void *)I2C_RCAR_GEN2 },
        { .compatible = "renesas,i2c-r8a7795", .data = (void *)I2C_RCAR_GEN3 },
        { .compatible = "renesas,i2c-r8a7796", .data = (void *)I2C_RCAR_GEN3 },
+       { .compatible = "renesas,i2c-r8a77995", .data = (void *)I2C_RCAR_GEN3 },

This is not needed, as the driver already matches on the generic compatible value...

drivers/i2c/busses/i2c-rcar.c static const struct of_device_id rcar_i2c_dt_ids[] = { · line 815

Quoted 3 lines
drivers/i2c/busses/i2c-rcar.c +0 -0
        { .compatible = "renesas,i2c-rcar", .data = (void *)I2C_RCAR_GEN1 },    /* Deprecated */
        { .compatible = "renesas,rcar-gen1-i2c", .data = (void *)I2C_RCAR_GEN1 },
        { .compatible = "renesas,rcar-gen2-i2c", .data = (void *)I2C_RCAR_GEN2 },

...here:

        { .compatible = "renesas,rcar-gen3-i2c", .data = (void *)I2C_RCAR_GEN3 }

,
Gr{oetje,eeting}s,

Geert

#5 lore raw

PATCH 3/6 arm64: renesas: r8a77995: add I2C support

In reply to Ulrich Hecht

Defines R-Car D3 I2C controllers 0-3.

---
 arch/arm64/boot/dts/renesas/r8a77995.dtsi | 64 +++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)
arch/arm64/boot/dts/renesas/r8a77995.dtsi +64 -0
index 5fa7572..b3113003 100644
@@ -400,6 +400,70 @@
 			status = "disabled";
 		};
 
+		i2c0: i2c@e6500000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "renesas,i2c-r8a77995",
+				     "renesas,rcar-gen3-i2c";
+			reg = <0 0xe6500000 0 0x40>;
+			interrupts = <GIC_SPI 287 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 931>;
+			power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+			resets = <&cpg 931>;
+			dmas = <&dmac1 0x91>, <&dmac1 0x90>;
+			dma-names = "tx", "rx";
+			i2c-scl-internal-delay-ns = <110>;
+			status = "disabled";
+		};
+
+		i2c1: i2c@e6508000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "renesas,i2c-r8a77995",
+				     "renesas,rcar-gen3-i2c";
+			reg = <0 0xe6508000 0 0x40>;
+			interrupts = <GIC_SPI 288 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 930>;
+			power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+			resets = <&cpg 930>;
+			dmas = <&dmac1 0x93>, <&dmac1 0x92>;
+			dma-names = "tx", "rx";
+			i2c-scl-internal-delay-ns = <6>;
+			status = "disabled";
+		};
+
+		i2c2: i2c@e6510000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "renesas,i2c-r8a77995",
+				     "renesas,rcar-gen3-i2c";
+			reg = <0 0xe6510000 0 0x40>;
+			interrupts = <GIC_SPI 286 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 929>;
+			power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+			resets = <&cpg 929>;
+			dmas = <&dmac1 0x95>, <&dmac1 0x94>;
+			dma-names = "tx", "rx";
+			i2c-scl-internal-delay-ns = <6>;
+			status = "disabled";
+		};
+
+		i2c3: i2c@e66d0000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "renesas,i2c-r8a77995",
+				     "renesas,rcar-gen3-i2c";
+			reg = <0 0xe66d0000 0 0x40>;
+			interrupts = <GIC_SPI 290 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 928>;
+			power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+			resets = <&cpg 928>;
+			dmas = <&dmac0 0x97>, <&dmac0 0x96>;
+			dma-names = "tx", "rx";
+			i2c-scl-internal-delay-ns = <110>;
+			status = "disabled";
+		};
+
 		pwm0: pwm@e6e30000 {
 			compatible = "renesas,pwm-r8a77995", "renesas,pwm-rcar";
 			reg = <0 0xe6e30000 0 0x8>;
Signature · 1 line
2.7.4
Reviewed-by on v1 3/6
#6 lore raw

Re: [PATCH 3/6] arm64: renesas: r8a77995: add I2C support

Hi Ulrich,

Quoted 3 lines · Ulrich Hecht

Defines R-Car D3 I2C controllers 0-3.

Thanks for your patch!

Quoted 8 lines
arch/arm64/boot/dts/renesas/r8a77995.dtsi +2 -0
@@ -400,6 +400,70 @@
                        status = "disabled";
                };
 
+               i2c0: i2c@e6500000 {
+                       #address-cells = <1>;

arch/arm64/boot/dts/renesas/r8a77995.dtsi line 414

Quoted 10 lines
arch/arm64/boot/dts/renesas/r8a77995.dtsi +10 -0
+                       #size-cells = <0>;
+                       compatible = "renesas,i2c-r8a77995",
+                                    "renesas,rcar-gen3-i2c";
+                       reg = <0 0xe6500000 0 0x40>;
+                       interrupts = <GIC_SPI 287 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 931>;
+                       power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+                       resets = <&cpg 931>;
+                       dmas = <&dmac1 0x91>, <&dmac1 0x90>;
+                       dma-names = "tx", "rx";

Missing set for dmac2? (for all four interfaces)

arch/arm64/boot/dts/renesas/r8a77995.dtsi line 415

Quoted 1 line
arch/arm64/boot/dts/renesas/r8a77995.dtsi +1 -0
+                       i2c-scl-internal-delay-ns = <110>;

According to Table 57.1, all i2c interfaces on R-Car D3 have LVTTL output buffers,
so this should be <6> for all four interfaces.

With the above fixed:

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

#7 lore raw

Re: [PATCH 3/6] arm64: renesas: r8a77995: add I2C support

Quoted 31 lines · Geert Uytterhoeven

Hi Ulrich,

Quoted 3 lines · Ulrich Hecht

Defines R-Car D3 I2C controllers 0-3.

Thanks for your patch!

Quoted 8 lines
arch/arm64/boot/dts/renesas/r8a77995.dtsi +2 -0
@@ -400,6 +400,70 @@
                        status = "disabled";
                };
 
+               i2c0: i2c@e6500000 {
+                       #address-cells = <1>;

arch/arm64/boot/dts/renesas/r8a77995.dtsi line 414

Quoted 10 lines
arch/arm64/boot/dts/renesas/r8a77995.dtsi +10 -0
+                       #size-cells = <0>;
+                       compatible = "renesas,i2c-r8a77995",
+                                    "renesas,rcar-gen3-i2c";
+                       reg = <0 0xe6500000 0 0x40>;
+                       interrupts = <GIC_SPI 287 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 931>;
+                       power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+                       resets = <&cpg 931>;
+                       dmas = <&dmac1 0x91>, <&dmac1 0x90>;
+                       dma-names = "tx", "rx";

Missing set for dmac2? (for all four interfaces)

Quoted 8 lines

arch/arm64/boot/dts/renesas/r8a77995.dtsi line 415

Quoted 1 line
arch/arm64/boot/dts/renesas/r8a77995.dtsi +1 -0
+                       i2c-scl-internal-delay-ns = <110>;

According to Table 57.1, all i2c interfaces on R-Car D3 have LVTTL output buffers,
so this should be <6> for all four interfaces.

With the above fixed:

Hi Ulrich,

I would like Geert's review addressed before I consider applying this patch.

#8 lore raw

Re: [PATCH 3/6] arm64: renesas: r8a77995: add I2C support

Hi Ulrich,

Quoted 38 lines · Simon Horman
Quoted 37 lines · Geert Uytterhoeven

Hi Ulrich,

Quoted 3 lines · Ulrich Hecht

Defines R-Car D3 I2C controllers 0-3.

Thanks for your patch!

Quoted 8 lines
arch/arm64/boot/dts/renesas/r8a77995.dtsi +2 -0
@@ -400,6 +400,70 @@
                        status = "disabled";
                };
 
+               i2c0: i2c@e6500000 {
+                       #address-cells = <1>;

arch/arm64/boot/dts/renesas/r8a77995.dtsi line 414

Quoted 10 lines
arch/arm64/boot/dts/renesas/r8a77995.dtsi +10 -0
+                       #size-cells = <0>;
+                       compatible = "renesas,i2c-r8a77995",
+                                    "renesas,rcar-gen3-i2c";
+                       reg = <0 0xe6500000 0 0x40>;
+                       interrupts = <GIC_SPI 287 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 931>;
+                       power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+                       resets = <&cpg 931>;
+                       dmas = <&dmac1 0x91>, <&dmac1 0x90>;
+                       dma-names = "tx", "rx";

Missing set for dmac2? (for all four interfaces)

arch/arm64/boot/dts/renesas/r8a77995.dtsi line 415

Quoted 1 line
arch/arm64/boot/dts/renesas/r8a77995.dtsi +1 -0
+                       i2c-scl-internal-delay-ns = <110>;

According to Table 57.1, all i2c interfaces on R-Car D3 have LVTTL output buffers,
so this should be <6> for all four interfaces.

Quoted 6 lines
Quoted 2 lines

With the above fixed:

Hi Ulrich,

I would like Geert's review addressed before I consider applying this patch.

I am dependant upon this patch for my Draak-D3 work.

Would you be able to consider the comments mentioned to progress this patch please?

--
Regards

Kieran

#9 lore raw

Re: [PATCH 3/6] arm64: renesas: r8a77995: add I2C support

In reply to Ulrich Hecht

Hi Ulrich, Wolfram,

Is there any update to this patch series?
This seems to be the latest I could find for D3.

I need I2C on D3 for my current additional task, so I'll try to use these patches as the base for now.

(Patch 3, 4, 5 apply on top of renesas-drivers-2018-01-09-v4.15-rc7, so if it works - that's enough for me for the moment)

Please let me know if there is a newer series or branch that I should be considering as a base.

--
Kieran

Quoted 83 lines · Ulrich Hecht

Defines R-Car D3 I2C controllers 0-3.

---
 arch/arm64/boot/dts/renesas/r8a77995.dtsi | 64 +++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)
arch/arm64/boot/dts/renesas/r8a77995.dtsi +64 -0
index 5fa7572..b3113003 100644
@@ -400,6 +400,70 @@
 			status = "disabled";
 		};
 
+		i2c0: i2c@e6500000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "renesas,i2c-r8a77995",
+				     "renesas,rcar-gen3-i2c";
+			reg = <0 0xe6500000 0 0x40>;
+			interrupts = <GIC_SPI 287 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 931>;
+			power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+			resets = <&cpg 931>;
+			dmas = <&dmac1 0x91>, <&dmac1 0x90>;
+			dma-names = "tx", "rx";
+			i2c-scl-internal-delay-ns = <110>;
+			status = "disabled";
+		};
+
+		i2c1: i2c@e6508000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "renesas,i2c-r8a77995",
+				     "renesas,rcar-gen3-i2c";
+			reg = <0 0xe6508000 0 0x40>;
+			interrupts = <GIC_SPI 288 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 930>;
+			power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+			resets = <&cpg 930>;
+			dmas = <&dmac1 0x93>, <&dmac1 0x92>;
+			dma-names = "tx", "rx";
+			i2c-scl-internal-delay-ns = <6>;
+			status = "disabled";
+		};
+
+		i2c2: i2c@e6510000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "renesas,i2c-r8a77995",
+				     "renesas,rcar-gen3-i2c";
+			reg = <0 0xe6510000 0 0x40>;
+			interrupts = <GIC_SPI 286 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 929>;
+			power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+			resets = <&cpg 929>;
+			dmas = <&dmac1 0x95>, <&dmac1 0x94>;
+			dma-names = "tx", "rx";
+			i2c-scl-internal-delay-ns = <6>;
+			status = "disabled";
+		};
+
+		i2c3: i2c@e66d0000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "renesas,i2c-r8a77995",
+				     "renesas,rcar-gen3-i2c";
+			reg = <0 0xe66d0000 0 0x40>;
+			interrupts = <GIC_SPI 290 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 928>;
+			power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+			resets = <&cpg 928>;
+			dmas = <&dmac0 0x97>, <&dmac0 0x96>;
+			dma-names = "tx", "rx";
+			i2c-scl-internal-delay-ns = <110>;
+			status = "disabled";
+		};
+
 		pwm0: pwm@e6e30000 {
 			compatible = "renesas,pwm-r8a77995", "renesas,pwm-rcar";
 			reg = <0 0xe6e30000 0 0x8>;
#10 lore raw

PATCH 4/6 arm64: renesas: draak: enable I2C controller 0 and EEPROM

In reply to Ulrich Hecht

Enables EEPROM on I2C0 on the Draak board.

---
 arch/arm64/boot/dts/renesas/r8a77995-draak.dts | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
arch/arm64/boot/dts/renesas/r8a77995-draak.dts +17 -0
index 09de73b..64a6339 100644
@@ -46,6 +46,11 @@
 		};
 	};
 
+	i2c0_pins: i2c0 {
+		groups = "i2c0";
+		function = "i2c0";
+	};
+
 	pwm0_pins: pwm0 {
 		groups = "pwm0_c";
 		function = "pwm0";
@@ -67,6 +72,18 @@
 	};
 };
 
+&i2c0 {
+	pinctrl-0 = <&i2c0_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+
+	eeprom@50 {
+		compatible = "atmel,24c01";
+		reg = <0x50>;
+		pagesize = <8>;
+	};
+};
+
 &ehci0 {
 	status = "okay";
 };
Signature · 1 line
2.7.4
Reviewed-by on v1 4/6
#11 lore raw

Re: [PATCH 4/6] arm64: renesas: draak: enable I2C controller 0 and EEPROM

Hi Ulrich,

Quoted 3 lines · Ulrich Hecht

Enables EEPROM on I2C0 on the Draak board.

Thanks for your patch!

Quoted 4 lines

arch/arm64/boot/dts/renesas/r8a77995-draak.dts line 81

Quoted 10 lines
arch/arm64/boot/dts/renesas/r8a77995-draak.dts +7 -0
@@ -67,6 +72,18 @@
        };
 };
 
+&i2c0 {
+       pinctrl-0 = <&i2c0_pins>;
+       pinctrl-names = "default";
+       status = "okay";
+
+       eeprom@50 {
+               compatible = "atmel,24c01";

This is actually a ROHM Semiconductor BR24T01FVM-W, so it should be

        compatible = "rohm,br24t01", "atmel,24c01";

Please also submit a patch to add that compatible value to Documentation/devicetree/bindings/eeprom/eeprom.txt.

With the above fixed:

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

#12 lore raw

Re: [PATCH 4/6] arm64: renesas: draak: enable I2C controller 0 and EEPROM

Quoted 27 lines · Geert Uytterhoeven

Hi Ulrich,

Quoted 3 lines · Ulrich Hecht

Enables EEPROM on I2C0 on the Draak board.

Thanks for your patch!

Quoted 4 lines

arch/arm64/boot/dts/renesas/r8a77995-draak.dts line 81

Quoted 10 lines
arch/arm64/boot/dts/renesas/r8a77995-draak.dts +7 -0
@@ -67,6 +72,18 @@
        };
 };
 
+&i2c0 {
+       pinctrl-0 = <&i2c0_pins>;
+       pinctrl-names = "default";
+       status = "okay";
+
+       eeprom@50 {
+               compatible = "atmel,24c01";

This is actually a ROHM Semiconductor BR24T01FVM-W, so it should be

Quoted 1 line
        compatible = "rohm,br24t01", "atmel,24c01";

Applied with the above change.

Quoted 2 lines

Please also submit a patch to add that compatible value to Documentation/devicetree/bindings/eeprom/eeprom.txt.

Ulrich, please follow-up on this, thanks!

Quoted 14 lines

With the above fixed:

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

#13 lore raw

Re: [PATCH 4/6] arm64: renesas: draak: enable I2C controller 0 and EEPROM

Quoted 28 lines · Simon Horman
Quoted 27 lines · Geert Uytterhoeven

Hi Ulrich,

Quoted 3 lines · Ulrich Hecht

Enables EEPROM on I2C0 on the Draak board.

Thanks for your patch!

Quoted 4 lines

arch/arm64/boot/dts/renesas/r8a77995-draak.dts line 81

Quoted 10 lines
arch/arm64/boot/dts/renesas/r8a77995-draak.dts +7 -0
@@ -67,6 +72,18 @@
        };
 };
 
+&i2c0 {
+       pinctrl-0 = <&i2c0_pins>;
+       pinctrl-names = "default";
+       status = "okay";
+
+       eeprom@50 {
+               compatible = "atmel,24c01";

This is actually a ROHM Semiconductor BR24T01FVM-W, so it should be

Quoted 3 lines
Quoted 1 line
        compatible = "rohm,br24t01", "atmel,24c01";

Applied with the above change.

Sorry, I was a bit hasty there as this patch
depends on a patch earlier in the series which I have not applied.

I've dropped this patch for now and will wait a bit longer for the review to unfold.

Quoted 21 lines
Quoted 3 lines

Please also submit a patch to add that compatible value to Documentation/devicetree/bindings/eeprom/eeprom.txt.

Ulrich, please follow-up on this, thanks!

Quoted 14 lines

With the above fixed:

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

#14 lore raw

Re: [PATCH 4/6] arm64: renesas: draak: enable I2C controller 0 and EEPROM

Hi Ulrich,

Quoted 31 lines · Simon Horman
Quoted 30 lines · Simon Horman
Quoted 28 lines · Geert Uytterhoeven

Hi Ulrich,

Quoted 3 lines · Ulrich Hecht

Enables EEPROM on I2C0 on the Draak board.

Thanks for your patch!

Quoted 4 lines

arch/arm64/boot/dts/renesas/r8a77995-draak.dts line 81

Quoted 10 lines
arch/arm64/boot/dts/renesas/r8a77995-draak.dts +7 -0
@@ -67,6 +72,18 @@
        };
 };
 
+&i2c0 {
+       pinctrl-0 = <&i2c0_pins>;
+       pinctrl-names = "default";
+       status = "okay";
+
+       eeprom@50 {
+               compatible = "atmel,24c01";

This is actually a ROHM Semiconductor BR24T01FVM-W, so it should be

        compatible = "rohm,br24t01", "atmel,24c01";
Quoted 8 lines
Quoted 1 line

Applied with the above change.

Sorry, I was a bit hasty there as this patch
depends on a patch earlier in the series which I have not applied.

I've dropped this patch for now and will wait a bit longer for the review to unfold.

I am dependant upon this patch for my Draak-D3 work.

Would you be able to consider the comments mentioned to progress this patch please?

--
Regards

Kieran

Quoted 21 lines
Quoted 21 lines
Quoted 3 lines

Please also submit a patch to add that compatible value to Documentation/devicetree/bindings/eeprom/eeprom.txt.

Ulrich, please follow-up on this, thanks!

Quoted 14 lines

With the above fixed:

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

#15 lore raw

PATCH 5/6 arm64: renesas: draak: enable I2C controller 1

In reply to Ulrich Hecht

No devices to add, I2C1 has an external connector only.

---
 arch/arm64/boot/dts/renesas/r8a77995-draak.dts | 11 +++++++++++
 1 file changed, 11 insertions(+)
arch/arm64/boot/dts/renesas/r8a77995-draak.dts +11 -0
index 64a6339..91f247f 100644
@@ -51,6 +51,11 @@
 		function = "i2c0";
 	};
 
+	i2c1_pins: i2c1 {
+		groups = "i2c1";
+		function = "i2c1";
+	};
+
 	pwm0_pins: pwm0 {
 		groups = "pwm0_c";
 		function = "pwm0";
@@ -84,6 +89,12 @@
 	};
 };
 
+&i2c1 {
+	pinctrl-0 = <&i2c1_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+};
+
 &ehci0 {
 	status = "okay";
 };
Signature · 1 line
2.7.4
Reviewed-by on v1 5/6
#16 lore raw

Re: [PATCH 5/6] arm64: renesas: draak: enable I2C controller 1

Hi Uli,

Quoted 3 lines · Ulrich Hecht

No devices to add, I2C1 has an external connector only.

Thanks for your patch!

but please see below.

arch/arm64/boot/dts/renesas/r8a77995-draak.dts line 95

Quoted 11 lines
arch/arm64/boot/dts/renesas/r8a77995-draak.dts +4 -0
@@ -84,6 +89,12 @@
        };
 };
 
+&i2c1 {
+       pinctrl-0 = <&i2c1_pins>;
+       pinctrl-names = "default";
+       status = "okay";

If no devices are connected, perhaps it's wise to defer the status update to e.g. an overlay that describes what's connected to CN23?

Or do you want it enabled to allow adding devices manually using /sys/bus/i2c/devices/i2c-1/new_device?

arch/arm64/boot/dts/renesas/r8a77995-draak.dts line 96

Quoted 1 line
arch/arm64/boot/dts/renesas/r8a77995-draak.dts +1 -0
+};

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

Applied
#17 lore raw

Re: [PATCH 5/6] arm64: renesas: draak: enable I2C controller 1

Quoted 4 lines · Geert Uytterhoeven

Hi Uli,

On Wed, Nov 15, 2017 at 4:25 PM, Ulrich Hecht
<[email protected]> wrote:

Quoted 8 lines
Quoted 3 lines

No devices to add, I2C1 has an external connector only.

Thanks for your patch!

but please see below.

Thanks, applied.

Quoted 15 lines

arch/arm64/boot/dts/renesas/r8a77995-draak.dts line 95

Quoted 11 lines
arch/arm64/boot/dts/renesas/r8a77995-draak.dts +4 -0
@@ -84,6 +89,12 @@
        };
 };
 
+&i2c1 {
+       pinctrl-0 = <&i2c1_pins>;
+       pinctrl-names = "default";
+       status = "okay";

If no devices are connected, perhaps it's wise to defer the status update to e.g. an overlay that describes what's connected to CN23?

Quoted 2 lines

Or do you want it enabled to allow adding devices manually using /sys/bus/i2c/devices/i2c-1/new_device?

Ulrich, please consider following up on this.

#18 lore raw

Re: [PATCH 5/6] arm64: renesas: draak: enable I2C controller 1

Quoted 7 lines · Simon Horman
Quoted 6 lines · Geert Uytterhoeven

Hi Uli,

Quoted 2 lines · Ulrich Hecht

No devices to add, I2C1 has an external connector only.

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

Thanks for your patch!

but please see below.

Thanks, applied.

Sorry, I was a bit hasty there as this patch
depends on a patch earlier in the series which I have not applied.

I've dropped this patch for now and will wait a bit longer for the review to unfold.

Quoted 20 lines
Quoted 15 lines

arch/arm64/boot/dts/renesas/r8a77995-draak.dts line 95

Quoted 11 lines
arch/arm64/boot/dts/renesas/r8a77995-draak.dts +4 -0
@@ -84,6 +89,12 @@
        };
 };
 
+&i2c1 {
+       pinctrl-0 = <&i2c1_pins>;
+       pinctrl-names = "default";
+       status = "okay";

If no devices are connected, perhaps it's wise to defer the status update to e.g. an overlay that describes what's connected to CN23?

Quoted 2 lines

Or do you want it enabled to allow adding devices manually using /sys/bus/i2c/devices/i2c-1/new_device?

Ulrich, please consider following up on this.

#19 lore raw

Re: [PATCH 5/6] arm64: renesas: draak: enable I2C controller 1

In reply to Geert Uytterhoeven
Quoted 5 lines · Geert Uytterhoeven

If no devices are connected, perhaps it's wise to defer the status update to e.g. an overlay that describes what's connected to CN23?

Or do you want it enabled to allow adding devices manually using /sys/bus/i2c/devices/i2c-1/new_device?

Indeed. It's an unpopulated bus on a development board with an external connector, so I think it's valid to assume that it is intended to be used for experimentation.

CU
Uli

#20 lore raw

PATCH 6/6 i2c: rcar: document R8A77970 bindings

In reply to Ulrich Hecht

R-Car D3 (R8A77995) SoC has a R-Car Gen3-compatible I2C controller.

---
 Documentation/devicetree/bindings/i2c/i2c-rcar.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/i2c/i2c-rcar.txt +1 -0
index a777477..e91dbaf 100644
@@ -14,6 +14,7 @@ Required properties:
 	"renesas,i2c-r8a7795" if the device is a part of a R8A7795 SoC.
 	"renesas,i2c-r8a7796" if the device is a part of a R8A7796 SoC.
 	"renesas,i2c-r8a77970" if the device is a part of a R8A77970 SoC.
+	"renesas,i2c-r8a77995" if the device is a part of a R8A77995 SoC.
 	"renesas,rcar-gen1-i2c" for a generic R-Car Gen1 compatible device.
 	"renesas,rcar-gen2-i2c" for a generic R-Car Gen2 or RZ/G1 compatible
 				device.
Signature · 1 line
2.7.4
Reviewed-by on v1 6/6
#21 lore raw

Re: [PATCH 6/6] i2c: rcar: document R8A77970 bindings

Quoted 3 lines · Ulrich Hecht

R-Car D3 (R8A77995) SoC has a R-Car Gen3-compatible I2C controller.

With s/70/95/ in the subject:

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

#22 lore raw
In reply to Ulrich Hecht
Quoted 5 lines

This adds I2C controllers to the D3 device tree and enables I2C busses 0 and 1 on the Draak board. (I2C2 is not connected on that board.)

Includes missing pins, DMA support and the Draak's serial EEPROM.

I agree to all of Geert's comments given.