All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] r8a7796 I2C integration
@ 2016-09-14 16:46 Ulrich Hecht
  2016-09-14 16:46 ` [PATCH 1/6] i2c: rcar: add support for r8a7796 (R-Car M3-W) Ulrich Hecht
                   ` (5 more replies)
  0 siblings, 6 replies; 16+ messages in thread
From: Ulrich Hecht @ 2016-09-14 16:46 UTC (permalink / raw)
  To: linux-renesas-soc, geert; +Cc: horms, magnus.damm, wsa, Ulrich Hecht

Hi!

This enables the I2C controllers on r8a7796. The only difference to r8a7795
is the clock for channels three to six (S0D6 instead of S3D2).

Based on renesas-drivers-2016-09-13-v4.8-rc6. The DMA enablement depends on
the "r8a7796 SYS-DMAC integration" series posted earlier.

CU
Uli


Ulrich Hecht (6):
  i2c: rcar: add support for r8a7796 (R-Car M3-W)
  clk: renesas: r8a7796: Add I2C clocks
  pinctrl: sh-pfc: r8a7796: add I2C pin support
  arm64: renesas: r8a7796: add I2C support
  arm64: renesas: r8a7796: Enable I2C DMA
  arm64: renesas: r8a7796: salvator-x: enable I2C

 Documentation/devicetree/bindings/i2c/i2c-rcar.txt |   1 +
 arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts |  12 +++
 arch/arm64/boot/dts/renesas/r8a7796.dtsi           | 108 +++++++++++++++++++++
 drivers/clk/renesas/r8a7796-cpg-mssr.c             |   7 ++
 drivers/i2c/busses/i2c-rcar.c                      |   1 +
 drivers/pinctrl/sh-pfc/pfc-r8a7796.c               |  77 +++++++++++++++
 6 files changed, 206 insertions(+)

-- 
2.9.3

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

* [PATCH 1/6] i2c: rcar: add support for r8a7796 (R-Car M3-W)
  2016-09-14 16:46 [PATCH 0/6] r8a7796 I2C integration Ulrich Hecht
@ 2016-09-14 16:46 ` Ulrich Hecht
  2016-09-15 11:33   ` Geert Uytterhoeven
  2016-09-16 17:47   ` Wolfram Sang
  2016-09-14 16:46 ` [PATCH 2/6] clk: renesas: r8a7796: Add I2C clocks Ulrich Hecht
                   ` (4 subsequent siblings)
  5 siblings, 2 replies; 16+ messages in thread
From: Ulrich Hecht @ 2016-09-14 16:46 UTC (permalink / raw)
  To: linux-renesas-soc, geert; +Cc: horms, magnus.damm, wsa, Ulrich Hecht

Same as r8a7795.

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
---
 Documentation/devicetree/bindings/i2c/i2c-rcar.txt | 1 +
 drivers/i2c/busses/i2c-rcar.c                      | 1 +
 2 files changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/i2c/i2c-rcar.txt b/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
index 5f0cb50..239632a 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
@@ -11,6 +11,7 @@ Required properties:
 	"renesas,i2c-r8a7793"
 	"renesas,i2c-r8a7794"
 	"renesas,i2c-r8a7795"
+	"renesas,i2c-r8a7796"
 - reg: physical base address of the controller and length of memory mapped
   region.
 - interrupts: interrupt specifier.
diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
index e96ea24..726615e 100644
--- a/drivers/i2c/busses/i2c-rcar.c
+++ b/drivers/i2c/busses/i2c-rcar.c
@@ -802,6 +802,7 @@ static const struct of_device_id rcar_i2c_dt_ids[] = {
 	{ .compatible = "renesas,i2c-r8a7793", .data = (void *)I2C_RCAR_GEN2 },
 	{ .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 },
 	{},
 };
 MODULE_DEVICE_TABLE(of, rcar_i2c_dt_ids);
-- 
2.9.3

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

* [PATCH 2/6] clk: renesas: r8a7796: Add I2C clocks
  2016-09-14 16:46 [PATCH 0/6] r8a7796 I2C integration Ulrich Hecht
  2016-09-14 16:46 ` [PATCH 1/6] i2c: rcar: add support for r8a7796 (R-Car M3-W) Ulrich Hecht
