omap3: cm-t35 updates
Subsystems (3)
cover omap3: cm-t35 updates
Here are several small updates for CM-T35 board.
Changes since commit e7e7a613eded2732b68496f69ff8fc34f16e1dd0:
Tony Lindgren (1):
Linux-omap rebuilt: Processor support for new omaps merged
Mike Rapoport (3):
omap3: cm-t35: update led polarity
omap3: cm-t35: use matrix_keyboard
omap3: cm-t35: add support for baseboard ehternet
arch/arm/mach-omap2/board-cm-t35.c | 71 ++++++++++++++++++++++++++---------- 1 files changed, 51 insertions(+), 20 deletions(-)
PATCH 2/3 omap3: cm-t35: use matrix_keyboard
--- arch/arm/mach-omap2/board-cm-t35.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/board-cm-t35.c +1 -1
@@ -24,6 +24,7 @@#include <linux/init.h> #include <linux/platform_device.h> #include <linux/input.h> +#include <linux/input/matrix_keypad.h> #include <linux/delay.h> #include <linux/gpio.h>
@@ -39,7 +40,6 @@#include <plat/common.h> #include <plat/mux.h> #include <plat/nand.h> -#include <plat/keypad.h> #include <plat/gpmc.h> #include <plat/usb.h>
Signature · 1 line
1.6.0.6
PATCH 3/3 omap3: cm-t35: add support for baseboard ehternet
In reply to Mike RapoportDefault CM-T35 baseboard (SB-T35) utilizes SMSC9220 Ethernet chip. Enable it.
--- arch/arm/mach-omap2/board-cm-t35.c | 67 ++++++++++++++++++++++++++---------- 1 files changed, 49 insertions(+), 18 deletions(-)
arch/arm/mach-omap2/board-cm-t35.c +49 -18
@@ -52,6 +52,8 @@#define CM_T35_SMSC911X_CS 5#define CM_T35_SMSC911X_GPIO 163 +#define SB_T35_SMSC911X_CS 4 +#define SB_T35_SMSC911X_GPIO 65#define NAND_BLOCK_SIZE SZ_128K#define GPMC_CS0_BASE 0x60
@@ -60,9 +62,15 @@ #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) #include <linux/smsc911x.h> +static struct smsc911x_platform_config cm_t35_smsc911x_config = { + .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, + .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN, + .flags = SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS, + .phy_interface = PHY_INTERFACE_MODE_MII, +}; + static struct resource cm_t35_smsc911x_resources[] = { { - .name = "smsc911x-memory", .flags = IORESOURCE_MEM, }, {
@@ -72,13 +80,6 @@ static struct resource cm_t35_smsc911x_resources[] = { }, }; -static struct smsc911x_platform_config cm_t35_smsc911x_config = { - .irq_polarity =SMSC911X_IRQ_POLARITY_ACTIVE_LOW , - .irq_type =SMSC911X_IRQ_TYPE_OPEN_DRAIN , - .flags =SMSC911X_USE_32BIT |SMSC911X_SAVE_MAC_ADDRESS , - .phy_interface =PHY_INTERFACE_MODE_MII , -}; -static struct platform_device cm_t35_smsc911x_device = { .name ="smsc911x" , .id =0 ,
@@ -89,30 +90,60 @@ static struct platform_device cm_t35_smsc911x_device = { }, }; -static void __init cm_t35_init_smsc911x (void ) +static struct resource sb_t35_smsc911x_resources[] = { + { + .flags =IORESOURCE_MEM , + }, + { + .start =OMAP_GPIO_IRQ (SB_T35_SMSC911X_GPIO ), + .end =OMAP_GPIO_IRQ (SB_T35_SMSC911X_GPIO ), + .flags =IORESOURCE_IRQ |IORESOURCE_IRQ_LOWLEVEL , + }, +}; + +static struct platform_device sb_t35_smsc911x_device = { + .name ="smsc911x" , + .id =1 , + .num_resources =ARRAY_SIZE (sb_t35_smsc911x_resources), + .resource = sb_t35_smsc911x_resources, + .dev = { + .platform_data = &cm_t35_smsc911x_config, + }, +}; + +static void __init cm_t35_init_smsc911x (struct platform_device *dev, +int cs,int irq_gpio) {unsigned long cs_mem_base; -if (gpmc_cs_request (CM_T35_SMSC911X_CS ,SZ_16M , &cs_mem_base) <0 ) { +if (gpmc_cs_request (cs,SZ_16M , &cs_mem_base) <0 ) {pr_err ("CM-T35: Failed request for GPMC mem for smsc911x\n" );return ; } - cm_t35_smsc911x_resources[0 ].start = cs_mem_base +0x0 ; - cm_t35_smsc911x_resources[0 ].end = cs_mem_base +0xff ; + dev->resource[0 ].start = cs_mem_base +0x0 ; + dev->resource[0 ].end = cs_mem_base +0xff ; -if ((gpio_request (CM_T35_SMSC911X_GPIO ,"CM ETH IRQ" ) ==0 ) && - (gpio_direction_input (CM_T35_SMSC911X_GPIO ) ==0 )) { -gpio_export (CM_T35_SMSC911X_GPIO ,0 ); +if ((gpio_request (irq_gpio,"ETH IRQ" ) ==0 ) && + (gpio_direction_input (irq_gpio) ==0 )) { +gpio_export (irq_gpio,0 ); }else {pr_err ("CM-T35: could not obtain gpio for SMSC911X IRQ\n" );return ; } -platform_device_register (&cm_t35_smsc911x_device); +platform_device_register (dev); +} + +static void __init cm_t35_init_ethernet (void ) +{ +cm_t35_init_smsc911x (&cm_t35_smsc911x_device, +CM_T35_SMSC911X_CS ,CM_T35_SMSC911X_GPIO ); +cm_t35_init_smsc911x (&sb_t35_smsc911x_device, +SB_T35_SMSC911X_CS ,SB_T35_SMSC911X_GPIO ); }#else -static inline void __init cm_t35_init_smsc911x (void ) {return ; } +static inline void __init cm_t35_init_ethernet (void ) {return ; }#endif #if defined(CONFIG_LEDS_GPIO ) || defined(CONFIG_LEDS_GPIO_MODULE )
@@ -457,7 +488,7 @@ static void __init cm_t35_init(void)cm_t35_init_i2c ();cm_t35_init_nand ();cm_t35_init_ads7846 (); -cm_t35_init_smsc911x (); +cm_t35_init_ethernet ();cm_t35_init_led ();usb_musb_init ();
Signature · 1 line
1.6.0.6
PATCH 1/3 omap3: cm-t35: update led polarity
In reply to Mike Rapoport--- arch/arm/mach-omap2/board-cm-t35.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/board-cm-t35.c +1 -1
@@ -123,7 +123,7 @@ static struct gpio_led cm_t35_leds[] = { .gpio = 186, .name = "cm-t35:green", .default_trigger = "heartbeat", - .active_low = 1, + .active_low = 0, }, };
Signature · 1 line
1.6.0.6
Tony Lindgren
maintainerQuoted 6 lines · Mike Rapoport
Here are several small updates for CM-T35 board.
Changes since commit
e7e7a613eded2732b68496f69ff8fc34f16e1dd0:
Tony Lindgren (1):
Linux-omap rebuilt: Processor support for new omaps merged
Quoted 6 lines
Mike Rapoport (3):
omap3: cm-t35: update led polarity
omap3: cm-t35: usematrix_keyboard
omap3: cm-t35: add support for baseboard ehternetarch/arm/mach-omap2/board-cm-t35.c | 71 ++++++++++++++++++++++++++----------
Merging all three into your earlier patch in omap for-next branch.
Tony