1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/sys
bors[bot] 3469fce248
Merge #19335 #19581 #19612 #19643 #19655
19335: ipv6/nib: 6LBR should not send RS on their downstream interface r=fabian18 a=fabian18



19581: cpu/samd5x: enable FDPLL1 at 200MHz r=benpicco a=dylad

### Contribution description

This PR allows to use the second FDPLL (the first one is used to generated the 120MHz frequency used by the core and some peripherals). The second FDPLL is setup to run at 200MHz which is the maximum allowed by this MCU.
In fact, I reused the existing function which setup FDPLL0 so it can be used in a generic way for both PLL (since they are the same IP).

I change the way the computation offset (left shift by 5)  is done because 200MHz << 5 wouldn't fit inside an `uint32_t` and I wanted to avoid using an `uint64_t` here

Two additional commits are present for a small cleanup and a fix.

This is currently unused in our codebase, so it shouldn't impact this platform too much as the `ONDEMAND` bit is set. the FDPLL will not be running out of the box. But `@gschorcht` might need it pretty soon.

### Testing procedure

This PR can be tested on a `same54-xpro` and an oscilloscope using the following the patch:
```
From 76490845ec72387b24116bdd364a61365c186aa1 Mon Sep 17 00:00:00 2001
From: Dylan Laduranty <dylan.laduranty@mesotic.com>
Date: Thu, 11 May 2023 17:42:16 +0200
Subject: [PATCH] removeme! for debug purpose

Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
---
 cpu/samd5x/cpu.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/cpu/samd5x/cpu.c b/cpu/samd5x/cpu.c
index f778991a5b..2866c8c9e5 100644
--- a/cpu/samd5x/cpu.c
+++ b/cpu/samd5x/cpu.c
`@@` -220,7 +220,7 `@@` static void fdpll_init(uint8_t idx, uint32_t f_cpu)
 }
 
 static void gclk_connect(uint8_t id, uint8_t src, uint32_t flags) {
-    GCLK->GENCTRL[id].reg = GCLK_GENCTRL_SRC(src) | GCLK_GENCTRL_GENEN | flags | GCLK_GENCTRL_IDC;
+    GCLK->GENCTRL[id].reg = GCLK_GENCTRL_SRC(src) | GCLK_GENCTRL_GENEN | flags | GCLK_GENCTRL_OE | GCLK_GENCTRL_IDC;
     while (GCLK->SYNCBUSY.reg & GCLK_SYNCBUSY_GENCTRL(id)) {}
 }
 
`@@` -384,6 +384,12 `@@` void cpu_init(void)
     dma_init();
 #endif
 
+    sam0_gclk_enable(SAM0_GCLK_200MHZ);
+    /* output both FDPLL (GCLK0 and GCLK4) to gpios */
+    gpio_init_mux(GPIO_PIN(PB, 14), GPIO_MUX_M);
+    gpio_init_mux(GPIO_PIN(PB, 10), GPIO_MUX_M);
+    /* PB14 -> EXT2    PB10 -> QSPI SCK */
+
     /* initialize stdio prior to periph_init() to allow use of DEBUG() there */
     early_init();
 
-- 
2.35.3
```

It will output both FDPLLs to PB14 and PB10. Their frequency can then be measured using an oscilloscope.


### Issues/PRs references
None.

19612: pkg/ndn-riot: drop unmaintained pkg r=benpicco a=maribu

### Contribution description

Upstream [1] has seen no activity since 2018, so it safe to assume this is dead. It is reasonable to assume that any users - if there ever were any - have moved on.

Fixes https://github.com/RIOT-OS/RIOT/issues/15638

[1]: https://github.com/named-data-iot/ndn-riot


19643: examples/suit_update: some test fixes r=aabadie a=kaspar030



19655: net/ipv6: make use of clz in ipv6_addr_match_prefix() r=benpicco a=benpicco



