Skip to content

Commit ab77320

Browse files
authored
Merge branch 'main' into add_roc_rk3588
2 parents d625540 + be216ba commit ab77320

File tree

799 files changed

+31590
-4233
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

799 files changed

+31590
-4233
lines changed

CMakeLists.txt

Lines changed: 42 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -214,24 +214,53 @@ endif()
214214
# 1) Using EXTRA_CFLAGS which is applied regardless of kconfig choice, or
215215
# 2) Rely on override support being implemented by your toolchain_cc_optimize_*()
216216
#
217-
get_property(OPTIMIZE_FOR_NO_OPTIMIZATIONS_FLAG TARGET compiler PROPERTY no_optimization)
218-
get_property(OPTIMIZE_FOR_DEBUG_FLAG TARGET compiler PROPERTY optimization_debug)
219-
get_property(OPTIMIZE_FOR_SPEED_FLAG TARGET compiler PROPERTY optimization_speed)
220-
get_property(OPTIMIZE_FOR_SIZE_FLAG TARGET compiler PROPERTY optimization_size)
221-
get_property(OPTIMIZE_FOR_SIZE_AGGRESSIVE_FLAG TARGET compiler PROPERTY optimization_size_aggressive)
217+
get_property(COMPILER_OPTIMIZE_FOR_NO_OPTIMIZATIONS_FLAG TARGET compiler PROPERTY no_optimization)
218+
get_property(COMPILER_OPTIMIZE_FOR_DEBUG_FLAG TARGET compiler PROPERTY optimization_debug)
219+
get_property(COMPILER_OPTIMIZE_FOR_SPEED_FLAG TARGET compiler PROPERTY optimization_speed)
220+
get_property(COMPILER_OPTIMIZE_FOR_SIZE_FLAG TARGET compiler PROPERTY optimization_size)
221+
get_property(COMPILER_OPTIMIZE_FOR_SIZE_AGGRESSIVE_FLAG TARGET compiler PROPERTY optimization_size_aggressive)
222+
223+
get_property(ASM_OPTIMIZE_FOR_NO_OPTIMIZATIONS_FLAG TARGET asm PROPERTY no_optimization)
224+
get_property(ASM_OPTIMIZE_FOR_DEBUG_FLAG TARGET asm PROPERTY optimization_debug)
225+
get_property(ASM_OPTIMIZE_FOR_SPEED_FLAG TARGET asm PROPERTY optimization_speed)
226+
get_property(ASM_OPTIMIZE_FOR_SIZE_FLAG TARGET asm PROPERTY optimization_size)
227+
get_property(ASM_OPTIMIZE_FOR_SIZE_AGGRESSIVE_FLAG TARGET asm PROPERTY optimization_size_aggressive)
228+
229+
# Let the assembler inherit the optimization flags of the compiler if it is
230+
# not set explicitly.
231+
if(NOT ASM_OPTIMIZE_FOR_NO_OPTIMIZATIONS_FLAG)
232+
set(ASM_OPTIMIZE_FOR_NO_OPTIMIZATIONS_FLAG ${COMPILER_OPTIMIZE_FOR_NO_OPTIMIZATIONS_FLAG})
233+
endif()
234+
if(NOT ASM_OPTIMIZE_FOR_DEBUG_FLAG)
235+
set(ASM_OPTIMIZE_FOR_DEBUG_FLAG ${COMPILER_OPTIMIZE_FOR_DEBUG_FLAG})
236+
endif()
237+
if(NOT ASM_OPTIMIZE_FOR_SPEED_FLAG)
238+
set(ASM_OPTIMIZE_FOR_SPEED_FLAG ${COMPILER_OPTIMIZE_FOR_SPEED_FLAG})
239+
endif()
240+
if(NOT ASM_OPTIMIZE_FOR_SIZE_FLAG)
241+
set(ASM_OPTIMIZE_FOR_SIZE_FLAG ${COMPILER_OPTIMIZE_FOR_SIZE_FLAG})
242+
endif()
243+
if(NOT ASM_OPTIMIZE_FOR_SIZE_AGGRESSIVE_FLAG)
244+
set(ASM_OPTIMIZE_FOR_SIZE_AGGRESSIVE_FLAG ${COMPILER_OPTIMIZE_FOR_SIZE_AGGRESSIVE_FLAG})
245+
endif()
222246

