-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Description
Describe the bug
The TFM and Zephyr repositories have mismatched views on how the pinctrl uint32_t is constructed.
zephyr/include/zephyr/dt-bindings/pinctrl/nrf-pinctrl.h
Lines 9 to 20 in cce7e9a
/* | |
* The whole nRF pin configuration information is encoded in a 32-bit bitfield | |
* organized as follows: | |
* | |
* - 31..18: Pin function. | |
* - 17: Clockpin enable. | |
* - 16: Pin inversion mode. | |
* - 15: Pin low power mode. | |
* - 14..11: Pin output drive configuration. | |
* - 10..9: Pin pull configuration. | |
* - 8..0: Pin number (combination of port and pin). | |
*/ |
The pinctrl values are consumed by the TFM USART driver:
https://github.com/zephyrproject-rtos/trusted-firmware-m/blob/069455be098383bf96eab73e3ff8e0c66c60fa5a/platform/ext/target/nordic_nrf/common/core/cmsis_drivers/Driver_USART.c#L56-L74
Introduced in:
This was probably missed because NRF_FUN_UART_TX
is 0, so the shift in bits doesn't affect this one pin.
The flow control and RX pins are currently broken.
The first PR is present in Zephyr v3.7.0, so the LTS driver does not currently work as expected.
Expected behavior
TFM and Zephyr need the same view on pinctrl, as TFM consumes the values created by the Zephyr build system.
Impact
Nordic TFM consumers of pinctrl are currently broken.
Environment (please complete the following information):
- Zephyr v3.7.0
Metadata
Metadata
Assignees
Labels
Type
Projects
Status