* [PATCH 0/3] Add i2c to Renesas RZ/V2M SoC and board
@ 2022-08-19 19:39 Phil Edworthy
2022-08-19 19:39 ` [PATCH 1/3] clk: renesas: r9a09g011: Add IIC clock and reset entries Phil Edworthy
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Phil Edworthy @ 2022-08-19 19:39 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Phil Edworthy, linux-renesas-soc, devicetree, linux-clk
Add support fpr the i2c clocks and resets, add the i2c nodes to the
RZ/V2M SoC and enable them for the EVK board.
Phil Edworthy (3):
clk: renesas: r9a09g011: Add IIC clock and reset entries
arm64: dts: renesas: r9a09g011: Add i2c nodes
arm64: dts: renesas: rzv2m evk: Enable i2c
.../boot/dts/renesas/r9a09g011-v2mevk2.dts | 27 ++++++++++++++++++
arch/arm64/boot/dts/renesas/r9a09g011.dtsi | 28 +++++++++++++++++++
drivers/clk/renesas/r9a09g011-cpg.c | 4 +++
3 files changed, 59 insertions(+)
--
2.34.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/3] clk: renesas: r9a09g011: Add IIC clock and reset entries
2022-08-19 19:39 [PATCH 0/3] Add i2c to Renesas RZ/V2M SoC and board Phil Edworthy
@ 2022-08-19 19:39 ` Phil Edworthy
2022-08-26 8:26 ` Geert Uytterhoeven
2022-08-19 19:39 ` [PATCH 2/3] arm64: dts: renesas: r9a09g011: Add i2c nodes Phil Edworthy
2022-08-19 19:39 ` [PATCH 3/3] arm64: dts: renesas: rzv2m evk: Enable i2c Phil Edworthy
2 siblings, 1 reply; 8+ messages in thread
From: Phil Edworthy @ 2022-08-19 19:39 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Phil Edworthy, linux-renesas-soc, linux-clk
Add IIC groups clock and reset entries to CPG driver.
IIC Group A consists of IIC0 and IIC1. IIC Group B consists of
IIC2 and IIC3. To confuse things, IIC_PCLK0 is used by group A
and IIC_PCLK1 is used by group B.
Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
---
drivers/clk/renesas/r9a09g011-cpg.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/clk/renesas/r9a09g011-cpg.c b/drivers/clk/renesas/r9a09g011-cpg.c
index b21915cf6648..fbef1b35d254 100644
--- a/drivers/clk/renesas/r9a09g011-cpg.c
+++ b/drivers/clk/renesas/r9a09g011-cpg.c
@@ -132,6 +132,8 @@ static const struct rzg2l_mod_clk r9a09g011_mod_clks[] __initconst = {
DEF_COUPLED("eth_chi", R9A09G011_ETH0_CLK_CHI, CLK_PLL2_100, 0x40c, 8),
DEF_MOD("eth_clk_gptp", R9A09G011_ETH0_GPTP_EXT, CLK_PLL2_100, 0x40c, 9),
DEF_MOD("syc_cnt_clk", R9A09G011_SYC_CNT_CLK, CLK_MAIN_24, 0x41c, 12),
+ DEF_MOD("iic_pclk0", R9A09G011_IIC_PCLK0, CLK_SEL_E, 0x420, 12),
+ DEF_MOD("iic_pclk1", R9A09G011_IIC_PCLK1, CLK_SEL_E, 0x424, 12),
DEF_MOD("wdt0_pclk", R9A09G011_WDT0_PCLK, CLK_SEL_E, 0x428, 12),
DEF_MOD("wdt0_clk", R9A09G011_WDT0_CLK, CLK_MAIN, 0x428, 13),
DEF_MOD("urt_pclk", R9A09G011_URT_PCLK, CLK_SEL_E, 0x438, 4),
@@ -143,6 +145,8 @@ static const struct rzg2l_reset r9a09g011_resets[] = {
DEF_RST(R9A09G011_PFC_PRESETN, 0x600, 2),
DEF_RST_MON(R9A09G011_ETH0_RST_HW_N, 0x608, 11, 11),
DEF_RST_MON(R9A09G011_SYC_RST_N, 0x610, 9, 13),
+ DEF_RST(R9A09G011_IIC_GPA_PRESETN, 0x614, 8),
+ DEF_RST(R9A09G011_IIC_GPB_PRESETN, 0x614, 9),
DEF_RST_MON(R9A09G011_WDT0_PRESETN, 0x614, 12, 19),
};
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/3] arm64: dts: renesas: r9a09g011: Add i2c nodes
2022-08-19 19:39 [PATCH 0/3] Add i2c to Renesas RZ/V2M SoC and board Phil Edworthy
2022-08-19 19:39 ` [PATCH 1/3] clk: renesas: r9a09g011: Add IIC clock and reset entries Phil Edworthy
@ 2022-08-19 19:39 ` Phil Edworthy
2022-08-26 8:33 ` Geert Uytterhoeven
2022-08-19 19:39 ` [PATCH 3/3] arm64: dts: renesas: rzv2m evk: Enable i2c Phil Edworthy
2 siblings, 1 reply; 8+ messages in thread
From: Phil Edworthy @ 2022-08-19 19:39 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Phil Edworthy, linux-renesas-soc, devicetree
Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
---
arch/arm64/boot/dts/renesas/r9a09g011.dtsi | 28 ++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r9a09g011.dtsi b/arch/arm64/boot/dts/renesas/r9a09g011.dtsi
index 44e1e288343c..fb1a97202c38 100644
--- a/arch/arm64/boot/dts/renesas/r9a09g011.dtsi
+++ b/arch/arm64/boot/dts/renesas/r9a09g011.dtsi
@@ -123,6 +123,34 @@ cpg: clock-controller@a3500000 {
#power-domain-cells = <0>;
};
+ i2c0: i2c@a4030000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "renesas,i2c-r9a09g011", "renesas,rzv2m-i2c";
+ reg = <0 0xa4030000 0 0x80>;
+ interrupts = <GIC_SPI 232 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 236 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "tia", "tis";
+ clocks = <&cpg CPG_MOD R9A09G011_IIC_PCLK0>;
+ resets = <&cpg R9A09G011_IIC_GPA_PRESETN>;
+ power-domains = <&cpg>;
+ status = "disabled";
+ };
+
+ i2c2: i2c@a4030100 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "renesas,i2c-r9a09g011", "renesas,rzv2m-i2c";
+ reg = <0 0xa4030100 0 0x80>;
+ interrupts = <GIC_SPI 234 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 238 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "tia", "tis";
+ clocks = <&cpg CPG_MOD R9A09G011_IIC_PCLK1>;
+ resets = <&cpg R9A09G011_IIC_GPB_PRESETN>;
+ power-domains = <&cpg>;
+ status = "disabled";
+ };
+
uart0: serial@a4040000 {
compatible = "renesas,r9a09g011-uart", "renesas,em-uart";
reg = <0 0xa4040000 0 0x80>;
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/3] arm64: dts: renesas: rzv2m evk: Enable i2c
2022-08-19 19:39 [PATCH 0/3] Add i2c to Renesas RZ/V2M SoC and board Phil Edworthy
2022-08-19 19:39 ` [PATCH 1/3] clk: renesas: r9a09g011: Add IIC clock and reset entries Phil Edworthy
2022-08-19 19:39 ` [PATCH 2/3] arm64: dts: renesas: r9a09g011: Add i2c nodes Phil Edworthy
@ 2022-08-19 19:39 ` Phil Edworthy
2022-08-20 9:37 ` kernel test robot
2022-08-26 8:42 ` Geert Uytterhoeven
2 siblings, 2 replies; 8+ messages in thread
From: Phil Edworthy @ 2022-08-19 19:39 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Phil Edworthy, linux-renesas-soc, devicetree
Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
---
.../boot/dts/renesas/r9a09g011-v2mevk2.dts | 27 +++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r9a09g011-v2mevk2.dts b/arch/arm64/boot/dts/renesas/r9a09g011-v2mevk2.dts
index c3a52fa0b16e..3666d71c7762 100644
--- a/arch/arm64/boot/dts/renesas/r9a09g011-v2mevk2.dts
+++ b/arch/arm64/boot/dts/renesas/r9a09g011-v2mevk2.dts
@@ -7,6 +7,7 @@
/dts-v1/;
#include "r9a09g011.dtsi"
+#include <dt-bindings/pinctrl/rzv2m-pinctrl.h>
/ {
model = "RZ/V2M Evaluation Kit 2.0";
@@ -53,6 +54,32 @@ &extal_clk {
clock-frequency = <48000000>;
};
+&i2c0 {
+ pinctrl-0 = <&i2c0_pins>;
+ pinctrl-names = "default";
+ clock-frequency = <400000>;
+ status = "okay";
+};
+
+&i2c2 {
+ pinctrl-0 = <&i2c2_pins>;
+ pinctrl-names = "default";
+ clock-frequency = <100000>;
+ status = "okay";
+};
+
&uart0 {
status = "okay";
};
+
+&pinctrl {
+ i2c0_pins: i2c0 {
+ pinmux = <RZV2M_PORT_PINMUX(5, 0, 2)>, /* SDA */
+ <RZV2M_PORT_PINMUX(5, 1, 2)>; /* SCL */
+ };
+
+ i2c2_pins: i2c2 {
+ pinmux = <RZV2M_PORT_PINMUX(3, 8, 2)>, /* SDA */
+ <RZV2M_PORT_PINMUX(3, 9, 2)>; /* SCL */
+ };
+};
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 3/3] arm64: dts: renesas: rzv2m evk: Enable i2c
2022-08-19 19:39 ` [PATCH 3/3] arm64: dts: renesas: rzv2m evk: Enable i2c Phil Edworthy
@ 2022-08-20 9:37 ` kernel test robot
2022-08-26 8:42 ` Geert Uytterhoeven
1 sibling, 0 replies; 8+ messages in thread
From: kernel test robot @ 2022-08-20 9:37 UTC (permalink / raw)
To: Phil Edworthy, Geert Uytterhoeven
Cc: llvm, kbuild-all, Phil Edworthy, linux-renesas-soc, devicetree
Hi Phil,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on geert-renesas-devel/next]
[also build test ERROR on geert-renesas-drivers/renesas-clk linus/master v6.0-rc1 next-20220819]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Phil-Edworthy/Add-i2c-to-Renesas-RZ-V2M-SoC-and-board/20220820-034159
base: https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel.git next
config: arm64-randconfig-r004-20220820 (https://download.01.org/0day-ci/archive/20220820/202208201751.koiuT1se-lkp@intel.com/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 0ac597f3cacf60479ffd36b03766fa7462dabd78)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://github.com/intel-lab-lkp/linux/commit/4b130a56e73ba827a556422037fe7e3690a36b00
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Phil-Edworthy/Add-i2c-to-Renesas-RZ-V2M-SoC-and-board/20220820-034159
git checkout 4b130a56e73ba827a556422037fe7e3690a36b00
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> Error: arch/arm64/boot/dts/renesas/r9a09g011-v2mevk2.dts:75.1-9 Label or path pinctrl not found
>> FATAL ERROR: Syntax error parsing input tree
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/3] clk: renesas: r9a09g011: Add IIC clock and reset entries
2022-08-19 19:39 ` [PATCH 1/3] clk: renesas: r9a09g011: Add IIC clock and reset entries Phil Edworthy
@ 2022-08-26 8:26 ` Geert Uytterhoeven
0 siblings, 0 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2022-08-26 8:26 UTC (permalink / raw)
To: Phil Edworthy; +Cc: Linux-Renesas, linux-clk
On Fri, Aug 19, 2022 at 9:40 PM Phil Edworthy <phil.edworthy@renesas.com> wrote:
> Add IIC groups clock and reset entries to CPG driver.
> IIC Group A consists of IIC0 and IIC1. IIC Group B consists of
> IIC2 and IIC3. To confuse things, IIC_PCLK0 is used by group A
> and IIC_PCLK1 is used by group B.
>
> Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
i.e. will queue in renesas-clk-for-v6.1.
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] 8+ messages in thread
* Re: [PATCH 2/3] arm64: dts: renesas: r9a09g011: Add i2c nodes
2022-08-19 19:39 ` [PATCH 2/3] arm64: dts: renesas: r9a09g011: Add i2c nodes Phil Edworthy
@ 2022-08-26 8:33 ` Geert Uytterhoeven
0 siblings, 0 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2022-08-26 8:33 UTC (permalink / raw)
To: Phil Edworthy
Cc: Linux-Renesas,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
Hi Phil,
On Fri, Aug 19, 2022 at 9:40 PM Phil Edworthy <phil.edworthy@renesas.com> wrote:
> Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
i.e. will queue in renesas-devel for v6.1 with
"Add device nodes for the I2C controllers that are not assigned to the ISP".
added.
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] 8+ messages in thread
* Re: [PATCH 3/3] arm64: dts: renesas: rzv2m evk: Enable i2c
2022-08-19 19:39 ` [PATCH 3/3] arm64: dts: renesas: rzv2m evk: Enable i2c Phil Edworthy
2022-08-20 9:37 ` kernel test robot
@ 2022-08-26 8:42 ` Geert Uytterhoeven
1 sibling, 0 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2022-08-26 8:42 UTC (permalink / raw)
To: Phil Edworthy
Cc: Linux-Renesas,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
Hi Phil,
Thanks for your patch!
On Fri, Aug 19, 2022 at 9:40 PM Phil Edworthy <phil.edworthy@renesas.com> wrote:
> Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
i.e. will queue in renesas-devel for v6.1...
> --- a/arch/arm64/boot/dts/renesas/r9a09g011-v2mevk2.dts
> +++ b/arch/arm64/boot/dts/renesas/r9a09g011-v2mevk2.dts
> +
> &uart0 {
> status = "okay";
> };
> +
> +&pinctrl {
... with this node moved up, to preserve sort order.
No need to resend.
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] 8+ messages in thread
end of thread, other threads:[~2022-08-26 8:43 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-19 19:39 [PATCH 0/3] Add i2c to Renesas RZ/V2M SoC and board Phil Edworthy
2022-08-19 19:39 ` [PATCH 1/3] clk: renesas: r9a09g011: Add IIC clock and reset entries Phil Edworthy
2022-08-26 8:26 ` Geert Uytterhoeven
2022-08-19 19:39 ` [PATCH 2/3] arm64: dts: renesas: r9a09g011: Add i2c nodes Phil Edworthy
2022-08-26 8:33 ` Geert Uytterhoeven
2022-08-19 19:39 ` [PATCH 3/3] arm64: dts: renesas: rzv2m evk: Enable i2c Phil Edworthy
2022-08-20 9:37 ` kernel test robot
2022-08-26 8:42 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).