Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers: pinmux: 👋 #55025

Merged
merged 9 commits into from
Feb 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 0 additions & 13 deletions MAINTAINERS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1109,19 +1109,6 @@ Release Notes:
labels:
- "area: Pinctrl"

"Drivers: Pinmux":
status: maintained
maintainers:
- mnkp
collaborators:
- gmarull
files:
- doc/hardware/peripherals/pinmux.rst
- drivers/pinmux/
- include/zephyr/drivers/pinmux.h
labels:
- "area: Pinmux"

"Drivers: PTP Clock":
status: maintained
maintainers:
Expand Down
4 changes: 0 additions & 4 deletions doc/develop/api/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,6 @@ between major releases are available in the :ref:`zephyr_release_notes`.
- Experimental
- 3.0

* - :ref:`pinmux_api`
- Stable
- 1.0

* - :ref:`pm_api`
- Experimental
- 1.2
Expand Down
1 change: 0 additions & 1 deletion doc/hardware/peripherals/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ Peripherals
kscan.rst
led.rst
mbox.rst
pinmux.rst
pwm.rst
ps2.rst
peci.rst
Expand Down
13 changes: 0 additions & 13 deletions doc/hardware/peripherals/pinmux.rst

This file was deleted.

1 change: 0 additions & 1 deletion drivers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ add_subdirectory_ifdef(CONFIG_NET_L2_ETHERNET ethernet)
add_subdirectory_ifdef(CONFIG_NEURAL_NET_ACCEL neural_net)
add_subdirectory_ifdef(CONFIG_PECI peci)
add_subdirectory_ifdef(CONFIG_PINCTRL pinctrl)
add_subdirectory_ifdef(CONFIG_PINMUX pinmux)
add_subdirectory_ifdef(CONFIG_PM_CPU_OPS pm_cpu_ops)
add_subdirectory_ifdef(CONFIG_POWER_DOMAIN power_domain)
add_subdirectory_ifdef(CONFIG_PS2 ps2)
Expand Down
1 change: 0 additions & 1 deletion drivers/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ source "drivers/neural_net/Kconfig"
source "drivers/pcie/Kconfig"
source "drivers/peci/Kconfig"
source "drivers/pinctrl/Kconfig"
source "drivers/pinmux/Kconfig"
source "drivers/pm_cpu_ops/Kconfig"
source "drivers/power_domain/Kconfig"
source "drivers/ps2/Kconfig"
Expand Down
6 changes: 5 additions & 1 deletion drivers/gpio/gpio_stm32.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@
*/

#include <zephyr/drivers/clock_control/stm32_clock_control.h>
#include <pinmux/pinmux_stm32.h>
#include <zephyr/drivers/gpio.h>
#if DT_HAS_COMPAT_STATUS_OKAY(st_stm32f1_pinctrl)
#include <zephyr/dt-bindings/pinctrl/stm32f1-pinctrl.h>
#else
#include <zephyr/dt-bindings/pinctrl/stm32-pinctrl.h>
#endif /* DT_HAS_COMPAT_STATUS_OKAY(st_stm32f1_pinctrl) */

/* GPIO buses definitions */

Expand Down
2 changes: 0 additions & 2 deletions drivers/pinctrl/pinctrl_kinetis.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ int pinctrl_configure_pins(const pinctrl_soc_pin_t *pins, uint8_t pin_cnt,
* and handles clock init. Only bind to these nodes if pinmux driver
* is disabled.
*/
#ifndef CONFIG_PINMUX
static int pinctrl_mcux_init(const struct device *dev)
{
const struct pinctrl_mcux_config *config = dev->config;
Expand Down Expand Up @@ -79,4 +78,3 @@ static int pinctrl_mcux_init(const struct device *dev)
NULL);

DT_INST_FOREACH_STATUS_OKAY(PINCTRL_MCUX_INIT)
#endif
6 changes: 0 additions & 6 deletions drivers/pinctrl/pinctrl_rv32m1.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@ int pinctrl_configure_pins(const pinctrl_soc_pin_t *pins, uint8_t pin_cnt,
return 0;
}

/* RV32M1 pinmux driver binds to the same DTS nodes,
* and handles clock init. Only bind to these nodes if pinmux driver
* is disabled.
*/
#ifndef CONFIG_PINMUX
static int pinctrl_rv32m1_init(const struct device *dev)
{
const struct pinctrl_rv32m1_config *config = dev->config;
Expand All @@ -70,4 +65,3 @@ static int pinctrl_rv32m1_init(const struct device *dev)
NULL);

DT_INST_FOREACH_STATUS_OKAY(PINCTRL_RV32M1_INIT)
#endif
26 changes: 26 additions & 0 deletions drivers/pinctrl/pinctrl_stm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,32 @@
#include <stm32_ll_gpio.h>
#include <stm32_ll_system.h>

/** Helper to extract IO port number from STM32PIN() encoded value */
#define STM32_PORT(__pin) \
((__pin) >> 4)

/** Helper to extract IO pin number from STM32PIN() encoded value */
#define STM32_PIN(__pin) \
((__pin) & 0xf)

/** Helper to extract IO port number from STM32_PINMUX() encoded value */
#define STM32_DT_PINMUX_PORT(__pin) \
(((__pin) >> STM32_PORT_SHIFT) & STM32_PORT_MASK)

/** Helper to extract IO pin number from STM32_PINMUX() encoded value */
#define STM32_DT_PINMUX_LINE(__pin) \
(((__pin) >> STM32_LINE_SHIFT) & STM32_LINE_MASK)

/** Helper to extract IO pin func from STM32_PINMUX() encoded value */
#define STM32_DT_PINMUX_FUNC(__pin) \
(((__pin) >> STM32_MODE_SHIFT) & STM32_MODE_MASK)

#if DT_HAS_COMPAT_STATUS_OKAY(st_stm32f1_pinctrl)
/** Helper to extract IO pin remap from STM32_PINMUX() encoded value */
#define STM32_DT_PINMUX_REMAP(__pin) \
(((__pin) >> STM32_REMAP_SHIFT) & STM32_REMAP_MASK)
#endif

/**
* @brief Array containing pointers to each GPIO port.
*
Expand Down
9 changes: 0 additions & 9 deletions drivers/pinmux/CMakeLists.txt

This file was deleted.

39 changes: 0 additions & 39 deletions drivers/pinmux/Kconfig

This file was deleted.

9 changes: 0 additions & 9 deletions drivers/pinmux/Kconfig.lpc11u6x

This file was deleted.

10 changes: 0 additions & 10 deletions drivers/pinmux/Kconfig.mcux

This file was deleted.

10 changes: 0 additions & 10 deletions drivers/pinmux/Kconfig.mcux_lpc

This file was deleted.

10 changes: 0 additions & 10 deletions drivers/pinmux/Kconfig.rv32m1

This file was deleted.

17 changes: 0 additions & 17 deletions drivers/pinmux/Kconfig.stm32

This file was deleted.

10 changes: 0 additions & 10 deletions drivers/pinmux/Kconfig.xec

This file was deleted.

114 changes: 0 additions & 114 deletions drivers/pinmux/pinmux_lpc11u6x.c

This file was deleted.