drivers: pinmux: rv32m1: drop driver

Drop RV32M1 pinmux driver in favor of pinctrl.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
Gerard Marull-Paretas 2023-02-21 10:16:54 +01:00 committed by Anas Nashif
parent 107cb86bb3
commit f1539b48cf
5 changed files with 0 additions and 105 deletions

View file

@ -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;
@ -70,4 +65,3 @@ static int pinctrl_rv32m1_init(const struct device *dev)
NULL);
DT_INST_FOREACH_STATUS_OKAY(PINCTRL_RV32M1_INIT)
#endif

View file

@ -4,6 +4,5 @@
zephyr_sources_ifdef(CONFIG_PINMUX_LPC11U6X pinmux_lpc11u6x.c)
zephyr_sources_ifdef(CONFIG_PINMUX_MCUX pinmux_mcux.c)
zephyr_sources_ifdef(CONFIG_PINMUX_MCUX_LPC pinmux_mcux_lpc.c)
zephyr_sources_ifdef(CONFIG_PINMUX_RV32M1 pinmux_rv32m1.c)
zephyr_sources_ifdef(CONFIG_PINMUX_STM32 pinmux_stm32.c)
zephyr_sources_ifdef(CONFIG_PINMUX_XEC pinmux_mchp_xec.c)

View file

@ -30,8 +30,6 @@ source "drivers/pinmux/Kconfig.mcux"
source "drivers/pinmux/Kconfig.mcux_lpc"
source "drivers/pinmux/Kconfig.rv32m1"
source "drivers/pinmux/Kconfig.stm32"
source "drivers/pinmux/Kconfig.xec"

View file

@ -1,10 +0,0 @@
# RV31M1 SDK pinmux
# Copyright (c) 2018 Foundries.io
# SPDX-License-Identifier: Apache-2.0
config PINMUX_RV32M1
bool "RV32M1 pinmux driver"
depends on SOC_OPENISA_RV32M1_RISCV32
help
Enable the RV32M1 pinmux driver.

View file

@ -1,86 +0,0 @@
/*
* Copyright (c) 2016 Freescale Semiconductor, Inc.
* Copyright (c) 2018 Foundries.io
*
* SPDX-License-Identifier: Apache-2.0
*/
#define DT_DRV_COMPAT openisa_rv32m1_pinmux
#include <errno.h>
#include <zephyr/device.h>
#include <zephyr/drivers/pinmux.h>
#include <fsl_common.h>
#include <fsl_clock.h>
struct pinmux_rv32m1_config {
clock_ip_name_t clock_ip_name;
PORT_Type *base;
};
static int pinmux_rv32m1_set(const struct device *dev, uint32_t pin,
uint32_t func)
{
const struct pinmux_rv32m1_config *config = dev->config;
PORT_Type *base = config->base;
base->PCR[pin] = (base->PCR[pin] & ~PORT_PCR_MUX_MASK) | func;
return 0;
}
static int pinmux_rv32m1_get(const struct device *dev, uint32_t pin,
uint32_t *func)
{
const struct pinmux_rv32m1_config *config = dev->config;
PORT_Type *base = config->base;
*func = base->PCR[pin] & ~PORT_PCR_MUX_MASK;
return 0;
}
static int pinmux_rv32m1_pullup(const struct device *dev, uint32_t pin,
uint8_t func)
{
return -ENOTSUP;
}
static int pinmux_rv32m1_input(const struct device *dev, uint32_t pin,
uint8_t func)
{
return -ENOTSUP;
}
static int pinmux_rv32m1_init(const struct device *dev)
{
const struct pinmux_rv32m1_config *config = dev->config;
CLOCK_EnableClock(config->clock_ip_name);
return 0;
}
static const struct pinmux_driver_api pinmux_rv32m1_driver_api = {
.set = pinmux_rv32m1_set,
.get = pinmux_rv32m1_get,
.pullup = pinmux_rv32m1_pullup,
.input = pinmux_rv32m1_input,
};
#define PINMUX_RV32M1_INIT(n) \
static const struct pinmux_rv32m1_config pinmux_rv32m1_##n##_config = {\
.base = (PORT_Type *)DT_INST_REG_ADDR(n), \
.clock_ip_name = INST_DT_CLOCK_IP_NAME(n), \
}; \
\
DEVICE_DT_INST_DEFINE(n, \
&pinmux_rv32m1_init, \
NULL, \
NULL, &pinmux_rv32m1_##n##_config, \
PRE_KERNEL_1, \
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \
&pinmux_rv32m1_driver_api);
DT_INST_FOREACH_STATUS_OKAY(PINMUX_RV32M1_INIT)