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

pinctrl: meson-gxl: Fix inverted registers and add missing pins

Fix some inverted bit numbers in some pinctrl groups and add missing pins
and groups to be in pair with the GXBB pinctrl pins definition.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Neil Armstrong and committed by
Linus Walleij
6a0ab255 88bb9421

+68 -15
+68 -15
drivers/pinctrl/meson/pinctrl-meson-gxl.c
··· 136 136 static const unsigned int emmc_cmd_pins[] = { PIN(BOOT_10, EE_OFF) }; 137 137 static const unsigned int emmc_ds_pins[] = { PIN(BOOT_15, EE_OFF) }; 138 138 139 + static const unsigned int nor_d_pins[] = { PIN(BOOT_11, EE_OFF) }; 140 + static const unsigned int nor_q_pins[] = { PIN(BOOT_12, EE_OFF) }; 141 + static const unsigned int nor_c_pins[] = { PIN(BOOT_13, EE_OFF) }; 142 + static const unsigned int nor_cs_pins[] = { PIN(BOOT_15, EE_OFF) }; 143 + 139 144 static const unsigned int sdcard_d0_pins[] = { PIN(CARD_1, EE_OFF) }; 140 145 static const unsigned int sdcard_d1_pins[] = { PIN(CARD_0, EE_OFF) }; 141 146 static const unsigned int sdcard_d2_pins[] = { PIN(CARD_5, EE_OFF) }; ··· 172 167 173 168 static const unsigned int uart_tx_b_pins[] = { PIN(GPIODV_24, EE_OFF) }; 174 169 static const unsigned int uart_rx_b_pins[] = { PIN(GPIODV_25, EE_OFF) }; 170 + static const unsigned int uart_cts_b_pins[] = { PIN(GPIODV_26, EE_OFF) }; 171 + static const unsigned int uart_rts_b_pins[] = { PIN(GPIODV_27, EE_OFF) }; 175 172 176 173 static const unsigned int uart_tx_c_pins[] = { PIN(GPIOX_8, EE_OFF) }; 177 174 static const unsigned int uart_rx_c_pins[] = { PIN(GPIOX_9, EE_OFF) }; 175 + static const unsigned int uart_cts_c_pins[] = { PIN(GPIOX_10, EE_OFF) }; 176 + static const unsigned int uart_rts_c_pins[] = { PIN(GPIOX_11, EE_OFF) }; 178 177 179 178 static const unsigned int i2c_sck_a_pins[] = { PIN(GPIODV_25, EE_OFF) }; 180 179 static const unsigned int i2c_sda_a_pins[] = { PIN(GPIODV_24, EE_OFF) }; ··· 188 179 189 180 static const unsigned int i2c_sck_c_pins[] = { PIN(GPIODV_29, EE_OFF) }; 190 181 static const unsigned int i2c_sda_c_pins[] = { PIN(GPIODV_28, EE_OFF) }; 182 + 183 + static const unsigned int i2c_sck_c_dv19_pins[] = { PIN(GPIODV_19, EE_OFF) }; 184 + static const unsigned int i2c_sda_c_dv18_pins[] = { PIN(GPIODV_18, EE_OFF) }; 191 185 192 186 static const unsigned int eth_mdio_pins[] = { PIN(GPIOZ_0, EE_OFF) }; 193 187 static const unsigned int eth_mdc_pins[] = { PIN(GPIOZ_1, EE_OFF) }; ··· 239 227 240 228 static const unsigned int uart_tx_ao_a_pins[] = { PIN(GPIOAO_0, 0) }; 241 229 static const unsigned int uart_rx_ao_a_pins[] = { PIN(GPIOAO_1, 0) }; 230 + static const unsigned int uart_tx_ao_b_0_pins[] = { PIN(GPIOAO_0, 0) }; 231 + static const unsigned int uart_rx_ao_b_1_pins[] = { PIN(GPIOAO_1, 0) }; 242 232 static const unsigned int uart_cts_ao_a_pins[] = { PIN(GPIOAO_2, 0) }; 243 233 static const unsigned int uart_rts_ao_a_pins[] = { PIN(GPIOAO_3, 0) }; 244 234 static const unsigned int uart_tx_ao_b_pins[] = { PIN(GPIOAO_4, 0) }; ··· 248 234 static const unsigned int uart_cts_ao_b_pins[] = { PIN(GPIOAO_2, 0) }; 249 235 static const unsigned int uart_rts_ao_b_pins[] = { PIN(GPIOAO_3, 0) }; 250 236 237 + static const unsigned int i2c_sck_ao_pins[] = {PIN(GPIOAO_4, 0) }; 238 + static const unsigned int i2c_sda_ao_pins[] = {PIN(GPIOAO_5, 0) }; 239 + static const unsigned int i2c_slave_sck_ao_pins[] = {PIN(GPIOAO_4, 0) }; 240 + static const unsigned int i2c_slave_sda_ao_pins[] = {PIN(GPIOAO_5, 0) }; 241 + 251 242 static const unsigned int remote_input_ao_pins[] = {PIN(GPIOAO_7, 0) }; 252 243 253 244 static const unsigned int pwm_ao_a_3_pins[] = { PIN(GPIOAO_3, 0) }; 254 245 static const unsigned int pwm_ao_a_8_pins[] = { PIN(GPIOAO_8, 0) }; 255 246 256 247 static const unsigned int pwm_ao_b_pins[] = { PIN(GPIOAO_9, 0) }; 248 + static const unsigned int pwm_ao_b_6_pins[] = { PIN(GPIOAO_6, 0) }; 257 249 258 250 static struct meson_pmx_group meson_gxl_periphs_groups[] = { 259 251 GPIO_GROUP(GPIOZ_0, EE_OFF), ··· 375 355 GROUP(sdio_d1, 5, 30), 376 356 GROUP(sdio_d2, 5, 29), 377 357 GROUP(sdio_d3, 5, 28), 378 - GROUP(sdio_cmd, 5, 27), 379 - GROUP(sdio_clk, 5, 26), 358 + GROUP(sdio_clk, 5, 27), 359 + GROUP(sdio_cmd, 5, 26), 380 360 GROUP(sdio_irq, 5, 24), 381 361 GROUP(uart_tx_a, 5, 19), 382 362 GROUP(uart_rx_a, 5, 18), ··· 384 364 GROUP(uart_rts_a, 5, 16), 385 365 GROUP(uart_tx_c, 5, 13), 386 366 GROUP(uart_rx_c, 5, 12), 367 + GROUP(uart_cts_c, 5, 11), 368 + GROUP(uart_rts_c, 5, 10), 387 369 GROUP(pwm_a, 5, 25), 388 370 GROUP(pwm_e, 5, 15), 389 371 GROUP(pwm_f_x, 5, 14), 390 372 391 373 /* Bank Z */ 392 - GROUP(eth_mdio, 4, 22), 393 - GROUP(eth_mdc, 4, 23), 374 + GROUP(eth_mdio, 4, 23), 375 + GROUP(eth_mdc, 4, 22), 394 376 GROUP(eth_clk_rx_clk, 4, 21), 395 377 GROUP(eth_rx_dv, 4, 20), 396 378 GROUP(eth_rxd0, 4, 19), ··· 415 393 /* Bank DV */ 416 394 GROUP(uart_tx_b, 2, 16), 417 395 GROUP(uart_rx_b, 2, 15), 418 - GROUP(i2c_sck_a, 1, 15), 419 - GROUP(i2c_sda_a, 1, 14), 420 - GROUP(i2c_sck_b, 1, 13), 421 - GROUP(i2c_sda_b, 1, 12), 422 - GROUP(i2c_sck_c, 1, 11), 423 - GROUP(i2c_sda_c, 1, 10), 396 + GROUP(uart_cts_b, 2, 14), 397 + GROUP(uart_rts_b, 2, 13), 398 + GROUP(i2c_sda_c_dv18, 1, 17), 399 + GROUP(i2c_sck_c_dv19, 1, 16), 400 + GROUP(i2c_sda_a, 1, 15), 401 + GROUP(i2c_sck_a, 1, 14), 402 + GROUP(i2c_sda_b, 1, 13), 403 + GROUP(i2c_sck_b, 1, 12), 404 + GROUP(i2c_sda_c, 1, 11), 405 + GROUP(i2c_sck_c, 1, 10), 424 406 GROUP(pwm_b, 2, 11), 425 407 GROUP(pwm_d, 2, 12), 426 408 ··· 433 407 GROUP(emmc_clk, 7, 30), 434 408 GROUP(emmc_cmd, 7, 29), 435 409 GROUP(emmc_ds, 7, 28), 410 + GROUP(nor_d, 7, 13), 411 + GROUP(nor_q, 7, 12), 412 + GROUP(nor_c, 7, 11), 413 + GROUP(nor_cs, 7, 10), 436 414 GROUP(nand_ce0, 7, 7), 437 415 GROUP(nand_ce1, 7, 6), 438 416 GROUP(nand_rb0, 7, 5), ··· 471 441 GPIO_GROUP(GPIOAO_9, 0), 472 442 473 443 /* bank AO */ 444 + GROUP(uart_tx_ao_b_0, 0, 26), 445 + GROUP(uart_rx_ao_b_1, 0, 25), 474 446 GROUP(uart_tx_ao_b, 0, 24), 475 - GROUP(uart_rx_ao_b, 0, 25), 447 + GROUP(uart_rx_ao_b, 0, 23), 476 448 GROUP(uart_tx_ao_a, 0, 12), 477 449 GROUP(uart_rx_ao_a, 0, 11), 478 450 GROUP(uart_cts_ao_a, 0, 10), 479 451 GROUP(uart_rts_ao_a, 0, 9), 480 452 GROUP(uart_cts_ao_b, 0, 8), 481 453 GROUP(uart_rts_ao_b, 0, 7), 454 + GROUP(i2c_sck_ao, 0, 6), 455 + GROUP(i2c_sda_ao, 0, 5), 456 + GROUP(i2c_slave_sck_ao, 0, 2), 457 + GROUP(i2c_slave_sda_ao, 0, 1), 482 458 GROUP(remote_input_ao, 0, 0), 483 459 GROUP(pwm_ao_a_3, 0, 22), 460 + GROUP(pwm_ao_b_6, 0, 18), 484 461 GROUP(pwm_ao_a_8, 0, 17), 485 462 GROUP(pwm_ao_b, 0, 3), 486 463 }; ··· 528 491 "emmc_nand_d07", "emmc_clk", "emmc_cmd", "emmc_ds", 529 492 }; 530 493 494 + static const char * const nor_groups[] = { 495 + "nor_d", "nor_q", "nor_c", "nor_cs", 496 + }; 497 + 531 498 static const char * const sdcard_groups[] = { 532 499 "sdcard_d0", "sdcard_d1", "sdcard_d2", "sdcard_d3", 533 500 "sdcard_cmd", "sdcard_clk", ··· 552 511 }; 553 512 554 513 static const char * const uart_b_groups[] = { 555 - "uart_tx_b", "uart_rx_b", 514 + "uart_tx_b", "uart_rx_b", "uart_cts_b", "uart_rts_b", 556 515 }; 557 516 558 517 static const char * const uart_c_groups[] = { 559 - "uart_tx_c", "uart_rx_c", 518 + "uart_tx_c", "uart_rx_c", "uart_cts_c", "uart_rts_c", 560 519 }; 561 520 562 521 static const char * const i2c_a_groups[] = { ··· 568 527 }; 569 528 570 529 static const char * const i2c_c_groups[] = { 571 - "i2c_sck_c", "i2c_sda_c", 530 + "i2c_sck_c", "i2c_sda_c", "i2c_sda_c_dv18", "i2c_sck_c_dv19", 572 531 }; 573 532 574 533 static const char * const eth_groups[] = { ··· 621 580 622 581 static const char * const uart_ao_b_groups[] = { 623 582 "uart_tx_ao_b", "uart_rx_ao_b", "uart_cts_ao_b", "uart_rts_ao_b", 583 + "uart_tx_ao_b_0", "uart_rx_ao_b_1", 584 + }; 585 + 586 + static const char * const i2c_ao_groups[] = { 587 + "i2c_sck_ao", "i2c_sda_ao", 588 + }; 589 + 590 + static const char * const i2c_slave_ao_groups[] = { 591 + "i2c_slave_sck_ao", "i2c_slave_sda_ao", 624 592 }; 625 593 626 594 static const char * const remote_input_ao_groups[] = { ··· 641 591 }; 642 592 643 593 static const char * const pwm_ao_b_groups[] = { 644 - "pwm_ao_b", 594 + "pwm_ao_b", "pwm_ao_b_6", 645 595 }; 646 596 647 597 static struct meson_pmx_func meson_gxl_periphs_functions[] = { 648 598 FUNCTION(gpio_periphs), 649 599 FUNCTION(emmc), 600 + FUNCTION(nor), 650 601 FUNCTION(sdcard), 651 602 FUNCTION(sdio), 652 603 FUNCTION(nand), ··· 672 621 FUNCTION(gpio_aobus), 673 622 FUNCTION(uart_ao), 674 623 FUNCTION(uart_ao_b), 624 + FUNCTION(i2c_ao), 625 + FUNCTION(i2c_slave_ao), 675 626 FUNCTION(remote_input_ao), 676 627 FUNCTION(pwm_ao_a), 677 628 FUNCTION(pwm_ao_b),