Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'renesas-drivers-for-v4.14' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/drivers

Pull "Renesas ARM Based SoC Drivers Updates for v4.14" from Simon Horman:

Add R-Car D3 (r8a77995) support to the Renesas-specific SoC drivers
- SoC identification
- System controller
- Reset controller

* tag 'renesas-drivers-for-v4.14' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
soc: renesas: rcar-rst: Add support for R-Car D3
soc: renesas: rcar-sysc: Add support for R-Car D3 power areas
soc: renesas: Add r8a77995 SYSC PM Domain Binding Definitions
soc: renesas: Identify R-Car D3

+76 -1
+1
Documentation/devicetree/bindings/power/renesas,rcar-sysc.txt
··· 17 17 - "renesas,r8a7794-sysc" (R-Car E2) 18 18 - "renesas,r8a7795-sysc" (R-Car H3) 19 19 - "renesas,r8a7796-sysc" (R-Car M3-W) 20 + - "renesas,r8a77995-sysc" (R-Car D3) 20 21 - reg: Address start and address range for the device. 21 22 - #power-domain-cells: Must be 1. 22 23
+1
Documentation/devicetree/bindings/reset/renesas,rst.txt
··· 26 26 - "renesas,r8a7794-rst" (R-Car E2) 27 27 - "renesas,r8a7795-rst" (R-Car H3) 28 28 - "renesas,r8a7796-rst" (R-Car M3-W) 29 + - "renesas,r8a77995-rst" (R-Car D3) 29 30 - reg: Address start and address range for the device. 30 31 31 32
+6 -1
drivers/soc/renesas/Kconfig
··· 3 3 default y if ARCH_RENESAS 4 4 select SOC_BUS 5 5 select RST_RCAR if ARCH_RCAR_GEN1 || ARCH_RCAR_GEN2 || \ 6 - ARCH_R8A7795 || ARCH_R8A7796 6 + ARCH_R8A7795 || ARCH_R8A7796 || ARCH_R8A77995 7 7 select SYSC_R8A7743 if ARCH_R8A7743 8 8 select SYSC_R8A7745 if ARCH_R8A7745 9 9 select SYSC_R8A7779 if ARCH_R8A7779 ··· 13 13 select SYSC_R8A7794 if ARCH_R8A7794 14 14 select SYSC_R8A7795 if ARCH_R8A7795 15 15 select SYSC_R8A7796 if ARCH_R8A7796 16 + select SYSC_R8A77995 if ARCH_R8A77995 16 17 17 18 if SOC_RENESAS 18 19 ··· 52 51 53 52 config SYSC_R8A7796 54 53 bool "R-Car M3-W System Controller support" if COMPILE_TEST 54 + select SYSC_RCAR 55 + 56 + config SYSC_R8A77995 57 + bool "R-Car D3 System Controller support" if COMPILE_TEST 55 58 select SYSC_RCAR 56 59 57 60 # Family
+1
drivers/soc/renesas/Makefile
··· 11 11 obj-$(CONFIG_SYSC_R8A7794) += r8a7794-sysc.o 12 12 obj-$(CONFIG_SYSC_R8A7795) += r8a7795-sysc.o 13 13 obj-$(CONFIG_SYSC_R8A7796) += r8a7796-sysc.o 14 + obj-$(CONFIG_SYSC_R8A77995) += r8a77995-sysc.o 14 15 15 16 # Family 16 17 obj-$(CONFIG_RST_RCAR) += rcar-rst.o
+31
drivers/soc/renesas/r8a77995-sysc.c
··· 1 + /* 2 + * Renesas R-Car D3 System Controller 3 + * 4 + * Copyright (C) 2017 Glider bvba 5 + * 6 + * This program is free software; you can redistribute it and/or modify 7 + * it under the terms of the GNU General Public License as published by 8 + * the Free Software Foundation; version 2 of the License. 9 + */ 10 + 11 + #include <linux/bug.h> 12 + #include <linux/kernel.h> 13 + #include <linux/sys_soc.h> 14 + 15 + #include <dt-bindings/power/r8a77995-sysc.h> 16 + 17 + #include "rcar-sysc.h" 18 + 19 + static struct rcar_sysc_area r8a77995_areas[] __initdata = { 20 + { "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, 22 + PD_SCU }, 23 + { "ca53-cpu0", 0x200, 0, R8A77995_PD_CA53_CPU0, R8A77995_PD_CA53_SCU, 24 + PD_CPU_NOCR }, 25 + }; 26 + 27 + 28 + const struct rcar_sysc_info r8a77995_sysc_info __initconst = { 29 + .areas = r8a77995_areas, 30 + .num_areas = ARRAY_SIZE(r8a77995_areas), 31 + };
+1
drivers/soc/renesas/rcar-rst.c
··· 41 41 /* R-Car Gen3 is handled like R-Car Gen2 */ 42 42 { .compatible = "renesas,r8a7795-rst", .data = &rcar_rst_gen2 }, 43 43 { .compatible = "renesas,r8a7796-rst", .data = &rcar_rst_gen2 }, 44 + { .compatible = "renesas,r8a77995-rst", .data = &rcar_rst_gen2 }, 44 45 { /* sentinel */ } 45 46 }; 46 47
+3
drivers/soc/renesas/rcar-sysc.c
··· 284 284 #ifdef CONFIG_SYSC_R8A7796 285 285 { .compatible = "renesas,r8a7796-sysc", .data = &r8a7796_sysc_info }, 286 286 #endif 287 + #ifdef CONFIG_SYSC_R8A77995 288 + { .compatible = "renesas,r8a77995-sysc", .data = &r8a77995_sysc_info }, 289 + #endif 287 290 { /* sentinel */ } 288 291 }; 289 292
+1
drivers/soc/renesas/rcar-sysc.h
··· 58 58 extern const struct rcar_sysc_info r8a7794_sysc_info; 59 59 extern const struct rcar_sysc_info r8a7795_sysc_info; 60 60 extern const struct rcar_sysc_info r8a7796_sysc_info; 61 + extern const struct rcar_sysc_info r8a77995_sysc_info; 61 62 62 63 63 64 /*
+8
drivers/soc/renesas/renesas-soc.c
··· 144 144 .id = 0x52, 145 145 }; 146 146 147 + static const struct renesas_soc soc_rcar_d3 __initconst __maybe_unused = { 148 + .family = &fam_rcar_gen3, 149 + .id = 0x58, 150 + }; 151 + 147 152 static const struct renesas_soc soc_shmobile_ag5 __initconst __maybe_unused = { 148 153 .family = &fam_shmobile, 149 154 .id = 0x37, ··· 203 198 #endif 204 199 #ifdef CONFIG_ARCH_R8A7796 205 200 { .compatible = "renesas,r8a7796", .data = &soc_rcar_m3_w }, 201 + #endif 202 + #ifdef CONFIG_ARCH_R8A77995 203 + { .compatible = "renesas,r8a77995", .data = &soc_rcar_d3 }, 206 204 #endif 207 205 #ifdef CONFIG_ARCH_SH73A0 208 206 { .compatible = "renesas,sh73a0", .data = &soc_shmobile_ag5 },
+23
include/dt-bindings/power/r8a77995-sysc.h
··· 1 + /* 2 + * Copyright (C) 2017 Glider bvba 3 + * 4 + * This program is free software; you can redistribute it and/or modify 5 + * it under the terms of the GNU General Public License as published by 6 + * the Free Software Foundation; version 2 of the License. 7 + */ 8 + #ifndef __DT_BINDINGS_POWER_R8A77995_SYSC_H__ 9 + #define __DT_BINDINGS_POWER_R8A77995_SYSC_H__ 10 + 11 + /* 12 + * These power domain indices match the numbers of the interrupt bits 13 + * representing the power areas in the various Interrupt Registers 14 + * (e.g. SYSCISR, Interrupt Status Register) 15 + */ 16 + 17 + #define R8A77995_PD_CA53_CPU0 5 18 + #define R8A77995_PD_CA53_SCU 21 19 + 20 + /* Always-on power area */ 21 + #define R8A77995_PD_ALWAYS_ON 32 22 + 23 + #endif /* __DT_BINDINGS_POWER_R8A77995_SYSC_H__ */