mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
video: tegra20: dc: convert to use of_graph
Use OF graph as a main bridge/panel source, preserving backwards compatibility with phandle implementation. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include <cpu_func.h>
|
||||
#include <clk.h>
|
||||
#include <dm.h>
|
||||
#include <dm/ofnode_graph.h>
|
||||
#include <fdtdec.h>
|
||||
#include <log.h>
|
||||
#include <panel.h>
|
||||
@@ -443,6 +444,18 @@ static int tegra_lcd_configure_rgb(struct udevice *dev, ofnode rgb)
|
||||
ofnode remote;
|
||||
int ret;
|
||||
|
||||
/* DC can have only 1 port */
|
||||
remote = ofnode_graph_get_remote_node(rgb, -1, -1);
|
||||
|
||||
ret = uclass_get_device_by_ofnode(UCLASS_PANEL, remote, &priv->panel);
|
||||
if (!ret)
|
||||
return 0;
|
||||
|
||||
ret = uclass_get_device_by_ofnode(UCLASS_VIDEO_BRIDGE, remote, &priv->bridge);
|
||||
if (!ret)
|
||||
return 0;
|
||||
|
||||
/* Try legacy method if graph did not work */
|
||||
remote = ofnode_parse_phandle(rgb, "nvidia,panel", 0);
|
||||
if (!ofnode_valid(remote))
|
||||
return -EINVAL;
|
||||
|
||||
Reference in New Issue
Block a user