Co-authored-by: Fabian Hüßler <fabian.huessler@st.ovgu.de>
Co-authored-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
Co-authored-by: Kaspar Schleiser <kaspar@schleiser.de>
Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-05-23 16:23:19 +00:00
..
analog_util sys/analog_util/dac_util: fix truncation bug 2022-12-09 13:58:12 -05:00
app_metadata
arduino codespell: fix remaining issues 2022-09-16 14:00:35 +02:00
auto_init Merge #18620 #19296 #19504 #19506 2023-04-25 15:46:11 +00:00
base64
benchmark sys/benchmark: fix divide by zero if runs < 1000 2022-02-08 12:52:48 +01:00
bhp sys/bhp_msg: add IPC based Bottom Half Processor 2022-08-19 12:01:30 +02:00
bitfield sys/bitfield: don't set unrelated bits in bf_{set, clear}_all() 2023-03-17 00:08:10 +01:00
bloom
bus sys/bus: model Kconfig 2022-03-11 09:24:12 +01:00
can core/lib: Add macros/utils.h header 2023-01-07 09:47:44 +01:00
cb_mux
checksum sys/checksum: add CRC-16 implementation without lookup table 2022-10-06 17:43:20 +02:00
chunked_ringbuffer sys/chunked_ringbuffer: model in Kconfig 2022-03-04 09:35:50 +01:00
clif sys: add Kconfig support for clif 2023-05-19 15:03:42 +02:00
coding sys/coding: add missing Kconfig 2023-05-19 15:09:54 +02:00
color
congure congure_abe: initial import of TCP ABE congestion control 2022-10-17 16:44:39 +02:00
cpp11-compat sys /cpp11-compat: remove pseudo anonymous namespaces 2023-04-18 16:30:43 +02:00
cpp_new_delete sys: remove -std=c++11 2022-01-13 17:50:59 +01:00
crypto sys/crypto: make AES_KEY struct private 2023-02-20 18:22:00 +01:00
cxx_ctor_guards doc: Improve C++ documentation 2021-12-15 18:58:23 +01:00
debug_irq_disable cpu/cortexm_common: measure time spent with IRQ disabled 2022-11-24 21:27:20 +01:00
div
ecc treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
eepreg
embunit
entropy_source
event sys/event: ensure that a queue has a waiter before waiting for flags 2022-04-14 17:10:24 +02:00
evtimer sys/evtimer: use now returned by set 2021-12-14 13:24:29 +01:00
fido2 sys: fix remaining broken paths to tests 2023-05-13 19:08:39 +02:00
fmt Merge #19027 2023-02-17 20:09:53 +00:00
frac
fs vfs: drop unused abs_path parameter 2022-09-29 22:01:37 +02:00
fuzzing fuzzing: Add uri_parser fuzzer setup 2022-12-19 13:03:45 +01:00
hashes core/lib: Add macros/utils.h header 2023-01-07 09:47:44 +01:00
include Merge #19621 #19622 #19623 #19626 #19627 2023-05-20 07:13:34 +00:00
iolist sys/iolist: introduce iolist_to_buffer() 2022-05-02 23:23:52 +02:00
isrpipe sys/isrpipe: add isrpipe_write 2021-12-07 13:00:58 +01:00
libc sys/string_utils: add strscpy() 2022-09-26 19:06:46 +02:00
log_color cpu/avr8_common: Wrap stdio.h 2023-02-27 12:31:03 +01:00
log_printfnoformat sys/log: modularize log into log_color and log_printfnoformat 2022-10-12 12:21:29 +02:00
luid
malloc_thread_safe sys/malloc_tracing: add module to trace dyn memory management 2022-11-15 12:59:46 +01:00
matstat
memarray
mineplex
net Merge #19335 #19581 #19612 #19643 #19655 2023-05-23 16:23:19 +00:00
newlib_syscalls_default cpu/mips: Remove all mips 2022-09-27 13:42:37 +02:00
od sys/od/kconfig: add od_string 2022-03-11 09:20:24 +01:00
oneway-malloc
phydat sys/phydat: use flash_utils 2023-02-27 12:31:03 +01:00
picolibc_syscalls_default sys/picolibc_syscalls_default: Fix read/write return for picolibc >= 1.8 2023-03-03 12:04:48 -08:00
pipe
pm_layered Revert "sys/pm_layered: pm_(un)block add attribute optimize(3) -shortens hotpath" 2023-01-16 11:28:30 +01:00
posix sys: drop broken and legacy Mac OS handling 2023-05-15 15:35:50 +02:00
preprocessor sys/preprocessor: add Kconfig file 2022-10-17 10:38:14 +02:00
progress_bar sys/progress_bar: add Konfig configuration 2021-04-07 12:05:00 +02:00
ps schedstatistics: Convert to ztimer 2021-12-07 16:31:15 +01:00
puf_sram sys/puf_sram: cleanup header 2022-12-05 16:13:21 +01:00
random random: use void * in random_bytes() 2022-07-26 19:46:14 +02:00
riotboot sys/riotboot: uses SLOT1_OFFSET in hex format 2023-04-18 06:20:14 +02:00
rtc_utils sys: move rtc utility functions to their own module 2021-12-20 13:04:20 +01:00
rust_riotmodules rust_riotmodules: pub use instead of extern crate 2022-07-10 21:27:13 +02:00
rust_riotmodules_standalone Rust: Update riot-wrappers 2023-04-25 09:20:58 +02:00
saul_reg drivers/saul: use const qualifier for data to write 2022-05-23 08:35:27 +02:00
sched_round_robin sys/sched_round_robin: Add a round robin scheduler module 2021-11-11 13:18:52 +01:00
schedstatistics schedstatistics: Convert to ztimer 2021-12-07 16:31:15 +01:00
sema sys/sema: use sema_ztimer64 to implement old sema api 2022-03-10 14:19:44 +01:00
sema_inv sys/sema_inv: add missing Kconfig 2023-05-19 15:09:55 +02:00
senml sys/phydat: Fix unit confusion 2023-02-23 16:44:24 +01:00
seq
shell sys/shell: Add coreclk command to shell_cmd_sys 2023-05-16 10:58:06 +02:00
shell_lock sys/shell_lock: do not call strlen, less jumpy 2023-01-16 21:11:58 +01:00
ssp sys/ssp: add missing Kconfig 2023-05-19 15:09:55 +02:00
stdio_nimble treewide: fix path to shell related tests in doc 2023-05-13 18:27:58 +02:00
stdio_null Merge #18459 #18724 #19081 #19082 #19136 2023-01-13 13:50:55 +00:00
stdio_rtt sys/stdio_rtt: move documentation in doc.txt 2023-02-05 15:49:20 +01:00
stdio_semihosting core/init: call vfs_bind_stdio() in early_init() 2023-01-08 22:26:13 +01:00
stdio_uart core/init: call vfs_bind_stdio() in early_init() 2023-01-08 22:26:13 +01:00
stdio_udp sys/stdio_udp: add stdio over UDP 2023-01-13 11:08:22 +01:00
suit sys/suit: drop superfluous ')' in output 2023-03-10 02:27:43 +01:00
test_utils sys/test_utils: fix path to rmutex test in doc 2023-05-13 18:27:58 +02:00
timex
tiny_strerror sys/tiny_strerror: make use of flash_utils.h 2023-02-27 23:25:13 +01:00
trace treewide: make all modules use Kconfig ZTIMER_USEC indirection 2022-03-17 14:33:07 +01:00
trickle sys/trickle: Model kconfig 2023-03-17 12:09:01 +01:00
tsrb sys/tsrb: add peek functions 2021-11-24 17:54:44 +01:00
universal_address
uri_parser sys/uri_parser: fixing potential out of bounds read when consuming ports 2022-12-05 15:41:33 +01:00
usb sys/usb/usbus_msc: fix typo in C expression 2023-05-20 22:18:27 +02:00
usb_board_reset sys/usb_board_reset: allow to enable it also for stdio_usb_serial_jtag 2023-02-06 16:19:11 +01:00
ut_process sys/ut_process: add missing Kconfig 2023-05-19 15:09:56 +02:00
uuid sys/uuid: add missing Kconfig 2023-05-19 15:09:55 +02:00
vfs vfs: add auto_unmount_vfs() 2023-04-26 00:53:14 +02:00
vfs_util sys/vfs_util: bugfix rec. delete, rel. components 2022-08-30 17:53:36 +02:00
xtimer sys/xtimer: switch default backend to ztimer 2022-03-18 08:23:00 +01:00
zptr
ztimer sys/ztimer: fix typo in debug output 2023-05-02 09:53:16 +02:00
ztimer64 sys/ztimer64: properly clear timer on removal 2022-03-01 11:03:10 +01:00
doc.txt sys/doc.txt: add sys_compression doxygen group 2023-02-27 15:09:08 +01:00
Kconfig Merge #19621 #19622 #19623 #19626 #19627 2023-05-20 07:13:34 +00:00
Kconfig.newlib sys/syscalls: add libc_gettimeofday 2022-03-24 11:36:49 +01:00
Kconfig.picolibc sys/libc: model Kconfig 2021-10-01 11:26:15 +02:00
Kconfig.stdio cpu/esp32: add stdio_usb_serial_jtag 2023-01-09 00:51:27 +01:00
Makefile sys/preprocessor: add preprocessor module 2022-10-17 10:38:14 +02:00
Makefile.dep Merge #18620 #19296 #19504 #19506 2023-04-25 15:46:11 +00:00
Makefile.include sys: define CPU_RAM_SIZE as hex number 2023-04-18 06:20:14 +02:00