Re: [PATCH] leds: tlc591xx: SW reset during initialization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On sobota 25. srpna 2018 0:09:17 CEST, Andrew Lunn wrote:
Does your board have the reset pin tied to a GPIO?  It would be less
disruptive to other users, which might actually rely on the bootloader
configuration, if support was added for the GPIO.

You are right that adding something like a `reset-gpio` stanza to DT would be 100% backward compatible. We don't have a reset GPIO.

We've unfortunately run out of GPIO pins. This is on an extension board which plugs into Solidrun Clearfog Base. There's no available pin for the SoC's RESET_OUT, and we do not have any more free GPIOs either. (We're already using hacks such such deriving the reset signal for some other external chips from a simultaneous assertion of SPI CS_2 and CS_3 which is what this platform thankfully does during its power-up. Please don't laugh at me :). )

Here's a full story on why I am doing this for better context. I want to use the same set of LEDs as status/progress indicators from the boot loader, then from the kernel, and finally from userspace:

0) U-Boot resets the LED chip.

1) U-Boot sets up fast HW blinking of three channels of a RGB status LED (U-Boot patch [1]).

2) Once a boot from a valid A/B rootfs slot in the eMMC is being tried, the blinking pattern slows down (a bunch of I2C writes via boot.scr).

3) Once the kernel and DT progress enough to enumerate I2C clients, a DT-based LED trigger sets up green blinking, this time using kernel's features.

4) Once the userspace is up and systemd succeeds in launching everything, the LED trigger is reconfigured for a solid green light and userspace control.

There must be something in step 3) to un-configure the LED chip and to disable that white blinking. If it wasn't a reset, then the driver would have to initialize all registers explicitly.

I see that the SWRST sequence is a bit funny and special in that it affects all instances of this chip. But hey, it's a piece of functionality which is present and doesn't require any HW changes, so why not use it.

With kind regards,
Jan

[1] https://gerrit.cesnet.cz/plugins/gitiles/github/trini/u-boot/+/66be3f857b818ed6643049a285d20680d651b7f8%5E%21/




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux