diff --git a/drivers/pinmux/CMakeLists.txt b/drivers/pinmux/CMakeLists.txt index e4f9b5cb9281e2..2916b792d8eb26 100644 --- a/drivers/pinmux/CMakeLists.txt +++ b/drivers/pinmux/CMakeLists.txt @@ -1,6 +1,5 @@ # SPDX-License-Identifier: Apache-2.0 # Board initialization -zephyr_sources_ifdef(CONFIG_PINMUX_LPC11U6X pinmux_lpc11u6x.c) zephyr_sources_ifdef(CONFIG_PINMUX_MCUX pinmux_mcux.c) zephyr_sources_ifdef(CONFIG_PINMUX_XEC pinmux_mchp_xec.c) diff --git a/drivers/pinmux/Kconfig b/drivers/pinmux/Kconfig index 93d70d9e2a6567..399b71162ff7a3 100644 --- a/drivers/pinmux/Kconfig +++ b/drivers/pinmux/Kconfig @@ -24,8 +24,6 @@ config PINMUX_INIT_PRIORITY rule for particular boards. Don't change this value unless you know what you are doing. -source "drivers/pinmux/Kconfig.lpc11u6x" - source "drivers/pinmux/Kconfig.mcux" source "drivers/pinmux/Kconfig.xec" diff --git a/drivers/pinmux/Kconfig.lpc11u6x b/drivers/pinmux/Kconfig.lpc11u6x deleted file mode 100644 index 448fce1d2c768b..00000000000000 --- a/drivers/pinmux/Kconfig.lpc11u6x +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2020 2020 Seagate Technology LLC -# SPDX-License-Identifier: Apache-2.0 - -config PINMUX_LPC11U6X - bool "Pinmux driver for NXP LPC11U6X MCUs" - depends on SOC_SERIES_LPC11U6X - default y - help - Enable pinmux driver for NXP LPC11U6X MCUs. diff --git a/drivers/pinmux/pinmux_lpc11u6x.c b/drivers/pinmux/pinmux_lpc11u6x.c deleted file mode 100644 index bcb28fa3342d9f..00000000000000 --- a/drivers/pinmux/pinmux_lpc11u6x.c +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) 2020 Seagate Technology LLC - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#define DT_DRV_COMPAT nxp_lpc11u6x_pinmux - -/** - * @file - * @brief pinmux driver for NXP LPC11U6X SoCs - * - * This driver allows to configure the IOCON (I/O control) registers found - * on the LPC11U6x MCUs. - * - * The IOCON registers are divided into three ports. The number of pins - * available on each port depends on the package type (48, 64 or 100 pins). - * Each port is handled as a distinct device and is defined by a dedicated - * device tree node. This node provides the port's base address and number - * of pins information. - */ - -#include - -#include - -struct pinmux_lpc11u6x_config { - uint8_t port; - volatile uint32_t *base; - uint8_t npins; -}; - -static int pinmux_lpc11u6x_set(const struct device *dev, uint32_t pin, - uint32_t func) -{ - const struct pinmux_lpc11u6x_config *config = dev->config; - volatile uint32_t *base; - - if (pin >= config->npins) { - return -EINVAL; - } - - /* Handle 4 bytes hole between PIO2_1 and PIO2_2. */ - if (config->port == 2 && pin > 1) { - base = config->base + 1; - } else { - base = config->base; - } - - base[pin] = func; - - return 0; -} - -static int -pinmux_lpc11u6x_get(const struct device *dev, uint32_t pin, uint32_t *func) -{ - const struct pinmux_lpc11u6x_config *config = dev->config; - volatile uint32_t *base; - - if (pin >= config->npins) { - return -EINVAL; - } - - /* Handle 4 bytes hole between PIO2_1 and PIO2_2. */ - if (config->port == 2 && pin > 1) { - base = config->base + 1; - } else { - base = config->base; - } - - *func = base[pin]; - - return 0; -} - -static int -pinmux_lpc11u6x_pullup(const struct device *dev, uint32_t pin, uint8_t func) -{ - return -ENOTSUP; -} - -static int -pinmux_lpc11u6x_input(const struct device *dev, uint32_t pin, uint8_t func) -{ - return -ENOTSUP; -} - -static int pinmux_lpc11u6x_init(const struct device *dev) -{ - return 0; -} - -static const struct pinmux_driver_api pinmux_lpc11u6x_driver_api = { - .set = pinmux_lpc11u6x_set, - .get = pinmux_lpc11u6x_get, - .pullup = pinmux_lpc11u6x_pullup, - .input = pinmux_lpc11u6x_input, -}; - -#define PINMUX_LPC11U6X_INIT(id) \ -static const struct pinmux_lpc11u6x_config \ - pinmux_lpc11u6x_config_##id = { \ - .port = id, \ - .base = (volatile uint32_t *) DT_INST_REG_ADDR(id), \ - .npins = DT_INST_REG_SIZE(id) / 4, \ -}; \ - \ -DEVICE_DT_INST_DEFINE(id, &pinmux_lpc11u6x_init, \ - NULL, NULL, &pinmux_lpc11u6x_config_##id, \ - PRE_KERNEL_1, CONFIG_PINMUX_INIT_PRIORITY, \ - &pinmux_lpc11u6x_driver_api); - -DT_INST_FOREACH_STATUS_OKAY(PINMUX_LPC11U6X_INIT) diff --git a/dts/arm/nxp/nxp_lpc11u6x.dtsi b/dts/arm/nxp/nxp_lpc11u6x.dtsi index b33e3eeb8bf5fb..a81542284ff458 100644 --- a/dts/arm/nxp/nxp_lpc11u6x.dtsi +++ b/dts/arm/nxp/nxp_lpc11u6x.dtsi @@ -76,29 +76,6 @@ reg = <0xf0 0x60>; }; }; - /* PIO0_0 to PIO0_23. */ - pinmux0: pinmux@40044000 { - compatible = "nxp,lpc11u6x-pinmux"; - #pinmux-cells = <2>; - reg = <0x40044000 0x60>; - status = "okay"; - }; - - /* PIO1_0 to PIO1_31. */ - pinmux1: pinmux@40044060 { - compatible = "nxp,lpc11u6x-pinmux"; - #pinmux-cells = <2>; - reg = <0x40044060 0x80>; - status = "okay"; - }; - - /* PIO2_0 to PIO2_23. */ - pinmux2: pinmux@400440f0 { - compatible = "nxp,lpc11u6x-pinmux"; - #pinmux-cells = <2>; - reg = <0x400440f0 0x64>; - status = "okay"; - }; /* GPIO0_0 to GPIO0_23 */ gpio0: gpio@0 { diff --git a/dts/bindings/pinctrl/nxp,lpc11u6x-pinmux.yaml b/dts/bindings/pinctrl/nxp,lpc11u6x-pinmux.yaml deleted file mode 100644 index b6a3d7f12bc02f..00000000000000 --- a/dts/bindings/pinctrl/nxp,lpc11u6x-pinmux.yaml +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (c) 2020 Seagate Technology LLC -# SPDX-License-Identifier: Apache-2.0 - -description: NXP LPC11U6X pinmux (aka IOCON) node - -compatible: "nxp,lpc11u6x-pinmux" - -include: base.yaml - -properties: - reg: - required: true - - "#pinmux-cells": - type: int - required: true - const: 2 - description: number of items in a pinmux specifier - -pinmux-cells: - - pin - - function diff --git a/soc/arm/nxp_lpc/lpc11u6x/Kconfig.defconfig.series b/soc/arm/nxp_lpc/lpc11u6x/Kconfig.defconfig.series index a9a98b87dcc58c..0845fedf612027 100644 --- a/soc/arm/nxp_lpc/lpc11u6x/Kconfig.defconfig.series +++ b/soc/arm/nxp_lpc/lpc11u6x/Kconfig.defconfig.series @@ -14,14 +14,4 @@ config NUM_IRQS # must be >= the highest interrupt number used default 40 -if PINMUX - -# The pinmux device must be initialized before all the other devices, including -# the clock control device which uses it. - -config PINMUX_INIT_PRIORITY - default 1 - -endif # PINMUX - endif # SOC_SERIES_LPC11U6X