Jump to content

[Armbian build PR] - rockchip64-6.15: Fix DP alt mode on some rk3399 boards


Recommended Posts

Posted

Description

Fix Type-C DP altmode on some rk3399 boards. Currently only on rockchip64-6.15.

The old implementation is tricky, and only works in normal orientation. If the plug is flipped, there will be only USB2.0 connectivity.

With the proposed changes, the type-c ports on related rk3399 boards should work in both orientations. A few patches from Megous are picked(some of them already present in sunxi64 kernel patches). The tricky part is how to notify rk3399 cdn-dp driver about DP HPD(hot plug detection), and a workaround is written.

A caveat is that the c port has to be OTG mode, otherwise it will behave very similar to the old implementation if DP is enabled.

I'm not sure if orange pi 4 / 4 LTS support this, so there's no change to their dts yet.

Apart from the work above, the missing fan node is added to tinkerboard 2's dts.

list of changes

  • fix type-c dp altmode
    • Megous' glue driver and related improvements are imported
      • this involves enabling the driver in defconfig CONFIG_TYPEC_EXTCON=m
    • a workaround for notifying DP HPD to cdn-dp is written(not merged anywhere)
    • related device tree files/patches are updated accordingly(what about orangepi 4?)
  • add missing fan node in tinkerboard 2's dts along with some minor tweaks

How Has This Been Tested?

  • [x] build tinkerboard-2 with edge kernel
  • [x] test on tinkerboard 2s with a hub
    • [x] hub alone works in both orientations
    • [x] hub with display connected works in both orientations
    • [x] when hub is connected, display hot plug/unplug works
    • [x] USB 3.0 type-c drive works in both orientations
  • [ ] test with a DP-only dongle
  • [ ] test on pinebook pro
  • [ ] test on nanopc-t4
  • [ ] maybe test on orangepi 4 (need dts change)
  • [ ] maybe test on orangepi 4 LTS (need dts change)

Checklist:

  • [x] My code follows the style guidelines of this project
  • [x] I have performed a self-review of my own code
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [x] My changes generate no new warnings
  • [ ] Any dependent changes have been merged and published in downstream modules

View the full article

×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines