* [PATCH V2 1/4] clk: renesas: r8a779a0: add clocks for I2C
2021-01-21 9:54 [PATCH V2 0/4] v3u: add support for I2C Wolfram Sang
@ 2021-01-21 9:54 ` Wolfram Sang
2021-01-22 10:08 ` Geert Uytterhoeven
2021-01-21 9:54 ` [PATCH V2 2/4] arm64: dts: renesas: Add I2C to R8A779A0 Wolfram Sang
` (2 subsequent siblings)
3 siblings, 1 reply; 11+ messages in thread
From: Wolfram Sang @ 2021-01-21 9:54 UTC (permalink / raw)
To: linux-renesas-soc; +Cc: linux-clk, Wolfram Sang
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
Changes since v1:
* use S1D4 as parent clock as described in the datasheet
drivers/clk/renesas/r8a779a0-cpg-mssr.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/clk/renesas/r8a779a0-cpg-mssr.c b/drivers/clk/renesas/r8a779a0-cpg-mssr.c
index ef45b7c10074..613f7b499cfc 100644
--- a/drivers/clk/renesas/r8a779a0-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a779a0-cpg-mssr.c
@@ -166,6 +166,13 @@ static const struct mssr_mod_clk r8a779a0_mod_clks[] __initconst = {
DEF_MOD("hscif1", 515, R8A779A0_CLK_S1D2),
DEF_MOD("hscif2", 516, R8A779A0_CLK_S1D2),
DEF_MOD("hscif3", 517, R8A779A0_CLK_S1D2),
+ DEF_MOD("i2c0", 518, R8A779A0_CLK_S1D4),
+ DEF_MOD("i2c1", 519, R8A779A0_CLK_S1D4),
+ DEF_MOD("i2c2", 520, R8A779A0_CLK_S1D4),
+ DEF_MOD("i2c3", 521, R8A779A0_CLK_S1D4),
+ DEF_MOD("i2c4", 522, R8A779A0_CLK_S1D4),
+ DEF_MOD("i2c5", 523, R8A779A0_CLK_S1D4),
+ DEF_MOD("i2c6", 524, R8A779A0_CLK_S1D4),
DEF_MOD("msi0", 618, R8A779A0_CLK_MSO),
DEF_MOD("msi1", 619, R8A779A0_CLK_MSO),
DEF_MOD("msi2", 620, R8A779A0_CLK_MSO),
--
2.29.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH V2 1/4] clk: renesas: r8a779a0: add clocks for I2C
2021-01-21 9:54 ` [PATCH V2 1/4] clk: renesas: r8a779a0: add clocks " Wolfram Sang
@ 2021-01-22 10:08 ` Geert Uytterhoeven
0 siblings, 0 replies; 11+ messages in thread
From: Geert Uytterhoeven @ 2021-01-22 10:08 UTC (permalink / raw)
To: Wolfram Sang; +Cc: Linux-Renesas, linux-clk
On Thu, Jan 21, 2021 at 10:56 AM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
>
> Changes since v1:
> * use S1D4 as parent clock as described in the datasheet
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
i.e. will queue in renesas-clk-for-v5.12.
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] 11+ messages in thread
* [PATCH V2 2/4] arm64: dts: renesas: Add I2C to R8A779A0
2021-01-21 9:54 [PATCH V2 0/4] v3u: add support for I2C Wolfram Sang
2021-01-21 9:54 ` [PATCH V2 1/4] clk: renesas: r8a779a0: add clocks " Wolfram Sang
@ 2021-01-21 9:54 ` Wolfram Sang
2021-01-22 10:11 ` Geert Uytterhoeven
2021-01-21 9:54 ` [PATCH V2 3/4] arm64: dts: renesas: Add I2C0,1,6 support for falcon board Wolfram Sang
2021-01-21 9:54 ` [PATCH V2 4/4] v3u: enable other I2C busses for testing Wolfram Sang
3 siblings, 1 reply; 11+ messages in thread
From: Wolfram Sang @ 2021-01-21 9:54 UTC (permalink / raw)
To: linux-renesas-soc
Cc: linux-clk, Koji Matsuoka, Geert Uytterhoeven, Wolfram Sang
From: Koji Matsuoka <koji.matsuoka.xm@renesas.com>
Add I2C devicetree description to V3U
Signed-off-by: Koji Matsuoka <koji.matsuoka.xm@renesas.com>
[wsa: rebased and double checked]
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
Changes since v1: none
arch/arm64/boot/dts/renesas/r8a779a0.dtsi | 122 ++++++++++++++++++++++
1 file changed, 122 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r8a779a0.dtsi b/arch/arm64/boot/dts/renesas/r8a779a0.dtsi
index 25c722302de6..1d953a892309 100644
--- a/arch/arm64/boot/dts/renesas/r8a779a0.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a779a0.dtsi
@@ -14,6 +14,16 @@ / {
#address-cells = <2>;
#size-cells = <2>;
+ aliases {
+ i2c0 = &i2c0;
+ i2c1 = &i2c1;
+ i2c2 = &i2c2;
+ i2c3 = &i2c3;
+ i2c4 = &i2c4;
+ i2c5 = &i2c5;
+ i2c6 = &i2c6;
+ };
+
cpus {
#address-cells = <1>;
#size-cells = <0>;
@@ -250,6 +260,118 @@ sysc: system-controller@e6180000 {
#power-domain-cells = <1>;
};
+ i2c0: i2c@e6500000 {
+ compatible = "renesas,i2c-r8a779a0",
+ "renesas,rcar-gen3-i2c";
+ reg = <0 0xe6500000 0 0x40>;
+ interrupts = <GIC_SPI 238 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD 518>;
+ power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>;
+ resets = <&cpg 518>;
+ dmas = <&dmac1 0x91>, <&dmac1 0x90>;
+ dma-names = "tx", "rx";
+ i2c-scl-internal-delay-ns = <110>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ i2c1: i2c@e6508000 {
+ compatible = "renesas,i2c-r8a779a0",
+ "renesas,rcar-gen3-i2c";
+ reg = <0 0xe6508000 0 0x40>;
+ interrupts = <GIC_SPI 239 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD 519>;
+ power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>;
+ resets = <&cpg 519>;
+ dmas = <&dmac1 0x93>, <&dmac1 0x92>;
+ dma-names = "tx", "rx";
+ i2c-scl-internal-delay-ns = <110>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ i2c2: i2c@e6510000 {
+ compatible = "renesas,i2c-r8a779a0",
+ "renesas,rcar-gen3-i2c";
+ reg = <0 0xe6510000 0 0x40>;
+ interrupts = <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD 520>;
+ power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>;
+ resets = <&cpg 520>;
+ dmas = <&dmac1 0x95>, <&dmac1 0x94>;
+ dma-names = "tx", "rx";
+ i2c-scl-internal-delay-ns = <110>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ i2c3: i2c@e66d0000 {
+ compatible = "renesas,i2c-r8a779a0",
+ "renesas,rcar-gen3-i2c";
+ reg = <0 0xe66d0000 0 0x40>;
+ interrupts = <GIC_SPI 241 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD 521>;
+ power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>;
+ resets = <&cpg 521>;
+ dmas = <&dmac1 0x97>, <&dmac1 0x96>;
+ dma-names = "tx", "rx";
+ i2c-scl-internal-delay-ns = <110>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ i2c4: i2c@e66d8000 {
+ compatible = "renesas,i2c-r8a779a0",
+ "renesas,rcar-gen3-i2c";
+ reg = <0 0xe66d8000 0 0x40>;
+ interrupts = <GIC_SPI 242 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD 522>;
+ power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>;
+ resets = <&cpg 522>;
+ dmas = <&dmac1 0x99>, <&dmac1 0x98>;
+ dma-names = "tx", "rx";
+ i2c-scl-internal-delay-ns = <110>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ i2c5: i2c@e66e0000 {
+ compatible = "renesas,i2c-r8a779a0",
+ "renesas,rcar-gen3-i2c";
+ reg = <0 0xe66e0000 0 0x40>;
+ interrupts = <GIC_SPI 243 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD 523>;
+ power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>;
+ resets = <&cpg 523>;
+ dmas = <&dmac1 0x9b>, <&dmac1 0x9a>;
+ dma-names = "tx", "rx";
+ i2c-scl-internal-delay-ns = <110>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ i2c6: i2c@e66e8000 {
+ compatible = "renesas,i2c-r8a779a0",
+ "renesas,rcar-gen3-i2c";
+ reg = <0 0xe66e8000 0 0x40>;
+ interrupts = <GIC_SPI 244 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD 524>;
+ power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>;
+ resets = <&cpg 524>;
+ dmas = <&dmac1 0x9d>, <&dmac1 0x9c>;
+ dma-names = "tx", "rx";
+ i2c-scl-internal-delay-ns = <110>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
scif0: serial@e6e60000 {
compatible = "renesas,scif-r8a779a0",
"renesas,rcar-gen3-scif", "renesas,scif";
--
2.29.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH V2 2/4] arm64: dts: renesas: Add I2C to R8A779A0
2021-01-21 9:54 ` [PATCH V2 2/4] arm64: dts: renesas: Add I2C to R8A779A0 Wolfram Sang
@ 2021-01-22 10:11 ` Geert Uytterhoeven
2021-01-22 10:46 ` Wolfram Sang
0 siblings, 1 reply; 11+ messages in thread
From: Geert Uytterhoeven @ 2021-01-22 10:11 UTC (permalink / raw)
To: Wolfram Sang; +Cc: Linux-Renesas, linux-clk, Koji Matsuoka, Geert Uytterhoeven
On Thu, Jan 21, 2021 at 10:54 AM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> From: Koji Matsuoka <koji.matsuoka.xm@renesas.com>
>
> Add I2C devicetree description to V3U
>
> Signed-off-by: Koji Matsuoka <koji.matsuoka.xm@renesas.com>
> [wsa: rebased and double checked]
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Will queue in renesas-devel for v5.12 as
"arm64: dts: renesas: r8a779a0: Add I2c nodes".
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] 11+ messages in thread
* Re: [PATCH V2 2/4] arm64: dts: renesas: Add I2C to R8A779A0
2021-01-22 10:11 ` Geert Uytterhoeven
@ 2021-01-22 10:46 ` Wolfram Sang
2021-01-22 10:51 ` Geert Uytterhoeven
0 siblings, 1 reply; 11+ messages in thread
From: Wolfram Sang @ 2021-01-22 10:46 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Linux-Renesas, linux-clk, Koji Matsuoka, Geert Uytterhoeven
[-- Attachment #1: Type: text/plain, Size: 104 bytes --]
> "arm64: dts: renesas: r8a779a0: Add I2c nodes".
"I2C" please. Sorry for not prefxing it correctly!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH V2 2/4] arm64: dts: renesas: Add I2C to R8A779A0
2021-01-22 10:46 ` Wolfram Sang
@ 2021-01-22 10:51 ` Geert Uytterhoeven
2021-01-22 11:00 ` Wolfram Sang
0 siblings, 1 reply; 11+ messages in thread
From: Geert Uytterhoeven @ 2021-01-22 10:51 UTC (permalink / raw)
To: Wolfram Sang; +Cc: Linux-Renesas, linux-clk, Koji Matsuoka, Geert Uytterhoeven
Hi Wolfram,
On Fri, Jan 22, 2021 at 11:46 AM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> > "arm64: dts: renesas: r8a779a0: Add I2c nodes".
>
> "I2C" please. Sorry for not prefxing it correctly!
Oh well... The less mistakes you make before submitting, the less
mistakes I can make while fixing them ;-)
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] 11+ messages in thread
* [PATCH V2 3/4] arm64: dts: renesas: Add I2C0,1,6 support for falcon board
2021-01-21 9:54 [PATCH V2 0/4] v3u: add support for I2C Wolfram Sang
2021-01-21 9:54 ` [PATCH V2 1/4] clk: renesas: r8a779a0: add clocks " Wolfram Sang
2021-01-21 9:54 ` [PATCH V2 2/4] arm64: dts: renesas: Add I2C to R8A779A0 Wolfram Sang
@ 2021-01-21 9:54 ` Wolfram Sang
2021-01-22 10:13 ` Geert Uytterhoeven
2021-01-21 9:54 ` [PATCH V2 4/4] v3u: enable other I2C busses for testing Wolfram Sang
3 siblings, 1 reply; 11+ messages in thread
From: Wolfram Sang @ 2021-01-21 9:54 UTC (permalink / raw)
To: linux-renesas-soc; +Cc: linux-clk, Wolfram Sang
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
Changes since v1:
* enabled busses 0,1,6 (the ones with devices attached)
* moved to falcon-cpu.dtsi
.../boot/dts/renesas/r8a779a0-falcon-cpu.dtsi | 41 +++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r8a779a0-falcon-cpu.dtsi b/arch/arm64/boot/dts/renesas/r8a779a0-falcon-cpu.dtsi
index 4ba269a4cec8..90aa1395a49f 100644
--- a/arch/arm64/boot/dts/renesas/r8a779a0-falcon-cpu.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a779a0-falcon-cpu.dtsi
@@ -41,6 +41,47 @@ &extalr_clk {
clock-frequency = <32768>;
};
+&i2c0 {
+ pinctrl-0 = <&i2c0_pins>;
+ pinctrl-names = "default";
+
+ status = "okay";
+ clock-frequency = <400000>;
+};
+
+&i2c1 {
+ pinctrl-0 = <&i2c1_pins>;
+ pinctrl-names = "default";
+
+ status = "okay";
+ clock-frequency = <400000>;
+};
+
+&i2c6 {
+ pinctrl-0 = <&i2c6_pins>;
+ pinctrl-names = "default";
+
+ status = "okay";
+ clock-frequency = <400000>;
+};
+
+&pfc {
+ i2c0_pins: i2c0 {
+ groups = "i2c0";
+ function = "i2c0";
+ };
+
+ i2c1_pins: i2c1 {
+ groups = "i2c1";
+ function = "i2c1";
+ };
+
+ i2c6_pins: i2c6 {
+ groups = "i2c6";
+ function = "i2c6";
+ };
+};
+
&scif0 {
status = "okay";
};
--
2.29.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH V2 3/4] arm64: dts: renesas: Add I2C0,1,6 support for falcon board
2021-01-21 9:54 ` [PATCH V2 3/4] arm64: dts: renesas: Add I2C0,1,6 support for falcon board Wolfram Sang
@ 2021-01-22 10:13 ` Geert Uytterhoeven
0 siblings, 0 replies; 11+ messages in thread
From: Geert Uytterhoeven @ 2021-01-22 10:13 UTC (permalink / raw)
To: Wolfram Sang; +Cc: Linux-Renesas, linux-clk
On Thu, Jan 21, 2021 at 10:56 AM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
>
> Changes since v1:
> * enabled busses 0,1,6 (the ones with devices attached)
> * moved to falcon-cpu.dtsi
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
i.e. will queue in renesas-devel for v5.12 as
"arm64: dts: renesas: falcon: Add I2C0,1,6 support".
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] 11+ messages in thread
* [PATCH V2 4/4] v3u: enable other I2C busses for testing
2021-01-21 9:54 [PATCH V2 0/4] v3u: add support for I2C Wolfram Sang
` (2 preceding siblings ...)
2021-01-21 9:54 ` [PATCH V2 3/4] arm64: dts: renesas: Add I2C0,1,6 support for falcon board Wolfram Sang
@ 2021-01-21 9:54 ` Wolfram Sang
3 siblings, 0 replies; 11+ messages in thread
From: Wolfram Sang @ 2021-01-21 9:54 UTC (permalink / raw)
To: linux-renesas-soc; +Cc: linux-clk, Wolfram Sang
Not for upstream!
Not-Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
Changes since v1:
* removed bus 6
* moved to falcon-cpu.dtsi
.../boot/dts/renesas/r8a779a0-falcon-cpu.dtsi | 52 +++++++++++++++++++
1 file changed, 52 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r8a779a0-falcon-cpu.dtsi b/arch/arm64/boot/dts/renesas/r8a779a0-falcon-cpu.dtsi
index 90aa1395a49f..6dcd4683b071 100644
--- a/arch/arm64/boot/dts/renesas/r8a779a0-falcon-cpu.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a779a0-falcon-cpu.dtsi
@@ -57,6 +57,38 @@ &i2c1 {
clock-frequency = <400000>;
};
+&i2c2 {
+ pinctrl-0 = <&i2c2_pins>;
+ pinctrl-names = "default";
+
+ status = "okay";
+ clock-frequency = <100000>;
+};
+
+&i2c3 {
+ pinctrl-0 = <&i2c3_pins>;
+ pinctrl-names = "default";
+
+ status = "okay";
+ clock-frequency = <100000>;
+};
+
+&i2c4 {
+ pinctrl-0 = <&i2c4_pins>;
+ pinctrl-names = "default";
+
+ status = "okay";
+ clock-frequency = <100000>;
+};
+
+&i2c5 {
+ pinctrl-0 = <&i2c5_pins>;
+ pinctrl-names = "default";
+
+ status = "okay";
+ clock-frequency = <100000>;
+};
+
&i2c6 {
pinctrl-0 = <&i2c6_pins>;
pinctrl-names = "default";
@@ -76,6 +108,26 @@ i2c1_pins: i2c1 {
function = "i2c1";
};
+ i2c2_pins: i2c2 {
+ groups = "i2c2";
+ function = "i2c2";
+ };
+
+ i2c3_pins: i2c3 {
+ groups = "i2c3";
+ function = "i2c3";
+ };
+
+ i2c4_pins: i2c4 {
+ groups = "i2c4";
+ function = "i2c4";
+ };
+
+ i2c5_pins: i2c5 {
+ groups = "i2c5";
+ function = "i2c5";
+ };
+
i2c6_pins: i2c6 {
groups = "i2c6";
function = "i2c6";
--
2.29.2
^ permalink raw reply related [flat|nested] 11+ messages in thread