All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/4] r8a779a0: add RPC support
@ 2021-09-13  6:53 Wolfram Sang
  2021-09-13  6:53 ` [RFC PATCH 1/4] clk: renesas: cpg-lib: move RPC clock registration to the library Wolfram Sang
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Wolfram Sang @ 2021-09-13  6:53 UTC (permalink / raw)
  To: linux-renesas-soc; +Cc: Geert Uytterhoeven, Wolfram Sang

Here is a series with clk and DTS updates to enable the RPC unit on the
R-Car V3U SoC. Important: If you want to test it, please use this
branch because it contains a patch which avoids data corruption!

  git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/v3u/rpc

Because the data corruption fix is still in internal review, this
patchset is RFC only to gather comments. Also, there is a question left
to discuss in patch 1 and some comments to patch 4.


Duc Nguyen (1):
  arm64: dts: renesas: r8a779a0: Add RPC node

Wolfram Sang (3):
  clk: renesas: cpg-lib: move RPC clock registration to the library
  clk: renesas: r8a779a0: Add RPC support
  arm64: dts: renesas: falcon-cpu: add SPI flash via RPC

 .../boot/dts/renesas/r8a779a0-falcon-cpu.dtsi | 33 +++++++
 arch/arm64/boot/dts/renesas/r8a779a0.dtsi     | 17 ++++
 drivers/clk/renesas/r8a779a0-cpg-mssr.c       | 29 ++++++
 drivers/clk/renesas/rcar-cpg-lib.c            | 83 +++++++++++++++++
 drivers/clk/renesas/rcar-cpg-lib.h            |  7 ++
 drivers/clk/renesas/rcar-gen3-cpg.c           | 89 +------------------
 6 files changed, 171 insertions(+), 87 deletions(-)

-- 
2.30.2


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [RFC PATCH 1/4] clk: renesas: cpg-lib: move RPC clock registration to the library
  2021-09-13  6:53 [RFC PATCH 0/4] r8a779a0: add RPC support Wolfram Sang
@ 2021-09-13  6:53 ` Wolfram Sang
  2021-09-23  8:26   ` Geert Uytterhoeven
  2021-09-13  6:53 ` [RFC PATCH 2/4] clk: renesas: r8a779a0: Add RPC support Wolfram Sang
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 12+ messages in thread
From: Wolfram Sang @ 2021-09-13  6:53 UTC (permalink / raw)
  To: linux-renesas-soc; +Cc: Geert Uytterhoeven, Wolfram Sang

We want to reuse this code for V3U soon. Because its RPCCKCR register is
at a different offset, the moved functions do not use the base register
as an argument anymore but the RPCCKCR register itself. Otherwise it is
a plain code move. Verified that an Eagle board with R-Car V3M still
works.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---

These new library functions use CLK_SET_RATE_PARENT in
clk_register_composite() as flags. This is what the current upstream
code does. The V3U BSP, however, doesn't use this flag and passes 0 as
an argument. It doesn't matter much currently, because the RPC drivers
do not use any clk function calls. Yet, I think the flags provided
should be consistent, so I kept what was already upstream. D'accord?

 drivers/clk/renesas/rcar-cpg-lib.c  | 83 +++++++++++++++++++++++++++
 drivers/clk/renesas/rcar-cpg-lib.h  |  7 +++
 drivers/clk/renesas/rcar-gen3-cpg.c | 89 +----------------------------
 3 files changed, 92 insertions(+), 87 deletions(-)

diff --git a/drivers/clk/renesas/rcar-cpg-lib.c b/drivers/clk/renesas/rcar-cpg-lib.c
index 5678768ee1f2..e93f0011eb07 100644
--- a/drivers/clk/renesas/rcar-cpg-lib.c
+++ b/drivers/clk/renesas/rcar-cpg-lib.c
@@ -267,4 +267,87 @@ struct clk * __init cpg_sd_clk_register(const char *name,
 	return clk;
 }
 
