linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] R-Car D3 (r8a77995) I2C integration
@ 2017-11-15 15:25 Ulrich Hecht
  2017-11-15 15:25 ` [PATCH 1/6] pinctrl: sh-pfc: r8a77995: add missing pins SCL0 and SDA0 to pinmux data Ulrich Hecht
                   ` (6 more replies)
  0 siblings, 7 replies; 23+ messages in thread
From: Ulrich Hecht @ 2017-11-15 15:25 UTC (permalink / raw)
  To: linux-renesas-soc, horms, wsa, geert; +Cc: magnus.damm, linux-i2c, Ulrich Hecht

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(+)

-- 
2.7.4

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

* [PATCH 1/6] pinctrl: sh-pfc: r8a77995: add missing pins SCL0 and SDA0 to pinmux data
  2017-11-15 15:25 [PATCH 0/6] R-Car D3 (r8a77995) I2C integration Ulrich Hecht
@ 2017-11-15 15:25 ` Ulrich Hecht
  2017-11-16  8:53   ` Geert Uytterhoeven
  2017-11-15 15:25 ` [PATCH 2/6] i2c: rcar: enable for R-Car D3 (r8a77995) Ulrich Hecht
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 23+ messages in thread
From: Ulrich Hecht @ 2017-11-15 15:25 UTC (permalink / raw)
  To: linux-renesas-soc, horms, wsa, geert; +Cc: magnus.damm, linux-i2c, Ulrich Hecht

Required for I2C0 operation.

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
---
 drivers/pinctrl/sh-pfc/pfc-r8a77995.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a77995.c b/drivers/pinctrl/sh-pfc/pfc-r8a77995.c
index 89b7541..2c9a71a 100644
--- a/drivers/pinctrl/sh-pfc/pfc-r8a77995.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a77995.c
@@ -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),
-- 
2.7.4

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

* [PATCH 2/6] i2c: rcar: enable for R-Car D3 (r8a77995)
  2017-11-15 15:25 [PATCH 0/6] R-Car D3 (r8a77995) I2C integration Ulrich Hecht
  2017-11-15 15:25 ` [PATCH 1/6] pinctrl: sh-pfc: r8a77995: add missing pins SCL0 and SDA0 to pinmux data Ulrich Hecht
@ 2017-11-15 15:25 ` Ulrich Hecht
  2017-11-16  8:54   ` Geert Uytterhoeven
  2017-11-15 15:25 ` [PATCH 3/6] arm64: renesas: r8a77995: add I2C support Ulrich Hecht
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 23+ messages in thread
From: Ulrich Hecht @ 2017-11-15 15:25 UTC (permalink / raw)
  To: linux-renesas-soc, horms, wsa, geert; +Cc: magnus.damm, linux-i2c, Ulrich Hecht

Same as other Gen3 SoCs.

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
---
 drivers/i2c/busses/i2c-rcar.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
index 15d764a..9469f01 100644
--- a/drivers/i2c/busses/i2c-rcar.c
+++ b/drivers/i2c/busses/i2c-rcar.c
@@ -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 },
-- 
2.7.4

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

* [PATCH 3/6] arm64: renesas: r8a77995: add I2C support
  2017-11-15 15:25 [PATCH 0/6] R-Car D3 (r8a77995) I2C integration Ulrich Hecht
  2017-11-15 15:25 ` [PATCH 1/6] pinctrl: sh-pfc: r8a77995: add missing pins SCL0 and SDA0 to pinmux data Ulrich Hecht
  2017-11-15 15:25 ` [PATCH 2/6] i2c: rcar: enable for R-Car D3 (r8a77995) Ulrich Hecht
@ 2017-11-15 15:25 ` Ulrich Hecht
  2017-11-16  9:10   ` Geert Uytterhoeven
  2018-01-17 17:21   ` Kieran Bingham
  2017-11-15 15:25 ` [PATCH 4/6] arm64: renesas: draak: enable I2C controller 0 and EEPROM Ulrich Hecht
                   ` (3 subsequent siblings)
  6 siblings, 2 replies; 23+ messages in thread
From: Ulrich Hecht @ 2017-11-15 15:25 UTC (permalink / raw)
  To: linux-renesas-soc, horms, wsa, geert; +Cc: magnus.damm, linux-i2c, Ulrich Hecht

