| ee5b26fd | 01-May-2024 |
Andre Przywara <andre.przywara@arm.com> |
feat(allwinner): adjust H616 L2 cache size in DTB
The Allwinner H616 and its siblings come in different die revisions, some have 256 KB of L2 cache, some have 1 MB. This prevents a single static cac
feat(allwinner): adjust H616 L2 cache size in DTB
The Allwinner H616 and its siblings come in different die revisions, some have 256 KB of L2 cache, some have 1 MB. This prevents a single static cache description in the devicetree.
Use the cache size ID register (CCSIDR_EL1) to query the topology of the L2 cache, and adjust the cache-sets and cache-size properties in the L2 cache DT node accordingly.
The ARM ARM does not promise (anymore) that the cache size can be derived *architecturally* from this register, but the reading is definitely correct for the Arm Cortex-A53 core used.
Change-Id: Id7dc324d783b8319fe5df6164be2f941d4cac82d Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| 646d06b2 | 21-Mar-2024 |
Andre Przywara <andre.przywara@arm.com> |
feat(allwinner): h616: add support for AXP717 PMIC
On at least one new device we see an Allwinner H700 SoC paired with the X-Powers AXP717 PMIC. In contrast to the small AXP313, this is a quite comp
feat(allwinner): h616: add support for AXP717 PMIC
On at least one new device we see an Allwinner H700 SoC paired with the X-Powers AXP717 PMIC. In contrast to the small AXP313, this is a quite complete PMIC, with many voltage rails, battery and USB-C charging support. It supports both RSB and I2C control options.
Add the compatible string to the list of checked devices. The AXP717 apparently does not feature a version ID register, but we read 0xff from that address 0x3, so use this as an indication of its presence, since this value differs from what we read from the other PMICs. The register offset and bit position for the power off functionality is again different, but easy to put into our switch/case.
Setting up regulators in TF-A is now somewhat obsolete, since U-Boot does a much better job in this now, and can figure out which regulators are actually needed. So we don't add the regulator setup code, and just use the PMIC for the power-off functionality.
Change-Id: Ie6b4c91517014adcc79d9a3459c75545fa3a63e6 Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| 03851367 | 21-Mar-2024 |
Andre Przywara <andre.przywara@arm.com> |
feat(allwinner): h616: add support for AXP313 PMIC
Many newer boards with the H616 and its sibling H618 are now paired with the X-Powers AXP313 PMIC. This is a simpler PMIC, with only a few voltage
feat(allwinner): h616: add support for AXP313 PMIC
Many newer boards with the H616 and its sibling H618 are now paired with the X-Powers AXP313 PMIC. This is a simpler PMIC, with only a few voltage rails and no extra functionality except the power key support. In contrast to the AXP305 it can only be controlled via I2C.
Add a check to look for the AXP313 compatible string in the devicetree, and set the PMIC type and I2C address accordingly, if one is found. With only very few voltage rails available, all of them are mostly in use and are thus enabled at reset already, so we can skip the regulator setup entirely.
Change-Id: I01962854109e43793b4f56553c1ca9e1f752e30d Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| 04445898 | 21-Mar-2024 |
Andre Przywara <andre.przywara@arm.com> |
feat(allwinner): h616: add I2C PMIC support
The X-Powers AXP305 PMIC can be controlled via both I2C or RSB (an Allwinner specific bus similar to I2C), but we chose to use only RSB, because that's ea
feat(allwinner): h616: add I2C PMIC support
The X-Powers AXP305 PMIC can be controlled via both I2C or RSB (an Allwinner specific bus similar to I2C), but we chose to use only RSB, because that's easier to program and also used by Linux. The AXP313a PMIC however supports only I2C, so we need to support both buses, and need to decide which to use at runtime.
Prepare the PMIC code to add (back) I2C support. We initially used I2C on the H6/AXP805 combination, but replaced that later with RSB. So this patch is bringing some of that older code back.
The decision whether to use I2C or RSB is made by the devicetree, since on some boards even RSB capable PMICs are controlled via I2C, since they share the bus with only I2C capable devices, for instance RTCs.
At the moment this will still use RSB to drive the AXP305, but the (dynamic) I2C code will be used shortly to support the AXP313.
This increases the code size by one 4K page, but with 80K out of the reserved 256K we are still very far away from our limit.
Change-Id: I65c1e7df93dbd2dcd171b3fc486533a2948cc75b Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| 018c1d87 | 27-Mar-2023 |
Mikhail Kalashnikov <iuncuim@gmail.com> |
feat(allwinner): add support for Allwinner T507 SoC
The Allwinner T507 SoC is using the same die as the H616, but in a different package. On top of this, there is at least one different die revision
feat(allwinner): add support for Allwinner T507 SoC
The Allwinner T507 SoC is using the same die as the H616, but in a different package. On top of this, there is at least one different die revision out there, which uses a different CPU cluster control block. The same die revision has been spotted in some, but not all, H313 SoCs.
Apart from that IP block, the rest of the SoC seems the same, so we can support them using the existing H616 port. The die revision can be auto-detected, so there is no extra build option or knowledge needed.
Provide the deviating CPU power up/down sequence for the die variant. The new IP block uses per-core instead of per-cluster registers, but follows the same pattern otherwise.
Since the CPU ops code is shared among all Allwinner SoCs, we need to dummy-define the new register names for the older SoCs. The actual new code is guarded by a predicate function, that is hard coded to return true on the other SoCs. Since this is a static inline function in a header file, the compiler will optimise away the unneeded branch there, so the generated code for the other SoCs stays the same.
Change-Id: Ib5ade99d34b4ccb161ccde0e34f280ca6bd16ecd Signed-off-by: Mikhail Kalashnikov <iuncuim@gmail.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| fbde260b | 03-Apr-2023 |
Andre Przywara <andre.przywara@arm.com> |
feat(allwinner): add function to detect H616 die variant
Allwinner provides a number of SoCs that use the same die as the H616. Some of those chips apparently use a slight variation of that die, tha
feat(allwinner): add function to detect H616 die variant
Allwinner provides a number of SoCs that use the same die as the H616. Some of those chips apparently use a slight variation of that die, that differs in the way the CPU cores' power and reset controls are handled. This die variation can be detected by reading the SRAM version register.
Provide a predicate function that returns false if that die variant is used. Since the CPU power control code is shared for all supported SoCs, we provide an instance of this function for each SoC, as a static inline, and return true on all other SoCs. This allows to always use this function, and still let the compiler optimise away the unneeded branch for those older SoCs.
This function is unused for now, but is needed in the next patch.
Change-Id: I49e014b895b7e2f55b4e7dc2b3d8aa31cee711b5 Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| b15e2cda | 09-Dec-2022 |
Mikhail Kalashnikov <iuncuim@gmail.com> |
feat(allwinner): add extra CPU control registers
The die used in several variants of the Allwinner H616 SoC (H313, T507) seems to produced in at least two revisions. The newer one differs from the o
feat(allwinner): add extra CPU control registers
The die used in several variants of the Allwinner H616 SoC (H313, T507) seems to produced in at least two revisions. The newer one differs from the original by using a different CPU control register IP block.
Add those newly used register offsets to the respective header file. The MMIO block itself is actually present in both variants, though the registers are different. The new registers tend to use one register per core, in contrast to one register per cluster in the older revisions.
Change-Id: Ifbda1bdc67a6a16fbb901dbc83996e4a148b7602 Signed-off-by: Mikhail Kalashnikov <iuncuim@gmail.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| e2b18771 | 23-Jan-2022 |
Samuel Holland <samuel@sholland.org> |
feat(allwinner): provide CPU idle states to the rich OS
When using SCPI as the PSCI backend, firmware can wake up the CPUs and cluster from sleep, so CPU idle states are available for the rich OS to
feat(allwinner): provide CPU idle states to the rich OS
When using SCPI as the PSCI backend, firmware can wake up the CPUs and cluster from sleep, so CPU idle states are available for the rich OS to use. In that case, advertise them to the rich OS via the DTB.
Change-Id: I718ef6ef41212fe5213b11b4799613adbbe6e0eb Signed-off-by: Samuel Holland <samuel@sholland.org>
show more ...
|
| 52466ec3 | 19-Mar-2021 |
Samuel Holland <samuel@sholland.org> |
feat(allwinner): simplify CPU_SUSPEND power state encoding
Use the encoding recommended by the PSCI specification: four bits for the power state at each power level.
SCPI provides no way to handsha
feat(allwinner): simplify CPU_SUSPEND power state encoding
Use the encoding recommended by the PSCI specification: four bits for the power state at each power level.
SCPI provides no way to handshake an exit from a standby state, so the only possible standby state is the architectural WFI state. Since WFI can be used outside of PSCI, we do not allow passing in standby states.
Change-Id: I4b3b84e5c255ee58a25255a0cab5d7623425086e Signed-off-by: Samuel Holland <samuel@sholland.org>
show more ...
|