Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x2000e uboot serial console has output, but no input #1

Open
ballaswag opened this issue Feb 2, 2024 · 6 comments
Open

x2000e uboot serial console has output, but no input #1

ballaswag opened this issue Feb 2, 2024 · 6 comments

Comments

@ballaswag
Copy link

Thought I try my luck asking here. Seems like the only place where newer ingenic boards are discussed at all.

I've been playing with with the X2000E SoC from the creality K1 printer, got uboot/spl etc. to bootstrap and such. But I'm not able to get keyboard input to work at the uboot prompt via serial. I'm able to build a uboot that prompts and execute the initial bootcmd, but no input works after that.
https://github.com/ballaswag/ingenic-usbboot?tab=readme-ov-file#splu-boot

The same serial connection/adapter and all works on the same board when linux is booted.

@ReimuNotMoe
Copy link
Member

The pinmux may be incorrect?

X2000 support of this repo is outdated for more than 1 year, I can ask Ingenic for their latest X2000 uboot source package after the Spring Festival

@ReimuNotMoe
Copy link
Member

When you're in Linux, try dumping GPIO registers (busybox devmem 0x1001xxxx) and see which physical pins are mapped to UART signals. You can find the register addresses in X2000_PM.pdf (in the datasheets repo of this org).

@ballaswag
Copy link
Author

Thank you so much for the hint! I figured it out after revisiting this again after sometime.

Some context, I'm bootstrapping this via the usb debug port and the tool I linked above, essentially the usbboot tool but with load and jump addresses added for the x2000. From memory I probably never actually built a SPL that successfully initialized the board. So I grab and augmented the SPL from their cloner tool for the x2000. From there I was able to init the board and load my uboot. But input never worked.

I was confused even though I checked and double checked the uart/func/pin configuration in uboot. It properly configures the desire port/func/pin. Building and rebuilding didn't help.

Then it occurred to me that the uart init actually happens in the SPL and not uboot. Since I'm using their SPL, the changes didn't apply. However, looking at their global_info struct, I was able to map out the uart configs in their SPL binary. Turns out their SPL only configured the TX pin and not the RX pin. Editing the RX bit in the SPL got input and output to work!

I guess it'll be nice if I can figure out how to build a proper SPL for this board and not have to edit bits in the binary blob.

@ballaswag
Copy link
Author

Also saw that you got Debian running on one of these mips boards. By any chance you can document the process? Will be helpful for people trying to run Debian on these Creality 3D printers.

@LazyCoderOZ
Copy link

Was there any progress on this one?

@ballaswag
Copy link
Author

Was there any progress on this one?

If you're asking about a working uboot via usbboot for x2000 specifically, then you can use the one from my repository. I have patched so serial in/out work as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants