Dear All,
I am using phytec phyCore AM3359 board and would like to access DS18B20 at GPIO pin. I have configured the board as briefly explained in following:
a)
done kernel configuration with "ptxdist kernelconfig" and enabled "GPIO 1-wire busmaster" and "Thermal Family Implentation" like:
Device Drivers>
* Dallas 1-wire Support>
1-wire Bus Masters->
* GPIO 1-wire busmaster
1-wire Slaves->
*Thermal family implentation
b)
modified the the soruce calss of the board (board-pcm051.c):
Code:
static struct pinmux_config w1_gpio_pin_mux[] = {
{"gpmc_csn1.gpio1_31", OMAP_MUX_MODE7|AM33XX_PIN_OUTPUT},
{NULL, 0},
};
#define PCM051_W1_PIN GPIO_TO_PIN(1, 31)
static struct w1_gpio_platform_data w1_gpio_pdata={
.pin =PCM051_W1_PIN,
.is_open_drain = 0,
};
static struct platform_device w1_device = {
.name = "w1-gpio",
.id = -1,
.dev.platform_data = &w1_gpio_pdata,
};
static void __init pcm051_w1_init(void)
{
int err;
setup_pin_mux(w1_gpio_pin_mux);
err = platform_device_register(&w1_device);
if(err)
{
pr_err(" failed to register temp sensor device: DS18B \n");
}
else
{
printk("successfull: temp sensor");
}
}
static void __init pcm051_init(void)
{
......
pcm051_w1_init();
}
I also modified the mux.c (u-boot/boards/phyTec/mux.c):
...
Code:
{OFFSET(gpmc_csn1.gpio1_31), MODE(7) | RXACTIVE |PULLUDEN}
...
Result: I can see that master pulls the bus low for specific time interval and then slave pulls the bus low for a specific interval. These time intervals are exactly according to the initialization of DS18B20 as described in data sheet. It means that initialization is performed successfully. But I am not able to see any directory for this temperature sensor in the sysfs.I can see only following:
driver w1_master_pointer
power w1_master_pullup
subsystem w1_master_remove
uevent w1_master_search
w1_master_add w1_master_slave_count
w1_master_attempts w1_master_slaves
w1_master_max_slave_count w1_master_timeout
w1_master_name
Please help me to sort out this problem.
Regards,
Irfan