]> git.baikalelectronics.ru Git - arm-tf.git/log
arm-tf.git
3 years agofix(errata): workaround for Cortex-A510 erratum 2042739
johpow01 [Fri, 7 Jan 2022 23:12:31 +0000 (17:12 -0600)]
fix(errata): workaround for Cortex-A510 erratum 2042739

Cortex-A510 erratum 2042739 is a Cat B erratum that applies to revisions
r0p0, r0p1 and r0p2 and is fixed in r0p3.

SDEN can be found here:
https://developer.arm.com/documentation/SDEN2397239

Signed-off-by: John Powell <john.powell@arm.com>
Change-Id: I1d2ebee3914396e1e298eb45bdab35ce9e194ad9

3 years agofix(errata): workaround for Cortex-A510 erratum 2288014
johpow01 [Thu, 6 Jan 2022 20:54:49 +0000 (14:54 -0600)]
fix(errata): workaround for Cortex-A510 erratum 2288014

Cortex-A510 erratum 2288014 is a Cat B erratum that applies to revisions
r0p0, r0p1, r0p2, r0p3 and r1p0, and is fixed in r1p1.

SDEN can be found here:
https://developer.arm.com/documentation/SDEN2397239

Signed-off-by: John Powell <john.powell@arm.com>
Change-Id: I875519ff55be90244cc3d3a7e9f7abad0fc3c2b8

3 years agofix(errata): workaround for Cortex-A510 erratum 1922240
johpow01 [Tue, 4 Jan 2022 22:15:18 +0000 (16:15 -0600)]
fix(errata): workaround for Cortex-A510 erratum 1922240

Cortex-A510 erratum 1922240 is a Cat B erratum that applies to revision
r0p0 and is fixed in r0p1.

Since no errata framework code existed for A510 prior to this patch, it
has been added as well. Also some general cleanup changes in the CPU lib
makefile.

SDEN can be found here:
https://developer.arm.com/documentation/SDEN2397239

Signed-off-by: John Powell <john.powell@arm.com>
Change-Id: I8c427ef255cb4b38ed3e5c2c7444fcef957277e4

3 years agofix(errata): workaround for Cortex-A710 erratum 2136059
Bipin Ravi [Sun, 6 Feb 2022 09:11:44 +0000 (03:11 -0600)]
fix(errata): workaround for Cortex-A710 erratum 2136059

Cortex-A710 erratum 2136059 is a Cat B erratum that applies to
revisions r0p0, r1p0 and r2p0 of the CPU. It is fixed in r2p1.
The workaround is to set CPUACTLR5_EL1[44] to 1 which will cause
the CPP instruction to invalidate the hardware prefetcher state
trained from any EL.

SDEN can be found here:
https://developer.arm.com/documentation/SDEN1775101/latest

Signed-off-by: Bipin Ravi <bipin.ravi@arm.com>
Change-Id: I43a86a365418fb663cc1b6ab1d365b4beddae0bc

3 years agofix(errata): workaround for Cortex-A710 erratum 2267065
Bipin Ravi [Sun, 6 Feb 2022 08:32:54 +0000 (02:32 -0600)]
fix(errata): workaround for  Cortex-A710 erratum 2267065

Cortex-A710 erratum 2267065 is a Cat B erratum that applies to
revisions r0p0, r1p0 and r2p0 of the CPU. It is fixed in r2p1.
The workaround is to set CPUACTLR_EL1[22] to 1'b1. Setting
CPUACTLR_EL1[22] will cause the CFP instruction to invalidate
all branch predictor resources regardless of context.

SDEN can be found here:
https://developer.arm.com/documentation/SDEN1775101/latest

Signed-off-by: Bipin Ravi <bipin.ravi@arm.com>
Change-Id: Ia9085aaf9b2b6a2b25d03ab36bd3774839fac9aa

3 years agofix(errata): workaround for Cortex-X2 erratum 2216384
Bipin Ravi [Sun, 6 Feb 2022 07:29:31 +0000 (01:29 -0600)]
fix(errata): workaround for Cortex-X2 erratum 2216384

Cortex-X2 erratum 2216384 is a Cat B erratum that applies to
revisions r0p0, r1p0 and r2p0 of CPU. It is fixed in r2p1.
The workaround is to set CPUACTLR5_EL1[17] to 1'b1 followed by
applying an instruction patching sequence.

SDEN can be found here:
https://developer.arm.com/documentation/SDEN1775100/latest

Signed-off-by: Bipin Ravi <bipin.ravi@arm.com>
Change-Id: I3c216161678887c06a28c59644e784e0c7d37bab

3 years agofix(errata): workaround for Cortex-X2 errata 2081180
Bipin Ravi [Thu, 20 Jan 2022 06:42:05 +0000 (00:42 -0600)]
fix(errata): workaround for Cortex-X2 errata 2081180

Cortex-X2 erratum 2081180 is a Cat B erratum present in r0p0, r1p0
and r2p0 of the Cortex-X2 processor core.

Cortex-X2 SDEN: https://developer.arm.com/documentation/SDEN1775100

Signed-off-by: Bipin Ravi <bipin.ravi@arm.com>
Change-Id: I64bed2fd5b7e12932d6de2ae668786e689885188

3 years agofix(errata): workaround for Cortex-X2 errata 2017096
Bipin Ravi [Thu, 20 Jan 2022 06:01:04 +0000 (00:01 -0600)]
fix(errata): workaround for Cortex-X2 errata 2017096

Cortex-X2 erratum 2017096 is a Cat B erratum that applies to
revisions r0p0, r1p0 & r2p0. The workaround is to set CPUECLTR_EL1[8]
to 1 which disables store issue prefetching.

SDEN can be found here:
https://developer.arm.com/documentation/SDEN1775100

Signed-off-by: Bipin Ravi <bipin.ravi@arm.com>
Change-Id: I3b740aedc95c2394f6b8d1186014d2b2f640ae05

3 years agoMerge changes from topic "st_clock_updates" into integration
Madhukar Pappireddy [Wed, 19 Jan 2022 17:15:19 +0000 (18:15 +0100)]
Merge changes from topic "st_clock_updates" into integration

* changes:
  fix(st-clock): correct types in error messages
  refactor(st-clock): directly use oscillator name
  feat(st-clock): check HSE configuration in serial boot
  feat(st-clock): manage disabled oscillator
  refactor(st-clock): improve DT parsing for PLL nodes

