Dear all,
I am using phytec phyCore AM3359 board and would like to access DS18B20 via available gpio pins at GPIO Expansion board. Please tell me how to do it?
Following i explain briefly what i have done so far 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 board-pcm051.c:
static struct pinmux_config w1_gpio_pin_mux[] = { {"gpmc_csn1.gpio1_30", OMAP_MUX_MODE7|AM33XX_PIN_OUTPUT}, {NULL, 0}, };
#define PCM051_W1_PIN GPIO_TO_PIN(1, 30)
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(); }
Result: i can see (using oscilloscop) that slave (DS1820) responses to master but slave is not detected as no respective directory is found in sys file sytsem:
Please help me out to configure the DS18B20 with GPIO.
Best Regards, Irfan Rafique