Support for CompuLab CM-T3517 modules
Subsystems (3)
cover Support for CompuLab CM-T3517 modules
CompuLab CM-T3517 module is based on AM3517 (Sitara) SoC. CM-T3517 supports on-board 256/128MB DDR2 DRAM, 512/128MB NAND flash, WIFI-BlueTooth combo chip, USB HUB, AC97 Codec, TouchScreen controller, RTC.
This patch series add a basic support for CM-T3517 and some of its peripheral devices.
Based on:
commit da22d713d1149f528a734a10ea264c91a804662a
Merge: 8f3ce99 8475b9e
Author: Tony Lindgren <[email protected]>
Date: Mon Sep 13 21:17:04 2010 -0700
Linux-omap rebuilt: Updated to -rc4
Igor Grinberg (5):
omap3: Introduce CompuLab CM-T3517 module.
omap3: cm-t3517: add support for v3020 rtc.
omap3: cm-t3517: add support for usb host.
omap3: cm-t3517: add support for NAND flash
omap3: cm-t3517: add support for TI HECC
arch/arm/mach-omap2/Kconfig | 7 + arch/arm/mach-omap2/Makefile | 1 + arch/arm/mach-omap2/board-cm-t3517.c | 295 ++++++++++++++++++++++++++++++++++ 3 files changed, 303 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-omap2/board-cm-t3517.c
PATCH 1/5 omap3: Introduce CompuLab CM-T3517 module.
Add basic suppot, enable uart and led.
--- arch/arm/mach-omap2/Kconfig | 7 ++ arch/arm/mach-omap2/Makefile | 1 + arch/arm/mach-omap2/board-cm-t3517.c | 109 ++++++++++++++++++++++++++++++++++ 3 files changed, 117 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-omap2/board-cm-t3517.c
arch/arm/mach-omap2/Kconfig +7 -0
@@ -214,6 +214,13 @@ config MACH_CM_T35 select OMAP_PACKAGE_CUS select OMAP_MUX +config MACH_CM_T3517 + bool "CompuLab CM-T3517 module" + depends on ARCH_OMAP3 + default y + select OMAP_PACKAGE_CBB + select OMAP_MUX + config MACH_IGEP0020 bool "IGEP v2 board" depends on ARCH_OMAP3
arch/arm/mach-omap2/Makefile +1 -0
@@ -146,6 +146,7 @@ obj-$(CONFIG_MACH_OMAP_3630SDP) += board-3630sdp.o \ hsmmc.o obj-$(CONFIG_MACH_CM_T35) += board-cm-t35.o \ hsmmc.o +obj-$(CONFIG_MACH_CM_T3517) += board-cm-t3517.o obj-$(CONFIG_MACH_IGEP0020) += board-igep0020.o \ hsmmc.o obj-$(CONFIG_MACH_OMAP3_TOUCHBOOK) += board-omap3touchbook.o \
arch/arm/mach-omap2/board-cm-t3517.c new file +109 -0
109 lines not on this page · raw message
Signature · 1 line
1.7.1
Tony Lindgren
maintainerPATCH 1/5 omap3: Introduce CompuLab CM-T3517 module.
Quoted 9 lines · Igor Grinberg
Add basic suppot, enable uart and led.
Signed-off-by Igor Grinberg <[email protected]>--- arch/arm/mach-omap2/Kconfig | 7 ++ arch/arm/mach-omap2/Makefile | 1 + arch/arm/mach-omap2/board-cm-t3517.c | 109 ++++++++++++++++++++++++++++++++++ 3 files changed, 117 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-omap2/board-cm-t3517.c
Looks like you're missing the debug uart entry for arch/arm/plat-omap/include/plat/uncompress.h?
You can test this by enabling DEBUG_LL and EARLY_PRINTK in your .config, then pass earlyprintk in the kernel cmdline. Might become handy for debugging the early init process for your board.
Regards,
Tony
PATCH 1/5 omap3: Introduce CompuLab CM-T3517 module.
Quoted 10 lines · Tony Lindgren
Quoted 9 lines · Igor Grinberg
Add basic suppot, enable uart and led.
Signed-off-by Igor Grinberg <[email protected]>--- arch/arm/mach-omap2/Kconfig | 7 ++ arch/arm/mach-omap2/Makefile | 1 + arch/arm/mach-omap2/board-cm-t3517.c | 109 ++++++++++++++++++++++++++++++++++ 3 files changed, 117 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-omap2/board-cm-t3517.c
Quoted 7 lines
Looks like you're missing the debug uart entry for
arch/arm/plat-omap/include/plat/uncompress.h?You can test this by enabling
DEBUG_LLandEARLY_PRINTKin your .config, then pass earlyprintk in the kernel cmdline. Might become handy for debugging the early init process for your board.
Indeed can be useful.
Thanks.
Quoted 8 lines
Regards,
Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 2 lines
Regards, Igor.
PATCH 2/5 omap3: cm-t3517: add support for v3020 rtc.
In reply to Igor Grinberg--- arch/arm/mach-omap2/board-cm-t3517.c | 36 ++++++++++++++++++++++++++++++++++ 1 files changed, 36 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/board-cm-t3517.c +36 -0
@@ -27,6 +27,7 @@#include <linux/platform_device.h> #include <linux/gpio.h> #include <linux/leds.h> +#include <linux/rtc-v3020.h> #include <asm/mach-types.h> #include <asm/mach/arch.h>
@@ -69,6 +70,35 @@ static void __init cm_t3517_init_leds(void)static inline void cm_t3517_init_leds (void ) {}#endif +#if defined(CONFIG_RTC_DRV_V3020 ) || defined(CONFIG_RTC_DRV_V3020_MODULE ) +#define RTC_IO_GPIO (153) +#define RTC_WR_GPIO (154) +#define RTC_RD_GPIO (160) +#define RTC_CS_GPIO (163) + +struct v3020_platform_data cm_t3517_v3020_pdata = { + .use_gpio =1 , + .gpio_cs =RTC_CS_GPIO , + .gpio_wr =RTC_WR_GPIO , + .gpio_rd =RTC_RD_GPIO , + .gpio_io =RTC_IO_GPIO , +}; + +static struct platform_device cm_t3517_rtc_device = { + .name ="v3020" , + .id =-1 , + .dev = { + .platform_data = &cm_t3517_v3020_pdata, + } +}; + +static void __init cm_t3517_init_rtc (void ) +{ +platform_device_register (&cm_t3517_rtc_device); +} +#else +static inline void cm_t3517_init_rtc (void ) {} +#endif static struct omap_board_config_kernel cm_t3517_config[]__initdata = { };
@@ -86,6 +116,11 @@ static void __init cm_t3517_init_irq(void)static struct omap_board_mux board_mux[]__initdata = {/* GPIO186 - Green LED */ OMAP3_MUX (SYS_CLKOUT2 ,OMAP_MUX_MODE4 |OMAP_PIN_OUTPUT ), +/* RTC GPIOs: IO, WR#, RD#, CS# */ +OMAP3_MUX (MCBSP4_DR ,OMAP_MUX_MODE4 |OMAP_PIN_INPUT ), +OMAP3_MUX (MCBSP4_DX ,OMAP_MUX_MODE4 |OMAP_PIN_INPUT ), +OMAP3_MUX (MCBSP_CLKS ,OMAP_MUX_MODE4 |OMAP_PIN_INPUT ), +OMAP3_MUX (UART3_CTS_RCTX ,OMAP_MUX_MODE4 |OMAP_PIN_INPUT ), { .reg_offset =OMAP_MUX_TERMINATOR }, };
@@ -95,6 +130,7 @@ static void __init cm_t3517_init(void)omap3_mux_init (board_mux,OMAP_PACKAGE_CBB );omap_serial_init ();cm_t3517_init_leds (); +cm_t3517_init_rtc (); }MACHINE_START (CM_T3517 ,"Compulab CM-T3517" )
Signature · 1 line
1.7.1
PATCH 3/5 omap3: cm-t3517: add support for usb host.
In reply to Igor Grinberg--- arch/arm/mach-omap2/board-cm-t3517.c | 51 ++++++++++++++++++++++++++++++++++ 1 files changed, 51 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/board-cm-t3517.c +51 -0
@@ -25,6 +25,7 @@#include <linux/kernel.h> #include <linux/init.h> #include <linux/platform_device.h> +#include <linux/delay.h> #include <linux/gpio.h> #include <linux/leds.h> #include <linux/rtc-v3020.h>
@@ -36,6 +37,7 @@#include <plat/board.h> #include <plat/common.h> #include <plat/control.h> +#include <plat/usb.h> #include "mux.h"
@@ -100,6 +102,48 @@ static void __init cm_t3517_init_rtc(void)static inline void cm_t3517_init_rtc (void ) {}#endif +#if defined(CONFIG_USB_EHCI_HCD ) || defined(CONFIG_USB_EHCI_HCD_MODULE ) +#define HSUSB1_RESET_GPIO (146) +#define HSUSB2_RESET_GPIO (147) +#define USB_HUB_RESET_GPIO (152) + +static struct ehci_hcd_omap_platform_data cm_t3517_ehci_pdata__initdata = { + .port_mode[0 ] =EHCI_HCD_OMAP_MODE_PHY , + .port_mode[1 ] =EHCI_HCD_OMAP_MODE_PHY , + .port_mode[2 ] =EHCI_HCD_OMAP_MODE_UNKNOWN , + + .phy_reset = true, + .reset_gpio_port[0 ] =HSUSB1_RESET_GPIO , + .reset_gpio_port[1 ] =HSUSB2_RESET_GPIO , + .reset_gpio_port[2 ] = -EINVAL , +}; + +static int cm_t3517_init_usbh (void ) +{ +int err; + + err =gpio_request (USB_HUB_RESET_GPIO ,"usb hub rst" ); +if (err) { +pr_err ("CM-T3517: usb hub reset gpio request failed: %d\n" , + err); + }else { +gpio_direction_output (USB_HUB_RESET_GPIO ,0 ); +udelay (10 ); +gpio_set_value (USB_HUB_RESET_GPIO ,1 ); +msleep (1 ); + } + +usb_ehci_init (&cm_t3517_ehci_pdata); + +return 0 ; +} +#else +static inline int cm_t3517_init_usbh (void ) +{ +return 0 ; +} +#endif +static struct omap_board_config_kernel cm_t3517_config[]__initdata = { };
@@ -121,6 +165,12 @@ static struct omap_board_mux board_mux[] __initdata = {OMAP3_MUX (MCBSP4_DX ,OMAP_MUX_MODE4 |OMAP_PIN_INPUT ),OMAP3_MUX (MCBSP_CLKS ,OMAP_MUX_MODE4 |OMAP_PIN_INPUT ),OMAP3_MUX (UART3_CTS_RCTX ,OMAP_MUX_MODE4 |OMAP_PIN_INPUT ), +/* HSUSB1 RESET */ +OMAP3_MUX (UART2_TX ,OMAP_MUX_MODE4 |OMAP_PIN_OUTPUT ), +/* HSUSB2 RESET */ +OMAP3_MUX (UART2_RX ,OMAP_MUX_MODE4 |OMAP_PIN_OUTPUT ), +/* CM-T3517 USB HUB nRESET */ +OMAP3_MUX (MCBSP4_CLKX ,OMAP_MUX_MODE4 |OMAP_PIN_OUTPUT ), { .reg_offset = OMAP_MUX_TERMINATOR }, };
@@ -131,6 +181,7 @@ static void __init cm_t3517_init(void)omap_serial_init ();cm_t3517_init_leds ();cm_t3517_init_rtc (); +cm_t3517_init_usbh (); }MACHINE_START (CM_T3517 ,"Compulab CM-T3517" )
Signature · 1 line
1.7.1
PATCH 3/5 omap3: cm-t3517: add support for usb host.
Hi,
On Thu, Sep 16, 2010 at 03:54:39AM -0500, Igor Grinberg wrote:
put a description here.
Quoted 2 lines
Signed-off-by Igor Grinberg <[email protected]>---
[snip]
arch/arm/mach-omap2/board-cm-t3517.c static void __init cm_t3517_init_rtc(void) · line 129
Quoted 9 lines
arch/arm/mach-omap2/board-cm-t3517.c +9
-0+static int cm_t3517_init_usbh (void ) +{ +int err; + + err =gpio_request (USB_HUB_RESET_GPIO ,"usb hub rst" ); +if (err) { +pr_err ("CM-T3517: usb hub reset gpio request failed: %d\n" , + err); + }else {
if (err) {
pr_err("...");
return err;
}gpio_direction_output(...);
this will save you on identation level.
Signature · 1 line
balbi
PATCH 3/5 omap3: cm-t3517: add support for usb host.
Hi,
Quoted 5 lines · Felipe Balbi
Hi,
On Thu, Sep 16, 2010 at 03:54:39AM -0500, Igor Grinberg wrote:
put a description here.
This is a relatively small patch, is the subject not descriptive enough?
Quoted 21 lines
Quoted 3 lines
Signed-off-by Igor Grinberg <[email protected]>---
[snip]
arch/arm/mach-omap2/board-cm-t3517.c static void __init cm_t3517_init_rtc(void) · line 129
Quoted 9 lines
arch/arm/mach-omap2/board-cm-t3517.c +9
-0+static int cm_t3517_init_usbh (void ) +{ +int err; + + err =gpio_request (USB_HUB_RESET_GPIO ,"usb hub rst" ); +if (err) { +pr_err ("CM-T3517: usb hub reset gpio request failed: %d\n" , + err); + }else {if (err) { pr_err("..."); return err; }
Quoted 3 lines
gpio_direction_output(...);this will save you on identation level.
Yes it will, but even if the hub reset gpio is for some reason unavailable, we don't want to disable ehci completely...
There are other ports, that are not wired through the hub.
Signature · 2 lines
Regards, Igor.
Tony Lindgren
maintainerPATCH 3/5 omap3: cm-t3517: add support for usb host.
Quoted 10 lines · Igor Grinberg
Hi,
Quoted 5 lines · Felipe Balbi
Hi,
On Thu, Sep 16, 2010 at 03:54:39AM -0500, Igor Grinberg wrote:
put a description here.
This is a relatively small patch, is the subject not descriptive enough?
In that case just copy the subject (without the [PATCH] part) to the description for all of your patches.
Regards,
Tony
PATCH 3/5 omap3: cm-t3517: add support for usb host.
Quoted 4 lines · Tony Lindgren
Quoted 3 lines · Igor Grinberg
Hi,
On 09/16/10 11:00, Felipe Balbi wrote:
Quoted 8 lines
Quoted 6 lines
Quoted 5 lines
Hi,
On Thu, Sep 16, 2010 at 03:54:39AM -0500, Igor Grinberg wrote:
put a description here.
This is a relatively small patch, is the subject not descriptive enough?
In that case just copy the subject (without the [PATCH] part) to the description for all of your patches.
Ok, will do and re-spin.
Thanks
Quoted 4 lines
Regards,
Tony
Signature · 2 lines
Regards, Igor.
PATCH 3/5 omap3: cm-t3517: add support for usb host.
In reply to Igor GrinbergQuoted 2 lines · Igor Grinberg
Yes it will, but even if the hub reset gpio is for some reason unavailable, we don't want to disable ehci completely...
then you should set the gpio to an invalid number, otherwise you might cause lots of WARN() to appear due to fiddling with unrequested gpio.
Signature · 1 line
balbi
PATCH 3/5 omap3: cm-t3517: add support for usb host.
Quoted 6 lines · Felipe Balbi
Quoted 2 lines · Igor Grinberg
Yes it will, but even if the hub reset gpio is for some reason unavailable, we don't want to disable ehci completely...
then you should set the gpio to an invalid number, otherwise you might cause lots of
WARN()to appear due to fiddling with unrequested gpio.
What gpio should be set to invalid number?
It is a reset gpio for usb _hub_ and it has nothing to do with ehci. Can you please, explain the case when I might cause those WARN()'s?
Signature · 2 lines
Regards, Igor.
PATCH 3/5 omap3: cm-t3517: add support for usb host.
Quoted 9 lines · Igor Grinberg
Quoted 6 lines · Felipe Balbi
Quoted 2 lines · Igor Grinberg
Yes it will, but even if the hub reset gpio is for some reason unavailable, we don't want to disable ehci completely...
then you should set the gpio to an invalid number, otherwise you might cause lots of
WARN()to appear due to fiddling with unrequested gpio.What gpio should be set to invalid number?
the one which fails to be requested.
Quoted 2 lines
It is a reset gpio for usb _hub_ and it has nothing to do with ehci. Can you please, explain the case when I might cause those WARN()'s?
ok, I misunderstood then. Nevermind
Signature · 1 line
balbi
PATCH 4/5 omap3: cm-t3517: add support for NAND flash
In reply to Igor Grinberg--- arch/arm/mach-omap2/board-cm-t3517.c | 54 ++++++++++++++++++++++++++++++++++ 1 files changed, 54 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/board-cm-t3517.c +54 -0
@@ -29,6 +29,9 @@#include <linux/gpio.h> #include <linux/leds.h> #include <linux/rtc-v3020.h> +#include <linux/mtd/mtd.h> +#include <linux/mtd/nand.h> +#include <linux/mtd/partitions.h> #include <asm/mach-types.h> #include <asm/mach/arch.h>
@@ -38,6 +41,8 @@#include <plat/common.h> #include <plat/control.h> #include <plat/usb.h> +#include <plat/nand.h> +#include <plat/gpmc.h> #include "mux.h"
@@ -144,6 +149,54 @@ static inline int cm_t3517_init_usbh(void) }#endif +#if defined(CONFIG_MTD_NAND_OMAP2 ) || defined(CONFIG_MTD_NAND_OMAP2_MODULE ) +#define NAND_BLOCK_SIZE SZ_128K + +static struct mtd_partition cm_t3517_nand_partitions[] = { + { + .name ="xloader" , + .offset =0 ,/* Offset = 0x00000 */ + .size =4 *NAND_BLOCK_SIZE , + .mask_flags =MTD_WRITEABLE + }, + { + .name ="uboot" , + .offset =MTDPART_OFS_APPEND ,/* Offset = 0x80000 */ + .size =15 *NAND_BLOCK_SIZE , + }, + { + .name ="uboot environment" , + .offset =MTDPART_OFS_APPEND ,/* Offset = 0x260000 */ + .size =2 *NAND_BLOCK_SIZE , + }, + { + .name ="linux" , + .offset =MTDPART_OFS_APPEND ,/* Offset = 0x280000 */ + .size =32 *NAND_BLOCK_SIZE , + }, + { + .name ="rootfs" , + .offset =MTDPART_OFS_APPEND ,/* Offset = 0x680000 */ + .size =MTDPART_SIZ_FULL , + }, +}; + +static struct omap_nand_platform_data cm_t3517_nand_data = { + .parts = cm_t3517_nand_partitions, + .nr_parts =ARRAY_SIZE (cm_t3517_nand_partitions), + .dma_channel =-1 ,/* disable DMA in OMAP NAND driver */ + .cs =0 , +}; + +static void __init cm_t3517_init_nand (void ) +{ +if (gpmc_nand_init (&cm_t3517_nand_data) <0 ) +pr_err ("CM-T3517: NAND initialization failed\n" ); +} +#else +static inline void cm_t3517_init_nand (void ) {} +#endif +static struct omap_board_config_kernel cm_t3517_config[]__initdata = { };
@@ -180,6 +233,7 @@ static void __init cm_t3517_init(void)omap3_mux_init (board_mux,OMAP_PACKAGE_CBB );omap_serial_init ();cm_t3517_init_leds (); +cm_t3517_init_nand ();cm_t3517_init_rtc ();cm_t3517_init_usbh (); }
Signature · 1 line
1.7.1
PATCH 5/5 omap3: cm-t3517: add support for TI HECC
In reply to Igor Grinberg--- arch/arm/mach-omap2/board-cm-t3517.c | 45 ++++++++++++++++++++++++++++++++++ 1 files changed, 45 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/board-cm-t3517.c +45 -0
@@ -32,6 +32,7 @@#include <linux/mtd/mtd.h> #include <linux/mtd/nand.h> #include <linux/mtd/partitions.h> +#include <linux/can/platform/ti_hecc.h> #include <asm/mach-types.h> #include <asm/mach/arch.h>
@@ -44,6 +45,8 @@#include <plat/nand.h> #include <plat/gpmc.h> +#include <mach/am35xx.h> +#include "mux.h" #if defined(CONFIG_LEDS_GPIO ) || defined(CONFIG_LEDS_GPIO_MODULE )
@@ -77,6 +80,47 @@ static void __init cm_t3517_init_leds(void)static inline void cm_t3517_init_leds (void ) {}#endif +#if defined(CONFIG_CAN_TI_HECC ) || defined(CONFIG_CAN_TI_HECC_MODULE ) +static struct resource cm_t3517_hecc_resources[] = { + { + .start =AM35XX_IPSS_HECC_BASE , + .end =AM35XX_IPSS_HECC_BASE +SZ_16K -1 , + .flags =IORESOURCE_MEM , + }, + { + .start =INT_35XX_HECC0_IRQ , + .end =INT_35XX_HECC0_IRQ , + .flags =IORESOURCE_IRQ , + }, +}; + +static struct ti_hecc_platform_data cm_t3517_hecc_pdata = { + .scc_hecc_offset =AM35XX_HECC_SCC_HECC_OFFSET , + .scc_ram_offset =AM35XX_HECC_SCC_RAM_OFFSET , + .hecc_ram_offset =AM35XX_HECC_RAM_OFFSET , + .mbx_offset =AM35XX_HECC_MBOX_OFFSET , + .int_line =AM35XX_HECC_INT_LINE , + .version =AM35XX_HECC_VERSION , +}; + +static struct platform_device cm_t3517_hecc_device = { + .name ="ti_hecc" , + .id =1 , + .num_resources =ARRAY_SIZE (cm_t3517_hecc_resources), + .resource = cm_t3517_hecc_resources, + .dev = { + .platform_data = &cm_t3517_hecc_pdata, + }, +}; + +static void cm_t3517_init_hecc (void ) +{ +platform_device_register (&cm_t3517_hecc_device); +} +#else +static inline void cm_t3517_init_hecc (void ) {} +#endif +#if defined(CONFIG_RTC_DRV_V3020 ) || defined(CONFIG_RTC_DRV_V3020_MODULE )#define RTC_IO_GPIO (153)#define RTC_WR_GPIO (154)
@@ -236,6 +280,7 @@ static void __init cm_t3517_init(void)cm_t3517_init_nand ();cm_t3517_init_rtc ();cm_t3517_init_usbh (); +cm_t3517_init_hecc (); }MACHINE_START (CM_T3517 ,"Compulab CM-T3517" )
Signature · 1 line
1.7.1