diff options
Diffstat (limited to 'drivers/pinctrl/intel/pinctrl-sunrisepoint.c')
| -rw-r--r-- | drivers/pinctrl/intel/pinctrl-sunrisepoint.c | 263 |
1 files changed, 263 insertions, 0 deletions
diff --git a/drivers/pinctrl/intel/pinctrl-sunrisepoint.c b/drivers/pinctrl/intel/pinctrl-sunrisepoint.c index 55d025dc89e8..1de9ae5010db 100644 --- a/drivers/pinctrl/intel/pinctrl-sunrisepoint.c +++ b/drivers/pinctrl/intel/pinctrl-sunrisepoint.c | |||
| @@ -284,8 +284,271 @@ static const struct intel_pinctrl_soc_data sptlp_soc_data = { | |||
| 284 | .ncommunities = ARRAY_SIZE(sptlp_communities), | 284 | .ncommunities = ARRAY_SIZE(sptlp_communities), |
| 285 | }; | 285 | }; |
| 286 | 286 | ||
| 287 | /* Sunrisepoint-H */ | ||
| 288 | static const struct pinctrl_pin_desc spth_pins[] = { | ||
| 289 | /* GPP_A */ | ||
| 290 | PINCTRL_PIN(0, "RCINB"), | ||
| 291 | PINCTRL_PIN(1, "LAD_0"), | ||
| 292 | PINCTRL_PIN(2, "LAD_1"), | ||
| 293 | PINCTRL_PIN(3, "LAD_2"), | ||
| 294 | PINCTRL_PIN(4, "LAD_3"), | ||
| 295 | PINCTRL_PIN(5, "LFRAMEB"), | ||
| 296 | PINCTRL_PIN(6, "SERIQ"), | ||
| 297 | PINCTRL_PIN(7, "PIRQAB"), | ||
| 298 | PINCTRL_PIN(8, "CLKRUNB"), | ||
| 299 | PINCTRL_PIN(9, "CLKOUT_LPC_0"), | ||
| 300 | PINCTRL_PIN(10, "CLKOUT_LPC_1"), | ||
| 301 | PINCTRL_PIN(11, "PMEB"), | ||
| 302 | PINCTRL_PIN(12, "BM_BUSYB"), | ||
| 303 | PINCTRL_PIN(13, "SUSWARNB_SUS_PWRDNACK"), | ||
| 304 | PINCTRL_PIN(14, "SUS_STATB"), | ||
| 305 | PINCTRL_PIN(15, "SUSACKB"), | ||
| 306 | PINCTRL_PIN(16, "CLKOUT_48"), | ||
| 307 | PINCTRL_PIN(17, "ISH_GP_7"), | ||
| 308 | PINCTRL_PIN(18, "ISH_GP_0"), | ||
| 309 | PINCTRL_PIN(19, "ISH_GP_1"), | ||
| 310 | PINCTRL_PIN(20, "ISH_GP_2"), | ||
| 311 | PINCTRL_PIN(21, "ISH_GP_3"), | ||
| 312 | PINCTRL_PIN(22, "ISH_GP_4"), | ||
| 313 | PINCTRL_PIN(23, "ISH_GP_5"), | ||
| 314 | /* GPP_B */ | ||
| 315 | PINCTRL_PIN(24, "CORE_VID_0"), | ||
| 316 | PINCTRL_PIN(25, "CORE_VID_1"), | ||
| 317 | PINCTRL_PIN(26, "VRALERTB"), | ||
| 318 | PINCTRL_PIN(27, "CPU_GP_2"), | ||
| 319 | PINCTRL_PIN(28, "CPU_GP_3"), | ||
| 320 | PINCTRL_PIN(29, "SRCCLKREQB_0"), | ||
| 321 | PINCTRL_PIN(30, "SRCCLKREQB_1"), | ||
| 322 | PINCTRL_PIN(31, "SRCCLKREQB_2"), | ||
| 323 | PINCTRL_PIN(32, "SRCCLKREQB_3"), | ||
| 324 | PINCTRL_PIN(33, "SRCCLKREQB_4"), | ||
| 325 | PINCTRL_PIN(34, "SRCCLKREQB_5"), | ||
| 326 | PINCTRL_PIN(35, "EXT_PWR_GATEB"), | ||
| 327 | PINCTRL_PIN(36, "SLP_S0B"), | ||
| 328 | PINCTRL_PIN(37, "PLTRSTB"), | ||
| 329 | PINCTRL_PIN(38, "SPKR"), | ||
| 330 | PINCTRL_PIN(39, "GSPI0_CSB"), | ||
| 331 | PINCTRL_PIN(40, "GSPI0_CLK"), | ||
| 332 | PINCTRL_PIN(41, "GSPI0_MISO"), | ||
| 333 | PINCTRL_PIN(42, "GSPI0_MOSI"), | ||
| 334 | PINCTRL_PIN(43, "GSPI1_CSB"), | ||
| 335 | PINCTRL_PIN(44, "GSPI1_CLK"), | ||
| 336 | PINCTRL_PIN(45, "GSPI1_MISO"), | ||
| 337 | PINCTRL_PIN(46, "GSPI1_MOSI"), | ||
| 338 | PINCTRL_PIN(47, "SML1ALERTB"), | ||
| 339 | /* GPP_C */ | ||
| 340 | PINCTRL_PIN(48, "SMBCLK"), | ||
| 341 | PINCTRL_PIN(49, "SMBDATA"), | ||
| 342 | PINCTRL_PIN(50, "SMBALERTB"), | ||
| 343 | PINCTRL_PIN(51, "SML0CLK"), | ||
| 344 | PINCTRL_PIN(52, "SML0DATA"), | ||
| 345 | PINCTRL_PIN(53, "SML0ALERTB"), | ||
| 346 | PINCTRL_PIN(54, "SML1CLK"), | ||
| 347 | PINCTRL_PIN(55, "SML1DATA"), | ||
| 348 | PINCTRL_PIN(56, "UART0_RXD"), | ||
| 349 | PINCTRL_PIN(57, "UART0_TXD"), | ||
| 350 | PINCTRL_PIN(58, "UART0_RTSB"), | ||
| 351 | PINCTRL_PIN(59, "UART0_CTSB"), | ||
| 352 | PINCTRL_PIN(60, "UART1_RXD"), | ||
| 353 | PINCTRL_PIN(61, "UART1_TXD"), | ||
| 354 | PINCTRL_PIN(62, "UART1_RTSB"), | ||
| 355 | PINCTRL_PIN(63, "UART1_CTSB"), | ||
| 356 | PINCTRL_PIN(64, "I2C0_SDA"), | ||
| 357 | PINCTRL_PIN(65, "I2C0_SCL"), | ||
| 358 | PINCTRL_PIN(66, "I2C1_SDA"), | ||
| 359 | PINCTRL_PIN(67, "I2C1_SCL"), | ||
| 360 | PINCTRL_PIN(68, "UART2_RXD"), | ||
| 361 | PINCTRL_PIN(69, "UART2_TXD"), | ||
| 362 | PINCTRL_PIN(70, "UART2_RTSB"), | ||
| 363 | PINCTRL_PIN(71, "UART2_CTSB"), | ||
| 364 | /* GPP_D */ | ||
| 365 | PINCTRL_PIN(72, "SPI1_CSB"), | ||
| 366 | PINCTRL_PIN(73, "SPI1_CLK"), | ||
| 367 | PINCTRL_PIN(74, "SPI1_MISO_IO_1"), | ||
| 368 | PINCTRL_PIN(75, "SPI1_MOSI_IO_0"), | ||
| 369 | PINCTRL_PIN(76, "ISH_I2C2_SDA"), | ||
| 370 | PINCTRL_PIN(77, "SSP0_SFRM"), | ||
| 371 | PINCTRL_PIN(78, "SSP0_TXD"), | ||
| 372 | PINCTRL_PIN(79, "SSP0_RXD"), | ||
| 373 | PINCTRL_PIN(80, "SSP0_SCLK"), | ||
| 374 | PINCTRL_PIN(81, "ISH_SPI_CSB"), | ||
| 375 | PINCTRL_PIN(82, "ISH_SPI_CLK"), | ||
| 376 | PINCTRL_PIN(83, "ISH_SPI_MISO"), | ||
| 377 | PINCTRL_PIN(84, "ISH_SPI_MOSI"), | ||
| 378 | PINCTRL_PIN(85, "ISH_UART0_RXD"), | ||
| 379 | PINCTRL_PIN(86, "ISH_UART0_TXD"), | ||
| 380 | PINCTRL_PIN(87, "ISH_UART0_RTSB"), | ||
| 381 | PINCTRL_PIN(88, "ISH_UART0_CTSB"), | ||
| 382 | PINCTRL_PIN(89, "DMIC_CLK_1"), | ||
| 383 | PINCTRL_PIN(90, "DMIC_DATA_1"), | ||
| 384 | PINCTRL_PIN(91, "DMIC_CLK_0"), | ||
| 385 | PINCTRL_PIN(92, "DMIC_DATA_0"), | ||
| 386 | PINCTRL_PIN(93, "SPI1_IO_2"), | ||
| 387 | PINCTRL_PIN(94, "SPI1_IO_3"), | ||
| 388 | PINCTRL_PIN(95, "ISH_I2C2_SCL"), | ||
| 389 | /* GPP_E */ | ||
| 390 | PINCTRL_PIN(96, "SATAXPCIE_0"), | ||
| 391 | PINCTRL_PIN(97, "SATAXPCIE_1"), | ||
| 392 | PINCTRL_PIN(98, "SATAXPCIE_2"), | ||
| 393 | PINCTRL_PIN(99, "CPU_GP_0"), | ||
| 394 | PINCTRL_PIN(100, "SATA_DEVSLP_0"), | ||
| 395 | PINCTRL_PIN(101, "SATA_DEVSLP_1"), | ||
| 396 | PINCTRL_PIN(102, "SATA_DEVSLP_2"), | ||
| 397 | PINCTRL_PIN(103, "CPU_GP_1"), | ||
| 398 | PINCTRL_PIN(104, "SATA_LEDB"), | ||
| 399 | PINCTRL_PIN(105, "USB2_OCB_0"), | ||
| 400 | PINCTRL_PIN(106, "USB2_OCB_1"), | ||
| 401 | PINCTRL_PIN(107, "USB2_OCB_2"), | ||
| 402 | PINCTRL_PIN(108, "USB2_OCB_3"), | ||
| 403 | /* GPP_F */ | ||
| 404 | PINCTRL_PIN(109, "SATAXPCIE_3"), | ||
| 405 | PINCTRL_PIN(110, "SATAXPCIE_4"), | ||
| 406 | PINCTRL_PIN(111, "SATAXPCIE_5"), | ||
| 407 | PINCTRL_PIN(112, "SATAXPCIE_6"), | ||
| 408 | PINCTRL_PIN(113, "SATAXPCIE_7"), | ||
| 409 | PINCTRL_PIN(114, "SATA_DEVSLP_3"), | ||
| 410 | PINCTRL_PIN(115, "SATA_DEVSLP_4"), | ||
| 411 | PINCTRL_PIN(116, "SATA_DEVSLP_5"), | ||
| 412 | PINCTRL_PIN(117, "SATA_DEVSLP_6"), | ||
| 413 | PINCTRL_PIN(118, "SATA_DEVSLP_7"), | ||
| 414 | PINCTRL_PIN(119, "SATA_SCLOCK"), | ||
| 415 | PINCTRL_PIN(120, "SATA_SLOAD"), | ||
| 416 | PINCTRL_PIN(121, "SATA_SDATAOUT1"), | ||
| 417 | PINCTRL_PIN(122, "SATA_SDATAOUT0"), | ||
| 418 | PINCTRL_PIN(123, "GPP_F_14"), | ||
| 419 | PINCTRL_PIN(124, "USB_OCB_4"), | ||
| 420 | PINCTRL_PIN(125, "USB_OCB_5"), | ||
| 421 | PINCTRL_PIN(126, "USB_OCB_6"), | ||
| 422 | PINCTRL_PIN(127, "USB_OCB_7"), | ||
| 423 | PINCTRL_PIN(128, "L_VDDEN"), | ||
| 424 | PINCTRL_PIN(129, "L_BKLTEN"), | ||
| 425 | PINCTRL_PIN(130, "L_BKLTCTL"), | ||
| 426 | PINCTRL_PIN(131, "GPP_F_22"), | ||
| 427 | PINCTRL_PIN(132, "GPP_F_23"), | ||
| 428 | /* GPP_G */ | ||
| 429 | PINCTRL_PIN(133, "FAN_TACH_0"), | ||
| 430 | PINCTRL_PIN(134, "FAN_TACH_1"), | ||
| 431 | PINCTRL_PIN(135, "FAN_TACH_2"), | ||
| 432 | PINCTRL_PIN(136, "FAN_TACH_3"), | ||
| 433 | PINCTRL_PIN(137, "FAN_TACH_4"), | ||
| 434 | PINCTRL_PIN(138, "FAN_TACH_5"), | ||
| 435 | PINCTRL_PIN(139, "FAN_TACH_6"), | ||
| 436 | PINCTRL_PIN(140, "FAN_TACH_7"), | ||
| 437 | PINCTRL_PIN(141, "FAN_PWM_0"), | ||
| 438 | PINCTRL_PIN(142, "FAN_PWM_1"), | ||
| 439 | PINCTRL_PIN(143, "FAN_PWM_2"), | ||
| 440 | PINCTRL_PIN(144, "FAN_PWM_3"), | ||
| 441 | PINCTRL_PIN(145, "GSXDOUT"), | ||
| 442 | PINCTRL_PIN(146, "GSXSLOAD"), | ||
| 443 | PINCTRL_PIN(147, "GSXDIN"), | ||
| 444 | PINCTRL_PIN(148, "GSXRESETB"), | ||
| 445 | PINCTRL_PIN(149, "GSXCLK"), | ||
| 446 | PINCTRL_PIN(150, "ADR_COMPLETE"), | ||
| 447 | PINCTRL_PIN(151, "NMIB"), | ||
| 448 | PINCTRL_PIN(152, "SMIB"), | ||
| 449 | PINCTRL_PIN(153, "GPP_G_20"), | ||
| 450 | PINCTRL_PIN(154, "GPP_G_21"), | ||
| 451 | PINCTRL_PIN(155, "GPP_G_22"), | ||
| 452 | PINCTRL_PIN(156, "GPP_G_23"), | ||
| 453 | /* GPP_H */ | ||
| 454 | PINCTRL_PIN(157, "SRCCLKREQB_6"), | ||
| 455 | PINCTRL_PIN(158, "SRCCLKREQB_7"), | ||
| 456 | PINCTRL_PIN(159, "SRCCLKREQB_8"), | ||
| 457 | PINCTRL_PIN(160, "SRCCLKREQB_9"), | ||
| 458 | PINCTRL_PIN(161, "SRCCLKREQB_10"), | ||
| 459 | PINCTRL_PIN(162, "SRCCLKREQB_11"), | ||
| 460 | PINCTRL_PIN(163, "SRCCLKREQB_12"), | ||
| 461 | PINCTRL_PIN(164, "SRCCLKREQB_13"), | ||
| 462 | PINCTRL_PIN(165, "SRCCLKREQB_14"), | ||
| 463 | PINCTRL_PIN(166, "SRCCLKREQB_15"), | ||
| 464 | PINCTRL_PIN(167, "SML2CLK"), | ||
| 465 | PINCTRL_PIN(168, "SML2DATA"), | ||
| 466 | PINCTRL_PIN(169, "SML2ALERTB"), | ||
| 467 | PINCTRL_PIN(170, "SML3CLK"), | ||
| 468 | PINCTRL_PIN(171, "SML3DATA"), | ||
| 469 | PINCTRL_PIN(172, "SML3ALERTB"), | ||
| 470 | PINCTRL_PIN(173, "SML4CLK"), | ||
| 471 | PINCTRL_PIN(174, "SML4DATA"), | ||
| 472 | PINCTRL_PIN(175, "SML4ALERTB"), | ||
| 473 | PINCTRL_PIN(176, "ISH_I2C0_SDA"), | ||
| 474 | PINCTRL_PIN(177, "ISH_I2C0_SCL"), | ||
| 475 | PINCTRL_PIN(178, "ISH_I2C1_SDA"), | ||
| 476 | PINCTRL_PIN(179, "ISH_I2C1_SCL"), | ||
| 477 | PINCTRL_PIN(180, "GPP_H_23"), | ||
| 478 | /* GPP_I */ | ||
| 479 | PINCTRL_PIN(181, "DDSP_HDP_0"), | ||
| 480 | PINCTRL_PIN(182, "DDSP_HDP_1"), | ||
| 481 | PINCTRL_PIN(183, "DDSP_HDP_2"), | ||
| 482 | PINCTRL_PIN(184, "DDSP_HDP_3"), | ||
| 483 | PINCTRL_PIN(185, "EDP_HPD"), | ||
| 484 | PINCTRL_PIN(186, "DDPB_CTRLCLK"), | ||
| 485 | PINCTRL_PIN(187, "DDPB_CTRLDATA"), | ||
| 486 | PINCTRL_PIN(188, "DDPC_CTRLCLK"), | ||
| 487 | PINCTRL_PIN(189, "DDPC_CTRLDATA"), | ||
| 488 | PINCTRL_PIN(190, "DDPD_CTRLCLK"), | ||
| 489 | PINCTRL_PIN(191, "DDPD_CTRLDATA"), | ||
| 490 | }; | ||
| 491 | |||
| 492 | static const unsigned spth_spi0_pins[] = { 39, 40, 41, 42 }; | ||
| 493 | static const unsigned spth_spi1_pins[] = { 43, 44, 45, 46 }; | ||
| 494 | static const unsigned spth_uart0_pins[] = { 56, 57, 58, 59 }; | ||
| 495 | static const unsigned spth_uart1_pins[] = { 60, 61, 62, 63 }; | ||
| 496 | static const unsigned spth_uart2_pins[] = { 68, 69, 71, 71 }; | ||
| 497 | static const unsigned spth_i2c0_pins[] = { 64, 65 }; | ||
| 498 | static const unsigned spth_i2c1_pins[] = { 66, 67 }; | ||
| 499 | static const unsigned spth_i2c2_pins[] = { 76, 95 }; | ||
| 500 | |||
| 501 | static const struct intel_pingroup spth_groups[] = { | ||
| 502 | PIN_GROUP("spi0_grp", spth_spi0_pins, 1), | ||
| 503 | PIN_GROUP("spi1_grp", spth_spi1_pins, 1), | ||
| 504 | PIN_GROUP("uart0_grp", spth_uart0_pins, 1), | ||
| 505 | PIN_GROUP("uart1_grp", spth_uart1_pins, 1), | ||
| 506 | PIN_GROUP("uart2_grp", spth_uart2_pins, 1), | ||
| 507 | PIN_GROUP("i2c0_grp", spth_i2c0_pins, 1), | ||
| 508 | PIN_GROUP("i2c1_grp", spth_i2c1_pins, 1), | ||
| 509 | PIN_GROUP("i2c2_grp", spth_i2c2_pins, 2), | ||
| 510 | }; | ||
| 511 | |||
| 512 | static const char * const spth_spi0_groups[] = { "spi0_grp" }; | ||
| 513 | static const char * const spth_spi1_groups[] = { "spi0_grp" }; | ||
| 514 | static const char * const spth_uart0_groups[] = { "uart0_grp" }; | ||
| 515 | static const char * const spth_uart1_groups[] = { "uart1_grp" }; | ||
| 516 | static const char * const spth_uart2_groups[] = { "uart2_grp" }; | ||
| 517 | static const char * const spth_i2c0_groups[] = { "i2c0_grp" }; | ||
| 518 | static const char * const spth_i2c1_groups[] = { "i2c1_grp" }; | ||
| 519 | static const char * const spth_i2c2_groups[] = { "i2c2_grp" }; | ||
| 520 | |||
| 521 | static const struct intel_function spth_functions[] = { | ||
| 522 | FUNCTION("spi0", spth_spi0_groups), | ||
| 523 | FUNCTION("spi1", spth_spi1_groups), | ||
| 524 | FUNCTION("uart0", spth_uart0_groups), | ||
| 525 | FUNCTION("uart1", spth_uart1_groups), | ||
| 526 | FUNCTION("uart2", spth_uart2_groups), | ||
| 527 | FUNCTION("i2c0", spth_i2c0_groups), | ||
| 528 | FUNCTION("i2c1", spth_i2c1_groups), | ||
| 529 | FUNCTION("i2c2", spth_i2c2_groups), | ||
| 530 | }; | ||
| 531 | |||
| 532 | static const struct intel_community spth_communities[] = { | ||
| 533 | SPT_COMMUNITY(0, 0, 47), | ||
| 534 | SPT_COMMUNITY(1, 48, 180), | ||
| 535 | SPT_COMMUNITY(2, 181, 191), | ||
| 536 | }; | ||
| 537 | |||
| 538 | static const struct intel_pinctrl_soc_data spth_soc_data = { | ||
| 539 | .pins = spth_pins, | ||
| 540 | .npins = ARRAY_SIZE(spth_pins), | ||
| 541 | .groups = spth_groups, | ||
| 542 | .ngroups = ARRAY_SIZE(spth_groups), | ||
| 543 | .functions = spth_functions, | ||
| 544 | .nfunctions = ARRAY_SIZE(spth_functions), | ||
| 545 | .communities = spth_communities, | ||
| 546 | .ncommunities = ARRAY_SIZE(spth_communities), | ||
| 547 | }; | ||
| 548 | |||
| 287 | static const struct acpi_device_id spt_pinctrl_acpi_match[] = { | 549 | static const struct acpi_device_id spt_pinctrl_acpi_match[] = { |
| 288 | { "INT344B", (kernel_ulong_t)&sptlp_soc_data }, | 550 | { "INT344B", (kernel_ulong_t)&sptlp_soc_data }, |
| 551 | { "INT345D", (kernel_ulong_t)&spth_soc_data }, | ||
| 289 | { } | 552 | { } |
| 290 | }; | 553 | }; |
| 291 | MODULE_DEVICE_TABLE(acpi, spt_pinctrl_acpi_match); | 554 | MODULE_DEVICE_TABLE(acpi, spt_pinctrl_acpi_match); |
