1 Create r8a7795 USB OVC pin groups
3 Split the r8a7795 USB pin groups to create separate groups for the
4 OVC pins. This is required for the AGL reference hardware boards,
5 which use some of the OVC pins in other pinmux modes.
7 Upstream-Status: pending
9 Signed-off-by: Scott Murray <scott.murray@konsulko.com>
10 Signed-off-by: Raquel Medina <raquel.medina@konsulko.com
13 .../boot/dts/renesas/r8a7795-es1-salvator-x.dts | 2 +-
14 arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 2 +-
15 .../arm64/boot/dts/renesas/r8a7795-salvator-xs.dts | 4 +-
16 arch/arm64/boot/dts/renesas/salvator-common.dtsi | 6 +-
17 arch/arm64/boot/dts/renesas/ulcb-kf.dtsi | 2 +-
18 arch/arm64/boot/dts/renesas/ulcb.dtsi | 2 +-
19 drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c | 75 +++++++++++++++++-----
20 drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 75 +++++++++++++++++-----
21 8 files changed, 129 insertions(+), 39 deletions(-)
23 diff --git a/arch/arm64/boot/dts/renesas/r8a7795-es1-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-es1-salvator-x.dts
24 index 63d7cd7c5c47..4a3e0deaa929 100644
25 --- a/arch/arm64/boot/dts/renesas/r8a7795-es1-salvator-x.dts
26 +++ b/arch/arm64/boot/dts/renesas/r8a7795-es1-salvator-x.dts
32 + groups = "usb2", "usb2_ovc";
36 diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
37 index 4f743db4b9ae..6a1f58ed40d1 100644
38 --- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
39 +++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
45 + groups = "usb2", "usb2_ovc";
49 diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts
50 index 9bf8bee35113..9e8dbeecd755 100644
51 --- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts
52 +++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts
58 + groups = "usb2", "usb2_ovc";
63 * - Connect GP6_{04,21} to ADV7842.
65 usb2_ch3_pins: usb2_ch3 {
66 - groups = "usb2_ch3";
67 + groups = "usb2_ch3", "usb2_ch3_ovc";
68 function = "usb2_ch3";
71 diff --git a/arch/arm64/boot/dts/renesas/salvator-common.dtsi b/arch/arm64/boot/dts/renesas/salvator-common.dtsi
72 index 08b1259c4a1c..26a8cfbcf4c3 100644
73 --- a/arch/arm64/boot/dts/renesas/salvator-common.dtsi
74 +++ b/arch/arm64/boot/dts/renesas/salvator-common.dtsi
80 + groups = "usb0", "usb0_ovc";
87 + groups = "usb1", "usb1_ovc";
96 + groups = "usb30", "usb30_ovc";
100 diff --git a/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi b/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi
101 index 202177706cde..6a09243d2b49 100644
102 --- a/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi
103 +++ b/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi
109 + groups = "usb0", "usb0_ovc";
113 diff --git a/arch/arm64/boot/dts/renesas/ulcb.dtsi b/arch/arm64/boot/dts/renesas/ulcb.dtsi
114 index 9fda41e8317c..469665305630 100644
115 --- a/arch/arm64/boot/dts/renesas/ulcb.dtsi
116 +++ b/arch/arm64/boot/dts/renesas/ulcb.dtsi
122 + groups = "usb1", "usb1_ovc";
126 diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c b/drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c
127 index 48fd5415f811..153039dfc83e 100644
128 --- a/drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c
129 +++ b/drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c
130 @@ -3834,44 +3834,79 @@ static const unsigned int tmu_tclk2_b_mux[] = {
132 /* - USB0 ------------------------------------------------------------------- */
133 static const unsigned int usb0_pins[] = {
135 - RCAR_GP_PIN(6, 24), RCAR_GP_PIN(6, 25),
137 + RCAR_GP_PIN(6, 24),
139 static const unsigned int usb0_mux[] = {
140 - USB0_PWEN_MARK, USB0_OVC_MARK,
143 +static const unsigned int usb0_ovc_pins[] = {
145 + RCAR_GP_PIN(6, 25),
147 +static const unsigned int usb0_ovc_mux[] = {
150 /* - USB1 ------------------------------------------------------------------- */
151 static const unsigned int usb1_pins[] = {
153 - RCAR_GP_PIN(6, 26), RCAR_GP_PIN(6, 27),
155 + RCAR_GP_PIN(6, 26),
157 static const unsigned int usb1_mux[] = {
158 - USB1_PWEN_MARK, USB1_OVC_MARK,
161 +static const unsigned int usb1_ovc_pins[] = {
163 + RCAR_GP_PIN(6, 27),
165 +static const unsigned int usb1_ovc_mux[] = {
168 /* - USB2 ------------------------------------------------------------------- */
169 static const unsigned int usb2_pins[] = {
171 - RCAR_GP_PIN(6, 14), RCAR_GP_PIN(6, 15),
173 + RCAR_GP_PIN(6, 14),
175 static const unsigned int usb2_mux[] = {
176 - USB2_PWEN_MARK, USB2_OVC_MARK,
179 +static const unsigned int usb2_ovc_pins[] = {
181 + RCAR_GP_PIN(6, 15),
183 +static const unsigned int usb2_ovc_mux[] = {
187 /* - USB30 ------------------------------------------------------------------ */
188 static const unsigned int usb30_pins[] = {
190 - RCAR_GP_PIN(6, 28), RCAR_GP_PIN(6, 29),
192 + RCAR_GP_PIN(6, 28),
194 static const unsigned int usb30_mux[] = {
195 - USB30_PWEN_MARK, USB30_OVC_MARK,
198 +static const unsigned int usb30_ovc_pins[] = {
200 + RCAR_GP_PIN(6, 29),
202 +static const unsigned int usb30_ovc_mux[] = {
205 /* - USB31 ------------------------------------------------------------------ */
206 static const unsigned int usb31_pins[] = {
208 - RCAR_GP_PIN(6, 30), RCAR_GP_PIN(6, 31),
210 + RCAR_GP_PIN(6, 30),
212 static const unsigned int usb31_mux[] = {
213 - USB31_PWEN_MARK, USB31_OVC_MARK,
216 +static const unsigned int usb31_ovc_pins[] = {
218 + RCAR_GP_PIN(6, 31),
220 +static const unsigned int usb31_ovc_mux[] = {
224 static const unsigned int vin4_data18_a_mux[] = {
225 @@ -4430,10 +4465,15 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
226 SH_PFC_PIN_GROUP(tpu_to2),
227 SH_PFC_PIN_GROUP(tpu_to3),
228 SH_PFC_PIN_GROUP(usb0),
229 + SH_PFC_PIN_GROUP(usb0_ovc),
230 SH_PFC_PIN_GROUP(usb1),
231 + SH_PFC_PIN_GROUP(usb1_ovc),
232 SH_PFC_PIN_GROUP(usb2),
233 + SH_PFC_PIN_GROUP(usb2_ovc),
234 SH_PFC_PIN_GROUP(usb30),
235 + SH_PFC_PIN_GROUP(usb30_ovc),
236 SH_PFC_PIN_GROUP(usb31),
237 + SH_PFC_PIN_GROUP(usb31_ovc),
238 VIN_DATA_PIN_GROUP(vin4_data, 8, _a),
239 VIN_DATA_PIN_GROUP(vin4_data. 16, _a),
240 SH_PFC_PIN_GROUP(vin4_data18_a),
241 @@ -4928,22 +4967,27 @@ static const char * const tpu_groups[] = {
243 static const char * const usb0_groups[] = {
248 static const char * const usb1_groups[] = {
253 static const char * const usb2_groups[] = {
258 static const char * const usb30_groups[] = {
263 static const char * const usb31_groups[] = {
268 static const char * const vin4_groups[] = {
269 diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7795.c b/drivers/pinctrl/sh-pfc/pfc-r8a7795.c
270 index 2988c1d43c32..5292ea7c15de 100644
271 --- a/drivers/pinctrl/sh-pfc/pfc-r8a7795.c
272 +++ b/drivers/pinctrl/sh-pfc/pfc-r8a7795.c
273 @@ -3925,44 +3925,79 @@ static const unsigned int tmu_tclk2_b_mux[] = {
275 /* - USB0 ------------------------------------------------------------------- */
276 static const unsigned int usb0_pins[] = {
278 - RCAR_GP_PIN(6, 24), RCAR_GP_PIN(6, 25),
280 + RCAR_GP_PIN(6, 24),
282 static const unsigned int usb0_mux[] = {
283 - USB0_PWEN_MARK, USB0_OVC_MARK,
286 +static const unsigned int usb0_ovc_pins[] = {
288 + RCAR_GP_PIN(6, 25),
290 +static const unsigned int usb0_ovc_mux[] = {
293 /* - USB1 ------------------------------------------------------------------- */
294 static const unsigned int usb1_pins[] = {
296 - RCAR_GP_PIN(6, 26), RCAR_GP_PIN(6, 27),
298 + RCAR_GP_PIN(6, 26),
300 static const unsigned int usb1_mux[] = {
301 - USB1_PWEN_MARK, USB1_OVC_MARK,
304 +static const unsigned int usb1_ovc_pins[] = {
306 + RCAR_GP_PIN(6, 27),
308 +static const unsigned int usb1_ovc_mux[] = {
311 /* - USB2 ------------------------------------------------------------------- */
312 static const unsigned int usb2_pins[] = {
314 - RCAR_GP_PIN(6, 14), RCAR_GP_PIN(6, 15),
316 + RCAR_GP_PIN(6, 14),
318 static const unsigned int usb2_mux[] = {
319 - USB2_PWEN_MARK, USB2_OVC_MARK,
322 +static const unsigned int usb2_ovc_pins[] = {
324 + RCAR_GP_PIN(6, 15),
326 +static const unsigned int usb2_ovc_mux[] = {
329 /* - USB2_CH3 --------------------------------------------------------------- */
330 static const unsigned int usb2_ch3_pins[] = {
332 - RCAR_GP_PIN(6, 30), RCAR_GP_PIN(6, 31),
334 + RCAR_GP_PIN(6, 30),
336 static const unsigned int usb2_ch3_mux[] = {
337 - USB2_CH3_PWEN_MARK, USB2_CH3_OVC_MARK,
338 + USB2_CH3_PWEN_MARK,
340 +static const unsigned int usb2_ch3_ovc_pins[] = {
342 + RCAR_GP_PIN(6, 31),
344 +static const unsigned int usb2_ch3_ovc_mux[] = {
348 /* - USB30 ------------------------------------------------------------------ */
349 static const unsigned int usb30_pins[] = {
351 - RCAR_GP_PIN(6, 28), RCAR_GP_PIN(6, 29),
353 + RCAR_GP_PIN(6, 28),
355 static const unsigned int usb30_mux[] = {
356 - USB30_PWEN_MARK, USB30_OVC_MARK,
359 +static const unsigned int usb30_ovc_pins[] = {
361 + RCAR_GP_PIN(6, 29),
363 +static const unsigned int usb30_ovc_mux[] = {
367 /* - VIN4 ------------------------------------------------------------------- */
368 @@ -4507,10 +4542,15 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
369 SH_PFC_PIN_GROUP(tpu_to2),
370 SH_PFC_PIN_GROUP(tpu_to3),
371 SH_PFC_PIN_GROUP(usb0),
372 + SH_PFC_PIN_GROUP(usb0_ovc),
373 SH_PFC_PIN_GROUP(usb1),
374 + SH_PFC_PIN_GROUP(usb1_ovc),
375 SH_PFC_PIN_GROUP(usb2),
376 + SH_PFC_PIN_GROUP(usb2_ovc),
377 SH_PFC_PIN_GROUP(usb2_ch3),
378 + SH_PFC_PIN_GROUP(usb2_ch3_ovc),
379 SH_PFC_PIN_GROUP(usb30),
380 + SH_PFC_PIN_GROUP(usb30_ovc),
381 VIN_DATA_PIN_GROUP(vin4_data, 8, _a),
382 VIN_DATA_PIN_GROUP(vin4_data, 10, _a),
383 VIN_DATA_PIN_GROUP(vin4_data, 12, _a),
384 @@ -5012,22 +5052,27 @@ static const char * const tmu_groups[] = {
386 static const char * const usb0_groups[] = {
391 static const char * const usb1_groups[] = {
396 static const char * const usb2_groups[] = {
401 static const char * const usb2_ch3_groups[] = {
406 static const char * const usb30_groups[] = {
411 static const char * const vin4_groups[] = {