Other Parts Discussed in Thread: TPS65217
Hi,
I am using AM335x board, the temperature sensor DS18B20 is not working on my board. I have connected the sensor as per the data sheet. I have provided a pull up resistor of 4.7k ohm between the data pin(DQ) and supply pin(VDD).
I have used the GPIO 1_6 pin as the GPIO in the AM335x board for 1 wire communication. I have enabled the Dallas 1 wire protocol in the device drivers using menuconfig. In the menuconfig I have enabled the "GPIO 1-wire busmaster" as the master and "Thermal family implementation" as the slave.
In the board file board-am335xevm.c I have made the following addition to configure for 1 wire communication
static struct w1_gpio_platform_data w1_gpio_pdata = {
.pin = GPIO_TO_PIN(1, 6),
.is_open_drain = 0,
};
static struct platform_device w1_device = {
.name = "w1-gpio",
.id = -1,
.dev.platform_data = &w1_gpio_pdata,
};
void w1_init(void)
{
int err;
err = platform_device_register(&w1_device);
if (err) {
pr_err("failed to register w1 temp sensor device: ds18b20\n");
}
else
{
printk("successful regn of temp sensor \n");
}
}
I am not able to see any directory for this temperature sensor in the sysfs, I feel this sensor is not detected by the AM335x processor.
root@am335x-evm:/sys/devices/w1_bus_master1# ls
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
root@am335x-evm:/sys/devices/w1_bus_master1#
I have also tried the other temperature sensor DS18S20 which did not work.I would request you to help me out and provide me support to make the temperature sensor work on my AM335x board.
Thanks and regards,
Ajit
