Skip to content

Commit 05e0aad

Browse files
petejohansonkartben
authored andcommitted
rp2350: Fix for storing larger pinctrl alt func
On RP2350, the alt function value can be up to 0x1F, so store as 5 bits. Signed-off-by: Peter Johanson <peter@peterjohanson.com> Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
1 parent ae1a098 commit 05e0aad

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/zephyr/dt-bindings/pinctrl/rpi-pico-pinctrl-common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#define RP2_ALT_FUNC_POS 0
1212
#define RP2_ALT_FUNC_MASK 0xf
1313

14-
#define RP2_PIN_NUM_POS 4
14+
#define RP2_PIN_NUM_POS 5
1515
#define RP2_PIN_NUM_MASK 0x1f
1616

1717
#define RP2_GPIO_OVERRIDE_NORMAL 0

soc/raspberrypi/rpi_pico/common/pinctrl_soc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ struct rpi_pinctrl_soc_pin {
1616
/** Pin number 0..29 */
1717
uint32_t pin_num : 5;
1818
/** Alternative function (UART, SPI, etc.) */
19-
uint32_t alt_func : 4;
19+
uint32_t alt_func : 5;
2020
/** Maximum current used by a pin, in mA */
2121
uint32_t drive_strength : 4;
2222
/** Slew rate, may be either false (slow) or true (fast) */

0 commit comments

Comments
 (0)