Defines R-Car D3 I2C controllers 0-3.

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
---
 arch/arm64/boot/dts/renesas/r8a77995.dtsi | 64 +++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a77995.dtsi b/arch/arm64/boot/dts/renesas/r8a77995.dtsi
index 5fa7572..b3113003 100644
--- a/arch/arm64/boot/dts/renesas/r8a77995.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77995.dtsi
@@ -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>;
-- 
2.7.4

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

* [PATCH 4/6] arm64: renesas: draak: enable I2C controller 0 and EEPROM
  2017-11-15 15:25 [PATCH 0/6] R-Car D3 (r8a77995) I2C integration Ulrich Hecht
                   ` (2 preceding siblings ...)
  2017-11-15 15:25 ` [PATCH 3/6] arm64: renesas: r8a77995: add I2C support Ulrich Hecht
@ 2017-11-15 15:25 ` Ulrich Hecht
  2017-11-16  9:27   ` Geert Uytterhoeven
  2017-11-15 15:25 ` [PATCH 5/6] arm64: renesas: draak: enable I2C controller 1 Ulrich Hecht
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 23+ messages in thread
From: Ulrich Hecht @ 2017-11-15 15:25 UTC (permalink / raw)
  To: linux-renesas-soc, horms, wsa, geert; +Cc: magnus.damm, linux-i2c, Ulrich Hecht

Enables EEPROM on I2C0 on the Draak board.

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
---
 arch/arm64/boot/dts/renesas/r8a77995-draak.dts | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a77995-draak.dts b/arch/arm64/boot/dts/renesas/r8a77995-draak.dts
index 09de73b..64a6339 100644
--- a/arch/arm64/boot/dts/renesas/r8a77995-draak.dts
+++ b/arch/arm64/boot/dts/renesas/r8a77995-draak.dts
@@ -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";
 };
-- 
2.7.4

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

* [PATCH 5/6] arm64: renesas: draak: enable I2C controller 1
  2017-11-15 15:25 [PATCH 0/6] R-Car D3 (r8a77995) I2C integration Ulrich Hecht
                   ` (3 preceding siblings ...)
  2017-11-15 15:25 ` [PATCH 4/6] arm64: renesas: draak: enable I2C controller 0 and EEPROM Ulrich Hecht
@ 2017-11-15 15:25 ` Ulrich Hecht
  2017-11-16  9:31   ` Geert Uytterhoeven
  2017-11-15 15:25 ` [PATCH 6/6] i2c: rcar: document R8A77970 bindings Ulrich Hecht
  2017-12-04 21:33 ` [PATCH 0/6] R-Car D3 (r8a77995) I2C integration Wolfram Sang
  6 siblings, 1 reply; 23+ messages in thread
From: Ulrich Hecht @ 2017-11-15 15:25 UTC (permalink / raw)
  To: linux-renesas-soc, horms, wsa, geert; +Cc: magnus.damm, linux-i2c, Ulrich Hecht

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

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
---
 arch/arm64/boot/dts/renesas/r8a77995-draak.dts | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a77995-draak.dts b/arch/arm64/boot/dts/renesas/r8a77995-draak.dts
index 64a6339..91f247f 100644
--- a/arch/arm64/boot/dts/renesas/r8a77995-draak.dts
+++ b/arch/arm64/boot/dts/renesas/r8a77995-draak.dts
@@ -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";
 };
-- 
2.7.4

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

* [PATCH 6/6] i2c: rcar: document R8A77970 bindings
  2017-11-15 15:25 [PATCH 0/6] R-Car D3 (r8a77995) I2C integration Ulrich Hecht
                   ` (4 preceding siblings ...)
  2017-11-15 15:25 ` [PATCH 5/6] arm64: renesas: draak: enable I2C controller 1 Ulrich Hecht
@ 2017-11-15 15:25 ` Ulrich Hecht
  2017-11-16  8:55   ` Geert Uytterhoeven
  2017-12-04 21:33 ` [PATCH 0/6] R-Car D3 (r8a77995) I2C integration Wolfram Sang
  6 siblings, 1 reply; 23+ messages in thread
