This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

still a question about beagleboard-xm with touchscreen

Other Parts Discussed in Thread: ADS7846, ADS7864

now ,i get some problems about bb-xm with touchscreen,theuboot (2010-12) linux kernel 2.6.32 from modified dvsdk4.0.1.

the main core problem is :

linux kernel start ,but it can not detect touchscreen ;i sure i modify some main place refer to other message;

to my suprised ,i find i use a uboot(2010-6) from ubuntu11.04 's uboot which is from bb-xm product  ,it can detect touchscreen and works well.

so ,to my understanding ,uboot can not effect linux .

of course , i also hope to what i do that can solve my problem.

that is my touchscreen configure message:

in mach-omap2.c:

#ifdef CONFIG_TOUCHSCREEN_ADS7846

#define OMAP3_BEAGLE_TS_GPIO       162 /* gpio_133 for v1.0 */

#include <plat/mcspi.h>
#include <linux/spi/spi.h>
#include <linux/spi/ads7846.h>     //for ads7864 touchscreen  

static struct omap2_mcspi_device_config ads7846_mcspi_config = {
        .turbo_mode     = 0,
        .single_channel = 1,    /* 0: slave, 1: master */
};

static int ads7846_get_pendown_state(void)
{
        return !gpio_get_value(OMAP3_BEAGLE_TS_GPIO);
}

struct ads7846_platform_data ads7846_config = {
        .x_max                  = 0x0fff,
        .y_max                  = 0x0fff,
        .x_plate_ohms           = 180,
        .pressure_max           = 255,
        .debounce_max           = 10,
        .debounce_tol           = 3,
        .debounce_rep           = 1,
        .get_pendown_state      = ads7846_get_pendown_state,
        .keep_vref_on           = 1,
        .settle_delay_usecs     = 150,
        .wakeup                    = true,
};

struct spi_board_info omap3beagle_spi_board_info[] = {
        [0] = {
                .modalias               = "ads7846",
                .bus_num                = 3,
                .chip_select            = 0,
                .max_speed_hz           = 1500000,
                .controller_data        = &ads7846_mcspi_config,
                .irq                    = OMAP_GPIO_IRQ(OMAP3_BEAGLE_TS_GPIO),
                .platform_data          = &ads7846_config,
        },
};


static void ads7846_dev_init(void)
{
    printk("Initialize ads7846 touch screen controller\n");

        if (gpio_request(OMAP3_BEAGLE_TS_GPIO, "ADS7846 pendown") < 0)
                printk(KERN_ERR "can't get ads7846 pen down GPIO\n");

        gpio_direction_input(OMAP3_BEAGLE_TS_GPIO);

        omap_set_gpio_debounce(OMAP3_BEAGLE_TS_GPIO, 1);
        omap_set_gpio_debounce_time(OMAP3_BEAGLE_TS_GPIO, 0xa);
}

#else
static inline void __init ads7846_dev_init(void) { return; }
#endif

static void __init omap3_beagle_init(void)
{
    omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
    omap3_beagle_init_rev();
    omap3_beagle_i2c_init();

    if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XMAB) ||
        (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XMC)) {
        gpio_buttons[0].gpio = 4;
    }

    platform_add_devices(omap3_beagle_devices,
            ARRAY_SIZE(omap3_beagle_devices));
    spi_register_board_info(omap3beagle_spi_board_info, ARRAY_SIZE(omap3beagle_spi_board_info));//by gzz
    omap_serial_init();
    static struct regulator_consumer_supply beagle_vio_supply = REGULATOR_SUPPLY("vcc", "spi3.0");

    omap_mux_init_gpio(170, OMAP_PIN_INPUT);
    gpio_request(170, "DVI_nPD");
    /* REVISIT leave DVI powered down until it's needed ... */
    gpio_direction_output(170, true);

    if(!strcmp(expansionboard_name, "zippy"))
    {
        printk(KERN_INFO "Beagle expansionboard: initializing enc28j60\n");
        omap3beagle_enc28j60_init();
        printk(KERN_INFO "Beagle expansionboard: assigning GPIO 141 and 162 to MMC1\n");
        mmc[1].gpio_wp = 141;
        mmc[1].gpio_cd = 162;
    }

    if(!strcmp(expansionboard_name, "zippy2"))
    {
        printk(KERN_INFO "Beagle expansionboard: initializing ks_8851\n");
        omap3beagle_ks8851_init();
        printk(KERN_INFO "Beagle expansionboard: assigning GPIO 141 and 162 to MMC1\n");
        mmc[1].gpio_wp = 141;
        mmc[1].gpio_cd = 162;
    }

    if(!strcmp(expansionboard_name, "trainer"))
    {
        printk(KERN_INFO "Beagle expansionboard: exporting GPIOs 130-141,162 to userspace\n");
        gpio_request(130, "sysfs");
        gpio_export(130, 1);
        gpio_request(131, "sysfs");
        gpio_export(131, 1);
        gpio_request(132, "sysfs");
        gpio_export(132, 1);
        gpio_request(133, "sysfs");
        gpio_export(133, 1);
        gpio_request(134, "sysfs");
        gpio_export(134, 1);
        gpio_request(135, "sysfs");
        gpio_export(135, 1);
        gpio_request(136, "sysfs");
        gpio_export(136, 1);
        gpio_request(137, "sysfs");
        gpio_export(137, 1);
        gpio_request(138, "sysfs");
        gpio_export(138, 1);
        gpio_request(139, "sysfs");
        gpio_export(139, 1);
        gpio_request(140, "sysfs");
        gpio_export(140, 1);
        gpio_request(141, "sysfs");
        gpio_export(141, 1);
        gpio_request(162, "sysfs");
        gpio_export(162, 1);
    }

    if(!strcmp(expansionboard_name, "beaglefpga"))
    {
        printk(KERN_INFO "Beagle expansionboard: Using McSPI for SPI\n");
        beaglefpga_init_spi();
    }

    usb_musb_init();
    usb_ehci_init(&ehci_pdata);
    omap3beagle_flash_init();
    
    ads7846_dev_init();//bg gzz

    /* Ensure SDRC pins are mux'd for self-refresh */
    omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
    omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);

    beagle_display_init();
}

help me ,thank you!!!,is it the uboot problem or linux ???