3 years agoMerge "fix(imx8mp): change the BL31 physical load address" into integration
Manish Pandey [Wed, 19 Jan 2022 11:02:33 +0000 (12:02 +0100)]
Merge "fix(imx8mp): change the BL31 physical load address" into integration

3 years agofix(st-clock): correct types in error messages
Yann Gautier [Tue, 7 Sep 2021 07:05:44 +0000 (09:05 +0200)]
fix(st-clock): correct types in error messages

Replace wrong %d with the correct types.
This issue was found with the compilation flag:
-Wformat-signedness

Change-Id: Iec3817a245f964ce444b59561b777ce06c51a60a
Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
3 years agorefactor(st-clock): directly use oscillator name
Gabriel Fernandez [Fri, 15 May 2020 06:00:03 +0000 (08:00 +0200)]
refactor(st-clock): directly use oscillator name

Instead of transmitting an 'enum stm32mp_osc_id', just send
directly the clock name with a 'const char *'

Change-Id: I866b05cbb1685a9b9f80e63dcd5ba7b1d35fc932
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@st.com>
3 years agofeat(st-clock): check HSE configuration in serial boot
Lionel Debieve [Tue, 2 Jul 2019 16:03:34 +0000 (18:03 +0200)]
feat(st-clock): check HSE configuration in serial boot

In case of programmer mode, the bootrom manages to auto-detect
HSE clock configuration. In order to detect a bad device tree
setting in BL2, it will crash during programming if the configuration
is not aligned with the auto-detection.

Signed-off-by: Lionel Debieve <lionel.debieve@st.com>
Change-Id: I230697695745d6282d14b1ebfa6e4c4caa0cd8e2

3 years agofeat(st-clock): manage disabled oscillator
Patrick Delaunay [Mon, 1 Jul 2019 06:59:24 +0000 (08:59 +0200)]
feat(st-clock): manage disabled oscillator

Support "disabled" status for oscillator in device tree.

At boot time, the clock tree initialization performs the following
tasks:
- enabling of the oscillators present in the device tree and not
  disabled,
- disabling of the HSI oscillator if the node is absent or disabled
  (always activated by bootROM).

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Change-Id: I176276022334f3d97ba0250b54062f0ae970e239

3 years agorefactor(st-clock): improve DT parsing for PLL nodes
Nicolas Le Bayon [Wed, 13 Nov 2019 10:46:31 +0000 (11:46 +0100)]
refactor(st-clock): improve DT parsing for PLL nodes

Add a function to get PLL settings from DT:
"cfg" property is mandatory, an error is generated if not found.
"frac" is optional, default value is returned if not found.
"csg" is optional too, a boolean value indicates if it has been
found, and its value is updated.

Store each PLL node validity information, this avoids parsing DT
several times.

Change-Id: I039466fbe1e67d160f7112814e7bb63b661804d0
Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com>
3 years agoMerge "feat(cpu/cortex_a53): add L1PCTL macro definiton for CPUACTLR_EL1" into integr...
Joanna Farley [Mon, 17 Jan 2022 17:37:53 +0000 (18:37 +0100)]
Merge "feat(cpu/cortex_a53): add L1PCTL macro definiton for CPUACTLR_EL1" into integration

3 years agoMerge changes from topic "st_mapping_update" into integration
Madhukar Pappireddy [Thu, 13 Jan 2022 22:10:48 +0000 (23:10 +0100)]
Merge changes from topic "st_mapping_update" into integration

* changes:
  feat(stm32mp1): enable BL2_IN_XIP_MEM to remove relocation sections
  refactor(stm32mp1): reduce MMU memory regions and split XLAT by context
  feat(st): map 2MB for ROM code
  fix(stm32mp1): restrict DEVICE2 mapping in BL2

3 years agoMerge changes I52b241b2,I25b4b97c into integration
Madhukar Pappireddy [Thu, 13 Jan 2022 17:30:49 +0000 (18:30 +0100)]
Merge changes I52b241b2,I25b4b97c into integration

* changes:
  feat(mt8186): add Vcore DVFS driver
  feat(mt8186): add SPM suspend driver

3 years agofeat(cpu/cortex_a53): add L1PCTL macro definiton for CPUACTLR_EL1
Jiafei Pan [Thu, 21 Oct 2021 07:02:08 +0000 (15:02 +0800)]
feat(cpu/cortex_a53): add L1PCTL macro definiton for CPUACTLR_EL1

Add L1PCTL field definiton in register CPUACTLR_EL1.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: Iebfb240ac58aa8f3dc870804bf4390dfbdfa9b95

3 years agofeat(mt8186): add Vcore DVFS driver
jason-ch chen [Tue, 16 Nov 2021 02:18:46 +0000 (10:18 +0800)]
feat(mt8186): add Vcore DVFS driver

Add Vcore DVFS to SPM driver.

TEST=build pass
BUG=b:202871018

Signed-off-by: Jason-ch Chen <jason-ch.chen@mediatek.com>
Change-Id: I52b241b2cdb792be74390cbaa09a728ddbe6593a

3 years agofeat(mt8186): add SPM suspend driver
jason-ch chen [Tue, 16 Nov 2021 01:48:20 +0000 (09:48 +0800)]
feat(mt8186): add SPM suspend driver

Add SPM suspend driver for suspend/resume features.

TEST=build pass
BUG=b:202871018

Signed-off-by: Jason-ch Chen <jason-ch.chen@mediatek.com>
Change-Id: I25b4b97cd3138a7b347385539e47ccfa884d64fc

3 years agofeat(stm32mp1): enable BL2_IN_XIP_MEM to remove relocation sections
Yann Gautier [Wed, 15 Sep 2021 09:30:25 +0000 (11:30 +0200)]
feat(stm32mp1): enable BL2_IN_XIP_MEM to remove relocation sections

Because the BL2 is not relocated, the usage of BL2_IN_XIP_MEM
can be used. It reduces the binary size by removing all relocation
sections. XIP will not be used when STM32MP_USE_STM32IMAGE is
defined. Introduce new definitions for SEPARATE_CODE_AND_RODATA.

Signed-off-by: Lionel Debieve <lionel.debieve@st.com>
Change-Id: Ifd76f14e5bc98990bf84e0bfd4ee0b4e49a9a293

3 years agorefactor(stm32mp1): reduce MMU memory regions and split XLAT by context
Yann Gautier [Thu, 16 Jan 2020 17:50:51 +0000 (18:50 +0100)]
refactor(stm32mp1): reduce MMU memory regions and split XLAT by context