From: Ulrich Hecht @ 2017-11-15 15:25 UTC (permalink / raw)
  To: linux-renesas-soc, horms, wsa, geert; +Cc: magnus.damm, linux-i2c, Ulrich Hecht

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

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
---
 Documentation/devicetree/bindings/i2c/i2c-rcar.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/i2c/i2c-rcar.txt b/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
index a777477..e91dbaf 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
@@ -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.
-- 
2.7.4

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

* Re: [PATCH 1/6] pinctrl: sh-pfc: r8a77995: add missing pins SCL0 and SDA0 to pinmux data
  2017-11-15 15:25 ` [PATCH 1/6] pinctrl: sh-pfc: r8a77995: add missing pins SCL0 and SDA0 to pinmux data Ulrich Hecht
@ 2017-11-16  8:53   ` Geert Uytterhoeven
  0 siblings, 0 replies; 23+ messages in thread
From: Geert Uytterhoeven @ 2017-11-16  8:53 UTC (permalink / raw)
  To: Ulrich Hecht
  Cc: Linux-Renesas, Simon Horman, Wolfram Sang, Magnus Damm, Linux I2C

On Wed, Nov 15, 2017 at 4:25 PM, Ulrich Hecht
<ulrich.hecht+renesas@gmail.com> wrote:
> Required for I2C0 operation.
>
> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
i.e. will queue in sh-pfc-for-v4.16.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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

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

* Re: [PATCH 2/6] i2c: rcar: enable for R-Car D3 (r8a77995)
  2017-11-15 15:25 ` [PATCH 2/6] i2c: rcar: enable for R-Car D3 (r8a77995) Ulrich Hecht
@ 2017-11-16  8:54   ` Geert Uytterhoeven
  0 siblings, 0 replies; 23+ messages in thread
From: Geert Uytterhoeven @ 2017-11-16  8:54 UTC (permalink / raw)
  To: Ulrich Hecht
  Cc: Linux-Renesas, Simon Horman, Wolfram Sang, Magnus Damm, Linux I2C

Hi Ulrich,

On Wed, Nov 15, 2017 at 4:25 PM, Ulrich Hecht
<ulrich.hecht+renesas@gmail.com> wrote:
> Same as other Gen3 SoCs.
>
> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>

Thanks for your patch!

> --- a/drivers/i2c/busses/i2c-rcar.c
> +++ b/drivers/i2c/busses/i2c-rcar.c
> @@ -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...

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

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

* Re: [PATCH 6/6] i2c: rcar: document R8A77970 bindings
  2017-11-15 15:25 ` [PATCH 6/6] i2c: rcar: document R8A77970 bindings Ulrich Hecht
@ 2017-11-16  8:55   ` Geert Uytterhoeven
  0 siblings, 0 replies; 23+ messages in thread
From: Geert Uytterhoeven @ 2017-11-16  8:55 UTC (permalink / raw)
  To: Ulrich Hecht
  Cc: Linux-Renesas, Simon Horman, Wolfram Sang, Magnus Damm, Linux I2C

On Wed, Nov 15, 2017 at 4:25 PM, Ulrich Hecht
<ulrich.hecht+renesas@gmail.com> wrote:
> R-Car D3 (R8A77995) SoC has a R-Car Gen3-compatible I2C controller.
>
> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>

With s/70/95/ in the subject:
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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

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

* Re: [PATCH 3/6] arm64: renesas: r8a77995: add I2C support
  2017-11-15 15:25 ` [PATCH 3/6] arm64: renesas: r8a77995: add I2C support Ulrich Hecht
@ 2017-11-16  9:10   ` Geert Uytterhoeven
  2017-11-17 14:28     ` Simon Horman
  2018-01-17 17:21   ` Kieran Bingham
  1 sibling, 1 reply; 23+ messages in thread
From: Geert Uytterhoeven @ 2017-11-16  9:10 UTC (permalink / raw)
  To: Ulrich Hecht
  Cc: Linux-Renesas, Simon Horman, Wolfram Sang, Magnus Damm, Linux I2C

Hi Ulrich,

On Wed, Nov 15, 2017 at 4:25 PM, Ulrich Hecht
<ulrich.hecht+renesas@gmail.com> wrote:
> Defines R-Car D3 I2C controllers 0-3.
>
> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>

Thanks for your patch!

> --- a/arch/arm64/boot/dts/renesas/r8a77995.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a77995.dtsi
> @@ -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";

