All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Support for TeeJet Mt.Ventoux
@ 2011-12-26 23:08 ` Ilya Yanok
  0 siblings, 0 replies; 24+ messages in thread
From: Ilya Yanok @ 2011-12-26 23:08 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, devicetree-discuss; +Cc: sasha_d, Ilya Yanok

Split into two parts:
 1. Device tree only to be used with board-generic (only serial works)
 2. Full board support via custom machine file for board-testing

Ilya Yanok (2):
  mt_ventoux: very basic support for TeeJet Mt.Ventoux board
  mt_ventoux: support for TeeJet Mt.Ventoux board

 arch/arm/boot/dts/am3517_mt_ventoux.dts       |   27 +
 arch/arm/mach-omap2/Kconfig                   |    6 +
 arch/arm/mach-omap2/Makefile                  |    1 +
 arch/arm/mach-omap2/board-am3517_mt_ventoux.c |  708 +++++++++++++++++++++++++
 arch/arm/plat-omap/include/plat/uncompress.h  |    1 +
 5 files changed, 743 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/boot/dts/am3517_mt_ventoux.dts
 create mode 100644 arch/arm/mach-omap2/board-am3517_mt_ventoux.c

-- 
1.7.6.4


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 0/2] Support for TeeJet Mt.Ventoux
@ 2011-12-26 23:08 ` Ilya Yanok
  0 siblings, 0 replies; 24+ messages in thread
From: Ilya Yanok @ 2011-12-26 23:08 UTC (permalink / raw)
  To: linux-arm-kernel

Split into two parts:
 1. Device tree only to be used with board-generic (only serial works)
 2. Full board support via custom machine file for board-testing

Ilya Yanok (2):
  mt_ventoux: very basic support for TeeJet Mt.Ventoux board
  mt_ventoux: support for TeeJet Mt.Ventoux board

 arch/arm/boot/dts/am3517_mt_ventoux.dts       |   27 +
 arch/arm/mach-omap2/Kconfig                   |    6 +
 arch/arm/mach-omap2/Makefile                  |    1 +
 arch/arm/mach-omap2/board-am3517_mt_ventoux.c |  708 +++++++++++++++++++++++++
 arch/arm/plat-omap/include/plat/uncompress.h  |    1 +
 5 files changed, 743 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/boot/dts/am3517_mt_ventoux.dts
 create mode 100644 arch/arm/mach-omap2/board-am3517_mt_ventoux.c

-- 
1.7.6.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 1/2] mt_ventoux: very basic support for TeeJet Mt.Ventoux board
  2011-12-26 23:08 ` Ilya Yanok
@ 2011-12-26 23:08   ` Ilya Yanok
  -1 siblings, 0 replies; 24+ messages in thread
From: Ilya Yanok @ 2011-12-26 23:08 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, devicetree-discuss; +Cc: sasha_d, Ilya Yanok

Very basic support for TeeJet Mt.Ventoux board. Able to boot via
board-generic and ramdisk/initramfs, however most of peripherals are
not supported. Produces tons of twl4030 related errors as this board
doesn't have twl4030 installed.

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
---
 arch/arm/boot/dts/am3517_mt_ventoux.dts |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/boot/dts/am3517_mt_ventoux.dts

diff --git a/arch/arm/boot/dts/am3517_mt_ventoux.dts b/arch/arm/boot/dts/am3517_mt_ventoux.dts
new file mode 100644
index 0000000..5eb26d7
--- /dev/null
+++ b/arch/arm/boot/dts/am3517_mt_ventoux.dts
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2011 Ilya Yanok, EmCraft Systems
+ *
+ * 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.
+ */
+/dts-v1/;
+
+/include/ "omap3.dtsi"
+
+/ {
+	model = "TeeJet Mt.Ventoux";
+	compatible = "teejet,mt_ventoux", "ti,omap3";
+
+	memory {
+		device_type = "memory";
+		reg = <0x80000000 0x10000000>; /* 256 MB */
+	};
+
+	/* AM35xx doesn't have IVA */
+	soc {
+		iva {
+			status = "disabled";
+		};
+	};
+};
-- 
1.7.6.4


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 1/2] mt_ventoux: very basic support for TeeJet Mt.Ventoux board
@ 2011-12-26 23:08   ` Ilya Yanok
  0 siblings, 0 replies; 24+ messages in thread
From: Ilya Yanok @ 2011-12-26 23:08 UTC (permalink / raw)
  To: linux-arm-kernel

Very basic support for TeeJet Mt.Ventoux board. Able to boot via
board-generic and ramdisk/initramfs, however most of peripherals are
not supported. Produces tons of twl4030 related errors as this board
doesn't have twl4030 installed.

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
---
 arch/arm/boot/dts/am3517_mt_ventoux.dts |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/boot/dts/am3517_mt_ventoux.dts

diff --git a/arch/arm/boot/dts/am3517_mt_ventoux.dts b/arch/arm/boot/dts/am3517_mt_ventoux.dts
new file mode 100644
index 0000000..5eb26d7
--- /dev/null
+++ b/arch/arm/boot/dts/am3517_mt_ventoux.dts
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2011 Ilya Yanok, EmCraft Systems
+ *
+ * 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.
+ */
+/dts-v1/;
+
+/include/ "omap3.dtsi"
+
+/ {
+	model = "TeeJet Mt.Ventoux";
+	compatible = "teejet,mt_ventoux", "ti,omap3";
+
+	memory {
+		device_type = "memory";
+		reg = <0x80000000 0x10000000>; /* 256 MB */
+	};
+
+	/* AM35xx doesn't have IVA */
+	soc {
+		iva {
+			status = "disabled";
+		};
+	};
+};
-- 
1.7.6.4

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 2/2] mt_ventoux: support for TeeJet Mt.Ventoux board
  2011-12-26 23:08 ` Ilya Yanok
@ 2011-12-26 23:08   ` Ilya Yanok
  -1 siblings, 0 replies; 24+ messages in thread
From: Ilya Yanok @ 2011-12-26 23:08 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, devicetree-discuss; +Cc: sasha_d, Ilya Yanok

This patch adds support for TeeJet Mt.Ventoux board based on TAM3517
SOM. Supported devices:
 - Serial
 - Ethernet
 - NAND
 - USB host
 - LCD
 - Touchscreen
 - CAN controller
 - ADC128S converter

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
---
Requires updated machine-type file, recently posted AM35xx-EMAC patch
and "Disable PM init on AM35{05,17} patch.

 arch/arm/mach-omap2/Kconfig                   |    6 +
 arch/arm/mach-omap2/Makefile                  |    1 +
 arch/arm/mach-omap2/board-am3517_mt_ventoux.c |  708 +++++++++++++++++++++++++
 arch/arm/plat-omap/include/plat/uncompress.h  |    1 +
 4 files changed, 716 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-am3517_mt_ventoux.c

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index fd9b8c0..45f5dcb 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -237,6 +237,12 @@ config MACH_MCX
 	select OMAP_PACKAGE_CBB
 	select REGULATOR_FIXED_VOLTAGE
 
+config MACH_AM3517_MT_VENTOUX
+	bool "TeeJet MT_VENTOUX (TAM3517 based) board"
+	depends on ARCH_OMAP3
+	select OMAP_PACKAGE_CBB
+	select REGULATOR_FIXED_VOLTAGE
+
 config MACH_NOKIA_N800
        bool
 
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 9405dfc..cbc3a36 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -239,6 +239,7 @@ obj-$(CONFIG_MACH_SBC3530)		+= board-omap3stalker.o
 obj-$(CONFIG_MACH_TI8168EVM)		+= board-ti8168evm.o
 obj-$(CONFIG_MACH_TI8148EVM)		+= board-ti8168evm.o
 obj-$(CONFIG_MACH_MCX)			+= board-mcx.o
+obj-$(CONFIG_MACH_AM3517_MT_VENTOUX)	+= board-am3517_mt_ventoux.o
 
 # Platform specific device init code
 
diff --git a/arch/arm/mach-omap2/board-am3517_mt_ventoux.c b/arch/arm/mach-omap2/board-am3517_mt_ventoux.c
new file mode 100644
index 0000000..d4501d9
--- /dev/null
+++ b/arch/arm/mach-omap2/board-am3517_mt_ventoux.c
@@ -0,0 +1,708 @@
+/*
+ * Copyright (C) 2011 Ilya Yanok, Emcraft Systems
+ *
+ * Modified from mach-omap2/board-mcx.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/gpio.h>
+#include <linux/mtd/partitions.h>
+#include <linux/mtd/nand.h>
+#include <linux/mtd/plat-ram.h>
+#include <linux/mmc/host.h>
+#include <linux/regulator/fixed.h>
+#include <linux/regulator/machine.h>
+#include <linux/spi/ads7846.h>
+#include <linux/spi/spi.h>
+#include <linux/can/platform/ti_hecc.h>
+
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+
+#include <plat/common.h>
+#include <plat/mcspi.h>
+#include <video/omapdss.h>
+#include <video/omap-panel-generic-dpi.h>
+#include <plat/usb.h>
+
+#include <mach/am35xx.h>
+
+#include "am35xx-emac.h"
+#include "mux.h"
+#include "control.h"
+#include "hsmmc.h"
+#include "common-board-devices.h"
+#include "common.h"
+
+/* FPGA */
+static struct platdata_mtd_ram mt_ventoux_fpga_data = {
+	.bankwidth = 2,
+};
+
+#define FPGA_BASE_ADDR		0x20000000
+static struct resource mt_ventoux_fpga_resource = {
+	.start = FPGA_BASE_ADDR,
+	.end   = FPGA_BASE_ADDR + SZ_128M - 1,
+	.flags = IORESOURCE_MEM,
+};
+
+static struct platform_device mt_ventoux_fpga_device = {
+	.name = "mtd-ram",
+	.id = 0,
+	.dev = {
+		.platform_data = &mt_ventoux_fpga_data,
+	},
+	.num_resources = 1,
+	.resource = &mt_ventoux_fpga_resource,
+};
+
+#define MCX_MDIO_FREQUENCY	(1000000)
+
+static struct mtd_partition mt_ventoux_nand_partitions[] = {
+	/* All the partition sizes are listed in terms of NAND block size */
+	{
+		.name		= "X-Loader",
+		.offset		= 0,
+		.size		= 4 * NAND_BLOCK_SIZE,
+		.mask_flags	= MTD_WRITEABLE,	/* force read-only */
+	},
+	{
+		.name		= "U-Boot",
+		.offset		= MTDPART_OFS_APPEND,	/* Offset = 0x80000 */
+		.size		= 15 * NAND_BLOCK_SIZE,
+		.mask_flags	= MTD_WRITEABLE,	/* force read-only */
+	},
+	{
+		.name		= "U-Boot Env",
+		.offset		= MTDPART_OFS_APPEND,	/* Offset = 0x260000 */
+		.size		= 1 * NAND_BLOCK_SIZE,
+	},
+	{
+		.name		= "Kernel",
+		.offset		= MTDPART_OFS_APPEND,	/* Offset = 0x280000 */
+		.size		= 32 * NAND_BLOCK_SIZE,
+	},
+	{
+		.name		= "File System",
+		.offset		= MTDPART_OFS_APPEND,	/* Offset = 0x680000 */
+		.size		= MTDPART_SIZ_FULL,
+	},
+};
+
+#define PANEL_PWR_PIN		138
+#define LCD_PANEL_PON_PIN	139
+#define DVI_PON_PIN		24
+
+static int lcd_enabled;
+static int dvi_enabled;
+
+static int mt_ventoux_panel_enable_lcd(struct omap_dss_device *dssdev)
+{
+	if (dvi_enabled) {
+		pr_err("cannot enable LCD, DVI is enabled\n");
+		return -EINVAL;
+	}
+
+	gpio_set_value(LCD_PANEL_PON_PIN, 1);
+	gpio_set_value(PANEL_PWR_PIN, 0);
+	lcd_enabled = 1;
+
+	return 0;
+}
+
+static void mt_ventoux_panel_disable_lcd(struct omap_dss_device *dssdev)
+{
+	gpio_set_value(PANEL_PWR_PIN, 1);
+	gpio_set_value(LCD_PANEL_PON_PIN, 0);
+	lcd_enabled = 0;
+}
+
+static struct panel_generic_dpi_data lcd_panel = {
+	.name			= "ortustech_com43h4m10xtc",
+	.platform_enable	= mt_ventoux_panel_enable_lcd,
+	.platform_disable	= mt_ventoux_panel_disable_lcd,
+};
+
+static struct omap_dss_device mt_ventoux_lcd_device = {
+	.type			= OMAP_DISPLAY_TYPE_DPI,
+	.name			= "lcd",
+	.driver_name		= "generic_dpi_panel",
+	.data			= &lcd_panel,
+	.phy.dpi.data_lines	= 24,
+};
+
+/*
+ * TV Output
+ */
+
+static int mt_ventoux_panel_enable_tv(struct omap_dss_device *dssdev)
+{
+	return 0;
+}
+
+static void mt_ventoux_panel_disable_tv(struct omap_dss_device *dssdev)
+{
+}
+
+static struct omap_dss_device mt_ventoux_tv_device = {
+	.type			= OMAP_DISPLAY_TYPE_VENC,
+	.name			= "tv",
+	.driver_name		= "venc",
+	.phy.venc.type		= OMAP_DSS_VENC_TYPE_SVIDEO,
+	.platform_enable	= mt_ventoux_panel_enable_tv,
+	.platform_disable	= mt_ventoux_panel_disable_tv,
+};
+
+/*
+ * DVI/HDMI Output
+ */
+
+static int mt_ventoux_panel_enable_dvi(struct omap_dss_device *dssdev)
+{
+	if (lcd_enabled) {
+		pr_err("cannot enable DVI, LCD is enabled\n");
+		return -EINVAL;
+	}
+	dvi_enabled = 1;
+	gpio_set_value(DVI_PON_PIN, 1);
+	return 0;
+}
+
+static void mt_ventoux_panel_disable_dvi(struct omap_dss_device *dssdev)
+{
+	dvi_enabled = 0;
+	gpio_set_value(DVI_PON_PIN, 0);
+}
+
+static struct panel_generic_dpi_data dvi_panel = {
+	.platform_enable	= mt_ventoux_panel_enable_dvi,
+	.platform_disable	= mt_ventoux_panel_disable_dvi,
+};
+static struct omap_dss_device mt_ventoux_dvi_device = {
+	.type			= OMAP_DISPLAY_TYPE_DPI,
+	.name			= "dvi",
+	.driver_name		= "dvi",
+	.data			= &dvi_panel,
+	.phy.dpi.data_lines	= 24,
+};
+
+static struct omap_dss_device *mt_ventoux_dss_devices[] = {
+	&mt_ventoux_lcd_device,
+	&mt_ventoux_tv_device,
+	&mt_ventoux_dvi_device,
+};
+
+static struct omap_dss_board_info mt_ventoux_dss_data = {
+	.num_devices	= ARRAY_SIZE(mt_ventoux_dss_devices),
+	.devices	= mt_ventoux_dss_devices,
+	.default_device	= &mt_ventoux_lcd_device,
+};
+
+/*
+ * use fake regulator for vdds_dsi as we can't find this pin inside
+ * AM3517 datasheet.
+ */
+static struct regulator_consumer_supply mt_ventoux_vdds_dsi_supply[] = {
+	REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
+	REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"),
+};
+
+static struct regulator_init_data mt_ventoux_vdds_dsi = {
+	.constraints		= {
+		.valid_modes_mask	= REGULATOR_MODE_NORMAL,
+		.always_on		= 1,
+	},
+	.num_consumer_supplies	= ARRAY_SIZE(mt_ventoux_vdds_dsi_supply),
+	.consumer_supplies	= mt_ventoux_vdds_dsi_supply,
+};
+
+static struct fixed_voltage_config mt_ventoux_display = {
+	.supply_name		= "display",
+	.microvolts		= 1800000,
+	.gpio			= -EINVAL,
+	.enabled_at_boot	= 1,
+	.init_data		= &mt_ventoux_vdds_dsi,
+};
+
+static struct platform_device mt_ventoux_display_device = {
+	.name		= "reg-fixed-voltage",
+	.id		= 0,
+	.dev = {
+		.platform_data	= &mt_ventoux_display,
+	},
+};
+
+static struct gpio mt_ventoux_dss_gpios[] __initdata = {
+	{ PANEL_PWR_PIN, GPIOF_OUT_INIT_HIGH, "panel_pwr"		},
+	{ LCD_PANEL_PON_PIN, GPIOF_OUT_INIT_LOW, "lcd_power_pon"	},
+	{ DVI_PON_PIN, GPIOF_OUT_INIT_LOW, "dvi_pon"			},
+};
+
+static void __init mt_ventoux_display_init(void)
+{
+	int r;
+
+	omap_mux_init_gpio(PANEL_PWR_PIN, OMAP_PIN_OUTPUT);
+	omap_mux_init_gpio(LCD_PANEL_PON_PIN, OMAP_PIN_OUTPUT);
+	omap_mux_init_gpio(DVI_PON_PIN, OMAP_PIN_OUTPUT);
+
+	r = gpio_request_array(mt_ventoux_dss_gpios, ARRAY_SIZE(mt_ventoux_dss_gpios));
+	if (r) {
+		pr_err("failed to get DSS control GPIOs\n");
+		return;
+	}
+
+	r = omap_display_init(&mt_ventoux_dss_data);
+	if (r) {
+		pr_err("Failed to register DSS device\n");
+		gpio_free_array(mt_ventoux_dss_gpios, ARRAY_SIZE(mt_ventoux_dss_gpios));
+	}
+}
+
+/* TPS65023 specific initialization */
+/* VDCDC1 -> VDD_CORE */
+static struct regulator_consumer_supply am3517_vdcdc1_supplies[] = {
+	{
+		.supply = "vdd_core",
+	},
+};
+
+/* VDCDC2 -> VDDSHV */
+static struct regulator_consumer_supply am3517_vdcdc2_supplies[] = {
+	{
+		.supply = "vddshv",
+	},
+};
+
+/*
+ * VDCDC2 |-> VDDS
+ *	  |-> VDDS_SRAM_CORE_BG
+ *	  |-> VDDS_SRAM_MPU
+ */
+static struct regulator_consumer_supply am3517_vdcdc3_supplies[] = {
+	{
+		.supply = "vdds",
+	},
+	{
+		.supply = "vdds_sram_core_bg",
+	},
+	{
+		.supply = "vdds_sram_mpu",
+	},
+};
+
+/*
+ * LDO1 |-> VDDA1P8V_USBPHY
+ *	|-> VDDA_DAC
+ */
+static struct regulator_consumer_supply am3517_ldo1_supplies[] = {
+	{
+		.supply = "vdda1p8v_usbphy",
+	},
+	{
+		.supply = "vdda_dac",
+	},
+};
+
+/* LDO2 -> VDDA3P3V_USBPHY */
+static struct regulator_consumer_supply am3517_ldo2_supplies[] = {
+	{
+		.supply = "vdda3p3v_usbphy",
+	},
+};
+
+static struct regulator_init_data mt_ventoux_regulator_data[] = {
+	/* DCDC1 */
+	{
+		.constraints = {
+			.min_uV = 1200000,
+			.max_uV = 1200000,
+			.valid_modes_mask = REGULATOR_MODE_NORMAL,
+			.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+			.always_on = true,
+			.apply_uV = false,
+		},
+		.num_consumer_supplies = ARRAY_SIZE(am3517_vdcdc1_supplies),
+		.consumer_supplies = am3517_vdcdc1_supplies,
+	},
+	/* DCDC2 */
+	{
+		.constraints = {
+			.min_uV = 3300000,
+			.max_uV = 3300000,
+			.valid_modes_mask = REGULATOR_MODE_NORMAL,
+			.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+			.always_on = true,
+			.apply_uV = false,
+		},
+		.num_consumer_supplies = ARRAY_SIZE(am3517_vdcdc2_supplies),
+		.consumer_supplies = am3517_vdcdc2_supplies,
+	},
+	/* DCDC3 */
+	{
+		.constraints = {
+			.min_uV = 1800000,
+			.max_uV = 1800000,
+			.valid_modes_mask = REGULATOR_MODE_NORMAL,
+			.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+			.always_on = true,
+			.apply_uV = false,
+		},
+		.num_consumer_supplies = ARRAY_SIZE(am3517_vdcdc3_supplies),
+		.consumer_supplies = am3517_vdcdc3_supplies,
+	},
+	/* LDO1 */
+	{
+		.constraints = {
+			.min_uV = 1800000,
+			.max_uV = 1800000,
+			.valid_modes_mask = REGULATOR_MODE_NORMAL,
+			.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+			.always_on = false,
+			.apply_uV = false,
+		},
+		.num_consumer_supplies = ARRAY_SIZE(am3517_ldo1_supplies),
+		.consumer_supplies = am3517_ldo1_supplies,
+	},
+	/* LDO2 */
+	{
+		.constraints = {
+			.min_uV = 3300000,
+			.max_uV = 3300000,
+			.valid_modes_mask = REGULATOR_MODE_NORMAL,
+			.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+			.always_on = false,
+			.apply_uV = false,
+		},
+		.num_consumer_supplies = ARRAY_SIZE(am3517_ldo2_supplies),
+		.consumer_supplies = am3517_ldo2_supplies,
+	},
+};
+
+static struct i2c_board_info __initdata mt_ventoux_i2c1_devices[] = {
+	{
+		I2C_BOARD_INFO("tps65023", 0x48),
+		.flags = I2C_CLIENT_WAKE,
+		.platform_data = &mt_ventoux_regulator_data[0],
+	},
+        {
+                I2C_BOARD_INFO("24c02", 0x50),
+        },
+};
+
+static struct i2c_board_info __initdata mt_ventoux_i2c2_devices[] = {
+        {
+                I2C_BOARD_INFO("24c02", 0x50),
+        },
+};
+
+static struct i2c_board_info __initdata mt_ventoux_i2c3_devices[] = {
+	{
+		I2C_BOARD_INFO("ds1307", 0x68),
+	},
+};
+
+static void __init mt_ventoux_i2c_init(void)
+{
+	omap_register_i2c_bus(1, 400, mt_ventoux_i2c1_devices,
+			ARRAY_SIZE(mt_ventoux_i2c1_devices));
+	omap_register_i2c_bus(2, 400, mt_ventoux_i2c2_devices,
+			ARRAY_SIZE(mt_ventoux_i2c2_devices));
+	omap_register_i2c_bus(3, 400, mt_ventoux_i2c3_devices,
+			ARRAY_SIZE(mt_ventoux_i2c3_devices));
+}
+
+#if defined(CONFIG_TOUCHSCREEN_ADS7846)
+/*
+ * use fake regulator for tsc2046 vcc
+ */
+static struct regulator_consumer_supply mt_ventoux_tsc2046_vcc_supply[] = {
+	REGULATOR_SUPPLY("vcc", "spi1.0"),
+};
+
+static struct regulator_init_data mt_ventoux_tsc2046_vcc = {
+	.constraints		= {
+		.valid_modes_mask	= REGULATOR_MODE_NORMAL,
+		.always_on		= 1,
+	},
+	.num_consumer_supplies	= ARRAY_SIZE(mt_ventoux_tsc2046_vcc_supply),
+	.consumer_supplies	= mt_ventoux_tsc2046_vcc_supply,
+};
+
+static struct fixed_voltage_config mt_ventoux_ts = {
+	.supply_name		= "touchscreen",
+	.microvolts		= 3300000,
+	.gpio			= -EINVAL,
+	.enabled_at_boot	= 1,
+	.init_data		= &mt_ventoux_tsc2046_vcc,
+};
+
+static struct platform_device mt_ventoux_ts_device = {
+	.name		= "reg-fixed-voltage",
+	.id		= 1,
+	.dev = {
+		.platform_data	= &mt_ventoux_ts,
+	},
+};
+
+static struct ads7846_platform_data tsc2046_config __initdata = {
+	.x_max			= 0x0fff,
+	.y_max			= 0x0fff,
+	.x_plate_ohms		= 180,
+	.pressure_max		= 255,
+	.debounce_max		= 30,
+	.debounce_tol		= 10,
+	.debounce_rep		= 1,
+	.keep_vref_on		= 1,
+	.settle_delay_usecs	= 100,
+};
+#endif
+
+#define USB_PHY1_RESET		25
+
+static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
+
+	.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
+	.port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
+	.port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
+
+	.phy_reset  = true,
+	.reset_gpio_port[0]  = USB_PHY1_RESET,
+	.reset_gpio_port[1]  = -EINVAL,
+	.reset_gpio_port[2]  = -EINVAL
+};
+
+#define SD_CARD_CD		126
+
+static struct omap2_hsmmc_info mmc[] = {
+	{
+		.mmc		= 1,
+		.caps		= MMC_CAP_4_BIT_DATA,
+		.gpio_cd        = SD_CARD_CD,
+		.gpio_wp        = -EINVAL,
+	},
+	{}      /* Terminator */
+};
+
+#ifdef CONFIG_SENSORS_ADCXX
+static struct omap2_mcspi_device_config adc128s_mcspi_config = {
+	.turbo_mode	= 0,
+};
+
+static struct spi_board_info adc128s_spi_board_info __initdata = {
+	.modalias		= "adcxx8s",
+	.bus_num		= 2,
+	.chip_select		= 1,
+	.max_speed_hz		= 1600000,
+	.controller_data	= &adc128s_mcspi_config,
+	.irq			= -EINVAL,
+};
+
+static inline void adc128s_init(void)
+{
+	spi_register_board_info(&adc128s_spi_board_info, 1);
+}
+#else
+static inline void adc128s_init(void)
+{
+}
+#endif
+
+#ifdef CONFIG_OMAP_MUX
+static struct omap_board_mux board_mux[] __initdata = {
+	OMAP3_MUX(CHASSIS_DMAREQ3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN),
+	OMAP3_MUX(MCBSP_CLKS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP),
+	OMAP3_MUX(GPMC_NCS4, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLDOWN),
+	{ .reg_offset = OMAP_MUX_TERMINATOR },
+};
+
+/*
+ * Default mux settings except for uart3_cts_rctx pin which we want to
+ * use as touchscreen IRQ GPIO.
+ */
+static struct omap_device_pad uart1_pads[] __initdata = {
+	{
+		.name	= "uart1_cts.uart1_cts",
+		.enable	= OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0,
+	},
+	{
+		.name	= "uart1_rts.uart1_rts",
+		.enable	= OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
+	},
+	{
+		.name	= "uart1_tx.uart1_tx",
+		.enable	= OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
+	},
+	{
+		.name	= "uart1_rx.uart1_rx",
+		.flags	= OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.enable	= OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0,
+		.idle	= OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0,
+	},
+};
+
+static struct omap_device_pad uart2_pads[] __initdata = {
+	{
+		.name	= "uart2_cts.uart2_cts",
+		.enable	= OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0,
+	},
+	{
+		.name	= "uart2_rts.uart2_rts",
+		.enable	= OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
+	},
+	{
+		.name	= "uart2_tx.uart2_tx",
+		.enable	= OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
+	},
+	{
+		.name	= "uart2_rx.uart2_rx",
+		.flags	= OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.enable	= OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0,
+		.idle	= OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0,
+	},
+};
+
+static struct omap_device_pad uart3_pads[] __initdata = {
+	{
+		.name	= "uart3_rts_sd.uart3_rts_sd",
+		.enable	= OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
+	},
+	{
+		.name	= "uart3_tx_irtx.uart3_tx_irtx",
+		.enable	= OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
+	},
+	{
+		.name	= "uart3_rx_irrx.uart3_rx_irrx",
+		.flags	= OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.enable	= OMAP_PIN_INPUT | OMAP_MUX_MODE0,
+		.idle	= OMAP_PIN_INPUT | OMAP_MUX_MODE0,
+	},
+};
+
+static inline void mt_ventoux_serial_init(void)
+{
+	struct omap_board_data bdata;
+
+	bdata.flags = 0;
+
+	bdata.id = 0;
+	bdata.pads = uart1_pads;
+	bdata.pads_cnt = ARRAY_SIZE(uart1_pads);
+	omap_serial_init_port(&bdata, NULL);
+
+	bdata.id = 1;
+	bdata.pads = uart2_pads;
+	bdata.pads_cnt = ARRAY_SIZE(uart2_pads);
+	omap_serial_init_port(&bdata, NULL);
+
+	bdata.id = 2;
+	bdata.pads = uart3_pads;
+	bdata.pads_cnt = ARRAY_SIZE(uart3_pads);
+	omap_serial_init_port(&bdata, NULL);
+
+	bdata.id = 3;
+	bdata.pads = NULL;
+	bdata.pads_cnt = 0;
+	omap_serial_init_port(&bdata, NULL);
+}
+#else
+static inline void mt_ventoux_serial_init(void)
+{
+	omap_serial_init();
+}
+#endif
+
+static struct resource am3517_hecc_resources[] = {
+	{
+		.start	= AM35XX_IPSS_HECC_BASE,
+		.end	= AM35XX_IPSS_HECC_BASE + 0x3FFF,
+		.flags	= IORESOURCE_MEM,
+	},
+	{
+		.start	= INT_35XX_HECC0_IRQ,
+		.end	= INT_35XX_HECC0_IRQ,
+		.flags	= IORESOURCE_IRQ,
+	},
+};
+
+static struct ti_hecc_platform_data am3517_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 am3517_hecc_device = {
+	.name		= "ti_hecc",
+	.id		= -1,
+	.num_resources	= ARRAY_SIZE(am3517_hecc_resources),
+	.resource	= am3517_hecc_resources,
+	.dev		= {
+		.platform_data = &am3517_hecc_pdata,
+	},
+};
+
+static struct platform_device *mt_ventoux_devices[] __initdata = {
+	&mt_ventoux_display_device,
+	&mt_ventoux_ts_device,
+	&mt_ventoux_fpga_device,
+	&am3517_hecc_device,
+};
+
+#define TS_IRQ_PIN	163
+
+static void __init mt_ventoux_init(void)
+{
+	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
+	mt_ventoux_i2c_init();
+	platform_add_devices(mt_ventoux_devices, ARRAY_SIZE(mt_ventoux_devices));
+	mt_ventoux_serial_init();
+	omap_sdrc_init(NULL, NULL);
+
+	mt_ventoux_display_init();
+
+	/* Configure EHCI ports */
+	omap_mux_init_gpio(USB_PHY1_RESET, OMAP_PIN_OUTPUT);
+	usbhs_init(&usbhs_bdata);
+
+	/* NAND */
+	omap_nand_flash_init(NAND_BUSWIDTH_16, mt_ventoux_nand_partitions,
+			     ARRAY_SIZE(mt_ventoux_nand_partitions));
+
+	/* touchscreen */
+	omap_mux_init_gpio(TS_IRQ_PIN, OMAP_PIN_INPUT);
+	omap_ads7846_init(1, TS_IRQ_PIN, 310, &tsc2046_config);
+
+	/* Ethernet */
+	am35xx_ethernet_init(MCX_MDIO_FREQUENCY, 1);
+
+	/* MMC init */
+	omap_mux_init_gpio(SD_CARD_CD, OMAP_PIN_INPUT);
+	omap2_hsmmc_init(mmc);
+
+	/* ADC128S022 init */
+	adc128s_init();
+}
+
+static const char *mt_ventoux_dt_match[] __initdata = {
+	"teejet,mt_ventoux",
+	NULL
+};
+
+MACHINE_START(AM3517_MT_VENTOUX, "TeeJet MT_VENTOUX")
+	/* Maintainer: Ilya Yanok */
+	.atag_offset	= 0x100,
+	.reserve	= omap_reserve,
+	.map_io		= omap3_map_io,
+	.init_early	= am35xx_init_early,
+	.init_irq	= omap3_init_irq,
+	.handle_irq	= omap3_intc_handle_irq,
+	.init_machine	= mt_ventoux_init,
+	.timer		= &omap3_timer,
+	.dt_compat	= mt_ventoux_dt_match,
+MACHINE_END
diff --git a/arch/arm/plat-omap/include/plat/uncompress.h b/arch/arm/plat-omap/include/plat/uncompress.h
index 1141364..021cb0d 100644
--- a/arch/arm/plat-omap/include/plat/uncompress.h
+++ b/arch/arm/plat-omap/include/plat/uncompress.h
@@ -145,6 +145,7 @@ static inline void __arch_decomp_setup(unsigned long arch_id)
 		DEBUG_LL_OMAP2(3, nokia_n810_wimax);
 
 		/* omap3 based boards using UART1 */
+		DEBUG_LL_OMAP3(1, am3517_mt_ventoux);
 		DEBUG_LL_OMAP2(1, omap3evm);
 		DEBUG_LL_OMAP3(1, omap_3430sdp);
 		DEBUG_LL_OMAP3(1, omap_3630sdp);
-- 
1.7.6.4


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 2/2] mt_ventoux: support for TeeJet Mt.Ventoux board
@ 2011-12-26 23:08   ` Ilya Yanok
  0 siblings, 0 replies; 24+ messages in thread
