Skip to content

Commit ab48734

Browse files
committed
dt-bindings: pinctrl: renesas: Fix value of PSEL_MASK.
PSEL [4:0] is 5 bit bitfield of PmnPFS/PmnPFS_HA/PmnPFS_BY registers which could have been modeled in C as: struct PmnPFS_xx { union { u32 _; struct { unsigned irrevelant_here: 24; unsigned PSEL : 5; } fields; }; }; Thus mask value should be 0b11111 (0x1f) rather than 0b101, since it is used as mask: ((psel)&PSEL_MASK) << PSEL_POS) /* Note: PSEL_POS = 24 */ in RA_PINCFG macro. Based of 19.2.5 "Port mn Pin Function Select Register" RA4M1 Group Users's: Hardware and other RA Groups manuals. This change is cherry-pick candidate for main. Please Note It was _NOT_ tested on `arduino_uno_r4_minima` board Signed-off-by: Piotr Rak <[email protected]>
1 parent 784695a commit ab48734

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/zephyr/dt-bindings/pinctrl/renesas/pinctrl-ra-common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#define PORT4_POS 29
1111
#define PORT4_MASK 0x1
1212
#define PSEL_POS 24
13-
#define PSEL_MASK 0x5
13+
#define PSEL_MASK 0x1f
1414
#define PORT_POS 21
1515
#define PORT_MASK 0x7
1616
#define PIN_POS 17

0 commit comments

Comments
 (0)