Simplify the BL2 MMU mapping and reduce the memory regions
number. Split the XLAT define between BL2 and BL32 as binaries
do not share the same tables anymore.

Signed-off-by: Lionel Debieve <lionel.debieve@st.com>
Change-Id: Iaf09e72b4cc29acbe376f6f1cd2a8116c793ba26

3 years agofeat(st): map 2MB for ROM code
Yann Gautier [Wed, 15 Sep 2021 13:12:57 +0000 (15:12 +0200)]
feat(st): map 2MB for ROM code

This allows reducing MMU tables, and as there is nothing after ROM code
in memory mapping, this has no impact.

Change-Id: If51facb96a523770465cb06eb1ab400f75d26db3
Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
3 years agofix(stm32mp1): restrict DEVICE2 mapping in BL2
Yann Gautier [Thu, 17 Sep 2020 09:38:09 +0000 (11:38 +0200)]
fix(stm32mp1): restrict DEVICE2 mapping in BL2

Only NAND memory map area can be of interest for BL2 in the
DEVICE2 area. Map DEVICE2 under STM32MP_RAW_NAND flag.

Change-Id: I7e3b39579e4a2525b25cb1987d6ec38038d0de2b
Signed-off-by: Yann Gautier <yann.gautier@st.com>
3 years agofix(imx8mp): change the BL31 physical load address
Ying-Chun Liu (PaulLiu) [Wed, 15 Dec 2021 08:03:17 +0000 (16:03 +0800)]
fix(imx8mp): change the BL31 physical load address

Change BL31 load address to 0x970000. This was done by Change-Id
I96d572fc. But then changed back to 0x960000 by Change-Id I8308c629.
However, 0x970000 is the correct value thus we change it back again.

Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Change-Id: Ia0db4877123b89072f723d18e2bcce25ef38f47d

3 years agoMerge "feat(mt8195): apply erratas of CA78 for MT8195" into integration
Madhukar Pappireddy [Mon, 10 Jan 2022 23:25:01 +0000 (00:25 +0100)]
Merge "feat(mt8195): apply erratas of CA78 for MT8195" into integration

3 years agoMerge changes from topic "st_ddr_updates" into integration
Manish Pandey [Fri, 7 Jan 2022 16:24:54 +0000 (17:24 +0100)]
Merge changes from topic "st_ddr_updates" into integration

* changes:
  refactor(st-ddr): move basic tests in a dedicated file
  refactor(st-ddr): reorganize generic and specific elements
  feat(stm32mp1): allow configuration of DDR AXI ports number
  refactor(st-ddr): update parameter array initialization
  feat(st-ddr): add read valid training support
  refactor(stm32mp1): remove the support of calibration result
  fix(st-ddr): correct DDR warnings

3 years agoMerge "fix(st): manage UART clock and reset only in BL2" into integration
Manish Pandey [Fri, 7 Jan 2022 16:09:53 +0000 (17:09 +0100)]
Merge "fix(st): manage UART clock and reset only in BL2" into integration

3 years agoMerge changes Icf5e3045,Ie5fb0b72 into integration
André Przywara [Thu, 6 Jan 2022 18:14:29 +0000 (19:14 +0100)]
Merge changes Icf5e3045,Ie5fb0b72 into integration

* changes:
  docs(allwinner): update SoC list and build options
  docs(allwinner): add SUNXI_SETUP_REGULATORS build option

3 years agoMerge changes Ifea8148e,I73559522 into integration
Manish Pandey [Thu, 6 Jan 2022 11:01:41 +0000 (12:01 +0100)]
Merge changes Ifea8148e,I73559522 into integration

* changes:
  fix(morello): include errata workaround for 1868343
  fix(errata): workaround for Rainier erratum 1868343

3 years agofix(st): manage UART clock and reset only in BL2
Yann Gautier [Wed, 5 Jan 2022 17:02:46 +0000 (18:02 +0100)]
fix(st): manage UART clock and reset only in BL2

As the UART is already initialized, no need to check for UART clock
or reset in next BL. An issue can appear if the next BL device tree
(e.g HW_CONFIG) doesn't use the same clocks or resets (like SCMI ones).

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I044ef2386abe2d3dba5a53c3685440d64ca50a4f

3 years agofix(morello): include errata workaround for 1868343
Manoj Kumar [Wed, 5 Jan 2022 14:38:44 +0000 (14:38 +0000)]
fix(morello): include errata workaround for 1868343

This patch includes the errata workaround for erratum
1868343 for the Morello platform.

Signed-off-by: Manoj Kumar <manoj.kumar3@arm.com>
Change-Id: Ifea8148e10946db2276560f90bf2f32bf12b9dcc

3 years agofix(errata): workaround for Rainier erratum 1868343
Manoj Kumar [Wed, 5 Jan 2022 14:33:52 +0000 (14:33 +0000)]
fix(errata): workaround for Rainier erratum 1868343

Rainier CPU is based on Neoverse N1 R4P0 version which exhibits
the erratum 1868343. This patch inherits the workaround from
neoverse_n1.S file into rainier.S file for erratum 1868343.

Signed-off-by: Manoj Kumar <manoj.kumar3@arm.com>
Change-Id: I735595229716a77d26369943086de08384cafa70

3 years agoMerge changes I19f713de,Ib5bda93d,Id5dafc04,Id20e65e2 into integration
Manish Pandey [Wed, 5 Jan 2022 16:28:13 +0000 (17:28 +0100)]
Merge changes I19f713de,Ib5bda93d,Id5dafc04,Id20e65e2 into integration

* changes:
  feat(plat/rcar3): update IPL and Secure Monitor Rev.3.0.3
  feat(plat/rcar3): modify type for Internal function argument
  feat(plat/rcar3): modify sequence for update value for WUPMSKCA57/53
  fix(plat/rcar3): fix to bit operation for WUPMSKCA57/53

3 years agoMerge "fix(ufs): delete call to inv_dcache_range for utrd" into integration
Manish Pandey [Wed, 5 Jan 2022 11:08:14 +0000 (12:08 +0100)]
Merge "fix(ufs): delete call to inv_dcache_range for utrd" into integration

3 years agorefactor(st-ddr): move basic tests in a dedicated file
Nicolas Le Bayon [Tue, 2 Mar 2021 10:19:36 +0000 (11:19 +0100)]
refactor(st-ddr): move basic tests in a dedicated file