From: Ilya Yanok @ 2011-12-26 23:08 UTC (permalink / raw)
  To: linux-arm-kernel

This patch adds support for TeeJet Mt.Ventoux board based on TAM3517
SOM. Supported devices:
 - Serial
 - Ethernet
 - NAND
 - USB host
 - LCD
 - Touchscreen
 - CAN controller
 - ADC128S converter

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
---
Requires updated machine-type file, recently posted AM35xx-EMAC patch
and "Disable PM init on AM35{05,17} patch.

 arch/arm/mach-omap2/Kconfig                   |    6 +
 arch/arm/mach-omap2/Makefile                  |    1 +
 arch/arm/mach-omap2/board-am3517_mt_ventoux.c |  708 +++++++++++++++++++++++++
 arch/arm/plat-omap/include/plat/uncompress.h  |    1 +
 4 files changed, 716 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-am3517_mt_ventoux.c

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index fd9b8c0..45f5dcb 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -237,6 +237,12 @@ config MACH_MCX
 	select OMAP_PACKAGE_CBB
 	select REGULATOR_FIXED_VOLTAGE
 
+config MACH_AM3517_MT_VENTOUX
+	bool "TeeJet MT_VENTOUX (TAM3517 based) board"
+	depends on ARCH_OMAP3
+	select OMAP_PACKAGE_CBB
+	select REGULATOR_FIXED_VOLTAGE
+
 config MACH_NOKIA_N800
        bool
 
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 9405dfc..cbc3a36 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -239,6 +239,7 @@ obj-$(CONFIG_MACH_SBC3530)		+= board-omap3stalker.o
 obj-$(CONFIG_MACH_TI8168EVM)		+= board-ti8168evm.o
 obj-$(CONFIG_MACH_TI8148EVM)		+= board-ti8168evm.o
 obj-$(CONFIG_MACH_MCX)			+= board-mcx.o
+obj-$(CONFIG_MACH_AM3517_MT_VENTOUX)	+= board-am3517_mt_ventoux.o
 
 # Platform specific device init code
 
