History log of /rk3399_ARM-atf/plat/allwinner/sun50i_a64/sunxi_power.c (Results 1 – 25 of 40)
Revision Date Author Comments
# 81e63f25 26-Jul-2021 André Przywara <andre.przywara@arm.com>

Merge changes from topic "allwinner_mmap" into integration

* changes:
refactor(plat/allwinner): clean up platform definitions
refactor(plat/allwinner): do not map BL32 DRAM at EL3
refactor(pla

Merge changes from topic "allwinner_mmap" into integration

* changes:
refactor(plat/allwinner): clean up platform definitions
refactor(plat/allwinner): do not map BL32 DRAM at EL3
refactor(plat/allwinner): map SRAM as device memory by default
refactor(plat/allwinner): rename static mmap region constant
feat(bl_common): import BL_NOBITS_{BASE,END} when defined

show more ...


# ab74206b 14-Dec-2020 Samuel Holland <samuel@sholland.org>

refactor(plat/allwinner): map SRAM as device memory by default

The SRAM on Allwinner platforms is shared between BL31 and coprocessor
firmware. Previously, SRAM was mapped as normal memory by defaul

refactor(plat/allwinner): map SRAM as device memory by default

The SRAM on Allwinner platforms is shared between BL31 and coprocessor
firmware. Previously, SRAM was mapped as normal memory by default.
This scheme requires carveouts and cache maintenance code for proper
synchronization with the coprocessor.

A better scheme is to only map pages owned by BL31 as normal memory,
and leave everything else as device memory. This removes the need for
cache maintenance, and it makes the mapping for BL31 RW data explicit
instead of magic.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Change-Id: I820ddeba2dfa2396361c2322308c0db51b55c348

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 ...


# 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 ...


# d6fdb52b 14-Dec-2020 Samuel Holland <samuel@sholland.org>

allwinner: Always use a 3MHz RSB bus clock

None of the other drivers (Linux, U-Boot, Crust) need to lower the bus
clock frequency to switch the PMIC to RSB mode. That logic is not needed
here, eithe

allwinner: Always use a 3MHz RSB bus clock

None of the other drivers (Linux, U-Boot, Crust) need to lower the bus
clock frequency to switch the PMIC to RSB mode. That logic is not needed
here, either. The hardware takes care of running this transaction at the
correct bus frequency.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Change-Id: Idcfe933df4da75d5fd5a4f3e362da40ac26bdad1

show more ...


# 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 ...


# 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 ...


# 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 ...


# 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 ...


# 49c71a36 13-Dec-2019 Sandrine Bailleux <sandrine.bailleux@arm.com>

Merge "allwinner: power: Add DLDO4 power rail" into integration


# c6dc8504 26-Nov-2019 Stefan Mavrodiev <stefan@olimex.com>

allwinner: power: Add DLDO4 power rail

A64-OLinuXino family boards (maybe others too) uses PG for USB vbus
enable/disable. However PG is supplied by DLDO4, which is not present
in the list of known

allwinner: power: Add DLDO4 power rail

A64-OLinuXino family boards (maybe others too) uses PG for USB vbus
enable/disable. However PG is supplied by DLDO4, which is not present
in the list of known regulators. This patch adds DLD04 to it.

Signed-off-by: Stefan Mavrodiev <stefan@olimex.com>
Change-Id: I31d3bb3e0004ccf5b282d08b530ee44979da0466

show more ...


# c48d02ba 17-Feb-2019 Andre Przywara <andre.przywara@arm.com>

allwinner: regulators: pick correct DT subnode

So far the DT node describing the AXP803 PMIC used in many Allwinner A64
boards had only one subnode, so our code just entering the first subnode
to fi

allwinner: regulators: pick correct DT subnode

So far the DT node describing the AXP803 PMIC used in many Allwinner A64
boards had only one subnode, so our code just entering the first subnode
to find all regulators worked fine.

However recent DT updates in the Linux kernel add more subnodes *before*
that, so we need to make sure to explicitly enter the "regulators"
subnode to find the information we are after.

Improve some DT node parsing error handling on the way.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>

show more ...


# 65954be7 27-Feb-2019 Antonio Niño Díaz <antonio.ninodiaz@arm.com>

Merge pull request #1826 from smaeul/allwinner

allwinner: A few minor improvements


# 50811682 17-Feb-2019 Samuel Holland <samuel@sholland.org>

allwinner: Constify data structures

This maximizes the amount of data protected by the MMU.

Signed-off-by: Samuel Holland <samuel@sholland.org>


# 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 ...


# 98aab974 23-Nov-2018 Antonio Niño Díaz <antonio.ninodiaz@arm.com>

Merge pull request #1681 from Andre-ARM/allwinner/fixes

allwinner: clock / power fixes


# 793c38f0 24-Oct-2018 Andre Przywara <andre.przywara@arm.com>

allwinner: power: Add DCDC6 power rail

The DCDC6 power rail is typically driving VDD_SYS in the SoC, so it is
on by default and uses the default voltage.

As there seems to be at least on board usin

allwinner: power: Add DCDC6 power rail

The DCDC6 power rail is typically driving VDD_SYS in the SoC, so it is
on by default and uses the default voltage.

As there seems to be at least on board using a different voltage, add
the rail to the list of known voltage lines, so we can setup the right
voltage as early as possible.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>

show more ...


12