These basic tests are generic and should be used independently of the
driver, depending on the plaftorm characteristics.

Change-Id: I38161b659ef2a23fd30a56e1c9b1bd98461a2fe4
Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@foss.st.com>
3 years agorefactor(st-ddr): reorganize generic and specific elements
Nicolas Le Bayon [Tue, 18 May 2021 08:01:30 +0000 (10:01 +0200)]
refactor(st-ddr): reorganize generic and specific elements

stm32mp_ddrctl structure contains DDRCTRL registers definitions.
stm32mp_ddr_info contains general DDR information extracted from DT.
stm32mp_ddr_size moves to the generic side.
stm32mp1_ddr_priv contains platform private data.

stm32mp_ddr_dt_get_info() and stm32mp_ddr_dt_get_param() allow to
retrieve data from DT. They are located in new generic c/h files in
which stm32mp_ddr_param structure is declared. Platform makefile
is updated.

Adapt driver with this new classification.

Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com>
Change-Id: I4187376c9fff1a30e7a94407d188391547107997

3 years agofeat(stm32mp1): allow configuration of DDR AXI ports number
Yann Gautier [Thu, 17 Sep 2020 10:42:46 +0000 (12:42 +0200)]
feat(stm32mp1): allow configuration of DDR AXI ports number

A new flag STM32MP_DDR_DUAL_AXI_PORT is added, and enabled by default.
It will allow choosing single or dual AXI ports for DDR.

Change-Id: I48826a66a6f4d18df87e081c0960af89ddda1b9d
Signed-off-by: Yann Gautier <yann.gautier@st.com>
3 years agorefactor(st-ddr): update parameter array initialization
Yann Gautier [Mon, 25 Feb 2019 12:44:27 +0000 (13:44 +0100)]
refactor(st-ddr): update parameter array initialization

Force alignment of the size of parameters array with the expected
value by the binding.
The registers dynamic structs are removed as not used in TF-A.

Change-Id: I7a41f355a435f54fbf23f468cca87c7f8f7e69e8
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Signed-off-by: Yann Gautier <yann.gautier@st.com>
3 years agofeat(st-ddr): add read valid training support
Nicolas Le Bayon [Fri, 10 Sep 2021 10:03:38 +0000 (12:03 +0200)]
feat(st-ddr): add read valid training support

Add the read data eye training = training for optimal read valid placement
(RVTRN) when the built-in calibration is executed for LPDDR2 and LPDDR3.

Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com>
Change-Id: I7ac1c77c21ebc30315b532741f2f255c2312d5b2

3 years agorefactor(stm32mp1): remove the support of calibration result
Patrick Delaunay [Fri, 30 Apr 2021 15:31:52 +0000 (17:31 +0200)]
refactor(stm32mp1): remove the support of calibration result

The support of a predefined DDR PHY tuning result is removed for
STM32MP1 driver because it is not needed at the supported frequency
when built-in calibration is executed.

The calibration parameters were provided in the device tree by the
optional node "st,phy-cal", activated in ddr helper file by the
compilation flag DDR_PHY_CAL_SKIP and filled with values generated
by CubeMX.

This patch
- updates the binding file to remove "st,phy-cal" support
- updates the device trees and remove the associated defines
- simplifies the STM32MP1 DDR driver and remove the support of
  the optional "st,phy-cal"

After this patch the built-in calibration is always executed.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com>
Change-Id: I3fc445520c259f7f05730aefc25e64b328bf7159

3 years agofeat(mt8195): apply erratas of CA78 for MT8195
Rex-BC Chen [Wed, 5 Jan 2022 06:51:57 +0000 (14:51 +0800)]
feat(mt8195): apply erratas of CA78 for MT8195

MT8195 uses Cortex A78 CPU, so we apply these erratas.

TEST=build pass
BUG=none

Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Change-Id: I5ce3d5c490a12226bff4eb5a2d55687da0f74f0e

3 years agofix(st-ddr): correct DDR warnings
Yann Gautier [Tue, 7 Sep 2021 07:07:35 +0000 (09:07 +0200)]
fix(st-ddr): correct DDR warnings

Replace %d with %u in logs, to avoid warning when
-Wformat-signedness is enabled.
And correct the order of includes.

Change-Id: I7c711a37fc1deceb8853831a8a09ae50422859c9
Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
4 years agoMerge "feat(plat/mediatek/mt8195): improve SPM wakeup log" into integration
Madhukar Pappireddy [Tue, 4 Jan 2022 19:10:25 +0000 (20:10 +0100)]
Merge "feat(plat/mediatek/mt8195): improve SPM wakeup log" into integration

4 years agoMerge changes from topic "st_fixes" into integration
Manish Pandey [Tue, 4 Jan 2022 17:46:59 +0000 (18:46 +0100)]
Merge changes from topic "st_fixes" into integration

* changes:
  fix(stm32mp1): do not reopen debug features
  refactor(stm32mp1): improve DGBMCU driver
  fix(stm32mp1): set reset pulse duration to 31ms

4 years agoMerge "refactor(plat/rockchip/rk3399/drivers/gpio): reduce code duplication" into...
Manish Pandey [Tue, 4 Jan 2022 17:26:57 +0000 (18:26 +0100)]
Merge "refactor(plat/rockchip/rk3399/drivers/gpio): reduce code duplication" into integration

4 years agoMerge "fix(st-sdmmc2): check regulator enable/disable return" into integration
Madhukar Pappireddy [Tue, 4 Jan 2022 15:36:45 +0000 (16:36 +0100)]
Merge "fix(st-sdmmc2): check regulator enable/disable return" into integration

4 years agorefactor(plat/rockchip/rk3399/drivers/gpio): reduce code duplication
Jona Stubbe [Tue, 22 Dec 2020 12:06:10 +0000 (13:06 +0100)]
refactor(plat/rockchip/rk3399/drivers/gpio): reduce code duplication

Refactor the GPIO code to use a small lookup table instead of redundant or
repetitive code.

Signed-off-by: Jona Stubbe <tf-a@jona-stubbe.de>
Change-Id: Icf60385095efc1f506e4215d497b60f90e16edfd
Signed-off-by: Jimmy Brisson <jimmy.brisson@arm.com>
4 years agofix(st-sdmmc2): check regulator enable/disable return
Yann Gautier [Tue, 4 Jan 2022 14:25:04 +0000 (15:25 +0100)]
fix(st-sdmmc2): check regulator enable/disable return

