* [cip-dev] [PATCH 0/7] Add i2c/iic support for r8a7743
@ 2018-02-01 13:46 Biju Das
2018-02-01 13:46 ` [cip-dev] [PATCH 1/7] dt-bindings: i2c: Spelling s/propoerty/property/ Biju Das
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: Biju Das @ 2018-02-01 13:46 UTC (permalink / raw)
To: cip-dev
This patch series aims to add i2c/iic support for r8a7743 SoC.
Backported dt-bindings patch
Backported per-Generation fallbacks
It is tested against linux-v4.4.112-cip18
This patch depends on the below patch series
https://lists.cip-project.org/pipermail/cip-dev/2018-January/000820.html
Biju Das (4):
dt-bindings: i2c: Document r8a7743/5 support
ARM: dts: r8a7743: Add I2C DT support
dt-bindings: i2c: sh_mobile: Document r8a7743/5 support
ARM: dts: r8a7743: Add IIC cores to dtsi
Geert Uytterhoeven (1):
dt-bindings: i2c: Spelling s/propoerty/property/
Simon Horman (2):
i2c: rcar: Add per-Generation fallback bindings
i2c: sh_mobile: Add per-Generation fallback bindings
Documentation/devicetree/bindings/i2c/i2c-imx.txt | 2 +-
Documentation/devicetree/bindings/i2c/i2c-rcar.txt | 35 ++++--
.../devicetree/bindings/i2c/i2c-sh_mobile.txt | 20 ++-
Documentation/devicetree/bindings/i2c/i2c-sirf.txt | 2 +-
arch/arm/boot/dts/r8a7743.dtsi | 137 +++++++++++++++++++++
drivers/i2c/busses/i2c-rcar.c | 5 +-
drivers/i2c/busses/i2c-sh_mobile.c | 4 +-
7 files changed, 186 insertions(+), 19 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 9+ messages in thread
* [cip-dev] [PATCH 1/7] dt-bindings: i2c: Spelling s/propoerty/property/
2018-02-01 13:46 [cip-dev] [PATCH 0/7] Add i2c/iic support for r8a7743 Biju Das
@ 2018-02-01 13:46 ` Biju Das
2018-02-01 13:46 ` [cip-dev] [PATCH 2/7] i2c: rcar: Add per-Generation fallback bindings Biju Das
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Biju Das @ 2018-02-01 13:46 UTC (permalink / raw)
To: cip-dev
From: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
(cherry picked from commit ddf3dc82f10e15469b3967ae777d39745d3aab16)
Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Chris Paterson <chris.paterson2@renesas.com>
---
Documentation/devicetree/bindings/i2c/i2c-imx.txt | 2 +-
Documentation/devicetree/bindings/i2c/i2c-rcar.txt | 2 +-
Documentation/devicetree/bindings/i2c/i2c-sirf.txt | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/i2c/i2c-imx.txt b/Documentation/devicetree/bindings/i2c/i2c-imx.txt
index eab5836..b967544 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-imx.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-imx.txt
@@ -11,7 +11,7 @@ Required properties:
Optional properties:
- clock-frequency : Constains desired I2C/HS-I2C bus clock frequency in Hz.
- The absence of the propoerty indicates the default frequency 100 kHz.
+ The absence of the property indicates the default frequency 100 kHz.
- dmas: A list of two dma specifiers, one for each entry in dma-names.
- dma-names: should contain "tx" and "rx".
- scl-gpios: specify the gpio related to SCL pin
diff --git a/Documentation/devicetree/bindings/i2c/i2c-rcar.txt b/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
index ea406eb2..dea14f7 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
@@ -17,7 +17,7 @@ Required properties:
Optional properties:
- clock-frequency: desired I2C bus clock frequency in Hz. The absence of this
- propoerty indicates the default frequency 100 kHz.
+ property indicates the default frequency 100 kHz.
- clocks: clock specifier.
Examples :
diff --git a/Documentation/devicetree/bindings/i2c/i2c-sirf.txt b/Documentation/devicetree/bindings/i2c/i2c-sirf.txt
index 7baf9e1..2701eef 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-sirf.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-sirf.txt
@@ -8,7 +8,7 @@ Required properties :
Optional properties:
- clock-frequency : Constains desired I2C/HS-I2C bus clock frequency in Hz.
- The absence of the propoerty indicates the default frequency 100 kHz.
+ The absence of the property indicates the default frequency 100 kHz.
Examples :
--
2.7.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [cip-dev] [PATCH 2/7] i2c: rcar: Add per-Generation fallback bindings
2018-02-01 13:46 [cip-dev] [PATCH 0/7] Add i2c/iic support for r8a7743 Biju Das
2018-02-01 13:46 ` [cip-dev] [PATCH 1/7] dt-bindings: i2c: Spelling s/propoerty/property/ Biju Das
@ 2018-02-01 13:46 ` Biju Das
2018-02-01 13:46 ` [cip-dev] [PATCH 3/7] dt-bindings: i2c: Document r8a7743/5 support Biju Das
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Biju Das @ 2018-02-01 13:46 UTC (permalink / raw)
To: cip-dev
From: Simon Horman <horms+renesas@verge.net.au>
In the case of Renesas R-Car hardware we know that there are generations of
SoCs, e.g. Gen 2 and Gen 3. But beyond that it's not clear what the
relationship between IP blocks might be. For example, I believe that
r8a7790 is older than r8a7791 but that doesn't imply that the latter is a
descendant of the former or vice versa.
We can, however, by examining the documentation and behaviour of the
hardware at run-time observe that the current driver implementation appears
to be compatible with the IP blocks on SoCs within a given generation.
For the above reasons and convenience when enabling new SoCs a
per-generation fallback compatibility string scheme is being adopted for
drivers for Renesas SoCs.
Also:
* Deprecate renesas,i2c-rcar. It seems poorly named as it is only
compatible with R-Car Gen 1. It also appears unused in mainline.
* Add some text to describe per-SoC bindings
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
(cherry picked from commit ad4a8dc3fec6485b18654d1090ef8012fcfc37b8)
Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Chris Paterson <chris.paterson2@renesas.com>
Conflicts:
Documentation/devicetree/bindings/i2c/i2c-rcar.txt
drivers/i2c/busses/i2c-rcar.c
---
Documentation/devicetree/bindings/i2c/i2c-rcar.txt | 30 ++++++++++++++--------
drivers/i2c/busses/i2c-rcar.c | 5 +++-
2 files changed, 23 insertions(+), 12 deletions(-)
diff --git a/Documentation/devicetree/bindings/i2c/i2c-rcar.txt b/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
index dea14f7..e26f224 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
@@ -1,16 +1,24 @@
I2C for R-Car platforms
Required properties:
-- compatible: Must be one of
- "renesas,i2c-rcar"
- "renesas,i2c-r8a7778"
- "renesas,i2c-r8a7779"
- "renesas,i2c-r8a7790"
- "renesas,i2c-r8a7791"
- "renesas,i2c-r8a7792"
- "renesas,i2c-r8a7793"
- "renesas,i2c-r8a7794"
- "renesas,i2c-r8a7795"
+- compatible:
+ "renesas,i2c-r8a7778" if the device is a part of a R8A7778 SoC.
+ "renesas,i2c-r8a7779" if the device is a part of a R8A7779 SoC.
+ "renesas,i2c-r8a7790" if the device is a part of a R8A7790 SoC.
+ "renesas,i2c-r8a7791" if the device is a part of a R8A7791 SoC.
+ "renesas,i2c-r8a7792" if the device is a part of a R8A7792 SoC.
+ "renesas,i2c-r8a7793" if the device is a part of a R8A7793 SoC.
+ "renesas,i2c-r8a7794" if the device is a part of a R8A7794 SoC.
+ "renesas,i2c-r8a7795" if the device is a part of a R8A7795 SoC.
+ "renesas,rcar-gen1-i2c" for a generic R-Car Gen1 compatible device.
+ "renesas,rcar-gen2-i2c" for a generic R-Car Gen2 compatible device.
+ "renesas,rcar-gen3-i2c" for a generic R-Car Gen3 compatible device.
+ "renesas,i2c-rcar" (deprecated)
+
+ When compatible with the generic version, nodes must list the
+ SoC-specific version corresponding to the platform first followed
+ by the generic version.
+
- reg: physical base address of the controller and length of memory mapped
region.
- interrupts: interrupt specifier.
@@ -25,7 +33,7 @@ Examples :
i2c0: i2c at e6508000 {
#address-cells = <1>;
#size-cells = <0>;
- compatible = "renesas,i2c-r8a7791";
+ compatible = "renesas,i2c-r8a7791", "renesas,rcar-gen2-i2c";
reg = <0 0xe6508000 0 0x40>;
interrupts = <0 287 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp9_clks R8A7791_CLK_I2C0>;
diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
index 599c0d7..aa3730d 100644
--- a/drivers/i2c/busses/i2c-rcar.c
+++ b/drivers/i2c/busses/i2c-rcar.c
@@ -618,7 +618,6 @@ static const struct i2c_algorithm rcar_i2c_algo = {
};
static const struct of_device_id rcar_i2c_dt_ids[] = {
- { .compatible = "renesas,i2c-rcar", .data = (void *)I2C_RCAR_GEN1 },
{ .compatible = "renesas,i2c-r8a7778", .data = (void *)I2C_RCAR_GEN1 },
{ .compatible = "renesas,i2c-r8a7779", .data = (void *)I2C_RCAR_GEN1 },
{ .compatible = "renesas,i2c-r8a7790", .data = (void *)I2C_RCAR_GEN2 },
@@ -627,6 +626,10 @@ 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-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 },
+ { .compatible = "renesas,rcar-gen3-i2c", .data = (void *)I2C_RCAR_GEN3 },
{},
};
MODULE_DEVICE_TABLE(of, rcar_i2c_dt_ids);
--
2.7.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [cip-dev] [PATCH 3/7] dt-bindings: i2c: Document r8a7743/5 support
2018-02-01 13:46 [cip-dev] [PATCH 0/7] Add i2c/iic support for r8a7743 Biju Das
2018-02-01 13:46 ` [cip-dev] [PATCH 1/7] dt-bindings: i2c: Spelling s/propoerty/property/ Biju Das
2018-02-01 13:46 ` [cip-dev] [PATCH 2/7] i2c: rcar: Add per-Generation fallback bindings Biju Das
@ 2018-02-01 13:46 ` Biju Das
2018-02-01 13:46 ` [cip-dev] [PATCH 4/7] ARM: dts: r8a7743: Add I2C DT support Biju Das
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Biju Das @ 2018-02-01 13:46 UTC (permalink / raw)
To: cip-dev
Document i2c Device Tree support for RZ/G1[ME]
(also known as r8aA774[35]) SoCs. They are compatible with
R-Car Gen2 SoC family.
Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
(cherry picked from commit 4523656ff6cba7a217d44e5e8f726ccca2736473)
Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Chris Paterson <chris.paterson2@renesas.com>
---
Documentation/devicetree/bindings/i2c/i2c-rcar.txt | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/i2c/i2c-rcar.txt b/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
index e26f224..f6cb9e5 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
@@ -2,6 +2,8 @@ I2C for R-Car platforms
Required properties:
- compatible:
+ "renesas,i2c-r8a7743" if the device is a part of a R8A7743 SoC.
+ "renesas,i2c-r8a7745" if the device is a part of a R8A7745 SoC.
"renesas,i2c-r8a7778" if the device is a part of a R8A7778 SoC.
"renesas,i2c-r8a7779" if the device is a part of a R8A7779 SoC.
"renesas,i2c-r8a7790" if the device is a part of a R8A7790 SoC.
@@ -11,7 +13,8 @@ Required properties:
"renesas,i2c-r8a7794" if the device is a part of a R8A7794 SoC.
"renesas,i2c-r8a7795" if the device is a part of a R8A7795 SoC.
"renesas,rcar-gen1-i2c" for a generic R-Car Gen1 compatible device.
- "renesas,rcar-gen2-i2c" for a generic R-Car Gen2 compatible device.
+ "renesas,rcar-gen2-i2c" for a generic R-Car Gen2 or RZ/G1 compatible
+ device.
"renesas,rcar-gen3-i2c" for a generic R-Car Gen3 compatible device.
"renesas,i2c-rcar" (deprecated)
--
2.7.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [cip-dev] [PATCH 4/7] ARM: dts: r8a7743: Add I2C DT support
2018-02-01 13:46 [cip-dev] [PATCH 0/7] Add i2c/iic support for r8a7743 Biju Das
` (2 preceding siblings ...)
2018-02-01 13:46 ` [cip-dev] [PATCH 3/7] dt-bindings: i2c: Document r8a7743/5 support Biju Das
@ 2018-02-01 13:46 ` Biju Das
2018-02-01 13:46 ` [cip-dev] [PATCH 5/7] i2c: sh_mobile: Add per-Generation fallback bindings Biju Das
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Biju Das @ 2018-02-01 13:46 UTC (permalink / raw)
To: cip-dev
Add the I2C[0-5] devices to the r8a7743 device tree.
Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 2d33ced5500320f55fd2f63364f1212ba19453e8)
(modified clk property,removed reset property)
Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Chris Paterson <chris.paterson2@renesas.com>
---
arch/arm/boot/dts/r8a7743.dtsi | 85 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 85 insertions(+)
diff --git a/arch/arm/boot/dts/r8a7743.dtsi b/arch/arm/boot/dts/r8a7743.dtsi
index e755cb9..b7be573 100644
--- a/arch/arm/boot/dts/r8a7743.dtsi
+++ b/arch/arm/boot/dts/r8a7743.dtsi
@@ -18,6 +18,15 @@
#address-cells = <2>;
#size-cells = <2>;
+ aliases {
+ i2c0 = &i2c0;
+ i2c1 = &i2c1;
+ i2c2 = &i2c2;
+ i2c3 = &i2c3;
+ i2c4 = &i2c4;
+ i2c5 = &i2c5;
+ };
+
cpus {
#address-cells = <1>;
#size-cells = <0>;
@@ -297,6 +306,82 @@
dma-channels = <15>;
};
+ /* The memory map in the User's Manual maps the cores to bus
+ * numbers
+ */
+ i2c0: i2c at e6508000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "renesas,i2c-r8a7743",
+ "renesas,rcar-gen2-i2c";
+ reg = <0 0xe6508000 0 0x40>;
+ interrupts = <GIC_SPI 287 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&mstp9_clks R8A7743_CLK_I2C0>;
+ power-domains = <&cpg_clocks>;
+ status = "disabled";
+ };
+
+ i2c1: i2c at e6518000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "renesas,i2c-r8a7743",
+ "renesas,rcar-gen2-i2c";
+ reg = <0 0xe6518000 0 0x40>;
+ interrupts = <GIC_SPI 288 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&mstp9_clks R8A7743_CLK_I2C1>;
+ power-domains = <&cpg_clocks>;
+ status = "disabled";
+ };
+
+ i2c2: i2c at e6530000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "renesas,i2c-r8a7743",
+ "renesas,rcar-gen2-i2c";
+ reg = <0 0xe6530000 0 0x40>;
+ interrupts = <GIC_SPI 286 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&mstp9_clks R8A7743_CLK_I2C2>;
+ power-domains = <&cpg_clocks>;
+ status = "disabled";
+ };
+
+ i2c3: i2c at e6540000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "renesas,i2c-r8a7743",
+ "renesas,rcar-gen2-i2c";
+ reg = <0 0xe6540000 0 0x40>;
+ interrupts = <GIC_SPI 290 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&mstp9_clks R8A7743_CLK_I2C3>;
+ power-domains = <&cpg_clocks>;
+ status = "disabled";
+ };
+
+ i2c4: i2c at e6520000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "renesas,i2c-r8a7743",
+ "renesas,rcar-gen2-i2c";
+ reg = <0 0xe6520000 0 0x40>;
+ interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&mstp9_clks R8A7743_CLK_I2C4>;
+ power-domains = <&cpg_clocks>;
+ status = "disabled";
+ };
+
+ i2c5: i2c at e6528000 {
+ /* doesn't need pinmux */
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "renesas,i2c-r8a7743",
+ "renesas,rcar-gen2-i2c";
+ reg = <0 0xe6528000 0 0x40>;
+ interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&mstp9_clks R8A7743_CLK_I2C5>;
+ power-domains = <&cpg_clocks>;
+ status = "disabled";
+ };
+
scifa0: serial at e6c40000 {
compatible = "renesas,scifa-r8a7743", "renesas,scifa";
reg = <0 0xe6c40000 0 0x40>;
--
2.7.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [cip-dev] [PATCH 5/7] i2c: sh_mobile: Add per-Generation fallback bindings
2018-02-01 13:46 [cip-dev] [PATCH 0/7] Add i2c/iic support for r8a7743 Biju Das
` (3 preceding siblings ...)
2018-02-01 13:46 ` [cip-dev] [PATCH 4/7] ARM: dts: r8a7743: Add I2C DT support Biju Das
@ 2018-02-01 13:46 ` Biju Das
2018-02-01 13:46 ` [cip-dev] [PATCH 6/7] dt-bindings: i2c: sh_mobile: Document r8a7743/5 support Biju Das
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Biju Das @ 2018-02-01 13:46 UTC (permalink / raw)
To: cip-dev
From: Simon Horman <horms+renesas@verge.net.au>
Add per-Generation fallback bindings for R-Car SoCs.
This is in keeping with the compatibility string scheme is being adopted
for drivers for Renesas SoCs.
Also, improve readability by listing the rmobile fallback compatibility
string after the more-specific compatibility strings they provide a
fallback for.
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
(cherry picked from commit b880ccaf1742c28e91534ad7820c4405c04dabf9)
Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Chris Paterson <chris.paterson2@renesas.com>
---
Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt | 17 ++++++++++++++---
drivers/i2c/busses/i2c-sh_mobile.c | 4 +++-
2 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt b/Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt
index 214f94c..7716acc 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt
@@ -1,8 +1,7 @@
Device tree configuration for Renesas IIC (sh_mobile) driver
Required properties:
-- compatible : "renesas,iic-<soctype>". "renesas,rmobile-iic" as fallback
- Examples with soctypes are:
+- compatible :
- "renesas,iic-r8a73a4" (R-Mobile APE6)
- "renesas,iic-r8a7740" (R-Mobile A1)
- "renesas,iic-r8a7790" (R-Car H2)
@@ -12,6 +11,17 @@ Required properties:
- "renesas,iic-r8a7794" (R-Car E2)
- "renesas,iic-r8a7795" (R-Car H3)
- "renesas,iic-sh73a0" (SH-Mobile AG5)
+ - "renesas,rcar-gen2-iic" (generic R-Car Gen2 compatible device)
+ - "renesas,rcar-gen3-iic" (generic R-Car Gen3 compatible device)
+ - "renesas,rmobile-iic" (generic device)
+
+ When compatible with a generic R-Car version, nodes
+ must list the SoC-specific version corresponding to
+ the platform first followed by the generic R-Car
+ version.
+
+ renesas,rmobile-iic must always follow.
+
- reg : address start and address range size of device
- interrupts : interrupt of device
- clocks : clock for device
@@ -31,7 +41,8 @@ Pinctrl properties might be needed, too. See there.
Example:
iic0: i2c at e6500000 {
- compatible = "renesas,iic-r8a7790", "renesas,rmobile-iic";
+ compatible = "renesas,iic-r8a7790", "renesas,rcar-gen2-iic",
+ "renesas,rmobile-iic";
reg = <0 0xe6500000 0 0x425>;
interrupts = <0 174 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp3_clks R8A7790_CLK_IIC0>;
diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c
index 7d2bd3e..3eb5167 100644
--- a/drivers/i2c/busses/i2c-sh_mobile.c
+++ b/drivers/i2c/busses/i2c-sh_mobile.c
@@ -828,7 +828,6 @@ static const struct sh_mobile_dt_config r8a7740_dt_config = {
};
static const struct of_device_id sh_mobile_i2c_dt_ids[] = {
- { .compatible = "renesas,rmobile-iic", .data = &default_dt_config },
{ .compatible = "renesas,iic-r8a73a4", .data = &fast_clock_dt_config },
{ .compatible = "renesas,iic-r8a7740", .data = &r8a7740_dt_config },
{ .compatible = "renesas,iic-r8a7790", .data = &fast_clock_dt_config },
@@ -836,8 +835,11 @@ static const struct of_device_id sh_mobile_i2c_dt_ids[] = {
{ .compatible = "renesas,iic-r8a7792", .data = &fast_clock_dt_config },
{ .compatible = "renesas,iic-r8a7793", .data = &fast_clock_dt_config },
{ .compatible = "renesas,iic-r8a7794", .data = &fast_clock_dt_config },
+ { .compatible = "renesas,rcar-gen2-iic", .data = &fast_clock_dt_config },
{ .compatible = "renesas,iic-r8a7795", .data = &fast_clock_dt_config },
+ { .compatible = "renesas,rcar-gen3-iic", .data = &fast_clock_dt_config },
{ .compatible = "renesas,iic-sh73a0", .data = &fast_clock_dt_config },
+ { .compatible = "renesas,rmobile-iic", .data = &default_dt_config },
{},
};
MODULE_DEVICE_TABLE(of, sh_mobile_i2c_dt_ids);
--
2.7.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [cip-dev] [PATCH 6/7] dt-bindings: i2c: sh_mobile: Document r8a7743/5 support
2018-02-01 13:46 [cip-dev] [PATCH 0/7] Add i2c/iic support for r8a7743 Biju Das
` (4 preceding siblings ...)
2018-02-01 13:46 ` [cip-dev] [PATCH 5/7] i2c: sh_mobile: Add per-Generation fallback bindings Biju Das
@ 2018-02-01 13:46 ` Biju Das
2018-02-01 13:46 ` [cip-dev] [PATCH 7/7] ARM: dts: r8a7743: Add IIC cores to dtsi Biju Das
2018-02-08 21:51 ` [cip-dev] [PATCH 0/7] Add i2c/iic support for r8a7743 Ben Hutchings
7 siblings, 0 replies; 9+ messages in thread
From: Biju Das @ 2018-02-01 13:46 UTC (permalink / raw)
To: cip-dev
Document i2c Device Tree support for RZ/G1[ME]
(also known as r8a774[35]) SoCs. They are compatible with
R-Car Gen2 SoC family. No driver change is required as the
initialisation sequence is currently the same as for the
R-Car Gen2 fallback binding.
Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
(cherry picked from commit 6c448f04c83713c49be7baf341ed6a04d7493a15)
Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Chris Paterson <chris.paterson2@renesas.com>
---
Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt b/Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt
index 7716acc..4bfb89e 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt
@@ -4,6 +4,8 @@ Required properties:
- compatible :
- "renesas,iic-r8a73a4" (R-Mobile APE6)
- "renesas,iic-r8a7740" (R-Mobile A1)
+ - "renesas,iic-r8a7743" (RZ/G1M)
+ - "renesas,iic-r8a7745" (RZ/G1E)
- "renesas,iic-r8a7790" (R-Car H2)
- "renesas,iic-r8a7791" (R-Car M2-W)
- "renesas,iic-r8a7792" (R-Car V2H)
@@ -11,7 +13,8 @@ Required properties:
- "renesas,iic-r8a7794" (R-Car E2)
- "renesas,iic-r8a7795" (R-Car H3)
- "renesas,iic-sh73a0" (SH-Mobile AG5)
- - "renesas,rcar-gen2-iic" (generic R-Car Gen2 compatible device)
+ - "renesas,rcar-gen2-iic" (generic R-Car Gen2 or RZ/G1
+ compatible device)
- "renesas,rcar-gen3-iic" (generic R-Car Gen3 compatible device)
- "renesas,rmobile-iic" (generic device)
--
2.7.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [cip-dev] [PATCH 7/7] ARM: dts: r8a7743: Add IIC cores to dtsi
2018-02-01 13:46 [cip-dev] [PATCH 0/7] Add i2c/iic support for r8a7743 Biju Das
` (5 preceding siblings ...)
2018-02-01 13:46 ` [cip-dev] [PATCH 6/7] dt-bindings: i2c: sh_mobile: Document r8a7743/5 support Biju Das
@ 2018-02-01 13:46 ` Biju Das
2018-02-08 21:51 ` [cip-dev] [PATCH 0/7] Add i2c/iic support for r8a7743 Ben Hutchings
7 siblings, 0 replies; 9+ messages in thread
From: Biju Das @ 2018-02-01 13:46 UTC (permalink / raw)
To: cip-dev
Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Signed-off-by: Chris Paterson <chris.paterson2@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit f523405f2a22cc0c30701ea0cb3671dc0abbcda1)
(Modified clocks,power domain property and removed resets property)
Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Chris Paterson <chris.paterson2@renesas.com>
---
arch/arm/boot/dts/r8a7743.dtsi | 52 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)
diff --git a/arch/arm/boot/dts/r8a7743.dtsi b/arch/arm/boot/dts/r8a7743.dtsi
index b7be573..9255582 100644
--- a/arch/arm/boot/dts/r8a7743.dtsi
+++ b/arch/arm/boot/dts/r8a7743.dtsi
@@ -25,6 +25,9 @@
i2c3 = &i2c3;
i2c4 = &i2c4;
i2c5 = &i2c5;
+ i2c6 = &iic0;
+ i2c7 = &iic1;
+ i2c8 = &iic3;
};
cpus {
@@ -382,6 +385,55 @@
status = "disabled";
};
+ iic0: i2c at e6500000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "renesas,iic-r8a7743",
+ "renesas,rcar-gen2-iic",
+ "renesas,rmobile-iic";
+ reg = <0 0xe6500000 0 0x425>;
+ interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&mstp3_clks R8A7743_CLK_IIC0>;
+ dmas = <&dmac0 0x61>, <&dmac0 0x62>,
+ <&dmac1 0x61>, <&dmac1 0x62>;
+ dma-names = "tx", "rx", "tx", "rx";
+ power-domains = <&cpg_clocks>;
+ status = "disabled";
+ };
+
+ iic1: i2c at e6510000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "renesas,iic-r8a7743",
+ "renesas,rcar-gen2-iic",
+ "renesas,rmobile-iic";
+ reg = <0 0xe6510000 0 0x425>;
+ interrupts = <GIC_SPI 175 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&mstp3_clks R8A7743_CLK_IIC1>;
+ dmas = <&dmac0 0x65>, <&dmac0 0x66>,
+ <&dmac1 0x65>, <&dmac1 0x66>;
+ dma-names = "tx", "rx", "tx", "rx";
+ power-domains = <&cpg_clocks>;
+ status = "disabled";
+ };
+
+ iic3: i2c at e60b0000 {
+ /* doesn't need pinmux */
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "renesas,iic-r8a7743",
+ "renesas,rcar-gen2-iic",
+ "renesas,rmobile-iic";
+ reg = <0 0xe60b0000 0 0x425>;
+ interrupts = <GIC_SPI 173 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&mstp9_clks R8A7743_CLK_IICDVFS>;
+ dmas = <&dmac0 0x77>, <&dmac0 0x78>,
+ <&dmac1 0x77>, <&dmac1 0x78>;
+ dma-names = "tx", "rx", "tx", "rx";
+ power-domains = <&cpg_clocks>;
+ status = "disabled";
+ };
+
scifa0: serial at e6c40000 {
compatible = "renesas,scifa-r8a7743", "renesas,scifa";
reg = <0 0xe6c40000 0 0x40>;
--
2.7.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [cip-dev] [PATCH 0/7] Add i2c/iic support for r8a7743
2018-02-01 13:46 [cip-dev] [PATCH 0/7] Add i2c/iic support for r8a7743 Biju Das
` (6 preceding siblings ...)
2018-02-01 13:46 ` [cip-dev] [PATCH 7/7] ARM: dts: r8a7743: Add IIC cores to dtsi Biju Das
@ 2018-02-08 21:51 ` Ben Hutchings
7 siblings, 0 replies; 9+ messages in thread
From: Ben Hutchings @ 2018-02-08 21:51 UTC (permalink / raw)
To: cip-dev
On Thu, 2018-02-01 at 13:46 +0000, Biju Das wrote:
> This patch series aims to add i2c/iic support for r8a7743 SoC.
>
> Backported dt-bindings patch
> Backported per-Generation fallbacks
>
> It is tested against linux-v4.4.112-cip18
>
> This patch depends on the below patch series
> https://lists.cip-project.org/pipermail/cip-dev/2018-January/000820.html
All looks good to me.??I've applied and pushed these changes.
Ben.
> Biju Das (4):
> ? dt-bindings: i2c: Document r8a7743/5 support
> ? ARM: dts: r8a7743: Add I2C DT support
> ? dt-bindings: i2c: sh_mobile: Document r8a7743/5 support
> ? ARM: dts: r8a7743: Add IIC cores to dtsi
>
> Geert Uytterhoeven (1):
> ? dt-bindings: i2c: Spelling s/propoerty/property/
>
> Simon Horman (2):
> ? i2c: rcar: Add per-Generation fallback bindings
> ? i2c: sh_mobile: Add per-Generation fallback bindings
>
> ?Documentation/devicetree/bindings/i2c/i2c-imx.txt??|???2 +-
> ?Documentation/devicetree/bindings/i2c/i2c-rcar.txt |??35 ++++--
> ?.../devicetree/bindings/i2c/i2c-sh_mobile.txt??????|??20 ++-
> ?Documentation/devicetree/bindings/i2c/i2c-sirf.txt |???2 +-
> ?arch/arm/boot/dts/r8a7743.dtsi?????????????????????| 137 +++++++++++++++++++++
> ?drivers/i2c/busses/i2c-rcar.c??????????????????????|???5 +-
> ?drivers/i2c/busses/i2c-sh_mobile.c?????????????????|???4 +-
> ?7 files changed, 186 insertions(+), 19 deletions(-)
>
--
Ben Hutchings
Software Developer, Codethink Ltd.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2018-02-08 21:51 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-01 13:46 [cip-dev] [PATCH 0/7] Add i2c/iic support for r8a7743 Biju Das
2018-02-01 13:46 ` [cip-dev] [PATCH 1/7] dt-bindings: i2c: Spelling s/propoerty/property/ Biju Das
2018-02-01 13:46 ` [cip-dev] [PATCH 2/7] i2c: rcar: Add per-Generation fallback bindings Biju Das
2018-02-01 13:46 ` [cip-dev] [PATCH 3/7] dt-bindings: i2c: Document r8a7743/5 support Biju Das
2018-02-01 13:46 ` [cip-dev] [PATCH 4/7] ARM: dts: r8a7743: Add I2C DT support Biju Das
2018-02-01 13:46 ` [cip-dev] [PATCH 5/7] i2c: sh_mobile: Add per-Generation fallback bindings Biju Das
2018-02-01 13:46 ` [cip-dev] [PATCH 6/7] dt-bindings: i2c: sh_mobile: Document r8a7743/5 support Biju Das
2018-02-01 13:46 ` [cip-dev] [PATCH 7/7] ARM: dts: r8a7743: Add IIC cores to dtsi Biju Das
2018-02-08 21:51 ` [cip-dev] [PATCH 0/7] Add i2c/iic support for r8a7743 Ben Hutchings
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox