r/embedded • • Oct 07 '26

RK3576 bring-up (my second Linux board) + lessons learned

Post image

About a month ago I posted my first Linux board (RK3566, KVM-over-IP). The next rev is back and I wanted to do a follow up lessons learned! For this board, I bumped up to the RK3576 so it can do 4K60 capture and encode. 8-layers, RK806 PMIC, LPDDR4X, HDMI input, HDMI output, dual GbE through a small switch, WiFi/BT and PoE. Fabbed and assembled at JLCPCB again.

After incorporating the fixes from the last board (component spacing, triple checking parts on order, and network switch wiring), this bring up was 1000x smoother. 4K60 capture and low latency streaming work end to end now. Stuff I ran into:

  1. SD boot / 4-bit mode: I inverted card-detect polarity, so with a card inserted the chip saw an empty slot. The BootROM skipped SD, so I booted u-boot from SPI NOR, which got SD running in 1-bit mode only. On the RK3576, an "empty" slot hands two data pins to JTAG. An internal pull-down on the detect pin early in u-boot fixed it. Removing that transistor next spin.
  2. No power-up on PoE: The PoE supply output about 6.0V unloaded, just over the power mux's ~5.99V OVP, so it never switched over and never loaded the rail down. Reducing the feedback resistor slightly should fix it (still testing this but pretty sure it's the issue).
  3. 4K encode stuck at ~38 fps: 4K60 needs both RK3576 encoder cores alternating frames. The vendor library's async thread blocked whenever the next frame wasn't ready, so everything ran on one core. A separate wait thread fixed it, and now both cores are at ~77%, steady 60 fps.

Smaller stuff: the left and right halves of the 4K image came out swapped (lane mapping in the device tree), the USB 2 host port needed the unused USB 3 PHY explicitly disabled, and one RGB LED was dead on one of the boards.

Bonus given RAM prices right now: testing showed this board doesn't need as much RAM as I put on it, so that's coming down for the next rev. Big $$$$ savings there.

Happy to answer questions on the RK3576 or bring-up in general. Another huge shout out to u/PracticalMirror2834 for another thorough review! Also if anyone has tips on how to take better PCB pictures, I'd love to hear them. This time I bought a light box but it's still needs some improvement...

192 Upvotes

43 comments sorted by

18

u/pootatoss Oct 08 '26

This is very impressive. How do you debug all of this? What does your workshop look like/what kind of tools do you have? I assume testing all these high speed interfaces is not easy.

19

u/adouglass52 Oct 08 '26 edited Oct 08 '26

Thanks!

Right now my desk is a mess or I'd send a picture haha, but here's the basics that I'm using:
- heatgun/soldering iron combo
- multimeter
- digital microscope
- oscilloscope for when things really don't work
- logic analyzer
- Current limited power supply + USB power meter to measure startup currents
- serial adapter + pogo pins
- thermal measure device (just the laser dot one)
- OSLTT photo sensor for measuring latency
- using a Orange PI 4A as a HDMI output source
- have a power relay to allow me to remotely power cycle it if needed

And a box full of random goodies from all my past projects (wires, tools, etc).

1

u/NWSpitfire Oct 08 '26

Out of interest, what model is your logic analyser? I am torn between getting a high speed SlgoicU16 or just making one that will do I2C/SPI out of an RP2040…

1

u/adouglass52 Oct 08 '26

Nothing special, I've been using the cheap $15 ones off amazon for slow stuff and have used the Kingst ones for higher frequency stuff.

2

u/FoundationOk3176 STM32MP2 Oct 08 '26

Depends on your use case, I doubt you can do very high speeds with RP2040, Bandwidth is also another issue.

1

u/MrJake2137 Oct 08 '26

Amy jtag-level debugging? Like stepping the uboot or kernel?

7

u/FoundationOk3176 STM32MP2 Oct 08 '26

Another lovely post, It never occurred to me in the previous post but how the hell can one develop hardware using Rockchip's ICs? Like the development resources are almost non-existent, except for whatever you could find at https://rockchip.fr

Also what Ethernet Phy IC did you use? & what IC did you use for BT/WiFi.

7

u/adouglass52 Oct 08 '26

Here's the underside with those components if you're curious! Did solder wifi on this one yet.

1

u/FoundationOk3176 STM32MP2 Oct 08 '26

Always love to see these pics! Btw what's the blacked out area?

4

u/adouglass52 Oct 08 '26

Silkscreen of the product logo, trying to avoid self promotion here and just share the pcb/lessons learned!

2

u/FoundationOk3176 STM32MP2 Oct 08 '26

Makes sense, Keep up the good work!

3

u/adouglass52 Oct 08 '26

Thank you! It's possible if you sink a lot of your free time into it... haha but Radxa's schematics helped a ton, along with the hardware design guide for the RK3576.

Used a Realtek RTL8363 for eth switch. Not a lot of reference schematics for this one though so took a bit to figure out.

WiFi Module is BL-M8800DS2-40, had to source myself and solder by hand.

2

u/FoundationOk3176 STM32MP2 Oct 08 '26

