| 123bcb3f | 16-Sep-2018 |
Andre Przywara <andre.przywara@arm.com> |
allwinner: Introduce names for SoC IDs
We will soon make more use of the Allwinner SoC ID, to differentiate the platform setup. Introduce definitions to avoid dealing with magic numbers and make the
allwinner: Introduce names for SoC IDs
We will soon make more use of the Allwinner SoC ID, to differentiate the platform setup. Introduce definitions to avoid dealing with magic numbers and make the code more readable.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| f78f00aa | 15-Oct-2018 |
Andre Przywara <andre.przywara@arm.com> |
allwinner: H6: Fix SRAM size
The SRAM in the Allwinner H6 SoC starts at 0x2000, with the last part ending at 0x117fff (although with gaps in between). So SUNXI_SRAM_SIZE should be 0xf8000, not 0x980
allwinner: H6: Fix SRAM size
The SRAM in the Allwinner H6 SoC starts at 0x2000, with the last part ending at 0x117fff (although with gaps in between). So SUNXI_SRAM_SIZE should be 0xf8000, not 0x98000.
Fix this to map the arisc exception vector area, which we will need shortly.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| 43060513 | 11-Oct-2018 |
Andre Przywara <andre.przywara@arm.com> |
allwinner: Disable USE_COHERENT_MEM
According to the documentation, platforms may choose to trade memory footprint for performance (and elegancy) by not providing a separately mapped coherent page.
allwinner: Disable USE_COHERENT_MEM
According to the documentation, platforms may choose to trade memory footprint for performance (and elegancy) by not providing a separately mapped coherent page.
Since a debug build is getting close to the SRAM size limit already, this allows us to save about 3.5KB of BSS and have some room for future enhancements.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| c3af6b00 | 20-Sep-2018 |
Andre Przywara <andre.przywara@arm.com> |
allwinner: Adjust memory mapping to fit into 256MB
At the moment we map as much of the DRAM into EL3 as possible, however we actually don't use it. The only exception is the secure DRAM for BL32 (if
allwinner: Adjust memory mapping to fit into 256MB
At the moment we map as much of the DRAM into EL3 as possible, however we actually don't use it. The only exception is the secure DRAM for BL32 (if that is configured).
To decrease the memory footprint of ATF, we save on some page tables by reducing the memory mapping to the actually required regions: SRAM, device MMIO, secure DRAM and U-Boot (to be used later). This introduces a non-identity mapping for the DRAM regions.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| a80490c5 | 27-Sep-2018 |
Andre Przywara <andre.przywara@arm.com> |
allwinner: Unify platform.mk files
For the two different platforms we support in the Allwinner port we mostly rely on header files covering the differences. This leads to the platform.mk files in th
allwinner: Unify platform.mk files
For the two different platforms we support in the Allwinner port we mostly rely on header files covering the differences. This leads to the platform.mk files in the respective directories to be almost identical.
To avoid further divergence and make sure that one platform doesn't break accidentally, let's create a shared allwinner-common.mk file and include that from the platform directory.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| e7d23bf4 | 24-Sep-2018 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
allwinner: Remove references to removed build flags
Change-Id: I206478597dd9855d3fe1577e7e2c0fe6d2af1cc5 Tested-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Antonio Nino Diaz <antonio.
allwinner: Remove references to removed build flags
Change-Id: I206478597dd9855d3fe1577e7e2c0fe6d2af1cc5 Tested-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| dfc0fb27 | 09-Sep-2018 |
Andre Przywara <andre.przywara@arm.com> |
drivers: i2c: mentor: move platform code into header files
At the moment we have two I2C stub drivers (for the Allwinner and the Marvell platform), which #include the actual .c driver file. Change t
drivers: i2c: mentor: move platform code into header files
At the moment we have two I2C stub drivers (for the Allwinner and the Marvell platform), which #include the actual .c driver file. Change this into the more usual design, by renaming and moving the stub drivers into platform specific header files and including these from the actual driver file. The platform specific include directories make sure the driver picks up the right header automatically.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| 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 ...
|
| 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 ...
|
| 7c26b6ec | 21-Jul-2018 |
Icenowy Zheng <icenowy@aosc.io> |
allwinner: call PMIC setup code
As the ATF may need to do some power initialization on Allwinner platform with AXP PMICs, call the PMIC setup code in BL31.
Stub of PMIC setup code is added, to prev
allwinner: call PMIC setup code
As the ATF may need to do some power initialization on Allwinner platform with AXP PMICs, call the PMIC setup code in BL31.
Stub of PMIC setup code is added, to prevent undefined reference.
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
show more ...
|
| 1083b2b3 | 20-Jul-2018 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
PSCI: Fix types of definitions
Also change header guards to fix defects of MISRA C-2012 Rule 21.1.
Change-Id: Ied0d4b0e557ef6119ab669d106d2ac5d99620c57 Acked-by: Sumit Garg <sumit.garg@linaro.org>
PSCI: Fix types of definitions
Also change header guards to fix defects of MISRA C-2012 Rule 21.1.
Change-Id: Ied0d4b0e557ef6119ab669d106d2ac5d99620c57 Acked-by: Sumit Garg <sumit.garg@linaro.org> Acked-by: Anson Huang <Anson.Huang@nxp.com> Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| bed42a5d | 08-Dec-2017 |
Andre Przywara <andre.przywara@arm.com> |
allwinner: Add Allwinner H6 SoC support
The H6 is Allwinner's most recent SoC. It shares most peripherals with the other ARMv8 Allwinner SoCs (A64/H5), but has a completely different memory map.
In
allwinner: Add Allwinner H6 SoC support
The H6 is Allwinner's most recent SoC. It shares most peripherals with the other ARMv8 Allwinner SoCs (A64/H5), but has a completely different memory map.
Introduce a separate platform target, which includes a different header file to cater for the address differences. Also add the new build target to the documentation.
The new ATF platform name is "sun50i_h6".
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| c4143b74 | 21-Jun-2018 |
Andre Przywara <andre.przywara@arm.com> |
allwinner: Detect and output current SoC
So far we already support booting on two different SoCs, and we will shortly add a third, so add some code to determine the current SoC type. This can be lat
allwinner: Detect and output current SoC
So far we already support booting on two different SoCs, and we will shortly add a third, so add some code to determine the current SoC type. This can be later used to runtime detect certain properties.
Also print the SoC name to the console, to give valuable debug information.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| ae903c56 | 21-Jun-2018 |
Andre Przywara <andre.przywara@arm.com> |
allwinner: Don't map boot ROM
There is nothing we need from the BootROM area, so we also don't need to map it in EL3.
Remove the mapping and reduce the number of MMAP regions by one.
Reported-by:
allwinner: Don't map boot ROM
There is nothing we need from the BootROM area, so we also don't need to map it in EL3.
Remove the mapping and reduce the number of MMAP regions by one.
Reported-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| c520be4b | 21-Jun-2018 |
Andre Przywara <andre.przywara@arm.com> |
allwinner: Relax PSCI entry point check
The DRAM controller supports up to 4GB of DRAM, and there are actually boards out there where we can use at least 3GB of this.
Relax the PSCI entry point che
allwinner: Relax PSCI entry point check
The DRAM controller supports up to 4GB of DRAM, and there are actually boards out there where we can use at least 3GB of this.
Relax the PSCI entry point check, to be not restricted to 2GB of DRAM.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| 88aa5c43 | 21-Jun-2018 |
Andre Przywara <andre.przywara@arm.com> |
allwinner: security: Fix SPC guard
The "#ifdef SUNXI_SPC_BASE" guard was meant to allow the build on SoCs without a Secure Peripherals Controller, so that we skip that part of the security setup. Bu
allwinner: security: Fix SPC guard
The "#ifdef SUNXI_SPC_BASE" guard was meant to allow the build on SoCs without a Secure Peripherals Controller, so that we skip that part of the security setup. But in the current position this will trigger a warning about an unused variable.
Simply move the guard one line up to cover the variable as well.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| 27f9616f | 22-Jun-2018 |
Andre Przywara <andre.przywara@arm.com> |
allwinner: cpu-ops: avoid PSCI on/off output
The "INFO" output in sunxi_cpu_ops.c is quite verbose, so make this more obvious by changing the log level to "VERBOSE" and so avoiding it to be printed
allwinner: cpu-ops: avoid PSCI on/off output
The "INFO" output in sunxi_cpu_ops.c is quite verbose, so make this more obvious by changing the log level to "VERBOSE" and so avoiding it to be printed in a normal (even debug) build.
Reported-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| 1f4b638a | 21-Jun-2018 |
Andre Przywara <andre.przywara@arm.com> |
allwinner: sun50i_a64: remove unneeded VER_REG offset
The relative VER_REG *offset* is the same across all known SoCs, so we can define this offset near it's user.
Remove it from the memory map.
R
allwinner: sun50i_a64: remove unneeded VER_REG offset
The relative VER_REG *offset* is the same across all known SoCs, so we can define this offset near it's user.
Remove it from the memory map.
Reported-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| 6daab88f | 21-Jun-2018 |
Andre Przywara <andre.przywara@arm.com> |
allwinner: common: add missing header
Some code in sunxi_common.c requires symbols defined in sunxi_private.h, so add the header to that file. It was included via another header before, but let's ma
allwinner: common: add missing header
Some code in sunxi_common.c requires symbols defined in sunxi_private.h, so add the header to that file. It was included via another header before, but let's make this explicit.
Reported-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| dab901f8 | 19-Jun-2018 |
Amit Singh Tomar <amittomer25@gmail.com> |
allwinner: Add BL32 (corresponds to Trusted OS) support
This patch is an attempt to run Trusted OS (OP-TEE OS being one of them) along side BL31 image.
ATF supports multiple SPD's that can take dis
allwinner: Add BL32 (corresponds to Trusted OS) support
This patch is an attempt to run Trusted OS (OP-TEE OS being one of them) along side BL31 image.
ATF supports multiple SPD's that can take dispatcher name (opteed for OP-TEE OS) as an input using the 'SPD=<dispatcher name>' option during bl31 build.
Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
show more ...
|
| acb8b3ca | 01-Jun-2018 |
Andre Przywara <andre.przywara@arm.com> |
allwinner: Add security setup
Some peripherals are TrustZone aware, so they need to be configured to be accessible from non-secure world, as we don't need any of them being exclusive to the secure w
allwinner: Add security setup
Some peripherals are TrustZone aware, so they need to be configured to be accessible from non-secure world, as we don't need any of them being exclusive to the secure world. This affects some clocks, DMA channels and the Secure Peripheral Controller (SPC). The latter controls access to most devices, but is not active unless booting with the secure boot fuse burnt.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| 560581ec | 12-Aug-2017 |
Samuel Holland <samuel@sholland.org> |
allwinner: Add platform PSCI functions required for SMP
The reset vector entry point is preserved across CPU resets, so it only needs to be set once at boot.
Hotplugged CPUs are not actually powere
allwinner: Add platform PSCI functions required for SMP
The reset vector entry point is preserved across CPU resets, so it only needs to be set once at boot.
Hotplugged CPUs are not actually powered down, but are put in a wfi with the GIC disconnected.
With this commit, Linux is able to enable, hotplug and use all four CPUs.
Signed-off-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| 333d66cf | 12-Aug-2017 |
Samuel Holland <samuel@sholland.org> |
allwinner: Add functions to control CPU power/reset
sun50i_cpu_on will be used by the PSCI implementation to initialize secondary cores for SMP. Unfortunately, sun50i_cpu_off is not usable by PSCI d
allwinner: Add functions to control CPU power/reset
sun50i_cpu_on will be used by the PSCI implementation to initialize secondary cores for SMP. Unfortunately, sun50i_cpu_off is not usable by PSCI directly, because it is not possible for a CPU to use this function to power itself down. Power cannot be shut off until the outputs are clamped, and MMIO does not work once the outputs are clamped.
But at least CPU0 can shutdown the other cores early in the BL31 boot process and before shutting down the system.
Signed-off-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|