clk: renesas: Synchronize RZ/G2 tables with Linux 5.12
Subsystems (9)
PATCH 1/30 clk: renesas: Synchronize RZ/G2 tables with Linux 5.12
Synchronize RZ/G2 clock tables with Linux 5.12,
commit 9f4ad9e425a1 ("Linux 5.12") .
--- drivers/clk/renesas/r8a774a1-cpg-mssr.c | 14 +++++++++----- drivers/clk/renesas/r8a774b1-cpg-mssr.c | 8 ++++++++ drivers/clk/renesas/r8a774c0-cpg-mssr.c | 9 +++++++++ 3 files changed, 26 insertions(+), 5 deletions(-)
drivers/clk/renesas/r8a774a1-cpg-mssr.c +9 -5
@@ -68,13 +68,18 @@ static const struct cpg_core_clk r8a774a1_core_clks[] = {DEF_FIXED (".s2" ,CLK_S2 ,CLK_PLL1_DIV2 ,4 ,1 ),DEF_FIXED (".s3" ,CLK_S3 ,CLK_PLL1_DIV2 ,6 ,1 ),DEF_FIXED (".sdsrc" ,CLK_SDSRC ,CLK_PLL1_DIV2 ,2 ,1 ), -DEF_FIXED (".rpcsrc" ,CLK_RPCSRC ,CLK_PLL1 ,2 ,1 ), +DEF_BASE (".rpcsrc" ,CLK_RPCSRC ,CLK_TYPE_GEN3_RPCSRC ,CLK_PLL1 ), + +DEF_BASE ("rpc" ,R8A774A1_CLK_RPC ,CLK_TYPE_GEN3_RPC , +CLK_RPCSRC ), +DEF_BASE ("rpcd2" ,R8A774A1_CLK_RPCD2 ,CLK_TYPE_GEN3_RPCD2 , +R8A774A1_CLK_RPC ),DEF_GEN3_OSC (".r" ,CLK_RINT ,CLK_EXTAL ,32 ),/* Core Clock Outputs */ -DEF_GEN3_Z ("z" ,R8A774A1_CLK_Z ,CLK_TYPE_GEN3_Z ,CLK_PLL0 ,2 ,8 ), -DEF_GEN3_Z ("z2" ,R8A774A1_CLK_Z2 ,CLK_TYPE_GEN3_Z ,CLK_PLL2 ,2 ,0 ), +DEF_GEN3_Z ("z" ,R8A774A1_CLK_Z ,CLK_TYPE_GEN3_Z ,CLK_PLL0 ,2 ,8 ), +DEF_GEN3_Z ("z2" ,R8A774A1_CLK_Z2 ,CLK_TYPE_GEN3_Z ,CLK_PLL2 ,2 ,0 ),DEF_FIXED ("ztr" ,R8A774A1_CLK_ZTR ,CLK_PLL1_DIV2 ,6 ,1 ),DEF_FIXED ("ztrd2" ,R8A774A1_CLK_ZTRD2 ,CLK_PLL1_DIV2 ,12 ,1 ), DEF_FIXED("zt", R8A774A1_CLK_ZT, CLK_PLL1_DIV2, 4, 1),
@@ -99,7 +104,6 @@ static const struct cpg_core_clk r8a774a1_core_clks[] = {DEF_GEN3_SD ("sd1" ,R8A774A1_CLK_SD1 ,CLK_SDSRC ,0x078 ),DEF_GEN3_SD ("sd2" ,R8A774A1_CLK_SD2 ,CLK_SDSRC ,0x268 ),DEF_GEN3_SD ("sd3" ,R8A774A1_CLK_SD3 ,CLK_SDSRC ,0x26c ), -DEF_GEN3_RPC ("rpc" ,R8A774A1_CLK_RPC ,CLK_RPCSRC ,0x238 ),DEF_FIXED ("cl" ,R8A774A1_CLK_CL ,CLK_PLL1_DIV2 ,48 ,1 ), DEF_FIXED("cp", R8A774A1_CLK_CP, CLK_EXTAL, 2, 1),
@@ -203,7 +207,7 @@ static const struct mssr_mod_clk r8a774a1_mod_clks[] = {DEF_MOD ("can-fd" ,914 ,R8A774A1_CLK_S3D2 ),DEF_MOD ("can-if1" ,915 ,R8A774A1_CLK_S3D4 ),DEF_MOD ("can-if0" ,916 ,R8A774A1_CLK_S3D4 ), -DEF_MOD ("rpc" ,917 ,R8A774A1_CLK_RPC ), +DEF_MOD ("rpc-if" ,917 ,R8A774A1_CLK_RPCD2 ),DEF_MOD ("i2c6" ,918 ,R8A774A1_CLK_S0D6 ),DEF_MOD ("i2c5" ,919 ,R8A774A1_CLK_S0D6 ), DEF_MOD("i2c-dvfs", 926, R8A774A1_CLK_CP),
drivers/clk/renesas/r8a774b1-cpg-mssr.c +8 -0
@@ -39,6 +39,7 @@ enum clk_ids {CLK_S2 ,CLK_S3 ,CLK_SDSRC , +CLK_RPCSRC , CLK_RINT,/* Module Clocks */
@@ -64,6 +65,12 @@ static const struct cpg_core_clk r8a774b1_core_clks[] = {DEF_FIXED (".s2" ,CLK_S2 ,CLK_PLL1_DIV2 ,4 ,1 ),DEF_FIXED (".s3" ,CLK_S3 ,CLK_PLL1_DIV2 ,6 ,1 ),DEF_FIXED (".sdsrc" ,CLK_SDSRC ,CLK_PLL1_DIV2 ,2 ,1 ), +DEF_BASE (".rpcsrc" ,CLK_RPCSRC ,CLK_TYPE_GEN3_RPCSRC ,CLK_PLL1 ), + +DEF_BASE ("rpc" ,R8A774B1_CLK_RPC ,CLK_TYPE_GEN3_RPC , +CLK_RPCSRC ), +DEF_BASE ("rpcd2" ,R8A774B1_CLK_RPCD2 ,CLK_TYPE_GEN3_RPCD2 , +R8A774B1_CLK_RPC ), DEF_GEN3_OSC(".r", CLK_RINT, CLK_EXTAL, 32),
@@ -195,6 +202,7 @@ static const struct mssr_mod_clk r8a774b1_mod_clks[] = {DEF_MOD ("can-fd" ,914 ,R8A774B1_CLK_S3D2 ),DEF_MOD ("can-if1" ,915 ,R8A774B1_CLK_S3D4 ),DEF_MOD ("can-if0" ,916 ,R8A774B1_CLK_S3D4 ), +DEF_MOD ("rpc-if" ,917 ,R8A774B1_CLK_RPCD2 ),DEF_MOD ("i2c6" ,918 ,R8A774B1_CLK_S0D6 ),DEF_MOD ("i2c5" ,919 ,R8A774B1_CLK_S0D6 ), DEF_MOD("i2c-dvfs", 926, R8A774B1_CLK_CP),
drivers/clk/renesas/r8a774c0-cpg-mssr.c +9 -0
@@ -44,6 +44,7 @@ enum clk_ids {CLK_S2 ,CLK_S3 ,CLK_SDSRC , +CLK_RPCSRC ,CLK_RINT , CLK_OCO,
@@ -74,6 +75,13 @@ static const struct cpg_core_clk r8a774c0_core_clks[] = {DEF_FIXED (".s3" ,CLK_S3 ,CLK_PLL1 ,6 ,1 ),DEF_FIXED (".sdsrc" ,CLK_SDSRC ,CLK_PLL1 ,2 ,1 ), +DEF_FIXED_RPCSRC_E3 (".rpcsrc" ,CLK_RPCSRC ,CLK_PLL0 ,CLK_PLL1 ), + +DEF_BASE ("rpc" ,R8A774C0_CLK_RPC ,CLK_TYPE_GEN3_RPC , +CLK_RPCSRC ), +DEF_BASE ("rpcd2" ,R8A774C0_CLK_RPCD2 ,CLK_TYPE_GEN3_RPCD2 , +R8A774C0_CLK_RPC ), +DEF_DIV6_RO (".r" ,CLK_RINT ,CLK_EXTAL ,CPG_RCKCR ,32 ), DEF_RATE(".oco", CLK_OCO, 8 * 1000 * 1000),
@@ -199,6 +207,7 @@ static const struct mssr_mod_clk r8a774c0_mod_clks[] = {DEF_MOD ("can-fd" ,914 ,R8A774C0_CLK_S3D2 ),DEF_MOD ("can-if1" ,915 ,R8A774C0_CLK_S3D4 ),DEF_MOD ("can-if0" ,916 ,R8A774C0_CLK_S3D4 ), +DEF_MOD ("rpc-if" ,917 ,R8A774C0_CLK_RPCD2 ),DEF_MOD ("i2c6" ,918 ,R8A774C0_CLK_S3D2 ),DEF_MOD ("i2c5" ,919 ,R8A774C0_CLK_S3D2 ), DEF_MOD("i2c-dvfs", 926, R8A774C0_CLK_CP),
Signature · 1 line
2.30.2
PATCH 2/30 clk: renesas: Synchronize R-Car Gen2 tables with Linux 5.12
Synchronize R-Car Gen2 clock tables with Linux 5.12, commit 9f4ad9e425a1 ("Linux 5.12") .
--- drivers/clk/renesas/r8a7790-cpg-mssr.c | 4 ++-- drivers/clk/renesas/r8a7791-cpg-mssr.c | 2 +- drivers/clk/renesas/r8a7792-cpg-mssr.c | 2 +- drivers/clk/renesas/r8a7794-cpg-mssr.c | 2 +- drivers/clk/renesas/rcar-gen2-cpg.h | 5 +---- 5 files changed, 6 insertions(+), 9 deletions(-)
drivers/clk/renesas/r8a7790-cpg-mssr.c +2 -2
@@ -108,8 +108,8 @@ static const struct mssr_mod_clk r8a7790_mod_clks[] = {DEF_MOD ("tmu0" ,125 ,R8A7790_CLK_CP ),DEF_MOD ("vsp1du1" ,127 ,R8A7790_CLK_ZS ),DEF_MOD ("vsp1du0" ,128 ,R8A7790_CLK_ZS ), -DEF_MOD ("vsp1-rt" ,130 ,R8A7790_CLK_ZS ), -DEF_MOD ("vsp1-sy" ,131 ,R8A7790_CLK_ZS ), +DEF_MOD ("vspr" ,130 ,R8A7790_CLK_ZS ), +DEF_MOD ("vsps" ,131 ,R8A7790_CLK_ZS ),DEF_MOD ("scifa2" ,202 ,R8A7790_CLK_MP ),DEF_MOD ("scifa1" ,203 ,R8A7790_CLK_MP ), DEF_MOD("scifa0", 204, R8A7790_CLK_MP),
drivers/clk/renesas/r8a7791-cpg-mssr.c +1 -1
@@ -106,7 +106,7 @@ static const struct mssr_mod_clk r8a7791_mod_clks[] = {DEF_MOD ("tmu0" ,125 ,R8A7791_CLK_CP ),DEF_MOD ("vsp1du1" ,127 ,R8A7791_CLK_ZS ),DEF_MOD ("vsp1du0" ,128 ,R8A7791_CLK_ZS ), -DEF_MOD ("vsp1-sy" ,131 ,R8A7791_CLK_ZS ), +DEF_MOD ("vsps" ,131 ,R8A7791_CLK_ZS ),DEF_MOD ("scifa2" ,202 ,R8A7791_CLK_MP ),DEF_MOD ("scifa1" ,203 ,R8A7791_CLK_MP ), DEF_MOD("scifa0", 204, R8A7791_CLK_MP),
drivers/clk/renesas/r8a7792-cpg-mssr.c +1 -1
@@ -88,7 +88,7 @@ static const struct mssr_mod_clk r8a7792_mod_clks[] = {DEF_MOD ("tmu0" ,125 ,R8A7792_CLK_CP ),DEF_MOD ("vsp1du1" ,127 ,R8A7792_CLK_ZS ),DEF_MOD ("vsp1du0" ,128 ,R8A7792_CLK_ZS ), -DEF_MOD ("vsp1-sy" ,131 ,R8A7792_CLK_ZS ), +DEF_MOD ("vsps" ,131 ,R8A7792_CLK_ZS ),DEF_MOD ("msiof1" ,208 ,R8A7792_CLK_MP ),DEF_MOD ("sys-dmac1" ,218 ,R8A7792_CLK_ZS ), DEF_MOD("sys-dmac0", 219, R8A7792_CLK_ZS),
drivers/clk/renesas/r8a7794-cpg-mssr.c +1 -1
@@ -97,7 +97,7 @@ static const struct mssr_mod_clk r8a7794_mod_clks[] = {DEF_MOD ("cmt0" ,124 ,R8A7794_CLK_R ),DEF_MOD ("tmu0" ,125 ,R8A7794_CLK_CP ),DEF_MOD ("vsp1du0" ,128 ,R8A7794_CLK_ZS ), -DEF_MOD ("vsp1-sy" ,131 ,R8A7794_CLK_ZS ), +DEF_MOD ("vsps" ,131 ,R8A7794_CLK_ZS ),DEF_MOD ("scifa2" ,202 ,R8A7794_CLK_MP ),DEF_MOD ("scifa1" ,203 ,R8A7794_CLK_MP ), DEF_MOD("scifa0", 204, R8A7794_CLK_MP),
drivers/clk/renesas/rcar-gen2-cpg.h +1 -4
@@ -1,11 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* * R-Car Gen2 Clock Pulse Generator * * Copyright (C) 2016 Cogent Embedded Inc. -* -* This program is free software; you can redistribute it and/or modify it -* under the terms of the GNU General Public License version 2 as published -* by the Free Software Foundation; version 2 of the License. */ #ifndef __CLK_RENESAS_RCAR_GEN2_CPG_H__
Signature · 1 line
2.30.2
PATCH 3/30 clk: renesas: Synchronize R-Car Gen3 tables with Linux 5.12
In reply to Marek VasutSynchronize R-Car Gen3 clock tables with Linux 5.12, commit 9f4ad9e425a1 ("Linux 5.12") .
--- drivers/clk/renesas/r8a7795-cpg-mssr.c | 58 ++++++----- drivers/clk/renesas/r8a7796-cpg-mssr.c | 58 +++++++---- drivers/clk/renesas/r8a77965-cpg-mssr.c | 58 +++++++---- drivers/clk/renesas/r8a77970-cpg-mssr.c | 132 ++++++++++++------------ drivers/clk/renesas/r8a77990-cpg-mssr.c | 37 ++++--- drivers/clk/renesas/r8a77995-cpg-mssr.c | 16 +-- drivers/clk/renesas/rcar-gen3-cpg.h | 16 +-- 7 files changed, 212 insertions(+), 163 deletions(-)
drivers/clk/renesas/r8a7795-cpg-mssr.c +33 -25
@@ -41,8 +41,8 @@ enum clk_ids {CLK_S2 ,CLK_S3 ,CLK_SDSRC , -CLK_RPCSRC ,CLK_SSPSRC , +CLK_RPCSRC , CLK_RINT,/* Module Clocks */
@@ -69,13 +69,18 @@ static const struct cpg_core_clk r8a7795_core_clks[] = {DEF_FIXED (".s2" ,CLK_S2 ,CLK_PLL1_DIV2 ,4 ,1 ),DEF_FIXED (".s3" ,CLK_S3 ,CLK_PLL1_DIV2 ,6 ,1 ),DEF_FIXED (".sdsrc" ,CLK_SDSRC ,CLK_PLL1_DIV2 ,2 ,1 ), -DEF_FIXED (".rpcsrc" ,CLK_RPCSRC ,CLK_PLL1 ,2 ,1 ), +DEF_BASE (".rpcsrc" ,CLK_RPCSRC ,CLK_TYPE_GEN3_RPCSRC ,CLK_PLL1 ), + +DEF_BASE ("rpc" ,R8A7795_CLK_RPC ,CLK_TYPE_GEN3_RPC , +CLK_RPCSRC ), +DEF_BASE ("rpcd2" ,R8A7795_CLK_RPCD2 ,CLK_TYPE_GEN3_RPCD2 , +R8A7795_CLK_RPC ),DEF_GEN3_OSC (".r" ,CLK_RINT ,CLK_EXTAL ,32 ),/* Core Clock Outputs */ -DEF_BASE ("z" ,R8A7795_CLK_Z ,CLK_TYPE_GEN3_Z ,CLK_PLL0 ), -DEF_BASE ("z2" ,R8A7795_CLK_Z2 ,CLK_TYPE_GEN3_Z2 ,CLK_PLL2 ), +DEF_GEN3_Z ("z" ,R8A7795_CLK_Z ,CLK_TYPE_GEN3_Z ,CLK_PLL0 ,2 ,8 ), +DEF_GEN3_Z ("z2" ,R8A7795_CLK_Z2 ,CLK_TYPE_GEN3_Z ,CLK_PLL2 ,2 ,0 ),DEF_FIXED ("ztr" ,R8A7795_CLK_ZTR ,CLK_PLL1_DIV2 ,6 ,1 ),DEF_FIXED ("ztrd2" ,R8A7795_CLK_ZTRD2 ,CLK_PLL1_DIV2 ,12 ,1 ), DEF_FIXED("zt", R8A7795_CLK_ZT, CLK_PLL1_DIV2, 4, 1),
@@ -102,8 +107,6 @@ static const struct cpg_core_clk r8a7795_core_clks[] = {DEF_GEN3_SD ("sd2" ,R8A7795_CLK_SD2 ,CLK_SDSRC ,0x268 ),DEF_GEN3_SD ("sd3" ,R8A7795_CLK_SD3 ,CLK_SDSRC ,0x26c ), -DEF_GEN3_RPC ("rpc" ,R8A7795_CLK_RPC ,CLK_RPCSRC ,0x238 ), -DEF_FIXED ("cl" ,R8A7795_CLK_CL ,CLK_PLL1_DIV2 ,48 ,1 ),DEF_FIXED ("cr" ,R8A7795_CLK_CR ,CLK_PLL1_DIV4 ,2 ,1 ), DEF_FIXED("cp", R8A7795_CLK_CP, CLK_EXTAL, 2, 1),
@@ -132,14 +135,15 @@ static const struct mssr_mod_clk r8a7795_mod_clks[] = {DEF_MOD ("msiof2" ,209 ,R8A7795_CLK_MSO ),DEF_MOD ("msiof1" ,210 ,R8A7795_CLK_MSO ),DEF_MOD ("msiof0" ,211 ,R8A7795_CLK_MSO ), -DEF_MOD ("sys-dmac2" ,217 ,R8A7795_CLK_S0D3 ), -DEF_MOD ("sys-dmac1" ,218 ,R8A7795_CLK_S0D3 ), +DEF_MOD ("sys-dmac2" ,217 ,R8A7795_CLK_S3D1 ), +DEF_MOD ("sys-dmac1" ,218 ,R8A7795_CLK_S3D1 ),DEF_MOD ("sys-dmac0" ,219 ,R8A7795_CLK_S0D3 ),DEF_MOD ("sceg-pub" ,229 ,R8A7795_CLK_CR ),DEF_MOD ("cmt3" ,300 ,R8A7795_CLK_R ),DEF_MOD ("cmt2" ,301 ,R8A7795_CLK_R ),DEF_MOD ("cmt1" ,302 ,R8A7795_CLK_R ),DEF_MOD ("cmt0" ,303 ,R8A7795_CLK_R ), +DEF_MOD ("tpu0" ,304 ,R8A7795_CLK_S3D4 ),DEF_MOD ("scif2" ,310 ,R8A7795_CLK_S3D4 ),DEF_MOD ("sdif3" ,311 ,R8A7795_CLK_SD3 ), DEF_MOD("sdif2", 312, R8A7795_CLK_SD2),
@@ -156,16 +160,16 @@ static const struct mssr_mod_clk r8a7795_mod_clks[] = {DEF_MOD ("rwdt" ,402 ,R8A7795_CLK_R ),DEF_MOD ("intc-ex" ,407 ,R8A7795_CLK_CP ),DEF_MOD ("intc-ap" ,408 ,R8A7795_CLK_S0D3 ), -DEF_MOD ("audmac1" ,501 ,R8A7795_CLK_S0D3 ), -DEF_MOD ("audmac0" ,502 ,R8A7795_CLK_S0D3 ), -DEF_MOD ("drif7" ,508 ,R8A7795_CLK_S3D2 ), -DEF_MOD ("drif6" ,509 ,R8A7795_CLK_S3D2 ), -DEF_MOD ("drif5" ,510 ,R8A7795_CLK_S3D2 ), -DEF_MOD ("drif4" ,511 ,R8A7795_CLK_S3D2 ), -DEF_MOD ("drif3" ,512 ,R8A7795_CLK_S3D2 ), -DEF_MOD ("drif2" ,513 ,R8A7795_CLK_S3D2 ), -DEF_MOD ("drif1" ,514 ,R8A7795_CLK_S3D2 ), -DEF_MOD ("drif0" ,515 ,R8A7795_CLK_S3D2 ), +DEF_MOD ("audmac1" ,501 ,R8A7795_CLK_S1D2 ), +DEF_MOD ("audmac0" ,502 ,R8A7795_CLK_S1D2 ), +DEF_MOD ("drif31" ,508 ,R8A7795_CLK_S3D2 ), +DEF_MOD ("drif30" ,509 ,R8A7795_CLK_S3D2 ), +DEF_MOD ("drif21" ,510 ,R8A7795_CLK_S3D2 ), +DEF_MOD ("drif20" ,511 ,R8A7795_CLK_S3D2 ), +DEF_MOD ("drif11" ,512 ,R8A7795_CLK_S3D2 ), +DEF_MOD ("drif10" ,513 ,R8A7795_CLK_S3D2 ), +DEF_MOD ("drif01" ,514 ,R8A7795_CLK_S3D2 ), +DEF_MOD ("drif00" ,515 ,R8A7795_CLK_S3D2 ),DEF_MOD ("hscif4" ,516 ,R8A7795_CLK_S3D1 ),DEF_MOD ("hscif3" ,517 ,R8A7795_CLK_S3D1 ), DEF_MOD("hscif2", 518, R8A7795_CLK_S3D1),
@@ -197,12 +201,16 @@ static const struct mssr_mod_clk r8a7795_mod_clks[] = {DEF_MOD ("vspi2" ,629 ,R8A7795_CLK_S2D1 ),/* ES1.x */ DEF_MOD ("vspi1" ,630 ,R8A7795_CLK_S0D1 ),DEF_MOD ("vspi0" ,631 ,R8A7795_CLK_S0D1 ), -DEF_MOD ("ehci3" ,700 ,R8A7795_CLK_S3D4 ), -DEF_MOD ("ehci2" ,701 ,R8A7795_CLK_S3D4 ), -DEF_MOD ("ehci1" ,702 ,R8A7795_CLK_S3D4 ), -DEF_MOD ("ehci0" ,703 ,R8A7795_CLK_S3D4 ), -DEF_MOD ("hsusb" ,704 ,R8A7795_CLK_S3D4 ), -DEF_MOD ("hsusb3" ,705 ,R8A7795_CLK_S3D4 ), +DEF_MOD ("ehci3" ,700 ,R8A7795_CLK_S3D2 ), +DEF_MOD ("ehci2" ,701 ,R8A7795_CLK_S3D2 ), +DEF_MOD ("ehci1" ,702 ,R8A7795_CLK_S3D2 ), +DEF_MOD ("ehci0" ,703 ,R8A7795_CLK_S3D2 ), +DEF_MOD ("hsusb" ,704 ,R8A7795_CLK_S3D2 ), +DEF_MOD ("hsusb3" ,705 ,R8A7795_CLK_S3D2 ), +DEF_MOD ("cmm3" ,708 ,R8A7795_CLK_S2D1 ), +DEF_MOD ("cmm2" ,709 ,R8A7795_CLK_S2D1 ), +DEF_MOD ("cmm1" ,710 ,R8A7795_CLK_S2D1 ), +DEF_MOD ("cmm0" ,711 ,R8A7795_CLK_S2D1 ),DEF_MOD ("csi21" ,713 ,R8A7795_CLK_CSI0 ),/* ES1.x */ DEF_MOD ("csi20" ,714 ,R8A7795_CLK_CSI0 ), DEF_MOD("csi41", 715, R8A7795_CLK_CSI0),
@@ -239,7 +247,7 @@ static const struct mssr_mod_clk r8a7795_mod_clks[] = {DEF_MOD ("can-fd" ,914 ,R8A7795_CLK_S3D2 ),DEF_MOD ("can-if1" ,915 ,R8A7795_CLK_S3D4 ),DEF_MOD ("can-if0" ,916 ,R8A7795_CLK_S3D4 ), -DEF_MOD ("rpc" ,917 ,R8A7795_CLK_RPC ), +DEF_MOD ("rpc-if" ,917 ,R8A7795_CLK_RPCD2 ),DEF_MOD ("i2c6" ,918 ,R8A7795_CLK_S0D6 ),DEF_MOD ("i2c5" ,919 ,R8A7795_CLK_S0D6 ), DEF_MOD("i2c-dvfs", 926, R8A7795_CLK_CP),
drivers/clk/renesas/r8a7796-cpg-mssr.c +36 -22
117 lines not on this page · raw message
drivers/clk/renesas/r8a77965-cpg-mssr.c +36 -22
117 lines not on this page · raw message
drivers/clk/renesas/r8a77970-cpg-mssr.c +68 -64
179 lines not on this page · raw message
drivers/clk/renesas/r8a77990-cpg-mssr.c +21 -16
@@ -44,7 +44,6 @@ enum clk_ids {CLK_S2 ,CLK_S3 ,CLK_SDSRC , -CLK_RPCSRC ,CLK_RINT , CLK_OCO,
@@ -74,7 +73,6 @@ static const struct cpg_core_clk r8a77990_core_clks[] = {DEF_FIXED (".s2" ,CLK_S2 ,CLK_PLL1 ,4 ,1 ),DEF_FIXED (".s3" ,CLK_S3 ,CLK_PLL1 ,6 ,1 ),DEF_FIXED (".sdsrc" ,CLK_SDSRC ,CLK_PLL1 ,2 ,1 ), -DEF_FIXED (".rpcsrc" ,CLK_RPCSRC ,CLK_PLL1 ,2 ,1 ), DEF_DIV6_RO(".r", CLK_RINT, CLK_EXTAL, CPG_RCKCR, 32),
@@ -83,6 +81,7 @@ static const struct cpg_core_clk r8a77990_core_clks[] = {/* Core Clock Outputs */ DEF_FIXED ("za2" ,R8A77990_CLK_ZA2 ,CLK_PLL0D24 ,1 ,1 ),DEF_FIXED ("za8" ,R8A77990_CLK_ZA8 ,CLK_PLL0D8 ,1 ,1 ), +DEF_GEN3_Z ("z2" ,R8A77990_CLK_Z2 ,CLK_TYPE_GEN3_Z ,CLK_PLL0 ,4 ,8 ),DEF_FIXED ("ztr" ,R8A77990_CLK_ZTR ,CLK_PLL1 ,6 ,1 ),DEF_FIXED ("zt" ,R8A77990_CLK_ZT ,CLK_PLL1 ,4 ,1 ), DEF_FIXED("zx", R8A77990_CLK_ZX, CLK_PLL1, 3, 1),
@@ -105,9 +104,8 @@ static const struct cpg_core_clk r8a77990_core_clks[] = {DEF_GEN3_SD ("sd1" ,R8A77990_CLK_SD1 ,CLK_SDSRC ,0x0078 ),DEF_GEN3_SD ("sd3" ,R8A77990_CLK_SD3 ,CLK_SDSRC ,0x026c ), -DEF_GEN3_RPC ("rpc" ,R8A77990_CLK_RPC ,CLK_RPCSRC ,0x238 ), -DEF_FIXED ("cl" ,R8A77990_CLK_CL ,CLK_PLL1 ,48 ,1 ), +DEF_FIXED ("cr" ,R8A77990_CLK_CR ,CLK_PLL1D2 ,2 ,1 ),DEF_FIXED ("cp" ,R8A77990_CLK_CP ,CLK_EXTAL ,2 ,1 ), DEF_FIXED("cpex", R8A77990_CLK_CPEX, CLK_EXTAL, 4, 1),
@@ -126,6 +124,11 @@ static const struct cpg_core_clk r8a77990_core_clks[] = { };static const struct mssr_mod_clk r8a77990_mod_clks[] = { +DEF_MOD ("tmu4" ,121 ,R8A77990_CLK_S0D6C ), +DEF_MOD ("tmu3" ,122 ,R8A77990_CLK_S3D2C ), +DEF_MOD ("tmu2" ,123 ,R8A77990_CLK_S3D2C ), +DEF_MOD ("tmu1" ,124 ,R8A77990_CLK_S3D2C ), +DEF_MOD ("tmu0" ,125 ,R8A77990_CLK_CP ),DEF_MOD ("scif5" ,202 ,R8A77990_CLK_S3D4C ),DEF_MOD ("scif4" ,203 ,R8A77990_CLK_S3D4C ),DEF_MOD ("scif3" ,204 ,R8A77990_CLK_S3D4C ),
@@ -138,6 +141,7 @@ static const struct mssr_mod_clk r8a77990_mod_clks[] = {DEF_MOD ("sys-dmac2" ,217 ,R8A77990_CLK_S3D1 ),DEF_MOD ("sys-dmac1" ,218 ,R8A77990_CLK_S3D1 ),DEF_MOD ("sys-dmac0" ,219 ,R8A77990_CLK_S3D1 ), +DEF_MOD ("sceg-pub" ,229 ,R8A77990_CLK_CR ),DEF_MOD ("cmt3" ,300 ,R8A77990_CLK_R ), DEF_MOD("cmt2", 301, R8A77990_CLK_R),
@@ -156,15 +160,15 @@ static const struct mssr_mod_clk r8a77990_mod_clks[] = {DEF_MOD ("intc-ex" ,407 ,R8A77990_CLK_CP ),DEF_MOD ("intc-ap" ,408 ,R8A77990_CLK_S0D3 ), -DEF_MOD ("audmac0" ,502 ,R8A77990_CLK_S3D4 ), -DEF_MOD ("drif7" ,508 ,R8A77990_CLK_S3D2 ), -DEF_MOD ("drif6" ,509 ,R8A77990_CLK_S3D2 ), -DEF_MOD ("drif5" ,510 ,R8A77990_CLK_S3D2 ), -DEF_MOD ("drif4" ,511 ,R8A77990_CLK_S3D2 ), -DEF_MOD ("drif3" ,512 ,R8A77990_CLK_S3D2 ), -DEF_MOD ("drif2" ,513 ,R8A77990_CLK_S3D2 ), -DEF_MOD ("drif1" ,514 ,R8A77990_CLK_S3D2 ), -DEF_MOD ("drif0" ,515 ,R8A77990_CLK_S3D2 ), +DEF_MOD ("audmac0" ,502 ,R8A77990_CLK_S1D2 ), +DEF_MOD ("drif31" ,508 ,R8A77990_CLK_S3D2 ), +DEF_MOD ("drif30" ,509 ,R8A77990_CLK_S3D2 ), +DEF_MOD ("drif21" ,510 ,R8A77990_CLK_S3D2 ), +DEF_MOD ("drif20" ,511 ,R8A77990_CLK_S3D2 ), +DEF_MOD ("drif11" ,512 ,R8A77990_CLK_S3D2 ), +DEF_MOD ("drif10" ,513 ,R8A77990_CLK_S3D2 ), +DEF_MOD ("drif01" ,514 ,R8A77990_CLK_S3D2 ), +DEF_MOD ("drif00" ,515 ,R8A77990_CLK_S3D2 ),DEF_MOD ("hscif4" ,516 ,R8A77990_CLK_S3D1C ),DEF_MOD ("hscif3" ,517 ,R8A77990_CLK_S3D1C ), DEF_MOD("hscif2", 518, R8A77990_CLK_S3D1C),
@@ -184,8 +188,10 @@ static const struct mssr_mod_clk r8a77990_mod_clks[] = {DEF_MOD ("vspb" ,626 ,R8A77990_CLK_S0D1 ),DEF_MOD ("vspi0" ,631 ,R8A77990_CLK_S0D1 ), -DEF_MOD ("ehci0" ,703 ,R8A77990_CLK_S3D4 ), -DEF_MOD ("hsusb" ,704 ,R8A77990_CLK_S3D4 ), +DEF_MOD ("ehci0" ,703 ,R8A77990_CLK_S3D2 ), +DEF_MOD ("hsusb" ,704 ,R8A77990_CLK_S3D2 ), +DEF_MOD ("cmm1" ,710 ,R8A77990_CLK_S1D1 ), +DEF_MOD ("cmm0" ,711 ,R8A77990_CLK_S1D1 ),DEF_MOD ("csi40" ,716 ,R8A77990_CLK_CSI0 ),DEF_MOD ("du1" ,723 ,R8A77990_CLK_S1D1 ), DEF_MOD("du0", 724, R8A77990_CLK_S1D1),
@@ -205,7 +211,6 @@ static const struct mssr_mod_clk r8a77990_mod_clks[] = {DEF_MOD ("can-fd" ,914 ,R8A77990_CLK_S3D2 ),DEF_MOD ("can-if1" ,915 ,R8A77990_CLK_S3D4 ),DEF_MOD ("can-if0" ,916 ,R8A77990_CLK_S3D4 ), -DEF_MOD ("rpc" ,917 ,R8A77990_CLK_RPC ),DEF_MOD ("i2c6" ,918 ,R8A77990_CLK_S3D2 ),DEF_MOD ("i2c5" ,919 ,R8A77990_CLK_S3D2 ), DEF_MOD("i2c-dvfs", 926, R8A77990_CLK_CP),
drivers/clk/renesas/r8a77995-cpg-mssr.c +10 -6
@@ -42,7 +42,6 @@ enum clk_ids {CLK_S2 ,CLK_S3 ,CLK_SDSRC , -CLK_RPCSRC ,CLK_RINT , CLK_OCO,
@@ -70,7 +69,6 @@ static const struct cpg_core_clk r8a77995_core_clks[] = {DEF_FIXED (".s2" ,CLK_S2 ,CLK_PLL1 ,4 ,1 ),DEF_FIXED (".s3" ,CLK_S3 ,CLK_PLL1 ,6 ,1 ),DEF_FIXED (".sdsrc" ,CLK_SDSRC ,CLK_PLL1 ,2 ,1 ), -DEF_FIXED (".rpcsrc" ,CLK_RPCSRC ,CLK_PLL1 ,2 ,1 ), DEF_DIV6_RO(".r", CLK_RINT, CLK_EXTAL, CPG_RCKCR, 32),
@@ -93,13 +91,12 @@ static const struct cpg_core_clk r8a77995_core_clks[] = {DEF_FIXED ("s3d4" ,R8A77995_CLK_S3D4 ,CLK_S3 ,4 ,1 ),DEF_FIXED ("cl" ,R8A77995_CLK_CL ,CLK_PLL1 ,48 ,1 ), +DEF_FIXED ("cr" ,R8A77995_CLK_CR ,CLK_PLL1D2 ,2 ,1 ),DEF_FIXED ("cp" ,R8A77995_CLK_CP ,CLK_EXTAL ,2 ,1 ),DEF_FIXED ("cpex" ,R8A77995_CLK_CPEX ,CLK_EXTAL ,4 ,1 ),DEF_DIV6_RO ("osc" ,R8A77995_CLK_OSC ,CLK_EXTAL ,CPG_RCKCR ,8 ), -DEF_GEN3_RPC ("rpc" ,R8A77995_CLK_RPC ,CLK_RPCSRC ,0x238 ), -DEF_GEN3_PE ("s1d4c" ,R8A77995_CLK_S1D4C ,CLK_S1 ,4 ,CLK_PE ,2 ),DEF_GEN3_PE ("s3d1c" ,R8A77995_CLK_S3D1C ,CLK_S3 ,1 ,CLK_PE ,1 ), DEF_GEN3_PE("s3d2c", R8A77995_CLK_S3D2C, CLK_S3, 2, CLK_PE, 2),
@@ -114,6 +111,11 @@ static const struct cpg_core_clk r8a77995_core_clks[] = { };static const struct mssr_mod_clk r8a77995_mod_clks[] = { +DEF_MOD ("tmu4" ,121 ,R8A77995_CLK_S1D4C ), +DEF_MOD ("tmu3" ,122 ,R8A77995_CLK_S3D2C ), +DEF_MOD ("tmu2" ,123 ,R8A77995_CLK_S3D2C ), +DEF_MOD ("tmu1" ,124 ,R8A77995_CLK_S3D2C ), +DEF_MOD ("tmu0" ,125 ,R8A77995_CLK_CP ),DEF_MOD ("scif5" ,202 ,R8A77995_CLK_S3D4C ),DEF_MOD ("scif4" ,203 ,R8A77995_CLK_S3D4C ),DEF_MOD ("scif3" ,204 ,R8A77995_CLK_S3D4C ),
@@ -126,6 +128,7 @@ static const struct mssr_mod_clk r8a77995_mod_clks[] = {DEF_MOD ("sys-dmac2" ,217 ,R8A77995_CLK_S3D1 ),DEF_MOD ("sys-dmac1" ,218 ,R8A77995_CLK_S3D1 ),DEF_MOD ("sys-dmac0" ,219 ,R8A77995_CLK_S3D1 ), +DEF_MOD ("sceg-pub" ,229 ,R8A77995_CLK_CR ),DEF_MOD ("cmt3" ,300 ,R8A77995_CLK_R ),DEF_MOD ("cmt2" ,301 ,R8A77995_CLK_R ), DEF_MOD("cmt1", 302, R8A77995_CLK_R),
@@ -137,7 +140,7 @@ static const struct mssr_mod_clk r8a77995_mod_clks[] = {DEF_MOD ("rwdt" ,402 ,R8A77995_CLK_R ),DEF_MOD ("intc-ex" ,407 ,R8A77995_CLK_CP ),DEF_MOD ("intc-ap" ,408 ,R8A77995_CLK_S1D2 ), -DEF_MOD ("audmac0" ,502 ,R8A77995_CLK_S3D1 ), +DEF_MOD ("audmac0" ,502 ,R8A77995_CLK_S1D2 ),DEF_MOD ("hscif3" ,517 ,R8A77995_CLK_S3D1C ),DEF_MOD ("hscif0" ,520 ,R8A77995_CLK_S3D1C ), DEF_MOD("thermal", 522, R8A77995_CLK_CP),
@@ -150,6 +153,8 @@ static const struct mssr_mod_clk r8a77995_mod_clks[] = {DEF_MOD ("vspbs" ,627 ,R8A77995_CLK_S0D1 ),DEF_MOD ("ehci0" ,703 ,R8A77995_CLK_S3D2 ),DEF_MOD ("hsusb" ,704 ,R8A77995_CLK_S3D2 ), +DEF_MOD ("cmm1" ,710 ,R8A77995_CLK_S1D1 ), +DEF_MOD ("cmm0" ,711 ,R8A77995_CLK_S1D1 ),DEF_MOD ("du1" ,723 ,R8A77995_CLK_S1D1 ),DEF_MOD ("du0" ,724 ,R8A77995_CLK_S1D1 ), DEF_MOD("lvds", 727, R8A77995_CLK_S2D1),
@@ -166,7 +171,6 @@ static const struct mssr_mod_clk r8a77995_mod_clks[] = {DEF_MOD ("can-fd" ,914 ,R8A77995_CLK_S3D2 ),DEF_MOD ("can-if1" ,915 ,R8A77995_CLK_S3D4 ),DEF_MOD ("can-if0" ,916 ,R8A77995_CLK_S3D4 ), -DEF_MOD ("rpc" ,917 ,R8A77995_CLK_RPC ),DEF_MOD ("i2c3" ,928 ,R8A77995_CLK_S3D2 ),DEF_MOD ("i2c2" ,929 ,R8A77995_CLK_S3D2 ), DEF_MOD("i2c1", 930, R8A77995_CLK_S3D2),
drivers/clk/renesas/rcar-gen3-cpg.h +8 -8
@@ -1,11 +1,10 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* * R-Car Gen3 Clock Pulse Generator * -* Copyright (C) 2015-2016 Glider bvba +* Copyright (C) 2015-2018 Glider bvba +* Copyright (C) 2018 Renesas Electronics Corp. * -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; version 2 of the License. */ #ifndef __CLK_RENESAS_RCAR_GEN3_CPG_H__
@@ -22,10 +21,10 @@ enum rcar_gen3_clk_types {CLK_TYPE_GEN3_R ,CLK_TYPE_GEN3_MDSEL ,/* Select parent/divider using mode pin */ CLK_TYPE_GEN3_Z , -CLK_TYPE_GEN3_Z2 ,CLK_TYPE_GEN3_OSC ,/* OSC EXTAL predivider and fixed divider */ CLK_TYPE_GEN3_RCKSEL ,/* Select parent/divider using RCKCR.CKSEL */ CLK_TYPE_GEN3_RPCSRC , +CLK_TYPE_GEN3_E3_RPCSRC ,CLK_TYPE_GEN3_RPC , CLK_TYPE_GEN3_RPCD2,
@@ -36,9 +35,6 @@ enum rcar_gen3_clk_types {#define DEF_GEN3_SD (_name, _id, _parent, _offset) \ DEF_BASE(_name, _id, CLK_TYPE_GEN3_SD, _parent, .offset = _offset) -#define DEF_GEN3_RPC (_name, _id, _parent, _offset) \ - DEF_BASE(_name, _id, CLK_TYPE_GEN3_RPC, _parent, .offset = _offset) -#define DEF_GEN3_MDSEL (_name, _id, _md, _parent0, _div0, _parent1, _div1) \ DEF_BASE(_name, _id, CLK_TYPE_GEN3_MDSEL, \ (_parent0) << 16 | (_parent1), \
@@ -59,6 +55,10 @@ enum rcar_gen3_clk_types {#define DEF_GEN3_Z (_name, _id, _type, _parent, _div, _offset) \ DEF_BASE(_name, _id, _type, _parent, .div = _div, .offset = _offset) +#define DEF_FIXED_RPCSRC_E3 (_name, _id, _parent0, _parent1) \ + DEF_BASE(_name, _id, CLK_TYPE_GEN3_E3_RPCSRC, \ + (_parent0) << 16 | (_parent1), .div = 8) +struct rcar_gen3_cpg_pll_config {u8 extal_div;u8 pll1_mult;
Signature · 1 line
2.30.2
PATCH 4/30 clk: renesas: Reinstate RPC clock on R-Car D3/E3
In reply to Marek VasutReinstate RPC clock on D3/E3 after Linux 5.12 synchronization. The D3 and E3 clock drivers do not contain RPC clock entries mainline Linux yet.
--- drivers/clk/renesas/r8a77990-cpg-mssr.c | 9 +++++++++ drivers/clk/renesas/r8a77995-cpg-mssr.c | 9 +++++++++ 2 files changed, 18 insertions(+)
drivers/clk/renesas/r8a77990-cpg-mssr.c +9 -0
@@ -44,6 +44,7 @@ enum clk_ids {CLK_S2 ,CLK_S3 ,CLK_SDSRC , +CLK_RPCSRC ,CLK_RINT , CLK_OCO,
@@ -74,6 +75,13 @@ static const struct cpg_core_clk r8a77990_core_clks[] = {DEF_FIXED (".s3" ,CLK_S3 ,CLK_PLL1 ,6 ,1 ),DEF_FIXED (".sdsrc" ,CLK_SDSRC ,CLK_PLL1 ,2 ,1 ), +DEF_FIXED_RPCSRC_E3 (".rpcsrc" ,CLK_RPCSRC ,CLK_PLL0 ,CLK_PLL1 ), + +DEF_BASE ("rpc" ,R8A77990_CLK_RPC ,CLK_TYPE_GEN3_RPC , +CLK_RPCSRC ), +DEF_BASE ("rpcd2" ,R8A77990_CLK_RPCD2 ,CLK_TYPE_GEN3_RPCD2 , +R8A77990_CLK_RPC ), +DEF_DIV6_RO (".r" ,CLK_RINT ,CLK_EXTAL ,CPG_RCKCR ,32 ), DEF_RATE(".oco", CLK_OCO, 8 * 1000 * 1000),
@@ -211,6 +219,7 @@ static const struct mssr_mod_clk r8a77990_mod_clks[] = {DEF_MOD ("can-fd" ,914 ,R8A77990_CLK_S3D2 ),DEF_MOD ("can-if1" ,915 ,R8A77990_CLK_S3D4 ),DEF_MOD ("can-if0" ,916 ,R8A77990_CLK_S3D4 ), +DEF_MOD ("rpc" ,917 ,R8A77990_CLK_RPC ),DEF_MOD ("i2c6" ,918 ,R8A77990_CLK_S3D2 ),DEF_MOD ("i2c5" ,919 ,R8A77990_CLK_S3D2 ), DEF_MOD("i2c-dvfs", 926, R8A77990_CLK_CP),
drivers/clk/renesas/r8a77995-cpg-mssr.c +9 -0
@@ -42,6 +42,7 @@ enum clk_ids {CLK_S2 ,CLK_S3 ,CLK_SDSRC , +CLK_RPCSRC ,CLK_RINT , CLK_OCO,
@@ -70,6 +71,13 @@ static const struct cpg_core_clk r8a77995_core_clks[] = {DEF_FIXED (".s3" ,CLK_S3 ,CLK_PLL1 ,6 ,1 ),DEF_FIXED (".sdsrc" ,CLK_SDSRC ,CLK_PLL1 ,2 ,1 ), +DEF_FIXED_RPCSRC_E3 (".rpcsrc" ,CLK_RPCSRC ,CLK_PLL0 ,CLK_PLL1 ), + +DEF_BASE ("rpc" ,R8A77995_CLK_RPC ,CLK_TYPE_GEN3_RPC , +CLK_RPCSRC ), +DEF_BASE ("rpcd2" ,R8A77995_CLK_RPCD2 ,CLK_TYPE_GEN3_RPCD2 , +R8A77995_CLK_RPC ), +DEF_DIV6_RO (".r" ,CLK_RINT ,CLK_EXTAL ,CPG_RCKCR ,32 ), DEF_RATE(".oco", CLK_OCO, 8 * 1000 * 1000),
@@ -171,6 +179,7 @@ static const struct mssr_mod_clk r8a77995_mod_clks[] = {DEF_MOD ("can-fd" ,914 ,R8A77995_CLK_S3D2 ),DEF_MOD ("can-if1" ,915 ,R8A77995_CLK_S3D4 ),DEF_MOD ("can-if0" ,916 ,R8A77995_CLK_S3D4 ), +DEF_MOD ("rpc" ,917 ,R8A77995_CLK_RPC ),DEF_MOD ("i2c3" ,928 ,R8A77995_CLK_S3D2 ),DEF_MOD ("i2c2" ,929 ,R8A77995_CLK_S3D2 ), DEF_MOD("i2c1", 930, R8A77995_CLK_S3D2),
Signature · 1 line
2.30.2
PATCH 5/30 clk: renesas: Fix incorrect return RPC clk_get_rate
In reply to Marek VasutFrom: Hai Pham <[email protected]>
RPC clk_get_rate will return error code instead of expected clock rate. Fix this.
--- drivers/clk/renesas/clk-rcar-gen3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/renesas/clk-rcar-gen3.c +1 -1
@@ -310,7 +310,7 @@ static u64 gen3_clk_get_rate64(struct clk *clk) __func__, __LINE__, core->parent, prediv, postdiv, rate); -return -EINVAL ; +return rate; }
Signature · 1 line
2.30.2
Lad
PATCH 5/30 clk: renesas: Fix incorrect return RPC clk_get_rate
Hi Marek,
Thank you for the patch.
Quoted 12 lines · Marek Vasut
From: Hai Pham <[email protected]>
RPC
clk_get_ratewill return error code instead of expected clock rate. Fix this.Signed-off-by Hai Pham <[email protected]>Signed-off-by Marek Vasut <[email protected]>--- drivers/clk/renesas/clk-rcar-gen3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Tested on RZ/G2E board
Cheers,
Prabhakar
Quoted 16 lines
drivers/clk/renesas/clk-rcar-gen3.c +1
-2@@ -310,7 +310,7 @@ static u64 gen3_clk_get_rate64(struct clk *clk) __func__, __LINE__, core->parent, prediv, postdiv, rate); -return -EINVAL ; +return rate; } --2.30.2
PATCH 6/30 clk: renesas: Fix Realtime Module Stop Control Register offsets
In reply to Marek VasutFrom: Hai Pham <[email protected]>
This patch fixes Realtime Module Stop Control Register (RMSTPCR) offsets based on R-Car Gen3, H2/M2/M2N/E2/E2X hardware user's manual. The r8a73a4 only has RMSTPCR0 - RMSTPCR5 so this calculation change doesn't affect it.
--- drivers/clk/renesas/renesas-cpg-mssr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/renesas/renesas-cpg-mssr.c +1 -1
@@ -55,7 +55,7 @@ static const u16 smstpcr[] = {/* Realtime Module Stop Control Register offsets */ -#define RMSTPCR (i) (smstpcr[i] - 0x20) +#define RMSTPCR (i) ((i) < 8 ? smstpcr[i] - 0x20 : smstpcr[i] - 0x10)/* Modem Module Stop Control Register offsets (r8a73a4) */ #define MMSTPCR (i) (smstpcr[i] + 0x20)
Signature · 1 line
2.30.2
PATCH 7/30 clk: renesas: Add support for RPCD2 clock
In reply to Marek VasutFrom: Hai Pham <[email protected]>
This supports RPCD2 clock handling. While at it, add the check point for RPC-IF clock RPCD2 Frequency Division Ratio, since it must be odd number
--- drivers/clk/renesas/clk-rcar-gen3.c | 19 ++++++++++++++----- drivers/clk/renesas/rcar-gen3-cpg.h | 3 +++ 2 files changed, 17 insertions(+), 5 deletions(-)
drivers/clk/renesas/clk-rcar-gen3.c +14 -5
@@ -289,6 +289,7 @@ static u64 gen3_clk_get_rate64(struct clk *clk)return -EINVAL ;case CLK_TYPE_GEN3_RPC : +case CLK_TYPE_GEN3_RPCD2 : rate =gen3_clk_get_rate64 (&parent); value =readl (priv->base + core->offset);
@@ -304,13 +305,21 @@ static u64 gen3_clk_get_rate64(struct clk *clk) postdiv = (value >>CPG_RPC_POSTDIV_OFFSET ) &CPG_RPC_POSTDIV_MASK ; - rate /= postdiv +1 ; -debug ("%s[%i] RPC clk: parent=%i prediv=%i postdiv=%i => rate=%llu\n" , - __func__, __LINE__, - core->parent, prediv, postdiv, rate); +if (postdiv %2 !=0 ) { + rate /= postdiv +1 ; -return rate; +if (core->type ==CLK_TYPE_GEN3_RPCD2 ) + rate /=2 ; + +debug ("%s[%i] RPC clk: parent=%i prediv=%i postdiv=%i => rate=%llu\n" , + __func__, __LINE__, + core->parent, prediv, postdiv, rate); + +return rate; + } + +return -EINVAL ; }
drivers/clk/renesas/rcar-gen3-cpg.h +3 -0
@@ -35,6 +35,9 @@ enum rcar_gen3_clk_types {#define DEF_GEN3_SD (_name, _id, _parent, _offset) \ DEF_BASE(_name, _id, CLK_TYPE_GEN3_SD, _parent, .offset = _offset) +#define DEF_GEN3_RPCD2 (_name, _id, _parent, _offset) \ + DEF_BASE(_name, _id, CLK_TYPE_GEN3_RPCD2, _parent, .offset = _offset) +#define DEF_GEN3_MDSEL (_name, _id, _md, _parent0, _div0, _parent1, _div1) \ DEF_BASE(_name, _id, CLK_TYPE_GEN3_MDSEL, \ (_parent0) << 16 | (_parent1), \
Signature · 1 line
2.30.2
Lad
PATCH 7/30 clk: renesas: Add support for RPCD2 clock
Hi Marek,
Thank you for the patch.
Quoted 7 lines · Marek Vasut
From: Hai Pham <[email protected]>
This supports RPCD2 clock handling. While at it, add the check point for RPC-IF clock RPCD2 Frequency Division Ratio, since it must be odd number
Quoted 7 lines
Signed-off-by Hai Pham <[email protected]>Signed-off-by Marek Vasut <[email protected]>--- drivers/clk/renesas/clk-rcar-gen3.c | 19 ++++++++++++++----- drivers/clk/renesas/rcar-gen3-cpg.h | 3 +++ 2 files changed, 17 insertions(+), 5 deletions(-)
Tested on RZ/G2E board
Cheers,
Prabhakar
Quoted 56 lines
drivers/clk/renesas/clk-rcar-gen3.c +14
-5@@ -289,6 +289,7 @@ static u64 gen3_clk_get_rate64(struct clk *clk)return -EINVAL ;case CLK_TYPE_GEN3_RPC : +case CLK_TYPE_GEN3_RPCD2 : rate =gen3_clk_get_rate64 (&parent); value =readl (priv->base + core->offset);@@ -304,13 +305,21 @@ static u64 gen3_clk_get_rate64(struct clk *clk) postdiv = (value >>CPG_RPC_POSTDIV_OFFSET ) &CPG_RPC_POSTDIV_MASK ; - rate /= postdiv +1 ; -debug ("%s[%i] RPC clk: parent=%i prediv=%i postdiv=%i => rate=%llu\n" , - __func__, __LINE__, - core->parent, prediv, postdiv, rate); +if (postdiv %2 !=0 ) { + rate /= postdiv +1 ; -return rate; +if (core->type ==CLK_TYPE_GEN3_RPCD2 ) + rate /=2 ; + +debug ("%s[%i] RPC clk: parent=%i prediv=%i postdiv=%i => rate=%llu\n" , + __func__, __LINE__, + core->parent, prediv, postdiv, rate); + +return rate; + } + +return -EINVAL ; }drivers/clk/renesas/rcar-gen3-cpg.h +3
-1@@ -35,6 +35,9 @@ enum rcar_gen3_clk_types {#define DEF_GEN3_SD (_name, _id, _parent, _offset) \ DEF_BASE(_name, _id, CLK_TYPE_GEN3_SD, _parent, .offset = _offset) +#define DEF_GEN3_RPCD2 (_name, _id, _parent, _offset) \ + DEF_BASE(_name, _id, CLK_TYPE_GEN3_RPCD2, _parent, .offset = _offset) +#define DEF_GEN3_MDSEL (_name, _id, _md, _parent0, _div0, _parent1, _div1) \ DEF_BASE(_name, _id, CLK_TYPE_GEN3_MDSEL, \ (_parent0) << 16 | (_parent1), \ --2.30.2
PATCH 8/30 clk: renesas: Make reset controller modemr register offset configurable
In reply to Marek VasutThe MODEMR register offset changed on R8A779A0, make the MODEMR offset configurable. Fill the offset in on all clock drivers. No functional change.
Based off "clk: renesas: Make CPG Reset MODEMR offset accessible from struct cpg_mssr_info" by Hai Pham <[email protected]>
--- drivers/clk/renesas/clk-rcar-gen2.c | 2 -- drivers/clk/renesas/clk-rcar-gen3.c | 4 +--- drivers/clk/renesas/r8a774a1-cpg-mssr.c | 1 + drivers/clk/renesas/r8a774b1-cpg-mssr.c | 1 + drivers/clk/renesas/r8a774c0-cpg-mssr.c | 1 + drivers/clk/renesas/r8a774e1-cpg-mssr.c | 1 + drivers/clk/renesas/r8a7790-cpg-mssr.c | 1 + drivers/clk/renesas/r8a7791-cpg-mssr.c | 1 + drivers/clk/renesas/r8a7792-cpg-mssr.c | 1 + drivers/clk/renesas/r8a7794-cpg-mssr.c | 1 + drivers/clk/renesas/r8a7795-cpg-mssr.c | 1 + drivers/clk/renesas/r8a7796-cpg-mssr.c | 1 + drivers/clk/renesas/r8a77965-cpg-mssr.c | 1 + drivers/clk/renesas/r8a77970-cpg-mssr.c | 1 + drivers/clk/renesas/r8a77980-cpg-mssr.c | 1 + drivers/clk/renesas/r8a77990-cpg-mssr.c | 1 + drivers/clk/renesas/r8a77995-cpg-mssr.c | 1 + drivers/clk/renesas/rcar-gen2-cpg.h | 2 ++ drivers/clk/renesas/rcar-gen3-cpg.h | 2 ++ drivers/clk/renesas/renesas-cpg-mssr.h | 1 + 20 files changed, 21 insertions(+), 5 deletions(-)
drivers/clk/renesas/clk-rcar-gen2.c +0 -2
@@ -23,8 +23,6 @@#include "renesas-cpg-mssr.h" #include "rcar-gen2-cpg.h" -#define CPG_RST_MODEMR 0x0060 -#define CPG_PLL0CR 0x00d8#define CPG_SDCKCR 0x0074
drivers/clk/renesas/clk-rcar-gen3.c +1 -3
@@ -25,8 +25,6 @@#include "renesas-cpg-mssr.h" #include "rcar-gen3-cpg.h" -#define CPG_RST_MODEMR 0x0060 -#define CPG_PLL0CR 0x00d8#define CPG_PLL2CR 0x002c#define CPG_PLL4CR 0x01f4
@@ -382,7 +380,7 @@ int gen3_clk_probe(struct udevice *dev)if (rst_base ==FDT_ADDR_T_NONE )return -EINVAL ; - cpg_mode =readl (rst_base +CPG_RST_MODEMR ); + cpg_mode =readl (rst_base + info->reset_modemr_offset); priv->cpg_pll_config = (struct rcar_gen3_cpg_pll_config *)info->get_pll_config (cpg_mode);
drivers/clk/renesas/r8a774a1-cpg-mssr.c +1 -0
@@ -321,6 +321,7 @@ static const struct cpg_mssr_info r8a774a1_cpg_mssr_info = { .mstp_table = r8a774a1_mstp_table, .mstp_table_size = ARRAY_SIZE(r8a774a1_mstp_table), .reset_node = "renesas,r8a774a1-rst", + .reset_modemr_offset = CPG_RST_MODEMR, .extalr_node = "extalr", .mod_clk_base = MOD_CLK_BASE, .clk_extal_id = CLK_EXTAL,
drivers/clk/renesas/r8a774b1-cpg-mssr.c +1 -0
@@ -318,6 +318,7 @@ static const struct cpg_mssr_info r8a774b1_cpg_mssr_info = { .mstp_table = r8a774b1_mstp_table, .mstp_table_size = ARRAY_SIZE(r8a774b1_mstp_table), .reset_node = "renesas,r8a774b1-rst", + .reset_modemr_offset = CPG_RST_MODEMR, .extalr_node = "extalr", .mod_clk_base = MOD_CLK_BASE, .clk_extal_id = CLK_EXTAL,
drivers/clk/renesas/r8a774c0-cpg-mssr.c +1 -0
@@ -292,6 +292,7 @@ const struct cpg_mssr_info r8a774c0_cpg_mssr_info = { .mstp_table = r8a774c0_mstp_table, .mstp_table_size = ARRAY_SIZE(r8a774c0_mstp_table), .reset_node = "renesas,r8a774c0-rst", + .reset_modemr_offset = CPG_RST_MODEMR, .mod_clk_base = MOD_CLK_BASE, .clk_extal_id = CLK_EXTAL, .clk_extalr_id = ~0,
drivers/clk/renesas/r8a774e1-cpg-mssr.c +1 -0
@@ -332,6 +332,7 @@ static const struct cpg_mssr_info r8a774e1_cpg_mssr_info = { .mstp_table = r8a774e1_mstp_table, .mstp_table_size = ARRAY_SIZE(r8a774e1_mstp_table), .reset_node = "renesas,r8a774e1-rst", + .reset_modemr_offset = CPG_RST_MODEMR, .extalr_node = "extalr", .mod_clk_base = MOD_CLK_BASE, .clk_extal_id = CLK_EXTAL,
drivers/clk/renesas/r8a7790-cpg-mssr.c +1 -0
@@ -263,6 +263,7 @@ static const struct cpg_mssr_info r8a7790_cpg_mssr_info = { .mstp_table = r8a7790_mstp_table, .mstp_table_size = ARRAY_SIZE(r8a7790_mstp_table), .reset_node = "renesas,r8a7790-rst", + .reset_modemr_offset = CPG_RST_MODEMR, .extal_usb_node = "usb_extal", .mod_clk_base = MOD_CLK_BASE, .clk_extal_id = CLK_EXTAL,
drivers/clk/renesas/r8a7791-cpg-mssr.c +1 -0
@@ -265,6 +265,7 @@ static const struct cpg_mssr_info r8a7791_cpg_mssr_info = { .mstp_table = r8a7791_mstp_table, .mstp_table_size = ARRAY_SIZE(r8a7791_mstp_table), .reset_node = "renesas,r8a7791-rst", + .reset_modemr_offset = CPG_RST_MODEMR, .extal_usb_node = "usb_extal", .mod_clk_base = MOD_CLK_BASE, .clk_extal_id = CLK_EXTAL,
drivers/clk/renesas/r8a7792-cpg-mssr.c +1 -0
@@ -213,6 +213,7 @@ static const struct cpg_mssr_info r8a7792_cpg_mssr_info = { .mstp_table = r8a7792_mstp_table, .mstp_table_size = ARRAY_SIZE(r8a7792_mstp_table), .reset_node = "renesas,r8a7792-rst", + .reset_modemr_offset = CPG_RST_MODEMR, .mod_clk_base = MOD_CLK_BASE, .clk_extal_id = CLK_EXTAL, .pll0_div = 2,
drivers/clk/renesas/r8a7794-cpg-mssr.c +1 -0
@@ -240,6 +240,7 @@ static const struct cpg_mssr_info r8a7794_cpg_mssr_info = { .mstp_table = r8a7794_mstp_table, .mstp_table_size = ARRAY_SIZE(r8a7794_mstp_table), .reset_node = "renesas,r8a7794-rst", + .reset_modemr_offset = CPG_RST_MODEMR, .extal_usb_node = "usb_extal", .mod_clk_base = MOD_CLK_BASE, .clk_extal_id = CLK_EXTAL,
drivers/clk/renesas/r8a7795-cpg-mssr.c +1 -0
@@ -362,6 +362,7 @@ static const struct cpg_mssr_info r8a7795_cpg_mssr_info = { .mstp_table = r8a7795_mstp_table, .mstp_table_size = ARRAY_SIZE(r8a7795_mstp_table), .reset_node = "renesas,r8a7795-rst", + .reset_modemr_offset = CPG_RST_MODEMR, .extalr_node = "extalr", .mod_clk_base = MOD_CLK_BASE, .clk_extal_id = CLK_EXTAL,
drivers/clk/renesas/r8a7796-cpg-mssr.c +1 -0
@@ -346,6 +346,7 @@ static const struct cpg_mssr_info r8a7796_cpg_mssr_info = { .mstp_table = r8a7796_mstp_table, .mstp_table_size = ARRAY_SIZE(r8a7796_mstp_table), .reset_node = "renesas,r8a7796-rst", + .reset_modemr_offset = CPG_RST_MODEMR, .extalr_node = "extalr", .mod_clk_base = MOD_CLK_BASE, .clk_extal_id = CLK_EXTAL,
drivers/clk/renesas/r8a77965-cpg-mssr.c +1 -0
@@ -344,6 +344,7 @@ static const struct cpg_mssr_info r8a77965_cpg_mssr_info = { .mstp_table = r8a77965_mstp_table, .mstp_table_size = ARRAY_SIZE(r8a77965_mstp_table), .reset_node = "renesas,r8a77965-rst", + .reset_modemr_offset = CPG_RST_MODEMR, .extalr_node = "extalr", .mod_clk_base = MOD_CLK_BASE, .clk_extal_id = CLK_EXTAL,
drivers/clk/renesas/r8a77970-cpg-mssr.c +1 -0
@@ -211,6 +211,7 @@ static const struct cpg_mssr_info r8a77970_cpg_mssr_info = { .mstp_table = r8a77970_mstp_table, .mstp_table_size = ARRAY_SIZE(r8a77970_mstp_table), .reset_node = "renesas,r8a77970-rst", + .reset_modemr_offset = CPG_RST_MODEMR, .extalr_node = "extalr", .mod_clk_base = MOD_CLK_BASE, .clk_extal_id = CLK_EXTAL,
drivers/clk/renesas/r8a77980-cpg-mssr.c +1 -0
@@ -230,6 +230,7 @@ static const struct cpg_mssr_info r8a77980_cpg_mssr_info = { .mstp_table = r8a77980_mstp_table, .mstp_table_size = ARRAY_SIZE(r8a77980_mstp_table), .reset_node = "renesas,r8a77980-rst", + .reset_modemr_offset = CPG_RST_MODEMR, .extalr_node = "extalr", .mod_clk_base = MOD_CLK_BASE, .clk_extal_id = CLK_EXTAL,
drivers/clk/renesas/r8a77990-cpg-mssr.c +1 -0
@@ -304,6 +304,7 @@ static const struct cpg_mssr_info r8a77990_cpg_mssr_info = { .mstp_table = r8a77990_mstp_table, .mstp_table_size = ARRAY_SIZE(r8a77990_mstp_table), .reset_node = "renesas,r8a77990-rst", + .reset_modemr_offset = CPG_RST_MODEMR, .mod_clk_base = MOD_CLK_BASE, .clk_extal_id = CLK_EXTAL, .clk_extalr_id = ~0,
drivers/clk/renesas/r8a77995-cpg-mssr.c +1 -0
@@ -242,6 +242,7 @@ static const struct cpg_mssr_info r8a77995_cpg_mssr_info = { .mstp_table = r8a77995_mstp_table, .mstp_table_size = ARRAY_SIZE(r8a77995_mstp_table), .reset_node = "renesas,r8a77995-rst", + .reset_modemr_offset = CPG_RST_MODEMR, .mod_clk_base = MOD_CLK_BASE, .clk_extal_id = CLK_EXTAL, .clk_extalr_id = ~0,
drivers/clk/renesas/rcar-gen2-cpg.h +2 -0
@@ -30,6 +30,8 @@ struct rcar_gen2_cpg_pll_config {unsigned int pll0_mult;/* leave as zero if PLL0CR exists */ }; +#define CPG_RST_MODEMR 0x060 +struct gen2_clk_priv {void __iomem *base;struct cpg_mssr_info *info;
drivers/clk/renesas/rcar-gen3-cpg.h +2 -0
@@ -71,6 +71,8 @@ struct rcar_gen3_cpg_pll_config {u8 osc_prediv; }; +#define CPG_RST_MODEMR 0x060 +#define CPG_RPCCKCR 0x238#define CPG_RCKCR 0x240
drivers/clk/renesas/renesas-cpg-mssr.h +1 -0
@@ -22,6 +22,7 @@ struct cpg_mssr_info {const struct mstp_stop_table *mstp_table;unsigned int mstp_table_size;const char *reset_node; +unsigned int reset_modemr_offset;const char *extalr_node;const char *extal_usb_node;unsigned int mod_clk_base;
Signature · 1 line
2.30.2
Lad
PATCH 8/30 clk: renesas: Make reset controller modemr register offset configurable
Hi Marek,
Thank you for the patch.
Quoted 23 lines · Marek Vasut
The MODEMR register offset changed on R8A779A0, make the MODEMR offset configurable. Fill the offset in on all clock drivers. No functional change.
Based off "clk: renesas: Make CPG Reset MODEMR offset accessible from struct
cpg_mssr_info" by Hai Pham <[email protected]>Signed-off-by Marek Vasut <[email protected]>--- drivers/clk/renesas/clk-rcar-gen2.c | 2 -- drivers/clk/renesas/clk-rcar-gen3.c | 4 +--- drivers/clk/renesas/r8a774a1-cpg-mssr.c | 1 + drivers/clk/renesas/r8a774b1-cpg-mssr.c | 1 + drivers/clk/renesas/r8a774c0-cpg-mssr.c | 1 + drivers/clk/renesas/r8a774e1-cpg-mssr.c | 1 + drivers/clk/renesas/r8a7790-cpg-mssr.c | 1 + drivers/clk/renesas/r8a7791-cpg-mssr.c | 1 + drivers/clk/renesas/r8a7792-cpg-mssr.c | 1 + drivers/clk/renesas/r8a7794-cpg-mssr.c | 1 + drivers/clk/renesas/r8a7795-cpg-mssr.c | 1 + drivers/clk/renesas/r8a7796-cpg-mssr.c | 1 + drivers/clk/renesas/r8a77965-cpg-mssr.c | 1 +
Quoted 9 lines
drivers/clk/renesas/r8a77970-cpg-mssr.c | 1 + drivers/clk/renesas/r8a77980-cpg-mssr.c | 1 + drivers/clk/renesas/r8a77990-cpg-mssr.c | 1 + drivers/clk/renesas/r8a77995-cpg-mssr.c | 1 + drivers/clk/renesas/rcar-gen2-cpg.h | 2 ++ drivers/clk/renesas/rcar-gen3-cpg.h | 2 ++ drivers/clk/renesas/renesas-cpg-mssr.h | 1 + 20 files changed, 21 insertions(+), 5 deletions(-)
For RZ/G2{EHMN}
Cheers,
Prabhakar
Quoted 256 lines
drivers/clk/renesas/clk-rcar-gen2.c +0
-2@@ -23,8 +23,6 @@#include "renesas-cpg-mssr.h" #include "rcar-gen2-cpg.h" -#define CPG_RST_MODEMR 0x0060 -#define CPG_PLL0CR 0x00d8#define CPG_SDCKCR 0x0074drivers/clk/renesas/clk-rcar-gen3.c +1
-3@@ -25,8 +25,6 @@#include "renesas-cpg-mssr.h" #include "rcar-gen3-cpg.h" -#define CPG_RST_MODEMR 0x0060 -#define CPG_PLL0CR 0x00d8#define CPG_PLL2CR 0x002c#define CPG_PLL4CR 0x01f4@@ -382,7 +380,7 @@ int gen3_clk_probe(struct udevice *dev)if (rst_base ==FDT_ADDR_T_NONE )return -EINVAL ; - cpg_mode =readl (rst_base +CPG_RST_MODEMR ); + cpg_mode =readl (rst_base + info->reset_modemr_offset); priv->cpg_pll_config = (struct rcar_gen3_cpg_pll_config *)info->get_pll_config (cpg_mode);drivers/clk/renesas/r8a774a1-cpg-mssr.c +1
-0@@ -321,6 +321,7 @@ static const struct cpg_mssr_info r8a774a1_cpg_mssr_info = { .mstp_table = r8a774a1_mstp_table, .mstp_table_size = ARRAY_SIZE(r8a774a1_mstp_table), .reset_node = "renesas,r8a774a1-rst", + .reset_modemr_offset = CPG_RST_MODEMR, .extalr_node = "extalr", .mod_clk_base = MOD_CLK_BASE, .clk_extal_id = CLK_EXTAL,drivers/clk/renesas/r8a774b1-cpg-mssr.c +1
-0@@ -318,6 +318,7 @@ static const struct cpg_mssr_info r8a774b1_cpg_mssr_info = { .mstp_table = r8a774b1_mstp_table, .mstp_table_size = ARRAY_SIZE(r8a774b1_mstp_table), .reset_node = "renesas,r8a774b1-rst", + .reset_modemr_offset = CPG_RST_MODEMR, .extalr_node = "extalr", .mod_clk_base = MOD_CLK_BASE, .clk_extal_id = CLK_EXTAL,drivers/clk/renesas/r8a774c0-cpg-mssr.c +1
-0@@ -292,6 +292,7 @@ const struct cpg_mssr_info r8a774c0_cpg_mssr_info = { .mstp_table = r8a774c0_mstp_table, .mstp_table_size = ARRAY_SIZE(r8a774c0_mstp_table), .reset_node = "renesas,r8a774c0-rst", + .reset_modemr_offset = CPG_RST_MODEMR, .mod_clk_base = MOD_CLK_BASE, .clk_extal_id = CLK_EXTAL, .clk_extalr_id = ~0,drivers/clk/renesas/r8a774e1-cpg-mssr.c +1
-0@@ -332,6 +332,7 @@ static const struct cpg_mssr_info r8a774e1_cpg_mssr_info = { .mstp_table = r8a774e1_mstp_table, .mstp_table_size = ARRAY_SIZE(r8a774e1_mstp_table), .reset_node = "renesas,r8a774e1-rst", + .reset_modemr_offset = CPG_RST_MODEMR, .extalr_node = "extalr", .mod_clk_base = MOD_CLK_BASE, .clk_extal_id = CLK_EXTAL,drivers/clk/renesas/r8a7790-cpg-mssr.c +1
-0@@ -263,6 +263,7 @@ static const struct cpg_mssr_info r8a7790_cpg_mssr_info = { .mstp_table = r8a7790_mstp_table, .mstp_table_size = ARRAY_SIZE(r8a7790_mstp_table), .reset_node = "renesas,r8a7790-rst", + .reset_modemr_offset = CPG_RST_MODEMR, .extal_usb_node = "usb_extal", .mod_clk_base = MOD_CLK_BASE, .clk_extal_id = CLK_EXTAL,drivers/clk/renesas/r8a7791-cpg-mssr.c +1
-0@@ -265,6 +265,7 @@ static const struct cpg_mssr_info r8a7791_cpg_mssr_info = { .mstp_table = r8a7791_mstp_table, .mstp_table_size = ARRAY_SIZE(r8a7791_mstp_table), .reset_node = "renesas,r8a7791-rst", + .reset_modemr_offset = CPG_RST_MODEMR, .extal_usb_node = "usb_extal", .mod_clk_base = MOD_CLK_BASE, .clk_extal_id = CLK_EXTAL,drivers/clk/renesas/r8a7792-cpg-mssr.c +1
-0@@ -213,6 +213,7 @@ static const struct cpg_mssr_info r8a7792_cpg_mssr_info = { .mstp_table = r8a7792_mstp_table, .mstp_table_size = ARRAY_SIZE(r8a7792_mstp_table), .reset_node = "renesas,r8a7792-rst", + .reset_modemr_offset = CPG_RST_MODEMR, .mod_clk_base = MOD_CLK_BASE, .clk_extal_id = CLK_EXTAL, .pll0_div = 2,drivers/clk/renesas/r8a7794-cpg-mssr.c +1
-0@@ -240,6 +240,7 @@ static const struct cpg_mssr_info r8a7794_cpg_mssr_info = { .mstp_table = r8a7794_mstp_table, .mstp_table_size = ARRAY_SIZE(r8a7794_mstp_table), .reset_node = "renesas,r8a7794-rst", + .reset_modemr_offset = CPG_RST_MODEMR, .extal_usb_node = "usb_extal", .mod_clk_base = MOD_CLK_BASE, .clk_extal_id = CLK_EXTAL,drivers/clk/renesas/r8a7795-cpg-mssr.c +1
-0@@ -362,6 +362,7 @@ static const struct cpg_mssr_info r8a7795_cpg_mssr_info = { .mstp_table = r8a7795_mstp_table, .mstp_table_size = ARRAY_SIZE(r8a7795_mstp_table), .reset_node = "renesas,r8a7795-rst", + .reset_modemr_offset = CPG_RST_MODEMR, .extalr_node = "extalr", .mod_clk_base = MOD_CLK_BASE, .clk_extal_id = CLK_EXTAL,drivers/clk/renesas/r8a7796-cpg-mssr.c +1
-0@@ -346,6 +346,7 @@ static const struct cpg_mssr_info r8a7796_cpg_mssr_info = { .mstp_table = r8a7796_mstp_table, .mstp_table_size = ARRAY_SIZE(r8a7796_mstp_table), .reset_node = "renesas,r8a7796-rst", + .reset_modemr_offset = CPG_RST_MODEMR, .extalr_node = "extalr", .mod_clk_base = MOD_CLK_BASE, .clk_extal_id = CLK_EXTAL,drivers/clk/renesas/r8a77965-cpg-mssr.c +1
-0@@ -344,6 +344,7 @@ static const struct cpg_mssr_info r8a77965_cpg_mssr_info = { .mstp_table = r8a77965_mstp_table, .mstp_table_size = ARRAY_SIZE(r8a77965_mstp_table), .reset_node = "renesas,r8a77965-rst", + .reset_modemr_offset = CPG_RST_MODEMR, .extalr_node = "extalr", .mod_clk_base = MOD_CLK_BASE, .clk_extal_id = CLK_EXTAL,drivers/clk/renesas/r8a77970-cpg-mssr.c +1
-0@@ -211,6 +211,7 @@ static const struct cpg_mssr_info r8a77970_cpg_mssr_info = { .mstp_table = r8a77970_mstp_table, .mstp_table_size = ARRAY_SIZE(r8a77970_mstp_table), .reset_node = "renesas,r8a77970-rst", + .reset_modemr_offset = CPG_RST_MODEMR, .extalr_node = "extalr", .mod_clk_base = MOD_CLK_BASE, .clk_extal_id = CLK_EXTAL,drivers/clk/renesas/r8a77980-cpg-mssr.c +1
-0@@ -230,6 +230,7 @@ static const struct cpg_mssr_info r8a77980_cpg_mssr_info = { .mstp_table = r8a77980_mstp_table, .mstp_table_size = ARRAY_SIZE(r8a77980_mstp_table), .reset_node = "renesas,r8a77980-rst", + .reset_modemr_offset = CPG_RST_MODEMR, .extalr_node = "extalr", .mod_clk_base = MOD_CLK_BASE, .clk_extal_id = CLK_EXTAL,drivers/clk/renesas/r8a77990-cpg-mssr.c +1
-0@@ -304,6 +304,7 @@ static const struct cpg_mssr_info r8a77990_cpg_mssr_info = { .mstp_table = r8a77990_mstp_table, .mstp_table_size = ARRAY_SIZE(r8a77990_mstp_table), .reset_node = "renesas,r8a77990-rst", + .reset_modemr_offset = CPG_RST_MODEMR, .mod_clk_base = MOD_CLK_BASE, .clk_extal_id = CLK_EXTAL, .clk_extalr_id = ~0,drivers/clk/renesas/r8a77995-cpg-mssr.c +1
-0@@ -242,6 +242,7 @@ static const struct cpg_mssr_info r8a77995_cpg_mssr_info = { .mstp_table = r8a77995_mstp_table, .mstp_table_size = ARRAY_SIZE(r8a77995_mstp_table), .reset_node = "renesas,r8a77995-rst", + .reset_modemr_offset = CPG_RST_MODEMR, .mod_clk_base = MOD_CLK_BASE, .clk_extal_id = CLK_EXTAL, .clk_extalr_id = ~0,drivers/clk/renesas/rcar-gen2-cpg.h +2
-0@@ -30,6 +30,8 @@ struct rcar_gen2_cpg_pll_config {unsigned int pll0_mult;/* leave as zero if PLL0CR exists */ }; +#define CPG_RST_MODEMR 0x060 +struct gen2_clk_priv {void __iomem *base;struct cpg_mssr_info *info;drivers/clk/renesas/rcar-gen3-cpg.h +2
-0@@ -71,6 +71,8 @@ struct rcar_gen3_cpg_pll_config {u8 osc_prediv; }; +#define CPG_RST_MODEMR 0x060 +#define CPG_RPCCKCR 0x238#define CPG_RCKCR 0x240drivers/clk/renesas/renesas-cpg-mssr.h +1
-1@@ -22,6 +22,7 @@ struct cpg_mssr_info {const struct mstp_stop_table *mstp_table;unsigned int mstp_table_size;const char *reset_node; +unsigned int reset_modemr_offset;const char *extalr_node;const char *extal_usb_node;unsigned int mod_clk_base; --2.30.2
PATCH 9/30 clk: renesas: Pass struct cpg_mssr_info to renesas_clk_endisable()
In reply to Marek VasutFrom: Hai Pham <[email protected]>
CPG IP in some specific Renesas SoCs (i.e. new R8A779A0 V3U SoC) requires a different setting procedure. Make struct cpg_mssr_info accessible to handle the clock setting in that case.
--- drivers/clk/renesas/clk-rcar-gen2.c | 4 ++-- drivers/clk/renesas/clk-rcar-gen3.c | 4 ++-- drivers/clk/renesas/renesas-cpg-mssr.c | 3 ++- drivers/clk/renesas/renesas-cpg-mssr.h | 3 ++- 4 files changed, 8 insertions(+), 6 deletions(-)
drivers/clk/renesas/clk-rcar-gen2.c +2 -2
@@ -61,14 +61,14 @@ static int gen2_clk_enable(struct clk *clk) {struct gen2_clk_priv *priv =dev_get_priv (clk->dev); -return renesas_clk_endisable (clk, priv->base, true); +return renesas_clk_endisable (clk, priv->base, priv->info, true); }static int gen2_clk_disable (struct clk *clk) {struct gen2_clk_priv *priv =dev_get_priv (clk->dev); -return renesas_clk_endisable (clk, priv->base, false); +return renesas_clk_endisable (clk, priv->base, priv->info, false); }static ulong gen2_clk_get_rate (struct clk *clk)
drivers/clk/renesas/clk-rcar-gen3.c +2 -2
@@ -143,14 +143,14 @@ static int gen3_clk_enable(struct clk *clk) {struct gen3_clk_priv *priv =dev_get_priv (clk->dev); -return renesas_clk_endisable (clk, priv->base, true); +return renesas_clk_endisable (clk, priv->base, priv->info, true); }static int gen3_clk_disable (struct clk *clk) {struct gen3_clk_priv *priv =dev_get_priv (clk->dev); -return renesas_clk_endisable (clk, priv->base, false); +return renesas_clk_endisable (clk, priv->base, priv->info, false); }static u64 gen3_clk_get_rate64 (struct clk *clk)
drivers/clk/renesas/renesas-cpg-mssr.c +2 -1
@@ -132,7 +132,8 @@ int renesas_clk_get_parent(struct clk *clk, struct cpg_mssr_info *info,return 0 ; } -int renesas_clk_endisable (struct clk *clk,void __iomem *base,bool enable) +int renesas_clk_endisable (struct clk *clk,void __iomem *base, +struct cpg_mssr_info *info,bool enable) {const unsigned long clkid = clk->id &0xffff ;const unsigned int reg = clkid /100 ;
drivers/clk/renesas/renesas-cpg-mssr.h +2 -1
@@ -115,7 +115,8 @@ int renesas_clk_get_core(struct clk *clk, struct cpg_mssr_info *info, const struct cpg_core_clk **core);int renesas_clk_get_parent (struct clk *clk,struct cpg_mssr_info *info,struct clk *parent); -int renesas_clk_endisable (struct clk *clk,void __iomem *base,bool enable); +int renesas_clk_endisable (struct clk *clk,void __iomem *base, +struct cpg_mssr_info *info,bool enable);int renesas_clk_remove (void __iomem *base,struct cpg_mssr_info *info);#endif /* __DRIVERS_CLK_RENESAS_CPG_MSSR__ */
Signature · 1 line
2.30.2
PATCH 10/30 clk: renesas: Introduce enum clk_reg_layout
In reply to Marek VasutFrom: Hai Pham <[email protected]>
From Linux v5.10-rc2, commit ffbf9cf3f946 by Yoshihiro Shimoda Introduce enum clk_reg_layout to support multiple register layout variants
--- drivers/clk/renesas/renesas-cpg-mssr.h | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/clk/renesas/renesas-cpg-mssr.h +6 -0
@@ -14,9 +14,15 @@#define __DRIVERS_CLK_RENESAS_CPG_MSSR__#include <linux/bitops.h> + +enum clk_reg_layout { +CLK_REG_LAYOUT_RCAR_GEN2_AND_GEN3 =0 , +}; +struct cpg_mssr_info {const struct cpg_core_clk *core_clk;unsigned int core_clk_size; +enum clk_reg_layout reg_layout;const struct mssr_mod_clk *mod_clk;unsigned int mod_clk_size;const struct mstp_stop_table *mstp_table;
Signature · 1 line
2.30.2
PATCH 11/30 clk: renesas: Add register pointers into struct cpg_mssr_info
In reply to Marek VasutFrom: Hai Pham <[email protected]>
Base on Linux v5.10-rc2, commit 8b652aa8a1fb by Yoshihiro Shimoda To support other register layouts in the future, add register pointers of {control,status,reset,reset_clear}_regs into struct cpg_mssr_info
--- drivers/clk/renesas/clk-rcar-gen3.c | 9 +++++ drivers/clk/renesas/renesas-cpg-mssr.c | 49 ++---------------------- drivers/clk/renesas/renesas-cpg-mssr.h | 52 ++++++++++++++++++++++++++ 3 files changed, 65 insertions(+), 45 deletions(-)
drivers/clk/renesas/clk-rcar-gen3.c +9 -0
@@ -389,6 +389,15 @@ int gen3_clk_probe(struct udevice *dev) priv->sscg = !(cpg_mode &BIT (12 )); +if (info->reg_layout ==CLK_REG_LAYOUT_RCAR_GEN2_AND_GEN3 ) { + priv->info->status_regs = mstpsr; + priv->info->control_regs = smstpcr; + priv->info->reset_regs = srcr; + priv->info->reset_clear_regs = srstclr; + }else { +return -EINVAL ; + } + ret =clk_get_by_name (dev,"extal" , &priv->clk_extal);if (ret <0 )return ret;
drivers/clk/renesas/renesas-cpg-mssr.c +4 -45
69 lines not on this page · raw message
drivers/clk/renesas/renesas-cpg-mssr.h +52 -0
62 lines not on this page · raw message
Signature · 1 line
2.30.2
Lad
PATCH 11/30 clk: renesas: Add register pointers into struct cpg_mssr_info
Hi Marek,
Thank you for the patch.
Quoted 7 lines · Marek Vasut
From: Hai Pham <[email protected]>
Base on Linux v5.10-rc2, commit
8b652aa8a1fbby Yoshihiro Shimoda To support other register layouts in the future, add register pointers of {control,status,reset,reset_clear}_regs into structcpg_mssr_info
Quoted 8 lines
Signed-off-by Hai Pham <[email protected]>Signed-off-by Marek Vasut <[email protected]>--- drivers/clk/renesas/clk-rcar-gen3.c | 9 +++++ drivers/clk/renesas/renesas-cpg-mssr.c | 49 ++---------------------- drivers/clk/renesas/renesas-cpg-mssr.h | 52 ++++++++++++++++++++++++++ 3 files changed, 65 insertions(+), 45 deletions(-)
Tested on RZ/G2{EHMN} board
Cheers,
Prabhaka
Quoted 167 lines
drivers/clk/renesas/clk-rcar-gen3.c +9
-0@@ -389,6 +389,15 @@ int gen3_clk_probe(struct udevice *dev) priv->sscg = !(cpg_mode &BIT (12 )); +if (info->reg_layout ==CLK_REG_LAYOUT_RCAR_GEN2_AND_GEN3 ) { + priv->info->status_regs = mstpsr; + priv->info->control_regs = smstpcr; + priv->info->reset_regs = srcr; + priv->info->reset_clear_regs = srstclr; + }else { +return -EINVAL ; + } + ret =clk_get_by_name (dev,"extal" , &priv->clk_extal);if (ret <0 )return ret;drivers/clk/renesas/renesas-cpg-mssr.c +4
-45@@ -22,47 +22,6 @@#include "renesas-cpg-mssr.h" -/* -* Module Standby and Software Reset register offets. -* -* If the registers exist, these are valid for SH-Mobile, R-Mobile, -* R-Car Gen2, R-Car Gen3, and RZ/G1. -* These are NOT valid for R-Car Gen1 and RZ/A1! -*/ - -/* -* Module Stop Status Register offsets -*/ - -static const u16 mstpsr[] = { -0x030 ,0x038 ,0x040 ,0x048 ,0x04C ,0x03C ,0x1C0 ,0x1C4 , -0x9A0 ,0x9A4 ,0x9A8 ,0x9AC , -}; - -#define MSTPSR (i) mstpsr[i] - - -/* -* System Module Stop Control Register offsets -*/ - -static const u16 smstpcr[] = { -0x130 ,0x134 ,0x138 ,0x13C ,0x140 ,0x144 ,0x148 ,0x14C , -0x990 ,0x994 ,0x998 ,0x99C , -}; - -#define SMSTPCR (i) smstpcr[i] - - -/* Realtime Module Stop Control Register offsets */ -#define RMSTPCR (i) ((i) < 8 ? smstpcr[i] - 0x20 : smstpcr[i] - 0x10) - -/* Modem Module Stop Control Register offsets (r8a73a4) */ -#define MMSTPCR (i) (smstpcr[i] + 0x20) - -/* Software Reset Clearing Register offsets */ -#define SRSTCLR (i) (0x940 + (i) * 4) -bool renesas_clk_is_mod (struct clk *clk) {return (clk->id >>16 ) ==CPG_MOD ;@@ -147,11 +106,11 @@ int renesas_clk_endisable(struct clk *clk, void __iomem *base, clkid, reg, bit, enable ? "ON" : "OFF");if (enable) { -clrbits_le32 (base +SMSTPCR (reg), bitmask); -return wait_for_bit_le32 (base +MSTPSR (reg), +clrbits_le32 (base + info->control_regs[reg], bitmask); +return wait_for_bit_le32 (base + info->status_regs[reg], bitmask,0 ,100 ,0 ); }else { -setbits_le32 (base +SMSTPCR (reg), bitmask); +setbits_le32 (base + info->control_regs[reg], bitmask);return 0 ; } }@@ -165,7 +124,7 @@ int renesas_clk_remove(void __iomem *base, struct cpg_mssr_info *info)/* Stop module clock */ for (i =0 ; i < info->mstp_table_size; i++) { -clrsetbits_le32 (base +SMSTPCR (i), +clrsetbits_le32 (base + info->control_regs[i], info->mstp_table[i].sdis, info->mstp_table[i].sen); clrsetbits_le32(base + RMSTPCR(i),drivers/clk/renesas/renesas-cpg-mssr.h +52
-1@@ -37,6 +37,10 @@ struct cpg_mssr_info {unsigned int clk_extal_usb_id;unsigned int pll0_div;const void *(*get_pll_config)(const u32 cpg_mode); +const u16 *status_regs; +const u16 *control_regs; +const u16 *reset_regs; +const u16 *reset_clear_regs; };/* @@ -125,4 +129,52 @@ int renesas_clk_endisable(struct clk *clk, void __iomem *base, struct cpg_mssr_info *info, bool enable);int renesas_clk_remove (void __iomem *base,struct cpg_mssr_info *info); +/* +* Module Standby and Software Reset register offets. +* +* If the registers exist, these are valid for SH-Mobile, R-Mobile, +* R-Car Gen2, R-Car Gen3, and RZ/G1. +* These are NOT valid for R-Car Gen1 and RZ/A1! +*/ + +/* +* Module Stop Status Register offsets +*/ + +static const u16 mstpsr[] = { +0x030 ,0x038 ,0x040 ,0x048 ,0x04C ,0x03C ,0x1C0 ,0x1C4 , +0x9A0 ,0x9A4 ,0x9A8 ,0x9AC , +}; + +/* +* System Module Stop Control Register offsets +*/ + +static const u16 smstpcr[] = { +0x130 ,0x134 ,0x138 ,0x13C ,0x140 ,0x144 ,0x148 ,0x14C , +0x990 ,0x994 ,0x998 ,0x99C , +}; + +/* +* Software Reset Register offsets +*/ + +static const u16 srcr[] = { +0x0A0 ,0x0A8 ,0x0B0 ,0x0B8 ,0x0BC ,0x0C4 ,0x1C8 ,0x1CC , +0x920 ,0x924 ,0x928 ,0x92C , +}; + +/* Realtime Module Stop Control Register offsets */ +#define RMSTPCR (i) ((i) < 8 ? smstpcr[i] - 0x20 : smstpcr[i] - 0x10) + +/* Modem Module Stop Control Register offsets (r8a73a4) */ +#define MMSTPCR (i) (smstpcr[i] + 0x20) + +/* Software Reset Clearing Register offsets */ + +static const u16 srstclr[] = { +0x940 ,0x944 ,0x948 ,0x94C ,0x950 ,0x954 ,0x958 ,0x95C , +0x960 ,0x964 ,0x968 ,0x96C , +}; +#endif /* __DRIVERS_CLK_RENESAS_CPG_MSSR__ */ --2.30.2
PATCH 12/30 clk: renesas: Deduplicate gen3_clk_get_rate64() PLL handling
In reply to Marek VasutMost of the PLLx, MAIN, FIXED clock handlers are calling very similar code, which determines parent rate and then applies multiplication and division. The only difference is whether multiplication is fixed factor or coming from CRx register. Deduplicate the code into a single function.
--- drivers/clk/renesas/clk-rcar-gen3.c | 86 ++++++++++++++--------------- 1 file changed, 43 insertions(+), 43 deletions(-)
drivers/clk/renesas/clk-rcar-gen3.c +43 -43
@@ -153,6 +153,30 @@ static int gen3_clk_disable(struct clk *clk)return renesas_clk_endisable (clk, priv->base, priv->info, false); } +static u64 gen3_clk_get_rate64 (struct clk *clk); + +static u64 gen3_clk_get_rate64_pll_mul_reg (struct gen3_clk_priv *priv, +struct clk *parent, +const struct cpg_core_clk *core, +u32 mul_reg,u32 mult,u32 div, +char *name) +{ +u32 value; +u64 rate; + +if (mul_reg) { + value =readl (priv->base + mul_reg); + mult = (((value >>24 ) &0x7f ) +1 ) *2 ; + div =1 ; + } + + rate = (gen3_clk_get_rate64 (parent) * mult) / div; + +debug ("%s[%i] %s clk: parent=%i mult=%u div=%u => rate=%llu\n" , + __func__, __LINE__, name, core->parent, mult, div, rate); +return rate; +} +static u64 gen3_clk_get_rate64 (struct clk *clk) {struct gen3_clk_priv *priv =dev_get_priv (clk->dev);
@@ -161,7 +185,7 @@ static u64 gen3_clk_get_rate64(struct clk *clk)const struct cpg_core_clk *core;const struct rcar_gen3_cpg_pll_config *pll_config = priv->cpg_pll_config; -u32 value, mult, div, prediv, postdiv; +u32 value, div, prediv, postdiv;u64 rate =0 ;int i, ret;
@@ -203,60 +227,36 @@ static u64 gen3_clk_get_rate64(struct clk *clk)return -EINVAL ;case CLK_TYPE_GEN3_MAIN : - rate =gen3_clk_get_rate64 (&parent) / pll_config->extal_div; -debug ("%s[%i] MAIN clk: parent=%i extal_div=%i => rate=%llu\n" , - __func__, __LINE__, - core->parent, pll_config->extal_div, rate); -return rate; +return gen3_clk_get_rate64_pll_mul_reg (priv, &parent, core, +0 ,1 , pll_config->extal_div, +"MAIN" );case CLK_TYPE_GEN3_PLL0 : - value =readl (priv->base +CPG_PLL0CR ); - mult = (((value >>24 ) &0x7f ) +1 ) *2 ; - rate =gen3_clk_get_rate64 (&parent) * mult; -debug ("%s[%i] PLL0 clk: parent=%i mult=%u => rate=%llu\n" , - __func__, __LINE__, core->parent, mult, rate); -return rate; +return gen3_clk_get_rate64_pll_mul_reg (priv, &parent, core, +CPG_PLL0CR ,0 ,0 ,"PLL0" );case CLK_TYPE_GEN3_PLL1 : - rate =gen3_clk_get_rate64 (&parent) * pll_config->pll1_mult; - rate /= pll_config->pll1_div; -debug ("%s[%i] PLL1 clk: parent=%i mul=%i div=%i => rate=%llu\n" , - __func__, __LINE__, - core->parent, pll_config->pll1_mult, - pll_config->pll1_div, rate); -return rate; +return gen3_clk_get_rate64_pll_mul_reg (priv, &parent, core, +0 , pll_config->pll1_mult, + pll_config->pll1_div,"PLL1" );case CLK_TYPE_GEN3_PLL2 : - value =readl (priv->base +CPG_PLL2CR ); - mult = (((value >>24 ) &0x7f ) +1 ) *2 ; - rate =gen3_clk_get_rate64 (&parent) * mult; -debug ("%s[%i] PLL2 clk: parent=%i mult=%u => rate=%llu\n" , - __func__, __LINE__, core->parent, mult, rate); -return rate; +return gen3_clk_get_rate64_pll_mul_reg (priv, &parent, core, +CPG_PLL2CR ,0 ,0 ,"PLL2" );case CLK_TYPE_GEN3_PLL3 : - rate =gen3_clk_get_rate64 (&parent) * pll_config->pll3_mult; - rate /= pll_config->pll3_div; -debug ("%s[%i] PLL3 clk: parent=%i mul=%i div=%i => rate=%llu\n" , - __func__, __LINE__, - core->parent, pll_config->pll3_mult, - pll_config->pll3_div, rate); -return rate; +return gen3_clk_get_rate64_pll_mul_reg (priv, &parent, core, +0 , pll_config->pll3_mult, + pll_config->pll3_div,"PLL3" );case CLK_TYPE_GEN3_PLL4 : - value =readl (priv->base +CPG_PLL4CR ); - mult = (((value >>24 ) &0x7f ) +1 ) *2 ; - rate =gen3_clk_get_rate64 (&parent) * mult; -debug ("%s[%i] PLL4 clk: parent=%i mult=%u => rate=%llu\n" , - __func__, __LINE__, core->parent, mult, rate); -return rate; +return gen3_clk_get_rate64_pll_mul_reg (priv, &parent, core, +CPG_PLL4CR ,0 ,0 ,"PLL4" );case CLK_TYPE_FF : - rate = (gen3_clk_get_rate64 (&parent) * core->mult) / core->div; -debug ("%s[%i] FIXED clk: parent=%i mul=%i div=%i => rate=%llu\n" , - __func__, __LINE__, - core->parent, core->mult, core->div, rate); -return rate; +return gen3_clk_get_rate64_pll_mul_reg (priv, &parent, core, +0 , core->mult, core->div, +"FIXED" );case CLK_TYPE_GEN3_MDSEL : div = (core->div >> (priv->sscg ?16 :0 )) &0xffff ;
Signature · 1 line
2.30.2
Lad
PATCH 12/30 clk: renesas: Deduplicate gen3_clk_get_rate64() PLL handling
Hi Marek,
Thank you for the patch.
Quoted 11 lines · Marek Vasut
Most of the PLLx, MAIN, FIXED clock handlers are calling very similar code, which determines parent rate and then applies multiplication and division. The only difference is whether multiplication is fixed factor or coming from CRx register. Deduplicate the code into a single function.
Signed-off-by Marek Vasut <[email protected]>--- drivers/clk/renesas/clk-rcar-gen3.c | 86 ++++++++++++++--------------- 1 file changed, 43 insertions(+), 43 deletions(-)
Tested on RZ/G2{EHMN} boards
Cheers,
Prabhakar
Quoted 126 lines
drivers/clk/renesas/clk-rcar-gen3.c +43
-44@@ -153,6 +153,30 @@ static int gen3_clk_disable(struct clk *clk)return renesas_clk_endisable (clk, priv->base, priv->info, false); } +static u64 gen3_clk_get_rate64 (struct clk *clk); + +static u64 gen3_clk_get_rate64_pll_mul_reg (struct gen3_clk_priv *priv, +struct clk *parent, +const struct cpg_core_clk *core, +u32 mul_reg,u32 mult,u32 div, +char *name) +{ +u32 value; +u64 rate; + +if (mul_reg) { + value =readl (priv->base + mul_reg); + mult = (((value >>24 ) &0x7f ) +1 ) *2 ; + div =1 ; + } + + rate = (gen3_clk_get_rate64 (parent) * mult) / div; + +debug ("%s[%i] %s clk: parent=%i mult=%u div=%u => rate=%llu\n" , + __func__, __LINE__, name, core->parent, mult, div, rate); +return rate; +} +static u64 gen3_clk_get_rate64 (struct clk *clk) {struct gen3_clk_priv *priv =dev_get_priv (clk->dev);@@ -161,7 +185,7 @@ static u64 gen3_clk_get_rate64(struct clk *clk)const struct cpg_core_clk *core;const struct rcar_gen3_cpg_pll_config *pll_config = priv->cpg_pll_config; -u32 value, mult, div, prediv, postdiv; +u32 value, div, prediv, postdiv;u64 rate =0 ;int i, ret;@@ -203,60 +227,36 @@ static u64 gen3_clk_get_rate64(struct clk *clk)return -EINVAL ;case CLK_TYPE_GEN3_MAIN : - rate =gen3_clk_get_rate64 (&parent) / pll_config->extal_div; -debug ("%s[%i] MAIN clk: parent=%i extal_div=%i => rate=%llu\n" , - __func__, __LINE__, - core->parent, pll_config->extal_div, rate); -return rate; +return gen3_clk_get_rate64_pll_mul_reg (priv, &parent, core, +0 ,1 , pll_config->extal_div, +"MAIN" );case CLK_TYPE_GEN3_PLL0 : - value =readl (priv->base +CPG_PLL0CR ); - mult = (((value >>24 ) &0x7f ) +1 ) *2 ; - rate =gen3_clk_get_rate64 (&parent) * mult; -debug ("%s[%i] PLL0 clk: parent=%i mult=%u => rate=%llu\n" , - __func__, __LINE__, core->parent, mult, rate); -return rate; +return gen3_clk_get_rate64_pll_mul_reg (priv, &parent, core, +CPG_PLL0CR ,0 ,0 ,"PLL0" );case CLK_TYPE_GEN3_PLL1 : - rate =gen3_clk_get_rate64 (&parent) * pll_config->pll1_mult; - rate /= pll_config->pll1_div; -debug ("%s[%i] PLL1 clk: parent=%i mul=%i div=%i => rate=%llu\n" , - __func__, __LINE__, - core->parent, pll_config->pll1_mult, - pll_config->pll1_div, rate); -return rate; +return gen3_clk_get_rate64_pll_mul_reg (priv, &parent, core, +0 , pll_config->pll1_mult, + pll_config->pll1_div,"PLL1" );case CLK_TYPE_GEN3_PLL2 : - value =readl (priv->base +CPG_PLL2CR ); - mult = (((value >>24 ) &0x7f ) +1 ) *2 ; - rate =gen3_clk_get_rate64 (&parent) * mult; -debug ("%s[%i] PLL2 clk: parent=%i mult=%u => rate=%llu\n" , - __func__, __LINE__, core->parent, mult, rate); -return rate; +return gen3_clk_get_rate64_pll_mul_reg (priv, &parent, core, +CPG_PLL2CR ,0 ,0 ,"PLL2" );case CLK_TYPE_GEN3_PLL3 : - rate =gen3_clk_get_rate64 (&parent) * pll_config->pll3_mult; - rate /= pll_config->pll3_div; -debug ("%s[%i] PLL3 clk: parent=%i mul=%i div=%i => rate=%llu\n" , - __func__, __LINE__, - core->parent, pll_config->pll3_mult, - pll_config->pll3_div, rate); -return rate; +return gen3_clk_get_rate64_pll_mul_reg (priv, &parent, core, +0 , pll_config->pll3_mult, + pll_config->pll3_div,"PLL3" );case CLK_TYPE_GEN3_PLL4 : - value =readl (priv->base +CPG_PLL4CR ); - mult = (((value >>24 ) &0x7f ) +1 ) *2 ; - rate =gen3_clk_get_rate64 (&parent) * mult; -debug ("%s[%i] PLL4 clk: parent=%i mult=%u => rate=%llu\n" , - __func__, __LINE__, core->parent, mult, rate); -return rate; +return gen3_clk_get_rate64_pll_mul_reg (priv, &parent, core, +CPG_PLL4CR ,0 ,0 ,"PLL4" );case CLK_TYPE_FF : - rate = (gen3_clk_get_rate64 (&parent) * core->mult) / core->div; -debug ("%s[%i] FIXED clk: parent=%i mul=%i div=%i => rate=%llu\n" , - __func__, __LINE__, - core->parent, core->mult, core->div, rate); -return rate; +return gen3_clk_get_rate64_pll_mul_reg (priv, &parent, core, +0 , core->mult, core->div, +"FIXED" );case CLK_TYPE_GEN3_MDSEL : div = (core->div >> (priv->sscg ?16 :0 )) &0xffff ; --2.30.2
PATCH 13/30 clk: renesas: Handle R8A779A0 V3U clock types in Gen3 clock code
In reply to Marek VasutOn R8A779A0 V3U SoC, PLL1 and PLL5 use a divider value from cpg_pll_configs table while PLL{20,21,30,31,4} use different control offset. Introduce new types to handle this and handle those types in the Gen3 clock code.
Based on "clk: renesas: Add support for R8A779A0 V3U PLLn" by Hai Pham <[email protected]>
--- drivers/clk/renesas/clk-rcar-gen3.c | 24 ++++++++++++++++++++++++ drivers/clk/renesas/rcar-gen3-cpg.h | 9 +++++++++ 2 files changed, 33 insertions(+)
drivers/clk/renesas/clk-rcar-gen3.c +24 -0
@@ -253,6 +253,28 @@ static u64 gen3_clk_get_rate64(struct clk *clk)return gen3_clk_get_rate64_pll_mul_reg (priv, &parent, core,CPG_PLL4CR ,0 ,0 ,"PLL4" ); +case CLK_TYPE_R8A779A0_MAIN : +return gen3_clk_get_rate64_pll_mul_reg (priv, &parent, core, +0 ,1 , pll_config->extal_div, +"V3U_MAIN" ); + +case CLK_TYPE_R8A779A0_PLL1 : +return gen3_clk_get_rate64_pll_mul_reg (priv, &parent, core, +0 , pll_config->pll1_mult, + pll_config->pll1_div, +"V3U_PLL1" ); + +case CLK_TYPE_R8A779A0_PLL2X_3X : +return gen3_clk_get_rate64_pll_mul_reg (priv, &parent, core, + core->offset,0 ,0 , +"V3U_PLL2X_3X" ); + +case CLK_TYPE_R8A779A0_PLL5 : +return gen3_clk_get_rate64_pll_mul_reg (priv, &parent, core, +0 , pll_config->pll5_mult, + pll_config->pll5_div, +"V3U_PLL5" ); +case CLK_TYPE_FF : return gen3_clk_get_rate64_pll_mul_reg(priv, &parent, core, 0, core->mult, core->div,
@@ -268,6 +290,8 @@ static u64 gen3_clk_get_rate64(struct clk *clk)return rate;case CLK_TYPE_GEN3_SD :/* FIXME */ + fallthrough; +case CLK_TYPE_R8A779A0_SD : value =readl (priv->base + core->offset); value &=CPG_SD_STP_MASK |CPG_SD_FC_MASK ;
drivers/clk/renesas/rcar-gen3-cpg.h +9 -0
@@ -27,6 +27,13 @@ enum rcar_gen3_clk_types {CLK_TYPE_GEN3_E3_RPCSRC ,CLK_TYPE_GEN3_RPC ,CLK_TYPE_GEN3_RPCD2 , +CLK_TYPE_R8A779A0_MAIN , +CLK_TYPE_R8A779A0_PLL1 , +CLK_TYPE_R8A779A0_PLL2X_3X ,/* PLL[23][01] */ +CLK_TYPE_R8A779A0_PLL5 , +CLK_TYPE_R8A779A0_SD , +CLK_TYPE_R8A779A0_MDSEL ,/* Select parent/divider using mode pin */ +CLK_TYPE_R8A779A0_OSC ,/* OSC EXTAL predivider and fixed divider */ /* SoC specific definitions start here */ CLK_TYPE_GEN3_SOC_BASE,
@@ -69,6 +76,8 @@ struct rcar_gen3_cpg_pll_config {u8 pll3_mult;u8 pll3_div;u8 osc_prediv; +u8 pll5_mult; +u8 pll5_div; };#define CPG_RST_MODEMR 0x060
Signature · 1 line
2.30.2
PATCH 14/30 clk: renesas: Add R8A779A0 clock tables
In reply to Marek VasutFrom: Hai Pham <[email protected]>
Add clock tables for R8A779A0 V3U SoC from Linux 5.12, commit 9f4ad9e425a1 ("Linux 5.12")
--
Marek: - Add .reset_modemr_offset
- Sync tables from Linux 5.12
- Rebase on latest u-boot
--- drivers/clk/renesas/Kconfig | 6 + drivers/clk/renesas/Makefile | 1 + drivers/clk/renesas/clk-rcar-gen3.c | 5 + drivers/clk/renesas/r8a779a0-cpg-mssr.c | 300 ++++++++++++++++++++++++ drivers/clk/renesas/rcar-gen3-cpg.h | 1 + drivers/clk/renesas/renesas-cpg-mssr.c | 4 + drivers/clk/renesas/renesas-cpg-mssr.h | 21 ++ 7 files changed, 338 insertions(+) create mode 100644 drivers/clk/renesas/r8a779a0-cpg-mssr.c
drivers/clk/renesas/Kconfig +6 -0
@@ -114,3 +114,9 @@ config CLK_R8A77995 depends on CLK_RCAR_GEN3 help Enable this to support the clocks on Renesas R8A77995 SoC. + +config CLK_R8A779A0 + bool "Renesas R8A779A0 clock driver" + depends on CLK_RCAR_GEN3 + help + Enable this to support the clocks on Renesas R8A779A0 SoC.
drivers/clk/renesas/Makefile +1 -0
@@ -17,3 +17,4 @@ obj-$(CONFIG_CLK_R8A77970) += r8a77970-cpg-mssr.o obj-$(CONFIG_CLK_R8A77980) += r8a77980-cpg-mssr.o obj-$(CONFIG_CLK_R8A77990) += r8a77990-cpg-mssr.o obj-$(CONFIG_CLK_R8A77995) += r8a77995-cpg-mssr.o +obj-$(CONFIG_CLK_R8A779A0) += r8a779a0-cpg-mssr.o
drivers/clk/renesas/clk-rcar-gen3.c +5 -0
@@ -418,6 +418,11 @@ int gen3_clk_probe(struct udevice *dev) priv->info->control_regs = smstpcr; priv->info->reset_regs = srcr; priv->info->reset_clear_regs = srstclr; + }else if (info->reg_layout ==CLK_REG_LAYOUT_RCAR_V3U ) { + priv->info->status_regs = mstpsr_for_v3u; + priv->info->control_regs = mstpcr_for_v3u; + priv->info->reset_regs = srcr_for_v3u; + priv->info->reset_clear_regs = srstclr_for_v3u; }else {return -EINVAL ; }
drivers/clk/renesas/r8a779a0-cpg-mssr.c new file +300 -0
300 lines not on this page · raw message
drivers/clk/renesas/rcar-gen3-cpg.h +1 -0
@@ -27,6 +27,7 @@ enum rcar_gen3_clk_types {CLK_TYPE_GEN3_E3_RPCSRC ,CLK_TYPE_GEN3_RPC ,CLK_TYPE_GEN3_RPCD2 , +CLK_TYPE_R8A779A0_MAIN ,CLK_TYPE_R8A779A0_PLL1 , CLK_TYPE_R8A779A0_PLL2X_3X, /* PLL[23][01] */
drivers/clk/renesas/renesas-cpg-mssr.c +4 -0
@@ -127,6 +127,10 @@ int renesas_clk_remove(void __iomem *base, struct cpg_mssr_info *info)clrsetbits_le32 (base + info->control_regs[i], info->mstp_table[i].sdis, info->mstp_table[i].sen); + +if (info->reg_layout ==CLK_REG_LAYOUT_RCAR_V3U ) +continue ; +clrsetbits_le32 (base +RMSTPCR (i), info->mstp_table[i].rdis, info->mstp_table[i].ren);
drivers/clk/renesas/renesas-cpg-mssr.h +21 -0
@@ -17,6 +17,7 @@enum clk_reg_layout {CLK_REG_LAYOUT_RCAR_GEN2_AND_GEN3 =0 , +CLK_REG_LAYOUT_RCAR_V3U , };struct cpg_mssr_info {
@@ -146,6 +147,11 @@ static const u16 mstpsr[] = { 0x9A0, 0x9A4, 0x9A8, 0x9AC, }; +static const u16 mstpsr_for_v3u[] = { +0x2E00 ,0x2E04 ,0x2E08 ,0x2E0C ,0x2E10 ,0x2E14 ,0x2E18 ,0x2E1C , +0x2E20 ,0x2E24 ,0x2E28 ,0x2E2C ,0x2E30 ,0x2E34 ,0x2E38 , +}; +/* * System Module Stop Control Register offsets */
@@ -155,6 +161,11 @@ static const u16 smstpcr[] = { 0x990, 0x994, 0x998, 0x99C, }; +static const u16 mstpcr_for_v3u[] = { +0x2D00 ,0x2D04 ,0x2D08 ,0x2D0C ,0x2D10 ,0x2D14 ,0x2D18 ,0x2D1C , +0x2D20 ,0x2D24 ,0x2D28 ,0x2D2C ,0x2D30 ,0x2D34 ,0x2D38 , +}; +/* * Software Reset Register offsets */
@@ -164,6 +175,11 @@ static const u16 srcr[] = { 0x920, 0x924, 0x928, 0x92C, }; +static const u16 srcr_for_v3u[] = { +0x2C00 ,0x2C04 ,0x2C08 ,0x2C0C ,0x2C10 ,0x2C14 ,0x2C18 ,0x2C1C , +0x2C20 ,0x2C24 ,0x2C28 ,0x2C2C ,0x2C30 ,0x2C34 ,0x2C38 , +}; +/* Realtime Module Stop Control Register offsets */ #define RMSTPCR (i) ((i) < 8 ? smstpcr[i] - 0x20 : smstpcr[i] - 0x10)
@@ -177,4 +193,9 @@ static const u16 srstclr[] = { 0x960, 0x964, 0x968, 0x96C, }; +static const u16 srstclr_for_v3u[] = { +0x2C80 ,0x2C84 ,0x2C88 ,0x2C8C ,0x2C90 ,0x2C94 ,0x2C98 ,0x2C9C , +0x2CA0 ,0x2CA4 ,0x2CA8 ,0x2CAC ,0x2CB0 ,0x2CB4 ,0x2CB8 , +}; +#endif /* __DRIVERS_CLK_RENESAS_CPG_MSSR__ */
Signature · 1 line
2.30.2
PATCH 15/30 gpio: renesas: Pass struct udevice to rcar_gpio_set_direction()
In reply to Marek VasutPass struct udevice to rcar_gpio_set_direction() in preparation of quirk handling in rcar_gpio_set_direction(). No functional change.
--- drivers/gpio/gpio-rcar.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)
drivers/gpio/gpio-rcar.c +6 -7
@@ -66,9 +66,12 @@ static int rcar_gpio_set_value(struct udevice *dev, unsigned offset,return 0 ; } -static void rcar_gpio_set_direction (void __iomem *regs,unsigned offset, +static void rcar_gpio_set_direction (struct udevice *dev,unsigned offset,bool output) { +struct rcar_gpio_priv *priv =dev_get_priv (dev); +void __iomem *regs = priv->regs; +/* * follow steps in the GPIO documentation for * "Setting General Output Mode" and
@@ -90,9 +93,7 @@ static void rcar_gpio_set_direction(void __iomem *regs, unsigned offset,static int rcar_gpio_direction_input (struct udevice *dev,unsigned offset) { -struct rcar_gpio_priv *priv =dev_get_priv (dev); - -rcar_gpio_set_direction (priv->regs, offset, false); +rcar_gpio_set_direction (dev, offset, false);return 0 ; }
@@ -100,11 +101,9 @@ static int rcar_gpio_direction_input(struct udevice *dev, unsigned offset)static int rcar_gpio_direction_output (struct udevice *dev,unsigned offset,int value) { -struct rcar_gpio_priv *priv =dev_get_priv (dev); -/* write GPIO value to output before selecting output mode of pin */ rcar_gpio_set_value (dev, offset, value); -rcar_gpio_set_direction (priv->regs, offset, true); +rcar_gpio_set_direction (dev, offset, true);return 0 ; }
Signature · 1 line
2.30.2
Lad
PATCH 15/30 gpio: renesas: Pass struct udevice to rcar_gpio_set_direction()
Hi Marek,
Thank you for the patch.
Quoted 9 lines · Marek Vasut
Pass struct udevice to
rcar_gpio_set_direction()in preparation of quirk handling inrcar_gpio_set_direction(). No functional change.Signed-off-by Marek Vasut <[email protected]>--- drivers/gpio/gpio-rcar.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)
Tested on RZ/G2{EHMN} boards
Cheers,
Prabhakar
Quoted 45 lines
drivers/gpio/gpio-rcar.c +6
-8@@ -66,9 +66,12 @@ static int rcar_gpio_set_value(struct udevice *dev, unsigned offset,return 0 ; } -static void rcar_gpio_set_direction (void __iomem *regs,unsigned offset, +static void rcar_gpio_set_direction (struct udevice *dev,unsigned offset,bool output) { +struct rcar_gpio_priv *priv =dev_get_priv (dev); +void __iomem *regs = priv->regs; +/* * follow steps in the GPIO documentation for * "Setting General Output Mode" and @@ -90,9 +93,7 @@ static void rcar_gpio_set_direction(void __iomem *regs, unsigned offset,static int rcar_gpio_direction_input (struct udevice *dev,unsigned offset) { -struct rcar_gpio_priv *priv =dev_get_priv (dev); - -rcar_gpio_set_direction (priv->regs, offset, false); +rcar_gpio_set_direction (dev, offset, false);return 0 ; }@@ -100,11 +101,9 @@ static int rcar_gpio_direction_input(struct udevice *dev, unsigned offset)static int rcar_gpio_direction_output (struct udevice *dev,unsigned offset,int value) { -struct rcar_gpio_priv *priv =dev_get_priv (dev); -/* write GPIO value to output before selecting output mode of pin */ rcar_gpio_set_value (dev, offset, value); -rcar_gpio_set_direction (priv->regs, offset, true); +rcar_gpio_set_direction (dev, offset, true);return 0 ; } --2.30.2
PATCH 16/30 gpio: renesas: Handle R8A779A0 V3U INEN register
In reply to Marek VasutThe R8A779A0 V3U GPIO block has additional "General Input Enable" INEN register. Add new R8A779A0 compatible string with a new quirk and also a handler for this quirk which toggles the INEN register in the right place. INEN register handling is based on "gpio: renesas: Add R8A779A0 V3U support" by Hai Pham <[email protected]>
--- drivers/gpio/gpio-rcar.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
drivers/gpio/gpio-rcar.c +14 -0
@@ -28,13 +28,17 @@#define GPIO_EDGLEVEL 0x24/* Edge/level Select Register */ #define GPIO_FILONOFF 0x28/* Chattering Prevention On/Off Register */ #define GPIO_BOTHEDGE 0x4c/* One Edge/Both Edge Select Register */ +#define GPIO_INEN 0x50/* General Input Enable Register */ #define RCAR_MAX_GPIO_PER_BANK 32 +#define RCAR_GPIO_HAS_INEN BIT(0) +DECLARE_GLOBAL_DATA_PTR ;struct rcar_gpio_priv {void __iomem *regs; +u32 quirks;int pfc_offset; };
@@ -81,6 +85,14 @@ static void rcar_gpio_set_direction(struct udevice *dev, unsigned offset,/* Configure postive logic in POSNEG */ clrbits_le32 (regs +GPIO_POSNEG ,BIT (offset)); +/* Select "Input Enable/Disable" in INEN */ +if (priv->quirks &RCAR_GPIO_HAS_INEN ) { +if (output) +clrbits_le32 (regs +GPIO_INEN ,BIT (offset)); +else +setbits_le32 (regs +GPIO_INEN ,BIT (offset)); + } +/* Select "General Input/Output Mode" in IOINTSEL */ clrbits_le32 (regs +GPIO_IOINTSEL ,BIT (offset));
@@ -149,6 +161,7 @@ static int rcar_gpio_probe(struct udevice *dev)int ret; priv->regs =dev_read_addr_ptr (dev); + priv->quirks =dev_get_driver_data (dev); uc_priv->bank_name = dev->name; ret = fdtdec_parse_phandle_with_args(gd->fdt_blob, node, "gpio-ranges",
@@ -179,6 +192,7 @@ static const struct udevice_id rcar_gpio_ids[] = { { .compatible = "renesas,gpio-r8a77970" }, { .compatible = "renesas,gpio-r8a77990" }, { .compatible = "renesas,gpio-r8a77995" }, + { .compatible = "renesas,gpio-r8a779a0", .data = RCAR_GPIO_HAS_INEN }, { .compatible = "renesas,rcar-gen2-gpio" }, { .compatible = "renesas,rcar-gen3-gpio" }, {/* sentinel */ }
Signature · 1 line
2.30.2
PATCH 17/30 pinctrl: renesas: Synchronize R-Car Gen2/Gen3 tables with Linux 5.12
In reply to Marek VasutSynchronize R-Car Gen2/Gen3 pinctrl tables with Linux 5.12, commit 9f4ad9e425a1 ("Linux 5.12") . This is a rather large commit, since the macros in sh-pfc.h also got updated, so all the PFC tables must be updated in lockstep.
--- drivers/pinctrl/renesas/pfc-r8a7790.c | 1019 +++++++++++++++--------- drivers/pinctrl/renesas/pfc-r8a7791.c | 20 +- drivers/pinctrl/renesas/pfc-r8a7792.c | 2 +- drivers/pinctrl/renesas/pfc-r8a7794.c | 2 +- drivers/pinctrl/renesas/pfc-r8a7795.c | 467 ++++++----- drivers/pinctrl/renesas/pfc-r8a7796.c | 492 +++++++----- drivers/pinctrl/renesas/pfc-r8a77965.c | 446 ++++++----- drivers/pinctrl/renesas/pfc-r8a77970.c | 104 ++- drivers/pinctrl/renesas/pfc-r8a77980.c | 80 +- drivers/pinctrl/renesas/pfc-r8a77990.c | 183 ++--- drivers/pinctrl/renesas/pfc-r8a77995.c | 4 +- drivers/pinctrl/renesas/sh_pfc.h | 130 ++- 12 files changed, 1834 insertions(+), 1115 deletions(-)
drivers/pinctrl/renesas/pfc-r8a7790.c +651 -368
@@ -20,7 +20,7 @@* All pins assigned to GPIO bank 3 can be used for SD interfaces in * which case they support both 3.3V and 1.8V signalling. */ -#define CPU_ALL_PORT (fn, sfx) \ +#define CPU_ALL_GP (fn, sfx) \ PORT_GP_32(0, fn, sfx), \ PORT_GP_30(1, fn, sfx), \ PORT_GP_30(2, fn, sfx), \
@@ -28,6 +28,12 @@PORT_GP_32 (4 , fn, sfx), \ PORT_GP_32(5, fn, sfx) +#define CPU_ALL_NOGP (fn) \ + PIN_NOGP(IIC0_SDA, "AF15", fn), \ + PIN_NOGP(IIC0_SCL, "AG15", fn), \ + PIN_NOGP(IIC3_SDA, "AH15", fn), \ + PIN_NOGP(IIC3_SCL, "AJ15", fn) +enum {PINMUX_RESERVED =0 ,
@@ -1727,19 +1733,17 @@ static const u16 pinmux_data[] = { PINMUX_DATA(I2C3_SDA_MARK, FN_SEL_IICDVFS_1), }; -/* R8A7790 has 6 banks with 32 GPIOs in each = 192 GPIOs */ -#define ROW_GROUP_A (r) ('Z' - 'A' + 1 + (r)) -#define PIN_NUMBER (r, c) (((r) - 'A') * 31 + (c) + 200) -#define PIN_A_NUMBER (r, c) PIN_NUMBER(ROW_GROUP_A(r), c) +/* +* Pins not associated with a GPIO port. +*/ +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 */ -SH_PFC_PIN_NAMED (ROW_GROUP_A ('F' ),15 ,AF15 ), -SH_PFC_PIN_NAMED (ROW_GROUP_A ('G' ),15 ,AG15 ), -SH_PFC_PIN_NAMED (ROW_GROUP_A ('H' ),15 ,AH15 ), -SH_PFC_PIN_NAMED (ROW_GROUP_A ('J' ),15 ,AJ15 ), +PINMUX_NOGP_ALL (), };/* - AUDIO CLOCK ------------------------------------------------------------ */
@@ -1867,6 +1871,86 @@ static const unsigned int avb_gmii_mux[] = {AVB_TX_EN_MARK ,AVB_TX_ER_MARK ,AVB_TX_CLK_MARK , AVB_COL_MARK, }; +/* - CAN0 ----------------------------------------------------------------- */ +static const unsigned int can0_data_pins[] = { +/* CAN0 RX */ +RCAR_GP_PIN (1 ,17 ), +/* CAN0 TX */ +RCAR_GP_PIN (1 ,19 ), +}; +static const unsigned int can0_data_mux[] = { +CAN0_RX_MARK , +CAN0_TX_MARK , +}; +static const unsigned int can0_data_b_pins[] = { +/* CAN0 RXB */ +RCAR_GP_PIN (4 ,5 ), +/* CAN0 TXB */ +RCAR_GP_PIN (4 ,4 ), +}; +static const unsigned int can0_data_b_mux[] = { +CAN0_RX_B_MARK , +CAN0_TX_B_MARK , +}; +static const unsigned int can0_data_c_pins[] = { +/* CAN0 RXC */ +RCAR_GP_PIN (4 ,26 ), +/* CAN0 TXC */ +RCAR_GP_PIN (4 ,23 ), +}; +static const unsigned int can0_data_c_mux[] = { +CAN0_RX_C_MARK , +CAN0_TX_C_MARK , +}; +static const unsigned int can0_data_d_pins[] = { +/* CAN0 RXD */ +RCAR_GP_PIN (4 ,26 ), +/* CAN0 TXD */ +RCAR_GP_PIN (4 ,18 ), +}; +static const unsigned int can0_data_d_mux[] = { +CAN0_RX_D_MARK , +CAN0_TX_D_MARK , +}; +/* - CAN1 ----------------------------------------------------------------- */ +static const unsigned int can1_data_pins[] = { +/* CAN1 RX */ +RCAR_GP_PIN (1 ,22 ), +/* CAN1 TX */ +RCAR_GP_PIN (1 ,18 ), +}; +static const unsigned int can1_data_mux[] = { +CAN1_RX_MARK , +CAN1_TX_MARK , +}; +static const unsigned int can1_data_b_pins[] = { +/* CAN1 RXB */ +RCAR_GP_PIN (4 ,7 ), +/* CAN1 TXB */ +RCAR_GP_PIN (4 ,6 ), +}; +static const unsigned int can1_data_b_mux[] = { +CAN1_RX_B_MARK , +CAN1_TX_B_MARK , +}; +/* - CAN Clock -------------------------------------------------------------- */ +static const unsigned int can_clk_pins[] = { +/* CLK */ +RCAR_GP_PIN (1 ,21 ), +}; + +static const unsigned int can_clk_mux[] = { +CAN_CLK_MARK , +}; + +static const unsigned int can_clk_b_pins[] = { +/* CLK */ +RCAR_GP_PIN (4 ,3 ), +}; + +static const unsigned int can_clk_b_mux[] = { +CAN_CLK_B_MARK , +};/* - DU RGB ----------------------------------------------------------------- */ static const unsigned int du_rgb666_pins[] = { /* R[7:2], G[7:2], B[7:2] */
@@ -2135,7 +2219,7 @@ static const unsigned int hscif1_ctrl_b_mux[] = {/* - I2C0 ------------------------------------------------------------------- */ static const unsigned int i2c0_pins[] = {/* SCL, SDA */ -PIN_A_NUMBER ('G' ,15 ),PIN_A_NUMBER ('F' ,15 ), +PIN_IIC0_SCL ,PIN_IIC0_SDA , };static const unsigned int i2c0_mux[] = {I2C0_SCL_MARK ,I2C0_SDA_MARK ,
@@ -2201,7 +2285,7 @@ static const unsigned int i2c2_e_mux[] = {/* - I2C3 ------------------------------------------------------------------- */ static const unsigned int i2c3_pins[] = {/* SCL, SDA */ -PIN_A_NUMBER ('J' ,15 ),PIN_A_NUMBER ('H' ,15 ), +PIN_IIC3_SCL ,PIN_IIC3_SDA , };static const unsigned int i2c3_mux[] = {I2C3_SCL_MARK ,I2C3_SDA_MARK ,
@@ -2209,7 +2293,7 @@ static const unsigned int i2c3_mux[] = {/* - IIC0 (I2C4) ------------------------------------------------------------ */ static const unsigned int iic0_pins[] = {/* SCL, SDA */ -PIN_A_NUMBER ('G' ,15 ),PIN_A_NUMBER ('F' ,15 ), +PIN_IIC0_SCL ,PIN_IIC0_SDA , };static const unsigned int iic0_mux[] = {IIC0_SCL_MARK ,IIC0_SDA_MARK ,
@@ -2274,8 +2358,8 @@ static const unsigned int iic2_e_mux[] = { };/* - IIC3 (I2C7) ------------------------------------------------------------ */ static const unsigned int iic3_pins[] = { -/* SCL, SDA */ -PIN_A_NUMBER ('J' ,15 ),PIN_A_NUMBER ('H' ,15 ), +/* SCL, SDA */ +PIN_IIC3_SCL ,PIN_IIC3_SDA , };static const unsigned int iic3_mux[] = {IIC3_SCL_MARK ,IIC3_SDA_MARK ,
@@ -2309,6 +2393,8 @@ static const unsigned int intc_irq3_pins[] = {static const unsigned int intc_irq3_mux[] = {IRQ3_MARK , }; + +#ifdef CONFIG_PINCTRL_PFC_R8A7790 /* - MLB+ ------------------------------------------------------------------- */ static const unsigned int mlb_3pin_pins[] = { RCAR_GP_PIN(4, 0), RCAR_GP_PIN(4, 1), RCAR_GP_PIN(4, 2),
@@ -2316,6 +2402,8 @@ static const unsigned int mlb_3pin_pins[] = {static const unsigned int mlb_3pin_mux[] = {MLB_CLK_MARK ,MLB_SIG_MARK ,MLB_DAT_MARK , }; +#endif /* CONFIG_PINCTRL_PFC_R8A7790 */ +/* - MMCIF0 ----------------------------------------------------------------- */ static const unsigned int mmc0_data1_pins[] = {/* D[0] */
@@ -3607,6 +3695,13 @@ static const unsigned int usb1_pins[] = {static const unsigned int usb1_mux[] = {USB1_PWEN_MARK ,USB1_OVC_MARK , }; +static const unsigned int usb1_pwen_pins[] = { +/* PWEN */ +RCAR_GP_PIN (5 ,20 ), +}; +static const unsigned int usb1_pwen_mux[] = { +USB1_PWEN_MARK , +};/* - USB2 ------------------------------------------------------------------- */ static const unsigned int usb2_pins[] = {/* PWEN, OVC */
@@ -3775,6 +3870,72 @@ static const unsigned int vin1_data18_mux[] = {VI1_R4_MARK ,VI1_R5_MARK , VI1_R6_MARK, VI1_R7_MARK, }; +static const union vin_data vin1_data_b_pins = { + .data24 = { +/* B */ +RCAR_GP_PIN (3 ,0 ),RCAR_GP_PIN (3 ,1 ), +RCAR_GP_PIN (3 ,2 ),RCAR_GP_PIN (3 ,3 ), +RCAR_GP_PIN (3 ,4 ),RCAR_GP_PIN (3 ,5 ), +RCAR_GP_PIN (3 ,6 ),RCAR_GP_PIN (3 ,7 ), +/* G */ +RCAR_GP_PIN (1 ,14 ),RCAR_GP_PIN (1 ,15 ), +RCAR_GP_PIN (1 ,17 ),RCAR_GP_PIN (1 ,20 ), +RCAR_GP_PIN (1 ,22 ),RCAR_GP_PIN (1 ,12 ), +RCAR_GP_PIN (1 ,9 ),RCAR_GP_PIN (1 ,7 ), +/* R */ +RCAR_GP_PIN (0 ,27 ),RCAR_GP_PIN (0 ,28 ), +RCAR_GP_PIN (0 ,29 ),RCAR_GP_PIN (1 ,4 ), +RCAR_GP_PIN (1 ,5 ),RCAR_GP_PIN (1 ,6 ), +RCAR_GP_PIN (1 ,10 ),RCAR_GP_PIN (1 ,8 ), + }, +}; +static const union vin_data vin1_data_b_mux = { + .data24 = { +/* B */ +VI1_DATA0_VI1_B0_B_MARK ,VI1_DATA1_VI1_B1_B_MARK , +VI1_DATA2_VI1_B2_B_MARK ,VI1_DATA3_VI1_B3_B_MARK , +VI1_DATA4_VI1_B4_B_MARK ,VI1_DATA5_VI1_B5_B_MARK , +VI1_DATA6_VI1_B6_B_MARK ,VI1_DATA7_VI1_B7_B_MARK , +/* G */ +VI1_G0_B_MARK ,VI1_G1_B_MARK , +VI1_G2_B_MARK ,VI1_G3_B_MARK , +VI1_G4_B_MARK ,VI1_G5_B_MARK , +VI1_G6_B_MARK ,VI1_G7_B_MARK , +/* R */ +VI1_R0_B_MARK ,VI1_R1_B_MARK , +VI1_R2_B_MARK ,VI1_R3_B_MARK , +VI1_R4_B_MARK ,VI1_R5_B_MARK , +VI1_R6_B_MARK ,VI1_R7_B_MARK , + }, +}; +static const unsigned int vin1_data18_b_pins[] = { +/* B */ +RCAR_GP_PIN (3 ,2 ),RCAR_GP_PIN (3 ,3 ), +RCAR_GP_PIN (3 ,4 ),RCAR_GP_PIN (3 ,5 ), +RCAR_GP_PIN (3 ,6 ),RCAR_GP_PIN (3 ,7 ), +/* G */ +RCAR_GP_PIN (1 ,17 ),RCAR_GP_PIN (1 ,20 ), +RCAR_GP_PIN (1 ,22 ),RCAR_GP_PIN (1 ,12 ), +RCAR_GP_PIN (1 ,9 ),RCAR_GP_PIN (1 ,7 ), +/* R */ +RCAR_GP_PIN (0 ,29 ),RCAR_GP_PIN (1 ,4 ), +RCAR_GP_PIN (1 ,5 ),RCAR_GP_PIN (1 ,6 ), +RCAR_GP_PIN (1 ,10 ),RCAR_GP_PIN (1 ,8 ), +}; +static const unsigned int vin1_data18_b_mux[] = { +/* B */ +VI1_DATA2_VI1_B2_B_MARK ,VI1_DATA3_VI1_B3_B_MARK , +VI1_DATA4_VI1_B4_B_MARK ,VI1_DATA5_VI1_B5_B_MARK , +VI1_DATA6_VI1_B6_B_MARK ,VI1_DATA7_VI1_B7_B_MARK , +/* G */ +VI1_G2_B_MARK ,VI1_G3_B_MARK , +VI1_G4_B_MARK ,VI1_G5_B_MARK , +VI1_G6_B_MARK ,VI1_G7_B_MARK , +/* R */ +VI1_R2_B_MARK ,VI1_R3_B_MARK , +VI1_R4_B_MARK ,VI1_R5_B_MARK , +VI1_R6_B_MARK ,VI1_R7_B_MARK , +};static const unsigned int vin1_sync_pins[] = {RCAR_GP_PIN (1 ,24 ),/* HSYNC */ RCAR_GP_PIN(1, 25), /* VSYNC */
@@ -3783,24 +3944,50 @@ static const unsigned int vin1_sync_mux[] = {VI1_HSYNC_N_MARK , VI1_VSYNC_N_MARK, }; +static const unsigned int vin1_sync_b_pins[] = { +RCAR_GP_PIN (1 ,24 ),/* HSYNC */ +RCAR_GP_PIN (1 ,25 ),/* VSYNC */ +}; +static const unsigned int vin1_sync_b_mux[] = { +VI1_HSYNC_N_B_MARK , +VI1_VSYNC_N_B_MARK , +};static const unsigned int vin1_field_pins[] = {RCAR_GP_PIN (1 ,13 ), };static const unsigned int vin1_field_mux[] = {VI1_FIELD_MARK , }; +static const unsigned int vin1_field_b_pins[] = { +RCAR_GP_PIN (1 ,13 ), +}; +static const unsigned int vin1_field_b_mux[] = { +VI1_FIELD_B_MARK , +};static const unsigned int vin1_clkenb_pins[] = {RCAR_GP_PIN (1 ,26 ), };static const unsigned int vin1_clkenb_mux[] = {VI1_CLKENB_MARK , }; +static const unsigned int vin1_clkenb_b_pins[] = { +RCAR_GP_PIN (1 ,26 ), +}; +static const unsigned int vin1_clkenb_b_mux[] = { +VI1_CLKENB_B_MARK , +};static const unsigned int vin1_clk_pins[] = {RCAR_GP_PIN (2 ,9 ), };static const unsigned int vin1_clk_mux[] = {VI1_CLK_MARK , }; +static const unsigned int vin1_clk_b_pins[] = { +RCAR_GP_PIN (3 ,15 ), +}; +static const unsigned int vin1_clk_b_mux[] = { +VI1_CLK_B_MARK , +};/* - VIN2 ----------------------------------------------------------------- */ static const union vin_data vin2_data_pins = { .data24 = {
@@ -3868,6 +4055,18 @@ static const unsigned int vin2_data18_mux[] = {VI2_R4_MARK ,VI2_R5_MARK , VI2_R6_MARK, VI2_R7_MARK, }; +static const unsigned int vin2_g8_pins[] = { +RCAR_GP_PIN (0 ,27 ),RCAR_GP_PIN (0 ,28 ), +RCAR_GP_PIN (0 ,29 ),RCAR_GP_PIN (1 ,10 ), +RCAR_GP_PIN (1 ,4 ),RCAR_GP_PIN (1 ,5 ), +RCAR_GP_PIN (1 ,6 ),RCAR_GP_PIN (1 ,7 ), +}; +static const unsigned int vin2_g8_mux[] = { +VI2_G0_MARK ,VI2_G1_MARK , +VI2_G2_MARK ,VI2_G3_MARK , +VI2_G4_MARK ,VI2_G5_MARK , +VI2_G6_MARK ,VI2_G7_MARK , +};static const unsigned int vin2_sync_pins[] = {RCAR_GP_PIN (1 ,16 ),/* HSYNC */ RCAR_GP_PIN(1, 21), /* VSYNC */
@@ -3934,297 +4133,330 @@ static const unsigned int vin3_clk_mux[] = { VI3_CLK_MARK, }; -static const struct sh_pfc_pin_group pinmux_groups[] = { -SH_PFC_PIN_GROUP (audio_clk_a), -SH_PFC_PIN_GROUP (audio_clk_b), -SH_PFC_PIN_GROUP (audio_clk_c), -SH_PFC_PIN_GROUP (audio_clkout), -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 (avb_link), -SH_PFC_PIN_GROUP (avb_magic), -SH_PFC_PIN_GROUP (avb_phy_int), -SH_PFC_PIN_GROUP (avb_mdio), -SH_PFC_PIN_GROUP (avb_mii), -SH_PFC_PIN_GROUP (avb_gmii), -SH_PFC_PIN_GROUP (du_rgb666), -SH_PFC_PIN_GROUP (du_rgb888), -SH_PFC_PIN_GROUP (du_clk_out_0), -SH_PFC_PIN_GROUP (du_clk_out_1), -SH_PFC_PIN_GROUP (du_sync_0), -SH_PFC_PIN_GROUP (du_sync_1), -SH_PFC_PIN_GROUP (du_cde), -SH_PFC_PIN_GROUP (du0_clk_in), -SH_PFC_PIN_GROUP (du1_clk_in), -SH_PFC_PIN_GROUP (du2_clk_in), -SH_PFC_PIN_GROUP (eth_link), -SH_PFC_PIN_GROUP (eth_magic), -SH_PFC_PIN_GROUP (eth_mdio), -SH_PFC_PIN_GROUP (eth_rmii), -SH_PFC_PIN_GROUP (hscif0_data), -SH_PFC_PIN_GROUP (hscif0_clk), -SH_PFC_PIN_GROUP (hscif0_ctrl), -SH_PFC_PIN_GROUP (hscif0_data_b), -SH_PFC_PIN_GROUP (hscif0_ctrl_b), -SH_PFC_PIN_GROUP (hscif0_data_c), -SH_PFC_PIN_GROUP (hscif0_ctrl_c), -SH_PFC_PIN_GROUP (hscif0_data_d), -SH_PFC_PIN_GROUP (hscif0_ctrl_d), -SH_PFC_PIN_GROUP (hscif0_data_e), -SH_PFC_PIN_GROUP (hscif0_ctrl_e), -SH_PFC_PIN_GROUP (hscif0_data_f), -SH_PFC_PIN_GROUP (hscif0_ctrl_f), -SH_PFC_PIN_GROUP (hscif1_data), -SH_PFC_PIN_GROUP (hscif1_clk), -SH_PFC_PIN_GROUP (hscif1_ctrl), -SH_PFC_PIN_GROUP (hscif1_data_b), -SH_PFC_PIN_GROUP (hscif1_clk_b), -SH_PFC_PIN_GROUP (hscif1_ctrl_b), -SH_PFC_PIN_GROUP (i2c0), -SH_PFC_PIN_GROUP (i2c1), -SH_PFC_PIN_GROUP (i2c1_b), -SH_PFC_PIN_GROUP (i2c1_c), -SH_PFC_PIN_GROUP (i2c2), -SH_PFC_PIN_GROUP (i2c2_b), -SH_PFC_PIN_GROUP (i2c2_c), -SH_PFC_PIN_GROUP (i2c2_d), -SH_PFC_PIN_GROUP (i2c2_e), -SH_PFC_PIN_GROUP (i2c3), -SH_PFC_PIN_GROUP (iic0), -SH_PFC_PIN_GROUP (iic1), -SH_PFC_PIN_GROUP (iic1_b), -SH_PFC_PIN_GROUP (iic1_c), -SH_PFC_PIN_GROUP (iic2), -SH_PFC_PIN_GROUP (iic2_b), -SH_PFC_PIN_GROUP (iic2_c), -SH_PFC_PIN_GROUP (iic2_d), -SH_PFC_PIN_GROUP (iic2_e), -SH_PFC_PIN_GROUP (iic3), -SH_PFC_PIN_GROUP (intc_irq0), -SH_PFC_PIN_GROUP (intc_irq1), -SH_PFC_PIN_GROUP (intc_irq2), -SH_PFC_PIN_GROUP (intc_irq3), -SH_PFC_PIN_GROUP (mlb_3pin), -SH_PFC_PIN_GROUP (mmc0_data1), -SH_PFC_PIN_GROUP (mmc0_data4), -SH_PFC_PIN_GROUP (mmc0_data8), -SH_PFC_PIN_GROUP (mmc0_ctrl), -SH_PFC_PIN_GROUP (mmc1_data1), -SH_PFC_PIN_GROUP (mmc1_data4), -SH_PFC_PIN_GROUP (mmc1_data8), -SH_PFC_PIN_GROUP (mmc1_ctrl), -SH_PFC_PIN_GROUP (msiof0_clk), -SH_PFC_PIN_GROUP (msiof0_sync), -SH_PFC_PIN_GROUP (msiof0_ss1), -SH_PFC_PIN_GROUP (msiof0_ss2), -SH_PFC_PIN_GROUP (msiof0_rx), -SH_PFC_PIN_GROUP (msiof0_tx), -SH_PFC_PIN_GROUP (msiof0_clk_b), -SH_PFC_PIN_GROUP (msiof0_ss1_b), -SH_PFC_PIN_GROUP (msiof0_ss2_b), -SH_PFC_PIN_GROUP (msiof0_rx_b), -SH_PFC_PIN_GROUP (msiof0_tx_b), -SH_PFC_PIN_GROUP (msiof1_clk), -SH_PFC_PIN_GROUP (msiof1_sync), -SH_PFC_PIN_GROUP (msiof1_ss1), -SH_PFC_PIN_GROUP (msiof1_ss2), -SH_PFC_PIN_GROUP (msiof1_rx), -SH_PFC_PIN_GROUP (msiof1_tx), -SH_PFC_PIN_GROUP (msiof1_clk_b), -SH_PFC_PIN_GROUP (msiof1_ss1_b), -SH_PFC_PIN_GROUP (msiof1_ss2_b), -SH_PFC_PIN_GROUP (msiof1_rx_b), -SH_PFC_PIN_GROUP (msiof1_tx_b), -SH_PFC_PIN_GROUP (msiof2_clk), -SH_PFC_PIN_GROUP (msiof2_sync), -SH_PFC_PIN_GROUP (msiof2_ss1), -SH_PFC_PIN_GROUP (msiof2_ss2), -SH_PFC_PIN_GROUP (msiof2_rx), -SH_PFC_PIN_GROUP (msiof2_tx), -SH_PFC_PIN_GROUP (msiof3_clk), -SH_PFC_PIN_GROUP (msiof3_sync), -SH_PFC_PIN_GROUP (msiof3_ss1), -SH_PFC_PIN_GROUP (msiof3_ss2), -SH_PFC_PIN_GROUP (msiof3_rx), -SH_PFC_PIN_GROUP (msiof3_tx), -SH_PFC_PIN_GROUP (msiof3_clk_b), -SH_PFC_PIN_GROUP (msiof3_sync_b), -SH_PFC_PIN_GROUP (msiof3_rx_b), -SH_PFC_PIN_GROUP (msiof3_tx_b), -SH_PFC_PIN_GROUP (pwm0), -SH_PFC_PIN_GROUP (pwm0_b), -SH_PFC_PIN_GROUP (pwm1), -SH_PFC_PIN_GROUP (pwm1_b), -SH_PFC_PIN_GROUP (pwm2), -SH_PFC_PIN_GROUP (pwm3), -SH_PFC_PIN_GROUP (pwm4), -SH_PFC_PIN_GROUP (pwm5), -SH_PFC_PIN_GROUP (pwm6), -SH_PFC_PIN_GROUP (qspi_ctrl), -SH_PFC_PIN_GROUP (qspi_data2), -SH_PFC_PIN_GROUP (qspi_data4), -SH_PFC_PIN_GROUP (scif0_data), -SH_PFC_PIN_GROUP (scif0_clk), -SH_PFC_PIN_GROUP (scif0_ctrl), -SH_PFC_PIN_GROUP (scif0_data_b), -SH_PFC_PIN_GROUP (scif1_data), -SH_PFC_PIN_GROUP (scif1_clk), -SH_PFC_PIN_GROUP (scif1_ctrl), -SH_PFC_PIN_GROUP (scif1_data_b), -SH_PFC_PIN_GROUP (scif1_data_c), -SH_PFC_PIN_GROUP (scif1_data_d), -SH_PFC_PIN_GROUP (scif1_clk_d), -SH_PFC_PIN_GROUP (scif1_data_e), -SH_PFC_PIN_GROUP (scif1_clk_e), -SH_PFC_PIN_GROUP (scif2_data), -SH_PFC_PIN_GROUP (scif2_clk), -SH_PFC_PIN_GROUP (scif2_data_b), -SH_PFC_PIN_GROUP (scifa0_data), -SH_PFC_PIN_GROUP (scifa0_clk), -SH_PFC_PIN_GROUP (scifa0_ctrl), -SH_PFC_PIN_GROUP (scifa0_data_b), -SH_PFC_PIN_GROUP (scifa0_clk_b), -SH_PFC_PIN_GROUP (scifa0_ctrl_b), -SH_PFC_PIN_GROUP (scifa1_data), -SH_PFC_PIN_GROUP (scifa1_clk), -SH_PFC_PIN_GROUP (scifa1_ctrl), -SH_PFC_PIN_GROUP (scifa1_data_b), -SH_PFC_PIN_GROUP (scifa1_clk_b), -SH_PFC_PIN_GROUP (scifa1_ctrl_b), -SH_PFC_PIN_GROUP (scifa1_data_c), -SH_PFC_PIN_GROUP (scifa1_clk_c), -SH_PFC_PIN_GROUP (scifa1_ctrl_c), -SH_PFC_PIN_GROUP (scifa1_data_d), -SH_PFC_PIN_GROUP (scifa1_clk_d), -SH_PFC_PIN_GROUP (scifa1_ctrl_d), -SH_PFC_PIN_GROUP (scifa2_data), -SH_PFC_PIN_GROUP (scifa2_clk), -SH_PFC_PIN_GROUP (scifa2_ctrl), -SH_PFC_PIN_GROUP (scifa2_data_b), -SH_PFC_PIN_GROUP (scifa2_data_c), -SH_PFC_PIN_GROUP (scifa2_clk_c), -SH_PFC_PIN_GROUP (scifb0_data), -SH_PFC_PIN_GROUP (scifb0_clk), -SH_PFC_PIN_GROUP (scifb0_ctrl), -SH_PFC_PIN_GROUP (scifb0_data_b), -SH_PFC_PIN_GROUP (scifb0_clk_b), -SH_PFC_PIN_GROUP (scifb0_ctrl_b), -SH_PFC_PIN_GROUP (scifb0_data_c), -SH_PFC_PIN_GROUP (scifb1_data), -SH_PFC_PIN_GROUP (scifb1_clk), -SH_PFC_PIN_GROUP (scifb1_ctrl), -SH_PFC_PIN_GROUP (scifb1_data_b), -SH_PFC_PIN_GROUP (scifb1_clk_b), -SH_PFC_PIN_GROUP (scifb1_ctrl_b), -SH_PFC_PIN_GROUP (scifb1_data_c), -SH_PFC_PIN_GROUP (scifb1_data_d), -SH_PFC_PIN_GROUP (scifb1_data_e), -SH_PFC_PIN_GROUP (scifb1_clk_e), -SH_PFC_PIN_GROUP (scifb1_data_f), -SH_PFC_PIN_GROUP (scifb1_data_g), -SH_PFC_PIN_GROUP (scifb1_clk_g), -SH_PFC_PIN_GROUP (scifb2_data), -SH_PFC_PIN_GROUP (scifb2_clk), -SH_PFC_PIN_GROUP (scifb2_ctrl), -SH_PFC_PIN_GROUP (scifb2_data_b), -SH_PFC_PIN_GROUP (scifb2_clk_b), -SH_PFC_PIN_GROUP (scifb2_ctrl_b), -SH_PFC_PIN_GROUP (scifb2_data_c), -SH_PFC_PIN_GROUP (scif_clk), -SH_PFC_PIN_GROUP (scif_clk_b), -SH_PFC_PIN_GROUP (sdhi0_data1), -SH_PFC_PIN_GROUP (sdhi0_data4), -SH_PFC_PIN_GROUP (sdhi0_ctrl), -SH_PFC_PIN_GROUP (sdhi0_cd), -SH_PFC_PIN_GROUP (sdhi0_wp), -SH_PFC_PIN_GROUP (sdhi1_data1), -SH_PFC_PIN_GROUP (sdhi1_data4), -SH_PFC_PIN_GROUP (sdhi1_ctrl), -SH_PFC_PIN_GROUP (sdhi1_cd), -SH_PFC_PIN_GROUP (sdhi1_wp), -SH_PFC_PIN_GROUP (sdhi2_data1), -SH_PFC_PIN_GROUP (sdhi2_data4), -SH_PFC_PIN_GROUP (sdhi2_ctrl), -SH_PFC_PIN_GROUP (sdhi2_cd), -SH_PFC_PIN_GROUP (sdhi2_wp), -SH_PFC_PIN_GROUP (sdhi3_data1), -SH_PFC_PIN_GROUP (sdhi3_data4), -SH_PFC_PIN_GROUP (sdhi3_ctrl), -SH_PFC_PIN_GROUP (sdhi3_cd), -SH_PFC_PIN_GROUP (sdhi3_wp), -SH_PFC_PIN_GROUP (ssi0_data), -SH_PFC_PIN_GROUP (ssi0129_ctrl), -SH_PFC_PIN_GROUP (ssi1_data), -SH_PFC_PIN_GROUP (ssi1_ctrl), -SH_PFC_PIN_GROUP (ssi2_data), -SH_PFC_PIN_GROUP (ssi2_ctrl), -SH_PFC_PIN_GROUP (ssi3_data), -SH_PFC_PIN_GROUP (ssi34_ctrl), -SH_PFC_PIN_GROUP (ssi4_data), -SH_PFC_PIN_GROUP (ssi4_ctrl), -SH_PFC_PIN_GROUP (ssi5), -SH_PFC_PIN_GROUP (ssi5_b), -SH_PFC_PIN_GROUP (ssi5_c), -SH_PFC_PIN_GROUP (ssi6), -SH_PFC_PIN_GROUP (ssi6_b), -SH_PFC_PIN_GROUP (ssi7_data), -SH_PFC_PIN_GROUP (ssi7_b_data), -SH_PFC_PIN_GROUP (ssi7_c_data), -SH_PFC_PIN_GROUP (ssi78_ctrl), -SH_PFC_PIN_GROUP (ssi78_b_ctrl), -SH_PFC_PIN_GROUP (ssi78_c_ctrl), -SH_PFC_PIN_GROUP (ssi8_data), -SH_PFC_PIN_GROUP (ssi8_b_data), -SH_PFC_PIN_GROUP (ssi8_c_data), -SH_PFC_PIN_GROUP (ssi9_data), -SH_PFC_PIN_GROUP (ssi9_ctrl), -SH_PFC_PIN_GROUP (tpu0_to0), -SH_PFC_PIN_GROUP (tpu0_to1), -SH_PFC_PIN_GROUP (tpu0_to2), -SH_PFC_PIN_GROUP (tpu0_to3), -SH_PFC_PIN_GROUP (usb0), -SH_PFC_PIN_GROUP (usb0_ovc_vbus), -SH_PFC_PIN_GROUP (usb1), -SH_PFC_PIN_GROUP (usb2), -VIN_DATA_PIN_GROUP (vin0_data,24 ), -VIN_DATA_PIN_GROUP (vin0_data,20 ), -SH_PFC_PIN_GROUP (vin0_data18), -VIN_DATA_PIN_GROUP (vin0_data,16 ), -VIN_DATA_PIN_GROUP (vin0_data,12 ), -VIN_DATA_PIN_GROUP (vin0_data,10 ), -VIN_DATA_PIN_GROUP (vin0_data,8 ), -VIN_DATA_PIN_GROUP (vin0_data,4 ), -SH_PFC_PIN_GROUP (vin0_sync), -SH_PFC_PIN_GROUP (vin0_field), -SH_PFC_PIN_GROUP (vin0_clkenb), -SH_PFC_PIN_GROUP (vin0_clk), -VIN_DATA_PIN_GROUP (vin1_data,24 ), -VIN_DATA_PIN_GROUP (vin1_data,20 ), -SH_PFC_PIN_GROUP (vin1_data18), -VIN_DATA_PIN_GROUP (vin1_data,16 ), -VIN_DATA_PIN_GROUP (vin1_data,12 ), -VIN_DATA_PIN_GROUP (vin1_data,10 ), -VIN_DATA_PIN_GROUP (vin1_data,8 ), -VIN_DATA_PIN_GROUP (vin1_data,4 ), -SH_PFC_PIN_GROUP (vin1_sync), -SH_PFC_PIN_GROUP (vin1_field), -SH_PFC_PIN_GROUP (vin1_clkenb), -SH_PFC_PIN_GROUP (vin1_clk), -VIN_DATA_PIN_GROUP (vin2_data,24 ), -SH_PFC_PIN_GROUP (vin2_data18), -VIN_DATA_PIN_GROUP (vin2_data,16 ), -VIN_DATA_PIN_GROUP (vin2_data,8 ), -VIN_DATA_PIN_GROUP (vin2_data,4 ), -SH_PFC_PIN_GROUP (vin2_sync), -SH_PFC_PIN_GROUP (vin2_field), -SH_PFC_PIN_GROUP (vin2_clkenb), -SH_PFC_PIN_GROUP (vin2_clk), -SH_PFC_PIN_GROUP (vin3_data8), -SH_PFC_PIN_GROUP (vin3_sync), -SH_PFC_PIN_GROUP (vin3_field), -SH_PFC_PIN_GROUP (vin3_clkenb), -SH_PFC_PIN_GROUP (vin3_clk), +static const struct { +struct sh_pfc_pin_group common[311 ]; +#ifdef CONFIG_PINCTRL_PFC_R8A7790 +struct sh_pfc_pin_group automotive[1 ]; +#endif +} pinmux_groups = { + .common = { +SH_PFC_PIN_GROUP (audio_clk_a), +SH_PFC_PIN_GROUP (audio_clk_b), +SH_PFC_PIN_GROUP (audio_clk_c), +SH_PFC_PIN_GROUP (audio_clkout), +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 (avb_link), +SH_PFC_PIN_GROUP (avb_magic), +SH_PFC_PIN_GROUP (avb_phy_int), +SH_PFC_PIN_GROUP (avb_mdio), +SH_PFC_PIN_GROUP (avb_mii), +SH_PFC_PIN_GROUP (avb_gmii), +SH_PFC_PIN_GROUP (can0_data), +SH_PFC_PIN_GROUP (can0_data_b), +SH_PFC_PIN_GROUP (can0_data_c), +SH_PFC_PIN_GROUP (can0_data_d), +SH_PFC_PIN_GROUP (can1_data), +SH_PFC_PIN_GROUP (can1_data_b), +SH_PFC_PIN_GROUP (can_clk), +SH_PFC_PIN_GROUP (can_clk_b), +SH_PFC_PIN_GROUP (du_rgb666), +SH_PFC_PIN_GROUP (du_rgb888), +SH_PFC_PIN_GROUP (du_clk_out_0), +SH_PFC_PIN_GROUP (du_clk_out_1), +SH_PFC_PIN_GROUP (du_sync_0), +SH_PFC_PIN_GROUP (du_sync_1), +SH_PFC_PIN_GROUP (du_cde), +SH_PFC_PIN_GROUP (du0_clk_in), +SH_PFC_PIN_GROUP (du1_clk_in), +SH_PFC_PIN_GROUP (du2_clk_in), +SH_PFC_PIN_GROUP (eth_link), +SH_PFC_PIN_GROUP (eth_magic), +SH_PFC_PIN_GROUP (eth_mdio), +SH_PFC_PIN_GROUP (eth_rmii), +SH_PFC_PIN_GROUP (hscif0_data), +SH_PFC_PIN_GROUP (hscif0_clk), +SH_PFC_PIN_GROUP (hscif0_ctrl), +SH_PFC_PIN_GROUP (hscif0_data_b), +SH_PFC_PIN_GROUP (hscif0_ctrl_b), +SH_PFC_PIN_GROUP (hscif0_data_c), +SH_PFC_PIN_GROUP (hscif0_ctrl_c), +SH_PFC_PIN_GROUP (hscif0_data_d), +SH_PFC_PIN_GROUP (hscif0_ctrl_d), +SH_PFC_PIN_GROUP (hscif0_data_e), +SH_PFC_PIN_GROUP (hscif0_ctrl_e), +SH_PFC_PIN_GROUP (hscif0_data_f), +SH_PFC_PIN_GROUP (hscif0_ctrl_f), +SH_PFC_PIN_GROUP (hscif1_data), +SH_PFC_PIN_GROUP (hscif1_clk), +SH_PFC_PIN_GROUP (hscif1_ctrl), +SH_PFC_PIN_GROUP (hscif1_data_b), +SH_PFC_PIN_GROUP (hscif1_clk_b), +SH_PFC_PIN_GROUP (hscif1_ctrl_b), +SH_PFC_PIN_GROUP (i2c0), +SH_PFC_PIN_GROUP (i2c1), +SH_PFC_PIN_GROUP (i2c1_b), +SH_PFC_PIN_GROUP (i2c1_c), +SH_PFC_PIN_GROUP (i2c2), +SH_PFC_PIN_GROUP (i2c2_b), +SH_PFC_PIN_GROUP (i2c2_c), +SH_PFC_PIN_GROUP (i2c2_d), +SH_PFC_PIN_GROUP (i2c2_e), +SH_PFC_PIN_GROUP (i2c3), +SH_PFC_PIN_GROUP (iic0), +SH_PFC_PIN_GROUP (iic1), +SH_PFC_PIN_GROUP (iic1_b), +SH_PFC_PIN_GROUP (iic1_c), +SH_PFC_PIN_GROUP (iic2), +SH_PFC_PIN_GROUP (iic2_b), +SH_PFC_PIN_GROUP (iic2_c), +SH_PFC_PIN_GROUP (iic2_d), +SH_PFC_PIN_GROUP (iic2_e), +SH_PFC_PIN_GROUP (iic3), +SH_PFC_PIN_GROUP (intc_irq0), +SH_PFC_PIN_GROUP (intc_irq1), +SH_PFC_PIN_GROUP (intc_irq2), +SH_PFC_PIN_GROUP (intc_irq3), +SH_PFC_PIN_GROUP (mmc0_data1), +SH_PFC_PIN_GROUP (mmc0_data4), +SH_PFC_PIN_GROUP (mmc0_data8), +SH_PFC_PIN_GROUP (mmc0_ctrl), +SH_PFC_PIN_GROUP (mmc1_data1), +SH_PFC_PIN_GROUP (mmc1_data4), +SH_PFC_PIN_GROUP (mmc1_data8), +SH_PFC_PIN_GROUP (mmc1_ctrl), +SH_PFC_PIN_GROUP (msiof0_clk), +SH_PFC_PIN_GROUP (msiof0_sync), +SH_PFC_PIN_GROUP (msiof0_ss1), +SH_PFC_PIN_GROUP (msiof0_ss2), +SH_PFC_PIN_GROUP (msiof0_rx), +SH_PFC_PIN_GROUP (msiof0_tx), +SH_PFC_PIN_GROUP (msiof0_clk_b), +SH_PFC_PIN_GROUP (msiof0_ss1_b), +SH_PFC_PIN_GROUP (msiof0_ss2_b), +SH_PFC_PIN_GROUP (msiof0_rx_b), +SH_PFC_PIN_GROUP (msiof0_tx_b), +SH_PFC_PIN_GROUP (msiof1_clk), +SH_PFC_PIN_GROUP (msiof1_sync), +SH_PFC_PIN_GROUP (msiof1_ss1), +SH_PFC_PIN_GROUP (msiof1_ss2), +SH_PFC_PIN_GROUP (msiof1_rx), +SH_PFC_PIN_GROUP (msiof1_tx), +SH_PFC_PIN_GROUP (msiof1_clk_b), +SH_PFC_PIN_GROUP (msiof1_ss1_b), +SH_PFC_PIN_GROUP (msiof1_ss2_b), +SH_PFC_PIN_GROUP (msiof1_rx_b), +SH_PFC_PIN_GROUP (msiof1_tx_b), +SH_PFC_PIN_GROUP (msiof2_clk), +SH_PFC_PIN_GROUP (msiof2_sync), +SH_PFC_PIN_GROUP (msiof2_ss1), +SH_PFC_PIN_GROUP (msiof2_ss2), +SH_PFC_PIN_GROUP (msiof2_rx), +SH_PFC_PIN_GROUP (msiof2_tx), +SH_PFC_PIN_GROUP (msiof3_clk), +SH_PFC_PIN_GROUP (msiof3_sync), +SH_PFC_PIN_GROUP (msiof3_ss1), +SH_PFC_PIN_GROUP (msiof3_ss2), +SH_PFC_PIN_GROUP (msiof3_rx), +SH_PFC_PIN_GROUP (msiof3_tx), +SH_PFC_PIN_GROUP (msiof3_clk_b), +SH_PFC_PIN_GROUP (msiof3_sync_b), +SH_PFC_PIN_GROUP (msiof3_rx_b), +SH_PFC_PIN_GROUP (msiof3_tx_b), +SH_PFC_PIN_GROUP (pwm0), +SH_PFC_PIN_GROUP (pwm0_b), +SH_PFC_PIN_GROUP (pwm1), +SH_PFC_PIN_GROUP (pwm1_b), +SH_PFC_PIN_GROUP (pwm2), +SH_PFC_PIN_GROUP (pwm3), +SH_PFC_PIN_GROUP (pwm4), +SH_PFC_PIN_GROUP (pwm5), +SH_PFC_PIN_GROUP (pwm6), +SH_PFC_PIN_GROUP (qspi_ctrl), +SH_PFC_PIN_GROUP (qspi_data2), +SH_PFC_PIN_GROUP (qspi_data4), +SH_PFC_PIN_GROUP (scif0_data), +SH_PFC_PIN_GROUP (scif0_clk), +SH_PFC_PIN_GROUP (scif0_ctrl), +SH_PFC_PIN_GROUP (scif0_data_b), +SH_PFC_PIN_GROUP (scif1_data), +SH_PFC_PIN_GROUP (scif1_clk), +SH_PFC_PIN_GROUP (scif1_ctrl), +SH_PFC_PIN_GROUP (scif1_data_b), +SH_PFC_PIN_GROUP (scif1_data_c), +SH_PFC_PIN_GROUP (scif1_data_d), +SH_PFC_PIN_GROUP (scif1_clk_d), +SH_PFC_PIN_GROUP (scif1_data_e), +SH_PFC_PIN_GROUP (scif1_clk_e), +SH_PFC_PIN_GROUP (scif2_data), +SH_PFC_PIN_GROUP (scif2_clk), +SH_PFC_PIN_GROUP (scif2_data_b), +SH_PFC_PIN_GROUP (scifa0_data), +SH_PFC_PIN_GROUP (scifa0_clk), +SH_PFC_PIN_GROUP (scifa0_ctrl), +SH_PFC_PIN_GROUP (scifa0_data_b), +SH_PFC_PIN_GROUP (scifa0_clk_b), +SH_PFC_PIN_GROUP (scifa0_ctrl_b), +SH_PFC_PIN_GROUP (scifa1_data), +SH_PFC_PIN_GROUP (scifa1_clk), +SH_PFC_PIN_GROUP (scifa1_ctrl), +SH_PFC_PIN_GROUP (scifa1_data_b), +SH_PFC_PIN_GROUP (scifa1_clk_b), +SH_PFC_PIN_GROUP (scifa1_ctrl_b), +SH_PFC_PIN_GROUP (scifa1_data_c), +SH_PFC_PIN_GROUP (scifa1_clk_c), +SH_PFC_PIN_GROUP (scifa1_ctrl_c), +SH_PFC_PIN_GROUP (scifa1_data_d), +SH_PFC_PIN_GROUP (scifa1_clk_d), +SH_PFC_PIN_GROUP (scifa1_ctrl_d), +SH_PFC_PIN_GROUP (scifa2_data), +SH_PFC_PIN_GROUP (scifa2_clk), +SH_PFC_PIN_GROUP (scifa2_ctrl), +SH_PFC_PIN_GROUP (scifa2_data_b), +SH_PFC_PIN_GROUP (scifa2_data_c), +SH_PFC_PIN_GROUP (scifa2_clk_c), +SH_PFC_PIN_GROUP (scifb0_data), +SH_PFC_PIN_GROUP (scifb0_clk), +SH_PFC_PIN_GROUP (scifb0_ctrl), +SH_PFC_PIN_GROUP (scifb0_data_b), +SH_PFC_PIN_GROUP (scifb0_clk_b), +SH_PFC_PIN_GROUP (scifb0_ctrl_b), +SH_PFC_PIN_GROUP (scifb0_data_c), +SH_PFC_PIN_GROUP (scifb1_data), +SH_PFC_PIN_GROUP (scifb1_clk), +SH_PFC_PIN_GROUP (scifb1_ctrl), +SH_PFC_PIN_GROUP (scifb1_data_b), +SH_PFC_PIN_GROUP (scifb1_clk_b), +SH_PFC_PIN_GROUP (scifb1_ctrl_b), +SH_PFC_PIN_GROUP (scifb1_data_c), +SH_PFC_PIN_GROUP (scifb1_data_d), +SH_PFC_PIN_GROUP (scifb1_data_e), +SH_PFC_PIN_GROUP (scifb1_clk_e), +SH_PFC_PIN_GROUP (scifb1_data_f), +SH_PFC_PIN_GROUP (scifb1_data_g), +SH_PFC_PIN_GROUP (scifb1_clk_g), +SH_PFC_PIN_GROUP (scifb2_data), +SH_PFC_PIN_GROUP (scifb2_clk), +SH_PFC_PIN_GROUP (scifb2_ctrl), +SH_PFC_PIN_GROUP (scifb2_data_b), +SH_PFC_PIN_GROUP (scifb2_clk_b), +SH_PFC_PIN_GROUP (scifb2_ctrl_b), +SH_PFC_PIN_GROUP (scifb2_data_c), +SH_PFC_PIN_GROUP (scif_clk), +SH_PFC_PIN_GROUP (scif_clk_b), +SH_PFC_PIN_GROUP (sdhi0_data1), +SH_PFC_PIN_GROUP (sdhi0_data4), +SH_PFC_PIN_GROUP (sdhi0_ctrl), +SH_PFC_PIN_GROUP (sdhi0_cd), +SH_PFC_PIN_GROUP (sdhi0_wp), +SH_PFC_PIN_GROUP (sdhi1_data1), +SH_PFC_PIN_GROUP (sdhi1_data4), +SH_PFC_PIN_GROUP (sdhi1_ctrl), +SH_PFC_PIN_GROUP (sdhi1_cd), +SH_PFC_PIN_GROUP (sdhi1_wp), +SH_PFC_PIN_GROUP (sdhi2_data1), +SH_PFC_PIN_GROUP (sdhi2_data4), +SH_PFC_PIN_GROUP (sdhi2_ctrl), +SH_PFC_PIN_GROUP (sdhi2_cd), +SH_PFC_PIN_GROUP (sdhi2_wp), +SH_PFC_PIN_GROUP (sdhi3_data1), +SH_PFC_PIN_GROUP (sdhi3_data4), +SH_PFC_PIN_GROUP (sdhi3_ctrl), +SH_PFC_PIN_GROUP (sdhi3_cd), +SH_PFC_PIN_GROUP (sdhi3_wp), +SH_PFC_PIN_GROUP (ssi0_data), +SH_PFC_PIN_GROUP (ssi0129_ctrl), +SH_PFC_PIN_GROUP (ssi1_data), +SH_PFC_PIN_GROUP (ssi1_ctrl), +SH_PFC_PIN_GROUP (ssi2_data), +SH_PFC_PIN_GROUP (ssi2_ctrl), +SH_PFC_PIN_GROUP (ssi3_data), +SH_PFC_PIN_GROUP (ssi34_ctrl), +SH_PFC_PIN_GROUP (ssi4_data), +SH_PFC_PIN_GROUP (ssi4_ctrl), +SH_PFC_PIN_GROUP (ssi5), +SH_PFC_PIN_GROUP (ssi5_b), +SH_PFC_PIN_GROUP (ssi5_c), +SH_PFC_PIN_GROUP (ssi6), +SH_PFC_PIN_GROUP (ssi6_b), +SH_PFC_PIN_GROUP (ssi7_data), +SH_PFC_PIN_GROUP (ssi7_b_data), +SH_PFC_PIN_GROUP (ssi7_c_data), +SH_PFC_PIN_GROUP (ssi78_ctrl), +SH_PFC_PIN_GROUP (ssi78_b_ctrl), +SH_PFC_PIN_GROUP (ssi78_c_ctrl), +SH_PFC_PIN_GROUP (ssi8_data), +SH_PFC_PIN_GROUP (ssi8_b_data), +SH_PFC_PIN_GROUP (ssi8_c_data), +SH_PFC_PIN_GROUP (ssi9_data), +SH_PFC_PIN_GROUP (ssi9_ctrl), +SH_PFC_PIN_GROUP (tpu0_to0), +SH_PFC_PIN_GROUP (tpu0_to1), +SH_PFC_PIN_GROUP (tpu0_to2), +SH_PFC_PIN_GROUP (tpu0_to3), +SH_PFC_PIN_GROUP (usb0), +SH_PFC_PIN_GROUP (usb0_ovc_vbus), +SH_PFC_PIN_GROUP (usb1), +SH_PFC_PIN_GROUP (usb1_pwen), +SH_PFC_PIN_GROUP (usb2), +VIN_DATA_PIN_GROUP (vin0_data,24 ), +VIN_DATA_PIN_GROUP (vin0_data,20 ), +SH_PFC_PIN_GROUP (vin0_data18), +VIN_DATA_PIN_GROUP (vin0_data,16 ), +VIN_DATA_PIN_GROUP (vin0_data,12 ), +VIN_DATA_PIN_GROUP (vin0_data,10 ), +VIN_DATA_PIN_GROUP (vin0_data,8 ), +VIN_DATA_PIN_GROUP (vin0_data,4 ), +SH_PFC_PIN_GROUP (vin0_sync), +SH_PFC_PIN_GROUP (vin0_field), +SH_PFC_PIN_GROUP (vin0_clkenb), +SH_PFC_PIN_GROUP (vin0_clk), +VIN_DATA_PIN_GROUP (vin1_data,24 ), +VIN_DATA_PIN_GROUP (vin1_data,20 ), +SH_PFC_PIN_GROUP (vin1_data18), +VIN_DATA_PIN_GROUP (vin1_data,16 ), +VIN_DATA_PIN_GROUP (vin1_data,12 ), +VIN_DATA_PIN_GROUP (vin1_data,10 ), +VIN_DATA_PIN_GROUP (vin1_data,8 ), +VIN_DATA_PIN_GROUP (vin1_data,4 ), +VIN_DATA_PIN_GROUP (vin1_data,24 , _b), +VIN_DATA_PIN_GROUP (vin1_data,20 , _b), +SH_PFC_PIN_GROUP (vin1_data18_b), +VIN_DATA_PIN_GROUP (vin1_data,16 , _b), +VIN_DATA_PIN_GROUP (vin1_data,12 , _b), +VIN_DATA_PIN_GROUP (vin1_data,10 , _b), +VIN_DATA_PIN_GROUP (vin1_data,8 , _b), +VIN_DATA_PIN_GROUP (vin1_data,4 , _b), +SH_PFC_PIN_GROUP (vin1_sync), +SH_PFC_PIN_GROUP (vin1_sync_b), +SH_PFC_PIN_GROUP (vin1_field), +SH_PFC_PIN_GROUP (vin1_field_b), +SH_PFC_PIN_GROUP (vin1_clkenb), +SH_PFC_PIN_GROUP (vin1_clkenb_b), +SH_PFC_PIN_GROUP (vin1_clk), +SH_PFC_PIN_GROUP (vin1_clk_b), +VIN_DATA_PIN_GROUP (vin2_data,24 ), +SH_PFC_PIN_GROUP (vin2_data18), +VIN_DATA_PIN_GROUP (vin2_data,16 ), +VIN_DATA_PIN_GROUP (vin2_data,8 ), +VIN_DATA_PIN_GROUP (vin2_data,4 ), +SH_PFC_PIN_GROUP (vin2_g8), +SH_PFC_PIN_GROUP (vin2_sync), +SH_PFC_PIN_GROUP (vin2_field), +SH_PFC_PIN_GROUP (vin2_clkenb), +SH_PFC_PIN_GROUP (vin2_clk), +SH_PFC_PIN_GROUP (vin3_data8), +SH_PFC_PIN_GROUP (vin3_sync), +SH_PFC_PIN_GROUP (vin3_field), +SH_PFC_PIN_GROUP (vin3_clkenb), +SH_PFC_PIN_GROUP (vin3_clk), + }, +#ifdef CONFIG_PINCTRL_PFC_R8A7790 + .automotive = { +SH_PFC_PIN_GROUP (mlb_3pin), + } +#endif /* CONFIG_PINCTRL_PFC_R8A7790 */ };static const char *const audio_clk_groups[] = {
@@ -4246,6 +4478,23 @@ static const char * const avb_groups[] = { "avb_gmii", }; +static const char *const can0_groups[] = { +"can0_data" , +"can0_data_b" , +"can0_data_c" , +"can0_data_d" , +}; + +static const char *const can1_groups[] = { +"can1_data" , +"can1_data_b" , +}; + +static const char *const can_clk_groups[] = { +"can_clk" , +"can_clk_b" , +}; +static const char *const du_groups[] = {"du_rgb666" ,"du_rgb888" ,
@@ -4351,9 +4600,11 @@ static const char * const intc_groups[] = { "intc_irq3", }; +#ifdef CONFIG_PINCTRL_PFC_R8A7790 static const char *const mlb_groups[] = {"mlb_3pin" , }; +#endif /* CONFIG_PINCTRL_PFC_R8A7790 */ static const char *const mmc0_groups[] = {"mmc0_data1" ,
@@ -4629,6 +4880,7 @@ static const char * const usb0_groups[] = {static const char *const usb1_groups[] = {"usb1" , +"usb1_pwen" , };static const char *const usb2_groups[] = {
@@ -4659,10 +4911,22 @@ static const char * const vin1_groups[] = {"vin1_data10" ,"vin1_data8" ,"vin1_data4" , +"vin1_data24_b" , +"vin1_data20_b" , +"vin1_data18_b" , +"vin1_data16_b" , +"vin1_data12_b" , +"vin1_data10_b" , +"vin1_data8_b" , +"vin1_data4_b" ,"vin1_sync" , +"vin1_sync_b" ,"vin1_field" , +"vin1_field_b" ,"vin1_clkenb" , +"vin1_clkenb_b" ,"vin1_clk" , + "vin1_clk_b", }; static const char * const vin2_groups[] = {
@@ -4671,6 +4935,7 @@ static const char * const vin2_groups[] = {"vin2_data16" ,"vin2_data8" ,"vin2_data4" , +"vin2_g8" ,"vin2_sync" ,"vin2_field" , "vin2_clkenb",
@@ -4685,63 +4950,77 @@ static const char * const vin3_groups[] = { "vin3_clk", }; -static const struct sh_pfc_function pinmux_functions[] = { -SH_PFC_FUNCTION (audio_clk), -SH_PFC_FUNCTION (avb), -SH_PFC_FUNCTION (du), -SH_PFC_FUNCTION (du0), -SH_PFC_FUNCTION (du1), -SH_PFC_FUNCTION (du2), -SH_PFC_FUNCTION (eth), -SH_PFC_FUNCTION (hscif0), -SH_PFC_FUNCTION (hscif1), -SH_PFC_FUNCTION (i2c0), -SH_PFC_FUNCTION (i2c1), -SH_PFC_FUNCTION (i2c2), -SH_PFC_FUNCTION (i2c3), -SH_PFC_FUNCTION (iic0), -SH_PFC_FUNCTION (iic1), -SH_PFC_FUNCTION (iic2), -SH_PFC_FUNCTION (iic3), -SH_PFC_FUNCTION (intc), -SH_PFC_FUNCTION (mlb), -SH_PFC_FUNCTION (mmc0), -SH_PFC_FUNCTION (mmc1), -SH_PFC_FUNCTION (msiof0), -SH_PFC_FUNCTION (msiof1), -SH_PFC_FUNCTION (msiof2), -SH_PFC_FUNCTION (msiof3), -SH_PFC_FUNCTION (pwm0), -SH_PFC_FUNCTION (pwm1), -SH_PFC_FUNCTION (pwm2), -SH_PFC_FUNCTION (pwm3), -SH_PFC_FUNCTION (pwm4), -SH_PFC_FUNCTION (pwm5), -SH_PFC_FUNCTION (pwm6), -SH_PFC_FUNCTION (qspi), -SH_PFC_FUNCTION (scif0), -SH_PFC_FUNCTION (scif1), -SH_PFC_FUNCTION (scif2), -SH_PFC_FUNCTION (scifa0), -SH_PFC_FUNCTION (scifa1), -SH_PFC_FUNCTION (scifa2), -SH_PFC_FUNCTION (scifb0), -SH_PFC_FUNCTION (scifb1), -SH_PFC_FUNCTION (scifb2), -SH_PFC_FUNCTION (scif_clk), -SH_PFC_FUNCTION (sdhi0), -SH_PFC_FUNCTION (sdhi1), -SH_PFC_FUNCTION (sdhi2), -SH_PFC_FUNCTION (sdhi3), -SH_PFC_FUNCTION (ssi), -SH_PFC_FUNCTION (tpu0), -SH_PFC_FUNCTION (usb0), -SH_PFC_FUNCTION (usb1), -SH_PFC_FUNCTION (usb2), -SH_PFC_FUNCTION (vin0), -SH_PFC_FUNCTION (vin1), -SH_PFC_FUNCTION (vin2), -SH_PFC_FUNCTION (vin3), +static const struct { +struct sh_pfc_function common[58 ]; +#ifdef CONFIG_PINCTRL_PFC_R8A7790 +struct sh_pfc_function automotive[1 ]; +#endif +} pinmux_functions = { + .common = { +SH_PFC_FUNCTION (audio_clk), +SH_PFC_FUNCTION (avb), +SH_PFC_FUNCTION (du), +SH_PFC_FUNCTION (can0), +SH_PFC_FUNCTION (can1), +SH_PFC_FUNCTION (can_clk), +SH_PFC_FUNCTION (du0), +SH_PFC_FUNCTION (du1), +SH_PFC_FUNCTION (du2), +SH_PFC_FUNCTION (eth), +SH_PFC_FUNCTION (hscif0), +SH_PFC_FUNCTION (hscif1), +SH_PFC_FUNCTION (i2c0), +SH_PFC_FUNCTION (i2c1), +SH_PFC_FUNCTION (i2c2), +SH_PFC_FUNCTION (i2c3), +SH_PFC_FUNCTION (iic0), +SH_PFC_FUNCTION (iic1), +SH_PFC_FUNCTION (iic2), +SH_PFC_FUNCTION (iic3), +SH_PFC_FUNCTION (intc), +SH_PFC_FUNCTION (mmc0), +SH_PFC_FUNCTION (mmc1), +SH_PFC_FUNCTION (msiof0), +SH_PFC_FUNCTION (msiof1), +SH_PFC_FUNCTION (msiof2), +SH_PFC_FUNCTION (msiof3), +SH_PFC_FUNCTION (pwm0), +SH_PFC_FUNCTION (pwm1), +SH_PFC_FUNCTION (pwm2), +SH_PFC_FUNCTION (pwm3), +SH_PFC_FUNCTION (pwm4), +SH_PFC_FUNCTION (pwm5), +SH_PFC_FUNCTION (pwm6), +SH_PFC_FUNCTION (qspi), +SH_PFC_FUNCTION (scif0), +SH_PFC_FUNCTION (scif1), +SH_PFC_FUNCTION (scif2), +SH_PFC_FUNCTION (scifa0), +SH_PFC_FUNCTION (scifa1), +SH_PFC_FUNCTION (scifa2), +SH_PFC_FUNCTION (scifb0), +SH_PFC_FUNCTION (scifb1), +SH_PFC_FUNCTION (scifb2), +SH_PFC_FUNCTION (scif_clk), +SH_PFC_FUNCTION (sdhi0), +SH_PFC_FUNCTION (sdhi1), +SH_PFC_FUNCTION (sdhi2), +SH_PFC_FUNCTION (sdhi3), +SH_PFC_FUNCTION (ssi), +SH_PFC_FUNCTION (tpu0), +SH_PFC_FUNCTION (usb0), +SH_PFC_FUNCTION (usb1), +SH_PFC_FUNCTION (usb2), +SH_PFC_FUNCTION (vin0), +SH_PFC_FUNCTION (vin1), +SH_PFC_FUNCTION (vin2), +SH_PFC_FUNCTION (vin3), + }, +#ifdef CONFIG_PINCTRL_PFC_R8A7790 + .automotive = { +SH_PFC_FUNCTION (mlb), + } +#endif /* CONFIG_PINCTRL_PFC_R8A7790 */ };static const struct pinmux_cfg_reg pinmux_config_regs[] = {
@@ -5728,6 +6007,7 @@ static const struct sh_pfc_soc_operations r8a7790_pinmux_ops = { .pin_to_pocctrl = r8a7790_pin_to_pocctrl, }; +#ifdef CONFIG_PINCTRL_PFC_R8A7790 const struct sh_pfc_soc_info r8a7790_pinmux_info = { .name ="r8a77900_pfc" , .ops = &r8a7790_pinmux_ops,
@@ -5737,13 +6017,16 @@ const struct sh_pfc_soc_info r8a7790_pinmux_info = { .pins = pinmux_pins, .nr_pins = ARRAY_SIZE(pinmux_pins), - .groups = pinmux_groups, - .nr_groups = ARRAY_SIZE(pinmux_groups), - .functions = pinmux_functions, - .nr_functions = ARRAY_SIZE(pinmux_functions), + .groups = pinmux_groups.common, + .nr_groups =ARRAY_SIZE (pinmux_groups.common) + + ARRAY_SIZE(pinmux_groups.automotive), + .functions = pinmux_functions.common, + .nr_functions =ARRAY_SIZE (pinmux_functions.common) + + ARRAY_SIZE(pinmux_functions.automotive), .cfg_regs = pinmux_config_regs, .pinmux_data = pinmux_data, .pinmux_data_size = ARRAY_SIZE(pinmux_data), }; +#endif
drivers/pinctrl/renesas/pfc-r8a7791.c +19 -1
@@ -18,7 +18,7 @@* Pins 0-23 assigned to GPIO bank 6 can be used for SD interfaces in * which case they support both 3.3V and 1.8V signalling. */ -#define CPU_ALL_PORT (fn, sfx) \ +#define CPU_ALL_GP (fn, sfx) \ PORT_GP_32(0, fn, sfx), \ PORT_GP_26(1, fn, sfx), \ PORT_GP_32(2, fn, sfx), \
@@ -1703,6 +1703,7 @@ static const struct sh_pfc_pin pinmux_pins[] = { PINMUX_GPIO_GP_ALL(), }; +#if defined(CONFIG_PINCTRL_PFC_R8A7791 ) || defined(CONFIG_PINCTRL_PFC_R8A7793 )/* - ADI -------------------------------------------------------------------- */ static const unsigned int adi_common_pins[] = { /* ADIDATA, ADICS/SAMP, ADICLK */
@@ -1768,6 +1769,7 @@ static const unsigned int adi_chsel2_b_mux[] = {/* ADICHS B 2 */ ADICHS2_B_MARK, }; +#endif /* CONFIG_PINCTRL_PFC_R8A7791 || CONFIG_PINCTRL_PFC_R8A7793 */ /* - Audio Clock ------------------------------------------------------------ */ static const unsigned int audio_clk_a_pins[] = {
@@ -2556,6 +2558,8 @@ static const unsigned int intc_irq3_pins[] = {static const unsigned int intc_irq3_mux[] = {IRQ3_MARK , }; + +#if defined(CONFIG_PINCTRL_PFC_R8A7791 ) || defined(CONFIG_PINCTRL_PFC_R8A7793 )/* - MLB+ ------------------------------------------------------------------- */ static const unsigned int mlb_3pin_pins[] = { RCAR_GP_PIN(7, 7), RCAR_GP_PIN(7, 8), RCAR_GP_PIN(7, 9),
@@ -2563,6 +2567,8 @@ static const unsigned int mlb_3pin_pins[] = {static const unsigned int mlb_3pin_mux[] = {MLB_CLK_MARK ,MLB_SIG_MARK ,MLB_DAT_MARK , }; +#endif /* CONFIG_PINCTRL_PFC_R8A7791 || CONFIG_PINCTRL_PFC_R8A7793 */ +/* - MMCIF ------------------------------------------------------------------ */ static const unsigned int mmc_data1_pins[] = {/* D[0] */
@@ -4455,7 +4461,9 @@ static const unsigned int vin2_clk_mux[] = {static const struct {struct sh_pfc_pin_group common[346 ]; +#if defined(CONFIG_PINCTRL_PFC_R8A7791 ) || defined(CONFIG_PINCTRL_PFC_R8A7793 )struct sh_pfc_pin_group automotive[9 ]; +#endif } pinmux_groups = { .common = {SH_PFC_PIN_GROUP (audio_clk_a),
@@ -4805,6 +4813,7 @@ static const struct {SH_PFC_PIN_GROUP (vin2_clkenb),SH_PFC_PIN_GROUP (vin2_clk ), }, +#if defined(CONFIG_PINCTRL_PFC_R8A7791) || defined(CONFIG_PINCTRL_PFC_R8A7793) .automotive = {SH_PFC_PIN_GROUP (adi_common), SH_PFC_PIN_GROUP(adi_chsel0),
@@ -4816,8 +4825,10 @@ static const struct {SH_PFC_PIN_GROUP (adi_chsel2_b), SH_PFC_PIN_GROUP(mlb_3pin), } +#endif /* CONFIG_PINCTRL_PFC_R8A7791 || CONFIG_PINCTRL_PFC_R8A7793 */ }; +#if defined(CONFIG_PINCTRL_PFC_R8A7791 ) || defined(CONFIG_PINCTRL_PFC_R8A7793 )static const char *const adi_groups[] = {"adi_common" , "adi_chsel0",
@@ -4828,6 +4839,7 @@ static const char * const adi_groups[] = {"adi_chsel1_b" , "adi_chsel2_b", }; +#endif /* CONFIG_PINCTRL_PFC_R8A7791 || CONFIG_PINCTRL_PFC_R8A7793 */ static const char *const audio_clk_groups[] = {"audio_clk_a" ,
@@ -5005,9 +5017,11 @@ static const char * const intc_groups[] = { "intc_irq3", }; +#if defined(CONFIG_PINCTRL_PFC_R8A7791 ) || defined(CONFIG_PINCTRL_PFC_R8A7793 )static const char *const mlb_groups[] = {"mlb_3pin" , }; +#endif /* CONFIG_PINCTRL_PFC_R8A7791 || CONFIG_PINCTRL_PFC_R8A7793 */ static const char *const mmc_groups[] = {"mmc_data1" ,
@@ -5362,7 +5376,9 @@ static const char * const vin2_groups[] = {static const struct {struct sh_pfc_function common[58 ]; +#if defined(CONFIG_PINCTRL_PFC_R8A7791 ) || defined(CONFIG_PINCTRL_PFC_R8A7793 )struct sh_pfc_function automotive[2 ]; +#endif } pinmux_functions = { .common = {SH_PFC_FUNCTION (audio_clk),
@@ -5424,10 +5440,12 @@ static const struct {SH_PFC_FUNCTION (vin1),SH_PFC_FUNCTION (vin2 ), }, +#if defined(CONFIG_PINCTRL_PFC_R8A7791) || defined(CONFIG_PINCTRL_PFC_R8A7793) .automotive = {SH_PFC_FUNCTION (adi),SH_PFC_FUNCTION (mlb), } +#endif /* CONFIG_PINCTRL_PFC_R8A7791 || CONFIG_PINCTRL_PFC_R8A7793 */ };static const struct pinmux_cfg_reg pinmux_config_regs[] = {
drivers/pinctrl/renesas/pfc-r8a7792.c +1 -1
@@ -14,7 +14,7 @@#include "sh_pfc.h" -#define CPU_ALL_PORT (fn, sfx) \ +#define CPU_ALL_GP (fn, sfx) \ PORT_GP_29(0, fn, sfx), \ PORT_GP_23(1, fn, sfx), \ PORT_GP_32(2, fn, sfx), \
drivers/pinctrl/renesas/pfc-r8a7794.c +1 -1
@@ -15,7 +15,7 @@#include "sh_pfc.h" -#define CPU_ALL_PORT (fn, sfx) \ +#define CPU_ALL_GP (fn, sfx) \ PORT_GP_32(0, fn, sfx), \ PORT_GP_26(1, fn, sfx), \ PORT_GP_32(2, fn, sfx), \
drivers/pinctrl/renesas/pfc-r8a7795.c +266 -201
639 lines not on this page · raw message
drivers/pinctrl/renesas/pfc-r8a7796.c +298 -194
667 lines not on this page · raw message
drivers/pinctrl/renesas/pfc-r8a77965.c +254 -192
387 lines not on this page · raw message
drivers/pinctrl/renesas/pfc-r8a77970.c +80 -24
104 lines not on this page · raw message
drivers/pinctrl/renesas/pfc-r8a77980.c +78 -2
80 lines not on this page · raw message
drivers/pinctrl/renesas/pfc-r8a77990.c +88 -95
183 lines not on this page · raw message
drivers/pinctrl/renesas/sh_pfc.h +96 -34
130 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.30.2
Part of the diff is not shown here. View the raw message.
Lad
PATCH 17/30 pinctrl: renesas: Synchronize R-Car Gen2/Gen3 tables with Linux 5.12
Hi Marek,
Thank you for the patch.
Quoted 7 lines · Marek Vasut
Synchronize R-Car Gen2/Gen3 pinctrl tables with Linux 5.12, commit
9f4ad9e425a1("Linux 5.12") . This is a rather large commit, since the macros insh-pfc.halso got updated, so all the PFC tables must be updated in lockstep.Signed-off-by Marek Vasut <[email protected]>
Quoted 15 lines
--- drivers/pinctrl/renesas/pfc-r8a7790.c | 1019 +++++++++++++++--------- drivers/pinctrl/renesas/pfc-r8a7791.c | 20 +- drivers/pinctrl/renesas/pfc-r8a7792.c | 2 +- drivers/pinctrl/renesas/pfc-r8a7794.c | 2 +- drivers/pinctrl/renesas/pfc-r8a7795.c | 467 ++++++----- drivers/pinctrl/renesas/pfc-r8a7796.c | 492 +++++++----- drivers/pinctrl/renesas/pfc-r8a77965.c | 446 ++++++----- drivers/pinctrl/renesas/pfc-r8a77970.c | 104 ++- drivers/pinctrl/renesas/pfc-r8a77980.c | 80 +- drivers/pinctrl/renesas/pfc-r8a77990.c | 183 ++--- drivers/pinctrl/renesas/pfc-r8a77995.c | 4 +- drivers/pinctrl/renesas/sh_pfc.h | 130 ++- 12 files changed, 1834 insertions(+), 1115 deletions(-)
Tested on RZ/G2{EHMN} boards
Cheers,
Prabhakar
Quoted 4,178 lines
drivers/pinctrl/renesas/pfc-r8a7790.c +651
-368@@ -20,7 +20,7 @@* All pins assigned to GPIO bank 3 can be used for SD interfaces in * which case they support both 3.3V and 1.8V signalling. */ -#define CPU_ALL_PORT (fn, sfx) \ +#define CPU_ALL_GP (fn, sfx) \ PORT_GP_32(0, fn, sfx), \ PORT_GP_30(1, fn, sfx), \ PORT_GP_30(2, fn, sfx), \@@ -28,6 +28,12 @@PORT_GP_32 (4 , fn, sfx), \ PORT_GP_32(5, fn, sfx) +#define CPU_ALL_NOGP (fn) \ + PIN_NOGP(IIC0_SDA, "AF15", fn), \ + PIN_NOGP(IIC0_SCL, "AG15", fn), \ + PIN_NOGP(IIC3_SDA, "AH15", fn), \ + PIN_NOGP(IIC3_SCL, "AJ15", fn) +enum {PINMUX_RESERVED =0 ,@@ -1727,19 +1733,17 @@ static const u16 pinmux_data[] = { PINMUX_DATA(I2C3_SDA_MARK, FN_SEL_IICDVFS_1), }; -/* R8A7790 has 6 banks with 32 GPIOs in each = 192 GPIOs */ -#define ROW_GROUP_A (r) ('Z' - 'A' + 1 + (r)) -#define PIN_NUMBER (r, c) (((r) - 'A') * 31 + (c) + 200) -#define PIN_A_NUMBER (r, c) PIN_NUMBER(ROW_GROUP_A(r), c) +/* +* Pins not associated with a GPIO port. +*/ +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 */ -SH_PFC_PIN_NAMED (ROW_GROUP_A ('F' ),15 ,AF15 ), -SH_PFC_PIN_NAMED (ROW_GROUP_A ('G' ),15 ,AG15 ), -SH_PFC_PIN_NAMED (ROW_GROUP_A ('H' ),15 ,AH15 ), -SH_PFC_PIN_NAMED (ROW_GROUP_A ('J' ),15 ,AJ15 ), +PINMUX_NOGP_ALL (), };/* - AUDIO CLOCK ------------------------------------------------------------ */ @@ -1867,6 +1871,86 @@ static const unsigned int avb_gmii_mux[] = {AVB_TX_EN_MARK ,AVB_TX_ER_MARK ,AVB_TX_CLK_MARK , AVB_COL_MARK, }; +/* - CAN0 ----------------------------------------------------------------- */ +static const unsigned int can0_data_pins[] = { +/* CAN0 RX */ +RCAR_GP_PIN (1 ,17 ), +/* CAN0 TX */ +RCAR_GP_PIN (1 ,19 ), +}; +static const unsigned int can0_data_mux[] = { +CAN0_RX_MARK , +CAN0_TX_MARK , +}; +static const unsigned int can0_data_b_pins[] = { +/* CAN0 RXB */ +RCAR_GP_PIN (4 ,5 ), +/* CAN0 TXB */ +RCAR_GP_PIN (4 ,4 ), +}; +static const unsigned int can0_data_b_mux[] = { +CAN0_RX_B_MARK , +CAN0_TX_B_MARK , +}; +static const unsigned int can0_data_c_pins[] = { +/* CAN0 RXC */ +RCAR_GP_PIN (4 ,26 ), +/* CAN0 TXC */ +RCAR_GP_PIN (4 ,23 ), +}; +static const unsigned int can0_data_c_mux[] = { +CAN0_RX_C_MARK , +CAN0_TX_C_MARK , +}; +static const unsigned int can0_data_d_pins[] = { +/* CAN0 RXD */ +RCAR_GP_PIN (4 ,26 ), +/* CAN0 TXD */ +RCAR_GP_PIN (4 ,18 ), +}; +static const unsigned int can0_data_d_mux[] = { +CAN0_RX_D_MARK , +CAN0_TX_D_MARK , +}; +/* - CAN1 ----------------------------------------------------------------- */ +static const unsigned int can1_data_pins[] = { +/* CAN1 RX */ +RCAR_GP_PIN (1 ,22 ), +/* CAN1 TX */ +RCAR_GP_PIN (1 ,18 ), +}; +static const unsigned int can1_data_mux[] = { +CAN1_RX_MARK , +CAN1_TX_MARK , +}; +static const unsigned int can1_data_b_pins[] = { +/* CAN1 RXB */ +RCAR_GP_PIN (4 ,7 ), +/* CAN1 TXB */ +RCAR_GP_PIN (4 ,6 ), +}; +static const unsigned int can1_data_b_mux[] = { +CAN1_RX_B_MARK , +CAN1_TX_B_MARK , +}; +/* - CAN Clock -------------------------------------------------------------- */ +static const unsigned int can_clk_pins[] = { +/* CLK */ +RCAR_GP_PIN (1 ,21 ), +}; + +static const unsigned int can_clk_mux[] = { +CAN_CLK_MARK , +}; + +static const unsigned int can_clk_b_pins[] = { +/* CLK */ +RCAR_GP_PIN (4 ,3 ), +}; + +static const unsigned int can_clk_b_mux[] = { +CAN_CLK_B_MARK , +};/* - DU RGB ----------------------------------------------------------------- */ static const unsigned int du_rgb666_pins[] = { /* R[7:2], G[7:2], B[7:2] */@@ -2135,7 +2219,7 @@ static const unsigned int hscif1_ctrl_b_mux[] = {/* - I2C0 ------------------------------------------------------------------- */ static const unsigned int i2c0_pins[] = {/* SCL, SDA */ -PIN_A_NUMBER ('G' ,15 ),PIN_A_NUMBER ('F' ,15 ), +PIN_IIC0_SCL ,PIN_IIC0_SDA , };static const unsigned int i2c0_mux[] = {I2C0_SCL_MARK ,I2C0_SDA_MARK ,@@ -2201,7 +2285,7 @@ static const unsigned int i2c2_e_mux[] = {/* - I2C3 ------------------------------------------------------------------- */ static const unsigned int i2c3_pins[] = {/* SCL, SDA */ -PIN_A_NUMBER ('J' ,15 ),PIN_A_NUMBER ('H' ,15 ), +PIN_IIC3_SCL ,PIN_IIC3_SDA , };static const unsigned int i2c3_mux[] = {I2C3_SCL_MARK ,I2C3_SDA_MARK ,@@ -2209,7 +2293,7 @@ static const unsigned int i2c3_mux[] = {/* - IIC0 (I2C4) ------------------------------------------------------------ */ static const unsigned int iic0_pins[] = {/* SCL, SDA */ -PIN_A_NUMBER ('G' ,15 ),PIN_A_NUMBER ('F' ,15 ), +PIN_IIC0_SCL ,PIN_IIC0_SDA , };static const unsigned int iic0_mux[] = {IIC0_SCL_MARK ,IIC0_SDA_MARK ,@@ -2274,8 +2358,8 @@ static const unsigned int iic2_e_mux[] = { };/* - IIC3 (I2C7) ------------------------------------------------------------ */ static const unsigned int iic3_pins[] = { -/* SCL, SDA */ -PIN_A_NUMBER ('J' ,15 ),PIN_A_NUMBER ('H' ,15 ), +/* SCL, SDA */ +PIN_IIC3_SCL ,PIN_IIC3_SDA , };static const unsigned int iic3_mux[] = {IIC3_SCL_MARK ,IIC3_SDA_MARK ,@@ -2309,6 +2393,8 @@ static const unsigned int intc_irq3_pins[] = {static const unsigned int intc_irq3_mux[] = {IRQ3_MARK , }; + +#ifdef CONFIG_PINCTRL_PFC_R8A7790 /* - MLB+ ------------------------------------------------------------------- */ static const unsigned int mlb_3pin_pins[] = { RCAR_GP_PIN(4, 0), RCAR_GP_PIN(4, 1), RCAR_GP_PIN(4, 2),@@ -2316,6 +2402,8 @@ static const unsigned int mlb_3pin_pins[] = {static const unsigned int mlb_3pin_mux[] = {MLB_CLK_MARK ,MLB_SIG_MARK ,MLB_DAT_MARK , }; +#endif /* CONFIG_PINCTRL_PFC_R8A7790 */ +/* - MMCIF0 ----------------------------------------------------------------- */ static const unsigned int mmc0_data1_pins[] = {/* D[0] */ @@ -3607,6 +3695,13 @@ static const unsigned int usb1_pins[] = {static const unsigned int usb1_mux[] = {USB1_PWEN_MARK ,USB1_OVC_MARK , }; +static const unsigned int usb1_pwen_pins[] = { +/* PWEN */ +RCAR_GP_PIN (5 ,20 ), +}; +static const unsigned int usb1_pwen_mux[] = { +USB1_PWEN_MARK , +};/* - USB2 ------------------------------------------------------------------- */ static const unsigned int usb2_pins[] = {/* PWEN, OVC */ @@ -3775,6 +3870,72 @@ static const unsigned int vin1_data18_mux[] = {VI1_R4_MARK ,VI1_R5_MARK , VI1_R6_MARK, VI1_R7_MARK, }; +static const union vin_data vin1_data_b_pins = { + .data24 = { +/* B */ +RCAR_GP_PIN (3 ,0 ),RCAR_GP_PIN (3 ,1 ), +RCAR_GP_PIN (3 ,2 ),RCAR_GP_PIN (3 ,3 ), +RCAR_GP_PIN (3 ,4 ),RCAR_GP_PIN (3 ,5 ), +RCAR_GP_PIN (3 ,6 ),RCAR_GP_PIN (3 ,7 ), +/* G */ +RCAR_GP_PIN (1 ,14 ),RCAR_GP_PIN (1 ,15 ), +RCAR_GP_PIN (1 ,17 ),RCAR_GP_PIN (1 ,20 ), +RCAR_GP_PIN (1 ,22 ),RCAR_GP_PIN (1 ,12 ), +RCAR_GP_PIN (1 ,9 ),RCAR_GP_PIN (1 ,7 ), +/* R */ +RCAR_GP_PIN (0 ,27 ),RCAR_GP_PIN (0 ,28 ), +RCAR_GP_PIN (0 ,29 ),RCAR_GP_PIN (1 ,4 ), +RCAR_GP_PIN (1 ,5 ),RCAR_GP_PIN (1 ,6 ), +RCAR_GP_PIN (1 ,10 ),RCAR_GP_PIN (1 ,8 ), + }, +}; +static const union vin_data vin1_data_b_mux = { + .data24 = { +/* B */ +VI1_DATA0_VI1_B0_B_MARK ,VI1_DATA1_VI1_B1_B_MARK , +VI1_DATA2_VI1_B2_B_MARK ,VI1_DATA3_VI1_B3_B_MARK , +VI1_DATA4_VI1_B4_B_MARK ,VI1_DATA5_VI1_B5_B_MARK , +VI1_DATA6_VI1_B6_B_MARK ,VI1_DATA7_VI1_B7_B_MARK , +/* G */ +VI1_G0_B_MARK ,VI1_G1_B_MARK , +VI1_G2_B_MARK ,VI1_G3_B_MARK , +VI1_G4_B_MARK ,VI1_G5_B_MARK , +VI1_G6_B_MARK ,VI1_G7_B_MARK , +/* R */ +VI1_R0_B_MARK ,VI1_R1_B_MARK , +VI1_R2_B_MARK ,VI1_R3_B_MARK , +VI1_R4_B_MARK ,VI1_R5_B_MARK , +VI1_R6_B_MARK ,VI1_R7_B_MARK , + }, +}; +static const unsigned int vin1_data18_b_pins[] = { +/* B */ +RCAR_GP_PIN (3 ,2 ),RCAR_GP_PIN (3 ,3 ), +RCAR_GP_PIN (3 ,4 ),RCAR_GP_PIN (3 ,5 ), +RCAR_GP_PIN (3 ,6 ),RCAR_GP_PIN (3 ,7 ), +/* G */ +RCAR_GP_PIN (1 ,17 ),RCAR_GP_PIN (1 ,20 ), +RCAR_GP_PIN (1 ,22 ),RCAR_GP_PIN (1 ,12 ), +RCAR_GP_PIN (1 ,9 ),RCAR_GP_PIN (1 ,7 ), +/* R */ +RCAR_GP_PIN (0 ,29 ),RCAR_GP_PIN (1 ,4 ), +RCAR_GP_PIN (1 ,5 ),RCAR_GP_PIN (1 ,6 ), +RCAR_GP_PIN (1 ,10 ),RCAR_GP_PIN (1 ,8 ), +}; +static const unsigned int vin1_data18_b_mux[] = { +/* B */ +VI1_DATA2_VI1_B2_B_MARK ,VI1_DATA3_VI1_B3_B_MARK , +VI1_DATA4_VI1_B4_B_MARK ,VI1_DATA5_VI1_B5_B_MARK , +VI1_DATA6_VI1_B6_B_MARK ,VI1_DATA7_VI1_B7_B_MARK , +/* G */ +VI1_G2_B_MARK ,VI1_G3_B_MARK , +VI1_G4_B_MARK ,VI1_G5_B_MARK , +VI1_G6_B_MARK ,VI1_G7_B_MARK , +/* R */ +VI1_R2_B_MARK ,VI1_R3_B_MARK , +VI1_R4_B_MARK ,VI1_R5_B_MARK , +VI1_R6_B_MARK ,VI1_R7_B_MARK , +};static const unsigned int vin1_sync_pins[] = {RCAR_GP_PIN (1 ,24 ),/* HSYNC */ RCAR_GP_PIN(1, 25), /* VSYNC */@@ -3783,24 +3944,50 @@ static const unsigned int vin1_sync_mux[] = {VI1_HSYNC_N_MARK , VI1_VSYNC_N_MARK, }; +static const unsigned int vin1_sync_b_pins[] = { +RCAR_GP_PIN (1 ,24 ),/* HSYNC */ +RCAR_GP_PIN (1 ,25 ),/* VSYNC */ +}; +static const unsigned int vin1_sync_b_mux[] = { +VI1_HSYNC_N_B_MARK , +VI1_VSYNC_N_B_MARK , +};static const unsigned int vin1_field_pins[] = {RCAR_GP_PIN (1 ,13 ), };static const unsigned int vin1_field_mux[] = {VI1_FIELD_MARK , }; +static const unsigned int vin1_field_b_pins[] = { +RCAR_GP_PIN (1 ,13 ), +}; +static const unsigned int vin1_field_b_mux[] = { +VI1_FIELD_B_MARK , +};static const unsigned int vin1_clkenb_pins[] = {RCAR_GP_PIN (1 ,26 ), };static const unsigned int vin1_clkenb_mux[] = {VI1_CLKENB_MARK , }; +static const unsigned int vin1_clkenb_b_pins[] = { +RCAR_GP_PIN (1 ,26 ), +}; +static const unsigned int vin1_clkenb_b_mux[] = { +VI1_CLKENB_B_MARK , +};static const unsigned int vin1_clk_pins[] = {RCAR_GP_PIN (2 ,9 ), };static const unsigned int vin1_clk_mux[] = {VI1_CLK_MARK , }; +static const unsigned int vin1_clk_b_pins[] = { +RCAR_GP_PIN (3 ,15 ), +}; +static const unsigned int vin1_clk_b_mux[] = { +VI1_CLK_B_MARK , +};/* - VIN2 ----------------------------------------------------------------- */ static const union vin_data vin2_data_pins = { .data24 = {@@ -3868,6 +4055,18 @@ static const unsigned int vin2_data18_mux[] = {VI2_R4_MARK ,VI2_R5_MARK , VI2_R6_MARK, VI2_R7_MARK, }; +static const unsigned int vin2_g8_pins[] = { +RCAR_GP_PIN (0 ,27 ),RCAR_GP_PIN (0 ,28 ), +RCAR_GP_PIN (0 ,29 ),RCAR_GP_PIN (1 ,10 ), +RCAR_GP_PIN (1 ,4 ),RCAR_GP_PIN (1 ,5 ), +RCAR_GP_PIN (1 ,6 ),RCAR_GP_PIN (1 ,7 ), +}; +static const unsigned int vin2_g8_mux[] = { +VI2_G0_MARK ,VI2_G1_MARK , +VI2_G2_MARK ,VI2_G3_MARK , +VI2_G4_MARK ,VI2_G5_MARK , +VI2_G6_MARK ,VI2_G7_MARK , +};static const unsigned int vin2_sync_pins[] = {RCAR_GP_PIN (1 ,16 ),/* HSYNC */ RCAR_GP_PIN(1, 21), /* VSYNC */@@ -3934,297 +4133,330 @@ static const unsigned int vin3_clk_mux[] = { VI3_CLK_MARK, }; -static const struct sh_pfc_pin_group pinmux_groups[] = { -SH_PFC_PIN_GROUP (audio_clk_a), -SH_PFC_PIN_GROUP (audio_clk_b), -SH_PFC_PIN_GROUP (audio_clk_c), -SH_PFC_PIN_GROUP (audio_clkout), -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 (avb_link), -SH_PFC_PIN_GROUP (avb_magic), -SH_PFC_PIN_GROUP (avb_phy_int), -SH_PFC_PIN_GROUP (avb_mdio), -SH_PFC_PIN_GROUP (avb_mii), -SH_PFC_PIN_GROUP (avb_gmii), -SH_PFC_PIN_GROUP (du_rgb666), -SH_PFC_PIN_GROUP (du_rgb888), -SH_PFC_PIN_GROUP (du_clk_out_0), -SH_PFC_PIN_GROUP (du_clk_out_1), -SH_PFC_PIN_GROUP (du_sync_0), -SH_PFC_PIN_GROUP (du_sync_1), -SH_PFC_PIN_GROUP (du_cde), -SH_PFC_PIN_GROUP (du0_clk_in), -SH_PFC_PIN_GROUP (du1_clk_in), -SH_PFC_PIN_GROUP (du2_clk_in), -SH_PFC_PIN_GROUP (eth_link), -SH_PFC_PIN_GROUP (eth_magic), -SH_PFC_PIN_GROUP (eth_mdio), -SH_PFC_PIN_GROUP (eth_rmii), -SH_PFC_PIN_GROUP (hscif0_data), -SH_PFC_PIN_GROUP (hscif0_clk), -SH_PFC_PIN_GROUP (hscif0_ctrl), -SH_PFC_PIN_GROUP (hscif0_data_b), -SH_PFC_PIN_GROUP (hscif0_ctrl_b), -SH_PFC_PIN_GROUP (hscif0_data_c), -SH_PFC_PIN_GROUP (hscif0_ctrl_c), -SH_PFC_PIN_GROUP (hscif0_data_d), -SH_PFC_PIN_GROUP (hscif0_ctrl_d), -SH_PFC_PIN_GROUP (hscif0_data_e), -SH_PFC_PIN_GROUP (hscif0_ctrl_e), -SH_PFC_PIN_GROUP (hscif0_data_f), -SH_PFC_PIN_GROUP (hscif0_ctrl_f), -SH_PFC_PIN_GROUP (hscif1_data), -SH_PFC_PIN_GROUP (hscif1_clk), -SH_PFC_PIN_GROUP (hscif1_ctrl), -SH_PFC_PIN_GROUP (hscif1_data_b), -SH_PFC_PIN_GROUP (hscif1_clk_b), -SH_PFC_PIN_GROUP (hscif1_ctrl_b), -SH_PFC_PIN_GROUP (i2c0), -SH_PFC_PIN_GROUP (i2c1), -SH_PFC_PIN_GROUP (i2c1_b), -SH_PFC_PIN_GROUP (i2c1_c), -SH_PFC_PIN_GROUP (i2c2), -SH_PFC_PIN_GROUP (i2c2_b), -SH_PFC_PIN_GROUP (i2c2_c), -SH_PFC_PIN_GROUP (i2c2_d), -SH_PFC_PIN_GROUP (i2c2_e), -SH_PFC_PIN_GROUP (i2c3), -SH_PFC_PIN_GROUP (iic0), -SH_PFC_PIN_GROUP (iic1), -SH_PFC_PIN_GROUP (iic1_b), -SH_PFC_PIN_GROUP (iic1_c), -SH_PFC_PIN_GROUP (iic2), -SH_PFC_PIN_GROUP (iic2_b), -SH_PFC_PIN_GROUP (iic2_c), -SH_PFC_PIN_GROUP (iic2_d), -SH_PFC_PIN_GROUP (iic2_e), -SH_PFC_PIN_GROUP (iic3), -SH_PFC_PIN_GROUP (intc_irq0), -SH_PFC_PIN_GROUP (intc_irq1), -SH_PFC_PIN_GROUP (intc_irq2), -SH_PFC_PIN_GROUP (intc_irq3), -SH_PFC_PIN_GROUP (mlb_3pin), -SH_PFC_PIN_GROUP (mmc0_data1), -SH_PFC_PIN_GROUP (mmc0_data4), -SH_PFC_PIN_GROUP (mmc0_data8), -SH_PFC_PIN_GROUP (mmc0_ctrl), -SH_PFC_PIN_GROUP (mmc1_data1), -SH_PFC_PIN_GROUP (mmc1_data4), -SH_PFC_PIN_GROUP (mmc1_data8), -SH_PFC_PIN_GROUP (mmc1_ctrl), -SH_PFC_PIN_GROUP (msiof0_clk), -SH_PFC_PIN_GROUP (msiof0_sync), -SH_PFC_PIN_GROUP (msiof0_ss1), -SH_PFC_PIN_GROUP (msiof0_ss2), -SH_PFC_PIN_GROUP (msiof0_rx), -SH_PFC_PIN_GROUP (msiof0_tx), -SH_PFC_PIN_GROUP (msiof0_clk_b), -SH_PFC_PIN_GROUP (msiof0_ss1_b), -SH_PFC_PIN_GROUP (msiof0_ss2_b), -SH_PFC_PIN_GROUP (msiof0_rx_b), -SH_PFC_PIN_GROUP (msiof0_tx_b), -SH_PFC_PIN_GROUP (msiof1_clk), -SH_PFC_PIN_GROUP (msiof1_sync), -SH_PFC_PIN_GROUP (msiof1_ss1), -SH_PFC_PIN_GROUP (msiof1_ss2), -SH_PFC_PIN_GROUP (msiof1_rx), -SH_PFC_PIN_GROUP (msiof1_tx), -SH_PFC_PIN_GROUP (msiof1_clk_b), -SH_PFC_PIN_GROUP (msiof1_ss1_b), -SH_PFC_PIN_GROUP (msiof1_ss2_b), -SH_PFC_PIN_GROUP (msiof1_rx_b), -SH_PFC_PIN_GROUP (msiof1_tx_b), -SH_PFC_PIN_GROUP (msiof2_clk), -SH_PFC_PIN_GROUP (msiof2_sync), -SH_PFC_PIN_GROUP (msiof2_ss1), -SH_PFC_PIN_GROUP (msiof2_ss2), -SH_PFC_PIN_GROUP (msiof2_rx), -SH_PFC_PIN_GROUP (msiof2_tx), -SH_PFC_PIN_GROUP (msiof3_clk), -SH_PFC_PIN_GROUP (msiof3_sync), -SH_PFC_PIN_GROUP (msiof3_ss1), -SH_PFC_PIN_GROUP (msiof3_ss2), -SH_PFC_PIN_GROUP (msiof3_rx), -SH_PFC_PIN_GROUP (msiof3_tx), -SH_PFC_PIN_GROUP (msiof3_clk_b), -SH_PFC_PIN_GROUP (msiof3_sync_b), -SH_PFC_PIN_GROUP (msiof3_rx_b), -SH_PFC_PIN_GROUP (msiof3_tx_b), -SH_PFC_PIN_GROUP (pwm0), -SH_PFC_PIN_GROUP (pwm0_b), -SH_PFC_PIN_GROUP (pwm1), -SH_PFC_PIN_GROUP (pwm1_b), -SH_PFC_PIN_GROUP (pwm2), -SH_PFC_PIN_GROUP (pwm3), -SH_PFC_PIN_GROUP (pwm4), -SH_PFC_PIN_GROUP (pwm5), -SH_PFC_PIN_GROUP (pwm6), -SH_PFC_PIN_GROUP (qspi_ctrl), -SH_PFC_PIN_GROUP (qspi_data2), -SH_PFC_PIN_GROUP (qspi_data4), -SH_PFC_PIN_GROUP (scif0_data), -SH_PFC_PIN_GROUP (scif0_clk), -SH_PFC_PIN_GROUP (scif0_ctrl), -SH_PFC_PIN_GROUP (scif0_data_b), -SH_PFC_PIN_GROUP (scif1_data), -SH_PFC_PIN_GROUP (scif1_clk), -SH_PFC_PIN_GROUP (scif1_ctrl), -SH_PFC_PIN_GROUP (scif1_data_b), -SH_PFC_PIN_GROUP (scif1_data_c), -SH_PFC_PIN_GROUP (scif1_data_d), -SH_PFC_PIN_GROUP (scif1_clk_d), -SH_PFC_PIN_GROUP (scif1_data_e), -SH_PFC_PIN_GROUP (scif1_clk_e), -SH_PFC_PIN_GROUP (scif2_data), -SH_PFC_PIN_GROUP (scif2_clk), -SH_PFC_PIN_GROUP (scif2_data_b), -SH_PFC_PIN_GROUP (scifa0_data), -SH_PFC_PIN_GROUP (scifa0_clk), -SH_PFC_PIN_GROUP (scifa0_ctrl), -SH_PFC_PIN_GROUP (scifa0_data_b), -SH_PFC_PIN_GROUP (scifa0_clk_b), -SH_PFC_PIN_GROUP (scifa0_ctrl_b), -SH_PFC_PIN_GROUP (scifa1_data), -SH_PFC_PIN_GROUP (scifa1_clk), -SH_PFC_PIN_GROUP (scifa1_ctrl), -SH_PFC_PIN_GROUP (scifa1_data_b), -SH_PFC_PIN_GROUP (scifa1_clk_b), -SH_PFC_PIN_GROUP (scifa1_ctrl_b), -SH_PFC_PIN_GROUP (scifa1_data_c), -SH_PFC_PIN_GROUP (scifa1_clk_c), -SH_PFC_PIN_GROUP (scifa1_ctrl_c), -SH_PFC_PIN_GROUP (scifa1_data_d), -SH_PFC_PIN_GROUP (scifa1_clk_d), -SH_PFC_PIN_GROUP (scifa1_ctrl_d), -SH_PFC_PIN_GROUP (scifa2_data), -SH_PFC_PIN_GROUP (scifa2_clk), -SH_PFC_PIN_GROUP (scifa2_ctrl), -SH_PFC_PIN_GROUP (scifa2_data_b), -SH_PFC_PIN_GROUP (scifa2_data_c), -SH_PFC_PIN_GROUP (scifa2_clk_c), -SH_PFC_PIN_GROUP (scifb0_data), -SH_PFC_PIN_GROUP (scifb0_clk), -SH_PFC_PIN_GROUP (scifb0_ctrl), -SH_PFC_PIN_GROUP (scifb0_data_b), -SH_PFC_PIN_GROUP (scifb0_clk_b), -SH_PFC_PIN_GROUP (scifb0_ctrl_b), -SH_PFC_PIN_GROUP (scifb0_data_c), -SH_PFC_PIN_GROUP (scifb1_data), -SH_PFC_PIN_GROUP (scifb1_clk), -SH_PFC_PIN_GROUP (scifb1_ctrl), -SH_PFC_PIN_GROUP (scifb1_data_b), -SH_PFC_PIN_GROUP (scifb1_clk_b), -SH_PFC_PIN_GROUP (scifb1_ctrl_b), -SH_PFC_PIN_GROUP (scifb1_data_c), -SH_PFC_PIN_GROUP (scifb1_data_d), -SH_PFC_PIN_GROUP (scifb1_data_e), -SH_PFC_PIN_GROUP (scifb1_clk_e), -SH_PFC_PIN_GROUP (scifb1_data_f), -SH_PFC_PIN_GROUP (scifb1_data_g), -SH_PFC_PIN_GROUP (scifb1_clk_g), -SH_PFC_PIN_GROUP (scifb2_data), -SH_PFC_PIN_GROUP (scifb2_clk), -SH_PFC_PIN_GROUP (scifb2_ctrl), -SH_PFC_PIN_GROUP (scifb2_data_b), -SH_PFC_PIN_GROUP (scifb2_clk_b), -SH_PFC_PIN_GROUP (scifb2_ctrl_b), -SH_PFC_PIN_GROUP (scifb2_data_c), -SH_PFC_PIN_GROUP (scif_clk), -SH_PFC_PIN_GROUP (scif_clk_b), -SH_PFC_PIN_GROUP (sdhi0_data1), -SH_PFC_PIN_GROUP (sdhi0_data4), -SH_PFC_PIN_GROUP (sdhi0_ctrl), -SH_PFC_PIN_GROUP (sdhi0_cd), -SH_PFC_PIN_GROUP (sdhi0_wp), -SH_PFC_PIN_GROUP (sdhi1_data1), -SH_PFC_PIN_GROUP (sdhi1_data4), -SH_PFC_PIN_GROUP (sdhi1_ctrl), -SH_PFC_PIN_GROUP (sdhi1_cd), -SH_PFC_PIN_GROUP (sdhi1_wp), -SH_PFC_PIN_GROUP (sdhi2_data1), -SH_PFC_PIN_GROUP (sdhi2_data4), -SH_PFC_PIN_GROUP (sdhi2_ctrl), -SH_PFC_PIN_GROUP (sdhi2_cd), -SH_PFC_PIN_GROUP (sdhi2_wp), -SH_PFC_PIN_GROUP (sdhi3_data1), -SH_PFC_PIN_GROUP (sdhi3_data4), -SH_PFC_PIN_GROUP (sdhi3_ctrl), -SH_PFC_PIN_GROUP (sdhi3_cd), -SH_PFC_PIN_GROUP (sdhi3_wp), -SH_PFC_PIN_GROUP (ssi0_data), -SH_PFC_PIN_GROUP (ssi0129_ctrl), -SH_PFC_PIN_GROUP (ssi1_data), -SH_PFC_PIN_GROUP (ssi1_ctrl), -SH_PFC_PIN_GROUP (ssi2_data), -SH_PFC_PIN_GROUP (ssi2_ctrl), -SH_PFC_PIN_GROUP (ssi3_data), -SH_PFC_PIN_GROUP (ssi34_ctrl), -SH_PFC_PIN_GROUP (ssi4_data), -SH_PFC_PIN_GROUP (ssi4_ctrl), -SH_PFC_PIN_GROUP (ssi5), -SH_PFC_PIN_GROUP (ssi5_b), -SH_PFC_PIN_GROUP (ssi5_c), -SH_PFC_PIN_GROUP (ssi6), -SH_PFC_PIN_GROUP (ssi6_b), -SH_PFC_PIN_GROUP (ssi7_data), -SH_PFC_PIN_GROUP (ssi7_b_data), -SH_PFC_PIN_GROUP (ssi7_c_data), -SH_PFC_PIN_GROUP (ssi78_ctrl), -SH_PFC_PIN_GROUP (ssi78_b_ctrl), -SH_PFC_PIN_GROUP (ssi78_c_ctrl), -SH_PFC_PIN_GROUP (ssi8_data), -SH_PFC_PIN_GROUP (ssi8_b_data), -SH_PFC_PIN_GROUP (ssi8_c_data), -SH_PFC_PIN_GROUP (ssi9_data), -SH_PFC_PIN_GROUP (ssi9_ctrl), -SH_PFC_PIN_GROUP (tpu0_to0), -SH_PFC_PIN_GROUP (tpu0_to1), -SH_PFC_PIN_GROUP (tpu0_to2), -SH_PFC_PIN_GROUP (tpu0_to3), -SH_PFC_PIN_GROUP (usb0), -SH_PFC_PIN_GROUP (usb0_ovc_vbus), -SH_PFC_PIN_GROUP (usb1), -SH_PFC_PIN_GROUP (usb2), -VIN_DATA_PIN_GROUP (vin0_data,24 ), -VIN_DATA_PIN_GROUP (vin0_data,20 ), -SH_PFC_PIN_GROUP (vin0_data18), -VIN_DATA_PIN_GROUP (vin0_data,16 ), -VIN_DATA_PIN_GROUP (vin0_data,12 ), -VIN_DATA_PIN_GROUP (vin0_data,10 ), -VIN_DATA_PIN_GROUP (vin0_data,8 ), -VIN_DATA_PIN_GROUP (vin0_data,4 ), -SH_PFC_PIN_GROUP (vin0_sync), -SH_PFC_PIN_GROUP (vin0_field), -SH_PFC_PIN_GROUP (vin0_clkenb), -SH_PFC_PIN_GROUP (vin0_clk), -VIN_DATA_PIN_GROUP (vin1_data,24 ), -VIN_DATA_PIN_GROUP (vin1_data,20 ), -SH_PFC_PIN_GROUP (vin1_data18), -VIN_DATA_PIN_GROUP (vin1_data,16 ), -VIN_DATA_PIN_GROUP (vin1_data,12 ), -VIN_DATA_PIN_GROUP (vin1_data,10 ), -VIN_DATA_PIN_GROUP (vin1_data,8 ), -VIN_DATA_PIN_GROUP (vin1_data,4 ), -SH_PFC_PIN_GROUP (vin1_sync), -SH_PFC_PIN_GROUP (vin1_field), -SH_PFC_PIN_GROUP (vin1_clkenb), -SH_PFC_PIN_GROUP (vin1_clk), -VIN_DATA_PIN_GROUP (vin2_data,24 ), -SH_PFC_PIN_GROUP (vin2_data18), -VIN_DATA_PIN_GROUP (vin2_data,16 ), -VIN_DATA_PIN_GROUP (vin2_data,8 ), -VIN_DATA_PIN_GROUP (vin2_data,4 ), -SH_PFC_PIN_GROUP (vin2_sync), -SH_PFC_PIN_GROUP (vin2_field), -SH_PFC_PIN_GROUP (vin2_clkenb), -SH_PFC_PIN_GROUP (vin2_clk), -SH_PFC_PIN_GROUP (vin3_data8), -SH_PFC_PIN_GROUP (vin3_sync), -SH_PFC_PIN_GROUP (vin3_field), -SH_PFC_PIN_GROUP (vin3_clkenb), -SH_PFC_PIN_GROUP (vin3_clk), +static const struct { +struct sh_pfc_pin_group common[311 ]; +#ifdef CONFIG_PINCTRL_PFC_R8A7790 +struct sh_pfc_pin_group automotive[1 ]; +#endif +} pinmux_groups = { + .common = { +SH_PFC_PIN_GROUP (audio_clk_a), +SH_PFC_PIN_GROUP (audio_clk_b), +SH_PFC_PIN_GROUP (audio_clk_c), +SH_PFC_PIN_GROUP (audio_clkout), +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 (avb_link), +SH_PFC_PIN_GROUP (avb_magic), +SH_PFC_PIN_GROUP (avb_phy_int), +SH_PFC_PIN_GROUP (avb_mdio), +SH_PFC_PIN_GROUP (avb_mii), +SH_PFC_PIN_GROUP (avb_gmii), +SH_PFC_PIN_GROUP (can0_data), +SH_PFC_PIN_GROUP (can0_data_b), +SH_PFC_PIN_GROUP (can0_data_c), +SH_PFC_PIN_GROUP (can0_data_d), +SH_PFC_PIN_GROUP (can1_data), +SH_PFC_PIN_GROUP (can1_data_b), +SH_PFC_PIN_GROUP (can_clk), +SH_PFC_PIN_GROUP (can_clk_b), +SH_PFC_PIN_GROUP (du_rgb666), +SH_PFC_PIN_GROUP (du_rgb888), +SH_PFC_PIN_GROUP (du_clk_out_0), +SH_PFC_PIN_GROUP (du_clk_out_1), +SH_PFC_PIN_GROUP (du_sync_0), +SH_PFC_PIN_GROUP (du_sync_1), +SH_PFC_PIN_GROUP (du_cde), +SH_PFC_PIN_GROUP (du0_clk_in), +SH_PFC_PIN_GROUP (du1_clk_in), +SH_PFC_PIN_GROUP (du2_clk_in), +SH_PFC_PIN_GROUP (eth_link), +SH_PFC_PIN_GROUP (eth_magic), +SH_PFC_PIN_GROUP (eth_mdio), +SH_PFC_PIN_GROUP (eth_rmii), +SH_PFC_PIN_GROUP (hscif0_data), +SH_PFC_PIN_GROUP (hscif0_clk), +SH_PFC_PIN_GROUP (hscif0_ctrl), +SH_PFC_PIN_GROUP (hscif0_data_b), +SH_PFC_PIN_GROUP (hscif0_ctrl_b), +SH_PFC_PIN_GROUP (hscif0_data_c), +SH_PFC_PIN_GROUP (hscif0_ctrl_c), +SH_PFC_PIN_GROUP (hscif0_data_d), +SH_PFC_PIN_GROUP (hscif0_ctrl_d), +SH_PFC_PIN_GROUP (hscif0_data_e), +SH_PFC_PIN_GROUP (hscif0_ctrl_e), +SH_PFC_PIN_GROUP (hscif0_data_f), +SH_PFC_PIN_GROUP (hscif0_ctrl_f), +SH_PFC_PIN_GROUP (hscif1_data), +SH_PFC_PIN_GROUP (hscif1_clk), +SH_PFC_PIN_GROUP (hscif1_ctrl), +SH_PFC_PIN_GROUP (hscif1_data_b), +SH_PFC_PIN_GROUP (hscif1_clk_b), +SH_PFC_PIN_GROUP (hscif1_ctrl_b), +SH_PFC_PIN_GROUP (i2c0), +SH_PFC_PIN_GROUP (i2c1), +SH_PFC_PIN_GROUP (i2c1_b), +SH_PFC_PIN_GROUP (i2c1_c), +SH_PFC_PIN_GROUP (i2c2), +SH_PFC_PIN_GROUP (i2c2_b), +SH_PFC_PIN_GROUP (i2c2_c), +SH_PFC_PIN_GROUP (i2c2_d), +SH_PFC_PIN_GROUP (i2c2_e), +SH_PFC_PIN_GROUP (i2c3), +SH_PFC_PIN_GROUP (iic0), +SH_PFC_PIN_GROUP (iic1), +SH_PFC_PIN_GROUP (iic1_b), +SH_PFC_PIN_GROUP (iic1_c), +SH_PFC_PIN_GROUP (iic2), +SH_PFC_PIN_GROUP (iic2_b), +SH_PFC_PIN_GROUP (iic2_c), +SH_PFC_PIN_GROUP (iic2_d), +SH_PFC_PIN_GROUP (iic2_e), +SH_PFC_PIN_GROUP (iic3), +SH_PFC_PIN_GROUP (intc_irq0), +SH_PFC_PIN_GROUP (intc_irq1), +SH_PFC_PIN_GROUP (intc_irq2), +SH_PFC_PIN_GROUP (intc_irq3), +SH_PFC_PIN_GROUP (mmc0_data1), +SH_PFC_PIN_GROUP (mmc0_data4), +SH_PFC_PIN_GROUP (mmc0_data8), +SH_PFC_PIN_GROUP (mmc0_ctrl), +SH_PFC_PIN_GROUP (mmc1_data1), +SH_PFC_PIN_GROUP (mmc1_data4), +SH_PFC_PIN_GROUP (mmc1_data8), +SH_PFC_PIN_GROUP (mmc1_ctrl), +SH_PFC_PIN_GROUP (msiof0_clk), +SH_PFC_PIN_GROUP (msiof0_sync), +SH_PFC_PIN_GROUP (msiof0_ss1), +SH_PFC_PIN_GROUP (msiof0_ss2), +SH_PFC_PIN_GROUP (msiof0_rx), +SH_PFC_PIN_GROUP (msiof0_tx), +SH_PFC_PIN_GROUP (msiof0_clk_b), +SH_PFC_PIN_GROUP (msiof0_ss1_b), +SH_PFC_PIN_GROUP (msiof0_ss2_b), +SH_PFC_PIN_GROUP (msiof0_rx_b), +SH_PFC_PIN_GROUP (msiof0_tx_b), +SH_PFC_PIN_GROUP (msiof1_clk), +SH_PFC_PIN_GROUP (msiof1_sync), +SH_PFC_PIN_GROUP (msiof1_ss1), +SH_PFC_PIN_GROUP (msiof1_ss2), +SH_PFC_PIN_GROUP (msiof1_rx), +SH_PFC_PIN_GROUP (msiof1_tx), +SH_PFC_PIN_GROUP (msiof1_clk_b), +SH_PFC_PIN_GROUP (msiof1_ss1_b), +SH_PFC_PIN_GROUP (msiof1_ss2_b), +SH_PFC_PIN_GROUP (msiof1_rx_b), +SH_PFC_PIN_GROUP (msiof1_tx_b), +SH_PFC_PIN_GROUP (msiof2_clk), +SH_PFC_PIN_GROUP (msiof2_sync), +SH_PFC_PIN_GROUP (msiof2_ss1), +SH_PFC_PIN_GROUP (msiof2_ss2), +SH_PFC_PIN_GROUP (msiof2_rx), +SH_PFC_PIN_GROUP (msiof2_tx), +SH_PFC_PIN_GROUP (msiof3_clk), +SH_PFC_PIN_GROUP (msiof3_sync), +SH_PFC_PIN_GROUP (msiof3_ss1), +SH_PFC_PIN_GROUP (msiof3_ss2), +SH_PFC_PIN_GROUP (msiof3_rx), +SH_PFC_PIN_GROUP (msiof3_tx), +SH_PFC_PIN_GROUP (msiof3_clk_b), +SH_PFC_PIN_GROUP (msiof3_sync_b), +SH_PFC_PIN_GROUP (msiof3_rx_b), +SH_PFC_PIN_GROUP (msiof3_tx_b), +SH_PFC_PIN_GROUP (pwm0), +SH_PFC_PIN_GROUP (pwm0_b), +SH_PFC_PIN_GROUP (pwm1), +SH_PFC_PIN_GROUP (pwm1_b), +SH_PFC_PIN_GROUP (pwm2), +SH_PFC_PIN_GROUP (pwm3), +SH_PFC_PIN_GROUP (pwm4), +SH_PFC_PIN_GROUP (pwm5), +SH_PFC_PIN_GROUP (pwm6), +SH_PFC_PIN_GROUP (qspi_ctrl), +SH_PFC_PIN_GROUP (qspi_data2), +SH_PFC_PIN_GROUP (qspi_data4), +SH_PFC_PIN_GROUP (scif0_data), +SH_PFC_PIN_GROUP (scif0_clk), +SH_PFC_PIN_GROUP (scif0_ctrl), +SH_PFC_PIN_GROUP (scif0_data_b), +SH_PFC_PIN_GROUP (scif1_data), +SH_PFC_PIN_GROUP (scif1_clk), +SH_PFC_PIN_GROUP (scif1_ctrl), +SH_PFC_PIN_GROUP (scif1_data_b), +SH_PFC_PIN_GROUP (scif1_data_c), +SH_PFC_PIN_GROUP (scif1_data_d), +SH_PFC_PIN_GROUP (scif1_clk_d), +SH_PFC_PIN_GROUP (scif1_data_e), +SH_PFC_PIN_GROUP (scif1_clk_e), +SH_PFC_PIN_GROUP (scif2_data), +SH_PFC_PIN_GROUP (scif2_clk), +SH_PFC_PIN_GROUP (scif2_data_b), +SH_PFC_PIN_GROUP (scifa0_data), +SH_PFC_PIN_GROUP (scifa0_clk), +SH_PFC_PIN_GROUP (scifa0_ctrl), +SH_PFC_PIN_GROUP (scifa0_data_b), +SH_PFC_PIN_GROUP (scifa0_clk_b), +SH_PFC_PIN_GROUP (scifa0_ctrl_b), +SH_PFC_PIN_GROUP (scifa1_data), +SH_PFC_PIN_GROUP (scifa1_clk), +SH_PFC_PIN_GROUP (scifa1_ctrl), +SH_PFC_PIN_GROUP (scifa1_data_b), +SH_PFC_PIN_GROUP (scifa1_clk_b), +SH_PFC_PIN_GROUP (scifa1_ctrl_b), +SH_PFC_PIN_GROUP (scifa1_data_c), +SH_PFC_PIN_GROUP (scifa1_clk_c), +SH_PFC_PIN_GROUP (scifa1_ctrl_c), +SH_PFC_PIN_GROUP (scifa1_data_d), +SH_PFC_PIN_GROUP (scifa1_clk_d), +SH_PFC_PIN_GROUP (scifa1_ctrl_d), +SH_PFC_PIN_GROUP (scifa2_data), +SH_PFC_PIN_GROUP (scifa2_clk), +SH_PFC_PIN_GROUP (scifa2_ctrl), +SH_PFC_PIN_GROUP (scifa2_data_b), +SH_PFC_PIN_GROUP (scifa2_data_c), +SH_PFC_PIN_GROUP (scifa2_clk_c), +SH_PFC_PIN_GROUP (scifb0_data), +SH_PFC_PIN_GROUP (scifb0_clk), +SH_PFC_PIN_GROUP (scifb0_ctrl), +SH_PFC_PIN_GROUP (scifb0_data_b), +SH_PFC_PIN_GROUP (scifb0_clk_b), +SH_PFC_PIN_GROUP (scifb0_ctrl_b), +SH_PFC_PIN_GROUP (scifb0_data_c), +SH_PFC_PIN_GROUP (scifb1_data), +SH_PFC_PIN_GROUP (scifb1_clk), +SH_PFC_PIN_GROUP (scifb1_ctrl), +SH_PFC_PIN_GROUP (scifb1_data_b), +SH_PFC_PIN_GROUP (scifb1_clk_b), +SH_PFC_PIN_GROUP (scifb1_ctrl_b), +SH_PFC_PIN_GROUP (scifb1_data_c), +SH_PFC_PIN_GROUP (scifb1_data_d), +SH_PFC_PIN_GROUP (scifb1_data_e), +SH_PFC_PIN_GROUP (scifb1_clk_e), +SH_PFC_PIN_GROUP (scifb1_data_f), +SH_PFC_PIN_GROUP (scifb1_data_g), +SH_PFC_PIN_GROUP (scifb1_clk_g), +SH_PFC_PIN_GROUP (scifb2_data), +SH_PFC_PIN_GROUP (scifb2_clk), +SH_PFC_PIN_GROUP (scifb2_ctrl), +SH_PFC_PIN_GROUP (scifb2_data_b), +SH_PFC_PIN_GROUP (scifb2_clk_b), +SH_PFC_PIN_GROUP (scifb2_ctrl_b), +SH_PFC_PIN_GROUP (scifb2_data_c), +SH_PFC_PIN_GROUP (scif_clk), +SH_PFC_PIN_GROUP (scif_clk_b), +SH_PFC_PIN_GROUP (sdhi0_data1), +SH_PFC_PIN_GROUP (sdhi0_data4), +SH_PFC_PIN_GROUP (sdhi0_ctrl), +SH_PFC_PIN_GROUP (sdhi0_cd), +SH_PFC_PIN_GROUP (sdhi0_wp), +SH_PFC_PIN_GROUP (sdhi1_data1), +SH_PFC_PIN_GROUP (sdhi1_data4), +SH_PFC_PIN_GROUP (sdhi1_ctrl), +SH_PFC_PIN_GROUP (sdhi1_cd), +SH_PFC_PIN_GROUP (sdhi1_wp), +SH_PFC_PIN_GROUP (sdhi2_data1), +SH_PFC_PIN_GROUP (sdhi2_data4), +SH_PFC_PIN_GROUP (sdhi2_ctrl), +SH_PFC_PIN_GROUP (sdhi2_cd), +SH_PFC_PIN_GROUP (sdhi2_wp), +SH_PFC_PIN_GROUP (sdhi3_data1), +SH_PFC_PIN_GROUP (sdhi3_data4), +SH_PFC_PIN_GROUP (sdhi3_ctrl), +SH_PFC_PIN_GROUP (sdhi3_cd), +SH_PFC_PIN_GROUP (sdhi3_wp), +SH_PFC_PIN_GROUP (ssi0_data), +SH_PFC_PIN_GROUP (ssi0129_ctrl), +SH_PFC_PIN_GROUP (ssi1_data), +SH_PFC_PIN_GROUP (ssi1_ctrl), +SH_PFC_PIN_GROUP (ssi2_data), +SH_PFC_PIN_GROUP (ssi2_ctrl), +SH_PFC_PIN_GROUP (ssi3_data), +SH_PFC_PIN_GROUP (ssi34_ctrl), +SH_PFC_PIN_GROUP (ssi4_data), +SH_PFC_PIN_GROUP (ssi4_ctrl), +SH_PFC_PIN_GROUP (ssi5), +SH_PFC_PIN_GROUP (ssi5_b), +SH_PFC_PIN_GROUP (ssi5_c), +SH_PFC_PIN_GROUP (ssi6), +SH_PFC_PIN_GROUP (ssi6_b), +SH_PFC_PIN_GROUP (ssi7_data), +SH_PFC_PIN_GROUP (ssi7_b_data), +SH_PFC_PIN_GROUP (ssi7_c_data), +SH_PFC_PIN_GROUP (ssi78_ctrl), +SH_PFC_PIN_GROUP (ssi78_b_ctrl), +SH_PFC_PIN_GROUP (ssi78_c_ctrl), +SH_PFC_PIN_GROUP (ssi8_data), +SH_PFC_PIN_GROUP (ssi8_b_data), +SH_PFC_PIN_GROUP (ssi8_c_data), +SH_PFC_PIN_GROUP (ssi9_data), +SH_PFC_PIN_GROUP (ssi9_ctrl), +SH_PFC_PIN_GROUP (tpu0_to0), +SH_PFC_PIN_GROUP (tpu0_to1), +SH_PFC_PIN_GROUP (tpu0_to2), +SH_PFC_PIN_GROUP (tpu0_to3), +SH_PFC_PIN_GROUP (usb0), +SH_PFC_PIN_GROUP (usb0_ovc_vbus), +SH_PFC_PIN_GROUP (usb1), +SH_PFC_PIN_GROUP (usb1_pwen), +SH_PFC_PIN_GROUP (usb2), +VIN_DATA_PIN_GROUP (vin0_data,24 ), +VIN_DATA_PIN_GROUP (vin0_data,20 ), +SH_PFC_PIN_GROUP (vin0_data18), +VIN_DATA_PIN_GROUP (vin0_data,16 ), +VIN_DATA_PIN_GROUP (vin0_data,12 ), +VIN_DATA_PIN_GROUP (vin0_data,10 ), +VIN_DATA_PIN_GROUP (vin0_data,8 ), +VIN_DATA_PIN_GROUP (vin0_data,4 ), +SH_PFC_PIN_GROUP (vin0_sync), +SH_PFC_PIN_GROUP (vin0_field), +SH_PFC_PIN_GROUP (vin0_clkenb), +SH_PFC_PIN_GROUP (vin0_clk), +VIN_DATA_PIN_GROUP (vin1_data,24 ), +VIN_DATA_PIN_GROUP (vin1_data,20 ), +SH_PFC_PIN_GROUP (vin1_data18), +VIN_DATA_PIN_GROUP (vin1_data,16 ), +VIN_DATA_PIN_GROUP (vin1_data,12 ), +VIN_DATA_PIN_GROUP (vin1_data,10 ), +VIN_DATA_PIN_GROUP (vin1_data,8 ), +VIN_DATA_PIN_GROUP (vin1_data,4 ), +VIN_DATA_PIN_GROUP (vin1_data,24 , _b), +VIN_DATA_PIN_GROUP (vin1_data,20 , _b), +SH_PFC_PIN_GROUP (vin1_data18_b), +VIN_DATA_PIN_GROUP (vin1_data,16 , _b), +VIN_DATA_PIN_GROUP (vin1_data,12 , _b), +VIN_DATA_PIN_GROUP (vin1_data,10 , _b), +VIN_DATA_PIN_GROUP (vin1_data,8 , _b), +VIN_DATA_PIN_GROUP (vin1_data,4 , _b), +SH_PFC_PIN_GROUP (vin1_sync), +SH_PFC_PIN_GROUP (vin1_sync_b), +SH_PFC_PIN_GROUP (vin1_field), +SH_PFC_PIN_GROUP (vin1_field_b), +SH_PFC_PIN_GROUP (vin1_clkenb), +SH_PFC_PIN_GROUP (vin1_clkenb_b), +SH_PFC_PIN_GROUP (vin1_clk), +SH_PFC_PIN_GROUP (vin1_clk_b), +VIN_DATA_PIN_GROUP (vin2_data,24 ), +SH_PFC_PIN_GROUP (vin2_data18), +VIN_DATA_PIN_GROUP (vin2_data,16 ), +VIN_DATA_PIN_GROUP (vin2_data,8 ), +VIN_DATA_PIN_GROUP (vin2_data,4 ), +SH_PFC_PIN_GROUP (vin2_g8), +SH_PFC_PIN_GROUP (vin2_sync), +SH_PFC_PIN_GROUP (vin2_field), +SH_PFC_PIN_GROUP (vin2_clkenb), +SH_PFC_PIN_GROUP (vin2_clk), +SH_PFC_PIN_GROUP (vin3_data8), +SH_PFC_PIN_GROUP (vin3_sync), +SH_PFC_PIN_GROUP (vin3_field), +SH_PFC_PIN_GROUP (vin3_clkenb), +SH_PFC_PIN_GROUP (vin3_clk), + }, +#ifdef CONFIG_PINCTRL_PFC_R8A7790 + .automotive = { +SH_PFC_PIN_GROUP (mlb_3pin), + } +#endif /* CONFIG_PINCTRL_PFC_R8A7790 */ };static const char *const audio_clk_groups[] = {@@ -4246,6 +4478,23 @@ static const char * const avb_groups[] = { "avb_gmii", }; +static const char *const can0_groups[] = { +"can0_data" , +"can0_data_b" , +"can0_data_c" , +"can0_data_d" , +}; + +static const char *const can1_groups[] = { +"can1_data" , +"can1_data_b" , +}; + +static const char *const can_clk_groups[] = { +"can_clk" , +"can_clk_b" , +}; +static const char *const du_groups[] = {"du_rgb666" ,"du_rgb888" ,@@ -4351,9 +4600,11 @@ static const char * const intc_groups[] = { "intc_irq3", }; +#ifdef CONFIG_PINCTRL_PFC_R8A7790 static const char *const mlb_groups[] = {"mlb_3pin" , }; +#endif /* CONFIG_PINCTRL_PFC_R8A7790 */ static const char *const mmc0_groups[] = {"mmc0_data1" ,@@ -4629,6 +4880,7 @@ static const char * const usb0_groups[] = {static const char *const usb1_groups[] = {"usb1" , +"usb1_pwen" , };static const char *const usb2_groups[] = {@@ -4659,10 +4911,22 @@ static const char * const vin1_groups[] = {"vin1_data10" ,"vin1_data8" ,"vin1_data4" , +"vin1_data24_b" , +"vin1_data20_b" , +"vin1_data18_b" , +"vin1_data16_b" , +"vin1_data12_b" , +"vin1_data10_b" , +"vin1_data8_b" , +"vin1_data4_b" ,"vin1_sync" , +"vin1_sync_b" ,"vin1_field" , +"vin1_field_b" ,"vin1_clkenb" , +"vin1_clkenb_b" ,"vin1_clk" , + "vin1_clk_b", }; static const char * const vin2_groups[] = {@@ -4671,6 +4935,7 @@ static const char * const vin2_groups[] = {"vin2_data16" ,"vin2_data8" ,"vin2_data4" , +"vin2_g8" ,"vin2_sync" ,"vin2_field" , "vin2_clkenb",@@ -4685,63 +4950,77 @@ static const char * const vin3_groups[] = { "vin3_clk", }; -static const struct sh_pfc_function pinmux_functions[] = { -SH_PFC_FUNCTION (audio_clk), -SH_PFC_FUNCTION (avb), -SH_PFC_FUNCTION (du), -SH_PFC_FUNCTION (du0), -SH_PFC_FUNCTION (du1), -SH_PFC_FUNCTION (du2), -SH_PFC_FUNCTION (eth), -SH_PFC_FUNCTION (hscif0), -SH_PFC_FUNCTION (hscif1), -SH_PFC_FUNCTION (i2c0), -SH_PFC_FUNCTION (i2c1), -SH_PFC_FUNCTION (i2c2), -SH_PFC_FUNCTION (i2c3), -SH_PFC_FUNCTION (iic0), -SH_PFC_FUNCTION (iic1), -SH_PFC_FUNCTION (iic2), -SH_PFC_FUNCTION (iic3), -SH_PFC_FUNCTION (intc), -SH_PFC_FUNCTION (mlb), -SH_PFC_FUNCTION (mmc0), -SH_PFC_FUNCTION (mmc1), -SH_PFC_FUNCTION (msiof0), -SH_PFC_FUNCTION (msiof1), -SH_PFC_FUNCTION (msiof2), -SH_PFC_FUNCTION (msiof3), -SH_PFC_FUNCTION (pwm0), -SH_PFC_FUNCTION (pwm1), -SH_PFC_FUNCTION (pwm2), -SH_PFC_FUNCTION (pwm3), -SH_PFC_FUNCTION (pwm4), -SH_PFC_FUNCTION (pwm5), -SH_PFC_FUNCTION (pwm6), -SH_PFC_FUNCTION (qspi), -SH_PFC_FUNCTION (scif0), -SH_PFC_FUNCTION (scif1), -SH_PFC_FUNCTION (scif2), -SH_PFC_FUNCTION (scifa0), -SH_PFC_FUNCTION (scifa1), -SH_PFC_FUNCTION (scifa2), -SH_PFC_FUNCTION (scifb0), -SH_PFC_FUNCTION (scifb1), -SH_PFC_FUNCTION (scifb2), -SH_PFC_FUNCTION (scif_clk), -SH_PFC_FUNCTION (sdhi0), -SH_PFC_FUNCTION (sdhi1), -SH_PFC_FUNCTION (sdhi2), -SH_PFC_FUNCTION (sdhi3), -SH_PFC_FUNCTION (ssi), -SH_PFC_FUNCTION (tpu0), -SH_PFC_FUNCTION (usb0), -SH_PFC_FUNCTION (usb1), -SH_PFC_FUNCTION (usb2), -SH_PFC_FUNCTION (vin0), -SH_PFC_FUNCTION (vin1), -SH_PFC_FUNCTION (vin2), -SH_PFC_FUNCTION (vin3), +static const struct { +struct sh_pfc_function common[58 ]; +#ifdef CONFIG_PINCTRL_PFC_R8A7790 +struct sh_pfc_function automotive[1 ]; +#endif +} pinmux_functions = { + .common = { +SH_PFC_FUNCTION (audio_clk), +SH_PFC_FUNCTION (avb), +SH_PFC_FUNCTION (du), +SH_PFC_FUNCTION (can0), +SH_PFC_FUNCTION (can1), +SH_PFC_FUNCTION (can_clk), +SH_PFC_FUNCTION (du0), +SH_PFC_FUNCTION (du1), +SH_PFC_FUNCTION (du2), +SH_PFC_FUNCTION (eth), +SH_PFC_FUNCTION (hscif0), +SH_PFC_FUNCTION (hscif1), +SH_PFC_FUNCTION (i2c0), +SH_PFC_FUNCTION (i2c1), +SH_PFC_FUNCTION (i2c2), +SH_PFC_FUNCTION (i2c3), +SH_PFC_FUNCTION (iic0), +SH_PFC_FUNCTION (iic1), +SH_PFC_FUNCTION (iic2), +SH_PFC_FUNCTION (iic3), +SH_PFC_FUNCTION (intc), +SH_PFC_FUNCTION (mmc0), +SH_PFC_FUNCTION (mmc1), +SH_PFC_FUNCTION (msiof0), +SH_PFC_FUNCTION (msiof1), +SH_PFC_FUNCTION (msiof2), +SH_PFC_FUNCTION (msiof3), +SH_PFC_FUNCTION (pwm0), +SH_PFC_FUNCTION (pwm1), +SH_PFC_FUNCTION (pwm2), +SH_PFC_FUNCTION (pwm3), +SH_PFC_FUNCTION (pwm4), +SH_PFC_FUNCTION (pwm5), +SH_PFC_FUNCTION (pwm6), +SH_PFC_FUNCTION (qspi), +SH_PFC_FUNCTION (scif0), +SH_PFC_FUNCTION (scif1), +SH_PFC_FUNCTION (scif2), +SH_PFC_FUNCTION (scifa0), +SH_PFC_FUNCTION (scifa1), +SH_PFC_FUNCTION (scifa2), +SH_PFC_FUNCTION (scifb0), +SH_PFC_FUNCTION (scifb1), +SH_PFC_FUNCTION (scifb2), +SH_PFC_FUNCTION (scif_clk), +SH_PFC_FUNCTION (sdhi0), +SH_PFC_FUNCTION (sdhi1), +SH_PFC_FUNCTION (sdhi2), +SH_PFC_FUNCTION (sdhi3), +SH_PFC_FUNCTION (ssi), +SH_PFC_FUNCTION (tpu0), +SH_PFC_FUNCTION (usb0), +SH_PFC_FUNCTION (usb1), +SH_PFC_FUNCTION (usb2), +SH_PFC_FUNCTION (vin0), +SH_PFC_FUNCTION (vin1), +SH_PFC_FUNCTION (vin2), +SH_PFC_FUNCTION (vin3), + }, +#ifdef CONFIG_PINCTRL_PFC_R8A7790 + .automotive = { +SH_PFC_FUNCTION (mlb), + } +#endif /* CONFIG_PINCTRL_PFC_R8A7790 */ };static const struct pinmux_cfg_reg pinmux_config_regs[] = {@@ -5728,6 +6007,7 @@ static const struct sh_pfc_soc_operations r8a7790_pinmux_ops = { .pin_to_pocctrl = r8a7790_pin_to_pocctrl, }; +#ifdef CONFIG_PINCTRL_PFC_R8A7790 const struct sh_pfc_soc_info r8a7790_pinmux_info = { .name ="r8a77900_pfc" , .ops = &r8a7790_pinmux_ops,@@ -5737,13 +6017,16 @@ const struct sh_pfc_soc_info r8a7790_pinmux_info = { .pins = pinmux_pins, .nr_pins = ARRAY_SIZE(pinmux_pins), - .groups = pinmux_groups, - .nr_groups = ARRAY_SIZE(pinmux_groups), - .functions = pinmux_functions, - .nr_functions = ARRAY_SIZE(pinmux_functions), + .groups = pinmux_groups.common, + .nr_groups =ARRAY_SIZE (pinmux_groups.common) + + ARRAY_SIZE(pinmux_groups.automotive), + .functions = pinmux_functions.common, + .nr_functions =ARRAY_SIZE (pinmux_functions.common) + + ARRAY_SIZE(pinmux_functions.automotive), .cfg_regs = pinmux_config_regs, .pinmux_data = pinmux_data, .pinmux_data_size = ARRAY_SIZE(pinmux_data), }; +#endif drivers/pinctrl/renesas/pfc-r8a7791.c +19
-1@@ -18,7 +18,7 @@* Pins 0-23 assigned to GPIO bank 6 can be used for SD interfaces in * which case they support both 3.3V and 1.8V signalling. */ -#define CPU_ALL_PORT (fn, sfx) \ +#define CPU_ALL_GP (fn, sfx) \ PORT_GP_32(0, fn, sfx), \ PORT_GP_26(1, fn, sfx), \ PORT_GP_32(2, fn, sfx), \@@ -1703,6 +1703,7 @@ static const struct sh_pfc_pin pinmux_pins[] = { PINMUX_GPIO_GP_ALL(), }; +#if defined(CONFIG_PINCTRL_PFC_R8A7791 ) || defined(CONFIG_PINCTRL_PFC_R8A7793 )/* - ADI -------------------------------------------------------------------- */ static const unsigned int adi_common_pins[] = { /* ADIDATA, ADICS/SAMP, ADICLK */@@ -1768,6 +1769,7 @@ static const unsigned int adi_chsel2_b_mux[] = {/* ADICHS B 2 */ ADICHS2_B_MARK, }; +#endif /* CONFIG_PINCTRL_PFC_R8A7791 || CONFIG_PINCTRL_PFC_R8A7793 */ /* - Audio Clock ------------------------------------------------------------ */ static const unsigned int audio_clk_a_pins[] = {@@ -2556,6 +2558,8 @@ static const unsigned int intc_irq3_pins[] = {static const unsigned int intc_irq3_mux[] = {IRQ3_MARK , }; + +#if defined(CONFIG_PINCTRL_PFC_R8A7791 ) || defined(CONFIG_PINCTRL_PFC_R8A7793 )/* - MLB+ ------------------------------------------------------------------- */ static const unsigned int mlb_3pin_pins[] = { RCAR_GP_PIN(7, 7), RCAR_GP_PIN(7, 8), RCAR_GP_PIN(7, 9),@@ -2563,6 +2567,8 @@ static const unsigned int mlb_3pin_pins[] = {static const unsigned int mlb_3pin_mux[] = {MLB_CLK_MARK ,MLB_SIG_MARK ,MLB_DAT_MARK , }; +#endif /* CONFIG_PINCTRL_PFC_R8A7791 || CONFIG_PINCTRL_PFC_R8A7793 */ +/* - MMCIF ------------------------------------------------------------------ */ static const unsigned int mmc_data1_pins[] = {/* D[0] */ @@ -4455,7 +4461,9 @@ static const unsigned int vin2_clk_mux[] = {static const struct {struct sh_pfc_pin_group common[346 ]; +#if defined(CONFIG_PINCTRL_PFC_R8A7791 ) || defined(CONFIG_PINCTRL_PFC_R8A7793 )struct sh_pfc_pin_group automotive[9 ]; +#endif } pinmux_groups = { .common = {SH_PFC_PIN_GROUP (audio_clk_a),@@ -4805,6 +4813,7 @@ static const struct {SH_PFC_PIN_GROUP (vin2_clkenb),SH_PFC_PIN_GROUP (vin2_clk ), }, +#if defined(CONFIG_PINCTRL_PFC_R8A7791) || defined(CONFIG_PINCTRL_PFC_R8A7793) .automotive = {SH_PFC_PIN_GROUP (adi_common), SH_PFC_PIN_GROUP(adi_chsel0),@@ -4816,8 +4825,10 @@ static const struct {SH_PFC_PIN_GROUP (adi_chsel2_b), SH_PFC_PIN_GROUP(mlb_3pin), } +#endif /* CONFIG_PINCTRL_PFC_R8A7791 || CONFIG_PINCTRL_PFC_R8A7793 */ }; +#if defined(CONFIG_PINCTRL_PFC_R8A7791 ) || defined(CONFIG_PINCTRL_PFC_R8A7793 )static const char *const adi_groups[] = {"adi_common" , "adi_chsel0",@@ -4828,6 +4839,7 @@ static const char * const adi_groups[] = {"adi_chsel1_b" , "adi_chsel2_b", }; +#endif /* CONFIG_PINCTRL_PFC_R8A7791 || CONFIG_PINCTRL_PFC_R8A7793 */ static const char *const audio_clk_groups[] = {"audio_clk_a" ,@@ -5005,9 +5017,11 @@ static const char * const intc_groups[] = { "intc_irq3", }; +#if defined(CONFIG_PINCTRL_PFC_R8A7791 ) || defined(CONFIG_PINCTRL_PFC_R8A7793 )static const char *const mlb_groups[] = {"mlb_3pin" , }; +#endif /* CONFIG_PINCTRL_PFC_R8A7791 || CONFIG_PINCTRL_PFC_R8A7793 */ static const char *const mmc_groups[] = {"mmc_data1" ,@@ -5362,7 +5376,9 @@ static const char * const vin2_groups[] = {static const struct {struct sh_pfc_function common[58 ]; +#if defined(CONFIG_PINCTRL_PFC_R8A7791 ) || defined(CONFIG_PINCTRL_PFC_R8A7793 )struct sh_pfc_function automotive[2 ]; +#endif } pinmux_functions = { .common = {SH_PFC_FUNCTION (audio_clk),@@ -5424,10 +5440,12 @@ static const struct {SH_PFC_FUNCTION (vin1),SH_PFC_FUNCTION (vin2 ), }, +#if defined(CONFIG_PINCTRL_PFC_R8A7791) || defined(CONFIG_PINCTRL_PFC_R8A7793) .automotive = {SH_PFC_FUNCTION (adi),SH_PFC_FUNCTION (mlb), } +#endif /* CONFIG_PINCTRL_PFC_R8A7791 || CONFIG_PINCTRL_PFC_R8A7793 */ };static const struct pinmux_cfg_reg pinmux_config_regs[] = {drivers/pinctrl/renesas/pfc-r8a7792.c +1
-1@@ -14,7 +14,7 @@#include "sh_pfc.h" -#define CPU_ALL_PORT (fn, sfx) \ +#define CPU_ALL_GP (fn, sfx) \ PORT_GP_29(0, fn, sfx), \ PORT_GP_23(1, fn, sfx), \ PORT_GP_32(2, fn, sfx), \drivers/pinctrl/renesas/pfc-r8a7794.c +1
-1@@ -15,7 +15,7 @@#include "sh_pfc.h" -#define CPU_ALL_PORT (fn, sfx) \ +#define CPU_ALL_GP (fn, sfx) \ PORT_GP_32(0, fn, sfx), \ PORT_GP_26(1, fn, sfx), \ PORT_GP_32(2, fn, sfx), \drivers/pinctrl/renesas/pfc-r8a7795.c +266
-201@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0 /* -* R8A7795 ES2.0+ processor support - PFC hardware block. +* R8A77951 processor support - PFC hardware block. * * Copyright (C) 2015-2019 Renesas Electronics Corporation */ @@ -13,11 +13,9 @@#include "sh_pfc.h" -#define CFG_FLAGS (SH_PFC_PIN_CFG_DRIVE_STRENGTH | \ - SH_PFC_PIN_CFG_PULL_UP | \ - SH_PFC_PIN_CFG_PULL_DOWN) +#define CFG_FLAGS (SH_PFC_PIN_CFG_DRIVE_STRENGTH | SH_PFC_PIN_CFG_PULL_UP_DOWN) -#define CPU_ALL_PORT (fn, sfx) \ +#define CPU_ALL_GP (fn, sfx) \ PORT_GP_CFG_16(0, fn, sfx, CFG_FLAGS), \ PORT_GP_CFG_29(1, fn, sfx, CFG_FLAGS), \ PORT_GP_CFG_15(2, fn, sfx, CFG_FLAGS), \@@ -30,6 +28,52 @@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_DOTCLKIN2, "DU_DOTCLKIN2", 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_N, "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 @@ -1509,68 +1553,16 @@ static const u16 pinmux_data[] = { };/* -* R8A7795 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) -#define PIN_NONE U16_MAX +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 r8a7795 -* 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 H3SiP 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 |SH_PFC_PIN_CFG_PULL_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' ),7 ,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 | SH_PFC_PIN_CFG_PULL_DOWN), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('R' ),29 ,TDI ,SH_PFC_PIN_CFG_PULL_UP |SH_PFC_PIN_CFG_PULL_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 |SH_PFC_PIN_CFG_PULL_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 ------------------------------------------------------------ */ @@ -1718,7 +1710,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 ,@@ -1731,12 +1723,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[] = { AVB_TX_CTL_MARK, AVB_TXC_MARK, AVB_TD0_MARK,@@ -3261,6 +3252,57 @@ static const unsigned int pwm6_b_mux[] = { PWM6_B_MARK, }; +/* - QSPI0 ------------------------------------------------------------------ */ +static const unsigned int qspi0_ctrl_pins[] = { +/* QSPI0_SPCLK, QSPI0_SSL */ +PIN_QSPI0_SPCLK ,PIN_QSPI0_SSL , +}; +static const unsigned int qspi0_ctrl_mux[] = { +QSPI0_SPCLK_MARK ,QSPI0_SSL_MARK , +}; +static const unsigned int qspi0_data2_pins[] = { +/* QSPI0_MOSI_IO0, QSPI0_MISO_IO1 */ +PIN_QSPI0_MOSI_IO0 ,PIN_QSPI0_MISO_IO1 , +}; +static const unsigned int qspi0_data2_mux[] = { +QSPI0_MOSI_IO0_MARK ,QSPI0_MISO_IO1_MARK , +}; +static const unsigned int qspi0_data4_pins[] = { +/* QSPI0_MOSI_IO0, QSPI0_MISO_IO1 */ +PIN_QSPI0_MOSI_IO0 ,PIN_QSPI0_MISO_IO1 , +/* QSPI0_IO2, QSPI0_IO3 */ +PIN_QSPI0_IO2 ,PIN_QSPI0_IO3 , +}; +static const unsigned int qspi0_data4_mux[] = { +QSPI0_MOSI_IO0_MARK ,QSPI0_MISO_IO1_MARK , +QSPI0_IO2_MARK ,QSPI0_IO3_MARK , +}; +/* - QSPI1 ------------------------------------------------------------------ */ +static const unsigned int qspi1_ctrl_pins[] = { +/* QSPI1_SPCLK, QSPI1_SSL */ +PIN_QSPI1_SPCLK ,PIN_QSPI1_SSL , +}; +static const unsigned int qspi1_ctrl_mux[] = { +QSPI1_SPCLK_MARK ,QSPI1_SSL_MARK , +}; +static const unsigned int qspi1_data2_pins[] = { +/* QSPI1_MOSI_IO0, QSPI1_MISO_IO1 */ +PIN_QSPI1_MOSI_IO0 ,PIN_QSPI1_MISO_IO1 , +}; +static const unsigned int qspi1_data2_mux[] = { +QSPI1_MOSI_IO0_MARK ,QSPI1_MISO_IO1_MARK , +}; +static const unsigned int qspi1_data4_pins[] = { +/* QSPI1_MOSI_IO0, QSPI1_MISO_IO1 */ +PIN_QSPI1_MOSI_IO0 ,PIN_QSPI1_MISO_IO1 , +/* QSPI1_IO2, QSPI1_IO3 */ +PIN_QSPI1_IO2 ,PIN_QSPI1_IO3 , +}; +static const unsigned int qspi1_data4_mux[] = { +QSPI1_MOSI_IO0_MARK ,QSPI1_MISO_IO1_MARK , +QSPI1_IO2_MARK ,QSPI1_IO3_MARK , +}; +/* - SATA --------------------------------------------------------------------*/ static const unsigned int sata0_devslp_a_pins[] = {/* DEVSLP */ @@ -4169,7 +4211,7 @@ static const unsigned int vin5_clk_mux[] = { }; static const struct { - struct sh_pfc_pin_group common[320]; + struct sh_pfc_pin_group common[326]; #ifdef CONFIG_PINCTRL_PFC_R8A7795 struct sh_pfc_pin_group automotive[30]; #endif@@ -4374,6 +4416,12 @@ static const struct {SH_PFC_PIN_GROUP (pwm5_b),SH_PFC_PIN_GROUP (pwm6_a),SH_PFC_PIN_GROUP (pwm6_b), +SH_PFC_PIN_GROUP (qspi0_ctrl), +SH_PFC_PIN_GROUP (qspi0_data2), +SH_PFC_PIN_GROUP (qspi0_data4), +SH_PFC_PIN_GROUP (qspi1_ctrl), +SH_PFC_PIN_GROUP (qspi1_data2), +SH_PFC_PIN_GROUP (qspi1_data4),SH_PFC_PIN_GROUP (sata0_devslp_a),SH_PFC_PIN_GROUP (sata0_devslp_b), SH_PFC_PIN_GROUP(scif0_data),@@ -4868,6 +4916,18 @@ static const char * const pwm6_groups[] = { "pwm6_b", }; +static const char *const qspi0_groups[] = { +"qspi0_ctrl" , +"qspi0_data2" , +"qspi0_data4" , +}; + +static const char *const qspi1_groups[] = { +"qspi1_ctrl" , +"qspi1_data2" , +"qspi1_data4" , +}; +static const char *const sata0_groups[] = {"sata0_devslp_a" ,"sata0_devslp_b" ,@@ -5056,7 +5116,7 @@ static const char * const vin5_groups[] = { }; static const struct { - struct sh_pfc_function common[53]; + struct sh_pfc_function common[55]; #ifdef CONFIG_PINCTRL_PFC_R8A7795 struct sh_pfc_function automotive[4]; #endif@@ -5093,6 +5153,8 @@ static const struct {SH_PFC_FUNCTION (pwm4),SH_PFC_FUNCTION (pwm5),SH_PFC_FUNCTION (pwm6), +SH_PFC_FUNCTION (qspi0), +SH_PFC_FUNCTION (qspi1),SH_PFC_FUNCTION (sata0),SH_PFC_FUNCTION (scif0), SH_PFC_FUNCTION(scif1),@@ -5692,44 +5754,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 */ @@ -5783,7 +5845,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 */@@ -5802,30 +5864,32 @@ 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', 7), 28, 2 }, /* DU_DOTCLKIN2 */ - { PIN_A_NUMBER('R', 8), 24, 2 }, /* DU_DOTCLKIN3 */ - { PIN_A_NUMBER('D', 38), 20, 2 }, /* FSCLKST# */ - { PIN_A_NUMBER('R', 30), 4, 2 }, /* TMS */ +#ifdef CONFIG_PINCTRL_PFC_R8A7795 + { PIN_DU_DOTCLKIN2, 28, 2 }, /* DU_DOTCLKIN2 */ +#endif + { PIN_DU_DOTCLKIN3, 24, 2 }, /* DU_DOTCLKIN3 */ + { PIN_FSCLKST_N, 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 */@@ -5894,7 +5958,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) {@@ -5933,8 +5997,8 @@ static const struct pinmux_drive_reg pinmux_drive_regs[] = { { RCAR_GP_PIN(6, 27), 20, 3 }, /* USB1_OVC */ { RCAR_GP_PIN(6, 28), 16, 3 }, /* USB30_PWEN */ { RCAR_GP_PIN(6, 29), 12, 3 }, /* USB30_OVC */ - { RCAR_GP_PIN(6, 30), 8, 3 }, /* USB2_CH3_PWEN */ - { RCAR_GP_PIN(6, 31), 4, 3 }, /* USB2_CH3_OVC */ + { RCAR_GP_PIN(6, 30), 8, 3 }, /* GP6_30/USB2_CH3_PWEN */ + { RCAR_GP_PIN(6, 31), 4, 3 }, /* GP6_31/USB2_CH3_OVC */ } }, { }, };@@ -5950,7 +6014,8 @@ static const struct pinmux_ioctrl_reg pinmux_ioctrl_regs[] = { { /* sentinel */ }, }; -static int r8a7795_pin_to_pocctrl (struct sh_pfc *pfc,unsigned int pin,u32 *pocctrl) +static int r8a77951_pin_to_pocctrl (struct sh_pfc *pfc, +unsigned int pin,u32 *pocctrl) {int bit = -EINVAL ;@@ -5967,35 +6032,35 @@ static int r8a7795_pin_to_pocctrl(struct sh_pfc *pfc, unsigned int pin, u32 *poc 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 */@@ -6044,7 +6109,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 */@@ -6065,20 +6130,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', 7), /* DU_DOTCLKIN2 */ - [ 1] = PIN_A_NUMBER('R', 8), /* DU_DOTCLKIN3 */ - [ 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 */ - [ 8] = PIN_NONE, - [ 9] = PIN_A_NUMBER('T', 30), /* ASEBRK */ + [ 0] = PIN_DU_DOTCLKIN2, /* DU_DOTCLKIN2 */ + [ 1] = PIN_DU_DOTCLKIN3, /* DU_DOTCLKIN3 */ + [ 2] = PIN_FSCLKST_N, /* 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_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 */@@ -6143,7 +6208,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 */@@ -6178,31 +6243,31 @@ static const struct pinmux_bias_reg pinmux_bias_regs[] = { [ 4] = RCAR_GP_PIN(6, 29), /* USB30_OVC */ [ 5] = RCAR_GP_PIN(6, 30), /* USB2_CH3_PWEN */ [ 6] = RCAR_GP_PIN(6, 31), /* USB2_CH3_OVC */ - [ 7] = PIN_NONE, - [ 8] = PIN_NONE, - [ 9] = PIN_NONE, - [10] = PIN_NONE, - [11] = PIN_NONE, - [12] = PIN_NONE, - [13] = PIN_NONE, - [14] = PIN_NONE, - [15] = PIN_NONE, - [16] = PIN_NONE, - [17] = PIN_NONE, - [18] = PIN_NONE, - [19] = PIN_NONE, - [20] = PIN_NONE, - [21] = PIN_NONE, - [22] = PIN_NONE, - [23] = PIN_NONE, - [24] = PIN_NONE, - [25] = PIN_NONE, - [26] = PIN_NONE, - [27] = PIN_NONE, - [28] = PIN_NONE, - [29] = PIN_NONE, - [30] = PIN_NONE, - [31] = PIN_NONE, + [ 7] = SH_PFC_PIN_NONE, + [ 8] = SH_PFC_PIN_NONE, + [ 9] = SH_PFC_PIN_NONE, + [10] = SH_PFC_PIN_NONE, + [11] = SH_PFC_PIN_NONE, + [12] = SH_PFC_PIN_NONE, + [13] = SH_PFC_PIN_NONE, + [14] = SH_PFC_PIN_NONE, + [15] = SH_PFC_PIN_NONE, + [16] = SH_PFC_PIN_NONE, + [17] = SH_PFC_PIN_NONE, + [18] = SH_PFC_PIN_NONE, + [19] = SH_PFC_PIN_NONE, + [20] = SH_PFC_PIN_NONE, + [21] = SH_PFC_PIN_NONE, + [22] = SH_PFC_PIN_NONE, + [23] = SH_PFC_PIN_NONE, + [24] = SH_PFC_PIN_NONE, + [25] = SH_PFC_PIN_NONE, + [26] = SH_PFC_PIN_NONE, + [27] = SH_PFC_PIN_NONE, + [28] = SH_PFC_PIN_NONE, + [29] = SH_PFC_PIN_NONE, + [30] = SH_PFC_PIN_NONE, + [31] = SH_PFC_PIN_NONE, } }, { /* sentinel */ }, };@@ -6248,8 +6313,8 @@ static void r8a7795_pinmux_set_bias(struct sh_pfc *pfc, unsigned int pin,sh_pfc_write (pfc, reg->puen, enable); } -static const struct sh_pfc_soc_operations r8a7795_pinmux_ops = { - .pin_to_pocctrl = r8a7795_pin_to_pocctrl, +static const struct sh_pfc_soc_operations r8a77951_pinmux_ops = { + .pin_to_pocctrl = r8a77951_pin_to_pocctrl, .get_bias = r8a7795_pinmux_get_bias, .set_bias = r8a7795_pinmux_set_bias, };@@ -6257,7 +6322,7 @@ static const struct sh_pfc_soc_operations r8a7795_pinmux_ops = {#ifdef CONFIG_PINCTRL_PFC_R8A774E1 const struct sh_pfc_soc_info r8a774e1_pinmux_info = { .name ="r8a774e1_pfc" , - .ops = &r8a7795_pinmux_ops, + .ops = &r8a77951_pinmux_ops, .unlock_reg =0xe6060000 ,/* PMMR */ .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },@@ -6282,7 +6347,7 @@ const struct sh_pfc_soc_info r8a774e1_pinmux_info = {#ifdef CONFIG_PINCTRL_PFC_R8A7795 const struct sh_pfc_soc_info r8a7795_pinmux_info = { .name ="r8a77951_pfc" , - .ops = &r8a7795_pinmux_ops, + .ops = &r8a77951_pinmux_ops, .unlock_reg =0xe6060000 ,/* PMMR */ .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },drivers/pinctrl/renesas/pfc-r8a7796.c +298
-194@@ -1,10 +1,10 @@// SPDX-License-Identifier: GPL-2.0 /* -* R8A7796 processor support - PFC hardware block. +* R8A7796 (R-Car M3-W/W+) support - PFC hardware block. * * Copyright (C) 2016-2019 Renesas Electronics Corp. * -* This file is based on the drivers/pinctrl/sh-pfc/pfc-r8a7795.c +* This file is based on the drivers/pinctrl/renesas/pfc-r8a7795.c * * R-Car Gen3 processor support - PFC hardware block. * @@ -19,11 +19,9 @@#include "sh_pfc.h" -#define CFG_FLAGS (SH_PFC_PIN_CFG_DRIVE_STRENGTH | \ - SH_PFC_PIN_CFG_PULL_UP | \ - SH_PFC_PIN_CFG_PULL_DOWN) +#define CFG_FLAGS (SH_PFC_PIN_CFG_DRIVE_STRENGTH | SH_PFC_PIN_CFG_PULL_UP_DOWN) -#define CPU_ALL_PORT (fn, sfx) \ +#define CPU_ALL_GP (fn, sfx) \ PORT_GP_CFG_16(0, fn, sfx, CFG_FLAGS), \ PORT_GP_CFG_29(1, fn, sfx, CFG_FLAGS), \ PORT_GP_CFG_15(2, fn, sfx, CFG_FLAGS), \@@ -36,6 +34,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_DOTCLKIN2, "DU_DOTCLKIN2", 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 @@ -688,7 +731,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),@@ -1514,67 +1557,16 @@ static const u16 pinmux_data[] = { };/* -* R8A7796 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) -#define PIN_NONE U16_MAX +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 r8a7796 -* 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 |SH_PFC_PIN_CFG_PULL_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_DOTCLKIN2 ,CFG_FLAGS ), - SH_PFC_PIN_NAMED_CFG(ROW_GROUP_A('R'), 26, TRST#, SH_PFC_PIN_CFG_PULL_UP | SH_PFC_PIN_CFG_PULL_DOWN), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('R' ),29 ,TDI ,SH_PFC_PIN_CFG_PULL_UP |SH_PFC_PIN_CFG_PULL_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 |SH_PFC_PIN_CFG_PULL_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 +1715,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,12 +1728,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[] = { AVB_TX_CTL_MARK, AVB_TXC_MARK, AVB_TD0_MARK,@@ -3267,6 +3258,57 @@ static const unsigned int pwm6_b_mux[] = { PWM6_B_MARK, }; +/* - QSPI0 ------------------------------------------------------------------ */ +static const unsigned int qspi0_ctrl_pins[] = { +/* QSPI0_SPCLK, QSPI0_SSL */ +PIN_QSPI0_SPCLK ,PIN_QSPI0_SSL , +}; +static const unsigned int qspi0_ctrl_mux[] = { +QSPI0_SPCLK_MARK ,QSPI0_SSL_MARK , +}; +static const unsigned int qspi0_data2_pins[] = { +/* QSPI0_MOSI_IO0, QSPI0_MISO_IO1 */ +PIN_QSPI0_MOSI_IO0 ,PIN_QSPI0_MISO_IO1 , +}; +static const unsigned int qspi0_data2_mux[] = { +QSPI0_MOSI_IO0_MARK ,QSPI0_MISO_IO1_MARK , +}; +static const unsigned int qspi0_data4_pins[] = { +/* QSPI0_MOSI_IO0, QSPI0_MISO_IO1 */ +PIN_QSPI0_MOSI_IO0 ,PIN_QSPI0_MISO_IO1 , +/* QSPI0_IO2, QSPI0_IO3 */ +PIN_QSPI0_IO2 ,PIN_QSPI0_IO3 , +}; +static const unsigned int qspi0_data4_mux[] = { +QSPI0_MOSI_IO0_MARK ,QSPI0_MISO_IO1_MARK , +QSPI0_IO2_MARK ,QSPI0_IO3_MARK , +}; +/* - QSPI1 ------------------------------------------------------------------ */ +static const unsigned int qspi1_ctrl_pins[] = { +/* QSPI1_SPCLK, QSPI1_SSL */ +PIN_QSPI1_SPCLK ,PIN_QSPI1_SSL , +}; +static const unsigned int qspi1_ctrl_mux[] = { +QSPI1_SPCLK_MARK ,QSPI1_SSL_MARK , +}; +static const unsigned int qspi1_data2_pins[] = { +/* QSPI1_MOSI_IO0, QSPI1_MISO_IO1 */ +PIN_QSPI1_MOSI_IO0 ,PIN_QSPI1_MISO_IO1 , +}; +static const unsigned int qspi1_data2_mux[] = { +QSPI1_MOSI_IO0_MARK ,QSPI1_MISO_IO1_MARK , +}; +static const unsigned int qspi1_data4_pins[] = { +/* QSPI1_MOSI_IO0, QSPI1_MISO_IO1 */ +PIN_QSPI1_MOSI_IO0 ,PIN_QSPI1_MISO_IO1 , +/* QSPI1_IO2, QSPI1_IO3 */ +PIN_QSPI1_IO2 ,PIN_QSPI1_IO3 , +}; +static const unsigned int qspi1_data4_mux[] = { +QSPI1_MOSI_IO0_MARK ,QSPI1_MISO_IO1_MARK , +QSPI1_IO2_MARK ,QSPI1_IO3_MARK , +}; +/* - SCIF0 ------------------------------------------------------------------ */ static const unsigned int scif0_data_pins[] = {/* RX, TX */ @@ -3895,6 +3937,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 */ @@ -4114,7 +4186,7 @@ static const unsigned int vin5_clk_mux[] = { }; static const struct { - struct sh_pfc_pin_group common[312]; + struct sh_pfc_pin_group common[322]; #if defined(CONFIG_PINCTRL_PFC_R8A7796) struct sh_pfc_pin_group automotive[30]; #endif@@ -4319,6 +4391,12 @@ static const struct {SH_PFC_PIN_GROUP (pwm5_b),SH_PFC_PIN_GROUP (pwm6_a),SH_PFC_PIN_GROUP (pwm6_b), +SH_PFC_PIN_GROUP (qspi0_ctrl), +SH_PFC_PIN_GROUP (qspi0_data2), +SH_PFC_PIN_GROUP (qspi0_data4), +SH_PFC_PIN_GROUP (qspi1_ctrl), +SH_PFC_PIN_GROUP (qspi1_data2), +SH_PFC_PIN_GROUP (qspi1_data4),SH_PFC_PIN_GROUP (scif0_data),SH_PFC_PIN_GROUP (scif0_clk), SH_PFC_PIN_GROUP(scif0_ctrl),@@ -4403,6 +4481,10 @@ static const struct {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),@@ -4805,6 +4887,18 @@ static const char * const pwm6_groups[] = { "pwm6_b", }; +static const char *const qspi0_groups[] = { +"qspi0_ctrl" , +"qspi0_data2" , +"qspi0_data4" , +}; + +static const char *const qspi1_groups[] = { +"qspi1_ctrl" , +"qspi1_data2" , +"qspi1_data4" , +}; +static const char *const scif0_groups[] = {"scif0_data" ,"scif0_clk" ,@@ -4928,6 +5022,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" , };@@ -4973,7 +5074,7 @@ static const char * const vin5_groups[] = { }; static const struct { - struct sh_pfc_function common[49]; + struct sh_pfc_function common[52]; #if defined(CONFIG_PINCTRL_PFC_R8A7796) struct sh_pfc_function automotive[4]; #endif@@ -5010,6 +5111,8 @@ static const struct {SH_PFC_FUNCTION (pwm4),SH_PFC_FUNCTION (pwm5),SH_PFC_FUNCTION (pwm6), +SH_PFC_FUNCTION (qspi0), +SH_PFC_FUNCTION (qspi1),SH_PFC_FUNCTION (scif0),SH_PFC_FUNCTION (scif1), SH_PFC_FUNCTION(scif2),@@ -5023,6 +5126,7 @@ static const struct {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),@@ -5604,44 +5708,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 */ @@ -5695,7 +5799,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 */@@ -5714,29 +5818,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_DOTCLKIN2 */ - { PIN_A_NUMBER('D', 38), 20, 2 }, /* FSCLKST */ - { PIN_A_NUMBER('R', 30), 4, 2 }, /* TMS */ + { PIN_DU_DOTCLKIN2, 28, 2 }, /* DU_DOTCLKIN2 */ + { 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 */@@ -5805,7 +5909,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) {@@ -5878,35 +5982,35 @@ static int r8a7796_pin_to_pocctrl(struct sh_pfc *pfc, unsigned int pin, u32 *poc 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 */@@ -5955,7 +6059,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 */@@ -5976,20 +6080,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_DOTCLKIN2 */ - [ 1] = 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 */ - [ 8] = PIN_NONE, - [ 9] = PIN_A_NUMBER('T', 30), /* ASEBRK */ + [ 0] = PIN_DU_DOTCLKIN2, /* DU_DOTCLKIN2 */ + [ 1] = SH_PFC_PIN_NONE, + [ 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_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 */@@ -6054,7 +6158,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 */@@ -6089,31 +6193,31 @@ static const struct pinmux_bias_reg pinmux_bias_regs[] = { [ 4] = RCAR_GP_PIN(6, 29), /* USB30_OVC */ [ 5] = RCAR_GP_PIN(6, 30), /* GP6_30 */ [ 6] = RCAR_GP_PIN(6, 31), /* GP6_31 */ - [ 7] = PIN_NONE, - [ 8] = PIN_NONE, - [ 9] = PIN_NONE, - [10] = PIN_NONE, - [11] = PIN_NONE, - [12] = PIN_NONE, - [13] = PIN_NONE, - [14] = PIN_NONE, - [15] = PIN_NONE, - [16] = PIN_NONE, - [17] = PIN_NONE, - [18] = PIN_NONE, - [19] = PIN_NONE, - [20] = PIN_NONE, - [21] = PIN_NONE, - [22] = PIN_NONE, - [23] = PIN_NONE, - [24] = PIN_NONE, - [25] = PIN_NONE, - [26] = PIN_NONE, - [27] = PIN_NONE, - [28] = PIN_NONE, - [29] = PIN_NONE, - [30] = PIN_NONE, - [31] = PIN_NONE, + [ 7] = SH_PFC_PIN_NONE, + [ 8] = SH_PFC_PIN_NONE, + [ 9] = SH_PFC_PIN_NONE, + [10] = SH_PFC_PIN_NONE, + [11] = SH_PFC_PIN_NONE, + [12] = SH_PFC_PIN_NONE, + [13] = SH_PFC_PIN_NONE, + [14] = SH_PFC_PIN_NONE, + [15] = SH_PFC_PIN_NONE, + [16] = SH_PFC_PIN_NONE, + [17] = SH_PFC_PIN_NONE, + [18] = SH_PFC_PIN_NONE, + [19] = SH_PFC_PIN_NONE, + [20] = SH_PFC_PIN_NONE, + [21] = SH_PFC_PIN_NONE, + [22] = SH_PFC_PIN_NONE, + [23] = SH_PFC_PIN_NONE, + [24] = SH_PFC_PIN_NONE, + [25] = SH_PFC_PIN_NONE, + [26] = SH_PFC_PIN_NONE, + [27] = SH_PFC_PIN_NONE, + [28] = SH_PFC_PIN_NONE, + [29] = SH_PFC_PIN_NONE, + [30] = SH_PFC_PIN_NONE, + [31] = SH_PFC_PIN_NONE, } }, { /* sentinel */ }, };drivers/pinctrl/renesas/pfc-r8a77965.c +254
-192@@ -5,7 +5,7 @@* Copyright (C) 2018 Jacopo Mondi <[email protected]> * Copyright (C) 2016-2019 Renesas Electronics Corp. * -* This file is based on the drivers/pinctrl/sh-pfc/pfc-r8a7796.c +* This file is based on the drivers/pinctrl/renesas/pfc-r8a7796.c * * R-Car Gen3 processor support - PFC hardware block. * @@ -20,11 +20,9 @@#include "sh_pfc.h" -#define CFG_FLAGS (SH_PFC_PIN_CFG_DRIVE_STRENGTH | \ - SH_PFC_PIN_CFG_PULL_UP | \ - SH_PFC_PIN_CFG_PULL_DOWN) +#define CFG_FLAGS (SH_PFC_PIN_CFG_DRIVE_STRENGTH | SH_PFC_PIN_CFG_PULL_UP_DOWN) -#define CPU_ALL_PORT (fn, sfx) \ +#define CPU_ALL_GP (fn, sfx) \ PORT_GP_CFG_16(0, fn, sfx, CFG_FLAGS), \ PORT_GP_CFG_29(1, fn, sfx, CFG_FLAGS), \ PORT_GP_CFG_15(2, fn, sfx, CFG_FLAGS), \@@ -37,6 +35,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 @@ -1519,67 +1562,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) -#define PIN_NONE U16_MAX +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 |SH_PFC_PIN_CFG_PULL_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 | SH_PFC_PIN_CFG_PULL_DOWN), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('R' ),29 ,TDI ,SH_PFC_PIN_CFG_PULL_UP |SH_PFC_PIN_CFG_PULL_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 |SH_PFC_PIN_CFG_PULL_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 ------------------------------------------------------------ */ @@ -1728,7 +1720,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 ,@@ -1741,12 +1733,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[] = { AVB_TX_CTL_MARK, AVB_TXC_MARK, AVB_TD0_MARK,@@ -3418,6 +3409,57 @@ static const unsigned int pwm6_b_mux[] = { PWM6_B_MARK, }; +/* - QSPI0 ------------------------------------------------------------------ */ +static const unsigned int qspi0_ctrl_pins[] = { +/* QSPI0_SPCLK, QSPI0_SSL */ +PIN_QSPI0_SPCLK ,PIN_QSPI0_SSL , +}; +static const unsigned int qspi0_ctrl_mux[] = { +QSPI0_SPCLK_MARK ,QSPI0_SSL_MARK , +}; +static const unsigned int qspi0_data2_pins[] = { +/* QSPI0_MOSI_IO0, QSPI0_MISO_IO1 */ +PIN_QSPI0_MOSI_IO0 ,PIN_QSPI0_MISO_IO1 , +}; +static const unsigned int qspi0_data2_mux[] = { +QSPI0_MOSI_IO0_MARK ,QSPI0_MISO_IO1_MARK , +}; +static const unsigned int qspi0_data4_pins[] = { +/* QSPI0_MOSI_IO0, QSPI0_MISO_IO1 */ +PIN_QSPI0_MOSI_IO0 ,PIN_QSPI0_MISO_IO1 , +/* QSPI0_IO2, QSPI0_IO3 */ +PIN_QSPI0_IO2 ,PIN_QSPI0_IO3 , +}; +static const unsigned int qspi0_data4_mux[] = { +QSPI0_MOSI_IO0_MARK ,QSPI0_MISO_IO1_MARK , +QSPI0_IO2_MARK ,QSPI0_IO3_MARK , +}; +/* - QSPI1 ------------------------------------------------------------------ */ +static const unsigned int qspi1_ctrl_pins[] = { +/* QSPI1_SPCLK, QSPI1_SSL */ +PIN_QSPI1_SPCLK ,PIN_QSPI1_SSL , +}; +static const unsigned int qspi1_ctrl_mux[] = { +QSPI1_SPCLK_MARK ,QSPI1_SSL_MARK , +}; +static const unsigned int qspi1_data2_pins[] = { +/* QSPI1_MOSI_IO0, QSPI1_MISO_IO1 */ +PIN_QSPI1_MOSI_IO0 ,PIN_QSPI1_MISO_IO1 , +}; +static const unsigned int qspi1_data2_mux[] = { +QSPI1_MOSI_IO0_MARK ,QSPI1_MISO_IO1_MARK , +}; +static const unsigned int qspi1_data4_pins[] = { +/* QSPI1_MOSI_IO0, QSPI1_MISO_IO1 */ +PIN_QSPI1_MOSI_IO0 ,PIN_QSPI1_MISO_IO1 , +/* QSPI1_IO2, QSPI1_IO3 */ +PIN_QSPI1_IO2 ,PIN_QSPI1_IO3 , +}; +static const unsigned int qspi1_data4_mux[] = { +QSPI1_MOSI_IO0_MARK ,QSPI1_MISO_IO1_MARK , +QSPI1_IO2_MARK ,QSPI1_IO3_MARK , +}; +/* - SATA --------------------------------------------------------------------*/ static const unsigned int sata0_devslp_a_pins[] = {/* DEVSLP */ @@ -4391,7 +4433,7 @@ static const unsigned int vin5_clk_mux[] = { }; static const struct { - struct sh_pfc_pin_group common[318]; + struct sh_pfc_pin_group common[324]; #ifdef CONFIG_PINCTRL_PFC_R8A77965 struct sh_pfc_pin_group automotive[30]; #endif@@ -4596,6 +4638,12 @@ static const struct {SH_PFC_PIN_GROUP (pwm5_b),SH_PFC_PIN_GROUP (pwm6_a),SH_PFC_PIN_GROUP (pwm6_b), +SH_PFC_PIN_GROUP (qspi0_ctrl), +SH_PFC_PIN_GROUP (qspi0_data2), +SH_PFC_PIN_GROUP (qspi0_data4), +SH_PFC_PIN_GROUP (qspi1_ctrl), +SH_PFC_PIN_GROUP (qspi1_data2), +SH_PFC_PIN_GROUP (qspi1_data4),SH_PFC_PIN_GROUP (sata0_devslp_a),SH_PFC_PIN_GROUP (sata0_devslp_b), SH_PFC_PIN_GROUP(scif0_data),@@ -5088,6 +5136,18 @@ static const char * const pwm6_groups[] = { "pwm6_b", }; +static const char *const qspi0_groups[] = { +"qspi0_ctrl" , +"qspi0_data2" , +"qspi0_data4" , +}; + +static const char *const qspi1_groups[] = { +"qspi1_ctrl" , +"qspi1_data2" , +"qspi1_data4" , +}; +static const char *const sata0_groups[] = {"sata0_devslp_a" ,"sata0_devslp_b" ,@@ -5267,7 +5327,7 @@ static const char * const vin5_groups[] = { }; static const struct { - struct sh_pfc_function common[51]; + struct sh_pfc_function common[53]; #ifdef CONFIG_PINCTRL_PFC_R8A77965 struct sh_pfc_function automotive[4]; #endif@@ -5304,6 +5364,8 @@ static const struct {SH_PFC_FUNCTION (pwm4),SH_PFC_FUNCTION (pwm5),SH_PFC_FUNCTION (pwm6), +SH_PFC_FUNCTION (qspi0), +SH_PFC_FUNCTION (qspi1),SH_PFC_FUNCTION (sata0),SH_PFC_FUNCTION (scif0), SH_PFC_FUNCTION(scif1),@@ -5900,44 +5962,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 */ @@ -5991,7 +6053,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 */@@ -6010,29 +6072,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 */Lines of this file are not shown. View the raw message.
drivers/pinctrl/renesas/pfc-r8a77970.c +80
-24Lines of this file are not shown. View the raw message.
drivers/pinctrl/renesas/pfc-r8a77980.c +78
-2Lines of this file are not shown. View the raw message.
drivers/pinctrl/renesas/pfc-r8a77990.c +88
-95Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
2.30.2
Part of the diff is not shown here. View the raw message.
PATCH 18/30 pinctrl: renesas: Deduplicate Kconfig
In reply to Marek VasutThe help text in the Kconfig file was always a copy of the same thing. Move single copy into the common PFC driver entry instead. Also fix a copy-paste error in the PFC help text, which identified PFC as clock.
--- drivers/pinctrl/renesas/Kconfig | 74 +++------------------------------ 1 file changed, 5 insertions(+), 69 deletions(-)
drivers/pinctrl/renesas/Kconfig +5 -69
@@ -5,7 +5,11 @@ config PINCTRL_PFC depends on DM && ARCH_RMOBILE default n if CPU_RZA1 help - Enable support for clock present on Renesas RCar SoCs. + Support pin multiplexing control on Renesas SoCs. + + These drivers are controlled by a device tree node which contains + both the GPIO definitions and pin control functions for each + available multiplex function. config PINCTRL_PFC_R8A7790 bool "Renesas RCar Gen2 R8A7790 pin control driver"
@@ -13,160 +17,96 @@ config PINCTRL_PFC_R8A7790 help Support pin multiplexing control on Renesas RCar Gen3 R8A7790 SoCs. - The driver is controlled by a device tree node which contains both - the GPIO definitions and pin control functions for each available - multiplex function. - config PINCTRL_PFC_R8A7791 bool "Renesas RCar Gen2 R8A7791 pin control driver" depends on PINCTRL_PFC help Support pin multiplexing control on Renesas RCar Gen3 R8A7791 SoCs. - The driver is controlled by a device tree node which contains both - the GPIO definitions and pin control functions for each available - multiplex function. - config PINCTRL_PFC_R8A7792 bool "Renesas RCar Gen2 R8A7792 pin control driver" depends on PINCTRL_PFC help Support pin multiplexing control on Renesas RCar Gen3 R8A7792 SoCs. - The driver is controlled by a device tree node which contains both - the GPIO definitions and pin control functions for each available - multiplex function. - config PINCTRL_PFC_R8A7793 bool "Renesas RCar Gen2 R8A7793 pin control driver" depends on PINCTRL_PFC help Support pin multiplexing control on Renesas RCar Gen3 R8A7793 SoCs. - The driver is controlled by a device tree node which contains both - the GPIO definitions and pin control functions for each available - multiplex function. - config PINCTRL_PFC_R8A7794 bool "Renesas RCar Gen2 R8A7794 pin control driver" depends on PINCTRL_PFC help Support pin multiplexing control on Renesas RCar Gen3 R8A7794 SoCs. - The driver is controlled by a device tree node which contains both - the GPIO definitions and pin control functions for each available - multiplex function. - config PINCTRL_PFC_R8A774A1 bool "Renesas RZ/G2 R8A774A1 pin control driver" depends on PINCTRL_PFC help Support pin multiplexing control on Renesas RZ/G2M R8A774A1 SoCs. - The driver is controlled by a device tree node which contains both - the GPIO definitions and pin control functions for each available - multiplex function. - config PINCTRL_PFC_R8A774B1 bool "Renesas RZ/G2 R8A774B1 pin control driver" depends on PINCTRL_PFC help Support pin multiplexing control on Renesas RZ/G2N R8A774B1 SoCs. - The driver is controlled by a device tree node which contains both - the GPIO definitions and pin control functions for each available - multiplex function. - config PINCTRL_PFC_R8A774C0 bool "Renesas RZ/G2 R8A774C0 pin control driver" depends on PINCTRL_PFC help Support pin multiplexing control on Renesas RZ/G2E R8A774C0 SoCs. - The driver is controlled by a device tree node which contains both - the GPIO definitions and pin control functions for each available - multiplex function. - config PINCTRL_PFC_R8A774E1 bool "Renesas RZ/G2 R8A774E1 pin control driver" depends on PINCTRL_PFC help Support pin multiplexing control on Renesas RZ/G2H R8A774E1 SoCs. - The driver is controlled by a device tree node which contains both - the GPIO definitions and pin control functions for each available - multiplex function. - config PINCTRL_PFC_R8A7795 bool "Renesas RCar Gen3 R8A7795 pin control driver" depends on PINCTRL_PFC help Support pin multiplexing control on Renesas RCar Gen3 R8A7795 SoCs. - The driver is controlled by a device tree node which contains both - the GPIO definitions and pin control functions for each available - multiplex function. - config PINCTRL_PFC_R8A7796 bool "Renesas RCar Gen3 R8A7796 pin control driver" depends on PINCTRL_PFC help Support pin multiplexing control on Renesas RCar Gen3 R8A7796 SoCs. - The driver is controlled by a device tree node which contains both - the GPIO definitions and pin control functions for each available - multiplex function. - config PINCTRL_PFC_R8A77965 bool "Renesas RCar Gen3 R8A77965 pin control driver" depends on PINCTRL_PFC help Support pin multiplexing control on Renesas RCar Gen3 R8A77965 SoCs. - The driver is controlled by a device tree node which contains both - the GPIO definitions and pin control functions for each available - multiplex function. - config PINCTRL_PFC_R8A77970 bool "Renesas RCar Gen3 R8A77970 pin control driver" depends on PINCTRL_PFC help Support pin multiplexing control on Renesas RCar Gen3 R8A77970 SoCs. - The driver is controlled by a device tree node which contains both - the GPIO definitions and pin control functions for each available - multiplex function. - config PINCTRL_PFC_R8A77980 bool "Renesas RCar Gen3 R8A77980 pin control driver" depends on PINCTRL_PFC help Support pin multiplexing control on Renesas RCar Gen3 R8A77980 SoCs. - The driver is controlled by a device tree node which contains both - the GPIO definitions and pin control functions for each available - multiplex function. - config PINCTRL_PFC_R8A77990 bool "Renesas RCar Gen3 R8A77990 pin control driver" depends on PINCTRL_PFC help Support pin multiplexing control on Renesas RCar Gen3 R8A77990 SoCs. - The driver is controlled by a device tree node which contains both - the GPIO definitions and pin control functions for each available - multiplex function. - config PINCTRL_PFC_R8A77995 bool "Renesas RCar Gen3 R8A77995 pin control driver" depends on PINCTRL_PFC help Support pin multiplexing control on Renesas RCar Gen3 R8A77995 SoCs. - The driver is controlled by a device tree node which contains both - the GPIO definitions and pin control functions for each available - multiplex function. - config PINCTRL_PFC_R7S72100 bool "Renesas RZ/A1 R7S72100 pin control driver" depends on CPU_RZA1
@@ -174,8 +114,4 @@ config PINCTRL_PFC_R7S72100 help Support pin multiplexing control on Renesas RZ/A1 R7S72100 SoCs. - The driver is controlled by a device tree node which contains both - the GPIO definitions and pin control functions for each available - multiplex function. - endif
Signature · 1 line
2.30.2
PATCH 19/30 pinctrl: renesas: Fix R-Car Gen2 help text
In reply to Marek VasutThe help text for Gen2 entries had a copy paste error, still containing the Gen3 string, while the description was correctly listing Gen2. Fix the help text.
--- drivers/pinctrl/renesas/Kconfig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/pinctrl/renesas/Kconfig +5 -5
@@ -15,31 +15,31 @@ config PINCTRL_PFC_R8A7790 bool "Renesas RCar Gen2 R8A7790 pin control driver" depends on PINCTRL_PFC help - Support pin multiplexing control on Renesas RCar Gen3 R8A7790 SoCs. + Support pin multiplexing control on Renesas RCar Gen2 R8A7790 SoCs. config PINCTRL_PFC_R8A7791 bool "Renesas RCar Gen2 R8A7791 pin control driver" depends on PINCTRL_PFC help - Support pin multiplexing control on Renesas RCar Gen3 R8A7791 SoCs. + Support pin multiplexing control on Renesas RCar Gen2 R8A7791 SoCs. config PINCTRL_PFC_R8A7792 bool "Renesas RCar Gen2 R8A7792 pin control driver" depends on PINCTRL_PFC help - Support pin multiplexing control on Renesas RCar Gen3 R8A7792 SoCs. + Support pin multiplexing control on Renesas RCar Gen2 R8A7792 SoCs. config PINCTRL_PFC_R8A7793 bool "Renesas RCar Gen2 R8A7793 pin control driver" depends on PINCTRL_PFC help - Support pin multiplexing control on Renesas RCar Gen3 R8A7793 SoCs. + Support pin multiplexing control on Renesas RCar Gen2 R8A7793 SoCs. config PINCTRL_PFC_R8A7794 bool "Renesas RCar Gen2 R8A7794 pin control driver" depends on PINCTRL_PFC help - Support pin multiplexing control on Renesas RCar Gen3 R8A7794 SoCs. + Support pin multiplexing control on Renesas RCar Gen2 R8A7794 SoCs. config PINCTRL_PFC_R8A774A1 bool "Renesas RZ/G2 R8A774A1 pin control driver"
Signature · 1 line
2.30.2
PATCH 20/30 pinctrl: renesas: Implement unlock register masks
In reply to Marek VasutThe V3U SoC has several unlock registers, one per register group. They reside at offset zero in each 0x200 bytes-sized block.
To avoid adding yet another table to the PFC implementation, this patch adds the option to specify an address mask instead of the fixed address in sh_pfc_soc_info::unlock_reg.
This is a direct port of Linux 5.12 commit e127ef2ed0a6 ("pinctrl: renesas: Implement unlock register masks") by Ulrich Hecht <[email protected]>
--- drivers/pinctrl/renesas/pfc.c | 39 ++++++++++++++++---------------- drivers/pinctrl/renesas/sh_pfc.h | 2 +- 2 files changed, 20 insertions(+), 21 deletions(-)
drivers/pinctrl/renesas/pfc.c +19 -20
@@ -131,14 +131,25 @@ u32 sh_pfc_read(struct sh_pfc *pfc, u32 reg)return sh_pfc_read_raw_reg ((void __iomem *)(uintptr_t )reg,32 ); } -void sh_pfc_write (struct sh_pfc *pfc,u32 reg,u32 data) +static void sh_pfc_unlock_reg (struct sh_pfc *pfc,u32 reg,u32 data) { -void __iomem *unlock_reg = - (void __iomem *)(uintptr_t )pfc->info->unlock_reg; +u32 unlock; + +if (!pfc->info->unlock_reg) +return ; -if (pfc->info->unlock_reg) -sh_pfc_write_raw_reg (unlock_reg,32 , ~data); +if (pfc->info->unlock_reg >=0x80000000UL ) + unlock = pfc->info->unlock_reg; +else +/* unlock_reg is a mask */ + unlock = reg & ~pfc->info->unlock_reg; + +sh_pfc_write_raw_reg ((void __iomem *)(uintptr_t )unlock,32 , ~data); +} +void sh_pfc_write (struct sh_pfc *pfc,u32 reg,u32 data) +{ +sh_pfc_unlock_reg (pfc, reg, data);sh_pfc_write_raw_reg ((void __iomem *)(uintptr_t )reg,32 , data); }
@@ -168,8 +179,6 @@ static void sh_pfc_write_config_reg(struct sh_pfc *pfc, unsigned int field, u32 value) {void __iomem *mapped_reg; -void __iomem *unlock_reg = - (void __iomem *)(uintptr_t )pfc->info->unlock_reg;unsigned int pos;u32 mask, data;
@@ -186,9 +195,7 @@ static void sh_pfc_write_config_reg(struct sh_pfc *pfc, data &= mask; data |= value; -if (pfc->info->unlock_reg) -sh_pfc_write_raw_reg (unlock_reg,32 , ~data); - +sh_pfc_unlock_reg (pfc, crp->reg, data);sh_pfc_write_raw_reg (mapped_reg, crp->reg_width, data); }
@@ -679,8 +686,6 @@ static int sh_pfc_pinconf_set_drive_strength(struct sh_pfc *pfc,unsigned int size;unsigned int step;void __iomem *reg; -void __iomem *unlock_reg = - (void __iomem *)(uintptr_t )pfc->info->unlock_reg;u32 val; reg =sh_pfc_pinconf_find_drive_strength_reg (pfc, pin, &offset, &size);
@@ -701,9 +706,7 @@ static int sh_pfc_pinconf_set_drive_strength(struct sh_pfc *pfc, val &= ~GENMASK (offset +4 -1 , offset); val |= strength << offset; -if (unlock_reg) -sh_pfc_write_raw_reg (unlock_reg,32 , ~val); - +sh_pfc_unlock_reg (pfc, (uintptr_t )reg, val);sh_pfc_write_raw_reg (reg,32 , val);return 0 ;
@@ -743,8 +746,6 @@ static int sh_pfc_pinconf_set(struct sh_pfc_pinctrl *pmx, unsigned _pin, {struct sh_pfc *pfc = pmx->pfc;void __iomem *pocctrl; -void __iomem *unlock_reg = - (void __iomem *)(uintptr_t )pfc->info->unlock_reg;u32 addr, val;int bit, ret;
@@ -790,9 +791,7 @@ static int sh_pfc_pinconf_set(struct sh_pfc_pinctrl *pmx, unsigned _pin,else val &= ~BIT (bit); -if (unlock_reg) -sh_pfc_write_raw_reg (unlock_reg,32 , ~val); - +sh_pfc_unlock_reg (pfc, addr, val);sh_pfc_write_raw_reg (pocctrl,32 , val);break ;
drivers/pinctrl/renesas/sh_pfc.h +1 -1
@@ -294,7 +294,7 @@ struct sh_pfc_soc_info {const struct pinmux_irq *gpio_irq;unsigned int gpio_irq_size; -u32 unlock_reg; +u32 unlock_reg;/* can be literal address or mask */ };u32 sh_pfc_read (struct sh_pfc *pfc,u32 reg);
Signature · 1 line
2.30.2
Lad
PATCH 20/30 pinctrl: renesas: Implement unlock register masks
Hi Marek,
Thank you for the patch.
Quoted 12 lines · Marek Vasut
The V3U SoC has several unlock registers, one per register group. They reside at offset zero in each
0x200bytes-sized block.To avoid adding yet another table to the PFC implementation, this patch adds the option to specify an address mask instead of the fixed address in
sh_pfc_soc_info::unlock_reg.This is a direct port of Linux 5.12 commit
e127ef2ed0a6("pinctrl: renesas: Implement unlock register masks") by Ulrich Hecht <[email protected]>
Quoted 6 lines
Signed-off-by Marek Vasut <[email protected]>--- drivers/pinctrl/renesas/pfc.c | 39 ++++++++++++++++---------------- drivers/pinctrl/renesas/sh_pfc.h | 2 +- 2 files changed, 20 insertions(+), 21 deletions(-)
Tested on RZ/G2{EHMN} boards
Cheers,
Prabhakar
Quoted 111 lines
drivers/pinctrl/renesas/pfc.c +19
-20@@ -131,14 +131,25 @@ u32 sh_pfc_read(struct sh_pfc *pfc, u32 reg)return sh_pfc_read_raw_reg ((void __iomem *)(uintptr_t )reg,32 ); } -void sh_pfc_write (struct sh_pfc *pfc,u32 reg,u32 data) +static void sh_pfc_unlock_reg (struct sh_pfc *pfc,u32 reg,u32 data) { -void __iomem *unlock_reg = - (void __iomem *)(uintptr_t )pfc->info->unlock_reg; +u32 unlock; + +if (!pfc->info->unlock_reg) +return ; -if (pfc->info->unlock_reg) -sh_pfc_write_raw_reg (unlock_reg,32 , ~data); +if (pfc->info->unlock_reg >=0x80000000UL ) + unlock = pfc->info->unlock_reg; +else +/* unlock_reg is a mask */ + unlock = reg & ~pfc->info->unlock_reg; + +sh_pfc_write_raw_reg ((void __iomem *)(uintptr_t )unlock,32 , ~data); +} +void sh_pfc_write (struct sh_pfc *pfc,u32 reg,u32 data) +{ +sh_pfc_unlock_reg (pfc, reg, data);sh_pfc_write_raw_reg ((void __iomem *)(uintptr_t )reg,32 , data); }@@ -168,8 +179,6 @@ static void sh_pfc_write_config_reg(struct sh_pfc *pfc, unsigned int field, u32 value) {void __iomem *mapped_reg; -void __iomem *unlock_reg = - (void __iomem *)(uintptr_t )pfc->info->unlock_reg;unsigned int pos;u32 mask, data;@@ -186,9 +195,7 @@ static void sh_pfc_write_config_reg(struct sh_pfc *pfc, data &= mask; data |= value; -if (pfc->info->unlock_reg) -sh_pfc_write_raw_reg (unlock_reg,32 , ~data); - +sh_pfc_unlock_reg (pfc, crp->reg, data);sh_pfc_write_raw_reg (mapped_reg, crp->reg_width, data); }@@ -679,8 +686,6 @@ static int sh_pfc_pinconf_set_drive_strength(struct sh_pfc *pfc,unsigned int size;unsigned int step;void __iomem *reg; -void __iomem *unlock_reg = - (void __iomem *)(uintptr_t )pfc->info->unlock_reg;u32 val; reg =sh_pfc_pinconf_find_drive_strength_reg (pfc, pin, &offset, &size);@@ -701,9 +706,7 @@ static int sh_pfc_pinconf_set_drive_strength(struct sh_pfc *pfc, val &= ~GENMASK (offset +4 -1 , offset); val |= strength << offset; -if (unlock_reg) -sh_pfc_write_raw_reg (unlock_reg,32 , ~val); - +sh_pfc_unlock_reg (pfc, (uintptr_t )reg, val);sh_pfc_write_raw_reg (reg,32 , val);return 0 ;@@ -743,8 +746,6 @@ static int sh_pfc_pinconf_set(struct sh_pfc_pinctrl *pmx, unsigned _pin, {struct sh_pfc *pfc = pmx->pfc;void __iomem *pocctrl; -void __iomem *unlock_reg = - (void __iomem *)(uintptr_t )pfc->info->unlock_reg;u32 addr, val;int bit, ret;@@ -790,9 +791,7 @@ static int sh_pfc_pinconf_set(struct sh_pfc_pinctrl *pmx, unsigned _pin,else val &= ~BIT (bit); -if (unlock_reg) -sh_pfc_write_raw_reg (unlock_reg,32 , ~val); - +sh_pfc_unlock_reg (pfc, addr, val);sh_pfc_write_raw_reg (pocctrl,32 , val);break ;drivers/pinctrl/renesas/sh_pfc.h +1
-2@@ -294,7 +294,7 @@ struct sh_pfc_soc_info {const struct pinmux_irq *gpio_irq;unsigned int gpio_irq_size; -u32 unlock_reg; +u32 unlock_reg;/* can be literal address or mask */ };u32 sh_pfc_read (struct sh_pfc *pfc,u32 reg); --2.30.2
PATCH 21/30 pinctrl: renesas: Import R8A779A0 V3U PFC tables
In reply to Marek VasutImport R8A779A0 V3U PFC tables from Linux 5.12, commit 9f4ad9e425a1 ("Linux 5.12") . Add parts of PFC table integration from
pinctrl: renesas: Add R8A779A0 V3U PFC tables
by Hai Pham <[email protected]>" .
--- drivers/pinctrl/renesas/Kconfig | 6 + drivers/pinctrl/renesas/Makefile | 1 + drivers/pinctrl/renesas/pfc-r8a779a0.c | 4503 ++++++++++++++++++++++++ drivers/pinctrl/renesas/pfc.c | 12 + drivers/pinctrl/renesas/sh_pfc.h | 1 + 5 files changed, 4523 insertions(+) create mode 100644 drivers/pinctrl/renesas/pfc-r8a779a0.c
drivers/pinctrl/renesas/Kconfig +6 -0
@@ -107,6 +107,12 @@ config PINCTRL_PFC_R8A77995 help Support pin multiplexing control on Renesas RCar Gen3 R8A77995 SoCs. +config PINCTRL_PFC_R8A779A0 + bool "Renesas RCar Gen3 R8A779A0 pin control driver" + depends on PINCTRL_PFC + help + Support pin multiplexing control on Renesas RCar Gen3 R8A779A0 SoCs. + config PINCTRL_PFC_R7S72100 bool "Renesas RZ/A1 R7S72100 pin control driver" depends on CPU_RZA1
drivers/pinctrl/renesas/Makefile +1 -0
@@ -15,4 +15,5 @@ obj-$(CONFIG_PINCTRL_PFC_R8A77970) += pfc-r8a77970.o obj-$(CONFIG_PINCTRL_PFC_R8A77980) += pfc-r8a77980.o obj-$(CONFIG_PINCTRL_PFC_R8A77990) += pfc-r8a77990.o obj-$(CONFIG_PINCTRL_PFC_R8A77995) += pfc-r8a77995.o +obj-$(CONFIG_PINCTRL_PFC_R8A779A0) += pfc-r8a779a0.o obj-$(CONFIG_PINCTRL_PFC_R7S72100) += pfc-r7s72100.o
drivers/pinctrl/renesas/pfc-r8a779a0.c new file +4503 -0
2,983 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.30.2
Part of the diff is not shown here. View the raw message.
PATCH 22/30 ARM: dts: renesas: Add R8A779A0 V3U DTs and headers
In reply to Marek VasutImport R8A779A0 V3U DTs and headers from Linux 5.12, commit 9f4ad9e425a1 ("Linux 5.12") .
--- arch/arm/dts/r8a779a0.dtsi | 970 ++++++++++++++++++ include/dt-bindings/clock/r8a779a0-cpg-mssr.h | 55 + include/dt-bindings/power/r8a779a0-sysc.h | 59 ++ 3 files changed, 1084 insertions(+) create mode 100644 arch/arm/dts/r8a779a0.dtsi create mode 100644 include/dt-bindings/clock/r8a779a0-cpg-mssr.h create mode 100644 include/dt-bindings/power/r8a779a0-sysc.h
arch/arm/dts/r8a779a0.dtsi new file +970 -0
@@ -0,0 +1,970 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Device Tree Source for the R-Car V3U (R8A779A0) SoC + * + * Copyright (C) 2020 Renesas Electronics Corp. + */ + +#include <dt-bindings/clock/r8a779a0-cpg-mssr.h> +#include <dt-bindings/interrupt-controller/arm-gic.h> +#include <dt-bindings/power/r8a779a0-sysc.h> + +/ { + compatible = "renesas,r8a779a0"; + #address-cells = <2>; + #size-cells = <2>; + + aliases { + i2c0 = &i2c0; + i2c1 = &i2c1; + i2c2 = &i2c2; + i2c3 = &i2c3; + i2c4 = &i2c4; + i2c5 = &i2c5; + i2c6 = &i2c6; + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + a76_0: cpu at 0 { + compatible = "arm,cortex-a76"; + reg = <0>; + device_type = "cpu"; + power-domains = <&sysc R8A779A0_PD_A1E0D0C0>; + next-level-cache = <&L3_CA76_0>; + }; + + L3_CA76_0: cache-controller-0 { + compatible = "cache"; + power-domains = <&sysc R8A779A0_PD_A2E0D0>; + cache-unified; + cache-level = <3>; + }; + }; + + 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>; + }; + + pmu_a76 { + compatible = "arm,cortex-a76-pmu"; + interrupts-extended = <&gic GIC_SPI 139 IRQ_TYPE_LEVEL_HIGH>, + <&gic GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>, + <&gic GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>, + <&gic GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>; + }; + + /* External SCIF clock - to be overridden by boards that provide it */ + scif_clk: scif { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <0>; + }; + + soc: soc { + compatible = "simple-bus"; + interrupt-parent = <&gic>; + #address-cells = <2>; + #size-cells = <2>; + ranges; + + rwdt: watchdog at e6020000 { + compatible = "renesas,r8a779a0-wdt", + "renesas,rcar-gen3-wdt"; + reg = <0 0xe6020000 0 0x0c>; + clocks = <&cpg CPG_MOD 907>; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 907>; + status = "disabled"; + }; + + pfc: pin-controller at e6050000 { + compatible = "renesas,pfc-r8a779a0"; + reg = <0 0xe6050000 0 0x16c>, <0 0xe6050800 0 0x16c>, + <0 0xe6058000 0 0x16c>, <0 0xe6058800 0 0x16c>, + <0 0xe6060000 0 0x16c>, <0 0xe6060800 0 0x16c>, + <0 0xe6068000 0 0x16c>, <0 0xe6068800 0 0x16c>, + <0 0xe6069000 0 0x16c>, <0 0xe6069800 0 0x16c>; + }; + + gpio0: gpio at e6058180 { + compatible = "renesas,gpio-r8a779a0"; + reg = <0 0xe6058180 0 0x54>; + interrupts = <GIC_SPI 832 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 916>; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 916>; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&pfc 0 0 28>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio1: gpio at e6050180 { + compatible = "renesas,gpio-r8a779a0"; + reg = <0 0xe6050180 0 0x54>; + interrupts = <GIC_SPI 836 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 915>; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 915>; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&pfc 0 32 31>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio2: gpio at e6050980 { + compatible = "renesas,gpio-r8a779a0"; + reg = <0 0xe6050980 0 0x54>; + interrupts = <GIC_SPI 840 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 915>; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 915>; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&pfc 0 64 25>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio3: gpio at e6058980 { + compatible = "renesas,gpio-r8a779a0"; + reg = <0 0xe6058980 0 0x54>; + interrupts = <GIC_SPI 844 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 916>; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 916>; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&pfc 0 96 17>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio4: gpio at e6060180 { + compatible = "renesas,gpio-r8a779a0"; + reg = <0 0xe6060180 0 0x54>; + interrupts = <GIC_SPI 848 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 917>; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 917>; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&pfc 0 128 27>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio5: gpio at e6060980 { + compatible = "renesas,gpio-r8a779a0"; + reg = <0 0xe6060980 0 0x54>; + interrupts = <GIC_SPI 852 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 917>; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 917>; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&pfc 0 160 21>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio6: gpio at e6068180 { + compatible = "renesas,gpio-r8a779a0"; + reg = <0 0xe6068180 0 0x54>; + interrupts = <GIC_SPI 856 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 918>; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 918>; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&pfc 0 192 21>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio7: gpio at e6068980 { + compatible = "renesas,gpio-r8a779a0"; + reg = <0 0xe6068980 0 0x54>; + interrupts = <GIC_SPI 860 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 918>; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 918>; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&pfc 0 224 21>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio8: gpio at e6069180 { + compatible = "renesas,gpio-r8a779a0"; + reg = <0 0xe6069180 0 0x54>; + interrupts = <GIC_SPI 864 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 918>; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 918>; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&pfc 0 256 21>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio9: gpio at e6069980 { + compatible = "renesas,gpio-r8a779a0"; + reg = <0 0xe6069980 0 0x54>; + interrupts = <GIC_SPI 868 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 918>; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 918>; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&pfc 0 288 21>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + cpg: clock-controller at e6150000 { + compatible = "renesas,r8a779a0-cpg-mssr"; + reg = <0 0xe6150000 0 0x4000>; + 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,r8a779a0-rst"; + reg = <0 0xe6160000 0 0x4000>; + }; + + sysc: system-controller at e6180000 { + compatible = "renesas,r8a779a0-sysc"; + reg = <0 0xe6180000 0 0x4000>; + #power-domain-cells = <1>; + }; + + i2c0: i2c at e6500000 { + compatible = "renesas,i2c-r8a779a0", + "renesas,rcar-gen3-i2c"; + reg = <0 0xe6500000 0 0x40>; + interrupts = <GIC_SPI 238 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 518>; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 518>; + dmas = <&dmac1 0x91>, <&dmac1 0x90>; + dma-names = "tx", "rx"; + i2c-scl-internal-delay-ns = <110>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c1: i2c at e6508000 { + compatible = "renesas,i2c-r8a779a0", + "renesas,rcar-gen3-i2c"; + reg = <0 0xe6508000 0 0x40>; + interrupts = <GIC_SPI 239 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 519>; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 519>; + dmas = <&dmac1 0x93>, <&dmac1 0x92>; + dma-names = "tx", "rx"; + i2c-scl-internal-delay-ns = <110>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c2: i2c at e6510000 { + compatible = "renesas,i2c-r8a779a0", + "renesas,rcar-gen3-i2c"; + reg = <0 0xe6510000 0 0x40>; + interrupts = <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 520>; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 520>; + dmas = <&dmac1 0x95>, <&dmac1 0x94>; + dma-names = "tx", "rx"; + i2c-scl-internal-delay-ns = <110>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c3: i2c at e66d0000 { + compatible = "renesas,i2c-r8a779a0", + "renesas,rcar-gen3-i2c"; + reg = <0 0xe66d0000 0 0x40>; + interrupts = <GIC_SPI 241 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 521>; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 521>; + dmas = <&dmac1 0x97>, <&dmac1 0x96>; + dma-names = "tx", "rx"; + i2c-scl-internal-delay-ns = <110>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c4: i2c at e66d8000 { + compatible = "renesas,i2c-r8a779a0", + "renesas,rcar-gen3-i2c"; + reg = <0 0xe66d8000 0 0x40>; + interrupts = <GIC_SPI 242 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 522>; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 522>; + dmas = <&dmac1 0x99>, <&dmac1 0x98>; + dma-names = "tx", "rx"; + i2c-scl-internal-delay-ns = <110>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c5: i2c at e66e0000 { + compatible = "renesas,i2c-r8a779a0", + "renesas,rcar-gen3-i2c"; + reg = <0 0xe66e0000 0 0x40>; + interrupts = <GIC_SPI 243 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 523>; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 523>; + dmas = <&dmac1 0x9b>, <&dmac1 0x9a>; + dma-names = "tx", "rx"; + i2c-scl-internal-delay-ns = <110>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c6: i2c at e66e8000 { + compatible = "renesas,i2c-r8a779a0", + "renesas,rcar-gen3-i2c"; + reg = <0 0xe66e8000 0 0x40>; + interrupts = <GIC_SPI 244 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 524>; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 524>; + dmas = <&dmac1 0x9d>, <&dmac1 0x9c>; + dma-names = "tx", "rx"; + i2c-scl-internal-delay-ns = <110>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + hscif0: serial at e6540000 { + compatible = "renesas,hscif-r8a779a0", + "renesas,rcar-gen3-hscif", "renesas,hscif"; + reg = <0 0xe6540000 0 0x60>; + interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 514>, + <&cpg CPG_CORE R8A779A0_CLK_S1D2>, + <&scif_clk>; + clock-names = "fck", "brg_int", "scif_clk"; + dmas = <&dmac1 0x31>, <&dmac1 0x30>; + dma-names = "tx", "rx"; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 514>; + status = "disabled"; + }; + + hscif1: serial at e6550000 { + compatible = "renesas,hscif-r8a779a0", + "renesas,rcar-gen3-hscif", "renesas,hscif"; + reg = <0 0xe6550000 0 0x60>; + interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 515>, + <&cpg CPG_CORE R8A779A0_CLK_S1D2>, + <&scif_clk>; + clock-names = "fck", "brg_int", "scif_clk"; + dmas = <&dmac1 0x33>, <&dmac1 0x32>; + dma-names = "tx", "rx"; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 515>; + status = "disabled"; + }; + + hscif2: serial at e6560000 { + compatible = "renesas,hscif-r8a779a0", + "renesas,rcar-gen3-hscif", "renesas,hscif"; + reg = <0 0xe6560000 0 0x60>; + interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 516>, + <&cpg CPG_CORE R8A779A0_CLK_S1D2>, + <&scif_clk>; + clock-names = "fck", "brg_int", "scif_clk"; + dmas = <&dmac1 0x35>, <&dmac1 0x34>; + dma-names = "tx", "rx"; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 516>; + status = "disabled"; + }; + + hscif3: serial at e66a0000 { + compatible = "renesas,hscif-r8a779a0", + "renesas,rcar-gen3-hscif", "renesas,hscif"; + reg = <0 0xe66a0000 0 0x60>; + interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 517>, + <&cpg CPG_CORE R8A779A0_CLK_S1D2>, + <&scif_clk>; + clock-names = "fck", "brg_int", "scif_clk"; + dmas = <&dmac1 0x37>, <&dmac1 0x36>; + dma-names = "tx", "rx"; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 517>; + status = "disabled"; + }; + + avb0: ethernet at e6800000 { + compatible = "renesas,etheravb-r8a779a0", + "renesas,etheravb-rcar-gen3"; + reg = <0 0xe6800000 0 0x800>; + interrupts = <GIC_SPI 256 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 257 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 258 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 259 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 260 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 261 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 262 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 263 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 264 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 265 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 266 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 267 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 269 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 270 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 271 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 272 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 273 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 274 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 275 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 276 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 277 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 278 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 279 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 280 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "ch0", "ch1", "ch2", "ch3", + "ch4", "ch5", "ch6", "ch7", + "ch8", "ch9", "ch10", "ch11", + "ch12", "ch13", "ch14", "ch15", + "ch16", "ch17", "ch18", "ch19", + "ch20", "ch21", "ch22", "ch23", + "ch24"; + clocks = <&cpg CPG_MOD 211>; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 211>; + phy-mode = "rgmii"; + rx-internal-delay-ps = <0>; + tx-internal-delay-ps = <0>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + avb1: ethernet at e6810000 { + compatible = "renesas,etheravb-r8a779a0", + "renesas,etheravb-rcar-gen3"; + reg = <0 0xe6810000 0 0x800>; + interrupts = <GIC_SPI 281 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 282 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 283 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 284 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 285 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 286 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 287 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 288 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 289 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 290 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 291 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 292 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 293 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 294 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 295 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 296 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 297 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 298 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 299 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 300 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 301 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 302 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 303 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 304 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 305 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "ch0", "ch1", "ch2", "ch3", + "ch4", "ch5", "ch6", "ch7", + "ch8", "ch9", "ch10", "ch11", + "ch12", "ch13", "ch14", "ch15", + "ch16", "ch17", "ch18", "ch19", + "ch20", "ch21", "ch22", "ch23", + "ch24"; + clocks = <&cpg CPG_MOD 212>; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 212>; + phy-mode = "rgmii"; + rx-internal-delay-ps = <0>; + tx-internal-delay-ps = <0>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + avb2: ethernet at e6820000 { + compatible = "renesas,etheravb-r8a779a0", + "renesas,etheravb-rcar-gen3"; + reg = <0 0xe6820000 0 0x1000>; + interrupts = <GIC_SPI 306 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 307 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "ch0", "ch1", "ch2", "ch3", + "ch4", "ch5", "ch6", "ch7", + "ch8", "ch9", "ch10", "ch11", + "ch12", "ch13", "ch14", "ch15", + "ch16", "ch17", "ch18", "ch19", + "ch20", "ch21", "ch22", "ch23", + "ch24"; + clocks = <&cpg CPG_MOD 213>; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 213>; + phy-mode = "rgmii"; + rx-internal-delay-ps = <0>; + tx-internal-delay-ps = <0>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + avb3: ethernet at e6830000 { + compatible = "renesas,etheravb-r8a779a0", + "renesas,etheravb-rcar-gen3"; + reg = <0 0xe6830000 0 0x1000>; + interrupts = <GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 347 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 348 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 349 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 350 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 351 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 352 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "ch0", "ch1", "ch2", "ch3", + "ch4", "ch5", "ch6", "ch7", + "ch8", "ch9", "ch10", "ch11", + "ch12", "ch13", "ch14", "ch15", + "ch16", "ch17", "ch18", "ch19", + "ch20", "ch21", "ch22", "ch23", + "ch24"; + clocks = <&cpg CPG_MOD 214>; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 214>; + phy-mode = "rgmii"; + rx-internal-delay-ps = <0>; + tx-internal-delay-ps = <0>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + avb4: ethernet at e6840000 { + compatible = "renesas,etheravb-r8a779a0", + "renesas,etheravb-rcar-gen3"; + reg = <0 0xe6840000 0 0x1000>; + interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 359 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 360 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 361 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 362 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 363 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 364 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 365 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 366 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 367 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 368 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 369 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 370 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 371 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 372 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 373 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 374 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 375 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 376 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 377 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 378 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 379 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 380 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "ch0", "ch1", "ch2", "ch3", + "ch4", "ch5", "ch6", "ch7", + "ch8", "ch9", "ch10", "ch11", + "ch12", "ch13", "ch14", "ch15", + "ch16", "ch17", "ch18", "ch19", + "ch20", "ch21", "ch22", "ch23", + "ch24"; + clocks = <&cpg CPG_MOD 215>; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 215>; + phy-mode = "rgmii"; + rx-internal-delay-ps = <0>; + tx-internal-delay-ps = <0>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + avb5: ethernet at e6850000 { + compatible = "renesas,etheravb-r8a779a0", + "renesas,etheravb-rcar-gen3"; + reg = <0 0xe6850000 0 0x1000>; + interrupts = <GIC_SPI 381 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 382 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 383 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 384 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 385 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 386 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 387 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 388 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 389 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 390 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 391 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 392 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 393 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 394 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 395 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 396 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 398 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 399 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 400 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 401 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 402 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 403 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 404 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 405 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "ch0", "ch1", "ch2", "ch3", + "ch4", "ch5", "ch6", "ch7", + "ch8", "ch9", "ch10", "ch11", + "ch12", "ch13", "ch14", "ch15", + "ch16", "ch17", "ch18", "ch19", + "ch20", "ch21", "ch22", "ch23", + "ch24"; + clocks = <&cpg CPG_MOD 216>; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 216>; + phy-mode = "rgmii"; + rx-internal-delay-ps = <0>; + tx-internal-delay-ps = <0>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + scif0: serial at e6e60000 { + compatible = "renesas,scif-r8a779a0", + "renesas,rcar-gen3-scif", "renesas,scif"; + reg = <0 0xe6e60000 0 64>; + interrupts = <GIC_SPI 251 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 702>, + <&cpg CPG_CORE R8A779A0_CLK_S1D2>, + <&scif_clk>; + clock-names = "fck", "brg_int", "scif_clk"; + dmas = <&dmac1 0x51>, <&dmac1 0x50>; + dma-names = "tx", "rx"; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 702>; + status = "disabled"; + }; + + scif1: serial at e6e68000 { + compatible = "renesas,scif-r8a779a0", + "renesas,rcar-gen3-scif", "renesas,scif"; + reg = <0 0xe6e68000 0 64>; + interrupts = <GIC_SPI 252 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 703>, + <&cpg CPG_CORE R8A779A0_CLK_S1D2>, + <&scif_clk>; + clock-names = "fck", "brg_int", "scif_clk"; + dmas = <&dmac1 0x53>, <&dmac1 0x52>; + dma-names = "tx", "rx"; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 703>; + status = "disabled"; + }; + + scif3: serial at e6c50000 { + compatible = "renesas,scif-r8a779a0", + "renesas,rcar-gen3-scif", "renesas,scif"; + reg = <0 0xe6c50000 0 64>; + interrupts = <GIC_SPI 253 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 704>, + <&cpg CPG_CORE R8A779A0_CLK_S1D2>, + <&scif_clk>; + clock-names = "fck", "brg_int", "scif_clk"; + dmas = <&dmac1 0x57>, <&dmac1 0x56>; + dma-names = "tx", "rx"; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 704>; + status = "disabled"; + }; + + scif4: serial at e6c40000 { + compatible = "renesas,scif-r8a779a0", + "renesas,rcar-gen3-scif", "renesas,scif"; + reg = <0 0xe6c40000 0 64>; + interrupts = <GIC_SPI 254 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 705>, + <&cpg CPG_CORE R8A779A0_CLK_S1D2>, + <&scif_clk>; + clock-names = "fck", "brg_int", "scif_clk"; + dmas = <&dmac1 0x59>, <&dmac1 0x58>; + dma-names = "tx", "rx"; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 705>; + status = "disabled"; + }; + + msiof0: spi at e6e90000 { + compatible = "renesas,msiof-r8a779a0", + "renesas,rcar-gen3-msiof"; + reg = <0 0xe6e90000 0 0x0064>; + interrupts = <GIC_SPI 245 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 618>; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 618>; + dmas = <&dmac1 0x41>, <&dmac1 0x40>; + dma-names = "tx", "rx"; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + msiof1: spi at e6ea0000 { + compatible = "renesas,msiof-r8a779a0", + "renesas,rcar-gen3-msiof"; + reg = <0 0xe6ea0000 0 0x0064>; + interrupts = <GIC_SPI 246 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 619>; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 619>; + dmas = <&dmac1 0x43>, <&dmac1 0x42>; + dma-names = "tx", "rx"; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + msiof2: spi at e6c00000 { + compatible = "renesas,msiof-r8a779a0", + "renesas,rcar-gen3-msiof"; + reg = <0 0xe6c00000 0 0x0064>; + interrupts = <GIC_SPI 247 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 620>; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 620>; + dmas = <&dmac1 0x45>, <&dmac1 0x44>; + dma-names = "tx", "rx"; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + msiof3: spi at e6c10000 { + compatible = "renesas,msiof-r8a779a0", + "renesas,rcar-gen3-msiof"; + reg = <0 0xe6c10000 0 0x0064>; + interrupts = <GIC_SPI 248 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 621>; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 621>; + dmas = <&dmac1 0x47>, <&dmac1 0x46>; + dma-names = "tx", "rx"; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + msiof4: spi at e6c20000 { + compatible = "renesas,msiof-r8a779a0", + "renesas,rcar-gen3-msiof"; + reg = <0 0xe6c20000 0 0x0064>; + interrupts = <GIC_SPI 249 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 622>; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 622>; + dmas = <&dmac1 0x49>, <&dmac1 0x48>; + dma-names = "tx", "rx"; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + msiof5: spi at e6c28000 { + compatible = "renesas,msiof-r8a779a0", + "renesas,rcar-gen3-msiof"; + reg = <0 0xe6c28000 0 0x0064>; + interrupts = <GIC_SPI 250 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 623>; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 623>; + dmas = <&dmac1 0x4b>, <&dmac1 0x4a>; + dma-names = "tx", "rx"; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + dmac1: dma-controller at e7350000 { + compatible = "renesas,dmac-r8a779a0"; + reg = <0 0xe7350000 0 0x1000>, + <0 0xe7300000 0 0x10000>; + interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "error", + "ch0", "ch1", "ch2", "ch3", "ch4", + "ch5", "ch6", "ch7", "ch8", "ch9", + "ch10", "ch11", "ch12", "ch13", + "ch14", "ch15"; + clocks = <&cpg CPG_MOD 709>; + clock-names = "fck"; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 709>; + #dma-cells = <1>; + dma-channels = <16>; + }; + + dmac2: dma-controller at e7351000 { + compatible = "renesas,dmac-r8a779a0"; + reg = <0 0xe7351000 0 0x1000>, + <0 0xe7310000 0 0x10000>; + interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "error", + "ch0", "ch1", "ch2", "ch3", "ch4", + "ch5", "ch6", "ch7"; + clocks = <&cpg CPG_MOD 710>; + clock-names = "fck"; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 710>; + #dma-cells = <1>; + dma-channels = <8>; + }; + + mmc0: mmc at ee140000 { + compatible = "renesas,sdhi-r8a779a0", + "renesas,rcar-gen3-sdhi"; + reg = <0 0xee140000 0 0x2000>; + interrupts = <GIC_SPI 236 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 706>; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + resets = <&cpg 706>; + max-frequency = <200000000>; + status = "disabled"; + }; + + gic: interrupt-controller at f1000000 { + compatible = "arm,gic-v3"; + #interrupt-cells = <3>; + #address-cells = <0>; + interrupt-controller; + reg = <0x0 0xf1000000 0 0x20000>, + <0x0 0xf1060000 0 0x110000>; + interrupts = <GIC_PPI 9 + (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_HIGH)>; + power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; + }; + + 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(1) | IRQ_TYPE_LEVEL_LOW)>, + <&gic GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>, + <&gic GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>, + <&gic GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>; + }; +};
include/dt-bindings/clock/r8a779a0-cpg-mssr.h new file +55 -0
55 lines not on this page · raw message
include/dt-bindings/power/r8a779a0-sysc.h new file +59 -0
59 lines not on this page · raw message
Signature · 1 line
2.30.2
PATCH 23/30 ARM: dts: renesas: Add R8A779A0 V3U Falcon DTs
In reply to Marek VasutImport R8A779A0 V3U Falcon DTs from Linux 5.12,
commit 9f4ad9e425a1 ("Linux 5.12") .
--- arch/arm/dts/r8a779a0-falcon-cpu.dtsi | 184 ++++++++++++++++++++++++++ arch/arm/dts/r8a779a0-falcon.dts | 28 ++++ 2 files changed, 212 insertions(+) create mode 100644 arch/arm/dts/r8a779a0-falcon-cpu.dtsi create mode 100644 arch/arm/dts/r8a779a0-falcon.dts
arch/arm/dts/r8a779a0-falcon-cpu.dtsi new file +184 -0
@@ -0,0 +1,184 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Device Tree Source for the Falcon CPU board + * + * Copyright (C) 2020 Renesas Electronics Corp. + */ + +#include <dt-bindings/gpio/gpio.h> +#include "r8a779a0.dtsi" + +/ { + model = "Renesas Falcon CPU board"; + compatible = "renesas,falcon-cpu", "renesas,r8a779a0"; + + memory at 48000000 { + device_type = "memory"; + /* first 128MB is reserved for secure area. */ + reg = <0x0 0x48000000 0x0 0x78000000>; + }; + + memory at 500000000 { + device_type = "memory"; + reg = <0x5 0x00000000 0x0 0x80000000>; + }; + + memory at 600000000 { + device_type = "memory"; + reg = <0x6 0x00000000 0x0 0x80000000>; + }; + + memory at 700000000 { + device_type = "memory"; + reg = <0x7 0x00000000 0x0 0x80000000>; + }; + + reg_1p8v: regulator-1p8v { + compatible = "regulator-fixed"; + regulator-name = "fixed-1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + + reg_3p3v: regulator-3p3v { + compatible = "regulator-fixed"; + regulator-name = "fixed-3.3V"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + regulator-always-on; + }; +}; + +&avb0 { + pinctrl-0 = <&avb0_pins>; + pinctrl-names = "default"; + phy-handle = <&phy0>; + tx-internal-delay-ps = <2000>; + status = "okay"; + + phy0: ethernet-phy at 0 { + rxc-skew-ps = <1500>; + reg = <0>; + interrupt-parent = <&gpio4>; + interrupts = <16 IRQ_TYPE_LEVEL_LOW>; + reset-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>; + }; +}; + +&extal_clk { + clock-frequency = <16666666>; +}; + +&extalr_clk { + clock-frequency = <32768>; +}; + +&i2c0 { + pinctrl-0 = <&i2c0_pins>; + pinctrl-names = "default"; + + status = "okay"; + clock-frequency = <400000>; +}; + +&i2c1 { + pinctrl-0 = <&i2c1_pins>; + pinctrl-names = "default"; + + status = "okay"; + clock-frequency = <400000>; +}; + +&i2c6 { + pinctrl-0 = <&i2c6_pins>; + pinctrl-names = "default"; + + status = "okay"; + clock-frequency = <400000>; +}; + +&mmc0 { + pinctrl-0 = <&mmc_pins>; + pinctrl-1 = <&mmc_pins>; + pinctrl-names = "default", "state_uhs"; + + vmmc-supply = <®_3p3v>; + vqmmc-supply = <®_1p8v>; + mmc-hs200-1_8v; + mmc-hs400-1_8v; + bus-width = <8>; + no-sd; + no-sdio; + non-removable; + full-pwr-cycle-in-suspend; + status = "okay"; +}; + +&pfc { + pinctrl-0 = <&scif_clk_pins>; + pinctrl-names = "default"; + + avb0_pins: avb0 { + mux { + groups = "avb0_link", "avb0_mdio", "avb0_rgmii", "avb0_txcrefclk"; + function = "avb0"; + }; + + pins_mdio { + groups = "avb0_mdio"; + drive-strength = <21>; + }; + + pins_mii { + groups = "avb0_rgmii"; + drive-strength = <21>; + }; + + }; + + i2c0_pins: i2c0 { + groups = "i2c0"; + function = "i2c0"; + }; + + i2c1_pins: i2c1 { + groups = "i2c1"; + function = "i2c1"; + }; + + i2c6_pins: i2c6 { + groups = "i2c6"; + function = "i2c6"; + }; + + mmc_pins: mmc { + groups = "mmc_data8", "mmc_ctrl", "mmc_ds"; + function = "mmc"; + power-source = <1800>; + }; + + scif0_pins: scif0 { + groups = "scif0_data", "scif0_ctrl"; + function = "scif0"; + }; + + scif_clk_pins: scif_clk { + groups = "scif_clk"; + function = "scif_clk"; + }; +}; + +&scif0 { + pinctrl-0 = <&scif0_pins>; + pinctrl-names = "default"; + + uart-has-rtscts; + status = "okay"; +}; + +&scif_clk { + clock-frequency = <24000000>; +};
arch/arm/dts/r8a779a0-falcon.dts new file +28 -0
@@ -0,0 +1,28 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Device Tree Source for the Falcon CPU and BreakOut boards + * + * Copyright (C) 2020 Renesas Electronics Corp. + */ + +/dts-v1/; +#include "r8a779a0-falcon-cpu.dtsi" + +/ { + model = "Renesas Falcon CPU and Breakout boards based on r8a779a0"; + compatible = "renesas,falcon-breakout", "renesas,falcon-cpu", "renesas,r8a779a0"; + + aliases { + ethernet0 = &avb0; + serial0 = &scif0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; +}; + +&rwdt { + timeout-sec = <60>; + status = "okay"; +};
Signature · 1 line
2.30.2
PATCH 24/30 ARM: dts: renesas: Add R8A779A0 V3U DT extras
In reply to Marek VasutFrom: Hai Pham <[email protected]>
Add R8A779A0 V3U DT extras for U-Boot.
Based on "ARM: dts: renesas: Add R8A779A0 V3U DTs" by Hai Pham <[email protected]>
--- arch/arm/dts/r8a779a0-u-boot.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 arch/arm/dts/r8a779a0-u-boot.dtsi
arch/arm/dts/r8a779a0-u-boot.dtsi new file +12 -0
@@ -0,0 +1,12 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Device Tree Source extras for U-Boot on R-Car R8A779A0 SoC + * + * Copyright (C) 2020 Renesas Electronics Corp. + */ + +#include "r8a779x-u-boot.dtsi" + +&extalr_clk { + u-boot,dm-pre-reloc; +};
Signature · 1 line
2.30.2
PATCH 25/30 ARM: dts: renesas: Add RPC node to R8A779A0 V3U
In reply to Marek VasutThe R-Car V3U does support RPC interface, however the support for it is missing in upstream Linux DTs as of commit 9f4ad9e425a1 ("Linux 5.12"), add the node into u-boot.dtsi to let U-Boot access the SPI NOR or HF.
--- arch/arm/dts/r8a779a0-u-boot.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+)
arch/arm/dts/r8a779a0-u-boot.dtsi +13 -0
@@ -7,6 +7,19 @@ #include "r8a779x-u-boot.dtsi" +/ { + soc { + rpc: spi at ee200000 { + compatible = "renesas,rpc-r8a779a0", "renesas,rcar-gen3-rpc"; + reg = <0 0xee200000 0 0x200>, <0 0x08000000 0 0x04000000>; + clocks = <&cpg CPG_MOD 629>; + bank-width = <2>; + num-cs = <1>; + status = "disabled"; + }; + }; +}; + &extalr_clk { u-boot,dm-pre-reloc; };
Signature · 1 line
2.30.2
PATCH 26/30 ARM: renesas: Add R8A779A0 V3U platform code
In reply to Marek VasutFrom: Hai Pham <[email protected]>
Add platform code to support R8A779A0 V3U SoC.
--- arch/arm/mach-rmobile/Kconfig.64 | 5 +++++ arch/arm/mach-rmobile/cpu_info.c | 1 + arch/arm/mach-rmobile/include/mach/rmobile.h | 1 + 3 files changed, 7 insertions(+)
arch/arm/mach-rmobile/Kconfig.64 +5 -0
@@ -57,6 +57,11 @@ config R8A77995 imply CLK_R8A77995 imply PINCTRL_PFC_R8A77995 +config R8A779A0 + bool "Renesas SoC R8A779A0" + imply CLK_R8A779A0 + imply PINCTRL_PFC_R8A779A0 + config RZ_G2 bool "Renesas ARM SoCs RZ/G2 (64bit)"
arch/arm/mach-rmobile/cpu_info.c +1 -0
@@ -76,6 +76,7 @@ static const struct { { RMOBILE_CPU_TYPE_R8A77980, "R8A77980" }, { RMOBILE_CPU_TYPE_R8A77990, "R8A77990" }, { RMOBILE_CPU_TYPE_R8A77995, "R8A77995" }, + { RMOBILE_CPU_TYPE_R8A779A0, "R8A779A0" }, { 0x0, "CPU" }, };
arch/arm/mach-rmobile/include/mach/rmobile.h +1 -0
@@ -39,6 +39,7 @@#define RMOBILE_CPU_TYPE_R8A77980 0x56#define RMOBILE_CPU_TYPE_R8A77990 0x57#define RMOBILE_CPU_TYPE_R8A77995 0x58 +#define RMOBILE_CPU_TYPE_R8A779A0 0x59#ifndef __ASSEMBLY__const u8 *rzg_get_cpu_name (void );
Signature · 1 line
2.30.2
PATCH 27/30 ARM: renesas: Add R8A779A0 V3U Falcon board code
In reply to Marek VasutFrom: Hai Pham <[email protected]>
Add board code for the R8A779A0 V3U Falcon board.
--
Marek: - various small rebase fixes and clean ups
--- arch/arm/dts/Makefile | 3 +- arch/arm/dts/r8a779a0-falcon-u-boot.dts | 32 +++++++++++++ arch/arm/mach-rmobile/Kconfig.64 | 7 +++ board/renesas/falcon/Kconfig | 15 ++++++ board/renesas/falcon/MAINTAINERS | 6 +++ board/renesas/falcon/Makefile | 13 +++++ board/renesas/falcon/falcon.c | 47 ++++++++++++++++++ configs/r8a779a0_falcon_defconfig | 64 +++++++++++++++++++++++++ include/configs/falcon.h | 25 ++++++++++ 9 files changed, 211 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/r8a779a0-falcon-u-boot.dts create mode 100644 board/renesas/falcon/Kconfig create mode 100644 board/renesas/falcon/MAINTAINERS create mode 100644 board/renesas/falcon/Makefile create mode 100644 board/renesas/falcon/falcon.c create mode 100644 configs/r8a779a0_falcon_defconfig create mode 100644 include/configs/falcon.h
arch/arm/dts/Makefile +2 -1
@@ -879,7 +879,8 @@ dtb-$(CONFIG_RCAR_GEN3) += \ r8a77970-eagle-u-boot.dtb \ r8a77980-condor-u-boot.dtb \ r8a77990-ebisu-u-boot.dtb \ - r8a77995-draak-u-boot.dtb + r8a77995-draak-u-boot.dtb \ + r8a779a0-falcon-u-boot.dtb ifdef CONFIG_RCAR_GEN3 DTC_FLAGS += -R 4 -p 0x1000
arch/arm/dts/r8a779a0-falcon-u-boot.dts new file +32 -0
@@ -0,0 +1,32 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Device Tree Source extras for U-Boot for the Falcon board + * + * Copyright (C) 2020 Renesas Electronics Corp. + */ + +#include "r8a779a0-falcon.dts" +#include "r8a779a0-u-boot.dtsi" + +/ { + aliases { + spi0 = &rpc; + }; +}; + +&rpc { + #address-cells = <1>; + #size-cells = <0>; + num-cs = <1>; + spi-max-frequency = <50000000>; + status = "okay"; + + spi-flash at 0 { + reg = <0>; + compatible = "jedec,spi-nor"; + spi-max-frequency = <50000000>; + spi-tx-bus-width = <1>; + spi-rx-bus-width = <1>; + status = "okay"; + }; +};
arch/arm/mach-rmobile/Kconfig.64 +7 -0
@@ -110,6 +110,12 @@ config TARGET_EBISU help Support for Renesas R-Car Gen3 Ebisu platform +config TARGET_FALCON + bool "Falcon board" + imply R8A779A0 + help + Support for Renesas R-Car Gen3 Falcon platform + config TARGET_HIHOPE_RZG2 bool "HiHope RZ/G2 board" imply R8A774A1
@@ -160,6 +166,7 @@ source "board/renesas/condor/Kconfig" source "board/renesas/draak/Kconfig" source "board/renesas/eagle/Kconfig" source "board/renesas/ebisu/Kconfig" +source "board/renesas/falcon/Kconfig" source "board/renesas/salvator-x/Kconfig" source "board/renesas/ulcb/Kconfig" source "board/beacon/beacon-rzg2m/Kconfig"
board/renesas/falcon/Kconfig new file +15 -0
@@ -0,0 +1,15 @@ +if TARGET_FALCON + +config SYS_SOC + default "rmobile" + +config SYS_BOARD + default "falcon" + +config SYS_VENDOR + default "renesas" + +config SYS_CONFIG_NAME + default "falcon" + +endif
board/renesas/falcon/MAINTAINERS new file +6 -0
@@ -0,0 +1,6 @@ +FALCON BOARD +M: Marek Vasut <[email protected]> +S: Maintained +F: board/renesas/falcon/ +F: include/configs/falcon.h +F: configs/r8a779a0_falcon_defconfig
board/renesas/falcon/Makefile new file +13 -0
@@ -0,0 +1,13 @@ +# +# board/renesas/falcon/Makefile +# +# Copyright (C) 2020 Renesas Electronics Corp. +# +# SPDX-License-Identifier: GPL-2.0+ +# + +ifdef CONFIG_SPL_BUILD +obj-y := ../rcar-common/gen3-spl.o +else +obj-y := falcon.o ../rcar-common/common.o +endif
board/renesas/falcon/falcon.c new file +47 -0
47 lines not on this page · raw message
configs/r8a779a0_falcon_defconfig new file +64 -0
64 lines not on this page · raw message
include/configs/falcon.h new file +25 -0
@@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* include/configs/falcon.h +* This file is Falcon board configuration. +* +* Copyright (C) 2020 Renesas Electronics Corp. +*/ + +#ifndef __FALCON_H +#define __FALCON_H + +#include "rcar-gen3-common.h" + +/* Ethernet RAVB */ +#define CONFIG_BITBANGMII +#define CONFIG_BITBANGMII_MULTI + +/* Board Clock */ +/* XTAL_CLK : 16.66MHz */ +#define CONFIG_SYS_CLK_FREQ 16666666u + +/* Generic Timer Definitions (use in assembler source) */ +#define COUNTER_FREQUENCY 0xFE502A/* 16.66MHz from CPclk */ + +#endif /* __FALCON_H */
Signature · 1 line
2.30.2
PATCH 28/30 ARM: renesas: Add generic timer initialization for V3U Falcon
In reply to Marek VasutFrom: Koji Matsuoka <[email protected]>
Init the Generic Timer for V3U Falcon in early phase
--- board/renesas/falcon/falcon.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+)
board/renesas/falcon/falcon.c +25 -0
@@ -20,6 +20,31 @@ DECLARE_GLOBAL_DATA_PTR;#define CPGWPR 0xE6150000#define CPGWPCR 0xE6150004 +#define EXTAL_CLK 16666600u +#define CNTCR_BASE 0xE6080000 +#define CNTFID0 (CNTCR_BASE + 0x020) +#define CNTCR_EN BIT(0) + +static void init_generic_timer (void ) +{ +u32 freq; + +/* Set frequency data in CNTFID0 */ + freq =EXTAL_CLK ; + +/* Update memory mapped and register based freqency */ + asmvolatile ("msr cntfrq_el0, %0" ::"r" (freq)); +writel (freq,CNTFID0 ); + +/* Enable counter */ +setbits_le32 (CNTCR_BASE ,CNTCR_EN ); +} + +void s_init (void ) +{ +init_generic_timer (); +} +int board_early_init_f (void ) {/* Unlock CPG access */
Signature · 1 line
2.30.2
PATCH 29/30 ARM: renesas: Add GICv3 initialization for V3U Falcon
In reply to Marek VasutFrom: Koji Matsuoka <[email protected]>
Init GICv3 for V3U Falcon in early phase
--- board/renesas/falcon/falcon.c | 29 +++++++++++++++++++++++++++++ include/configs/falcon.h | 11 +++++++++++ 2 files changed, 40 insertions(+)
board/renesas/falcon/falcon.c +29 -0
@@ -40,6 +40,33 @@ static void init_generic_timer(void)setbits_le32 (CNTCR_BASE ,CNTCR_EN ); } +/* Distributor Registers */ +#define GICD_BASE 0xF1000000 + +/* ReDistributor Registers for Control and Physical LPIs */ +#define GICR_LPI_BASE 0xF1060000 +#define GICR_WAKER 0x0014 +#define GICR_PWRR 0x0024 +#define GICR_LPI_WAKER (GICR_LPI_BASE + GICR_WAKER) +#define GICR_LPI_PWRR (GICR_LPI_BASE + GICR_PWRR) + +/* ReDistributor Registers for SGIs and PPIs */ +#define GICR_SGI_BASE 0xF1070000 +#define GICR_IGROUPR0 0x0080 + +static void init_gic_v3 (void ) +{ +/* GIC v3 power on */ +writel (0x00000002 , (GICR_LPI_PWRR )); + +/* Wait till the WAKER_CA_BIT changes to 0 */ +writel (readl (GICR_LPI_WAKER ) & ~0x00000002 , (GICR_LPI_WAKER )); +while (readl (GICR_LPI_WAKER ) &0x00000004 ) + ; + +writel (0xffffffff ,GICR_SGI_BASE +GICR_IGROUPR0 ); +} +void s_init (void ) {init_generic_timer ();
@@ -59,6 +86,8 @@ int board_init(void)/* address of boot parameters */ gd->bd->bi_boot_params =CONFIG_SYS_TEXT_BASE +0x50000 ; +init_gic_v3 (); +return 0 ; }
include/configs/falcon.h +11 -0
@@ -11,6 +11,17 @@#include "rcar-gen3-common.h" +/* Generic Interrupt Controller Definitions */ +#ifdef CONFIG_GICV2 +#undef CONFIG_GICV2 +#undef GICD_BASE +#undef GICC_BASE +#undef GICR_BASE +#endif +#define CONFIG_GICV3 +#define GICD_BASE 0xF1000000 +#define GICR_BASE 0xF1060000 +/* Ethernet RAVB */ #define CONFIG_BITBANGMII #define CONFIG_BITBANGMII_MULTI
Signature · 1 line
2.30.2
PATCH 30/30 ARM: rmobile: Add basic PSCI support for R8A779A0 V3U Falcon
In reply to Marek VasutFrom: Hai Pham <[email protected]>
Enable basic PSCI support for R8A779A0 V3U Falcon
--- arch/arm/mach-rmobile/Makefile | 4 +++ arch/arm/mach-rmobile/psci-r8a779a0.c | 49 +++++++++++++++++++++++++++ configs/r8a779a0_falcon_defconfig | 1 + 3 files changed, 54 insertions(+) create mode 100644 arch/arm/mach-rmobile/psci-r8a779a0.c
arch/arm/mach-rmobile/Makefile +4 -0
@@ -15,6 +15,10 @@ obj-$(CONFIG_RCAR_GEN2) += lowlevel_init_ca15.o cpu_info-rcar.o obj-$(CONFIG_RCAR_GEN3) += lowlevel_init_gen3.o cpu_info-rcar.o memmap-gen3.o obj-$(CONFIG_RZ_G2) += cpu_info-rzg.o +ifneq ($(CONFIG_R8A779A0),) +obj-$(CONFIG_ARMV8_PSCI) += psci-r8a779a0.o +endif + OBJCOPYFLAGS_u-boot-spl.srec := -O srec quiet_cmd_objcopy = OBJCOPY $@ cmd_objcopy = $(OBJCOPY) --gap-fill=0x00 $(OBJCOPYFLAGS) \
arch/arm/mach-rmobile/psci-r8a779a0.c new file +49 -0
49 lines not on this page · raw message
configs/r8a779a0_falcon_defconfig +1 -0
@@ -10,6 +10,7 @@ CONFIG_SPL_TEXT_BASE=0xe6338000 CONFIG_RCAR_GEN3=y CONFIG_TARGET_FALCON=y # CONFIG_PSCI_RESET is not set +CONFIG_ARMV8_PSCI=y CONFIG_DEFAULT_DEVICE_TREE="r8a779a0-falcon-u-boot" CONFIG_FIT=y CONFIG_SUPPORT_RAW_INITRD=y
Signature · 1 line
2.30.2
Lad
PATCH 1/30 clk: renesas: Synchronize RZ/G2 tables with Linux 5.12
In reply to Marek VasutHi Marek,
Thank you for the patch.
Quoted 11 lines · Marek Vasut
Synchronize RZ/G2 clock tables with Linux 5.12,
commit9f4ad9e425a1("Linux 5.12") .Signed-off-by Marek Vasut <[email protected]>--- drivers/clk/renesas/r8a774a1-cpg-mssr.c | 14 +++++++++----- drivers/clk/renesas/r8a774b1-cpg-mssr.c | 8 ++++++++ drivers/clk/renesas/r8a774c0-cpg-mssr.c | 9 +++++++++ 3 files changed, 26 insertions(+), 5 deletions(-)
Tested on RZ/G2{EMN} boards.
Cheers,
Prabhakar
Quoted 113 lines
drivers/clk/renesas/r8a774a1-cpg-mssr.c +9
-5@@ -68,13 +68,18 @@ static const struct cpg_core_clk r8a774a1_core_clks[] = {DEF_FIXED (".s2" ,CLK_S2 ,CLK_PLL1_DIV2 ,4 ,1 ),DEF_FIXED (".s3" ,CLK_S3 ,CLK_PLL1_DIV2 ,6 ,1 ),DEF_FIXED (".sdsrc" ,CLK_SDSRC ,CLK_PLL1_DIV2 ,2 ,1 ), -DEF_FIXED (".rpcsrc" ,CLK_RPCSRC ,CLK_PLL1 ,2 ,1 ), +DEF_BASE (".rpcsrc" ,CLK_RPCSRC ,CLK_TYPE_GEN3_RPCSRC ,CLK_PLL1 ), + +DEF_BASE ("rpc" ,R8A774A1_CLK_RPC ,CLK_TYPE_GEN3_RPC , +CLK_RPCSRC ), +DEF_BASE ("rpcd2" ,R8A774A1_CLK_RPCD2 ,CLK_TYPE_GEN3_RPCD2 , +R8A774A1_CLK_RPC ),DEF_GEN3_OSC (".r" ,CLK_RINT ,CLK_EXTAL ,32 ),/* Core Clock Outputs */ -DEF_GEN3_Z ("z" ,R8A774A1_CLK_Z ,CLK_TYPE_GEN3_Z ,CLK_PLL0 ,2 ,8 ), -DEF_GEN3_Z ("z2" ,R8A774A1_CLK_Z2 ,CLK_TYPE_GEN3_Z ,CLK_PLL2 ,2 ,0 ), +DEF_GEN3_Z ("z" ,R8A774A1_CLK_Z ,CLK_TYPE_GEN3_Z ,CLK_PLL0 ,2 ,8 ), +DEF_GEN3_Z ("z2" ,R8A774A1_CLK_Z2 ,CLK_TYPE_GEN3_Z ,CLK_PLL2 ,2 ,0 ),DEF_FIXED ("ztr" ,R8A774A1_CLK_ZTR ,CLK_PLL1_DIV2 ,6 ,1 ),DEF_FIXED ("ztrd2" ,R8A774A1_CLK_ZTRD2 ,CLK_PLL1_DIV2 ,12 ,1 ), DEF_FIXED("zt", R8A774A1_CLK_ZT, CLK_PLL1_DIV2, 4, 1),@@ -99,7 +104,6 @@ static const struct cpg_core_clk r8a774a1_core_clks[] = {DEF_GEN3_SD ("sd1" ,R8A774A1_CLK_SD1 ,CLK_SDSRC ,0x078 ),DEF_GEN3_SD ("sd2" ,R8A774A1_CLK_SD2 ,CLK_SDSRC ,0x268 ),DEF_GEN3_SD ("sd3" ,R8A774A1_CLK_SD3 ,CLK_SDSRC ,0x26c ), -DEF_GEN3_RPC ("rpc" ,R8A774A1_CLK_RPC ,CLK_RPCSRC ,0x238 ),DEF_FIXED ("cl" ,R8A774A1_CLK_CL ,CLK_PLL1_DIV2 ,48 ,1 ), DEF_FIXED("cp", R8A774A1_CLK_CP, CLK_EXTAL, 2, 1),@@ -203,7 +207,7 @@ static const struct mssr_mod_clk r8a774a1_mod_clks[] = {DEF_MOD ("can-fd" ,914 ,R8A774A1_CLK_S3D2 ),DEF_MOD ("can-if1" ,915 ,R8A774A1_CLK_S3D4 ),DEF_MOD ("can-if0" ,916 ,R8A774A1_CLK_S3D4 ), -DEF_MOD ("rpc" ,917 ,R8A774A1_CLK_RPC ), +DEF_MOD ("rpc-if" ,917 ,R8A774A1_CLK_RPCD2 ),DEF_MOD ("i2c6" ,918 ,R8A774A1_CLK_S0D6 ),DEF_MOD ("i2c5" ,919 ,R8A774A1_CLK_S0D6 ), DEF_MOD("i2c-dvfs", 926, R8A774A1_CLK_CP),drivers/clk/renesas/r8a774b1-cpg-mssr.c +8
-0@@ -39,6 +39,7 @@ enum clk_ids {CLK_S2 ,CLK_S3 ,CLK_SDSRC , +CLK_RPCSRC , CLK_RINT,/* Module Clocks */ @@ -64,6 +65,12 @@ static const struct cpg_core_clk r8a774b1_core_clks[] = {DEF_FIXED (".s2" ,CLK_S2 ,CLK_PLL1_DIV2 ,4 ,1 ),DEF_FIXED (".s3" ,CLK_S3 ,CLK_PLL1_DIV2 ,6 ,1 ),DEF_FIXED (".sdsrc" ,CLK_SDSRC ,CLK_PLL1_DIV2 ,2 ,1 ), +DEF_BASE (".rpcsrc" ,CLK_RPCSRC ,CLK_TYPE_GEN3_RPCSRC ,CLK_PLL1 ), + +DEF_BASE ("rpc" ,R8A774B1_CLK_RPC ,CLK_TYPE_GEN3_RPC , +CLK_RPCSRC ), +DEF_BASE ("rpcd2" ,R8A774B1_CLK_RPCD2 ,CLK_TYPE_GEN3_RPCD2 , +R8A774B1_CLK_RPC ), DEF_GEN3_OSC(".r", CLK_RINT, CLK_EXTAL, 32),@@ -195,6 +202,7 @@ static const struct mssr_mod_clk r8a774b1_mod_clks[] = {DEF_MOD ("can-fd" ,914 ,R8A774B1_CLK_S3D2 ),DEF_MOD ("can-if1" ,915 ,R8A774B1_CLK_S3D4 ),DEF_MOD ("can-if0" ,916 ,R8A774B1_CLK_S3D4 ), +DEF_MOD ("rpc-if" ,917 ,R8A774B1_CLK_RPCD2 ),DEF_MOD ("i2c6" ,918 ,R8A774B1_CLK_S0D6 ),DEF_MOD ("i2c5" ,919 ,R8A774B1_CLK_S0D6 ), DEF_MOD("i2c-dvfs", 926, R8A774B1_CLK_CP),drivers/clk/renesas/r8a774c0-cpg-mssr.c +9
-1@@ -44,6 +44,7 @@ enum clk_ids {CLK_S2 ,CLK_S3 ,CLK_SDSRC , +CLK_RPCSRC ,CLK_RINT , CLK_OCO,@@ -74,6 +75,13 @@ static const struct cpg_core_clk r8a774c0_core_clks[] = {DEF_FIXED (".s3" ,CLK_S3 ,CLK_PLL1 ,6 ,1 ),DEF_FIXED (".sdsrc" ,CLK_SDSRC ,CLK_PLL1 ,2 ,1 ), +DEF_FIXED_RPCSRC_E3 (".rpcsrc" ,CLK_RPCSRC ,CLK_PLL0 ,CLK_PLL1 ), + +DEF_BASE ("rpc" ,R8A774C0_CLK_RPC ,CLK_TYPE_GEN3_RPC , +CLK_RPCSRC ), +DEF_BASE ("rpcd2" ,R8A774C0_CLK_RPCD2 ,CLK_TYPE_GEN3_RPCD2 , +R8A774C0_CLK_RPC ), +DEF_DIV6_RO (".r" ,CLK_RINT ,CLK_EXTAL ,CPG_RCKCR ,32 ), DEF_RATE(".oco", CLK_OCO, 8 * 1000 * 1000),@@ -199,6 +207,7 @@ static const struct mssr_mod_clk r8a774c0_mod_clks[] = {DEF_MOD ("can-fd" ,914 ,R8A774C0_CLK_S3D2 ),DEF_MOD ("can-if1" ,915 ,R8A774C0_CLK_S3D4 ),DEF_MOD ("can-if0" ,916 ,R8A774C0_CLK_S3D4 ), +DEF_MOD ("rpc-if" ,917 ,R8A774C0_CLK_RPCD2 ),DEF_MOD ("i2c6" ,918 ,R8A774C0_CLK_S3D2 ),DEF_MOD ("i2c5" ,919 ,R8A774C0_CLK_S3D2 ), DEF_MOD("i2c-dvfs", 926, R8A774C0_CLK_CP), --2.30.2