Re: [PATCH] Initial support for OMAP3 Thunder board
On Thu, Dec 10, 2009 at 11:45 PM, Tony Lindgren t...@atomide.com wrote: * Daniel Toussaint dan...@dmhome.net [091210 14:29]: Cool. Can you please split the the patches into following separate patches: 1. Add minimal board support 2. Add defconfig 3. Add ASoC support 4. Add DSS2 support Ok, so can the DSS2 related stuff be ifdef-ed in the board file ,or does it have to be completely seperated ? Please leave it out for now as the DSS2 code is not merged yet. That can be patched in later on, it's best to leave out all the dependencies from patches when possible. Also, your patches need to be against current Linus' mainline tree, not against linux-omap master branch as we already have DSS2 merged in for testing. Mainline ? ok. I noticed mainline is still using mach/ instead of plat/ and there no support for the ehci reset with GPIO's. Or am I looking at the wrong tree ? Regards, Tony -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH] Initial support for OMAP3 Thunder board
Daniel Toussaint wrote: On Thu, Dec 10, 2009 at 11:45 PM, Tony Lindgren t...@atomide.com wrote: * Daniel Toussaint dan...@dmhome.net [091210 14:29]: Cool. Can you please split the the patches into following separate patches: 1. Add minimal board support 2. Add defconfig 3. Add ASoC support 4. Add DSS2 support Ok, so can the DSS2 related stuff be ifdef-ed in the board file ,or does it have to be completely seperated ? Please leave it out for now as the DSS2 code is not merged yet. That can be patched in later on, it's best to leave out all the dependencies from patches when possible. Also, your patches need to be against current Linus' mainline tree, not against linux-omap master branch as we already have DSS2 merged in for testing. Mainline ? ok. I noticed mainline is still using mach/ instead of plat/ and there no support for the ehci reset with GPIO's. Or am I looking at the wrong tree ? ehci-omap is still in Greg's tree; it hasn't reached mainline yet. You should see it by next week, with the GPIO reset stuff in. For now, you can take mainline + Greg's usb queue at [1] - Anand [1] http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/gregkh-all-2.6.32.patch -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] Initial support for OMAP3 Thunder board
Dear All, See attached patch for this board: http://www.technexion.com/index.php/thunder The patch contains board file, support for an LCD panel under DSS2 and support for Alsa sound. /Signed-off-by Daniel Toussaint dan...@dmhome.net /// diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 16c0c13..e5493a5 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig @@ -151,6 +151,11 @@ config MACH_OMAP_4430SDP bool OMAP 4430 SDP board depends on ARCH_OMAP4 +config MACH_OMAP3_THUNDER + bool Thunder OMAP3530 board + depends on ARCH_OMAP3 ARCH_OMAP34XX + select OMAP_PACKAGE_CUS + config OMAP3_EMU bool OMAP3 debugging peripherals depends on ARCH_OMAP3 diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 0c5d886..bd76499 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile @@ -105,6 +105,9 @@ obj-$(CONFIG_MACH_OMAP_4430SDP) += board-4430sdp.o obj-$(CONFIG_MACH_OMAP3517EVM) += board-am3517evm.o +obj-$(CONFIG_MACH_OMAP3_THUNDER) += board-omap3thunder.o \ + mmc-twl4030.o + # Platform specific device init code obj-y += usb-musb.o obj-$(CONFIG_MACH_OMAP2_TUSB6010) += usb-tusb6010.o diff --git a/arch/arm/mach-omap2/board-omap3thunder.c b/arch/arm/mach-omap2/board-omap3thunder.c new file mode 100644 index 000..d6ea9de --- /dev/null +++ b/arch/arm/mach-omap2/board-omap3thunder.c @@ -0,0 +1,647 @@ +/* + * linux/arch/arm/mach-omap2/board-omap3touchbook.c + * + * Copyright (C) 2009 Technexion + * + * Modified from mach-omap2/board-omap3beagleboard.c + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + + +#include linux/kernel.h +#include linux/init.h +#include linux/platform_device.h +#include linux/delay.h +#include linux/err.h +#include linux/clk.h +#include linux/io.h +#include linux/leds.h +#include linux/gpio.h +#include linux/input.h +#include linux/gpio_keys.h + +#include linux/mtd/mtd.h +#include linux/mtd/partitions.h +#include linux/mtd/nand.h + +#include linux/regulator/machine.h +#include linux/i2c/twl4030.h + +#include mach/hardware.h +#include asm/mach-types.h +#include asm/mach/arch.h +#include asm/mach/map.h +#include asm/mach/flash.h + +#include plat/board.h +#include plat/usb.h +#include linux/usb/otg.h +#include plat/common.h +#include plat/gpmc.h +#include plat/nand.h +#include plat/mux.h +#include plat/display.h + +#include mmc-twl4030.h +#include mux.h + + +#include linux/spi/spi.h +#include linux/spi/ads7846.h +#include plat/mcspi.h + +#include plat/mmc.h + + +#define OMAP3_THUNDER_TS_GPIO 136 + +#define GPMC_CS0_BASE 0x60 +#define GPMC_CS_SIZE 0x30 + +#define NAND_BLOCK_SIZE SZ_128K + +#define THUNDER_DVI_PANEL_EN_GPIO 199 /* GPIO 7 on TWL4030 */ +#define THUNDER_LCD_PANEL_ENVDD 138 +#define THUNDER_LCD_PON 139 + +#define TWL_INTBR_GPBR1 0x0c +#define TWL_INTBR_PMBR1 0x0d +#define TWL_PWM0_ON0x00 +#define TWL_PWM0_OFF 0x01 + +static int lcd_enabled; +static int dvi_enabled; + +static void __init thunder_display_init(void) +{ + gpio_request(THUNDER_LCD_PANEL_ENVDD, lcd_panel_envdd); + gpio_request(THUNDER_LCD_PON, lcd_panel_pon); + gpio_direction_output(THUNDER_LCD_PON, 1); + gpio_direction_output(THUNDER_LCD_PANEL_ENVDD, 0); + return; +} + +static int thunder_enable_lcd(struct omap_dss_device *dssdev) +{ + + if (dvi_enabled) { + printk(KERN_ERR cannot enable LCD, DVI is enabled\n); + return -EINVAL; + } + + gpio_set_value(THUNDER_LCD_PANEL_ENVDD, 0); + gpio_set_value(THUNDER_LCD_PON, 1); + + /* This turns on the backlight, move this to backlight code later */ + twl4030_i2c_write_u8(TWL4030_MODULE_PWM0, 0x81, TWL_PWM0_ON); +twl4030_i2c_write_u8(TWL4030_MODULE_INTBR, 0x04, TWL_INTBR_PMBR1); +twl4030_i2c_write_u8(TWL4030_MODULE_PWM0, 6 + 40 , TWL_PWM0_OFF); +twl4030_i2c_write_u8(TWL4030_MODULE_INTBR, 0x05, TWL_INTBR_GPBR1); + twl4030_i2c_write_u8(TWL4030_MODULE_PWM0, 6 + 50 , TWL_PWM0_OFF); + /* End of turning on Backlight */ + + lcd_enabled = 1; + return 0; +} + +static void thunder_disable_lcd(struct omap_dss_device *dssdev) +{ + gpio_set_value(THUNDER_LCD_PANEL_ENVDD, 1); + gpio_set_value(THUNDER_LCD_PON, 0); + lcd_enabled = 0; +} + + +static int thunder_set_backlight ( struct omap_dss_device *dssdev, int level) +{ + return 0; +} + +static int thunder_get_backlight ( struct omap_dss_device *dssdev) +{ + return 10; +} + + +static struct omap_dss_device thunder_lcd_device = { + .type = OMAP_DISPLAY_TYPE_DPI, + .name = lcd, + .driver_name = panel-lg-lb043wq2, + .phy.dpi.data_lines = 24, + .platform_enable = thunder_enable_lcd, + .platform_disable = thunder_disable_lcd, + + .get_backlight = thunder_get_backlight, + .set_backlight = thunder_set_backlight, + .max_backlight_level= 100, +}; + +static int
Re: [PATCH] Initial support for OMAP3 Thunder board
* Daniel Toussaint dan...@dmhome.net [091210 12:24]: Dear All, See attached patch for this board: http://www.technexion.com/index.php/thunder The patch contains board file, support for an LCD panel under DSS2 and support for Alsa sound. Cool. Can you please split the the patches into following separate patches: 1. Add minimal board support 2. Add defconfig 3. Add ASoC support 4. Add DSS2 support Then please run all the patches through scripts/checkpatch.pl --strict and fix the errors and warnings. And please make sure things keep compiling through the all the patches, otherwise git bisect will break. Cheers, Tony /Signed-off-by Daniel Toussaint dan...@dmhome.net /// diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 16c0c13..e5493a5 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig @@ -151,6 +151,11 @@ config MACH_OMAP_4430SDP bool OMAP 4430 SDP board depends on ARCH_OMAP4 +config MACH_OMAP3_THUNDER + bool Thunder OMAP3530 board + depends on ARCH_OMAP3 ARCH_OMAP34XX + select OMAP_PACKAGE_CUS + config OMAP3_EMU bool OMAP3 debugging peripherals depends on ARCH_OMAP3 diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 0c5d886..bd76499 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile @@ -105,6 +105,9 @@ obj-$(CONFIG_MACH_OMAP_4430SDP) += board-4430sdp.o obj-$(CONFIG_MACH_OMAP3517EVM) += board-am3517evm.o +obj-$(CONFIG_MACH_OMAP3_THUNDER) += board-omap3thunder.o \ +mmc-twl4030.o + # Platform specific device init code obj-y+= usb-musb.o obj-$(CONFIG_MACH_OMAP2_TUSB6010)+= usb-tusb6010.o diff --git a/arch/arm/mach-omap2/board-omap3thunder.c b/arch/arm/mach-omap2/board-omap3thunder.c new file mode 100644 index 000..d6ea9de --- /dev/null +++ b/arch/arm/mach-omap2/board-omap3thunder.c @@ -0,0 +1,647 @@ +/* + * linux/arch/arm/mach-omap2/board-omap3touchbook.c + * + * Copyright (C) 2009 Technexion + * + * Modified from mach-omap2/board-omap3beagleboard.c + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + + +#include linux/kernel.h +#include linux/init.h +#include linux/platform_device.h +#include linux/delay.h +#include linux/err.h +#include linux/clk.h +#include linux/io.h +#include linux/leds.h +#include linux/gpio.h +#include linux/input.h +#include linux/gpio_keys.h + +#include linux/mtd/mtd.h +#include linux/mtd/partitions.h +#include linux/mtd/nand.h + +#include linux/regulator/machine.h +#include linux/i2c/twl4030.h + +#include mach/hardware.h +#include asm/mach-types.h +#include asm/mach/arch.h +#include asm/mach/map.h +#include asm/mach/flash.h + +#include plat/board.h +#include plat/usb.h +#include linux/usb/otg.h +#include plat/common.h +#include plat/gpmc.h +#include plat/nand.h +#include plat/mux.h +#include plat/display.h + +#include mmc-twl4030.h +#include mux.h + + +#include linux/spi/spi.h +#include linux/spi/ads7846.h +#include plat/mcspi.h + +#include plat/mmc.h + + +#define OMAP3_THUNDER_TS_GPIO136 + +#define GPMC_CS0_BASE 0x60 +#define GPMC_CS_SIZE 0x30 + +#define NAND_BLOCK_SIZE SZ_128K + +#define THUNDER_DVI_PANEL_EN_GPIO 199 /* GPIO 7 on TWL4030 */ +#define THUNDER_LCD_PANEL_ENVDD 138 +#define THUNDER_LCD_PON 139 + +#define TWL_INTBR_GPBR1 0x0c +#define TWL_INTBR_PMBR1 0x0d +#define TWL_PWM0_ON0x00 +#define TWL_PWM0_OFF 0x01 + +static int lcd_enabled; +static int dvi_enabled; + +static void __init thunder_display_init(void) +{ + gpio_request(THUNDER_LCD_PANEL_ENVDD, lcd_panel_envdd); + gpio_request(THUNDER_LCD_PON, lcd_panel_pon); + gpio_direction_output(THUNDER_LCD_PON, 1); + gpio_direction_output(THUNDER_LCD_PANEL_ENVDD, 0); + return; +} + +static int thunder_enable_lcd(struct omap_dss_device *dssdev) +{ + + if (dvi_enabled) { + printk(KERN_ERR cannot enable LCD, DVI is enabled\n); + return -EINVAL; + } + + gpio_set_value(THUNDER_LCD_PANEL_ENVDD, 0); + gpio_set_value(THUNDER_LCD_PON, 1); + + /* This turns on the backlight, move this to backlight code later */ + twl4030_i2c_write_u8(TWL4030_MODULE_PWM0, 0x81, TWL_PWM0_ON); +twl4030_i2c_write_u8(TWL4030_MODULE_INTBR, 0x04, TWL_INTBR_PMBR1); +twl4030_i2c_write_u8(TWL4030_MODULE_PWM0, 6 + 40 , TWL_PWM0_OFF); +twl4030_i2c_write_u8(TWL4030_MODULE_INTBR, 0x05, TWL_INTBR_GPBR1); + twl4030_i2c_write_u8(TWL4030_MODULE_PWM0, 6 + 50 , TWL_PWM0_OFF); + /* End of turning on Backlight */ + + lcd_enabled = 1; + return 0;
Re: [PATCH] Initial support for OMAP3 Thunder board
On Thu, Dec 10, 2009 at 09:48:22PM +0100, ext Tony Lindgren wrote: See attached patch for this board: http://www.technexion.com/index.php/thunder The patch contains board file, support for an LCD panel under DSS2 and support for Alsa sound. Cool. Can you please split the the patches into following separate patches: 1. Add minimal board support 2. Add defconfig 3. Add ASoC support 4. Add DSS2 support Then please run all the patches through scripts/checkpatch.pl --strict and fix the errors and warnings. And please make sure things keep compiling through the all the patches, otherwise git bisect will break. if possible, please run sparse as well. -- balbi -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] Initial support for OMAP3 Thunder board
Cool. Can you please split the the patches into following separate patches: 1. Add minimal board support 2. Add defconfig 3. Add ASoC support 4. Add DSS2 support Ok, so can the DSS2 related stuff be ifdef-ed in the board file ,or does it have to be completely seperated ? Thanks Then please run all the patches through scripts/checkpatch.pl --strict and fix the errors and warnings. And please make sure things keep compiling through the all the patches, otherwise git bisect will break. Cheers, Tony /Signed-off-by Daniel Toussaint dan...@dmhome.net /// diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 16c0c13..e5493a5 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig @@ -151,6 +151,11 @@ config MACH_OMAP_4430SDP bool OMAP 4430 SDP board depends on ARCH_OMAP4 +config MACH_OMAP3_THUNDER + bool Thunder OMAP3530 board + depends on ARCH_OMAP3 ARCH_OMAP34XX + select OMAP_PACKAGE_CUS + config OMAP3_EMU bool OMAP3 debugging peripherals depends on ARCH_OMAP3 diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 0c5d886..bd76499 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile @@ -105,6 +105,9 @@ obj-$(CONFIG_MACH_OMAP_4430SDP) += board-4430sdp.o obj-$(CONFIG_MACH_OMAP3517EVM) += board-am3517evm.o +obj-$(CONFIG_MACH_OMAP3_THUNDER) += board-omap3thunder.o \ + mmc-twl4030.o + # Platform specific device init code obj-y += usb-musb.o obj-$(CONFIG_MACH_OMAP2_TUSB6010) += usb-tusb6010.o diff --git a/arch/arm/mach-omap2/board-omap3thunder.c b/arch/arm/mach-omap2/board-omap3thunder.c new file mode 100644 index 000..d6ea9de --- /dev/null +++ b/arch/arm/mach-omap2/board-omap3thunder.c @@ -0,0 +1,647 @@ +/* + * linux/arch/arm/mach-omap2/board-omap3touchbook.c + * + * Copyright (C) 2009 Technexion + * + * Modified from mach-omap2/board-omap3beagleboard.c + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + + +#include linux/kernel.h +#include linux/init.h +#include linux/platform_device.h +#include linux/delay.h +#include linux/err.h +#include linux/clk.h +#include linux/io.h +#include linux/leds.h +#include linux/gpio.h +#include linux/input.h +#include linux/gpio_keys.h + +#include linux/mtd/mtd.h +#include linux/mtd/partitions.h +#include linux/mtd/nand.h + +#include linux/regulator/machine.h +#include linux/i2c/twl4030.h + +#include mach/hardware.h +#include asm/mach-types.h +#include asm/mach/arch.h +#include asm/mach/map.h +#include asm/mach/flash.h + +#include plat/board.h +#include plat/usb.h +#include linux/usb/otg.h +#include plat/common.h +#include plat/gpmc.h +#include plat/nand.h +#include plat/mux.h +#include plat/display.h + +#include mmc-twl4030.h +#include mux.h + + +#include linux/spi/spi.h +#include linux/spi/ads7846.h +#include plat/mcspi.h + +#include plat/mmc.h + + +#define OMAP3_THUNDER_TS_GPIO 136 + +#define GPMC_CS0_BASE 0x60 +#define GPMC_CS_SIZE 0x30 + +#define NAND_BLOCK_SIZE SZ_128K + +#define THUNDER_DVI_PANEL_EN_GPIO 199 /* GPIO 7 on TWL4030 */ +#define THUNDER_LCD_PANEL_ENVDD 138 +#define THUNDER_LCD_PON 139 + +#define TWL_INTBR_GPBR1 0x0c +#define TWL_INTBR_PMBR1 0x0d +#define TWL_PWM0_ON 0x00 +#define TWL_PWM0_OFF 0x01 + +static int lcd_enabled; +static int dvi_enabled; + +static void __init thunder_display_init(void) +{ + gpio_request(THUNDER_LCD_PANEL_ENVDD, lcd_panel_envdd); + gpio_request(THUNDER_LCD_PON, lcd_panel_pon); + gpio_direction_output(THUNDER_LCD_PON, 1); + gpio_direction_output(THUNDER_LCD_PANEL_ENVDD, 0); + return; +} + +static int thunder_enable_lcd(struct omap_dss_device *dssdev) +{ + + if (dvi_enabled) { + printk(KERN_ERR cannot enable LCD, DVI is enabled\n); + return -EINVAL; + } + + gpio_set_value(THUNDER_LCD_PANEL_ENVDD, 0); + gpio_set_value(THUNDER_LCD_PON, 1); + + /* This turns on the backlight, move this to backlight code later */ + twl4030_i2c_write_u8(TWL4030_MODULE_PWM0, 0x81, TWL_PWM0_ON); + twl4030_i2c_write_u8(TWL4030_MODULE_INTBR, 0x04, TWL_INTBR_PMBR1); + twl4030_i2c_write_u8(TWL4030_MODULE_PWM0, 6 + 40 , TWL_PWM0_OFF); + twl4030_i2c_write_u8(TWL4030_MODULE_INTBR, 0x05, TWL_INTBR_GPBR1); + twl4030_i2c_write_u8(TWL4030_MODULE_PWM0, 6 + 50 , TWL_PWM0_OFF); + /* End of turning on Backlight */ + + lcd_enabled = 1; + return 0; +} + +static void thunder_disable_lcd(struct omap_dss_device *dssdev) +{ + gpio_set_value(THUNDER_LCD_PANEL_ENVDD, 1); +
Re: [PATCH] Initial support for OMAP3 Thunder board
* Daniel Toussaint dan...@dmhome.net [091210 14:29]: Cool. Can you please split the the patches into following separate patches: 1. Add minimal board support 2. Add defconfig 3. Add ASoC support 4. Add DSS2 support Ok, so can the DSS2 related stuff be ifdef-ed in the board file ,or does it have to be completely seperated ? Please leave it out for now as the DSS2 code is not merged yet. That can be patched in later on, it's best to leave out all the dependencies from patches when possible. Also, your patches need to be against current Linus' mainline tree, not against linux-omap master branch as we already have DSS2 merged in for testing. Regards, Tony -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html