Allwinner A13 support (patches attached)
Luiz Otavio O Souza
lists.br at gmail.com
Thu Oct 9 19:15:46 UTC 2014
On 9 October 2014 01:46, Ganbold Tsagaankhuu wrote:
> On Wed, Oct 8, 2014 at 4:18 AM, Jakob Alvermark wrote:
>
>> Hello people!
Hello Jakob,
>>
>> I have been sitting on this for too long now. (Thanks Arun Thomas for
>> encouraging me to send this!)
>> I have this Allwinner A13 board from Olimex,
>>
>> https://www.olimex.com/Products/OLinuXino/A13/A13-OLinuXino/open-source-hardware
>>
>> I have made it boot FreeBSD-current, and here are the patches. Hoping
>> anyone (committers?) might be interrested in looking at this.
>>
Yay, nice work!
>> I also wanted to blink the onboard LED, so this is in the dts file:)
>> ---
>> leds {
>> compatible = "gpio-leds";
>>
>> led1 {
>> label = "led1";
>> gpios = <&gpio 201 1>;
>> };
>> };
>> ---
>> I do not get a /dev/led/led1 as I expected, manually toggling the LED with
>> 'gpioctl -t 201' works fine...
The gpio node from the DTS you are using (sun5i-a13.dtsi) uses '3' as
#gpio-cells:
gpio: gpio at 01c20800 {
#gpio-cells = <3>;
compatible = "allwinner,sun5i-gpio";
gpio-controller;
reg =< 0x01c20800 0x400 >;
interrupts = < 28 >;
interrupt-parent = <&AINTC>;
};
So you need to adjust the gpios property for led and add a third value
(in this case: pin number, not used, pin flags):
leds {
compatible = "gpio-leds";
led1 {
name = "led1";
gpios = <&gpio 201 0 1>;
};
};
Changing the #gpio-cells back to 2 would also work.
>>
>
> Cool.
>
> Can a10_gpio.c and a13_gpio.c combined into one?
> Also you disabled some gpio settings in a10_ehci.c I guess olinuxino has
> u-boot and u-boot sets that, or maybe different pins.
> I think instead of disabling better make it work for both cubieboard and
> olinuxino.
Yes, they can. I've checked and the only differences are the number of
available banks and pins. We have a similar situation with ti_gpio.c.
You could use the DTS to pass the gpio pin (or pins) we need to tweak
at boot to enable the onboard devices.
Luiz
More information about the freebsd-arm
mailing list