Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pinctrl: nomadik: add USB functions for STn8815

The MUSB block in the Nomadik has two pin settings: high speed or
full speed. These correspond to two unique pin group settings: all
pins set to function B for high speed and all set to function C
for full speed. Full speed uses more pins than high speed.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

+15 -1
+15 -1
drivers/pinctrl/nomadik/pinctrl-nomadik-stn8815.c
··· 291 291 static const unsigned clcd_16_23_b_1_pins[] = { STN8815_PIN_AB6, 292 292 STN8815_PIN_AA6, STN8815_PIN_Y6, STN8815_PIN_Y5, STN8815_PIN_AA5, 293 293 STN8815_PIN_AB5, STN8815_PIN_AB4, STN8815_PIN_Y4 }; 294 - 294 + /* Full-speed and high-speed USB pins */ 295 + static const unsigned usbfs_b_1_pins[] = { STN8815_PIN_E21, STN8815_PIN_E20, 296 + STN8815_PIN_C22, STN8815_PIN_D21, 297 + STN8815_PIN_D20, STN8815_PIN_C21, 298 + STN8815_PIN_C20 }; 299 + static const unsigned usbhs_c_1_pins[] = { STN8815_PIN_E21, STN8815_PIN_E20, 300 + STN8815_PIN_C20, STN8815_PIN_C19, 301 + STN8815_PIN_C22, STN8815_PIN_D21, 302 + STN8815_PIN_D20, STN8815_PIN_C21, 303 + STN8815_PIN_C16, STN8815_PIN_A15, 304 + STN8815_PIN_D17, STN8815_PIN_C17 }; 295 305 296 306 #define STN8815_PIN_GROUP(a, b) { .name = #a, .pins = a##_pins, \ 297 307 .npins = ARRAY_SIZE(a##_pins), .altsetting = b } ··· 318 308 STN8815_PIN_GROUP(u1_b_1, NMK_GPIO_ALT_B), 319 309 STN8815_PIN_GROUP(i2cusb_b_1, NMK_GPIO_ALT_B), 320 310 STN8815_PIN_GROUP(clcd_16_23_b_1, NMK_GPIO_ALT_B), 311 + STN8815_PIN_GROUP(usbfs_b_1, NMK_GPIO_ALT_B), 312 + STN8815_PIN_GROUP(usbhs_c_1, NMK_GPIO_ALT_C), 321 313 }; 322 314 323 315 /* We use this macro to define the groups applicable to a function */ ··· 333 321 STN8815_FUNC_GROUPS(i2c0, "i2c0_a_1"); 334 322 STN8815_FUNC_GROUPS(i2cusb, "i2cusb_b_1"); 335 323 STN8815_FUNC_GROUPS(clcd, "clcd_16_23_b_1"); 324 + STN8815_FUNC_GROUPS(usb, "usbfs_b_1", "usbhs_c_1"); 336 325 337 326 #define FUNCTION(fname) \ 338 327 { \ ··· 350 337 FUNCTION(i2c0), 351 338 FUNCTION(i2cusb), 352 339 FUNCTION(clcd), 340 + FUNCTION(usb), 353 341 }; 354 342 355 343 static const struct nmk_pinctrl_soc_data nmk_stn8815_soc = {