MFD: add support for the RDC321x southbridge
PATCH 2/4 MFD: add support for the RDC321x southbridge
This patch adds a new MFD driver for the RDC321x southbridge. This southbridge is always present in the RDC321x System-on-a-Chip and provides access to some GPIOs as well as a watchdog. Access to these two functions is done using the southbridge PCI device configuration space.
Signed-off-by Regards, Florian Fainelli <[email protected]>
---
drivers/mfd/Kconfig +10 -0
@@ -358,6 +358,16 @@ config MFD_TIMBERDALE The timberdale FPGA can be found on the Intel Atom development board for in-vehicle infontainment, called Russellville. + +config MFD_RDC321X + tristate "Support for RDC-R321x southbridge" + select MFD_CORE + depends on PCI + help + Say yes here if you want to have support for the RDC R-321x SoC + southbridge which provides access to GPIOs and Watchdog using the + southbridge PCI device configuration space. + endmenu menu "Multimedia Capabilities Port drivers"
drivers/mfd/Makefile +1 -0
@@ -57,3 +57,4 @@ obj-$(CONFIG_AB4500_CORE) += ab4500-core.o obj-$(CONFIG_MFD_TIMBERDALE) += timberdale.o obj-$(CONFIG_MFD_88PM8607) += 88pm8607.o obj-$(CONFIG_PMIC_ADP5520) += adp5520.o +obj-$(CONFIG_MFD_RDC321X) += rdc321x-southbridge.o
drivers/mfd/rdc321x-southbridge.c new file +148 -0
148 lines not on this page · raw message
include/linux/mfd/rdc321x.h new file +24 -0
@@ -0,0 +1,24 @@ +#ifndef __RDC321X_MFD_H +#define __RDC321X_MFD_H + +#include <linux/types.h> + +/* Offsets to be accessed in the southbridge PCI +* device configuration register */ +#define RDC321X_WDT_CTRL 0x44 +#define RDC321X_GPIO_CTRL_REG1 0x48 +#define RDC321X_GPIO_DATA_REG1 0x4c +#define RDC321X_GPIO_CTRL_REG2 0x84 +#define RDC321X_GPIO_DATA_REG2 0x88 + +#define RDC321X_MAX_GPIO 58 + +/* Definitions for the shared southbridge accessors */ +int rdc321x_pci_write (int reg,u32 val); +int rdc321x_pci_read (int reg,u32 *val); + +struct rdc321x_gpio_pdata { +unsigned max_gpios; +}; + +#endif /* __RDC321X_MFD_H */