Commit graph

12 commits

Author SHA1 Message Date
Karl Li
5e5c57d52b feat(mt8196): add APU kernel control operations
Add APU kernel control operations to provide the bootup init functions.

1. Add software workaround for certain operations on mt8196.
2. Add APU logger operations.
3. Add function to clear mbox spare register, which is used in APU
   booting process.
4. Add function to setup CE binary to make sure the CE binary version
   is align with the APU firmware.

Change-Id: Ic99adba1409c020c72179ea135e0d4291fc3f384
Signed-off-by: Karl Li <karl.li@mediatek.com>
2024-12-19 09:56:04 +08:00
Karl Li
3ee4b2def6 feat(mt8196): add APU power on/off functions
1. Add APU power on/off functions
2. Refine the APU power on/off interface for mt8188
3. Add dcm setup function to support mt8196

Change-Id: Ie1caca40f89de71caac037fabe7e7455ff2a1872
Signed-off-by: Karl Li <karl.li@mediatek.com>
2024-12-19 09:56:04 +08:00
Karl Li
e534d4f633 feat(mt8196): add APUMMU setting
APUMMU is the MMU in APU, which is responsible for inner address
mapping. The APU kernel driver will setup the APUMMU by SMC call.

Change-Id: Iad7532883e42c288aeb0d23ab419f4dc6d8630f2
Signed-off-by: Karl Li <karl.li@mediatek.com>
2024-12-19 09:56:04 +08:00
Chungying Lu
baa0d45ced feat(mediatek): add APU watchdog timeout control
Add APU watchdog timeout control.

Change-Id: I21d65a88d20b6b2752a75f74487b5fe6596ebdf7
Signed-off-by: Chungying Lu <chungying.lu@mediatek.com>
Signed-off-by: Karl Li <karl.li@mediatek.com>
2023-06-06 13:45:40 +08:00
Chungying Lu
176846a50b feat(mt8188): add emi mpu protection for APU secure memory
Add emi mpu protection of APU secure memory.

Change-Id: I949cfce97565d8a313caae4ea41af60a171042a6
Signed-off-by: Chungying Lu <chungying.lu@mediatek.com>
Signed-off-by: Karl Li <karl.li@mediatek.com>
2023-06-06 13:45:40 +08:00
Karl Li
5986ae57aa feat(mt8188): add devapc setting of apusys rcx
Apusys rcx is a subsys in apusys, and it is a basic domain of APU and
it connects several components in APU.
The devapc control of apusys rcx is also inside APU and it can only be
set when APU is powered on.
Then apusys kernel driver will trigger rcx devapc init by ATF smc call.

Change-Id: If4249f22a08690b1e4f5aa5f0cbfb54ccacf90e1
Signed-off-by: Karl Li <karl.li@mediatek.com>
Signed-off-by: Chungying Lu <chungying.lu@mediatek.com>
2023-06-06 13:45:40 +08:00
Chungying Lu
94a9e6243e feat(mediatek): add APU bootup control smc call
Add APU bootup control smc call.
The steps of bootup flow:
  1. set up APU config.
  2. reset APU.
  3. set up APU boot config.
  4. boot APU.

Change-Id: I9e930070a64c7c4dcaa3a8b3d28b897823e9f53c
Signed-off-by: Chungying Lu <chungying.lu@mediatek.com>
Signed-off-by: Karl Li <karl.li@mediatek.com>
2023-06-06 13:45:40 +08:00
Karl Li
ad7673adef feat(mt8188): enable apusys mailbox mpu protect
Enable apusys mailbox mpu protect.

Change-Id: Idbf67084037b7ecf4926f57a901075f98540ee57
Signed-off-by: Karl Li <karl.li@mediatek.com>
Signed-off-by: Chungying Lu <chungying.lu@mediatek.com>
2023-06-06 13:45:40 +08:00
Karl Li
b5900c92a1 feat(mt8188): enable apusys domain remap
Enable apusys domain remap to protect no-protect memory.
  - Remap request which from domain 5 to domain 14.
  - Remap request which from domain 7 to domain 14.

Change-Id: Iccd188e3b8edbe916fa9767c841a844b66c6011f
Signed-off-by: Karl Li <karl.li@mediatek.com>
Signed-off-by: Chungying Lu <chungying.lu@mediatek.com>
2023-06-06 13:45:40 +08:00
Karl Li
777e3b71bb feat(mt8188): add apusys ao devapc setting
Apusys ao devapc is a set of control registers inside APU, and it
controls the access permission of APU ao domain.
Moreover, apusys ao devapc must be set after apusys power init, so
we need to place the drivers in TF-A instead of coreboot.

Change-Id: Ife849c32d4dd9dca15432d4b8a51753fde61b148
Signed-off-by: Karl Li <karl.li@mediatek.com>
Signed-off-by: Chungying Lu <chungying.lu@mediatek.com>
2023-06-06 13:45:40 +08:00
Chungying Lu
8e38b92849 feat(mt8188): add apu power on/off control
Add mt8188 apu power on/off control

Change-Id: I8e28bf7a4ad4067553981c67c4c2225fdd802859
Signed-off-by: Chungying Lu <chungying.lu@mediatek.com>
Signed-off-by: jason-ch chen <Jason-ch.Chen@mediatek.com>
2023-04-06 13:42:55 +08:00
Chungying Lu
5243091633 feat(mediatek): add APU init flow
The patch brings preparation steps before powering on APU
(AI processing unit)

Change-Id: Ica01e035153ec6f3af0de6ba2c66b17a064f8c89
Signed-off-by: Chungying Lu <chungying.lu@mediatek.com>
2023-03-29 16:25:17 +08:00