mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 09:34:18 +00:00
![]() Most devices based on Allwinner SoCs come with a certain fixed combination of Power Management ICs (PMICs) and SoC, for instance the A64 with the AXP803, or the H6 with the AXP805. This allowed us to include the respective PMIC support code into each build target at build time. Similarly on H616 devices we initially saw only the AXP305, but for a while now the simpler (and cheaper) AXP313a is a popular companion to the H616 on many new boards. On at least one new device the AXP717 is used as well. With some rudimentary AXP version check in place we at least detected the case of an unsupported SoC, but threw an error message, and lost support for powering off the device. Refactor the existing PMIC code to be able to support more than one PMIC model, detected at runtime. For this we use a variable for the RSB runtime address instead of hardcoding the address used on the AXP305, and read the hardware bus address from the devicetree. Also we look up the used PMIC in the devicetree, and set the PMIC model accordingly. To be on the safe side, we also confirm the real PMIC used by checking its version register and comparing that with the expected value. Finally the register offset and value to power off the PMIC is moved direclty into the platform code, as those values differ between the different PMICs. This is just refactoring and better error report, we still only support the AXP305 on RSB at the moment. Change-Id: I00b26ce4d30bb570ee1cd4979d0cdc9d6c020729 Signed-off-by: Andre Przywara <andre.przywara@arm.com> |
||
---|---|---|
.. | ||
common | ||
sun50i_a64 | ||
sun50i_h6 | ||
sun50i_h616 | ||
sun50i_r329 |