arm64: renesas: r8a7795: add I2C support
Subsystems (3)
v4 cover arm64: renesas: r8a7795: add I2C support
Hi,
these patches add i2c support to the r8a7795/Salvator-X.
These patches are an update of work by Kuninori Morimoto, broken out of a larger patchset posted by him.
The main change to the patches themselves since Morimoto-san's v3 posting is to update to new CPG/MSSR bindings via Geert Uytterhoeven.
Morimoto-san, I would be most grateful if you could look over this and repost if there are problems.
Base:
* "[PATCH v12 0/7] arm64: renesas: Add Renesas R8A7795 SoC support". This can be found in the topic/arm64-rcar-gen3-v12 branch of my renesas tree on kernel.org.
Availability:
* This patchset is available in the topic/r8a7795-i2c-v4 branch of my renesas tree on kernel.org
Kuninori Morimoto (3):
arm64: renesas: r8a7795: add I2C support
arm64: renesas: salvator-x: enable I2C
arm64: defconfig: Enable Renesas R-Car I2C Controller
arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 12 +++ arch/arm64/boot/dts/renesas/r8a7795.dtsi | 87 ++++++++++++++++++++++ arch/arm64/configs/defconfig | 2 + 3 files changed, 101 insertions(+)
Signature · 1 line
2.1.4
PATCH v4 1/3 arm64: renesas: r8a7795: add I2C support
From: Kuninori Morimoto <[email protected]>
---
v4 [Simon Horman]
* Update for new CPG/MSSR bindings via Geert Uytterhoeven
--- arch/arm64/boot/dts/renesas/r8a7795.dtsi | 87 ++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+)
arch/arm64/boot/dts/renesas/r8a7795.dtsi +87 -0
@@ -16,6 +16,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>;
@@ -168,5 +178,82 @@ power-domains = <&cpg>; status = "disabled"; }; + + i2c0: i2c at e6500000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "renesas,i2c-r8a7795"; + reg = <0 0xe6500000 0 0x40>; + interrupts = <GIC_SPI 287 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 931>; + power-domains = <&cpg>; + status = "disabled"; + }; + + i2c1: i2c at e6508000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "renesas,i2c-r8a7795"; + reg = <0 0xe6508000 0 0x40>; + interrupts = <GIC_SPI 288 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 930>; + power-domains = <&cpg>; + status = "disabled"; + }; + + i2c2: i2c at e6510000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "renesas,i2c-r8a7795"; + reg = <0 0xe6510000 0 0x40>; + interrupts = <GIC_SPI 286 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 929>; + power-domains = <&cpg>; + status = "disabled"; + }; + + i2c3: i2c at e66d0000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "renesas,i2c-r8a7795"; + reg = <0 0xe66d0000 0 0x40>; + interrupts = <GIC_SPI 290 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 928>; + power-domains = <&cpg>; + status = "disabled"; + }; + + i2c4: i2c at e66d8000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "renesas,i2c-r8a7795"; + reg = <0 0xe66d8000 0 0x40>; + interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 927>; + power-domains = <&cpg>; + status = "disabled"; + }; + + i2c5: i2c at e66e0000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "renesas,i2c-r8a7795"; + reg = <0 0xe66e0000 0 0x40>; + interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 919>; + power-domains = <&cpg>; + status = "disabled"; + }; + + i2c6: i2c at e66e8000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "renesas,i2c-r8a7795"; + reg = <0 0xe66e8000 0 0x40>; + interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 918>; + power-domains = <&cpg>; + status = "disabled"; + }; }; };
Signature · 1 line
2.1.4
PATCH v4 1/3 arm64: renesas: r8a7795: add I2C support
Quoted 5 lines · Simon Horman
From: Kuninori Morimoto <[email protected]>
Signed-off-by Kuninori Morimoto <[email protected]>[geert: aAdd clock-output-names properties]Signed-off-by Geert Uytterhoeven <[email protected]>
As the clock-output-names are no longer valid, please replace the above two lines by
Quoted 1 line
Signed-off-by Simon Horman <[email protected]>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at 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
PATCH v4 2/3 arm64: renesas: salvator-x: enable I2C
In reply to Simon HormanFrom: Kuninori Morimoto <[email protected]>
--- arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+)
arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts +12 -0
@@ -45,6 +45,11 @@ renesas,groups = "scif2_data_a"; renesas,function = "scif2"; }; + + i2c2_pins: i2c2 { + renesas,groups = "i2c2_a"; + renesas,function = "i2c2"; + }; }; &scif1 {
@@ -60,3 +65,10 @@ status = "okay"; }; + +&i2c2 { + pinctrl-0 = <&i2c2_pins>; + pinctrl-names = "default"; + + status = "okay"; +};
Signature · 1 line
2.1.4
PATCH v4 2/3 arm64: renesas: salvator-x: enable I2C
Quoted 4 lines · Simon Horman
From: Kuninori Morimoto <[email protected]>
Signed-off-by Kuninori Morimoto <[email protected]>Signed-off-by Simon Horman <[email protected]>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at 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
PATCH v4 3/3 arm64: defconfig: Enable Renesas R-Car I2C Controller
In reply to Simon HormanFrom: Kuninori Morimoto <[email protected]>
--- arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+)
arch/arm64/configs/defconfig +2 -0
@@ -121,6 +121,8 @@ CONFIG_SERIAL_XILINX_PS_UART=y CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y CONFIG_VIRTIO_CONSOLE=y # CONFIG_HW_RANDOM is not set +CONFIG_I2C=y +CONFIG_I2C_RCAR=y CONFIG_SPI=y CONFIG_SPI_PL022=y CONFIG_PINCTRL_MSM8916=y
Signature · 1 line
2.1.4
PATCH v4 3/3 arm64: defconfig: Enable Renesas R-Car I2C Controller
Quoted 4 lines · Simon Horman
From: Kuninori Morimoto <[email protected]>
Signed-off-by Kuninori Morimoto <[email protected]>Signed-off-by Simon Horman <[email protected]>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at 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
v4 cover arm64: renesas: r8a7795: add I2C support
In reply to Simon HormanQuoted 9 lines · Simon Horman
Hi,
these patches add i2c support to the r8a7795/Salvator-X.
These patches are an update of work by Kuninori Morimoto, broken out of a larger patchset posted by him.
The main change to the patches themselves since Morimoto-san's v3 posting is to update to new CPG/MSSR bindings via Geert Uytterhoeven.
I have queued up these patches for v4.5.