Skip to contentSkip to conversation

2/4 Support for Toshiba TMIO multifunction devices

PATCH New ian 1 participant 1 message Nov 20, 2007 Multifunction devices (MFD)

lore
Share & tools
lore

ian

author
#0 lore raw

PATCH 1/1 2/4 Support for Toshiba TMIO multifunction devices

Hi guys.

This patchset contains support for three toshiba multifunction devices.

This patch adds the core support code for three TMIO based MFDs.

There are no complete datasheets for these chips so their drivers are not 100% complete, however they do work.

Quoted 1 line

From e7ac11dbe1d89b80c0f52ef486173c394874604c Mon Sep 17 00:00:00 2001

From: Ian Molton <[email protected]>
Date: Tue, 20 Nov 2007 18:56:14 +0000
Subject: [PATCH] Preliminary support for Toshibas TMIO based multifunction chips.

Includes support for:
* t7l66xb
* tc6387xb
* tc6393xb

---
 drivers/mfd/Kconfig       |   25 +++
 drivers/mfd/Makefile      |    3 +
 drivers/mfd/t7l66xb.c     |  291 +++++++++++++++++++++++++++++++++++
 drivers/mfd/tc6387xb.c    |  143 +++++++++++++++++
 drivers/mfd/tc6393xb.c    |  374 +++++++++++++++++++++++++++++++++++++++++++++
 include/linux/t7l66xb.h   |   61 ++++++++
 include/linux/tc6387xb.h  |   40 +++++
 include/linux/tc6393.h    |  147 ++++++++++++++++++
 include/linux/tmio_mmc.h  |   17 ++
 include/linux/tmio_nand.h |    6 +
 include/linux/tmio_ohci.h |    6 +
 11 files changed, 1113 insertions(+), 0 deletions(-)
 create mode 100644 drivers/mfd/t7l66xb.c
 create mode 100644 drivers/mfd/tc6387xb.c
 create mode 100644 drivers/mfd/tc6393xb.c
 create mode 100644 include/linux/t7l66xb.h
 create mode 100644 include/linux/tc6387xb.h
 create mode 100644 include/linux/tc6393.h
 create mode 100644 include/linux/tmio_mmc.h
 create mode 100644 include/linux/tmio_nand.h
 create mode 100644 include/linux/tmio_ohci.h
drivers/mfd/Kconfig +25 -0
index 2571619..301b237 100644
@@ -15,6 +15,31 @@ config MFD_SM501
 	  interface. The device may be connected by PCI or local bus with
 	  varying functions enabled.
 
+config SOC_T7L66XB
+	bool "Toshiba T7L66XB SoC support"
+	---help---
+	  This driver supports the T7L66XB, which incorporates SD/MMC, and
+	  USB host functionality. associated subdevices are:
+	      tmio_mmc
+	      tmio_ohci
+
+config SOC_TC6387XB
+	bool "Toshiba TC6387XB SoC support"
+	---help---
+	  This driver supports the TC6393XB, which incorporates SD/MMC, NAND,
+	  Video, and USB host functionality. associated subdevices are:
+	      tmio_mmc
+
+config SOC_TC6393XB
+	bool "Toshiba TC6393XB SoC support"
+	---help---
+	  This driver supports the TC6393XB, which incorporates SD/MMC, NAND,
+	  Video, and USB host functionality. associated subdevices are:
+	      tmio_mmc
+	      tmio_nand
+	      tmio_fb
+	      tmio_ohci
+
 endmenu
 
 menu "Multimedia Capabilities Port drivers"
drivers/mfd/Makefile +3 -0
index 5143209..6fee649 100644
@@ -8,6 +8,9 @@ obj-$(CONFIG_MCP)		+= mcp-core.o
 obj-$(CONFIG_MCP_SA11X0)	+= mcp-sa11x0.o
 obj-$(CONFIG_MCP_UCB1200)	+= ucb1x00-core.o
 obj-$(CONFIG_MCP_UCB1200_TS)	+= ucb1x00-ts.o
