Commit graph

7 commits

Author SHA1 Message Date
Mahesh Mahadevan 205a8fed79 drivers: pinctrl: Add support for more ports
MCX has more port modules which requires updating
the pinctrl driver

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-03-13 22:38:46 +00:00
Manuel Argüelles 09521832be drivers: pinctrl: kinetis: use clock control API
Remove the direct use of the HAL API to configure clocks and use
Zephyr's clock control API instead.

Currently the PORT peripherals of the Kinetis family are either
clocked by PCC in the case of KE1xF devices, or by SIM for the
rest of the devices. PCC clock driver converts internally the
subsys clock name into the clock gate address. SIM clock driver
expects this conversion to be done by the caller.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-11-14 09:24:10 +01:00
Fabio Baltieri a7490d2762 pinctrl: kinetis: use kernel default init priority
Set the initialization priority for the pinctrl_mcux_init to
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT.

The pinmux nodes depend on pcc, which is currently initializing at a
later stage, using the default priority fixes it.

Found the error with:

$ west build -p -b frdm_k64f samples/basic/blinky \
  -DCONFIG_CHECK_INIT_PRIORITIES=y
...
ERROR: /soc/pinmux@4004d000 PRE_KERNEL_1 0 <
  /soc/pcc@40065000 PRE_KERNEL_1 30
ERROR: /soc/pinmux@4004c000 PRE_KERNEL_1 0 <
  /soc/pcc@40065000 PRE_KERNEL_1 30
ERROR: /soc/pinmux@4004b000 PRE_KERNEL_1 0 <
  /soc/pcc@40065000 PRE_KERNEL_1 30
ERROR: /soc/pinmux@4004a000 PRE_KERNEL_1 0 <
  /soc/pcc@40065000 PRE_KERNEL_1 30
ERROR: /soc/pinmux@40049000 PRE_KERNEL_1 0 <
  /soc/pcc@40065000 PRE_KERNEL_1 30

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-06-22 17:29:44 -04:00
Declan Snyder 3af095b122 drivers: pinctrl: pinctrl_kinetis: Fix port array
Fix port array definition in kinetis pinctrl driver
so that it handles more flexibly the cases where the
number of PORT peripherals is more than 3, rather than only
handling the case where there are 5.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-03-28 10:23:46 +02:00
Gerard Marull-Paretas 9ca624eb13 drivers: pinmux: mcux: drop driver
Drop the MCUX driver in favor of Kinetis pinctrl driver.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-02-23 16:56:04 -05:00
Gerard Marull-Paretas fb60aab245 drivers: migrate includes to <zephyr/...>
In order to bring consistency in-tree, migrate all drivers to the new
prefix <zephyr/...>. Note that the conversion has been scripted, refer
to #45388 for more details.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-06 19:58:21 +02:00
Daniel DeGrasse fc8877187e drivers: pinctrl: Add kinetis pinctrl driver
Add kinetis pinctrl driver. Driver initializes clocks for each port, and
exposes the pinctrl_configure_pins function required for pinctrl
support.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-03-03 13:00:20 -06:00