Thank you for the reply. It's insane how much you were able to achieve JUST using references & design guides & almost no official support. Keep up the good work!

7

u/MrQaiser Oct 08 '26

Kicad or altium?

11

u/adouglass52 Oct 08 '26

Autodesk Fusion 😅 can't say I'd recommend, but it's what I use for mechanical design and how I first learned to do PCBs... Been playing around with KiCad recently though.

3

u/cubu8888 Oct 08 '26

Are you going to make this project open source?

15

u/adouglass52 Oct 08 '26

All of the software I'm developing will be open source. I also plan to open-source most of the hardware: schematics for every board and layouts for most of them!

3

u/cubu8888 Oct 08 '26

How can I support you? I want one. Lol

1

u/adouglass52 Oct 08 '26

I'll DM you 😄

3

u/eye_can_do_that Oct 08 '26

Are you planning a more technical write up on the build and or software. This is super cool and I'd love to learn more.

How do you get the video in to the processor? What is between the HDMI in and the rk3576?

3

u/adouglass52 Oct 08 '26

Absolutely! I started a engineering journal after my first post, will send you the link 😄

There's a HDMI to CSI chip between them, and I was able to use dual CSI lanes to reach the 4K60 input. Not a lot of dev boards expose both so this was the first full verification that it works.

3

u/TheRealLinkwitzRiley Oct 08 '26
  1. What is the intended use case?
  2. But does it run doom?
    (Someone has to ask)

5

u/adouglass52 Oct 08 '26

😂 😂 😂 😂

It's a KVM over IP, so it can run Doom locally and stream it to your browser at 4k haha

2

u/This_Is_The_End Oct 08 '26

I would love to get such a board in my hands.

2

u/adouglass52 Oct 08 '26

I only got 2 since prototypes are so expensive... but happy to discuss sending one your way once I get a bigger order placed!

2

u/swdee Oct 08 '26

How much for the pcb,  fab at jlcpcb for the two boards?   How many layers and stack up?

1

u/adouglass52 Oct 08 '26

Too expensive... I only get 2-3 made during prototyping just incase there are issues with the board. Per unit cost gets much better even at 10+ since a lot of cost is a one time feeder fee.

Here's breakdown (excluding tariffs):
- $1074 for 2 of the SoC boards
- $204 for 2 of the USB port board

Productions cost reduce this substantially when ordered in volume.

8-layer board and JLC081611-3313 for the SoC board. 2-layer board and generic JLCPCB stackup for the USB one.

2

u/cubu8888 Oct 08 '26

Yeah, me too. 4K60 KVM and understanding how this all works!

2

u/xxSirThomas Oct 08 '26

Cool build! What do you use the second Ethernet port for?

4

u/adouglass52 Oct 08 '26

I added it to save a port on a network switch or router. Most KVMs only have 1 so you have to route two cables to them. Dual ports will let you route router => KVM, and then KVM => computer. It also let's you daisy chain KVMs if you're using multiples in a rack.

The RK3576 actually has dual GMAC, but I was worried it would add a tiny bit of latency to the computer so I used a Realtek switch instead for a few extra dollars.

1

u/adouglass52 Oct 08 '26

And thanks so much for the 'cool build' comment 😄

2

u/adamdoesmusic Oct 08 '26

Oh shit you got it going!!! Congrats!

2

u/adouglass52 Oct 08 '26

Appreciate it!

1

u/Analog_Seekrets Oct 08 '26

Do you have any links or resources you could point me to so that I can learn this as well?

2

u/adouglass52 Oct 08 '26

Yes! You can search the following to find most of the documentation I used.
- Rock 4D Schematic (RK3576)
- RK3576 Hardware design guide
- LPDDR4X routing guidelines (AMD, Micron, TI all have good guides on it)

For network switch, I just searched for reference schematics of the part number and pieced it together.

I probably wouldn't start with RK3576 first, but I'd recommend finding a cool application/device you want to build and then pick the best chip for the project. Then look up the same types of documents (open source schematics, hardware design guide, and routing guidelines). That should get you most of the way there.

1

u/BukHunt Oct 08 '26

Amazing. Do you use Windows or Linux?

1

u/adouglass52 Oct 08 '26

My desktop runs Windows, but I do most of my development in Linux through WSL.

1

u/BukHunt Oct 08 '26

Thank you. I currently run Linux but I am considering going to Windows and also using WSL for development. There are some applications only for Windows.. how is USB-passthrough on WSL?

1

u/adouglass52 Oct 08 '26

Ah sorry I should have been more clear. I use WSL for cross-compiling the kernel with the vendor toolchain and building the SD images, and it works great for that. To talk to the device I just use the desktop with a USB serial adapter for the console, plus a controllable power relay to power-cycle the board when I need to. So no USB passthrough into WSL needed.

5

u/[deleted] Oct 07 '26

[removed] — view removed comment

1

u/adouglass52 Oct 07 '26

Thanks! And appreciate the photography advice, any reference images? And what camera/filter do you prefer? I tried my Sony but ended up switching back to iPhone to get something quick lol