223247
# From kconfig choice, pick the actual OPTIMIZATION_FLAG to use.
224248
# Kconfig choice ensures only one of these CONFIG_*_OPTIMIZATIONS is set.
225249
if(CONFIG_NO_OPTIMIZATIONS)
226-
set(OPTIMIZATION_FLAG ${OPTIMIZE_FOR_NO_OPTIMIZATIONS_FLAG})
250+
set(COMPILER_OPTIMIZATION_FLAG ${COMPILER_OPTIMIZE_FOR_NO_OPTIMIZATIONS_FLAG})
251+
set(ASM_OPTIMIZATION_FLAG ${ASM_OPTIMIZE_FOR_NO_OPTIMIZATIONS_FLAG})
227252
elseif(CONFIG_DEBUG_OPTIMIZATIONS)
228-
set(OPTIMIZATION_FLAG ${OPTIMIZE_FOR_DEBUG_FLAG})
253+
set(COMPILER_OPTIMIZATION_FLAG ${COMPILER_OPTIMIZE_FOR_DEBUG_FLAG})
254+
set(ASM_OPTIMIZATION_FLAG ${ASM_OPTIMIZE_FOR_DEBUG_FLAG})
229255
elseif(CONFIG_SPEED_OPTIMIZATIONS)
230-
set(OPTIMIZATION_FLAG ${OPTIMIZE_FOR_SPEED_FLAG})
256+
set(COMPILER_OPTIMIZATION_FLAG ${COMPILER_OPTIMIZE_FOR_SPEED_FLAG})
257+
set(ASM_OPTIMIZATION_FLAG ${ASM_OPTIMIZE_FOR_SPEED_FLAG})
231258
elseif(CONFIG_SIZE_OPTIMIZATIONS)
232-
set(OPTIMIZATION_FLAG ${OPTIMIZE_FOR_SIZE_FLAG}) # Default in kconfig
259+
set(COMPILER_OPTIMIZATION_FLAG ${COMPILER_OPTIMIZE_FOR_SIZE_FLAG}) # Default in kconfig
260+
set(ASM_OPTIMIZATION_FLAG ${ASM_OPTIMIZE_FOR_SIZE_FLAG})
233261
elseif(CONFIG_SIZE_OPTIMIZATIONS_AGGRESSIVE)
234-
set(OPTIMIZATION_FLAG ${OPTIMIZE_FOR_SIZE_AGGRESSIVE_FLAG})
262+
set(COMPILER_OPTIMIZATION_FLAG ${COMPILER_OPTIMIZE_FOR_SIZE_AGGRESSIVE_FLAG})
263+
set(ASM_OPTIMIZATION_FLAG ${ASM_OPTIMIZE_FOR_SIZE_AGGRESSIVE_FLAG})
235264
else()
236265
message(FATAL_ERROR
237266
"Unreachable code. Expected optimization level to have been chosen. See Kconfig.zephyr")
@@ -245,9 +274,9 @@ SOC_* symbol.")
245274
endif()
246275

247276
# Apply the final optimization flag(s)
248-
zephyr_compile_options($<$<COMPILE_LANGUAGE:ASM>:${OPTIMIZATION_FLAG}>)
249-
zephyr_compile_options($<$<COMPILE_LANGUAGE:C>:${OPTIMIZATION_FLAG}>)
250-
zephyr_compile_options($<$<COMPILE_LANGUAGE:CXX>:${OPTIMIZATION_FLAG}>)
277+
zephyr_compile_options($<$<COMPILE_LANGUAGE:ASM>:${ASM_OPTIMIZATION_FLAG}>)
278+
zephyr_compile_options($<$<COMPILE_LANGUAGE:C>:${COMPILER_OPTIMIZATION_FLAG}>)
279+
zephyr_compile_options($<$<COMPILE_LANGUAGE:CXX>:${COMPILER_OPTIMIZATION_FLAG}>)
251280

252281
if(CONFIG_LTO)
253282
zephyr_compile_options($<TARGET_PROPERTY:compiler,optimization_lto>)

MAINTAINERS.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,8 @@ Bluetooth HCI:
513513
- sjanc
514514
- HoZHel
515515
- cvinayak
516+
- PavelVPV
517+
- HaavardRei
516518
files:
517519
- include/zephyr/drivers/bluetooth/
518520
- include/zephyr/drivers/bluetooth.h
@@ -537,6 +539,8 @@ Bluetooth Host:
537539
- sjanc
538540
- Thalley
539541
- cvinayak
542+
- PavelVPV
543+
- HaavardRei
540544
files:
541545
- doc/connectivity/bluetooth/
542546
- include/zephyr/bluetooth/
@@ -5675,8 +5679,7 @@ West:
56755679
maintainers:
56765680
- aescolar
56775681
collaborators:
5678-
- wopu-ot
5679-
- thoh-ot
5682+
- rugeGerritsen
56805683
files: []
56815684
labels:
56825685
- "area: native port"

