soc: nordic: nrf54h20: Make HSFLL trims optional

If no HSFLL needs trimming, then `trim_hsfll()` should be compiled out.
This makes it easier to reuse the rest of `soc.c` out of tree.

Furthermore, some HSFLL instances can be trimmed before booting Zephyr,
so the FICR client properties in the DT binding should not be required.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
This commit is contained in:
Grzegorz Swiderski 2024-04-16 10:46:32 +02:00 committed by Anas Nashif
commit 8e63e0657b
2 changed files with 4 additions and 6 deletions

View file

@ -57,9 +57,3 @@ properties:
- 368000000
- 384000000
- 400000000
nordic,ficrs:
required: true
nordic,ficr-names:
required: true

View file

@ -55,6 +55,8 @@ static void power_domain_init(void)
static int trim_hsfll(void)
{
#if defined(HSFLL_NODE)
NRF_HSFLL_Type *hsfll = (NRF_HSFLL_Type *)DT_REG_ADDR(HSFLL_NODE);
nrf_hsfll_trim_t trim = {
.vsup = sys_read32(FICR_ADDR_GET(HSFLL_NODE, vsup)),
@ -77,6 +79,8 @@ static int trim_hsfll(void)
LOG_DBG("NRF_HSFLL->TRIM.COARSE = %d", hsfll->TRIM.COARSE);
LOG_DBG("NRF_HSFLL->TRIM.FINE = %d", hsfll->TRIM.FINE);
#endif /* defined(HSFLL_NODE) */
return 0;
}