The issue was reported by Coverity [1]. The return of the functions
regulator_disable() and regulator_enable() was not checked.
If they fail, this means there is an issue either with PMIC or I2C.
The board should the stop booting with a panic().

[1] https://scan4.scan.coverity.com/reports.htm#v47771/p11439/mergedDefectId=374565

Change-Id: If5dfd5643c210e03ae4b1f4cab0168c0db89f60e
Signed-off-by: Yann Gautier <yann.gautier@st.com>
4 years agofix(stm32mp1): do not reopen debug features
Yann Gautier [Wed, 15 Sep 2021 12:49:48 +0000 (14:49 +0200)]
fix(stm32mp1): do not reopen debug features

On closed chips, it is not allowed to open debug. The BSEC debug
register can not be rewritten.
On open chips, the debug is already open, no need to rewrite this
register. This part of code is just removed.
An INFO message is displayed if debug is disabled.
The freeze of the watchdog during debug is also removed.
In case of debug, this must be managed by the software that enables
the debugger.

Change-Id: I19fbd3c487bb1018db30fd599cfa94fe5090899f
Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
4 years agorefactor(stm32mp1): improve DGBMCU driver
Nicolas Le Bayon [Thu, 19 Sep 2019 09:27:24 +0000 (11:27 +0200)]
refactor(stm32mp1): improve DGBMCU driver

Add function headers to improve readability.
Add asserts when required.
Use RCC_BASE address.

Change-Id: Ia545293f00167b6276331a986ea7aa08c006e004
Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com>
4 years agofix(stm32mp1): set reset pulse duration to 31ms
Yann Gautier [Tue, 27 Apr 2021 16:19:13 +0000 (18:19 +0200)]
fix(stm32mp1): set reset pulse duration to 31ms

According to ST Application note AN5256 [1], the minimum reset pulse
duration should be set to 31ms on boards powered with discrete
regulators.

[1] https://www.st.com/resource/en/application_note/dm00561921.pdf

Change-Id: Ib6ed029ee8a4b95f75a80948fdd2154b4ebe484f
Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
4 years agoMerge "feat(allwinner): allow to skip PMIC regulator setup" into integration
André Przywara [Sat, 1 Jan 2022 01:16:14 +0000 (02:16 +0100)]
Merge "feat(allwinner): allow to skip PMIC regulator setup" into integration

4 years agoMerge "fix(mt8186): remove unused files in drivers/mcdi" into integration
Madhukar Pappireddy [Thu, 30 Dec 2021 15:38:40 +0000 (16:38 +0100)]
Merge "fix(mt8186): remove unused files in drivers/mcdi" into integration

4 years agofix(mt8186): remove unused files in drivers/mcdi
Rex-BC Chen [Thu, 30 Dec 2021 05:04:29 +0000 (13:04 +0800)]
fix(mt8186): remove unused files in drivers/mcdi

We don't use mbox drivers which are implemented in these files for
mcdi, so remove related files from mcdi folder.

TEST=build pass
BUG=b:202871018

Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Change-Id: Idea5ebe5b25f91066ebd653cdcdafe65ca292b0f

4 years agofix(ufs): delete call to inv_dcache_range for utrd
Wing Li [Thu, 23 Dec 2021 19:32:08 +0000 (11:32 -0800)]
fix(ufs): delete call to inv_dcache_range for utrd

The utrd struct is allocated on the stack by ufs_check_resp's caller.
Invalidating the utrd struct is unnecessary since it's only read from,
and can cause other values stored on the stack (e.g. link register) to
be inadvertently invalidated.

Change-Id: Icd455b52beb2677fafc083d68d0bfa0645b7194b
Signed-off-by: Wing Li <wingers@google.com>
4 years agodocs(allwinner): update SoC list and build options
Andre Przywara [Mon, 27 Dec 2021 15:10:49 +0000 (15:10 +0000)]
docs(allwinner): update SoC list and build options

Our list of possible Allwinner build targets was missing the newly
introduced R329 support. Fix that by adding a table with maps the SoC
names to the build target names.
Also add some explanation about the recently introduced PSCI power
management providers.

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

4 years agofeat(allwinner): allow to skip PMIC regulator setup
Andre Przywara [Mon, 1 Nov 2021 00:17:37 +0000 (00:17 +0000)]
feat(allwinner): allow to skip PMIC regulator setup

For somewhat historical reasons we are doing some initial PMIC regulator
setup in BL31, as U-Boot does not (yet) have a PMIC driver. This worked
fine so far, but there is at least one board (OrangePi 3) that gets upset,
because the Ethernet PHY needs some *coordinated* bringup of *two*
regulators.

To avoid custom hacks, let's introduce a build option to keep doing the
regulator setup in TF-A. Defining SUNXI_SETUP_REGULATORS to 0 will break
support for some devices on some boards in U-Boot (Ethernet and HDMI),
but will allow to bring up the OrangePi 3 in Linux correctly. We keep
the default at 1 to not change the behaviour for all other boards.

After U-Boot gained proper PMIC support at some point in the future, we
will probably change the default to 0, to get rid of the less optimal
PMIC code in TF-A.

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

4 years agodocs(allwinner): add SUNXI_SETUP_REGULATORS build option
Andre Przywara [Mon, 27 Dec 2021 15:09:53 +0000 (15:09 +0000)]
docs(allwinner): add SUNXI_SETUP_REGULATORS build option

Document the newly introduced SUNXI_SETUP_REGULATORS build option, that
allows to disable PMIC regulator setup at build time.

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

4 years agoMerge "feat(ccidx): update the do_dcsw_op function to support FEAT_CCIDX" into integr...
Joanna Farley [Fri, 24 Dec 2021 10:26:32 +0000 (11:26 +0100)]
Merge "feat(ccidx): update the do_dcsw_op function to support FEAT_CCIDX" into integration

4 years agoMerge changes from topic "st_regulator" into integration
Madhukar Pappireddy [Thu, 23 Dec 2021 23:13:50 +0000 (00:13 +0100)]
Merge changes from topic "st_regulator" into integration