+struct rpc_clock {
+	struct clk_divider div;
+	struct clk_gate gate;
+	/*
+	 * One notifier covers both RPC and RPCD2 clocks as they are both
+	 * controlled by the same RPCCKCR register...
+	 */
+	struct cpg_simple_notifier csn;
+};
+
+static const struct clk_div_table cpg_rpc_div_table[] = {
+	{ 1, 2 }, { 3, 4 }, { 5, 6 }, { 7, 8 }, { 0, 0 },
+};
+
+struct clk * __init cpg_rpc_clk_register(const char *name,
+	void __iomem *rpcckcr, const char *parent_name,
+	struct raw_notifier_head *notifiers)
+{
+	struct rpc_clock *rpc;
+	struct clk *clk;
+
+	rpc = kzalloc(sizeof(*rpc), GFP_KERNEL);
+	if (!rpc)
+		return ERR_PTR(-ENOMEM);
+
+	rpc->div.reg = rpcckcr;
+	rpc->div.width = 3;
+	rpc->div.table = cpg_rpc_div_table;
+	rpc->div.lock = &cpg_lock;
+
+	rpc->gate.reg = rpcckcr;
+	rpc->gate.bit_idx = 8;
+	rpc->gate.flags = CLK_GATE_SET_TO_DISABLE;
+	rpc->gate.lock = &cpg_lock;
+
+	rpc->csn.reg = rpcckcr;
+
+	clk = clk_register_composite(NULL, name, &parent_name, 1, NULL, NULL,
+				     &rpc->div.hw,  &clk_divider_ops,
+				     &rpc->gate.hw, &clk_gate_ops,
+				     CLK_SET_RATE_PARENT);
+	if (IS_ERR(clk)) {
+		kfree(rpc);
+		return clk;
+	}
+
+	cpg_simple_notifier_register(notifiers, &rpc->csn);
+	return clk;
+}
+
+struct rpcd2_clock {
+	struct clk_fixed_factor fixed;
+	struct clk_gate gate;
+};
+
+struct clk * __init cpg_rpcd2_clk_register(const char *name,
+					   void __iomem *rpcckcr,
+					   const char *parent_name)
+{
+	struct rpcd2_clock *rpcd2;
+	struct clk *clk;
+
+	rpcd2 = kzalloc(sizeof(*rpcd2), GFP_KERNEL);
+	if (!rpcd2)
+		return ERR_PTR(-ENOMEM);
+
+	rpcd2->fixed.mult = 1;
+	rpcd2->fixed.div = 2;
+
+	rpcd2->gate.reg = rpcckcr;
+	rpcd2->gate.bit_idx = 9;
+	rpcd2->gate.flags = CLK_GATE_SET_TO_DISABLE;
+	rpcd2->gate.lock = &cpg_lock;
+
+	clk = clk_register_composite(NULL, name, &parent_name, 1, NULL, NULL,
+				     &rpcd2->fixed.hw, &clk_fixed_factor_ops,
+				     &rpcd2->gate.hw, &clk_gate_ops,
+				     CLK_SET_RATE_PARENT);
+	if (IS_ERR(clk))
+		kfree(rpcd2);
+
+	return clk;
+}
 
diff --git a/drivers/clk/renesas/rcar-cpg-lib.h b/drivers/clk/renesas/rcar-cpg-lib.h
index d00c91b116ca..35c0217c2f8b 100644
--- a/drivers/clk/renesas/rcar-cpg-lib.h
+++ b/drivers/clk/renesas/rcar-cpg-lib.h
@@ -30,4 +30,11 @@ struct clk * __init cpg_sd_clk_register(const char *name,
 	void __iomem *base, unsigned int offset, const char *parent_name,
 	struct raw_notifier_head *notifiers, bool skip_first);
 
+struct clk * __init cpg_rpc_clk_register(const char *name,
+	void __iomem *rpcckcr, const char *parent_name,
+	struct raw_notifier_head *notifiers);
+
+struct clk * __init cpg_rpcd2_clk_register(const char *name,
+					   void __iomem *rpcckcr,
+					   const char *parent_name);
 #endif