diff --git a/arch/arm/mach-omap2/board-am3517_mt_ventoux.c b/arch/arm/mach-omap2/board-am3517_mt_ventoux.c
new file mode 100644
index 0000000..d4501d9
--- /dev/null
+++ b/arch/arm/mach-omap2/board-am3517_mt_ventoux.c
@@ -0,0 +1,708 @@
+/*
+ * Copyright (C) 2011 Ilya Yanok, Emcraft Systems
+ *
+ * Modified from mach-omap2/board-mcx.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/gpio.h>
+#include <linux/mtd/partitions.h>
+#include <linux/mtd/nand.h>
+#include <linux/mtd/plat-ram.h>
+#include <linux/mmc/host.h>
+#include <linux/regulator/fixed.h>
+#include <linux/regulator/machine.h>
+#include <linux/spi/ads7846.h>
+#include <linux/spi/spi.h>
+#include <linux/can/platform/ti_hecc.h>
+
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+
+#include <plat/common.h>
+#include <plat/mcspi.h>
+#include <video/omapdss.h>
+#include <video/omap-panel-generic-dpi.h>
+#include <plat/usb.h>
+
+#include <mach/am35xx.h>
+
+#include "am35xx-emac.h"
+#include "mux.h"
+#include "control.h"
+#include "hsmmc.h"
+#include "common-board-devices.h"
+#include "common.h"
+
+/* FPGA */
+static struct platdata_mtd_ram mt_ventoux_fpga_data = {
+	.bankwidth = 2,
+};
+
+#define FPGA_BASE_ADDR		0x20000000
+static struct resource mt_ventoux_fpga_resource = {
+	.start = FPGA_BASE_ADDR,
+	.end   = FPGA_BASE_ADDR + SZ_128M - 1,
+	.flags = IORESOURCE_MEM,
+};
+
+static struct platform_device mt_ventoux_fpga_device = {
+	.name = "mtd-ram",
+	.id = 0,
+	.dev = {
+		.platform_data = &mt_ventoux_fpga_data,
+	},
+	.num_resources = 1,
+	.resource = &mt_ventoux_fpga_resource,
+};
+
+#define MCX_MDIO_FREQUENCY	(1000000)
+
+static struct mtd_partition mt_ventoux_nand_partitions[] = {
+	/* All the partition sizes are listed in terms of NAND block size */
+	{
+		.name		= "X-Loader",
+		.offset		= 0,
+		.size		= 4 * NAND_BLOCK_SIZE,
+		.mask_flags	= MTD_WRITEABLE,	/* force read-only */
+	},
+	{
+		.name		= "U-Boot",
+		.offset		= MTDPART_OFS_APPEND,	/* Offset = 0x80000 */
+		.size		= 15 * NAND_BLOCK_SIZE,
+		.mask_flags	= MTD_WRITEABLE,	/* force read-only */
+	},
+	{
+		.name		= "U-Boot Env",
+		.offset		= MTDPART_OFS_APPEND,	/* Offset = 0x260000 */
+		.size		= 1 * NAND_BLOCK_SIZE,
+	},
+	{
+		.name		= "Kernel",
+		.offset		= MTDPART_OFS_APPEND,	/* Offset = 0x280000 */
+		.size		= 32 * NAND_BLOCK_SIZE,
+	},
+	{
+		.name		= "File System",
+		.offset		= MTDPART_OFS_APPEND,	/* Offset = 0x680000 */
+		.size		= MTDPART_SIZ_FULL,
+	},
+};
+
+#define PANEL_PWR_PIN		138
+#define LCD_PANEL_PON_PIN	139
+#define DVI_PON_PIN		24
+
+static int lcd_enabled;
+static int dvi_enabled;
+
+static int mt_ventoux_panel_enable_lcd(struct omap_dss_device *dssdev)
+{
+	if (dvi_enabled) {
+		pr_err("cannot enable LCD, DVI is enabled\n");
+		return -EINVAL;
+	}
+
+	gpio_set_value(LCD_PANEL_PON_PIN, 1);
+	gpio_set_value(PANEL_PWR_PIN, 0);
+	lcd_enabled = 1;
+
+	return 0;
+}
+
+static void mt_ventoux_panel_disable_lcd(struct omap_dss_device *dssdev)
+{
+	gpio_set_value(PANEL_PWR_PIN, 1);
+	gpio_set_value(LCD_PANEL_PON_PIN, 0);
+	lcd_enabled = 0;
+}
+
+static struct panel_generic_dpi_data lcd_panel = {
+	.name			= "ortustech_com43h4m10xtc",
+	.platform_enable	= mt_ventoux_panel_enable_lcd,
+	.platform_disable	= mt_ventoux_panel_disable_lcd,
+};
+
+static struct omap_dss_device mt_ventoux_lcd_device = {
+	.type			= OMAP_DISPLAY_TYPE_DPI,
+	.name			= "lcd",
+	.driver_name		= "generic_dpi_panel",
+	.data			= &lcd_panel,
+	.phy.dpi.data_lines	= 24,
+};
+
+/*
+ * TV Output
+ */
+
+static int mt_ventoux_panel_enable_tv(struct omap_dss_device *dssdev)
+{
+	return 0;
+}
+
+static void mt_ventoux_panel_disable_tv(struct omap_dss_device *dssdev)
+{
+}
+
+static struct omap_dss_device mt_ventoux_tv_device = {
+	.type			= OMAP_DISPLAY_TYPE_VENC,
+	.name			= "tv",
+	.driver_name		= "venc",
+	.phy.venc.type		= OMAP_DSS_VENC_TYPE_SVIDEO,
+	.platform_enable	= mt_ventoux_panel_enable_tv,
+	.platform_disable	= mt_ventoux_panel_disable_tv,
+};
+
+/*
+ * DVI/HDMI Output
+ */
+
+static int mt_ventoux_panel_enable_dvi(struct omap_dss_device *dssdev)
+{
+	if (lcd_enabled) {
+		pr_err("cannot enable DVI, LCD is enabled\n");
+		return -EINVAL;
+	}
+	dvi_enabled = 1;
+	gpio_set_value(DVI_PON_PIN, 1);
+	return 0;
+}
+
+static void mt_ventoux_panel_disable_dvi(struct omap_dss_device *dssdev)
+{
+	dvi_enabled = 0;
+	gpio_set_value(DVI_PON_PIN, 0);
+}
+
+static struct panel_generic_dpi_data dvi_panel = {
+	.platform_enable	= mt_ventoux_panel_enable_dvi,
+	.platform_disable	= mt_ventoux_panel_disable_dvi,
+};
+static struct omap_dss_device mt_ventoux_dvi_device = {
+	.type			= OMAP_DISPLAY_TYPE_DPI,
+	.name			= "dvi",
+	.driver_name		= "dvi",
+	.data			= &dvi_panel,
+	.phy.dpi.data_lines	= 24,
+};
+
+static struct omap_dss_device *mt_ventoux_dss_devices[] = {
+	&mt_ventoux_lcd_device,
+	&mt_ventoux_tv_device,
+	&mt_ventoux_dvi_device,
+};
+
+static struct omap_dss_board_info mt_ventoux_dss_data = {
+	.num_devices	= ARRAY_SIZE(mt_ventoux_dss_devices),
+	.devices	= mt_ventoux_dss_devices,
+	.default_device	= &mt_ventoux_lcd_device,
+};
+
+/*
+ * use fake regulator for vdds_dsi as we can't find this pin inside
+ * AM3517 datasheet.
+ */
+static struct regulator_consumer_supply mt_ventoux_vdds_dsi_supply[] = {
+	REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
+	REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"),
+};
+
+static struct regulator_init_data mt_ventoux_vdds_dsi = {
+	.constraints		= {
+		.valid_modes_mask	= REGULATOR_MODE_NORMAL,
+		.always_on		= 1,
+	},
+	.num_consumer_supplies	= ARRAY_SIZE(mt_ventoux_vdds_dsi_supply),
+	.consumer_supplies	= mt_ventoux_vdds_dsi_supply,
+};
+
+static struct fixed_voltage_config mt_ventoux_display = {
+	.supply_name		= "display",
+	.microvolts		= 1800000,
+	.gpio			= -EINVAL,
+	.enabled_at_boot	= 1,
+	.init_data		= &mt_ventoux_vdds_dsi,
+};
+
+static struct platform_device mt_ventoux_display_device = {
+	.name		= "reg-fixed-voltage",
+	.id		= 0,
+	.dev = {
+		.platform_data	= &mt_ventoux_display,
+	},
+};
+
+static struct gpio mt_ventoux_dss_gpios[] __initdata = {
+	{ PANEL_PWR_PIN, GPIOF_OUT_INIT_HIGH, "panel_pwr"		},
+	{ LCD_PANEL_PON_PIN, GPIOF_OUT_INIT_LOW, "lcd_power_pon"	},
+	{ DVI_PON_PIN, GPIOF_OUT_INIT_LOW, "dvi_pon"			},
+};
+
+static void __init mt_ventoux_display_init(void)
+{
+	int r;
+
+	omap_mux_init_gpio(PANEL_PWR_PIN, OMAP_PIN_OUTPUT);
+	omap_mux_init_gpio(LCD_PANEL_PON_PIN, OMAP_PIN_OUTPUT);
+	omap_mux_init_gpio(DVI_PON_PIN, OMAP_PIN_OUTPUT);
+
+	r = gpio_request_array(mt_ventoux_dss_gpios, ARRAY_SIZE(mt_ventoux_dss_gpios));
+	if (r) {
+		pr_err("failed to get DSS control GPIOs\n");
+		return;
+	}
+
+	r = omap_display_init(&mt_ventoux_dss_data);
+	if (r) {
+		pr_err("Failed to register DSS device\n");
+		gpio_free_array(mt_ventoux_dss_gpios, ARRAY_SIZE(mt_ventoux_dss_gpios));
+	}
+}
+
+/* TPS65023 specific initialization */
+/* VDCDC1 -> VDD_CORE */
+static struct regulator_consumer_supply am3517_vdcdc1_supplies[] = {
+	{
+		.supply = "vdd_core",
+	},
+};
+
+/* VDCDC2 -> VDDSHV */
+static struct regulator_consumer_supply am3517_vdcdc2_supplies[] = {
+	{
+		.supply = "vddshv",
+	},
+};
+
+/*
+ * VDCDC2 |-> VDDS
+ *	  |-> VDDS_SRAM_CORE_BG
+ *	  |-> VDDS_SRAM_MPU
+ */
+static struct regulator_consumer_supply am3517_vdcdc3_supplies[] = {
+	{
+		.supply = "vdds",
+	},
+	{
+		.supply = "vdds_sram_core_bg",
+	},
+	{
+		.supply = "vdds_sram_mpu",
+	},
+};
+
+/*
+ * LDO1 |-> VDDA1P8V_USBPHY
+ *	|-> VDDA_DAC
+ */
+static struct regulator_consumer_supply am3517_ldo1_supplies[] = {
+	{
+		.supply = "vdda1p8v_usbphy",
+	},
+	{
+		.supply = "vdda_dac",
+	},
+};
+
+/* LDO2 -> VDDA3P3V_USBPHY */
+static struct regulator_consumer_supply am3517_ldo2_supplies[] = {
+	{
+		.supply = "vdda3p3v_usbphy",
+	},
+};
+
+static struct regulator_init_data mt_ventoux_regulator_data[] = {
+	/* DCDC1 */
+	{
+		.constraints = {
+			.min_uV = 1200000,
+			.max_uV = 1200000,
+			.valid_modes_mask = REGULATOR_MODE_NORMAL,
+			.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+			.always_on = true,
+			.apply_uV = false,
+		},
+		.num_consumer_supplies = ARRAY_SIZE(am3517_vdcdc1_supplies),
+		.consumer_supplies = am3517_vdcdc1_supplies,
+	},
+	/* DCDC2 */
+	{
+		.constraints = {
+			.min_uV = 3300000,
+			.max_uV = 3300000,
+			.valid_modes_mask = REGULATOR_MODE_NORMAL,
+			.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+			.always_on = true,
+			.apply_uV = false,
+		},
+		.num_consumer_supplies = ARRAY_SIZE(am3517_vdcdc2_supplies),
+		.consumer_supplies = am3517_vdcdc2_supplies,
+	},
+	/* DCDC3 */
+	{
+		.constraints = {
+			.min_uV = 1800000,
+			.max_uV = 1800000,
+			.valid_modes_mask = REGULATOR_MODE_NORMAL,
+			.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+			.always_on = true,
+			.apply_uV = false,
+		},
+		.num_consumer_supplies = ARRAY_SIZE(am3517_vdcdc3_supplies),
+		.consumer_supplies = am3517_vdcdc3_supplies,
+	},
+	/* LDO1 */
+	{
+		.constraints = {
+			.min_uV = 1800000,
+			.max_uV = 1800000,
+			.valid_modes_mask = REGULATOR_MODE_NORMAL,
+			.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+			.always_on = false,
+			.apply_uV = false,
+		},
+		.num_consumer_supplies = ARRAY_SIZE(am3517_ldo1_supplies),
+		.consumer_supplies = am3517_ldo1_supplies,
+	},
+	/* LDO2 */
+	{
+		.constraints = {
+			.min_uV = 3300000,
+			.max_uV = 3300000,
+			.valid_modes_mask = REGULATOR_MODE_NORMAL,
+			.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+			.always_on = false,
+			.apply_uV = false,
+		},
+		.num_consumer_supplies = ARRAY_SIZE(am3517_ldo2_supplies),
+		.consumer_supplies = am3517_ldo2_supplies,
+	},
+};
+
+static struct i2c_board_info __initdata mt_ventoux_i2c1_devices[] = {
+	{
+		I2C_BOARD_INFO("tps65023", 0x48),
+		.flags = I2C_CLIENT_WAKE,
+		.platform_data = &mt_ventoux_regulator_data[0],
+	},
+        {
+                I2C_BOARD_INFO("24c02", 0x50),
+        },
+};
+
+static struct i2c_board_info __initdata mt_ventoux_i2c2_devices[] = {
+        {
+                I2C_BOARD_INFO("24c02", 0x50),
+        },
+};
+
+static struct i2c_board_info __initdata mt_ventoux_i2c3_devices[] = {
+	{
+		I2C_BOARD_INFO("ds1307", 0x68),
+	},
+};
+
+static void __init mt_ventoux_i2c_init(void)
+{
+	omap_register_i2c_bus(1, 400, mt_ventoux_i2c1_devices,
+			ARRAY_SIZE(mt_ventoux_i2c1_devices));
+	omap_register_i2c_bus(2, 400, mt_ventoux_i2c2_devices,
+			ARRAY_SIZE(mt_ventoux_i2c2_devices));
+	omap_register_i2c_bus(3, 400, mt_ventoux_i2c3_devices,
+			ARRAY_SIZE(mt_ventoux_i2c3_devices));
+}
+
+#if defined(CONFIG_TOUCHSCREEN_ADS7846)
+/*
+ * use fake regulator for tsc2046 vcc
+ */
+static struct regulator_consumer_supply mt_ventoux_tsc2046_vcc_supply[] = {
+	REGULATOR_SUPPLY("vcc", "spi1.0"),
+};
+
+static struct regulator_init_data mt_ventoux_tsc2046_vcc = {
+	.constraints		= {
+		.valid_modes_mask	= REGULATOR_MODE_NORMAL,
+		.always_on		= 1,
+	},
+	.num_consumer_supplies	= ARRAY_SIZE(mt_ventoux_tsc2046_vcc_supply),
+	.consumer_supplies	= mt_ventoux_tsc2046_vcc_supply,
+};
+
+static struct fixed_voltage_config mt_ventoux_ts = {
+	.supply_name		= "touchscreen",
+	.microvolts		= 3300000,
+	.gpio			= -EINVAL,
+	.enabled_at_boot	= 1,
+	.init_data		= &mt_ventoux_tsc2046_vcc,
+};
+
+static struct platform_device mt_ventoux_ts_device = {
+	.name		= "reg-fixed-voltage",
+	.id		= 1,
+	.dev = {
+		.platform_data	= &mt_ventoux_ts,
+	},
+};
+
+static struct ads7846_platform_data tsc2046_config __initdata = {
+	.x_max			= 0x0fff,
+	.y_max			= 0x0fff,
+	.x_plate_ohms		= 180,
+	.pressure_max		= 255,
+	.debounce_max		= 30,
+	.debounce_tol		= 10,
+	.debounce_rep		= 1,
+	.keep_vref_on		= 1,
+	.settle_delay_usecs	= 100,
+};
+#endif
+
+#define USB_PHY1_RESET		25
+
+static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
+
+	.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
+	.port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
+	.port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
+
+	.phy_reset  = true,
+	.reset_gpio_port[0]  = USB_PHY1_RESET,
+	.reset_gpio_port[1]  = -EINVAL,
+	.reset_gpio_port[2]  = -EINVAL
+};
+
+#define SD_CARD_CD		126
+
+static struct omap2_hsmmc_info mmc[] = {
+	{
+		.mmc		= 1,
+		.caps		= MMC_CAP_4_BIT_DATA,
+		.gpio_cd        = SD_CARD_CD,
+		.gpio_wp        = -EINVAL,
+	},
+	{}      /* Terminator */
+};
+
+#ifdef CONFIG_SENSORS_ADCXX
+static struct omap2_mcspi_device_config adc128s_mcspi_config = {
+	.turbo_mode	= 0,
+};
+
+static struct spi_board_info adc128s_spi_board_info __initdata = {
+	.modalias		= "adcxx8s",
+	.bus_num		= 2,
+	.chip_select		= 1,
+	.max_speed_hz		= 1600000,
+	.controller_data	= &adc128s_mcspi_config,
+	.irq			= -EINVAL,
+};
+
+static inline void adc128s_init(void)
+{
+	spi_register_board_info(&adc128s_spi_board_info, 1);
+}
+#else
+static inline void adc128s_init(void)
+{
+}
+#endif
+
+#ifdef CONFIG_OMAP_MUX
+static struct omap_board_mux board_mux[] __initdata = {
+	OMAP3_MUX(CHASSIS_DMAREQ3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN),
+	OMAP3_MUX(MCBSP_CLKS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP),
+	OMAP3_MUX(GPMC_NCS4, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLDOWN),
+	{ .reg_offset = OMAP_MUX_TERMINATOR },
+};
+
+/*
+ * Default mux settings except for uart3_cts_rctx pin which we want to
+ * use as touchscreen IRQ GPIO.
+ */
+static struct omap_device_pad uart1_pads[] __initdata = {
+	{
+		.name	= "uart1_cts.uart1_cts",
+		.enable	= OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0,
+	},
+	{
+		.name	= "uart1_rts.uart1_rts",
+		.enable	= OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
+	},
+	{
+		.name	= "uart1_tx.uart1_tx",
+		.enable	= OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
+	},
+	{
+		.name	= "uart1_rx.uart1_rx",
+		.flags	= OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.enable	= OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0,
+		.idle	= OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0,
+	},
+};
+
+static struct omap_device_pad uart2_pads[] __initdata = {
+	{
+		.name	= "uart2_cts.uart2_cts",
+		.enable	= OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0,
+	},
+	{
+		.name	= "uart2_rts.uart2_rts",
+		.enable	= OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
+	},
+	{
+		.name	= "uart2_tx.uart2_tx",
+		.enable	= OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
+	},
+	{
+		.name	= "uart2_rx.uart2_rx",
+		.flags	= OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.enable	= OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0,
+		.idle	= OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0,
+	},
+};
+
+static struct omap_device_pad uart3_pads[] __initdata = {
+	{
+		.name	= "uart3_rts_sd.uart3_rts_sd",
+		.enable	= OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
+	},
+	{
+		.name	= "uart3_tx_irtx.uart3_tx_irtx",
+		.enable	= OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
+	},
+	{
+		.name	= "uart3_rx_irrx.uart3_rx_irrx",
+		.flags	= OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.enable	= OMAP_PIN_INPUT | OMAP_MUX_MODE0,
+		.idle	= OMAP_PIN_INPUT | OMAP_MUX_MODE0,
+	},
+};
+
+static inline void mt_ventoux_serial_init(void)
+{
+	struct omap_board_data bdata;
+
+	bdata.flags = 0;
+
+	bdata.id = 0;
+	bdata.pads = uart1_pads;
+	bdata.pads_cnt = ARRAY_SIZE(uart1_pads);
+	omap_serial_init_port(&bdata, NULL);
+
+	bdata.id = 1;
+	bdata.pads = uart2_pads;
+	bdata.pads_cnt = ARRAY_SIZE(uart2_pads);
+	omap_serial_init_port(&bdata, NULL);
+
+	bdata.id = 2;
+	bdata.pads = uart3_pads;
+	bdata.pads_cnt = ARRAY_SIZE(uart3_pads);
+	omap_serial_init_port(&bdata, NULL);
+
+	bdata.id = 3;
+	bdata.pads = NULL;
+	bdata.pads_cnt = 0;
+	omap_serial_init_port(&bdata, NULL);
+}
+#else
+static inline void mt_ventoux_serial_init(void)
+{
+	omap_serial_init();
+}
+#endif
+
+static struct resource am3517_hecc_resources[] = {
+	{
+		.start	= AM35XX_IPSS_HECC_BASE,
+		.end	= AM35XX_IPSS_HECC_BASE + 0x3FFF,
+		.flags	= IORESOURCE_MEM,
+	},
+	{
+		.start	= INT_35XX_HECC0_IRQ,
+		.end	= INT_35XX_HECC0_IRQ,
+		.flags	= IORESOURCE_IRQ,
+	},
+};
+
+static struct ti_hecc_platform_data am3517_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 am3517_hecc_device = {
+	.name		= "ti_hecc",
+	.id		= -1,
+	.num_resources	= ARRAY_SIZE(am3517_hecc_resources),
+	.resource	= am3517_hecc_resources,
+	.dev		= {
+		.platform_data = &am3517_hecc_pdata,
+	},
+};
+
+static struct platform_device *mt_ventoux_devices[] __initdata = {
+	&mt_ventoux_display_device,
+	&mt_ventoux_ts_device,
+	&mt_ventoux_fpga_device,
+	&am3517_hecc_device,
+};
+
+#define TS_IRQ_PIN	163
+
+static void __init mt_ventoux_init(void)
+{
+	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
+	mt_ventoux_i2c_init();
+	platform_add_devices(mt_ventoux_devices, ARRAY_SIZE(mt_ventoux_devices));
+	mt_ventoux_serial_init();
+	omap_sdrc_init(NULL, NULL);
+
+	mt_ventoux_display_init();
+
+	/* Configure EHCI ports */
+	omap_mux_init_gpio(USB_PHY1_RESET, OMAP_PIN_OUTPUT);
+	usbhs_init(&usbhs_bdata);
+
+	/* NAND */
+	omap_nand_flash_init(NAND_BUSWIDTH_16, mt_ventoux_nand_partitions,
+			     ARRAY_SIZE(mt_ventoux_nand_partitions));
+
+	/* touchscreen */
+	omap_mux_init_gpio(TS_IRQ_PIN, OMAP_PIN_INPUT);
+	omap_ads7846_init(1, TS_IRQ_PIN, 310, &tsc2046_config);
+
+	/* Ethernet */
+	am35xx_ethernet_init(MCX_MDIO_FREQUENCY, 1);
+
+	/* MMC init */
+	omap_mux_init_gpio(SD_CARD_CD, OMAP_PIN_INPUT);
+	omap2_hsmmc_init(mmc);
+
+	/* ADC128S022 init */
+	adc128s_init();
+}
+
+static const char *mt_ventoux_dt_match[] __initdata = {
+	"teejet,mt_ventoux",
+	NULL
+};
+
+MACHINE_START(AM3517_MT_VENTOUX, "TeeJet MT_VENTOUX")
+	/* Maintainer: Ilya Yanok */
+	.atag_offset	= 0x100,
+	.reserve	= omap_reserve,
+	.map_io		= omap3_map_io,
+	.init_early	= am35xx_init_early,
+	.init_irq	= omap3_init_irq,
+	.handle_irq	= omap3_intc_handle_irq,
+	.init_machine	= mt_ventoux_init,
+	.timer		= &omap3_timer,
+	.dt_compat	= mt_ventoux_dt_match,
+MACHINE_END
diff --git a/arch/arm/plat-omap/include/plat/uncompress.h b/arch/arm/plat-omap/include/plat/uncompress.h
index 1141364..021cb0d 100644
--- a/arch/arm/plat-omap/include/plat/uncompress.h
+++ b/arch/arm/plat-omap/include/plat/uncompress.h
@@ -145,6 +145,7 @@ static inline void __arch_decomp_setup(unsigned long arch_id)
 		DEBUG_LL_OMAP2(3, nokia_n810_wimax);
 
 		/* omap3 based boards using UART1 */
+		DEBUG_LL_OMAP3(1, am3517_mt_ventoux);
 		DEBUG_LL_OMAP2(1, omap3evm);
 		DEBUG_LL_OMAP3(1, omap_3430sdp);
 		DEBUG_LL_OMAP3(1, omap_3630sdp);
-- 
1.7.6.4

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Re: [PATCH 2/2] mt_ventoux: support for TeeJet Mt.Ventoux board
  2011-12-26 23:08   ` Ilya Yanok
@ 2011-12-27  7:56     ` Igor Grinberg
  -1 siblings, 0 replies; 24+ messages in thread
From: Igor Grinberg @ 2011-12-27  7:56 UTC (permalink / raw)
  To: Ilya Yanok; +Cc: linux-arm-kernel, linux-omap, devicetree-discuss, sasha_d

Hi Ilya,

