| 9227719d | 14-Feb-2021 |
Andre Przywara <andre.przywara@arm.com> |
allwinner: Move sunxi_cpu_power_off_self() into platforms
The code to power the current core off when SCPI is not available is now different for the two supported SoC families. To make adding new pl
allwinner: Move sunxi_cpu_power_off_self() into platforms
The code to power the current core off when SCPI is not available is now different for the two supported SoC families. To make adding new platforms easier, move sunxi_cpu_power_off_self() into the SoC directory, so we don't need to carry definitions for both methods for all SoCs.
On the H6 we just need to trigger the CPUIDLE hardware, so can get rid of all the code to program the ARISC, which is now only needed for the A64 version.
Change-Id: Id2a1ac7dcb375e2fd021b441575ce86b4d7edf2c Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| eb15bdaa | 15-Feb-2021 |
Andre Przywara <andre.przywara@arm.com> |
allwinner: Move SEPARATE_NOBITS_REGION to platforms
For the existing SoCs we support, we use SEPARATE_NOBITS_REGION, to move some parts of the data into separate memory regions (to save on the SRAM
allwinner: Move SEPARATE_NOBITS_REGION to platforms
For the existing SoCs we support, we use SEPARATE_NOBITS_REGION, to move some parts of the data into separate memory regions (to save on the SRAM A2 we are loaded into). For the upcoming H616 platform this is of no concern (we run in DRAM), so make this flag a platform choice instead.
Change-Id: Ic01d49578c6274660f8f112bd23680d3eca3be7a Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| 44702983 | 14-Dec-2020 |
Samuel Holland <samuel@sholland.org> |
allwinner: Return the PMIC to I2C mode after use
This gives the rich OS the flexibility to choose between I2C and RSB communication. Since a runtime address can only be assigned once after entering
allwinner: Return the PMIC to I2C mode after use
This gives the rich OS the flexibility to choose between I2C and RSB communication. Since a runtime address can only be assigned once after entering RSB mode, it also lets the rich OS choose any runtime address.
Signed-off-by: Samuel Holland <samuel@sholland.org> Change-Id: Id49c124c5e925985fc31c0ba38c7fb6c941aafa8
show more ...
|
| 49d98cd5 | 14-Dec-2020 |
Samuel Holland <samuel@sholland.org> |
allwinner: Add SPC security setup for H6
The H6 has a "secure port controller" similar to the A64/H5, but with more ports and a different register layout. Split the platform-specific parts out into
allwinner: Add SPC security setup for H6
The H6 has a "secure port controller" similar to the A64/H5, but with more ports and a different register layout. Split the platform-specific parts out into a header, and add the missing MMIO base address.
Signed-off-by: Samuel Holland <samuel@sholland.org> Change-Id: I3703868bc595459ecf9568b9d1605cb1be014bf5
show more ...
|
| 0bc752c9 | 21-Oct-2019 |
Samuel Holland <samuel@sholland.org> |
allwinner: Convert AXP803 regulator setup code into a driver
Previously, the A64/H5 and H6 platforms' PMIC setup code was entirely independent. However, some H6 boards also need early regulator setu
allwinner: Convert AXP803 regulator setup code into a driver
Previously, the A64/H5 and H6 platforms' PMIC setup code was entirely independent. However, some H6 boards also need early regulator setup.
Most of the register interface and all of the device tree traversal code can be reused between the AXP803 and AXP805. The main difference is the hardware bus interface, so that part is left to the platforms. The remainder is moved into a driver.
I factored out the bits that were obviously specific to the AXP803; additional changes for compatibility with other PMICs can be made as needed.
The only functional change is that rsb_init() now checks the PMIC's chip ID register against the expected value. This was already being done in the H6 version of the code.
Signed-off-by: Samuel Holland <samuel@sholland.org> Change-Id: Icdcf9edd6565f78cccc503922405129ac27e08a2
show more ...
|
| 79b85465 | 21-Oct-2019 |
Samuel Holland <samuel@sholland.org> |
allwinner: a64: power: Use fdt_for_each_subnode
This simplifies the code a bit. Verified to produce the same binary.
Signed-off-by: Samuel Holland <samuel@sholland.org> Change-Id: Ie1ec1ce2ea39c465
allwinner: a64: power: Use fdt_for_each_subnode
This simplifies the code a bit. Verified to produce the same binary.
Signed-off-by: Samuel Holland <samuel@sholland.org> Change-Id: Ie1ec1ce2ea39c46525840906826c90a8a7eff287
show more ...
|
| 494c8233 | 21-Oct-2019 |
Samuel Holland <samuel@sholland.org> |
allwinner: a64: power: Remove obsolete register check
As of a561e41bf1d2 ("allwinner: power: add enable switches for DCDC1/5") there are no longer regulators without an enable register provided. Sin
allwinner: a64: power: Remove obsolete register check
As of a561e41bf1d2 ("allwinner: power: add enable switches for DCDC1/5") there are no longer regulators without an enable register provided. Since it seems reasonable that this will continue to be the case, drop the check.
Signed-off-by: Samuel Holland <samuel@sholland.org> Change-Id: Icd7ec26fc6450d053e6e6d855fc16229b1d65a39
show more ...
|
| 3bea03e7 | 21-Oct-2019 |
Samuel Holland <samuel@sholland.org> |
allwinner: a64: power: Remove duplicate DT check
should_enable_regulator() is already checked in the regulators subnode loop before setup_regulator() is called, so there's no need to check it again
allwinner: a64: power: Remove duplicate DT check
should_enable_regulator() is already checked in the regulators subnode loop before setup_regulator() is called, so there's no need to check it again here.
Signed-off-by: Samuel Holland <samuel@sholland.org> Change-Id: Idb8b8a6e435246f4fb226bc84813449d80a0a977
show more ...
|
| 18fbfefb | 21-Oct-2019 |
Samuel Holland <samuel@sholland.org> |
allwinner: Build PMIC bus drivers only in BL31
These are used by the PMIC setup code, which runs during BL31 initialization, and the PSCI shutdown code, also a part of BL31. They can't be needed bef
allwinner: Build PMIC bus drivers only in BL31
These are used by the PMIC setup code, which runs during BL31 initialization, and the PSCI shutdown code, also a part of BL31. They can't be needed before BL31, or it wouldn't be possible to boot. Allwinner platforms don't generally build anything but BL31 anyway, but this change improves clarity and consistency with allwinner-common.mk.
Signed-off-by: Samuel Holland <samuel@sholland.org> Change-Id: I24f1d9ca8b4256e44badf5218d04d8690082babf
show more ...
|
| df77a954 | 21-Oct-2019 |
Samuel Holland <samuel@sholland.org> |
allwinner: a64: power: Make sunxi_turn_off_soc static
The function is only used in this file, and it doesn't make sense for it to be used anywhere else.
Signed-off-by: Samuel Holland <samuel@sholla
allwinner: a64: power: Make sunxi_turn_off_soc static
The function is only used in this file, and it doesn't make sense for it to be used anywhere else.
Signed-off-by: Samuel Holland <samuel@sholland.org> Change-Id: Iab18f082911edcdbc37ceeaff8c512be68e0cb0f
show more ...
|
| 818e6732 | 20-Oct-2019 |
Samuel Holland <samuel@sholland.org> |
allwinner: Merge duplicate code in sunxi_power_down
The action of last resort isn't going to change between SoCs. This moves that code back to the PSCI implementation, where it more obviously matche
allwinner: Merge duplicate code in sunxi_power_down
The action of last resort isn't going to change between SoCs. This moves that code back to the PSCI implementation, where it more obviously matches the code in sunxi_system_reset().
The two error messages say essentially the same thing anyway.
Signed-off-by: Samuel Holland <samuel@sholland.org> Change-Id: I62ac35fdb5ed78a016e9b18281416f1dcea38a4a
show more ...
|
| 4538c498 | 20-Oct-2019 |
Samuel Holland <samuel@sholland.org> |
allwinner: Clean up PMIC-related error handling
- Check the return value from sunxi_init_platform_r_twi(). - Print the PMIC banner before doing anything that might fail. - Remove double prefixes in
allwinner: Clean up PMIC-related error handling
- Check the return value from sunxi_init_platform_r_twi(). - Print the PMIC banner before doing anything that might fail. - Remove double prefixes in error messages. - Consistently omit the trailing period. - No need to print the unknown SoC's ID, since we already did that earlier in bl31_platform_setup(). - On the other hand, do print the ID of the unknown PMIC. - Try to keep the messages concise, as the large string size in these files was causing the firmware to spill into the next page. - Downgrade the banner from NOTICE to INFO. It's purely informational, and people should be using debug builds on untested hardware anyway.
Signed-off-by: Samuel Holland <samuel@sholland.org> Change-Id: Ib909408a5fdaebe05470fbce48d245dd0bf040eb
show more ...
|