- 12 Jan, 2021 1 commit
-
-
Rajan Vaja authored
ATF is not checking PM version. Add version check in such a way that it is compatible with current and newer version of PM. Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com> Change-Id: Ia095d118121e6f75e8d320e87d5e2018068fa079
-
- 11 Jan, 2021 4 commits
-
-
Marek Behún authored
The current configuration of CPU windows on Armada 37x0 with 4 GB DRAM can only utilize 3.375 GB of memory. This is because there are only 5 configuration windows, configured as such (in hexadecimal, also showing ranges not configurable by CPU windows): 0 - 80000000 | 2 GB | DDR | CPU window 0 80000000 - C0000000 | 1 GB | DDR | CPU window 1 C0000000 - D0000000 | 256 MB | DDR | CPU window 2 D0000000 - D2000000 | 32 MB | | Internal regs empty space | | | D8000000 - D8010000 | 64 KB | | CCI regs empty space | | | E0000000 - E8000000 | 128 MB | DDR | CPU window 3 E8000000 - F0000000 | 128 MB | PCIe | CPU window 4 empty space | | | FFF00000 - end | 64 KB | | Boot ROM This can be improved by taking into account that: - CCI window can be moved (the base address is only hardcoded in TF-A; U-Boot and Linux will not break with changing of this address) - PCIe window can be moved (upstream U-Boot can change device-tree ranges of PCIe if PCIe window is moved) Change the layout after the Internal regs as such: D2000000 - F2000000 | 512 MB | DDR | CPU window 3 F2000000 - FA000000 | 128 MB | PCIe | CPU window 4 empty space | | | FE000000 - FE010000 | 64 KB | | CCI regs empty space | | | FFF00000 - end | 64 KB | | Boot ROM (Note that CCI regs base address is moved from D8000000 to FE000000 in all cases, not only for the configuration with 4 GB of DRAM. This is because TF-A is built with this address as a constant, so we cannot change this address at runtime only on some boards.) This yields 3.75 GB of usable RAM. Moreover U-Boot can theoretically reconfigure the PCIe window to DDR if it discovers that no PCIe card is connected. This can add another 128 MB of DRAM (resulting only in 128 MB of DRAM not being used). Signed-off-by: Marek Behún <marek.behun@nic.cz> Change-Id: I4ca1999f852f90055fac8b2c4f7e80275a13ad7e
-
Aditya Angadi authored
Reference Design platform RD-Daniel-ConfigXLR has been renamed to RD-V1-MC. Correspondingly, remove all uses of 'rddanielxlr' and replace it with 'rdv1mc' where appropriate. Signed-off-by: Aditya Angadi <aditya.angadi@arm.com> Change-Id: I5d91c69738397b19ced43949b4080c74678e604c
-
Aditya Angadi authored
Reference Design platform RD-Daniel has been renamed to RD-V1. Correspondingly, remove all uses of 'rddaniel' and replace it with 'rdv1' where appropriate. Signed-off-by: Aditya Angadi <aditya.angadi@arm.com> Change-Id: I1702bab39c501f8c0a09df131cb2394d54c83bcf
-
Venkatesh Yadav Abbarapu authored
This patch fixes the non compliant code like missing braces for conditional single statement bodies. Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@xilinx.com> Change-Id: I95b410ae5950f85dc913c4448fcd0a97e0fd490c
-
- 05 Jan, 2021 1 commit
-
-
Marek Behún authored
Introduce a new build option CM3_SYSTEM_RESET for A3700 platform, which, when enabled, adds code to the PSCI reset handler to try to do system reset by the WTMI firmware running on the Cortex-M3 secure coprocessor. (This function is exposed via the mailbox interface.) The reason is that the Turris MOX board has a HW bug which causes reset to hang unpredictably. This issue can be solved by putting the board in a specific state before reset. Signed-off-by: Marek Behún <marek.behun@nic.cz> Change-Id: I3f60b9f244f334adcd33d6db6a361fbc8b8d209f
-
- 04 Jan, 2021 3 commits
-
-
Venkatesh Yadav Abbarapu authored
Adding the EM specific smc handler for the EM-related requests. Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@xilinx.com> Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com> Change-Id: I98122d49604a01a2f6bd1e509a5896ee68069dd0
-
VNSL Durga authored
This patch adds new api to access zynqmp efuse memory Signed-off-by: VNSL Durga <vnsl.durga.challa@xilinx.com> Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com> Change-Id: I0971ab6549552a6f96412431388d19b822db00ab
-
Kalyani Akula authored
This patch adds new zynqmp-pm api to provide read/write access to CSU or PMU global registers. Signed-off-by: Kalyani Akula <kalyania@xilinx.com> Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com> Change-Id: I4fd52eb732fc3e6a8bccd96cad7dc090b2161042
-
- 29 Dec, 2020 1 commit
-
-
Alexei Fedorov authored
This patch fixes AXG platform build error: plat/amlogic/axg/axg_pm.c: In function 'axg_pwr_domain_off': plat/amlogic/axg/axg_pm.c:124:43: error: array subscript 2 is above array bounds of 'const plat_local_state_t[2]' {aka 'const unsigned char[2]'} by changing PLAT_MAX_PWR_LVL from MPIDR_AFFLVL1 to MPIDR_AFFLVL2 in plat\amlogic\axg\include\platform_def.h. Change-Id: I9a701e8f26231e62f844920aec5830664f3fb324 Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
-
- 23 Dec, 2020 8 commits
-
-
Andrew F. Davis authored
Add device support for the 'lite' K3 devices. These will use modified device addresses and allow for fewer cores to save memory. Note: This family of devices are characterized by a single cluster of ARMv8 processor upto a max of 4 processors and lack of a level 3 cache. The first generation of this family is introduced with AM642. See AM64X Technical Reference Manual (SPRUIM2, Nov 2020) for further details: https://www.ti.com/lit/pdf/spruim2 Signed-off-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com> Change-Id: I8cd2c1c9a9434646d0c72fca3162dd5bc9bd692a
-
Nishanth Menon authored
There are two communication scheme that have been enabled to communicate with Secure Proxy in TI. a) A full fledged prioritized communication scheme, which involves upto 5 threads from the perspective of the host software b) A much simpler "lite" version which is just a two thread scheme involving just a transmit and receive thread scheme. The (a) system is specifically useful when the SoC is massive involving multiple processor systems and where the potential for priority inversion is clearly a system usecase killer. However, this comes with the baggage of significant die area for larger number of instances of secure proxy, ring accelerator and backing memories for queued messages. Example SoCs using this scheme would be: AM654[1], J721E[2], J7200[3] etc. The (b) scheme(aka the lite scheme) is introduced on smaller SoCs where memory and area concerns are paramount. The tradeoff of priority loss is acceptable given the reduced number of processors communicating with the central system controller. This brings about a very significant area and memory usage savings while the loss of communication priority has no demonstrable impact. Example SoC using this scheme would be: AM642[4] While we can detect using JTAG ID and conceptually handle things dynamically, adding such a scheme involves a lot of unused data (cost of ATF memory footprint), pointer lookups (performance cost) and still due to follow on patches, does'nt negate the need for a different build configuration. However, (a) and (b) family of SoCs share the same scheme and addresses etc, this helps minimize our churn quite a bit Instead of introducing a complex data structure lookup scheme, lets keep things simple by first introducing the pieces necessary for an alternate communication scheme, then introduce a second platform representing the "lite" family of K3 processors. NOTE: This is only possible since ATF uses just two (secure) threads for actual communication with the central system controller. This is sufficient for the function that ATF uses. The (a) scheme and the (b) scheme also varies w.r.t the base addresses used, even though the memory window assigned for them have remained consistent. We introduce the delta as part of this change as well. This is expected to remain consistent as a standard in TI SoCs. References: [1] See AM65x Technical Reference Manual (SPRUID7, April 2018) for further details: https://www.ti.com/lit/pdf/spruid7 [2] See J721E Technical Reference Manual (SPRUIL1, May 2019) for further details: https://www.ti.com/lit/pdf/spruil1 [3] See J7200 Technical Reference Manual (SPRUIU1, June 2020) for further details: https://www.ti.com/lit/pdf/spruiu1 [4] See AM64X Technical Reference Manual (SPRUIM2, Nov 2020) for further details: https://www.ti.com/lit/pdf/spruim2 Signed-off-by: Nishanth Menon <nm@ti.com> Change-Id: I697711ee0e6601965015ddf950fdfdec8e759bfc
-
Nishanth Menon authored
commit 65f7b817 ("ti: k3: common: Use coherent memory for shared data") introduced WARMBOOT_ENABLE_DCACHE_EARLY and USE_COHERENT_MEM to handle multiple clusters across L3 cache systems. This is represented by "generic" board in k3 platform. On "lite" platforms, however, system level coherency is lacking since we don't have a global monitor or an L3 cache controller. Though, at a cluster level, ARM CPU level coherency is very much possible since the max number of clusters permitted in lite platform configuration is "1". However, we need to be able to disable USE_COHERENT_MEM for the lite configuration due to the lack of system level coherency. See docs/getting_started/build-options.rst for further information. Signed-off-by: Nishanth Menon <nm@ti.com> Change-Id: I4a0ec150b3f9ea12369254aef834a6cbe82d6be6
-
Suman Anna authored
The ti_sci_msg_req_reboot message payload has been extended to include a domain field, and this should be zero to reset the entire SoC with System Firmwares newer than v2020.04. Add the domain field to the ti_sci_msg_req_reboot message structure for completeness. Set it up to zero to fix the reboot issues with newer firmwares. This takes care of the specific ABI that changed and has an impact on ATF function. Signed-off-by: Suman Anna <s-anna@ti.com> Signed-off-by: Dave Gerlach <d-gerlach@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com> Change-Id: I4f8064b9d6555687822dc2b2b8ec97609286fa0b
-
Nishanth Menon authored
Sec proxy data buffer is 60 bytes with the last of the registers indicating transmission completion. This however poses a bit of a challenge. The backing memory for sec_proxy is regular memory, and all sec proxy does is to trigger a burst of all 60 bytes of data over to the target thread backing ring accelerator. It doesn't do a memory scrub when it moves data out in the burst. When we transmit multiple messages, remnants of previous message is also transmitted which results in some random data being set in TISCI fields of messages that have been expanded forward. The entire concept of backward compatibility hinges on the fact that the unused message fields remain 0x0 allowing for 0x0 value to be specially considered when backward compatibility of message extension is done. So, instead of just writing the completion register, we continue to fill the message buffer up with 0x0 (note: for partial message involving completion, we already do this). This allows us to scale and introduce ABI changes back into TF-A only as needed. Signed-off-by: Nishanth Menon <nm@ti.com> Change-Id: Ie22cb2a319f4aa80aef23ffc7e059207e5d4c640
-
Nishanth Menon authored
ARM's generic timer[1] picks up it's graycode from GTC. However, the frequency of the GTC is supposed to be programmed in CNTFID0[2] register. In K3, architecture, GTC provides a central time to many parts of the SoC including graycode to the generic timer in the ARMv8 subsystem. However, due to the central nature and the need to enable the counter early in the boot process, the R5 based bootloader enables GTC and programs it's frequency based on central needs of the system. This may not be a constant 200MHz based on the system. The bootloader is supposed to program the FID0 register with the correct frequency it has sourced for GTC from the central system controller, and TF-A is supposed to use that as the frequency for it's local timer. A mismatch in programmed frequency and what we program for generic timer will, as we can imagine, all kind of weird mayhem. So, check the CNTFID0 register, if it is 0, warn and use the default frequency to continue the boot process. While at it, we can also check CNTCR register to provide some basic diagnostics to make sure that we don't have OS folks scratch their heads. Even though this is used during cpu online operations, the cost of this additional check is minimal enough for us not to use #ifdeffery with DEBUG flags. [1] https://developer.arm.com/documentation/100095/0002/generic-timer/generic-timer-register-summary/aarch64-generic-timer-register-summary [2] https://developer.arm.com/docs/ddi0595/h/external-system-registers/cntfid0 [3] https://developer.arm.com/docs/ddi0595/h/external-system-registers/cntcr Signed-off-by: Nishanth Menon <nm@ti.com> Change-Id: Ib03e06788580f3540dcb1a11677d0d6d398b2c9f
-
Nishanth Menon authored
The CatB erratum ARM_ERRATA_A72_1319367 applies to all TI A72 platforms as well. See the following for further information: https://developer.arm.com/documentation/epm012079/11/ Signed-off-by: Nishanth Menon <nm@ti.com> Change-Id: I80c6262b9cdadcb12f6dfd5a21272989ba257719
-
Nishanth Menon authored
The CatB erratum ARM_ERRATA_A53_1530924 applies to all TI A53 platforms as well. See the following for further information: https://developer.arm.com/documentation/epm048406/2100 Signed-off-by: Nishanth Menon <nm@ti.com> Change-Id: Ic095424ce510139e060b38cfb84509d2cc573cad
-
- 16 Dec, 2020 5 commits
-
-
Yuchen Huang authored
add mt6359p rtc power off sequence and enable k_eosc mode Signed-off-by: Yuchen Huang <yuchen.huang@mediatek.com> Change-Id: I65450c63c44ccb5082541dbbe28b8aa0a95ecc56
-
Yidi Lin authored
CID 364146: Control flow issues (DEADCODE) Since the value of PSTATE_PWR_LVL_MASK and the value the of PLAT_MAX_PWR_LVL are equal on mt8192, the following equation never hold. if (aff_lvl > PLAT_MAX_PWR_LVL) { return PSCI_E_INVALID_PARAMS; } Remove the deadcode to comply with MISRA standard. Signed-off-by: Yidi Lin <yidi.lin@mediatek.com> Change-Id: I71d0aa826eded8c3b5af961e733167ae40699398
-
Yidi Lin authored
CID 364144: Integer handling issues (NO_EFFECT) The unsigned value is always greater-than-or-equal-to-zero. Remove such check. Change-Id: Ia395eb32f55a7098d2581ce7f548b7e1112beaa0 Signed-off-by: Yidi Lin <yidi.lin@mediatek.com>
-
Xi Chen authored
1 Add Domain1(PCIe device) protect address: 0x80000000~0x83FF0000. 2 Add Domain2(SSPM/SPM/DPM/MCUPM) protect address: 0x40000000~0x1FFFF0000. Signed-off-by: Xi Chen <xixi.chen@mediatek.com> Change-Id: I4aaed37150076ae5943484c4adadac999a3d1762
-
Vijayenthiran Subramaniam authored
RD-N2 platform has been updated to use six GIC ITS blocks. This results in change in base address of the GIC Redistributor to accomodate two new GIC ITS blocks. Update the base address of GICR to reflect the same. Signed-off-by: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com> Change-Id: I740a547328fb9a9f25d7a09c08e61bdbc8bf781c
-
- 15 Dec, 2020 4 commits
-
-
Mirela Simonovic authored
Functions are reimplemented to issue system-level pinctrl EEMI calls to the PMU-FW rather than using MMIO read/write. Macros and functions that appear to be unused after the change is made are removed. Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com> Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com> Change-Id: I51f2285a79f202cb2ca9f031044002e16dd1e92f
-
Mirela Simonovic authored
Functions are reimplemented to issue system-level pinctrl EEMI calls to the PMU-FW rather than using MMIO read/write. Macros and functions that appear to be unused after the change is made are removed. Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com> Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com> Change-Id: I21b8fda855aa69090b85d6aaf411e19560201cb5
-
Mirela Simonovic authored
The calls are just passed through to the PMU-FW. Before issuing other pinctrl functions the pin should be successfully requested. Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com> Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com> Change-Id: Ibce280edebedf779b3962009c274d0b3d928e0e4
-
Rajan Vaja authored
In pm_query_data() function return type is stored in response so there is no use of return type. Update return type of function pm_query_data() from enum pm_ret_status to void. Similarly update return type of pm_api_clock_get_name() and pm_api_pinctrl_get_function_name() functions. Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com> Change-Id: Id811926f0b4ebcc472480bb94f3b88109eb036cd
-
- 14 Dec, 2020 9 commits
-
-
Arunachalam Ganapathy authored
This patch adds support to enable OP-TEE as S-EL1 SP with SPMC at S-EL2 - create SPMC manifest file with OP-TEE as SP - add support for ARM_SPMC_MANIFEST_DTS build option - add optee entry with ffa as method in tc0.dts Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com> Change-Id: Ia9b5c22c6f605d3886914bbac8ac45e8365671cb
-
Arunachalam Ganapathy authored
Enable SPD=opteed support for tc0 platform. Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com> Change-Id: Ieb038d645c68fbe6b5a211c7279569e21b476fc3
-
Samuel Holland authored
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>
-
Samuel Holland authored
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
-
Samuel Holland authored
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
-
Samuel Holland authored
BL31 reports the following warning during boot: WARNING: BL31: cortex_a53: CPU workaround for 1530924 was missing! Resolve this by enabling the workaround on the affected platforms. Change-Id: Ia1d5075370be5ae67b7bece96ec0069d9692b14c Signed-off-by: Samuel Holland <samuel@sholland.org>
-
Samuel Holland authored
While the Allwinner platform code nominally supported a custom PRELOADED_BL33_BASE, some references to the BL33 load address used another constant: PLAT_SUNXI_NS_IMAGE_OFFSET. To allow the DTB search code to work if a U-Boot BL33 is loaded to a custom address, consistently use PRELOADED_BL33_BASE. And to avoid this confusion in the future, remove the other constant. Signed-off-by: Samuel Holland <samuel@sholland.org> Change-Id: Ie6b97ae1fdec95d784676aef39200bef161471b0
-
Samuel Holland authored
The H6 has a "secure port controller" similar to the A64/H5, but with more ports and a different register layout. Split the platform-specific parts out into a header, and add the missing MMIO base address. Signed-off-by: Samuel Holland <samuel@sholland.org> Change-Id: I3703868bc595459ecf9568b9d1605cb1be014bf5
-
Samuel Holland authored
H6 has a reorganized R_PRCM compared to A64/H5, with the security switch at a different offset. Until now, we did not notice, because the switch has no effect unless the secure mode e-fuse is blown. Since we are adding more platform-specific CCU registers, move them to their own header, and out of the memory map (where they do not belong). Signed-off-by: Samuel Holland <samuel@sholland.org> Change-Id: Ie77476db0515080954eaa2e32bf6c3de657cda86
-
- 10 Dec, 2020 3 commits
-
-
Sai Krishna Potthuri authored
This patch disable the ITAPDLYENA bit for ITAP delay value zero. As per IP design, it is recommended to disable the ITAPDLYENA bit before auto-tuning. Also disable OTAPDLYENA bit always as there is one issue in RTL where SD0_OTAPDLYENA has been wrongly connected to both SD0 and SD1 controllers. Hence it is recommended to disable OTAPDLYENA bit always for both the controllers. Signed-off-by: Sai Krishna Potthuri <lakshmi.sai.krishna.potthuri@xilinx.com> Acked-by: Srinivas Goud <srinivas.goud@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Change-Id: Icf035cb63510ac7bec4e9d523a622f145eaf0989
-
Sai Krishna Potthuri authored
This patch check for the DLL status before doing the DLL reset. If DLL reset is already issued then skip the reset inside ATF otherwise DLL reset will be issued. By doing this way, all the following cases will be supported. 1. Patched ATF + Patched Linux base. 2. Older ATF + Patched Linux base. 3. Patched ATF + Older Linux base. Signed-off-by: Sai Krishna Potthuri <lakshmi.sai.krishna.potthuri@xilinx.com> Acked-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Change-Id: I53a0a27521330f1543275cc9cb44cd1dfc569c65
-
Manish Pandey authored
Signed-off-by: Manish Pandey <manish.pandey2@arm.com> Change-Id: Icef550072296d6aba89a0827dd72d0b86047556f
-
- 09 Dec, 2020 1 commit
-
-
Aditya Angadi authored
Add the initial board support for RD-N2 platform. Change-Id: I8325885bf248dd92191d6fc92a2da91c23118f8c Signed-off-by: Aditya Angadi <aditya.angadi@arm.com>
-