On 12/27/11 01:08, Ilya Yanok wrote:
> This patch adds support for TeeJet Mt.Ventoux board based on TAM3517
> SOM. Supported devices:
>  - Serial
>  - Ethernet
>  - NAND
>  - USB host
>  - LCD
>  - Touchscreen
>  - CAN controller
>  - ADC128S converter
> 
> Signed-off-by: Ilya Yanok <yanok@emcraft.com>
> ---
> Requires updated machine-type file, recently posted AM35xx-EMAC patch
> and "Disable PM init on AM35{05,17} patch.
> 
>  arch/arm/mach-omap2/Kconfig                   |    6 +
>  arch/arm/mach-omap2/Makefile                  |    1 +
>  arch/arm/mach-omap2/board-am3517_mt_ventoux.c |  708 +++++++++++++++++++++++++
>  arch/arm/plat-omap/include/plat/uncompress.h  |    1 +
>  4 files changed, 716 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/mach-omap2/board-am3517_mt_ventoux.c

[...]

> diff --git a/arch/arm/mach-omap2/board-am3517_mt_ventoux.c b/arch/arm/mach-omap2/board-am3517_mt_ventoux.c
> new file mode 100644
> index 0000000..d4501d9
> --- /dev/null
> +++ b/arch/arm/mach-omap2/board-am3517_mt_ventoux.c

[...]

> +/*
> + * use fake regulator for vdds_dsi as we can't find this pin inside
> + * AM3517 datasheet.
> + */
> +static struct regulator_consumer_supply mt_ventoux_vdds_dsi_supply[] = {
> +	REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
> +	REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"),
> +};

Although the TRM states that there is a vdds_dsi signal,
it looks, from the datasheet, that VDDSHV is used to power the DSS.
Either way, it can't be switched off, I think...
Therefore, depending on your board wiring, you can leave it as fixed
regulator or bind to a supply on TPS65023.

[...]

> +static struct i2c_board_info __initdata mt_ventoux_i2c1_devices[] = {
> +	{
> +		I2C_BOARD_INFO("tps65023", 0x48),
> +		.flags = I2C_CLIENT_WAKE,
> +		.platform_data = &mt_ventoux_regulator_data[0],
> +	},
> +        {
> +                I2C_BOARD_INFO("24c02", 0x50),
> +        },
> +};

Here (and may be in some other places) you have spaces for
indentation. Can it be tabs instead for uniformity (and file size)?

> +
> +static struct i2c_board_info __initdata mt_ventoux_i2c2_devices[] = {
> +        {
> +                I2C_BOARD_INFO("24c02", 0x50),
> +        },
> +};

also here...

[...]

> +#if defined(CONFIG_TOUCHSCREEN_ADS7846)

Can't the ADS7846 be module?

> +static struct ads7846_platform_data tsc2046_config __initdata = {
> +	.x_max			= 0x0fff,
> +	.y_max			= 0x0fff,
> +	.x_plate_ohms		= 180,
> +	.pressure_max		= 255,
> +	.debounce_max		= 30,
> +	.debounce_tol		= 10,
> +	.debounce_rep		= 1,
> +	.keep_vref_on		= 1,
> +	.settle_delay_usecs	= 100,
> +};
> +#endif

[...]

> +static void __init mt_ventoux_init(void)
> +{
> +	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
> +	mt_ventoux_i2c_init();
> +	platform_add_devices(mt_ventoux_devices, ARRAY_SIZE(mt_ventoux_devices));
> +	mt_ventoux_serial_init();
> +	omap_sdrc_init(NULL, NULL);
> +
> +	mt_ventoux_display_init();
> +
> +	/* Configure EHCI ports */
> +	omap_mux_init_gpio(USB_PHY1_RESET, OMAP_PIN_OUTPUT);
> +	usbhs_init(&usbhs_bdata);
> +
> +	/* NAND */
> +	omap_nand_flash_init(NAND_BUSWIDTH_16, mt_ventoux_nand_partitions,
> +			     ARRAY_SIZE(mt_ventoux_nand_partitions));
> +
> +	/* touchscreen */
> +	omap_mux_init_gpio(TS_IRQ_PIN, OMAP_PIN_INPUT);
> +	omap_ads7846_init(1, TS_IRQ_PIN, 310, &tsc2046_config);

Here you call omap_ads7846_init() irregardless to
CONFIG_TOUCHSCREEN_ADS7846, but the tsc2046_config is defined only
if it is enabled...
I think, either remove the #ifdef CONFIG_TOUCHSCREEN_ADS7846
or move the above to a separate function like
mt_ventoux_touch_init() and provide a static inline version of it
in case the CONFIG_TOUCHSCREEN_ADS7846 is not enabled (just like you
did for adc128s_init()).
Otherwise, various rand_configs will fail...

> +
> +	/* Ethernet */
> +	am35xx_ethernet_init(MCX_MDIO_FREQUENCY, 1);
> +
> +	/* MMC init */
> +	omap_mux_init_gpio(SD_CARD_CD, OMAP_PIN_INPUT);
> +	omap2_hsmmc_init(mmc);
> +
> +	/* ADC128S022 init */
> +	adc128s_init();

I think you are missing the __init annotation in the adc128s_init()
function definition (just noticed after snipping).

> +}

[...]


-- 
Regards,
Igor.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 2/2] mt_ventoux: support for TeeJet Mt.Ventoux board
@ 2011-12-27  7:56     ` Igor Grinberg
  0 siblings, 0 replies; 24+ messages in thread
From: Igor Grinberg @ 2011-12-27  7:56 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Ilya,

On 12/27/11 01:08, Ilya Yanok wrote:
> This patch adds support for TeeJet Mt.Ventoux board based on TAM3517
> SOM. Supported devices:
>  - Serial
>  - Ethernet
>  - NAND
>  - USB host
>  - LCD
>  - Touchscreen
>  - CAN controller
>  - ADC128S converter
> 
> Signed-off-by: Ilya Yanok <yanok@emcraft.com>
> ---
> Requires updated machine-type file, recently posted AM35xx-EMAC patch
> and "Disable PM init on AM35{05,17} patch.
> 
>  arch/arm/mach-omap2/Kconfig                   |    6 +
>  arch/arm/mach-omap2/Makefile                  |    1 +
>  arch/arm/mach-omap2/board-am3517_mt_ventoux.c |  708 +++++++++++++++++++++++++
>  arch/arm/plat-omap/include/plat/uncompress.h  |    1 +
>  4 files changed, 716 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/mach-omap2/board-am3517_mt_ventoux.c

[...]

> diff --git a/arch/arm/mach-omap2/board-am3517_mt_ventoux.c b/arch/arm/mach-omap2/board-am3517_mt_ventoux.c
> new file mode 100644
> index 0000000..d4501d9
> --- /dev/null
> +++ b/arch/arm/mach-omap2/board-am3517_mt_ventoux.c

[...]

> +/*
> + * use fake regulator for vdds_dsi as we can't find this pin inside
> + * AM3517 datasheet.
> + */
> +static struct regulator_consumer_supply mt_ventoux_vdds_dsi_supply[] = {
> +	REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
> +	REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"),
> +};

Although the TRM states that there is a vdds_dsi signal,
it looks, from the datasheet, that VDDSHV is used to power the DSS.
Either way, it can't be switched off, I think...
Therefore, depending on your board wiring, you can leave it as fixed
regulator or bind to a supply on TPS65023.

[...]

> +static struct i2c_board_info __initdata mt_ventoux_i2c1_devices[] = {
> +	{
> +		I2C_BOARD_INFO("tps65023", 0x48),
> +		.flags = I2C_CLIENT_WAKE,
> +		.platform_data = &mt_ventoux_regulator_data[0],
> +	},
> +        {
> +                I2C_BOARD_INFO("24c02", 0x50),
> +        },
> +};

Here (and may be in some other places) you have spaces for
indentation. Can it be tabs instead for uniformity (and file size)?

> +
> +static struct i2c_board_info __initdata mt_ventoux_i2c2_devices[] = {
> +        {
> +                I2C_BOARD_INFO("24c02", 0x50),
> +        },
> +};

also here...

[...]

> +#if defined(CONFIG_TOUCHSCREEN_ADS7846)

Can't the ADS7846 be module?

> +static struct ads7846_platform_data tsc2046_config __initdata = {
> +	.x_max			= 0x0fff,
> +	.y_max			= 0x0fff,
> +	.x_plate_ohms		= 180,
> +	.pressure_max		= 255,
> +	.debounce_max		= 30,
> +	.debounce_tol		= 10,
> +	.debounce_rep		= 1,
> +	.keep_vref_on		= 1,
> +	.settle_delay_usecs	= 100,
> +};
> +#endif

[...]

> +static void __init mt_ventoux_init(void)
> +{
> +	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
> +	mt_ventoux_i2c_init();
> +	platform_add_devices(mt_ventoux_devices, ARRAY_SIZE(mt_ventoux_devices));
> +	mt_ventoux_serial_init();
> +	omap_sdrc_init(NULL, NULL);
> +
> +	mt_ventoux_display_init();
> +
> +	/* Configure EHCI ports */
> +	omap_mux_init_gpio(USB_PHY1_RESET, OMAP_PIN_OUTPUT);
> +	usbhs_init(&usbhs_bdata);
> +
> +	/* NAND */
> +	omap_nand_flash_init(NAND_BUSWIDTH_16, mt_ventoux_nand_partitions,
> +			     ARRAY_SIZE(mt_ventoux_nand_partitions));
> +
> +	/* touchscreen */
> +	omap_mux_init_gpio(TS_IRQ_PIN, OMAP_PIN_INPUT);
> +	omap_ads7846_init(1, TS_IRQ_PIN, 310, &tsc2046_config);

Here you call omap_ads7846_init() irregardless to
CONFIG_TOUCHSCREEN_ADS7846, but the tsc2046_config is defined only
if it is enabled...
I think, either remove the #ifdef CONFIG_TOUCHSCREEN_ADS7846
or move the above to a separate function like
mt_ventoux_touch_init() and provide a static inline version of it
in case the CONFIG_TOUCHSCREEN_ADS7846 is not enabled (just like you
did for adc128s_init()).
Otherwise, various rand_configs will fail...

> +
> +	/* Ethernet */
> +	am35xx_ethernet_init(MCX_MDIO_FREQUENCY, 1);
> +
> +	/* MMC init */
> +	omap_mux_init_gpio(SD_CARD_CD, OMAP_PIN_INPUT);
> +	omap2_hsmmc_init(mmc);
> +
> +	/* ADC128S022 init */
> +	adc128s_init();

I think you are missing the __init annotation in the adc128s_init()
function definition (just noticed after snipping).

> +}

[...]


-- 
Regards,
Igor.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 2/2] mt_ventoux: support for TeeJet Mt.Ventoux board
  2011-12-27  7:56     ` Igor Grinberg
@ 2011-12-27 23:02       ` Ilya Yanok
  -1 siblings, 0 replies; 24+ messages in thread
From: Ilya Yanok @ 2011-12-27 23:02 UTC (permalink / raw)
  To: Igor Grinberg; +Cc: linux-arm-kernel, linux-omap, devicetree-discuss, sasha_d

Hi Igor,

thanks for your comments.

On 27.12.2011 11:56, Igor Grinberg wrote:
>> +/*
>> + * use fake regulator for vdds_dsi as we can't find this pin inside
>> + * AM3517 datasheet.
>> + */
>> +static struct regulator_consumer_supply mt_ventoux_vdds_dsi_supply[] = {
>> +	REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
>> +	REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"),
>> +};
> 
> Although the TRM states that there is a vdds_dsi signal,
> it looks, from the datasheet, that VDDSHV is used to power the DSS.
> Either way, it can't be switched off, I think...
> Therefore, depending on your board wiring, you can leave it as fixed
> regulator or bind to a supply on TPS65023.

I will forward this info to hardware guys and ask about wiring. For now
I will leave it as is. Thanks for this information it turned to be some
kind of mystery. It would be great if you could give some pointer to the
datasheet regarding VDDSHV and DSS.

>> +static struct i2c_board_info __initdata mt_ventoux_i2c1_devices[] = {
>> +	{
>> +		I2C_BOARD_INFO("tps65023", 0x48),
>> +		.flags = I2C_CLIENT_WAKE,
>> +		.platform_data = &mt_ventoux_regulator_data[0],
>> +	},
>> +        {
>> +                I2C_BOARD_INFO("24c02", 0x50),
>> +        },
>> +};
> 
> Here (and may be in some other places) you have spaces for
> indentation. Can it be tabs instead for uniformity (and file size)?

Argh.. Surely. I should have noticed this myself.

>> +#if defined(CONFIG_TOUCHSCREEN_ADS7846)
> 
> Can't the ADS7846 be module?

Surely. Fixed.

>> +static struct ads7846_platform_data tsc2046_config __initdata = {
>> +	.x_max			= 0x0fff,
>> +	.y_max			= 0x0fff,
>> +	.x_plate_ohms		= 180,
>> +	.pressure_max		= 255,
>> +	.debounce_max		= 30,
>> +	.debounce_tol		= 10,
>> +	.debounce_rep		= 1,
>> +	.keep_vref_on		= 1,
>> +	.settle_delay_usecs	= 100,
>> +};
>> +#endif
> 
> [...]
> 
>> +static void __init mt_ventoux_init(void)
>> +{
>> +	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
>> +	mt_ventoux_i2c_init();
>> +	platform_add_devices(mt_ventoux_devices, ARRAY_SIZE(mt_ventoux_devices));
>> +	mt_ventoux_serial_init();
>> +	omap_sdrc_init(NULL, NULL);
>> +
>> +	mt_ventoux_display_init();
>> +
>> +	/* Configure EHCI ports */
>> +	omap_mux_init_gpio(USB_PHY1_RESET, OMAP_PIN_OUTPUT);
>> +	usbhs_init(&usbhs_bdata);
>> +
>> +	/* NAND */
>> +	omap_nand_flash_init(NAND_BUSWIDTH_16, mt_ventoux_nand_partitions,
>> +			     ARRAY_SIZE(mt_ventoux_nand_partitions));
>> +
>> +	/* touchscreen */
>> +	omap_mux_init_gpio(TS_IRQ_PIN, OMAP_PIN_INPUT);
>> +	omap_ads7846_init(1, TS_IRQ_PIN, 310, &tsc2046_config);
> 
> Here you call omap_ads7846_init() irregardless to
> CONFIG_TOUCHSCREEN_ADS7846, but the tsc2046_config is defined only
> if it is enabled...
> I think, either remove the #ifdef CONFIG_TOUCHSCREEN_ADS7846
> or move the above to a separate function like
> mt_ventoux_touch_init() and provide a static inline version of it
> in case the CONFIG_TOUCHSCREEN_ADS7846 is not enabled (just like you
> did for adc128s_init()).
> Otherwise, various rand_configs will fail...

Agreed. Fixed.

>> +	/* Ethernet */
>> +	am35xx_ethernet_init(MCX_MDIO_FREQUENCY, 1);
>> +
>> +	/* MMC init */
>> +	omap_mux_init_gpio(SD_CARD_CD, OMAP_PIN_INPUT);
>> +	omap2_hsmmc_init(mmc);
>> +
>> +	/* ADC128S022 init */
>> +	adc128s_init();
> 
> I think you are missing the __init annotation in the adc128s_init()
> function definition (just noticed after snipping).

Well, it's declared as inline so I think there is no much use for the
__init annotation...

Regards, Ilya.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 2/2] mt_ventoux: support for TeeJet Mt.Ventoux board
@ 2011-12-27 23:02       ` Ilya Yanok
  0 siblings, 0 replies; 24+ messages in thread
From: Ilya Yanok @ 2011-12-27 23:02 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Igor,

thanks for your comments.

On 27.12.2011 11:56, Igor Grinberg wrote:
>> +/*
>> + * use fake regulator for vdds_dsi as we can't find this pin inside
>> + * AM3517 datasheet.
>> + */
>> +static struct regulator_consumer_supply mt_ventoux_vdds_dsi_supply[] = {
>> +	REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
>> +	REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"),
>> +};
> 
> Although the TRM states that there is a vdds_dsi signal,
> it looks, from the datasheet, that VDDSHV is used to power the DSS.
> Either way, it can't be switched off, I think...
> Therefore, depending on your board wiring, you can leave it as fixed
> regulator or bind to a supply on TPS65023.

I will forward this info to hardware guys and ask about wiring. For now
I will leave it as is. Thanks for this information it turned to be some
kind of mystery. It would be great if you could give some pointer to the
datasheet regarding VDDSHV and DSS.

>> +static struct i2c_board_info __initdata mt_ventoux_i2c1_devices[] = {
>> +	{
>> +		I2C_BOARD_INFO("tps65023", 0x48),
>> +		.flags = I2C_CLIENT_WAKE,
>> +		.platform_data = &mt_ventoux_regulator_data[0],
>> +	},
>> +        {
>> +                I2C_BOARD_INFO("24c02", 0x50),
>> +        },
>> +};
> 
> Here (and may be in some other places) you have spaces for
> indentation. Can it be tabs instead for uniformity (and file size)?

Argh.. Surely. I should have noticed this myself.

>> +#if defined(CONFIG_TOUCHSCREEN_ADS7846)
> 
> Can't the ADS7846 be module?

Surely. Fixed.

>> +static struct ads7846_platform_data tsc2046_config __initdata = {
>> +	.x_max			= 0x0fff,
>> +	.y_max			= 0x0fff,
>> +	.x_plate_ohms		= 180,
>> +	.pressure_max		= 255,
>> +	.debounce_max		= 30,
>> +	.debounce_tol		= 10,
>> +	.debounce_rep		= 1,
>> +	.keep_vref_on		= 1,
>> +	.settle_delay_usecs	= 100,
>> +};
>> +#endif
> 
> [...]
> 
>> +static void __init mt_ventoux_init(void)
>> +{
>> +	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
>> +	mt_ventoux_i2c_init();
>> +	platform_add_devices(mt_ventoux_devices, ARRAY_SIZE(mt_ventoux_devices));
>> +	mt_ventoux_serial_init();
>> +	omap_sdrc_init(NULL, NULL);
>> +
>> +	mt_ventoux_display_init();
>> +
>> +	/* Configure EHCI ports */
>> +	omap_mux_init_gpio(USB_PHY1_RESET, OMAP_PIN_OUTPUT);
>> +	usbhs_init(&usbhs_bdata);
>> +
>> +	/* NAND */
>> +	omap_nand_flash_init(NAND_BUSWIDTH_16, mt_ventoux_nand_partitions,
>> +			     ARRAY_SIZE(mt_ventoux_nand_partitions));
>> +
>> +	/* touchscreen */
>> +	omap_mux_init_gpio(TS_IRQ_PIN, OMAP_PIN_INPUT);
>> +	omap_ads7846_init(1, TS_IRQ_PIN, 310, &tsc2046_config);
> 
> Here you call omap_ads7846_init() irregardless to
> CONFIG_TOUCHSCREEN_ADS7846, but the tsc2046_config is defined only
> if it is enabled...
> I think, either remove the #ifdef CONFIG_TOUCHSCREEN_ADS7846
> or move the above to a separate function like
> mt_ventoux_touch_init() and provide a static inline version of it
> in case the CONFIG_TOUCHSCREEN_ADS7846 is not enabled (just like you
> did for adc128s_init()).
> Otherwise, various rand_configs will fail...

Agreed. Fixed.

>> +	/* Ethernet */
>> +	am35xx_ethernet_init(MCX_MDIO_FREQUENCY, 1);
>> +
>> +	/* MMC init */
>> +	omap_mux_init_gpio(SD_CARD_CD, OMAP_PIN_INPUT);
>> +	omap2_hsmmc_init(mmc);
>> +
>> +	/* ADC128S022 init */
>> +	adc128s_init();
> 
> I think you are missing the __init annotation in the adc128s_init()
> function definition (just noticed after snipping).

Well, it's declared as inline so I think there is no much use for the
__init annotation...

Regards, Ilya.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH V2] mt_ventoux: support for TeeJet Mt.Ventoux board
  2011-12-26 23:08   ` Ilya Yanok
@ 2011-12-27 23:09     ` Ilya Yanok
  -1 siblings, 0 replies; 24+ messages in thread
From: Ilya Yanok @ 2011-12-27 23:09 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, devicetree-discuss, grinberg
  Cc: sasha_d, Ilya Yanok