@ 2016-09-14 16:46 ` Ulrich Hecht
  2016-09-15 11:35   ` Geert Uytterhoeven
  2016-09-14 16:46 ` [PATCH 3/6] pinctrl: sh-pfc: r8a7796: add I2C pin support Ulrich Hecht
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 16+ messages in thread
From: Ulrich Hecht @ 2016-09-14 16:46 UTC (permalink / raw)
  To: linux-renesas-soc, geert; +Cc: horms, magnus.damm, wsa, Ulrich Hecht

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
---
 drivers/clk/renesas/r8a7796-cpg-mssr.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/clk/renesas/r8a7796-cpg-mssr.c b/drivers/clk/renesas/r8a7796-cpg-mssr.c
index c02fe34..d851c42 100644
--- a/drivers/clk/renesas/r8a7796-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7796-cpg-mssr.c
@@ -133,6 +133,13 @@ static const struct mssr_mod_clk r8a7796_mod_clks[] __initconst = {
 	DEF_MOD("gpio2",		 910,	R8A7796_CLK_S3D4),
 	DEF_MOD("gpio1",		 911,	R8A7796_CLK_S3D4),
 	DEF_MOD("gpio0",		 912,	R8A7796_CLK_S3D4),
+	DEF_MOD("i2c6",			 918,	R8A7796_CLK_S0D6),
+	DEF_MOD("i2c5",			 919,	R8A7796_CLK_S0D6),
+	DEF_MOD("i2c4",			 927,	R8A7796_CLK_S0D6),
+	DEF_MOD("i2c3",			 928,	R8A7796_CLK_S0D6),
+	DEF_MOD("i2c2",			 929,	R8A7796_CLK_S3D2),
+	DEF_MOD("i2c1",			 930,	R8A7796_CLK_S3D2),
+	DEF_MOD("i2c0",			 931,	R8A7796_CLK_S3D2),
 };
 
 static const unsigned int r8a7796_crit_mod_clks[] __initconst = {
-- 
2.9.3

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

* [PATCH 3/6] pinctrl: sh-pfc: r8a7796: add I2C pin support
  2016-09-14 16:46 [PATCH 0/6] r8a7796 I2C integration Ulrich Hecht
  2016-09-14 16:46 ` [PATCH 1/6] i2c: rcar: add support for r8a7796 (R-Car M3-W) Ulrich Hecht
  2016-09-14 16:46 ` [PATCH 2/6] clk: renesas: r8a7796: Add I2C clocks Ulrich Hecht
@ 2016-09-14 16:46 ` Ulrich Hecht
  2016-09-15 11:39   ` Geert Uytterhoeven
  2016-09-14 16:46 ` [PATCH 4/6] arm64: renesas: r8a7796: add I2C support Ulrich Hecht
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 16+ messages in thread
From: Ulrich Hecht @ 2016-09-14 16:46 UTC (permalink / raw)
  To: linux-renesas-soc, geert; +Cc: horms, magnus.damm, wsa, Ulrich Hecht

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

diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7796.c b/drivers/pinctrl/sh-pfc/pfc-r8a7796.c
index dc9b671..42db745 100644
--- a/drivers/pinctrl/sh-pfc/pfc-r8a7796.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7796.c
@@ -1490,6 +1490,57 @@ static const struct sh_pfc_pin pinmux_pins[] = {
 	PINMUX_GPIO_GP_ALL(),
 };
 
