1 Wire device with universal overlay

78 views
Skip to first unread message

Ray Madigan

unread,
May 11, 2016, 11:49:38 AM5/11/16
to BeagleBoard
I have been using a 1 wire overlay for pin P9.22  for a while and I just expanded my toy to use a couple of pwm pins.  Instead of creating the overlay myself, I figured I would try the universal overlay.  I am using universaln and have an init.d script to load it and all is well.  The problem is, I haven't solved the problem of getting P9.22 back to 1 Wire that I need.

I tried looking at my overlay and modifying the universal overlay to implement it, I guess I don't understand enough to make that work.

Then I commented out all of the P9_22 and P9.22 stuff in the overlay, make worked successfully, but when I try to load my old P9_22 overlay I get the File Exists error so there seems to still be a conflict.  

What is the preferred way to solve this problem?

 

TJF

unread,
May 12, 2016, 11:41:41 AM5/12/16
to BeagleBoard
Why don't you adapt the 1-wire overlay? It should be easy to use a pin not connected to any PWMSS. Ie. use P9_11 or P8_07.

Ray Madigan

unread,
May 12, 2016, 12:05:37 PM5/12/16
to BeagleBoard
Because the universal overlay causes my one wire overlay to be rejected.  The error is File Exists and dmesg points to the conflict with the slots entry that has the conflict.  I am probably doing something wrons, even when I delete the P9_22 from the universal overlay and reapply it, it rejects my overlay.

I am working on this from two perspectives, i need to be able to get back to work :).  I am building a non universal overlay that will include my one wire pin, the pwm pins I need, and others as I work out my application.  I will use this until I figure out the universal overlay issue.

I have never written an overlay that uses two pins on the same device, I am working that out now.

William Hermans

unread,
May 12, 2016, 1:20:37 PM5/12/16
to beagl...@googlegroups.com
Because the universal overlay causes my one wire overlay to be rejected.  The error is File Exists and dmesg points to the conflict with the slots entry that has the conflict.  I am probably doing something wrons, even when I delete the P9_22 from the universal overlay and reapply it, it rejects my overlay.

Because the pin is already configured. *Every* pin is configured when you use universal io. Plus the point of using universal io is so you do not have to configure the pin through an overlay. So learn how to use universal io + config-pin to configure the pin.


--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/5dc3979a-1d78-45d1-82d0-dea8b8004a14%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Ray Madigan

unread,
May 12, 2016, 1:38:33 PM5/12/16
to BeagleBoard
That's correct, every pin is configured.  And the load the driver for PWM, or SPI, or ... but it is not configured to load the OneWire driver for the pin.  All of the config-pin options are for standard drivers.  The point is, if you want to use the pin to another device that is not a built in device then one needs to do something different.

William Hermans

unread,
May 12, 2016, 2:07:58 PM5/12/16
to beagl...@googlegroups.com
That's correct, every pin is configured.  And the load the driver for PWM, or SPI, or ... but it is not configured to load the OneWire driver for the pin.  All of the config-pin options are for standard drivers.  The point is, if you want to use the pin to another device that is not a built in device then one needs to do something different.

How was the pin configured before ? There is no one wire peripheral module, so it must have been configured as GPIO. As far as one-wire goes I have never used it before, but have read it is basically a modified I2C protocol(somehow ).

If I was able to look at the device tree file you use before. Perhaps I could offer assistance.

Ray Madigan

unread,
May 12, 2016, 2:13:54 PM5/12/16
to beagl...@googlegroups.com
/dts-v1/;  
 /plugin/;  
 / {  
      compatible = "ti,beaglebone", "ti,beaglebone-black";  
      part-number = "BB-W1";  
      version = "00A0";  
       exclusive-use =  
            "P9.22",  
            "gpio0_2";  
      fragment@0 {  
         target = <&am33xx_pinmux>;  
         __overlay__ {  
                dallas_w1_pins: pinmux_dallas_w1_pins {  
                    pinctrl-single,pins = < 0x150 0x37 >; };  
         };  
      };  
      fragment@1 {  
         target = <&ocp>;  
         __overlay__ {  
               onewire@0 {  
                    compatible   = "w1-gpio";  
                    pinctrl-names  = "default";  
                    pinctrl-0    = <&dallas_w1_pins>;  
                    status     = "okay";  
                    gpios = <&gpio1 2 0>;  
               };  
      };  
      };  
 };  

You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/1iSthWho2yE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CALHSORrbbScPNEEN4KAop8KJ9S5NmOLqZ633ig%2BTjXhe9UAvNg%40mail.gmail.com.

proprin...@gmail.com

unread,
Aug 21, 2016, 9:26:43 AM8/21/16
to BeagleBoard
Did you figure this out? I'm trying to solve the same problem.
Reply all
Reply to author
Forward
0 new messages