This patch adds support for TeeJet Mt.Ventoux board based on TAM3517
SOM. Supported devices:
 - Serial
 - Ethernet
 - NAND
 - USB host
 - LCD
 - Touchscreen
 - CAN controller
 - ADC128S converter

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
---

Changes from V1:

 - Fixed indentation (use tabs not spaces)
 - Fixed over 80 characters lines
 - Added #if defined(CONFIG_SENSORS_ADCXX_MODULE) to allow adcxx to be a
   module.
 - Fixes for compilation with CONFIG_TOUCHSCREEN_ADS7846!=y
  - Added defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
  - Moved call to omap_ads7846_init to separate small function
  - Register fixed regulator used for touchscreen only if the driver is
    enabled
 - Changed board name (MT_VENTOUX -> Mt.Ventoux)

 arch/arm/mach-omap2/Kconfig                   |    6 +
 arch/arm/mach-omap2/Makefile                  |    1 +
 arch/arm/mach-omap2/board-am3517_mt_ventoux.c |  724 +++++++++++++++++++++++++
 arch/arm/plat-omap/include/plat/uncompress.h  |    1 +
 4 files changed, 732 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-am3517_mt_ventoux.c

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index fd9b8c0..45f5dcb 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -237,6 +237,12 @@ config MACH_MCX
 	select OMAP_PACKAGE_CBB
 	select REGULATOR_FIXED_VOLTAGE
 
+config MACH_AM3517_MT_VENTOUX
+	bool "TeeJet MT_VENTOUX (TAM3517 based) board"
+	depends on ARCH_OMAP3
+	select OMAP_PACKAGE_CBB
+	select REGULATOR_FIXED_VOLTAGE
+
 config MACH_NOKIA_N800
        bool
 
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 9405dfc..cbc3a36 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -239,6 +239,7 @@ obj-$(CONFIG_MACH_SBC3530)		+= board-omap3stalker.o
 obj-$(CONFIG_MACH_TI8168EVM)		+= board-ti8168evm.o
 obj-$(CONFIG_MACH_TI8148EVM)		+= board-ti8168evm.o
 obj-$(CONFIG_MACH_MCX)			+= board-mcx.o
+obj-$(CONFIG_MACH_AM3517_MT_VENTOUX)	+= board-am3517_mt_ventoux.o
 
 # Platform specific device init code
 
diff --git a/arch/arm/mach-omap2/board-am3517_mt_ventoux.c b/arch/arm/mach-omap2/board-am3517_mt_ventoux.c
new file mode 100644
index 0000000..4b6bd33
--- /dev/null
+++ b/arch/arm/mach-omap2/board-am3517_mt_ventoux.c
@@ -0,0 +1,724 @@
+/*
+ * Copyright (C) 2011 Ilya Yanok, Emcraft Systems
+ *
+ * Modified from mach-omap2/board-mcx.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/gpio.h>
+#include <linux/mtd/partitions.h>
+#include <linux/mtd/nand.h>
+#include <linux/mtd/plat-ram.h>
+#include <linux/mmc/host.h>
+#include <linux/regulator/fixed.h>
+#include <linux/regulator/machine.h>
+#include <linux/spi/ads7846.h>
+#include <linux/spi/spi.h>
+#include <linux/can/platform/ti_hecc.h>
+
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+
+#include <plat/common.h>
+#include <plat/mcspi.h>
+#include <video/omapdss.h>
+#include <video/omap-panel-generic-dpi.h>
+#include <plat/usb.h>
+
+#include <mach/am35xx.h>
+
+#include "am35xx-emac.h"
+#include "mux.h"
+#include "control.h"
+#include "hsmmc.h"
+#include "common-board-devices.h"
+#include "common.h"
+
+/* FPGA */
+static struct platdata_mtd_ram mt_ventoux_fpga_data = {
+	.bankwidth = 2,
+};
+
+#define FPGA_BASE_ADDR		0x20000000
+static struct resource mt_ventoux_fpga_resource = {
+	.start = FPGA_BASE_ADDR,
+	.end   = FPGA_BASE_ADDR + SZ_128M - 1,
+	.flags = IORESOURCE_MEM,
+};
+
+static struct platform_device mt_ventoux_fpga_device = {
+	.name = "mtd-ram",
+	.id = 0,
+	.dev = {
+		.platform_data = &mt_ventoux_fpga_data,
+	},
+	.num_resources = 1,
+	.resource = &mt_ventoux_fpga_resource,
+};
+
+#define MCX_MDIO_FREQUENCY	(1000000)
+
+static struct mtd_partition mt_ventoux_nand_partitions[] = {
+	/* All the partition sizes are listed in terms of NAND block size */
+	{
+		.name		= "X-Loader",
+		.offset		= 0,
+		.size		= 4 * NAND_BLOCK_SIZE,
+		.mask_flags	= MTD_WRITEABLE,	/* force read-only */
+	},
+	{
+		.name		= "U-Boot",
+		.offset		= MTDPART_OFS_APPEND,	/* Offset = 0x80000 */
+		.size		= 15 * NAND_BLOCK_SIZE,
+		.mask_flags	= MTD_WRITEABLE,	/* force read-only */
+	},
+	{
+		.name		= "U-Boot Env",
+		.offset		= MTDPART_OFS_APPEND,	/* Offset = 0x260000 */
+		.size		= 1 * NAND_BLOCK_SIZE,
+	},
+	{
+		.name		= "Kernel",
+		.offset		= MTDPART_OFS_APPEND,	/* Offset = 0x280000 */
+		.size		= 32 * NAND_BLOCK_SIZE,
+	},
+	{
+		.name		= "File System",
+		.offset		= MTDPART_OFS_APPEND,	/* Offset = 0x680000 */
+		.size		= MTDPART_SIZ_FULL,
+	},
+};
+
+#define PANEL_PWR_PIN		138
+#define LCD_PANEL_PON_PIN	139
+#define DVI_PON_PIN		24
+
+static int lcd_enabled;
+static int dvi_enabled;
+
+static int mt_ventoux_panel_enable_lcd(struct omap_dss_device *dssdev)
+{
+	if (dvi_enabled) {
+		pr_err("cannot enable LCD, DVI is enabled\n");
+		return -EINVAL;
+	}
+
+	gpio_set_value(LCD_PANEL_PON_PIN, 1);
+	gpio_set_value(PANEL_PWR_PIN, 0);
+	lcd_enabled = 1;
+
+	return 0;
+}
+
+static void mt_ventoux_panel_disable_lcd(struct omap_dss_device *dssdev)
+{
+	gpio_set_value(PANEL_PWR_PIN, 1);
+	gpio_set_value(LCD_PANEL_PON_PIN, 0);
+	lcd_enabled = 0;
+}
+
+static struct panel_generic_dpi_data lcd_panel = {
+	.name			= "ortustech_com43h4m10xtc",
+	.platform_enable	= mt_ventoux_panel_enable_lcd,
+	.platform_disable	= mt_ventoux_panel_disable_lcd,
+};
+
+static struct omap_dss_device mt_ventoux_lcd_device = {
+	.type			= OMAP_DISPLAY_TYPE_DPI,
+	.name			= "lcd",
+	.driver_name		= "generic_dpi_panel",
+	.data			= &lcd_panel,
+	.phy.dpi.data_lines	= 24,
+};
+
+/*
+ * TV Output
+ */
+
+static int mt_ventoux_panel_enable_tv(struct omap_dss_device *dssdev)
+{
+	return 0;
+}
+
+static void mt_ventoux_panel_disable_tv(struct omap_dss_device *dssdev)
+{
+}
+
+static struct omap_dss_device mt_ventoux_tv_device = {
+	.type			= OMAP_DISPLAY_TYPE_VENC,
+	.name			= "tv",
+	.driver_name		= "venc",
+	.phy.venc.type		= OMAP_DSS_VENC_TYPE_SVIDEO,
+	.platform_enable	= mt_ventoux_panel_enable_tv,
+	.platform_disable	= mt_ventoux_panel_disable_tv,
+};
+
+/*
+ * DVI/HDMI Output
+ */
+
+static int mt_ventoux_panel_enable_dvi(struct omap_dss_device *dssdev)
+{
+	if (lcd_enabled) {
+		pr_err("cannot enable DVI, LCD is enabled\n");
+		return -EINVAL;
+	}
+	dvi_enabled = 1;
+	gpio_set_value(DVI_PON_PIN, 1);
+	return 0;
+}
+
+static void mt_ventoux_panel_disable_dvi(struct omap_dss_device *dssdev)
+{
+	dvi_enabled = 0;
+	gpio_set_value(DVI_PON_PIN, 0);
+}
+
+static struct panel_generic_dpi_data dvi_panel = {
+	.platform_enable	= mt_ventoux_panel_enable_dvi,
+	.platform_disable	= mt_ventoux_panel_disable_dvi,
+};
+static struct omap_dss_device mt_ventoux_dvi_device = {
+	.type			= OMAP_DISPLAY_TYPE_DPI,
+	.name			= "dvi",
+	.driver_name		= "dvi",
+	.data			= &dvi_panel,
+	.phy.dpi.data_lines	= 24,
+};
+
+static struct omap_dss_device *mt_ventoux_dss_devices[] = {
+	&mt_ventoux_lcd_device,
+	&mt_ventoux_tv_device,
+	&mt_ventoux_dvi_device,
+};
+
+static struct omap_dss_board_info mt_ventoux_dss_data = {
+	.num_devices	= ARRAY_SIZE(mt_ventoux_dss_devices),
+	.devices	= mt_ventoux_dss_devices,
+	.default_device	= &mt_ventoux_lcd_device,
+};
+
+/*
+ * use fake regulator for vdds_dsi as we can't find this pin inside
+ * AM3517 datasheet.
+ */
+static struct regulator_consumer_supply mt_ventoux_vdds_dsi_supply[] = {
+	REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
+	REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"),
+};
+
+static struct regulator_init_data mt_ventoux_vdds_dsi = {
+	.constraints		= {
+		.valid_modes_mask	= REGULATOR_MODE_NORMAL,
+		.always_on		= 1,
+	},
+	.num_consumer_supplies	= ARRAY_SIZE(mt_ventoux_vdds_dsi_supply),
+	.consumer_supplies	= mt_ventoux_vdds_dsi_supply,
+};
+
+static struct fixed_voltage_config mt_ventoux_display = {
+	.supply_name		= "display",
+	.microvolts		= 1800000,
+	.gpio			= -EINVAL,
+	.enabled_at_boot	= 1,
+	.init_data		= &mt_ventoux_vdds_dsi,
+};
+
+static struct platform_device mt_ventoux_display_device = {
+	.name		= "reg-fixed-voltage",
+	.id		= 0,
+	.dev = {
+		.platform_data	= &mt_ventoux_display,
+	},
+};
+
+static struct gpio mt_ventoux_dss_gpios[] __initdata = {
+	{ PANEL_PWR_PIN, GPIOF_OUT_INIT_HIGH, "panel_pwr"		},
+	{ LCD_PANEL_PON_PIN, GPIOF_OUT_INIT_LOW, "lcd_power_pon"	},
+	{ DVI_PON_PIN, GPIOF_OUT_INIT_LOW, "dvi_pon"			},
+};
+
+static void __init mt_ventoux_display_init(void)
+{
+	int r;
+
+	omap_mux_init_gpio(PANEL_PWR_PIN, OMAP_PIN_OUTPUT);
+	omap_mux_init_gpio(LCD_PANEL_PON_PIN, OMAP_PIN_OUTPUT);
+	omap_mux_init_gpio(DVI_PON_PIN, OMAP_PIN_OUTPUT);
+
+	r = gpio_request_array(mt_ventoux_dss_gpios,
+			ARRAY_SIZE(mt_ventoux_dss_gpios));
+	if (r) {
+		pr_err("failed to get DSS control GPIOs\n");
+		return;
+	}
+
+	r = omap_display_init(&mt_ventoux_dss_data);
+	if (r) {
+		pr_err("Failed to register DSS device\n");
+		gpio_free_array(mt_ventoux_dss_gpios,
+				ARRAY_SIZE(mt_ventoux_dss_gpios));
+	}
+}
+
+/* TPS65023 specific initialization */
+/* VDCDC1 -> VDD_CORE */
+static struct regulator_consumer_supply am3517_vdcdc1_supplies[] = {
+	{
+		.supply = "vdd_core",
+	},
+};
+
+/* VDCDC2 -> VDDSHV */
+static struct regulator_consumer_supply am3517_vdcdc2_supplies[] = {
+	{
+		.supply = "vddshv",
+	},
+};
+
+/*
+ * VDCDC2 |-> VDDS
+ *	  |-> VDDS_SRAM_CORE_BG
+ *	  |-> VDDS_SRAM_MPU
+ */
+static struct regulator_consumer_supply am3517_vdcdc3_supplies[] = {
+	{
+		.supply = "vdds",
+	},
+	{
+		.supply = "vdds_sram_core_bg",
+	},
+	{
+		.supply = "vdds_sram_mpu",
+	},
+};
+
+/*
+ * LDO1 |-> VDDA1P8V_USBPHY
+ *	|-> VDDA_DAC
+ */
+static struct regulator_consumer_supply am3517_ldo1_supplies[] = {
+	{
+		.supply = "vdda1p8v_usbphy",
+	},
+	{
+		.supply = "vdda_dac",
+	},
+};
+
+/* LDO2 -> VDDA3P3V_USBPHY */
+static struct regulator_consumer_supply am3517_ldo2_supplies[] = {
+	{
+		.supply = "vdda3p3v_usbphy",
+	},
+};
+
+static struct regulator_init_data mt_ventoux_regulator_data[] = {
+	/* DCDC1 */
+	{
+		.constraints = {
+			.min_uV = 1200000,
+			.max_uV = 1200000,
+			.valid_modes_mask = REGULATOR_MODE_NORMAL,
+			.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+			.always_on = true,
+			.apply_uV = false,
+		},
+		.num_consumer_supplies = ARRAY_SIZE(am3517_vdcdc1_supplies),
+		.consumer_supplies = am3517_vdcdc1_supplies,
+	},
+	/* DCDC2 */
+	{
+		.constraints = {
+			.min_uV = 3300000,
+			.max_uV = 3300000,
+			.valid_modes_mask = REGULATOR_MODE_NORMAL,
+			.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+			.always_on = true,
+			.apply_uV = false,
+		},
+		.num_consumer_supplies = ARRAY_SIZE(am3517_vdcdc2_supplies),
+		.consumer_supplies = am3517_vdcdc2_supplies,
+	},
+	/* DCDC3 */
+	{
+		.constraints = {
+			.min_uV = 1800000,
+			.max_uV = 1800000,
+			.valid_modes_mask = REGULATOR_MODE_NORMAL,
+			.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+			.always_on = true,
+			.apply_uV = false,
+		},
+		.num_consumer_supplies = ARRAY_SIZE(am3517_vdcdc3_supplies),
+		.consumer_supplies = am3517_vdcdc3_supplies,
+	},
+	/* LDO1 */
+	{
+		.constraints = {
+			.min_uV = 1800000,
+			.max_uV = 1800000,
+			.valid_modes_mask = REGULATOR_MODE_NORMAL,
+			.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+			.always_on = false,
+			.apply_uV = false,
+		},
+		.num_consumer_supplies = ARRAY_SIZE(am3517_ldo1_supplies),
+		.consumer_supplies = am3517_ldo1_supplies,
+	},
+	/* LDO2 */
+	{
+		.constraints = {
+			.min_uV = 3300000,
+			.max_uV = 3300000,
+			.valid_modes_mask = REGULATOR_MODE_NORMAL,
+			.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+			.always_on = false,
+			.apply_uV = false,
+		},
+		.num_consumer_supplies = ARRAY_SIZE(am3517_ldo2_supplies),
+		.consumer_supplies = am3517_ldo2_supplies,
+	},
+};
+
+static struct i2c_board_info __initdata mt_ventoux_i2c1_devices[] = {
+	{
+		I2C_BOARD_INFO("tps65023", 0x48),
+		.flags = I2C_CLIENT_WAKE,
+		.platform_data = &mt_ventoux_regulator_data[0],
+	},
+	{
+		I2C_BOARD_INFO("24c02", 0x50),
+	},
+};
+
+static struct i2c_board_info __initdata mt_ventoux_i2c2_devices[] = {
+	{
+		I2C_BOARD_INFO("24c02", 0x50),
+	},
+};
+
+static struct i2c_board_info __initdata mt_ventoux_i2c3_devices[] = {
+	{
+		I2C_BOARD_INFO("ds1307", 0x68),
+	},
+};
+
+static void __init mt_ventoux_i2c_init(void)
+{
+	omap_register_i2c_bus(1, 400, mt_ventoux_i2c1_devices,
+			ARRAY_SIZE(mt_ventoux_i2c1_devices));
+	omap_register_i2c_bus(2, 400, mt_ventoux_i2c2_devices,
+			ARRAY_SIZE(mt_ventoux_i2c2_devices));
+	omap_register_i2c_bus(3, 400, mt_ventoux_i2c3_devices,
+			ARRAY_SIZE(mt_ventoux_i2c3_devices));
+}
+
+#if defined(CONFIG_TOUCHSCREEN_ADS7846) || \
+	defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
+/*
+ * use fake regulator for tsc2046 vcc
+ */
+static struct regulator_consumer_supply mt_ventoux_tsc2046_vcc_supply[] = {
+	REGULATOR_SUPPLY("vcc", "spi1.0"),
+};
+
+static struct regulator_init_data mt_ventoux_tsc2046_vcc = {
+	.constraints		= {
+		.valid_modes_mask	= REGULATOR_MODE_NORMAL,
+		.always_on		= 1,
+	},
+	.num_consumer_supplies	= ARRAY_SIZE(mt_ventoux_tsc2046_vcc_supply),
+	.consumer_supplies	= mt_ventoux_tsc2046_vcc_supply,
+};
+
+static struct fixed_voltage_config mt_ventoux_ts = {
+	.supply_name		= "touchscreen",
+	.microvolts		= 3300000,
+	.gpio			= -EINVAL,
+	.enabled_at_boot	= 1,
+	.init_data		= &mt_ventoux_tsc2046_vcc,
+};
+
+static struct platform_device mt_ventoux_ts_device = {
+	.name		= "reg-fixed-voltage",
+	.id		= 1,
+	.dev = {
+		.platform_data	= &mt_ventoux_ts,
+	},
+};
+
+static struct ads7846_platform_data tsc2046_config __initdata = {
+	.x_max			= 0x0fff,
+	.y_max			= 0x0fff,
+	.x_plate_ohms		= 180,
+	.pressure_max		= 255,
+	.debounce_max		= 30,
+	.debounce_tol		= 10,
+	.debounce_rep		= 1,
+	.keep_vref_on		= 1,
+	.settle_delay_usecs	= 100,
+};
+
+#define TS_IRQ_PIN	163
+
+static inline void tsc2046_init(void)
+{
+	omap_mux_init_gpio(TS_IRQ_PIN, OMAP_PIN_INPUT);
+	omap_ads7846_init(1, TS_IRQ_PIN, 310, &tsc2046_config);
+}
+#else
+static inline void tsc2046_init(void)
+{
+}
+#endif
+
+#define USB_PHY1_RESET		25
+
+static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
+
+	.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
+	.port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
+	.port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
+
+	.phy_reset  = true,
+	.reset_gpio_port[0]  = USB_PHY1_RESET,
+	.reset_gpio_port[1]  = -EINVAL,
+	.reset_gpio_port[2]  = -EINVAL
+};
+
+#define SD_CARD_CD		126
+
+static struct omap2_hsmmc_info mmc[] = {
+	{
+		.mmc		= 1,
+		.caps		= MMC_CAP_4_BIT_DATA,
+		.gpio_cd        = SD_CARD_CD,
+		.gpio_wp        = -EINVAL,
+	},
+	{}      /* Terminator */
+};
+
+#if defined(CONFIG_SENSORS_ADCXX) || defined(CONFIG_SENSORS_ADCXX_MODULE)
+static struct omap2_mcspi_device_config adc128s_mcspi_config = {
+	.turbo_mode	= 0,
+};
+
+static struct spi_board_info adc128s_spi_board_info __initdata = {
+	.modalias		= "adcxx8s",
+	.bus_num		= 2,
+	.chip_select		= 1,
+	.max_speed_hz		= 1600000,
+	.controller_data	= &adc128s_mcspi_config,
+	.irq			= -EINVAL,
+};
+
+static inline void adc128s_init(void)
+{
+	spi_register_board_info(&adc128s_spi_board_info, 1);
+}
+#else
+static inline void adc128s_init(void)
+{
+}
+#endif
+
+#ifdef CONFIG_OMAP_MUX
+static struct omap_board_mux board_mux[] __initdata = {
+	OMAP3_MUX(CHASSIS_DMAREQ3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN),
+	OMAP3_MUX(MCBSP_CLKS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP),
+	OMAP3_MUX(GPMC_NCS4, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLDOWN),
+	{ .reg_offset = OMAP_MUX_TERMINATOR },
+};
+
+/*
+ * Default mux settings except for uart3_cts_rctx pin which we want to
+ * use as touchscreen IRQ GPIO.
+ */
+static struct omap_device_pad uart1_pads[] __initdata = {
+	{
+		.name	= "uart1_cts.uart1_cts",
+		.enable	= OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0,
+	},
+	{
+		.name	= "uart1_rts.uart1_rts",
+		.enable	= OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
+	},
+	{
+		.name	= "uart1_tx.uart1_tx",
+		.enable	= OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
+	},
+	{
+		.name	= "uart1_rx.uart1_rx",
+		.flags	= OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.enable	= OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0,
+		.idle	= OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0,
+	},
+};
+
+static struct omap_device_pad uart2_pads[] __initdata = {
+	{
+		.name	= "uart2_cts.uart2_cts",
+		.enable	= OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0,
+	},
+	{
+		.name	= "uart2_rts.uart2_rts",
+		.enable	= OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
+	},
+	{
+		.name	= "uart2_tx.uart2_tx",
+		.enable	= OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
+	},
+	{
+		.name	= "uart2_rx.uart2_rx",
+		.flags	= OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.enable	= OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0,
+		.idle	= OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0,
+	},
+};
+
+static struct omap_device_pad uart3_pads[] __initdata = {
+	{
+		.name	= "uart3_rts_sd.uart3_rts_sd",
+		.enable	= OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
+	},
+	{
+		.name	= "uart3_tx_irtx.uart3_tx_irtx",
+		.enable	= OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
+	},
+	{
+		.name	= "uart3_rx_irrx.uart3_rx_irrx",
+		.flags	= OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.enable	= OMAP_PIN_INPUT | OMAP_MUX_MODE0,
+		.idle	= OMAP_PIN_INPUT | OMAP_MUX_MODE0,
+	},
+};
+
+static inline void mt_ventoux_serial_init(void)
+{
+	struct omap_board_data bdata;
+
+	bdata.flags = 0;
+
+	bdata.id = 0;
+	bdata.pads = uart1_pads;
+	bdata.pads_cnt = ARRAY_SIZE(uart1_pads);
+	omap_serial_init_port(&bdata, NULL);
+
+	bdata.id = 1;
+	bdata.pads = uart2_pads;
+	bdata.pads_cnt = ARRAY_SIZE(uart2_pads);
+	omap_serial_init_port(&bdata, NULL);
+
+	bdata.id = 2;
+	bdata.pads = uart3_pads;
+	bdata.pads_cnt = ARRAY_SIZE(uart3_pads);
+	omap_serial_init_port(&bdata, NULL);
+
+	bdata.id = 3;
+	bdata.pads = NULL;
+	bdata.pads_cnt = 0;
+	omap_serial_init_port(&bdata, NULL);
+}
+#else
+static inline void mt_ventoux_serial_init(void)
+{
+	omap_serial_init();
+}
+#endif
+
+static struct resource am3517_hecc_resources[] = {
+	{
+		.start	= AM35XX_IPSS_HECC_BASE,
+		.end	= AM35XX_IPSS_HECC_BASE + 0x3FFF,
+		.flags	= IORESOURCE_MEM,
+	},
+	{
+		.start	= INT_35XX_HECC0_IRQ,
+		.end	= INT_35XX_HECC0_IRQ,
+		.flags	= IORESOURCE_IRQ,
+	},
+};
+
+static struct ti_hecc_platform_data am3517_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 am3517_hecc_device = {
+	.name		= "ti_hecc",
+	.id		= -1,
+	.num_resources	= ARRAY_SIZE(am3517_hecc_resources),
+	.resource	= am3517_hecc_resources,
+	.dev		= {
+		.platform_data = &am3517_hecc_pdata,
+	},
+};
+
+static struct platform_device *mt_ventoux_devices[] __initdata = {
+	&mt_ventoux_display_device,
+#if defined(CONFIG_TOUCHSCREEN_ADS7846) || \
+	defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
+	&mt_ventoux_ts_device,
+#endif
+	&mt_ventoux_fpga_device,
+	&am3517_hecc_device,
+};
+
+static void __init mt_ventoux_init(void)
+{
+	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
+	mt_ventoux_i2c_init();
+	platform_add_devices(mt_ventoux_devices,
+			ARRAY_SIZE(mt_ventoux_devices));
+	mt_ventoux_serial_init();
+	omap_sdrc_init(NULL, NULL);
+
+	mt_ventoux_display_init();
+
+	/* Configure EHCI ports */
+	omap_mux_init_gpio(USB_PHY1_RESET, OMAP_PIN_OUTPUT);
+	usbhs_init(&usbhs_bdata);
+
+	/* NAND */
+	omap_nand_flash_init(NAND_BUSWIDTH_16, mt_ventoux_nand_partitions,
+			     ARRAY_SIZE(mt_ventoux_nand_partitions));
+
+	/* touchscreen */
+	tsc2046_init();
+
+	/* Ethernet */
+	am35xx_ethernet_init(MCX_MDIO_FREQUENCY, 1);
+
+	/* MMC init */
+	omap_mux_init_gpio(SD_CARD_CD, OMAP_PIN_INPUT);
+	omap2_hsmmc_init(mmc);
+
+	/* ADC128S022 init */
+	adc128s_init();
+}
+
+static const char *mt_ventoux_dt_match[] __initdata = {
+	"teejet,mt_ventoux",
+	NULL
+};
+
+MACHINE_START(AM3517_MT_VENTOUX, "TeeJet Mt.Ventoux")
+	/* Maintainer: Ilya Yanok */
+	.atag_offset	= 0x100,
+	.reserve	= omap_reserve,
+	.map_io		= omap3_map_io,
+	.init_early	= am35xx_init_early,
+	.init_irq	= omap3_init_irq,
+	.handle_irq	= omap3_intc_handle_irq,
+	.init_machine	= mt_ventoux_init,
+	.timer		= &omap3_timer,
+	.dt_compat	= mt_ventoux_dt_match,
+MACHINE_END
diff --git a/arch/arm/plat-omap/include/plat/uncompress.h b/arch/arm/plat-omap/include/plat/uncompress.h
index 1141364..021cb0d 100644
--- a/arch/arm/plat-omap/include/plat/uncompress.h
+++ b/arch/arm/plat-omap/include/plat/uncompress.h
@@ -145,6 +145,7 @@ static inline void __arch_decomp_setup(unsigned long arch_id)
 		DEBUG_LL_OMAP2(3, nokia_n810_wimax);
 
 		/* omap3 based boards using UART1 */
