The changes I make to the pinmux in the Device Tree Overlay are not 
reflected when I read the files in /sys/class/gpio or probe the physical 
pin itself. However, the change IS reflected when I read 
/sys/kernel/debug/pinctrl/44e10800.pinmux/pins. The OS is the Rev C Debian 
build.

Setting the Pin to an input w/ a pulldown:
-In my Device Tree Overlay file, I set GPIO pin P9_15(referred to as 48 by 
the kernel and having offset address 0x040) to be an input pin with a 
pulldown resistor(register value 0x27). 
-I echo the appropriate overlay to '/sys/devices/bone_capemgr.9/slots'
-When when I do a 'cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pins | 
grep '840' ' , I get 'pin 16 (44e10840) 00000027 pinctrl-single'. This 
indicates that the pin is correctly set as an input and with a pulldown 
resistor. 
-When I do 'cat value' in the gpio48 directory, I get 1. I should get a 0 
since the pulldown is enabled.

Setting the pin to an output:
-In my Device Tree Overlay file, I set GPIO pin P9_15(referred to as 48 by 
the kernel and having offset address 0x040) to be an output pin (register 
value 0x07). 
-I echo the appropriate overlay to '/sys/devices/bone_capemgr.9/slots'
-When when I do a 'cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pins | 
grep '840' ' , I get 'pin 16 (44e10840) 00000007 pinctrl-single'. This 
indicates that the pin is correctly set as an output. 
-When I do 'cat direction' in the gpio48 directory, I get 'in'. I should 
get 'out' since the pin is set as an output.

If I manually set the direction,value, etc... by echoing to the file 
interfaces, then everything works perfectly.

Should modifications in the DTO reflect in the file interfaces and on the 
physical pin itself, or is my understanding incorrect? Derek Molloy 
encounters this same issue in his GPIO video 
(https://www.youtube.com/watch?v=wui_wU1AeQc @31:00).

Thanks!
Michael

FYI, here is one of the DTOs:

/*  
* Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Purpose License Version 2 as
* published by the Free Software Foundation
*
*/

/dts-v1/;
/plugin/;

/{
       compatible = "ti,beaglebone", "ti,beaglebone-black";
       part-number = "MM-LED-TEST";
       version = "00A0";

       fragment@0 {
         target = <&am33xx_pinmux>;
         __overlay__ {
            pinctrl_LED: pinctrl_LED {
      pinctrl-single,pins = <

      0x040 0x27  /* P9_15(48): Input w/ pulldown resistor*/
             
        >;
        };
         };
       };

       fragment@1 {
      target = <&ocp>;
      __overlay__ {
      helper {
      compatible = "bone-pinmux-helper";
      pinctrl-names = "default";
      pinctrl-0 = <&pinctrl_LED>;
      status = "okay";
      };
      };
};
};

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to