All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Renesas R-Car Gen3: add support for MOST device
@ 2021-12-26  8:25 Nikita Yushchenko
  2021-12-26  8:25 ` [PATCH 1/3] staging: most: dim2: update renesas compatible string Nikita Yushchenko
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Nikita Yushchenko @ 2021-12-26  8:25 UTC (permalink / raw)
  To: Geert Uytterhoeven, Magnus Damm, Rob Herring, Greg Kroah-Hartman,
	Christian Gromm
  Cc: linux-renesas-soc, devicetree, linux-staging, linux-kernel,
	Nikita Yushchenko

This patch set applies misc fixes to the MOST dim2 driver, and adds MOST
device definition to dtsi files for R-Car Gen3 SoCs that have it.

Nikita Yushchenko (3):
  staging: most: dim2: update renesas compatible string
  staging: most: dim2: use consistent routine naming
  arm64: dts: renesas: add MOST device

 arch/arm64/boot/dts/renesas/r8a77951.dtsi | 13 +++++++++++
 arch/arm64/boot/dts/renesas/r8a77960.dtsi | 13 +++++++++++
 arch/arm64/boot/dts/renesas/r8a77961.dtsi | 13 +++++++++++
 arch/arm64/boot/dts/renesas/r8a77965.dtsi | 13 +++++++++++
 arch/arm64/boot/dts/renesas/r8a77990.dtsi | 13 +++++++++++
 arch/arm64/boot/dts/renesas/r8a77995.dtsi | 13 +++++++++++
 drivers/staging/most/dim2/dim2.c          | 28 +++++++++++------------
 7 files changed, 92 insertions(+), 14 deletions(-)

-- 
2.30.2


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

* [PATCH 1/3] staging: most: dim2: update renesas compatible string
  2021-12-26  8:25 [PATCH 0/3] Renesas R-Car Gen3: add support for MOST device Nikita Yushchenko
@ 2021-12-26  8:25 ` Nikita Yushchenko
  2022-01-10 15:58   ` Geert Uytterhoeven
  2021-12-26  8:25 ` [PATCH 2/3] staging: most: dim2: use consistent routine naming Nikita Yushchenko
  2021-12-26  8:25 ` [PATCH 3/3] arm64: dts: renesas: add MOST device Nikita Yushchenko
  2 siblings, 1 reply; 11+ messages in thread
From: Nikita Yushchenko @ 2021-12-26  8:25 UTC (permalink / raw)
  To: Geert Uytterhoeven, Magnus Damm, Rob Herring, Greg Kroah-Hartman,
	Christian Gromm
  Cc: linux-renesas-soc, devicetree, linux-staging, linux-kernel,
	Nikita Yushchenko

Use "renesas,rcar-gen3-mlp" instead of "rcar,medialb-dim2"
- the documented vendor prefix for Renesas is "renesas,"
- existing r-car devices use "rcar-genN-XXX" pattern.

There are currently no in-tree users to update.

Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
---
 drivers/staging/most/dim2/dim2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/most/dim2/dim2.c b/drivers/staging/most/dim2/dim2.c
index bd102329d8c8..044e4bdeeaf2 100644
--- a/drivers/staging/most/dim2/dim2.c
+++ b/drivers/staging/most/dim2/dim2.c
@@ -1086,7 +1086,7 @@ static const struct of_device_id dim2_of_match[] = {
 		.data = plat_data + RCAR_H2
 	},
 	{
-		.compatible = "rcar,medialb-dim2",
+		.compatible = "renesas,rcar-gen3-mlp",
 		.data = plat_data + RCAR_M3
 	},
 	{
-- 
2.30.2


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

* [PATCH 2/3] staging: most: dim2: use consistent routine naming
  2021-12-26  8:25 [PATCH 0/3] Renesas R-Car Gen3: add support for MOST device Nikita Yushchenko
  2021-12-26  8:25 ` [PATCH 1/3] staging: most: dim2: update renesas compatible string Nikita Yushchenko
@ 2021-12-26  8:25 ` Nikita Yushchenko
  2021-12-26  8:25 ` [PATCH 3/3] arm64: dts: renesas: add MOST device Nikita Yushchenko
  2 siblings, 0 replies; 11+ messages in thread
From: Nikita Yushchenko @ 2021-12-26  8:25 UTC (permalink / raw)
  To: Geert Uytterhoeven, Magnus Damm, Rob Herring, Greg Kroah-Hartman,
	Christian Gromm
  Cc: linux-renesas-soc, devicetree, linux-staging, linux-kernel,
	Nikita Yushchenko

Rename init routines and enum values to reflect that those are for
Renesas R-Car Gen2 and R-Car Gen3 SoCs.

Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
---
 drivers/staging/most/dim2/dim2.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/most/dim2/dim2.c b/drivers/staging/most/dim2/dim2.c
