Skip to content
Commit a5e04ccd authored by Ramon Aerne's avatar Ramon Aerne Committed by Fabio Baltieri
Browse files

drivers: serial: rp2040: fix rpi pico address mapping



Address map used for config item `uart_dev` and `uart_regs` is
currently derived using the rpi hal macros `uart0` and `uart1`
which map to the same register address as given in the `reg` property
of the devicetree.

However, the sdk macro is generated using `uart##idx` which zephyr does
not necessarily map to uart0 or uart1.
This is, for example, the case when disabling uart0 with the devicetree
status "disabled"
and enabling uart1 for which then the idx==0 and not 1 which therefore
maps to the wrong controller address space.

This can simply be fixed by deriving the base address from
`DT_INST_REG_ADDR(idx)` instead

Signed-off-by: default avatarRamon Aerne <ramon.aerne@axelera.ai>
parent ab2b7721
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment