1 From 931e6487ca7642f94721a07c1e7da2152bda3baf Mon Sep 17 00:00:00 2001
2 From: Scott Murray <scott.murray@konsulko.com>
3 Date: Tue, 21 Sep 2021 15:31:36 -0400
4 Subject: [PATCH 1/4] Create r8a7795 USB OVC pin groups
6 Split the r8a7795 USB pin groups to create separate groups for the
7 OVC pins. This is required for the AGL reference hardware boards,
8 which use some of the OVC pins in other pinmux modes.
10 Upstream-Status: pending
12 Signed-off-by: Scott Murray <scott.murray@konsulko.com>
13 Signed-off-by: Raquel Medina <raquel.medina@konsulko.com>
15 .../boot/dts/renesas/r8a77950-salvator-x.dts | 2 +-
16 .../boot/dts/renesas/r8a77951-salvator-x.dts | 2 +-
17 .../boot/dts/renesas/r8a77951-salvator-xs.dts | 4 +-
18 .../boot/dts/renesas/salvator-common.dtsi | 6 +-
19 arch/arm64/boot/dts/renesas/ulcb-kf.dtsi | 2 +-
20 arch/arm64/boot/dts/renesas/ulcb.dtsi | 2 +-
21 drivers/pinctrl/renesas/pfc-r8a77950.c | 75 +++++++++++++++----
22 drivers/pinctrl/renesas/pfc-r8a77951.c | 75 +++++++++++++++----
23 8 files changed, 129 insertions(+), 39 deletions(-)
25 diff --git a/arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dts
26 index 1a1f2324dd6e..776082563a30 100644
27 --- a/arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dts
28 +++ b/arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dts
29 @@ -143,7 +143,7 @@ &ohci2 {
34 + groups = "usb2", "usb2_ovc";
38 diff --git a/arch/arm64/boot/dts/renesas/r8a77951-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a77951-salvator-x.dts
39 index ade33b2ee741..466b8b4f4fef 100644
40 --- a/arch/arm64/boot/dts/renesas/r8a77951-salvator-x.dts
41 +++ b/arch/arm64/boot/dts/renesas/r8a77951-salvator-x.dts
42 @@ -143,7 +143,7 @@ &ohci2 {
47 + groups = "usb2", "usb2_ovc";
51 diff --git a/arch/arm64/boot/dts/renesas/r8a77951-salvator-xs.dts b/arch/arm64/boot/dts/renesas/r8a77951-salvator-xs.dts
52 index aa1ff538a4b6..fb1f286e2cd2 100644
53 --- a/arch/arm64/boot/dts/renesas/r8a77951-salvator-xs.dts
54 +++ b/arch/arm64/boot/dts/renesas/r8a77951-salvator-xs.dts
55 @@ -167,7 +167,7 @@ pcie-sata-switch-hog {
60 + groups = "usb2", "usb2_ovc";
64 @@ -184,7 +184,7 @@ usb2_pins: usb2 {
65 * - Connect GP6_{04,21} to ADV7842.
67 usb2_ch3_pins: usb2_ch3 {
68 - groups = "usb2_ch3";
69 + groups = "usb2_ch3", "usb2_ch3_ovc";
70 function = "usb2_ch3";
73 diff --git a/arch/arm64/boot/dts/renesas/salvator-common.dtsi b/arch/arm64/boot/dts/renesas/salvator-common.dtsi
74 index 3cc16111ede3..f26902f8ae9a 100644
75 --- a/arch/arm64/boot/dts/renesas/salvator-common.dtsi
76 +++ b/arch/arm64/boot/dts/renesas/salvator-common.dtsi
77 @@ -773,13 +773,13 @@ sound_clk_pins: sound_clk {
82 + groups = "usb0", "usb0_ovc";
89 + groups = "usb1", "usb1_ovc";
93 @@ -795,7 +795,7 @@ pwen {
98 + groups = "usb30", "usb30_ovc";
102 diff --git a/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi b/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi
103 index 18867a494f85..6a74f21948da 100644
104 --- a/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi
105 +++ b/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi
106 @@ -1008,7 +1008,7 @@ sound_pcm_pins: sound-pcm {
111 + groups = "usb0", "usb0_ovc";
115 diff --git a/arch/arm64/boot/dts/renesas/ulcb.dtsi b/arch/arm64/boot/dts/renesas/ulcb.dtsi
116 index cf1ec42a662b..ad0f04d9ee67 100644
117 --- a/arch/arm64/boot/dts/renesas/ulcb.dtsi
118 +++ b/arch/arm64/boot/dts/renesas/ulcb.dtsi
119 @@ -376,7 +376,7 @@ sound_clk_pins: sound-clk {
124 + groups = "usb1", "usb1_ovc";
128 diff --git a/drivers/pinctrl/renesas/pfc-r8a77950.c b/drivers/pinctrl/renesas/pfc-r8a77950.c
129 index fd884a0a3206..6d899897b3d2 100644
130 --- a/drivers/pinctrl/renesas/pfc-r8a77950.c
131 +++ b/drivers/pinctrl/renesas/pfc-r8a77950.c
132 @@ -3841,44 +3841,79 @@ static const unsigned int tpu_to3_mux[] = {
134 /* - USB0 ------------------------------------------------------------------- */
135 static const unsigned int usb0_pins[] = {
137 - RCAR_GP_PIN(6, 24), RCAR_GP_PIN(6, 25),
139 + RCAR_GP_PIN(6, 24),
141 static const unsigned int usb0_mux[] = {
142 - USB0_PWEN_MARK, USB0_OVC_MARK,
145 +static const unsigned int usb0_ovc_pins[] = {
147 + RCAR_GP_PIN(6, 25),
149 +static const unsigned int usb0_ovc_mux[] = {
152 /* - USB1 ------------------------------------------------------------------- */
153 static const unsigned int usb1_pins[] = {
155 - RCAR_GP_PIN(6, 26), RCAR_GP_PIN(6, 27),
157 + RCAR_GP_PIN(6, 26),
159 static const unsigned int usb1_mux[] = {
160 - USB1_PWEN_MARK, USB1_OVC_MARK,
163 +static const unsigned int usb1_ovc_pins[] = {
165 + RCAR_GP_PIN(6, 27),
167 +static const unsigned int usb1_ovc_mux[] = {
170 /* - USB2 ------------------------------------------------------------------- */
171 static const unsigned int usb2_pins[] = {
173 - RCAR_GP_PIN(6, 14), RCAR_GP_PIN(6, 15),
175 + RCAR_GP_PIN(6, 14),
177 static const unsigned int usb2_mux[] = {
178 - USB2_PWEN_MARK, USB2_OVC_MARK,
181 +static const unsigned int usb2_ovc_pins[] = {
183 + RCAR_GP_PIN(6, 15),
185 +static const unsigned int usb2_ovc_mux[] = {
189 /* - USB30 ------------------------------------------------------------------ */
190 static const unsigned int usb30_pins[] = {
192 - RCAR_GP_PIN(6, 28), RCAR_GP_PIN(6, 29),
194 + RCAR_GP_PIN(6, 28),
196 static const unsigned int usb30_mux[] = {
197 - USB30_PWEN_MARK, USB30_OVC_MARK,
200 +static const unsigned int usb30_ovc_pins[] = {
202 + RCAR_GP_PIN(6, 29),
204 +static const unsigned int usb30_ovc_mux[] = {
207 /* - USB31 ------------------------------------------------------------------ */
208 static const unsigned int usb31_pins[] = {
210 - RCAR_GP_PIN(6, 30), RCAR_GP_PIN(6, 31),
212 + RCAR_GP_PIN(6, 30),
214 static const unsigned int usb31_mux[] = {
215 - USB31_PWEN_MARK, USB31_OVC_MARK,
218 +static const unsigned int usb31_ovc_pins[] = {
220 + RCAR_GP_PIN(6, 31),
222 +static const unsigned int usb31_ovc_mux[] = {
226 static const unsigned int vin4_data18_a_pins[] = {
227 @@ -4434,10 +4469,15 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
228 SH_PFC_PIN_GROUP(tpu_to2),
229 SH_PFC_PIN_GROUP(tpu_to3),
230 SH_PFC_PIN_GROUP(usb0),
231 + SH_PFC_PIN_GROUP(usb0_ovc),
232 SH_PFC_PIN_GROUP(usb1),
233 + SH_PFC_PIN_GROUP(usb1_ovc),
234 SH_PFC_PIN_GROUP(usb2),
235 + SH_PFC_PIN_GROUP(usb2_ovc),
236 SH_PFC_PIN_GROUP(usb30),
237 + SH_PFC_PIN_GROUP(usb30_ovc),
238 SH_PFC_PIN_GROUP(usb31),
239 + SH_PFC_PIN_GROUP(usb31_ovc),
240 VIN_DATA_PIN_GROUP(vin4_data, 8, _a),
241 VIN_DATA_PIN_GROUP(vin4_data, 16, _a),
242 SH_PFC_PIN_GROUP(vin4_data18_a),
243 @@ -4936,22 +4976,27 @@ static const char * const tpu_groups[] = {
245 static const char * const usb0_groups[] = {
250 static const char * const usb1_groups[] = {
255 static const char * const usb2_groups[] = {
260 static const char * const usb30_groups[] = {
265 static const char * const usb31_groups[] = {
270 static const char * const vin4_groups[] = {
271 diff --git a/drivers/pinctrl/renesas/pfc-r8a77951.c b/drivers/pinctrl/renesas/pfc-r8a77951.c
272 index 36436907e215..523a2d7e5e48 100644
273 --- a/drivers/pinctrl/renesas/pfc-r8a77951.c
274 +++ b/drivers/pinctrl/renesas/pfc-r8a77951.c
275 @@ -3985,44 +3985,79 @@ static const unsigned int tpu_to3_mux[] = {
277 /* - USB0 ------------------------------------------------------------------- */
278 static const unsigned int usb0_pins[] = {
280 - RCAR_GP_PIN(6, 24), RCAR_GP_PIN(6, 25),
282 + RCAR_GP_PIN(6, 24),
284 static const unsigned int usb0_mux[] = {
285 - USB0_PWEN_MARK, USB0_OVC_MARK,
288 +static const unsigned int usb0_ovc_pins[] = {
290 + RCAR_GP_PIN(6, 25),
292 +static const unsigned int usb0_ovc_mux[] = {
295 /* - USB1 ------------------------------------------------------------------- */
296 static const unsigned int usb1_pins[] = {
298 - RCAR_GP_PIN(6, 26), RCAR_GP_PIN(6, 27),
300 + RCAR_GP_PIN(6, 26),
302 static const unsigned int usb1_mux[] = {
303 - USB1_PWEN_MARK, USB1_OVC_MARK,
306 +static const unsigned int usb1_ovc_pins[] = {
308 + RCAR_GP_PIN(6, 27),
310 +static const unsigned int usb1_ovc_mux[] = {
313 /* - USB2 ------------------------------------------------------------------- */
314 static const unsigned int usb2_pins[] = {
316 - RCAR_GP_PIN(6, 14), RCAR_GP_PIN(6, 15),
318 + RCAR_GP_PIN(6, 14),
320 static const unsigned int usb2_mux[] = {
321 - USB2_PWEN_MARK, USB2_OVC_MARK,
324 +static const unsigned int usb2_ovc_pins[] = {
326 + RCAR_GP_PIN(6, 15),
328 +static const unsigned int usb2_ovc_mux[] = {
331 /* - USB2_CH3 --------------------------------------------------------------- */
332 static const unsigned int usb2_ch3_pins[] = {
334 - RCAR_GP_PIN(6, 30), RCAR_GP_PIN(6, 31),
336 + RCAR_GP_PIN(6, 30),
338 static const unsigned int usb2_ch3_mux[] = {
339 - USB2_CH3_PWEN_MARK, USB2_CH3_OVC_MARK,
340 + USB2_CH3_PWEN_MARK,
342 +static const unsigned int usb2_ch3_ovc_pins[] = {
344 + RCAR_GP_PIN(6, 31),
346 +static const unsigned int usb2_ch3_ovc_mux[] = {
350 /* - USB30 ------------------------------------------------------------------ */
351 static const unsigned int usb30_pins[] = {
353 - RCAR_GP_PIN(6, 28), RCAR_GP_PIN(6, 29),
355 + RCAR_GP_PIN(6, 28),
357 static const unsigned int usb30_mux[] = {
358 - USB30_PWEN_MARK, USB30_OVC_MARK,
361 +static const unsigned int usb30_ovc_pins[] = {
363 + RCAR_GP_PIN(6, 29),
365 +static const unsigned int usb30_ovc_mux[] = {
369 /* - VIN4 ------------------------------------------------------------------- */
370 @@ -4545,10 +4580,15 @@ static const struct {
371 SH_PFC_PIN_GROUP(tpu_to2),
372 SH_PFC_PIN_GROUP(tpu_to3),
373 SH_PFC_PIN_GROUP(usb0),
374 + SH_PFC_PIN_GROUP(usb0_ovc),
375 SH_PFC_PIN_GROUP(usb1),
376 + SH_PFC_PIN_GROUP(usb1_ovc),
377 SH_PFC_PIN_GROUP(usb2),
378 + SH_PFC_PIN_GROUP(usb2_ovc),
379 SH_PFC_PIN_GROUP(usb2_ch3),
380 + SH_PFC_PIN_GROUP(usb2_ch3_ovc),
381 SH_PFC_PIN_GROUP(usb30),
382 + SH_PFC_PIN_GROUP(usb30_ovc),
383 VIN_DATA_PIN_GROUP(vin4_data, 8, _a),
384 VIN_DATA_PIN_GROUP(vin4_data, 10, _a),
385 VIN_DATA_PIN_GROUP(vin4_data, 12, _a),
386 @@ -5103,22 +5143,27 @@ static const char * const tpu_groups[] = {
388 static const char * const usb0_groups[] = {
393 static const char * const usb1_groups[] = {
398 static const char * const usb2_groups[] = {
403 static const char * const usb2_ch3_groups[] = {
408 static const char * const usb30_groups[] = {
413 static const char * const vin4_groups[] = {