Commit 064652ad authored by Olof Johansson's avatar Olof Johansson
Browse files

Merge tag 'renesas-drivers-for-v5.5-tag2' of...

Merge tag 'renesas-drivers-for-v5.5-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/drivers

Renesas driver updates for v5.5 (take two)

  - Initial support for the R-Car M3-W+ (r8a77961) SoC,
  - A minor fix.

* tag 'renesas-drivers-for-v5.5-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  soc: renesas: rcar-sysc: Add R8A77961 support
  soc: renesas: rcar-rst: Add R8A77961 support
  soc: renesas: Identify R-Car M3-W+
  soc: renesas: Add ARCH_R8A77961 for new R-Car M3-W+
  soc: renesas: Add ARCH_R8A77960 for existing R-Car M3-W
  soc: renesas: Rename SYSC_R8A7796 to SYSC_R8A77960
  soc: renesas: Add missing check for non-zero product register address
  dt-bindings: clock: Add r8a77961 CPG Core Clock Definitions
  dt-bindings: power: Add r8a77961 SYSC power domain definitions

Link: https://lore.kernel.org/r/20191101155842.31467-6-geert+renesas@glider.be


Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parents e6ce7f5a bdde3d3e
Loading
Loading
Loading
Loading
+18 −3
Original line number Diff line number Diff line
@@ -199,13 +199,24 @@ config ARCH_R8A7795
	help
	  This enables support for the Renesas R-Car H3 SoC.

config ARCH_R8A77960
	bool
	select ARCH_RCAR_GEN3
	select SYSC_R8A77960

config ARCH_R8A7796
	bool "Renesas R-Car M3-W SoC Platform"
	select ARCH_RCAR_GEN3
	select SYSC_R8A7796
	select ARCH_R8A77960
	help
	  This enables support for the Renesas R-Car M3-W SoC.

config ARCH_R8A77961
	bool "Renesas R-Car M3-W+ SoC Platform"
	select ARCH_RCAR_GEN3
	select SYSC_R8A77961
	help
	  This enables support for the Renesas R-Car M3-W+ SoC.

config ARCH_R8A77965
	bool "Renesas R-Car M3-N SoC Platform"
	select ARCH_RCAR_GEN3
@@ -292,10 +303,14 @@ config SYSC_R8A7795
	bool "R-Car H3 System Controller support" if COMPILE_TEST
	select SYSC_RCAR

config SYSC_R8A7796
config SYSC_R8A77960
	bool "R-Car M3-W System Controller support" if COMPILE_TEST
	select SYSC_RCAR

config SYSC_R8A77961
	bool "R-Car M3-W+ System Controller support" if COMPILE_TEST
	select SYSC_RCAR

config SYSC_R8A77965
	bool "R-Car M3-N System Controller support" if COMPILE_TEST
	select SYSC_RCAR
+2 −1
Original line number Diff line number Diff line
@@ -15,7 +15,8 @@ obj-$(CONFIG_SYSC_R8A7791) += r8a7791-sysc.o
obj-$(CONFIG_SYSC_R8A7792)	+= r8a7792-sysc.o
obj-$(CONFIG_SYSC_R8A7794)	+= r8a7794-sysc.o
obj-$(CONFIG_SYSC_R8A7795)	+= r8a7795-sysc.o
obj-$(CONFIG_SYSC_R8A7796)	+= r8a7796-sysc.o
obj-$(CONFIG_SYSC_R8A77960)	+= r8a7796-sysc.o
obj-$(CONFIG_SYSC_R8A77961)	+= r8a7796-sysc.o
obj-$(CONFIG_SYSC_R8A77965)	+= r8a77965-sysc.o
obj-$(CONFIG_SYSC_R8A77970)	+= r8a77970-sysc.o
obj-$(CONFIG_SYSC_R8A77980)	+= r8a77980-sysc.o
+15 −12
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0
/*
 * Renesas R-Car M3-W System Controller
 * Renesas R-Car M3-W/W+ System Controller
 *
 * Copyright (C) 2016 Glider bvba
 * Copyright (C) 2018-2019 Renesas Electronics Corporation
 */