+/* - I2C -------------------------------------------------------------------- */
+static const unsigned int i2c1_a_pins[] = {
+	/* SDA, SCL */
+	RCAR_GP_PIN(5, 11), RCAR_GP_PIN(5, 10),
+};
+static const unsigned int i2c1_a_mux[] = {
+	SDA1_A_MARK, SCL1_A_MARK,
+};
+static const unsigned int i2c1_b_pins[] = {
+	/* SDA, SCL */
+	RCAR_GP_PIN(5, 24), RCAR_GP_PIN(5, 23),
+};
+static const unsigned int i2c1_b_mux[] = {
+	SDA1_B_MARK, SCL1_B_MARK,
+};
+static const unsigned int i2c2_a_pins[] = {
+	/* SDA, SCL */
+	RCAR_GP_PIN(5, 0), RCAR_GP_PIN(5, 4),
+};
+static const unsigned int i2c2_a_mux[] = {
+	SDA2_A_MARK, SCL2_A_MARK,
+};
+static const unsigned int i2c2_b_pins[] = {
+	/* SDA, SCL */
+	RCAR_GP_PIN(3, 13), RCAR_GP_PIN(3, 12),
+};
+static const unsigned int i2c2_b_mux[] = {
+	SDA2_B_MARK, SCL2_B_MARK,
+};
+static const unsigned int i2c6_a_pins[] = {
+	/* SDA, SCL */
+	RCAR_GP_PIN(1, 8), RCAR_GP_PIN(1, 11),
+};
+static const unsigned int i2c6_a_mux[] = {
+	SDA6_A_MARK, SCL6_A_MARK,
+};
+static const unsigned int i2c6_b_pins[] = {
+	/* SDA, SCL */
+	RCAR_GP_PIN(1, 26), RCAR_GP_PIN(1, 25),
+};
+static const unsigned int i2c6_b_mux[] = {
+	SDA6_B_MARK, SCL6_B_MARK,
+};
+static const unsigned int i2c6_c_pins[] = {
+	/* SDA, SCL */
+	RCAR_GP_PIN(0, 15), RCAR_GP_PIN(0, 14),
+};
+static const unsigned int i2c6_c_mux[] = {
+	SDA6_C_MARK, SCL6_C_MARK,
+};
+
 /* - SCIF0 ------------------------------------------------------------------ */
 static const unsigned int scif0_data_pins[] = {
 	/* RX, TX */
@@ -1912,6 +1963,13 @@ static const unsigned int sdhi3_ds_mux[] = {
 };
 
 static const struct sh_pfc_pin_group pinmux_groups[] = {
+	SH_PFC_PIN_GROUP(i2c1_a),
+	SH_PFC_PIN_GROUP(i2c1_b),
+	SH_PFC_PIN_GROUP(i2c2_a),
+	SH_PFC_PIN_GROUP(i2c2_b),
+	SH_PFC_PIN_GROUP(i2c6_a),
+	SH_PFC_PIN_GROUP(i2c6_b),
+	SH_PFC_PIN_GROUP(i2c6_c),
 	SH_PFC_PIN_GROUP(scif0_data),
 	SH_PFC_PIN_GROUP(scif0_clk),
 	SH_PFC_PIN_GROUP(scif0_ctrl),
@@ -1969,6 +2027,22 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
 	SH_PFC_PIN_GROUP(sdhi3_ds),
 };
 
+static const char * const i2c1_groups[] = {
+	"i2c1_a",
+	"i2c1_b",
+};
+
+static const char * const i2c2_groups[] = {
+	"i2c2_a",
+	"i2c2_b",
+};
+
+static const char * const i2c6_groups[] = {
+	"i2c6_a",
+	"i2c6_b",
+	"i2c6_c",
+};
+
 static const char * const scif0_groups[] = {
 	"scif0_data",
 	"scif0_clk",
@@ -2058,6 +2132,9 @@ static const char * const sdhi3_groups[] = {
 };
 
 static const struct sh_pfc_function pinmux_functions[] = {
+	SH_PFC_FUNCTION(i2c1),
+	SH_PFC_FUNCTION(i2c2),
+	SH_PFC_FUNCTION(i2c6),
 	SH_PFC_FUNCTION(scif0),
 	SH_PFC_FUNCTION(scif1),
 	SH_PFC_FUNCTION(scif2),
-- 
2.9.3

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

* [PATCH 4/6] arm64: renesas: r8a7796: add I2C support
  2016-09-14 16:46 [PATCH 0/6] r8a7796 I2C integration Ulrich Hecht
                   ` (2 preceding siblings ...)
  2016-09-14 16:46 ` [PATCH 3/6] pinctrl: sh-pfc: r8a7796: add I2C pin support Ulrich Hecht
@ 2016-09-14 16:46 ` Ulrich Hecht
  2016-09-15 11:42   ` Geert Uytterhoeven
                     ` (2 more replies)
  2016-09-14 16:46 ` [PATCH 5/6] arm64: renesas: r8a7796: Enable I2C DMA Ulrich Hecht
  2016-09-14 16:46 ` [PATCH 6/6] arm64: renesas: r8a7796: salvator-x: enable I2C Ulrich Hecht
  5 siblings, 3 replies; 16+ messages in thread
From: Ulrich Hecht @ 2016-09-14 16:46 UTC (permalink / raw)
  To: linux-renesas-soc, geert; +Cc: horms, magnus.damm, wsa, Ulrich Hecht

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

diff --git a/arch/arm64/boot/dts/renesas/r8a7796.dtsi b/arch/arm64/boot/dts/renesas/r8a7796.dtsi
index d7590c3..a4d8b76 100644
--- a/arch/arm64/boot/dts/renesas/r8a7796.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a7796.dtsi
@@ -17,6 +17,16 @@
 	#address-cells = <2>;
 	#size-cells = <2>;
 
+	aliases {
+		i2c0 = &i2c0;
+		i2c1 = &i2c1;
+		i2c2 = &i2c2;
+		i2c3 = &i2c3;
+		i2c4 = &i2c4;
+		i2c5 = &i2c5;
+		i2c6 = &i2c6;
+	};
+
 	psci {
 		compatible = "arm,psci-0.2";
 		method = "smc";
@@ -239,6 +249,90 @@
 			#power-domain-cells = <1>;
 		};
 
+		i2c0: i2c@e6500000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "renesas,i2c-r8a7796";
+			reg = <0 0xe6500000 0 0x40>;
+			interrupts = <GIC_SPI 287 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 931>;
+			power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
+			i2c-scl-internal-delay-ns = <110>;
+			status = "disabled";
+		};
+
+		i2c1: i2c@e6508000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "renesas,i2c-r8a7796";
+			reg = <0 0xe6508000 0 0x40>;
+			interrupts = <GIC_SPI 288 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 930>;
+			power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
+			i2c-scl-internal-delay-ns = <6>;
+			status = "disabled";
+		};
+
+		i2c2: i2c@e6510000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "renesas,i2c-r8a7796";
+			reg = <0 0xe6510000 0 0x40>;
+			interrupts = <GIC_SPI 286 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 929>;
+			power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
+			i2c-scl-internal-delay-ns = <6>;
+			status = "disabled";
+		};
+
+		i2c3: i2c@e66d0000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "renesas,i2c-r8a7796";
+			reg = <0 0xe66d0000 0 0x40>;
+			interrupts = <GIC_SPI 290 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 928>;
+			power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
+			i2c-scl-internal-delay-ns = <110>;
+			status = "disabled";
+		};
+
+		i2c4: i2c@e66d8000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "renesas,i2c-r8a7796";
+			reg = <0 0xe66d8000 0 0x40>;
+			interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 927>;
+			power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
+			i2c-scl-internal-delay-ns = <110>;
+			status = "disabled";
+		};
+
+		i2c5: i2c@e66e0000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "renesas,i2c-r8a7796";
+			reg = <0 0xe66e0000 0 0x40>;
+			interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 919>;
+			power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
+			i2c-scl-internal-delay-ns = <110>;
+			status = "disabled";
+		};
+
+		i2c6: i2c@e66e8000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "renesas,i2c-r8a7796";
+			reg = <0 0xe66e8000 0 0x40>;
+			interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 918>;
+			power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
+			i2c-scl-internal-delay-ns = <6>;
+			status = "disabled";
+		};
+
 		scif2: serial@e6e88000 {
 			compatible = "renesas,scif-r8a7796",
 				     "renesas,rcar-gen3-scif", "renesas,scif";
-- 
2.9.3

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

* [PATCH 5/6] arm64: renesas: r8a7796: Enable I2C DMA
  2016-09-14 16:46 [PATCH 0/6] r8a7796 I2C integration Ulrich Hecht
                   ` (3 preceding siblings ...)
  2016-09-14 16:46 ` [PATCH 4/6] arm64: renesas: r8a7796: add I2C support Ulrich Hecht
@ 2016-09-14 16:46 ` Ulrich Hecht
  2016-09-15 11:47   ` Geert Uytterhoeven
  2016-09-14 16:46 ` [PATCH 6/6] arm64: renesas: r8a7796: salvator-x: enable I2C Ulrich Hecht
  5 siblings, 1 reply; 16+ messages in thread
From: Ulrich Hecht @ 2016-09-14 16:46 UTC (permalink / raw)
  To: linux-renesas-soc, geert; +Cc: horms, magnus.damm, wsa, Ulrich Hecht

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

diff --git a/arch/arm64/boot/dts/renesas/r8a7796.dtsi b/arch/arm64/boot/dts/renesas/r8a7796.dtsi
index a4d8b76..7c4d11c 100644
--- a/arch/arm64/boot/dts/renesas/r8a7796.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a7796.dtsi
@@ -257,6 +257,8 @@
 			interrupts = <GIC_SPI 287 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&cpg CPG_MOD 931>;
 			power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
+			dmas = <&dmac1 0x91>, <&dmac1 0x90>;
+			dma-names = "tx", "rx";
 			i2c-scl-internal-delay-ns = <110>;
 			status = "disabled";
 		};
@@ -269,6 +271,8 @@
 			interrupts = <GIC_SPI 288 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&cpg CPG_MOD 930>;
 			power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
+			dmas = <&dmac1 0x93>, <&dmac1 0x92>;
+			dma-names = "tx", "rx";
 			i2c-scl-internal-delay-ns = <6>;
 			status = "disabled";
 		};
@@ -281,6 +285,8 @@
 			interrupts = <GIC_SPI 286 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&cpg CPG_MOD 929>;
 			power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
+			dmas = <&dmac1 0x95>, <&dmac1 0x94>;
+			dma-names = "tx", "rx";
 			i2c-scl-internal-delay-ns = <6>;
 			status = "disabled";
 		};
