Date: Sat, 30 Oct 2010 00:37:01 +0200 From: Milan Obuch <freebsd-arm@dino.sk> To: freebsd-arm@freebsd.org Subject: Guruplug gpio Message-ID: <201010300037.03374.freebsd-arm@dino.sk>
next in thread | raw e-mail | index | archive | help
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@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010300037.03374.freebsd-arm>