Odroid-M2: Fix USB-C port in OTG mode#9633
Conversation
Signed-off-by: Milivoje Legenovic <m.legenovic@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughTwo kernel patch files for Rockchip64 (versions 6.18 and 7.0) update the Odroid-M2 device tree configuration to support USB-C OTG mode. Both patches add USB Power Delivery revision declaration and change the Type-C connector's power role negotiation setting from source to sink mode. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ This PR has been reviewed and approved — all set for merge! |
Description
Currently, USB-C port is dead on Odroid-M2 board. Port is configured in OTG mode. Changing
dr_modein DTS to"host"makes USB port working, but then it cannot act anymore as"device". Analysis has shown that the role switching is not working properly.This PR fixes the role switching, and it adds missing pd-revision property.
How Has This Been Tested?
Before this fix USB-C port was dead. After this fix all connected devices are detected and powered on:
Also when connected to a PC (role
"device") communication works. I have only tested "Linux to Linux" communication:sudo modprobe g_serialon Odroid-M2dmesgoutput on both devices (PC and Odroid-M2) there should be a messageecho "Hello" | sudo tee /dev/ttyACM0sudo cat /dev/ttyGS0to receive the messageRole switching works automatically, verified with
sudo cat /sys/kernel/debug/usb/fc000000.usb/modewhile changing connected devices.Checklist:
Summary by CodeRabbit
Bug Fixes