@@ -293,6 +299,8 @@
 			interrupts = <GIC_SPI 290 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&cpg CPG_MOD 928>;
 			power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
+			dmas = <&dmac0 0x97>, <&dmac0 0x96>;
+			dma-names = "tx", "rx";
 			i2c-scl-internal-delay-ns = <110>;
 			status = "disabled";
 		};
@@ -305,6 +313,8 @@
 			interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&cpg CPG_MOD 927>;
 			power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
+			dmas = <&dmac0 0x99>, <&dmac0 0x98>;
+			dma-names = "tx", "rx";
 			i2c-scl-internal-delay-ns = <110>;
 			status = "disabled";
 		};
@@ -317,6 +327,8 @@
 			interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&cpg CPG_MOD 919>;
 			power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
+			dmas = <&dmac0 0x9b>, <&dmac0 0x9a>;
+			dma-names = "tx", "rx";
 			i2c-scl-internal-delay-ns = <110>;
 			status = "disabled";
 		};
@@ -329,6 +341,8 @@
 			interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&cpg CPG_MOD 918>;
 			power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
+			dmas = <&dmac0 0x9d>, <&dmac0 0x9c>;
+			dma-names = "tx", "rx";
 			i2c-scl-internal-delay-ns = <6>;
 			status = "disabled";
 		};
