Skip to content

Commit 4b956da

Browse files
Phi Tranquytranpzz
authored andcommitted
drivers: gpio: Update gpio and pinctrl driver for support RX261
Update gpio driver and pinctrl driver for support RX261 Signed-off-by: Phi Tran <phi.tran.jg@bp.renesas.com>
1 parent fe19f75 commit 4b956da

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

drivers/pinctrl/renesas/rx/pinctrl_renesas_rx.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616

1717
extern const uint8_t g_gpio_open_drain_n_support[];
1818
extern const uint8_t g_gpio_pull_up_support[];
19+
#ifndef CONFIG_SOC_SERIES_RX261
1920
extern const uint8_t g_gpio_dscr_support[];
21+
#endif
2022

2123
static bool gpio_pin_function_check(uint8_t const *check_array, uint8_t port_number,
2224
uint8_t pin_number)
@@ -45,6 +47,7 @@ static int pinctrl_configure_pullup(const pinctrl_soc_pin_t *pin, uint32_t value
4547
return ret;
4648
}
4749

50+
#ifndef CONFIG_SOC_SERIES_RX261
4851
static int pinctrl_configure_dscr(const pinctrl_soc_pin_t *pin, uint32_t value)
4952
{
5053
gpio_port_pin_t port_pin;
@@ -61,6 +64,7 @@ static int pinctrl_configure_dscr(const pinctrl_soc_pin_t *pin, uint32_t value)
6164

6265
return ret;
6366
}
67+
#endif
6468

6569
static int pinctrl_configure_opendrain(const pinctrl_soc_pin_t *pin, uint32_t value)
6670
{
@@ -133,13 +137,14 @@ int pinctrl_configure_pins(const pinctrl_soc_pin_t *pins, uint8_t pin_cnt, uintp
133137
if (ret != 0) {
134138
return -EINVAL;
135139
}
136-
140+
#ifndef CONFIG_SOC_SERIES_RX261
137141
/* Set drive-strength */
138142
ret = pinctrl_configure_dscr(pin, pin->cfg.drive_strength);
139143

140144
if (ret != 0) {
141145
return -EINVAL;
142146
}
147+
#endif
143148

144149
/* Set pin function */
145150
pconfig.analog_enable = pin->cfg.analog_enable;

include/zephyr/dt-bindings/pinctrl/renesas/pinctrl-rx.h

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,14 @@
1616
#define RX_PSEL_MASK 0x1f
1717
#define RX_PSEL_POS 9
1818

19-
#define RX_PSEL_SCI_1 0xA
20-
#define RX_PSEL_SCI_6 0xB
21-
#define RX_PSEL_TMR 0x5
22-
#define RX_PSEL_POE 0x7
19+
#define RX_PSEL_RSCI 0xA
20+
#define RX_PSEL_RSCI_TXDB 0xC
21+
#define RX_PSEL_SCI_1 0xA
22+
#define RX_PSEL_SCI_5 0xA
23+
#define RX_PSEL_SCI_6 0xB
24+
#define RX_PSEL_SCI_12 0xC
25+
#define RX_PSEL_TMR 0x5
26+
#define RX_PSEL_POE 0x7
2327

2428
/* P0nPFS */
2529
#define RX_PSEL_P0nPFS_HIZ 0x0

0 commit comments

Comments
 (0)