| 
					
				 | 
			
			
				@@ -0,0 +1,125 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+/* 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * mackerel board support 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * Copyright (C) 2010 Renesas Solutions Corp. 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * based on ap4evb 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * Copyright (C) 2010  Magnus Damm 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * Copyright (C) 2008  Yoshihiro Shimoda 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * This program is free software; you can redistribute it and/or modify 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * it under the terms of the GNU General Public License as published by 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * the Free Software Foundation; version 2 of the License. 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * This program is distributed in the hope that it will be useful, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * but WITHOUT ANY WARRANTY; without even the implied warranty of 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * GNU General Public License for more details. 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * You should have received a copy of the GNU General Public License 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * along with this program; if not, write to the Free Software 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <linux/delay.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <linux/kernel.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <linux/init.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <linux/interrupt.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <linux/irq.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <linux/platform_device.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <linux/gpio.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <linux/input.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <linux/io.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <linux/i2c.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <linux/leds.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <linux/mfd/tmio.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <linux/mmc/host.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <linux/mmc/sh_mmcif.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <linux/mmc/sh_mobile_sdhi.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <linux/mtd/mtd.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <linux/mtd/partitions.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <linux/mtd/physmap.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <linux/mtd/sh_flctl.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <linux/pm_clock.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <linux/regulator/fixed.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <linux/regulator/machine.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <linux/smsc911x.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <linux/sh_intc.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <linux/tca6416_keypad.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <linux/usb/renesas_usbhs.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <linux/dma-mapping.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <video/sh_mobile_hdmi.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <video/sh_mobile_lcdc.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <media/sh_mobile_ceu.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <media/soc_camera.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <media/soc_camera_platform.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <sound/sh_fsi.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <sound/simple_card.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <mach/common.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <mach/irqs.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <mach/sh7372.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <asm/mach/arch.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <asm/mach-types.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include "sh-gpio.h" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+/* 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * Address	Interface		BusWidth	note 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * ------------------------------------------------------------------ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * 0x0000_0000	NOR Flash ROM (MCP)	16bit		SW7 : bit1 = ON 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * 0x0800_0000	user area		- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * 0x1000_0000	NOR Flash ROM (MCP)	16bit		SW7 : bit1 = OFF 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * 0x1400_0000	Ether (LAN9220)		16bit 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * 0x1600_0000	user area		-		cannot use with NAND 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * 0x1800_0000	user area		- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * 0x1A00_0000	- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * 0x4000_0000	LPDDR2-SDRAM (POP)	32bit 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+/* 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * CPU mode 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * SW4                                     | Boot Area| Master   | Remarks 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ *  1  | 2   | 3   | 4   | 5   | 6   | 8   |          | Processor| 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * ----+-----+-----+-----+-----+-----+-----+----------+----------+-------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * ON  | ON  | OFF | ON  | ON  | OFF | OFF | External | System   | External ROM 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * ON  | ON  | ON  | ON  | ON  | OFF | OFF | External | System   | ROM Debug 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * ON  | ON  | X   | ON  | OFF | OFF | OFF | Built-in | System   | ROM Debug 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * X   | OFF | X   | X   | X   | X   | OFF | Built-in | System   | MaskROM 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * OFF | X   | X   | X   | X   | X   | OFF | Built-in | System   | MaskROM 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * X   | X   | X   | OFF | X   | X   | OFF | Built-in | System   | MaskROM 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * OFF | ON  | OFF | X   | X   | OFF | ON  | External | System   | Standalone 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * ON  | OFF | OFF | X   | X   | OFF | ON  | External | Realtime | Standalone 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+*/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+/* 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * NOR Flash ROM 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ *  SW1  |     SW2    | SW7  | NOR Flash ROM 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ *  bit1 | bit1  bit2 | bit1 | Memory allocation 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * ------+------------+------+------------------ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ *  OFF  | ON     OFF | ON   |    Area 0 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ *  OFF  | ON     OFF | OFF  |    Area 4 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+/* 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * SMSC 9220 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ *  SW1		SMSC 9220 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * ----------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ *  ON		access disable 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ *  OFF		access enable 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+/* 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * NAND Flash ROM 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ *  SW1  |     SW2    | SW7  | NAND Flash ROM 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ *  bit1 | bit1  bit2 | bit2 | Memory allocation 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * ------+------------+------+------------------ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ *  OFF  | ON     OFF | ON   |    FCE 0 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ *  OFF  | ON     OFF | OFF  |    FCE 1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ */ 
			 |