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

Configure Feed

Select the types of activity you want to include in your feed.

pmdomain: mediatek: Add support for MT8196 HFRPSYS power domains

Add support for the HFRPSYS Multimedia power domains found in the
MediaTek MT8196 Chromebook SoC.
Those power domains are all managed by the Hardware Voter MCU.

Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

AngeloGioacchino Del Regno and committed by
Ulf Hansson
56b0d230 5437b281

+243
+239
drivers/pmdomain/mediatek/mt8196-pm-domains.h
··· 369 369 }, 370 370 }; 371 371 372 + static const struct scpsys_hwv_domain_data hfrpsys_hwv_domain_data_mt8196[] = { 373 + [MT8196_POWER_DOMAIN_VDE0] = { 374 + .name = "vde0", 375 + .set = 0x0218, 376 + .clr = 0x021C, 377 + .done = 0x141C, 378 + .en = 0x1410, 379 + .set_sta = 0x146C, 380 + .clr_sta = 0x1470, 381 + .setclr_bit = 7, 382 + }, 383 + [MT8196_POWER_DOMAIN_VDE1] = { 384 + .name = "vde1", 385 + .set = 0x0218, 386 + .clr = 0x021C, 387 + .done = 0x141C, 388 + .en = 0x1410, 389 + .set_sta = 0x146C, 390 + .clr_sta = 0x1470, 391 + .setclr_bit = 8, 392 + }, 393 + [MT8196_POWER_DOMAIN_VDE_VCORE0] = { 394 + .name = "vde-vcore0", 395 + .set = 0x0218, 396 + .clr = 0x021C, 397 + .done = 0x141C, 398 + .en = 0x1410, 399 + .set_sta = 0x146C, 400 + .clr_sta = 0x1470, 401 + .setclr_bit = 9, 402 + }, 403 + [MT8196_POWER_DOMAIN_VEN0] = { 404 + .name = "ven0", 405 + .set = 0x0218, 406 + .clr = 0x021C, 407 + .done = 0x141C, 408 + .en = 0x1410, 409 + .set_sta = 0x146C, 410 + .clr_sta = 0x1470, 411 + .setclr_bit = 10, 412 + }, 413 + [MT8196_POWER_DOMAIN_VEN1] = { 414 + .name = "ven1", 415 + .set = 0x0218, 416 + .clr = 0x021C, 417 + .done = 0x141C, 418 + .en = 0x1410, 419 + .set_sta = 0x146C, 420 + .clr_sta = 0x1470, 421 + .setclr_bit = 11, 422 + }, 423 + [MT8196_POWER_DOMAIN_VEN2] = { 424 + .name = "ven2", 425 + .set = 0x0218, 426 + .clr = 0x021C, 427 + .done = 0x141C, 428 + .en = 0x1410, 429 + .set_sta = 0x146C, 430 + .clr_sta = 0x1470, 431 + .setclr_bit = 12, 432 + }, 433 + [MT8196_POWER_DOMAIN_DISP_VCORE] = { 434 + .name = "disp-vcore", 435 + .set = 0x0218, 436 + .clr = 0x021C, 437 + .done = 0x141C, 438 + .en = 0x1410, 439 + .set_sta = 0x146C, 440 + .clr_sta = 0x1470, 441 + .setclr_bit = 24, 442 + }, 443 + [MT8196_POWER_DOMAIN_DIS0_DORMANT] = { 444 + .name = "dis0-dormant", 445 + .set = 0x0218, 446 + .clr = 0x021C, 447 + .done = 0x141C, 448 + .en = 0x1410, 449 + .set_sta = 0x146C, 450 + .clr_sta = 0x1470, 451 + .setclr_bit = 25, 452 + }, 453 + [MT8196_POWER_DOMAIN_DIS1_DORMANT] = { 454 + .name = "dis1-dormant", 455 + .set = 0x0218, 456 + .clr = 0x021C, 457 + .done = 0x141C, 458 + .en = 0x1410, 459 + .set_sta = 0x146C, 460 + .clr_sta = 0x1470, 461 + .setclr_bit = 26, 462 + }, 463 + [MT8196_POWER_DOMAIN_OVL0_DORMANT] = { 464 + .name = "ovl0-dormant", 465 + .set = 0x0218, 466 + .clr = 0x021C, 467 + .done = 0x141C, 468 + .en = 0x1410, 469 + .set_sta = 0x146C, 470 + .clr_sta = 0x1470, 471 + .setclr_bit = 27, 472 + }, 473 + [MT8196_POWER_DOMAIN_OVL1_DORMANT] = { 474 + .name = "ovl1-dormant", 475 + .set = 0x0218, 476 + .clr = 0x021C, 477 + .done = 0x141C, 478 + .en = 0x1410, 479 + .set_sta = 0x146C, 480 + .clr_sta = 0x1470, 481 + .setclr_bit = 28, 482 + }, 483 + [MT8196_POWER_DOMAIN_DISP_EDPTX_DORMANT] = { 484 + .name = "disp-edptx-dormant", 485 + .set = 0x0218, 486 + .clr = 0x021C, 487 + .done = 0x141C, 488 + .en = 0x1410, 489 + .set_sta = 0x146C, 490 + .clr_sta = 0x1470, 491 + .setclr_bit = 29, 492 + }, 493 + [MT8196_POWER_DOMAIN_DISP_DPTX_DORMANT] = { 494 + .name = "disp-dptx-dormant", 495 + .set = 0x0218, 496 + .clr = 0x021C, 497 + .done = 0x141C, 498 + .en = 0x1410, 499 + .set_sta = 0x146C, 500 + .clr_sta = 0x1470, 501 + .setclr_bit = 30, 502 + }, 503 + [MT8196_POWER_DOMAIN_MML0_SHUTDOWN] = { 504 + .name = "mml0-shutdown", 505 + .set = 0x0218, 506 + .clr = 0x021C, 507 + .done = 0x141C, 508 + .en = 0x1410, 509 + .set_sta = 0x146C, 510 + .clr_sta = 0x1470, 511 + .setclr_bit = 31, 512 + }, 513 + [MT8196_POWER_DOMAIN_MML1_SHUTDOWN] = { 514 + .name = "mml1-shutdown", 515 + .set = 0x0220, 516 + .clr = 0x0224, 517 + .done = 0x142C, 518 + .en = 0x1420, 519 + .set_sta = 0x1474, 520 + .clr_sta = 0x1478, 521 + .setclr_bit = 0, 522 + }, 523 + [MT8196_POWER_DOMAIN_MM_INFRA0] = { 524 + .name = "mm-infra0", 525 + .set = 0x0220, 526 + .clr = 0x0224, 527 + .done = 0x142C, 528 + .en = 0x1420, 529 + .set_sta = 0x1474, 530 + .clr_sta = 0x1478, 531 + .setclr_bit = 1, 532 + }, 533 + [MT8196_POWER_DOMAIN_MM_INFRA1] = { 534 + .name = "mm-infra1", 535 + .set = 0x0220, 536 + .clr = 0x0224, 537 + .done = 0x142C, 538 + .en = 0x1420, 539 + .set_sta = 0x1474, 540 + .clr_sta = 0x1478, 541 + .setclr_bit = 2, 542 + }, 543 + [MT8196_POWER_DOMAIN_MM_INFRA_AO] = { 544 + .name = "mm-infra-ao", 545 + .set = 0x0220, 546 + .clr = 0x0224, 547 + .done = 0x142C, 548 + .en = 0x1420, 549 + .set_sta = 0x1474, 550 + .clr_sta = 0x1478, 551 + .setclr_bit = 3, 552 + }, 553 + [MT8196_POWER_DOMAIN_CSI_BS_RX] = { 554 + .name = "csi-bs-rx", 555 + .set = 0x0220, 556 + .clr = 0x0224, 557 + .done = 0x142C, 558 + .en = 0x1420, 559 + .set_sta = 0x1474, 560 + .clr_sta = 0x1478, 561 + .setclr_bit = 5, 562 + }, 563 + [MT8196_POWER_DOMAIN_CSI_LS_RX] = { 564 + .name = "csi-ls-rx", 565 + .set = 0x0220, 566 + .clr = 0x0224, 567 + .done = 0x142C, 568 + .en = 0x1420, 569 + .set_sta = 0x1474, 570 + .clr_sta = 0x1478, 571 + .setclr_bit = 6, 572 + }, 573 + [MT8196_POWER_DOMAIN_DSI_PHY0] = { 574 + .name = "dsi-phy0", 575 + .set = 0x0220, 576 + .clr = 0x0224, 577 + .done = 0x142C, 578 + .en = 0x1420, 579 + .set_sta = 0x1474, 580 + .clr_sta = 0x1478, 581 + .setclr_bit = 7, 582 + }, 583 + [MT8196_POWER_DOMAIN_DSI_PHY1] = { 584 + .name = "dsi-phy1", 585 + .set = 0x0220, 586 + .clr = 0x0224, 587 + .done = 0x142C, 588 + .en = 0x1420, 589 + .set_sta = 0x1474, 590 + .clr_sta = 0x1478, 591 + .setclr_bit = 8, 592 + }, 593 + [MT8196_POWER_DOMAIN_DSI_PHY2] = { 594 + .name = "dsi-phy2", 595 + .set = 0x0220, 596 + .clr = 0x0224, 597 + .done = 0x142C, 598 + .en = 0x1420, 599 + .set_sta = 0x1474, 600 + .clr_sta = 0x1478, 601 + .setclr_bit = 9, 602 + }, 603 + }; 604 + 372 605 static const struct scpsys_soc_data mt8196_scpsys_data = { 373 606 .domains_data = scpsys_domain_data_mt8196, 374 607 .num_domains = ARRAY_SIZE(scpsys_domain_data_mt8196), ··· 613 380 static const struct scpsys_soc_data mt8196_scpsys_hwv_data = { 614 381 .hwv_domains_data = scpsys_hwv_domain_data_mt8196, 615 382 .num_hwv_domains = ARRAY_SIZE(scpsys_hwv_domain_data_mt8196), 383 + .type = SCPSYS_MTCMOS_TYPE_HW_VOTER, 384 + }; 385 + 386 + static const struct scpsys_soc_data mt8196_hfrpsys_hwv_data = { 387 + .hwv_domains_data = hfrpsys_hwv_domain_data_mt8196, 388 + .num_hwv_domains = ARRAY_SIZE(hfrpsys_hwv_domain_data_mt8196), 616 389 .type = SCPSYS_MTCMOS_TYPE_HW_VOTER, 617 390 }; 618 391
+4
drivers/pmdomain/mediatek/mtk-pm-domains.c
··· 1159 1159 .data = &mt8196_scpsys_data, 1160 1160 }, 1161 1161 { 1162 + .compatible = "mediatek,mt8196-hwv-hfrp-power-controller", 1163 + .data = &mt8196_hfrpsys_hwv_data, 1164 + }, 1165 + { 1162 1166 .compatible = "mediatek,mt8196-hwv-scp-power-controller", 1163 1167 .data = &mt8196_scpsys_hwv_data, 1164 1168 },