* changes:
  feat(st-sdmmc2): manage cards power cycle
  feat(stm32mp1): register fixed regulator
  feat(st-drivers): introduce fixed regulator driver
  refactor(st): update CPU and VDD voltage get
  refactor(stm32mp1-fdts): update regulator description
  refactor(st-pmic): use regulator framework for DDR init
  feat(st-pmic): register the PMIC to regulator framework
  refactor(st-pmic): split initialize_pmic()
  feat(stm32mp1): add regulator framework compilation
  feat(regulator): add a regulator framework
  feat(stpmic1): add new services
  feat(stpmic1): add USB OTG regulators
  refactor(st-pmic): improve driver usage
  refactor(stpmic1): set stpmic1_is_regulator_enabled() as boolean
  refactor(stm32mp1): re-order drivers init

4 years agoMerge "fix(sve): disable ENABLE_SVE_FOR_NS for AARCH32" into integration
Madhukar Pappireddy [Wed, 22 Dec 2021 22:57:16 +0000 (23:57 +0100)]
Merge "fix(sve): disable ENABLE_SVE_FOR_NS for AARCH32" into integration

4 years agoMerge "fix(fiptool): respect OPENSSL_DIR" into integration
Madhukar Pappireddy [Wed, 22 Dec 2021 21:24:44 +0000 (22:24 +0100)]
Merge "fix(fiptool): respect OPENSSL_DIR" into integration

4 years agoMerge "fix(trp): Distinguish between cold and warm boot" into integration
Bipin Ravi [Wed, 22 Dec 2021 20:13:03 +0000 (21:13 +0100)]
Merge "fix(trp): Distinguish between cold and warm boot" into integration

4 years agoMerge changes from topic "uart1_console" into integration
Madhukar Pappireddy [Wed, 22 Dec 2021 18:18:15 +0000 (19:18 +0100)]
Merge changes from topic "uart1_console" into integration

* changes:
  feat(versal): add UART1 as console
  feat(zynqmp): add uart1 as console

4 years agoMerge changes from topic "clock_framework" into integration
Madhukar Pappireddy [Wed, 22 Dec 2021 18:17:57 +0000 (19:17 +0100)]
Merge changes from topic "clock_framework" into integration

* changes:
  feat(st): use newly introduced clock framework
  feat(clk): add a minimal clock framework

4 years agoMerge changes I41001484,Ic734696a,I84741535,I85aaaf3a,Ibd5423b7, ... into integration
Madhukar Pappireddy [Wed, 22 Dec 2021 18:16:55 +0000 (19:16 +0100)]
Merge changes I41001484,Ic734696a,I84741535,I85aaaf3a,Ibd5423b7, ... into integration

* changes:
  feat(plat/mediatek/mt8186): add reboot function for PSCI
  feat(plat/mdeiatek/mt8186): add power-off function for PSCI
  feat(plat/mediatek/mt8186): apply erratas for MT8186
  feat(plat/mediatek/mt8186): add MCDI drivers
  feat(plat/mediatek/mt8186): add CPU hotplug
  feat(plat/mediatek/mt8186): add RTC drivers
  fix(plat/mediatek/mt8186): extend MMU region size
  feat(plat/mediatek/mt8186): add DCM driver
  feat(plat/mediatek/mt8186): add pinctrl support
  feat(plat/mediatek/mt8186): add sys_cirq support
  feat(plat/mediatek/mt8186): initialize GIC
  feat(plat/mediatek/mt8186): add SiP service
  feat(plat/mediatek/mt8186): add pwrap and pmic driver
  feat(plat/mediatek/mt8186): initialize delay_timer
  feat(plat/mediatek/mt8186): initialize systimer
  feat(plat/mediatek/mt8186): add EMI MPU basic driver

4 years agoMerge "fix(fiptool): avoid packing the zero size images in the FIP" into integration
Madhukar Pappireddy [Wed, 22 Dec 2021 14:32:14 +0000 (15:32 +0100)]
Merge "fix(fiptool): avoid packing the zero size images in the FIP" into integration

4 years agoMerge "fix(errata): workaround for Cortex X2 erratum 2058056" into integration
Madhukar Pappireddy [Wed, 22 Dec 2021 14:23:00 +0000 (15:23 +0100)]
Merge "fix(errata): workaround for Cortex X2 erratum 2058056" into integration

4 years agofeat(st-sdmmc2): manage cards power cycle
Yann Gautier [Fri, 10 May 2019 14:01:34 +0000 (16:01 +0200)]
feat(st-sdmmc2): manage cards power cycle

To correctly initialize the MMC devices, a power cycle is required.
For this we need to:
- disable vmmc-supply regulator
- make the power cycle required for SDMMC2 peripheral
- enable regulators

Change-Id: I2be6d9082d1cc4c864a82cf2c31ff8522e2d31a2
Signed-off-by: Yann Gautier <yann.gautier@st.com>
4 years agofeat(stm32mp1): register fixed regulator
Pascal Paillet [Fri, 29 Jan 2021 13:48:49 +0000 (14:48 +0100)]
feat(stm32mp1): register fixed regulator

Register fixed regulator in BL2.

Change-Id: I24292f549b2cd24fb717fbb68eb95af7aa68e3b9
Signed-off-by: Pascal Paillet <p.paillet@st.com>
Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
4 years agofeat(st-drivers): introduce fixed regulator driver
Pascal Paillet [Wed, 20 Jan 2021 16:09:10 +0000 (17:09 +0100)]
feat(st-drivers): introduce fixed regulator driver

Fixed regulator is mainly used when no pmic is available

Change-Id: Ib6a998684bcb055ba95a093bee563372d9051474
Signed-off-by: Pascal Paillet <p.paillet@st.com>
4 years agorefactor(st): update CPU and VDD voltage get
Yann Gautier [Fri, 17 Sep 2021 14:08:12 +0000 (16:08 +0200)]
refactor(st): update CPU and VDD voltage get

Use regulator framework to get CPU and VDD power supplies.

Change-Id: Ice745fb21ff10e71ef811e747165499c2e19253e
Signed-off-by: Pascal Paillet <p.paillet@st.com>
Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
4 years agorefactor(stm32mp1-fdts): update regulator description
Pascal Paillet [Thu, 7 Jan 2021 17:05:46 +0000 (18:05 +0100)]
refactor(stm32mp1-fdts): update regulator description

Update regulator description to match with pmic driver updates.
vref_ddr does not support over-current protection.
vtt_ddr is set to sink source mode.

