Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,9 @@
storage_partition: partition@600000 {
reg = <0x600000 DT_SIZE_K(40)>;
};

periphconf_partition: partition@60a000 {
reg = <0x60a000 DT_SIZE_K(8)>;
};
};
};
14 changes: 5 additions & 9 deletions dts/vendor/nordic/nrf9280.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -116,16 +116,12 @@
write-block-size = <16>;
};

cpuapp_uicr: uicr@fff8000 {
compatible = "nordic,nrf-uicr-v2";
uicr: uicr@fff8000 {
compatible = "nordic,nrf-uicr";
reg = <0xfff8000 DT_SIZE_K(2)>;
domain = <2>;
};

cpurad_uicr: uicr@fffa000 {
compatible = "nordic,nrf-uicr-v2";
reg = <0xfffa000 DT_SIZE_K(2)>;
domain = <3>;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0xfff8000 DT_SIZE_K(2)>;
};

ficr: ficr@fffe000 {
Expand Down
4 changes: 2 additions & 2 deletions soc/nordic/common/uicr/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

config NRF_PERIPHCONF_SECTION
bool "Populate global peripheral initialization section"
default y if SOC_NRF54H20_CPUAPP || SOC_NRF54H20_CPURAD
default y if SOC_NRF54H20_CPUAPP || SOC_NRF54H20_CPURAD || SOC_NRF9280_CPUAPP
depends on LINKER_DEVNULL_SUPPORT
imply LINKER_DEVNULL_MEMORY
help
Expand All @@ -12,7 +12,7 @@ config NRF_PERIPHCONF_SECTION

config NRF_PERIPHCONF_GENERATE_ENTRIES
bool "Generate PERIPHCONF entries source file"
default y if SOC_NRF54H20_CPUAPP || SOC_NRF54H20_CPURAD
default y if SOC_NRF54H20_CPUAPP || SOC_NRF54H20_CPURAD || SOC_NRF9280_CPUAPP
depends on NRF_PERIPHCONF_SECTION
depends on NRF_PLATFORM_HALTIUM
help
Expand Down
2 changes: 1 addition & 1 deletion soc/nordic/common/uicr/Kconfig.sysbuild
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

config NRF_HALTIUM_GENERATE_UICR
bool "Generate UICR file"
depends on SOC_SERIES_NRF54HX
depends on SOC_SERIES_NRF54HX || SOC_SERIES_NRF92X
default y
help
Generate UICR HEX file.
47 changes: 43 additions & 4 deletions soc/nordic/common/uicr/gen_periphconf_entries.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""
Copyright (c) 2025 Nordic Semiconductor ASA
SPDX-License-Identifier: Apache-2.0
Expand Down Expand Up @@ -55,11 +55,50 @@
return additional_kwargs


class Family(enum.Enum):
"""Families of SoCs supported by this script"""

SERIES_NRF54HX = "nrf54h"
SERIES_NRF92 = "nrf92"
SERIES_UNKNOWN = "unknown"

@classmethod
def family(cls, soc):
if soc.startswith("nrf54h") and len(soc) == 8:
return cls.SERIES_NRF54HX
elif soc.startswith("nrf92") and len(soc) == 7:
return cls.SERIES_NRF92
else:
return cls.SERIES_UNKNOWN


class Soc(enum.Enum):
"""Names of SoCs supported by this script"""

NRF54H20 = "nrf54h20"
NRF9280 = "nrf9280"
UNKNOWN = "unknown"

@classmethod
def soc(cls, soc):
if soc.startswith("nrf54h20") and len(soc) == 8:
return cls.NRF54H20
elif soc.startswith("nrf9280") and len(soc) == 7:
return cls.NRF9280
else:
return cls.UNKNOWN


def validate_soc_choice(soc):
"""Helper for argparse to validate soc parameter type"""

if (soc.startswith("nrf54h") and soc[6:].isdigit() and len(soc) == 8) or \
(soc.startswith("nrf92") and soc[5:].isdigit() and len(soc) == 7):
return soc
else:
raise argparse.ArgumentTypeError(
f"Invalid soc '{soc}'. Must start with 'nrf54h' or 'nrf92' followed by 2 digits."
)


def parse_args() -> argparse.Namespace:
Expand All @@ -79,8 +118,8 @@
)
parser.add_argument(
"--soc",
type=validate_soc_choice,
required=True,
choices=[soc.value for soc in Soc],
help=(
"SoC to generate PERIPHCONF macros for. "
"Used to look up soc specific hardware information"
Expand All @@ -105,7 +144,7 @@
args = parse_args()
dt = pickle.load(args.in_edt_pickle)
processor = dt_processor_id(dt)
lookup_tables = lookup_tables_get(Soc(args.soc))
lookup_tables = lookup_tables_get(Soc.soc(args.soc), Family.family(args.soc))
builder = PeriphconfBuilder(dt, lookup_tables)

# Application local peripherals
Expand Down Expand Up @@ -135,7 +174,7 @@
args.out_periphconf_source.write(generated_source)


def lookup_tables_get(soc: Soc) -> SocLookupTables:
def lookup_tables_get(soc: Soc, family : Family) -> SocLookupTables:
if soc == Soc.NRF54H20:
ctrlsel_lookup = {
# CAN120
Expand Down Expand Up @@ -427,7 +466,7 @@
NrfPsel(fun=NrfFun.IGNORE, port=2, pin=11): Ctrlsel.CAN,
},
}
elif soc == Soc.NRF9280:
elif soc == Soc.NRF9280 or (soc == Soc.UNKNOWN and family == Family.SERIES_NRF92) :
ctrlsel_lookup = {
# PWM120
0x5F8E_4000: {
Expand Down
2 changes: 1 addition & 1 deletion soc/nordic/validate_base_addresses.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ CHECK_DT_REG(uart134, NRF_UARTE134);
CHECK_DT_REG(uart135, NRF_UARTE135);
CHECK_DT_REG(uart136, NRF_UARTE136);
CHECK_DT_REG(uart137, NRF_UARTE137);
#if !defined(CONFIG_SOC_SERIES_NRF54HX)
#if !defined(CONFIG_SOC_SERIES_NRF54HX) && !defined(CONFIG_SOC_SERIES_NRF92X)
CHECK_DT_REG(uicr, NRF_UICR);
#else
CHECK_DT_REG(uicr, NRF_APPLICATION_UICR);
Expand Down
Loading