Missing set for dmac2? (for all four interfaces)

> +                       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:
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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

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

* Re: [PATCH 4/6] arm64: renesas: draak: enable I2C controller 0 and EEPROM
  2017-11-15 15:25 ` [PATCH 4/6] arm64: renesas: draak: enable I2C controller 0 and EEPROM Ulrich Hecht
@ 2017-11-16  9:27   ` Geert Uytterhoeven
  2017-11-17 14:31     ` Simon Horman
  0 siblings, 1 reply; 23+ messages in thread
From: Geert Uytterhoeven @ 2017-11-16  9:27 UTC (permalink / raw)
  To: Ulrich Hecht
  Cc: Linux-Renesas, Simon Horman, Wolfram Sang, Magnus Damm, Linux I2C

Hi Ulrich,

On Wed, Nov 15, 2017 at 4:25 PM, Ulrich Hecht
<ulrich.hecht+renesas@gmail.com> wrote:
> Enables EEPROM on I2C0 on the Draak board.
>
> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>

Thanks for your patch!

> --- a/arch/arm64/boot/dts/renesas/r8a77995-draak.dts
> +++ b/arch/arm64/boot/dts/renesas/r8a77995-draak.dts

> @@ -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:
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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

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

* Re: [PATCH 5/6] arm64: renesas: draak: enable I2C controller 1
  2017-11-15 15:25 ` [PATCH 5/6] arm64: renesas: draak: enable I2C controller 1 Ulrich Hecht
@ 2017-11-16  9:31   ` Geert Uytterhoeven
  2017-11-17 14:32     ` Simon Horman
  2018-01-29 15:46     ` Ulrich Hecht
  0 siblings, 2 replies; 23+ messages in thread
From: Geert Uytterhoeven @ 2017-11-16  9:31 UTC (permalink / raw)
  To: Ulrich Hecht
  Cc: Linux-Renesas, Simon Horman, Wolfram Sang, Magnus Damm, Linux I2C

Hi Uli,

On Wed, Nov 15, 2017 at 4:25 PM, Ulrich Hecht
<ulrich.hecht+renesas@gmail.com> wrote:
> No devices to add, I2C1 has an external connector only.
>
> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>

Thanks for your patch!

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
but please see below.

> --- a/arch/arm64/boot/dts/renesas/r8a77995-draak.dts
> +++ b/arch/arm64/boot/dts/renesas/r8a77995-draak.dts

> @@ -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?

> +};

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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

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

* Re: [PATCH 3/6] arm64: renesas: r8a77995: add I2C support
  2017-11-16  9:10   ` Geert Uytterhoeven
@ 2017-11-17 14:28     ` Simon Horman
  2018-01-19 10:32       ` Kieran Bingham
  0 siblings, 1 reply; 23+ messages in thread
From: Simon Horman @ 2017-11-17 14:28 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Ulrich Hecht, Linux-Renesas, Wolfram Sang, Magnus Damm, Linux I2C

On Thu, Nov 16, 2017 at 10:10:27AM +0100, Geert Uytterhoeven wrote:
> Hi Ulrich,
> 
> On Wed, Nov 15, 2017 at 4:25 PM, Ulrich Hecht
> <ulrich.hecht+renesas@gmail.com> wrote:
> > Defines R-Car D3 I2C controllers 0-3.
> >
> > Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
> 
> Thanks for your patch!
> 
> > --- a/arch/arm64/boot/dts/renesas/r8a77995.dtsi
> > +++ b/arch/arm64/boot/dts/renesas/r8a77995.dtsi
> > @@ -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";
> 
> Missing set for dmac2? (for all four interfaces)
> 
> > +                       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:
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Hi Ulrich,

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

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