#include <linux/bits.h>
#include <linux/kernel.h>
#include <linux/sys_soc.h>

#include <dt-bindings/power/r8a7796-sysc.h>

#include "rcar-sysc.h"

static const struct rcar_sysc_area r8a7796_areas[] __initconst = {
static struct rcar_sysc_area r8a7796_areas[] __initdata = {
	{ "always-on",	    0, 0, R8A7796_PD_ALWAYS_ON,	-1, PD_ALWAYS_ON },
	{ "ca57-scu",	0x1c0, 0, R8A7796_PD_CA57_SCU,	R8A7796_PD_ALWAYS_ON,
	  PD_SCU },
@@ -41,24 +41,27 @@ static const struct rcar_sysc_area r8a7796_areas[] __initconst = {
};


/* Fixups for R-Car M3-W ES1.x revision */
static const struct soc_device_attribute r8a7796es1[] __initconst = {
	{ .soc_id = "r8a7796", .revision = "ES1.*" },
	{ /* sentinel */ }
#ifdef CONFIG_SYSC_R8A77960
const struct rcar_sysc_info r8a77960_sysc_info __initconst = {
	.areas = r8a7796_areas,
	.num_areas = ARRAY_SIZE(r8a7796_areas),
};
#endif /* CONFIG_SYSC_R8A77960 */

static int __init r8a7796_sysc_init(void)
#ifdef CONFIG_SYSC_R8A77961
static int __init r8a77961_sysc_init(void)
{
	if (soc_device_match(r8a7796es1))
		r8a7796_sysc_info.extmask_val = 0;
	rcar_sysc_nullify(r8a7796_areas, ARRAY_SIZE(r8a7796_areas),
			  R8A7796_PD_A2VC0);

	return 0;
}

struct rcar_sysc_info r8a7796_sysc_info __initdata = {
	.init = r8a7796_sysc_init,
const struct rcar_sysc_info r8a77961_sysc_info __initconst = {
	.init = r8a77961_sysc_init,
	.areas = r8a7796_areas,
	.num_areas = ARRAY_SIZE(r8a7796_areas),
	.extmask_offs = 0x2f8,
	.extmask_val = BIT(0),
};
#endif /* CONFIG_SYSC_R8A77961 */
+1 −0
Original line number Diff line number Diff line
@@ -59,6 +59,7 @@ static const struct of_device_id rcar_rst_matches[] __initconst = {
	/* R-Car Gen3 */
	{ .compatible = "renesas,r8a7795-rst", .data = &rcar_rst_gen3 },
	{ .compatible = "renesas,r8a7796-rst", .data = &rcar_rst_gen3 },
	{ .compatible = "renesas,r8a77961-rst", .data = &rcar_rst_gen3 },
	{ .compatible = "renesas,r8a77965-rst", .data = &rcar_rst_gen3 },
	{ .compatible = "renesas,r8a77970-rst", .data = &rcar_rst_gen3 },
	{ .compatible = "renesas,r8a77980-rst", .data = &rcar_rst_gen3 },
+5 −2
Original line number Diff line number Diff line
@@ -313,8 +313,11 @@ static const struct of_device_id rcar_sysc_matches[] __initconst = {
#ifdef CONFIG_SYSC_R8A7795
	{ .compatible = "renesas,r8a7795-sysc", .data = &r8a7795_sysc_info },
#endif
#ifdef CONFIG_SYSC_R8A7796
	{ .compatible = "renesas,r8a7796-sysc", .data = &r8a7796_sysc_info },
#ifdef CONFIG_SYSC_R8A77960
	{ .compatible = "renesas,r8a7796-sysc", .data = &r8a77960_sysc_info },
#endif
#ifdef CONFIG_SYSC_R8A77961
	{ .compatible = "renesas,r8a77961-sysc", .data = &r8a77961_sysc_info },
#endif
#ifdef CONFIG_SYSC_R8A77965
	{ .compatible = "renesas,r8a77965-sysc", .data = &r8a77965_sysc_info },
Loading