+		DEBUG_LL_OMAP3(1, am3517_mt_ventoux);
 		DEBUG_LL_OMAP2(1, omap3evm);
 		DEBUG_LL_OMAP3(1, omap_3430sdp);
 		DEBUG_LL_OMAP3(1, omap_3630sdp);
-- 
1.7.6.4


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH V2] mt_ventoux: support for TeeJet Mt.Ventoux board
@ 2011-12-27 23:09     ` Ilya Yanok
  0 siblings, 0 replies; 24+ messages in thread
From: Ilya Yanok @ 2011-12-27 23:09 UTC (permalink / raw)
  To: linux-arm-kernel

This patch adds support for TeeJet Mt.Ventoux board based on TAM3517
SOM. Supported devices:
 - Serial
 - Ethernet
 - NAND
 - USB host
 - LCD
 - Touchscreen
 - CAN controller
 - ADC128S converter

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
---

Changes from V1:

 - Fixed indentation (use tabs not spaces)
 - Fixed over 80 characters lines
 - Added #if defined(CONFIG_SENSORS_ADCXX_MODULE) to allow adcxx to be a
   module.
 - Fixes for compilation with CONFIG_TOUCHSCREEN_ADS7846!=y
  - Added defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
  - Moved call to omap_ads7846_init to separate small function
  - Register fixed regulator used for touchscreen only if the driver is
    enabled
 - Changed board name (MT_VENTOUX -> Mt.Ventoux)

 arch/arm/mach-omap2/Kconfig                   |    6 +
 arch/arm/mach-omap2/Makefile                  |    1 +
 arch/arm/mach-omap2/board-am3517_mt_ventoux.c |  724 +++++++++++++++++++++++++
 arch/arm/plat-omap/include/plat/uncompress.h  |    1 +
 4 files changed, 732 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-am3517_mt_ventoux.c

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index fd9b8c0..45f5dcb 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -237,6 +237,12 @@ config MACH_MCX
 	select OMAP_PACKAGE_CBB
 	select REGULATOR_FIXED_VOLTAGE
 
+config MACH_AM3517_MT_VENTOUX
+	bool "TeeJet MT_VENTOUX (TAM3517 based) board"
+	depends on ARCH_OMAP3
+	select OMAP_PACKAGE_CBB
+	select REGULATOR_FIXED_VOLTAGE
+
 config MACH_NOKIA_N800
        bool
 
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 9405dfc..cbc3a36 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -239,6 +239,7 @@ obj-$(CONFIG_MACH_SBC3530)		+= board-omap3stalker.o
 obj-$(CONFIG_MACH_TI8168EVM)		+= board-ti8168evm.o
 obj-$(CONFIG_MACH_TI8148EVM)		+= board-ti8168evm.o
 obj-$(CONFIG_MACH_MCX)			+= board-mcx.o
+obj-$(CONFIG_MACH_AM3517_MT_VENTOUX)	+= board-am3517_mt_ventoux.o
 
 # Platform specific device init code
 
diff --git a/arch/arm/mach-omap2/board-am3517_mt_ventoux.c b/arch/arm/mach-omap2/board-am3517_mt_ventoux.c
new file mode 100644
index 0000000..4b6bd33
--- /dev/null
+++ b/arch/arm/mach-omap2/board-am3517_mt_ventoux.c
@@ -0,0 +1,724 @@
+/*
+ * Copyright (C) 2011 Ilya Yanok, Emcraft Systems
+ *
+ * Modified from mach-omap2/board-mcx.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/gpio.h>
+#include <linux/mtd/partitions.h>
+#include <linux/mtd/nand.h>
+#include <linux/mtd/plat-ram.h>
+#include <linux/mmc/host.h>
+#include <linux/regulator/fixed.h>
+#include <linux/regulator/machine.h>
+#include <linux/spi/ads7846.h>
+#include <linux/spi/spi.h>
+#include <linux/can/platform/ti_hecc.h>
+
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+
+#include <plat/common.h>
+#include <plat/mcspi.h>
+#include <video/omapdss.h>
+#include <video/omap-panel-generic-dpi.h>
+#include <plat/usb.h>
+
+#include <mach/am35xx.h>
+
+#include "am35xx-emac.h"
+#include "mux.h"
+#include "control.h"
+#include "hsmmc.h"
+#include "common-board-devices.h"
+#include "common.h"
+
+/* FPGA */
+static struct platdata_mtd_ram mt_ventoux_fpga_data = {
+	.bankwidth = 2,
+};
+
+#define FPGA_BASE_ADDR		0x20000000
+static struct resource mt_ventoux_fpga_resource = {
+	.start = FPGA_BASE_ADDR,
+	.end   = FPGA_BASE_ADDR + SZ_128M - 1,
+	.flags = IORESOURCE_MEM,
+};
+
+static struct platform_device mt_ventoux_fpga_device = {
+	.name = "mtd-ram",
+	.id = 0,
+	.dev = {
+		.platform_data = &mt_ventoux_fpga_data,
+	},
+	.num_resources = 1,
+	.resource = &mt_ventoux_fpga_resource,
+};
+
+#define MCX_MDIO_FREQUENCY	(1000000)
+
+static struct mtd_partition mt_ventoux_nand_partitions[] = {
+	/* All the partition sizes are listed in terms of NAND block size */
+	{
+		.name		= "X-Loader",
+		.offset		= 0,
+		.size		= 4 * NAND_BLOCK_SIZE,
+		.mask_flags	= MTD_WRITEABLE,	/* force read-only */
+	},
+	{
+		.name		= "U-Boot",
+		.offset		= MTDPART_OFS_APPEND,	/* Offset = 0x80000 */
+		.size		= 15 * NAND_BLOCK_SIZE,
+		.mask_flags	= MTD_WRITEABLE,	/* force read-only */
+	},
+	{
+		.name		= "U-Boot Env",
+		.offset		= MTDPART_OFS_APPEND,	/* Offset = 0x260000 */
+		.size		= 1 * NAND_BLOCK_SIZE,
+	},
+	{
+		.name		= "Kernel",
+		.offset		= MTDPART_OFS_APPEND,	/* Offset = 0x280000 */
+		.size		= 32 * NAND_BLOCK_SIZE,
+	},
+	{
+		.name		= "File System",
+		.offset		= MTDPART_OFS_APPEND,	/* Offset = 0x680000 */
+		.size		= MTDPART_SIZ_FULL,
+	},
+};
+
+#define PANEL_PWR_PIN		138
+#define LCD_PANEL_PON_PIN	139
+#define DVI_PON_PIN		24
+
+static int lcd_enabled;
+static int dvi_enabled;
+
+static int mt_ventoux_panel_enable_lcd(struct omap_dss_device *dssdev)
+{
+	if (dvi_enabled) {
+		pr_err("cannot enable LCD, DVI is enabled\n");
+		return -EINVAL;
+	}
+
+	gpio_set_value(LCD_PANEL_PON_PIN, 1);
+	gpio_set_value(PANEL_PWR_PIN, 0);
+	lcd_enabled = 1;
+
+	return 0;
+}
+
+static void mt_ventoux_panel_disable_lcd(struct omap_dss_device *dssdev)
+{
+	gpio_set_value(PANEL_PWR_PIN, 1);
+	gpio_set_value(LCD_PANEL_PON_PIN, 0);
+	lcd_enabled = 0;
+}
+
+static struct panel_generic_dpi_data lcd_panel = {
+	.name			= "ortustech_com43h4m10xtc",
+	.platform_enable	= mt_ventoux_panel_enable_lcd,
+	.platform_disable	= mt_ventoux_panel_disable_lcd,
+};
+
+static struct omap_dss_device mt_ventoux_lcd_device = {
+	.type			= OMAP_DISPLAY_TYPE_DPI,
+	.name			= "lcd",
+	.driver_name		= "generic_dpi_panel",
+	.data			= &lcd_panel,
+	.phy.dpi.data_lines	= 24,
+};
+
+/*
+ * TV Output
+ */
+
+static int mt_ventoux_panel_enable_tv(struct omap_dss_device *dssdev)
+{
+	return 0;
+}
+
+static void mt_ventoux_panel_disable_tv(struct omap_dss_device *dssdev)
+{
+}
+
+static struct omap_dss_device mt_ventoux_tv_device = {
+	.type			= OMAP_DISPLAY_TYPE_VENC,
+	.name			= "tv",
+	.driver_name		= "venc",
+	.phy.venc.type		= OMAP_DSS_VENC_TYPE_SVIDEO,
+	.platform_enable	= mt_ventoux_panel_enable_tv,
+	.platform_disable	= mt_ventoux_panel_disable_tv,
+};
+
+/*
+ * DVI/HDMI Output
+ */
+
+static int mt_ventoux_panel_enable_dvi(struct omap_dss_device *dssdev)
+{
+	if (lcd_enabled) {
+		pr_err("cannot enable DVI, LCD is enabled\n");
+		return -EINVAL;
+	}
+	dvi_enabled = 1;
+	gpio_set_value(DVI_PON_PIN, 1);
+	return 0;
+}
+
+static void mt_ventoux_panel_disable_dvi(struct omap_dss_device *dssdev)
+{
+	dvi_enabled = 0;
+	gpio_set_value(DVI_PON_PIN, 0);
+}
+
+static struct panel_generic_dpi_data dvi_panel = {
+	.platform_enable	= mt_ventoux_panel_enable_dvi,
+	.platform_disable	= mt_ventoux_panel_disable_dvi,
+};
+static struct omap_dss_device mt_ventoux_dvi_device = {
+	.type			= OMAP_DISPLAY_TYPE_DPI,
+	.name			= "dvi",
+	.driver_name		= "dvi",
+	.data			= &dvi_panel,
+	.phy.dpi.data_lines	= 24,
+};
+
+static struct omap_dss_device *mt_ventoux_dss_devices[] = {
+	&mt_ventoux_lcd_device,
+	&mt_ventoux_tv_device,
+	&mt_ventoux_dvi_device,
+};
+
+static struct omap_dss_board_info mt_ventoux_dss_data = {
+	.num_devices	= ARRAY_SIZE(mt_ventoux_dss_devices),
+	.devices	= mt_ventoux_dss_devices,
+	.default_device	= &mt_ventoux_lcd_device,
+};
+
+/*
+ * use fake regulator for vdds_dsi as we can't find this pin inside
+ * AM3517 datasheet.
+ */
+static struct regulator_consumer_supply mt_ventoux_vdds_dsi_supply[] = {
+	REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
+	REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"),
+};
+
+static struct regulator_init_data mt_ventoux_vdds_dsi = {
+	.constraints		= {
+		.valid_modes_mask	= REGULATOR_MODE_NORMAL,
+		.always_on		= 1,
+	},
+	.num_consumer_supplies	= ARRAY_SIZE(mt_ventoux_vdds_dsi_supply),
+	.consumer_supplies	= mt_ventoux_vdds_dsi_supply,
+};
+
+static struct fixed_voltage_config mt_ventoux_display = {
+	.supply_name		= "display",
+	.microvolts		= 1800000,
+	.gpio			= -EINVAL,
+	.enabled_at_boot	= 1,
+	.init_data		= &mt_ventoux_vdds_dsi,
+};
+
+static struct platform_device mt_ventoux_display_device = {
+	.name		= "reg-fixed-voltage",
+	.id		= 0,
+	.dev = {
+		.platform_data	= &mt_ventoux_display,
+	},
+};
+
+static struct gpio mt_ventoux_dss_gpios[] __initdata = {
+	{ PANEL_PWR_PIN, GPIOF_OUT_INIT_HIGH, "panel_pwr"		},
+	{ LCD_PANEL_PON_PIN, GPIOF_OUT_INIT_LOW, "lcd_power_pon"	},
+	{ DVI_PON_PIN, GPIOF_OUT_INIT_LOW, "dvi_pon"			},
+};
+
+static void __init mt_ventoux_display_init(void)
+{
+	int r;
+
+	omap_mux_init_gpio(PANEL_PWR_PIN, OMAP_PIN_OUTPUT);
+	omap_mux_init_gpio(LCD_PANEL_PON_PIN, OMAP_PIN_OUTPUT);
+	omap_mux_init_gpio(DVI_PON_PIN, OMAP_PIN_OUTPUT);
+
+	r = gpio_request_array(mt_ventoux_dss_gpios,
+			ARRAY_SIZE(mt_ventoux_dss_gpios));
+	if (r) {
+		pr_err("failed to get DSS control GPIOs\n");
+		return;
+	}
+
+	r = omap_display_init(&mt_ventoux_dss_data);
+	if (r) {
+		pr_err("Failed to register DSS device\n");
+		gpio_free_array(mt_ventoux_dss_gpios,
+				ARRAY_SIZE(mt_ventoux_dss_gpios));
+	}
+}
+
+/* TPS65023 specific initialization */
+/* VDCDC1 -> VDD_CORE */
+static struct regulator_consumer_supply am3517_vdcdc1_supplies[] = {
+	{
+		.supply = "vdd_core",
+	},
+};
+
+/* VDCDC2 -> VDDSHV */
+static struct regulator_consumer_supply am3517_vdcdc2_supplies[] = {
+	{
+		.supply = "vddshv",
+	},
+};
+
+/*
+ * VDCDC2 |-> VDDS
+ *	  |-> VDDS_SRAM_CORE_BG
+ *	  |-> VDDS_SRAM_MPU
+ */
+static struct regulator_consumer_supply am3517_vdcdc3_supplies[] = {
+	{
+		.supply = "vdds",
+	},
+	{
+		.supply = "vdds_sram_core_bg",
+	},
+	{
+		.supply = "vdds_sram_mpu",
+	},
+};
+
+/*
+ * LDO1 |-> VDDA1P8V_USBPHY
+ *	|-> VDDA_DAC
+ */
+static struct regulator_consumer_supply am3517_ldo1_supplies[] = {
+	{
+		.supply = "vdda1p8v_usbphy",
+	},
+	{
+		.supply = "vdda_dac",
+	},
+};
+
+/* LDO2 -> VDDA3P3V_USBPHY */
+static struct regulator_consumer_supply am3517_ldo2_supplies[] = {
+	{
+		.supply = "vdda3p3v_usbphy",
+	},
+};
+
+static struct regulator_init_data mt_ventoux_regulator_data[] = {
+	/* DCDC1 */
+	{
+		.constraints = {
+			.min_uV = 1200000,
+			.max_uV = 1200000,
+			.valid_modes_mask = REGULATOR_MODE_NORMAL,
+			.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+			.always_on = true,
+			.apply_uV = false,
+		},
+		.num_consumer_supplies = ARRAY_SIZE(am3517_vdcdc1_supplies),
+		.consumer_supplies = am3517_vdcdc1_supplies,
+	},
+	/* DCDC2 */
+	{
+		.constraints = {
+			.min_uV = 3300000,
+			.max_uV = 3300000,
+			.valid_modes_mask = REGULATOR_MODE_NORMAL,
+			.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+			.always_on = true,
+			.apply_uV = false,
+		},
+		.num_consumer_supplies = ARRAY_SIZE(am3517_vdcdc2_supplies),
+		.consumer_supplies = am3517_vdcdc2_supplies,
+	},
+	/* DCDC3 */
+	{
+		.constraints = {
+			.min_uV = 1800000,
+			.max_uV = 1800000,
+			.valid_modes_mask = REGULATOR_MODE_NORMAL,
+			.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+			.always_on = true,
+			.apply_uV = false,
+		},
+		.num_consumer_supplies = ARRAY_SIZE(am3517_vdcdc3_supplies),
+		.consumer_supplies = am3517_vdcdc3_supplies,
+	},
+	/* LDO1 */
+	{
+		.constraints = {
+			.min_uV = 1800000,
+			.max_uV = 1800000,
+			.valid_modes_mask = REGULATOR_MODE_NORMAL,
+			.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+			.always_on = false,
+			.apply_uV = false,
+		},
+		.num_consumer_supplies = ARRAY_SIZE(am3517_ldo1_supplies),
+		.consumer_supplies = am3517_ldo1_supplies,
+	},
+	/* LDO2 */
+	{
+		.constraints = {
+			.min_uV = 3300000,
+			.max_uV = 3300000,
+			.valid_modes_mask = REGULATOR_MODE_NORMAL,
+			.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+			.always_on = false,
+			.apply_uV = false,
+		},
+		.num_consumer_supplies = ARRAY_SIZE(am3517_ldo2_supplies),
+		.consumer_supplies = am3517_ldo2_supplies,
+	},
+};
+
+static struct i2c_board_info __initdata mt_ventoux_i2c1_devices[] = {
+	{
+		I2C_BOARD_INFO("tps65023", 0x48),
+		.flags = I2C_CLIENT_WAKE,
+		.platform_data = &mt_ventoux_regulator_data[0],
+	},
+	{
+		I2C_BOARD_INFO("24c02", 0x50),
+	},
+};
+
+static struct i2c_board_info __initdata mt_ventoux_i2c2_devices[] = {
+	{
+		I2C_BOARD_INFO("24c02", 0x50),
+	},
+};
+
+static struct i2c_board_info __initdata mt_ventoux_i2c3_devices[] = {
+	{
+		I2C_BOARD_INFO("ds1307", 0x68),
+	},
+};
+
+static void __init mt_ventoux_i2c_init(void)
+{
+	omap_register_i2c_bus(1, 400, mt_ventoux_i2c1_devices,
+			ARRAY_SIZE(mt_ventoux_i2c1_devices));
+	omap_register_i2c_bus(2, 400, mt_ventoux_i2c2_devices,
+			ARRAY_SIZE(mt_ventoux_i2c2_devices));
+	omap_register_i2c_bus(3, 400, mt_ventoux_i2c3_devices,
+			ARRAY_SIZE(mt_ventoux_i2c3_devices));
+}
+
+#if defined(CONFIG_TOUCHSCREEN_ADS7846) || \
+	defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
+/*
+ * use fake regulator for tsc2046 vcc
+ */
+static struct regulator_consumer_supply mt_ventoux_tsc2046_vcc_supply[] = {
+	REGULATOR_SUPPLY("vcc", "spi1.0"),
+};
+
+static struct regulator_init_data mt_ventoux_tsc2046_vcc = {
+	.constraints		= {
+		.valid_modes_mask	= REGULATOR_MODE_NORMAL,
+		.always_on		= 1,
+	},
+	.num_consumer_supplies	= ARRAY_SIZE(mt_ventoux_tsc2046_vcc_supply),
+	.consumer_supplies	= mt_ventoux_tsc2046_vcc_supply,
+};
+
+static struct fixed_voltage_config mt_ventoux_ts = {
+	.supply_name		= "touchscreen",
+	.microvolts		= 3300000,
+	.gpio			= -EINVAL,
+	.enabled_at_boot	= 1,
+	.init_data		= &mt_ventoux_tsc2046_vcc,
+};
+
+static struct platform_device mt_ventoux_ts_device = {
+	.name		= "reg-fixed-voltage",
+	.id		= 1,
+	.dev = {
+		.platform_data	= &mt_ventoux_ts,
+	},
+};
+
+static struct ads7846_platform_data tsc2046_config __initdata = {
+	.x_max			= 0x0fff,
+	.y_max			= 0x0fff,
+	.x_plate_ohms		= 180,
+	.pressure_max		= 255,
+	.debounce_max		= 30,
+	.debounce_tol		= 10,
+	.debounce_rep		= 1,
+	.keep_vref_on		= 1,
+	.settle_delay_usecs	= 100,
+};
+
+#define TS_IRQ_PIN	163
+
+static inline void tsc2046_init(void)
+{
+	omap_mux_init_gpio(TS_IRQ_PIN, OMAP_PIN_INPUT);
+	omap_ads7846_init(1, TS_IRQ_PIN, 310, &tsc2046_config);
+}
+#else
+static inline void tsc2046_init(void)
+{
+}
+#endif
+
+#define USB_PHY1_RESET		25
+
+static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
+
+	.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
+	.port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
+	.port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
+
+	.phy_reset  = true,
+	.reset_gpio_port[0]  = USB_PHY1_RESET,
+	.reset_gpio_port[1]  = -EINVAL,
+	.reset_gpio_port[2]  = -EINVAL
+};
+
+#define SD_CARD_CD		126
+
+static struct omap2_hsmmc_info mmc[] = {
+	{
+		.mmc		= 1,
+		.caps		= MMC_CAP_4_BIT_DATA,
+		.gpio_cd        = SD_CARD_CD,
+		.gpio_wp        = -EINVAL,
+	},
+	{}      /* Terminator */
+};
+
+#if defined(CONFIG_SENSORS_ADCXX) || defined(CONFIG_SENSORS_ADCXX_MODULE)
+static struct omap2_mcspi_device_config adc128s_mcspi_config = {
+	.turbo_mode	= 0,
+};
+
+static struct spi_board_info adc128s_spi_board_info __initdata = {
+	.modalias		= "adcxx8s",
+	.bus_num		= 2,
+	.chip_select		= 1,
+	.max_speed_hz		= 1600000,
+	.controller_data	= &adc128s_mcspi_config,
+	.irq			= -EINVAL,
+};
+
+static inline void adc128s_init(void)
+{
+	spi_register_board_info(&adc128s_spi_board_info, 1);
+}
+#else
+static inline void adc128s_init(void)
+{
+}
+#endif
+
+#ifdef CONFIG_OMAP_MUX
+static struct omap_board_mux board_mux[] __initdata = {
+	OMAP3_MUX(CHASSIS_DMAREQ3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN),
+	OMAP3_MUX(MCBSP_CLKS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP),
+	OMAP3_MUX(GPMC_NCS4, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLDOWN),
+	{ .reg_offset = OMAP_MUX_TERMINATOR },
+};
+
+/*
+ * Default mux settings except for uart3_cts_rctx pin which we want to
+ * use as touchscreen IRQ GPIO.
+ */
+static struct omap_device_pad uart1_pads[] __initdata = {
+	{
+		.name	= "uart1_cts.uart1_cts",
+		.enable	= OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0,
+	},
+	{
+		.name	= "uart1_rts.uart1_rts",
+		.enable	= OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
+	},
+	{
+		.name	= "uart1_tx.uart1_tx",
+		.enable	= OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
+	},
+	{
+		.name	= "uart1_rx.uart1_rx",
+		.flags	= OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.enable	= OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0,
+		.idle	= OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0,
+	},
+};
+
+static struct omap_device_pad uart2_pads[] __initdata = {
+	{
+		.name	= "uart2_cts.uart2_cts",
+		.enable	= OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0,
+	},
+	{
+		.name	= "uart2_rts.uart2_rts",
+		.enable	= OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
+	},
+	{
+		.name	= "uart2_tx.uart2_tx",
+		.enable	= OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
+	},
+	{
+		.name	= "uart2_rx.uart2_rx",
+		.flags	= OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.enable	= OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0,
+		.idle	= OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0,
+	},
+};
+
+static struct omap_device_pad uart3_pads[] __initdata = {
+	{
+		.name	= "uart3_rts_sd.uart3_rts_sd",
+		.enable	= OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
+	},
+	{
+		.name	= "uart3_tx_irtx.uart3_tx_irtx",
+		.enable	= OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
+	},
+	{
+		.name	= "uart3_rx_irrx.uart3_rx_irrx",
+		.flags	= OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
+		.enable	= OMAP_PIN_INPUT | OMAP_MUX_MODE0,
+		.idle	= OMAP_PIN_INPUT | OMAP_MUX_MODE0,
+	},
+};
+
+static inline void mt_ventoux_serial_init(void)
+{
+	struct omap_board_data bdata;
+
+	bdata.flags = 0;
+
+	bdata.id = 0;
+	bdata.pads = uart1_pads;
+	bdata.pads_cnt = ARRAY_SIZE(uart1_pads);
+	omap_serial_init_port(&bdata, NULL);
+
+	bdata.id = 1;
+	bdata.pads = uart2_pads;
+	bdata.pads_cnt = ARRAY_SIZE(uart2_pads);
+	omap_serial_init_port(&bdata, NULL);
+
+	bdata.id = 2;
+	bdata.pads = uart3_pads;
+	bdata.pads_cnt = ARRAY_SIZE(uart3_pads);
+	omap_serial_init_port(&bdata, NULL);
+
+	bdata.id = 3;
+	bdata.pads = NULL;
+	bdata.pads_cnt = 0;
+	omap_serial_init_port(&bdata, NULL);
+}
+#else
+static inline void mt_ventoux_serial_init(void)
+{
+	omap_serial_init();
+}
+#endif
+
+static struct resource am3517_hecc_resources[] = {
+	{
+		.start	= AM35XX_IPSS_HECC_BASE,
+		.end	= AM35XX_IPSS_HECC_BASE + 0x3FFF,
+		.flags	= IORESOURCE_MEM,
+	},
+	{
+		.start	= INT_35XX_HECC0_IRQ,
+		.end	= INT_35XX_HECC0_IRQ,
+		.flags	= IORESOURCE_IRQ,
+	},
+};
+
+static struct ti_hecc_platform_data am3517_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 am3517_hecc_device = {
+	.name		= "ti_hecc",
+	.id		= -1,
+	.num_resources	= ARRAY_SIZE(am3517_hecc_resources),
+	.resource	= am3517_hecc_resources,
+	.dev		= {
+		.platform_data = &am3517_hecc_pdata,
+	},
+};
+
+static struct platform_device *mt_ventoux_devices[] __initdata = {
+	&mt_ventoux_display_device,
+#if defined(CONFIG_TOUCHSCREEN_ADS7846) || \
+	defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
+	&mt_ventoux_ts_device,
+#endif
+	&mt_ventoux_fpga_device,
+	&am3517_hecc_device,
+};
+
+static void __init mt_ventoux_init(void)
+{
+	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
+	mt_ventoux_i2c_init();
+	platform_add_devices(mt_ventoux_devices,
+			ARRAY_SIZE(mt_ventoux_devices));
+	mt_ventoux_serial_init();
+	omap_sdrc_init(NULL, NULL);
+
+	mt_ventoux_display_init();
+
+	/* Configure EHCI ports */
+	omap_mux_init_gpio(USB_PHY1_RESET, OMAP_PIN_OUTPUT);
+	usbhs_init(&usbhs_bdata);
+
+	/* NAND */
+	omap_nand_flash_init(NAND_BUSWIDTH_16, mt_ventoux_nand_partitions,
+			     ARRAY_SIZE(mt_ventoux_nand_partitions));
+
+	/* touchscreen */
+	tsc2046_init();
+
+	/* Ethernet */
+	am35xx_ethernet_init(MCX_MDIO_FREQUENCY, 1);
+
+	/* MMC init */
+	omap_mux_init_gpio(SD_CARD_CD, OMAP_PIN_INPUT);
+	omap2_hsmmc_init(mmc);
+
+	/* ADC128S022 init */
+	adc128s_init();
+}
+
+static const char *mt_ventoux_dt_match[] __initdata = {
+	"teejet,mt_ventoux",
+	NULL
+};
+
+MACHINE_START(AM3517_MT_VENTOUX, "TeeJet Mt.Ventoux")
+	/* Maintainer: Ilya Yanok */
+	.atag_offset	= 0x100,
+	.reserve	= omap_reserve,
+	.map_io		= omap3_map_io,
+	.init_early	= am35xx_init_early,
+	.init_irq	= omap3_init_irq,
+	.handle_irq	= omap3_intc_handle_irq,
+	.init_machine	= mt_ventoux_init,
+	.timer		= &omap3_timer,
+	.dt_compat	= mt_ventoux_dt_match,
+MACHINE_END
diff --git a/arch/arm/plat-omap/include/plat/uncompress.h b/arch/arm/plat-omap/include/plat/uncompress.h
index 1141364..021cb0d 100644
--- a/arch/arm/plat-omap/include/plat/uncompress.h
+++ b/arch/arm/plat-omap/include/plat/uncompress.h
@@ -145,6 +145,7 @@ static inline void __arch_decomp_setup(unsigned long arch_id)
 		DEBUG_LL_OMAP2(3, nokia_n810_wimax);
 
 		/* omap3 based boards using UART1 */
+		DEBUG_LL_OMAP3(1, am3517_mt_ventoux);
 		DEBUG_LL_OMAP2(1, omap3evm);
 		DEBUG_LL_OMAP3(1, omap_3430sdp);
 		DEBUG_LL_OMAP3(1, omap_3630sdp);
-- 
1.7.6.4

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Re: [PATCH 2/2] mt_ventoux: support for TeeJet Mt.Ventoux board
  2011-12-27 23:02       ` Ilya Yanok
