doublehp
Posts: 29
Joined: Wed May 02, 2012 1:11 am

Using GPIO of smsc9512 for more LEDs ?

Sun Jan 06, 2013 10:13 pm

I am looking for more GPIOs, more LEDs :) I found that the SMSC9512 has 8 GPIOs, and only 3 are used. That's at least 5 free pins to me.

9512 doc: http://www.smsc.com/Downloads/SMSC/Down ... s/9512.pdf

GPIO 0 to 2 are used for LEDs:
GPIO0 is FDX, pin 20
GPIO1 is LNK, pin 21
GPIO2 is SPD, pin 22
GPIO3 pin 35
GPIO4 pin 36
GPIO5 pin 37
GPIO6 pin 42
GPIO7 pin 43

It's obvious to me that GPIO3-5 are unrouted on the rPi board; i am not 100% sure about 6-7

I had a glance at the driver source code,
/usr/src/linux/drivers/net/usb/smsc95xx.h
/usr/src/linux/drivers/net/usb/smsc95xx.c
and it does not seem complicated to me.

But I am not a kernel hacker, and going any further is not possible to me (really manipulating the pins from soft-land).

I am not asking for mapping the IOs in /sys; this sounds complicated to me. But, at least a short C code to put pins up and down. This should be easy and portable, because all rPi users will have a SMSC9512 mapped at the same addresse. It should allow for an easily portable code.

My problem, about not being a kernel hacker, is that the memory range of the chip may be protected, and writable only by kernel-land code. Making the use of root-land code impossible.

Ideally, I would like to have a root-land binary. Because it would be usable by 100% community, without having to recompile the kernel.

If some-one could work on this, it would adorable.

If some hacker can work on the code, I would be happy to solder a few LEDs on my board.

Althought, GPIO0-2 may be re-mapable; it would nice to also gain those three pins, but this would require, for sure, to recompile the kernel, and modify the driver to stop using the 3 LEDs. Probably the most easy part for the dev; but would require every one to rebuild the kernel; I dislike this approach.

I don't feel in mood for kernel hacking myself. But I hope some one lese will be kind to have a look at it.

Thanks.

User avatar
ConnersJM
Posts: 2
Joined: Thu May 28, 2015 10:41 pm
Location: San Jose, CA

Re: Using GPIO of smsc9512 for more LEDs ?

Thu May 28, 2015 11:22 pm

B+ uses LAN9514. Here's the user guide: http://ww1.microchip.com/downloads/en/D ... c/9514.pdf

User avatar
rpdom
Posts: 11200
Joined: Sun May 06, 2012 5:17 am
Location: Essex, UK

Re: Using GPIO of smsc9512 for more LEDs ?

Fri May 29, 2015 5:52 am

ConnersJM wrote:B+ uses LAN9514. Here's the user guide: http://ww1.microchip.com/downloads/en/D ... c/9514.pdf
You are replying to a post that is over two years old and the original poster hasn't visited the forums for nearly a year. Sorry :(

Return to “Interfacing (DSI, CSI, I2C, etc.)”

Who is online

Users browsing this forum: 6by9 and 22 guests