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>
12 .../boot/dts/renesas/r8a7795-es1-salvator-x.dts | 2 +-
13 arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 2 +-
14 .../arm64/boot/dts/renesas/r8a7795-salvator-xs.dts | 4 +-
15 arch/arm64/boot/dts/renesas/salvator-common.dtsi | 6 +-
16 arch/arm64/boot/dts/renesas/ulcb-kf.dtsi | 2 +-
17 arch/arm64/boot/dts/renesas/ulcb.dtsi | 2 +-
18 drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c | 75 +++++++++++++++++-----
19 drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 75 +++++++++++++++++-----
20 8 files changed, 129 insertions(+), 39 deletions(-)
22 diff --git a/arch/arm64/boot/dts/renesas/r8a7795-es1-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-es1-salvator-x.dts
23 index 5c3935ef4fb9..07d3f03274e3 100644
24 --- a/arch/arm64/boot/dts/renesas/r8a7795-es1-salvator-x.dts
25 +++ b/arch/arm64/boot/dts/renesas/r8a7795-es1-salvator-x.dts
31 + groups = "usb2", "usb2_ovc";
35 diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
36 index 6928afbd8e06..9c229b1bbb59 100644
37 --- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
38 +++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
44 + groups = "usb2", "usb2_ovc";
48 diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts
49 index 498f78875dbd..abd1d480292e 100644
50 --- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts
51 +++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts
57 + groups = "usb2", "usb2_ovc";
62 * - Connect GP6_{04,21} to ADV7842.
64 usb2_ch3_pins: usb2_ch3 {
65 - groups = "usb2_ch3";
66 + groups = "usb2_ch3", "usb2_ch3_ovc";
67 function = "usb2_ch3";
70 diff --git a/arch/arm64/boot/dts/renesas/salvator-common.dtsi b/arch/arm64/boot/dts/renesas/salvator-common.dtsi
71 index 878ed7caca77..a9e2d0a02fe1 100644
72 --- a/arch/arm64/boot/dts/renesas/salvator-common.dtsi
73 +++ b/arch/arm64/boot/dts/renesas/salvator-common.dtsi
79 + groups = "usb0", "usb0_ovc";
86 + groups = "usb1", "usb1_ovc";
95 + groups = "usb30", "usb30_ovc";
99 diff --git a/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi b/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi
100 index 1b316d79df88..9d44b5ef4f63 100644
101 --- a/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi
102 +++ b/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi
108 + groups = "usb0", "usb0_ovc";
112 diff --git a/arch/arm64/boot/dts/renesas/ulcb.dtsi b/arch/arm64/boot/dts/renesas/ulcb.dtsi
113 index b60fd45f0a17..6f054ab8e611 100644
114 --- a/arch/arm64/boot/dts/renesas/ulcb.dtsi
115 +++ b/arch/arm64/boot/dts/renesas/ulcb.dtsi
121 + groups = "usb1", "usb1_ovc";
125 diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c b/drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c
126 index 9f302f60297f..55f99fe4d8ac 100644
127 --- a/drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c
128 +++ b/drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c
129 @@ -3822,44 +3822,79 @@ static const unsigned int tmu_tclk2_b_mux[] = {
131 /* - USB0 ------------------------------------------------------------------- */
132 static const unsigned int usb0_pins[] = {
134 - RCAR_GP_PIN(6, 24), RCAR_GP_PIN(6, 25),
136 + RCAR_GP_PIN(6, 24),
138 static const unsigned int usb0_mux[] = {
139 - USB0_PWEN_MARK, USB0_OVC_MARK,
142 +static const unsigned int usb0_ovc_pins[] = {
144 + RCAR_GP_PIN(6, 25),
146 +static const unsigned int usb0_ovc_mux[] = {
149 /* - USB1 ------------------------------------------------------------------- */
150 static const unsigned int usb1_pins[] = {
152 - RCAR_GP_PIN(6, 26), RCAR_GP_PIN(6, 27),
154 + RCAR_GP_PIN(6, 26),
156 static const unsigned int usb1_mux[] = {
157 - USB1_PWEN_MARK, USB1_OVC_MARK,
160 +static const unsigned int usb1_ovc_pins[] = {
162 + RCAR_GP_PIN(6, 27),
164 +static const unsigned int usb1_ovc_mux[] = {
167 /* - USB2 ------------------------------------------------------------------- */
168 static const unsigned int usb2_pins[] = {
170 - RCAR_GP_PIN(6, 14), RCAR_GP_PIN(6, 15),
172 + RCAR_GP_PIN(6, 14),
174 static const unsigned int usb2_mux[] = {
175 - USB2_PWEN_MARK, USB2_OVC_MARK,
178 +static const unsigned int usb2_ovc_pins[] = {
180 + RCAR_GP_PIN(6, 15),
182 +static const unsigned int usb2_ovc_mux[] = {
186 /* - USB30 ------------------------------------------------------------------ */
187 static const unsigned int usb30_pins[] = {
189 - RCAR_GP_PIN(6, 28), RCAR_GP_PIN(6, 29),
191 + RCAR_GP_PIN(6, 28),
193 static const unsigned int usb30_mux[] = {
194 - USB30_PWEN_MARK, USB30_OVC_MARK,
197 +static const unsigned int usb30_ovc_pins[] = {
199 + RCAR_GP_PIN(6, 29),
201 +static const unsigned int usb30_ovc_mux[] = {
204 /* - USB31 ------------------------------------------------------------------ */
205 static const unsigned int usb31_pins[] = {
207 - RCAR_GP_PIN(6, 30), RCAR_GP_PIN(6, 31),
209 + RCAR_GP_PIN(6, 30),
211 static const unsigned int usb31_mux[] = {
212 - USB31_PWEN_MARK, USB31_OVC_MARK,
215 +static const unsigned int usb31_ovc_pins[] = {
217 + RCAR_GP_PIN(6, 31),
219 +static const unsigned int usb31_ovc_mux[] = {
223 /* - VIN4 ------------------------------------------------------------------- */
224 @@ -4486,10 +4521,15 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
225 SH_PFC_PIN_GROUP(tmu_tclk2_a),
226 SH_PFC_PIN_GROUP(tmu_tclk2_b),
227 SH_PFC_PIN_GROUP(usb0),
228 + SH_PFC_PIN_GROUP(usb0_ovc),
229 SH_PFC_PIN_GROUP(usb1),
230 + SH_PFC_PIN_GROUP(usb1_ovc),
231 SH_PFC_PIN_GROUP(usb2),
232 + SH_PFC_PIN_GROUP(usb2_ovc),
233 SH_PFC_PIN_GROUP(usb30),
234 + SH_PFC_PIN_GROUP(usb30_ovc),
235 SH_PFC_PIN_GROUP(usb31),
236 + SH_PFC_PIN_GROUP(usb31_ovc),
237 SH_PFC_PIN_GROUP(vin4_data8_a),
238 SH_PFC_PIN_GROUP(vin4_data16_a),
239 SH_PFC_PIN_GROUP(vin4_data18_a),
240 @@ -4977,22 +5017,27 @@ static const char * const tmu_groups[] = {
242 static const char * const usb0_groups[] = {
247 static const char * const usb1_groups[] = {
252 static const char * const usb2_groups[] = {
257 static const char * const usb30_groups[] = {
262 static const char * const usb31_groups[] = {
267 static const char * const vin4_groups[] = {
268 diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7795.c b/drivers/pinctrl/sh-pfc/pfc-r8a7795.c
269 index 3ebe8deb24d6..745f93884fe1 100644
270 --- a/drivers/pinctrl/sh-pfc/pfc-r8a7795.c
271 +++ b/drivers/pinctrl/sh-pfc/pfc-r8a7795.c
272 @@ -3911,44 +3911,79 @@ static const unsigned int tmu_tclk2_b_mux[] = {
274 /* - USB0 ------------------------------------------------------------------- */
275 static const unsigned int usb0_pins[] = {
277 - RCAR_GP_PIN(6, 24), RCAR_GP_PIN(6, 25),
279 + RCAR_GP_PIN(6, 24),
281 static const unsigned int usb0_mux[] = {
282 - USB0_PWEN_MARK, USB0_OVC_MARK,
285 +static const unsigned int usb0_ovc_pins[] = {
287 + RCAR_GP_PIN(6, 25),
289 +static const unsigned int usb0_ovc_mux[] = {
292 /* - USB1 ------------------------------------------------------------------- */
293 static const unsigned int usb1_pins[] = {
295 - RCAR_GP_PIN(6, 26), RCAR_GP_PIN(6, 27),
297 + RCAR_GP_PIN(6, 26),
299 static const unsigned int usb1_mux[] = {
300 - USB1_PWEN_MARK, USB1_OVC_MARK,
303 +static const unsigned int usb1_ovc_pins[] = {
305 + RCAR_GP_PIN(6, 27),
307 +static const unsigned int usb1_ovc_mux[] = {
310 /* - USB2 ------------------------------------------------------------------- */
311 static const unsigned int usb2_pins[] = {
313 - RCAR_GP_PIN(6, 14), RCAR_GP_PIN(6, 15),
315 + RCAR_GP_PIN(6, 14),
317 static const unsigned int usb2_mux[] = {
318 - USB2_PWEN_MARK, USB2_OVC_MARK,
321 +static const unsigned int usb2_ovc_pins[] = {
323 + RCAR_GP_PIN(6, 15),
325 +static const unsigned int usb2_ovc_mux[] = {
328 /* - USB2_CH3 --------------------------------------------------------------- */
329 static const unsigned int usb2_ch3_pins[] = {
331 - RCAR_GP_PIN(6, 30), RCAR_GP_PIN(6, 31),
333 + RCAR_GP_PIN(6, 30),
335 static const unsigned int usb2_ch3_mux[] = {
336 - USB2_CH3_PWEN_MARK, USB2_CH3_OVC_MARK,
337 + USB2_CH3_PWEN_MARK,
339 +static const unsigned int usb2_ch3_ovc_pins[] = {
341 + RCAR_GP_PIN(6, 31),
343 +static const unsigned int usb2_ch3_ovc_mux[] = {
347 /* - USB30 ------------------------------------------------------------------ */
348 static const unsigned int usb30_pins[] = {
350 - RCAR_GP_PIN(6, 28), RCAR_GP_PIN(6, 29),
352 + RCAR_GP_PIN(6, 28),
354 static const unsigned int usb30_mux[] = {
355 - USB30_PWEN_MARK, USB30_OVC_MARK,
358 +static const unsigned int usb30_ovc_pins[] = {
360 + RCAR_GP_PIN(6, 29),
362 +static const unsigned int usb30_ovc_mux[] = {
366 /* - VIN4 ------------------------------------------------------------------- */
367 @@ -4528,10 +4563,15 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
368 SH_PFC_PIN_GROUP(tmu_tclk2_a),
369 SH_PFC_PIN_GROUP(tmu_tclk2_b),
370 SH_PFC_PIN_GROUP(usb0),
371 + SH_PFC_PIN_GROUP(usb0_ovc),
372 SH_PFC_PIN_GROUP(usb1),
373 + SH_PFC_PIN_GROUP(usb1_ovc),
374 SH_PFC_PIN_GROUP(usb2),
375 + SH_PFC_PIN_GROUP(usb2_ovc),
376 SH_PFC_PIN_GROUP(usb2_ch3),
377 + SH_PFC_PIN_GROUP(usb2_ch3_ovc),
378 SH_PFC_PIN_GROUP(usb30),
379 + SH_PFC_PIN_GROUP(usb30_ovc),
380 VIN_DATA_PIN_GROUP(vin4_data_a, 8),
381 VIN_DATA_PIN_GROUP(vin4_data_a, 10),
382 VIN_DATA_PIN_GROUP(vin4_data_a, 12),
383 @@ -5026,22 +5066,27 @@ static const char * const tmu_groups[] = {
385 static const char * const usb0_groups[] = {
390 static const char * const usb1_groups[] = {
395 static const char * const usb2_groups[] = {
400 static const char * const usb2_ch3_groups[] = {
405 static const char * const usb30_groups[] = {
410 static const char * const vin4_groups[] = {