diff --git a/drivers/clk/renesas/rcar-gen3-cpg.c b/drivers/clk/renesas/rcar-gen3-cpg.c
index 558191c99b48..741f6e74bbcf 100644
--- a/drivers/clk/renesas/rcar-gen3-cpg.c
+++ b/drivers/clk/renesas/rcar-gen3-cpg.c
@@ -301,95 +301,10 @@ static struct clk * __init cpg_z_clk_register(const char *name,
 	return clk;
 }
 
-struct rpc_clock {
-	struct clk_divider div;
-	struct clk_gate gate;
-	/*
-	 * One notifier covers both RPC and RPCD2 clocks as they are both
-	 * controlled by the same RPCCKCR register...
-	 */
-	struct cpg_simple_notifier csn;
-};
-
 static const struct clk_div_table cpg_rpcsrc_div_table[] = {
 	{ 2, 5 }, { 3, 6 }, { 0, 0 },
 };
 
-static const struct clk_div_table cpg_rpc_div_table[] = {
-	{ 1, 2 }, { 3, 4 }, { 5, 6 }, { 7, 8 }, { 0, 0 },
-};
-
-static struct clk * __init cpg_rpc_clk_register(const char *name,
-	void __iomem *base, const char *parent_name,
-	struct raw_notifier_head *notifiers)
-{
-	struct rpc_clock *rpc;
-	struct clk *clk;
-
-	rpc = kzalloc(sizeof(*rpc), GFP_KERNEL);
-	if (!rpc)
-		return ERR_PTR(-ENOMEM);
-
-	rpc->div.reg = base + CPG_RPCCKCR;
-	rpc->div.width = 3;
-	rpc->div.table = cpg_rpc_div_table;
-	rpc->div.lock = &cpg_lock;
-
-	rpc->gate.reg = base + CPG_RPCCKCR;
-	rpc->gate.bit_idx = 8;
-	rpc->gate.flags = CLK_GATE_SET_TO_DISABLE;
-	rpc->gate.lock = &cpg_lock;
-
-	rpc->csn.reg = base + CPG_RPCCKCR;
-
-	clk = clk_register_composite(NULL, name, &parent_name, 1, NULL, NULL,
-				     &rpc->div.hw,  &clk_divider_ops,
-				     &rpc->gate.hw, &clk_gate_ops,
-				     CLK_SET_RATE_PARENT);
-	if (IS_ERR(clk)) {
-		kfree(rpc);
-		return clk;
-	}
-
-	cpg_simple_notifier_register(notifiers, &rpc->csn);
-	return clk;
-}
-
-struct rpcd2_clock {
-	struct clk_fixed_factor fixed;
-	struct clk_gate gate;
-};
-
-static struct clk * __init cpg_rpcd2_clk_register(const char *name,
-						  void __iomem *base,
-						  const char *parent_name)
-{
-	struct rpcd2_clock *rpcd2;
-	struct clk *clk;
-
-	rpcd2 = kzalloc(sizeof(*rpcd2), GFP_KERNEL);
-	if (!rpcd2)
-		return ERR_PTR(-ENOMEM);
-
-	rpcd2->fixed.mult = 1;
-	rpcd2->fixed.div = 2;
-
-	rpcd2->gate.reg = base + CPG_RPCCKCR;
-	rpcd2->gate.bit_idx = 9;
-	rpcd2->gate.flags = CLK_GATE_SET_TO_DISABLE;
-	rpcd2->gate.lock = &cpg_lock;
-
-	clk = clk_register_composite(NULL, name, &parent_name, 1, NULL, NULL,
-				     &rpcd2->fixed.hw, &clk_fixed_factor_ops,
-				     &rpcd2->gate.hw, &clk_gate_ops,
-				     CLK_SET_RATE_PARENT);
-	if (IS_ERR(clk))
-		kfree(rpcd2);
-
-	return clk;
-}
-
-
 static const struct rcar_gen3_cpg_pll_config *cpg_pll_config __initdata;
 static unsigned int cpg_clk_extalr __initdata;
 static u32 cpg_mode __initdata;