index 044e4bdeeaf2..29f8ce2a47f5 100644
--- a/drivers/staging/most/dim2/dim2.c
+++ b/drivers/staging/most/dim2/dim2.c
@@ -971,7 +971,7 @@ static void fsl_mx6_disable(struct platform_device *pdev)
 	clk_disable_unprepare(dev->clk);
 }
 
-static int rcar_h2_enable(struct platform_device *pdev)
+static int rcar_gen2_enable(struct platform_device *pdev)
 {
 	struct dim2_hdm *dev = platform_get_drvdata(pdev);
 	int ret;
@@ -1006,7 +1006,7 @@ static int rcar_h2_enable(struct platform_device *pdev)
 	return 0;
 }
 
-static void rcar_h2_disable(struct platform_device *pdev)
+static void rcar_gen2_disable(struct platform_device *pdev)
 {
 	struct dim2_hdm *dev = platform_get_drvdata(pdev);
 
@@ -1016,7 +1016,7 @@ static void rcar_h2_disable(struct platform_device *pdev)
 	writel(0x0, dev->io_base + 0x600);
 }
 
-static int rcar_m3_enable(struct platform_device *pdev)
+static int rcar_gen3_enable(struct platform_device *pdev)
 {
 	struct dim2_hdm *dev = platform_get_drvdata(pdev);
 	u32 enable_512fs = dev->clk_speed == CLK_512FS;
@@ -1046,7 +1046,7 @@ static int rcar_m3_enable(struct platform_device *pdev)
 	return 0;
 }
 
