arm64: r8a77965 Salvator-X SoC/board support prototype
Subsystems (5)
Magnus Damm
maintainerPATCH v2 1/1 arm64: r8a77965 Salvator-X SoC/board support prototype
From: Magnus Damm <[email protected]>
Here's V2 of a simple prototype hack to get the R-Car M3-N SoC working with the r8a77965 Salvator-X. This version has been updated to fit on top of "renesas-drivers-2018-01-09-v4.15-rc7".
The following patches are picked from renesas-bsp @ kernel.org and in particular the recent "rcar-3.5.9.rc2" release:
dca5c4d1adc6 arm64: renesas: Add Renesas R8A77965 Kconfig support6f3c0086b8b2 soc: renesas: identify R-Car M3N711dec8fc1df soc: renesas: rcar-rst: Add R8A77965 support (*)c8418d81dd26 clk: renesas: Add r8a77965 CPG Core Clock Definitionsd642ad7d1a40 clk: renesas: cpg-mssr: Add support for R-Car M3N (*)4cec6dcde2f5 arm64: dts: r8a77965: Add Renesas R8A77965 SoC support (*) 92be4952a4d5 arm64: dts: r8a77965-salvator-x: Add Salvator-X board on R8A77965 SoC support (*) 1c69363cc1eb arm64: dts: r8a77965-salvator-x: Add reserved memory regions
Commits above original author is Kihara-san:
Commits marked with (*) above have been updated to fit on upstream
Since this is prototype code and not suitable for mainline merge as-is:
---
Documentation/devicetree/bindings/arm/shmobile.txt | 4 Documentation/devicetree/bindings/clock/renesas,cpg-mssr.txt | 5 arch/arm64/Kconfig.platforms | 6 arch/arm64/boot/dts/renesas/Makefile | 1 arch/arm64/boot/dts/renesas/r8a77965-salvator-x.dts | 79 ++++ arch/arm64/boot/dts/renesas/r8a77965.dtsi | 141 +++++++ drivers/clk/renesas/Kconfig | 5 drivers/clk/renesas/Makefile | 1 drivers/clk/renesas/r8a77965-cpg-mssr.c | 195 ++++++++++ drivers/clk/renesas/renesas-cpg-mssr.c | 6 drivers/clk/renesas/renesas-cpg-mssr.h | 1 drivers/soc/renesas/Kconfig | 4 drivers/soc/renesas/rcar-rst.c | 1 drivers/soc/renesas/renesas-soc.c | 8 include/dt-bindings/clock/r8a77965-cpg-mssr.h | 66 +++ 15 files changed, 519 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/arm/shmobile.txt +4 -0
@@ -39,6 +39,8 @@ SoCs: compatible = "renesas,r8a7795" - R-Car M3-W (R8A77960) compatible = "renesas,r8a7796" + - R-Car M3-N (R8A77965) + compatible = "renesas,r8a77965" - R-Car V3M (R8A77970) compatible = "renesas,r8a77970" - R-Car D3 (R8A77995)
@@ -102,6 +104,8 @@ Boards: compatible = "renesas,salvator-x", "renesas,r8a7795" - Salvator-X (RTP0RC7796SIPB0011S) compatible = "renesas,salvator-x", "renesas,r8a7796" + - Salvator-X (RTP0RC7796SIPB0011S (M3-N)) + compatible = "renesas,salvator-x", "renesas,r8a77965" - Salvator-XS (Salvator-X 2nd version, RTP0RC7795SIPB0012S) compatible = "renesas,salvator-xs", "renesas,r8a7795" - Salvator-XS (Salvator-X 2nd version, RTP0RC7796SIPB0012S)
Documentation/devicetree/bindings/clock/renesas,cpg-mssr.txt +3 -2
@@ -22,6 +22,7 @@ Required Properties: - "renesas,r8a7794-cpg-mssr" for the r8a7794 SoC (R-Car E2) - "renesas,r8a7795-cpg-mssr" for the r8a7795 SoC (R-Car H3) - "renesas,r8a7796-cpg-mssr" for the r8a7796 SoC (R-Car M3-W) + - "renesas,r8a77965-cpg-mssr" for the r8a77965 SoC (R-Car M3-N) - "renesas,r8a77970-cpg-mssr" for the r8a77970 SoC (R-Car V3M) - "renesas,r8a77995-cpg-mssr" for the r8a77995 SoC (R-Car D3)
@@ -32,8 +33,8 @@ Required Properties: clock-names - clock-names: List of external parent clock names. Valid names are: - "extal" (r8a7743, r8a7745, r8a7790, r8a7791, r8a7792, r8a7793, r8a7794, - r8a7795, r8a7796, r8a77970, r8a77995) - - "extalr" (r8a7795, r8a7796, r8a77970) + r8a7795, r8a7796, r8a77965, r8a77970, r8a77995) + - "extalr" (r8a7795, r8a7796, r8a77965, r8a77970) - "usb_extal" (r8a7743, r8a7745, r8a7790, r8a7791, r8a7793, r8a7794) - #clock-cells: Must be 2
arch/arm64/Kconfig.platforms +6 -0
@@ -202,6 +202,12 @@ config ARCH_R8A77995 help This enables support for the Renesas R-Car D3 SoC. +config ARCH_R8A77965 + bool "Renesas R-Car M3N SoC Platform" + depends on ARCH_RENESAS + help + This enables support for the Renesas R-Car M3N SoC. + config ARCH_STRATIX10 bool "Altera's Stratix 10 SoCFPGA Family" help
arch/arm64/boot/dts/renesas/Makefile +1 -0
@@ -7,5 +7,6 @@ dtb-$(CONFIG_ARCH_R8A7795) += r8a7795-es dtb-$(CONFIG_ARCH_R8A7796) += r8a7796-salvator-x.dtb r8a7796-m3ulcb.dtb dtb-$(CONFIG_ARCH_R8A7796) += r8a7796-m3ulcb-kf.dtb dtb-$(CONFIG_ARCH_R8A7796) += r8a7796-salvator-xs.dtb +dtb-$(CONFIG_ARCH_R8A77965) += r8a77965-salvator-x.dtb dtb-$(CONFIG_ARCH_R8A77970) += r8a77970-eagle.dtb r8a77970-v3msk.dtb dtb-$(CONFIG_ARCH_R8A77995) += r8a77995-draak.dtb
arch/arm64/boot/dts/renesas/r8a77965-salvator-x.dts new file +79 -0
79 lines not on this page · raw message
arch/arm64/boot/dts/renesas/r8a77965.dtsi new file +141 -0
141 lines not on this page · raw message
drivers/clk/renesas/Kconfig +5 -0
@@ -15,6 +15,7 @@ config CLK_RENESAS select CLK_R8A7794 if ARCH_R8A7794 select CLK_R8A7795 if ARCH_R8A7795 select CLK_R8A7796 if ARCH_R8A7796 + select CLK_R8A77965 if ARCH_R8A77965 select CLK_R8A77970 if ARCH_R8A77970 select CLK_R8A77995 if ARCH_R8A77995 select CLK_SH73A0 if ARCH_SH73A0
@@ -97,6 +98,10 @@ config CLK_R8A7796 bool "R-Car M3-W clock support" if COMPILE_TEST select CLK_RCAR_GEN3_CPG +config CLK_R8A77965 + bool "R-Car M3-N clock support" if COMPILE_TEST + select CLK_RCAR_GEN3_CPG + config CLK_R8A77970 bool "R-Car V3M clock support" if COMPILE_TEST select CLK_RCAR_GEN3_CPG
drivers/clk/renesas/Makefile +1 -0
@@ -14,6 +14,7 @@ obj-$(CONFIG_CLK_R8A7792) += r8a7792-cp obj-$(CONFIG_CLK_R8A7794) += r8a7794-cpg-mssr.o obj-$(CONFIG_CLK_R8A7795) += r8a7795-cpg-mssr.o obj-$(CONFIG_CLK_R8A7796) += r8a7796-cpg-mssr.o +obj-$(CONFIG_CLK_R8A77965) += r8a77965-cpg-mssr.o obj-$(CONFIG_CLK_R8A77970) += r8a77970-cpg-mssr.o obj-$(CONFIG_CLK_R8A77995) += r8a77995-cpg-mssr.o obj-$(CONFIG_CLK_SH73A0) += clk-sh73a0.o
drivers/clk/renesas/r8a77965-cpg-mssr.c new file +195 -0
195 lines not on this page · raw message
drivers/clk/renesas/renesas-cpg-mssr.c +6 -0
@@ -705,6 +705,12 @@ static const struct of_device_id cpg_mss .data = &r8a77995_cpg_mssr_info, },#endif +#ifdef CONFIG_ARCH_R8A77965 + { + .compatible = "renesas,r8a77965-cpg-mssr", + .data = &r8a77965_cpg_mssr_info, + }, +#endif {/* sentinel */ } };
drivers/clk/renesas/renesas-cpg-mssr.h +1 -0
@@ -139,6 +139,7 @@ extern const struct cpg_mssr_info r8a779extern const struct cpg_mssr_info r8a7794_cpg_mssr_info;extern const struct cpg_mssr_info r8a7795_cpg_mssr_info;extern const struct cpg_mssr_info r8a7796_cpg_mssr_info; +extern const struct cpg_mssr_info r8a77965_cpg_mssr_info;extern const struct cpg_mssr_info r8a77970_cpg_mssr_info;extern const struct cpg_mssr_info r8a77995_cpg_mssr_info;
drivers/soc/renesas/Kconfig +2 -2
@@ -3,8 +3,8 @@ config SOC_RENESAS default y if ARCH_RENESAS select SOC_BUS select RST_RCAR if ARCH_RCAR_GEN1 || ARCH_RCAR_GEN2 || \ - ARCH_R8A7795 || ARCH_R8A7796 || ARCH_R8A77970 || \ - ARCH_R8A77995 + ARCH_R8A7795 || ARCH_R8A7796 || ARCH_R8A77965 || \ + ARCH_R8A77970 || ARCH_R8A77995 select SYSC_R8A7743 if ARCH_R8A7743 select SYSC_R8A7745 if ARCH_R8A7745 select SYSC_R8A7779 if ARCH_R8A7779
drivers/soc/renesas/rcar-rst.c +1 -0
@@ -41,6 +41,7 @@ static const struct of_device_id rcar_rs/* R-Car Gen3 is handled like R-Car Gen2 */ { .compatible = "renesas,r8a7795-rst", .data = &rcar_rst_gen2 }, { .compatible = "renesas,r8a7796-rst", .data = &rcar_rst_gen2 }, + { .compatible = "renesas,r8a77965-rst", .data = &rcar_rst_gen2 }, { .compatible = "renesas,r8a77970-rst", .data = &rcar_rst_gen2 }, { .compatible = "renesas,r8a77995-rst", .data = &rcar_rst_gen2 }, {/* sentinel */ }
drivers/soc/renesas/renesas-soc.c +8 -0
@@ -154,6 +154,11 @@ static const struct renesas_soc soc_rcar .id = 0x58, }; +static const struct renesas_soc soc_rcar_m3_n__initconst __maybe_unused = { + .family = &fam_rcar_gen3, + .id =0x55 , +}; +static const struct renesas_soc soc_shmobile_ag5__initconst __maybe_unused = { .family = &fam_shmobile, .id =0x37 ,
@@ -215,6 +220,9 @@ static const struct of_device_id renesas #ifdef CONFIG_ARCH_R8A77995 { .compatible = "renesas,r8a77995", .data = &soc_rcar_d3 }, #endif +#ifdef CONFIG_ARCH_R8A77965 + { .compatible = "renesas,r8a77965", .data = &soc_rcar_m3_n }, +#endif #ifdef CONFIG_ARCH_SH73A0 { .compatible = "renesas,sh73a0", .data = &soc_shmobile_ag5 }, #endif
include/dt-bindings/clock/r8a77965-cpg-mssr.h new file +66 -0
66 lines not on this page · raw message