arch/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,16 @@ config USERSPACE
316316
privileged mode or handling a system call; to ensure these are always
317317
caught, enable CONFIG_HW_STACK_PROTECTION.
318318

319+
config NOINIT_SNIPPET_FIRST
320+
bool "Place the no-init linker script snippet first"
321+
help
322+
By default the include/zephyr/linker/common-noinit.ld file inserts the
323+
snippets-noinit.ld file at the end of the section. There are times when
324+
the directives in the snippets-noinit.ld file apply to the other directives
325+
in this file. And in that case the include statement for the snippets-noinit.ld
326+
file needs to come at the start of the section. This configuration option
327+
allows that to happen.
328+
319329
config PRIVILEGED_STACK_SIZE
320330
int "Size of privileged stack"
321331
default 2048 if EMUL

arch/arm/core/cortex_m/pm_s2ram.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*
22
* Copyright (c) 2022, Carlo Caione <[email protected]>
3+
* Copyright (c) 2025 Nordic Semiconductor ASA
34
*
45
* SPDX-License-Identifier: Apache-2.0
56
*/
@@ -14,7 +15,18 @@
1415
/**
1516
* CPU context for S2RAM
1617
*/
17-
__noinit _cpu_context_t _cpu_context;
18+
19+
#if DT_NODE_EXISTS(DT_NODELABEL(pm_s2ram)) &&\
20+
DT_NODE_HAS_COMPAT(DT_NODELABEL(pm_s2ram), zephyr_memory_region)
21+
22+
/* Linker section name is given by `zephyr,memory-region` property of
23+
* `zephyr,memory-region` compatible DT node with nodelabel `pm_s2ram`.
24+
*/
25+
__attribute__((section(DT_PROP(DT_NODELABEL(pm_s2ram), zephyr_memory_region))))
26+
#else
27+
__noinit
28+
#endif
29+
_cpu_context_t _cpu_context;
1830

1931
#ifndef CONFIG_PM_S2RAM_CUSTOM_MARKING
2032
/**

arch/rx/core/vects.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <zephyr/irq.h>
99
#include <kswap.h>
1010
#include <zephyr/tracing/tracing.h>
11+
#include <zephyr/drivers/clock_control/renesas_rx_cgc.h>
1112

1213
typedef void (*fp)(void);
1314
extern void _start(void);
@@ -24,6 +25,14 @@ extern void z_rx_irq_exit(void);
2425

2526
#define __ISR__ __attribute__((interrupt, naked))
2627

28+
#define SET_OFS1_HOCO_BITS(reg, freq) \
29+
((reg) & ~(0b11 << 12)) | ((((freq) == 24000000 ? 0b10 \
30+
: (freq) == 32000000 ? 0b11 \
31+
: (freq) == 48000000 ? 0b01 \
32+
: (freq) == 64000000 ? 0b00 \
33+
: 0b11) \
34+
<< 12))
35+
2736
static ALWAYS_INLINE void REGISTER_SAVE(void)
2837
{
2938
__asm volatile(
@@ -421,7 +430,9 @@ const void *FixedVectors[] FVECT_SECT = {
421430
/* Reserved for OFSM */
422431
(fp)0xFFFFFFFF,
423432
(fp)0xFFFFFFFF,
424-
(fp)0xFFFFFFFF,
433+
(fp)(SET_OFS1_HOCO_BITS(
434+
0xFFFFFFFF,
435+
(RX_CGC_PROP_HAS_STATUS_OKAY_OR(DT_NODELABEL(hoco), clock_frequency, 32000000)))),
425436
(fp)0xFFFFFFFF,
426437
/* Reserved area */
427438
(fp)0xFFFFFFFF,

boards/arduino/nano_matter/Kconfig.arduino_nano_matter

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
# SPDX-License-Identifier: Apache-2.0
66

77
config BOARD_ARDUINO_NANO_MATTER
8-
select SOC_PART_NUMBER_MGM240SD22VNA
8+
select SOC_MGM240SD22VNA

