aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2018-05-26 17:39:14 -0400
committerOlof Johansson <olof@lixom.net>2018-05-26 17:39:59 -0400
commita51dcd297de8787ceb6587dfaa66d5eed50e6401 (patch)
treed18cec1aa4ada503fb23badd203ea78158348a2b
parent5ab99d48dae22ed7662d8c52adfff49a64495cc1 (diff)
parent086b399965a7ee7e50c3b3c57f2dba30ff0334b0 (diff)
Merge tag 'renesas-soc-for-v4.18' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/soc
Renesas ARM Based SoC Updates for v4.18 * SoC - Change platform dependency to ARCH_RENESAS This will allow to drop ARCH_SHMOBILE on ARM and ARM64 in the near future. - Add the to Kconfig RZ/N1D (r9a06g032) SoC - Identify R-Car E3 (r8a77990) SoC - Identify and add minimal support for RZ/G1C (r8a77470) SoC * R-Car SYSC - Add support for R-Car E3 (r8a77990) SoC - Remove unused inclusion of <linux/sys_soc.h>, - Make r8a77995_areas[] const. * R-Car Reset - Add support for R-Car E3 (r8a77990) SoC * Debug-LL - Add support for RZ/G1C (r8a77470) SoC * tag 'renesas-soc-for-v4.18' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: soc: renesas: r8a77990-sysc: Add workaround for 3DG-{A,B} soc: renesas: rcar-sysc: Add support for R-Car E3 power areas arm: shmobile: Add the RZ/N1D (R9A06G032) to the shmobile Kconfig arm: shmobile: Change platform dependency to ARCH_RENESAS soc: renesas: r8a77995-sysc: Cleanups soc: renesas: rcar-rst: Add support for R-Car E3 soc: renesas: Add r8a77990 SYSC PM Domain Binding Definitions soc: renesas: identify R-Car E3 ARM: debug-ll: Add support for r8a77470 ARM: shmobile: Add the RZ/N1 arch to the shmobile Kconfig ARM: shmobile: r8a77470: basic SoC support soc: renesas: rcar-sysc: Add r8a77470 support soc: renesas: rcar-rst: Add support for RZ/G1C soc: renesas: Identify RZ/G1C Signed-off-by: Olof Johansson <olof@lixom.net>
-rw-r--r--Documentation/devicetree/bindings/arm/shmobile.txt2
-rw-r--r--Documentation/devicetree/bindings/power/renesas,rcar-sysc.txt2
-rw-r--r--Documentation/devicetree/bindings/reset/renesas,rst.txt2
-rw-r--r--arch/arm/Kconfig2
-rw-r--r--arch/arm/Kconfig.debug13
-rw-r--r--arch/arm/Makefile2
-rw-r--r--arch/arm/mach-shmobile/Kconfig13
-rw-r--r--arch/arm/mach-shmobile/setup-rcar-gen2.c2
-rw-r--r--drivers/soc/renesas/Kconfig13
-rw-r--r--drivers/soc/renesas/Makefile2
-rw-r--r--drivers/soc/renesas/r8a77470-sysc.c29
-rw-r--r--drivers/soc/renesas/r8a77990-sysc.c68
-rw-r--r--drivers/soc/renesas/r8a77995-sysc.c3
-rw-r--r--drivers/soc/renesas/rcar-rst.c2
-rw-r--r--drivers/soc/renesas/rcar-sysc.c6
-rw-r--r--drivers/soc/renesas/rcar-sysc.h2
-rw-r--r--drivers/soc/renesas/renesas-soc.c16
-rw-r--r--include/dt-bindings/power/r8a77470-sysc.h22
-rw-r--r--include/dt-bindings/power/r8a77990-sysc.h26
19 files changed, 220 insertions, 7 deletions
diff --git a/Documentation/devicetree/bindings/arm/shmobile.txt b/Documentation/devicetree/bindings/arm/shmobile.txt
index d3d1df97834f..86ac320323a7 100644
--- a/Documentation/devicetree/bindings/arm/shmobile.txt
+++ b/Documentation/devicetree/bindings/arm/shmobile.txt
@@ -21,6 +21,8 @@ SoCs:
21 compatible = "renesas,r8a7744" 21 compatible = "renesas,r8a7744"
22 - RZ/G1E (R8A77450) 22 - RZ/G1E (R8A77450)
23 compatible = "renesas,r8a7745" 23 compatible = "renesas,r8a7745"
24 - RZ/G1C (R8A77470)
25 compatible = "renesas,r8a77470"
24 - R-Car M1A (R8A77781) 26 - R-Car M1A (R8A77781)
25 compatible = "renesas,r8a7778" 27 compatible = "renesas,r8a7778"
26 - R-Car H1 (R8A77790) 28 - R-Car H1 (R8A77790)
diff --git a/Documentation/devicetree/bindings/power/renesas,rcar-sysc.txt b/Documentation/devicetree/bindings/power/renesas,rcar-sysc.txt
index ab399e559257..180ae65be753 100644
--- a/Documentation/devicetree/bindings/power/renesas,rcar-sysc.txt
+++ b/Documentation/devicetree/bindings/power/renesas,rcar-sysc.txt
@@ -9,6 +9,7 @@ Required properties:
9 - compatible: Must contain exactly one of the following: 9 - compatible: Must contain exactly one of the following:
10 - "renesas,r8a7743-sysc" (RZ/G1M) 10 - "renesas,r8a7743-sysc" (RZ/G1M)
11 - "renesas,r8a7745-sysc" (RZ/G1E) 11 - "renesas,r8a7745-sysc" (RZ/G1E)
12 - "renesas,r8a77470-sysc" (RZ/G1C)
12 - "renesas,r8a7779-sysc" (R-Car H1) 13 - "renesas,r8a7779-sysc" (R-Car H1)
13 - "renesas,r8a7790-sysc" (R-Car H2) 14 - "renesas,r8a7790-sysc" (R-Car H2)
14 - "renesas,r8a7791-sysc" (R-Car M2-W) 15 - "renesas,r8a7791-sysc" (R-Car M2-W)
@@ -20,6 +21,7 @@ Required properties:
20 - "renesas,r8a77965-sysc" (R-Car M3-N) 21 - "renesas,r8a77965-sysc" (R-Car M3-N)
21 - "renesas,r8a77970-sysc" (R-Car V3M) 22 - "renesas,r8a77970-sysc" (R-Car V3M)
22 - "renesas,r8a77980-sysc" (R-Car V3H) 23 - "renesas,r8a77980-sysc" (R-Car V3H)
24 - "renesas,r8a77990-sysc" (R-Car E3)
23 - "renesas,r8a77995-sysc" (R-Car D3) 25 - "renesas,r8a77995-sysc" (R-Car D3)
24 - reg: Address start and address range for the device. 26 - reg: Address start and address range for the device.
25 - #power-domain-cells: Must be 1. 27 - #power-domain-cells: Must be 1.
diff --git a/Documentation/devicetree/bindings/reset/renesas,rst.txt b/Documentation/devicetree/bindings/reset/renesas,rst.txt
index 294a0dae106a..67e83b02e10b 100644
--- a/Documentation/devicetree/bindings/reset/renesas,rst.txt
+++ b/Documentation/devicetree/bindings/reset/renesas,rst.txt
@@ -17,6 +17,7 @@ Required properties:
17 Examples with soctypes are: 17 Examples with soctypes are:
18 - "renesas,r8a7743-rst" (RZ/G1M) 18 - "renesas,r8a7743-rst" (RZ/G1M)
19 - "renesas,r8a7745-rst" (RZ/G1E) 19 - "renesas,r8a7745-rst" (RZ/G1E)
20 - "renesas,r8a77470-rst" (RZ/G1C)
20 - "renesas,r8a7778-reset-wdt" (R-Car M1A) 21 - "renesas,r8a7778-reset-wdt" (R-Car M1A)
21 - "renesas,r8a7779-reset-wdt" (R-Car H1) 22 - "renesas,r8a7779-reset-wdt" (R-Car H1)
22 - "renesas,r8a7790-rst" (R-Car H2) 23 - "renesas,r8a7790-rst" (R-Car H2)
@@ -29,6 +30,7 @@ Required properties:
29 - "renesas,r8a77965-rst" (R-Car M3-N) 30 - "renesas,r8a77965-rst" (R-Car M3-N)
30 - "renesas,r8a77970-rst" (R-Car V3M) 31 - "renesas,r8a77970-rst" (R-Car V3M)
31 - "renesas,r8a77980-rst" (R-Car V3H) 32 - "renesas,r8a77980-rst" (R-Car V3H)
33 - "renesas,r8a77990-rst" (R-Car E3)
32 - "renesas,r8a77995-rst" (R-Car D3) 34 - "renesas,r8a77995-rst" (R-Car D3)
33 - reg: Address start and address range for the device. 35 - reg: Address start and address range for the device.
34 36
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index a7f8e7f4b88f..2d34c0a44877 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1467,7 +1467,7 @@ config ARM_PSCI
1467config ARCH_NR_GPIO 1467config ARCH_NR_GPIO
1468 int 1468 int
1469 default 2048 if ARCH_SOCFPGA 1469 default 2048 if ARCH_SOCFPGA
1470 default 1024 if ARCH_BRCMSTB || ARCH_SHMOBILE || ARCH_TEGRA || \ 1470 default 1024 if ARCH_BRCMSTB || ARCH_RENESAS || ARCH_TEGRA || \
1471 ARCH_ZYNQ 1471 ARCH_ZYNQ
1472 default 512 if ARCH_EXYNOS || ARCH_KEYSTONE || SOC_OMAP5 || \ 1472 default 512 if ARCH_EXYNOS || ARCH_KEYSTONE || SOC_OMAP5 || \
1473 SOC_DRA7XX || ARCH_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210 1473 SOC_DRA7XX || ARCH_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 199ebc1c4538..693f84392f1b 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -942,6 +942,13 @@ choice
942 via SCIF0 on Renesas RZ/G1M (R8A7743), R-Car H2 (R8A7790), 942 via SCIF0 on Renesas RZ/G1M (R8A7743), R-Car H2 (R8A7790),
943 M2-W (R8A7791), V2H (R8A7792), or M2-N (R8A7793). 943 M2-W (R8A7791), V2H (R8A7792), or M2-N (R8A7793).
944 944
945 config DEBUG_RCAR_GEN2_SCIF1
946 bool "Kernel low-level debugging messages via SCIF1 on R8A77470"
947 depends on ARCH_R8A77470
948 help
949 Say Y here if you want kernel low-level debugging support
950 via SCIF1 on Renesas RZ/G1C (R8A77470).
951
945 config DEBUG_RCAR_GEN2_SCIF2 952 config DEBUG_RCAR_GEN2_SCIF2
946 bool "Kernel low-level debugging messages via SCIF2 on R8A7794" 953 bool "Kernel low-level debugging messages via SCIF2 on R8A7794"
947 depends on ARCH_R8A7794 954 depends on ARCH_R8A7794
@@ -1495,6 +1502,7 @@ config DEBUG_LL_INCLUDE
1495 default "debug/renesas-scif.S" if DEBUG_RCAR_GEN1_SCIF0 1502 default "debug/renesas-scif.S" if DEBUG_RCAR_GEN1_SCIF0
1496 default "debug/renesas-scif.S" if DEBUG_RCAR_GEN1_SCIF2 1503 default "debug/renesas-scif.S" if DEBUG_RCAR_GEN1_SCIF2
1497 default "debug/renesas-scif.S" if DEBUG_RCAR_GEN2_SCIF0 1504 default "debug/renesas-scif.S" if DEBUG_RCAR_GEN2_SCIF0
1505 default "debug/renesas-scif.S" if DEBUG_RCAR_GEN2_SCIF1
1498 default "debug/renesas-scif.S" if DEBUG_RCAR_GEN2_SCIF2 1506 default "debug/renesas-scif.S" if DEBUG_RCAR_GEN2_SCIF2
1499 default "debug/renesas-scif.S" if DEBUG_RCAR_GEN2_SCIF4 1507 default "debug/renesas-scif.S" if DEBUG_RCAR_GEN2_SCIF4
1500 default "debug/renesas-scif.S" if DEBUG_RMOBILE_SCIFA0 1508 default "debug/renesas-scif.S" if DEBUG_RMOBILE_SCIFA0
@@ -1617,6 +1625,7 @@ config DEBUG_UART_PHYS
1617 default 0xe6c80000 if DEBUG_RMOBILE_SCIFA4 1625 default 0xe6c80000 if DEBUG_RMOBILE_SCIFA4
1618 default 0xe6e58000 if DEBUG_RCAR_GEN2_SCIF2 1626 default 0xe6e58000 if DEBUG_RCAR_GEN2_SCIF2
1619 default 0xe6e60000 if DEBUG_RCAR_GEN2_SCIF0 1627 default 0xe6e60000 if DEBUG_RCAR_GEN2_SCIF0
1628 default 0xe6e68000 if DEBUG_RCAR_GEN2_SCIF1
1620 default 0xe6ee0000 if DEBUG_RCAR_GEN2_SCIF4 1629 default 0xe6ee0000 if DEBUG_RCAR_GEN2_SCIF4
1621 default 0xe8008000 if DEBUG_R7S72100_SCIF2 1630 default 0xe8008000 if DEBUG_R7S72100_SCIF2
1622 default 0xf0000be0 if ARCH_EBSA110 1631 default 0xf0000be0 if ARCH_EBSA110
@@ -1651,8 +1660,8 @@ config DEBUG_UART_PHYS
1651 DEBUG_NETX_UART || \ 1660 DEBUG_NETX_UART || \
1652 DEBUG_QCOM_UARTDM || DEBUG_R7S72100_SCIF2 || \ 1661 DEBUG_QCOM_UARTDM || DEBUG_R7S72100_SCIF2 || \
1653 DEBUG_RCAR_GEN1_SCIF0 || DEBUG_RCAR_GEN1_SCIF2 || \ 1662 DEBUG_RCAR_GEN1_SCIF0 || DEBUG_RCAR_GEN1_SCIF2 || \
1654 DEBUG_RCAR_GEN2_SCIF0 || DEBUG_RCAR_GEN2_SCIF2 || \ 1663 DEBUG_RCAR_GEN2_SCIF0 || DEBUG_RCAR_GEN2_SCIF1 || \
1655 DEBUG_RCAR_GEN2_SCIF4 || \ 1664 DEBUG_RCAR_GEN2_SCIF2 || DEBUG_RCAR_GEN2_SCIF4 || \
1656 DEBUG_RMOBILE_SCIFA0 || DEBUG_RMOBILE_SCIFA1 || \ 1665 DEBUG_RMOBILE_SCIFA0 || DEBUG_RMOBILE_SCIFA1 || \
1657 DEBUG_RMOBILE_SCIFA4 || DEBUG_S3C24XX_UART || \ 1666 DEBUG_RMOBILE_SCIFA4 || DEBUG_S3C24XX_UART || \
1658 DEBUG_S3C64XX_UART || \ 1667 DEBUG_S3C64XX_UART || \
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index e4e537f27339..a92f5a876d96 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -212,7 +212,7 @@ machine-$(CONFIG_ARCH_S3C24XX) += s3c24xx
212machine-$(CONFIG_ARCH_S3C64XX) += s3c64xx 212machine-$(CONFIG_ARCH_S3C64XX) += s3c64xx
213machine-$(CONFIG_ARCH_S5PV210) += s5pv210 213machine-$(CONFIG_ARCH_S5PV210) += s5pv210
214machine-$(CONFIG_ARCH_SA1100) += sa1100 214machine-$(CONFIG_ARCH_SA1100) += sa1100
215machine-$(CONFIG_ARCH_SHMOBILE) += shmobile 215machine-$(CONFIG_ARCH_RENESAS) += shmobile
216machine-$(CONFIG_ARCH_SIRF) += prima2 216machine-$(CONFIG_ARCH_SIRF) += prima2
217machine-$(CONFIG_ARCH_SOCFPGA) += socfpga 217machine-$(CONFIG_ARCH_SOCFPGA) += socfpga
218machine-$(CONFIG_ARCH_STI) += sti 218machine-$(CONFIG_ARCH_STI) += sti
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
index 280e7312a9e1..fcc273f127bf 100644
--- a/arch/arm/mach-shmobile/Kconfig
+++ b/arch/arm/mach-shmobile/Kconfig
@@ -75,6 +75,10 @@ config ARCH_R8A7745
75 bool "RZ/G1E (R8A77450)" 75 bool "RZ/G1E (R8A77450)"
76 select ARCH_RCAR_GEN2 76 select ARCH_RCAR_GEN2
77 77
78config ARCH_R8A77470
79 bool "RZ/G1C (R8A77470)"
80 select ARCH_RCAR_GEN2
81
78config ARCH_R8A7778 82config ARCH_R8A7778
79 bool "R-Car M1A (R8A77781)" 83 bool "R-Car M1A (R8A77781)"
80 select ARCH_RCAR_GEN1 84 select ARCH_RCAR_GEN1
@@ -110,6 +114,15 @@ config ARCH_R8A7794
110 bool "R-Car E2 (R8A77940)" 114 bool "R-Car E2 (R8A77940)"
111 select ARCH_RCAR_GEN2 115 select ARCH_RCAR_GEN2
112 116
117config ARCH_R9A06G032
118 bool "RZ/N1D (R9A06G032)"
119 select ARCH_RZN1
120
121config ARCH_RZN1
122 bool "RZ/N1 (R9A06G0xx) Family"
123 select ARM_AMBA
124 select CPU_V7
125
113config ARCH_SH73A0 126config ARCH_SH73A0
114 bool "SH-Mobile AG5 (R8A73A00)" 127 bool "SH-Mobile AG5 (R8A73A00)"
115 select ARCH_RMOBILE 128 select ARCH_RMOBILE
diff --git a/arch/arm/mach-shmobile/setup-rcar-gen2.c b/arch/arm/mach-shmobile/setup-rcar-gen2.c
index 4a881026d740..88fdc1801d90 100644
--- a/arch/arm/mach-shmobile/setup-rcar-gen2.c
+++ b/arch/arm/mach-shmobile/setup-rcar-gen2.c
@@ -74,6 +74,7 @@ void __init rcar_gen2_timer_init(void)
74 secure_cntvoff_init(); 74 secure_cntvoff_init();
75 75
76 if (of_machine_is_compatible("renesas,r8a7745") || 76 if (of_machine_is_compatible("renesas,r8a7745") ||
77 of_machine_is_compatible("renesas,r8a77470") ||
77 of_machine_is_compatible("renesas,r8a7792") || 78 of_machine_is_compatible("renesas,r8a7792") ||
78 of_machine_is_compatible("renesas,r8a7794")) { 79 of_machine_is_compatible("renesas,r8a7794")) {
79 freq = 260000000 / 8; /* ZS / 8 */ 80 freq = 260000000 / 8; /* ZS / 8 */
@@ -206,6 +207,7 @@ MACHINE_END
206static const char * const rz_g1_boards_compat_dt[] __initconst = { 207static const char * const rz_g1_boards_compat_dt[] __initconst = {
207 "renesas,r8a7743", 208 "renesas,r8a7743",
208 "renesas,r8a7745", 209 "renesas,r8a7745",
210 "renesas,r8a77470",
209 NULL, 211 NULL,
210}; 212};
211 213
diff --git a/drivers/soc/renesas/Kconfig b/drivers/soc/renesas/Kconfig
index 3bbe6114a420..1d824cbd462d 100644
--- a/drivers/soc/renesas/Kconfig
+++ b/drivers/soc/renesas/Kconfig
@@ -4,9 +4,11 @@ config SOC_RENESAS
4 select SOC_BUS 4 select SOC_BUS
5 select RST_RCAR if ARCH_RCAR_GEN1 || ARCH_RCAR_GEN2 || \ 5 select RST_RCAR if ARCH_RCAR_GEN1 || ARCH_RCAR_GEN2 || \
6 ARCH_R8A7795 || ARCH_R8A7796 || ARCH_R8A77965 || \ 6 ARCH_R8A7795 || ARCH_R8A7796 || ARCH_R8A77965 || \
7 ARCH_R8A77970 || ARCH_R8A77980 || ARCH_R8A77995 7 ARCH_R8A77970 || ARCH_R8A77980 || ARCH_R8A77990 || \
8 ARCH_R8A77995
8 select SYSC_R8A7743 if ARCH_R8A7743 9 select SYSC_R8A7743 if ARCH_R8A7743
9 select SYSC_R8A7745 if ARCH_R8A7745 10 select SYSC_R8A7745 if ARCH_R8A7745
11 select SYSC_R8A77470 if ARCH_R8A77470
10 select SYSC_R8A7779 if ARCH_R8A7779 12 select SYSC_R8A7779 if ARCH_R8A7779
11 select SYSC_R8A7790 if ARCH_R8A7790 13 select SYSC_R8A7790 if ARCH_R8A7790
12 select SYSC_R8A7791 if ARCH_R8A7791 || ARCH_R8A7793 14 select SYSC_R8A7791 if ARCH_R8A7791 || ARCH_R8A7793
@@ -17,6 +19,7 @@ config SOC_RENESAS
17 select SYSC_R8A77965 if ARCH_R8A77965 19 select SYSC_R8A77965 if ARCH_R8A77965
18 select SYSC_R8A77970 if ARCH_R8A77970 20 select SYSC_R8A77970 if ARCH_R8A77970
19 select SYSC_R8A77980 if ARCH_R8A77980 21 select SYSC_R8A77980 if ARCH_R8A77980
22 select SYSC_R8A77990 if ARCH_R8A77990
20 select SYSC_R8A77995 if ARCH_R8A77995 23 select SYSC_R8A77995 if ARCH_R8A77995
21 24
22if SOC_RENESAS 25if SOC_RENESAS
@@ -30,6 +33,10 @@ config SYSC_R8A7745
30 bool "RZ/G1E System Controller support" if COMPILE_TEST 33 bool "RZ/G1E System Controller support" if COMPILE_TEST
31 select SYSC_RCAR 34 select SYSC_RCAR
32 35
36config SYSC_R8A77470
37 bool "RZ/G1C System Controller support" if COMPILE_TEST
38 select SYSC_RCAR
39
33config SYSC_R8A7779 40config SYSC_R8A7779
34 bool "R-Car H1 System Controller support" if COMPILE_TEST 41 bool "R-Car H1 System Controller support" if COMPILE_TEST
35 select SYSC_RCAR 42 select SYSC_RCAR
@@ -70,6 +77,10 @@ config SYSC_R8A77980
70 bool "R-Car V3H System Controller support" if COMPILE_TEST 77 bool "R-Car V3H System Controller support" if COMPILE_TEST
71 select SYSC_RCAR 78 select SYSC_RCAR
72 79
80config SYSC_R8A77990
81 bool "R-Car E3 System Controller support" if COMPILE_TEST
82 select SYSC_RCAR
83
73config SYSC_R8A77995 84config SYSC_R8A77995
74 bool "R-Car D3 System Controller support" if COMPILE_TEST 85 bool "R-Car D3 System Controller support" if COMPILE_TEST
75 select SYSC_RCAR 86 select SYSC_RCAR
diff --git a/drivers/soc/renesas/Makefile b/drivers/soc/renesas/Makefile
index ccb5ec57a262..7dc0f20d7907 100644
--- a/drivers/soc/renesas/Makefile
+++ b/drivers/soc/renesas/Makefile
@@ -5,6 +5,7 @@ obj-$(CONFIG_SOC_RENESAS) += renesas-soc.o
5# SoC 5# SoC
6obj-$(CONFIG_SYSC_R8A7743) += r8a7743-sysc.o 6obj-$(CONFIG_SYSC_R8A7743) += r8a7743-sysc.o
7obj-$(CONFIG_SYSC_R8A7745) += r8a7745-sysc.o 7obj-$(CONFIG_SYSC_R8A7745) += r8a7745-sysc.o
8obj-$(CONFIG_SYSC_R8A77470) += r8a77470-sysc.o
8obj-$(CONFIG_SYSC_R8A7779) += r8a7779-sysc.o 9obj-$(CONFIG_SYSC_R8A7779) += r8a7779-sysc.o
9obj-$(CONFIG_SYSC_R8A7790) += r8a7790-sysc.o 10obj-$(CONFIG_SYSC_R8A7790) += r8a7790-sysc.o
10obj-$(CONFIG_SYSC_R8A7791) += r8a7791-sysc.o 11obj-$(CONFIG_SYSC_R8A7791) += r8a7791-sysc.o
@@ -15,6 +16,7 @@ obj-$(CONFIG_SYSC_R8A7796) += r8a7796-sysc.o
15obj-$(CONFIG_SYSC_R8A77965) += r8a77965-sysc.o 16obj-$(CONFIG_SYSC_R8A77965) += r8a77965-sysc.o
16obj-$(CONFIG_SYSC_R8A77970) += r8a77970-sysc.o 17obj-$(CONFIG_SYSC_R8A77970) += r8a77970-sysc.o
17obj-$(CONFIG_SYSC_R8A77980) += r8a77980-sysc.o 18obj-$(CONFIG_SYSC_R8A77980) += r8a77980-sysc.o
19obj-$(CONFIG_SYSC_R8A77990) += r8a77990-sysc.o
18obj-$(CONFIG_SYSC_R8A77995) += r8a77995-sysc.o 20obj-$(CONFIG_SYSC_R8A77995) += r8a77995-sysc.o
19 21
20# Family 22# Family
diff --git a/drivers/soc/renesas/r8a77470-sysc.c b/drivers/soc/renesas/r8a77470-sysc.c
new file mode 100644
index 000000000000..cfa015e208ef
--- /dev/null
+++ b/drivers/soc/renesas/r8a77470-sysc.c
@@ -0,0 +1,29 @@
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Renesas RZ/G1C System Controller
4 *
5 * Copyright (C) 2018 Renesas Electronics Corp.
6 */
7
8#include <linux/bug.h>
9#include <linux/kernel.h>
10
11#include <dt-bindings/power/r8a77470-sysc.h>
12
13#include "rcar-sysc.h"
14
15static const struct rcar_sysc_area r8a77470_areas[] __initconst = {
16 { "always-on", 0, 0, R8A77470_PD_ALWAYS_ON, -1, PD_ALWAYS_ON },
17 { "ca7-scu", 0x100, 0, R8A77470_PD_CA7_SCU, R8A77470_PD_ALWAYS_ON,
18 PD_SCU },
19 { "ca7-cpu0", 0x1c0, 0, R8A77470_PD_CA7_CPU0, R8A77470_PD_CA7_SCU,
20 PD_CPU_NOCR },
21 { "ca7-cpu1", 0x1c0, 1, R8A77470_PD_CA7_CPU1, R8A77470_PD_CA7_SCU,
22 PD_CPU_NOCR },
23 { "sgx", 0xc0, 0, R8A77470_PD_SGX, R8A77470_PD_ALWAYS_ON },
24};
25
26const struct rcar_sysc_info r8a77470_sysc_info __initconst = {
27 .areas = r8a77470_areas,
28 .num_areas = ARRAY_SIZE(r8a77470_areas),
29};
diff --git a/drivers/soc/renesas/r8a77990-sysc.c b/drivers/soc/renesas/r8a77990-sysc.c
new file mode 100644
index 000000000000..15579ebc5ed2
--- /dev/null
+++ b/drivers/soc/renesas/r8a77990-sysc.c
@@ -0,0 +1,68 @@
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Renesas R-Car E3 System Controller
4 *
5 * Copyright (C) 2018 Renesas Electronics Corp.
6 */
7
8#include <linux/bug.h>
9#include <linux/kernel.h>
10#include <linux/sys_soc.h>
11
12#include <dt-bindings/power/r8a77990-sysc.h>
13
14#include "rcar-sysc.h"
15
16static struct rcar_sysc_area r8a77990_areas[] __initdata = {
17 { "always-on", 0, 0, R8A77990_PD_ALWAYS_ON, -1, PD_ALWAYS_ON },
18 { "ca53-scu", 0x140, 0, R8A77990_PD_CA53_SCU, R8A77990_PD_ALWAYS_ON,
19 PD_SCU },
20 { "ca53-cpu0", 0x200, 0, R8A77990_PD_CA53_CPU0, R8A77990_PD_CA53_SCU,
21 PD_CPU_NOCR },
22 { "ca53-cpu1", 0x200, 1, R8A77990_PD_CA53_CPU1, R8A77990_PD_CA53_SCU,
23 PD_CPU_NOCR },
24 { "cr7", 0x240, 0, R8A77990_PD_CR7, R8A77990_PD_ALWAYS_ON },
25 { "a3vc", 0x380, 0, R8A77990_PD_A3VC, R8A77990_PD_ALWAYS_ON },
26 { "a2vc1", 0x3c0, 1, R8A77990_PD_A2VC1, R8A77990_PD_A3VC },
27 { "3dg-a", 0x100, 0, R8A77990_PD_3DG_A, R8A77990_PD_ALWAYS_ON },
28 { "3dg-b", 0x100, 1, R8A77990_PD_3DG_B, R8A77990_PD_3DG_A },
29};
30
31static void __init rcar_sysc_fix_parent(struct rcar_sysc_area *areas,
32 unsigned int num_areas, u8 id,
33 int new_parent)
34{
35 unsigned int i;
36
37 for (i = 0; i < num_areas; i++)
38 if (areas[i].isr_bit == id) {
39 areas[i].parent = new_parent;
40 return;
41 }
42}
43
44/* Fixups for R-Car E3 ES1.0 revision */
45static const struct soc_device_attribute r8a77990[] __initconst = {
46 { .soc_id = "r8a77990", .revision = "ES1.0" },
47 { /* sentinel */ }
48};
49
50static int __init r8a77990_sysc_init(void)
51{
52 if (soc_device_match(r8a77990)) {
53 rcar_sysc_fix_parent(r8a77990_areas,
54 ARRAY_SIZE(r8a77990_areas),
55 R8A77990_PD_3DG_A, R8A77990_PD_3DG_B);
56 rcar_sysc_fix_parent(r8a77990_areas,
57 ARRAY_SIZE(r8a77990_areas),
58 R8A77990_PD_3DG_B, R8A77990_PD_ALWAYS_ON);
59 }
60
61 return 0;
62}
63
64const struct rcar_sysc_info r8a77990_sysc_info __initconst = {
65 .init = r8a77990_sysc_init,
66 .areas = r8a77990_areas,
67 .num_areas = ARRAY_SIZE(r8a77990_areas),
68};
diff --git a/drivers/soc/renesas/r8a77995-sysc.c b/drivers/soc/renesas/r8a77995-sysc.c
index f718429cab02..1b2ef415bbe1 100644
--- a/drivers/soc/renesas/r8a77995-sysc.c
+++ b/drivers/soc/renesas/r8a77995-sysc.c
@@ -10,13 +10,12 @@
10 10
11#include <linux/bug.h> 11#include <linux/bug.h>
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/sys_soc.h>
14 13
15#include <dt-bindings/power/r8a77995-sysc.h> 14#include <dt-bindings/power/r8a77995-sysc.h>
16 15
17#include "rcar-sysc.h" 16#include "rcar-sysc.h"
18 17
19static struct rcar_sysc_area r8a77995_areas[] __initdata = { 18static const struct rcar_sysc_area r8a77995_areas[] __initconst = {
20 { "always-on", 0, 0, R8A77995_PD_ALWAYS_ON, -1, PD_ALWAYS_ON }, 19 { "always-on", 0, 0, R8A77995_PD_ALWAYS_ON, -1, PD_ALWAYS_ON },
21 { "ca53-scu", 0x140, 0, R8A77995_PD_CA53_SCU, R8A77995_PD_ALWAYS_ON, 20 { "ca53-scu", 0x140, 0, R8A77995_PD_CA53_SCU, R8A77995_PD_ALWAYS_ON,
22 PD_SCU }, 21 PD_SCU },
diff --git a/drivers/soc/renesas/rcar-rst.c b/drivers/soc/renesas/rcar-rst.c
index 8e9cb7996ab0..d9c1034e70e9 100644
--- a/drivers/soc/renesas/rcar-rst.c
+++ b/drivers/soc/renesas/rcar-rst.c
@@ -44,6 +44,7 @@ static const struct of_device_id rcar_rst_matches[] __initconst = {
44 /* RZ/G is handled like R-Car Gen2 */ 44 /* RZ/G is handled like R-Car Gen2 */
45 { .compatible = "renesas,r8a7743-rst", .data = &rcar_rst_gen2 }, 45 { .compatible = "renesas,r8a7743-rst", .data = &rcar_rst_gen2 },
46 { .compatible = "renesas,r8a7745-rst", .data = &rcar_rst_gen2 }, 46 { .compatible = "renesas,r8a7745-rst", .data = &rcar_rst_gen2 },
47 { .compatible = "renesas,r8a77470-rst", .data = &rcar_rst_gen2 },
47 /* R-Car Gen1 */ 48 /* R-Car Gen1 */
48 { .compatible = "renesas,r8a7778-reset-wdt", .data = &rcar_rst_gen1 }, 49 { .compatible = "renesas,r8a7778-reset-wdt", .data = &rcar_rst_gen1 },
49 { .compatible = "renesas,r8a7779-reset-wdt", .data = &rcar_rst_gen1 }, 50 { .compatible = "renesas,r8a7779-reset-wdt", .data = &rcar_rst_gen1 },
@@ -59,6 +60,7 @@ static const struct of_device_id rcar_rst_matches[] __initconst = {
59 { .compatible = "renesas,r8a77965-rst", .data = &rcar_rst_gen3 }, 60 { .compatible = "renesas,r8a77965-rst", .data = &rcar_rst_gen3 },
60 { .compatible = "renesas,r8a77970-rst", .data = &rcar_rst_gen3 }, 61 { .compatible = "renesas,r8a77970-rst", .data = &rcar_rst_gen3 },
61 { .compatible = "renesas,r8a77980-rst", .data = &rcar_rst_gen3 }, 62 { .compatible = "renesas,r8a77980-rst", .data = &rcar_rst_gen3 },
63 { .compatible = "renesas,r8a77990-rst", .data = &rcar_rst_gen3 },
62 { .compatible = "renesas,r8a77995-rst", .data = &rcar_rst_gen3 }, 64 { .compatible = "renesas,r8a77995-rst", .data = &rcar_rst_gen3 },
63 { /* sentinel */ } 65 { /* sentinel */ }
64}; 66};
diff --git a/drivers/soc/renesas/rcar-sysc.c b/drivers/soc/renesas/rcar-sysc.c
index faf20e719361..95120acc4d80 100644
--- a/drivers/soc/renesas/rcar-sysc.c
+++ b/drivers/soc/renesas/rcar-sysc.c
@@ -261,6 +261,9 @@ static const struct of_device_id rcar_sysc_matches[] __initconst = {
261#ifdef CONFIG_SYSC_R8A7745 261#ifdef CONFIG_SYSC_R8A7745
262 { .compatible = "renesas,r8a7745-sysc", .data = &r8a7745_sysc_info }, 262 { .compatible = "renesas,r8a7745-sysc", .data = &r8a7745_sysc_info },
263#endif 263#endif
264#ifdef CONFIG_SYSC_R8A77470
265 { .compatible = "renesas,r8a77470-sysc", .data = &r8a77470_sysc_info },
266#endif
264#ifdef CONFIG_SYSC_R8A7779 267#ifdef CONFIG_SYSC_R8A7779
265 { .compatible = "renesas,r8a7779-sysc", .data = &r8a7779_sysc_info }, 268 { .compatible = "renesas,r8a7779-sysc", .data = &r8a7779_sysc_info },
266#endif 269#endif
@@ -293,6 +296,9 @@ static const struct of_device_id rcar_sysc_matches[] __initconst = {
293#ifdef CONFIG_SYSC_R8A77980 296#ifdef CONFIG_SYSC_R8A77980
294 { .compatible = "renesas,r8a77980-sysc", .data = &r8a77980_sysc_info }, 297 { .compatible = "renesas,r8a77980-sysc", .data = &r8a77980_sysc_info },
295#endif 298#endif
299#ifdef CONFIG_SYSC_R8A77990
300 { .compatible = "renesas,r8a77990-sysc", .data = &r8a77990_sysc_info },
301#endif
296#ifdef CONFIG_SYSC_R8A77995 302#ifdef CONFIG_SYSC_R8A77995
297 { .compatible = "renesas,r8a77995-sysc", .data = &r8a77995_sysc_info }, 303 { .compatible = "renesas,r8a77995-sysc", .data = &r8a77995_sysc_info },
298#endif 304#endif
diff --git a/drivers/soc/renesas/rcar-sysc.h b/drivers/soc/renesas/rcar-sysc.h
index dcdc9ec8eba7..a22e7cf25e30 100644
--- a/drivers/soc/renesas/rcar-sysc.h
+++ b/drivers/soc/renesas/rcar-sysc.h
@@ -51,6 +51,7 @@ struct rcar_sysc_info {
51 51
52extern const struct rcar_sysc_info r8a7743_sysc_info; 52extern const struct rcar_sysc_info r8a7743_sysc_info;
53extern const struct rcar_sysc_info r8a7745_sysc_info; 53extern const struct rcar_sysc_info r8a7745_sysc_info;
54extern const struct rcar_sysc_info r8a77470_sysc_info;
54extern const struct rcar_sysc_info r8a7779_sysc_info; 55extern const struct rcar_sysc_info r8a7779_sysc_info;
55extern const struct rcar_sysc_info r8a7790_sysc_info; 56extern const struct rcar_sysc_info r8a7790_sysc_info;
56extern const struct rcar_sysc_info r8a7791_sysc_info; 57extern const struct rcar_sysc_info r8a7791_sysc_info;
@@ -61,6 +62,7 @@ extern const struct rcar_sysc_info r8a7796_sysc_info;
61extern const struct rcar_sysc_info r8a77965_sysc_info; 62extern const struct rcar_sysc_info r8a77965_sysc_info;
62extern const struct rcar_sysc_info r8a77970_sysc_info; 63extern const struct rcar_sysc_info r8a77970_sysc_info;
63extern const struct rcar_sysc_info r8a77980_sysc_info; 64extern const struct rcar_sysc_info r8a77980_sysc_info;
65extern const struct rcar_sysc_info r8a77990_sysc_info;
64extern const struct rcar_sysc_info r8a77995_sysc_info; 66extern const struct rcar_sysc_info r8a77995_sysc_info;
65 67
66 68
diff --git a/drivers/soc/renesas/renesas-soc.c b/drivers/soc/renesas/renesas-soc.c
index ea71c413c926..d44d0e687ab8 100644
--- a/drivers/soc/renesas/renesas-soc.c
+++ b/drivers/soc/renesas/renesas-soc.c
@@ -100,6 +100,11 @@ static const struct renesas_soc soc_rz_g1e __initconst __maybe_unused = {
100 .id = 0x4c, 100 .id = 0x4c,
101}; 101};
102 102
103static const struct renesas_soc soc_rz_g1c __initconst __maybe_unused = {
104 .family = &fam_rzg,
105 .id = 0x53,
106};
107
103static const struct renesas_soc soc_rcar_m1a __initconst __maybe_unused = { 108static const struct renesas_soc soc_rcar_m1a __initconst __maybe_unused = {
104 .family = &fam_rcar_gen1, 109 .family = &fam_rcar_gen1,
105}; 110};
@@ -159,6 +164,11 @@ static const struct renesas_soc soc_rcar_v3h __initconst __maybe_unused = {
159 .id = 0x56, 164 .id = 0x56,
160}; 165};
161 166
167static const struct renesas_soc soc_rcar_e3 __initconst __maybe_unused = {
168 .family = &fam_rcar_gen3,
169 .id = 0x57,
170};
171
162static const struct renesas_soc soc_rcar_d3 __initconst __maybe_unused = { 172static const struct renesas_soc soc_rcar_d3 __initconst __maybe_unused = {
163 .family = &fam_rcar_gen3, 173 .family = &fam_rcar_gen3,
164 .id = 0x58, 174 .id = 0x58,
@@ -192,6 +202,9 @@ static const struct of_device_id renesas_socs[] __initconst = {
192#ifdef CONFIG_ARCH_R8A7745 202#ifdef CONFIG_ARCH_R8A7745
193 { .compatible = "renesas,r8a7745", .data = &soc_rz_g1e }, 203 { .compatible = "renesas,r8a7745", .data = &soc_rz_g1e },
194#endif 204#endif
205#ifdef CONFIG_ARCH_R8A77470
206 { .compatible = "renesas,r8a77470", .data = &soc_rz_g1c },
207#endif
195#ifdef CONFIG_ARCH_R8A7778 208#ifdef CONFIG_ARCH_R8A7778
196 { .compatible = "renesas,r8a7778", .data = &soc_rcar_m1a }, 209 { .compatible = "renesas,r8a7778", .data = &soc_rcar_m1a },
197#endif 210#endif
@@ -228,6 +241,9 @@ static const struct of_device_id renesas_socs[] __initconst = {
228#ifdef CONFIG_ARCH_R8A77980 241#ifdef CONFIG_ARCH_R8A77980
229 { .compatible = "renesas,r8a77980", .data = &soc_rcar_v3h }, 242 { .compatible = "renesas,r8a77980", .data = &soc_rcar_v3h },
230#endif 243#endif
244#ifdef CONFIG_ARCH_R8A77990
245 { .compatible = "renesas,r8a77990", .data = &soc_rcar_e3 },
246#endif
231#ifdef CONFIG_ARCH_R8A77995 247#ifdef CONFIG_ARCH_R8A77995
232 { .compatible = "renesas,r8a77995", .data = &soc_rcar_d3 }, 248 { .compatible = "renesas,r8a77995", .data = &soc_rcar_d3 },
233#endif 249#endif
diff --git a/include/dt-bindings/power/r8a77470-sysc.h b/include/dt-bindings/power/r8a77470-sysc.h
new file mode 100644
index 000000000000..8bf4db187c31
--- /dev/null
+++ b/include/dt-bindings/power/r8a77470-sysc.h
@@ -0,0 +1,22 @@
1/* SPDX-License-Identifier: GPL-2.0
2 *
3 * Copyright (C) 2018 Renesas Electronics Corp.
4 */
5#ifndef __DT_BINDINGS_POWER_R8A77470_SYSC_H__
6#define __DT_BINDINGS_POWER_R8A77470_SYSC_H__
7
8/*
9 * These power domain indices match the numbers of the interrupt bits
10 * representing the power areas in the various Interrupt Registers
11 * (e.g. SYSCISR, Interrupt Status Register)
12 */
13
14#define R8A77470_PD_CA7_CPU0 5
15#define R8A77470_PD_CA7_CPU1 6
16#define R8A77470_PD_SGX 20
17#define R8A77470_PD_CA7_SCU 21
18
19/* Always-on power area */
20#define R8A77470_PD_ALWAYS_ON 32
21
22#endif /* __DT_BINDINGS_POWER_R8A77470_SYSC_H__ */
diff --git a/include/dt-bindings/power/r8a77990-sysc.h b/include/dt-bindings/power/r8a77990-sysc.h
new file mode 100644
index 000000000000..944d85beec15
--- /dev/null
+++ b/include/dt-bindings/power/r8a77990-sysc.h
@@ -0,0 +1,26 @@
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Copyright (C) 2018 Renesas Electronics Corp.
4 */
5#ifndef __DT_BINDINGS_POWER_R8A77990_SYSC_H__
6#define __DT_BINDINGS_POWER_R8A77990_SYSC_H__
7
8/*
9 * These power domain indices match the numbers of the interrupt bits
10 * representing the power areas in the various Interrupt Registers
11 * (e.g. SYSCISR, Interrupt Status Register)
12 */
13
14#define R8A77990_PD_CA53_CPU0 5
15#define R8A77990_PD_CA53_CPU1 6
16#define R8A77990_PD_CR7 13
17#define R8A77990_PD_A3VC 14
18#define R8A77990_PD_3DG_A 17
19#define R8A77990_PD_3DG_B 18
20#define R8A77990_PD_CA53_SCU 21
21#define R8A77990_PD_A2VC1 26
22
23/* Always-on power area */
24#define R8A77990_PD_ALWAYS_ON 32
25
26#endif /* __DT_BINDINGS_POWER_R8A77990_SYSC_H__ */