Re: [beagleboard] User LED forward to GPIO
From: Brandon I Reply-To: Date: Friday, May 9, 2014 at 3:06 PM To: Subject: Re: [beagleboard] User LED forward to GPIO > I use this: https://github.com/nomel/beaglebone/tree/master/led-header > > Makes setting up leds super easy. Just so you know, this will only work for Kernel V3.8 Regards, John > > > On Thursday, May 8, 2014 9:35:31 AM UTC-7, Charles Steinkuehler wrote: >> The way these systems are configured, I don't know if you can do what >> you want without generating a custom device tree. >> >> The leds class has a trigger function and can be tied to various GPIO >> pins, but I believe that conflicts with exporting that same GPIO pin. >> >> If anyone knows of a way to do this without requiring customizing a >> device tree to move GPIO pins from /sys/class/gpio to /sys/class/leds/ >> entries, or if there's a way to have both for the same pin, I'd love to >> hear it! >> >> On 5/8/2014 10:49 AM, Hannes Hörting wrote: >>> > Hello John! >>> > >>> > Thank you! >>> > I`m using Debian and also the universal device tree from >>> > Charles: https://github.com/cdsteinkuehler/beaglebone-universal-io >>> > >>> > Not sure if its there also available? I doesnt find an information about >>> > heartbeat and cpu for user led on the GPIO. >>> > >>> > Thank you! >>> > >>> > >>> > Am Mittwoch, 7. Mai 2014 20:58:10 UTC+2 schrieb john3909: >>>> >> >>>> >> >>>> >> On 5/7/14, 11:32 AM, "Hannes Hörting" > >>>> >> wrote: >>>> >> >>>>> >>> Hello! >>>>> >>> >>>>> >>> Can I forward the User Led to the GPIO? >>>>> >>> I want to build my own Expansion Board and need this LED. >>>>> >>> >>>>> >>> OR is this function already connectet to some GPIO? >>>>> >>> >>>>> >>> Thank you! >>>> >> You can change the GPIO for the User LED by modifying the BBB device >>>> tree. >>>> >> Look at arch/arm/boot/dts/am335x-bone-common.dtsi >>>> >> >>>> >> >>>> >> Regards, >>>> >> John >>>>> >>> >>>>> >>> -- >>>>> >>> 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 . >>>>> >>> For more options, visit https://groups.google.com/d/optout. >>>> >> >>>> >> >>>> >> >>> > >> >> >> -- >> Charles Steinkuehler >> cha...@steinkuehler.net > > -- > 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+unsubscr...@googlegroups.com. > 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 beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [beagleboard] User LED forward to GPIO
I use this: https://github.com/nomel/beaglebone/tree/master/led-header Makes setting up leds super easy. On Thursday, May 8, 2014 9:35:31 AM UTC-7, Charles Steinkuehler wrote: > > The way these systems are configured, I don't know if you can do what > you want without generating a custom device tree. > > The leds class has a trigger function and can be tied to various GPIO > pins, but I believe that conflicts with exporting that same GPIO pin. > > If anyone knows of a way to do this without requiring customizing a > device tree to move GPIO pins from /sys/class/gpio to /sys/class/leds/ > entries, or if there's a way to have both for the same pin, I'd love to > hear it! > > On 5/8/2014 10:49 AM, Hannes Hörting wrote: > > Hello John! > > > > Thank you! > > I`m using Debian and also the universal device tree from > > Charles: https://github.com/cdsteinkuehler/beaglebone-universal-io > > > > Not sure if its there also available? I doesnt find an information about > > heartbeat and cpu for user led on the GPIO. > > > > Thank you! > > > > > > Am Mittwoch, 7. Mai 2014 20:58:10 UTC+2 schrieb john3909: > >> > >> > >> On 5/7/14, 11:32 AM, "Hannes Hörting" > > >> wrote: > >> > >>> Hello! > >>> > >>> Can I forward the User Led to the GPIO? > >>> I want to build my own Expansion Board and need this LED. > >>> > >>> OR is this function already connectet to some GPIO? > >>> > >>> Thank you! > >> You can change the GPIO for the User LED by modifying the BBB device > tree. > >> Look at arch/arm/boot/dts/am335x-bone-common.dtsi > >> > >> > >> Regards, > >> John > >>> > >>> -- > >>> 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 . > >>> For more options, visit https://groups.google.com/d/optout. > >> > >> > >> > > > > > -- > Charles Steinkuehler > cha...@steinkuehler.net > -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [beagleboard] User LED forward to GPIO
Hi, on a 3.14 kernel I copied am335x-boneblack.dts and made my own: am335x-boneblack-res-1.dts to this I added: /* --> define custom leds pinmux */ &am33xx_pinmux { traffic_leds_s0: traffic_leds_s0 { pinctrl-single,pins = < 0x78 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* .gpio1_28, P9_12 60 $PIN: 30 OUTPUT MODE7 - traffic-1 LED */ 0x44 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* .gpio1_17, P9_23 49 $PIN: 17 OUTPUT MODE7 - traffic-2 LED */ 0x1A4 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* .gpio3_19, P9_27 115 $PIN: 105 OUTPUT MODE7 - traffic-3 LED */ 0x34 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* .gpio1_13, P8_11 45 $PIN: 13 OUTPUT MODE7 - traffic-4 LED */ 0x30 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* .gpio1_12, P8_12 44 $PIN: 12 OUTPUT MODE7 - traffic-5 LED */ 0x28 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* .gpio0_26, P8_14 26 $PIN: 10 OUTPUT MODE7 - traffic-6 LED */ 0x3c (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* .gpio1_15, P8_15 47 $PIN 15 OUTPUT MODE7 - traffic-7 LED */ >; }; }; /* <-- define custom leds pinmux */ and /* --> define custom leds */ gpio_leds { pinctrl-names = "default"; pinctrl-0 = <&traffic_leds_s0>; compatible = "gpio-leds"; led@1 { label = "trfcl1:red"; gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>; linux,default-trigger = "heartbeat"; default-state = "on"; }; led@2 { label = "trfcl1:amber"; gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>; linux,default-trigger = "heartbeat"; default-state = "on"; }; led@3 { label = "trfcl1:green"; gpios = <&gpio3 19 GPIO_ACTIVE_HIGH>; linux,default-trigger = "heartbeat"; default-state = "on"; }; led@4 { label = "trfcl2:red"; gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>; linux,default-trigger = "heartbeat"; default-state = "on"; }; led@5 { label = "trfcl2:amber"; gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>; linux,default-trigger = "heartbeat"; default-state = "on"; }; led@6 { label = "trfcl2:green"; gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>; linux,default-trigger = "heartbeat"; default-state = "on"; }; led@7 { label = "trfcl3:red"; gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>; linux,default-trigger = "heartbeat"; default-state = "on"; }; }; /* <-- define custom leds */ Then you need to build this new flat device tree and load it to your board. Hope this helps, Robert -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [beagleboard] User LED forward to GPIO
From: faimbs Reply-To: Date: Friday, May 9, 2014 at 10:42 AM To: Subject: Re: [beagleboard] User LED forward to GPIO > Hello John! > > Maybe Charles unterstud what you mean. > > Unfortunately I'm not an expert of DT. So maybe you can explain how I can use > GPIO as usrLED? > > In the am335x-boneblack.dts are GPIO 21 - 24 for usr0 - usr3. But don know if > they are activ and available. > Cannot find these GPIO! I recommend that you always retain the previous responses as I don¹t recall what your original questions was. Anyway, in arch/arm/boot/dts/am335x-bone-common.dtsi, on line 30 you will find the pins used for the LEDs. If you want to move the LEDs to a different GPIO, then this is where you make that change. Regards, John > > Thank you! > > faimbs > -- > 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+unsubscr...@googlegroups.com. > 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 beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [beagleboard] User LED forward to GPIO
Hello John! Maybe Charles unterstud what you mean. Unfortunately I'm not an expert of DT. So maybe you can explain how I can use GPIO as usrLED? In the am335x-boneblack.dts are GPIO 21 - 24 for usr0 - usr3. But don know if they are activ and available. Cannot find these GPIO! Thank you! faimbs -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [beagleboard] User LED forward to GPIO
On 5/8/14, 9:35 AM, "Charles Steinkuehler" wrote: >The way these systems are configured, I don't know if you can do what >you want without generating a custom device tree. > >The leds class has a trigger function and can be tied to various GPIO >pins, but I believe that conflicts with exporting that same GPIO pin. > >If anyone knows of a way to do this without requiring customizing a >device tree to move GPIO pins from /sys/class/gpio to /sys/class/leds/ >entries, or if there's a way to have both for the same pin, I'd love to >hear it! Without the benefit of a DT overlay, I think you are stuck with generating a customized DT. Rather than modifying the existing DT files, perhaps it would be better to update am335x-boneblack.dts to include a custom DTS like this: ‹ /include/ ³am33xs.dtsi² /include/ ³am335x-bone-common.dtsi² /include/ ³am335x-custom.dtsi² &am33xx_pinmux { etc ‹ Now am335x-custom.dtsi can be used to override any previous DT settings. It would also be possible to add various cape DT to am335x-custom.dtsi. Unfortunately DTC cannot detect conflicts and these will only be detected when the kernel boots. Regards, John > >On 5/8/2014 10:49 AM, Hannes Hörting wrote: >> Hello John! >> >> Thank you! >> I`m using Debian and also the universal device tree from >> Charles: https://github.com/cdsteinkuehler/beaglebone-universal-io >> >> Not sure if its there also available? I doesnt find an information >>about >> heartbeat and cpu for user led on the GPIO. >> >> Thank you! >> >> >> Am Mittwoch, 7. Mai 2014 20:58:10 UTC+2 schrieb john3909: >>> >>> >>> On 5/7/14, 11:32 AM, "Hannes Hörting" > >>> wrote: >>> Hello! Can I forward the User Led to the GPIO? I want to build my own Expansion Board and need this LED. OR is this function already connectet to some GPIO? Thank you! >>> You can change the GPIO for the User LED by modifying the BBB device >>>tree. >>> Look at arch/arm/boot/dts/am335x-bone-common.dtsi >>> >>> >>> Regards, >>> John -- 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 . For more options, visit https://groups.google.com/d/optout. >>> >>> >>> >> > > >-- >Charles Steinkuehler >char...@steinkuehler.net > >-- >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+unsubscr...@googlegroups.com. >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 beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [beagleboard] User LED forward to GPIO
The way these systems are configured, I don't know if you can do what you want without generating a custom device tree. The leds class has a trigger function and can be tied to various GPIO pins, but I believe that conflicts with exporting that same GPIO pin. If anyone knows of a way to do this without requiring customizing a device tree to move GPIO pins from /sys/class/gpio to /sys/class/leds/ entries, or if there's a way to have both for the same pin, I'd love to hear it! On 5/8/2014 10:49 AM, Hannes Hörting wrote: > Hello John! > > Thank you! > I`m using Debian and also the universal device tree from > Charles: https://github.com/cdsteinkuehler/beaglebone-universal-io > > Not sure if its there also available? I doesnt find an information about > heartbeat and cpu for user led on the GPIO. > > Thank you! > > > Am Mittwoch, 7. Mai 2014 20:58:10 UTC+2 schrieb john3909: >> >> >> On 5/7/14, 11:32 AM, "Hannes Hörting" > >> wrote: >> >>> Hello! >>> >>> Can I forward the User Led to the GPIO? >>> I want to build my own Expansion Board and need this LED. >>> >>> OR is this function already connectet to some GPIO? >>> >>> Thank you! >> You can change the GPIO for the User LED by modifying the BBB device tree. >> Look at arch/arm/boot/dts/am335x-bone-common.dtsi >> >> >> Regards, >> John >>> >>> -- >>> 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 . >>> For more options, visit https://groups.google.com/d/optout. >> >> >> > -- Charles Steinkuehler char...@steinkuehler.net -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [beagleboard] User LED forward to GPIO
Hello John! Thank you! I`m using Debian and also the universal device tree from Charles: https://github.com/cdsteinkuehler/beaglebone-universal-io Not sure if its there also available? I doesnt find an information about heartbeat and cpu for user led on the GPIO. Thank you! Am Mittwoch, 7. Mai 2014 20:58:10 UTC+2 schrieb john3909: > > > On 5/7/14, 11:32 AM, "Hannes Hörting" > > wrote: > > >Hello! > > > >Can I forward the User Led to the GPIO? > >I want to build my own Expansion Board and need this LED. > > > >OR is this function already connectet to some GPIO? > > > >Thank you! > You can change the GPIO for the User LED by modifying the BBB device tree. > Look at arch/arm/boot/dts/am335x-bone-common.dtsi > > > Regards, > John > > > >-- > >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 . > >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 beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [beagleboard] User LED forward to GPIO
On 5/7/14, 11:32 AM, "Hannes Hörting" wrote: >Hello! > >Can I forward the User Led to the GPIO? >I want to build my own Expansion Board and need this LED. > >OR is this function already connectet to some GPIO? > >Thank you! You can change the GPIO for the User LED by modifying the BBB device tree. Look at arch/arm/boot/dts/am335x-bone-common.dtsi Regards, John > >-- >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+unsubscr...@googlegroups.com. >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 beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[beagleboard] User LED forward to GPIO
Hello! Can I forward the User Led to the GPIO? I want to build my own Expansion Board and need this LED. OR is this function already connectet to some GPIO? Thank you! -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.