boards/arduino/nano_matter/arduino_nano_matter.dts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@
176176
};
177177

178178
&gpio {
179-
location-swo = <0>;
180179
status = "okay";
181180
};
182181

boards/arduino/portenta_c33/arduino_portenta_c33.dts

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,39 @@
9595
};
9696
};
9797

98-
&option_setting_s {
98+
&option_setting_ofs0 {
9999
status = "disabled";
100100
};
101101

102-
&option_setting_sas {
102+
&option_setting_dualsel {
103103
status = "disabled";
104104
};
105105

106-
&option_setting_ofs {
106+
&option_setting_ofs1_sec {
107+
status = "disabled";
108+
};
109+
110+
&option_setting_banksel_sec {
111+
status = "disabled";
112+
};
113+
114+
&option_setting_bps_sec {
115+
status = "disabled";
116+
};
117+
118+
&option_setting_pbps_sec {
119+
status = "disabled";
120+
};
121+
122+
&option_setting_ofs1_sel {
123+
status = "disabled";
124+
};
125+
126+
&option_setting_banksel_sel {
127+
status = "disabled";
128+
};
129+
130+
&option_setting_bps_sel {
107131
status = "disabled";
108132
};
109133

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Copyright (c) 2025 Ayush Singh, BeagleBoard.org Foundation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if BOOTLOADER_MCUBOOT
5+
6+
choice MCUBOOT_MODE
7+
prompt "Mode of operation"
8+
default MCUBOOT_MODE_SWAP_SCRATCH
9+
10+
endchoice
11+
12+
endif # BOOTLOADER_MCUBOOT

boards/beagle/beagleconnect_freedom/beagleconnect_freedom.dts

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
zephyr,flash = &flash0;
3434
zephyr,ieee802154 = &ieee802154g;
3535
zephyr,code-partition = &slot0_partition;
36+
zephyr,uart-mcumgr = &uart0;
3637
};
3738

3839
gpio_keys {
@@ -100,17 +101,19 @@
100101
#address-cells = <1>;
101102
#size-cells = <1>;
102103

103-
/* Allocate 128 KiB for mcuboot */
104+
/* Allocate 56 KiB for mcuboot */
104105
boot_partition: partition@0 {
105106
label = "mcuboot";
106-
reg = <0x00000000 0x00020000>;
107+
reg = <0x00000000 DT_SIZE_K(56)>;
107108
};
108109

109-
/* Allocate 568 KiB for application (avoid touching CCFG) */
110-
slot0_partition: partition@20000 {
110+
/* Allocate 640 KiB for application */
111+
slot0_partition: partition@e000 {
111112
label = "image-0";
112-
reg = <0x00020000 0x0008e000>;
113+
reg = <0x0000e000 DT_SIZE_K(640)>;
113114
};
115+
116+
/* (avoid touching CCFG) */
114117
};
115118
};
116119

@@ -169,7 +172,8 @@
169172
compatible = "jedec,spi-nor";
170173
reg = <0>;
171174
spi-max-frequency = <2000000>;
172-
size = <0x200000>;
175+
// Size (2 MiB) is in bits
176+
size = <0x1000000>;
173177
//has-be32k;
174178
has-dpd;
175179
t-enter-dpd = <20000>;
@@ -181,22 +185,21 @@
181185
#address-cells = <1>;
182186
#size-cells = <1>;
183187

184-
/* Allocate 568 KiB for application */
188+
/* Allocate 640 KiB for application */
185189
slot1_partition: partition@0 {
186190
label = "image-1";
187-
reg = <0x00000000 0x0008e000>;
191+
reg = <0x00000000 DT_SIZE_K(640)>;
188192
};
189193

190194
/* Allocate 128 KiB scratch for image swap */
191-
scratch_partition: partition@8e000 {
195+
scratch_partition: partition@A0000 {
192196
label = "image-scratch";
193-
reg = <0x0008e000 0x00020000>;
197+
reg = <0x000a0000 DT_SIZE_K(128)>;
194198
};
195199

196-
/* Allocate 1 MiB storage partition */
197-
storage_partition: partition@ae000 {
200+
storage_partition: partition@c0000 {
198201
label = "storage";
199-
reg = <0x000ae000 DT_SIZE_K(1024)>;
202+
reg = <0x000c0000 DT_SIZE_K(1280)>;
200203
};
201204
};
202205
};

0 commit comments

Comments
 (0)