-- 
2.9.3

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

* [PATCH 6/6] arm64: renesas: r8a7796: salvator-x: enable I2C
  2016-09-14 16:46 [PATCH 0/6] r8a7796 I2C integration Ulrich Hecht
                   ` (4 preceding siblings ...)
  2016-09-14 16:46 ` [PATCH 5/6] arm64: renesas: r8a7796: Enable I2C DMA Ulrich Hecht
@ 2016-09-14 16:46 ` Ulrich Hecht
  2016-09-15 11:49   ` Geert Uytterhoeven
  5 siblings, 1 reply; 16+ messages in thread
From: Ulrich Hecht @ 2016-09-14 16:46 UTC (permalink / raw)
  To: linux-renesas-soc, geert; +Cc: horms, magnus.damm, wsa, Ulrich Hecht

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

diff --git a/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts
index a8373c2..bdf6e05 100644
--- a/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts
+++ b/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts
@@ -94,6 +94,11 @@
 		function = "scif_clk";
 	};
 
+	i2c2_pins: i2c2 {
+		groups = "i2c2_a";
+		function = "i2c2";
+	};
+
 	sdhi0_pins: sd0 {
 		groups = "sdhi0_data4", "sdhi0_ctrl";
 		function = "sdhi0";
@@ -144,6 +149,13 @@
 	status = "okay";
 };
 