@ 2012-01-03  9:48         ` Igor Grinberg
  -1 siblings, 0 replies; 24+ messages in thread
From: Igor Grinberg @ 2012-01-03  9:48 UTC (permalink / raw)
  To: Ilya Yanok; +Cc: linux-arm-kernel, linux-omap, devicetree-discuss, sasha_d

Hi Ilya,

On 12/28/11 01:02, Ilya Yanok wrote:
> On 27.12.2011 11:56, Igor Grinberg wrote:
>>> +/*
>>> + * use fake regulator for vdds_dsi as we can't find this pin inside
>>> + * AM3517 datasheet.
>>> + */
>>> +static struct regulator_consumer_supply mt_ventoux_vdds_dsi_supply[] = {
>>> +	REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
>>> +	REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"),
>>> +};
>>
>> Although the TRM states that there is a vdds_dsi signal,
>> it looks, from the datasheet, that VDDSHV is used to power the DSS.
>> Either way, it can't be switched off, I think...
>> Therefore, depending on your board wiring, you can leave it as fixed
>> regulator or bind to a supply on TPS65023.
> 
> I will forward this info to hardware guys and ask about wiring. For now
> I will leave it as is. Thanks for this information it turned to be some
> kind of mystery. It would be great if you could give some pointer to the
> datasheet regarding VDDSHV and DSS.

Well, there is no direct pointer to that information, but
I've found these facts:
1) the "Ball Characteristics" tables state that the DSS related pins
   (and also many others) are powered by the VDDSHV.
2) the estimated power consumption of VDDSHV is the largest after the
   VDD_CORE, which is typical for DSS, but it is also one of the largest
   power domains, so I guess this cannot be a valid argument ;-)
3) On the "Voltage domains" diagram, only the VDD_CORE is exposed and
   DSS is not listed in it, but there are other domains which are not
   exposed... (this only can exclude the DSS from VDD_CORE, but not
   absolutely, as datasheets can have mistakes or just not give that piece
   of information).

Still, it is a guess and not verified information.

[...]

-- 
Regards,
Igor.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 2/2] mt_ventoux: support for TeeJet Mt.Ventoux board
@ 2012-01-03  9:48         ` Igor Grinberg
  0 siblings, 0 replies; 24+ messages in thread
From: Igor Grinberg @ 2012-01-03  9:48 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Ilya,

On 12/28/11 01:02, Ilya Yanok wrote:
> On 27.12.2011 11:56, Igor Grinberg wrote:
>>> +/*
>>> + * use fake regulator for vdds_dsi as we can't find this pin inside
>>> + * AM3517 datasheet.
>>> + */
>>> +static struct regulator_consumer_supply mt_ventoux_vdds_dsi_supply[] = {
>>> +	REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
>>> +	REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"),
>>> +};
>>
>> Although the TRM states that there is a vdds_dsi signal,
>> it looks, from the datasheet, that VDDSHV is used to power the DSS.
>> Either way, it can't be switched off, I think...
>> Therefore, depending on your board wiring, you can leave it as fixed
>> regulator or bind to a supply on TPS65023.
> 
> I will forward this info to hardware guys and ask about wiring. For now
> I will leave it as is. Thanks for this information it turned to be some
> kind of mystery. It would be great if you could give some pointer to the
> datasheet regarding VDDSHV and DSS.

Well, there is no direct pointer to that information, but
I've found these facts:
1) the "Ball Characteristics" tables state that the DSS related pins
   (and also many others) are powered by the VDDSHV.
2) the estimated power consumption of VDDSHV is the largest after the
   VDD_CORE, which is typical for DSS, but it is also one of the largest
   power domains, so I guess this cannot be a valid argument ;-)
3) On the "Voltage domains" diagram, only the VDD_CORE is exposed and
   DSS is not listed in it, but there are other domains which are not
   exposed... (this only can exclude the DSS from VDD_CORE, but not
   absolutely, as datasheets can have mistakes or just not give that piece
   of information).

Still, it is a guess and not verified information.

[...]

-- 
Regards,
Igor.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 1/2] mt_ventoux: very basic support for TeeJet Mt.Ventoux board
  2011-12-26 23:08   ` Ilya Yanok
@ 2012-01-04 19:54     ` Grant Likely
  -1 siblings, 0 replies; 24+ messages in thread
From: Grant Likely @ 2012-01-04 19:54 UTC (permalink / raw)
  To: Ilya Yanok; +Cc: linux-arm-kernel, linux-omap, devicetree-discuss, sasha_d

On Tue, Dec 27, 2011 at 12:08:31AM +0100, Ilya Yanok wrote:
> Very basic support for TeeJet Mt.Ventoux board. Able to boot via
> board-generic and ramdisk/initramfs, however most of peripherals are
> not supported. Produces tons of twl4030 related errors as this board
> doesn't have twl4030 installed.
> 
> Signed-off-by: Ilya Yanok <yanok@emcraft.com>

Comment below, but otherwise:

Acked-by: Grant Likely <grant.likely@secretlab.ca>

