phy: qcom-qmp-combo: Introduce drm_bridge
authorBjorn Andersson <quic_bjorande@quicinc.com>
Mon, 15 May 2023 03:27:41 +0000 (20:27 -0700)
committerVinod Koul <vkoul@kernel.org>
Fri, 19 May 2023 17:47:19 +0000 (23:17 +0530)
commit1904c3f578dce06760160cc5b728c960cd7db633
treee1a66ec4f9c83e9ecf79db3cfff0657dea410ddf
parent2851117f8f4218043e4c05d24494fee66e932cbe
phy: qcom-qmp-combo: Introduce drm_bridge

The QMP combo PHY sits in an of_graph connected between the DisplayPort
controller and a USB Type-C connector (or possibly a redriver).

The TCPM needs to be able to convey the HPD signal to the DisplayPort
controller, but no directly link is provided by DeviceTree so the signal
needs to "pass through" the QMP combo phy.

Handle this by introducing a drm_bridge which upon initialization finds
the next bridge (i.e. the usb-c-connector) and chain this together. This
way HPD changes in the connector will propagate to the DisplayPort
driver.

The connector bridge is resolved lazily, as the TCPM is expected to be
able to resolve the typec mux and switch at probe time, so the QMP combo
phy will probe before the TCPM.

Acked-by: Neil Armstrong <neil.armstrong@linaro.org>
Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Tested-by: Abel Vesa <abel.vesa@linaro.org>
Tested-by: Steev Klimaszewski <steev@kali.org>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on HDK8450
Tested-by: Johan Hovold <johan+linaro@kernel.org> # X13s
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
Link: https://lore.kernel.org/r/20230515032743.400170-7-quic_bjorande@quicinc.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/qualcomm/Kconfig
drivers/phy/qualcomm/phy-qcom-qmp-combo.c