The patch series also have been send pull request at git-hub: https://github.com/96boards/arm-trusted-firmware/pull/6 Also send to mailing list to get more feedback and review.
On hi6220, the mcu firmware image will be loaded so that later kernel can use cpufreq successfully. So below patches are trying to enable this feature.
During the debugging, found it's very fragile for the registers' order, so add memory barrier for mmio register accessing; this is fixed by patch 1;
The mcu image loading are mainly finished by patch 3/6; But the mcu will not work well until init the paramters within sram and enable some clocks before enable mcu, so other dvfs/hkadc related patches are trying to enable this part.
Leo Yan (11): Add memory barrier for mmio accessing hikey: re-work for register files hikey: add mcu image loading driver hikey: add hkadc driver support hikey: add header file for sram hikey: load mcu binary in BL2 Load BL30 after io storage has been initialized hikey: BL1: polish register definition hikey: add support for dvfs driver hikey: add building for adc/mcu/acpu drivers hikey: support dvfs in pll main flow
bl2/bl2_main.c | 6 +- include/lib/mmio.h | 22 +- plat/hikey/aarch64/hikey_common.c | 6 + plat/hikey/bl1_plat_setup.c | 10 +- plat/hikey/bl2_plat_setup.c | 40 ++ plat/hikey/drivers/hisi_adc.c | 218 +++++++++ plat/hikey/drivers/hisi_dvfs.c | 775 ++++++++++++++++++++++++++++++++ plat/hikey/drivers/hisi_mcu.c | 247 ++++++++++ plat/hikey/hikey_def.h | 3 + plat/hikey/include/hi6220.h | 308 +------------ plat/hikey/include/hi6220_regs_acpu.h | 321 +++++++++++++ plat/hikey/include/hi6220_regs_ao.h | 357 +++++++++++++++ plat/hikey/include/hi6220_regs_peri.h | 404 +++++++++++++++++ plat/hikey/include/hi6220_regs_pmctrl.h | 126 ++++++ plat/hikey/include/hi6553.h | 4 + plat/hikey/include/hisi_hkadc.h | 152 +++++++ plat/hikey/include/hisi_mcu.h | 41 ++ plat/hikey/include/hisi_sram_map.h | 307 +++++++++++++ plat/hikey/include/platform_def.h | 8 +- plat/hikey/plat_io_storage.c | 10 + plat/hikey/platform.mk | 3 + plat/hikey/pll.c | 15 +- plat/hikey/usb.c | 22 +- 23 files changed, 3079 insertions(+), 326 deletions(-) create mode 100644 plat/hikey/drivers/hisi_adc.c create mode 100644 plat/hikey/drivers/hisi_dvfs.c create mode 100644 plat/hikey/drivers/hisi_mcu.c create mode 100644 plat/hikey/include/hi6220_regs_acpu.h create mode 100644 plat/hikey/include/hi6220_regs_ao.h create mode 100644 plat/hikey/include/hi6220_regs_peri.h create mode 100644 plat/hikey/include/hi6220_regs_pmctrl.h create mode 100644 plat/hikey/include/hisi_hkadc.h create mode 100644 plat/hikey/include/hisi_mcu.h create mode 100644 plat/hikey/include/hisi_sram_map.h