summaryrefslogtreecommitdiffstats
path: root/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0018-arm64-renesas-r8a7797-Add-Renesas-R8A7797-SoC-suppor.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0018-arm64-renesas-r8a7797-Add-Renesas-R8A7797-SoC-suppor.patch')
-rw-r--r--meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0018-arm64-renesas-r8a7797-Add-Renesas-R8A7797-SoC-suppor.patch58
1 files changed, 36 insertions, 22 deletions
diff --git a/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0018-arm64-renesas-r8a7797-Add-Renesas-R8A7797-SoC-suppor.patch b/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0018-arm64-renesas-r8a7797-Add-Renesas-R8A7797-SoC-suppor.patch
index ffe7684..42b8f23 100644
--- a/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0018-arm64-renesas-r8a7797-Add-Renesas-R8A7797-SoC-suppor.patch
+++ b/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0018-arm64-renesas-r8a7797-Add-Renesas-R8A7797-SoC-suppor.patch
@@ -7,11 +7,11 @@ This adds Renesas R8A7797 SoC support
Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
---
- arch/arm64/Kconfig.platforms | 6 +
- arch/arm64/boot/dts/renesas/r8a7797.dtsi | 1156 +++++++++++
+ arch/arm64/Kconfig.platforms | 8 +
+ arch/arm64/boot/dts/renesas/r8a7797.dtsi | 1168 +++++++++++
drivers/clk/renesas/Kconfig | 1 +
drivers/clk/renesas/Makefile | 1 +
- drivers/clk/renesas/r8a7797-cpg-mssr.c | 231 +++
+ drivers/clk/renesas/r8a7797-cpg-mssr.c | 232 +++
drivers/clk/renesas/rcar-gen3-cpg.c | 41 +-
drivers/clk/renesas/rcar-gen3-cpg.h | 6 +
drivers/clk/renesas/renesas-cpg-mssr.c | 6 +
@@ -47,7 +47,7 @@ Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
drivers/thermal/rcar_gen3_thermal.c | 29 +
include/dt-bindings/clock/r8a7797-cpg-mssr.h | 48 +
include/dt-bindings/power/r8a7797-sysc.h | 32 +
- 40 files changed, 4486 insertions(+), 29 deletions(-)
+ 40 files changed, 4501 insertions(+), 29 deletions(-)
create mode 100644 arch/arm64/boot/dts/renesas/r8a7797.dtsi
create mode 100644 drivers/clk/renesas/r8a7797-cpg-mssr.c
create mode 100644 drivers/pinctrl/sh-pfc/pfc-r8a7797.c
@@ -56,15 +56,17 @@ Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
create mode 100644 include/dt-bindings/power/r8a7797-sysc.h
diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
-index ebe0a37..d3b6771 100644
+index ebe0a37..9cebaad 100644
--- a/arch/arm64/Kconfig.platforms
+++ b/arch/arm64/Kconfig.platforms
-@@ -166,6 +166,12 @@ config ARCH_R8A77965
+@@ -166,6 +166,14 @@ config ARCH_R8A77965
help
This enables support for the Renesas R-Car M3N SoC.
+config ARCH_R8A7797
+ bool "Renesas R-Car V3M SoC Platform"
++ select SYS_SUPPORTS_SH_TMU
++ select SYS_SUPPORTS_SH_CMT
+ depends on ARCH_RENESAS
+ help
+ This enables support for the Renesas R-Car V3M SoC.
@@ -74,10 +76,10 @@ index ebe0a37..d3b6771 100644
help
diff --git a/arch/arm64/boot/dts/renesas/r8a7797.dtsi b/arch/arm64/boot/dts/renesas/r8a7797.dtsi
new file mode 100644
-index 0000000..0dd374f
+index 0000000..faefe8a
--- /dev/null
+++ b/arch/arm64/boot/dts/renesas/r8a7797.dtsi
-@@ -0,0 +1,1156 @@
+@@ -0,0 +1,1167 @@
+/*
+ * Device Tree Source for the r8a7797 SoC
+ *
@@ -113,6 +115,7 @@ index 0000000..0dd374f
+ vin2 = &vin2;
+ vin3 = &vin3;
+ tsc0 = &tsc1;
++ isp0 = &isp0;
+ };
+
+ psci {
@@ -577,9 +580,9 @@ index 0000000..0dd374f
+ };
+ };
+
-+ cmt0: timer@ffca0000 {
++ cmt0: timer@e60f0000 {
+ compatible = "renesas,cmt-48-r8a7797", "renesas,cmt-48-gen2";
-+ reg = <0 0xffca0000 0 0x1004>;
++ reg = <0 0xe60f0000 0 0x1004>;
+ interrupts = <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD 303>;
@@ -1232,6 +1235,16 @@ index 0000000..0dd374f
+ clocks = <&cpg CPG_MOD 820>;
+ power-domains = <&sysc R8A7797_PD_ALWAYS_ON>;
+ };
++
++ isp0: isp@fec00000 {
++ compatible = "renesas,isp-r8a7797";
++ reg = <0 0xfec00000 0 0x20000>,
++ <0 0xfed00000 0 0x10000>;
++ interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>,
++ <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
++ clocks = <&cpg CPG_MOD 817>;
++ power-domains = <&sysc R8A7797_PD_ALWAYS_ON>;
++ };
+ };
+};
diff --git a/drivers/clk/renesas/Kconfig b/drivers/clk/renesas/Kconfig
@@ -1260,10 +1273,10 @@ index 2c224e9..c2ef11e 100644
obj-$(CONFIG_CLK_RENESAS_CPG_MSSR) += renesas-cpg-mssr.o clk-div6.o
diff --git a/drivers/clk/renesas/r8a7797-cpg-mssr.c b/drivers/clk/renesas/r8a7797-cpg-mssr.c
new file mode 100644
-index 0000000..6f481a4
+index 0000000..0460ed4
--- /dev/null
+++ b/drivers/clk/renesas/r8a7797-cpg-mssr.c
-@@ -0,0 +1,231 @@
+@@ -0,0 +1,232 @@
+/*
+ * r8a7797 Clock Pulse Generator / Module Standby and Software Reset
+ *
@@ -1362,6 +1375,7 @@ index 0000000..6f481a4
+ DEF_MOD("tmu3", 122, R8A7797_CLK_S2D2),
+ DEF_MOD("tmu2", 123, R8A7797_CLK_S2D2),
+ DEF_MOD("tmu1", 124, R8A7797_CLK_S2D2),
++ DEF_MOD("tmu0", 125, R8A7797_CLK_CP),
+ DEF_MOD("ivcp1e", 127, R8A7797_CLK_S2D1),
+ DEF_MOD("scif4", 203, R8A7797_CLK_S2D4), /* @@ H3=S3D4 */
+ DEF_MOD("scif3", 204, R8A7797_CLK_S2D4), /* @@ H3=S3D4 */
@@ -1818,10 +1832,10 @@ index ecae864..d5fa06c 100644
lvdcr0 |= LVDCR0_LVRES;
diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
-index 74c17d8..149c107 100644
+index 156fe5f..ea451cd 100644
--- a/drivers/i2c/busses/i2c-rcar.c
+++ b/drivers/i2c/busses/i2c-rcar.c
-@@ -807,6 +807,7 @@ static u32 rcar_i2c_func(struct i2c_adapter *adap)
+@@ -836,6 +836,7 @@ static u32 rcar_i2c_func(struct i2c_adapter *adap)
{ .compatible = "renesas,i2c-r8a7795", .data = (void *)I2C_RCAR_GEN3 },
{ .compatible = "renesas,i2c-r8a7796", .data = (void *)I2C_RCAR_GEN3 },
{ .compatible = "renesas,i2c-r8a77965", .data = (void *)I2C_RCAR_GEN3 },
@@ -5029,7 +5043,7 @@ index 29b8a4d..2ba6a76 100644
obj-$(CONFIG_RCAR_DDR_BACKUP) += s2ram_ddr_backup.o
diff --git a/drivers/soc/renesas/r8a7797-sysc.c b/drivers/soc/renesas/r8a7797-sysc.c
new file mode 100644
-index 0000000..b71bdedb
+index 0000000..cde7d9e
--- /dev/null
+++ b/drivers/soc/renesas/r8a7797-sysc.c
@@ -0,0 +1,39 @@
@@ -5060,12 +5074,12 @@ index 0000000..b71bdedb
+ PD_CPU_NOCR },
+ { "cr7", 0x240, 0, R8A7797_PD_CR7, R8A7797_PD_ALWAYS_ON },
+ { "a3ir", 0x180, 0, R8A7797_PD_A3IR, R8A7797_PD_ALWAYS_ON },
-+ { "a2ir0", 0x400, 0, R8A7797_PD_A2IR0, R8A7797_PD_ALWAYS_ON },
-+ { "a2ir1", 0x400, 1, R8A7797_PD_A2IR1, R8A7797_PD_A2IR0 },
-+ { "a2ir2", 0x400, 2, R8A7797_PD_A2IR2, R8A7797_PD_A2IR0 },
-+ { "a2ir3", 0x400, 3, R8A7797_PD_A2IR3, R8A7797_PD_A2IR0 },
-+ { "a2sc0", 0x400, 4, R8A7797_PD_A2SC0, R8A7797_PD_ALWAYS_ON },
-+ { "a2sc1", 0x400, 5, R8A7797_PD_A2SC1, R8A7797_PD_A2SC0 },
++ { "a2ir0", 0x400, 0, R8A7797_PD_A2IR0, R8A7797_PD_A3IR },
++ { "a2ir1", 0x400, 1, R8A7797_PD_A2IR1, R8A7797_PD_A3IR },
++ { "a2ir2", 0x400, 2, R8A7797_PD_A2IR2, R8A7797_PD_A3IR },
++ { "a2ir3", 0x400, 3, R8A7797_PD_A2IR3, R8A7797_PD_A3IR },
++ { "a2sc0", 0x400, 4, R8A7797_PD_A2SC0, R8A7797_PD_A3IR },
++ { "a2sc1", 0x400, 5, R8A7797_PD_A2SC1, R8A7797_PD_A3IR },
+};
+
+const struct rcar_sysc_info r8a7797_sysc_info __initconst = {
@@ -5168,7 +5182,7 @@ index 1b33c50..63f943d 100644
{ .compatible = "renesas,sh73a0", .data = &soc_shmobile_ag5 },
#endif
diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c
-index 36e70db..a2606fe 100644
+index 2d3ac0b..1488964 100644
--- a/drivers/spi/spi-sh-msiof.c
+++ b/drivers/spi/spi-sh-msiof.c
@@ -216,7 +216,8 @@ static int msiof_rcar_is_gen3(struct device *dev)