Skip to content

Commit 67b0e04

Browse files
SebastianBoecfriedt
authored andcommitted
soc: nordic: Update UICR format
Update the C struct for UICR to the latest revision. Signed-off-by: Sebastian Bøe <[email protected]>
1 parent 180f1f8 commit 67b0e04

File tree

1 file changed

+86
-10
lines changed

1 file changed

+86
-10
lines changed

soc/nordic/common/uicr/gen_uicr.py

Lines changed: 86 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,23 +66,38 @@ class Protectedmem(c.LittleEndianStructure):
6666
]
6767

6868

69-
class Recovery(c.LittleEndianStructure):
69+
class Wdtstart(c.LittleEndianStructure):
7070
_pack_ = 1
7171
_fields_ = [
7272
("ENABLE", c.c_uint32),
73-
("PROCESSOR", c.c_uint32),
74-
("INITSVTOR", c.c_uint32),
75-
("SIZE4KB", c.c_uint32),
73+
("INSTANCE", c.c_uint32),
74+
("CRV", c.c_uint32),
75+
]
76+
77+
78+
class SecurestorageCrypto(c.LittleEndianStructure):
79+
_pack_ = 1
80+
_fields_ = [
81+
("APPLICATIONSIZE1KB", c.c_uint32),
82+
("RADIOCORESIZE1KB", c.c_uint32),
7683
]
7784

7885

79-
class Its(c.LittleEndianStructure):
86+
class SecurestorageIts(c.LittleEndianStructure):
87+
_pack_ = 1
88+
_fields_ = [
89+
("APPLICATIONSIZE1KB", c.c_uint32),
90+
("RADIOCORESIZE1KB", c.c_uint32),
91+
]
92+
93+
94+
class Securestorage(c.LittleEndianStructure):
8095
_pack_ = 1
8196
_fields_ = [
8297
("ENABLE", c.c_uint32),
8398
("ADDRESS", c.c_uint32),
84-
("APPLICATIONSIZE", c.c_uint32),
85-
("RADIOCORESIZE", c.c_uint32),
99+
("CRYPTO", SecurestorageCrypto),
100+
("ITS", SecurestorageIts),
86101
]
87102

88103

@@ -104,6 +119,64 @@ class Mpcconf(c.LittleEndianStructure):
104119
]
105120

106121

122+
class SecondaryTrigger(c.LittleEndianStructure):
123+
_pack_ = 1
124+
_fields_ = [
125+
("ENABLE", c.c_uint32),
126+
("RESETREAS", c.c_uint32),
127+
("RESERVED", c.c_uint32),
128+
]
129+
130+
131+
class SecondaryProtectedmem(c.LittleEndianStructure):
132+
_pack_ = 1
133+
_fields_ = [
134+
("ENABLE", c.c_uint32),
135+
("SIZE4KB", c.c_uint32),
136+
]
137+
138+
139+
class SecondaryWdtstart(c.LittleEndianStructure):
140+
_pack_ = 1
141+
_fields_ = [
142+
("ENABLE", c.c_uint32),
143+
("INSTANCE", c.c_uint32),
144+
("CRV", c.c_uint32),
145+
]
146+
147+
148+
class SecondaryPeriphconf(c.LittleEndianStructure):
149+
_pack_ = 1
150+
_fields_ = [
151+
("ENABLE", c.c_uint32),
152+
("ADDRESS", c.c_uint32),
153+
("MAXCOUNT", c.c_uint32),
154+
]
155+
156+
157+
class SecondaryMpcconf(c.LittleEndianStructure):
158+
_pack_ = 1
159+
_fields_ = [
160+
("ENABLE", c.c_uint32),
161+
("ADDRESS", c.c_uint32),
162+
("MAXCOUNT", c.c_uint32),
163+
]
164+
165+
166+
class Secondary(c.LittleEndianStructure):
167+
_pack_ = 1
168+
_fields_ = [
169+
("ENABLE", c.c_uint32),
170+
("PROCESSOR", c.c_uint32),
171+
("TRIGGER", SecondaryTrigger),
172+
("ADDRESS", c.c_uint32),
173+
("PROTECTEDMEM", SecondaryProtectedmem),
174+
("WDTSTART", SecondaryWdtstart),
175+
("PERIPHCONF", SecondaryPeriphconf),
176+
("MPCCONF", SecondaryMpcconf),
177+
]
178+
179+
107180
class Uicr(c.LittleEndianStructure):
108181
_pack_ = 1
109182
_fields_ = [
@@ -114,11 +187,14 @@ class Uicr(c.LittleEndianStructure):
114187
("APPROTECT", Approtect),
115188
("ERASEPROTECT", c.c_uint32),
116189
("PROTECTEDMEM", Protectedmem),
117-
("RECOVERY", Recovery),
118-
("ITS", Its),
119-
("RESERVED2", c.c_uint32 * 7),
190+
("WDTSTART", Wdtstart),
191+
("RESERVED2", c.c_uint32),
192+
("SECURESTORAGE", Securestorage),
193+
("RESERVED3", c.c_uint32 * 5),
120194
("PERIPHCONF", Periphconf),
121195
("MPCCONF", Mpcconf),
196+
("SECONDARY", Secondary),
197+
("PADDING", c.c_uint32 * 15),
122198
]
123199

124200

0 commit comments

Comments
 (0)