* Re: [PATCH 4/6] arm64: renesas: draak: enable I2C controller 0 and EEPROM
  2017-11-16  9:27   ` Geert Uytterhoeven
@ 2017-11-17 14:31     ` Simon Horman
  2017-11-17 16:39       ` Simon Horman
  0 siblings, 1 reply; 23+ messages in thread
From: Simon Horman @ 2017-11-17 14:31 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Ulrich Hecht, Linux-Renesas, Wolfram Sang, Magnus Damm, Linux I2C

On Thu, Nov 16, 2017 at 10:27:56AM +0100, Geert Uytterhoeven wrote:
> Hi Ulrich,
> 
> On Wed, Nov 15, 2017 at 4:25 PM, Ulrich Hecht
> <ulrich.hecht+renesas@gmail.com> wrote:
> > Enables EEPROM on I2C0 on the Draak board.
> >
> > Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
> 
> Thanks for your patch!
> 
> > --- a/arch/arm64/boot/dts/renesas/r8a77995-draak.dts
> > +++ b/arch/arm64/boot/dts/renesas/r8a77995-draak.dts
> 
> > @@ -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";

Applied with the above change.

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

Ulrich, please follow-up on this, thanks!

> With the above fixed:
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> 
> Gr{oetje,eeting}s,
> 
>                         Geert
> 
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
> 
> 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
> 

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

* Re: [PATCH 5/6] arm64: renesas: draak: enable I2C controller 1
  2017-11-16  9:31   ` Geert Uytterhoeven
@ 2017-11-17 14:32     ` Simon Horman
  2017-11-17 16:40       ` Simon Horman
  2018-01-29 15:46     ` Ulrich Hecht
  1 sibling, 1 reply; 23+ messages in thread
From: Simon Horman @ 2017-11-17 14:32 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Ulrich Hecht, Linux-Renesas, Wolfram Sang, Magnus Damm, Linux I2C

On Thu, Nov 16, 2017 at 10:31:31AM +0100, Geert Uytterhoeven wrote:
> Hi Uli,
> 
> On Wed, Nov 15, 2017 at 4:25 PM, Ulrich Hecht
> <ulrich.hecht+renesas@gmail.com> wrote:
> > No devices to add, I2C1 has an external connector only.
> >
> > Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
> 
> Thanks for your patch!
> 
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> but please see below.

Thanks, applied.

> > --- a/arch/arm64/boot/dts/renesas/r8a77995-draak.dts
> > +++ b/arch/arm64/boot/dts/renesas/r8a77995-draak.dts
> 
> > @@ -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?

Ulrich, please consider following up on this.

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

* Re: [PATCH 4/6] arm64: renesas: draak: enable I2C controller 0 and EEPROM
  2017-11-17 14:31     ` Simon Horman
@ 2017-11-17 16:39       ` Simon Horman
  2018-01-19 10:34         ` Kieran Bingham
  0 siblings, 1 reply; 23+ messages in thread
From: Simon Horman @ 2017-11-17 16:39 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Ulrich Hecht, Linux-Renesas, Wolfram Sang, Magnus Damm, Linux I2C

On Fri, Nov 17, 2017 at 06:31:21AM -0800, Simon Horman wrote:
> On Thu, Nov 16, 2017 at 10:27:56AM +0100, Geert Uytterhoeven wrote:
> > Hi Ulrich,
> > 
> > On Wed, Nov 15, 2017 at 4:25 PM, Ulrich Hecht
> > <ulrich.hecht+renesas@gmail.com> wrote:
> > > Enables EEPROM on I2C0 on the Draak board.
> > >
> > > Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
> > 
> > Thanks for your patch!
> > 
> > > --- a/arch/arm64/boot/dts/renesas/r8a77995-draak.dts
> > > +++ b/arch/arm64/boot/dts/renesas/r8a77995-draak.dts
> > 
> > > @@ -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";
> 
> 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.

> 
> > Please also submit a patch to add that compatible value to
> > Documentation/devicetree/bindings/eeprom/eeprom.txt.
> 
> Ulrich, please follow-up on this, thanks!
> 
> > With the above fixed:
> > Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > 
> > Gr{oetje,eeting}s,
> > 
> >                         Geert
> > 
> > --
> > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
> > 
> > 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
> > 
> 

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

* Re: [PATCH 5/6] arm64: renesas: draak: enable I2C controller 1
  2017-11-17 14:32     ` Simon Horman
@ 2017-11-17 16:40       ` Simon Horman
  0 siblings, 0 replies; 23+ messages in thread
From: Simon Horman @ 2017-11-17 16:40 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Ulrich Hecht, Linux-Renesas, Wolfram Sang, Magnus Damm, Linux I2C

