Commit Graph

22 Commits

Author SHA1 Message Date
Rex-BC Chen e46e9df0d0 feat(mt8186): add DFD control in SiP service
DFD (Design for Debug) is a debugging tool, which scans flip-flops and
dumps to internal RAM on the WDT reset. After system reboots, those
values could be showed for debugging.

BUG=b:222217317
TEST=build pass

Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Change-Id: I659ea1e0789cf135a71a13b752edaa35123e0941
2022-03-11 17:47:05 +08:00
jason-ch chen 9457cec8c0 feat(mt8186): disable 26MHz clock while suspending
Change resource_req to 0 to disable 26MHz clock.
SPM firmware will pull-down SRCLKENA0 after 26MHz off while suspending.

TEST=verify 26MHz clock off using the oscilloscope.
BUG=b:215639203

Signed-off-by: Jason-ch Chen <jason-ch.chen@mediatek.com>
Change-Id: I05702d14a015cabccd6d4af0e3f2a534fbe4dd12
2022-02-24 15:56:50 +08:00
jason-ch chen 635e6b108e feat(mt8186): add Vcore DVFS driver
Add Vcore DVFS to SPM driver.

TEST=build pass
BUG=b:202871018

Signed-off-by: Jason-ch Chen <jason-ch.chen@mediatek.com>
Change-Id: I52b241b2cdb792be74390cbaa09a728ddbe6593a
2022-01-13 10:11:39 +08:00
jason-ch chen 7ac6a76c47 feat(mt8186): add SPM suspend driver
Add SPM suspend driver for suspend/resume features.

TEST=build pass
BUG=b:202871018

Signed-off-by: Jason-ch Chen <jason-ch.chen@mediatek.com>
Change-Id: I25b4b97cd3138a7b347385539e47ccfa884d64fc
2022-01-13 10:10:56 +08:00
Rex-BC Chen bc714bafe7 fix(mt8186): remove unused files in drivers/mcdi
We don't use mbox drivers which are implemented in these files for
mcdi, so remove related files from mcdi folder.

TEST=build pass
BUG=b:202871018

Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Change-Id: Idea5ebe5b25f91066ebd653cdcdafe65ca292b0f
2021-12-30 17:21:33 +08:00
Rex-BC Chen 24dd5a7b71 feat(plat/mediatek/mt8186): add reboot function for PSCI
Add system_reset function in PSCI operations.

TEST=build pass
BUG=b:202871018

Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Change-Id: I41001484f6244bd6ae7dedcfb6ce71cd6c035a1e
2021-12-22 18:06:53 +08:00
Rex-BC Chen a68346a772 feat(plat/mdeiatek/mt8186): add power-off function for PSCI
Add support for system-off.

TEST=build pass
BUG=b:202871018

Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Change-Id: Ic734696aab1b71ae85bca6ed08e544a522ce5c95
2021-12-22 18:06:53 +08:00
Rex-BC Chen 572f8adbb0 feat(plat/mediatek/mt8186): apply erratas for MT8186
MT8186 uses Cortex A76 CPU, so we apply these erratas.

TEST=build pass
BUG=b:202871018

Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Change-Id: I84741535fbe429f664092f624c2da653532204cd
2021-12-22 18:06:53 +08:00
Garmin.Chang 06cb65ef07 feat(plat/mediatek/mt8186): add MCDI drivers
Add MCDI related drivers to handle CPU powered on/off in CPU suspend.

TEST=build pass
BUG=b:202871018

Change-Id: I85aaaf3a0e992a39d17c58f3d9d5ff1b5770f748
Signed-off-by: Garmin.Chang <Garmin.Chang@mediatek.com>
2021-12-22 18:06:53 +08:00
Garmin.Chang 1da57e54b2 feat(plat/mediatek/mt8186): add CPU hotplug
Implement PSCI platform operations to support CPU hotplug and MCDI.

TEST=bringup 8 CPUs successfully on kernel stage.
BUG=b:202871018

Change-Id: Ibd5423b70b3ca3f91edaa48d7ca5bc094e751510
Signed-off-by: Garmin.Chang <Garmin.Chang@mediatek.com>
2021-12-22 18:06:53 +08:00
Yuchen Huang 6e5d76bac8 feat(plat/mediatek/mt8186): add RTC drivers
Add RTC drivers for EOSC calibration.

TEST=build pass
BUG=b:202871018

Signed-off-by: Yuchen Huang <yuchen.huang@mediatek.corp-partner.google.com>
Change-Id: Ib48c07204c4a614072ba710c042794b59e8a902a
2021-12-22 18:06:53 +08:00
Rex-BC Chen 0fe7ae9c64 fix(plat/mediatek/mt8186): extend MMU region size
In mt8186 suspend/resume flow, ATF has to communicate with a subsys by
read/write the subsys registers. However, the register region of subsys
doesn't include in the MMU mapping region. It triggers MMU faults.