+&i2c2 {
+	pinctrl-0 = <&i2c2_pins>;
+	pinctrl-names = "default";
+
+	status = "okay";
+};
+
 &wdt0 {
 	timeout-sec = <60>;
 	status = "okay";
-- 
2.9.3

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

* Re: [PATCH 1/6] i2c: rcar: add support for r8a7796 (R-Car M3-W)
  2016-09-14 16:46 ` [PATCH 1/6] i2c: rcar: add support for r8a7796 (R-Car M3-W) Ulrich Hecht
@ 2016-09-15 11:33   ` Geert Uytterhoeven
  2016-09-16 17:47   ` Wolfram Sang
  1 sibling, 0 replies; 16+ messages in thread
From: Geert Uytterhoeven @ 2016-09-15 11:33 UTC (permalink / raw)
  To: Ulrich Hecht; +Cc: Linux-Renesas, Simon Horman, Magnus Damm, Wolfram Sang

On Wed, Sep 14, 2016 at 6:46 PM, Ulrich Hecht
<ulrich.hecht+renesas@gmail.com> wrote:
> Same as r8a7795.
>
> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>

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] 16+ messages in thread

* Re: [PATCH 2/6] clk: renesas: r8a7796: Add I2C clocks
  2016-09-14 16:46 ` [PATCH 2/6] clk: renesas: r8a7796: Add I2C clocks Ulrich Hecht
@ 2016-09-15 11:35   ` Geert Uytterhoeven
  0 siblings, 0 replies; 16+ messages in thread
From: Geert Uytterhoeven @ 2016-09-15 11:35 UTC (permalink / raw)
  To: Ulrich Hecht; +Cc: Linux-Renesas, Simon Horman, Magnus Damm, Wolfram Sang

On Wed, Sep 14, 2016 at 6:46 PM, Ulrich Hecht
<ulrich.hecht+renesas@gmail.com> wrote:
> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>

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] 16+ messages in thread

* Re: [PATCH 3/6] pinctrl: sh-pfc: r8a7796: add I2C pin support
  2016-09-14 16:46 ` [PATCH 3/6] pinctrl: sh-pfc: r8a7796: add I2C pin support Ulrich Hecht
@ 2016-09-15 11:39   ` Geert Uytterhoeven
  0 siblings, 0 replies; 16+ messages in thread
From: Geert Uytterhoeven @ 2016-09-15 11:39 UTC (permalink / raw)
  To: Ulrich Hecht; +Cc: Linux-Renesas, Simon Horman, Magnus Damm, Wolfram Sang

On Wed, Sep 14, 2016 at 6:46 PM, Ulrich Hecht
<ulrich.hecht+renesas@gmail.com> wrote:
> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>

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] 16+ messages in thread

* Re: [PATCH 4/6] arm64: renesas: r8a7796: add I2C support
  2016-09-14 16:46 ` [PATCH 4/6] arm64: renesas: r8a7796: add I2C support Ulrich Hecht
@ 2016-09-15 11:42   ` Geert Uytterhoeven
  2016-09-16  9:48   ` Simon Horman
  2016-09-16 17:52   ` Wolfram Sang
  2 siblings, 0 replies; 16+ messages in thread
From: Geert Uytterhoeven @ 2016-09-15 11:42 UTC (permalink / raw)
  To: Ulrich Hecht; +Cc: Linux-Renesas, Simon Horman, Magnus Damm, Wolfram Sang

On Wed, Sep 14, 2016 at 6:46 PM, Ulrich Hecht
<ulrich.hecht+renesas@gmail.com> wrote:
> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>

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] 16+ messages in thread

* Re: [PATCH 5/6] arm64: renesas: r8a7796: Enable I2C DMA
  2016-09-14 16:46 ` [PATCH 5/6] arm64: renesas: r8a7796: Enable I2C DMA Ulrich Hecht
@ 2016-09-15 11:47   ` Geert Uytterhoeven
  0 siblings, 0 replies; 16+ messages in thread
From: Geert Uytterhoeven @ 2016-09-15 11:47 UTC (permalink / raw)
  To: Ulrich Hecht; +Cc: Linux-Renesas, Simon Horman, Magnus Damm, Wolfram Sang

Hi Ulrich,

On Wed, Sep 14, 2016 at 6:46 PM, Ulrich Hecht
<ulrich.hecht+renesas@gmail.com> wrote:
> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

> ---
>  arch/arm64/boot/dts/renesas/r8a7796.dtsi | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/renesas/r8a7796.dtsi b/arch/arm64/boot/dts/renesas/r8a7796.dtsi
> index a4d8b76..7c4d11c 100644
> --- a/arch/arm64/boot/dts/renesas/r8a7796.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a7796.dtsi
> @@ -257,6 +257,8 @@
>                         interrupts = <GIC_SPI 287 IRQ_TYPE_LEVEL_HIGH>;
>                         clocks = <&cpg CPG_MOD 931>;
>                         power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
> +                       dmas = <&dmac1 0x91>, <&dmac1 0x90>;
> +                       dma-names = "tx", "rx";

Does the firmware on your r8a7796/salvator-x support using SYS-DMAC2?
(the one we have on r8a7795/salvator-x doesn't)
If yes, you may want to add those dmas, too.

>                         i2c-scl-internal-delay-ns = <110>;
>                         status = "disabled";
>                 };
> @@ -269,6 +271,8 @@
>                         interrupts = <GIC_SPI 288 IRQ_TYPE_LEVEL_HIGH>;
>                         clocks = <&cpg CPG_MOD 930>;
>                         power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
> +                       dmas = <&dmac1 0x93>, <&dmac1 0x92>;
> +                       dma-names = "tx", "rx";

Likewise.

>                         i2c-scl-internal-delay-ns = <6>;
>                         status = "disabled";
>                 };
> @@ -281,6 +285,8 @@
>                         interrupts = <GIC_SPI 286 IRQ_TYPE_LEVEL_HIGH>;
>                         clocks = <&cpg CPG_MOD 929>;
>                         power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
> +                       dmas = <&dmac1 0x95>, <&dmac1 0x94>;
> +                       dma-names = "tx", "rx";

Likewise.

>                         i2c-scl-internal-delay-ns = <6>;
>                         status = "disabled";
>                 };

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] 16+ messages in thread

* Re: [PATCH 6/6] arm64: renesas: r8a7796: salvator-x: enable I2C
  2016-09-14 16:46 ` [PATCH 6/6] arm64: renesas: r8a7796: salvator-x: enable I2C Ulrich Hecht
@ 2016-09-15 11:49   ` Geert Uytterhoeven
  0 siblings, 0 replies; 16+ messages in thread
From: Geert Uytterhoeven @ 2016-09-15 11:49 UTC (permalink / raw)
  To: Ulrich Hecht; +Cc: Linux-Renesas, Simon Horman, Magnus Damm, Wolfram Sang

On Wed, Sep 14, 2016 at 6:46 PM, Ulrich Hecht
<ulrich.hecht+renesas@gmail.com> wrote:
> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>

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] 16+ messages in thread

* Re: [PATCH 4/6] arm64: renesas: r8a7796: add I2C support
  2016-09-14 16:46 ` [PATCH 4/6] arm64: renesas: r8a7796: add I2C support Ulrich Hecht
  2016-09-15 11:42   ` Geert Uytterhoeven
@ 2016-09-16  9:48   ` Simon Horman
  2016-09-16 17:52   ` Wolfram Sang
  2 siblings, 0 replies; 16+ messages in thread
From: Simon Horman @ 2016-09-16  9:48 UTC (permalink / raw)
  To: Ulrich Hecht; +Cc: linux-renesas-soc, geert, magnus.damm, wsa

On Wed, Sep 14, 2016 at 06:46:09PM +0200, Ulrich Hecht wrote:
> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>

I would like to see some testing of this with 64bit memory enabled -
or some assurance there is no issue with such a configuration.

I am marking this patch and other arm64 patches in this series as Deferred
for now.

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

* Re: [PATCH 1/6] i2c: rcar: add support for r8a7796 (R-Car M3-W)
  2016-09-14 16:46 ` [PATCH 1/6] i2c: rcar: add support for r8a7796 (R-Car M3-W) Ulrich Hecht
  2016-09-15 11:33   ` Geert Uytterhoeven
@ 2016-09-16 17:47   ` Wolfram Sang
  1 sibling, 0 replies; 16+ messages in thread
From: Wolfram Sang @ 2016-09-16 17:47 UTC (permalink / raw)
  To: Ulrich Hecht; +Cc: linux-renesas-soc, geert, horms, magnus.damm

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

On Wed, Sep 14, 2016 at 06:46:06PM +0200, Ulrich Hecht wrote:
> Same as r8a7795.
> 
> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>

Applied to for-next, thanks!


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

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

* Re: [PATCH 4/6] arm64: renesas: r8a7796: add I2C support
  2016-09-14 16:46 ` [PATCH 4/6] arm64: renesas: r8a7796: add I2C support Ulrich Hecht
  2016-09-15 11:42   ` Geert Uytterhoeven
  2016-09-16  9:48   ` Simon Horman
@ 2016-09-16 17:52   ` Wolfram Sang
  2 siblings, 0 replies; 16+ messages in thread
From: Wolfram Sang @ 2016-09-16 17:52 UTC (permalink / raw)
  To: Ulrich Hecht; +Cc: linux-renesas-soc, geert, horms, magnus.damm

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

On Wed, Sep 14, 2016 at 06:46:09PM +0200, Ulrich Hecht wrote:
> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>

Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>


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

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

end of thread, other threads:[~2016-09-16 17:52 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-14 16:46 [PATCH 0/6] r8a7796 I2C integration Ulrich Hecht
2016-09-14 16:46 ` [PATCH 1/6] i2c: rcar: add support for r8a7796 (R-Car M3-W) Ulrich Hecht
2016-09-15 11:33   ` Geert Uytterhoeven
2016-09-16 17:47   ` Wolfram Sang
2016-09-14 16:46 ` [PATCH 2/6] clk: renesas: r8a7796: Add I2C clocks Ulrich Hecht
2016-09-15 11:35   ` Geert Uytterhoeven
2016-09-14 16:46 ` [PATCH 3/6] pinctrl: sh-pfc: r8a7796: add I2C pin support Ulrich Hecht
2016-09-15 11:39   ` Geert Uytterhoeven
2016-09-14 16:46 ` [PATCH 4/6] arm64: renesas: r8a7796: add I2C support Ulrich Hecht
2016-09-15 11:42   ` Geert Uytterhoeven
2016-09-16  9:48   ` Simon Horman
2016-09-16 17:52   ` Wolfram Sang
2016-09-14 16:46 ` [PATCH 5/6] arm64: renesas: r8a7796: Enable I2C DMA Ulrich Hecht
2016-09-15 11:47   ` Geert Uytterhoeven
2016-09-14 16:46 ` [PATCH 6/6] arm64: renesas: r8a7796: salvator-x: enable I2C Ulrich Hecht
2016-09-15 11:49   ` Geert Uytterhoeven

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.