Skip to content

Commit b8fd4cd

Browse files
sreeramIfxfabiobaltieri
authored andcommitted
drivers: pinctrl: pincontrol driver updates to support PSC3
Update pincontrol driver to support PSC3 Signed-off-by: Sreeram Tatapudi <[email protected]>
1 parent ba14413 commit b8fd4cd

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

drivers/pinctrl/pinctrl_ifx_cat1.c

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,17 @@
2020
* Entries will be NULL if the GPIO port is not enabled.
2121
*/
2222
static GPIO_PRT_Type *const gpio_ports[] = {
23-
GPIO_PORT_OR_NULL(DT_NODELABEL(gpio_prt0)),
24-
GPIO_PORT_OR_NULL(DT_NODELABEL(gpio_prt1)),
25-
GPIO_PORT_OR_NULL(DT_NODELABEL(gpio_prt2)),
26-
GPIO_PORT_OR_NULL(DT_NODELABEL(gpio_prt3)),
27-
GPIO_PORT_OR_NULL(DT_NODELABEL(gpio_prt4)),
28-
GPIO_PORT_OR_NULL(DT_NODELABEL(gpio_prt5)),
29-
GPIO_PORT_OR_NULL(DT_NODELABEL(gpio_prt6)),
30-
GPIO_PORT_OR_NULL(DT_NODELABEL(gpio_prt7)),
31-
GPIO_PORT_OR_NULL(DT_NODELABEL(gpio_prt8)),
32-
GPIO_PORT_OR_NULL(DT_NODELABEL(gpio_prt9)),
33-
GPIO_PORT_OR_NULL(DT_NODELABEL(gpio_prt10)),
34-
GPIO_PORT_OR_NULL(DT_NODELABEL(gpio_prt11)),
35-
GPIO_PORT_OR_NULL(DT_NODELABEL(gpio_prt12)),
36-
GPIO_PORT_OR_NULL(DT_NODELABEL(gpio_prt13)),
37-
GPIO_PORT_OR_NULL(DT_NODELABEL(gpio_prt14))
38-
};
23+
GPIO_PORT_OR_NULL(DT_NODELABEL(gpio_prt0)), GPIO_PORT_OR_NULL(DT_NODELABEL(gpio_prt1)),
24+
GPIO_PORT_OR_NULL(DT_NODELABEL(gpio_prt2)), GPIO_PORT_OR_NULL(DT_NODELABEL(gpio_prt3)),
25+
GPIO_PORT_OR_NULL(DT_NODELABEL(gpio_prt4)), GPIO_PORT_OR_NULL(DT_NODELABEL(gpio_prt5)),
26+
GPIO_PORT_OR_NULL(DT_NODELABEL(gpio_prt6)), GPIO_PORT_OR_NULL(DT_NODELABEL(gpio_prt7)),
27+
GPIO_PORT_OR_NULL(DT_NODELABEL(gpio_prt8)), GPIO_PORT_OR_NULL(DT_NODELABEL(gpio_prt9)),
28+
GPIO_PORT_OR_NULL(DT_NODELABEL(gpio_prt10)), GPIO_PORT_OR_NULL(DT_NODELABEL(gpio_prt11)),
29+
GPIO_PORT_OR_NULL(DT_NODELABEL(gpio_prt12)), GPIO_PORT_OR_NULL(DT_NODELABEL(gpio_prt13)),
30+
GPIO_PORT_OR_NULL(DT_NODELABEL(gpio_prt14)), GPIO_PORT_OR_NULL(DT_NODELABEL(gpio_prt15)),
31+
GPIO_PORT_OR_NULL(DT_NODELABEL(gpio_prt16)), GPIO_PORT_OR_NULL(DT_NODELABEL(gpio_prt17)),
32+
GPIO_PORT_OR_NULL(DT_NODELABEL(gpio_prt18)), GPIO_PORT_OR_NULL(DT_NODELABEL(gpio_prt19)),
33+
GPIO_PORT_OR_NULL(DT_NODELABEL(gpio_prt20)), GPIO_PORT_OR_NULL(DT_NODELABEL(gpio_prt21))};
3934

4035
/* @brief This function returns gpio drive mode, according to.
4136
* bias and drive mode params defined in pinctrl node.
@@ -99,7 +94,11 @@ int pinctrl_configure_pins(const pinctrl_soc_pin_t *pins, uint8_t pin_cnt, uintp
9994
uint32_t pin_num = CAT1_PINMUX_GET_PIN_NUM(pins[i].pinmux);
10095

10196
/* Initialize pin */
97+
#if defined(COMPONENT_SECURE_DEVICE) || defined(CY_PDL_TZ_ENABLED)
98+
Cy_GPIO_Pin_SecFastInit(gpio_ports[port_num], pin_num, drv_mode, 1, hsiom);
99+
#else
102100
Cy_GPIO_Pin_FastInit(gpio_ports[port_num], pin_num, drv_mode, 1, hsiom);
101+
#endif /* defined(CY_PDL_TZ_ENABLED) */
103102

104103
/* Force output to enable pulls */
105104
switch (drv_mode) {

0 commit comments

Comments
 (0)