Change-Id: I725f35b091ca8c230994c2b5f81693ebc97bf4aa
Signed-off-by: Pascal Paillet <p.paillet@st.com>
Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
4 years agorefactor(st-pmic): use regulator framework for DDR init
Pascal Paillet [Tue, 15 Dec 2020 18:05:09 +0000 (19:05 +0100)]
refactor(st-pmic): use regulator framework for DDR init

Use regulator framework for DDR initialization.

Change-Id: I9dffe499ca12cdc35904de7daf2dda821b267a31
Signed-off-by: Pascal Paillet <p.paillet@st.com>
Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
4 years agofeat(st-pmic): register the PMIC to regulator framework
Yann Gautier [Mon, 27 Sep 2021 12:31:40 +0000 (14:31 +0200)]
feat(st-pmic): register the PMIC to regulator framework

Register the PMIC to the regulator framework.

Change-Id: Ic825a8ef08505316db3dbd5944d62ea907f73c4a
Signed-off-by: Pascal Paillet <p.paillet@st.com>
Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
4 years agorefactor(st-pmic): split initialize_pmic()
Nicolas Le Bayon [Mon, 18 Nov 2019 12:13:36 +0000 (13:13 +0100)]
refactor(st-pmic): split initialize_pmic()

print_pmic_info_and_debug() prints the PMIC version ID and displays
regulator information if debug is enabled.
It is under DEBUG flag and called after initialize_pmic() in BL2.

Change-Id: Ib81a625740b7ec6abb49cfca05e44c69efaa4718
Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com>
4 years agofeat(stm32mp1): add regulator framework compilation
Yann Gautier [Wed, 15 Dec 2021 12:16:15 +0000 (13:16 +0100)]
feat(stm32mp1): add regulator framework compilation

Add required macro PLAT_NB_RDEVS in platform code, and update
platform.mk to compile regulator framework.

Change-Id: I9dc7a0a4c4f5a23d9bedda368d407612c9cd21cd
Signed-off-by: Pascal Paillet <p.paillet@st.com>
Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
4 years agofeat(regulator): add a regulator framework
Pascal Paillet [Tue, 15 Dec 2020 17:26:39 +0000 (18:26 +0100)]
feat(regulator): add a regulator framework

Add a regulator framework to:
- provide an interface to consumers and drivers,
- connect consumers with drivers,
- handle most of devicetree-parsing,
- handle always-on and boot-on regulators,
- handle min/max voltages,

Change-Id: I23c939fdef2c71a416c44c9de332f70db0d2aa53
Signed-off-by: Pascal Paillet <p.paillet@st.com>
4 years agofeat(stpmic1): add new services
Pascal Paillet [Tue, 15 Dec 2020 17:28:34 +0000 (18:28 +0100)]
feat(stpmic1): add new services

Add support for ICC, sink mode, bypass mode,
active discharge and list voltages.
Handle LDO3 sink source mode in a different way to avoid
setting voltage while in sink source mode.

Change-Id: Ib1b909fd8a153f542917f650e43e24317a570534
Signed-off-by: Pascal Paillet <p.paillet@st.com>
4 years agofeat(stpmic1): add USB OTG regulators
Etienne Carriere [Fri, 10 Jan 2020 07:31:13 +0000 (08:31 +0100)]
feat(stpmic1): add USB OTG regulators

Add regulators boost, pwr_sw1 and pwr_sw2 regulators related to
USB OTG supply BOOST, SW_OTG and SWIN/SWOUT. These regulators are
needed since manipulated during the suspend/resume power sequence
as per FDT description for stm32mp15x-xxx boards from
STMicroelectronics.

Change-Id: I6217de707e49882bd5a9100db43e0d354908800d
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
4 years agorefactor(st-pmic): improve driver usage
Nicolas Le Bayon [Fri, 15 Nov 2019 14:56:06 +0000 (15:56 +0100)]
refactor(st-pmic): improve driver usage

Store status of dt_pmic_status() as local static variable,
this avoids parsing DT several times.
In the same way, store nodes in dt_pmic_i2c_config() and
in dt_get_pmic_node() as local static variables.

Change-Id: I4585e9dfdde2847a369bffcc6f2b39ecc2b74de1
Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com>
4 years agorefactor(stpmic1): set stpmic1_is_regulator_enabled() as boolean
Nicolas Le Bayon [Thu, 19 Sep 2019 09:24:50 +0000 (11:24 +0200)]
refactor(stpmic1): set stpmic1_is_regulator_enabled() as boolean

Improve use and readability.

Change-Id: Ia99fc38287f36c9dd12bfe51352afa5da68c0e47
Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com>
4 years agorefactor(stm32mp1): re-order drivers init
Yann Gautier [Thu, 17 Sep 2020 09:54:52 +0000 (11:54 +0200)]
refactor(stm32mp1): re-order drivers init

SYSCFG can be initialized later, after console is up, to display the
warnings or messages it could issue.
PMIC should be initialized earlier, before SYSCFG init.

Change-Id: Icc3a1366083a1b1fde7f0e173645449b4c04c49b
Signed-off-by: Yann Gautier <yann.gautier@st.com>
4 years agofix(sve): disable ENABLE_SVE_FOR_NS for AARCH32
Yann Gautier [Fri, 19 Nov 2021 10:35:46 +0000 (11:35 +0100)]
fix(sve): disable ENABLE_SVE_FOR_NS for AARCH32

With patch [1], ENABLE_SVE_FOR_NS is always enable.
Disable it for AARCH32 platforms, as the feature is not supported.
The warning message is replaced with an error, and the second override
is removed.

[1] dc78e62d80e6 ("feat(sme): enable SME functionality")

Change-Id: Ic9c5e2612c9e00bd0d37ca3b59537e39270c9799
Signed-off-by: Yann Gautier <yann.gautier@st.com>
4 years agofeat(st): use newly introduced clock framework
Yann Gautier [Mon, 30 Aug 2021 13:06:54 +0000 (15:06 +0200)]
feat(st): use newly introduced clock framework

Replace calls to stm32mp_clk_enable() / stm32mp_clk_disable() /
stm32mp_clk_get_rate() with clk_enable() / clk_disable() /
clk_get_rate().

Change-Id: I15d2ce57b9499211fa522a1b53eeee9cf584c111
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@st.com>
4 years agofeat(clk): add a minimal clock framework
Gabriel Fernandez [Tue, 13 Oct 2020 07:36:25 +0000 (09:36 +0200)]
feat(clk): add a minimal clock framework

This is mainly a clock interface with clk_ops callbacks.
Those callbacks are: enable, disable, get_rate, set_parent,
and is_enabled.
This framework is compiled for STM32MP1.

