Posts: 77
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: ... 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,
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.


User avatar
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: ... c/9514.pdf

User avatar
Posts: 22804
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, 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: ... 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 :(

Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 15320
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Using GPIO of smsc9512 for more LEDs ?

Wed Feb 26, 2020 1:09 pm

ljonka wrote:
Tue Feb 25, 2020 8:01 pm
If someone is looking for solutions, there is this:

and this: ... smsc95xx.c
Welcome to the forums, however please be aware that:

a) This post was started 7 years ago, and the last post is from 5 years ago
b) You've linked to one driver that all the GPIO stuff is in a "#if 0", ie disabled, and another that was never cleaned up and merged.
Software Engineer at Raspberry Pi Ltd. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Posts: 3
Joined: Tue Feb 25, 2020 7:58 pm

Re: Using GPIO of smsc9512 for more LEDs ?

Wed Feb 26, 2020 2:17 pm

Hi, thanks for your reply, am currently working on the implementation and will post a link again if the implementation is done.

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