mirror of
https://git.yoctoproject.org/meta-ti
synced 2026-05-07 03:49:20 +00:00
linux-ti335x-psp: add 3.2 based on 3.2-staging branch
runtime tested on beaglebone Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
From d26b2d246668587049b1362a42c9b829f2ca288a Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Fri, 7 Oct 2011 15:29:28 +0200
|
||||
Subject: [PATCH 01/16] f_rndis: HACK around undefined variables
|
||||
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
drivers/usb/gadget/f_rndis.c | 4 ++--
|
||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/usb/gadget/f_rndis.c b/drivers/usb/gadget/f_rndis.c
|
||||
index 6614490..d2f1b6f 100644
|
||||
--- a/drivers/usb/gadget/f_rndis.c
|
||||
+++ b/drivers/usb/gadget/f_rndis.c
|
||||
@@ -767,11 +767,11 @@ rndis_bind(struct usb_configuration *c, struct usb_function *f)
|
||||
|
||||
rndis_set_param_medium(rndis->config, NDIS_MEDIUM_802_3, 0);
|
||||
rndis_set_host_mac(rndis->config, rndis->ethaddr);
|
||||
-
|
||||
+/*
|
||||
if (rndis_set_param_vendor(rndis->config, vendorID,
|
||||
manufacturer))
|
||||
goto fail;
|
||||
-
|
||||
+*/
|
||||
/* NOTE: all that is done without knowing or caring about
|
||||
* the network link ... which is unavailable to this code
|
||||
* until we're activated via set_alt().
|
||||
--
|
||||
1.7.7.5
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
From 0188ea8b0633815f9ed9a728a6a1a53d64c1093c Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Thu, 3 Nov 2011 17:35:50 +0100
|
||||
Subject: [PATCH 02/16] da8xx-fb: add DVI support for beaglebone
|
||||
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
drivers/video/da8xx-fb.c | 14 ++++++++++++++
|
||||
1 files changed, 14 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
|
||||
index 85eda33..dea8936 100644
|
||||
--- a/drivers/video/da8xx-fb.c
|
||||
+++ b/drivers/video/da8xx-fb.c
|
||||
@@ -271,6 +271,20 @@ static struct da8xx_panel known_lcd_panels[] = {
|
||||
.pxl_clk = 30000000,
|
||||
.invert_pxl_clk = 0,
|
||||
},
|
||||
+ [3] = {
|
||||
+ /* 1024 x 768 @ 60 Hz Reduced blanking VESA CVT 0.79M3-R */
|
||||
+ .name = "1024x768@60",
|
||||
+ .width = 1024,
|
||||
+ .height = 768,
|
||||
+ .hfp = 48,
|
||||
+ .hbp = 80,
|
||||
+ .hsw = 32,
|
||||
+ .vfp = 3,
|
||||
+ .vbp = 15,
|
||||
+ .vsw = 4,
|
||||
+ .pxl_clk = 56000000,
|
||||
+ .invert_pxl_clk = 0,
|
||||
+ },
|
||||
};
|
||||
|
||||
/* Enable the Raster Engine of the LCD Controller */
|
||||
--
|
||||
1.7.7.5
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
From 11622554369db32c7c14572efb525ef5e418338d Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Tue, 31 Jan 2012 10:21:32 +0100
|
||||
Subject: [PATCH 03/16] arm:omap:mux33xx: Add i2c2 pin mux
|
||||
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/mux33xx.c | 4 ++--
|
||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/mux33xx.c b/arch/arm/mach-omap2/mux33xx.c
|
||||
index 81a657e..36bb10a 100644
|
||||
--- a/arch/arm/mach-omap2/mux33xx.c
|
||||
+++ b/arch/arm/mach-omap2/mux33xx.c
|
||||
@@ -312,10 +312,10 @@ static struct omap_mux __initdata am33xx_muxmodes[] = {
|
||||
"uart0_txd", "spi1_cs1", "d_can0_rx", NULL,
|
||||
NULL, NULL, NULL, "gpio1_11"),
|
||||
_AM33XX_MUXENTRY(UART1_CTSN, 0,
|
||||
- "uart1_ctsn", NULL, NULL, NULL,
|
||||
+ "uart1_ctsn", NULL, "d_can0_tx", "i2c2_sda",
|
||||
"spi1_cs0", NULL, NULL, "gpio0_12"),
|
||||
_AM33XX_MUXENTRY(UART1_RTSN, 0,
|
||||
- "uart1_rtsn", NULL, NULL, NULL,
|
||||
+ "uart1_rtsn", NULL, "d_can0_rx", "i2c2_scl",
|
||||
"spi1_cs1", NULL, NULL, "gpio0_13"),
|
||||
_AM33XX_MUXENTRY(UART1_RXD, 0,
|
||||
"uart1_rxd", "mmc1_sdwp", NULL, NULL,
|
||||
--
|
||||
1.7.7.5
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
From 4f823ac4857d0d48b53b7a8799a745f746bfda1a Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Wed, 16 Nov 2011 07:23:37 -0600
|
||||
Subject: [PATCH 04/16] omap:hwmod:33xx: Add support for third i2c bus
|
||||
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 54 ++++++++++++++++++++++++++++
|
||||
1 files changed, 54 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
|
||||
index 9b15ffe..f9b91fa 100644
|
||||
--- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
|
||||
+++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
|
||||
@@ -62,6 +62,7 @@ static struct omap_hwmod am33xx_gpio2_hwmod;
|
||||
static struct omap_hwmod am33xx_gpio3_hwmod;
|
||||
static struct omap_hwmod am33xx_i2c1_hwmod;
|
||||
static struct omap_hwmod am33xx_i2c2_hwmod;
|
||||
+static struct omap_hwmod am33xx_i2c3_hwmod;
|
||||
static struct omap_hwmod am33xx_usbss_hwmod;
|
||||
static struct omap_hwmod am33xx_mmc0_hwmod;
|
||||
static struct omap_hwmod am33xx_mmc1_hwmod;
|
||||
@@ -1084,6 +1085,58 @@ static struct omap_hwmod am33xx_i2c2_hwmod = {
|
||||
.class = &i2c_class,
|
||||
};
|
||||
|
||||
+/* i2c3 */
|
||||
+/* l4 per -> i2c3 */
|
||||
+static struct omap_hwmod_addr_space am33xx_i2c3_addr_space[] = {
|
||||
+ {
|
||||
+ .pa_start = AM33XX_I2C2_BASE,
|
||||
+ .pa_end = AM33XX_I2C2_BASE + SZ_4K - 1,
|
||||
+ .flags = ADDR_TYPE_RT
|
||||
+ },
|
||||
+ { }
|
||||
+};
|
||||
+
|
||||
+static struct omap_hwmod_ocp_if am335_l4_per_i2c3 = {
|
||||
+ .master = &am33xx_l4per_hwmod,
|
||||
+ .slave = &am33xx_i2c3_hwmod,
|
||||
+ .addr = am33xx_i2c3_addr_space,
|
||||
+ .user = OCP_USER_MPU,
|
||||
+};
|
||||
+
|
||||
+static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = {
|
||||
+ { .irq = AM33XX_IRQ_MSHSI2COCP2 },
|
||||
+ { .irq = -1 }
|
||||
+};
|
||||
+
|
||||
+static struct omap_hwmod_dma_info i2c3_edma_reqs[] = {
|
||||
+ { .name = "tx", .dma_req = 0, },
|
||||
+ { .name = "rx", .dma_req = 0, },
|
||||
+ { .dma_req = -1 }
|
||||
+};
|
||||
+
|
||||
+static struct omap_hwmod_ocp_if *am33xx_i2c3_slaves[] = {
|
||||
+ &am335_l4_per_i2c3,
|
||||
+};
|
||||
+
|
||||
+static struct omap_hwmod am33xx_i2c3_hwmod = {
|
||||
+ .name = "i2c3",
|
||||
+ .mpu_irqs = i2c3_mpu_irqs,
|
||||
+ .sdma_reqs = i2c3_edma_reqs,
|
||||
+ .main_clk = "i2c3_fck",
|
||||
+ .clkdm_name = "l4ls_clkdm",
|
||||
+ .prcm = {
|
||||
+ .omap4 = {
|
||||
+ .clkctrl_offs = AM33XX_CM_PER_I2C2_CLKCTRL_OFFSET,
|
||||
+ .modulemode = MODULEMODE_SWCTRL,
|
||||
+ },
|
||||
+ },
|
||||
+ .flags = HWMOD_16BIT_REG,
|
||||
+ .dev_attr = &i2c_dev_attr,
|
||||
+ .slaves = am33xx_i2c3_slaves,
|
||||
+ .slaves_cnt = ARRAY_SIZE(am33xx_i2c3_slaves),
|
||||
+ .class = &i2c_class,
|
||||
+};
|
||||
+
|
||||
/* 'icss' class */
|
||||
static struct omap_hwmod_class am33xx_icss_hwmod_class = {
|
||||
.name = "icss",
|
||||
@@ -3001,6 +3054,7 @@ static __initdata struct omap_hwmod *am33xx_hwmods[] = {
|
||||
/* i2c class */
|
||||
&am33xx_i2c1_hwmod,
|
||||
&am33xx_i2c2_hwmod,
|
||||
+ &am33xx_i2c3_hwmod,
|
||||
/* icss class */
|
||||
&am33xx_icss_hwmod,
|
||||
/* ieee5000 class */
|
||||
--
|
||||
1.7.7.5
|
||||
|
||||
@@ -0,0 +1,548 @@
|
||||
From c240df1d9fd60f318e719d0e77bc5955fecbb64e Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Mon, 30 Jan 2012 21:30:09 +0100
|
||||
Subject: [PATCH 05/16] beaglebone: rebase everything onto 3.2 - WARNING
|
||||
MEGAPATCH
|
||||
|
||||
---
|
||||
arch/arm/mach-omap2/board-am335xevm.c | 429 ++++++++++++++++++++++++++++++++-
|
||||
1 files changed, 427 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c
|
||||
index 4c09cc9..e0c20c5 100644
|
||||
--- a/arch/arm/mach-omap2/board-am335xevm.c
|
||||
+++ b/arch/arm/mach-omap2/board-am335xevm.c
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <linux/i2c/at24.h>
|
||||
#include <linux/phy.h>
|
||||
#include <linux/gpio.h>
|
||||
+#include <linux/leds.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/spi/flash.h>
|
||||
#include <linux/gpio_keys.h>
|
||||
@@ -167,6 +168,66 @@ struct da8xx_lcdc_platform_data TFC_S9700RTWV35TR_01B_pdata = {
|
||||
|
||||
#include "common.h"
|
||||
|
||||
+static const struct display_panel bbtoys7_panel = {
|
||||
+ WVGA,
|
||||
+ 16,
|
||||
+ 16,
|
||||
+ COLOR_ACTIVE,
|
||||
+};
|
||||
+
|
||||
+static struct lcd_ctrl_config bbtoys7_cfg = {
|
||||
+ &bbtoys7_panel,
|
||||
+ .ac_bias = 255,
|
||||
+ .ac_bias_intrpt = 0,
|
||||
+ .dma_burst_sz = 16,
|
||||
+ .bpp = 16,
|
||||
+ .fdd = 0x80,
|
||||
+ .tft_alt_mode = 0,
|
||||
+ .stn_565_mode = 0,
|
||||
+ .mono_8bit_mode = 0,
|
||||
+ .invert_line_clock = 1,
|
||||
+ .invert_frm_clock = 1,
|
||||
+ .sync_edge = 0,
|
||||
+ .sync_ctrl = 1,
|
||||
+ .raster_order = 0,
|
||||
+};
|
||||
+
|
||||
+struct da8xx_lcdc_platform_data bbtoys7_pdata = {
|
||||
+ .manu_name = "ThreeFive",
|
||||
+ .controller_data = &bbtoys7_cfg,
|
||||
+ .type = "TFC_S9700RTWV35TR_01B",
|
||||
+};
|
||||
+
|
||||
+static const struct display_panel dvi_panel = {
|
||||
+ WVGA,
|
||||
+ 16,
|
||||
+ 16,
|
||||
+ COLOR_ACTIVE,
|
||||
+};
|
||||
+
|
||||
+static struct lcd_ctrl_config dvi_cfg = {
|
||||
+ &dvi_panel,
|
||||
+ .ac_bias = 255,
|
||||
+ .ac_bias_intrpt = 0,
|
||||
+ .dma_burst_sz = 16,
|
||||
+ .bpp = 16,
|
||||
+ .fdd = 0x80,
|
||||
+ .tft_alt_mode = 0,
|
||||
+ .stn_565_mode = 0,
|
||||
+ .mono_8bit_mode = 0,
|
||||
+ .invert_line_clock = 1,
|
||||
+ .invert_frm_clock = 1,
|
||||
+ .sync_edge = 0,
|
||||
+ .sync_ctrl = 1,
|
||||
+ .raster_order = 0,
|
||||
+};
|
||||
+
|
||||
+struct da8xx_lcdc_platform_data dvi_pdata = {
|
||||
+ .manu_name = "BBToys",
|
||||
+ .controller_data = &dvi_cfg,
|
||||
+ .type = "1024x768@60",
|
||||
+};
|
||||
+
|
||||
/* TSc controller */
|
||||
#include <linux/input/ti_tscadc.h>
|
||||
#include <linux/lis3lv02d.h>
|
||||
@@ -320,9 +381,34 @@ struct am335x_evm_eeprom_config {
|
||||
static struct am335x_evm_eeprom_config config;
|
||||
static bool daughter_brd_detected;
|
||||
|
||||
-#define GP_EVM_REV_IS_1_0 0x1
|
||||
+struct beaglebone_cape_eeprom_config {
|
||||
+ u32 header;
|
||||
+ char format_revision[2];
|
||||
+ char name[32];
|
||||
+ char version[4];
|
||||
+ char manufacturer[16];
|
||||
+ char partnumber[16];
|
||||
+ u16 numpins;
|
||||
+ char serial[12];
|
||||
+ u8 muxdata[170];
|
||||
+ u16 current_3v3;
|
||||
+ u16 current_vdd5v;
|
||||
+ u16 current_sys5v;
|
||||
+ u16 dc;
|
||||
+};
|
||||
+
|
||||
+static struct beaglebone_cape_eeprom_config cape_config;
|
||||
+static bool beaglebone_cape_detected;
|
||||
+
|
||||
+/* keep track of ADC pin usage */
|
||||
+static int capecount = 0;
|
||||
+static bool beaglebone_tsadcpins_free = 1;
|
||||
+
|
||||
+
|
||||
+#define GP_EVM_REV_IS_1_0A 0x1
|
||||
#define GP_EVM_REV_IS_1_1A 0x2
|
||||
#define GP_EVM_REV_IS_UNKNOWN 0xFF
|
||||
+#define GP_EVM_ACTUALLY_BEAGLEBONE 0xBB
|
||||
static unsigned int gp_evm_revision = GP_EVM_REV_IS_UNKNOWN;
|
||||
unsigned int gigabit_enable = 1;
|
||||
|
||||
@@ -404,11 +490,102 @@ static struct pinmux_config lcdc_pin_mux[] = {
|
||||
{NULL, 0},
|
||||
};
|
||||
|
||||
+/* Module pin mux for Beagleboardtoys DVI cape */
|
||||
+static struct pinmux_config dvi_pin_mux[] = {
|
||||
+ {"lcd_data0.lcd_data0", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
|
||||
+ | AM33XX_PULL_DISA},
|
||||
+ {"lcd_data1.lcd_data1", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
|
||||
+ | AM33XX_PULL_DISA},
|
||||
+ {"lcd_data2.lcd_data2", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
|
||||
+ | AM33XX_PULL_DISA},
|
||||
+ {"lcd_data3.lcd_data3", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
|
||||
+ | AM33XX_PULL_DISA},
|
||||
+ {"lcd_data4.lcd_data4", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
|
||||
+ | AM33XX_PULL_DISA},
|
||||
+ {"lcd_data5.lcd_data5", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
|
||||
+ | AM33XX_PULL_DISA},
|
||||
+ {"lcd_data6.lcd_data6", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
|
||||
+ | AM33XX_PULL_DISA},
|
||||
+ {"lcd_data7.lcd_data7", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
|
||||
+ | AM33XX_PULL_DISA},
|
||||
+ {"lcd_data8.lcd_data8", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
|
||||
+ | AM33XX_PULL_DISA},
|
||||
+ {"lcd_data9.lcd_data9", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
|
||||
+ | AM33XX_PULL_DISA},
|
||||
+ {"lcd_data10.lcd_data10", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
|
||||
+ | AM33XX_PULL_DISA},
|
||||
+ {"lcd_data11.lcd_data11", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
|
||||
+ | AM33XX_PULL_DISA},
|
||||
+ {"lcd_data12.lcd_data12", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
|
||||
+ | AM33XX_PULL_DISA},
|
||||
+ {"lcd_data13.lcd_data13", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
|
||||
+ | AM33XX_PULL_DISA},
|
||||
+ {"lcd_data14.lcd_data14", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
|
||||
+ | AM33XX_PULL_DISA},
|
||||
+ {"lcd_data15.lcd_data15", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
|
||||
+ | AM33XX_PULL_DISA},
|
||||
+ {"lcd_vsync.lcd_vsync", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT},
|
||||
+ {"lcd_hsync.lcd_hsync", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT},
|
||||
+ {"lcd_pclk.lcd_pclk", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT},
|
||||
+ {"lcd_ac_bias_en.lcd_ac_bias_en", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT},
|
||||
+ {"gpmc_a2.rgmii2_td3", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, // USR0 LED
|
||||
+ {"gpmc_a3.rgmii2_td2", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, // USR1 LED
|
||||
+ {"gpmc_ad7.gpmc_ad7", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, // DVI PDn
|
||||
+ {NULL, 0},
|
||||
+};
|
||||
+
|
||||
+/* Module pin mux for Beagleboardtoys 7" LCD cape */
|
||||
+static struct pinmux_config bbtoys7_pin_mux[] = {
|
||||
+ {"lcd_data0.lcd_data0", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
|
||||
+ | AM33XX_PULL_DISA},
|
||||
+ {"lcd_data1.lcd_data1", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
|
||||
+ | AM33XX_PULL_DISA},
|
||||
+ {"lcd_data2.lcd_data2", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
|
||||
+ | AM33XX_PULL_DISA},
|
||||
+ {"lcd_data3.lcd_data3", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
|
||||
+ | AM33XX_PULL_DISA},
|
||||
+ {"lcd_data4.lcd_data4", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
|
||||
+ | AM33XX_PULL_DISA},
|
||||
+ {"lcd_data5.lcd_data5", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
|
||||
+ | AM33XX_PULL_DISA},
|
||||
+ {"lcd_data6.lcd_data6", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
|
||||
+ | AM33XX_PULL_DISA},
|
||||
+ {"lcd_data7.lcd_data7", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
|
||||
+ | AM33XX_PULL_DISA},
|
||||
+ {"lcd_data8.lcd_data8", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
|
||||
+ | AM33XX_PULL_DISA},
|
||||
+ {"lcd_data9.lcd_data9", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
|
||||
+ | AM33XX_PULL_DISA},
|
||||
+ {"lcd_data10.lcd_data10", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
|
||||
+ | AM33XX_PULL_DISA},
|
||||
+ {"lcd_data11.lcd_data11", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
|
||||
+ | AM33XX_PULL_DISA},
|
||||
+ {"lcd_data12.lcd_data12", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
|
||||
+ | AM33XX_PULL_DISA},
|
||||
+ {"lcd_data13.lcd_data13", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
|
||||
+ | AM33XX_PULL_DISA},
|
||||
+ {"lcd_data14.lcd_data14", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
|
||||
+ | AM33XX_PULL_DISA},
|
||||
+ {"lcd_data15.lcd_data15", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
|
||||
+ | AM33XX_PULL_DISA},
|
||||
+ {"lcd_vsync.lcd_vsync", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT},
|
||||
+ {"lcd_hsync.lcd_hsync", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT},
|
||||
+ {"lcd_pclk.lcd_pclk", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT},
|
||||
+ {"lcd_ac_bias_en.lcd_ac_bias_en", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT},
|
||||
+ {"gpmc_a2.gpio1_18", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, // Backlight
|
||||
+ {"ecap0_in_pwm0_out.gpio0_7", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, // AVDD_EN
|
||||
+ {NULL, 0},
|
||||
+};
|
||||
+
|
||||
static struct pinmux_config tsc_pin_mux[] = {
|
||||
{"ain0.ain0", OMAP_MUX_MODE0 | AM33XX_INPUT_EN},
|
||||
{"ain1.ain1", OMAP_MUX_MODE0 | AM33XX_INPUT_EN},
|
||||
{"ain2.ain2", OMAP_MUX_MODE0 | AM33XX_INPUT_EN},
|
||||
{"ain3.ain3", OMAP_MUX_MODE0 | AM33XX_INPUT_EN},
|
||||
+ {"ain4.ain4", OMAP_MUX_MODE0 | AM33XX_INPUT_EN},
|
||||
+ {"ain5.ain5", OMAP_MUX_MODE0 | AM33XX_INPUT_EN},
|
||||
+ {"ain6.ain6", OMAP_MUX_MODE0 | AM33XX_INPUT_EN},
|
||||
+ {"ain7.ain7", OMAP_MUX_MODE0 | AM33XX_INPUT_EN},
|
||||
{"vrefp.vrefp", OMAP_MUX_MODE0 | AM33XX_INPUT_EN},
|
||||
{"vrefn.vrefn", OMAP_MUX_MODE0 | AM33XX_INPUT_EN},
|
||||
{NULL, 0},
|
||||
@@ -541,6 +718,14 @@ static struct pinmux_config i2c1_pin_mux[] = {
|
||||
{NULL, 0},
|
||||
};
|
||||
|
||||
+static struct pinmux_config i2c2_pin_mux[] = {
|
||||
+ {"uart1_ctsn.i2c2_sda", OMAP_MUX_MODE3 | AM33XX_SLEWCTRL_SLOW |
|
||||
+ AM33XX_PIN_INPUT_PULLUP},
|
||||
+ {"uart1_rtsn.i2c2_scl", OMAP_MUX_MODE3 | AM33XX_SLEWCTRL_SLOW |
|
||||
+ AM33XX_PIN_INPUT_PULLUP},
|
||||
+ {NULL, 0},
|
||||
+};
|
||||
+
|
||||
/* Module pin mux for mcasp1 */
|
||||
static struct pinmux_config mcasp1_pin_mux[] = {
|
||||
{"mii1_crs.mcasp1_aclkx", OMAP_MUX_MODE4 | AM33XX_PIN_INPUT_PULLDOWN},
|
||||
@@ -815,6 +1000,64 @@ static struct pinmux_config profibus_pin_mux[] = {
|
||||
{NULL, 0},
|
||||
};
|
||||
|
||||
+
|
||||
+#define BEAGLEBONEDVI_USR0_LED GPIO_TO_PIN(1, 18)
|
||||
+#define BEAGLEBONEDVI_USR1_LED GPIO_TO_PIN(1, 19)
|
||||
+
|
||||
+static struct gpio_led dvi_gpio_leds[] = {
|
||||
+ {
|
||||
+ .name = "beaglebone::usr0",
|
||||
+ .default_trigger = "heartbeat",
|
||||
+ .gpio = BEAGLEBONE_USR1_LED,
|
||||
+ },
|
||||
+ {
|
||||
+ .name = "beaglebone::usr1",
|
||||
+ .default_trigger = "mmc0",
|
||||
+ .gpio = BEAGLEBONE_USR2_LED,
|
||||
+ },
|
||||
+ {
|
||||
+ .name = "beaglebone::usr2",
|
||||
+ .gpio = BEAGLEBONE_USR3_LED,
|
||||
+ },
|
||||
+ {
|
||||
+ .name = "beaglebone::usr3",
|
||||
+ .gpio = BEAGLEBONE_USR4_LED,
|
||||
+ },
|
||||
+ {
|
||||
+ .name = "dvi::usr0",
|
||||
+ .default_trigger = "heartbeat",
|
||||
+ .gpio = BEAGLEBONEDVI_USR0_LED,
|
||||
+ },
|
||||
+ {
|
||||
+ .name = "dvi::usr1",
|
||||
+ .default_trigger = "mmc0",
|
||||
+ .gpio = BEAGLEBONEDVI_USR1_LED,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct gpio_led_platform_data dvi_gpio_led_info = {
|
||||
+ .leds = dvi_gpio_leds,
|
||||
+ .num_leds = ARRAY_SIZE(dvi_gpio_leds),
|
||||
+};
|
||||
+
|
||||
+static struct platform_device dvi_leds_gpio = {
|
||||
+ .name = "leds-gpio",
|
||||
+ .id = -1,
|
||||
+ .dev = {
|
||||
+ .platform_data = &dvi_gpio_led_info,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct pinmux_config bone_pin_mux[] = {
|
||||
+ /* User LED gpios (gpio1_21 to gpio1_24) */
|
||||
+ {"gpmc_a5.rgmii2_td0", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT},
|
||||
+ {"gpmc_a6.rgmii2_tclk", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT},
|
||||
+ {"gpmc_a7.rgmii2_rclk", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT},
|
||||
+ {"gpmc_a8.rgmii2_rd3", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT},
|
||||
+ /* Grounding gpio1_6 (pin 3 Conn A) signals bone tester to start diag tests */
|
||||
+ {"gpmc_ad6.gpio1_6", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT_PULLUP},
|
||||
+};
|
||||
+
|
||||
/* Module pin mux for eCAP0 */
|
||||
static struct pinmux_config ecap0_pin_mux[] = {
|
||||
{"ecap0_in_pwm0_out.ecap0_in_pwm0_out",
|
||||
@@ -924,6 +1167,51 @@ static void lcdc_init(int evm_id, int profile)
|
||||
return;
|
||||
}
|
||||
|
||||
+#define BEAGLEBONE_LCD_AVDD_EN GPIO_TO_PIN(0, 7)
|
||||
+#define BEAGLEBONE_LCD_BL GPIO_TO_PIN(1, 18)
|
||||
+
|
||||
+static void bbtoys7lcd_init(int evm_id, int profile)
|
||||
+{
|
||||
+ setup_pin_mux(bbtoys7_pin_mux);
|
||||
+
|
||||
+ // we are being stupid and setting pixclock from here instead of da8xx-fb.c
|
||||
+ if (conf_disp_pll(300000000)) {
|
||||
+ pr_info("Failed to set pixclock to 300000000, not attempting to"
|
||||
+ "register LCD cape\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ if (am33xx_register_lcdc(&bbtoys7_pdata))
|
||||
+ pr_info("Failed to register Beagleboardtoys 7\" LCD cape device\n");
|
||||
+
|
||||
+ gpio_request(BEAGLEBONE_LCD_BL, "BONE_LCD_BL");
|
||||
+ gpio_direction_output(BEAGLEBONE_LCD_BL, 1);
|
||||
+ gpio_request(BEAGLEBONE_LCD_AVDD_EN, "BONE_LCD_AVDD_EN");
|
||||
+ gpio_direction_output(BEAGLEBONE_LCD_AVDD_EN, 1);
|
||||
+
|
||||
+ return;
|
||||
+}
|
||||
+
|
||||
+#define BEAGLEBONEDVI_PDn GPIO_TO_PIN(1, 7)
|
||||
+
|
||||
+static void dvi_init(int evm_id, int profile)
|
||||
+{
|
||||
+ setup_pin_mux(dvi_pin_mux);
|
||||
+ gpio_request(BEAGLEBONEDVI_PDn, "DVI_PDn");
|
||||
+ gpio_direction_output(BEAGLEBONEDVI_PDn, 1);
|
||||
+
|
||||
+ // we are being stupid and setting pixclock from here instead of da8xx-fb.c
|
||||
+ if (conf_disp_pll(560000000)) {
|
||||
+ pr_info("Failed to set pixclock to 56000000, not attempting to"
|
||||
+ "register DVI adapter\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ if (am33xx_register_lcdc(&dvi_pdata))
|
||||
+ pr_info("Failed to register BeagleBoardToys DVI cape\n");
|
||||
+ return;
|
||||
+}
|
||||
+
|
||||
static void tsc_init(int evm_id, int profile)
|
||||
{
|
||||
int err;
|
||||
@@ -931,16 +1219,48 @@ static void tsc_init(int evm_id, int profile)
|
||||
if (gp_evm_revision == GP_EVM_REV_IS_1_1A) {
|
||||
am335x_touchscreen_data.analog_input = 1;
|
||||
pr_info("TSC connected to beta GP EVM\n");
|
||||
- } else {
|
||||
+ }
|
||||
+ if (gp_evm_revision == GP_EVM_REV_IS_1_1A) {
|
||||
am335x_touchscreen_data.analog_input = 0;
|
||||
pr_info("TSC connected to alpha GP EVM\n");
|
||||
}
|
||||
+ if( gp_evm_revision == GP_EVM_ACTUALLY_BEAGLEBONE) {
|
||||
+ am335x_touchscreen_data.analog_input = 1;
|
||||
+ pr_info("TSC connected to BeagleBone\n");;
|
||||
+ }
|
||||
setup_pin_mux(tsc_pin_mux);
|
||||
err = platform_device_register(&tsc_device);
|
||||
if (err)
|
||||
pr_err("failed to register touchscreen device\n");
|
||||
}
|
||||
|
||||
+static void bone_tsc_init(int evm_id, int profile)
|
||||
+{
|
||||
+ int err;
|
||||
+ setup_pin_mux(tsc_pin_mux);
|
||||
+ err = platform_device_register(&bone_tsc_device);
|
||||
+ if (err)
|
||||
+ pr_err("failed to register touchscreen device\n");
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static void boneleds_init(int evm_id, int profile )
|
||||
+{
|
||||
+ int err;
|
||||
+ setup_pin_mux(bone_pin_mux);
|
||||
+ err = platform_device_register(&bone_leds_gpio);
|
||||
+ if (err)
|
||||
+ pr_err("failed to register BeagleBone LEDS\n");
|
||||
+}
|
||||
+
|
||||
+static void dvileds_init(int evm_id, int profile )
|
||||
+{
|
||||
+ int err;
|
||||
+ err = platform_device_register(&dvi_leds_gpio);
|
||||
+ if (err)
|
||||
+ pr_err("failed to register BeagleBone DVI cape LEDS\n");
|
||||
+}
|
||||
+
|
||||
static void rgmii1_init(int evm_id, int profile)
|
||||
{
|
||||
setup_pin_mux(rgmii1_pin_mux);
|
||||
@@ -1350,6 +1670,106 @@ static void i2c1_init(int evm_id, int profile)
|
||||
return;
|
||||
}
|
||||
|
||||
+static void beaglebone_cape_setup(struct memory_accessor *mem_acc, void *context)
|
||||
+{
|
||||
+ capecount++;
|
||||
+ int ret;
|
||||
+ char tmp[32];
|
||||
+ char name[32];
|
||||
+ char manufacturer[32];
|
||||
+
|
||||
+ /* get cape specific data */
|
||||
+ ret = mem_acc->read(mem_acc, (char *)&cape_config, 0, sizeof(cape_config));
|
||||
+ if (ret != sizeof(cape_config)) {
|
||||
+ pr_warning("BeagleBone cape EEPROM: could not read eeprom at address 0x%x\n", capecount + 0x53);
|
||||
+ if ((capecount > 3) && (beaglebone_tsadcpins_free == 1)) {
|
||||
+ pr_info("BeagleBone cape: exporting ADC pins to sysfs\n");
|
||||
+ bone_tsc_init(0,0);
|
||||
+ beaglebone_tsadcpins_free = 0;
|
||||
+ }
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ if (cape_config.header != AM335X_EEPROM_HEADER) {
|
||||
+ pr_warning("BeagleBone Cape EEPROM: wrong header 0x%x, expected 0x%x\n",
|
||||
+ cape_config.header, AM335X_EEPROM_HEADER);
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ pr_info("BeagleBone cape EEPROM: found eeprom at address 0x%x\n", capecount + 0x53);
|
||||
+ snprintf(name, sizeof(cape_config.name) + 1, "%s", cape_config.name);
|
||||
+ snprintf(manufacturer, sizeof(cape_config.manufacturer) + 1, "%s", cape_config.manufacturer);
|
||||
+ pr_info("BeagleBone cape: %s %s\n", manufacturer, name);
|
||||
+ snprintf(tmp, sizeof(cape_config.partnumber) + 1, "%s", cape_config.partnumber);
|
||||
+ pr_info("BeagleBone cape partnumber: %s\n", tmp);
|
||||
+
|
||||
+ if (!strncmp("BB-BONE-DVID-01", cape_config.partnumber, 5)) {
|
||||
+ pr_info("BeagleBone cape: initializing DVI cape\n");
|
||||
+ dvi_init(0,0);
|
||||
+ }
|
||||
+ if (!strncmp("LCD01", cape_config.partnumber, 5)) {
|
||||
+ pr_info("BeagleBone cape: initializing LCD cape\n");
|
||||
+ bbtoys7lcd_init(0,0);
|
||||
+ pr_info("BeagleBone cape: initializing LCD cape touchscreen\n");
|
||||
+ tsc_init(0,0);
|
||||
+ beaglebone_tsadcpins_free = 0;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ if ((capecount > 3) && (beaglebone_tsadcpins_free == 1)) {
|
||||
+ pr_info("BeagleBone cape: exporting ADC pins to sysfs\n");
|
||||
+ bone_tsc_init(0,0);
|
||||
+ beaglebone_tsadcpins_free = 0;
|
||||
+ }
|
||||
+
|
||||
+ return;
|
||||
+out:
|
||||
+ /*
|
||||
+ * If the EEPROM hasn't been programed or an incorrect header
|
||||
+ * or board name are read, assume this is an old beaglebone board
|
||||
+ * (< Rev A3)
|
||||
+ */
|
||||
+ pr_err("Could not detect BeagleBone cape properly\n");
|
||||
+ beaglebone_cape_detected = false;
|
||||
+
|
||||
+}
|
||||
+
|
||||
+static struct at24_platform_data cape_eeprom_info = {
|
||||
+ .byte_len = (256*1024) / 8,
|
||||
+ .page_size = 64,
|
||||
+ .flags = AT24_FLAG_ADDR16,
|
||||
+ .context = (void *)NULL,
|
||||
+ .setup = beaglebone_cape_setup,
|
||||
+};
|
||||
+
|
||||
+static struct i2c_board_info __initdata cape_i2c_boardinfo[] = {
|
||||
+ {
|
||||
+ I2C_BOARD_INFO("24c256", 0x54),
|
||||
+ .platform_data = &cape_eeprom_info,
|
||||
+ },
|
||||
+ {
|
||||
+ I2C_BOARD_INFO("24c256", 0x55),
|
||||
+ .platform_data = &cape_eeprom_info,
|
||||
+ },
|
||||
+ {
|
||||
+ I2C_BOARD_INFO("24c256", 0x56),
|
||||
+ .platform_data = &cape_eeprom_info,
|
||||
+ },
|
||||
+ {
|
||||
+ I2C_BOARD_INFO("24c256", 0x57),
|
||||
+ .platform_data = &cape_eeprom_info,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static void i2c2_init(int evm_id, int profile)
|
||||
+{
|
||||
+ setup_pin_mux(i2c2_pin_mux);
|
||||
+ omap_register_i2c_bus(3, 100, cape_i2c_boardinfo,
|
||||
+ ARRAY_SIZE(cape_i2c_boardinfo));
|
||||
+ return;
|
||||
+}
|
||||
+
|
||||
+
|
||||
/* Setup McASP 1 */
|
||||
static void mcasp1_init(int evm_id, int profile)
|
||||
{
|
||||
@@ -1703,7 +2123,9 @@ static struct evm_dev_cfg beaglebone_old_dev_cfg[] = {
|
||||
{rmii1_init, DEV_ON_BASEBOARD, PROFILE_NONE},
|
||||
{usb0_init, DEV_ON_BASEBOARD, PROFILE_NONE},
|
||||
{usb1_init, DEV_ON_BASEBOARD, PROFILE_NONE},
|
||||
+ {i2c2_init, DEV_ON_BASEBOARD, PROFILE_NONE},
|
||||
{mmc0_init, DEV_ON_BASEBOARD, PROFILE_NONE},
|
||||
+ {boneleds_init, DEV_ON_BASEBOARD, PROFILE_ALL},
|
||||
{NULL, 0, 0},
|
||||
};
|
||||
|
||||
@@ -1713,7 +2135,9 @@ static struct evm_dev_cfg beaglebone_dev_cfg[] = {
|
||||
{mii1_init, DEV_ON_BASEBOARD, PROFILE_NONE},
|
||||
{usb0_init, DEV_ON_BASEBOARD, PROFILE_NONE},
|
||||
{usb1_init, DEV_ON_BASEBOARD, PROFILE_NONE},
|
||||
+ {i2c2_init, DEV_ON_BASEBOARD, PROFILE_NONE},
|
||||
{mmc0_init, DEV_ON_BASEBOARD, PROFILE_NONE},
|
||||
+ {boneleds_init, DEV_ON_BASEBOARD, PROFILE_ALL},
|
||||
{NULL, 0, 0},
|
||||
};
|
||||
|
||||
@@ -1800,6 +2224,7 @@ static void setup_beaglebone_old(void)
|
||||
static void setup_beaglebone(void)
|
||||
{
|
||||
pr_info("The board is a AM335x Beaglebone.\n");
|
||||
+ gp_evm_revision = GP_EVM_ACTUALLY_BEAGLEBONE;
|
||||
|
||||
/* Beagle Bone has Micro-SD slot which doesn't have Write Protect pin */
|
||||
am335x_mmc[0].gpio_wp = -EINVAL;
|
||||
--
|
||||
1.7.7.5
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
From 873c06849ccdb685b5cab1e6e809eda260427d42 Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Tue, 31 Jan 2012 10:04:03 +0100
|
||||
Subject: [PATCH 06/16] more beaglebone merges
|
||||
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/board-am335xevm.c | 63 +++++++++++++++++++++++++++++++--
|
||||
1 files changed, 60 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c
|
||||
index e0c20c5..177ab9e 100644
|
||||
--- a/arch/arm/mach-omap2/board-am335xevm.c
|
||||
+++ b/arch/arm/mach-omap2/board-am335xevm.c
|
||||
@@ -248,6 +248,11 @@ static struct resource tsc_resources[] = {
|
||||
static struct tsc_data am335x_touchscreen_data = {
|
||||
.wires = 4,
|
||||
.x_plate_resistance = 200,
|
||||
+ .mode = TI_TSCADC_TSCMODE,
|
||||
+};
|
||||
+
|
||||
+static struct tsc_data bone_touchscreen_data = {
|
||||
+ .mode = TI_TSCADC_GENMODE,
|
||||
};
|
||||
|
||||
static struct platform_device tsc_device = {
|
||||
@@ -260,6 +265,16 @@ static struct platform_device tsc_device = {
|
||||
.resource = tsc_resources,
|
||||
};
|
||||
|
||||
+static struct platform_device bone_tsc_device = {
|
||||
+ .name = "tsc",
|
||||
+ .id = -1,
|
||||
+ .dev = {
|
||||
+ .platform_data = &bone_touchscreen_data,
|
||||
+ },
|
||||
+ .num_resources = ARRAY_SIZE(tsc_resources),
|
||||
+ .resource = tsc_resources,
|
||||
+};
|
||||
+
|
||||
static u8 am335x_iis_serializer_direction1[] = {
|
||||
INACTIVE_MODE, INACTIVE_MODE, TX_MODE, RX_MODE,
|
||||
INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE,
|
||||
@@ -404,7 +419,7 @@ static bool beaglebone_cape_detected;
|
||||
static int capecount = 0;
|
||||
static bool beaglebone_tsadcpins_free = 1;
|
||||
|
||||
-
|
||||
+#define GP_EVM_REV_IS_1_0 0x1
|
||||
#define GP_EVM_REV_IS_1_0A 0x1
|
||||
#define GP_EVM_REV_IS_1_1A 0x2
|
||||
#define GP_EVM_REV_IS_UNKNOWN 0xFF
|
||||
@@ -1000,6 +1015,47 @@ static struct pinmux_config profibus_pin_mux[] = {
|
||||
{NULL, 0},
|
||||
};
|
||||
|
||||
+/* LEDS - gpio1_21 -> gpio1_24 */
|
||||
+
|
||||
+#define BEAGLEBONE_USR1_LED GPIO_TO_PIN(1, 21)
|
||||
+#define BEAGLEBONE_USR2_LED GPIO_TO_PIN(1, 22)
|
||||
+#define BEAGLEBONE_USR3_LED GPIO_TO_PIN(1, 23)
|
||||
+#define BEAGLEBONE_USR4_LED GPIO_TO_PIN(1, 24)
|
||||
+
|
||||
+static struct gpio_led bone_gpio_leds[] = {
|
||||
+ {
|
||||
+ .name = "beaglebone::usr0",
|
||||
+ .default_trigger = "heartbeat",
|
||||
+ .gpio = BEAGLEBONE_USR1_LED,
|
||||
+ },
|
||||
+ {
|
||||
+ .name = "beaglebone::usr1",
|
||||
+ .default_trigger = "mmc0",
|
||||
+ .gpio = BEAGLEBONE_USR2_LED,
|
||||
+ },
|
||||
+ {
|
||||
+ .name = "beaglebone::usr2",
|
||||
+ .gpio = BEAGLEBONE_USR3_LED,
|
||||
+ },
|
||||
+ {
|
||||
+ .name = "beaglebone::usr3",
|
||||
+ .gpio = BEAGLEBONE_USR4_LED,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct gpio_led_platform_data bone_gpio_led_info = {
|
||||
+ .leds = bone_gpio_leds,
|
||||
+ .num_leds = ARRAY_SIZE(bone_gpio_leds),
|
||||
+};
|
||||
+
|
||||
+static struct platform_device bone_leds_gpio = {
|
||||
+ .name = "leds-gpio",
|
||||
+ .id = -1,
|
||||
+ .dev = {
|
||||
+ .platform_data = &bone_gpio_led_info,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
|
||||
#define BEAGLEBONEDVI_USR0_LED GPIO_TO_PIN(1, 18)
|
||||
#define BEAGLEBONEDVI_USR1_LED GPIO_TO_PIN(1, 19)
|
||||
@@ -1703,11 +1759,11 @@ static void beaglebone_cape_setup(struct memory_accessor *mem_acc, void *context
|
||||
snprintf(tmp, sizeof(cape_config.partnumber) + 1, "%s", cape_config.partnumber);
|
||||
pr_info("BeagleBone cape partnumber: %s\n", tmp);
|
||||
|
||||
- if (!strncmp("BB-BONE-DVID-01", cape_config.partnumber, 5)) {
|
||||
+ if (!strncmp("BB-BONE-DVID-01", cape_config.partnumber, 15)) {
|
||||
pr_info("BeagleBone cape: initializing DVI cape\n");
|
||||
dvi_init(0,0);
|
||||
}
|
||||
- if (!strncmp("LCD01", cape_config.partnumber, 5)) {
|
||||
+ if (!strncmp("BB-BONE-LCD7-01", cape_config.partnumber, 15)) {
|
||||
pr_info("BeagleBone cape: initializing LCD cape\n");
|
||||
bbtoys7lcd_init(0,0);
|
||||
pr_info("BeagleBone cape: initializing LCD cape touchscreen\n");
|
||||
@@ -2154,6 +2210,7 @@ static void setup_general_purpose_evm(void)
|
||||
pr_info("The board is general purpose EVM in profile %d\n", prof_sel);
|
||||
|
||||
if (!strncmp("1.1A", config.version, 4)) {
|
||||
+ pr_info("EVM version is %s\n", config.version);
|
||||
gp_evm_revision = GP_EVM_REV_IS_1_1A;
|
||||
} else if (!strncmp("1.0", config.version, 3)) {
|
||||
gp_evm_revision = GP_EVM_REV_IS_1_0;
|
||||
--
|
||||
1.7.7.5
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
From 6f50bf55f6182ecd09aac93d3b613a99159b606c Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Tue, 31 Jan 2012 10:09:06 +0100
|
||||
Subject: [PATCH 07/16] beaglebone: disable tsadc
|
||||
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/board-am335xevm.c | 4 ++--
|
||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c
|
||||
index 177ab9e..87ccf14 100644
|
||||
--- a/arch/arm/mach-omap2/board-am335xevm.c
|
||||
+++ b/arch/arm/mach-omap2/board-am335xevm.c
|
||||
@@ -248,11 +248,11 @@ static struct resource tsc_resources[] = {
|
||||
static struct tsc_data am335x_touchscreen_data = {
|
||||
.wires = 4,
|
||||
.x_plate_resistance = 200,
|
||||
- .mode = TI_TSCADC_TSCMODE,
|
||||
+// .mode = TI_TSCADC_TSCMODE,
|
||||
};
|
||||
|
||||
static struct tsc_data bone_touchscreen_data = {
|
||||
- .mode = TI_TSCADC_GENMODE,
|
||||
+// .mode = TI_TSCADC_GENMODE,
|
||||
};
|
||||
|
||||
static struct platform_device tsc_device = {
|
||||
--
|
||||
1.7.7.5
|
||||
|
||||
@@ -0,0 +1,411 @@
|
||||
From 7cb067cd1bd237a7a9978747fc4f96fa90b5d146 Mon Sep 17 00:00:00 2001
|
||||
From: Joel A Fernandes <joelagnel@ti.com>
|
||||
Date: Wed, 30 Nov 2011 15:00:40 +0100
|
||||
Subject: [PATCH 08/16] tscadc: Add general purpose mode, untested with
|
||||
touchscreen functionality
|
||||
|
||||
Signed-off-by: Joel A Fernandes <joelagnel@ti.com>
|
||||
|
||||
Conflicts:
|
||||
|
||||
drivers/input/touchscreen/ti_tscadc.c
|
||||
[Fixed by Koen - needs review]
|
||||
---
|
||||
arch/arm/mach-omap2/board-am335xevm.c | 2 +
|
||||
arch/arm/mach-omap2/mux33xx.c | 12 ++
|
||||
arch/arm/mach-omap2/mux33xx.h | 4 +
|
||||
drivers/input/touchscreen/ti_tscadc.c | 209 +++++++++++++++++++++++++--------
|
||||
include/linux/input/ti_tscadc.h | 4 +
|
||||
5 files changed, 180 insertions(+), 51 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c
|
||||
index 87ccf14..c7bb091 100644
|
||||
--- a/arch/arm/mach-omap2/board-am335xevm.c
|
||||
+++ b/arch/arm/mach-omap2/board-am335xevm.c
|
||||
@@ -2182,6 +2182,7 @@ static struct evm_dev_cfg beaglebone_old_dev_cfg[] = {
|
||||
{i2c2_init, DEV_ON_BASEBOARD, PROFILE_NONE},
|
||||
{mmc0_init, DEV_ON_BASEBOARD, PROFILE_NONE},
|
||||
{boneleds_init, DEV_ON_BASEBOARD, PROFILE_ALL},
|
||||
+ {tsc_init, DEV_ON_BASEBOARD, PROFILE_ALL},
|
||||
{NULL, 0, 0},
|
||||
};
|
||||
|
||||
@@ -2194,6 +2195,7 @@ static struct evm_dev_cfg beaglebone_dev_cfg[] = {
|
||||
{i2c2_init, DEV_ON_BASEBOARD, PROFILE_NONE},
|
||||
{mmc0_init, DEV_ON_BASEBOARD, PROFILE_NONE},
|
||||
{boneleds_init, DEV_ON_BASEBOARD, PROFILE_ALL},
|
||||
+ {tsc_init, DEV_ON_BASEBOARD, PROFILE_ALL},
|
||||
{NULL, 0, 0},
|
||||
};
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/mux33xx.c b/arch/arm/mach-omap2/mux33xx.c
|
||||
index 36bb10a..e4cd407 100644
|
||||
--- a/arch/arm/mach-omap2/mux33xx.c
|
||||
+++ b/arch/arm/mach-omap2/mux33xx.c
|
||||
@@ -584,6 +584,18 @@ static struct omap_mux __initdata am33xx_muxmodes[] = {
|
||||
_AM33XX_MUXENTRY(AIN3, 0,
|
||||
"ain3", NULL, NULL, NULL,
|
||||
NULL, NULL, NULL, NULL),
|
||||
+ _AM33XX_MUXENTRY(AIN4, 0,
|
||||
+ "ain4", NULL, NULL, NULL,
|
||||
+ NULL, NULL, NULL, NULL),
|
||||
+ _AM33XX_MUXENTRY(AIN5, 0,
|
||||
+ "ain5", NULL, NULL, NULL,
|
||||
+ NULL, NULL, NULL, NULL),
|
||||
+ _AM33XX_MUXENTRY(AIN6, 0,
|
||||
+ "ain6", NULL, NULL, NULL,
|
||||
+ NULL, NULL, NULL, NULL),
|
||||
+ _AM33XX_MUXENTRY(AIN7, 0,
|
||||
+ "ain7", NULL, NULL, NULL,
|
||||
+ NULL, NULL, NULL, NULL),
|
||||
_AM33XX_MUXENTRY(VREFP, 0,
|
||||
"vrefp", NULL, NULL, NULL,
|
||||
NULL, NULL, NULL, NULL),
|
||||
diff --git a/arch/arm/mach-omap2/mux33xx.h b/arch/arm/mach-omap2/mux33xx.h
|
||||
index 70a3012..348c8e5 100644
|
||||
--- a/arch/arm/mach-omap2/mux33xx.h
|
||||
+++ b/arch/arm/mach-omap2/mux33xx.h
|
||||
@@ -228,6 +228,10 @@
|
||||
#define AM33XX_CONTROL_PADCONF_DDR_DQSN1_OFFSET 0x0AFC
|
||||
#define AM33XX_CONTROL_PADCONF_DDR_VREF_OFFSET 0x0B00
|
||||
#define AM33XX_CONTROL_PADCONF_DDR_VTP_OFFSET 0x0B04
|
||||
+#define AM33XX_CONTROL_PADCONF_AIN7_OFFSET 0x0B10
|
||||
+#define AM33XX_CONTROL_PADCONF_AIN6_OFFSET 0x0B14
|
||||
+#define AM33XX_CONTROL_PADCONF_AIN5_OFFSET 0x0B18
|
||||
+#define AM33XX_CONTROL_PADCONF_AIN4_OFFSET 0x0B1C
|
||||
#define AM33XX_CONTROL_PADCONF_AIN3_OFFSET 0x0B20
|
||||
#define AM33XX_CONTROL_PADCONF_AIN2_OFFSET 0x0B24
|
||||
#define AM33XX_CONTROL_PADCONF_AIN1_OFFSET 0x0B28
|
||||
diff --git a/drivers/input/touchscreen/ti_tscadc.c b/drivers/input/touchscreen/ti_tscadc.c
|
||||
index e3b5775..699503d 100644
|
||||
--- a/drivers/input/touchscreen/ti_tscadc.c
|
||||
+++ b/drivers/input/touchscreen/ti_tscadc.c
|
||||
@@ -27,6 +27,8 @@
|
||||
#include <linux/input/ti_tscadc.h>
|
||||
#include <linux/delay.h>
|
||||
|
||||
+/* Memory mapped registers here have incorrect offsets!
|
||||
+ * Correct after referring TRM */
|
||||
#define TSCADC_REG_IRQEOI 0x020
|
||||
#define TSCADC_REG_RAWIRQSTATUS 0x024
|
||||
#define TSCADC_REG_IRQSTATUS 0x028
|
||||
@@ -54,12 +56,18 @@
|
||||
|
||||
/* Register Bitfields */
|
||||
#define TSCADC_IRQWKUP_ENB BIT(0)
|
||||
-#define TSCADC_STPENB_STEPENB 0x7FFF
|
||||
+#define TSCADC_STPENB_STEPENB_TOUCHSCREEN 0x7FFF
|
||||
+#define TSCADC_STPENB_STEPENB_GENERAL 0x0400
|
||||
#define TSCADC_IRQENB_FIFO0THRES BIT(2)
|
||||
+#define TSCADC_IRQENB_FIFO0OVERRUN BIT(3)
|
||||
#define TSCADC_IRQENB_FIFO1THRES BIT(5)
|
||||
+#define TSCADC_IRQENB_EOS BIT(1)
|
||||
#define TSCADC_IRQENB_PENUP BIT(9)
|
||||
-#define TSCADC_STEPCONFIG_MODE_HWSYNC 0x2
|
||||
+#define TSCADC_STEPCONFIG_MODE_HWSYNC 0x2
|
||||
+#define TSCADC_STEPCONFIG_MODE_SWCONT 0x1
|
||||
+#define TSCADC_STEPCONFIG_MODE_SWONESHOT 0x0
|
||||
#define TSCADC_STEPCONFIG_2SAMPLES_AVG (1 << 4)
|
||||
+#define TSCADC_STEPCONFIG_NO_AVG 0
|
||||
#define TSCADC_STEPCONFIG_XPP BIT(5)
|
||||
#define TSCADC_STEPCONFIG_XNN BIT(6)
|
||||
#define TSCADC_STEPCONFIG_YPP BIT(7)
|
||||
@@ -105,6 +113,7 @@ struct tscadc {
|
||||
int analog_input;
|
||||
int x_plate_resistance;
|
||||
struct clk *tsc_ick;
|
||||
+ int mode;
|
||||
int irq;
|
||||
void __iomem *tsc_base;
|
||||
};
|
||||
@@ -120,6 +129,86 @@ static void tscadc_writel(struct tscadc *tsc, unsigned int reg,
|
||||
writel(val, tsc->tsc_base + reg);
|
||||
}
|
||||
|
||||
+static void tsc_adc_step_config(struct tscadc *ts_dev)
|
||||
+{
|
||||
+ unsigned int stepconfig = 0, delay = 0, chargeconfig = 0;
|
||||
+
|
||||
+ /*
|
||||
+ * Step Configuration
|
||||
+ * software-enabled continous mode
|
||||
+ * 2 sample averaging
|
||||
+ * sample channel 1 (SEL_INP mux bits = 0)
|
||||
+ */
|
||||
+ stepconfig = TSCADC_STEPCONFIG_MODE_SWONESHOT |
|
||||
+ TSCADC_STEPCONFIG_2SAMPLES_AVG |
|
||||
+ (0x7 << 19);
|
||||
+
|
||||
+ delay = TSCADC_STEPCONFIG_SAMPLEDLY | TSCADC_STEPCONFIG_OPENDLY;
|
||||
+
|
||||
+ tscadc_writel(ts_dev, TSCADC_REG_STEPCONFIG(10), stepconfig);
|
||||
+ tscadc_writel(ts_dev, TSCADC_REG_STEPDELAY(10), delay);
|
||||
+
|
||||
+ /* Get the ball rolling, this will trigger the FSM to step through
|
||||
+ * as soon as TSC_ADC_SS is turned on */
|
||||
+ tscadc_writel(ts_dev, TSCADC_REG_SE, TSCADC_STPENB_STEPENB_GENERAL);
|
||||
+}
|
||||
+
|
||||
+static irqreturn_t tsc_adc_interrupt(int irq, void *dev)
|
||||
+{
|
||||
+ struct tscadc *ts_dev = (struct tscadc *)dev;
|
||||
+ struct input_dev *input_dev = ts_dev->input;
|
||||
+ unsigned int status, irqclr = 0;
|
||||
+ int i;
|
||||
+ int fsm = 0, fifo0count = 0, fifo1count = 0;
|
||||
+ unsigned int read_sample = 0, ready1 = 0;
|
||||
+ unsigned int prev_val_x = ~0, prev_val_y = ~0;
|
||||
+ unsigned int prev_diff_x = ~0, prev_diff_y = ~0;
|
||||
+ unsigned int cur_diff_x = 0, cur_diff_y = 0;
|
||||
+ unsigned int val_x = 0, val_y = 0, diffx = 0, diffy = 0;
|
||||
+
|
||||
+ status = tscadc_readl(ts_dev, TSCADC_REG_IRQSTATUS);
|
||||
+
|
||||
+ printk("interrupt! status=%x\n", status);
|
||||
+ // if (status & TSCADC_IRQENB_EOS) {
|
||||
+ // irqclr |= TSCADC_IRQENB_EOS;
|
||||
+ // }
|
||||
+
|
||||
+ if (status & TSCADC_IRQENB_FIFO0THRES) {
|
||||
+ fifo1count = tscadc_readl(ts_dev, TSCADC_REG_FIFO0CNT);
|
||||
+ printk("fifo 0 count = %d\n", fifo1count);
|
||||
+
|
||||
+ for (i = 0; i < fifo1count; i++) {
|
||||
+ read_sample = tscadc_readl(ts_dev, TSCADC_REG_FIFO0);
|
||||
+ printk("sample: %d: %x\n", i, read_sample);
|
||||
+ }
|
||||
+ irqclr |= TSCADC_IRQENB_FIFO0THRES;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ if (status & TSCADC_IRQENB_FIFO1THRES) {
|
||||
+ fifo1count = tscadc_readl(ts_dev, TSCADC_REG_FIFO1CNT);
|
||||
+
|
||||
+ for (i = 0; i < fifo1count; i++) {
|
||||
+ read_sample = tscadc_readl(ts_dev, TSCADC_REG_FIFO1);
|
||||
+ // read_sample = read_sample & 0xfff;
|
||||
+ printk("sample: %d: %d\n", i, read_sample);
|
||||
+ panic("sample read from fifo1!");
|
||||
+ }
|
||||
+ irqclr |= TSCADC_IRQENB_FIFO1THRES;
|
||||
+ }
|
||||
+
|
||||
+ mdelay(500);
|
||||
+
|
||||
+ tscadc_writel(ts_dev, TSCADC_REG_IRQSTATUS, irqclr);
|
||||
+
|
||||
+ /* check pending interrupts */
|
||||
+ tscadc_writel(ts_dev, TSCADC_REG_IRQEOI, 0x0);
|
||||
+
|
||||
+ /* Turn on Step 1 again */
|
||||
+ tscadc_writel(ts_dev, TSCADC_REG_SE, TSCADC_STPENB_STEPENB_GENERAL);
|
||||
+ return IRQ_HANDLED;
|
||||
+}
|
||||
+
|
||||
static void tsc_step_config(struct tscadc *ts_dev)
|
||||
{
|
||||
unsigned int stepconfigx = 0, stepconfigy = 0;
|
||||
@@ -224,7 +313,7 @@ static void tsc_step_config(struct tscadc *ts_dev)
|
||||
tscadc_writel(ts_dev, TSCADC_REG_STEPCONFIG14, stepconfigz2);
|
||||
tscadc_writel(ts_dev, TSCADC_REG_STEPDELAY14, delay);
|
||||
|
||||
- tscadc_writel(ts_dev, TSCADC_REG_SE, TSCADC_STPENB_STEPENB);
|
||||
+ tscadc_writel(ts_dev, TSCADC_REG_SE, TSCADC_STPENB_STEPENB_TOUCHSCREEN);
|
||||
}
|
||||
|
||||
static void tsc_idle_config(struct tscadc *ts_config)
|
||||
@@ -242,7 +331,7 @@ static void tsc_idle_config(struct tscadc *ts_config)
|
||||
tscadc_writel(ts_config, TSCADC_REG_IDLECONFIG, idleconfig);
|
||||
}
|
||||
|
||||
-static irqreturn_t tscadc_interrupt(int irq, void *dev)
|
||||
+static irqreturn_t tsc_interrupt(int irq, void *dev)
|
||||
{
|
||||
struct tscadc *ts_dev = (struct tscadc *)dev;
|
||||
struct input_dev *input_dev = ts_dev->input;
|
||||
@@ -362,7 +451,7 @@ static irqreturn_t tscadc_interrupt(int irq, void *dev)
|
||||
/* check pending interrupts */
|
||||
tscadc_writel(ts_dev, TSCADC_REG_IRQEOI, 0x0);
|
||||
|
||||
- tscadc_writel(ts_dev, TSCADC_REG_SE, TSCADC_STPENB_STEPENB);
|
||||
+ tscadc_writel(ts_dev, TSCADC_REG_SE, TSCADC_STPENB_STEPENB_TOUCHSCREEN);
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
@@ -400,13 +489,15 @@ static int __devinit tscadc_probe(struct platform_device *pdev)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
- input_dev = input_allocate_device();
|
||||
- if (!input_dev) {
|
||||
- dev_err(&pdev->dev, "failed to allocate input device.\n");
|
||||
- err = -ENOMEM;
|
||||
- goto err_free_mem;
|
||||
+ if(pdata->mode == TI_TSCADC_TSCMODE) {
|
||||
+ input_dev = input_allocate_device();
|
||||
+ if (!input_dev) {
|
||||
+ dev_err(&pdev->dev, "failed to allocate input device.\n");
|
||||
+ err = -ENOMEM;
|
||||
+ goto err_free_mem;
|
||||
+ }
|
||||
+ ts_dev->input = input_dev;
|
||||
}
|
||||
- ts_dev->input = input_dev;
|
||||
|
||||
res = request_mem_region(res->start, resource_size(res), pdev->name);
|
||||
if (!res) {
|
||||
@@ -422,8 +513,15 @@ static int __devinit tscadc_probe(struct platform_device *pdev)
|
||||
goto err_release_mem;
|
||||
}
|
||||
|
||||
- err = request_irq(ts_dev->irq, tscadc_interrupt, IRQF_DISABLED,
|
||||
- pdev->dev.driver->name, ts_dev);
|
||||
+ if(pdata->mode == TI_TSCADC_TSCMODE) {
|
||||
+ err = request_irq(ts_dev->irq, tsc_interrupt, IRQF_DISABLED,
|
||||
+ pdev->dev.driver->name, ts_dev);
|
||||
+ }
|
||||
+ else {
|
||||
+ err = request_irq(ts_dev->irq, tsc_adc_interrupt, IRQF_DISABLED,
|
||||
+ pdev->dev.driver->name, ts_dev);
|
||||
+ }
|
||||
+
|
||||
if (err) {
|
||||
dev_err(&pdev->dev, "failed to allocate irq.\n");
|
||||
goto err_unmap_regs;
|
||||
@@ -443,11 +541,17 @@ static int __devinit tscadc_probe(struct platform_device *pdev)
|
||||
goto err_free_irq;
|
||||
}
|
||||
clock_rate = clk_get_rate(clk);
|
||||
+
|
||||
+ /* clk_value of atleast 21MHz required
|
||||
+ * Clock verified on BeagleBone to be 24MHz */
|
||||
+
|
||||
+
|
||||
clk_value = clock_rate / ADC_CLK;
|
||||
if (clk_value < 7) {
|
||||
dev_err(&pdev->dev, "clock input less than min clock requirement\n");
|
||||
goto err_fail;
|
||||
}
|
||||
+
|
||||
/* TSCADC_CLKDIV needs to be configured to the value minus 1 */
|
||||
clk_value = clk_value - 1;
|
||||
tscadc_writel(ts_dev, TSCADC_REG_CLKDIV, clk_value);
|
||||
@@ -458,57 +562,60 @@ static int __devinit tscadc_probe(struct platform_device *pdev)
|
||||
ts_dev->wires = pdata->wires;
|
||||
ts_dev->analog_input = pdata->analog_input;
|
||||
ts_dev->x_plate_resistance = pdata->x_plate_resistance;
|
||||
+ ts_dev->mode = pdata->mode;
|
||||
|
||||
- /* Set the control register bits */
|
||||
+ /* Set the control register bits - 12.5.44 TRM */
|
||||
ctrl = TSCADC_CNTRLREG_STEPCONFIGWRT |
|
||||
- TSCADC_CNTRLREG_TSCENB |
|
||||
- TSCADC_CNTRLREG_STEPID;
|
||||
- switch (ts_dev->wires) {
|
||||
- case 4:
|
||||
- ctrl |= TSCADC_CNTRLREG_4WIRE;
|
||||
- break;
|
||||
- case 5:
|
||||
- ctrl |= TSCADC_CNTRLREG_5WIRE;
|
||||
- break;
|
||||
- case 8:
|
||||
- ctrl |= TSCADC_CNTRLREG_8WIRE;
|
||||
- break;
|
||||
+ TSCADC_CNTRLREG_STEPID;
|
||||
+ if(pdata->mode == TI_TSCADC_TSCMODE) {
|
||||
+ ctrl |= TSCADC_CNTRLREG_TSCENB;
|
||||
+ switch (ts_dev->wires) {
|
||||
+ case 4:
|
||||
+ ctrl |= TSCADC_CNTRLREG_4WIRE;
|
||||
+ break;
|
||||
+ case 5:
|
||||
+ ctrl |= TSCADC_CNTRLREG_5WIRE;
|
||||
+ break;
|
||||
+ case 8:
|
||||
+ ctrl |= TSCADC_CNTRLREG_8WIRE;
|
||||
+ break;
|
||||
+ }
|
||||
}
|
||||
tscadc_writel(ts_dev, TSCADC_REG_CTRL, ctrl);
|
||||
|
||||
- /* Set register bits for Idel Config Mode */
|
||||
- tsc_idle_config(ts_dev);
|
||||
-
|
||||
- /* IRQ Enable */
|
||||
- irqenable = TSCADC_IRQENB_FIFO1THRES;
|
||||
+ /* Touch screen / ADC configuration */
|
||||
+ if(pdata->mode == TI_TSCADC_TSCMODE) {
|
||||
+ tsc_idle_config(ts_dev);
|
||||
+ tsc_step_config(ts_dev);
|
||||
+ tscadc_writel(ts_dev, TSCADC_REG_FIFO1THR, 6);
|
||||
+ irqenable = TSCADC_IRQENB_FIFO1THRES;
|
||||
+ /* Touch screen also needs an input_dev */
|
||||
+ input_dev->name = "ti-tsc-adcc";
|
||||
+ input_dev->dev.parent = &pdev->dev;
|
||||
+ input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
|
||||
+ input_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH);
|
||||
+ input_set_abs_params(input_dev, ABS_X, 0, MAX_12BIT, 0, 0);
|
||||
+ input_set_abs_params(input_dev, ABS_Y, 0, MAX_12BIT, 0, 0);
|
||||
+ /* register to the input system */
|
||||
+ err = input_register_device(input_dev);
|
||||
+ if (err)
|
||||
+ goto err_fail;
|
||||
+ }
|
||||
+ else {
|
||||
+ tsc_adc_step_config(ts_dev);
|
||||
+ tscadc_writel(ts_dev, TSCADC_REG_FIFO0THR, 0);
|
||||
+ irqenable = TSCADC_IRQENB_FIFO0THRES;
|
||||
+ }
|
||||
tscadc_writel(ts_dev, TSCADC_REG_IRQENABLE, irqenable);
|
||||
|
||||
- tsc_step_config(ts_dev);
|
||||
-
|
||||
- tscadc_writel(ts_dev, TSCADC_REG_FIFO1THR, 6);
|
||||
-
|
||||
ctrl |= TSCADC_CNTRLREG_TSCSSENB;
|
||||
- tscadc_writel(ts_dev, TSCADC_REG_CTRL, ctrl);
|
||||
-
|
||||
- input_dev->name = "ti-tsc-adcc";
|
||||
- input_dev->dev.parent = &pdev->dev;
|
||||
-
|
||||
- input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
|
||||
- input_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH);
|
||||
-
|
||||
- input_set_abs_params(input_dev, ABS_X, 0, MAX_12BIT, 0, 0);
|
||||
- input_set_abs_params(input_dev, ABS_Y, 0, MAX_12BIT, 0, 0);
|
||||
- input_set_abs_params(input_dev, ABS_PRESSURE, 0, MAX_12BIT, 0, 0);
|
||||
-
|
||||
- /* register to the input system */
|
||||
- err = input_register_device(input_dev);
|
||||
- if (err)
|
||||
- goto err_fail;
|
||||
+ tscadc_writel(ts_dev, TSCADC_REG_CTRL, ctrl); /* Turn on TSC_ADC */
|
||||
|
||||
platform_set_drvdata(pdev, ts_dev);
|
||||
return 0;
|
||||
|
||||
err_fail:
|
||||
+ printk(KERN_ERR "Fatal error, shutting down TSC_ADC\n");
|
||||
clk_disable(ts_dev->tsc_ick);
|
||||
clk_put(ts_dev->tsc_ick);
|
||||
err_free_irq:
|
||||
diff --git a/include/linux/input/ti_tscadc.h b/include/linux/input/ti_tscadc.h
|
||||
index 2c547bb..850cd4b 100644
|
||||
--- a/include/linux/input/ti_tscadc.h
|
||||
+++ b/include/linux/input/ti_tscadc.h
|
||||
@@ -14,8 +14,12 @@
|
||||
* @x_plate_resistance: X plate resistance.
|
||||
*/
|
||||
|
||||
+#define TI_TSCADC_TSCMODE 0
|
||||
+#define TI_TSCADC_GENMODE 1
|
||||
+
|
||||
struct tsc_data {
|
||||
int wires;
|
||||
int analog_input;
|
||||
int x_plate_resistance;
|
||||
+ int mode;
|
||||
};
|
||||
--
|
||||
1.7.7.5
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
From f7330897eabdf0275cd51213fe1dc778e165d07c Mon Sep 17 00:00:00 2001
|
||||
From: Joel A Fernandes <joelagnel@ti.com>
|
||||
Date: Wed, 30 Nov 2011 15:02:17 +0100
|
||||
Subject: [PATCH 09/16] tscadc: Add board file mfd support, fix warning
|
||||
|
||||
Signed-off-by: Joel A Fernandes <joelagnel@ti.com>
|
||||
|
||||
Conflicts:
|
||||
|
||||
arch/arm/mach-omap2/board-am335xevm.c
|
||||
---
|
||||
arch/arm/mach-omap2/board-am335xevm.c | 2 +-
|
||||
drivers/input/touchscreen/ti_tscadc.c | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c
|
||||
index c7bb091..17705b3 100644
|
||||
--- a/arch/arm/mach-omap2/board-am335xevm.c
|
||||
+++ b/arch/arm/mach-omap2/board-am335xevm.c
|
||||
@@ -2182,7 +2182,7 @@ static struct evm_dev_cfg beaglebone_old_dev_cfg[] = {
|
||||
{i2c2_init, DEV_ON_BASEBOARD, PROFILE_NONE},
|
||||
{mmc0_init, DEV_ON_BASEBOARD, PROFILE_NONE},
|
||||
{boneleds_init, DEV_ON_BASEBOARD, PROFILE_ALL},
|
||||
- {tsc_init, DEV_ON_BASEBOARD, PROFILE_ALL},
|
||||
+ {bone_tsc_init, DEV_ON_BASEBOARD, PROFILE_ALL},
|
||||
{NULL, 0, 0},
|
||||
};
|
||||
|
||||
diff --git a/drivers/input/touchscreen/ti_tscadc.c b/drivers/input/touchscreen/ti_tscadc.c
|
||||
index 699503d..f813564 100644
|
||||
--- a/drivers/input/touchscreen/ti_tscadc.c
|
||||
+++ b/drivers/input/touchscreen/ti_tscadc.c
|
||||
@@ -462,7 +462,7 @@ static irqreturn_t tsc_interrupt(int irq, void *dev)
|
||||
static int __devinit tscadc_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct tscadc *ts_dev;
|
||||
- struct input_dev *input_dev;
|
||||
+ struct input_dev *input_dev = NULL;
|
||||
int err;
|
||||
int clk_value;
|
||||
int clock_rate, irqenable, ctrl;
|
||||
--
|
||||
1.7.7.5
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
From f02d01f3f7bafede91847480a72b50d8a8d45a6a Mon Sep 17 00:00:00 2001
|
||||
From: Joel A Fernandes <joelagnel@ti.com>
|
||||
Date: Wed, 30 Nov 2011 15:03:59 +0100
|
||||
Subject: [PATCH 10/16] AM335X: init tsc bone style for new boards
|
||||
|
||||
Signed-off-by: Joel A Fernandes <joelagnel@ti.com>
|
||||
---
|
||||
arch/arm/mach-omap2/board-am335xevm.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c
|
||||
index 17705b3..ac4f78f 100644
|
||||
--- a/arch/arm/mach-omap2/board-am335xevm.c
|
||||
+++ b/arch/arm/mach-omap2/board-am335xevm.c
|
||||
@@ -2195,7 +2195,7 @@ static struct evm_dev_cfg beaglebone_dev_cfg[] = {
|
||||
{i2c2_init, DEV_ON_BASEBOARD, PROFILE_NONE},
|
||||
{mmc0_init, DEV_ON_BASEBOARD, PROFILE_NONE},
|
||||
{boneleds_init, DEV_ON_BASEBOARD, PROFILE_ALL},
|
||||
- {tsc_init, DEV_ON_BASEBOARD, PROFILE_ALL},
|
||||
+ {bone_tsc_init, DEV_ON_BASEBOARD, PROFILE_ALL},
|
||||
{NULL, 0, 0},
|
||||
};
|
||||
|
||||
--
|
||||
1.7.7.5
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
From 0524d48ca4e3178d89d940b38f1fa26cf448ebb8 Mon Sep 17 00:00:00 2001
|
||||
From: Joel A Fernandes <joelagnel@ti.com>
|
||||
Date: Mon, 28 Nov 2011 18:18:04 -0600
|
||||
Subject: [PATCH 11/16] tscadc: make stepconfig channel-configurable
|
||||
|
||||
Signed-off-by: Joel A Fernandes <joelagnel@ti.com>
|
||||
---
|
||||
drivers/input/touchscreen/ti_tscadc.c | 8 +++++---
|
||||
1 files changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/drivers/input/touchscreen/ti_tscadc.c b/drivers/input/touchscreen/ti_tscadc.c
|
||||
index f813564..0b91bdc 100644
|
||||
--- a/drivers/input/touchscreen/ti_tscadc.c
|
||||
+++ b/drivers/input/touchscreen/ti_tscadc.c
|
||||
@@ -129,7 +129,9 @@ static void tscadc_writel(struct tscadc *tsc, unsigned int reg,
|
||||
writel(val, tsc->tsc_base + reg);
|
||||
}
|
||||
|
||||
-static void tsc_adc_step_config(struct tscadc *ts_dev)
|
||||
+/* Configure ADC to sample on channel (1-8) */
|
||||
+
|
||||
+static void tsc_adc_step_config(struct tscadc *ts_dev, int channel)
|
||||
{
|
||||
unsigned int stepconfig = 0, delay = 0, chargeconfig = 0;
|
||||
|
||||
@@ -141,7 +143,7 @@ static void tsc_adc_step_config(struct tscadc *ts_dev)
|
||||
*/
|
||||
stepconfig = TSCADC_STEPCONFIG_MODE_SWONESHOT |
|
||||
TSCADC_STEPCONFIG_2SAMPLES_AVG |
|
||||
- (0x7 << 19);
|
||||
+ ((channel-1) << 19);
|
||||
|
||||
delay = TSCADC_STEPCONFIG_SAMPLEDLY | TSCADC_STEPCONFIG_OPENDLY;
|
||||
|
||||
@@ -602,7 +604,7 @@ static int __devinit tscadc_probe(struct platform_device *pdev)
|
||||
goto err_fail;
|
||||
}
|
||||
else {
|
||||
- tsc_adc_step_config(ts_dev);
|
||||
+ tsc_adc_step_config(ts_dev, 8);
|
||||
tscadc_writel(ts_dev, TSCADC_REG_FIFO0THR, 0);
|
||||
irqenable = TSCADC_IRQENB_FIFO0THRES;
|
||||
}
|
||||
--
|
||||
1.7.7.5
|
||||
|
||||
@@ -0,0 +1,147 @@
|
||||
From 5b0c06b556db15cac8d14eb7e74307521481e185 Mon Sep 17 00:00:00 2001
|
||||
From: Joel A Fernandes <joelagnel@ti.com>
|
||||
Date: Mon, 28 Nov 2011 20:55:25 -0600
|
||||
Subject: [PATCH 12/16] tscadc: Trigger through sysfs
|
||||
|
||||
Signed-off-by: Joel A Fernandes <joelagnel@ti.com>
|
||||
|
||||
Conflicts:
|
||||
|
||||
drivers/input/touchscreen/ti_tscadc.c
|
||||
---
|
||||
drivers/input/touchscreen/ti_tscadc.c | 60 ++++++++++++++++++++++++++++++---
|
||||
include/linux/input/ti_tscadc.h | 1 +
|
||||
2 files changed, 56 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/drivers/input/touchscreen/ti_tscadc.c b/drivers/input/touchscreen/ti_tscadc.c
|
||||
index 0b91bdc..a74d9ba 100644
|
||||
--- a/drivers/input/touchscreen/ti_tscadc.c
|
||||
+++ b/drivers/input/touchscreen/ti_tscadc.c
|
||||
@@ -26,6 +26,17 @@
|
||||
#include <linux/io.h>
|
||||
#include <linux/input/ti_tscadc.h>
|
||||
#include <linux/delay.h>
|
||||
+#include <linux/device.h>
|
||||
+
|
||||
+size_t do_adc_sample(struct kobject *, struct attribute *, char *);
|
||||
+static DEVICE_ATTR(ain1, S_IRUGO, do_adc_sample, NULL);
|
||||
+static DEVICE_ATTR(ain2, S_IRUGO, do_adc_sample, NULL);
|
||||
+static DEVICE_ATTR(ain3, S_IRUGO, do_adc_sample, NULL);
|
||||
+static DEVICE_ATTR(ain4, S_IRUGO, do_adc_sample, NULL);
|
||||
+static DEVICE_ATTR(ain5, S_IRUGO, do_adc_sample, NULL);
|
||||
+static DEVICE_ATTR(ain6, S_IRUGO, do_adc_sample, NULL);
|
||||
+static DEVICE_ATTR(ain7, S_IRUGO, do_adc_sample, NULL);
|
||||
+static DEVICE_ATTR(ain8, S_IRUGO, do_adc_sample, NULL);
|
||||
|
||||
/* Memory mapped registers here have incorrect offsets!
|
||||
* Correct after referring TRM */
|
||||
@@ -144,12 +155,12 @@ static void tsc_adc_step_config(struct tscadc *ts_dev, int channel)
|
||||
stepconfig = TSCADC_STEPCONFIG_MODE_SWONESHOT |
|
||||
TSCADC_STEPCONFIG_2SAMPLES_AVG |
|
||||
((channel-1) << 19);
|
||||
-
|
||||
+
|
||||
delay = TSCADC_STEPCONFIG_SAMPLEDLY | TSCADC_STEPCONFIG_OPENDLY;
|
||||
|
||||
tscadc_writel(ts_dev, TSCADC_REG_STEPCONFIG(10), stepconfig);
|
||||
tscadc_writel(ts_dev, TSCADC_REG_STEPDELAY(10), delay);
|
||||
-
|
||||
+
|
||||
/* Get the ball rolling, this will trigger the FSM to step through
|
||||
* as soon as TSC_ADC_SS is turned on */
|
||||
tscadc_writel(ts_dev, TSCADC_REG_SE, TSCADC_STPENB_STEPENB_GENERAL);
|
||||
@@ -199,7 +210,7 @@ static irqreturn_t tsc_adc_interrupt(int irq, void *dev)
|
||||
irqclr |= TSCADC_IRQENB_FIFO1THRES;
|
||||
}
|
||||
|
||||
- mdelay(500);
|
||||
+ // mdelay(500);
|
||||
|
||||
tscadc_writel(ts_dev, TSCADC_REG_IRQSTATUS, irqclr);
|
||||
|
||||
@@ -207,7 +218,7 @@ static irqreturn_t tsc_adc_interrupt(int irq, void *dev)
|
||||
tscadc_writel(ts_dev, TSCADC_REG_IRQEOI, 0x0);
|
||||
|
||||
/* Turn on Step 1 again */
|
||||
- tscadc_writel(ts_dev, TSCADC_REG_SE, TSCADC_STPENB_STEPENB_GENERAL);
|
||||
+ // tscadc_writel(ts_dev, TSCADC_REG_SE, TSCADC_STPENB_STEPENB_GENERAL);
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
@@ -461,6 +472,34 @@ static irqreturn_t tsc_interrupt(int irq, void *dev)
|
||||
* The functions for inserting/removing driver as a module.
|
||||
*/
|
||||
|
||||
+size_t do_adc_sample(struct kobject *kobj, struct attribute *attr, char *buf) {
|
||||
+ struct platform_device *pdev;
|
||||
+ struct device *dev;
|
||||
+ struct tscadc *ts_dev;
|
||||
+ int channel_num;
|
||||
+
|
||||
+ pdev = (struct platform_device *)container_of(kobj, struct device, kobj);
|
||||
+ dev = &pdev->dev;
|
||||
+
|
||||
+ ts_dev = dev_get_drvdata(dev);
|
||||
+
|
||||
+ if(strncmp(attr->name, "ain", 3)) {
|
||||
+ printk("Invalid ain num\n");
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ channel_num = attr->name[3] - 0x30;
|
||||
+ if(channel_num > 8 || channel_num < 1) {
|
||||
+ printk("Invalid channel_num=%d\n", channel_num);
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ tsc_adc_step_config(ts_dev, channel_num);
|
||||
+
|
||||
+ memcpy(buf, attr->name, strlen(attr->name)+1);
|
||||
+ return strlen(attr->name);
|
||||
+}
|
||||
+
|
||||
static int __devinit tscadc_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct tscadc *ts_dev;
|
||||
@@ -472,6 +511,18 @@ static int __devinit tscadc_probe(struct platform_device *pdev)
|
||||
struct resource *res;
|
||||
struct clk *clk;
|
||||
|
||||
+ printk("dev addr = %p\n", &pdev->dev);
|
||||
+ printk("pdev addr = %p\n", pdev);
|
||||
+
|
||||
+ device_create_file(&pdev->dev, &dev_attr_ain1);
|
||||
+ device_create_file(&pdev->dev, &dev_attr_ain2);
|
||||
+ device_create_file(&pdev->dev, &dev_attr_ain3);
|
||||
+ device_create_file(&pdev->dev, &dev_attr_ain4);
|
||||
+ device_create_file(&pdev->dev, &dev_attr_ain5);
|
||||
+ device_create_file(&pdev->dev, &dev_attr_ain6);
|
||||
+ device_create_file(&pdev->dev, &dev_attr_ain7);
|
||||
+ device_create_file(&pdev->dev, &dev_attr_ain8);
|
||||
+
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
if (!res) {
|
||||
dev_err(&pdev->dev, "no memory resource defined.\n");
|
||||
@@ -604,7 +655,6 @@ static int __devinit tscadc_probe(struct platform_device *pdev)
|
||||
goto err_fail;
|
||||
}
|
||||
else {
|
||||
- tsc_adc_step_config(ts_dev, 8);
|
||||
tscadc_writel(ts_dev, TSCADC_REG_FIFO0THR, 0);
|
||||
irqenable = TSCADC_IRQENB_FIFO0THRES;
|
||||
}
|
||||
diff --git a/include/linux/input/ti_tscadc.h b/include/linux/input/ti_tscadc.h
|
||||
index 850cd4b..fc239c6 100644
|
||||
--- a/include/linux/input/ti_tscadc.h
|
||||
+++ b/include/linux/input/ti_tscadc.h
|
||||
@@ -13,6 +13,7 @@
|
||||
* 0.
|
||||
* @x_plate_resistance: X plate resistance.
|
||||
*/
|
||||
+#include <linux/device.h>
|
||||
|
||||
#define TI_TSCADC_TSCMODE 0
|
||||
#define TI_TSCADC_GENMODE 1
|
||||
--
|
||||
1.7.7.5
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
From edb40d9ed626b634bfe71c39a02602e2ae871175 Mon Sep 17 00:00:00 2001
|
||||
From: Joel A Fernandes <joelagnel@ti.com>
|
||||
Date: Mon, 28 Nov 2011 20:56:48 -0600
|
||||
Subject: [PATCH 13/16] meta-ti: Remove debug messages for meta-ti
|
||||
|
||||
Signed-off-by: Joel A Fernandes <joelagnel@ti.com>
|
||||
---
|
||||
drivers/input/touchscreen/ti_tscadc.c | 4 ++--
|
||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/input/touchscreen/ti_tscadc.c b/drivers/input/touchscreen/ti_tscadc.c
|
||||
index a74d9ba..1f9cbf5 100644
|
||||
--- a/drivers/input/touchscreen/ti_tscadc.c
|
||||
+++ b/drivers/input/touchscreen/ti_tscadc.c
|
||||
@@ -181,14 +181,14 @@ static irqreturn_t tsc_adc_interrupt(int irq, void *dev)
|
||||
|
||||
status = tscadc_readl(ts_dev, TSCADC_REG_IRQSTATUS);
|
||||
|
||||
- printk("interrupt! status=%x\n", status);
|
||||
+ // printk("interrupt! status=%x\n", status);
|
||||
// if (status & TSCADC_IRQENB_EOS) {
|
||||
// irqclr |= TSCADC_IRQENB_EOS;
|
||||
// }
|
||||
|
||||
if (status & TSCADC_IRQENB_FIFO0THRES) {
|
||||
fifo1count = tscadc_readl(ts_dev, TSCADC_REG_FIFO0CNT);
|
||||
- printk("fifo 0 count = %d\n", fifo1count);
|
||||
+ // printk("fifo 0 count = %d\n", fifo1count);
|
||||
|
||||
for (i = 0; i < fifo1count; i++) {
|
||||
read_sample = tscadc_readl(ts_dev, TSCADC_REG_FIFO0);
|
||||
--
|
||||
1.7.7.5
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
From f36d060e6965cdbf797308fb2d80a77c4bbaeac3 Mon Sep 17 00:00:00 2001
|
||||
From: Joel A Fernandes <joelagnel@ti.com>
|
||||
Date: Tue, 29 Nov 2011 09:44:22 -0600
|
||||
Subject: [PATCH 14/16] tscadc: switch to polling instead of interrupts
|
||||
|
||||
Signed-off-by: Joel A Fernandes <joelagnel@ti.com>
|
||||
---
|
||||
drivers/input/touchscreen/ti_tscadc.c | 16 ++++++++++++++--
|
||||
1 files changed, 14 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/input/touchscreen/ti_tscadc.c b/drivers/input/touchscreen/ti_tscadc.c
|
||||
index 1f9cbf5..8e2a994 100644
|
||||
--- a/drivers/input/touchscreen/ti_tscadc.c
|
||||
+++ b/drivers/input/touchscreen/ti_tscadc.c
|
||||
@@ -477,6 +477,8 @@ size_t do_adc_sample(struct kobject *kobj, struct attribute *attr, char *buf) {
|
||||
struct device *dev;
|
||||
struct tscadc *ts_dev;
|
||||
int channel_num;
|
||||
+ int fifo0count = 0;
|
||||
+ int read_sample = 0;
|
||||
|
||||
pdev = (struct platform_device *)container_of(kobj, struct device, kobj);
|
||||
dev = &pdev->dev;
|
||||
@@ -496,7 +498,17 @@ size_t do_adc_sample(struct kobject *kobj, struct attribute *attr, char *buf) {
|
||||
|
||||
tsc_adc_step_config(ts_dev, channel_num);
|
||||
|
||||
- memcpy(buf, attr->name, strlen(attr->name)+1);
|
||||
+ do {
|
||||
+ fifo0count = tscadc_readl(ts_dev, TSCADC_REG_FIFO0CNT);
|
||||
+ }
|
||||
+ while (!fifo0count);
|
||||
+
|
||||
+ while (fifo0count--) {
|
||||
+ read_sample = tscadc_readl(ts_dev, TSCADC_REG_FIFO0) & 0xfff;
|
||||
+ // printk("polling sample: %d: %x\n", fifo0count, read_sample);
|
||||
+ }
|
||||
+ sprintf(buf, "%d", read_sample);
|
||||
+
|
||||
return strlen(attr->name);
|
||||
}
|
||||
|
||||
@@ -656,7 +668,7 @@ static int __devinit tscadc_probe(struct platform_device *pdev)
|
||||
}
|
||||
else {
|
||||
tscadc_writel(ts_dev, TSCADC_REG_FIFO0THR, 0);
|
||||
- irqenable = TSCADC_IRQENB_FIFO0THRES;
|
||||
+ irqenable = 0; // TSCADC_IRQENB_FIFO0THRES;
|
||||
}
|
||||
tscadc_writel(ts_dev, TSCADC_REG_IRQENABLE, irqenable);
|
||||
|
||||
--
|
||||
1.7.7.5
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
From 9289020d4d0f1dc6a973feca4b6465ee1dbcb1b7 Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Tue, 31 Jan 2012 14:50:55 +0100
|
||||
Subject: [PATCH 15/16] beaglebone: fix ADC init
|
||||
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/board-am335xevm.c | 6 ++----
|
||||
1 files changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c
|
||||
index ac4f78f..177ab9e 100644
|
||||
--- a/arch/arm/mach-omap2/board-am335xevm.c
|
||||
+++ b/arch/arm/mach-omap2/board-am335xevm.c
|
||||
@@ -248,11 +248,11 @@ static struct resource tsc_resources[] = {
|
||||
static struct tsc_data am335x_touchscreen_data = {
|
||||
.wires = 4,
|
||||
.x_plate_resistance = 200,
|
||||
-// .mode = TI_TSCADC_TSCMODE,
|
||||
+ .mode = TI_TSCADC_TSCMODE,
|
||||
};
|
||||
|
||||
static struct tsc_data bone_touchscreen_data = {
|
||||
-// .mode = TI_TSCADC_GENMODE,
|
||||
+ .mode = TI_TSCADC_GENMODE,
|
||||
};
|
||||
|
||||
static struct platform_device tsc_device = {
|
||||
@@ -2182,7 +2182,6 @@ static struct evm_dev_cfg beaglebone_old_dev_cfg[] = {
|
||||
{i2c2_init, DEV_ON_BASEBOARD, PROFILE_NONE},
|
||||
{mmc0_init, DEV_ON_BASEBOARD, PROFILE_NONE},
|
||||
{boneleds_init, DEV_ON_BASEBOARD, PROFILE_ALL},
|
||||
- {bone_tsc_init, DEV_ON_BASEBOARD, PROFILE_ALL},
|
||||
{NULL, 0, 0},
|
||||
};
|
||||
|
||||
@@ -2195,7 +2194,6 @@ static struct evm_dev_cfg beaglebone_dev_cfg[] = {
|
||||
{i2c2_init, DEV_ON_BASEBOARD, PROFILE_NONE},
|
||||
{mmc0_init, DEV_ON_BASEBOARD, PROFILE_NONE},
|
||||
{boneleds_init, DEV_ON_BASEBOARD, PROFILE_ALL},
|
||||
- {bone_tsc_init, DEV_ON_BASEBOARD, PROFILE_ALL},
|
||||
{NULL, 0, 0},
|
||||
};
|
||||
|
||||
--
|
||||
1.7.7.5
|
||||
|
||||
3566
recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/defconfig
Normal file
3566
recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/defconfig
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
46
recipes-kernel/linux/linux-ti33x-psp_3.2.bb
Normal file
46
recipes-kernel/linux/linux-ti33x-psp_3.2.bb
Normal file
@@ -0,0 +1,46 @@
|
||||
SECTION = "kernel"
|
||||
DESCRIPTION = "Linux kernel for TI33x EVM from PSP, based on am335x-kernel"
|
||||
LICENSE = "GPLv2"
|
||||
KERNEL_IMAGETYPE = "uImage"
|
||||
|
||||
require multi-kernel.inc
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
MULTI_CONFIG_BASE_SUFFIX = ""
|
||||
|
||||
BRANCH = "v3.2-staging"
|
||||
SRCREV = "83d907e1b05dabc44f3bb64532d7b58d059a14c0"
|
||||
MACHINE_KERNEL_PR_append = "a+gitr${SRCREV}"
|
||||
|
||||
COMPATIBLE_MACHINE = "(ti33x)"
|
||||
|
||||
THISDIR := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}"
|
||||
CONFIGS_PSP = "${@base_set_filespath(["${THISDIR}/${PN}-${PV}/tipspkernel"], d)}:\
|
||||
${@base_set_filespath(["${THISDIR}/${PN}/tipspkernel"], d)}:\
|
||||
${@base_set_filespath(["${THISDIR}/files/tipspkernel"], d)}:"
|
||||
FILESPATH =. "${@base_contains('DISTRO_FEATURES', 'tipspkernel', "${CONFIGS_PSP}", "", d)}"
|
||||
|
||||
SRC_URI += "git://arago-project.org/git/projects/linux-am33x.git;protocol=http;branch=${BRANCH} \
|
||||
file://defconfig"
|
||||
|
||||
PATCHES_OVER_PSP = " \
|
||||
file://0001-f_rndis-HACK-around-undefined-variables.patch \
|
||||
file://0002-da8xx-fb-add-DVI-support-for-beaglebone.patch \
|
||||
file://0003-arm-omap-mux33xx-Add-i2c2-pin-mux.patch \
|
||||
file://0004-omap-hwmod-33xx-Add-support-for-third-i2c-bus.patch \
|
||||
file://0005-beaglebone-rebase-everything-onto-3.2-WARNING-MEGAPA.patch \
|
||||
file://0006-more-beaglebone-merges.patch \
|
||||
file://0007-beaglebone-disable-tsadc.patch \
|
||||
file://0008-tscadc-Add-general-purpose-mode-untested-with-touchs.patch \
|
||||
file://0009-tscadc-Add-board-file-mfd-support-fix-warning.patch \
|
||||
file://0010-AM335X-init-tsc-bone-style-for-new-boards.patch \
|
||||
file://0011-tscadc-make-stepconfig-channel-configurable.patch \
|
||||
file://0012-tscadc-Trigger-through-sysfs.patch \
|
||||
file://0013-meta-ti-Remove-debug-messages-for-meta-ti.patch \
|
||||
file://0014-tscadc-switch-to-polling-instead-of-interrupts.patch \
|
||||
file://0015-beaglebone-fix-ADC-init.patch \
|
||||
"
|
||||
|
||||
SRC_URI += "${@base_contains('DISTRO_FEATURES', 'tipspkernel', "", "${PATCHES_OVER_PSP}", d)}"
|
||||
SRC_URI_append_beaglebone = " file://logo_linux_clut224.ppm"
|
||||
Reference in New Issue
Block a user