Skip to content

Commit 8e63e06

Browse files
57300nashif
authored andcommitted
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 <[email protected]>
1 parent 7a2a4ff commit 8e63e06

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

dts/bindings/clock/nordic,nrf-hsfll.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,3 @@ properties:
5757
- 368000000
5858
- 384000000
5959
- 400000000
60-
61-
nordic,ficrs:
62-
required: true
63-
64-
nordic,ficr-names:
65-
required: true

soc/nordic/nrf54h/soc.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ static void power_domain_init(void)
5555

5656
static int trim_hsfll(void)
5757
{
58+
#if defined(HSFLL_NODE)
59+
5860
NRF_HSFLL_Type *hsfll = (NRF_HSFLL_Type *)DT_REG_ADDR(HSFLL_NODE);
5961
nrf_hsfll_trim_t trim = {
6062
.vsup = sys_read32(FICR_ADDR_GET(HSFLL_NODE, vsup)),
@@ -77,6 +79,8 @@ static int trim_hsfll(void)
7779
LOG_DBG("NRF_HSFLL->TRIM.COARSE = %d", hsfll->TRIM.COARSE);
7880
LOG_DBG("NRF_HSFLL->TRIM.FINE = %d", hsfll->TRIM.FINE);
7981

82+
#endif /* defined(HSFLL_NODE) */
83+
8084
return 0;
8185
}
8286

0 commit comments

Comments
 (0)