On Fri, Nov 17, 2017 at 06:32:19AM -0800, Simon Horman wrote:
> On Thu, Nov 16, 2017 at 10:31:31AM +0100, Geert Uytterhoeven wrote:
> > Hi Uli,
> > 
> > On Wed, Nov 15, 2017 at 4:25 PM, Ulrich Hecht
> > <ulrich.hecht+renesas@gmail.com> wrote:
> > > No devices to add, I2C1 has an external connector only.
> > >
> > > Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
> > 
> > Thanks for your patch!
> > 
> > Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > 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.

> > > --- a/arch/arm64/boot/dts/renesas/r8a77995-draak.dts
> > > +++ b/arch/arm64/boot/dts/renesas/r8a77995-draak.dts
> > 
> > > @@ -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?
> 
> Ulrich, please consider following up on this.
> 

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

* Re: [PATCH 0/6] R-Car D3 (r8a77995) I2C integration
  2017-11-15 15:25 [PATCH 0/6] R-Car D3 (r8a77995) I2C integration Ulrich Hecht
                   ` (5 preceding siblings ...)
  2017-11-15 15:25 ` [PATCH 6/6] i2c: rcar: document R8A77970 bindings Ulrich Hecht
@ 2017-12-04 21:33 ` Wolfram Sang
  6 siblings, 0 replies; 23+ messages in thread
From: Wolfram Sang @ 2017-12-04 21:33 UTC (permalink / raw)
  To: Ulrich Hecht; +Cc: linux-renesas-soc, horms, geert, magnus.damm, linux-i2c

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


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


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

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

* Re: [PATCH 3/6] arm64: renesas: r8a77995: add I2C support
  2017-11-15 15:25 ` [PATCH 3/6] arm64: renesas: r8a77995: add I2C support Ulrich Hecht
  2017-11-16  9:10   ` Geert Uytterhoeven
@ 2018-01-17 17:21   ` Kieran Bingham
  1 sibling, 0 replies; 23+ messages in thread
From: Kieran Bingham @ 2018-01-17 17:21 UTC (permalink / raw)
  To: Ulrich Hecht, linux-renesas-soc, horms, wsa, geert; +Cc: magnus.damm, linux-i2c

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


On 15/11/17 15:25, Ulrich Hecht wrote:
> Defines R-Car D3 I2C controllers 0-3.
> 
> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
> ---
>  arch/arm64/boot/dts/renesas/r8a77995.dtsi | 64 +++++++++++++++++++++++++++++++
>  1 file changed, 64 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/renesas/r8a77995.dtsi b/arch/arm64/boot/dts/renesas/r8a77995.dtsi
> index 5fa7572..b3113003 100644
> --- a/arch/arm64/boot/dts/renesas/r8a77995.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a77995.dtsi
> @@ -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>;
> 

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

* Re: [PATCH 3/6] arm64: renesas: r8a77995: add I2C support
  2017-11-17 14:28     ` Simon Horman
@ 2018-01-19 10:32       ` Kieran Bingham
  0 siblings, 0 replies; 23+ messages in thread
From: Kieran Bingham @ 2018-01-19 10:32 UTC (permalink / raw)
  To: Ulrich Hecht
  Cc: Simon Horman, Geert Uytterhoeven, Linux-Renesas, Wolfram Sang,
	Magnus Damm, Linux I2C

Hi Ulrich,

On 17/11/17 14:28, Simon Horman wrote:
> On Thu, Nov 16, 2017 at 10:10:27AM +0100, Geert Uytterhoeven wrote:
>> Hi Ulrich,
>>
>> On Wed, Nov 15, 2017 at 4:25 PM, Ulrich Hecht
>> <ulrich.hecht+renesas@gmail.com> wrote:
>>> Defines R-Car D3 I2C controllers 0-3.
>>>
>>> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
>>
>> Thanks for your patch!
>>
>>> --- a/arch/arm64/boot/dts/renesas/r8a77995.dtsi
>>> +++ b/arch/arm64/boot/dts/renesas/r8a77995.dtsi
>>> @@ -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";
>>
>> Missing set for dmac2? (for all four interfaces)
>>
>>> +                       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:
>> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> 
> 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?

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

* Re: [PATCH 4/6] arm64: renesas: draak: enable I2C controller 0 and EEPROM
  2017-11-17 16:39       ` Simon Horman
@ 2018-01-19 10:34         ` Kieran Bingham
  0 siblings, 0 replies; 23+ messages in thread