+obj-$(CONFIG_SOC_TC6387XB)      += tc6387xb.o soc-core.o
+obj-$(CONFIG_SOC_T7L66XB)       += t7l66xb.o soc-core.o
+obj-$(CONFIG_SOC_TC6393XB)      += tc6393xb.o soc-core.o
 
 ifeq ($(CONFIG_SA1100_ASSABET),y)
 obj-$(CONFIG_MCP_UCB1200)	+= ucb1x00-assabet.o
drivers/mfd/t7l66xb.c new file +291 -0

291 lines not on this page · raw message

drivers/mfd/tc6387xb.c new file +143 -0

143 lines not on this page · raw message

drivers/mfd/tc6393xb.c new file +374 -0

374 lines not on this page · raw message

include/linux/t7l66xb.h new file +61 -0

61 lines not on this page · raw message

include/linux/tc6387xb.h new file +40 -0
new file mode 100644
index 0000000..c7a625e
@@ -0,0 +1,40 @@
+/*
+ * linux/include/asm-arm/hardware/tc6387xb.h
+ *
+ * This file contains the definitions for the TC6393XB
+ *
+ * (C) Copyright 2005 Ian Molton <[email protected]>
+ *
+ * May be copied or modified under the terms of the GNU General Public
+ * License.  See linux/COPYING for more information.
+ *
+ */
+#ifndef _ASM_ARCH_T7L66XB_SOC
+#define _ASM_ARCH_T7L66XB_SOC
+
+#include <linux/platform_device.h>
+
+// FIXME - this needs to be a common struct to all TMIO based SoCs.
+struct tmio_hwconfig {
+	void (*hwinit)(struct platform_device *sdev);
+	void (*suspend)(struct platform_device *sdev);
+	void (*resume)(struct platform_device *sdev);
+};
+
+struct tc6387xb_platform_data
+{
+	/* Standard MFD properties */
+	int irq_base;
+	struct platform_device **child_devs;
+	int num_child_devs;
+
+	void (* hw_init) (void);
+	void (* suspend) (void);
+	void (* resume)  (void);
+};
+
+#define TC6387XB_MMC_CNF_BASE    (0x000200)
+#define TC6387XB_MMC_CTL_BASE    (0x000800)
+#define TC6387XB_MMC_IRQ         (0)
+
+#endif
include/linux/tc6393.h new file +147 -0

147 lines not on this page · raw message

include/linux/tmio_mmc.h new file +17 -0
new file mode 100644
index 0000000..b8c407c
@@ -0,0 +1,17 @@
+#include <linux/platform_device.h>
+
+#define MMC_CLOCK_DISABLED 0
+#define MMC_CLOCK_ENABLED  1
+
+#define TMIO_WP_ALWAYS_RW ((void*)-1)
+
+struct tmio_mmc_hwconfig {
+	void (*hwinit)(struct platform_device *sdev);
+	void (*set_mmc_clock)(struct platform_device *sdev, int state);
+
+	/* NULL - use ASIC3 signal, 
+	   TMIO_WP_ALWAYS_RW - assume always R/W (e.g. miniSD) 
+	   otherwise - machine-specific handler */
+	int (*mmc_get_ro)(struct platform_device *pdev);
+	short address_shift;
+};
include/linux/tmio_nand.h new file +6 -0
new file mode 100644
index 0000000..ebfd483
@@ -0,0 +1,6 @@
+struct tmio_nand_hwconfig {
+        void (*hwinit)(struct platform_device *sdev);
+        void (*suspend)(struct platform_device *sdev);
+        void (*resume)(struct platform_device *sdev);
+};
+
include/linux/tmio_ohci.h new file +6 -0
new file mode 100644
index 0000000..56e7c73
@@ -0,0 +1,6 @@
+struct tmio_ohci_hwconfig {
+        void (*hwinit)(struct platform_device *sdev);
+        void (*suspend)(struct platform_device *sdev);
+        void (*resume)(struct platform_device *sdev);
+};
+
Signature · 1 line
1.5.3.5.737.gdee1b