Skip to contentSkip to conversation

Add R8A7794/SILK I2C device tree support

PATCH New Sergei Shtylyov 2 participants 5 messages Aug 19, 2015 – Aug 20, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover Add R8A7794/SILK I2C device tree support

Hello.

Here's the set of 2 patches against Simon Horman's 'renesas.git' repo's
'renesas-devel-20150819-v4.2-rc7' tag. Here we add the I2C device tree support for the R8A7794/SILK board.

[1/2] ARM: shmobile: r8a7794: add I2C DT support
[2/2] ARM: shmobile: silk: add I2C1 DT support

WBR, Sergei

#1 lore raw

PATCH 1/2 ARM: shmobile: r8a7794: add I2C DT support

Define the generic R8A7794 parts of the I2C[0-5] device nodes.

Based on the original patch by Koji Matsuoka <[email protected]>.

---
 arch/arm/boot/dts/r8a7794.dtsi |   73 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 73 insertions(+)
arch/arm/boot/dts/r8a7794.dtsi +73 -0
Index: renesas/arch/arm/boot/dts/r8a7794.dtsi
===================================================================
@@ -20,6 +20,12 @@
 	#size-cells = <2>;
 
 	aliases {
+		i2c0 = &i2c0;
+		i2c1 = &i2c1;
+		i2c2 = &i2c2;
+		i2c3 = &i2c3;
+		i2c4 = &i2c4;
+		i2c5 = &i2c5;
 		spi0 = &qspi;
 	};
 
@@ -500,6 +506,73 @@
 		#address-cells = <1>;
 		#size-cells = <0>;
 		status = "disabled";
+	};
+
+	/* The memory map in the User's Manual maps the cores to bus numbers */
+	i2c0: i2c at e6508000 {
+		compatible = "renesas,i2c-r8a7794";
+		reg = <0 0xe6508000 0 0x40>;
+		interrupts = <0 287 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp9_clks R8A7794_CLK_I2C0>;
+		power-domains = <&cpg_clocks>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+		status = "disabled";
+	};
+
+	i2c1: i2c at e6518000 {
+		compatible = "renesas,i2c-r8a7794";
+		reg = <0 0xe6518000 0 0x40>;
+		interrupts = <0 288 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp9_clks R8A7794_CLK_I2C1>;
+		power-domains = <&cpg_clocks>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+		status = "disabled";
+	};
+
+	i2c2: i2c at e6530000 {
+		compatible = "renesas,i2c-r8a7794";
+		reg = <0 0xe6530000 0 0x40>;
+		interrupts = <0 286 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp9_clks R8A7794_CLK_I2C2>;
+		power-domains = <&cpg_clocks>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+		status = "disabled";
+	};
+
+	i2c3: i2c at e6540000 {
+		compatible = "renesas,i2c-r8a7794";
+		reg = <0 0xe6540000 0 0x40>;
+		interrupts = <0 290 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp9_clks R8A7794_CLK_I2C3>;
+		power-domains = <&cpg_clocks>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+		status = "disabled";
+	};
+
+	i2c4: i2c at e6520000 {
+		compatible = "renesas,i2c-r8a7794";
+		reg = <0 0xe6520000 0 0x40>;
+		interrupts = <0 19 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp9_clks R8A7794_CLK_I2C4>;
+		power-domains = <&cpg_clocks>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+		status = "disabled";
+	};
+
+	i2c5: i2c at e6528000 {
+		compatible = "renesas,i2c-r8a7794";
+		reg = <0 0xe6528000 0 0x40>;
+		interrupts = <0 20 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp9_clks R8A7794_CLK_I2C5>;
+		power-domains = <&cpg_clocks>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+		status = "disabled";
 	};
 
 	mmcif0: mmc at ee200000 {
#2 lore raw

PATCH 2/2 ARM: shmobile: silk: add I2C1 DT support

In reply to Sergei Shtylyov

Define the SILK board dependent part of the I2C1 device node.

---
 arch/arm/boot/dts/r8a7794-silk.dts |   13 +++++++++++++
 1 file changed, 13 insertions(+)
arch/arm/boot/dts/r8a7794-silk.dts +13 -0
Index: renesas/arch/arm/boot/dts/r8a7794-silk.dts
===================================================================
@@ -85,6 +85,11 @@
 		renesas,function = "intc";
 	};
 
+	i2c1_pins: i2c1 {
+		renesas,groups = "i2c1";
+		renesas,function = "i2c1";
+	};
+
 	mmcif0_pins: mmcif0 {
 		renesas,groups = "mmc_data8", "mmc_ctrl";
 		renesas,function = "mmc";
@@ -124,6 +129,14 @@
 	};
 };
 
+&i2c1 {
+	pinctrl-0 = <&i2c1_pins>;
+	pinctrl-names = "default";
+
+	status = "okay";
+	clock-frequency = <400000>;
+};
+
 &mmcif0 {
 	pinctrl-0 = <&mmcif0_pins>;
 	pinctrl-names = "default";
#3 lore raw

cover Add R8A7794/SILK I2C device tree support

In reply to Sergei Shtylyov
Quoted 6 lines · Sergei Shtylyov

Here's the set of 2 patches against Simon Horman's 'renesas.git' repo's
'renesas-devel-20150819-v4.2-rc7' tag. Here we add the I2C device tree support for the R8A7794/SILK board.

[1/2] ARM: shmobile: r8a7794: add I2C DT support
[2/2] ARM: shmobile: silk: add I2C1 DT support

Simon, actually the above patch is atop of my SILK SDHI1 patch but should
apply with offsets atop of your tag.

MBR, Sergei

#4 lore raw

cover Add R8A7794/SILK I2C device tree support

Quoted 11 lines · Sergei Shtylyov
Quoted 6 lines · Sergei Shtylyov

Here's the set of 2 patches against Simon Horman's 'renesas.git' repo's
'renesas-devel-20150819-v4.2-rc7' tag. Here we add the I2C device tree support for the R8A7794/SILK board.

[1/2] ARM: shmobile: r8a7794: add I2C DT support
[2/2] ARM: shmobile: silk: add I2C1 DT support

Simon, actually the above patch is atop of my SILK SDHI1 patch but should
apply with offsets atop of your tag.

Thanks for following up.

I have queued up this series for v4.4.