Guruplug gpio
Milan Obuch
freebsd-arm at dino.sk
Fri Oct 29 22:36:57 UTC 2010
Hi,
after solving mge1 problem I decided to work a bit with Guruplug's gpio. There
are some of them accessible via u-snap connector and some of them are used to
controll status LEDs.
there is some description in file bindings-gpio.txt, but I did not find
something used in dts files, so I only guessed gpios could be defined the
following way:
GPIO: gpio at 10100
{#gpio-cells = <3>;
compatible = "mrvl,gpio";
reg = <0x10100 0x20>;
gpio-controller;
interrupts = <35 36 37 38 39 40 41>;
interrupt-parent = <&PIC>;
gpios =
<&GPIO 46 2 0x00000000 /* GPIO[46]: OUT */
&GPIO 47 2 0x00000000 /* GPIO[47]: OUT */
&GPIO 48 2 0x00000000 /* GPIO[48]: OUT */
&GPIO 49 2 0x00000000 /* GPIO[49]: OUT */
>;
};
However, if I add this definition to dts and rebuild kernel, it does not work
and hangs with no sign of beginning to run. With some investigation I found
function platform_gpio_init does something bad and loops. There is nothing
written to console even.
So either I did not understand the way how gpios should be defined (possible,
since I did not find complete example) or platform_gpio_init does something
unintended... If I delete gpios definition, everything is back to normal and
kernel boots and works as before. If I comment out platform_gpio_init call,
then again everything works.
Anybody out there who could tell me what I did wrong? Any hint appreciated...
Regards,
Milan
More information about the freebsd-arm
mailing list