> ---
>  arch/arm/boot/dts/am3517_mt_ventoux.dts |   27 +++++++++++++++++++++++++++
>  1 files changed, 27 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/boot/dts/am3517_mt_ventoux.dts
> 
> diff --git a/arch/arm/boot/dts/am3517_mt_ventoux.dts b/arch/arm/boot/dts/am3517_mt_ventoux.dts
> new file mode 100644
> index 0000000..5eb26d7
> --- /dev/null
> +++ b/arch/arm/boot/dts/am3517_mt_ventoux.dts
> @@ -0,0 +1,27 @@
> +/*
> + * Copyright (C) 2011 Ilya Yanok, EmCraft Systems
> + *
> + * 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.
> + */
> +/dts-v1/;
> +
> +/include/ "omap3.dtsi"
> +
> +/ {
> +	model = "TeeJet Mt.Ventoux";
> +	compatible = "teejet,mt_ventoux", "ti,omap3";
> +
> +	memory {
> +		device_type = "memory";
> +		reg = <0x80000000 0x10000000>; /* 256 MB */
> +	};
> +
> +	/* AM35xx doesn't have IVA */

Perhaps the AM35xx should have a separate .dtsi file?

> +	soc {
> +		iva {
> +			status = "disabled";
> +		};
> +	};
> +};
> -- 
> 1.7.6.4
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 1/2] mt_ventoux: very basic support for TeeJet Mt.Ventoux board
@ 2012-01-04 19:54     ` Grant Likely
  0 siblings, 0 replies; 24+ messages in thread
From: Grant Likely @ 2012-01-04 19:54 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Dec 27, 2011 at 12:08:31AM +0100, Ilya Yanok wrote:
> Very basic support for TeeJet Mt.Ventoux board. Able to boot via
> board-generic and ramdisk/initramfs, however most of peripherals are
> not supported. Produces tons of twl4030 related errors as this board
> doesn't have twl4030 installed.
> 
> Signed-off-by: Ilya Yanok <yanok@emcraft.com>

Comment below, but otherwise:

Acked-by: Grant Likely <grant.likely@secretlab.ca>

> ---
>  arch/arm/boot/dts/am3517_mt_ventoux.dts |   27 +++++++++++++++++++++++++++
>  1 files changed, 27 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/boot/dts/am3517_mt_ventoux.dts
> 
> diff --git a/arch/arm/boot/dts/am3517_mt_ventoux.dts b/arch/arm/boot/dts/am3517_mt_ventoux.dts
> new file mode 100644
> index 0000000..5eb26d7
> --- /dev/null
> +++ b/arch/arm/boot/dts/am3517_mt_ventoux.dts
> @@ -0,0 +1,27 @@
> +/*
> + * Copyright (C) 2011 Ilya Yanok, EmCraft Systems
> + *
> + * 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.
> + */
> +/dts-v1/;
> +
> +/include/ "omap3.dtsi"
> +
> +/ {
> +	model = "TeeJet Mt.Ventoux";
> +	compatible = "teejet,mt_ventoux", "ti,omap3";
> +
> +	memory {
> +		device_type = "memory";
> +		reg = <0x80000000 0x10000000>; /* 256 MB */
> +	};
> +
> +	/* AM35xx doesn't have IVA */

Perhaps the AM35xx should have a separate .dtsi file?

> +	soc {
> +		iva {
> +			status = "disabled";
> +		};
> +	};
> +};
> -- 
> 1.7.6.4
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 1/2] mt_ventoux: very basic support for TeeJet Mt.Ventoux board
  2012-01-04 19:54     ` Grant Likely
@ 2012-01-05  8:40       ` Igor Grinberg
  -1 siblings, 0 replies; 24+ messages in thread
From: Igor Grinberg @ 2012-01-05  8:40 UTC (permalink / raw)
  To: Grant Likely
  Cc: Ilya Yanok, linux-arm-kernel, linux-omap, devicetree-discuss, sasha_d

Hi Grant,

On 01/04/12 21:54, Grant Likely wrote:
> On Tue, Dec 27, 2011 at 12:08:31AM +0100, Ilya Yanok wrote:
>> Very basic support for TeeJet Mt.Ventoux board. Able to boot via
>> board-generic and ramdisk/initramfs, however most of peripherals are
>> not supported. Produces tons of twl4030 related errors as this board
>> doesn't have twl4030 installed.
>>
>> Signed-off-by: Ilya Yanok <yanok@emcraft.com>
> 
> Comment below, but otherwise:
> 
> Acked-by: Grant Likely <grant.likely@secretlab.ca>

Though nothing fundamentally different in regard to DT, but
there is a v3 of this patch set available at [1]

> 
>> ---
>>  arch/arm/boot/dts/am3517_mt_ventoux.dts |   27 +++++++++++++++++++++++++++
>>  1 files changed, 27 insertions(+), 0 deletions(-)
>>  create mode 100644 arch/arm/boot/dts/am3517_mt_ventoux.dts
>>
>> diff --git a/arch/arm/boot/dts/am3517_mt_ventoux.dts b/arch/arm/boot/dts/am3517_mt_ventoux.dts
>> new file mode 100644
>> index 0000000..5eb26d7
>> --- /dev/null
>> +++ b/arch/arm/boot/dts/am3517_mt_ventoux.dts
>> @@ -0,0 +1,27 @@
>> +/*
>> + * Copyright (C) 2011 Ilya Yanok, EmCraft Systems
>> + *
>> + * 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.
>> + */
>> +/dts-v1/;
>> +
>> +/include/ "omap3.dtsi"
>> +
>> +/ {
>> +	model = "TeeJet Mt.Ventoux";
>> +	compatible = "teejet,mt_ventoux", "ti,omap3";
>> +
>> +	memory {
>> +		device_type = "memory";
>> +		reg = <0x80000000 0x10000000>; /* 256 MB */
>> +	};
>> +
>> +	/* AM35xx doesn't have IVA */
> 
> Perhaps the AM35xx should have a separate .dtsi file?

In that case there is a possibility you will get multiple
<SoC>.dtsi files with the same copy/pasted "disable" stuff.
Of course this is better than having multiple board files doing this.

What do you think on splitting the whole thing into <IP>.dtsi files,
Like I have explained here [2]?

> 
>> +	soc {
>> +		iva {
>> +			status = "disabled";
>> +		};
>> +	};
>> +};

[1] http://www.spinics.net/lists/linux-omap/msg62185.html
[2] http://www.spinics.net/lists/linux-omap/msg61975.html


-- 
Regards,
Igor.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 1/2] mt_ventoux: very basic support for TeeJet Mt.Ventoux board
@ 2012-01-05  8:40       ` Igor Grinberg
  0 siblings, 0 replies; 24+ messages in thread
From: Igor Grinberg @ 2012-01-05  8:40 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Grant,

On 01/04/12 21:54, Grant Likely wrote:
> On Tue, Dec 27, 2011 at 12:08:31AM +0100, Ilya Yanok wrote:
>> Very basic support for TeeJet Mt.Ventoux board. Able to boot via
>> board-generic and ramdisk/initramfs, however most of peripherals are
>> not supported. Produces tons of twl4030 related errors as this board
>> doesn't have twl4030 installed.
>>
>> Signed-off-by: Ilya Yanok <yanok@emcraft.com>
> 
> Comment below, but otherwise:
> 
> Acked-by: Grant Likely <grant.likely@secretlab.ca>

Though nothing fundamentally different in regard to DT, but
there is a v3 of this patch set available at [1]

> 
>> ---
>>  arch/arm/boot/dts/am3517_mt_ventoux.dts |   27 +++++++++++++++++++++++++++
>>  1 files changed, 27 insertions(+), 0 deletions(-)
>>  create mode 100644 arch/arm/boot/dts/am3517_mt_ventoux.dts
>>
>> diff --git a/arch/arm/boot/dts/am3517_mt_ventoux.dts b/arch/arm/boot/dts/am3517_mt_ventoux.dts
>> new file mode 100644
>> index 0000000..5eb26d7
>> --- /dev/null
>> +++ b/arch/arm/boot/dts/am3517_mt_ventoux.dts
>> @@ -0,0 +1,27 @@
>> +/*
>> + * Copyright (C) 2011 Ilya Yanok, EmCraft Systems
>> + *
>> + * 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.
>> + */
>> +/dts-v1/;
>> +
>> +/include/ "omap3.dtsi"
>> +
>> +/ {
>> +	model = "TeeJet Mt.Ventoux";
>> +	compatible = "teejet,mt_ventoux", "ti,omap3";
>> +
>> +	memory {
>> +		device_type = "memory";
>> +		reg = <0x80000000 0x10000000>; /* 256 MB */
>> +	};
>> +
>> +	/* AM35xx doesn't have IVA */
> 
> Perhaps the AM35xx should have a separate .dtsi file?

In that case there is a possibility you will get multiple
<SoC>.dtsi files with the same copy/pasted "disable" stuff.
Of course this is better than having multiple board files doing this.

What do you think on splitting the whole thing into <IP>.dtsi files,
Like I have explained here [2]?

> 
>> +	soc {
>> +		iva {
>> +			status = "disabled";
>> +		};
>> +	};
>> +};

[1] http://www.spinics.net/lists/linux-omap/msg62185.html
[2] http://www.spinics.net/lists/linux-omap/msg61975.html


-- 
Regards,
Igor.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 2/2] mt_ventoux: support for TeeJet Mt.Ventoux board
  2012-01-03  9:48         ` Igor Grinberg
@ 2012-01-11 20:04           ` Ilya Yanok
  -1 siblings, 0 replies; 24+ messages in thread
From: Ilya Yanok @ 2012-01-11 20:04 UTC (permalink / raw)
  To: Igor Grinberg; +Cc: linux-arm-kernel, linux-omap, devicetree-discuss, sasha_d

Hi Igor,

On 03.01.2012 13:48, Igor Grinberg wrote:
>> I will forward this info to hardware guys and ask about wiring. For now
>> I will leave it as is. Thanks for this information it turned to be some
>> kind of mystery. It would be great if you could give some pointer to the
>> datasheet regarding VDDSHV and DSS.
> 
> Well, there is no direct pointer to that information, but
> I've found these facts:
> 1) the "Ball Characteristics" tables state that the DSS related pins
>    (and also many others) are powered by the VDDSHV.
> 2) the estimated power consumption of VDDSHV is the largest after the
>    VDD_CORE, which is typical for DSS, but it is also one of the largest
>    power domains, so I guess this cannot be a valid argument ;-)
> 3) On the "Voltage domains" diagram, only the VDD_CORE is exposed and
>    DSS is not listed in it, but there are other domains which are not
>    exposed... (this only can exclude the DSS from VDD_CORE, but not
>    absolutely, as datasheets can have mistakes or just not give that piece
>    of information).
> 
> Still, it is a guess and not verified information.

Yes, I understand. Thanks for sharing you thoughts!

Regards, Ilya.


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 2/2] mt_ventoux: support for TeeJet Mt.Ventoux board
@ 2012-01-11 20:04           ` Ilya Yanok
  0 siblings, 0 replies; 24+ messages in thread
From: Ilya Yanok @ 2012-01-11 20:04 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Igor,

On 03.01.2012 13:48, Igor Grinberg wrote:
>> I will forward this info to hardware guys and ask about wiring. For now
>> I will leave it as is. Thanks for this information it turned to be some
>> kind of mystery. It would be great if you could give some pointer to the
>> datasheet regarding VDDSHV and DSS.
> 
> Well, there is no direct pointer to that information, but
> I've found these facts:
> 1) the "Ball Characteristics" tables state that the DSS related pins
>    (and also many others) are powered by the VDDSHV.
> 2) the estimated power consumption of VDDSHV is the largest after the
>    VDD_CORE, which is typical for DSS, but it is also one of the largest
>    power domains, so I guess this cannot be a valid argument ;-)
> 3) On the "Voltage domains" diagram, only the VDD_CORE is exposed and
>    DSS is not listed in it, but there are other domains which are not
>    exposed... (this only can exclude the DSS from VDD_CORE, but not
>    absolutely, as datasheets can have mistakes or just not give that piece
>    of information).
> 
> Still, it is a guess and not verified information.

Yes, I understand. Thanks for sharing you thoughts!

Regards, Ilya.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH V2] mt_ventoux: support for TeeJet Mt.Ventoux board
  2011-12-27 23:09     ` Ilya Yanok
@ 2012-02-01 10:51       ` Stefano Babic
  -1 siblings, 0 replies; 24+ messages in thread
From: Stefano Babic @ 2012-02-01 10:51 UTC (permalink / raw)
  To: tony
  Cc: Detlev Zundel, Ilya Yanok, devicetree-discuss, sasha_d, grinberg,
	linux-omap, linux-arm-kernel

On 28/12/2011 00:09, Ilya Yanok wrote:
> This patch adds support for TeeJet Mt.Ventoux board based on TAM3517
> SOM. Supported devices:
>  - Serial
>  - Ethernet
>  - NAND
>  - USB host
>  - LCD
>  - Touchscreen
>  - CAN controller
>  - ADC128S converter
> 
> Signed-off-by: Ilya Yanok <yanok@emcraft.com>
> ---
> 
> Changes from V1:
> 
>  - Fixed indentation (use tabs not spaces)
>  - Fixed over 80 characters lines
>  - Added #if defined(CONFIG_SENSORS_ADCXX_MODULE) to allow adcxx to be a
>    module.
>  - Fixes for compilation with CONFIG_TOUCHSCREEN_ADS7846!=y
>   - Added defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
>   - Moved call to omap_ads7846_init to separate small function
>   - Register fixed regulator used for touchscreen only if the driver is
>     enabled
>  - Changed board name (MT_VENTOUX -> Mt.Ventoux)

Hi Tony,

can I ask you about the status of these patches ? I have not seen open
comments, do you think they can be merged in your tree ?

Thanks,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office@denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH V2] mt_ventoux: support for TeeJet Mt.Ventoux board
@ 2012-02-01 10:51       ` Stefano Babic
  0 siblings, 0 replies; 24+ messages in thread
From: Stefano Babic @ 2012-02-01 10:51 UTC (permalink / raw)
  To: linux-arm-kernel

On 28/12/2011 00:09, Ilya Yanok wrote:
> This patch adds support for TeeJet Mt.Ventoux board based on TAM3517
> SOM. Supported devices:
>  - Serial
>  - Ethernet
>  - NAND
>  - USB host
>  - LCD
>  - Touchscreen
>  - CAN controller
>  - ADC128S converter
> 
> Signed-off-by: Ilya Yanok <yanok@emcraft.com>
> ---
> 
> Changes from V1:
> 
>  - Fixed indentation (use tabs not spaces)
>  - Fixed over 80 characters lines
>  - Added #if defined(CONFIG_SENSORS_ADCXX_MODULE) to allow adcxx to be a
>    module.
>  - Fixes for compilation with CONFIG_TOUCHSCREEN_ADS7846!=y
>   - Added defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
>   - Moved call to omap_ads7846_init to separate small function
>   - Register fixed regulator used for touchscreen only if the driver is
>     enabled
>  - Changed board name (MT_VENTOUX -> Mt.Ventoux)

Hi Tony,

can I ask you about the status of these patches ? I have not seen open
comments, do you think they can be merged in your tree ?

Thanks,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH V2] mt_ventoux: support for TeeJet Mt.Ventoux board
  2012-02-01 10:51       ` Stefano Babic
@ 2012-03-05 21:46         ` Tony Lindgren
  -1 siblings, 0 replies; 24+ messages in thread
From: Tony Lindgren @ 2012-03-05 21:46 UTC (permalink / raw)
  To: Stefano Babic
  Cc: Ilya Yanok, linux-arm-kernel, linux-omap, devicetree-discuss,
	grinberg, sasha_d, Detlev Zundel

* Stefano Babic <sbabic@denx.de> [120201 02:20]:
> On 28/12/2011 00:09, Ilya Yanok wrote:
> > This patch adds support for TeeJet Mt.Ventoux board based on TAM3517
> > SOM. Supported devices:
> >  - Serial
> >  - Ethernet
> >  - NAND
> >  - USB host
> >  - LCD
> >  - Touchscreen
> >  - CAN controller
> >  - ADC128S converter
> > 
> > Signed-off-by: Ilya Yanok <yanok@emcraft.com>
> > ---
> > 
> > Changes from V1:
> > 
> >  - Fixed indentation (use tabs not spaces)
> >  - Fixed over 80 characters lines
> >  - Added #if defined(CONFIG_SENSORS_ADCXX_MODULE) to allow adcxx to be a
> >    module.
> >  - Fixes for compilation with CONFIG_TOUCHSCREEN_ADS7846!=y
> >   - Added defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
> >   - Moved call to omap_ads7846_init to separate small function
> >   - Register fixed regulator used for touchscreen only if the driver is
> >     enabled
> >  - Changed board name (MT_VENTOUX -> Mt.Ventoux)
> 
> Hi Tony,
> 
> can I ask you about the status of these patches ? I have not seen open
> comments, do you think they can be merged in your tree ?

Yes I can carry some board-*.c files until device tree is
usable for basic features. There's still some hsmmc changes
pending that I'd like to get out of the way before adding
new ones as then it means I have to keep updating those
board files separately.

Regards,

Tony

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH V2] mt_ventoux: support for TeeJet Mt.Ventoux board
@ 2012-03-05 21:46         ` Tony Lindgren
  0 siblings, 0 replies; 24+ messages in thread
From: Tony Lindgren @ 2012-03-05 21:46 UTC (permalink / raw)
  To: linux-arm-kernel

* Stefano Babic <sbabic@denx.de> [120201 02:20]:
> On 28/12/2011 00:09, Ilya Yanok wrote:
> > This patch adds support for TeeJet Mt.Ventoux board based on TAM3517
> > SOM. Supported devices:
> >  - Serial
> >  - Ethernet
> >  - NAND
> >  - USB host
> >  - LCD
> >  - Touchscreen
> >  - CAN controller
> >  - ADC128S converter
> > 
> > Signed-off-by: Ilya Yanok <yanok@emcraft.com>
> > ---
> > 
> > Changes from V1:
> > 
> >  - Fixed indentation (use tabs not spaces)
> >  - Fixed over 80 characters lines
> >  - Added #if defined(CONFIG_SENSORS_ADCXX_MODULE) to allow adcxx to be a
> >    module.
> >  - Fixes for compilation with CONFIG_TOUCHSCREEN_ADS7846!=y
> >   - Added defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
> >   - Moved call to omap_ads7846_init to separate small function
> >   - Register fixed regulator used for touchscreen only if the driver is
> >     enabled
> >  - Changed board name (MT_VENTOUX -> Mt.Ventoux)
> 
> Hi Tony,
> 
> can I ask you about the status of these patches ? I have not seen open
> comments, do you think they can be merged in your tree ?

Yes I can carry some board-*.c files until device tree is
usable for basic features. There's still some hsmmc changes
pending that I'd like to get out of the way before adding
new ones as then it means I have to keep updating those
board files separately.

Regards,

Tony

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2012-03-05 21:46 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-26 23:08 [PATCH 0/2] Support for TeeJet Mt.Ventoux Ilya Yanok
2011-12-26 23:08 ` Ilya Yanok
2011-12-26 23:08 ` [PATCH 1/2] mt_ventoux: very basic support for TeeJet Mt.Ventoux board Ilya Yanok
2011-12-26 23:08   ` Ilya Yanok
2012-01-04 19:54   ` Grant Likely
2012-01-04 19:54     ` Grant Likely
2012-01-05  8:40     ` Igor Grinberg
2012-01-05  8:40       ` Igor Grinberg
2011-12-26 23:08 ` [PATCH 2/2] mt_ventoux: " Ilya Yanok
2011-12-26 23:08   ` Ilya Yanok
2011-12-27  7:56   ` Igor Grinberg
2011-12-27  7:56     ` Igor Grinberg
2011-12-27 23:02     ` Ilya Yanok
2011-12-27 23:02       ` Ilya Yanok
2012-01-03  9:48       ` Igor Grinberg
2012-01-03  9:48         ` Igor Grinberg
2012-01-11 20:04         ` Ilya Yanok
2012-01-11 20:04           ` Ilya Yanok
2011-12-27 23:09   ` [PATCH V2] " Ilya Yanok
2011-12-27 23:09     ` Ilya Yanok
2012-02-01 10:51     ` Stefano Babic
2012-02-01 10:51       ` Stefano Babic
2012-03-05 21:46       ` Tony Lindgren
2012-03-05 21:46         ` Tony Lindgren

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.