| /rk3399_ARM-atf/drivers/st/bsec/ |
| H A D | bsec3.c | 33 static uint32_t otp_bank(uint32_t otp) in otp_bank() argument 35 if (otp > STM32MP2_OTP_MAX_ID) { in otp_bank() 39 return (otp & ~BSEC_OTP_MASK) >> BSEC_OTP_BANK_SHIFT; in otp_bank() 42 static uint32_t otp_bit_mask(uint32_t otp) in otp_bit_mask() argument 44 return BIT(otp & BSEC_OTP_MASK); in otp_bit_mask() 71 static bool is_fuse_shadowed(uint32_t otp) in is_fuse_shadowed() argument 73 uint32_t bank = otp_bank(otp); in is_fuse_shadowed() 74 uint32_t otp_mask = otp_bit_mask(otp); in is_fuse_shadowed() 100 static uint32_t check_read_error(uint32_t otp) in check_read_error() argument 105 VERBOSE("BSEC read %u single error correction detected\n", otp); in check_read_error() [all …]
|
| H A D | bsec2.c | 35 static uint32_t bsec_shadow_register(uint32_t otp); 40 static uint32_t bsec_read_permanent_lock(uint32_t otp, bool *value); 83 static void enable_non_secure_access(uint32_t otp) in enable_non_secure_access() argument 85 otp_nsec_access[otp / __WORD_BIT] |= BIT(otp % __WORD_BIT); in enable_non_secure_access() 87 if (bsec_shadow_register(otp) != BSEC_OK) { in enable_non_secure_access() 92 static bool non_secure_can_access(uint32_t otp) in non_secure_can_access() argument 94 return (otp_nsec_access[otp / __WORD_BIT] & in non_secure_can_access() 95 BIT(otp % __WORD_BIT)) != 0U; in non_secure_can_access() 104 uint32_t otp; in bsec_dt_otp_nsec_access() local 119 otp = offset / sizeof(uint32_t); in bsec_dt_otp_nsec_access() [all …]
|
| /rk3399_ARM-atf/include/drivers/st/ |
| H A D | bsec.h | 45 uint32_t bsec_read_otp(uint32_t *val, uint32_t otp); 46 uint32_t bsec_shadow_read_otp(uint32_t *val, uint32_t otp); 47 uint32_t bsec_write_otp(uint32_t val, uint32_t otp); 48 uint32_t bsec_program_otp(uint32_t val, uint32_t otp); 55 uint32_t bsec_set_sr_lock(uint32_t otp); 56 uint32_t bsec_read_sr_lock(uint32_t otp, bool *value); 57 uint32_t bsec_set_sw_lock(uint32_t otp); 58 uint32_t bsec_read_sw_lock(uint32_t otp, bool *value); 59 uint32_t bsec_set_sp_lock(uint32_t otp); 60 uint32_t bsec_read_sp_lock(uint32_t otp, bool *value); [all …]
|
| /rk3399_ARM-atf/plat/st/stm32mp1/include/ |
| H A D | stm32mp1_private.h | 37 static inline uint32_t stm32_otp_read(uint32_t *val, uint32_t otp) in stm32_otp_read() argument 39 return bsec_read_otp(val, otp); in stm32_otp_read() 42 static inline uint32_t stm32_otp_shadow_read(uint32_t *val, uint32_t otp) in stm32_otp_shadow_read() argument 44 return bsec_shadow_read_otp(val, otp); in stm32_otp_shadow_read() 47 static inline uint32_t stm32_otp_write(uint32_t val, uint32_t otp) in stm32_otp_write() argument 49 return bsec_write_otp(val, otp); in stm32_otp_write() 52 static inline uint32_t stm32_otp_set_sr_lock(uint32_t otp) in stm32_otp_set_sr_lock() argument 54 return bsec_set_sr_lock(otp); in stm32_otp_set_sr_lock() 57 static inline uint32_t stm32_otp_read_sw_lock(uint32_t otp, bool *value) in stm32_otp_read_sw_lock() argument 59 return bsec_read_sw_lock(otp, value); in stm32_otp_read_sw_lock()
|
| /rk3399_ARM-atf/plat/st/stm32mp2/include/ |
| H A D | stm32mp2_private.h | 38 static inline uint32_t stm32_otp_read(uint32_t *val, uint32_t otp) in stm32_otp_read() argument 40 return bsec_read_otp(val, otp); in stm32_otp_read() 43 static inline uint32_t stm32_otp_shadow_read(uint32_t *val, uint32_t otp) in stm32_otp_shadow_read() argument 45 return bsec_shadow_read_otp(val, otp); in stm32_otp_shadow_read() 48 static inline uint32_t stm32_otp_write(uint32_t val, uint32_t otp) in stm32_otp_write() argument 50 return bsec_write_otp(val, otp); in stm32_otp_write() 53 static inline uint32_t stm32_otp_set_sr_lock(uint32_t otp) in stm32_otp_set_sr_lock() argument 55 return bsec_set_sr_lock(otp); in stm32_otp_set_sr_lock() 58 static inline uint32_t stm32_otp_read_sw_lock(uint32_t otp, bool *value) in stm32_otp_read_sw_lock() argument 60 return bsec_read_sw_lock(otp, value); in stm32_otp_read_sw_lock()
|
| /rk3399_ARM-atf/plat/st/common/ |
| H A D | stm32mp_dt.c | 327 int dt_find_otp_name(const char *name, uint32_t *otp, uint32_t *otp_len) in dt_find_otp_name() argument 333 if ((name == NULL) || (otp == NULL)) { in dt_find_otp_name() 359 if (otp != NULL) { in dt_find_otp_name() 360 *otp = fdt32_to_cpu(*cuint) / sizeof(uint32_t); in dt_find_otp_name()
|
| H A D | stm32mp_common.c | 194 uint32_t otp; in stm32_get_uid_otp() local 197 if (stm32_get_otp_index(UID_OTP, &otp, &len) != 0) { in stm32_get_uid_otp() 208 if (stm32_otp_shadow_read(&uid[i], i + otp) != BSEC_OK) { in stm32_get_uid_otp()
|
| /rk3399_ARM-atf/plat/rockchip/rk3568/ |
| H A D | platform.mk | 45 -I${RK_PLAT_SOC}/drivers/otp/ \ 89 ${RK_PLAT_SOC}/drivers/otp/otp.c \
|
| /rk3399_ARM-atf/plat/st/stm32mp1/ |
| H A D | stm32mp1_private.c | 633 uint32_t otp; in stm32_iwdg_shadow_update() local 636 if (stm32_get_otp_index(HW2_OTP, &otp, NULL) != 0) { in stm32_iwdg_shadow_update() 652 result = bsec_write_otp(otp_value, otp); in stm32_iwdg_shadow_update() 658 if ((bsec_set_sr_lock(otp) != BSEC_OK) || in stm32_iwdg_shadow_update() 659 (bsec_set_sw_lock(otp) != BSEC_OK)) { in stm32_iwdg_shadow_update()
|
| H A D | bl2_plat_setup.c | 174 uint32_t otp; in update_monotonic_counter() local 180 if (stm32_get_otp_index(MONOTONIC_OTP, &otp, NULL) != 0) { in update_monotonic_counter() 184 if (stm32_get_otp_value_from_idx(otp, &version) != 0) { in update_monotonic_counter() 194 result = bsec_program_otp(version, otp); in update_monotonic_counter()
|
| /rk3399_ARM-atf/fdts/ |
| H A D | stm32mp131.dtsi | 423 cfg0_otp: cfg0-otp@0 { 426 part_number_otp: part-number-otp@4 { 429 monotonic_otp: monotonic-otp@10 { 432 nand_otp: cfg9-otp@24 { 435 nand2_otp: cfg10-otp@28 { 438 uid_otp: uid-otp@34 { 441 hw2_otp: hw2-otp@48 { 450 pkh_otp: pkh-otp@60 { 455 st,non-secure-otp;
|
| H A D | stm32mp151.dtsi | 461 cfg0_otp: cfg0-otp@0 { 464 part_number_otp: part-number-otp@4 { 467 monotonic_otp: monotonic-otp@10 { 470 nand_otp: nand-otp@24 { 473 uid_otp: uid-otp@34 { 476 package_otp: package-otp@40 { 479 hw2_otp: hw2-otp@48 { 488 pkh_otp: pkh-otp@60 { 493 st,non-secure-otp;
|
| H A D | stm32mp251.dtsi | 284 uid_otp: uid-otp@14 { 287 part_number_otp: part-number-otp@24 { 302 package_otp: package-otp@1e8 {
|
| H A D | stm32mp15xx-osd32.dtsi | 162 st,non-secure-otp;
|
| H A D | stm32mp15xx-dkx.dtsi | 34 st,non-secure-otp;
|
| H A D | stm32mp135f-dk.dts | 55 st,non-secure-otp;
|
| H A D | stm32mp157c-ed1.dts | 36 st,non-secure-otp;
|
| H A D | stm32mp15xx-dhcom-som.dtsi | 23 st,non-secure-otp;
|
| H A D | stm32mp157c-odyssey-som.dtsi | 33 st,non-secure-otp;
|
| /rk3399_ARM-atf/plat/st/common/include/ |
| H A D | stm32mp_dt.h | 43 int dt_find_otp_name(const char *name, uint32_t *otp, uint32_t *otp_len);
|