From: Kieran Bingham @ 2018-01-19 10:34 UTC (permalink / raw)
  To: Ulrich Hecht
  Cc: Simon Horman, Geert Uytterhoeven, Linux-Renesas, Wolfram Sang,
	Magnus Damm, Linux I2C

Hi Ulrich,

On 17/11/17 16:39, Simon Horman wrote:
> On Fri, Nov 17, 2017 at 06:31:21AM -0800, Simon Horman wrote:
>> On Thu, Nov 16, 2017 at 10:27:56AM +0100, Geert Uytterhoeven wrote:
>>> Hi Ulrich,
>>>
>>> On Wed, Nov 15, 2017 at 4:25 PM, Ulrich Hecht
>>> <ulrich.hecht+renesas@gmail.com> wrote:
>>>> Enables EEPROM on I2C0 on the Draak board.
>>>>
>>>> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
>>>
>>> Thanks for your patch!
>>>
>>>> --- a/arch/arm64/boot/dts/renesas/r8a77995-draak.dts
>>>> +++ b/arch/arm64/boot/dts/renesas/r8a77995-draak.dts
>>>
>>>> @@ -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";
>>
>> 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


>>
>>> Please also submit a patch to add that compatible value to
>>> Documentation/devicetree/bindings/eeprom/eeprom.txt.
>>
>> Ulrich, please follow-up on this, thanks!
>>
>>> With the above fixed:
>>> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
>>>
>>> Gr{oetje,eeting}s,
>>>
>>>                         Geert
>>>
>>> --
>>> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>>>
>>> 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
>>>
>>

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

* Re: [PATCH 5/6] arm64: renesas: draak: enable I2C controller 1
  2017-11-16  9:31   ` Geert Uytterhoeven
  2017-11-17 14:32     ` Simon Horman
@ 2018-01-29 15:46     ` Ulrich Hecht
  1 sibling, 0 replies; 23+ messages in thread
From: Ulrich Hecht @ 2018-01-29 15:46 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Linux-Renesas, Simon Horman, Wolfram Sang, Magnus Damm, Linux I2C

On Thu, Nov 16, 2017 at 10:31 AM, Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
> 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

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

end of thread, other threads:[~2018-01-29 15:46 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-15 15:25 [PATCH 0/6] R-Car D3 (r8a77995) I2C integration Ulrich Hecht
2017-11-15 15:25 ` [PATCH 1/6] pinctrl: sh-pfc: r8a77995: add missing pins SCL0 and SDA0 to pinmux data Ulrich Hecht
2017-11-16  8:53   ` Geert Uytterhoeven
2017-11-15 15:25 ` [PATCH 2/6] i2c: rcar: enable for R-Car D3 (r8a77995) Ulrich Hecht
2017-11-16  8:54   ` Geert Uytterhoeven
2017-11-15 15:25 ` [PATCH 3/6] arm64: renesas: r8a77995: add I2C support Ulrich Hecht
2017-11-16  9:10   ` Geert Uytterhoeven
2017-11-17 14:28     ` Simon Horman
2018-01-19 10:32       ` Kieran Bingham
2018-01-17 17:21   ` Kieran Bingham
2017-11-15 15:25 ` [PATCH 4/6] arm64: renesas: draak: enable I2C controller 0 and EEPROM Ulrich Hecht
2017-11-16  9:27   ` Geert Uytterhoeven
2017-11-17 14:31     ` Simon Horman
2017-11-17 16:39       ` Simon Horman
2018-01-19 10:34         ` Kieran Bingham
2017-11-15 15:25 ` [PATCH 5/6] arm64: renesas: draak: enable I2C controller 1 Ulrich Hecht
2017-11-16  9:31   ` Geert Uytterhoeven
2017-11-17 14:32     ` Simon Horman
2017-11-17 16:40       ` Simon Horman
2018-01-29 15:46     ` Ulrich Hecht
2017-11-15 15:25 ` [PATCH 6/6] i2c: rcar: document R8A77970 bindings Ulrich Hecht
2017-11-16  8:55   ` Geert Uytterhoeven
2017-12-04 21:33 ` [PATCH 0/6] R-Car D3 (r8a77995) I2C integration 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).