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

rk322x: fixes uboot v2024.01 interoperability with vendor kernel #6673

Merged
merged 2 commits into from
Jun 2, 2024

Conversation

paolosabatino
Copy link
Contributor

@paolosabatino paolosabatino commented May 30, 2024

Description

Uboot v2024.01 leaves HDMI/VOP and USB ports in a state that is not liked by vendor kernel and tools that use it (eg. the multitool), thus making their usage difficult or impossible.

These patches will assert the resets for HDMI, VOP and USB ports and deassert them on uboot exit, so the kernel (any kernel) will find them in active and "clean" state.

Nerd note: the USB nodes in uboot device tree do not have the reset properties. Adding the reset properties makes the USB ports undetectable to the kernel because uboot - on purpose - leaves the devices with the reset asserted. To let the kernel detect the ports, you have to add the reset properties in the kernel device tree too, so the kernel is able to deassert them. A more complete device tree is not always to be a good thing, for uboot at least.

Jira reference number AR-2349

How Has This Been Tested?

  • Compiled uboot via armbian tools
  • Tested produced uboot on various live systems
  • Tested uboot in conjuction with tools using vendor kernel (multitool)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings

multitool utility uses the legacy/vendor 4.4 kernel
and it was failing to turn on HDMI properly.
Assert and deassert all vop and hmdi resets to clean
up the state on uboot exit seems to solve the issue
uboot default behaviour is the assert resets when
it has to pass control to the kernel.
This may cause compatibility issues if the kernel
driver is not instructed to properly deassert the resets,
so we change the uboot behaviour for dwc and ehci usb
drivers to deassert reset on exit.
@paolosabatino paolosabatino requested a review from a team May 30, 2024 20:55
@github-actions github-actions bot added size/medium PR with more then 50 and less then 250 lines Hardware Hardware related like kernel, U-Boot, ... labels May 30, 2024
@chainsx chainsx added the Ready to merge Reviewed, tested and ready for merge label Jun 2, 2024
@igorpecovnik igorpecovnik merged commit 4b51f88 into armbian:main Jun 2, 2024
@paolosabatino paolosabatino deleted the fix-rk322x-uboot branch June 2, 2024 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hardware Hardware related like kernel, U-Boot, ... Ready to merge Reviewed, tested and ready for merge size/medium PR with more then 50 and less then 250 lines
Development

Successfully merging this pull request may close these issues.

3 participants