Skip to content

arch/mips/jz4780: Add USB host and display controller drivers#19505

Open
ldube wants to merge 1 commit into
apache:masterfrom
ldube:ci20
Open

arch/mips/jz4780: Add USB host and display controller drivers#19505
ldube wants to merge 1 commit into
apache:masterfrom
ldube:ci20

Conversation

@ldube

@ldube ldube commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Add EHCI and OHCI USB host drivers for the Ingenic JZ4780 SoC, derived from the existing sama5 implementation.

Additionally, introduce the display controller driver using code ported from FreeBSD under its original license terms. Note that this driver lacks EDID support and is currently hardcoded to 1360x768.

Update the linker script memory layout to utilize the full 256 MiB RAM, excluding the 8 MiB reserved at the top of memory for the framebuffer.

Testing

Used MIPS CI20 board.

Connected mouse directly to the CI20 port to force OHCI use.
Used tc command to verify that mouse works.

nsh> tc
tc_main: nsamples: 0
tc_main: Opening /dev/mouse0
Sample :
buttons : 00
x : 677
y : 381
Sample :
buttons : 00
x : 659
y : 373

Repeated the same test with mouse connected through a hub to test EHCI controller.

Keyboard test using a standalone numeric keypad
nsh> hidkbd
Opening device /dev/kbda
Device /dev/kbda opened
11526923359*586
752563456

Tested usb stick using

NuttShell (NSH) NuttX-13.0.0
nsh> mount -t vfat /dev/sda /mnt/
nsh> ls -l /mnt
/mnt:
-rw-rw-rw- 6028459 m.ogg
-rw-rw-rw- 25 test.txt
-rw-rw-rw- 25 a.txt
-rw-rw-rw- 25 b.txt
nsh>
nsh> cat /mnt/test.txt
This is a text test file
nsh>

Framebuffer test:
nsh> fb
VideoInfo:
fmt: 11
xres: 1360
yres: 768
nplanes: 1
PlaneInfo (plane 0):
fbmem: 0xaf800000
fblen: 2088960
stride: 2720
display: 0
bpp: 16
Mapped FB: 0xaf800000
0: ( 0, 0) (1360,768)
1: (123, 69) (1114,630)
2: (246,138) (868,492)
3: (369,207) (622,354)
4: (492,276) (376,216)
5: (615,345) (130, 78)
Test finished
nsh>

@github-actions github-actions Bot added Area: Documentation Improvements or additions to documentation Arch: mips Issues related to the MIPS architecture Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces. Board: mips labels Jul 22, 2026
@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown

MemBrowse Memory Report

No memory changes detected for:

Add EHCI and OHCI USB host drivers for the Ingenic JZ4780 SoC, derived
from the existing sama5 implementation.

Additionally, introduce the display controller driver using code ported
from FreeBSD under its original license terms. Note that this driver
lacks EDID support and is currently hardcoded to 1360x768.

Update the linker script memory layout to utilize the full 256 MiB RAM,
excluding the 8 MiB reserved at the top of memory for the framebuffer.

Signed-off-by: Lwazi Dube <lwazeh@gmail.com>
@@ -1,5 +1,5 @@
/****************************************************************************
* boards/mips/jz4780/ci20/scripts/mips-debug.ld
* boards/mips/jz4780/ci20/scripts/mips-ci.ld

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why change the comment without changing file name?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Arch: mips Issues related to the MIPS architecture Area: Documentation Improvements or additions to documentation Board: mips Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants