/* * TI DaVinci DM365 EVM board support * * Copyright (C) 2009 Texas Instruments Incorporated * * 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. * * This program is distributed "as is" WITHOUT ANY WARRANTY of any * kind, whether express or implied; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "davinci.h" static inline int have_imager(void) { /* REVISIT when it's supported, trigger via Kconfig */ return 0; } static inline int have_tvp7002(void) { /* REVISIT when it's supported, trigger via Kconfig */ return 0; } #define DM365_EVM_PHY_ID "davinci_mdio-0:01" /* * A MAX-II CPLD is used for various board control functions. */ #define CPLD_OFFSET(a13a8,a2a1) (((a13a8) << 10) + ((a2a1) << 3)) #define CPLD_VERSION CPLD_OFFSET(0,0) /* r/o */ #define CPLD_TEST CPLD_OFFSET(0,1) #define CPLD_LEDS CPLD_OFFSET(0,2) #define CPLD_MUX CPLD_OFFSET(0,3) #define CPLD_SWITCH CPLD_OFFSET(1,0) /* r/o */ #define CPLD_POWER CPLD_OFFSET(1,1) #define CPLD_VIDEO CPLD_OFFSET(1,2) #define CPLD_CARDSTAT CPLD_OFFSET(1,3) /* r/o */ #define CPLD_DILC_OUT CPLD_OFFSET(2,0) #define CPLD_DILC_IN CPLD_OFFSET(2,1) /* r/o */ #define CPLD_IMG_DIR0 CPLD_OFFSET(2,2) #define CPLD_IMG_MUX0 CPLD_OFFSET(2,3) #define CPLD_IMG_MUX1 CPLD_OFFSET(3,0) #define CPLD_IMG_DIR1 CPLD_OFFSET(3,1) #define CPLD_IMG_MUX2 CPLD_OFFSET(3,2) #define CPLD_IMG_MUX3 CPLD_OFFSET(3,3) #define CPLD_IMG_DIR2 CPLD_OFFSET(4,0) #define CPLD_IMG_MUX4 CPLD_OFFSET(4,1) #define CPLD_IMG_MUX5 CPLD_OFFSET(4,2) #define CPLD_RESETS CPLD_OFFSET(4,3) #define CPLD_CCD_DIR1 CPLD_OFFSET(0x3e,0) #define CPLD_CCD_IO1 CPLD_OFFSET(0x3e,1) #define CPLD_CCD_DIR2 CPLD_OFFSET(0x3e,2) #define CPLD_CCD_IO2 CPLD_OFFSET(0x3e,3) #define CPLD_CCD_DIR3 CPLD_OFFSET(0x3f,0) #define CPLD_CCD_IO3 CPLD_OFFSET(0x3f,1) static void __iomem *cpld; /* NOTE: this is geared for the standard config, with a socketed * 2 GByte Micron NAND (MT29F16G08FAA) using 128KB sectors. If you * swap chips with a different block size, partitioning will * need to be changed. This NAND chip MT29F16G08FAA is the default