[U-Boot] Patch to enable LEDs on sunxi/Cubietruck

Prof. Dr. Gundolf Kiefer gundolf.kiefer at hs-augsburg.de
Wed May 13 10:04:27 CEST 2015


Dear Hans,
dear developers,

thank you for the quick reply. Actually, this was the first time I ever
looked into the U-Boot code and I was (and am) not aware of the DT
support status in U-Boot. So, please apologize that using
CONFIG_SYS_EXTRA_OPTIONS is probably not the best solution.

Maybe, the following information is helpful to anybody working on it:

I am using Debian 8.0 (Jessie) with the stock kernel and U-Boot. The
stock kernel includes a devicetree blob supporting the LEDs on the
Cubietruck perfectly.

# dpkg -l |grep u-boot
ii  u-boot:armhf                      2014.10+dfsg1-5                   armhf        A boot loader for embedded systems
[...]
ii  u-boot-sunxi:armhf                2014.10+dfsg1-5gk1                armhf        A boot loader for sunxi systems
ii  u-boot-tools                      2014.10+dfsg1-5                   armhf        companion tools for Das U-Boot bootloader

# dpkg -l |grep linux-image
ii  linux-image-3.16.0-4-armmp-lpae   3.16.7-ckt9-3~deb8u1              armhf        Linux 3.16 for ARMv7 multiplatform compatible SoCs supporting LPAE
ii  linux-image-armmp-lpae            3.16+63                           armhf        Linux for ARMv7 multiplatform compatible SoCs supporting LPAE (meta-package)

# dpkg -L linux-image-3.16.0-4-armmp-lpae | grep truck
/usr/lib/linux-image-3.16.0-4-armmp-lpae/sun7i-a20-cubietruck.dtb

# ls -l /sys/devices/leds/leds/
total 0
drwxr-xr-x 3 root root 0 May 13 09:07 cubietruck:blue:usr/
drwxr-xr-x 3 root root 0 May 13 09:07 cubietruck:green:usr/
drwxr-xr-x 3 root root 0 May 13 10:01 cubietruck:orange:usr/
drwxr-xr-x 3 root root 0 May 13 09:06 cubietruck:white:usr/

Download link:
https://packages.debian.org/stable/kernel/linux-image-3.16.0-4-armmp-lpae

Regards,

Gundolf Kiefer


On Tue, 12 May 2015 17:15:26 +0200
Hans de Goede <hdegoede at redhat.com> wrote:

> Hi,
> 
> On 05/12/2015 03:39 PM, Prof. Dr. Gundolf Kiefer wrote:
> > Dear developers,
> >
> > the attached patch adds LED support for the Cubietruck board.
> >
> > I found that the support for the onboard leds is missing for
> > sunxi-based boards in the latest Debian unstable and perhaps
> > upstream version of U-Boot. IMHO LEDs are very helpful for headless
> > systems. Perhaps the patch can be helpful somehow.
> >
> > The code has basically been ported from the U-Boot version maintained at
> > linux-sunxi.org. As in the sunxi version, the blue led is switched on
> > by default.
> >
> > Kind regards,
> >
> > Gundolf Kiefer
> 
> Thanks for the patch, but we really do not want to add new options to
> CONFIG_SYS_EXTRA_OPTIONS, at a minimum you need to add new Kconfig
> options for the leds, using gpio names for them, and sunxi_name_to_gpio
> in some place to translate to gpio numbers.
> 
> But we really do not want that either for upstream u-boot master we've
> switched to using devicetree for all sunxi boards, and we really want
> to use devicetree for this, which already has the led info, rather then
> duplicating the led info in sunxi defconfig files.
> 
> Simon, do we already have support for gpio-leds through devicetree
> in the device-model code somewhere?
> 
> Regards,
> 
> Hans
> 
> 
> 
> >
> >
> > Begin forwarded message:
> >
> > Date: Tue, 05 May 2015 09:46:39 -0700
> > From: Vagrant Cascadian <vagrant at aikidev.net>
> > To: "Prof. Dr. Gundolf Kiefer" <gundolf.kiefer at hs-augsburg.de>,
> > 783846 at bugs.debian.org Subject: Re: Bug#783846: Patch to enable LEDs on
> > sunix/Cubietruck
> >
> >
> > On 2015-04-30, Prof. Dr. Gundolf Kiefer wrote:
> >> It seems that the support for the onboard leds is missing for
> >> sunxi-based boards even in the latest version (Debian unstable). IMHO
> >> LEDs are very helpful for headless systems.
> >
> > Thanks for the patches!
> >
> > If you could submit these patches to u-boot upstream, that would be
> > best; we're trying to minimize the patches that are not already included
> > upstream.
> >
> >
> > live well,
> >    vagrant
> >
> >
> >
> > ---------------------------------------------------------------
> > Prof. Dr. Gundolf Kiefer
> > Effiziente Eingebettete Systeme  -  Efficient Embedded Systems
> > Fakultät für Informatik          -  Faculty of Computer Science
> > Hochschule Augsburg - University of Applied Sciences
> > http://www.hs-augsburg.de/~kiefer
> > ---------------------------------------------------------------
> >




---------------------------------------------------------------
Prof. Dr. Gundolf Kiefer
Effiziente Eingebettete Systeme  -  Efficient Embedded Systems
Fakultät für Informatik          -  Faculty of Computer Science
Hochschule Augsburg - University of Applied Sciences
http://www.hs-augsburg.de/~kiefer
---------------------------------------------------------------


More information about the U-Boot mailing list