This patch extends the MMU region 0 size to cover all mt8186 HW modules.
This patch also remove MMU region 1 because region 0 covers region 1.

TEST=build pass
BUG=b:202871018

Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Change-Id: I520c51338578bd68756cd02603ce6783f93daf51
2021-12-22 18:06:53 +08:00
Edward-JW Yang 95ea87ffc2 feat(plat/mediatek/mt8186): add DCM driver
DCM means dynamic clock management, and it can dynamically
slow down or gate clocks during CPU or bus idle.

1. Add MCUSYS related DCM drivers.
2. Enable MCUSYS related DCM by default.

TEST=build pass
BUG=b:202871018

Signed-off-by: Edward-JW Yang <edward-jw.yang@mediatek.corp-partner.google.com>
Change-Id: Idc669364c89cde0974d2940bd12987ee833d1965
2021-12-22 18:06:53 +08:00
Guodong Liu af5a0c40af feat(plat/mediatek/mt8186): add pinctrl support
Add MT8186 pinctrl support.

TEST=build pass
BUG=b:202871018

Signed-off-by: Guodong Liu <guodong.liu@mediatek.corp-partner.google.com>
Change-Id: I5b9c1c60a91c74c7d3f45c78a9403544373fa90f
2021-12-22 18:06:53 +08:00
Zhengnan Chen 109b91e38c feat(plat/mediatek/mt8186): add sys_cirq support
Add 8186 sys_cirq info.

TEST=build pass
BUG=b:202871018

Signed-off-by: Zhengnan Chen <zhengnan.chen@mediatek.corp-partner.google.com>
Change-Id: Ib8a1c4e995288bf5f7981ea65f27727715fe5787
2021-12-22 18:06:53 +08:00
Christine Zhu 206f125cc1 feat(plat/mediatek/mt8186): initialize GIC
Initialize GIC for mt8186.

TEST=build pass
BUG=b:202871018

Signed-off-by: Christine Zhu <christine.zhu@mediatek.corp-partner.google.com>
Change-Id: I8d029983c7ce48fa116fafa7fa78c65349308014
2021-12-22 18:06:53 +08:00
Rex-BC Chen 5aab27dc42 feat(plat/mediatek/mt8186): add SiP service
Add the basic SiP service.

TEST=build pass
BUG=b:202871018

Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Change-Id: I4dcc7383237bb6c1f2494920cde21197754f6367
2021-12-22 18:06:53 +08:00
James Lo 5bc88ec61c feat(plat/mediatek/mt8186): add pwrap and pmic driver
1. Add 8186 pwrap driver to access pmic.
2. Add 6366 pmic driver to support clean PWRHOLD.

TEST=build pass
BUG=b:202871018

Signed-off-by: James Lo <james.lo@mediatek.corp-partner.google.com>
Change-Id: I3bc90460a6a55dff8d3293e04482abcad789bbb2
2021-12-22 18:06:53 +08:00
Rex-BC Chen d73e15e66a feat(plat/mediatek/mt8186): initialize delay_timer
Initialize delay_timer for delay functions.

TEST=build pass
BUG=b:202871018

Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Change-Id: Ib8f52d1c674537795cc478015c83cca0f872df60
2021-12-22 18:06:53 +08:00
Rex-BC Chen a6a0af57c3 feat(plat/mediatek/mt8186): initialize systimer
Add systimer to support timer function.

TEST=build pass
BUG=b:202871018

Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Change-Id: I505f7d094410d178e4203e3a9294b851a30ba150
2021-12-22 18:06:53 +08:00
Penny Jan 1b17e34c5d feat(plat/mediatek/mt8186): add EMI MPU basic driver
EMI MPU stands for external memory interface memory protect unit.
MT8186 supports 32 regions and 16 domains.
We add basic driver currently, and will add more settings for
EMI MPU in next patch.

TEST=build pass
BUG=b:202871018

Signed-off-by: Penny Jan <penny.jan@mediatek.corp-partner.google.com>
Change-Id: Ia9e5030164e40e060a05e8f91d2ac88258c2e98e
2021-12-22 18:06:48 +08:00
Rex-BC Chen 27132f13ca feat(mt8186): initialize platform for MediaTek MT8186
- Add basic platform setup.
- Add MT8186 documentation at docs/plat/.
- Add generic CPU helper functions.
- Add basic register address.

TEST=build pass
BUG=b:202871018

Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Change-Id: Id3e2f46a8c3ab2f3e29137e508d4c671e8f4aad5
2021-12-01 16:36:28 +01:00