@@ -600,11 +515,11 @@ struct clk * __init rcar_gen3_cpg_clk_register(struct device *dev,
 		break;
 
 	case CLK_TYPE_GEN3_RPC:
-		return cpg_rpc_clk_register(core->name, base,
+		return cpg_rpc_clk_register(core->name, base + CPG_RPCCKCR,
 					    __clk_get_name(parent), notifiers);
 
 	case CLK_TYPE_GEN3_RPCD2:
-		return cpg_rpcd2_clk_register(core->name, base,
+		return cpg_rpcd2_clk_register(core->name, base + CPG_RPCCKCR,
 					      __clk_get_name(parent));
 
 	default:
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [RFC PATCH 2/4] clk: renesas: r8a779a0: Add RPC support
  2021-09-13  6:53 [RFC PATCH 0/4] r8a779a0: add RPC support Wolfram Sang
  2021-09-13  6:53 ` [RFC PATCH 1/4] clk: renesas: cpg-lib: move RPC clock registration to the library Wolfram Sang
@ 2021-09-13  6:53 ` Wolfram Sang
  2021-09-23  8:37   ` Geert Uytterhoeven
  2021-09-13  6:53 ` [RFC PATCH 3/4] arm64: dts: renesas: r8a779a0: Add RPC node Wolfram Sang
  2021-09-13  6:53 ` [RFC PATCH 4/4] arm64: dts: renesas: falcon-cpu: add SPI flash via RPC Wolfram Sang
  3 siblings, 1 reply; 12+ messages in thread
From: Wolfram Sang @ 2021-09-13  6:53 UTC (permalink / raw)
  To: linux-renesas-soc; +Cc: Geert Uytterhoeven, Wolfram Sang

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/clk/renesas/r8a779a0-cpg-mssr.c | 29 +++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/drivers/clk/renesas/r8a779a0-cpg-mssr.c b/drivers/clk/renesas/r8a779a0-cpg-mssr.c
index acaf5a93f1d3..5d0d8b053bab 100644
--- a/drivers/clk/renesas/r8a779a0-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a779a0-cpg-mssr.c
@@ -36,6 +36,9 @@ enum rcar_r8a779a0_clk_types {
 	CLK_TYPE_R8A779A0_SD,
 	CLK_TYPE_R8A779A0_MDSEL,	/* Select parent/divider using mode pin */
 	CLK_TYPE_R8A779A0_OSC,	/* OSC EXTAL predivider and fixed divider */
+	CLK_TYPE_R8A779A0_RPCSRC,
+	CLK_TYPE_R8A779A0_RPC,
+	CLK_TYPE_R8A779A0_RPCD2,
 };
 
 struct rcar_r8a779a0_cpg_pll_config {
@@ -120,6 +123,10 @@ static const struct cpg_core_clk r8a779a0_core_clks[] __initconst = {
 	DEF_FIXED(".s3",		CLK_S3,		CLK_PLL1_DIV2,	4, 1),
 	DEF_FIXED(".sdsrc",		CLK_SDSRC,	CLK_PLL5_DIV4,	1, 1),
 	DEF_RATE(".oco",		CLK_OCO,	32768),
+	DEF_BASE(".rpcsrc",	 CLK_RPCSRC,	   CLK_TYPE_R8A779A0_RPCSRC, CLK_PLL5),
+	DEF_BASE("rpc",		 R8A779A0_CLK_RPC, CLK_TYPE_R8A779A0_RPC, CLK_RPCSRC),
+	DEF_BASE("rpcd2",	 R8A779A0_CLK_RPCD2, CLK_TYPE_R8A779A0_RPCD2,
+		 R8A779A0_CLK_RPC),
 
 	/* Core Clock Outputs */
 	DEF_FIXED("zx",		R8A779A0_CLK_ZX,	CLK_PLL20_DIV2,	2, 1),
@@ -190,6 +197,7 @@ static const struct mssr_mod_clk r8a779a0_mod_clks[] __initconst = {
 	DEF_MOD("msi3",		621,	R8A779A0_CLK_MSO),
 	DEF_MOD("msi4",		622,	R8A779A0_CLK_MSO),
 	DEF_MOD("msi5",		623,	R8A779A0_CLK_MSO),
+	DEF_MOD("rpc-if",	629,	R8A779A0_CLK_RPCD2),
 	DEF_MOD("scif0",	702,	R8A779A0_CLK_S1D8),
 	DEF_MOD("scif1",	703,	R8A779A0_CLK_S1D8),
 	DEF_MOD("scif3",	704,	R8A779A0_CLK_S1D8),
@@ -252,10 +260,16 @@ static const struct mssr_mod_clk r8a779a0_mod_clks[] __initconst = {
 	DEF_MOD("vspx3",	1031,	R8A779A0_CLK_S1D1),
 };
 
+static const struct clk_div_table cpg_rpcsrc_div_table[] = {
+	{ 0, 4 }, { 1, 6 }, { 2, 5 }, { 3, 6 }, { 0, 0 },
+};
+
 static const struct rcar_r8a779a0_cpg_pll_config *cpg_pll_config __initdata;
 static unsigned int cpg_clk_extalr __initdata;
 static u32 cpg_mode __initdata;
 
+#define CPG_RPCCKCR 0x874
+
 static struct clk * __init rcar_r8a779a0_cpg_clk_register(struct device *dev,
 	const struct cpg_core_clk *core, const struct cpg_mssr_info *info,
 	struct clk **clks, void __iomem *base,
@@ -319,6 +333,21 @@ static struct clk * __init rcar_r8a779a0_cpg_clk_register(struct device *dev,
 		div = cpg_pll_config->osc_prediv * core->div;
 		break;
 
+	case CLK_TYPE_R8A779A0_RPCSRC:
+		return clk_register_divider_table(NULL, core->name,
+						  __clk_get_name(parent), 0,
+						  base + CPG_RPCCKCR, 3, 2, 0,
+						  cpg_rpcsrc_div_table,
+						  &cpg_lock);
+
+	case CLK_TYPE_R8A779A0_RPC:
+		return cpg_rpc_clk_register(core->name, base + CPG_RPCCKCR,
+					    __clk_get_name(parent), notifiers);
+
+	case CLK_TYPE_R8A779A0_RPCD2:
+		return cpg_rpcd2_clk_register(core->name, base + CPG_RPCCKCR,
+					      __clk_get_name(parent));
+
 	default:
 		return ERR_PTR(-EINVAL);
 	}
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [RFC PATCH 3/4] arm64: dts: renesas: r8a779a0: Add RPC node
  2021-09-13  6:53 [RFC PATCH 0/4] r8a779a0: add RPC support Wolfram Sang
  2021-09-13  6:53 ` [RFC PATCH 1/4] clk: renesas: cpg-lib: move RPC clock registration to the library Wolfram Sang
  2021-09-13  6:53 ` [RFC PATCH 2/4] clk: renesas: r8a779a0: Add RPC support Wolfram Sang
@ 2021-09-13  6:53 ` Wolfram Sang
  2021-09-23  8:56   ` Geert Uytterhoeven
  2021-09-13  6:53 ` [RFC PATCH 4/4] arm64: dts: renesas: falcon-cpu: add SPI flash via RPC Wolfram Sang
  3 siblings, 1 reply; 12+ messages in thread
From: Wolfram Sang @ 2021-09-13  6:53 UTC (permalink / raw)
  To: linux-renesas-soc; +Cc: Geert Uytterhoeven, Duc Nguyen, Wolfram Sang

From: Duc Nguyen <duc.nguyen.ub@renesas.com>

Add device node for RPC on R8A779A0 SoC.

Signed-off-by: Duc Nguyen <duc.nguyen.ub@renesas.com>
[wsa: rebased]
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 arch/arm64/boot/dts/renesas/r8a779a0.dtsi | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a779a0.dtsi b/arch/arm64/boot/dts/renesas/r8a779a0.dtsi
index 78ca75f619f6..7fcb0aec68ba 100644
--- a/arch/arm64/boot/dts/renesas/r8a779a0.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a779a0.dtsi
@@ -1093,6 +1093,23 @@ mmc0: mmc@ee140000 {
 			status = "disabled";
 		};
 
+		rpc: spi@ee200000 {
+			compatible = "renesas,r8a779a0-rpc-if",
+				     "renesas,rcar-gen3-rpc-if";
+			reg = <0 0xee200000 0 0x200>,
+			      <0 0x08000000 0 0x04000000>,
+			      <0 0xee208000 0 0x100>;
+			reg-names = "regs", "dirmap", "wbuf";
+			interrupts = <GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 629>;
+			clock-names = "rpc";
+			power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>;
+			resets = <&cpg 629>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
 		gic: interrupt-controller@f1000000 {
 			compatible = "arm,gic-v3";
 			#interrupt-cells = <3>;
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [RFC PATCH 4/4] arm64: dts: renesas: falcon-cpu: add SPI flash via RPC
  2021-09-13  6:53 [RFC PATCH 0/4] r8a779a0: add RPC support Wolfram Sang
                   ` (2 preceding siblings ...)
  2021-09-13  6:53 ` [RFC PATCH 3/4] arm64: dts: renesas: r8a779a0: Add RPC node Wolfram Sang
@ 2021-09-13  6:53 ` Wolfram Sang
  2021-09-23  9:02   ` Geert Uytterhoeven
  2021-09-28  9:26   ` Geert Uytterhoeven
  3 siblings, 2 replies; 12+ messages in thread
From: Wolfram Sang @ 2021-09-13  6:53 UTC (permalink / raw)
  To: linux-renesas-soc; +Cc: Geert Uytterhoeven, Wolfram Sang

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---

Comments: The BSP used 40 MHz as the spi-max-frequency. But it is the
same SPI flash chip as on other R-Car Gen3 boards, so I took the max
value from there, 50MHz. It worked so far.

Probably the boot partition could be described more precisely and split
up into further partitions. Do we want that? So far, I kept what the BSP
is using.

 .../boot/dts/renesas/r8a779a0-falcon-cpu.dtsi | 33 +++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a779a0-falcon-cpu.dtsi b/arch/arm64/boot/dts/renesas/r8a779a0-falcon-cpu.dtsi
index a0a1a1da0d87..854bd7b94ce7 100644
--- a/arch/arm64/boot/dts/renesas/r8a779a0-falcon-cpu.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a779a0-falcon-cpu.dtsi
@@ -166,6 +166,11 @@ mmc_pins: mmc {
 		power-source = <1800>;
 	};
 
+	qspi0_pins: qspi0 {
+		groups = "qspi0_ctrl", "qspi0_data4";
+		function = "qspi0";
+	};
+
 	scif0_pins: scif0 {
 		groups = "scif0_data", "scif0_ctrl";
 		function = "scif0";
@@ -177,6 +182,34 @@ scif_clk_pins: scif_clk {
 	};
 };
 
+&rpc {
+	pinctrl-0 = <&qspi0_pins>;
+	pinctrl-names = "default";
+
+	status = "okay";
+
+	flash@0 {
+		compatible = "spansion,s25fs512s", "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <50000000>;
+		spi-rx-bus-width = <4>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			boot_partition@0 {
+				reg = <0x00000000 0xc40000>;
+				read-only;
+			};
+			user@00c40000 {
+				reg = <0x00c40000 0x33c0000>;
+			};
+		};
+	};
+};
+
 &rwdt {
 	timeout-sec = <60>;
 	status = "okay";
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [RFC PATCH 1/4] clk: renesas: cpg-lib: move RPC clock registration to the library
  2021-09-13  6:53 ` [RFC PATCH 1/4] clk: renesas: cpg-lib: move RPC clock registration to the library Wolfram Sang
@ 2021-09-23  8:26   ` Geert Uytterhoeven
  0 siblings, 0 replies; 12+ messages in thread
From: Geert Uytterhoeven @ 2021-09-23  8:26 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: Linux-Renesas

On Mon, Sep 13, 2021 at 8:53 AM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> We want to reuse this code for V3U soon. Because its RPCCKCR register is
> at a different offset, the moved functions do not use the base register
> as an argument anymore but the RPCCKCR register itself. Otherwise it is
> a plain code move. Verified that an Eagle board with R-Car V3M still
> works.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

> These new library functions use CLK_SET_RATE_PARENT in
> clk_register_composite() as flags. This is what the current upstream
> code does. The V3U BSP, however, doesn't use this flag and passes 0 as
> an argument. It doesn't matter much currently, because the RPC drivers
> do not use any clk function calls. Yet, I think the flags provided
> should be consistent, so I kept what was already upstream. D'accord?

Akkoord ;-)

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] 12+ messages in thread

* Re: [RFC PATCH 2/4] clk: renesas: r8a779a0: Add RPC support
  2021-09-13  6:53 ` [RFC PATCH 2/4] clk: renesas: r8a779a0: Add RPC support Wolfram Sang
@ 2021-09-23  8:37   ` Geert Uytterhoeven
  0 siblings, 0 replies; 12+ messages in thread
From: Geert Uytterhoeven @ 2021-09-23  8:37 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: Linux-Renesas

On Mon, Sep 13, 2021 at 8:53 AM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

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] 12+ messages in thread

* Re: [RFC PATCH 3/4] arm64: dts: renesas: r8a779a0: Add RPC node
  2021-09-13  6:53 ` [RFC PATCH 3/4] arm64: dts: renesas: r8a779a0: Add RPC node Wolfram Sang
@ 2021-09-23  8:56   ` Geert Uytterhoeven
  0 siblings, 0 replies; 12+ messages in thread
From: Geert Uytterhoeven @ 2021-09-23  8:56 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: Linux-Renesas, Duc Nguyen

On Mon, Sep 13, 2021 at 8:53 AM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> From: Duc Nguyen <duc.nguyen.ub@renesas.com>
>
> Add device node for RPC on R8A779A0 SoC.
>
> Signed-off-by: Duc Nguyen <duc.nguyen.ub@renesas.com>
> [wsa: rebased]
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

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] 12+ messages in thread

* Re: [RFC PATCH 4/4] arm64: dts: renesas: falcon-cpu: add SPI flash via RPC
  2021-09-13  6:53 ` [RFC PATCH 4/4] arm64: dts: renesas: falcon-cpu: add SPI flash via RPC Wolfram Sang
@ 2021-09-23  9:02   ` Geert Uytterhoeven
  2021-09-28  9:26   ` Geert Uytterhoeven
  1 sibling, 0 replies; 12+ messages in thread
From: Geert Uytterhoeven @ 2021-09-23  9:02 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: Linux-Renesas

On Mon, Sep 13, 2021 at 8:53 AM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

> Comments: The BSP used 40 MHz as the spi-max-frequency. But it is the
> same SPI flash chip as on other R-Car Gen3 boards, so I took the max
> value from there, 50MHz. It worked so far.

There could be a trace spec violation causing possible corruption at 50 MHz.
I think it would be best to verify this with Renesas.

> Probably the boot partition could be described more precisely and split
> up into further partitions. Do we want that? So far, I kept what the BSP
> is using.

It depends: what do you see on the board you're testing on?

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] 12+ messages in thread

* Re: [RFC PATCH 4/4] arm64: dts: renesas: falcon-cpu: add SPI flash via RPC
  2021-09-13  6:53 ` [RFC PATCH 4/4] arm64: dts: renesas: falcon-cpu: add SPI flash via RPC Wolfram Sang
  2021-09-23  9:02   ` Geert Uytterhoeven
@ 2021-09-28  9:26   ` Geert Uytterhoeven
  2021-09-28  9:39     ` Wolfram Sang
  1 sibling, 1 reply; 12+ messages in thread
From: Geert Uytterhoeven @ 2021-09-28  9:26 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: Linux-Renesas

Hi Wolfram,

On Mon, Sep 13, 2021 at 8:53 AM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

> --- a/arch/arm64/boot/dts/renesas/r8a779a0-falcon-cpu.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a779a0-falcon-cpu.dtsi

> @@ -177,6 +182,34 @@ scif_clk_pins: scif_clk {
>         };
>  };
>
> +&rpc {
> +       pinctrl-0 = <&qspi0_pins>;
> +       pinctrl-names = "default";
> +
> +       status = "okay";
> +
> +       flash@0 {
> +               compatible = "spansion,s25fs512s", "jedec,spi-nor";
> +               reg = <0>;
> +               spi-max-frequency = <50000000>;
> +               spi-rx-bus-width = <4>;
> +
> +               partitions {
> +                       compatible = "fixed-partitions";
> +                       #address-cells = <1>;
> +                       #size-cells = <1>;
> +
> +                       boot_partition@0 {
> +                               reg = <0x00000000 0xc40000>;
> +                               read-only;
> +                       };
> +                       user@00c40000 {

Warning (unit_address_format):
/soc/spi@ee200000/flash@0/partitions/user@00c40000: unit name should
not have leading 0s

> +                               reg = <0x00c40000 0x33c0000>;
> +                       };
> +               };
> +       };
> +};
> +
>  &rwdt {
>         timeout-sec = <60>;
>         status = "okay";
> --
> 2.30.2

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] 12+ messages in thread

* Re: [RFC PATCH 4/4] arm64: dts: renesas: falcon-cpu: add SPI flash via RPC
  2021-09-28  9:26   ` Geert Uytterhoeven
@ 2021-09-28  9:39     ` Wolfram Sang
  2021-09-28  9:45       ` Geert Uytterhoeven
  0 siblings, 1 reply; 12+ messages in thread
From: Wolfram Sang @ 2021-09-28  9:39 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Linux-Renesas

[-- Attachment #1: Type: text/plain, Size: 170 bytes --]


> Warning (unit_address_format):
> /soc/spi@ee200000/flash@0/partitions/user@00c40000: unit name should
> not have leading 0s

Oh, sorry! Shall I resend or send a fix?


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RFC PATCH 4/4] arm64: dts: renesas: falcon-cpu: add SPI flash via RPC
  2021-09-28  9:39     ` Wolfram Sang
@ 2021-09-28  9:45       ` Geert Uytterhoeven
  0 siblings, 0 replies; 12+ messages in thread
From: Geert Uytterhoeven @ 2021-09-28  9:45 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: Linux-Renesas

Hi Wolfram,

On Tue, Sep 28, 2021 at 11:39 AM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> > Warning (unit_address_format):
> > /soc/spi@ee200000/flash@0/partitions/user@00c40000: unit name should
> > not have leading 0s
>
> Oh, sorry! Shall I resend or send a fix?

As this patch is marked RFC, and still using 50 MHz, we probably want
a v2 somewhere in the future....

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] 12+ messages in thread

end of thread, other threads:[~2021-09-28  9:46 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-13  6:53 [RFC PATCH 0/4] r8a779a0: add RPC support Wolfram Sang
2021-09-13  6:53 ` [RFC PATCH 1/4] clk: renesas: cpg-lib: move RPC clock registration to the library Wolfram Sang
2021-09-23  8:26   ` Geert Uytterhoeven
2021-09-13  6:53 ` [RFC PATCH 2/4] clk: renesas: r8a779a0: Add RPC support Wolfram Sang
2021-09-23  8:37   ` Geert Uytterhoeven
2021-09-13  6:53 ` [RFC PATCH 3/4] arm64: dts: renesas: r8a779a0: Add RPC node Wolfram Sang
2021-09-23  8:56   ` Geert Uytterhoeven
2021-09-13  6:53 ` [RFC PATCH 4/4] arm64: dts: renesas: falcon-cpu: add SPI flash via RPC Wolfram Sang
2021-09-23  9:02   ` Geert Uytterhoeven
2021-09-28  9:26   ` Geert Uytterhoeven
2021-09-28  9:39     ` Wolfram Sang
2021-09-28  9:45       ` Geert Uytterhoeven

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.