- Jan 13, 2021
-
-
Yann Gautier authored
In order to prepare low power use cases, functions are added to manage the entry or exit of DDR from self-refresh mode. Change-Id: I8a1cbc48d613366fca69b4fc6870e53f8b917598 Signed-off-by:
Yann Gautier <yann.gautier@st.com>
-
Yann Gautier authored
In SMP context, we need to add spinlocks to protect against concurrent accesses on PWR registers. Change-Id: I27cb698ffa085eca7b61b042ce5ccaa1fd2daaf4 Signed-off-by:
Yann Gautier <yann.gautier@st.com>
-
Yann Gautier authored
This driver is responsible to manage STM32MP1 Real Time Clock IP. Change-Id: I8bb84cf2a2786be718944d69153f676d57bfbc37 Signed-off-by:
Yann Gautier <yann.gautier@st.com> Signed-off-by:
Nicolas Le Bayon <nicolas.le.bayon@st.com>
-
Yann Gautier authored
Define virtual timer resources for a platform to be able to control virtual timers, even if TF-A does not enable them. This is required for example when the secure world wants to reset the system. Virtual timers enabled from non-secure world can jeopardize the reset sequence due to pending interrupts. Change-Id: Ieb0ce4819809ae9c4ab11f9244a6cacf9437d6b4 Signed-off-by:
Nicolas Le Bayon <nicolas.le.bayon@st.com> Signed-off-by:
Yann Gautier <yann.gautier@st.com>
-
Yann Gautier authored
The CNTFRQ already has a CNTBASEN_ prefix. To be able to use CNTP_CTL from CP15, the CNTP_CTL define is renamed CNTBASEN_CNTP_CTL. To keep consistency, CNTPCT_LO and CNTP_CVAL_LO are also prefixed. Change-Id: Ie328daa694a708130ee369218b57c0f4b08f7f44 Signed-off-by:
Yann Gautier <yann.gautier@st.com>
-
Yann Gautier authored
A new boolean field always_on is added to struct stm32mp_regulator. If it is set to true, then the stm32mp_regulator_disable function will not try to disable the regulator. Change-Id: I1861a02ba12da95beec0469ebc16d66e98beec66 Signed-off-by:
Yann Gautier <yann.gautier@st.com> Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/tf-a/+/151933 Reviewed-by:
CITOOLS <smet-aci-reviews@lists.codex.cro.st.com> Reviewed-by:
Etienne CARRIERE <etienne.carriere@st.com> Reviewed-by:
Antonio Maria BORNEO <antonio.borneo@st.com> Tested-by:
Antonio Maria BORNEO <antonio.borneo@st.com> Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/tf-a/+/152229 Reviewed-by:
CIBUILD <smet-aci-builds@lists.codex.cro.st.com>
-
Lionel Debieve authored
A new seek handler is also created. It will be used for NAND to add an extra offset in case of bad blocks, when FIP is used. Signed-off-by:
Lionel Debieve <lionel.debieve@st.com> Change-Id: I03fb1588b44029db50583c0b2e7af7a1e88a5a7a Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/tf-a/+/175512 Reviewed-by:
CITOOLS <smet-aci-reviews@lists.codex.cro.st.com> Reviewed-by:
Yann GAUTIER <yann.gautier@st.com> Tested-by:
Yann GAUTIER <yann.gautier@st.com>
-
Yann Gautier authored
In case of FIP, the offsets given in the FIP header are relative. If bad blocks are found between the FIP base address and this offset, the offset should be updated taking care of the bad blocks. Change-Id: I96fefabb583b3d030ab05191bae7d45cfeefe341 Signed-off-by:
Yann Gautier <yann.gautier@st.com> Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/tf-a/+/175511 Reviewed-by:
CITOOLS <smet-aci-reviews@lists.codex.cro.st.com> Reviewed-by:
Lionel DEBIEVE <lionel.debieve@st.com>
-
Yann Gautier authored
The security configuration of peripherals is retrieved from device tree file. Change-Id: Iccd846462913cae8784dd6d7d613eb22834936a3 Signed-off-by:
Yann Gautier <yann.gautier@st.com>
-
Yann Gautier authored
In order to use these defines in device tree files, put them in the file st,stm32-etzpc.h in dt-bindings directory. Change-Id: I7f6a2629261e0dd8a3ab6f34f4b0547be69fab66 Signed-off-by:
Yann Gautier <yann.gautier@st.com>
-
Yann Gautier authored
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> Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/tf-a/+/132820 Reviewed-by:
Lionel DEBIEVE <lionel.debieve@st.com> Reviewed-by:
CITOOLS <smet-aci-reviews@lists.codex.cro.st.com> Reviewed-by:
CIBUILD <smet-aci-builds@lists.codex.cro.st.com>
-
Yann Gautier authored
This driver adds dummy regulator functions to be bind if no PMIC is found on the platform, or if a given regulator is not provided by the PMIC. The enable / disable functions do nothing and just return 0. Change-Id: Ic6457c0949d433499da257c92d39bfd024e91495 Signed-off-by:
Yann Gautier <yann.gautier@st.com> Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/tf-a/+/138203 Reviewed-by:
Lionel DEBIEVE <lionel.debieve@st.com> Reviewed-by:
CITOOLS <smet-aci-reviews@lists.codex.cro.st.com> Reviewed-by:
CIBUILD <smet-aci-builds@lists.codex.cro.st.com>
-
Yann Gautier authored
These functions will be used through the stm32mp_regulator framework. The plat_bind_regulator function is updated to manage PMIC. Change-Id: I7d92eb1c4765dc3048c7290a6e3e013b2c5b4203 Signed-off-by:
Yann Gautier <yann.gautier@st.com>
-
Yann Gautier authored
This framework only manages enabling and disabling regulators. Peripheral drivers have to register their regulator with stm32mp_regulator_register function, which calls plat_get_regulator. This function has to be defined at platform level, to bind the regulator ops depending on the regulator ID. The functions stm32mp_regulator_enable and stm32mp_regulator_disable can then be called inside drivers to manage their regulators. Change-Id: I981bc6083015b0e1c307a5a9559573b80f81fc69 Signed-off-by:
Yann Gautier <yann.gautier@st.com> Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/tf-a/+/132817 Tested-by:
Lionel DEBIEVE <lionel.debieve@st.com> Reviewed-by:
Lionel DEBIEVE <lionel.debieve@st.com> Reviewed-by:
CITOOLS <smet-aci-reviews@lists.codex.cro.st.com> Reviewed-by:
CIBUILD <smet-aci-builds@lists.codex.cro.st.com>
-
Yann Gautier authored
In order to have PMIC regulators available for storage drivers, PMIC should be initialized before IO drivers initialization. Change-Id: Ife18ef9510ee13ae090209eca4292496f230783e Signed-off-by:
Yann Gautier <yann.gautier@st.com>
-
Yann Gautier authored
This flag allows switching to High-Speed mode on SD-cards. Change-Id: Ic396c6a14201580b5e5627e6174b85b437b87cae Signed-off-by:
Yann Gautier <yann.gautier@st.com> Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/tf-a/+/140773 Reviewed-by:
CITOOLS <smet-aci-reviews@lists.codex.cro.st.com> Reviewed-by:
CIBUILD <smet-aci-builds@lists.codex.cro.st.com> Reviewed-by:
Lionel DEBIEVE <lionel.debieve@st.com>
-
Yann Gautier authored
For SD-cards, CMD6 is used to switch functions, like setting high speed mode. As it has another meaning for eMMC, and may not work on standard capacity SD-cards, it must be checked with MMC_IS_SD_HC flag. As ACMD6 is also used, and will have the same index, a check on CMD/ACMD commands is done: a boolean is stored depending on previous command. It is set to true if CMD55 is issued, for other commands it is set to false. Change-Id: I6c2b9c7637656f858601ec075de1cb5f57af271a Signed-off-by:
Yann Gautier <yann.gautier@st.com> Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/tf-a/+/135782 Reviewed-by:
CITOOLS <smet-aci-reviews@lists.codex.cro.st.com> Reviewed-by:
CIBUILD <smet-aci-builds@lists.codex.cro.st.com> Reviewed-by:
Lionel DEBIEVE <lionel.debieve@st.com>
-
Yann Gautier authored
On SD-cards, Switch Function Command (CMD6) is used to switch functions, like setting High Speed mode. It is useful for high capacity cards to double frequency (from 25MHz by default to 50MHz). If the SD-card is High Capacity, a CMD6 is issued after filling the device information. If High Speed mode is supported and the switch is OK, then the max_bus_freq can be set to 50MHz. The driver set_ios function should then be called to update peripheral configuration, especially clock prescaler. Change-Id: I2d6807aa7f9440d2b2f907a747cd3b47a2ba1545 Signed-off-by:
Yann Gautier <yann.gautier@st.com> Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/tf-a/+/135783 Reviewed-by:
CITOOLS <smet-aci-reviews@lists.codex.cro.st.com> Reviewed-by:
CIBUILD <smet-aci-builds@lists.codex.cro.st.com> Reviewed-by:
Lionel DEBIEVE <lionel.debieve@st.com>
-
Yann Gautier authored
Change-Id: I3f7c3a1c50608dbd19cc24b13a8af0646bac0d50 Signed-off-by:
Yann Gautier <yann.gautier@st.com> Signed-off-by:
Etienne Carriere <etienne.carriere@st.com> Signed-off-by:
Lionel Debieve <lionel.debieve@st.com> Signed-off-by:
Nicolas LE BAYON <nicolas.le.bayon@st.com>
-
Lionel Debieve authored
In case of backup partition usage, it is easier to pass the image ID as argument to plat_try_next_boot_source() to properly identify and update the corrupted partition to be read. Signed-off-by:
Lionel Debieve <lionel.debieve@st.com> Change-Id: I7b9d19e9ed293f4da0e5cca1439cdd4c0e6785e0
-
Yann Gautier authored
Change-Id: I9a3509cc1bbe131fb38fd33bd86660084c93240a Signed-off-by:
Yann Gautier <yann.gautier@st.com>
-
Yann Gautier authored
This allows using one more register for timeouts in console drivers. Change-Id: Ie4e0d4e09bfc453b637940ab44ef7c2e2bb82982 Signed-off-by:
Yann Gautier <yann.gautier@st.com>
-
Yann Gautier authored
If an image was not loaded due to its SKIP_LOAD attribute, there is no reason to post process the image. This change ensures only loaded images get post processed. Change-Id: Ib9f84f0f1dd7e811ec400fa999c84a15dd9b6297 Signed-off-by:
Etienne Carriere <etienne.carriere@st.com> Signed-off-by:
Yann Gautier <yann.gautier@st.com>
-
Yann Gautier authored
The new helpers are created in STM32MP1 platform for undefined instructions, prefetch and data aborts. Change-Id: Ibe989b28e236693f317cffb0545ea0611b7bdde4 Signed-off-by:
Yann Gautier <yann.gautier@st.com>
-
Yann Gautier authored
New helper functions are created to handle undefined instructions, data & prefetch aborts in AARCH32. They call platform functions, just like what report_exception is doing. Those new helpers are created mainly to distinguish data and prefetch aborts, as they both share the same mode. Change-Id: I5dd31930344ad4e3a658f8a9d366a87a300aeb67 Signed-off-by:
Yann Gautier <yann.gautier@st.com>
-
Yann Gautier authored
For an easier debug on Aarch32, in case of abort, it is useful to access DFSR, IFSR, DFAR and IFAR CP15 registers. Change-Id: Ie6b5a2882cd701f76e9d455ec43bd4b0fbe3cc78 Signed-off-by:
Yann Gautier <yann.gautier@st.com>
-
Lionel Debieve authored
Use bsec_find_otp_name_in_dt() to retrieve platform OTP information from device tree, directly or through stm32_get_otp_index() and stm32_get_otp_value() platform services. String definitions replace hard-coded values, they are used to call this new function. Change-Id: I81213e4a9ad08fddadc2c97b064ae057a4c79561 Signed-off-by:
Nicolas Le Bayon <nicolas.le.bayon@st.com> Signed-off-by:
Yann Gautier <yann.gautier@st.com>
-
Nicolas Le Bayon authored
Set non-secure property on platform secure OTP nodes that non-secure world is allowed to access through secure world services. These are the SoC MAC address and the ST boards board_id OTPs. Change-Id: Idfa6322d9d5c35285706d0b2d32ae09af38684a7 Signed-off-by:
Nicolas Le Bayon <nicolas.le.bayon@st.com> Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/tf-a/+/138264 Reviewed-by:
CITOOLS <smet-aci-reviews@lists.codex.cro.st.com> Reviewed-by:
CIBUILD <smet-aci-builds@lists.codex.cro.st.com> Reviewed-by:
Yann GAUTIER <yann.gautier@st.com>
-
Yann Gautier authored
Rename driver file to BSEC2. Split header file in IP and feature parts. Several corrections and improvements. Change-Id: I1981536398d598d67a19d2d7766dacc18de72ec1 Signed-off-by:
Nicolas Le Bayon <nicolas.le.bayon@st.com> Signed-off-by:
Yann Gautier <yann.gautier@st.com>
-
Yann Gautier authored
A new nvmem_layout node includes nvmem platform-dependent layout information, such as OTP NVMEM cell lists (phandle, name). This list allows easy access to OTP offsets defined in BSEC node, where more OTP definitions with offsets in bytes and length have been added (replace hard-coded values). Each board may redefine this list, especially for board_id info. Change-Id: I910ae671b3bf3320ee6500fecc9ec335ae67bbda Signed-off-by:
Nicolas Le Bayon <nicolas.le.bayon@st.com> Signed-off-by:
Yann Gautier <yann.gautier@st.com>
-
Nicolas Le Bayon authored
Used by driver parsing this node to get information. Change-Id: I50623a497157adf7b9da6fafe8d79f6ff58c0ebc Signed-off-by:
Nicolas Le Bayon <nicolas.le.bayon@st.com> Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/tf-a/+/138267 Reviewed-by:
CITOOLS <smet-aci-reviews@lists.codex.cro.st.com> Reviewed-by:
CIBUILD <smet-aci-builds@lists.codex.cro.st.com> Reviewed-by:
Yann GAUTIER <yann.gautier@st.com>
-
Yann Gautier authored
The monotonic counter is stored in an OTP fuse. A check is done in TF-A. If the TF-A version is incremented, then the counter will be updated in the corresponding OTP. Change-Id: I6e7831300ca9efbb35b4c87706f2dcab35affacb Signed-off-by:
Yann Gautier <yann.gautier@st.com> Signed-off-by:
Mathieu Belou <mathieu.belou@st.com>
-
Yann Gautier authored
TZC400 is configured to raise an interrupt in case of faulty access. Call the new added tzc400_it_handler, in case this interrupt fires. Change-Id: Iaf4fa408a8eff99498042e11e2d6177bad39868c Signed-off-by:
Yann Gautier <yann.gautier@st.com>
-
Yann Gautier authored
Change-Id: Ie9ab1c199a8f12b2c9472d7120efbdf35711284a Signed-off-by:
Yann Gautier <yann.gautier@st.com>
-
Yann Gautier authored
When bit 20 of TZC400 Fail control register is set to 1, it means Privileged access, the macros FAIL_CONTROL_PRIV_PRIV and FAIL_CONTROL_PRIV_UNPRIV are then updated to reflect this. Change-Id: I01e522fded5cf66c9827293ddcf543c79f9e509e Signed-off-by:
Yann Gautier <yann.gautier@st.com> Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/tf-a/+/183494 Reviewed-by:
CITOOLS <smet-aci-reviews@lists.codex.cro.st.com> Reviewed-by:
CIBUILD <smet-aci-builds@lists.codex.cro.st.com> Reviewed-by:
Lionel DEBIEVE <lionel.debieve@st.com>
-
Nicolas Le Bayon authored
Add parameters to fill header version: Two new options are added (m and n) to fill header version major and minor. The default is v1.0 (major = 1, minor = 0) Fix image header on big endian hosts: Three header fields are not properly converted to little endian before assignment, resulting in incorrect header while executing stm32image on big endian hosts. Convert the value of the header fields version_number, image_checksum and edcsa_algorithm to little endian before the assignment. Don't force the base of strtol, since it's able to select the base automatically depending on the prefix of the value. This does not breaks the current build script that extracts the addresses, including the 0x prefix, from the map file. This change helps using stm32image in shell scripts where the addresses can be computed using the shell arithmetic expansion "$((...))", that produces a value in base decimal. The variable stm32image_header is declared with global visibility but is use in one function only, move it as local variable in the function. Fix error message on destination file: The error message on mmap() failure of destination file reports incorrectly information about the source file. Change the error message to match the file that causes the error. Change-Id: Iebc8c915297306845b3847b32f9516443a515c97 Signed-off-by:
Yann Gautier <yann.gautier@st.com> Signed-off-by:
Antonio Borneo <antonio.borneo@st.com>
-
Yann Gautier authored
This is no more tested at the moment, and may require some adaptations. Change-Id: I322cb638f52f7967e39cd8871da3f45ad6e50d23 Signed-off-by:
Yann Gautier <yann.gautier@st.com>
-
Nicolas Le Bayon authored
Add function headers to improve readability. Change-Id: Ia545293f00167b6276331a986ea7aa08c006e004 Signed-off-by:
Nicolas Le Bayon <nicolas.le.bayon@st.com> Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/tf-a/+/142983 Reviewed-by:
CITOOLS <smet-aci-reviews@lists.codex.cro.st.com> Reviewed-by:
CIBUILD <smet-aci-builds@lists.codex.cro.st.com> Reviewed-by:
Yann GAUTIER <yann.gautier@st.com>
-
Patrick Delaunay authored
Support "disabled" status for oscillator. 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 Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/tf-a/+/137347 Reviewed-by:
CITOOLS <smet-aci-reviews@lists.codex.cro.st.com> Reviewed-by:
CIBUILD <smet-aci-builds@lists.codex.cro.st.com> Reviewed-by:
Nicolas LE BAYON <nicolas.le.bayon@st.com> Reviewed-by:
Lionel DEBIEVE <lionel.debieve@st.com> Reviewed-by:
Yann GAUTIER <yann.gautier@st.com> Tested-by:
Yann GAUTIER <yann.gautier@st.com>
-
Yann Gautier authored
Only BL32 (SP_min) is supported at the moment, BL1 and BL2_AT_EL3 are just stubbed with _pie_fixup_size=0. The changes are an adaptation for AARCH32 on what has been done for AARCH64. The RELA_SECTION is redefined for AARCH32, as the created section is .rel.dyn and the symbols are .rel*. In BL32 linker script, .dynsym .dynstr .hash .gnu.hash are discarded. And no more used __BSS_SIZE__ and __COHERENT_RAM_UNALIGNED_SIZE__ symbols are removed. Change-Id: I92bafe70e6b77735f6f890f32f2b637b98cf01b9 Signed-off-by:
Yann Gautier <yann.gautier@st.com> Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/tf-a/+/175515 Reviewed-by:
CITOOLS <smet-aci-reviews@lists.codex.cro.st.com> Reviewed-by:
Lionel DEBIEVE <lionel.debieve@st.com>
-