Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.


  Search this Thread
Old 06-25-2013, 10:35 AM   #1
LQ Newbie
Registered: Apr 2013
Posts: 2

Rep: Reputation: Disabled
Interface 1-wire DS18B20 over GPIO pin using AM3359

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:

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
modified the the soruce calss of the board (board-pcm051.c):

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;
           err = platform_device_register(&w1_device);
               pr_err(" failed to register temp sensor device: DS18B \n");
              printk("successfull: temp sensor");

static void __init pcm051_init(void)
I also modified the mux.c (u-boot/boards/phyTec/mux.c):

{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

Please help me to sort out this problem.



Last edited by onebuck; 06-26-2013 at 08:21 AM. Reason: Please use VBcode tags, mod edit to clean post


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Interface GPIO driven matrix keypad linux_ Linux - Newbie 4 09-15-2013 01:11 AM
Adding dallas 1-wire over GPIO support vbsaltydog Linux - Embedded & Single-board computer 0 04-11-2013 10:45 PM
GPIO access on a Fujitsu Mini-ITX Industrial Mainboard, PCI Driver for GPIO mechatrix Linux - Embedded & Single-board computer 3 11-20-2011 03:57 PM
Receive IRQ from a GPIO pin maus Linux - Embedded & Single-board computer 1 06-22-2009 10:02 AM
Using GPIO (from kernel GPIO support) in MY application DannyGilbert Linux - Kernel 2 03-16-2009 07:52 AM > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 03:23 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration