One of the main reason of the device overlay is to stop having different kernel for different plateform ! In the device overlay you specify your hardware at boot. Most of the time you don't change your connection after the boot !
In the kernel 3.14, there is no capemanager, so you need to recompile the dts file to specify which cape you want. ( include device tree file of the cap ) . That it ! Le Tue Dec 09 2014 at 08:21:22, Hemant Kapoor <[email protected]> a écrit : > Thanks Jan and Dacobi for your valuable comments. > > There is one small confusion. I declared the pin to be an output pin in my > device tree overlay: > > 0x870 0x07 /* output mode | MODE7, see Pin_Configuration.pdf in BBB > */ > > but after exporting pin as you guys mentioned and looking at the > direction, I get it as 'in' > > root@beaglebone:/sys/class/gpio/gpio60# cat direction > in > > The below steps described by Jan could be done without the use of device > overlay > > > > > cd /sys/class/gpio > cd gpio60 > echo 60 > export > echo out > direction > > > echo 1 > value > > So why do we need device overlay :( > > Please help me get rid of this confusion. It is driving me mad.... > > HK! > > > > > > On Tuesday, 9 December 2014 01:42:08 UTC, Dacobi wrote: > >> You need to do >> >> echo 60 > export >> >> Before >> >> cd gpio60 >> > On Dec 9, 2014 2:32 AM, <[email protected]> wrote: >> > A good tutorial here: >>> http://derekmolloy.ie/gpios-on-the-beaglebone-black-using- >>> device-tree-overlays/ >>> simple example: >>> cd /sys/class/gpio >>> cd gpio60 >>> echo 60 > export >>> echo out > direction >>> echo 1 > value >>> >>> good luck >>> Jan >>> >>> >>> >>> >>> >>> >>> On Tuesday, December 9, 2014 1:41:10 AM UTC+11, Hemant Kapoor wrote: >>>> >>>> Hello All, >>>> >>>> I am a newbie to Linux and trying to figure out how device tree overlay >>>> works... >>>> >>>> So after googling for many days, I came up with below device tree: >>>> >>>> /dts-v1/; >>>> /plugin/; >>>> >>>> / { >>>> compatible = "ti,beaglebone", "ti,beaglebone-black"; >>>> >>>> /* identification */ >>>> part-number = "MY-LED"; >>>> version = "00A0"; >>>> >>>> /* state the resources this cape uses */ >>>> exclusive-use = >>>> /* the pin header uses */ >>>> "P9.12", /* GPIO*/ >>>> /* the hardware ip uses */ >>>> "gpio0"; >>>> >>>> fragment@0 { >>>> target = <&am33xx_pinmux>; >>>> __overlay__ { >>>> bb_mygpio_pins: pinmux_bb_mygpio_pins { >>>> pinctrl-single,pins = < >>>> 0x870 0x07 /* >>>> output mode | MODE7, see Pin_Configuration.pdf in BBB */ >>>> >; >>>> }; >>>> }; >>>> }; >>>> >>>> fragment@1 { >>>> target = <&ocp>; /* not sure why it is not >>>> gpio0 */ >>>> __overlay__ { >>>> status = "okay"; >>>> pinctrl-names = "default"; >>>> pinctrl-0 = <&bb_mygpio_pins>; >>>> }; >>>> }; >>>> }; >>>> >>>> >>>> I was able to "build" the dtc and generated MY-LED-00A0.dtbo >>>> >>>> I then copied the MY-LED-00A0.dtbo to /lib/firmware >>>> >>>> Then i echoed it to slots: >>>> echo MY-LED > $SLOTS >>>> >>>> and cat $SLOTS gives me below result: >>>> >>>> root@beaglebone:/lib/firmware# cat $SLOTS >>>> 0: 54:PF--- >>>> 1: 55:PF--- >>>> 2: 56:PF--- >>>> 3: 57:PF--- >>>> 4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G >>>> 5: ff:P-O-- Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI >>>> 6: ff:P-O-- Bone-Black-HDMIN,00A0,Texas Instrument,BB-BONELT-HDMIN >>>> 9: ff:P-O-L Override Board Name,00A0,Override Manuf,MY-LED >>>> >>>> By looks of this, MY_LED seems to be loaded... >>>> >>>> >>>> The main confusion is how can I use MY-LED? >>>> Where are the files for MY-LED present? >>>> >>>> Any help or guidance is much appreciated. >>>> >>>> -- >>> 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. >>> >> -- > 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. > -- 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.