-static void rcar_m3_disable(struct platform_device *pdev)
+static void rcar_gen3_disable(struct platform_device *pdev)
 {
 	struct dim2_hdm *dev = platform_get_drvdata(pdev);
 
@@ -1058,20 +1058,20 @@ static void rcar_m3_disable(struct platform_device *pdev)
 
 /* ]] platform specific functions */
 
-enum dim2_platforms { FSL_MX6, RCAR_H2, RCAR_M3 };
+enum dim2_platforms { FSL_MX6, RCAR_GEN2, RCAR_GEN3 };
 
 static struct dim2_platform_data plat_data[] = {
 	[FSL_MX6] = {
 		.enable = fsl_mx6_enable,
 		.disable = fsl_mx6_disable,
 	},
-	[RCAR_H2] = {
-		.enable = rcar_h2_enable,
-		.disable = rcar_h2_disable,
+	[RCAR_GEN2] = {
+		.enable = rcar_gen2_enable,
+		.disable = rcar_gen2_disable,
 	},
-	[RCAR_M3] = {
-		.enable = rcar_m3_enable,
-		.disable = rcar_m3_disable,
+	[RCAR_GEN3] = {
+		.enable = rcar_gen3_enable,
+		.disable = rcar_gen3_disable,
 		.fcnt = 3,
 	},
 };
@@ -1083,11 +1083,11 @@ static const struct of_device_id dim2_of_match[] = {
 	},
 	{
 		.compatible = "renesas,mlp",
-		.data = plat_data + RCAR_H2
+		.data = plat_data + RCAR_GEN2
 	},
 	{
 		.compatible = "renesas,rcar-gen3-mlp",
-		.data = plat_data + RCAR_M3
+		.data = plat_data + RCAR_GEN3
 	},
 	{
 		.compatible = "xlnx,axi4-os62420_3pin-1.00.a",
-- 
2.30.2


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

* [PATCH 3/3] arm64: dts: renesas: add MOST device
  2021-12-26  8:25 [PATCH 0/3] Renesas R-Car Gen3: add support for MOST device Nikita Yushchenko
  2021-12-26  8:25 ` [PATCH 1/3] staging: most: dim2: update renesas compatible string Nikita Yushchenko
  2021-12-26  8:25 ` [PATCH 2/3] staging: most: dim2: use consistent routine naming Nikita Yushchenko
@ 2021-12-26  8:25 ` Nikita Yushchenko
  2021-12-26 15:23   ` kernel test robot
  2021-12-26 15:33   ` [PATCH 3/3 v2] " Nikita Yushchenko
  2 siblings, 2 replies; 11+ messages in thread
From: Nikita Yushchenko @ 2021-12-26  8:25 UTC (permalink / raw)
  To: Geert Uytterhoeven, Magnus Damm, Rob Herring, Greg Kroah-Hartman,
	Christian Gromm
  Cc: linux-renesas-soc, devicetree, linux-staging, linux-kernel,
	Nikita Yushchenko

This patch adds mlp device to dtsi files for R-Car Gen3 SoCs that have
it.

Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
---
 arch/arm64/boot/dts/renesas/r8a77951.dtsi | 13 +++++++++++++
 arch/arm64/boot/dts/renesas/r8a77960.dtsi | 13 +++++++++++++
 arch/arm64/boot/dts/renesas/r8a77961.dtsi | 13 +++++++++++++
 arch/arm64/boot/dts/renesas/r8a77965.dtsi | 13 +++++++++++++
 arch/arm64/boot/dts/renesas/r8a77990.dtsi | 13 +++++++++++++
 arch/arm64/boot/dts/renesas/r8a77995.dtsi | 13 +++++++++++++
 6 files changed, 78 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a77951.dtsi b/arch/arm64/boot/dts/renesas/r8a77951.dtsi
index 1768a3e6bb8d..179d860ab9c3 100644
--- a/arch/arm64/boot/dts/renesas/r8a77951.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77951.dtsi
@@ -2412,6 +2412,19 @@ ssi9: ssi-9 {
 			};
 		};
 
+		mlp: mlp@ec520000 {
+			compatible = "renesas,rcar-gen3-mlp";
+			reg = <0 0xec520000 0 0x800>;
+			interrupts = <GIC_SPI 384 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 385 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 386 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 387 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 388 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 802>;
+			power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
+			status = "disabled";
+		};
+
 		audma0: dma-controller@ec700000 {
 			compatible = "renesas,dmac-r8a7795",
 				     "renesas,rcar-dmac";
diff --git a/arch/arm64/boot/dts/renesas/r8a77960.dtsi b/arch/arm64/boot/dts/renesas/r8a77960.dtsi
index 2bd8169735d3..e4777bb6701e 100644
--- a/arch/arm64/boot/dts/renesas/r8a77960.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77960.dtsi
@@ -2284,6 +2284,19 @@ ssiu97: ssiu-51 {
 			};
 		};
 
+		mlp: mlp@ec520000 {
+			compatible = "renesas,rcar-gen3-mlp";
+			reg = <0 0xec520000 0 0x800>;
+			interrupts = <GIC_SPI 384 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 385 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 386 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 387 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 388 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 802>;
+			power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
+			status = "disabled";
+		};
+
 		audma0: dma-controller@ec700000 {
 			compatible = "renesas,dmac-r8a7796",
 				     "renesas,rcar-dmac";
diff --git a/arch/arm64/boot/dts/renesas/r8a77961.dtsi b/arch/arm64/boot/dts/renesas/r8a77961.dtsi
index a34d5b1d6431..f97d70a3be52 100644
--- a/arch/arm64/boot/dts/renesas/r8a77961.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77961.dtsi
@@ -2128,6 +2128,19 @@ ssiu97: ssiu-51 {
 			};
 		};
 
+		mlp: mlp@ec520000 {
+			compatible = "renesas,rcar-gen3-mlp";
+			reg = <0 0xec520000 0 0x800>;
+			interrupts = <GIC_SPI 384 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 385 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 386 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 387 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 388 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 802>;
+			power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
+			status = "disabled";
+		};
+
 		audma0: dma-controller@ec700000 {
 			compatible = "renesas,dmac-r8a77961",
 				     "renesas,rcar-dmac";
diff --git a/arch/arm64/boot/dts/renesas/r8a77965.dtsi b/arch/arm64/boot/dts/renesas/r8a77965.dtsi
index 08df75606430..fa8aa00b4b7d 100644
--- a/arch/arm64/boot/dts/renesas/r8a77965.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77965.dtsi
@@ -2147,6 +2147,19 @@ ssi9: ssi-9 {
 			};
 		};
 
+		mlp: mlp@ec520000 {
+			compatible = "renesas,rcar-gen3-mlp";
+			reg = <0 0xec520000 0 0x800>;
+			interrupts = <GIC_SPI 384 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 385 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 386 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 387 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 388 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 802>;
+			power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
+			status = "disabled";
+		};
+
 		audma0: dma-controller@ec700000 {
 			compatible = "renesas,dmac-r8a77965",
 				     "renesas,rcar-dmac";
diff --git a/arch/arm64/boot/dts/renesas/r8a77990.dtsi b/arch/arm64/boot/dts/renesas/r8a77990.dtsi
index 0ea300a8147d..e76c7b0d3d4c 100644
--- a/arch/arm64/boot/dts/renesas/r8a77990.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77990.dtsi
@@ -1682,6 +1682,19 @@ ssi9: ssi-9 {
 			};
 		};
 
+		mlp: mlp@ec520000 {
+			compatible = "renesas,rcar-gen3-mlp";
+			reg = <0 0xec520000 0 0x800>;
+			interrupts = <GIC_SPI 384 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 385 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 386 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 387 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 388 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 802>;
+			power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
+			status = "disabled";
+		};
+
 		audma0: dma-controller@ec700000 {
 			compatible = "renesas,dmac-r8a77990",
 				     "renesas,rcar-dmac";
diff --git a/arch/arm64/boot/dts/renesas/r8a77995.dtsi b/arch/arm64/boot/dts/renesas/r8a77995.dtsi
index 16ad5fc23a67..cd790b0a965a 100644
--- a/arch/arm64/boot/dts/renesas/r8a77995.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77995.dtsi
@@ -1132,6 +1132,19 @@ ssi4: ssi-4 {
 			};
 		};
 
+		mlp: mlp@ec520000 {
+			compatible = "renesas,rcar-gen3-mlp";
+			reg = <0 0xec520000 0 0x800>;
+			interrupts = <GIC_SPI 384 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 385 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 386 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 387 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 388 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 802>;
+			power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
+			status = "disabled";
+		};
+
 		audma0: dma-controller@ec700000 {
 			compatible = "renesas,dmac-r8a77995",
 				     "renesas,rcar-dmac";
-- 
2.30.2


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

* Re: [PATCH 3/3] arm64: dts: renesas: add MOST device
  2021-12-26  8:25 ` [PATCH 3/3] arm64: dts: renesas: add MOST device Nikita Yushchenko
@ 2021-12-26 15:23   ` kernel test robot
  2021-12-26 15:33   ` [PATCH 3/3 v2] " Nikita Yushchenko
  1 sibling, 0 replies; 11+ messages in thread
From: kernel test robot @ 2021-12-26 15:23 UTC (permalink / raw)
  To: kbuild-all

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

Hi Nikita,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on geert-renesas-devel/next]
[also build test ERROR on staging/staging-testing v5.16-rc6 next-20211224]
[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]

url:    https://github.com/0day-ci/linux/commits/Nikita-Yushchenko/Renesas-R-Car-Gen3-add-support-for-MOST-device/20211226-162625
base:   https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel.git next
config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/20211226/202112262357.i8gJq8md-lkp(a)intel.com/config)
compiler: aarch64-linux-gcc (GCC) 11.2.0
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
        # https://github.com/0day-ci/linux/commit/91875555e07eecf67b57d612186fb12a2508c719
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Nikita-Yushchenko/Renesas-R-Car-Gen3-add-support-for-MOST-device/20211226-162625
        git checkout 91875555e07eecf67b57d612186fb12a2508c719
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm64 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> Error: arch/arm64/boot/dts/renesas/r8a77960.dtsi:2296.27-28 syntax error
   FATAL ERROR: Unable to parse input tree
--
>> Error: arch/arm64/boot/dts/renesas/r8a77961.dtsi:2140.27-28 syntax error
   FATAL ERROR: Unable to parse input tree
--
>> Error: arch/arm64/boot/dts/renesas/r8a77965.dtsi:2159.27-28 syntax error
   FATAL ERROR: Unable to parse input tree
--
>> Error: arch/arm64/boot/dts/renesas/r8a77990.dtsi:1694.27-28 syntax error
   FATAL ERROR: Unable to parse input tree
--
>> Error: arch/arm64/boot/dts/renesas/r8a77995.dtsi:1144.27-28 syntax error
   FATAL ERROR: Unable to parse input tree

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

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

* [PATCH 3/3 v2] arm64: dts: renesas: add MOST device
  2021-12-26  8:25 ` [PATCH 3/3] arm64: dts: renesas: add MOST device Nikita Yushchenko
  2021-12-26 15:23   ` kernel test robot
@ 2021-12-26 15:33   ` Nikita Yushchenko
  2022-01-10 15:56     ` Geert Uytterhoeven
  1 sibling, 1 reply; 11+ messages in thread
From: Nikita Yushchenko @ 2021-12-26 15:33 UTC (permalink / raw)
  To: Geert Uytterhoeven, Magnus Damm, Rob Herring, Greg Kroah-Hartman,
	Christian Gromm
  Cc: linux-renesas-soc, devicetree, linux-staging, linux-kernel,
	Nikita Yushchenko

This patch adds mlp device to dtsi files for R-Car Gen3 SoCs that have
it.

Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
---
Change from v1:
- fix power domain ids so all dtbs build properly

 arch/arm64/boot/dts/renesas/r8a77951.dtsi | 13 +++++++++++++
 arch/arm64/boot/dts/renesas/r8a77960.dtsi | 13 +++++++++++++
 arch/arm64/boot/dts/renesas/r8a77961.dtsi | 13 +++++++++++++
 arch/arm64/boot/dts/renesas/r8a77965.dtsi | 13 +++++++++++++
 arch/arm64/boot/dts/renesas/r8a77990.dtsi | 13 +++++++++++++
 arch/arm64/boot/dts/renesas/r8a77995.dtsi | 13 +++++++++++++
 6 files changed, 78 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a77951.dtsi b/arch/arm64/boot/dts/renesas/r8a77951.dtsi
index 1768a3e6bb8d..179d860ab9c3 100644
--- a/arch/arm64/boot/dts/renesas/r8a77951.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77951.dtsi
@@ -2412,6 +2412,19 @@ ssi9: ssi-9 {
 			};
 		};
 
+		mlp: mlp@ec520000 {
+			compatible = "renesas,rcar-gen3-mlp";
+			reg = <0 0xec520000 0 0x800>;
+			interrupts = <GIC_SPI 384 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 385 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 386 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 387 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 388 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 802>;
+			power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
+			status = "disabled";
+		};
+
 		audma0: dma-controller@ec700000 {
 			compatible = "renesas,dmac-r8a7795",
 				     "renesas,rcar-dmac";
diff --git a/arch/arm64/boot/dts/renesas/r8a77960.dtsi b/arch/arm64/boot/dts/renesas/r8a77960.dtsi
index 2bd8169735d3..1e90e848d2c8 100644
--- a/arch/arm64/boot/dts/renesas/r8a77960.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77960.dtsi
@@ -2284,6 +2284,19 @@ ssiu97: ssiu-51 {
 			};
 		};
 
+		mlp: mlp@ec520000 {
+			compatible = "renesas,rcar-gen3-mlp";
+			reg = <0 0xec520000 0 0x800>;
+			interrupts = <GIC_SPI 384 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 385 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 386 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 387 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 388 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 802>;
+			power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
+			status = "disabled";
+		};
+
 		audma0: dma-controller@ec700000 {
 			compatible = "renesas,dmac-r8a7796",
 				     "renesas,rcar-dmac";
diff --git a/arch/arm64/boot/dts/renesas/r8a77961.dtsi b/arch/arm64/boot/dts/renesas/r8a77961.dtsi
index a34d5b1d6431..eb70b601191b 100644
--- a/arch/arm64/boot/dts/renesas/r8a77961.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77961.dtsi
@@ -2128,6 +2128,19 @@ ssiu97: ssiu-51 {
 			};
 		};
 
+		mlp: mlp@ec520000 {
+			compatible = "renesas,rcar-gen3-mlp";
+			reg = <0 0xec520000 0 0x800>;
+			interrupts = <GIC_SPI 384 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 385 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 386 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 387 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 388 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 802>;
+			power-domains = <&sysc R8A77961_PD_ALWAYS_ON>;
+			status = "disabled";
+		};
+
 		audma0: dma-controller@ec700000 {
 			compatible = "renesas,dmac-r8a77961",
 				     "renesas,rcar-dmac";
diff --git a/arch/arm64/boot/dts/renesas/r8a77965.dtsi b/arch/arm64/boot/dts/renesas/r8a77965.dtsi
index 08df75606430..293021f59818 100644
--- a/arch/arm64/boot/dts/renesas/r8a77965.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77965.dtsi
@@ -2147,6 +2147,19 @@ ssi9: ssi-9 {
 			};
 		};
 
+		mlp: mlp@ec520000 {
+			compatible = "renesas,rcar-gen3-mlp";
+			reg = <0 0xec520000 0 0x800>;
+			interrupts = <GIC_SPI 384 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 385 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 386 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 387 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 388 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 802>;
+			power-domains = <&sysc R8A77965_PD_ALWAYS_ON>;
+			status = "disabled";
+		};
+
 		audma0: dma-controller@ec700000 {
 			compatible = "renesas,dmac-r8a77965",
 				     "renesas,rcar-dmac";
diff --git a/arch/arm64/boot/dts/renesas/r8a77990.dtsi b/arch/arm64/boot/dts/renesas/r8a77990.dtsi
index 0ea300a8147d..232391fd0751 100644
--- a/arch/arm64/boot/dts/renesas/r8a77990.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77990.dtsi
@@ -1682,6 +1682,19 @@ ssi9: ssi-9 {
 			};
 		};
 
+		mlp: mlp@ec520000 {
+			compatible = "renesas,rcar-gen3-mlp";
+			reg = <0 0xec520000 0 0x800>;
+			interrupts = <GIC_SPI 384 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 385 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 386 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 387 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 388 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 802>;
+			power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+			status = "disabled";
+		};
+
 		audma0: dma-controller@ec700000 {
 			compatible = "renesas,dmac-r8a77990",
 				     "renesas,rcar-dmac";
diff --git a/arch/arm64/boot/dts/renesas/r8a77995.dtsi b/arch/arm64/boot/dts/renesas/r8a77995.dtsi
index 16ad5fc23a67..33d9ed431d9c 100644
--- a/arch/arm64/boot/dts/renesas/r8a77995.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77995.dtsi
@@ -1132,6 +1132,19 @@ ssi4: ssi-4 {
 			};
 		};
 
+		mlp: mlp@ec520000 {
+			compatible = "renesas,rcar-gen3-mlp";
+			reg = <0 0xec520000 0 0x800>;
+			interrupts = <GIC_SPI 384 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 385 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 386 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 387 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 388 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 802>;
+			power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+			status = "disabled";
+		};
+
 		audma0: dma-controller@ec700000 {
 			compatible = "renesas,dmac-r8a77995",
 				     "renesas,rcar-dmac";
-- 
2.30.2


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

* Re: [PATCH 3/3 v2] arm64: dts: renesas: add MOST device
  2021-12-26 15:33   ` [PATCH 3/3 v2] " Nikita Yushchenko
@ 2022-01-10 15:56     ` Geert Uytterhoeven
  2022-01-12  8:56       ` Nikita Yushchenko
  0 siblings, 1 reply; 11+ messages in thread
From: Geert Uytterhoeven @ 2022-01-10 15:56 UTC (permalink / raw)
  To: Nikita Yushchenko
  Cc: Magnus Damm, Rob Herring, Greg Kroah-Hartman, Christian Gromm,
	Linux-Renesas,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-staging, Linux Kernel Mailing List

Hi Nikita,

On Sun, Dec 26, 2021 at 4:34 PM Nikita Yushchenko
<nikita.yoush@cogentembedded.com> wrote:
> This patch adds mlp device to dtsi files for R-Car Gen3 SoCs that have
> it.
>
> Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
> ---
> Change from v1:
> - fix power domain ids so all dtbs build properly

Thanks for the update!

> --- a/arch/arm64/boot/dts/renesas/r8a77951.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a77951.dtsi
> @@ -2412,6 +2412,19 @@ ssi9: ssi-9 {
>                         };
>                 };
>
> +               mlp: mlp@ec520000 {
> +                       compatible = "renesas,rcar-gen3-mlp";

No SoC-specific compatible value?

> +                       reg = <0 0xec520000 0 0x800>;
> +                       interrupts = <GIC_SPI 384 IRQ_TYPE_LEVEL_HIGH>,
> +                               <GIC_SPI 385 IRQ_TYPE_LEVEL_HIGH>,
> +                               <GIC_SPI 386 IRQ_TYPE_LEVEL_HIGH>,
> +                               <GIC_SPI 387 IRQ_TYPE_LEVEL_HIGH>,
> +                               <GIC_SPI 388 IRQ_TYPE_LEVEL_HIGH>;

What is the purpose of the various interrupts?
Perhaps you need interrupt-names?
The driver seems to use only the first two, which is strange, as
the second and third interrupt handle different channels.

> +                       clocks = <&cpg CPG_MOD 802>;
> +                       power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;

Missing resets property?

> +                       status = "disabled";
> +               };
> +

The rest looks sane to me.  But without any DT binding documentation
for this hardware block, this is hard to validate, and not yet ready for
upstream integration.

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 1/3] staging: most: dim2: update renesas compatible string
  2021-12-26  8:25 ` [PATCH 1/3] staging: most: dim2: update renesas compatible string Nikita Yushchenko
@ 2022-01-10 15:58   ` Geert Uytterhoeven
  0 siblings, 0 replies; 11+ messages in thread
From: Geert Uytterhoeven @ 2022-01-10 15:58 UTC (permalink / raw)
  To: Nikita Yushchenko
  Cc: Magnus Damm, Rob Herring, Greg Kroah-Hartman, Christian Gromm,
	Linux-Renesas,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-staging, Linux Kernel Mailing List

Hi Nikita,

On Sun, Dec 26, 2021 at 9:25 AM Nikita Yushchenko
<nikita.yoush@cogentembedded.com> wrote:
> Use "renesas,rcar-gen3-mlp" instead of "rcar,medialb-dim2"
> - the documented vendor prefix for Renesas is "renesas,"
> - existing r-car devices use "rcar-genN-XXX" pattern.
>
> There are currently no in-tree users to update.
>
> Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>

Thanks for your patch!

> --- a/drivers/staging/most/dim2/dim2.c
> +++ b/drivers/staging/most/dim2/dim2.c
> @@ -1086,7 +1086,7 @@ static const struct of_device_id dim2_of_match[] = {
>                 .data = plat_data + RCAR_H2
>         },
>         {
> -               .compatible = "rcar,medialb-dim2",
> +               .compatible = "renesas,rcar-gen3-mlp",
>                 .data = plat_data + RCAR_M3
>         },

Looks sane, so
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

But there is no DT binding documentation covering this block :-(

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 3/3 v2] arm64: dts: renesas: add MOST device
  2022-01-10 15:56     ` Geert Uytterhoeven
@ 2022-01-12  8:56       ` Nikita Yushchenko
  2022-01-12 10:15         ` Geert Uytterhoeven
  2022-01-13  9:57         ` Christian.Gromm
  0 siblings, 2 replies; 11+ messages in thread
From: Nikita Yushchenko @ 2022-01-12  8:56 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Magnus Damm, Rob Herring, Greg Kroah-Hartman, Christian Gromm,
	Linux-Renesas,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-staging, Linux Kernel Mailing List

>> +                       reg = <0 0xec520000 0 0x800>;
>> +                       interrupts = <GIC_SPI 384 IRQ_TYPE_LEVEL_HIGH>,
>> +                               <GIC_SPI 385 IRQ_TYPE_LEVEL_HIGH>,
>> +                               <GIC_SPI 386 IRQ_TYPE_LEVEL_HIGH>,
>> +                               <GIC_SPI 387 IRQ_TYPE_LEVEL_HIGH>,
>> +                               <GIC_SPI 388 IRQ_TYPE_LEVEL_HIGH>;
> 
> What is the purpose of the various interrupts?
> Perhaps you need interrupt-names?
> The driver seems to use only the first two, which is strange, as
> the second and third interrupt handle different channels.

Maybe Christian Gromm (the original driver author) can comment here?

As far as I understand:
- interrupts are: mlb, ahb0, ahb1, ch0rx, ch1rx
- of those, the first 3 are from dim2 itself, and the last two are from renesas-specific logic around dim2
- in the interrupt assignment tables for gen3 SoCs, renesas documents all 5 interrupts, however in the 
mlb section, renesas mentions only mlb, ahb0 and ch0rx interrupts
- moreover, renesas explicitly denies access dim2 registers responsible for channels 32..63 - which 
renders ahb1 interrupt useless; and renesas does not document any registers related to "async rx 
response" on channels 32..63 - which renders chrx1 interrupt useless
- anyway, dim2 driver registers only 32 channels (for all use cases, not only for renesas), and thus 
uses only ahb0 interrupt
- dim2 driver does not implement renesas-specific processing logic and thus does not use ch0rx interrupt

I'm not sure how to proceed here.
Is it better to define only two interrupts (mlb, ahb0) in device trees?

Regarding 'interrupt-names' - dim2 driver currently uses platform_get_irq() and thus depends on numeric 
positions (mlb interrupt at index 0 and ahb0 interrupt at index 1). I'm not sure about current use cases 
of the driver other than with rcar-gen3, and if it is ok to use of_get_irq_byname() instead. And without 
using of_get_irq_byname(), interrupt-names looks somewhat useless.

> But without any DT binding documentation
> for this hardware block, this is hard to validate, and not yet ready for
> upstream integration.

Christian, are you going to provide DT binding documentation for dim2?

Nikita

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

* Re: [PATCH 3/3 v2] arm64: dts: renesas: add MOST device
  2022-01-12  8:56       ` Nikita Yushchenko
@ 2022-01-12 10:15         ` Geert Uytterhoeven
  2022-01-13  9:57         ` Christian.Gromm
  1 sibling, 0 replies; 11+ messages in thread
From: Geert Uytterhoeven @ 2022-01-12 10:15 UTC (permalink / raw)
  To: Nikita Yushchenko
  Cc: Magnus Damm, Rob Herring, Greg Kroah-Hartman, Christian Gromm,
	Linux-Renesas,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-staging, Linux Kernel Mailing List

Hi Nikita,

On Wed, Jan 12, 2022 at 9:56 AM Nikita Yushchenko
<nikita.yoush@cogentembedded.com> wrote:
> >> +                       reg = <0 0xec520000 0 0x800>;
> >> +                       interrupts = <GIC_SPI 384 IRQ_TYPE_LEVEL_HIGH>,
> >> +                               <GIC_SPI 385 IRQ_TYPE_LEVEL_HIGH>,
> >> +                               <GIC_SPI 386 IRQ_TYPE_LEVEL_HIGH>,
> >> +                               <GIC_SPI 387 IRQ_TYPE_LEVEL_HIGH>,
> >> +                               <GIC_SPI 388 IRQ_TYPE_LEVEL_HIGH>;
> >
> > What is the purpose of the various interrupts?
> > Perhaps you need interrupt-names?
> > The driver seems to use only the first two, which is strange, as
> > the second and third interrupt handle different channels.
>
> Maybe Christian Gromm (the original driver author) can comment here?
>
> As far as I understand:
> - interrupts are: mlb, ahb0, ahb1, ch0rx, ch1rx
> - of those, the first 3 are from dim2 itself, and the last two are from renesas-specific logic around dim2
> - in the interrupt assignment tables for gen3 SoCs, renesas documents all 5 interrupts, however in the
> mlb section, renesas mentions only mlb, ahb0 and ch0rx interrupts
> - moreover, renesas explicitly denies access dim2 registers responsible for channels 32..63 - which
> renders ahb1 interrupt useless; and renesas does not document any registers related to "async rx
> response" on channels 32..63 - which renders chrx1 interrupt useless
> - anyway, dim2 driver registers only 32 channels (for all use cases, not only for renesas), and thus
> uses only ahb0 interrupt
> - dim2 driver does not implement renesas-specific processing logic and thus does not use ch0rx interrupt
>
> I'm not sure how to proceed here.
> Is it better to define only two interrupts (mlb, ahb0) in device trees?
>
> Regarding 'interrupt-names' - dim2 driver currently uses platform_get_irq() and thus depends on numeric
> positions (mlb interrupt at index 0 and ahb0 interrupt at index 1). I'm not sure about current use cases
> of the driver other than with rcar-gen3, and if it is ok to use of_get_irq_byname() instead. And without
> using of_get_irq_byname(), interrupt-names looks somewhat useless.

As the driver is under staging, I think we can make any changes we want.

> > But without any DT binding documentation
> > for this hardware block, this is hard to validate, and not yet ready for
> > upstream integration.
>
> Christian, are you going to provide DT binding documentation for dim2?

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 3/3 v2] arm64: dts: renesas: add MOST device
  2022-01-12  8:56       ` Nikita Yushchenko
  2022-01-12 10:15         ` Geert Uytterhoeven
@ 2022-01-13  9:57         ` Christian.Gromm
  1 sibling, 0 replies; 11+ messages in thread
From: Christian.Gromm @ 2022-01-13  9:57 UTC (permalink / raw)
  To: nikita.yoush, geert
  Cc: linux-kernel, linux-staging, linux-renesas-soc, magnus.damm,
	robh+dt, devicetree, gregkh


On Wed, 2022-01-12 at 11:56 +0300, Nikita Yushchenko wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> > > +                       reg = <0 0xec520000 0 0x800>;
> > > +                       interrupts = <GIC_SPI 384 IRQ_TYPE_LEVEL_HIGH>,
> > > +                               <GIC_SPI 385 IRQ_TYPE_LEVEL_HIGH>,
> > > +                               <GIC_SPI 386 IRQ_TYPE_LEVEL_HIGH>,
> > > +                               <GIC_SPI 387 IRQ_TYPE_LEVEL_HIGH>,
> > > +                               <GIC_SPI 388 IRQ_TYPE_LEVEL_HIGH>;
> > 
> > What is the purpose of the various interrupts?
> > Perhaps you need interrupt-names?
> > The driver seems to use only the first two, which is strange, as
> > the second and third interrupt handle different channels.
> 
> Maybe Christian Gromm (the original driver author) can comment here?

I am not the author of this driver module and I don't have
detailed knowledge about it. I'll get in touch with Andre
Edich <andre.edich@microchip.com> so he can comment on this.

thanks,
Chris

> 
> As far as I understand:
> - interrupts are: mlb, ahb0, ahb1, ch0rx, ch1rx
> - of those, the first 3 are from dim2 itself, and the last two are from renesas-specific logic around dim2
> - in the interrupt assignment tables for gen3 SoCs, renesas documents all 5 interrupts, however in the
> mlb section, renesas mentions only mlb, ahb0 and ch0rx interrupts
> - moreover, renesas explicitly denies access dim2 registers responsible for channels 32..63 - which
> renders ahb1 interrupt useless; and renesas does not document any registers related to "async rx
> response" on channels 32..63 - which renders chrx1 interrupt useless
> - anyway, dim2 driver registers only 32 channels (for all use cases, not only for renesas), and thus
> uses only ahb0 interrupt
> - dim2 driver does not implement renesas-specific processing logic and thus does not use ch0rx interrupt
> 
> I'm not sure how to proceed here.
> Is it better to define only two interrupts (mlb, ahb0) in device trees?
> 
> Regarding 'interrupt-names' - dim2 driver currently uses platform_get_irq() and thus depends on numeric
> positions (mlb interrupt at index 0 and ahb0 interrupt at index 1). I'm not sure about current use cases
> of the driver other than with rcar-gen3, and if it is ok to use of_get_irq_byname() instead. And without
> using of_get_irq_byname(), interrupt-names looks somewhat useless.
> 
> > But without any DT binding documentation
> > for this hardware block, this is hard to validate, and not yet ready for
> > upstream integration.
> 
> Christian, are you going to provide DT binding documentation for dim2?
> 
> Nikita

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

end of thread, other threads:[~2022-01-13  9:58 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-26  8:25 [PATCH 0/3] Renesas R-Car Gen3: add support for MOST device Nikita Yushchenko
2021-12-26  8:25 ` [PATCH 1/3] staging: most: dim2: update renesas compatible string Nikita Yushchenko
2022-01-10 15:58   ` Geert Uytterhoeven
2021-12-26  8:25 ` [PATCH 2/3] staging: most: dim2: use consistent routine naming Nikita Yushchenko
2021-12-26  8:25 ` [PATCH 3/3] arm64: dts: renesas: add MOST device Nikita Yushchenko
2021-12-26 15:23   ` kernel test robot
2021-12-26 15:33   ` [PATCH 3/3 v2] " Nikita Yushchenko
2022-01-10 15:56     ` Geert Uytterhoeven
2022-01-12  8:56       ` Nikita Yushchenko
2022-01-12 10:15         ` Geert Uytterhoeven
2022-01-13  9:57         ` Christian.Gromm

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.