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

Enable ROCK 5B early PD negotiation #22

Draft
wants to merge 9 commits into
base: next-dev
Choose a base branch
from

Conversation

RadxaYuntian
Copy link
Member

This PR re-enables the PD related settings for ROCK 5B, and add early negotiation via CONFIG_PREBOOT. As a bonus, U-Boot console is re-enabled as well.

This reverts commit 8584db7.

Signed-off-by: ZHANG Yuntian <[email protected]>
This prevents PD adapter timeout on negotiation,
so Linux could renegotiate it later.

Signed-off-by: ZHANG Yuntian <[email protected]>
With some adapters, when the device is rebooted, the data role will
mismatch since Linux changed the data role. However, the default
ERROR_RECOVERY sequence will prevent the device from booting
again. Hard resetting seems to work better on those adapters.

Call tcpm_pd_hard_reset instead, which will fall back to ERROR_RECOVERY
when hard reset itself fails.

Signed-off-by: ZHANG Yuntian <[email protected]>
@RadxaYuntian RadxaYuntian requested a review from RadxaStephen May 9, 2023 10:46
@amazingfate
Copy link

This will break dp altmode when kernel starts negotiation because u-boot has negotiated with PD_REV20, and kernel will not send DISCOVER_IDENTITY: https://github.com/armbian/linux-rockchip/blob/linux-5.10-gen-rkr4/drivers/usb/typec/tcpm/tcpm.c#L5579

@RadxaYuntian
Copy link
Member Author

Yes this is what I observed as well. Were you able to negotiated PD_REV30 under U-Boot?

@amazingfate
Copy link

I haven't get PD_REV30 either, need to investigate the tcpm driver code in uboot.

@amazingfate
Copy link

Dp alt mode would work under PD_REV20. But when uboot has negotiated, kernel will not light up my typec monitor. I think it is because of the lacking of drp/ufp detection and dp alt mode support in the uboot driver. If I don't do negotiation in uboot, kernel will light up my typec monitor by PD_REV20.

@RadxaYuntian RadxaYuntian marked this pull request as draft May 30, 2024 02:15
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.

2 participants