[coreboot] alix2c3 LEDs and mode switch
Roman Yeryomin
leroi.lists at gmail.com
Fri Nov 7 13:18:12 CET 2008
On Thursday 06 November 2008 02:07:46 Roman Yeryomin wrote:
> Is there any chance to get LEDs working on alix boards?
> I suppose only GPIO lines/ports should be enabled in coreboot an
> everything else is done in software.
> Here is what documentation says about them:
>
> Status LEDs are all turned on by the BIOS on power up. The BIOS will
> turn off LEDs 2 and 3
> before booting the operating system.
> Location GPIO read port write port
> LED1 (left) G6 port 06100h bit 6 port
> 06100h bit 6 / 22
> LED2 (middle) G25 port 06180h bit 9 port
> 06180h bit 9 / 25
> LED3 (right) G27 port 06180h bit 11 port
> 06180h bit 11 / 27
> The CS5536 GPIO ports are programmed by 32 bit atomic writes. This
> avoids the need for read /
> modify / write operations and the locking issues they entail. For
> example, to turn off LED1 (high),
> write 0000'0040h to port 06100h. To turn on LED1 (low), write
> 0040'0000h. Multiple port bits can
> be changed at the same time.
>
>
> Maybe mode switch could also be useful:
>
> The mode switch can be accessed by software as follows:
> Location GPIO read port
> MODESW# G24 port 061b0h bit 8 (active
> low, 0 = switch pressed)
I tried to enable LED1 like this
outl(GPIOL_6_SET, GPIO_IO_BASE + GPIOL_OUT_AUX1_SELECT);
outl(GPIOL_6_SET, GPIO_IO_BASE + GPIOL_OUTPUT_ENABLE);
outl(GPIOL_6_SET, GPIO_IO_BASE + GPIOL_IN_AUX1_SELECT);
outl(GPIOL_6_SET, GPIO_IO_BASE + GPIOL_INPUT_ENABLE);
but this only turns on the led on bootup and gives no control on it :(
Can somebody look into this problem?
Roman
More information about the coreboot
mailing list