| #
c1dd9e63 |
| 08-Feb-2023 |
Manish V Badarkhe <manish.badarkhe@arm.com> |
Merge changes I7bd311d7,Iea7dcfe3,I9d890934 into integration
* changes: refactor(allwinner): use fdt_node_is_enabled() in AXP driver fix(allwinner): check RSB availability in DT on H6 refactor
Merge changes I7bd311d7,Iea7dcfe3,I9d890934 into integration
* changes: refactor(allwinner): use fdt_node_is_enabled() in AXP driver fix(allwinner): check RSB availability in DT on H6 refactor(fdt): introduce common fdt_node_is_enabled()
show more ...
|
| #
658b3154 |
| 01-Feb-2023 |
Andre Przywara <andre.przywara@arm.com> |
fix(allwinner): check RSB availability in DT on H6
At the moment we access the RSB bus on all Allwinner H6 boards unconditionally, even though some boards do not have any PMIC at all, while others h
fix(allwinner): check RSB availability in DT on H6
At the moment we access the RSB bus on all Allwinner H6 boards unconditionally, even though some boards do not have any PMIC at all, while others have some I2C devices connected to the same pins. The latter case is just fragile, but the first case leads to a hang on at least one board, as reported by Jernej.
Scan the devicetree, to check for the availability of the RSB bus node. Proceed only if the RSB DT node is actually enabled.
Change-Id: Iea7dcfe3e085e173334d098ec4ddcb6c4b085771 Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reported-by: Jernej Skrabec <jernej.skrabec@gmail.com>
show more ...
|
| #
8078b5c5 |
| 30-Mar-2021 |
André Przywara <andre.przywara@arm.com> |
Merge changes from topic "allwinner_h616" into integration
* changes: allwinner: H616: Add reserved-memory node to DT allwinner: Add Allwinner H616 SoC support allwinner: Add H616 SoC ID all
Merge changes from topic "allwinner_h616" into integration
* changes: allwinner: H616: Add reserved-memory node to DT allwinner: Add Allwinner H616 SoC support allwinner: Add H616 SoC ID allwinner: Express memmap more dynamically allwinner: Move sunxi_cpu_power_off_self() into platforms allwinner: Move SEPARATE_NOBITS_REGION to platforms doc: allwinner: Reorder sections, document memory mapping
show more ...
|
| #
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 ...
|
| #
29912cb6 |
| 22-Dec-2020 |
André Przywara <andre.przywara@arm.com> |
Merge changes I0c5f32e8,Id49c124c,Idcfe933d into integration
* changes: allwinner: Use RSB for the PMIC connection on H6 allwinner: Return the PMIC to I2C mode after use allwinner: Always use
Merge changes I0c5f32e8,Id49c124c,Idcfe933d into integration
* changes: allwinner: Use RSB for the PMIC connection on H6 allwinner: Return the PMIC to I2C mode after use allwinner: Always use a 3MHz RSB bus clock
show more ...
|
| #
7060e0d8 |
| 14-Dec-2020 |
Samuel Holland <samuel@sholland.org> |
allwinner: Use RSB for the PMIC connection on H6
RSB is faster and more efficient, and it has a simpler driver. As long as the PMIC is returned to I2C mode after use, the rich OS can later use eithe
allwinner: Use RSB for the PMIC connection on H6
RSB is faster and more efficient, and it has a simpler driver. As long as the PMIC is returned to I2C mode after use, the rich OS can later use either bus.
Change-Id: I0c5f32e88a090c8c5cccb81bd24596b301ab9da7 Signed-off-by: Samuel Holland <samuel@sholland.org>
show more ...
|
| #
0d35873c |
| 17-Dec-2019 |
Soby Mathew <soby.mathew@arm.com> |
Merge changes from topic "allwinner_pmic" into integration
* changes: allwinner: h6: power: Switch to using the AXP driver drivers: allwinner: axp: Add AXP805 support
|
| #
2f3abc19 |
| 17-Dec-2019 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Merge changes from topic "allwinner_pmic" into integration
* changes: allwinner: Convert AXP803 regulator setup code into a driver allwinner: a64: power: Use fdt_for_each_subnode allwinner: a6
Merge changes from topic "allwinner_pmic" into integration
* changes: allwinner: Convert AXP803 regulator setup code into a driver allwinner: a64: power: Use fdt_for_each_subnode allwinner: a64: power: Remove obsolete register check allwinner: a64: power: Remove duplicate DT check allwinner: Build PMIC bus drivers only in BL31 allwinner: a64: power: Make sunxi_turn_off_soc static allwinner: Merge duplicate code in sunxi_power_down allwinner: Clean up PMIC-related error handling allwinner: Synchronize PMIC enumerations allwinner: Enable clock before resetting I2C/RSB
show more ...
|
| #
fb23b104 |
| 21-Oct-2019 |
Samuel Holland <samuel@sholland.org> |
allwinner: h6: power: Switch to using the AXP driver
Chip ID checking and poweroff work just like they did before. Regulators are now enabled just like on A64/H5.
This changes the signatures of the
allwinner: h6: power: Switch to using the AXP driver
Chip ID checking and poweroff work just like they did before. Regulators are now enabled just like on A64/H5.
This changes the signatures of the low-level register read/write functions to match the interface expected by the common driver.
Signed-off-by: Samuel Holland <samuel@sholland.org> Change-Id: I14d63d171a094fa1375904928270fa3e21761646
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 ...
|
| #
c0e109f2 |
| 20-Oct-2019 |
Samuel Holland <samuel@sholland.org> |
allwinner: Synchronize PMIC enumerations
Ensure that the default (zero) value represents the case where we take no action. Previously, if a PLAT=sun50i_a64 build was booted on an unknown SoC ID, it
allwinner: Synchronize PMIC enumerations
Ensure that the default (zero) value represents the case where we take no action. Previously, if a PLAT=sun50i_a64 build was booted on an unknown SoC ID, it would be treated as an H5 at shutdown.
This removes some duplicate code and fixes error propagation on H6.
Signed-off-by: Samuel Holland <samuel@sholland.org> Change-Id: I4e51d8a43a56eccb0d8088593cb9908e52e782bc
show more ...
|
| #
9a207532 |
| 04-Jan-2019 |
Antonio Niño Díaz <antonio.ninodiaz@arm.com> |
Merge pull request #1726 from antonio-nino-diaz-arm/an/includes
Sanitise includes across codebase
|
| #
09d40e0e |
| 14-Dec-2018 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
Sanitise includes across codebase
Enforce full include path for includes. Deprecate old paths.
The following folders inside include/lib have been left unchanged:
- include/lib/cpus/${ARCH} - inclu
Sanitise includes across codebase
Enforce full include path for includes. Deprecate old paths.
The following folders inside include/lib have been left unchanged:
- include/lib/cpus/${ARCH} - include/lib/el3_runtime/${ARCH}
The reason for this change is that having a global namespace for includes isn't a good idea. It defeats one of the advantages of having folders and it introduces problems that are sometimes subtle (because you may not know the header you are actually including if there are two of them).
For example, this patch had to be created because two headers were called the same way: e0ea0928d5b7 ("Fix gpio includes of mt8173 platform to avoid collision."). More recently, this patch has had similar problems: 46f9b2c3a282 ("drivers: add tzc380 support").
This problem was introduced in commit 4ecca33988b9 ("Move include and source files to logical locations"). At that time, there weren't too many headers so it wasn't a real issue. However, time has shown that this creates problems.
Platforms that want to preserve the way they include headers may add the removed paths to PLAT_INCLUDES, but this is discouraged.
Change-Id: I39dc53ed98f9e297a5966e723d1936d6ccf2fc8f Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| #
318c2f97 |
| 31-Oct-2018 |
Antonio Niño Díaz <antonio.ninodiaz@arm.com> |
Merge pull request #1646 from Andre-ARM/allwinner/pmic-v2
Allwinner/pmic v2
|
| #
df301601 |
| 08-Sep-2018 |
Andre Przywara <andre.przywara@arm.com> |
allwinner: Pass FDT address to sunxi_pmic_setup()
For Allwinner boards we now use some heuritistics to find a preloaded .dtb file.
Pass this address on to the PMIC setup routine, so that it can use
allwinner: Pass FDT address to sunxi_pmic_setup()
For Allwinner boards we now use some heuritistics to find a preloaded .dtb file.
Pass this address on to the PMIC setup routine, so that it can use the information contained therein to setup some initial power rails.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| #
d5ddf67a |
| 14-Oct-2018 |
Andre Przywara <andre.przywara@arm.com> |
allwinner: H6: Factor out I2C platform setup
In the H6 platform code there is a routine to do the platform initialisation of the R_I2C controller. We will need a very similar setup routine to initia
allwinner: H6: Factor out I2C platform setup
In the H6 platform code there is a routine to do the platform initialisation of the R_I2C controller. We will need a very similar setup routine to initialise the RSB controller on the A64.
Move this code to sunxi_common.c and generalise it to support all SoCs and also to cover the related RSB bus.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| #
4ec1a239 |
| 14-Oct-2018 |
Andre Przywara <andre.przywara@arm.com> |
allwinner: Export sunxi_private.h
So far we have a sunxi_private.h header file in the common code directory. This holds the prototypes of various functions we share in *common* code. However we will
allwinner: Export sunxi_private.h
So far we have a sunxi_private.h header file in the common code directory. This holds the prototypes of various functions we share in *common* code. However we will need some of those in the platform specific code parts as well, and want to introduce new functions shared across the whole platform port.
So move the sunxi_private.h file into the common/include directory, so that it becomes visible to all parts of the platform code. Fix up the existing #includes and add missing ones, also add the sunxi_read_soc_id() prototype here.
This will be used in follow up patches.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| #
fe57c7d4 |
| 08-Sep-2018 |
Andre Przywara <andre.przywara@arm.com> |
allwinner: Pass SoC ID to sunxi_pmic_setup()
In the BL31 platform setup we read the Allwinner SoC ID to identify the chip and print its name. In addition to that we will need to differentiate the po
allwinner: Pass SoC ID to sunxi_pmic_setup()
In the BL31 platform setup we read the Allwinner SoC ID to identify the chip and print its name. In addition to that we will need to differentiate the power setup between the SoCs, to pass on the SoC ID to the PMIC setup routine.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| #
62542419 |
| 19-Sep-2018 |
Soby Mathew <soby.mathew@arm.com> |
Merge pull request #1570 from Andre-ARM/allwinner/pmic-fixes
Allwinner PMIC fixes
|
| #
159c5249 |
| 08-Sep-2018 |
Andre Przywara <andre.przywara@arm.com> |
allwinner: sun50i_h6: initialise I2C just before powering down
Even though we initialise the platform part and the I2C controller itself at boot time, we actually only access the bus on power down.
allwinner: sun50i_h6: initialise I2C just before powering down
Even though we initialise the platform part and the I2C controller itself at boot time, we actually only access the bus on power down. Meanwhile a rich OS might have configured the I2C pins differently or even disabled the controller. So repeat the platform setup and controller initialisation just before we actually access the bus to power off the system. This is safe, because at this point the rich OS should no longer be running.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| #
1a910bce |
| 08-Sep-2018 |
Andre Przywara <andre.przywara@arm.com> |
allwinner: sun50i_h6: improve I2C setup
Drop the unnecessary check for the I2C pins being already configured as I2C pins (we actually don't care). Also avoid resetting *every* peripheral that is cov
allwinner: sun50i_h6: improve I2C setup
Drop the unnecessary check for the I2C pins being already configured as I2C pins (we actually don't care). Also avoid resetting *every* peripheral that is covered by the PRCM reset controller, instead just clear the one line connected to the I2C controller.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| #
e636812d |
| 10-Sep-2018 |
Soby Mathew <soby.mathew@arm.com> |
Merge pull request #1534 from Icenowy/sun50i_h6_pmic
Add support for Allwinner H6 + X-Powers AXP805 PMIC combination
|
| #
5069c1cf |
| 22-Jul-2018 |
Icenowy Zheng <icenowy@aosc.io> |
allwinner: implement system power down on H6 w/ AXP805
The AXP805 PMIC used with H6 is capable of shutting down the system.
Add support for using it to shut down the system power.
The original pla
allwinner: implement system power down on H6 w/ AXP805
The AXP805 PMIC used with H6 is capable of shutting down the system.
Add support for using it to shut down the system power.
The original placeholder power off code is moved to A64 code, as it's still TODO to implement PMIC operations for A64.
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
show more ...
|
| #
6d372828 |
| 22-Jul-2018 |
Icenowy Zheng <icenowy@aosc.io> |
allwinner: sun50i_h6: add initial AXP805 PMIC code
The OTT reference design of Allwinner H6 SoC uses an X-Powers AXP805 PMIC.
Add initial code for it.
Currently it's only detected.
Signed-off-by:
allwinner: sun50i_h6: add initial AXP805 PMIC code
The OTT reference design of Allwinner H6 SoC uses an X-Powers AXP805 PMIC.
Add initial code for it.
Currently it's only detected.
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
show more ...
|