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:
parent
7a2a4ff6ec
commit
8e63e0657b
2 changed files with 4 additions and 6 deletions
|
@ -57,9 +57,3 @@ properties:
|
||||||
- 368000000
|
- 368000000
|
||||||
- 384000000
|
- 384000000
|
||||||
- 400000000
|
- 400000000
|
||||||
|
|
||||||
nordic,ficrs:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
nordic,ficr-names:
|
|
||||||
required: true
|
|
||||||
|
|
|
@ -55,6 +55,8 @@ static void power_domain_init(void)
|
||||||
|
|
||||||
static int trim_hsfll(void)
|
static int trim_hsfll(void)
|
||||||
{
|
{
|
||||||
|
#if defined(HSFLL_NODE)
|
||||||
|
|
||||||
NRF_HSFLL_Type *hsfll = (NRF_HSFLL_Type *)DT_REG_ADDR(HSFLL_NODE);
|
NRF_HSFLL_Type *hsfll = (NRF_HSFLL_Type *)DT_REG_ADDR(HSFLL_NODE);
|
||||||
nrf_hsfll_trim_t trim = {
|
nrf_hsfll_trim_t trim = {
|
||||||
.vsup = sys_read32(FICR_ADDR_GET(HSFLL_NODE, vsup)),
|
.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.COARSE = %d", hsfll->TRIM.COARSE);
|
||||||
LOG_DBG("NRF_HSFLL->TRIM.FINE = %d", hsfll->TRIM.FINE);
|
LOG_DBG("NRF_HSFLL->TRIM.FINE = %d", hsfll->TRIM.FINE);
|
||||||
|
|
||||||
|
#endif /* defined(HSFLL_NODE) */
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue