Add RZ/G2N SYSC/RST/Clock/PFC support
Subsystems (9)
cover Add RZ/G2N SYSC/RST/Clock/PFC support
This patch series add support for RZ/G2N board with serial debug console.
Biju Das (18):
dt-bindings: arm: renesas: Document RZ/G2N SoC DT bindings
dt-bindings: arm: renesas: Add HopeRun RZ/G2N boards
soc: renesas: Add Renesas R8A774B1 config option
soc: renesas: Identify RZ/G2N
dt-bindings: power: Add r8a774b1 SYSC power domain definitions
dt-bindings: power: rcar-sysc: Document r8a774b1 sysc
soc: renesas: rcar-sysc: Add r8a774b1 support
dt-bindings: reset: rcar-rst: Document r8a774b1 reset module
soc: renesas: rcar-rst: Add support for RZ/G2N
dt-bindings: clk: Add r8a774b1 CPG Core Clock Definitions
dt-bindings: clock: renesas: cpg-mssr: Document r8a774b1 binding
clk: renesas: cpg-mssr: Add r8a774b1 support
dt-bindings: pinctrl: sh-pfc: Document r8a774b1 PFC support
pinctrl: sh-pfc: r8a77965: Add R8A774B1 PFC support
dt-bindings: serial: sh-sci: Document r8a774b1 bindings
arm64: dts: renesas: Initial r8a774b1 SoC device tree
arm64: dts: renesas: Add HiHope RZ/G2N main board support
arm64: defconfig: Enable R8A774B1 SoC
Geert Uytterhoeven (11):
soc: renesas: rcar-sysc: Prepare for fixing power request conflicts
soc: renesas: r8a7795-sysc: Fix power request conflicts
soc: renesas: r8a7796-sysc: Fix power request conflicts
soc: renesas: r8a77965-sysc: Fix power request conflicts
soc: renesas: r8a77970-sysc: Fix power request conflicts
soc: renesas: r8a77980-sysc: Fix power request conflicts
soc: renesas: r8a77990-sysc: Fix power request conflicts
soc: renesas: r8a774c0-sysc: Fix power request conflicts
pinctrl: sh-pfc: r8a77965: Replace DU_DOTCLKIN2 by DU_DOTCLKIN3
pinctrl: sh-pfc: r8a77965: Add TPU pins, groups and functions
pinctrl: sh-pfc: r8a77965: Use new macros for non-GPIO pins
Hoan Nguyen An (2):
pinctrl: sh-pfc: r8a77965: Add Audio clock pin support
pinctrl: sh-pfc: r8a77965: Add Audio SSI pin support
Jacopo Mondi (1):
pinctrl: sh-pfc: r8a77965: Add VIN[4|5] groups/functions
Keiya Nobuta (1):
pinctrl: sh-pfc: pfc-r8a77965: Fix typo in pinmux macro for SCL3
Takeshi Kihara (6):
pinctrl: sh-pfc: r8a77965: Add SATA pins, groups and functions
pinctrl: sh-pfc: r8a77965: Add CAN pins, groups and functions
pinctrl: sh-pfc: r8a77965: Add CAN FD pins, groups and functions
pinctrl: sh-pfc: r8a77965: Add TMU pins, groups and functions
pinctrl: sh-pfc: r8a77965: Add DRIF pins, groups and functions
pinctrl: sh-pfc: r8a77965: Add I2C{0,3,5} pins, groups and functions
Documentation/devicetree/bindings/arm/shmobile.txt | 9 +- .../devicetree/bindings/clock/renesas,cpg-mssr.txt | 10 +- .../bindings/pinctrl/renesas,pfc-pinctrl.txt | 1 + .../bindings/power/renesas,rcar-sysc.txt | 1 + .../devicetree/bindings/reset/renesas,rst.txt | 1 + .../bindings/serial/renesas,sci-serial.txt | 2 + arch/arm64/Kconfig.platforms | 6 + arch/arm64/boot/dts/renesas/Makefile | 1 + .../boot/dts/renesas/r8a774b1-hihope-rzg2n.dts | 26 + arch/arm64/boot/dts/renesas/r8a774b1.dtsi | 472 +++++ arch/arm64/configs/defconfig | 1 + drivers/clk/renesas/Kconfig | 5 + drivers/clk/renesas/Makefile | 1 + drivers/clk/renesas/r8a774b1-cpg-mssr.c | 322 +++ drivers/clk/renesas/renesas-cpg-mssr.c | 6 + drivers/clk/renesas/renesas-cpg-mssr.h | 1 + drivers/pinctrl/sh-pfc/Kconfig | 5 + drivers/pinctrl/sh-pfc/Makefile | 1 + drivers/pinctrl/sh-pfc/core.c | 6 + drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 2234 ++++++++++++++++---- drivers/pinctrl/sh-pfc/sh_pfc.h | 1 + drivers/soc/renesas/Kconfig | 12 +- drivers/soc/renesas/Makefile | 1 + drivers/soc/renesas/r8a774b1-sysc.c | 37 + drivers/soc/renesas/r8a774c0-sysc.c | 3 + drivers/soc/renesas/r8a7795-sysc.c | 32 +- drivers/soc/renesas/r8a7796-sysc.c | 22 +- drivers/soc/renesas/r8a77965-sysc.c | 3 + drivers/soc/renesas/r8a77970-sysc.c | 3 + drivers/soc/renesas/r8a77980-sysc.c | 3 + drivers/soc/renesas/r8a77990-sysc.c | 3 + drivers/soc/renesas/rcar-rst.c | 1 + drivers/soc/renesas/rcar-sysc.c | 19 + drivers/soc/renesas/rcar-sysc.h | 8 +- drivers/soc/renesas/renesas-soc.c | 8 + include/dt-bindings/clock/r8a774b1-cpg-mssr.h | 57 + include/dt-bindings/power/r8a774b1-sysc.h | 26 + 37 files changed, 2881 insertions(+), 469 deletions(-) create mode 100644 arch/arm64/boot/dts/renesas/r8a774b1-hihope-rzg2n.dts create mode 100644 arch/arm64/boot/dts/renesas/r8a774b1.dtsi create mode 100644 drivers/clk/renesas/r8a774b1-cpg-mssr.c create mode 100644 drivers/soc/renesas/r8a774b1-sysc.c create mode 100644 include/dt-bindings/clock/r8a774b1-cpg-mssr.h create mode 100644 include/dt-bindings/power/r8a774b1-sysc.h
Signature · 1 line
2.7.4
PATCH 1/39 dt-bindings: arm: renesas: Document RZ/G2N SoC DT bindings
commit 28a5f64ad9c41bfc8a12982fb95637e842b3cd7c upstream.
Add device tree bindings documentation for the Renesas RZ/G2N (r8a774b1) SoC.
--- Documentation/devicetree/bindings/arm/shmobile.txt | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/arm/shmobile.txt +2 -0
@@ -25,6 +25,8 @@ SoCs: compatible = "renesas,r8a77470" - RZ/G2M (R8A774A1) compatible = "renesas,r8a774a1" + - RZ/G2N (R8A774B1) + compatible = "renesas,r8a774b1" - RZ/G2E (R8A774C0) compatible = "renesas,r8a774c0" - R-Car M1A (R8A77781)
Signature · 1 line
2.7.4
PATCH 2/39 dt-bindings: arm: renesas: Add HopeRun RZ/G2N boards
In reply to Biju Dascommit d30286ebbace486af71d3fc35a6ea941c19eb66d upstream.
This patch adds board HiHope RZ/G2N (the main board, powered by the R8A774B1) and board HiHope RZ/G2 EX (the expansion board that sits on top of the HiHope RZ/G2N). Both boards are made by Jiangsu HopeRun Software Co., Ltd. (a.k.a. HopeRun).
--- Documentation/devicetree/bindings/arm/shmobile.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/arm/shmobile.txt +5 -2
@@ -92,10 +92,13 @@ Boards: - Henninger compatible = "renesas,henninger", "renesas,r8a7791" - HopeRun expansion board for HiHope RZ/G2 platforms - compatible = "hoperun,hihope-rzg2-ex", "hoperun,hihope-rzg2m", - "renesas,r8a774a1" + compatible = "hoperun,hihope-rzg2m", "renesas,r8a774a1", + "hoperun,hihope-rzg2n", "renesas,r8a774b1", + "hoperun,hihope-rzg2-ex" - HopeRun HiHope RZ/G2M platform compatible = "hoperun,hihope-rzg2m", "renesas,r8a774a1" + - HopeRun HiHope RZ/G2N platform + compatible = "hoperun,hihope-rzg2n", "renesas,r8a774b1" - iWave Systems RZ/G1C Single Board Computer (iW-RainboW-G23S) compatible = "iwave,g23s", "renesas,r8a77470" - iWave Systems RZ/G1E SODIMM SOM Development Platform (iW-RainboW-G22D)
Signature · 1 line
2.7.4
PATCH 3/39 soc: renesas: Add Renesas R8A774B1 config option
In reply to Biju Dascommit d634055c4b0f8c24269959f64b7d4a1a8d87d630 upstream.
Add configuration option for the RZ/G2N (R8A774B1) SoC.
--- arch/arm64/Kconfig.platforms | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm64/Kconfig.platforms +6 -0
@@ -195,6 +195,12 @@ config ARCH_R8A774A1 help This enables support for the Renesas RZ/G2M SoC. +config ARCH_R8A774B1 + bool "Renesas RZ/G2N SoC Platform" + depends on ARCH_RENESAS + help + This enables support for the Renesas RZ/G2N SoC. + config ARCH_R8A774C0 bool "Renesas RZ/G2E SoC Platform" depends on ARCH_RENESAS
Signature · 1 line
2.7.4
PATCH 3/39 soc: renesas: Add Renesas R8A774B1 config option
Hi!
Quoted 1 line
Add configuration option for the RZ/G2N (R8A774B1) SoC.
Normally, config option should be close to the end of the series (having it in the begining can be surprising during the bisect, for example).
Best regards,
Pavel
Quoted 14 lines
+++ b/arch/arm64/Kconfig.platforms
arch/arm64/Kconfig.platforms +6
-0@@ -195,6 +195,12 @@ config ARCH_R8A774A1 help This enables support for the Renesas RZ/G2M SoC. +config ARCH_R8A774B1 + bool "Renesas RZ/G2N SoC Platform" + depends on ARCH_RENESAS + help + This enables support for the Renesas RZ/G2N SoC. + config ARCH_R8A774C0 bool "Renesas RZ/G2E SoC Platform" depends on ARCH_RENESAS
Signature · 9 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: Digital signature URL: <http://lists.cip-project.org/pipermail/cip-dev/attachments/20191218/d25d1055/attachment.sig>
PATCH 3/39 soc: renesas: Add Renesas R8A774B1 config option
Hi Pavel,
Thanks for the feedback.
Quoted 12 lines
-----Original Message-----
From: Pavel Machek <[email protected]>
Sent: Wednesday, December 18, 2019 7:28 PM
To: Biju Das <[email protected]>
Cc: cip-dev at lists.cip-project.org; Nobuhiro Iwamatsu <[email protected]>; Pavel Machek <[email protected]>; Chris Paterson <[email protected]>; Marian-Cristian Rotariu <[email protected]>; Fabrizio Castro <[email protected]>
Subject: Re: [PATCH 4.19.y-cip 03/39] soc: renesas: Add Renesas R8A774B1 config option
Quoted 6 lines
Hi!
Quoted 1 line
Add configuration option for the RZ/G2N (R8A774B1) SoC.
Normally, config option should be close to the end of the series (having it in the begining can be surprising during the bisect, for example).
Enabling config option should be close to the end of the series. By adding config option in the early stage allow us to verify each patch that we are adding is compiled properly.
Regards,
Biju
[>]
Quoted 19 lines
Quoted 5 lines
+++ b/arch/arm64/Kconfig.platforms
arch/arm64/Kconfig.platforms +0
-0@@ -195,6 +195,12 @@ config ARCH_R8A774A1 help This enables support for the Renesas RZ/G2M SoC.arch/arm64/Kconfig.platforms config ARCH_R8A774A1 · line 206
Quoted 10 lines
arch/arm64/Kconfig.platforms +6
-0+config ARCH_R8A774B1 + bool "Renesas RZ/G2N SoC Platform" + depends on ARCH_RENESAS + help + This enables support for the Renesas RZ/G2N SoC. + config ARCH_R8A774C0 bool "Renesas RZ/G2E SoC Platform" depends on ARCH_RENESAS--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH 4/39 soc: renesas: Identify RZ/G2N
In reply to Biju Dascommit 574cb721729fccbc252b0caa5ee401393d06c49e upstream.
This patch adds support for identifying the RZ/G2N (r8a774b1) SoC.
--- drivers/soc/renesas/renesas-soc.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/soc/renesas/renesas-soc.c +8 -0
@@ -115,6 +115,11 @@ static const struct renesas_soc soc_rz_g2m __initconst __maybe_unused = { .id = 0x52, }; +static const struct renesas_soc soc_rz_g2n__initconst __maybe_unused = { + .family = &fam_rzg2, + .id =0x55 , +}; +static const struct renesas_soc soc_rz_g2e__initconst __maybe_unused = { .family = &fam_rzg2, .id =0x57 ,
@@ -223,6 +228,9 @@ static const struct of_device_id renesas_socs[] __initconst = { #ifdef CONFIG_ARCH_R8A774A1 { .compatible = "renesas,r8a774a1", .data = &soc_rz_g2m }, #endif +#ifdef CONFIG_ARCH_R8A774B1 + { .compatible = "renesas,r8a774b1", .data = &soc_rz_g2n }, +#endif #ifdef CONFIG_ARCH_R8A774C0 { .compatible = "renesas,r8a774c0", .data = &soc_rz_g2e }, #endif
Signature · 1 line
2.7.4
PATCH 5/39 dt-bindings: power: Add r8a774b1 SYSC power domain definitions
In reply to Biju Dascommit be67c41781cb4c06a4acb0b92db0cbb728e955e2 upstream.
This patch adds power domain indices for the RZ/G2N (a.k.a r8a774b1) SoC.
--- include/dt-bindings/power/r8a774b1-sysc.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 include/dt-bindings/power/r8a774b1-sysc.h
include/dt-bindings/power/r8a774b1-sysc.h new file +26 -0
@@ -0,0 +1,26 @@ +/* SPDX-License-Identifier: GPL-2.0 +* +* Copyright (C) 2019 Renesas Electronics Corp. +*/ +#ifndef __DT_BINDINGS_POWER_R8A774B1_SYSC_H__ +#define __DT_BINDINGS_POWER_R8A774B1_SYSC_H__ + +/* +* These power domain indices match the numbers of the interrupt bits +* representing the power areas in the various Interrupt Registers +* (e.g. SYSCISR, Interrupt Status Register) +*/ + +#define R8A774B1_PD_CA57_CPU0 0 +#define R8A774B1_PD_CA57_CPU1 1 +#define R8A774B1_PD_A3VP 9 +#define R8A774B1_PD_CA57_SCU 12 +#define R8A774B1_PD_A3VC 14 +#define R8A774B1_PD_3DG_A 17 +#define R8A774B1_PD_3DG_B 18 +#define R8A774B1_PD_A2VC1 26 + +/* Always-on power area */ +#define R8A774B1_PD_ALWAYS_ON 32 + +#endif /* __DT_BINDINGS_POWER_R8A774B1_SYSC_H__ */
Signature · 1 line
2.7.4
PATCH 6/39 dt-bindings: power: rcar-sysc: Document r8a774b1 sysc
In reply to Biju Dascommit 56abd14af3c18e8f22dfc74f34c617101b748a4a upstream.
Document bindings for the RZ/G2N (a.k.a. R8A774B1) system controller.
--- Documentation/devicetree/bindings/power/renesas,rcar-sysc.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/power/renesas,rcar-sysc.txt +1 -0
@@ -11,6 +11,7 @@ Required properties: - "renesas,r8a7745-sysc" (RZ/G1E) - "renesas,r8a77470-sysc" (RZ/G1C) - "renesas,r8a774a1-sysc" (RZ/G2M) + - "renesas,r8a774b1-sysc" (RZ/G2N) - "renesas,r8a774c0-sysc" (RZ/G2E) - "renesas,r8a7779-sysc" (R-Car H1) - "renesas,r8a7790-sysc" (R-Car H2)
Signature · 1 line
2.7.4
PATCH 7/39 soc: renesas: rcar-sysc: Prepare for fixing power request conflicts
In reply to Biju DasFrom: Geert Uytterhoeven <[email protected]>
commit 44b5100f7b744b2cd2a29f8766eea5dbf741e0e5 upstream.
Recent R-Car Gen3 SoCs added an External Request Mask Register to the System Controller (SYSC). This register allows to mask external power requests for CPU or 3DG domains, to prevent conflicts between powering off CPU cores or the 3D Graphics Engine, and changing the state of another power domain through SYSC, which could lead to CPG state machine lock-ups.
Add support for making use of this register. Take into account that the register is optional, and that its location and contents are SoC-specific.
Note that the issue fixed by this cannot happen in the upstream kernel, as upstream has no support for graphics acceleration yet. SoCs lacking the External Request Mask Register may need a different mitigation in the future.
Inspired by a patch in the BSP by Dien Pham <[email protected]>.
--- drivers/soc/renesas/rcar-sysc.c | 16 ++++++++++++++++ drivers/soc/renesas/rcar-sysc.h | 3 +++ 2 files changed, 19 insertions(+)
drivers/soc/renesas/rcar-sysc.c +16 -0
@@ -66,6 +66,7 @@ struct rcar_sysc_ch {static void __iomem *rcar_sysc_base;static DEFINE_SPINLOCK (rcar_sysc_lock);/* SMP CPUs + I/O devices */ +static u32 rcar_sysc_extmask_offs, rcar_sysc_extmask_val;static int rcar_sysc_pwr_on_off (const struct rcar_sysc_ch *sysc_ch,bool on) {
@@ -109,6 +110,14 @@ static int rcar_sysc_power(const struct rcar_sysc_ch *sysc_ch, bool on)spin_lock_irqsave (&rcar_sysc_lock, flags);/* +* Mask external power requests for CPU or 3DG domains +*/ +if (rcar_sysc_extmask_val) { +iowrite32 (rcar_sysc_extmask_val, + rcar_sysc_base + rcar_sysc_extmask_offs); + } + +/* * The interrupt source needs to be enabled, but masked, to prevent the * CPU from receiving it. */
@@ -151,6 +160,9 @@ static int rcar_sysc_power(const struct rcar_sysc_ch *sysc_ch, bool on)iowrite32 (isr_mask, rcar_sysc_base +SYSCISCR ); out: +if (rcar_sysc_extmask_val) +iowrite32 (0 , rcar_sysc_base + rcar_sysc_extmask_offs); +spin_unlock_irqrestore (&rcar_sysc_lock, flags); pr_debug("sysc power %s domain %d: %08x -> %d\n", on ? "on" : "off",
@@ -362,6 +374,10 @@ static int __init rcar_sysc_pd_init(void) rcar_sysc_base = base; +/* Optional External Request Mask Register */ + rcar_sysc_extmask_offs = info->extmask_offs; + rcar_sysc_extmask_val = info->extmask_val; + domains =kzalloc (sizeof (*domains),GFP_KERNEL );if (!domains) { error = -ENOMEM ;
drivers/soc/renesas/rcar-sysc.h +3 -0
@@ -47,6 +47,9 @@ struct rcar_sysc_info {int (*init)(void );/* Optional */ const struct rcar_sysc_area *areas;unsigned int num_areas; +/* Optional External Request Mask Register */ +u32 extmask_offs;/* SYSCEXTMASK register offset */ +u32 extmask_val;/* SYSCEXTMASK register mask value */ };extern const struct rcar_sysc_info r8a7743_sysc_info;
Signature · 1 line
2.7.4
PATCH 8/39 soc: renesas: r8a7795-sysc: Fix power request conflicts
In reply to Biju DasFrom: Geert Uytterhoeven <[email protected]>
commit 0e0c4db2fa0982af0956c0eed0a94e0b412ef2f4 upstream.
Describe the location and contents of the SYSCEXTMASK register on R-Car H3, to prevent conflicts between internal and external power requests.
This register does not exist on R-Car H3 ES1.x and ES2.x.
Based on a patch in the BSP by Dien Pham <[email protected]>.
--- drivers/soc/renesas/r8a7795-sysc.c | 32 +++++++++++++++++++++++++++----- drivers/soc/renesas/rcar-sysc.h | 2 +- 2 files changed, 28 insertions(+), 6 deletions(-)
drivers/soc/renesas/r8a7795-sysc.c +27 -5
@@ -8,6 +8,7 @@* the Free Software Foundation; version 2 of the License. */ +#include <linux/bits.h> #include <linux/bug.h> #include <linux/kernel.h> #include <linux/sys_soc.h>
@@ -54,25 +55,46 @@ static struct rcar_sysc_area r8a7795_areas[] __initdata = {/* -* Fixups for R-Car H3 revisions after ES1.x +* Fixups for R-Car H3 revisions */ -static const struct soc_device_attribute r8a7795es1[]__initconst = { - { .soc_id ="r8a7795" , .revision ="ES1.*" }, +#define HAS_A2VC0 BIT(0)/* Power domain A2VC0 is present */ +#define NO_EXTMASK BIT(1)/* Missing SYSCEXTMASK register */ + +static const struct soc_device_attribute r8a7795_quirks_match[]__initconst = { + { + .soc_id ="r8a7795" , .revision ="ES1.*" , + .data = (void *)(HAS_A2VC0 |NO_EXTMASK ), + }, { + .soc_id ="r8a7795" , .revision ="ES2.*" , + .data = (void *)(NO_EXTMASK ), + }, {/* sentinel */ } };static int __init r8a7795_sysc_init (void ) { -if (!soc_device_match (r8a7795es1)) +const struct soc_device_attribute *attr; +u32 quirks =0 ; + + attr =soc_device_match (r8a7795_quirks_match); +if (attr) + quirks = (uintptr_t )attr->data; + +if (!(quirks &HAS_A2VC0 ))rcar_sysc_nullify (r8a7795_areas,ARRAY_SIZE (r8a7795_areas),R8A7795_PD_A2VC0 ); +if (quirks &NO_EXTMASK ) + r8a7795_sysc_info.extmask_val =0 ; +return 0 ; } -const struct rcar_sysc_info r8a7795_sysc_info__initconst = { +struct rcar_sysc_info r8a7795_sysc_info__initdata = { .init = r8a7795_sysc_init, .areas = r8a7795_areas, .num_areas =ARRAY_SIZE (r8a7795_areas), + .extmask_offs =0x2f8 , + .extmask_val =BIT (0 ), };
drivers/soc/renesas/rcar-sysc.h +1 -1
@@ -62,7 +62,7 @@ extern const struct rcar_sysc_info r8a7790_sysc_info;extern const struct rcar_sysc_info r8a7791_sysc_info;extern const struct rcar_sysc_info r8a7792_sysc_info;extern const struct rcar_sysc_info r8a7794_sysc_info; -extern const struct rcar_sysc_info r8a7795_sysc_info; +extern struct rcar_sysc_info r8a7795_sysc_info;extern const struct rcar_sysc_info r8a7796_sysc_info;extern const struct rcar_sysc_info r8a77965_sysc_info;extern const struct rcar_sysc_info r8a77970_sysc_info;
Signature · 1 line
2.7.4
PATCH 8/39 soc: renesas: r8a7795-sysc: Fix power request conflicts
Hi!
Quoted 3 lines
This register does not exist on R-Car H3 ES1.x and ES2.x.
Based on a patch in the BSP by Dien Pham <[email protected]>.
So you are storing bitfield in the pointer, ok.
Quoted 14 lines
drivers/soc/renesas/r8a7795-sysc.c +11
-1- { .soc_id = "r8a7795", .revision = "ES1.*" }, +#define HAS_A2VC0 BIT(0)/* Power domain A2VC0 is present */ +#define NO_EXTMASK BIT(1)/* Missing SYSCEXTMASK register */ + +static const struct soc_device_attribute r8a7795_quirks_match[]__initconst = { + { + .soc_id ="r8a7795" , .revision ="ES1.*" , + .data = (void *)(HAS_A2VC0 |NO_EXTMASK ), + }, { + .soc_id ="r8a7795" , .revision ="ES2.*" , + .data = (void *)(NO_EXTMASK ), + }, {/* sentinel */ } };
drivers/soc/renesas/r8a7795-sysc.c static struct rcar_sysc_area r8a7795_areas[] __initdata = { · line 82
Quoted 10 lines
drivers/soc/renesas/r8a7795-sysc.c +6
-1static int __init r8a7795_sysc_init (void ) { -if (!soc_device_match (r8a7795es1)) +const struct soc_device_attribute *attr; +u32 quirks =0 ; + + attr =soc_device_match (r8a7795_quirks_match); +if (attr) + quirks = (uintptr_t )attr->data;
But now you do strange dance with types. I'd understand quirks being unsigned long (because that's same size as void *). I also could understand quirks being uintptr_t in the first place (but we normally use unsigned long for that in the kernel).
But having it as u32, then casting it over uintptr_t is strange.
Best regards,
Pavel
Signature · 9 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: Digital signature URL: <http://lists.cip-project.org/pipermail/cip-dev/attachments/20191218/47b76ee8/attachment.sig>
PATCH 8/39 soc: renesas: r8a7795-sysc: Fix power request conflicts
Hi Pavel,
I am adding Dien and Geert to provide feedback on you r questions
Regards,
Bij
Quoted 52 lines
-----Original Message-----
From: Pavel Machek <[email protected]>
Sent: Wednesday, December 18, 2019 7:33 PM
To: Biju Das <[email protected]>
Cc: cip-dev at lists.cip-project.org; Nobuhiro Iwamatsu <[email protected]>; Pavel Machek <[email protected]>; Chris Paterson <[email protected]>; Marian-Cristian Rotariu <[email protected]>; Fabrizio Castro <[email protected]>
Subject: Re: [PATCH 4.19.y-cip 08/39] soc: renesas: r8a7795-sysc: Fix power request conflictsHi!
Quoted 3 lines
This register does not exist on R-Car H3 ES1.x and ES2.x.
Based on a patch in the BSP by Dien Pham <[email protected]>.
So you are storing bitfield in the pointer, ok.
Review
Quoted 2 lines
(quoted diff) +1
-1- { .soc_id = "r8a7795", .revision = "ES1.*" }, +#define HAS_A2VC0 BIT(0) /* Power domain A2VC0 ispresent */
Quoted 1 line
+#define
NO_EXTMASKBIT(1) /* Missing SYSCEXTMASKregister */
Review
Quoted 2 lines
(quoted diff) +2
-0+ +static const struct soc_device_attribute r8a7795_quirks_match[]
__initconst= {Quoted 8 lines
drivers/soc/renesas/r8a7795-sysc.c +7
-0+ { + .soc_id = "r8a7795", .revision = "ES1.*", + .data = (void *)(HAS_A2VC0 | NO_EXTMASK), + }, { + .soc_id = "r8a7795", .revision = "ES2.*", + .data = (void *)(NO_EXTMASK), + }, { /* sentinel */ }drivers/soc/renesas/r8a7795-sysc.c static struct rcar_sysc_area r8a7795_areas[] __initdata = { · line 82
Quoted 10 lines
drivers/soc/renesas/r8a7795-sysc.c +6
-1};static int __init r8a7795_sysc_init (void ) { -if (!soc_device_match (r8a7795es1)) +const struct soc_device_attribute *attr; +u32 quirks =0 ; + + attr =soc_device_match (r8a7795_quirks_match); +if (attr) + quirks = (uintptr_t )attr->data;But now you do strange dance with types. I'd understand quirks being unsigned long (because that's same size as void *). I also could understand quirks being
uintptr_tin the first place (but we normally use unsigned long for that in the kernel).
Quoted 2 lines
But having it as u32, then casting it over
uintptr_tis strange.
Dien, Geert,
Could you please share your thoughts on Pavel's comments?
Regards,
Biju
PATCH 8/39 soc: renesas: r8a7795-sysc: Fix power request conflicts
Hi Biju, Pavel,
Quoted 50 lines · Biju Das
Quoted 50 lines
-----Original Message-----
From: Pavel Machek <[email protected]>
Sent: Wednesday, December 18, 2019 7:33 PM
To: Biju Das <[email protected]>
Cc: cip-dev at lists.cip-project.org; Nobuhiro Iwamatsu <[email protected]>; Pavel Machek <[email protected]>; Chris Paterson <[email protected]>; Marian-Cristian Rotariu <[email protected]>; Fabrizio Castro <[email protected]>
Subject: Re: [PATCH 4.19.y-cip 08/39] soc: renesas: r8a7795-sysc: Fix power request conflictsQuoted 3 lines
This register does not exist on R-Car H3 ES1.x and ES2.x.
Based on a patch in the BSP by Dien Pham <[email protected]>.
So you are storing bitfield in the pointer, ok.
Review
Quoted 2 lines
(quoted diff) +1
-1- { .soc_id = "r8a7795", .revision = "ES1.*" }, +#define HAS_A2VC0 BIT(0) /* Power domain A2VC0 ispresent */
Quoted 1 line
+#define
NO_EXTMASKBIT(1) /* Missing SYSCEXTMASKregister */
Review
Quoted 2 lines
(quoted diff) +2
-0+ +static const struct soc_device_attribute r8a7795_quirks_match[]
__initconst= {Quoted 8 lines
drivers/soc/renesas/r8a7795-sysc.c +7
-0+ { + .soc_id = "r8a7795", .revision = "ES1.*", + .data = (void *)(HAS_A2VC0 | NO_EXTMASK), + }, { + .soc_id = "r8a7795", .revision = "ES2.*", + .data = (void *)(NO_EXTMASK), + }, { /* sentinel */ }drivers/soc/renesas/r8a7795-sysc.c static struct rcar_sysc_area r8a7795_areas[] __initdata = { · line 82
Quoted 10 lines
drivers/soc/renesas/r8a7795-sysc.c +6
-1};static int __init r8a7795_sysc_init (void ) { -if (!soc_device_match (r8a7795es1)) +const struct soc_device_attribute *attr; +u32 quirks =0 ; + + attr =soc_device_match (r8a7795_quirks_match); +if (attr) + quirks = (uintptr_t )attr->data;But now you do strange dance with types. I'd understand quirks being unsigned long (because that's same size as void *). I also could understand quirks being
uintptr_tin the first place (but we normally use unsigned long for that in the kernel).
Quoted 5 lines
Quoted 1 line
But having it as u32, then casting it over
uintptr_tis strange.Dien, Geert,
Could you please share your thoughts on Pavel's comments?
struct soc_device_attribute.data contains an opaque value, just like e.g. of_device_id.data and platform_device_id.driver_data.
In some structs, the opaque value is a "void *", in other structs it is an "unsigned long". But the actual meaning and contents depend on the driver. It may be used to store a pointer to a struct with features, an integer value, or a feature mask.
Conversion between pointer and integer is done by casting to "void *", or to "uintptr_t" (historically, "unsigned long" was used for this, but modern code uses "uintptr_t").
In this case, it contains a feature mask, which fits in "u32", which is "unsigned int", and "(unsigned) int" is still the standard type for any random variable that doesn't have special requirements.
- To store the feature mask, a cast to "void *" is needed.
- To retrieve the feature mask, a cast to "uintptr_t" is needed. A cast to "u32" would cause a warning on 64-bit platforms, due to the truncation of a 64-bit pointer to a 32-bit integer.
I agree "unsigned long" could have been a suitable type for "quirks" as well, but I see no reason to make that change when backporting a patch to stable.
$ git grep "unsigned long quirks" | wc -l 58 $ git grep "unsigned int quirks" | wc -l 26 $ git grep "u32 quirks" | wc -l 46
Hope this helps.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
PATCH 9/39 soc: renesas: r8a7796-sysc: Fix power request conflicts
In reply to Biju DasFrom: Geert Uytterhoeven <[email protected]>
commit 5a6cf826b37c5cd31304ba42117f632ee1f0552f upstream.
Describe the location and contents of the SYSCEXTMASK register on R-Car M3-W, to prevent conflicts between internal and external power requests.
This register does not exist on R-Car M3-W ES1.x.
Based on a patch in the BSP by Dien Pham <[email protected]>.
--- drivers/soc/renesas/r8a7796-sysc.c | 22 +++++++++++++++++++++- drivers/soc/renesas/rcar-sysc.h | 2 +- 2 files changed, 22 insertions(+), 2 deletions(-)
drivers/soc/renesas/r8a7796-sysc.c +21 -1
@@ -8,8 +8,10 @@* the Free Software Foundation; version 2 of the License. */ +#include <linux/bits.h> #include <linux/bug.h> #include <linux/kernel.h> +#include <linux/sys_soc.h> #include <dt-bindings/power/r8a7796-sysc.h>
@@ -42,7 +44,25 @@ static const struct rcar_sysc_area r8a7796_areas[] __initconst = { { "a3ir", 0x180, 0, R8A7796_PD_A3IR, R8A7796_PD_ALWAYS_ON }, }; -const struct rcar_sysc_info r8a7796_sysc_info__initconst = { + +/* Fixups for R-Car M3-W ES1.x revision */ +static const struct soc_device_attribute r8a7796es1[]__initconst = { + { .soc_id ="r8a7796" , .revision ="ES1.*" }, + {/* sentinel */ } +}; + +static int __init r8a7796_sysc_init (void ) +{ +if (soc_device_match (r8a7796es1)) + r8a7796_sysc_info.extmask_val =0 ; + +return 0 ; +} + +struct rcar_sysc_info r8a7796_sysc_info__initdata = { + .init = r8a7796_sysc_init, .areas = r8a7796_areas, .num_areas =ARRAY_SIZE (r8a7796_areas), + .extmask_offs =0x2f8 , + .extmask_val =BIT (0 ), };
drivers/soc/renesas/rcar-sysc.h +1 -1
@@ -63,7 +63,7 @@ extern const struct rcar_sysc_info r8a7791_sysc_info;extern const struct rcar_sysc_info r8a7792_sysc_info;extern const struct rcar_sysc_info r8a7794_sysc_info;extern struct rcar_sysc_info r8a7795_sysc_info; -extern const struct rcar_sysc_info r8a7796_sysc_info; +extern struct rcar_sysc_info r8a7796_sysc_info;extern const struct rcar_sysc_info r8a77965_sysc_info;extern const struct rcar_sysc_info r8a77970_sysc_info;extern const struct rcar_sysc_info r8a77980_sysc_info;
Signature · 1 line
2.7.4
PATCH 10/39 soc: renesas: r8a77965-sysc: Fix power request conflicts
In reply to Biju DasFrom: Geert Uytterhoeven <[email protected]>
commit fd733519436fb56fc89265f42276bfac04a14cfc upstream.
Describe the location and contents of the SYSCEXTMASK register on R-Car M3-N, to prevent conflicts between internal and external power requests.
Based on a patch in the BSP by Dien Pham <[email protected]>.
--- drivers/soc/renesas/r8a77965-sysc.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/soc/renesas/r8a77965-sysc.c +3 -0
@@ -7,6 +7,7 @@* Copyright (C) 2016 Glider bvba */ +#include <linux/bits.h> #include <linux/bug.h> #include <linux/kernel.h>
@@ -34,4 +35,6 @@ static const struct rcar_sysc_area r8a77965_areas[] __initconst = {const struct rcar_sysc_info r8a77965_sysc_info__initconst = { .areas = r8a77965_areas, .num_areas =ARRAY_SIZE (r8a77965_areas), + .extmask_offs =0x2f8 , + .extmask_val =BIT (0 ), };
Signature · 1 line
2.7.4
PATCH 11/39 soc: renesas: r8a77970-sysc: Fix power request conflicts
In reply to Biju DasFrom: Geert Uytterhoeven <[email protected]>
commit a228560c52e89aa5e31c5b8a636bf9ab681bda84 upstream.
Describe the location and contents of the SYSCEXTMASK register on R-Car V3M, to prevent conflicts between internal and external power requests.
Based on a patch in the BSP by Dien Pham <[email protected]>.
--- drivers/soc/renesas/r8a77970-sysc.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/soc/renesas/r8a77970-sysc.c +3 -0
@@ -8,6 +8,7 @@* published by the Free Software Foundation. */ +#include <linux/bits.h> #include <linux/bug.h> #include <linux/kernel.h>
@@ -36,4 +37,6 @@ static const struct rcar_sysc_area r8a77970_areas[] __initconst = {const struct rcar_sysc_info r8a77970_sysc_info__initconst = { .areas = r8a77970_areas, .num_areas =ARRAY_SIZE (r8a77970_areas), + .extmask_offs =0x1b0 , + .extmask_val =BIT (0 ), };
Signature · 1 line
2.7.4
PATCH 12/39 soc: renesas: r8a77980-sysc: Fix power request conflicts
In reply to Biju DasFrom: Geert Uytterhoeven <[email protected]>
commit ee038b88c60a32908fd83d420fce445bd0138f6d upstream.
Describe the location and contents of the SYSCEXTMASK register on R-Car V3H, to prevent conflicts between internal and external power requests.
--- drivers/soc/renesas/r8a77980-sysc.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/soc/renesas/r8a77980-sysc.c +3 -0
@@ -6,6 +6,7 @@* Copyright (C) 2018 Cogent Embedded, Inc. */ +#include <linux/bits.h> #include <linux/bug.h> #include <linux/kernel.h>
@@ -49,4 +50,6 @@ static const struct rcar_sysc_area r8a77980_areas[] __initconst = {const struct rcar_sysc_info r8a77980_sysc_info__initconst = { .areas = r8a77980_areas, .num_areas =ARRAY_SIZE (r8a77980_areas), + .extmask_offs =0x138 , + .extmask_val =BIT (0 ), };
Signature · 1 line
2.7.4
PATCH 13/39 soc: renesas: r8a77990-sysc: Fix power request conflicts
In reply to Biju DasFrom: Geert Uytterhoeven <[email protected]>
commit b34095cbc2bb102c9f138afd8c99a8a205b0e142 upstream.
Describe the location and contents of the SYSCEXTMASK register on R-Car E3, to prevent conflicts between internal and external power requests.
Based on a patch in the BSP by Dien Pham <[email protected]>.
--- drivers/soc/renesas/r8a77990-sysc.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/soc/renesas/r8a77990-sysc.c +3 -0
@@ -5,6 +5,7 @@* Copyright (C) 2018 Renesas Electronics Corp. */ +#include <linux/bits.h> #include <linux/bug.h> #include <linux/kernel.h> #include <linux/sys_soc.h>
@@ -65,4 +66,6 @@ const struct rcar_sysc_info r8a77990_sysc_info __initconst = { .init = r8a77990_sysc_init, .areas = r8a77990_areas, .num_areas = ARRAY_SIZE(r8a77990_areas), + .extmask_offs = 0x2f8, + .extmask_val = BIT(0), };
Signature · 1 line
2.7.4
PATCH 14/39 soc: renesas: r8a774c0-sysc: Fix power request conflicts
In reply to Biju DasFrom: Geert Uytterhoeven <[email protected]>
commit 8c32c5ff873580a5bff1b743ac5e080b36fbd784 upstream.
Describe the location and contents of the SYSCEXTMASK register on RZ/G2E, to prevent conflicts between internal and external power requests.
Based on a patch in the BSP by Dien Pham <[email protected]>.
--- drivers/soc/renesas/r8a774c0-sysc.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/soc/renesas/r8a774c0-sysc.c +3 -0
@@ -6,6 +6,7 @@* Based on Renesas R-Car E3 System Controller */ +#include <linux/bits.h> #include <linux/bug.h> #include <linux/kernel.h> #include <linux/sys_soc.h>
@@ -50,4 +51,6 @@ const struct rcar_sysc_info r8a774c0_sysc_info __initconst = { .init = r8a774c0_sysc_init, .areas = r8a774c0_areas, .num_areas = ARRAY_SIZE(r8a774c0_areas), + .extmask_offs = 0x2f8, + .extmask_val = BIT(0), };
Signature · 1 line
2.7.4
PATCH 15/39 soc: renesas: rcar-sysc: Add r8a774b1 support
In reply to Biju Dascommit 6655c568ced0789479f00b9399603c5d6ee48640 upstream.
Add support for RZ/G2N (R8A774B1) SoC power areas to the R-Car SYSC driver.
[Biju: refactored Kconfig file].
--- drivers/soc/renesas/Kconfig | 5 +++++ drivers/soc/renesas/Makefile | 1 + drivers/soc/renesas/r8a774b1-sysc.c | 37 +++++++++++++++++++++++++++++++++++++ drivers/soc/renesas/rcar-sysc.c | 3 +++ drivers/soc/renesas/rcar-sysc.h | 1 + 5 files changed, 47 insertions(+) create mode 100644 drivers/soc/renesas/r8a774b1-sysc.c
drivers/soc/renesas/Kconfig +5 -0
@@ -10,6 +10,7 @@ config SOC_RENESAS select SYSC_R8A7745 if ARCH_R8A7745 select SYSC_R8A77470 if ARCH_R8A77470 select SYSC_R8A774A1 if ARCH_R8A774A1 + select SYSC_R8A774B1 if ARCH_R8A774B1 select SYSC_R8A774C0 if ARCH_R8A774C0 select SYSC_R8A7779 if ARCH_R8A7779 select SYSC_R8A7790 if ARCH_R8A7790
@@ -43,6 +44,10 @@ config SYSC_R8A774A1 bool "RZ/G2M System Controller support" if COMPILE_TEST select SYSC_RCAR +config SYSC_R8A774B1 + bool "RZ/G2N System Controller support" if COMPILE_TEST + select SYSC_RCAR + config SYSC_R8A774C0 bool "RZ/G2E System Controller support" if COMPILE_TEST select SYSC_RCAR
drivers/soc/renesas/Makefile +1 -0
@@ -7,6 +7,7 @@ obj-$(CONFIG_SYSC_R8A7743) += r8a7743-sysc.o obj-$(CONFIG_SYSC_R8A7745) += r8a7745-sysc.o obj-$(CONFIG_SYSC_R8A77470) += r8a77470-sysc.o obj-$(CONFIG_SYSC_R8A774A1) += r8a774a1-sysc.o +obj-$(CONFIG_SYSC_R8A774B1) += r8a774b1-sysc.o obj-$(CONFIG_SYSC_R8A774C0) += r8a774c0-sysc.o obj-$(CONFIG_SYSC_R8A7779) += r8a7779-sysc.o obj-$(CONFIG_SYSC_R8A7790) += r8a7790-sysc.o
drivers/soc/renesas/r8a774b1-sysc.c new file +37 -0
@@ -0,0 +1,37 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* Renesas RZ/G2N System Controller +* Copyright (C) 2019 Renesas Electronics Corp. +* +* Based on Renesas R-Car M3-W System Controller +* Copyright (C) 2016 Glider bvba +*/ + +#include <linux/bits.h> +#include <linux/kernel.h> + +#include <dt-bindings/power/r8a774b1-sysc.h> + +#include "rcar-sysc.h" + +static const struct rcar_sysc_area r8a774b1_areas[]__initconst = { + {"always-on" ,0 ,0 ,R8A774B1_PD_ALWAYS_ON ,-1 ,PD_ALWAYS_ON }, + {"ca57-scu" ,0x1c0 ,0 ,R8A774B1_PD_CA57_SCU ,R8A774B1_PD_ALWAYS_ON , +PD_SCU }, + {"ca57-cpu0" ,0x80 ,0 ,R8A774B1_PD_CA57_CPU0 ,R8A774B1_PD_CA57_SCU , +PD_CPU_NOCR }, + {"ca57-cpu1" ,0x80 ,1 ,R8A774B1_PD_CA57_CPU1 ,R8A774B1_PD_CA57_SCU , +PD_CPU_NOCR }, + {"a3vc" ,0x380 ,0 ,R8A774B1_PD_A3VC ,R8A774B1_PD_ALWAYS_ON }, + {"a3vp" ,0x340 ,0 ,R8A774B1_PD_A3VP ,R8A774B1_PD_ALWAYS_ON }, + {"a2vc1" ,0x3c0 ,1 ,R8A774B1_PD_A2VC1 ,R8A774B1_PD_A3VC }, + {"3dg-a" ,0x100 ,0 ,R8A774B1_PD_3DG_A ,R8A774B1_PD_ALWAYS_ON }, + {"3dg-b" ,0x100 ,1 ,R8A774B1_PD_3DG_B ,R8A774B1_PD_3DG_A }, +}; + +const struct rcar_sysc_info r8a774b1_sysc_info__initconst = { + .areas = r8a774b1_areas, + .num_areas =ARRAY_SIZE (r8a774b1_areas), + .extmask_offs =0x2f8 , + .extmask_val =BIT (0 ), +};
drivers/soc/renesas/rcar-sysc.c +3 -0
@@ -289,6 +289,9 @@ static const struct of_device_id rcar_sysc_matches[] __initconst = { #ifdef CONFIG_SYSC_R8A774A1 { .compatible = "renesas,r8a774a1-sysc", .data = &r8a774a1_sysc_info }, #endif +#ifdef CONFIG_SYSC_R8A774B1 + { .compatible = "renesas,r8a774b1-sysc", .data = &r8a774b1_sysc_info }, +#endif #ifdef CONFIG_SYSC_R8A774C0 { .compatible = "renesas,r8a774c0-sysc", .data = &r8a774c0_sysc_info }, #endif
drivers/soc/renesas/rcar-sysc.h +1 -0
@@ -56,6 +56,7 @@ extern const struct rcar_sysc_info r8a7743_sysc_info;extern const struct rcar_sysc_info r8a7745_sysc_info;extern const struct rcar_sysc_info r8a77470_sysc_info;extern const struct rcar_sysc_info r8a774a1_sysc_info; +extern const struct rcar_sysc_info r8a774b1_sysc_info;extern const struct rcar_sysc_info r8a774c0_sysc_info;extern const struct rcar_sysc_info r8a7779_sysc_info;extern const struct rcar_sysc_info r8a7790_sysc_info;
Signature · 1 line
2.7.4
PATCH 16/39 dt-bindings: reset: rcar-rst: Document r8a774b1 reset module
In reply to Biju Dascommit 4d3cae42544775c71521e8ed5adb64c1839036b9 upstream.
Document bindings for the RZ/G2N (R8A774B1) reset module.
--- Documentation/devicetree/bindings/reset/renesas,rst.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/reset/renesas,rst.txt +1 -0
@@ -19,6 +19,7 @@ Required properties: - "renesas,r8a7745-rst" (RZ/G1E) - "renesas,r8a77470-rst" (RZ/G1C) - "renesas,r8a774a1-rst" (RZ/G2M) + - "renesas,r8a774b1-rst" (RZ/G2N) - "renesas,r8a774c0-rst" (RZ/G2E) - "renesas,r8a7778-reset-wdt" (R-Car M1A) - "renesas,r8a7779-reset-wdt" (R-Car H1)
Signature · 1 line
2.7.4
PATCH 17/39 soc: renesas: rcar-rst: Add support for RZ/G2N
In reply to Biju Dascommit 26405045e73b184900ad43206eeda7bee1cedee1 upstream.
Add support for RZ/G2N (R8A774B1) to the R-Car RST driver.
--- drivers/soc/renesas/Kconfig | 7 ++++--- drivers/soc/renesas/rcar-rst.c | 1 + 2 files changed, 5 insertions(+), 3 deletions(-)
drivers/soc/renesas/Kconfig +4 -3
@@ -3,9 +3,10 @@ config SOC_RENESAS default y if ARCH_RENESAS select SOC_BUS select RST_RCAR if ARCH_RCAR_GEN1 || ARCH_RCAR_GEN2 || \ - ARCH_R8A774A1 || ARCH_R8A774C0 || ARCH_R8A7795 || \ - ARCH_R8A7796 || ARCH_R8A77965 || ARCH_R8A77970 || \ - ARCH_R8A77980 || ARCH_R8A77990 || ARCH_R8A77995 + ARCH_R8A774A1 || ARCH_R8A774B1 || ARCH_R8A774C0 || \ + ARCH_R8A7795 || ARCH_R8A7796 || ARCH_R8A77965 || \ + ARCH_R8A77970 || ARCH_R8A77980 || ARCH_R8A77990 || \ + ARCH_R8A77995 select SYSC_R8A7743 if ARCH_R8A7743 select SYSC_R8A7745 if ARCH_R8A7745 select SYSC_R8A77470 if ARCH_R8A77470
drivers/soc/renesas/rcar-rst.c +1 -0
@@ -47,6 +47,7 @@ static const struct of_device_id rcar_rst_matches[] __initconst = { { .compatible = "renesas,r8a77470-rst", .data = &rcar_rst_gen2 }, /* RZ/G2 is handled like R-Car Gen3 */ { .compatible = "renesas,r8a774a1-rst", .data = &rcar_rst_gen3 }, + { .compatible = "renesas,r8a774b1-rst", .data = &rcar_rst_gen3 }, { .compatible = "renesas,r8a774c0-rst", .data = &rcar_rst_gen3 }, /* R-Car Gen1 */ { .compatible = "renesas,r8a7778-reset-wdt", .data = &rcar_rst_gen1 },
Signature · 1 line
2.7.4
PATCH 18/39 dt-bindings: clk: Add r8a774b1 CPG Core Clock Definitions
In reply to Biju Dascommit 54ce17dd40fd846a7ac1e87e1103032933d2bd21 upstream.
Add all RZ/G2N Clock Pulse Generator Core Clock Outputs, as listed in Table 8.2d ("List of Clocks [RZ/G2N]") of the RZ/G2N Hardware User's Manual.
--- include/dt-bindings/clock/r8a774b1-cpg-mssr.h | 57 +++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 include/dt-bindings/clock/r8a774b1-cpg-mssr.h
include/dt-bindings/clock/r8a774b1-cpg-mssr.h new file +57 -0
@@ -0,0 +1,57 @@ +/* SPDX-License-Identifier: GPL-2.0 +* +* Copyright (C) 2019 Renesas Electronics Corp. +*/ +#ifndef __DT_BINDINGS_CLOCK_R8A774B1_CPG_MSSR_H__ +#define __DT_BINDINGS_CLOCK_R8A774B1_CPG_MSSR_H__ + +#include <dt-bindings/clock/renesas-cpg-mssr.h> + +/* r8a774b1 CPG Core Clocks */ +#define R8A774B1_CLK_Z 0 +#define R8A774B1_CLK_ZG 1 +#define R8A774B1_CLK_ZTR 2 +#define R8A774B1_CLK_ZTRD2 3 +#define R8A774B1_CLK_ZT 4 +#define R8A774B1_CLK_ZX 5 +#define R8A774B1_CLK_S0D1 6 +#define R8A774B1_CLK_S0D2 7 +#define R8A774B1_CLK_S0D3 8 +#define R8A774B1_CLK_S0D4 9 +#define R8A774B1_CLK_S0D6 10 +#define R8A774B1_CLK_S0D8 11 +#define R8A774B1_CLK_S0D12 12 +#define R8A774B1_CLK_S1D2 13 +#define R8A774B1_CLK_S1D4 14 +#define R8A774B1_CLK_S2D1 15 +#define R8A774B1_CLK_S2D2 16 +#define R8A774B1_CLK_S2D4 17 +#define R8A774B1_CLK_S3D1 18 +#define R8A774B1_CLK_S3D2 19 +#define R8A774B1_CLK_S3D4 20 +#define R8A774B1_CLK_LB 21 +#define R8A774B1_CLK_CL 22 +#define R8A774B1_CLK_ZB3 23 +#define R8A774B1_CLK_ZB3D2 24 +#define R8A774B1_CLK_CR 25 +#define R8A774B1_CLK_DDR 26 +#define R8A774B1_CLK_SD0H 27 +#define R8A774B1_CLK_SD0 28 +#define R8A774B1_CLK_SD1H 29 +#define R8A774B1_CLK_SD1 30 +#define R8A774B1_CLK_SD2H 31 +#define R8A774B1_CLK_SD2 32 +#define R8A774B1_CLK_SD3H 33 +#define R8A774B1_CLK_SD3 34 +#define R8A774B1_CLK_RPC 35 +#define R8A774B1_CLK_RPCD2 36 +#define R8A774B1_CLK_MSO 37 +#define R8A774B1_CLK_HDMI 38 +#define R8A774B1_CLK_CSI0 39 +#define R8A774B1_CLK_CP 40 +#define R8A774B1_CLK_CPEX 41 +#define R8A774B1_CLK_R 42 +#define R8A774B1_CLK_OSC 43 +#define R8A774B1_CLK_CANFD 44 + +#endif /* __DT_BINDINGS_CLOCK_R8A774B1_CPG_MSSR_H__ */
Signature · 1 line
2.7.4
PATCH 19/39 dt-bindings: clock: renesas: cpg-mssr: Document r8a774b1 binding
In reply to Biju Dascommit 10003938a0c64c2f0d8934ef3f4f36ac5b4960dc upstream.
Add binding documentation for the RZ/G2N (R8A774b1) Clock Pulse Generator driver.
--- Documentation/devicetree/bindings/clock/renesas,cpg-mssr.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/clock/renesas,cpg-mssr.txt +6 -4
@@ -17,6 +17,7 @@ Required Properties: - "renesas,r8a7745-cpg-mssr" for the r8a7745 SoC (RZ/G1E) - "renesas,r8a77470-cpg-mssr" for the r8a77470 SoC (RZ/G1C) - "renesas,r8a774a1-cpg-mssr" for the r8a774a1 SoC (RZ/G2M) + - "renesas,r8a774b1-cpg-mssr" for the r8a774a1 SoC (RZ/G2N) - "renesas,r8a774c0-cpg-mssr" for the r8a774c0 SoC (RZ/G2E) - "renesas,r8a7790-cpg-mssr" for the r8a7790 SoC (R-Car H2) - "renesas,r8a7791-cpg-mssr" for the r8a7791 SoC (R-Car M2-W)
@@ -37,10 +38,11 @@ Required Properties: - clocks: References to external parent clocks, one entry for each entry in clock-names - clock-names: List of external parent clock names. Valid names are: - - "extal" (r8a7743, r8a7745, r8a77470, r8a774a1, r8a774c0, r8a7790, - r8a7791, r8a7792, r8a7793, r8a7794, r8a7795, r8a7796, r8a77965, - r8a77970, r8a77980, r8a77990, r8a77995) - - "extalr" (r8a774a1, r8a7795, r8a7796, r8a77965, r8a77970, r8a77980) + - "extal" (r8a7743, r8a7745, r8a77470, r8a774a1, r8a774b1, r8a774c0, + r8a7790, r8a7791, r8a7792, r8a7793, r8a7794, r8a7795, r8a7796, + r8a77965, r8a77970, r8a77980, r8a77990, r8a77995) + - "extalr" (r8a774a1, r8a774b1, r8a7795, r8a7796, r8a77965, r8a77970, + r8a77980) - "usb_extal" (r8a7743, r8a7745, r8a77470, r8a7790, r8a7791, r8a7793, r8a7794)
Signature · 1 line
2.7.4
PATCH 20/39 clk: renesas: cpg-mssr: Add r8a774b1 support
In reply to Biju Dascommit 0b9f1c2c2fd4481990515a2918297a50a23a3b34 upstream.
Add RZ/G2N (R8A774B1) Clock Pulse Generator / Module Standby and Software Reset support.
Based on the Table 8.4d of "RZ/G Series, 2nd Generation User's Manual:
Hardware (Rev. 0.80, May 2019)".
--- drivers/clk/renesas/Kconfig | 5 + drivers/clk/renesas/Makefile | 1 + drivers/clk/renesas/r8a774b1-cpg-mssr.c | 322 ++++++++++++++++++++++++++++++++ drivers/clk/renesas/renesas-cpg-mssr.c | 6 + drivers/clk/renesas/renesas-cpg-mssr.h | 1 + 5 files changed, 335 insertions(+) create mode 100644 drivers/clk/renesas/r8a774b1-cpg-mssr.c
drivers/clk/renesas/Kconfig +5 -0
@@ -9,6 +9,7 @@ config CLK_RENESAS select CLK_R8A7745 if ARCH_R8A7745 select CLK_R8A77470 if ARCH_R8A77470 select CLK_R8A774A1 if ARCH_R8A774A1 + select CLK_R8A774B1 if ARCH_R8A774B1 select CLK_R8A774C0 if ARCH_R8A774C0 select CLK_R8A7778 if ARCH_R8A7778 select CLK_R8A7779 if ARCH_R8A7779
@@ -73,6 +74,10 @@ config CLK_R8A774A1 bool "RZ/G2M clock support" if COMPILE_TEST select CLK_RCAR_GEN3_CPG +config CLK_R8A774B1 + bool "RZ/G2N clock support" if COMPILE_TEST + select CLK_RCAR_GEN3_CPG + config CLK_R8A774C0 bool "RZ/G2E clock support" if COMPILE_TEST select CLK_RCAR_GEN3_CPG
drivers/clk/renesas/Makefile +1 -0
@@ -8,6 +8,7 @@ obj-$(CONFIG_CLK_R8A7743) += r8a7743-cpg-mssr.o obj-$(CONFIG_CLK_R8A7745) += r8a7745-cpg-mssr.o obj-$(CONFIG_CLK_R8A77470) += r8a77470-cpg-mssr.o obj-$(CONFIG_CLK_R8A774A1) += r8a774a1-cpg-mssr.o +obj-$(CONFIG_CLK_R8A774B1) += r8a774b1-cpg-mssr.o obj-$(CONFIG_CLK_R8A774C0) += r8a774c0-cpg-mssr.o obj-$(CONFIG_CLK_R8A7778) += clk-r8a7778.o obj-$(CONFIG_CLK_R8A7779) += clk-r8a7779.o
drivers/clk/renesas/r8a774b1-cpg-mssr.c new file +322 -0
322 lines not on this page · raw message
drivers/clk/renesas/renesas-cpg-mssr.c +6 -0
@@ -653,6 +653,12 @@ static const struct of_device_id cpg_mssr_match[] = { .data = &r8a774a1_cpg_mssr_info, },#endif +#ifdef CONFIG_CLK_R8A774B1 + { + .compatible = "renesas,r8a774b1-cpg-mssr", + .data = &r8a774b1_cpg_mssr_info, + }, +#endif #ifdef CONFIG_CLK_R8A774C0 { .compatible = "renesas,r8a774c0-cpg-mssr",
drivers/clk/renesas/renesas-cpg-mssr.h +1 -0
@@ -138,6 +138,7 @@ extern const struct cpg_mssr_info r8a7743_cpg_mssr_info;extern const struct cpg_mssr_info r8a7745_cpg_mssr_info;extern const struct cpg_mssr_info r8a77470_cpg_mssr_info;extern const struct cpg_mssr_info r8a774a1_cpg_mssr_info; +extern const struct cpg_mssr_info r8a774b1_cpg_mssr_info;extern const struct cpg_mssr_info r8a774c0_cpg_mssr_info;extern const struct cpg_mssr_info r8a7790_cpg_mssr_info;extern const struct cpg_mssr_info r8a7791_cpg_mssr_info;
Signature · 1 line
2.7.4
PATCH 21/39 pinctrl: sh-pfc: r8a77965: Add SATA pins, groups and functions
In reply to Biju DasFrom: Takeshi Kihara <[email protected]>
commit d06e3be6e86a5456a2b760952b7697e4a0d1fc02 upstream.
This patch adds SATA0 pin, group and function to the R8A77965 SoC.
--- drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+)
drivers/pinctrl/sh-pfc/pfc-r8a77965.c +27 -0
@@ -2904,6 +2904,25 @@ static const unsigned int pwm6_b_mux[] = { PWM6_B_MARK, }; +/* - SATA --------------------------------------------------------------------*/ +static const unsigned int sata0_devslp_a_pins[] = { +/* DEVSLP */ +RCAR_GP_PIN (6 ,16 ), +}; + +static const unsigned int sata0_devslp_a_mux[] = { +SATA_DEVSLP_A_MARK , +}; + +static const unsigned int sata0_devslp_b_pins[] = { +/* DEVSLP */ +RCAR_GP_PIN (4 ,6 ), +}; + +static const unsigned int sata0_devslp_b_mux[] = { +SATA_DEVSLP_B_MARK , +}; +/* - SCIF0 ------------------------------------------------------------------ */ static const unsigned int scif0_data_pins[] = {/* RX, TX */
@@ -3576,6 +3595,8 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (pwm5_b),SH_PFC_PIN_GROUP (pwm6_a),SH_PFC_PIN_GROUP (pwm6_b), +SH_PFC_PIN_GROUP (sata0_devslp_a), +SH_PFC_PIN_GROUP (sata0_devslp_b),SH_PFC_PIN_GROUP (scif0_data),SH_PFC_PIN_GROUP (scif0_clk), SH_PFC_PIN_GROUP(scif0_ctrl),
@@ -3874,6 +3895,11 @@ static const char * const pwm6_groups[] = { "pwm6_b", }; +static const char *const sata0_groups[] = { +"sata0_devslp_a" , +"sata0_devslp_b" , +}; +static const char *const scif0_groups[] = {"scif0_data" ,"scif0_clk" ,
@@ -3996,6 +4022,7 @@ static const struct sh_pfc_function pinmux_functions[] = {SH_PFC_FUNCTION (pwm4),SH_PFC_FUNCTION (pwm5),SH_PFC_FUNCTION (pwm6), +SH_PFC_FUNCTION (sata0),SH_PFC_FUNCTION (scif0),SH_PFC_FUNCTION (scif1), SH_PFC_FUNCTION(scif2),
Signature · 1 line
2.7.4
PATCH 22/39 pinctrl: sh-pfc: r8a77965: Add Audio clock pin support
In reply to Biju DasFrom: Hoan Nguyen An <[email protected]>
commit ada9a3d98facdc0489de52aa24fd8630ba2ec847 upstream.
Add Audio clock pin support for r8a77965.
--- drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 160 ++++++++++++++++++++++++++++++++++ 1 file changed, 160 insertions(+)
drivers/pinctrl/sh-pfc/pfc-r8a77965.c +160 -0
@@ -1572,6 +1572,128 @@ static const struct sh_pfc_pin pinmux_pins[] = { SH_PFC_PIN_NAMED_CFG(ROW_GROUP_A('T'), 30, ASEBRK, CFG_FLAGS), }; +/* - AUDIO CLOCK ------------------------------------------------------------ */ +static const unsigned int audio_clk_a_a_pins[] = { +/* CLK A */ +RCAR_GP_PIN (6 ,22 ), +}; +static const unsigned int audio_clk_a_a_mux[] = { +AUDIO_CLKA_A_MARK , +}; +static const unsigned int audio_clk_a_b_pins[] = { +/* CLK A */ +RCAR_GP_PIN (5 ,4 ), +}; +static const unsigned int audio_clk_a_b_mux[] = { +AUDIO_CLKA_B_MARK , +}; +static const unsigned int audio_clk_a_c_pins[] = { +/* CLK A */ +RCAR_GP_PIN (5 ,19 ), +}; +static const unsigned int audio_clk_a_c_mux[] = { +AUDIO_CLKA_C_MARK , +}; +static const unsigned int audio_clk_b_a_pins[] = { +/* CLK B */ +RCAR_GP_PIN (5 ,12 ), +}; +static const unsigned int audio_clk_b_a_mux[] = { +AUDIO_CLKB_A_MARK , +}; +static const unsigned int audio_clk_b_b_pins[] = { +/* CLK B */ +RCAR_GP_PIN (6 ,23 ), +}; +static const unsigned int audio_clk_b_b_mux[] = { +AUDIO_CLKB_B_MARK , +}; +static const unsigned int audio_clk_c_a_pins[] = { +/* CLK C */ +RCAR_GP_PIN (5 ,21 ), +}; +static const unsigned int audio_clk_c_a_mux[] = { +AUDIO_CLKC_A_MARK , +}; +static const unsigned int audio_clk_c_b_pins[] = { +/* CLK C */ +RCAR_GP_PIN (5 ,0 ), +}; +static const unsigned int audio_clk_c_b_mux[] = { +AUDIO_CLKC_B_MARK , +}; +static const unsigned int audio_clkout_a_pins[] = { +/* CLKOUT */ +RCAR_GP_PIN (5 ,18 ), +}; +static const unsigned int audio_clkout_a_mux[] = { +AUDIO_CLKOUT_A_MARK , +}; +static const unsigned int audio_clkout_b_pins[] = { +/* CLKOUT */ +RCAR_GP_PIN (6 ,28 ), +}; +static const unsigned int audio_clkout_b_mux[] = { +AUDIO_CLKOUT_B_MARK , +}; +static const unsigned int audio_clkout_c_pins[] = { +/* CLKOUT */ +RCAR_GP_PIN (5 ,3 ), +}; +static const unsigned int audio_clkout_c_mux[] = { +AUDIO_CLKOUT_C_MARK , +}; +static const unsigned int audio_clkout_d_pins[] = { +/* CLKOUT */ +RCAR_GP_PIN (5 ,21 ), +}; +static const unsigned int audio_clkout_d_mux[] = { +AUDIO_CLKOUT_D_MARK , +}; +static const unsigned int audio_clkout1_a_pins[] = { +/* CLKOUT1 */ +RCAR_GP_PIN (5 ,15 ), +}; +static const unsigned int audio_clkout1_a_mux[] = { +AUDIO_CLKOUT1_A_MARK , +}; +static const unsigned int audio_clkout1_b_pins[] = { +/* CLKOUT1 */ +RCAR_GP_PIN (6 ,29 ), +}; +static const unsigned int audio_clkout1_b_mux[] = { +AUDIO_CLKOUT1_B_MARK , +}; +static const unsigned int audio_clkout2_a_pins[] = { +/* CLKOUT2 */ +RCAR_GP_PIN (5 ,16 ), +}; +static const unsigned int audio_clkout2_a_mux[] = { +AUDIO_CLKOUT2_A_MARK , +}; +static const unsigned int audio_clkout2_b_pins[] = { +/* CLKOUT2 */ +RCAR_GP_PIN (6 ,30 ), +}; +static const unsigned int audio_clkout2_b_mux[] = { +AUDIO_CLKOUT2_B_MARK , +}; + +static const unsigned int audio_clkout3_a_pins[] = { +/* CLKOUT3 */ +RCAR_GP_PIN (5 ,19 ), +}; +static const unsigned int audio_clkout3_a_mux[] = { +AUDIO_CLKOUT3_A_MARK , +}; +static const unsigned int audio_clkout3_b_pins[] = { +/* CLKOUT3 */ +RCAR_GP_PIN (6 ,31 ), +}; +static const unsigned int audio_clkout3_b_mux[] = { +AUDIO_CLKOUT3_B_MARK , +}; +/* - EtherAVB --------------------------------------------------------------- */ static const unsigned int avb_link_pins[] = {/* AVB_LINK */
@@ -3423,6 +3545,23 @@ static const unsigned int usb30_mux[] = { };static const struct sh_pfc_pin_group pinmux_groups[] = { +SH_PFC_PIN_GROUP (audio_clk_a_a), +SH_PFC_PIN_GROUP (audio_clk_a_b), +SH_PFC_PIN_GROUP (audio_clk_a_c), +SH_PFC_PIN_GROUP (audio_clk_b_a), +SH_PFC_PIN_GROUP (audio_clk_b_b), +SH_PFC_PIN_GROUP (audio_clk_c_a), +SH_PFC_PIN_GROUP (audio_clk_c_b), +SH_PFC_PIN_GROUP (audio_clkout_a), +SH_PFC_PIN_GROUP (audio_clkout_b), +SH_PFC_PIN_GROUP (audio_clkout_c), +SH_PFC_PIN_GROUP (audio_clkout_d), +SH_PFC_PIN_GROUP (audio_clkout1_a), +SH_PFC_PIN_GROUP (audio_clkout1_b), +SH_PFC_PIN_GROUP (audio_clkout2_a), +SH_PFC_PIN_GROUP (audio_clkout2_b), +SH_PFC_PIN_GROUP (audio_clkout3_a), +SH_PFC_PIN_GROUP (audio_clkout3_b),SH_PFC_PIN_GROUP (avb_link),SH_PFC_PIN_GROUP (avb_magic),SH_PFC_PIN_GROUP (avb_phy_int),
@@ -3657,6 +3796,26 @@ static const struct sh_pfc_pin_group pinmux_groups[] = { SH_PFC_PIN_GROUP(usb30), }; +static const char *const audio_clk_groups[] = { +"audio_clk_a_a" , +"audio_clk_a_b" , +"audio_clk_a_c" , +"audio_clk_b_a" , +"audio_clk_b_b" , +"audio_clk_c_a" , +"audio_clk_c_b" , +"audio_clkout_a" , +"audio_clkout_b" , +"audio_clkout_c" , +"audio_clkout_d" , +"audio_clkout1_a" , +"audio_clkout1_b" , +"audio_clkout2_a" , +"audio_clkout2_b" , +"audio_clkout3_a" , +"audio_clkout3_b" , +}; +static const char *const avb_groups[] = {"avb_link" ,"avb_magic" ,
@@ -4000,6 +4159,7 @@ static const char * const usb30_groups[] = { };static const struct sh_pfc_function pinmux_functions[] = { +SH_PFC_FUNCTION (audio_clk),SH_PFC_FUNCTION (avb),SH_PFC_FUNCTION (du),SH_PFC_FUNCTION (hscif0),
Signature · 1 line
2.7.4
PATCH 23/39 pinctrl: sh-pfc: r8a77965: Add Audio SSI pin support
In reply to Biju DasFrom: Hoan Nguyen An <[email protected]>
commit 7a7dfc4770c7904062186ff480af59a68c858ca0 upstream.
Add Audio SSI pin support for r8a77965.
--- drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 232 ++++++++++++++++++++++++++++++++++ 1 file changed, 232 insertions(+)
drivers/pinctrl/sh-pfc/pfc-r8a77965.c +232 -0
@@ -3514,6 +3514,184 @@ static const unsigned int sdhi3_ds_mux[] = { SD3_DS_MARK, }; +/* - SSI -------------------------------------------------------------------- */ +static const unsigned int ssi0_data_pins[] = { +/* SDATA */ +RCAR_GP_PIN (6 ,2 ), +}; +static const unsigned int ssi0_data_mux[] = { +SSI_SDATA0_MARK , +}; +static const unsigned int ssi01239_ctrl_pins[] = { +/* SCK, WS */ +RCAR_GP_PIN (6 ,0 ),RCAR_GP_PIN (6 ,1 ), +}; +static const unsigned int ssi01239_ctrl_mux[] = { +SSI_SCK01239_MARK ,SSI_WS01239_MARK , +}; +static const unsigned int ssi1_data_a_pins[] = { +/* SDATA */ +RCAR_GP_PIN (6 ,3 ), +}; +static const unsigned int ssi1_data_a_mux[] = { +SSI_SDATA1_A_MARK , +}; +static const unsigned int ssi1_data_b_pins[] = { +/* SDATA */ +RCAR_GP_PIN (5 ,12 ), +}; +static const unsigned int ssi1_data_b_mux[] = { +SSI_SDATA1_B_MARK , +}; +static const unsigned int ssi1_ctrl_a_pins[] = { +/* SCK, WS */ +RCAR_GP_PIN (6 ,26 ),RCAR_GP_PIN (6 ,27 ), +}; +static const unsigned int ssi1_ctrl_a_mux[] = { +SSI_SCK1_A_MARK ,SSI_WS1_A_MARK , +}; +static const unsigned int ssi1_ctrl_b_pins[] = { +/* SCK, WS */ +RCAR_GP_PIN (6 ,4 ),RCAR_GP_PIN (6 ,21 ), +}; +static const unsigned int ssi1_ctrl_b_mux[] = { +SSI_SCK1_B_MARK ,SSI_WS1_B_MARK , +}; +static const unsigned int ssi2_data_a_pins[] = { +/* SDATA */ +RCAR_GP_PIN (6 ,4 ), +}; +static const unsigned int ssi2_data_a_mux[] = { +SSI_SDATA2_A_MARK , +}; +static const unsigned int ssi2_data_b_pins[] = { +/* SDATA */ +RCAR_GP_PIN (5 ,13 ), +}; +static const unsigned int ssi2_data_b_mux[] = { +SSI_SDATA2_B_MARK , +}; +static const unsigned int ssi2_ctrl_a_pins[] = { +/* SCK, WS */ +RCAR_GP_PIN (5 ,19 ),RCAR_GP_PIN (5 ,21 ), +}; +static const unsigned int ssi2_ctrl_a_mux[] = { +SSI_SCK2_A_MARK ,SSI_WS2_A_MARK , +}; +static const unsigned int ssi2_ctrl_b_pins[] = { +/* SCK, WS */ +RCAR_GP_PIN (6 ,28 ),RCAR_GP_PIN (6 ,29 ), +}; +static const unsigned int ssi2_ctrl_b_mux[] = { +SSI_SCK2_B_MARK ,SSI_WS2_B_MARK , +}; +static const unsigned int ssi3_data_pins[] = { +/* SDATA */ +RCAR_GP_PIN (6 ,7 ), +}; +static const unsigned int ssi3_data_mux[] = { +SSI_SDATA3_MARK , +}; +static const unsigned int ssi349_ctrl_pins[] = { +/* SCK, WS */ +RCAR_GP_PIN (6 ,5 ),RCAR_GP_PIN (6 ,6 ), +}; +static const unsigned int ssi349_ctrl_mux[] = { +SSI_SCK349_MARK ,SSI_WS349_MARK , +}; +static const unsigned int ssi4_data_pins[] = { +/* SDATA */ +RCAR_GP_PIN (6 ,10 ), +}; +static const unsigned int ssi4_data_mux[] = { +SSI_SDATA4_MARK , +}; +static const unsigned int ssi4_ctrl_pins[] = { +/* SCK, WS */ +RCAR_GP_PIN (6 ,8 ),RCAR_GP_PIN (6 ,9 ), +}; +static const unsigned int ssi4_ctrl_mux[] = { +SSI_SCK4_MARK ,SSI_WS4_MARK , +}; +static const unsigned int ssi5_data_pins[] = { +/* SDATA */ +RCAR_GP_PIN (6 ,13 ), +}; +static const unsigned int ssi5_data_mux[] = { +SSI_SDATA5_MARK , +}; +static const unsigned int ssi5_ctrl_pins[] = { +/* SCK, WS */ +RCAR_GP_PIN (6 ,11 ),RCAR_GP_PIN (6 ,12 ), +}; +static const unsigned int ssi5_ctrl_mux[] = { +SSI_SCK5_MARK ,SSI_WS5_MARK , +}; +static const unsigned int ssi6_data_pins[] = { +/* SDATA */ +RCAR_GP_PIN (6 ,16 ), +}; +static const unsigned int ssi6_data_mux[] = { +SSI_SDATA6_MARK , +}; +static const unsigned int ssi6_ctrl_pins[] = { +/* SCK, WS */ +RCAR_GP_PIN (6 ,14 ),RCAR_GP_PIN (6 ,15 ), +}; +static const unsigned int ssi6_ctrl_mux[] = { +SSI_SCK6_MARK ,SSI_WS6_MARK , +}; +static const unsigned int ssi7_data_pins[] = { +/* SDATA */ +RCAR_GP_PIN (6 ,19 ), +}; +static const unsigned int ssi7_data_mux[] = { +SSI_SDATA7_MARK , +}; +static const unsigned int ssi78_ctrl_pins[] = { +/* SCK, WS */ +RCAR_GP_PIN (6 ,17 ),RCAR_GP_PIN (6 ,18 ), +}; +static const unsigned int ssi78_ctrl_mux[] = { +SSI_SCK78_MARK ,SSI_WS78_MARK , +}; +static const unsigned int ssi8_data_pins[] = { +/* SDATA */ +RCAR_GP_PIN (6 ,20 ), +}; +static const unsigned int ssi8_data_mux[] = { +SSI_SDATA8_MARK , +}; +static const unsigned int ssi9_data_a_pins[] = { +/* SDATA */ +RCAR_GP_PIN (6 ,21 ), +}; +static const unsigned int ssi9_data_a_mux[] = { +SSI_SDATA9_A_MARK , +}; +static const unsigned int ssi9_data_b_pins[] = { +/* SDATA */ +RCAR_GP_PIN (5 ,14 ), +}; +static const unsigned int ssi9_data_b_mux[] = { +SSI_SDATA9_B_MARK , +}; +static const unsigned int ssi9_ctrl_a_pins[] = { +/* SCK, WS */ +RCAR_GP_PIN (5 ,15 ),RCAR_GP_PIN (5 ,16 ), +}; +static const unsigned int ssi9_ctrl_a_mux[] = { +SSI_SCK9_A_MARK ,SSI_WS9_A_MARK , +}; +static const unsigned int ssi9_ctrl_b_pins[] = { +/* SCK, WS */ +RCAR_GP_PIN (6 ,30 ),RCAR_GP_PIN (6 ,31 ), +}; +static const unsigned int ssi9_ctrl_b_mux[] = { +SSI_SCK9_B_MARK ,SSI_WS9_B_MARK , +}; + +/* - USB0 ------------------------------------------------------------------- */ static const unsigned int usb0_pins[] = {/* PWEN, OVC */
@@ -3791,6 +3969,31 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (sdhi3_cd),SH_PFC_PIN_GROUP (sdhi3_wp),SH_PFC_PIN_GROUP (sdhi3_ds), +SH_PFC_PIN_GROUP (ssi0_data), +SH_PFC_PIN_GROUP (ssi01239_ctrl), +SH_PFC_PIN_GROUP (ssi1_data_a), +SH_PFC_PIN_GROUP (ssi1_data_b), +SH_PFC_PIN_GROUP (ssi1_ctrl_a), +SH_PFC_PIN_GROUP (ssi1_ctrl_b), +SH_PFC_PIN_GROUP (ssi2_data_a), +SH_PFC_PIN_GROUP (ssi2_data_b), +SH_PFC_PIN_GROUP (ssi2_ctrl_a), +SH_PFC_PIN_GROUP (ssi2_ctrl_b), +SH_PFC_PIN_GROUP (ssi3_data), +SH_PFC_PIN_GROUP (ssi349_ctrl), +SH_PFC_PIN_GROUP (ssi4_data), +SH_PFC_PIN_GROUP (ssi4_ctrl), +SH_PFC_PIN_GROUP (ssi5_data), +SH_PFC_PIN_GROUP (ssi5_ctrl), +SH_PFC_PIN_GROUP (ssi6_data), +SH_PFC_PIN_GROUP (ssi6_ctrl), +SH_PFC_PIN_GROUP (ssi7_data), +SH_PFC_PIN_GROUP (ssi78_ctrl), +SH_PFC_PIN_GROUP (ssi8_data), +SH_PFC_PIN_GROUP (ssi9_data_a), +SH_PFC_PIN_GROUP (ssi9_data_b), +SH_PFC_PIN_GROUP (ssi9_ctrl_a), +SH_PFC_PIN_GROUP (ssi9_ctrl_b),SH_PFC_PIN_GROUP (usb0),SH_PFC_PIN_GROUP (usb1), SH_PFC_PIN_GROUP(usb30),
@@ -4146,6 +4349,34 @@ static const char * const sdhi3_groups[] = { "sdhi3_ds", }; +static const char *const ssi_groups[] = { +"ssi0_data" , +"ssi01239_ctrl" , +"ssi1_data_a" , +"ssi1_data_b" , +"ssi1_ctrl_a" , +"ssi1_ctrl_b" , +"ssi2_data_a" , +"ssi2_data_b" , +"ssi2_ctrl_a" , +"ssi2_ctrl_b" , +"ssi3_data" , +"ssi349_ctrl" , +"ssi4_data" , +"ssi4_ctrl" , +"ssi5_data" , +"ssi5_ctrl" , +"ssi6_data" , +"ssi6_ctrl" , +"ssi7_data" , +"ssi78_ctrl" , +"ssi8_data" , +"ssi9_data_a" , +"ssi9_data_b" , +"ssi9_ctrl_a" , +"ssi9_ctrl_b" , +}; +static const char *const usb0_groups[] = {"usb0" , };
@@ -4194,6 +4425,7 @@ static const struct sh_pfc_function pinmux_functions[] = {SH_PFC_FUNCTION (sdhi1),SH_PFC_FUNCTION (sdhi2),SH_PFC_FUNCTION (sdhi3), +SH_PFC_FUNCTION (ssi),SH_PFC_FUNCTION (usb0),SH_PFC_FUNCTION (usb1), SH_PFC_FUNCTION(usb30),
Signature · 1 line
2.7.4
PATCH 24/39 pinctrl: sh-pfc: r8a77965: Add VIN[4|5] groups/functions
In reply to Biju DasFrom: Jacopo Mondi <[email protected]>
commit 270b6eb715573c0d05b75351f804b7b445d88d4b upstream
The VIN4 and VIN5 interfaces support parallel video input. Add pin, mux and functions definitions for VIN4 and VIN5 for R-Car M3-N.
--- drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 270 ++++++++++++++++++++++++++++++++++ 1 file changed, 270 insertions(+)
drivers/pinctrl/sh-pfc/pfc-r8a77965.c +270 -0
@@ -3722,6 +3722,216 @@ static const unsigned int usb30_mux[] = { USB30_PWEN_MARK, USB30_OVC_MARK, }; +/* - VIN4 ------------------------------------------------------------------- */ +static const unsigned int vin4_data18_a_pins[] = { +RCAR_GP_PIN (0 ,10 ),RCAR_GP_PIN (0 ,11 ), +RCAR_GP_PIN (0 ,12 ),RCAR_GP_PIN (0 ,13 ), +RCAR_GP_PIN (0 ,14 ),RCAR_GP_PIN (0 ,15 ), +RCAR_GP_PIN (1 ,2 ),RCAR_GP_PIN (1 ,3 ), +RCAR_GP_PIN (1 ,4 ),RCAR_GP_PIN (1 ,5 ), +RCAR_GP_PIN (1 ,6 ),RCAR_GP_PIN (1 ,7 ), +RCAR_GP_PIN (0 ,2 ),RCAR_GP_PIN (0 ,3 ), +RCAR_GP_PIN (0 ,4 ),RCAR_GP_PIN (0 ,5 ), +RCAR_GP_PIN (0 ,6 ),RCAR_GP_PIN (0 ,7 ), +}; + +static const unsigned int vin4_data18_a_mux[] = { +VI4_DATA2_A_MARK ,VI4_DATA3_A_MARK , +VI4_DATA4_A_MARK ,VI4_DATA5_A_MARK , +VI4_DATA6_A_MARK ,VI4_DATA7_A_MARK , +VI4_DATA10_MARK ,VI4_DATA11_MARK , +VI4_DATA12_MARK ,VI4_DATA13_MARK , +VI4_DATA14_MARK ,VI4_DATA15_MARK , +VI4_DATA18_MARK ,VI4_DATA19_MARK , +VI4_DATA20_MARK ,VI4_DATA21_MARK , +VI4_DATA22_MARK ,VI4_DATA23_MARK , +}; + +static const union vin_data vin4_data_a_pins = { + .data24 = { +RCAR_GP_PIN (0 ,8 ),RCAR_GP_PIN (0 ,9 ), +RCAR_GP_PIN (0 ,10 ),RCAR_GP_PIN (0 ,11 ), +RCAR_GP_PIN (0 ,12 ),RCAR_GP_PIN (0 ,13 ), +RCAR_GP_PIN (0 ,14 ),RCAR_GP_PIN (0 ,15 ), +RCAR_GP_PIN (1 ,0 ),RCAR_GP_PIN (1 ,1 ), +RCAR_GP_PIN (1 ,2 ),RCAR_GP_PIN (1 ,3 ), +RCAR_GP_PIN (1 ,4 ),RCAR_GP_PIN (1 ,5 ), +RCAR_GP_PIN (1 ,6 ),RCAR_GP_PIN (1 ,7 ), +RCAR_GP_PIN (0 ,0 ),RCAR_GP_PIN (0 ,1 ), +RCAR_GP_PIN (0 ,2 ),RCAR_GP_PIN (0 ,3 ), +RCAR_GP_PIN (0 ,4 ),RCAR_GP_PIN (0 ,5 ), +RCAR_GP_PIN (0 ,6 ),RCAR_GP_PIN (0 ,7 ), + }, +}; + +static const union vin_data vin4_data_a_mux = { + .data24 = { +VI4_DATA0_A_MARK ,VI4_DATA1_A_MARK , +VI4_DATA2_A_MARK ,VI4_DATA3_A_MARK , +VI4_DATA4_A_MARK ,VI4_DATA5_A_MARK , +VI4_DATA6_A_MARK ,VI4_DATA7_A_MARK , +VI4_DATA8_MARK ,VI4_DATA9_MARK , +VI4_DATA10_MARK ,VI4_DATA11_MARK , +VI4_DATA12_MARK ,VI4_DATA13_MARK , +VI4_DATA14_MARK ,VI4_DATA15_MARK , +VI4_DATA16_MARK ,VI4_DATA17_MARK , +VI4_DATA18_MARK ,VI4_DATA19_MARK , +VI4_DATA20_MARK ,VI4_DATA21_MARK , +VI4_DATA22_MARK ,VI4_DATA23_MARK , + }, +}; + +static const unsigned int vin4_data18_b_pins[] = { +RCAR_GP_PIN (2 ,2 ),RCAR_GP_PIN (2 ,3 ), +RCAR_GP_PIN (2 ,4 ),RCAR_GP_PIN (2 ,5 ), +RCAR_GP_PIN (2 ,6 ),RCAR_GP_PIN (2 ,7 ), +RCAR_GP_PIN (1 ,2 ),RCAR_GP_PIN (1 ,3 ), +RCAR_GP_PIN (1 ,4 ),RCAR_GP_PIN (1 ,5 ), +RCAR_GP_PIN (1 ,6 ),RCAR_GP_PIN (1 ,7 ), +RCAR_GP_PIN (0 ,2 ),RCAR_GP_PIN (0 ,3 ), +RCAR_GP_PIN (0 ,4 ),RCAR_GP_PIN (0 ,5 ), +RCAR_GP_PIN (0 ,6 ),RCAR_GP_PIN (0 ,7 ), +}; + +static const unsigned int vin4_data18_b_mux[] = { +VI4_DATA2_B_MARK ,VI4_DATA3_B_MARK , +VI4_DATA4_B_MARK ,VI4_DATA5_B_MARK , +VI4_DATA6_B_MARK ,VI4_DATA7_B_MARK , +VI4_DATA10_MARK ,VI4_DATA11_MARK , +VI4_DATA12_MARK ,VI4_DATA13_MARK , +VI4_DATA14_MARK ,VI4_DATA15_MARK , +VI4_DATA18_MARK ,VI4_DATA19_MARK , +VI4_DATA20_MARK ,VI4_DATA21_MARK , +VI4_DATA22_MARK ,VI4_DATA23_MARK , +}; + +static const union vin_data vin4_data_b_pins = { + .data24 = { +RCAR_GP_PIN (2 ,0 ),RCAR_GP_PIN (2 ,1 ), +RCAR_GP_PIN (2 ,2 ),RCAR_GP_PIN (2 ,3 ), +RCAR_GP_PIN (2 ,4 ),RCAR_GP_PIN (2 ,5 ), +RCAR_GP_PIN (2 ,6 ),RCAR_GP_PIN (2 ,7 ), +RCAR_GP_PIN (1 ,0 ),RCAR_GP_PIN (1 ,1 ), +RCAR_GP_PIN (1 ,2 ),RCAR_GP_PIN (1 ,3 ), +RCAR_GP_PIN (1 ,4 ),RCAR_GP_PIN (1 ,5 ), +RCAR_GP_PIN (1 ,6 ),RCAR_GP_PIN (1 ,7 ), +RCAR_GP_PIN (0 ,0 ),RCAR_GP_PIN (0 ,1 ), +RCAR_GP_PIN (0 ,2 ),RCAR_GP_PIN (0 ,3 ), +RCAR_GP_PIN (0 ,4 ),RCAR_GP_PIN (0 ,5 ), +RCAR_GP_PIN (0 ,6 ),RCAR_GP_PIN (0 ,7 ), + }, +}; + +static const union vin_data vin4_data_b_mux = { + .data24 = { +VI4_DATA0_B_MARK ,VI4_DATA1_B_MARK , +VI4_DATA2_B_MARK ,VI4_DATA3_B_MARK , +VI4_DATA4_B_MARK ,VI4_DATA5_B_MARK , +VI4_DATA6_B_MARK ,VI4_DATA7_B_MARK , +VI4_DATA8_MARK ,VI4_DATA9_MARK , +VI4_DATA10_MARK ,VI4_DATA11_MARK , +VI4_DATA12_MARK ,VI4_DATA13_MARK , +VI4_DATA14_MARK ,VI4_DATA15_MARK , +VI4_DATA16_MARK ,VI4_DATA17_MARK , +VI4_DATA18_MARK ,VI4_DATA19_MARK , +VI4_DATA20_MARK ,VI4_DATA21_MARK , +VI4_DATA22_MARK ,VI4_DATA23_MARK , + }, +}; + +static const unsigned int vin4_sync_pins[] = { +/* VSYNC_N, HSYNC_N */ +RCAR_GP_PIN (1 ,17 ),RCAR_GP_PIN (1 ,18 ), +}; + +static const unsigned int vin4_sync_mux[] = { +VI4_HSYNC_N_MARK ,VI4_VSYNC_N_MARK , +}; + +static const unsigned int vin4_field_pins[] = { +RCAR_GP_PIN (1 ,16 ), +}; + +static const unsigned int vin4_field_mux[] = { +VI4_FIELD_MARK , +}; + +static const unsigned int vin4_clkenb_pins[] = { +RCAR_GP_PIN (1 ,19 ), +}; + +static const unsigned int vin4_clkenb_mux[] = { +VI4_CLKENB_MARK , +}; + +static const unsigned int vin4_clk_pins[] = { +RCAR_GP_PIN (1 ,27 ), +}; + +static const unsigned int vin4_clk_mux[] = { +VI4_CLK_MARK , +}; + +/* - VIN5 ------------------------------------------------------------------- */ +static const union vin_data16 vin5_data_pins = { + .data16 = { +RCAR_GP_PIN (0 ,0 ),RCAR_GP_PIN (0 ,1 ), +RCAR_GP_PIN (0 ,2 ),RCAR_GP_PIN (0 ,3 ), +RCAR_GP_PIN (0 ,4 ),RCAR_GP_PIN (0 ,5 ), +RCAR_GP_PIN (0 ,6 ),RCAR_GP_PIN (0 ,7 ), +RCAR_GP_PIN (1 ,12 ),RCAR_GP_PIN (1 ,13 ), +RCAR_GP_PIN (1 ,14 ),RCAR_GP_PIN (1 ,15 ), +RCAR_GP_PIN (1 ,4 ),RCAR_GP_PIN (1 ,5 ), +RCAR_GP_PIN (1 ,6 ),RCAR_GP_PIN (1 ,7 ), + }, +}; + +static const union vin_data16 vin5_data_mux = { + .data16 = { +VI5_DATA0_MARK ,VI5_DATA1_MARK , +VI5_DATA2_MARK ,VI5_DATA3_MARK , +VI5_DATA4_MARK ,VI5_DATA5_MARK , +VI5_DATA6_MARK ,VI5_DATA7_MARK , +VI5_DATA8_MARK ,VI5_DATA9_MARK , +VI5_DATA10_MARK ,VI5_DATA11_MARK , +VI5_DATA12_MARK ,VI5_DATA13_MARK , +VI5_DATA14_MARK ,VI5_DATA15_MARK , + }, +}; + +static const unsigned int vin5_sync_pins[] = { +/* VSYNC_N, HSYNC_N */ +RCAR_GP_PIN (1 ,9 ),RCAR_GP_PIN (1 ,10 ), +}; + +static const unsigned int vin5_sync_mux[] = { +VI5_HSYNC_N_MARK ,VI5_VSYNC_N_MARK , +}; + +static const unsigned int vin5_field_pins[] = { +RCAR_GP_PIN (1 ,11 ), +}; + +static const unsigned int vin5_field_mux[] = { +VI5_FIELD_MARK , +}; + +static const unsigned int vin5_clkenb_pins[] = { +RCAR_GP_PIN (1 ,20 ), +}; + +static const unsigned int vin5_clkenb_mux[] = { +VI5_CLKENB_MARK , +}; + +static const unsigned int vin5_clk_pins[] = { +RCAR_GP_PIN (1 ,21 ), +}; + +static const unsigned int vin5_clk_mux[] = { +VI5_CLK_MARK , +}; +static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (audio_clk_a_a),SH_PFC_PIN_GROUP (audio_clk_a_b),
@@ -3997,6 +4207,32 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (usb0),SH_PFC_PIN_GROUP (usb1),SH_PFC_PIN_GROUP (usb30), +VIN_DATA_PIN_GROUP (vin4_data,8 , _a), +VIN_DATA_PIN_GROUP (vin4_data,10 , _a), +VIN_DATA_PIN_GROUP (vin4_data,12 , _a), +VIN_DATA_PIN_GROUP (vin4_data,16 , _a), +SH_PFC_PIN_GROUP (vin4_data18_a), +VIN_DATA_PIN_GROUP (vin4_data,20 , _a), +VIN_DATA_PIN_GROUP (vin4_data,24 , _a), +VIN_DATA_PIN_GROUP (vin4_data,8 , _b), +VIN_DATA_PIN_GROUP (vin4_data,10 , _b), +VIN_DATA_PIN_GROUP (vin4_data,12 , _b), +VIN_DATA_PIN_GROUP (vin4_data,16 , _b), +SH_PFC_PIN_GROUP (vin4_data18_b), +VIN_DATA_PIN_GROUP (vin4_data,20 , _b), +VIN_DATA_PIN_GROUP (vin4_data,24 , _b), +SH_PFC_PIN_GROUP (vin4_sync), +SH_PFC_PIN_GROUP (vin4_field), +SH_PFC_PIN_GROUP (vin4_clkenb), +SH_PFC_PIN_GROUP (vin4_clk), +VIN_DATA_PIN_GROUP (vin5_data,8 ), +VIN_DATA_PIN_GROUP (vin5_data,10 ), +VIN_DATA_PIN_GROUP (vin5_data,12 ), +VIN_DATA_PIN_GROUP (vin5_data,16 ), +SH_PFC_PIN_GROUP (vin5_sync), +SH_PFC_PIN_GROUP (vin5_field), +SH_PFC_PIN_GROUP (vin5_clkenb), + SH_PFC_PIN_GROUP(vin5_clk), }; static const char * const audio_clk_groups[] = {
@@ -4389,6 +4625,38 @@ static const char * const usb30_groups[] = { "usb30", }; +static const char *const vin4_groups[] = { +"vin4_data8_a" , +"vin4_data10_a" , +"vin4_data12_a" , +"vin4_data16_a" , +"vin4_data18_a" , +"vin4_data20_a" , +"vin4_data24_a" , +"vin4_data8_b" , +"vin4_data10_b" , +"vin4_data12_b" , +"vin4_data16_b" , +"vin4_data18_b" , +"vin4_data20_b" , +"vin4_data24_b" , +"vin4_sync" , +"vin4_field" , +"vin4_clkenb" , +"vin4_clk" , +}; + +static const char *const vin5_groups[] = { +"vin5_data8" , +"vin5_data10" , +"vin5_data12" , +"vin5_data16" , +"vin5_sync" , +"vin5_field" , +"vin5_clkenb" , +"vin5_clk" , +}; +static const struct sh_pfc_function pinmux_functions[] = {SH_PFC_FUNCTION (audio_clk),SH_PFC_FUNCTION (avb),
@@ -4429,6 +4697,8 @@ static const struct sh_pfc_function pinmux_functions[] = {SH_PFC_FUNCTION (usb0),SH_PFC_FUNCTION (usb1 ),SH_PFC_FUNCTION (usb30 ), +SH_PFC_FUNCTION (vin4 ), + SH_PFC_FUNCTION(vin5), };static const struct pinmux_cfg_reg pinmux_config_regs[] = {
Signature · 1 line
2.7.4
PATCH 25/39 pinctrl: sh-pfc: r8a77965: Add CAN pins, groups and functions
In reply to Biju DasFrom: Takeshi Kihara <[email protected]>
commit 3a44d6a92e2572c602cfce692ae96d0e95d9c848 upstream.
This patch adds CAN{0,1} pins, groups and functions to the R8A77965 SoC.
--- drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 58 +++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+)
drivers/pinctrl/sh-pfc/pfc-r8a77965.c +58 -0
@@ -1781,6 +1781,44 @@ static const unsigned int avb_avtp_capture_b_mux[] = { AVB_AVTP_CAPTURE_B_MARK, }; +/* - CAN ------------------------------------------------------------------ */ +static const unsigned int can0_data_a_pins[] = { +/* TX, RX */ +RCAR_GP_PIN (1 ,23 ),RCAR_GP_PIN (1 ,24 ), +}; + +static const unsigned int can0_data_a_mux[] = { +CAN0_TX_A_MARK ,CAN0_RX_A_MARK , +}; + +static const unsigned int can0_data_b_pins[] = { +/* TX, RX */ +RCAR_GP_PIN (2 ,0 ),RCAR_GP_PIN (2 ,1 ), +}; + +static const unsigned int can0_data_b_mux[] = { +CAN0_TX_B_MARK ,CAN0_RX_B_MARK , +}; + +static const unsigned int can1_data_pins[] = { +/* TX, RX */ +RCAR_GP_PIN (1 ,22 ),RCAR_GP_PIN (1 ,26 ), +}; + +static const unsigned int can1_data_mux[] = { +CAN1_TX_MARK ,CAN1_RX_MARK , +}; + +/* - CAN Clock -------------------------------------------------------------- */ +static const unsigned int can_clk_pins[] = { +/* CLK */ +RCAR_GP_PIN (1 ,25 ), +}; + +static const unsigned int can_clk_mux[] = { +CAN_CLK_MARK , +}; +/* - DU --------------------------------------------------------------------- */ static const unsigned int du_rgb666_pins[] = {/* R[7:2], G[7:2], B[7:2] */
@@ -3961,6 +3999,10 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (avb_avtp_capture_a),SH_PFC_PIN_GROUP (avb_avtp_match_b),SH_PFC_PIN_GROUP (avb_avtp_capture_b), +SH_PFC_PIN_GROUP (can0_data_a), +SH_PFC_PIN_GROUP (can0_data_b), +SH_PFC_PIN_GROUP (can1_data), +SH_PFC_PIN_GROUP (can_clk),SH_PFC_PIN_GROUP (du_rgb666),SH_PFC_PIN_GROUP (du_rgb888), SH_PFC_PIN_GROUP(du_clk_out_0),
@@ -4269,6 +4311,19 @@ static const char * const avb_groups[] = { "avb_avtp_capture_b", }; +static const char *const can0_groups[] = { +"can0_data_a" , +"can0_data_b" , +}; + +static const char *const can1_groups[] = { +"can1_data" , +}; + +static const char *const can_clk_groups[] = { +"can_clk" , +}; +static const char *const du_groups[] = {"du_rgb666" ,"du_rgb888" ,
@@ -4660,6 +4715,9 @@ static const char * const vin5_groups[] = {static const struct sh_pfc_function pinmux_functions[] = {SH_PFC_FUNCTION (audio_clk),SH_PFC_FUNCTION (avb), +SH_PFC_FUNCTION (can0), +SH_PFC_FUNCTION (can1), +SH_PFC_FUNCTION (can_clk),SH_PFC_FUNCTION (du),SH_PFC_FUNCTION (hscif0),SH_PFC_FUNCTION (hscif1),
Signature · 1 line
2.7.4
PATCH 26/39 pinctrl: sh-pfc: r8a77965: Add CAN FD pins, groups and functions
In reply to Biju DasFrom: Takeshi Kihara <[email protected]>
commit 1b259dde9bd9001783d2deb1c4773a2e5ce45860 upstream.
This patch adds CAN FD{0,1} pins, groups and functions to the R8A77965 SoC.
--- drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+)
drivers/pinctrl/sh-pfc/pfc-r8a77965.c +42 -0
@@ -1819,6 +1819,34 @@ static const unsigned int can_clk_mux[] = { CAN_CLK_MARK, }; +/* - CAN FD --------------------------------------------------------------- */ +static const unsigned int canfd0_data_a_pins[] = { +/* TX, RX */ +RCAR_GP_PIN (1 ,23 ),RCAR_GP_PIN (1 ,24 ), +}; + +static const unsigned int canfd0_data_a_mux[] = { +CANFD0_TX_A_MARK ,CANFD0_RX_A_MARK , +}; + +static const unsigned int canfd0_data_b_pins[] = { +/* TX, RX */ +RCAR_GP_PIN (2 ,0 ),RCAR_GP_PIN (2 ,1 ), +}; + +static const unsigned int canfd0_data_b_mux[] = { +CANFD0_TX_B_MARK ,CANFD0_RX_B_MARK , +}; + +static const unsigned int canfd1_data_pins[] = { +/* TX, RX */ +RCAR_GP_PIN (1 ,22 ),RCAR_GP_PIN (1 ,26 ), +}; + +static const unsigned int canfd1_data_mux[] = { +CANFD1_TX_MARK ,CANFD1_RX_MARK , +}; +/* - DU --------------------------------------------------------------------- */ static const unsigned int du_rgb666_pins[] = {/* R[7:2], G[7:2], B[7:2] */
@@ -4003,6 +4031,9 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (can0_data_b),SH_PFC_PIN_GROUP (can1_data),SH_PFC_PIN_GROUP (can_clk), +SH_PFC_PIN_GROUP (canfd0_data_a), +SH_PFC_PIN_GROUP (canfd0_data_b), +SH_PFC_PIN_GROUP (canfd1_data),SH_PFC_PIN_GROUP (du_rgb666),SH_PFC_PIN_GROUP (du_rgb888), SH_PFC_PIN_GROUP(du_clk_out_0),
@@ -4324,6 +4355,15 @@ static const char * const can_clk_groups[] = { "can_clk", }; +static const char *const canfd0_groups[] = { +"canfd0_data_a" , +"canfd0_data_b" , +}; + +static const char *const canfd1_groups[] = { +"canfd1_data" , +}; +static const char *const du_groups[] = {"du_rgb666" ,"du_rgb888" ,
@@ -4718,6 +4758,8 @@ static const struct sh_pfc_function pinmux_functions[] = {SH_PFC_FUNCTION (can0),SH_PFC_FUNCTION (can1),SH_PFC_FUNCTION (can_clk), +SH_PFC_FUNCTION (canfd0), +SH_PFC_FUNCTION (canfd1),SH_PFC_FUNCTION (du),SH_PFC_FUNCTION (hscif0), SH_PFC_FUNCTION(hscif1),
Signature · 1 line
2.7.4
PATCH 27/39 pinctrl: sh-pfc: r8a77965: Replace DU_DOTCLKIN2 by DU_DOTCLKIN3
In reply to Biju DasFrom: Geert Uytterhoeven <[email protected]>
commit 86c045c2e4201e94ef37458e5777fcb2dab33a11 upstream.
Unlike R-Car M3-W, R-Car M3-N does not have DU_DOTCLKIN2, but the corresponding pin carries the DU_DOTCLKIN3 signal. Correct all references to DU_DOTCLKIN2 to fix this.
This change does not have any runtime effect, as it only changes an internal enum name, and a comment.
--- drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/pinctrl/sh-pfc/pfc-r8a77965.c +3 -3
@@ -553,7 +553,7 @@ MOD_SEL0_4_3 MOD_SEL1_4 \FM (AVB_RX_CTL)FM (AVB_RXC )FM (AVB_RD0 )FM (AVB_RD1 )FM (AVB_RD2 )FM (AVB_RD3 ) \FM (AVB_TXCREFCLK )FM (AVB_MDIO ) \FM (PRESETOUT ) \ -FM (DU_DOTCLKIN0 )FM (DU_DOTCLKIN1 )FM (DU_DOTCLKIN2 ) \ +FM (DU_DOTCLKIN0 )FM (DU_DOTCLKIN1 )FM (DU_DOTCLKIN3 ) \FM (TMS )FM (TDO )FM (ASEBRK )FM (MLB_REF )FM (TDI )FM (TCK )FM (TRST )FM (EXTALR ) enum {
@@ -1563,7 +1563,7 @@ static const struct sh_pfc_pin pinmux_pins[] = {SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('E' ),5 ,QSPI1_MISO_IO1 ,CFG_FLAGS ),SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('P' ),7 ,DU_DOTCLKIN0 ,CFG_FLAGS ),SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('P' ),8 ,DU_DOTCLKIN1 ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('R' ),8 ,DU_DOTCLKIN2 ,CFG_FLAGS ), +SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('R' ),8 ,DU_DOTCLKIN3 ,CFG_FLAGS ), SH_PFC_PIN_NAMED_CFG(ROW_GROUP_A('R'), 26, TRST#, SH_PFC_PIN_CFG_PULL_UP_DOWN),SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('R' ),29 ,TDI ,SH_PFC_PIN_CFG_PULL_UP_DOWN ), SH_PFC_PIN_NAMED_CFG(ROW_GROUP_A('R'), 30, TMS, CFG_FLAGS),
@@ -5740,7 +5740,7 @@ static const struct pinmux_bias_reg pinmux_bias_regs[] = { [31 ] =PIN_A_NUMBER ('P' ,8 ),/* DU_DOTCLKIN1 */ } }, { PINMUX_BIAS_REG("PUEN3", 0xe606040c, "PUD3", 0xe606044c) { - [ 0] = PIN_A_NUMBER('R', 8), /* DU_DOTCLKIN2 */ + [ 0] = PIN_A_NUMBER('R', 8), /* DU_DOTCLKIN3 */ [ 1] = SH_PFC_PIN_NONE, [ 2] = PIN_A_NUMBER('D', 38), /* FSCLKST */ [ 3] = PIN_A_NUMBER('D', 39), /* EXTALR*/
Signature · 1 line
2.7.4
PATCH 28/39 pinctrl: sh-pfc: r8a77965: Add TMU pins, groups and functions
In reply to Biju DasFrom: Takeshi Kihara <[email protected]>
commit 729257d674bc2e68bf051af5c7202d882bccafe0 upstream.
This patch adds TMU TCLK{1,2} pins, groups and functions to the R8A77965 SoC.
--- drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 48 +++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+)
drivers/pinctrl/sh-pfc/pfc-r8a77965.c +48 -0
@@ -3757,6 +3757,42 @@ static const unsigned int ssi9_ctrl_b_mux[] = { SSI_SCK9_B_MARK, SSI_WS9_B_MARK, }; +/* - TMU -------------------------------------------------------------------- */ +static const unsigned int tmu_tclk1_a_pins[] = { +/* TCLK */ +RCAR_GP_PIN (6 ,23 ), +}; + +static const unsigned int tmu_tclk1_a_mux[] = { +TCLK1_A_MARK , +}; + +static const unsigned int tmu_tclk1_b_pins[] = { +/* TCLK */ +RCAR_GP_PIN (5 ,19 ), +}; + +static const unsigned int tmu_tclk1_b_mux[] = { +TCLK1_B_MARK , +}; + +static const unsigned int tmu_tclk2_a_pins[] = { +/* TCLK */ +RCAR_GP_PIN (6 ,19 ), +}; + +static const unsigned int tmu_tclk2_a_mux[] = { +TCLK2_A_MARK , +}; + +static const unsigned int tmu_tclk2_b_pins[] = { +/* TCLK */ +RCAR_GP_PIN (6 ,28 ), +}; + +static const unsigned int tmu_tclk2_b_mux[] = { +TCLK2_B_MARK , +};/* - USB0 ------------------------------------------------------------------- */ static const unsigned int usb0_pins[] = {
@@ -4277,6 +4313,10 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (ssi9_data_b),SH_PFC_PIN_GROUP (ssi9_ctrl_a),SH_PFC_PIN_GROUP (ssi9_ctrl_b), +SH_PFC_PIN_GROUP (tmu_tclk1_a), +SH_PFC_PIN_GROUP (tmu_tclk1_b), +SH_PFC_PIN_GROUP (tmu_tclk2_a), +SH_PFC_PIN_GROUP (tmu_tclk2_b),SH_PFC_PIN_GROUP (usb0),SH_PFC_PIN_GROUP (usb1), SH_PFC_PIN_GROUP(usb30),
@@ -4708,6 +4748,13 @@ static const char * const ssi_groups[] = { "ssi9_ctrl_b", }; +static const char *const tmu_groups[] = { +"tmu_tclk1_a" , +"tmu_tclk1_b" , +"tmu_tclk2_a" , +"tmu_tclk2_b" , +}; +static const char *const usb0_groups[] = {"usb0" , };
@@ -4794,6 +4841,7 @@ static const struct sh_pfc_function pinmux_functions[] = {SH_PFC_FUNCTION (sdhi2),SH_PFC_FUNCTION (sdhi3),SH_PFC_FUNCTION (ssi), +SH_PFC_FUNCTION (tmu),SH_PFC_FUNCTION (usb0),SH_PFC_FUNCTION (usb1), SH_PFC_FUNCTION(usb30),
Signature · 1 line
2.7.4
PATCH 29/39 pinctrl: sh-pfc: r8a77965: Add DRIF pins, groups and functions
In reply to Biju DasFrom: Takeshi Kihara <[email protected]>
commit 79dbbdbeccc6784d5e189710adcca750c03d3bd4 upstream.
This patch adds DRIF{0,1,2,3} pins, groups and functions to the R8A77965 SoC.
Based on a similar patch of the R8A7796 PFC driver
by Ramesh Shanmugasundaram <[email protected]>.
--- drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 350 ++++++++++++++++++++++++++++++++++ 1 file changed, 350 insertions(+)
drivers/pinctrl/sh-pfc/pfc-r8a77965.c +350 -0
@@ -1847,6 +1847,280 @@ static const unsigned int canfd1_data_mux[] = { CANFD1_TX_MARK, CANFD1_RX_MARK, }; +/* - DRIF0 --------------------------------------------------------------- */ +static const unsigned int drif0_ctrl_a_pins[] = { +/* CLK, SYNC */ +RCAR_GP_PIN (6 ,8 ),RCAR_GP_PIN (6 ,9 ), +}; + +static const unsigned int drif0_ctrl_a_mux[] = { +RIF0_CLK_A_MARK ,RIF0_SYNC_A_MARK , +}; + +static const unsigned int drif0_data0_a_pins[] = { +/* D0 */ +RCAR_GP_PIN (6 ,10 ), +}; + +static const unsigned int drif0_data0_a_mux[] = { +RIF0_D0_A_MARK , +}; + +static const unsigned int drif0_data1_a_pins[] = { +/* D1 */ +RCAR_GP_PIN (6 ,7 ), +}; + +static const unsigned int drif0_data1_a_mux[] = { +RIF0_D1_A_MARK , +}; + +static const unsigned int drif0_ctrl_b_pins[] = { +/* CLK, SYNC */ +RCAR_GP_PIN (5 ,0 ),RCAR_GP_PIN (5 ,4 ), +}; + +static const unsigned int drif0_ctrl_b_mux[] = { +RIF0_CLK_B_MARK ,RIF0_SYNC_B_MARK , +}; + +static const unsigned int drif0_data0_b_pins[] = { +/* D0 */ +RCAR_GP_PIN (5 ,1 ), +}; + +static const unsigned int drif0_data0_b_mux[] = { +RIF0_D0_B_MARK , +}; + +static const unsigned int drif0_data1_b_pins[] = { +/* D1 */ +RCAR_GP_PIN (5 ,2 ), +}; + +static const unsigned int drif0_data1_b_mux[] = { +RIF0_D1_B_MARK , +}; + +static const unsigned int drif0_ctrl_c_pins[] = { +/* CLK, SYNC */ +RCAR_GP_PIN (5 ,12 ),RCAR_GP_PIN (5 ,15 ), +}; + +static const unsigned int drif0_ctrl_c_mux[] = { +RIF0_CLK_C_MARK ,RIF0_SYNC_C_MARK , +}; + +static const unsigned int drif0_data0_c_pins[] = { +/* D0 */ +RCAR_GP_PIN (5 ,13 ), +}; + +static const unsigned int drif0_data0_c_mux[] = { +RIF0_D0_C_MARK , +}; + +static const unsigned int drif0_data1_c_pins[] = { +/* D1 */ +RCAR_GP_PIN (5 ,14 ), +}; + +static const unsigned int drif0_data1_c_mux[] = { +RIF0_D1_C_MARK , +}; + +/* - DRIF1 --------------------------------------------------------------- */ +static const unsigned int drif1_ctrl_a_pins[] = { +/* CLK, SYNC */ +RCAR_GP_PIN (6 ,17 ),RCAR_GP_PIN (6 ,18 ), +}; + +static const unsigned int drif1_ctrl_a_mux[] = { +RIF1_CLK_A_MARK ,RIF1_SYNC_A_MARK , +}; + +static const unsigned int drif1_data0_a_pins[] = { +/* D0 */ +RCAR_GP_PIN (6 ,19 ), +}; + +static const unsigned int drif1_data0_a_mux[] = { +RIF1_D0_A_MARK , +}; + +static const unsigned int drif1_data1_a_pins[] = { +/* D1 */ +RCAR_GP_PIN (6 ,20 ), +}; + +static const unsigned int drif1_data1_a_mux[] = { +RIF1_D1_A_MARK , +}; + +static const unsigned int drif1_ctrl_b_pins[] = { +/* CLK, SYNC */ +RCAR_GP_PIN (5 ,9 ),RCAR_GP_PIN (5 ,3 ), +}; + +static const unsigned int drif1_ctrl_b_mux[] = { +RIF1_CLK_B_MARK ,RIF1_SYNC_B_MARK , +}; + +static const unsigned int drif1_data0_b_pins[] = { +/* D0 */ +RCAR_GP_PIN (5 ,7 ), +}; + +static const unsigned int drif1_data0_b_mux[] = { +RIF1_D0_B_MARK , +}; + +static const unsigned int drif1_data1_b_pins[] = { +/* D1 */ +RCAR_GP_PIN (5 ,8 ), +}; + +static const unsigned int drif1_data1_b_mux[] = { +RIF1_D1_B_MARK , +}; + +static const unsigned int drif1_ctrl_c_pins[] = { +/* CLK, SYNC */ +RCAR_GP_PIN (5 ,5 ),RCAR_GP_PIN (5 ,11 ), +}; + +static const unsigned int drif1_ctrl_c_mux[] = { +RIF1_CLK_C_MARK ,RIF1_SYNC_C_MARK , +}; + +static const unsigned int drif1_data0_c_pins[] = { +/* D0 */ +RCAR_GP_PIN (5 ,6 ), +}; + +static const unsigned int drif1_data0_c_mux[] = { +RIF1_D0_C_MARK , +}; + +static const unsigned int drif1_data1_c_pins[] = { +/* D1 */ +RCAR_GP_PIN (5 ,10 ), +}; + +static const unsigned int drif1_data1_c_mux[] = { +RIF1_D1_C_MARK , +}; + +/* - DRIF2 --------------------------------------------------------------- */ +static const unsigned int drif2_ctrl_a_pins[] = { +/* CLK, SYNC */ +RCAR_GP_PIN (6 ,8 ),RCAR_GP_PIN (6 ,9 ), +}; + +static const unsigned int drif2_ctrl_a_mux[] = { +RIF2_CLK_A_MARK ,RIF2_SYNC_A_MARK , +}; + +static const unsigned int drif2_data0_a_pins[] = { +/* D0 */ +RCAR_GP_PIN (6 ,7 ), +}; + +static const unsigned int drif2_data0_a_mux[] = { +RIF2_D0_A_MARK , +}; + +static const unsigned int drif2_data1_a_pins[] = { +/* D1 */ +RCAR_GP_PIN (6 ,10 ), +}; + +static const unsigned int drif2_data1_a_mux[] = { +RIF2_D1_A_MARK , +}; + +static const unsigned int drif2_ctrl_b_pins[] = { +/* CLK, SYNC */ +RCAR_GP_PIN (6 ,26 ),RCAR_GP_PIN (6 ,27 ), +}; + +static const unsigned int drif2_ctrl_b_mux[] = { +RIF2_CLK_B_MARK ,RIF2_SYNC_B_MARK , +}; + +static const unsigned int drif2_data0_b_pins[] = { +/* D0 */ +RCAR_GP_PIN (6 ,30 ), +}; + +static const unsigned int drif2_data0_b_mux[] = { +RIF2_D0_B_MARK , +}; + +static const unsigned int drif2_data1_b_pins[] = { +/* D1 */ +RCAR_GP_PIN (6 ,31 ), +}; + +static const unsigned int drif2_data1_b_mux[] = { +RIF2_D1_B_MARK , +}; + +/* - DRIF3 --------------------------------------------------------------- */ +static const unsigned int drif3_ctrl_a_pins[] = { +/* CLK, SYNC */ +RCAR_GP_PIN (6 ,17 ),RCAR_GP_PIN (6 ,18 ), +}; + +static const unsigned int drif3_ctrl_a_mux[] = { +RIF3_CLK_A_MARK ,RIF3_SYNC_A_MARK , +}; + +static const unsigned int drif3_data0_a_pins[] = { +/* D0 */ +RCAR_GP_PIN (6 ,19 ), +}; + +static const unsigned int drif3_data0_a_mux[] = { +RIF3_D0_A_MARK , +}; + +static const unsigned int drif3_data1_a_pins[] = { +/* D1 */ +RCAR_GP_PIN (6 ,20 ), +}; + +static const unsigned int drif3_data1_a_mux[] = { +RIF3_D1_A_MARK , +}; + +static const unsigned int drif3_ctrl_b_pins[] = { +/* CLK, SYNC */ +RCAR_GP_PIN (6 ,24 ),RCAR_GP_PIN (6 ,25 ), +}; + +static const unsigned int drif3_ctrl_b_mux[] = { +RIF3_CLK_B_MARK ,RIF3_SYNC_B_MARK , +}; + +static const unsigned int drif3_data0_b_pins[] = { +/* D0 */ +RCAR_GP_PIN (6 ,28 ), +}; + +static const unsigned int drif3_data0_b_mux[] = { +RIF3_D0_B_MARK , +}; + +static const unsigned int drif3_data1_b_pins[] = { +/* D1 */ +RCAR_GP_PIN (6 ,29 ), +}; + +static const unsigned int drif3_data1_b_mux[] = { +RIF3_D1_B_MARK , +}; +/* - DU --------------------------------------------------------------------- */ static const unsigned int du_rgb666_pins[] = {/* R[7:2], G[7:2], B[7:2] */
@@ -4070,6 +4344,36 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (canfd0_data_a),SH_PFC_PIN_GROUP (canfd0_data_b),SH_PFC_PIN_GROUP (canfd1_data), +SH_PFC_PIN_GROUP (drif0_ctrl_a), +SH_PFC_PIN_GROUP (drif0_data0_a), +SH_PFC_PIN_GROUP (drif0_data1_a), +SH_PFC_PIN_GROUP (drif0_ctrl_b), +SH_PFC_PIN_GROUP (drif0_data0_b), +SH_PFC_PIN_GROUP (drif0_data1_b), +SH_PFC_PIN_GROUP (drif0_ctrl_c), +SH_PFC_PIN_GROUP (drif0_data0_c), +SH_PFC_PIN_GROUP (drif0_data1_c), +SH_PFC_PIN_GROUP (drif1_ctrl_a), +SH_PFC_PIN_GROUP (drif1_data0_a), +SH_PFC_PIN_GROUP (drif1_data1_a), +SH_PFC_PIN_GROUP (drif1_ctrl_b), +SH_PFC_PIN_GROUP (drif1_data0_b), +SH_PFC_PIN_GROUP (drif1_data1_b), +SH_PFC_PIN_GROUP (drif1_ctrl_c), +SH_PFC_PIN_GROUP (drif1_data0_c), +SH_PFC_PIN_GROUP (drif1_data1_c), +SH_PFC_PIN_GROUP (drif2_ctrl_a), +SH_PFC_PIN_GROUP (drif2_data0_a), +SH_PFC_PIN_GROUP (drif2_data1_a), +SH_PFC_PIN_GROUP (drif2_ctrl_b), +SH_PFC_PIN_GROUP (drif2_data0_b), +SH_PFC_PIN_GROUP (drif2_data1_b), +SH_PFC_PIN_GROUP (drif3_ctrl_a), +SH_PFC_PIN_GROUP (drif3_data0_a), +SH_PFC_PIN_GROUP (drif3_data1_a), +SH_PFC_PIN_GROUP (drif3_ctrl_b), +SH_PFC_PIN_GROUP (drif3_data0_b), +SH_PFC_PIN_GROUP (drif3_data1_b),SH_PFC_PIN_GROUP (du_rgb666),SH_PFC_PIN_GROUP (du_rgb888), SH_PFC_PIN_GROUP(du_clk_out_0),
@@ -4404,6 +4708,48 @@ static const char * const canfd1_groups[] = { "canfd1_data", }; +static const char *const drif0_groups[] = { +"drif0_ctrl_a" , +"drif0_data0_a" , +"drif0_data1_a" , +"drif0_ctrl_b" , +"drif0_data0_b" , +"drif0_data1_b" , +"drif0_ctrl_c" , +"drif0_data0_c" , +"drif0_data1_c" , +}; + +static const char *const drif1_groups[] = { +"drif1_ctrl_a" , +"drif1_data0_a" , +"drif1_data1_a" , +"drif1_ctrl_b" , +"drif1_data0_b" , +"drif1_data1_b" , +"drif1_ctrl_c" , +"drif1_data0_c" , +"drif1_data1_c" , +}; + +static const char *const drif2_groups[] = { +"drif2_ctrl_a" , +"drif2_data0_a" , +"drif2_data1_a" , +"drif2_ctrl_b" , +"drif2_data0_b" , +"drif2_data1_b" , +}; + +static const char *const drif3_groups[] = { +"drif3_ctrl_a" , +"drif3_data0_a" , +"drif3_data1_a" , +"drif3_ctrl_b" , +"drif3_data0_b" , +"drif3_data1_b" , +}; +static const char *const du_groups[] = {"du_rgb666" ,"du_rgb888" ,
@@ -4807,6 +5153,10 @@ static const struct sh_pfc_function pinmux_functions[] = {SH_PFC_FUNCTION (can_clk),SH_PFC_FUNCTION (canfd0),SH_PFC_FUNCTION (canfd1), +SH_PFC_FUNCTION (drif0), +SH_PFC_FUNCTION (drif1), +SH_PFC_FUNCTION (drif2), +SH_PFC_FUNCTION (drif3),SH_PFC_FUNCTION (du),SH_PFC_FUNCTION (hscif0), SH_PFC_FUNCTION(hscif1),
Signature · 1 line
2.7.4
PATCH 30/39 pinctrl: sh-pfc: r8a77965: Add I2C{0, 3, 5} pins, groups and functions
In reply to Biju DasFrom: Takeshi Kihara <[email protected]>
commit 0a042b355e60269ad30725b5b5ca68fc5371a8df upstream.
This patch adds I2C{0,3,5} pins, groups and functions to the R8A7796 SoC.
These pins are physically muxed with other pins. Therefore, setup of MOD_SEL is needed for exclusive control with other pins.
--- drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 111 ++++++++++++++++++++++++++-------- 1 file changed, 87 insertions(+), 24 deletions(-)
drivers/pinctrl/sh-pfc/pfc-r8a77965.c +87 -24
@@ -556,6 +556,9 @@ MOD_SEL0_4_3 MOD_SEL1_4 \FM (DU_DOTCLKIN0)FM (DU_DOTCLKIN1 )FM (DU_DOTCLKIN3 ) \FM (TMS )FM (TDO )FM (ASEBRK )FM (MLB_REF )FM (TDI )FM (TCK )FM (TRST )FM (EXTALR ) +#define PINMUX_PHYS \ +FM (SCL0 )FM (SDA0 )FM (SCL3 )FM (SDA3 )FM (SCL5 )FM (SDA5 ) + enum { PINMUX_RESERVED = 0,
@@ -581,6 +584,7 @@ enum {PINMUX_IPSR PINMUX_MOD_SELSPINMUX_STATIC + PINMUX_PHYS PINMUX_MARK_END,#undef F_#undef FM
@@ -618,13 +622,15 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_MSEL (IP0_15_12 ,TX4_A ,SEL_SCIF4_0 ),PINMUX_IPSR_GPSR (IP0_19_16 ,FSCLKST2_N_A ), -PINMUX_IPSR_MSEL (IP0_19_16 ,AVB_AVTP_MATCH_A ,SEL_ETHERAVB_0 ), -PINMUX_IPSR_MSEL (IP0_19_16 ,MSIOF2_RXD_C ,SEL_MSIOF2_2 ), -PINMUX_IPSR_MSEL (IP0_19_16 ,CTS4_N_A ,SEL_SCIF4_0 ), +PINMUX_IPSR_PHYS_MSEL (IP0_19_16 ,AVB_AVTP_MATCH_A ,I2C_SEL_5_0 ,SEL_ETHERAVB_0 ), +PINMUX_IPSR_PHYS_MSEL (IP0_19_16 ,MSIOF2_RXD_C ,I2C_SEL_5_0 ,SEL_MSIOF2_2 ), +PINMUX_IPSR_PHYS_MSEL (IP0_19_16 ,CTS4_N_A ,I2C_SEL_5_0 ,SEL_SCIF4_0 ), +PINMUX_IPSR_PHYS (IP0_19_16 ,SCL5 ,I2C_SEL_5_1 ), -PINMUX_IPSR_MSEL (IP0_23_20 ,AVB_AVTP_CAPTURE_A ,SEL_ETHERAVB_0 ), -PINMUX_IPSR_MSEL (IP0_23_20 ,MSIOF2_TXD_C ,SEL_MSIOF2_2 ), -PINMUX_IPSR_MSEL (IP0_23_20 ,RTS4_N_A ,SEL_SCIF4_0 ), +PINMUX_IPSR_PHYS_MSEL (IP0_23_20 ,AVB_AVTP_CAPTURE_A ,I2C_SEL_5_0 ,SEL_ETHERAVB_0 ), +PINMUX_IPSR_PHYS_MSEL (IP0_23_20 ,MSIOF2_TXD_C ,I2C_SEL_5_0 ,SEL_MSIOF2_2 ), +PINMUX_IPSR_PHYS_MSEL (IP0_23_20 ,RTS4_N_A ,I2C_SEL_5_0 ,SEL_SCIF4_0 ), +PINMUX_IPSR_PHYS (IP0_23_20 ,SDA5 ,I2C_SEL_5_1 ),PINMUX_IPSR_GPSR (IP0_27_24 ,IRQ0 ), PINMUX_IPSR_GPSR(IP0_27_24, QPOLB),
@@ -677,14 +683,16 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_MSEL (IP1_19_16 ,VI4_DATA6_B ,SEL_VIN4_1 ),PINMUX_IPSR_MSEL (IP1_19_16 ,IECLK_B ,SEL_IEBUS_1 ), -PINMUX_IPSR_MSEL (IP1_23_20 ,PWM1_A ,SEL_PWM1_0 ), -PINMUX_IPSR_MSEL (IP1_23_20 ,HRX3_D ,SEL_HSCIF3_3 ), -PINMUX_IPSR_MSEL (IP1_23_20 ,VI4_DATA7_B ,SEL_VIN4_1 ), -PINMUX_IPSR_MSEL (IP1_23_20 ,IERX_B ,SEL_IEBUS_1 ), +PINMUX_IPSR_PHYS_MSEL (IP1_23_20 ,PWM1_A ,I2C_SEL_3_0 ,SEL_PWM1_0 ), +PINMUX_IPSR_PHYS_MSEL (IP1_23_20 ,HRX3_D ,I2C_SEL_3_0 ,SEL_HSCIF3_3 ), +PINMUX_IPSR_PHYS_MSEL (IP1_23_20 ,VI4_DATA7_B ,I2C_SEL_3_0 ,SEL_VIN4_1 ), +PINMUX_IPSR_PHYS_MSEL (IP1_23_20 ,IERX_B ,I2C_SEL_3_0 ,SEL_IEBUS_1 ), +PINMUX_IPSR_PHYS (IP0_23_20 ,SCL3 ,I2C_SEL_3_1 ), -PINMUX_IPSR_MSEL (IP1_27_24 ,PWM2_A ,SEL_PWM2_0 ), -PINMUX_IPSR_MSEL (IP1_27_24 ,HTX3_D ,SEL_HSCIF3_3 ), -PINMUX_IPSR_MSEL (IP1_27_24 ,IETX_B ,SEL_IEBUS_1 ), +PINMUX_IPSR_PHYS_MSEL (IP1_27_24 ,PWM2_A ,I2C_SEL_3_0 ,SEL_PWM2_0 ), +PINMUX_IPSR_PHYS_MSEL (IP1_27_24 ,HTX3_D ,I2C_SEL_3_0 ,SEL_HSCIF3_3 ), +PINMUX_IPSR_PHYS_MSEL (IP1_27_24 ,IETX_B ,I2C_SEL_3_0 ,SEL_IEBUS_1 ), +PINMUX_IPSR_PHYS (IP1_27_24 ,SDA3 ,I2C_SEL_3_1 ),PINMUX_IPSR_GPSR (IP1_31_28 ,A0 ), PINMUX_IPSR_GPSR(IP1_31_28, LCDOUT16),
@@ -1118,13 +1126,15 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_MSEL (IP11_15_12 ,NFDATA15_A ,SEL_NDF_0 ),PINMUX_IPSR_MSEL (IP11_15_12 ,SDA2_B ,SEL_I2C2_1 ), -PINMUX_IPSR_GPSR (IP11_19_16 ,SD1_CD ), -PINMUX_IPSR_MSEL (IP11_19_16 ,NFRB_N_A ,SEL_NDF_0 ), -PINMUX_IPSR_MSEL (IP11_19_16 ,SIM0_CLK_B ,SEL_SIMCARD_1 ), +PINMUX_IPSR_MSEL (IP11_19_16 ,SD1_CD ,I2C_SEL_0_0 ), +PINMUX_IPSR_PHYS_MSEL (IP11_19_16 ,NFRB_N_A ,I2C_SEL_0_0 ,SEL_NDF_0 ), +PINMUX_IPSR_PHYS_MSEL (IP11_19_16 ,SIM0_CLK_B ,I2C_SEL_0_0 ,SEL_SIMCARD_1 ), +PINMUX_IPSR_PHYS (IP11_19_16 ,SCL0 ,I2C_SEL_0_1 ), -PINMUX_IPSR_GPSR (IP11_23_20 ,SD1_WP ), -PINMUX_IPSR_MSEL (IP11_23_20 ,NFCE_N_A ,SEL_NDF_0 ), -PINMUX_IPSR_MSEL (IP11_23_20 ,SIM0_D_B ,SEL_SIMCARD_1 ), +PINMUX_IPSR_MSEL (IP11_23_20 ,SD1_WP ,I2C_SEL_0_0 ), +PINMUX_IPSR_PHYS_MSEL (IP11_23_20 ,NFCE_N_A ,I2C_SEL_0_0 ,SEL_NDF_0 ), +PINMUX_IPSR_PHYS_MSEL (IP11_23_20 ,SIM0_D_B ,I2C_SEL_0_0 ,SEL_SIMCARD_1 ), +PINMUX_IPSR_PHYS (IP11_23_20 ,SDA0 ,I2C_SEL_0_1 ),PINMUX_IPSR_GPSR (IP11_27_24 ,SCK0 ), PINMUX_IPSR_MSEL(IP11_27_24, HSCK1_B, SEL_HSCIF1_1),
@@ -1492,11 +1502,6 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_MSEL (IP18_7_4 ,FMIN_C ,SEL_FM_2 ), PINMUX_IPSR_MSEL(IP18_7_4, FMIN_D, SEL_FM_3), -/* I2C */ -PINMUX_IPSR_NOGP (0 ,I2C_SEL_0_1 ), -PINMUX_IPSR_NOGP (0 ,I2C_SEL_3_1 ), -PINMUX_IPSR_NOGP (0 ,I2C_SEL_5_1 ), -/* * Static pins can not be muxed between different functions but * still need mark entries in the pinmux list. Add each static
@@ -2475,52 +2480,92 @@ static const unsigned int hscif4_data_b_mux[] = { };/* - I2C -------------------------------------------------------------------- */ +static const unsigned int i2c0_pins[] = { +/* SCL, SDA */ +RCAR_GP_PIN (3 ,14 ),RCAR_GP_PIN (3 ,15 ), +}; + +static const unsigned int i2c0_mux[] = { +SCL0_MARK ,SDA0_MARK , +}; +static const unsigned int i2c1_a_pins[] = {/* SDA, SCL */ RCAR_GP_PIN (5 ,11 ),RCAR_GP_PIN (5 ,10 ), }; +static const unsigned int i2c1_a_mux[] = {SDA1_A_MARK ,SCL1_A_MARK , }; +static const unsigned int i2c1_b_pins[] = {/* SDA, SCL */ RCAR_GP_PIN (5 ,24 ),RCAR_GP_PIN (5 ,23 ), }; +static const unsigned int i2c1_b_mux[] = {SDA1_B_MARK ,SCL1_B_MARK , }; +static const unsigned int i2c2_a_pins[] = {/* SDA, SCL */ RCAR_GP_PIN (5 ,0 ),RCAR_GP_PIN (5 ,4 ), }; +static const unsigned int i2c2_a_mux[] = {SDA2_A_MARK ,SCL2_A_MARK , }; +static const unsigned int i2c2_b_pins[] = {/* SDA, SCL */ RCAR_GP_PIN (3 ,13 ),RCAR_GP_PIN (3 ,12 ), }; +static const unsigned int i2c2_b_mux[] = {SDA2_B_MARK ,SCL2_B_MARK , }; + +static const unsigned int i2c3_pins[] = { +/* SCL, SDA */ +RCAR_GP_PIN (2 ,7 ),RCAR_GP_PIN (2 ,8 ), +}; + +static const unsigned int i2c3_mux[] = { +SCL3_MARK ,SDA3_MARK , +}; + +static const unsigned int i2c5_pins[] = { +/* SCL, SDA */ +RCAR_GP_PIN (2 ,13 ),RCAR_GP_PIN (2 ,14 ), +}; + +static const unsigned int i2c5_mux[] = { +SCL5_MARK ,SDA5_MARK , +}; +static const unsigned int i2c6_a_pins[] = {/* SDA, SCL */ RCAR_GP_PIN (1 ,8 ),RCAR_GP_PIN (1 ,11 ), }; +static const unsigned int i2c6_a_mux[] = {SDA6_A_MARK ,SCL6_A_MARK , }; +static const unsigned int i2c6_b_pins[] = {/* SDA, SCL */ RCAR_GP_PIN (1 ,26 ),RCAR_GP_PIN (1 ,25 ), }; +static const unsigned int i2c6_b_mux[] = {SDA6_B_MARK ,SCL6_B_MARK , }; +static const unsigned int i2c6_c_pins[] = {/* SDA, SCL */ RCAR_GP_PIN (0 ,15 ),RCAR_GP_PIN (0 ,14 ), }; +static const unsigned int i2c6_c_mux[] = {SDA6_C_MARK ,SCL6_C_MARK , };
@@ -4410,10 +4455,13 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (hscif4_clk),SH_PFC_PIN_GROUP (hscif4_ctrl),SH_PFC_PIN_GROUP (hscif4_data_b), +SH_PFC_PIN_GROUP (i2c0),SH_PFC_PIN_GROUP (i2c1_a),SH_PFC_PIN_GROUP (i2c1_b),SH_PFC_PIN_GROUP (i2c2_a),SH_PFC_PIN_GROUP (i2c2_b), +SH_PFC_PIN_GROUP (i2c3), +SH_PFC_PIN_GROUP (i2c5),SH_PFC_PIN_GROUP (i2c6_a),SH_PFC_PIN_GROUP (i2c6_b), SH_PFC_PIN_GROUP(i2c6_c),
@@ -4804,6 +4852,10 @@ static const char * const hscif4_groups[] = { "hscif4_data_b", }; +static const char *const i2c0_groups[] = { +"i2c0" , +}; +static const char *const i2c1_groups[] = {"i2c1_a" ,"i2c1_b" ,
@@ -4814,6 +4866,14 @@ static const char * const i2c2_groups[] = { "i2c2_b", }; +static const char *const i2c3_groups[] = { +"i2c3" , +}; + +static const char *const i2c5_groups[] = { +"i2c5" , +}; +static const char *const i2c6_groups[] = {"i2c6_a" ,"i2c6_b" ,
@@ -5163,8 +5223,11 @@ static const struct sh_pfc_function pinmux_functions[] = {SH_PFC_FUNCTION (hscif2),SH_PFC_FUNCTION (hscif3),SH_PFC_FUNCTION (hscif4), +SH_PFC_FUNCTION (i2c0),SH_PFC_FUNCTION (i2c1),SH_PFC_FUNCTION (i2c2), +SH_PFC_FUNCTION (i2c3), +SH_PFC_FUNCTION (i2c5),SH_PFC_FUNCTION (i2c6),SH_PFC_FUNCTION (intc_ex), SH_PFC_FUNCTION(msiof0),
Signature · 1 line
2.7.4
PATCH 31/39 pinctrl: sh-pfc: r8a77965: Add TPU pins, groups and functions
In reply to Biju DasFrom: Geert Uytterhoeven <[email protected]>
commit be1c072d66282b4633239b8a74432cf3a95d5b22 upstream.
Add pins, groups and functions for the 16-Bit Timer Pulse Unit outputs on the R-Car M3-N SoC.
--- drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+)
drivers/pinctrl/sh-pfc/pfc-r8a77965.c +42 -0
@@ -4113,6 +4113,36 @@ static const unsigned int tmu_tclk2_b_mux[] = { TCLK2_B_MARK, }; +/* - TPU ------------------------------------------------------------------- */ +static const unsigned int tpu_to0_pins[] = { +/* TPU0TO0 */ +RCAR_GP_PIN (6 ,28 ), +}; +static const unsigned int tpu_to0_mux[] = { +TPU0TO0_MARK , +}; +static const unsigned int tpu_to1_pins[] = { +/* TPU0TO1 */ +RCAR_GP_PIN (6 ,29 ), +}; +static const unsigned int tpu_to1_mux[] = { +TPU0TO1_MARK , +}; +static const unsigned int tpu_to2_pins[] = { +/* TPU0TO2 */ +RCAR_GP_PIN (6 ,30 ), +}; +static const unsigned int tpu_to2_mux[] = { +TPU0TO2_MARK , +}; +static const unsigned int tpu_to3_pins[] = { +/* TPU0TO3 */ +RCAR_GP_PIN (6 ,31 ), +}; +static const unsigned int tpu_to3_mux[] = { +TPU0TO3_MARK , +}; +/* - USB0 ------------------------------------------------------------------- */ static const unsigned int usb0_pins[] = {/* PWEN, OVC */
@@ -4669,6 +4699,10 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (tmu_tclk1_b),SH_PFC_PIN_GROUP (tmu_tclk2_a),SH_PFC_PIN_GROUP (tmu_tclk2_b), +SH_PFC_PIN_GROUP (tpu_to0), +SH_PFC_PIN_GROUP (tpu_to1), +SH_PFC_PIN_GROUP (tpu_to2), +SH_PFC_PIN_GROUP (tpu_to3),SH_PFC_PIN_GROUP (usb0),SH_PFC_PIN_GROUP (usb1), SH_PFC_PIN_GROUP(usb30),
@@ -5161,6 +5195,13 @@ static const char * const tmu_groups[] = { "tmu_tclk2_b", }; +static const char *const tpu_groups[] = { +"tpu_to0" , +"tpu_to1" , +"tpu_to2" , +"tpu_to3" , +}; +static const char *const usb0_groups[] = {"usb0" , };
@@ -5255,6 +5296,7 @@ static const struct sh_pfc_function pinmux_functions[] = {SH_PFC_FUNCTION (sdhi3),SH_PFC_FUNCTION (ssi),SH_PFC_FUNCTION (tmu), +SH_PFC_FUNCTION (tpu),SH_PFC_FUNCTION (usb0),SH_PFC_FUNCTION (usb1), SH_PFC_FUNCTION(usb30),
Signature · 1 line
2.7.4
PATCH 32/39 pinctrl: sh-pfc: r8a77965: Use new macros for non-GPIO pins
In reply to Biju DasFrom: Geert Uytterhoeven <[email protected]>
commit 5da89cedce5c5b9d728b334c0183211fbe2ddd0b upstream.
Update the R-Car M3-N pin control driver to use the new macros for describing pins without GPIO functionality. This replaces the use of physical pin numbers on the R-Car M3-N SiP (in 39x39 BGA package) by symbolic enum values, referring to signal names.
--- drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 307 +++++++++++++++++----------------- 1 file changed, 151 insertions(+), 156 deletions(-)
drivers/pinctrl/sh-pfc/pfc-r8a77965.c +151 -156
@@ -33,6 +33,51 @@PORT_GP_CFG_26 (5 , fn, sfx,CFG_FLAGS ), \PORT_GP_CFG_32 (6 , fn, sfx,CFG_FLAGS ), \ PORT_GP_CFG_4(7, fn, sfx, CFG_FLAGS) + +#define CPU_ALL_NOGP (fn) \ + PIN_NOGP_CFG(ASEBRK, "ASEBRK", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(AVB_MDIO, "AVB_MDIO", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(AVB_RD0, "AVB_RD0", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(AVB_RD1, "AVB_RD1", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(AVB_RD2, "AVB_RD2", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(AVB_RD3, "AVB_RD3", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(AVB_RXC, "AVB_RXC", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(AVB_RX_CTL, "AVB_RX_CTL", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(AVB_TD0, "AVB_TD0", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(AVB_TD1, "AVB_TD1", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(AVB_TD2, "AVB_TD2", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(AVB_TD3, "AVB_TD3", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(AVB_TXC, "AVB_TXC", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(AVB_TXCREFCLK, "AVB_TXCREFCLK", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(AVB_TX_CTL, "AVB_TX_CTL", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(DU_DOTCLKIN0, "DU_DOTCLKIN0", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(DU_DOTCLKIN1, "DU_DOTCLKIN1", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(DU_DOTCLKIN3, "DU_DOTCLKIN3", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(EXTALR, "EXTALR", fn, SH_PFC_PIN_CFG_PULL_UP_DOWN),\ + PIN_NOGP_CFG(FSCLKST, "FSCLKST", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(MLB_REF, "MLB_REF", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(PRESETOUT_N, "PRESETOUT#", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(QSPI0_IO2, "QSPI0_IO2", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(QSPI0_IO3, "QSPI0_IO3", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(QSPI0_MISO_IO1, "QSPI0_MISO_IO1", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(QSPI0_MOSI_IO0, "QSPI0_MOSI_IO0", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(QSPI0_SPCLK, "QSPI0_SPCLK", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(QSPI0_SSL, "QSPI0_SSL", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(QSPI1_IO2, "QSPI1_IO2", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(QSPI1_IO3, "QSPI1_IO3", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(QSPI1_MISO_IO1, "QSPI1_MISO_IO1", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(QSPI1_MOSI_IO0, "QSPI1_MOSI_IO0", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(QSPI1_SPCLK, "QSPI1_SPCLK", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(QSPI1_SSL, "QSPI1_SSL", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(RPC_INT_N, "RPC_INT#", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(RPC_RESET_N, "RPC_RESET#", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(RPC_WP_N, "RPC_WP#", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(TCK, "TCK", fn, SH_PFC_PIN_CFG_PULL_UP_DOWN), \ + PIN_NOGP_CFG(TDI, "TDI", fn, SH_PFC_PIN_CFG_PULL_UP_DOWN), \ + PIN_NOGP_CFG(TDO, "TDO", fn, SH_PFC_PIN_CFG_DRIVE_STRENGTH), \ + PIN_NOGP_CFG(TMS, "TMS", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(TRST_N, "TRST#", fn, SH_PFC_PIN_CFG_PULL_UP_DOWN) +/* * F_() : just information * FM() : macro for FN_xxx / xxx_MARK
@@ -1515,66 +1560,16 @@ static const u16 pinmux_data[] = { };/* -* R8A77965 has 8 banks with 32 GPIOs in each => 256 GPIOs. -* Physical layout rows: A - AW, cols: 1 - 39. +* Pins not associated with a GPIO port. */ -#define ROW_GROUP_A (r) ('Z' - 'A' + 1 + (r)) -#define PIN_NUMBER (r, c) (((r) - 'A') * 39 + (c) + 300) -#define PIN_A_NUMBER (r, c) PIN_NUMBER(ROW_GROUP_A(r), c) +enum { + GP_ASSIGN_LAST(), + NOGP_ALL(), +};static const struct sh_pfc_pin pinmux_pins[] = {PINMUX_GPIO_GP_ALL (), - -/* -* Pins not associated with a GPIO port. -* -* The pin positions are different between different r8a77965 -* packages, all that is needed for the pfc driver is a unique -* number for each pin. To this end use the pin layout from -* R-Car M3SiP to calculate a unique number for each pin. -*/ -SH_PFC_PIN_NAMED_CFG ('A' ,8 ,AVB_TX_CTL ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('A' ,9 ,AVB_MDIO ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('A' ,12 ,AVB_TXCREFCLK ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('A' ,13 ,AVB_RD0 ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('A' ,14 ,AVB_RD2 ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('A' ,16 ,AVB_RX_CTL ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('A' ,17 ,AVB_TD2 ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('A' ,18 ,AVB_TD0 ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('A' ,19 ,AVB_TXC ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('B' ,13 ,AVB_RD1 ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('B' ,14 ,AVB_RD3 ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('B' ,17 ,AVB_TD3 ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('B' ,18 ,AVB_TD1 ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('B' ,19 ,AVB_RXC ,CFG_FLAGS ), - SH_PFC_PIN_NAMED_CFG('C', 1, PRESETOUT#, CFG_FLAGS), -SH_PFC_PIN_NAMED_CFG ('H' ,37 ,MLB_REF ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('V' ,3 ,QSPI1_SPCLK ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('V' ,5 ,QSPI1_SSL ,CFG_FLAGS ), - SH_PFC_PIN_NAMED_CFG('V', 6, RPC_WP#, CFG_FLAGS), - SH_PFC_PIN_NAMED_CFG('V', 7, RPC_RESET#, CFG_FLAGS), -SH_PFC_PIN_NAMED_CFG ('W' ,3 ,QSPI0_SPCLK ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('Y' ,3 ,QSPI0_SSL ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('Y' ,6 ,QSPI0_IO2 ,CFG_FLAGS ), - SH_PFC_PIN_NAMED_CFG('Y', 7, RPC_INT#, CFG_FLAGS), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('B' ),4 ,QSPI0_MISO_IO1 ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('B' ),6 ,QSPI0_IO3 ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('C' ),3 ,QSPI1_IO3 ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('C' ),5 ,QSPI0_MOSI_IO0 ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('C' ),7 ,QSPI1_MOSI_IO0 ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('D' ),38 ,FSCLKST ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('D' ),39 ,EXTALR ,SH_PFC_PIN_CFG_PULL_UP_DOWN ), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('E' ),4 ,QSPI1_IO2 ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('E' ),5 ,QSPI1_MISO_IO1 ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('P' ),7 ,DU_DOTCLKIN0 ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('P' ),8 ,DU_DOTCLKIN1 ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('R' ),8 ,DU_DOTCLKIN3 ,CFG_FLAGS ), - SH_PFC_PIN_NAMED_CFG(ROW_GROUP_A('R'), 26, TRST#, SH_PFC_PIN_CFG_PULL_UP_DOWN), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('R' ),29 ,TDI ,SH_PFC_PIN_CFG_PULL_UP_DOWN ), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('R' ),30 ,TMS ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('T' ),27 ,TCK ,SH_PFC_PIN_CFG_PULL_UP_DOWN ), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('T' ),28 ,TDO ,SH_PFC_PIN_CFG_DRIVE_STRENGTH ), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('T' ),30 ,ASEBRK ,CFG_FLAGS ), +PINMUX_NOGP_ALL (), };/* - AUDIO CLOCK ------------------------------------------------------------ */
@@ -1723,7 +1718,7 @@ static const unsigned int avb_phy_int_mux[] = { };static const unsigned int avb_mdio_pins[] = {/* AVB_MDC, AVB_MDIO */ -RCAR_GP_PIN (2 ,9 ),PIN_NUMBER ('A' ,9 ), +RCAR_GP_PIN (2 ,9 ),PIN_AVB_MDIO , };static const unsigned int avb_mdio_mux[] = {AVB_MDC_MARK ,AVB_MDIO_MARK ,
@@ -1736,11 +1731,11 @@ static const unsigned int avb_mii_pins[] = {* AVB_RD1, AVB_RD2, AVB_RD3, * AVB_TXCREFCLK */ -PIN_NUMBER ('A' ,8 ),PIN_NUMBER ('A' ,19 ),PIN_NUMBER ('A' ,18 ), -PIN_NUMBER ('B' ,18 ),PIN_NUMBER ('A' ,17 ),PIN_NUMBER ('B' ,17 ), -PIN_NUMBER ('A' ,16 ),PIN_NUMBER ('B' ,19 ),PIN_NUMBER ('A' ,13 ), -PIN_NUMBER ('B' ,13 ),PIN_NUMBER ('A' ,14 ),PIN_NUMBER ('B' ,14 ), - PIN_NUMBER('A', 12), +PIN_AVB_TX_CTL ,PIN_AVB_TXC ,PIN_AVB_TD0 , +PIN_AVB_TD1 ,PIN_AVB_TD2 ,PIN_AVB_TD3 , +PIN_AVB_RX_CTL ,PIN_AVB_RXC ,PIN_AVB_RD0 , +PIN_AVB_RD1 ,PIN_AVB_RD2 ,PIN_AVB_RD3 , + PIN_AVB_TXCREFCLK, }; static const unsigned int avb_mii_mux[] = {
@@ -5869,44 +5864,44 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {static const struct pinmux_drive_reg pinmux_drive_regs[] = { { PINMUX_DRIVE_REG("DRVCTRL0", 0xe6060300) { - {PIN_NUMBER ('W' ,3 ),28 ,2 },/* QSPI0_SPCLK */ - {PIN_A_NUMBER ('C' ,5 ),24 ,2 },/* QSPI0_MOSI_IO0 */ - {PIN_A_NUMBER ('B' ,4 ),20 ,2 },/* QSPI0_MISO_IO1 */ - {PIN_NUMBER ('Y' ,6 ),16 ,2 },/* QSPI0_IO2 */ - {PIN_A_NUMBER ('B' ,6 ),12 ,2 },/* QSPI0_IO3 */ - {PIN_NUMBER ('Y' ,3 ),8 ,2 },/* QSPI0_SSL */ - {PIN_NUMBER ('V' ,3 ),4 ,2 },/* QSPI1_SPCLK */ - {PIN_A_NUMBER ('C' ,7 ),0 ,2 },/* QSPI1_MOSI_IO0 */ + {PIN_QSPI0_SPCLK ,28 ,2 },/* QSPI0_SPCLK */ + {PIN_QSPI0_MOSI_IO0 ,24 ,2 },/* QSPI0_MOSI_IO0 */ + {PIN_QSPI0_MISO_IO1 ,20 ,2 },/* QSPI0_MISO_IO1 */ + {PIN_QSPI0_IO2 ,16 ,2 },/* QSPI0_IO2 */ + {PIN_QSPI0_IO3 ,12 ,2 },/* QSPI0_IO3 */ + {PIN_QSPI0_SSL ,8 ,2 },/* QSPI0_SSL */ + {PIN_QSPI1_SPCLK ,4 ,2 },/* QSPI1_SPCLK */ + {PIN_QSPI1_MOSI_IO0 ,0 ,2 },/* QSPI1_MOSI_IO0 */ } }, { PINMUX_DRIVE_REG("DRVCTRL1", 0xe6060304) { - {PIN_A_NUMBER ('E' ,5 ),28 ,2 },/* QSPI1_MISO_IO1 */ - {PIN_A_NUMBER ('E' ,4 ),24 ,2 },/* QSPI1_IO2 */ - {PIN_A_NUMBER ('C' ,3 ),20 ,2 },/* QSPI1_IO3 */ - {PIN_NUMBER ('V' ,5 ),16 ,2 },/* QSPI1_SSL */ - {PIN_NUMBER ('Y' ,7 ),12 ,2 },/* RPC_INT# */ - {PIN_NUMBER ('V' ,6 ),8 ,2 },/* RPC_WP# */ - {PIN_NUMBER ('V' ,7 ),4 ,2 },/* RPC_RESET# */ - {PIN_NUMBER ('A' ,16 ),0 ,3 },/* AVB_RX_CTL */ + {PIN_QSPI1_MISO_IO1 ,28 ,2 },/* QSPI1_MISO_IO1 */ + {PIN_QSPI1_IO2 ,24 ,2 },/* QSPI1_IO2 */ + {PIN_QSPI1_IO3 ,20 ,2 },/* QSPI1_IO3 */ + {PIN_QSPI1_SSL ,16 ,2 },/* QSPI1_SSL */ + {PIN_RPC_INT_N ,12 ,2 },/* RPC_INT# */ + {PIN_RPC_WP_N ,8 ,2 },/* RPC_WP# */ + {PIN_RPC_RESET_N ,4 ,2 },/* RPC_RESET# */ + {PIN_AVB_RX_CTL ,0 ,3 },/* AVB_RX_CTL */ } }, { PINMUX_DRIVE_REG("DRVCTRL2", 0xe6060308) { - {PIN_NUMBER ('B' ,19 ),28 ,3 },/* AVB_RXC */ - {PIN_NUMBER ('A' ,13 ),24 ,3 },/* AVB_RD0 */ - {PIN_NUMBER ('B' ,13 ),20 ,3 },/* AVB_RD1 */ - {PIN_NUMBER ('A' ,14 ),16 ,3 },/* AVB_RD2 */ - {PIN_NUMBER ('B' ,14 ),12 ,3 },/* AVB_RD3 */ - {PIN_NUMBER ('A' ,8 ),8 ,3 },/* AVB_TX_CTL */ - {PIN_NUMBER ('A' ,19 ),4 ,3 },/* AVB_TXC */ - {PIN_NUMBER ('A' ,18 ),0 ,3 },/* AVB_TD0 */ + {PIN_AVB_RXC ,28 ,3 },/* AVB_RXC */ + {PIN_AVB_RD0 ,24 ,3 },/* AVB_RD0 */ + {PIN_AVB_RD1 ,20 ,3 },/* AVB_RD1 */ + {PIN_AVB_RD2 ,16 ,3 },/* AVB_RD2 */ + {PIN_AVB_RD3 ,12 ,3 },/* AVB_RD3 */ + {PIN_AVB_TX_CTL ,8 ,3 },/* AVB_TX_CTL */ + {PIN_AVB_TXC ,4 ,3 },/* AVB_TXC */ + {PIN_AVB_TD0 ,0 ,3 },/* AVB_TD0 */ } }, { PINMUX_DRIVE_REG("DRVCTRL3", 0xe606030c) { - {PIN_NUMBER ('B' ,18 ),28 ,3 },/* AVB_TD1 */ - {PIN_NUMBER ('A' ,17 ),24 ,3 },/* AVB_TD2 */ - {PIN_NUMBER ('B' ,17 ),20 ,3 },/* AVB_TD3 */ - {PIN_NUMBER ('A' ,12 ),16 ,3 },/* AVB_TXCREFCLK */ - {PIN_NUMBER ('A' ,9 ),12 ,3 },/* AVB_MDIO */ - {RCAR_GP_PIN (2 ,9 ),8 ,3 },/* AVB_MDC */ - {RCAR_GP_PIN (2 ,10 ),4 ,3 },/* AVB_MAGIC */ - {RCAR_GP_PIN (2 ,11 ),0 ,3 },/* AVB_PHY_INT */ + {PIN_AVB_TD1 ,28 ,3 },/* AVB_TD1 */ + {PIN_AVB_TD2 ,24 ,3 },/* AVB_TD2 */ + {PIN_AVB_TD3 ,20 ,3 },/* AVB_TD3 */ + {PIN_AVB_TXCREFCLK ,16 ,3 },/* AVB_TXCREFCLK */ + {PIN_AVB_MDIO ,12 ,3 },/* AVB_MDIO */ + {RCAR_GP_PIN (2 ,9 ),8 ,3 },/* AVB_MDC */ + {RCAR_GP_PIN (2 ,10 ),4 ,3 },/* AVB_MAGIC */ + {RCAR_GP_PIN (2 ,11 ),0 ,3 },/* AVB_PHY_INT */ } }, { PINMUX_DRIVE_REG("DRVCTRL4", 0xe6060310) { {RCAR_GP_PIN (2 ,12 ),28 ,3 },/* AVB_LINK */
@@ -5960,7 +5955,7 @@ static const struct pinmux_drive_reg pinmux_drive_regs[] = { } }, { PINMUX_DRIVE_REG("DRVCTRL9", 0xe6060324) { { RCAR_GP_PIN(1, 27), 28, 3 }, /* EX_WAIT0 */ - { PIN_NUMBER('C', 1), 24, 3 }, /* PRESETOUT# */ + { PIN_PRESETOUT_N, 24, 3 }, /* PRESETOUT# */ { RCAR_GP_PIN(0, 0), 20, 3 }, /* D0 */ { RCAR_GP_PIN(0, 1), 16, 3 }, /* D1 */ { RCAR_GP_PIN(0, 2), 12, 3 }, /* D2 */
@@ -5979,29 +5974,29 @@ static const struct pinmux_drive_reg pinmux_drive_regs[] = { { RCAR_GP_PIN(0, 13), 0, 3 }, /* D13 */ } }, { PINMUX_DRIVE_REG("DRVCTRL11", 0xe606032c) { - { RCAR_GP_PIN(0, 14), 28, 3 }, /* D14 */ - { RCAR_GP_PIN(0, 15), 24, 3 }, /* D15 */ - { RCAR_GP_PIN(7, 0), 20, 3 }, /* AVS1 */ - { RCAR_GP_PIN(7, 1), 16, 3 }, /* AVS2 */ - { RCAR_GP_PIN(7, 2), 12, 3 }, /* GP7_02 */ - { RCAR_GP_PIN(7, 3), 8, 3 }, /* GP7_03 */ - { PIN_A_NUMBER('P', 7), 4, 2 }, /* DU_DOTCLKIN0 */ - { PIN_A_NUMBER('P', 8), 0, 2 }, /* DU_DOTCLKIN1 */ + { RCAR_GP_PIN(0, 14), 28, 3 }, /* D14 */ + { RCAR_GP_PIN(0, 15), 24, 3 }, /* D15 */ + { RCAR_GP_PIN(7, 0), 20, 3 }, /* AVS1 */ + { RCAR_GP_PIN(7, 1), 16, 3 }, /* AVS2 */ + { RCAR_GP_PIN(7, 2), 12, 3 }, /* GP7_02 */ + { RCAR_GP_PIN(7, 3), 8, 3 }, /* GP7_03 */ + { PIN_DU_DOTCLKIN0, 4, 2 }, /* DU_DOTCLKIN0 */ + { PIN_DU_DOTCLKIN1, 0, 2 }, /* DU_DOTCLKIN1 */ } }, { PINMUX_DRIVE_REG("DRVCTRL12", 0xe6060330) { - { PIN_A_NUMBER('R', 8), 28, 2 }, /* DU_DOTCLKIN3 */ - { PIN_A_NUMBER('D', 38), 20, 2 }, /* FSCLKST */ - { PIN_A_NUMBER('R', 30), 4, 2 }, /* TMS */ + { PIN_DU_DOTCLKIN3, 28, 2 }, /* DU_DOTCLKIN3 */ + { PIN_FSCLKST, 20, 2 }, /* FSCLKST */ + { PIN_TMS, 4, 2 }, /* TMS */ } }, { PINMUX_DRIVE_REG("DRVCTRL13", 0xe6060334) { - { PIN_A_NUMBER('T', 28), 28, 2 }, /* TDO */ - { PIN_A_NUMBER('T', 30), 24, 2 }, /* ASEBRK */ - { RCAR_GP_PIN(3, 0), 20, 3 }, /* SD0_CLK */ - { RCAR_GP_PIN(3, 1), 16, 3 }, /* SD0_CMD */ - { RCAR_GP_PIN(3, 2), 12, 3 }, /* SD0_DAT0 */ - { RCAR_GP_PIN(3, 3), 8, 3 }, /* SD0_DAT1 */ - { RCAR_GP_PIN(3, 4), 4, 3 }, /* SD0_DAT2 */ - { RCAR_GP_PIN(3, 5), 0, 3 }, /* SD0_DAT3 */ + { PIN_TDO, 28, 2 }, /* TDO */ + { PIN_ASEBRK, 24, 2 }, /* ASEBRK */ + { RCAR_GP_PIN(3, 0), 20, 3 }, /* SD0_CLK */ + { RCAR_GP_PIN(3, 1), 16, 3 }, /* SD0_CMD */ + { RCAR_GP_PIN(3, 2), 12, 3 }, /* SD0_DAT0 */ + { RCAR_GP_PIN(3, 3), 8, 3 }, /* SD0_DAT1 */ + { RCAR_GP_PIN(3, 4), 4, 3 }, /* SD0_DAT2 */ + { RCAR_GP_PIN(3, 5), 0, 3 }, /* SD0_DAT3 */ } }, { PINMUX_DRIVE_REG("DRVCTRL14", 0xe6060338) { { RCAR_GP_PIN(3, 6), 28, 3 }, /* SD1_CLK */
@@ -6070,7 +6065,7 @@ static const struct pinmux_drive_reg pinmux_drive_regs[] = { { RCAR_GP_PIN(5, 23), 16, 3 }, /* MLB_CLK */ { RCAR_GP_PIN(5, 24), 12, 3 }, /* MLB_SIG */ { RCAR_GP_PIN(5, 25), 8, 3 }, /* MLB_DAT */ - { PIN_NUMBER('H', 37), 4, 3 }, /* MLB_REF */ + { PIN_MLB_REF, 4, 3 }, /* MLB_REF */ { RCAR_GP_PIN(6, 0), 0, 3 }, /* SSI_SCK01239 */ } }, { PINMUX_DRIVE_REG("DRVCTRL21", 0xe6060354) {
@@ -6141,35 +6136,35 @@ static int r8a77965_pin_to_pocctrl(struct sh_pfc *pfc, unsigned int pin, u32 *po static const struct pinmux_bias_reg pinmux_bias_regs[] = { { PINMUX_BIAS_REG("PUEN0", 0xe6060400, "PUD0", 0xe6060440) { - [ 0] = PIN_NUMBER('W', 3), /* QSPI0_SPCLK */ - [ 1] = PIN_A_NUMBER('C', 5), /* QSPI0_MOSI_IO0 */ - [ 2] = PIN_A_NUMBER('B', 4), /* QSPI0_MISO_IO1 */ - [ 3] = PIN_NUMBER('Y', 6), /* QSPI0_IO2 */ - [ 4] = PIN_A_NUMBER('B', 6), /* QSPI0_IO3 */ - [ 5] = PIN_NUMBER('Y', 3), /* QSPI0_SSL */ - [ 6] = PIN_NUMBER('V', 3), /* QSPI1_SPCLK */ - [ 7] = PIN_A_NUMBER('C', 7), /* QSPI1_MOSI_IO0 */ - [ 8] = PIN_A_NUMBER('E', 5), /* QSPI1_MISO_IO1 */ - [ 9] = PIN_A_NUMBER('E', 4), /* QSPI1_IO2 */ - [10] = PIN_A_NUMBER('C', 3), /* QSPI1_IO3 */ - [11] = PIN_NUMBER('V', 5), /* QSPI1_SSL */ - [12] = PIN_NUMBER('Y', 7), /* RPC_INT# */ - [13] = PIN_NUMBER('V', 6), /* RPC_WP# */ - [14] = PIN_NUMBER('V', 7), /* RPC_RESET# */ - [15] = PIN_NUMBER('A', 16), /* AVB_RX_CTL */ - [16] = PIN_NUMBER('B', 19), /* AVB_RXC */ - [17] = PIN_NUMBER('A', 13), /* AVB_RD0 */ - [18] = PIN_NUMBER('B', 13), /* AVB_RD1 */ - [19] = PIN_NUMBER('A', 14), /* AVB_RD2 */ - [20] = PIN_NUMBER('B', 14), /* AVB_RD3 */ - [21] = PIN_NUMBER('A', 8), /* AVB_TX_CTL */ - [22] = PIN_NUMBER('A', 19), /* AVB_TXC */ - [23] = PIN_NUMBER('A', 18), /* AVB_TD0 */ - [24] = PIN_NUMBER('B', 18), /* AVB_TD1 */ - [25] = PIN_NUMBER('A', 17), /* AVB_TD2 */ - [26] = PIN_NUMBER('B', 17), /* AVB_TD3 */ - [27] = PIN_NUMBER('A', 12), /* AVB_TXCREFCLK */ - [28] = PIN_NUMBER('A', 9), /* AVB_MDIO */ + [ 0] = PIN_QSPI0_SPCLK, /* QSPI0_SPCLK */ + [ 1] = PIN_QSPI0_MOSI_IO0, /* QSPI0_MOSI_IO0 */ + [ 2] = PIN_QSPI0_MISO_IO1, /* QSPI0_MISO_IO1 */ + [ 3] = PIN_QSPI0_IO2, /* QSPI0_IO2 */ + [ 4] = PIN_QSPI0_IO3, /* QSPI0_IO3 */ + [ 5] = PIN_QSPI0_SSL, /* QSPI0_SSL */ + [ 6] = PIN_QSPI1_SPCLK, /* QSPI1_SPCLK */ + [ 7] = PIN_QSPI1_MOSI_IO0, /* QSPI1_MOSI_IO0 */ + [ 8] = PIN_QSPI1_MISO_IO1, /* QSPI1_MISO_IO1 */ + [ 9] = PIN_QSPI1_IO2, /* QSPI1_IO2 */ + [10] = PIN_QSPI1_IO3, /* QSPI1_IO3 */ + [11] = PIN_QSPI1_SSL, /* QSPI1_SSL */ + [12] = PIN_RPC_INT_N, /* RPC_INT# */ + [13] = PIN_RPC_WP_N, /* RPC_WP# */ + [14] = PIN_RPC_RESET_N, /* RPC_RESET# */ + [15] = PIN_AVB_RX_CTL, /* AVB_RX_CTL */ + [16] = PIN_AVB_RXC, /* AVB_RXC */ + [17] = PIN_AVB_RD0, /* AVB_RD0 */ + [18] = PIN_AVB_RD1, /* AVB_RD1 */ + [19] = PIN_AVB_RD2, /* AVB_RD2 */ + [20] = PIN_AVB_RD3, /* AVB_RD3 */ + [21] = PIN_AVB_TX_CTL, /* AVB_TX_CTL */ + [22] = PIN_AVB_TXC, /* AVB_TXC */ + [23] = PIN_AVB_TD0, /* AVB_TD0 */ + [24] = PIN_AVB_TD1, /* AVB_TD1 */ + [25] = PIN_AVB_TD2, /* AVB_TD2 */ + [26] = PIN_AVB_TD3, /* AVB_TD3 */ + [27] = PIN_AVB_TXCREFCLK, /* AVB_TXCREFCLK */ + [28] = PIN_AVB_MDIO, /* AVB_MDIO */ [29] = RCAR_GP_PIN(2, 9), /* AVB_MDC */ [30] = RCAR_GP_PIN(2, 10), /* AVB_MAGIC */ [31] = RCAR_GP_PIN(2, 11), /* AVB_PHY_INT */
@@ -6218,7 +6213,7 @@ static const struct pinmux_bias_reg pinmux_bias_regs[] = { [ 6] = RCAR_GP_PIN(1, 25), /* WE0_N */ [ 7] = RCAR_GP_PIN(1, 26), /* WE1_N */ [ 8] = RCAR_GP_PIN(1, 27), /* EX_WAIT0_A */ - [ 9] = PIN_NUMBER('C', 1), /* PRESETOUT# */ + [ 9] = PIN_PRESETOUT_N, /* PRESETOUT# */ [10] = RCAR_GP_PIN(0, 0), /* D0 */ [11] = RCAR_GP_PIN(0, 1), /* D1 */ [12] = RCAR_GP_PIN(0, 2), /* D2 */
@@ -6239,20 +6234,20 @@ static const struct pinmux_bias_reg pinmux_bias_regs[] = { [27] = RCAR_GP_PIN(7, 1), /* AVS2 */ [28] = RCAR_GP_PIN(7, 2), /* GP7_02 */ [29] = RCAR_GP_PIN(7, 3), /* GP7_03 */ - [30] = PIN_A_NUMBER('P', 7), /* DU_DOTCLKIN0 */ - [31 ] =PIN_A_NUMBER ('P' ,8 ),/* DU_DOTCLKIN1 */ + [30] = PIN_DU_DOTCLKIN0, /* DU_DOTCLKIN0 */ + [31 ] =PIN_DU_DOTCLKIN1 ,/* DU_DOTCLKIN1 */ } }, { PINMUX_BIAS_REG("PUEN3", 0xe606040c, "PUD3", 0xe606044c) { - [ 0] = PIN_A_NUMBER('R', 8), /* DU_DOTCLKIN3 */ + [ 0] = PIN_DU_DOTCLKIN3, /* DU_DOTCLKIN3 */ [ 1] = SH_PFC_PIN_NONE, - [ 2] = PIN_A_NUMBER('D', 38), /* FSCLKST */ - [ 3] = PIN_A_NUMBER('D', 39), /* EXTALR*/ - [ 4] = PIN_A_NUMBER('R', 26), /* TRST# */ - [ 5] = PIN_A_NUMBER('T', 27), /* TCK */ - [ 6] = PIN_A_NUMBER('R', 30), /* TMS */ - [ 7] = PIN_A_NUMBER('R', 29), /* TDI */ + [ 2] = PIN_FSCLKST, /* FSCLKST */ + [ 3] = PIN_EXTALR, /* EXTALR*/ + [ 4] = PIN_TRST_N, /* TRST# */ + [ 5] = PIN_TCK, /* TCK */ + [ 6] = PIN_TMS, /* TMS */ + [ 7] = PIN_TDI, /* TDI */ [ 8] = SH_PFC_PIN_NONE, - [ 9] = PIN_A_NUMBER('T', 30), /* ASEBRK */ + [ 9] = PIN_ASEBRK, /* ASEBRK */ [10] = RCAR_GP_PIN(3, 0), /* SD0_CLK */ [11] = RCAR_GP_PIN(3, 1), /* SD0_CMD */ [12] = RCAR_GP_PIN(3, 2), /* SD0_DAT0 */
@@ -6317,7 +6312,7 @@ static const struct pinmux_bias_reg pinmux_bias_regs[] = { [ 3] = RCAR_GP_PIN(5, 23), /* MLB_CLK */ [ 4] = RCAR_GP_PIN(5, 24), /* MLB_SIG */ [ 5] = RCAR_GP_PIN(5, 25), /* MLB_DAT */ - [ 6] = PIN_NUMBER('H', 37), /* MLB_REF */ + [ 6] = PIN_MLB_REF, /* MLB_REF */ [ 7] = RCAR_GP_PIN(6, 0), /* SSI_SCK01239 */ [ 8] = RCAR_GP_PIN(6, 1), /* SSI_WS01239 */ [ 9] = RCAR_GP_PIN(6, 2), /* SSI_SDATA0 */
Signature · 1 line
2.7.4
PATCH 33/39 dt-bindings: pinctrl: sh-pfc: Document r8a774b1 PFC support
In reply to Biju Dascommit 887047c317a48e49de7d0e0318ec0464666f6229 upstream.
Document PFC support for the R8A774B1 SoC.
--- Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt +1 -0
@@ -17,6 +17,7 @@ Required Properties: - "renesas,pfc-r8a7745": for R8A7745 (RZ/G1E) compatible pin-controller. - "renesas,pfc-r8a77470": for R8A77470 (RZ/G1C) compatible pin-controller. - "renesas,pfc-r8a774a1": for R8A774A1 (RZ/G2M) compatible pin-controller. + - "renesas,pfc-r8a774b1": for R8A774B1 (RZ/G2N) compatible pin-controller. - "renesas,pfc-r8a774c0": for R8A774C0 (RZ/G2E) compatible pin-controller. - "renesas,pfc-r8a7778": for R8A7778 (R-Car M1) compatible pin-controller. - "renesas,pfc-r8a7779": for R8A7779 (R-Car H1) compatible pin-controller.
Signature · 1 line
2.7.4
PATCH 34/39 pinctrl: sh-pfc: r8a77965: Add R8A774B1 PFC support
In reply to Biju Dascommit 271ff378a30086952eb9df1471006dff9a6b5f92 upstream.
Renesas RZ/G2N (r8a774b1) is pin compatible with R-Car M3-N (r8a77965), however it doesn't have several automotive specific peripherals. Add a r8a77965 specific pin groups/functions along with common pin groups/functions for supporting both r8a77965 and r8a774b1 SoC.
--- drivers/pinctrl/sh-pfc/Kconfig | 5 + drivers/pinctrl/sh-pfc/Makefile | 1 + drivers/pinctrl/sh-pfc/core.c | 6 + drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 861 ++++++++++++++++++---------------- drivers/pinctrl/sh-pfc/sh_pfc.h | 1 + 5 files changed, 465 insertions(+), 409 deletions(-)
drivers/pinctrl/sh-pfc/Kconfig +5 -0
@@ -54,6 +54,11 @@ config PINCTRL_PFC_R8A774A1 depends on ARCH_R8A774A1 select PINCTRL_SH_PFC +config PINCTRL_PFC_R8A774B1 + def_bool y + depends on ARCH_R8A774B1 + select PINCTRL_SH_PFC + config PINCTRL_PFC_R8A774C0 def_bool y depends on ARCH_R8A774C0
drivers/pinctrl/sh-pfc/Makefile +1 -0
@@ -8,6 +8,7 @@ obj-$(CONFIG_PINCTRL_PFC_R8A7743) += pfc-r8a7791.o obj-$(CONFIG_PINCTRL_PFC_R8A7745) += pfc-r8a7794.o obj-$(CONFIG_PINCTRL_PFC_R8A77470) += pfc-r8a77470.o obj-$(CONFIG_PINCTRL_PFC_R8A774A1) += pfc-r8a7796.o +obj-$(CONFIG_PINCTRL_PFC_R8A774B1) += pfc-r8a77965.o obj-$(CONFIG_PINCTRL_PFC_R8A774C0) += pfc-r8a77990.o obj-$(CONFIG_PINCTRL_PFC_R8A7778) += pfc-r8a7778.o obj-$(CONFIG_PINCTRL_PFC_R8A7779) += pfc-r8a7779.o
drivers/pinctrl/sh-pfc/core.c +6 -0
@@ -515,6 +515,12 @@ static const struct of_device_id sh_pfc_of_table[] = { .data = &r8a774a1_pinmux_info, },#endif +#ifdef CONFIG_PINCTRL_PFC_R8A774B1 + { + .compatible = "renesas,pfc-r8a774b1", + .data = &r8a774b1_pinmux_info, + }, +#endif #ifdef CONFIG_PINCTRL_PFC_R8A774C0 { .compatible = "renesas,pfc-r8a774c0",
drivers/pinctrl/sh-pfc/pfc-r8a77965.c +452 -409
888 lines not on this page · raw message
drivers/pinctrl/sh-pfc/sh_pfc.h +1 -0
@@ -311,6 +311,7 @@ extern const struct sh_pfc_soc_info r8a7743_pinmux_info;extern const struct sh_pfc_soc_info r8a7745_pinmux_info;extern const struct sh_pfc_soc_info r8a77470_pinmux_info;extern const struct sh_pfc_soc_info r8a774a1_pinmux_info; +extern const struct sh_pfc_soc_info r8a774b1_pinmux_info;extern const struct sh_pfc_soc_info r8a774c0_pinmux_info;extern const struct sh_pfc_soc_info r8a7778_pinmux_info;extern const struct sh_pfc_soc_info r8a7779_pinmux_info;
Signature · 1 line
2.7.4
PATCH 35/39 pinctrl: sh-pfc: pfc-r8a77965: Fix typo in pinmux macro for SCL3
In reply to Biju DasFrom: Keiya Nobuta <[email protected]>
commit f846d1e704f2d07a7f359f65eac2c8cac565db35 upstream.
SCL3 is assigned to GPSR2 bit7 referred by IP1_23_20 macro.
--- drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/sh-pfc/pfc-r8a77965.c +1 -1
@@ -732,7 +732,7 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_PHYS_MSEL (IP1_23_20 ,HRX3_D ,I2C_SEL_3_0 ,SEL_HSCIF3_3 ),PINMUX_IPSR_PHYS_MSEL (IP1_23_20 ,VI4_DATA7_B ,I2C_SEL_3_0 ,SEL_VIN4_1 ),PINMUX_IPSR_PHYS_MSEL (IP1_23_20 ,IERX_B ,I2C_SEL_3_0 ,SEL_IEBUS_1 ), -PINMUX_IPSR_PHYS (IP0_23_20 ,SCL3 ,I2C_SEL_3_1 ), +PINMUX_IPSR_PHYS (IP1_23_20 ,SCL3 ,I2C_SEL_3_1 ),PINMUX_IPSR_PHYS_MSEL (IP1_27_24 ,PWM2_A ,I2C_SEL_3_0 ,SEL_PWM2_0 ), PINMUX_IPSR_PHYS_MSEL(IP1_27_24, HTX3_D, I2C_SEL_3_0, SEL_HSCIF3_3),
Signature · 1 line
2.7.4
PATCH 36/39 dt-bindings: serial: sh-sci: Document r8a774b1 bindings
In reply to Biju Dascommit fc5f3782da3c73bbbe2293551219b2ded0660357 upstream.
RZ/G2N (R8A774B1) SoC also has the R-Car Gen3 compatible SCIF and HSCIF ports, so document the SoC specific bindings.
--- Documentation/devicetree/bindings/serial/renesas,sci-serial.txt | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/serial/renesas,sci-serial.txt +2 -0
@@ -22,6 +22,8 @@ Required properties: - "renesas,hscif-r8a77470" for R8A77470 (RZ/G1C) HSCIF compatible UART. - "renesas,scif-r8a774a1" for R8A774A1 (RZ/G2M) SCIF compatible UART. - "renesas,hscif-r8a774a1" for R8A774A1 (RZ/G2M) HSCIF compatible UART. + - "renesas,scif-r8a774b1" for R8A774B1 (RZ/G2N) SCIF compatible UART. + - "renesas,hscif-r8a774b1" for R8A774B1 (RZ/G2N) HSCIF compatible UART. - "renesas,scif-r8a774c0" for R8A774C0 (RZ/G2E) SCIF compatible UART. - "renesas,hscif-r8a774c0" for R8A774C0 (RZ/G2E) HSCIF compatible UART. - "renesas,scif-r8a7778" for R8A7778 (R-Car M1) SCIF compatible UART.
Signature · 1 line
2.7.4
PATCH 37/39 arm64: dts: renesas: Initial r8a774b1 SoC device tree
In reply to Biju Dascommit 9b33e3001b67f9dcd52548db2949f5a04d0b4017 upstream.
Basic support for the RZ/G2N (R8A774B1) SoC. Added placeholders to avoid compilation error with the common platform code.
--- arch/arm64/boot/dts/renesas/r8a774b1.dtsi | 472 ++++++++++++++++++++++++++++++ 1 file changed, 472 insertions(+) create mode 100644 arch/arm64/boot/dts/renesas/r8a774b1.dtsi
arch/arm64/boot/dts/renesas/r8a774b1.dtsi new file +472 -0
@@ -0,0 +1,472 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Device Tree Source for the r8a774b1 SoC + * + * Copyright (C) 2019 Renesas Electronics Corp. + */ + +#include <dt-bindings/interrupt-controller/irq.h> +#include <dt-bindings/interrupt-controller/arm-gic.h> +#include <dt-bindings/clock/r8a774b1-cpg-mssr.h> +#include <dt-bindings/power/r8a774b1-sysc.h> + +/ { + compatible = "renesas,r8a774b1"; + #address-cells = <2>; + #size-cells = <2>; + + /* + * The external audio clocks are configured as 0 Hz fixed frequency + * clocks by default. + * Boards that provide audio clocks should override them. + */ + audio_clk_a: audio_clk_a { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <0>; + }; + + audio_clk_b: audio_clk_b { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <0>; + }; + + audio_clk_c: audio_clk_c { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <0>; + }; + + /* External CAN clock - to be overridden by boards that provide it */ + can_clk: can { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <0>; + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + a57_0: cpu at 0 { + compatible = "arm,cortex-a57"; + reg = <0x0>; + device_type = "cpu"; + power-domains = <&sysc R8A774B1_PD_CA57_CPU0>; + next-level-cache = <&L2_CA57>; + enable-method = "psci"; + #cooling-cells = <2>; + dynamic-power-coefficient = <854>; + clocks = <&cpg CPG_CORE R8A774B1_CLK_Z>; + }; + + a57_1: cpu at 1 { + compatible = "arm,cortex-a57"; + reg = <0x1>; + device_type = "cpu"; + power-domains = <&sysc R8A774B1_PD_CA57_CPU1>; + next-level-cache = <&L2_CA57>; + enable-method = "psci"; + clocks = <&cpg CPG_CORE R8A774B1_CLK_Z>; + }; + + L2_CA57: cache-controller-0 { + compatible = "cache"; + power-domains = <&sysc R8A774B1_PD_CA57_SCU>; + cache-unified; + cache-level = <2>; + }; + }; + + extal_clk: extal { + compatible = "fixed-clock"; + #clock-cells = <0>; + /* This value must be overridden by the board */ + clock-frequency = <0>; + }; + + extalr_clk: extalr { + compatible = "fixed-clock"; + #clock-cells = <0>; + /* This value must be overridden by the board */ + clock-frequency = <0>; + }; + + /* External PCIe clock - can be overridden by the board */ + pcie_bus_clk: pcie_bus { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <0>; + }; + + pmu_a57 { + compatible = "arm,cortex-a57-pmu"; + interrupts-extended = <&gic GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>, + <&gic GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>; + interrupt-affinity = <&a57_0>, <&a57_1>; + }; + + psci { + compatible = "arm,psci-1.0", "arm,psci-0.2"; + method = "smc"; + }; + + /* External SCIF clock - to be overridden by boards that provide it */ + scif_clk: scif { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <0>; + }; + + soc { + compatible = "simple-bus"; + interrupt-parent = <&gic>; + #address-cells = <2>; + #size-cells = <2>; + ranges; + + rwdt: watchdog at e6020000 { + reg = <0 0xe6020000 0 0x0c>; + /* placeholder */ + }; + + gpio0: gpio at e6050000 { + reg = <0 0xe6050000 0 0x50>; + #gpio-cells = <2>; + gpio-controller; + #interrupt-cells = <2>; + interrupt-controller; + /* placeholder */ + }; + + gpio1: gpio at e6051000 { + reg = <0 0xe6051000 0 0x50>; + #gpio-cells = <2>; + gpio-controller; + #interrupt-cells = <2>; + interrupt-controller; + /* placeholder */ + }; + + gpio2: gpio at e6052000 { + reg = <0 0xe6052000 0 0x50>; + #gpio-cells = <2>; + gpio-controller; + #interrupt-cells = <2>; + interrupt-controller; + /* placeholder */ + }; + + gpio3: gpio at e6053000 { + reg = <0 0xe6053000 0 0x50>; + #gpio-cells = <2>; + gpio-controller; + #interrupt-cells = <2>; + interrupt-controller; + /* placeholder */ + }; + + gpio4: gpio at e6054000 { + reg = <0 0xe6054000 0 0x50>; + #gpio-cells = <2>; + gpio-controller; + #interrupt-cells = <2>; + interrupt-controller; + /* placeholder */ + }; + + gpio5: gpio at e6055000 { + reg = <0 0xe6055000 0 0x50>; + #gpio-cells = <2>; + gpio-controller; + #interrupt-cells = <2>; + interrupt-controller; + /* placeholder */ + }; + + gpio6: gpio at e6055400 { + reg = <0 0xe6055400 0 0x50>; + #gpio-cells = <2>; + gpio-controller; + #interrupt-cells = <2>; + interrupt-controller; + /* placeholder */ + }; + + gpio7: gpio at e6055800 { + reg = <0 0xe6055800 0 0x50>; + #gpio-cells = <2>; + gpio-controller; + #interrupt-cells = <2>; + interrupt-controller; + /* placeholder */ + }; + + pfc: pin-controller at e6060000 { + compatible = "renesas,pfc-r8a774b1"; + reg = <0 0xe6060000 0 0x50c>; + }; + + cpg: clock-controller at e6150000 { + compatible = "renesas,r8a774b1-cpg-mssr"; + reg = <0 0xe6150000 0 0x1000>; + clocks = <&extal_clk>, <&extalr_clk>; + clock-names = "extal", "extalr"; + #clock-cells = <2>; + #power-domain-cells = <0>; + #reset-cells = <1>; + }; + + rst: reset-controller at e6160000 { + compatible = "renesas,r8a774b1-rst"; + reg = <0 0xe6160000 0 0x0200>; + }; + + sysc: system-controller at e6180000 { + compatible = "renesas,r8a774b1-sysc"; + reg = <0 0xe6180000 0 0x0400>; + #power-domain-cells = <1>; + }; + + i2c4: i2c at e66d8000 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0 0xe66d8000 0 0x40>; + /* placeholder */ + }; + + hscif0: serial at e6540000 { + reg = <0 0xe6540000 0 0x60>; + /* placeholder */ + }; + + hsusb: usb at e6590000 { + reg = <0 0xe6590000 0 0x200>; + /* placeholder */ + }; + + usb3_phy0: usb-phy at e65ee000 { + reg = <0 0xe65ee000 0 0x90>; + #phy-cells = <0>; + /* placeholder */ + }; + + avb: ethernet at e6800000 { + reg = <0 0xe6800000 0 0x800>; + /* placeholder */ + }; + + can0: can at e6c30000 { + reg = <0 0xe6c30000 0 0x1000>; + /* placeholder */ + }; + + can1: can at e6c38000 { + reg = <0 0xe6c38000 0 0x1000>; + /* placeholder */ + }; + + canfd: can at e66c0000 { + reg = <0 0xe66c0000 0 0x8000>; + /* placeholder */ + }; + + scif2: serial at e6e88000 { + compatible = "renesas,scif-r8a774b1", + "renesas,rcar-gen3-scif", "renesas,scif"; + reg = <0 0xe6e88000 0 64>; + interrupts = <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 310>, + <&cpg CPG_CORE R8A774B1_CLK_S3D1>, + <&scif_clk>; + clock-names = "fck", "brg_int", "scif_clk"; + power-domains = <&sysc R8A774B1_PD_ALWAYS_ON>; + resets = <&cpg 310>; + status = "disabled"; + }; + + rcar_sound: sound at ec500000 { + reg = <0 0xec500000 0 0x1000>, /* SCU */ + <0 0xec5a0000 0 0x100>, /* ADG */ + <0 0xec540000 0 0x1000>, /* SSIU */ + <0 0xec541000 0 0x280>, /* SSI */ + <0 0xec760000 0 0x200>; /* Audio DMAC peri peri*/ + + rcar_sound,ssi { + ssi0: ssi-0 { }; + ssi1: ssi-1 { }; + ssi2: ssi-2 { }; + ssi3: ssi-3 { }; + ssi4: ssi-4 { }; + ssi5: ssi-5 { }; + ssi6: ssi-6 { }; + ssi7: ssi-7 { }; + ssi8: ssi-8 { }; + ssi9: ssi-9 { }; + }; + }; + + xhci0: usb at ee000000 { + reg = <0 0xee000000 0 0xc00>; + /* placeholder */ + }; + + usb3_peri0: usb at ee020000 { + reg = <0 0xee020000 0 0x400>; + /* placeholder */ + }; + + ohci0: usb at ee080000 { + reg = <0 0xee080000 0 0x100>; + /* placeholder */ + }; + + ohci1: usb at ee0a0000 { + reg = <0 0xee0a0000 0 0x100>; + /* placeholder */ + }; + + ehci0: usb at ee080100 { + reg = <0 0xee080100 0 0x100>; + /* placeholder */ + }; + + ehci1: usb at ee0a0100 { + reg = <0 0xee0a0100 0 0x100>; + /* placeholder */ + }; + + usb2_phy0: usb-phy at ee080200 { + reg = <0 0xee080200 0 0x700>; + /* placeholder */ + }; + + usb2_phy1: usb-phy at ee0a0200 { + reg = <0 0xee0a0200 0 0x700>; + /* placeholder */ + }; + + sdhi0: sd at ee100000 { + reg = <0 0xee100000 0 0x2000>; + /* placeholder */ + }; + + sdhi1: sd at ee120000 { + reg = <0 0xee120000 0 0x2000>; + /* placeholder */ + }; + + sdhi2: sd at ee140000 { + reg = <0 0xee140000 0 0x2000>; + /* placeholder */ + }; + + sdhi3: sd at ee160000 { + reg = <0 0xee160000 0 0x2000>; + /* placeholder */ + }; + + gic: interrupt-controller at f1010000 { + compatible = "arm,gic-400"; + #interrupt-cells = <3>; + #address-cells = <0>; + interrupt-controller; + reg = <0x0 0xf1010000 0 0x1000>, + <0x0 0xf1020000 0 0x20000>, + <0x0 0xf1040000 0 0x20000>, + <0x0 0xf1060000 0 0x20000>; + interrupts = <GIC_PPI 9 + (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_HIGH)>; + clocks = <&cpg CPG_MOD 408>; + clock-names = "clk"; + power-domains = <&sysc R8A774B1_PD_ALWAYS_ON>; + resets = <&cpg 408>; + }; + + pciec0: pcie at fe000000 { + reg = <0 0xfe000000 0 0x80000>; + #address-cells = <3>; + #size-cells = <2>; + bus-range = <0x00 0xff>; + /* placeholder */ + }; + + pciec1: pcie at ee800000 { + reg = <0 0xee800000 0 0x80000>; + #address-cells = <3>; + #size-cells = <2>; + bus-range = <0x00 0xff>; + /* placeholder */ + }; + + hdmi0: hdmi at fead0000 { + reg = <0 0xfead0000 0 0x10000>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port at 0 { + reg = <0>; + dw_hdmi0_in: endpoint { + }; + }; + port at 1 { + reg = <1>; + }; + }; + }; + + du: display at feb00000 { + reg = <0 0xfeb00000 0 0x80000>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port at 0 { + reg = <0>; + du_out_rgb: endpoint { + }; + }; + port at 1 { + reg = <1>; + du_out_hdmi0: endpoint { + }; + }; + port at 2 { + reg = <2>; + du_out_lvds0: endpoint { + }; + }; + }; + }; + + prr: chipid at fff00044 { + compatible = "renesas,prr"; + reg = <0 0xfff00044 0 4>; + }; + }; + + timer { + compatible = "arm,armv8-timer"; + interrupts-extended = <&gic GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>, + <&gic GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>, + <&gic GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>, + <&gic GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>; + }; + + /* External USB clocks - can be overridden by the board */ + usb3s0_clk: usb3s0 { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <0>; + }; + + usb_extal_clk: usb_extal { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <0>; + }; +};
Signature · 1 line
2.7.4
PATCH 38/39 arm64: dts: renesas: Add HiHope RZ/G2N main board support
In reply to Biju Dascommit 83f7f812a8706aa9c23b02d945f670cdef116e2c upstream.
Basic support for the HiHope RZ/G2N main board:
- Memory,
- Main crystal,
- Serial console
--- arch/arm64/boot/dts/renesas/Makefile | 1 + .../boot/dts/renesas/r8a774b1-hihope-rzg2n.dts | 26 ++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 arch/arm64/boot/dts/renesas/r8a774b1-hihope-rzg2n.dts
arch/arm64/boot/dts/renesas/Makefile +1 -0
@@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 dtb-$(CONFIG_ARCH_R8A774A1) += r8a774a1-hihope-rzg2m.dtb dtb-$(CONFIG_ARCH_R8A774A1) += r8a774a1-hihope-rzg2m-ex.dtb +dtb-$(CONFIG_ARCH_R8A774B1) += r8a774b1-hihope-rzg2n.dtb dtb-$(CONFIG_ARCH_R8A774C0) += r8a774c0-cat874.dtb r8a774c0-ek874.dtb dtb-$(CONFIG_ARCH_R8A7795) += r8a7795-salvator-x.dtb r8a7795-h3ulcb.dtb dtb-$(CONFIG_ARCH_R8A7795) += r8a7795-h3ulcb-kf.dtb
arch/arm64/boot/dts/renesas/r8a774b1-hihope-rzg2n.dts new file +26 -0
@@ -0,0 +1,26 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Device Tree Source for the HiHope RZ/G2N main board + * + * Copyright (C) 2019 Renesas Electronics Corp. + */ + +/dts-v1/; +#include "r8a774b1.dtsi" +#include "hihope-common.dtsi" + +/ { + model = "HopeRun HiHope RZ/G2N main board based on r8a774b1"; + compatible = "hoperun,hihope-rzg2n", "renesas,r8a774b1"; + + memory at 48000000 { + device_type = "memory"; + /* first 128MB is reserved for secure area. */ + reg = <0x0 0x48000000 0x0 0x78000000>; + }; + + memory at 480000000 { + device_type = "memory"; + reg = <0x4 0x80000000 0x0 0x80000000>; + }; +};
Signature · 1 line
2.7.4
PATCH 39/39 arm64: defconfig: Enable R8A774B1 SoC
In reply to Biju Dascommit d8b178741e5ba571fbcc187c9e3cf9c0eaebf328 upstream.
Enable the Renesas RZ/G2N (R8A774B1) SoC in the ARM64 defconfig.
--- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm64/configs/defconfig +1 -0
@@ -51,6 +51,7 @@ CONFIG_ARCH_SEATTLE=y CONFIG_ARCH_SYNQUACER=y CONFIG_ARCH_RENESAS=y CONFIG_ARCH_R8A774A1=y +CONFIG_ARCH_R8A774B1=y CONFIG_ARCH_R8A774C0=y CONFIG_ARCH_R8A7795=y CONFIG_ARCH_R8A7796=y
Signature · 1 line
2.7.4
cover Add RZ/G2N SYSC/RST/Clock/PFC support
In reply to Biju DasHi!
Quoted 2 lines
This patch series add support for RZ/G2N board with serial debug
console.
I have made two comments on the patches, but I believe the series is good enough to merge.
I'll do that later if there are no objections.
Best regards,
Pavel
Signature · 9 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: Digital signature URL: <http://lists.cip-project.org/pipermail/cip-dev/attachments/20191218/3f819450/attachment.sig>
cover Add RZ/G2N SYSC/RST/Clock/PFC support
Hi,
Quoted 14 lines
-----Original Message-----
From: Pavel Machek [mailto:pavel at denx.de]
Sent: Thursday, December 19, 2019 4:34 AM
To: Biju Das <[email protected]>
Cc: cip-dev at lists.cip-project.org; iwamatsu nobuhiro(?? ?? ??? ?????) <[email protected]>; Pavel Machek <[email protected]>; Chris Paterson <[email protected]>; Marian-Cristian Rotariu <[email protected]>; Fabrizio Castro <[email protected]>
Subject: Re: [PATCH 4.19.y-cip 00/39] Add RZ/G2N SYSC/RST/Clock/PFC supportHi!
Quoted 7 lines
Quoted 2 lines
This patch series add support for RZ/G2N board with serial debug console.
I have made two comments on the patches, but I believe the series is good enough to merge.
I'll do that later if there are no objections.
I reviewed this series, there are no problems in particular without your comment.
Best regards,
Nobuhiro
cover Add RZ/G2N SYSC/RST/Clock/PFC support
In reply to Biju DasHi!
Quoted 2 lines
This patch series add support for RZ/G2N board with serial debug
console.
Thanks for the series, applied.
Best regards,
Pavel
Signature · 9 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: Digital signature URL: <http://lists.cip-project.org/pipermail/cip-dev/attachments/20191219/0d059a79/attachment.sig>