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

feat(ps2_uart): Enable EE UART #88

Closed
wants to merge 1 commit into from

Conversation

XavierBrassoud
Copy link

@XavierBrassoud XavierBrassoud commented Jan 9, 2025

Here is my contribution for this awesome project, thanks you Fredrik!
Happy new year to the PS2 Linux Community! 🎆

Description

Enable UART to the PS2 Emotional Engine (EE) serial port using ps2_uart module

  • Console access: /dev/ttyS0 – baud rate: 38400
  • Printk early kernel debug messages

Only polling mode is currently supported.

Fix #68
Associated PR: frno7/gentoo-mipsr5900el#22

Menu Config

Enable console access:

  │ Symbol: SERIAL_PS2_UART [=y]                                                                                                                                                       │  
  │ Type  : tristate                                                                                                                                                                   │  
  │ Prompt: PS2 serial port                                                                                                                                                            │  
  │   Location:                                                                                                                                                                        │  
  │     -> Device Drivers                                                                                                                                                              │  
  │       -> Character devices                                                                                                                                                         │  
  │         -> Serial drivers                                                                                                                                                          │  
  │                                                                                                                                                                                    │  
  │                                                                                                                                                                                    │  
  │ Symbol: SERIAL_PS2_UART_CONSOLE [=y]                                                                                                                                               │  
  │ Type  : bool                                                                                                                                                                       │  
  │ Prompt: PS2 serial port console                                                                                                                                                    │  
  │   Location:                                                                                                                                                                        │  
  │     -> Device Drivers                                                                                                                                                              │  
  │       -> Character devices                                                                                                                                                         │  
  │         -> Serial drivers                                                                                                                                                          │  
  │           -> PS2 serial port (SERIAL_PS2_UART [=y])

Enable debug early kernel printk messages:

  │ Symbol: CMDLINE [=video=AV-MULTI-OUT:1920x1080@50 console=tty0 console=tty1]                                                                                                         │  
  │ Type  : string                                                                                                                                                                     │  
  │ Prompt: Default kernel command string                                                                                                                                              │  
  │   Location:                                                                                                                                                                        │  
  │     -> Kernel hacking                                                                                                                                                              │  
  │       -> Built-in kernel command line (CMDLINE_BOOL [=y]) 

Tests

Real Hardware

screen /dev/ttyUSB0 38400

IMG_20250109_220621
Screenshot_20250109_220702
IMG_20250109_220757__01

PCSX2

Screenshot_20250109_221124

References

@frno7
Copy link
Owner

frno7 commented Jan 10, 2025

Many thanks, @XavierBrassoud! It looks my Github compilation workflow script isn’t quite working with pull request actions though:

   LD      vmlinuz
  STRIP	  vmlinuz
ln: failed to create hard link 'vmlinuz-ntsc-88/merge-a6ec171c.elf' => 'vmlinuz': No such file or directory
Error: Process completed with exit code 1.

It does not seem to be a problem with your code. I should fix the Github workflow action script to make it work. :-)

Copy link
Owner

@frno7 frno7 left a comment

Choose a reason for hiding this comment

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

Please review enclosed comments. Also,

  • Would you like to add a tag Signed-off-by: Xavier Brassoud <[email protected]> to your commit message?
  • If you rebase your pull request on ps2-main (updated this morning) having commit f30d2c4, we should have the workflow action working with pull requests, hopefully. :-)

arch/mips/boot/compressed/dbg.c Outdated Show resolved Hide resolved
arch/mips/ps2/prom.c Outdated Show resolved Hide resolved
drivers/tty/serial/Kconfig Outdated Show resolved Hide resolved
@DCFUKSURMOM
Copy link

This is awesome, especially having proper output on PCSX2, which was something I was curious about in the past

Support UART serial communication over Emotional Engine (EE) using "ps2_uart" module
Only polling mode is currently supported

Signed-off-by: Xavier Brassoud <[email protected]>
@XavierBrassoud
Copy link
Author

XavierBrassoud commented Jan 11, 2025

Thanks you for your review :)

I have rebase and squash my commits into one with the tag Signed-off-by: Xavier Brassoud <[email protected]> and tested following your recommendations.

If you see any new suggestions to make, I'll be happy to add them ;)

@XavierBrassoud XavierBrassoud requested a review from frno7 January 11, 2025 17:35
@frno7
Copy link
Owner

frno7 commented Jan 12, 2025

Great! The workflow action was happy to accept a pull request too. Merged in 515fa87. Thanks, @XavierBrassoud!

@frno7 frno7 closed this Jan 12, 2025
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

Successfully merging this pull request may close these issues.

Enable EE UART
3 participants