Change-Id: I5119a2aeaf103ceaae7a60d9e423caf0c148d794
Signed-off-by: Ludovic Barre <ludovic.barre@st.com>
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@st.com>
4 years agofeat(versal): add UART1 as console
Venkatesh Yadav Abbarapu [Mon, 20 Dec 2021 04:36:23 +0000 (21:36 -0700)]
feat(versal): add UART1 as console

Currently only UART0 is handled as console device, fix the
code to support UART1 as console also.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@xilinx.com>
Change-Id: Ifcd3c331cf6ce4afb0074357c92fc4addb9438b6

4 years agofeat(zynqmp): add uart1 as console
Venkatesh Yadav Abbarapu [Mon, 20 Dec 2021 04:32:00 +0000 (21:32 -0700)]
feat(zynqmp): add uart1 as console

Currently only UART0 is handled as console device, fix the
code to support UART1 as console also.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@xilinx.com>
Change-Id: I08f69b65b78b967ceb7159f4a467aa5982b1f791

4 years agofeat(plat/mediatek/mt8186): add reboot function for PSCI
Rex-BC Chen [Mon, 22 Nov 2021 10:14:38 +0000 (18:14 +0800)]
feat(plat/mediatek/mt8186): add reboot function for PSCI

Add system_reset function in PSCI operations.

TEST=build pass
BUG=b:202871018

Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Change-Id: I41001484f6244bd6ae7dedcfb6ce71cd6c035a1e

4 years agofeat(plat/mdeiatek/mt8186): add power-off function for PSCI
Rex-BC Chen [Mon, 22 Nov 2021 09:55:56 +0000 (17:55 +0800)]
feat(plat/mdeiatek/mt8186): add power-off function for PSCI

Add support for system-off.

TEST=build pass
BUG=b:202871018

Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Change-Id: Ic734696aab1b71ae85bca6ed08e544a522ce5c95

4 years agofeat(plat/mediatek/mt8186): apply erratas for MT8186
Rex-BC Chen [Thu, 25 Nov 2021 10:55:04 +0000 (18:55 +0800)]
feat(plat/mediatek/mt8186): apply erratas for MT8186

MT8186 uses Cortex A76 CPU, so we apply these erratas.

TEST=build pass
BUG=b:202871018

Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Change-Id: I84741535fbe429f664092f624c2da653532204cd

4 years agofeat(plat/mediatek/mt8186): add MCDI drivers
Garmin.Chang [Sun, 14 Nov 2021 02:14:45 +0000 (10:14 +0800)]
feat(plat/mediatek/mt8186): add MCDI drivers

Add MCDI related drivers to handle CPU powered on/off in CPU suspend.

TEST=build pass
BUG=b:202871018

Change-Id: I85aaaf3a0e992a39d17c58f3d9d5ff1b5770f748
Signed-off-by: Garmin.Chang <Garmin.Chang@mediatek.com>
4 years agofeat(plat/mediatek/mt8186): add CPU hotplug
Garmin.Chang [Mon, 8 Nov 2021 03:30:40 +0000 (11:30 +0800)]
feat(plat/mediatek/mt8186): add CPU hotplug

Implement PSCI platform operations to support CPU hotplug and MCDI.

TEST=bringup 8 CPUs successfully on kernel stage.
BUG=b:202871018

Change-Id: Ibd5423b70b3ca3f91edaa48d7ca5bc094e751510
Signed-off-by: Garmin.Chang <Garmin.Chang@mediatek.com>
4 years agofeat(plat/mediatek/mt8186): add RTC drivers
Yuchen Huang [Fri, 12 Nov 2021 08:56:33 +0000 (16:56 +0800)]
feat(plat/mediatek/mt8186): add RTC drivers

Add RTC drivers for EOSC calibration.

TEST=build pass
BUG=b:202871018

Signed-off-by: Yuchen Huang <yuchen.huang@mediatek.corp-partner.google.com>
Change-Id: Ib48c07204c4a614072ba710c042794b59e8a902a

4 years agofix(plat/mediatek/mt8186): extend MMU region size
Rex-BC Chen [Tue, 9 Nov 2021 05:12:03 +0000 (13:12 +0800)]
fix(plat/mediatek/mt8186): extend MMU region size

In mt8186 suspend/resume flow, ATF has to communicate with a subsys by
read/write the subsys registers. However, the register region of subsys
doesn't include in the MMU mapping region. It triggers MMU faults.

This patch extends the MMU region 0 size to cover all mt8186 HW modules.
This patch also remove MMU region 1 because region 0 covers region 1.

TEST=build pass
BUG=b:202871018

Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Change-Id: I520c51338578bd68756cd02603ce6783f93daf51

4 years agofeat(plat/mediatek/mt8186): add DCM driver
Edward-JW Yang [Mon, 1 Nov 2021 12:20:18 +0000 (20:20 +0800)]
feat(plat/mediatek/mt8186): add DCM driver

DCM means dynamic clock management, and it can dynamically
slow down or gate clocks during CPU or bus idle.

1. Add MCUSYS related DCM drivers.
2. Enable MCUSYS related DCM by default.

TEST=build pass
BUG=b:202871018

Signed-off-by: Edward-JW Yang <edward-jw.yang@mediatek.corp-partner.google.com>
Change-Id: Idc669364c89cde0974d2940bd12987ee833d1965

4 years agofeat(plat/mediatek/mt8186): add pinctrl support
Guodong Liu [Fri, 15 Oct 2021 08:52:18 +0000 (16:52 +0800)]
feat(plat/mediatek/mt8186): add pinctrl support

Add MT8186 pinctrl support.

TEST=build pass
BUG=b:202871018

Signed-off-by: Guodong Liu <guodong.liu@mediatek.corp-partner.google.com>
Change-Id: I5b9c1c60a91c74c7d3f45c78a9403544373fa90f

4 years agofeat(plat/mediatek/mt8186): add sys_cirq support
Zhengnan Chen [Tue, 12 Oct 2021 09:05:49 +0000 (17:05 +0800)]
feat(plat/mediatek/mt8186): add sys_cirq support

Add 8186 sys_cirq info.

TEST=build pass
BUG=b:202871018

Signed-off-by: Zhengnan Chen <zhengnan.chen@mediatek.corp-partner.google.com>
Change-Id: Ib8a1c4e995288bf5f7981ea65f27727715fe5787