video/drm: display: add compatible rk356x lvds dts config
after this commit, can support parse the following two config:
1.
panel {
...
display-timings {
...
};
port@0 {
reg = <0>;
panel_in_lvds: endpoint {
remote-endpoint = <&lvds_out_panel>;
};
};
};
2.
panel {
...
display-timings {
...
};
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
panel_in_lvds: endpoint {
remote-endpoint = <&lvds_out_panel>;
};
};
};
};
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Idbcc31bbe29d00fe5ceea1f5041543cdfe9bc34e
This commit is contained in:
parent
b9e9168c08
commit
5f0cde7958
|
|
@ -1165,7 +1165,7 @@ enum {
|
|||
|
||||
static struct rockchip_panel *rockchip_of_find_panel(struct udevice *dev)
|
||||
{
|
||||
ofnode panel_node, ports, port, ep;
|
||||
ofnode panel_node, ports, port, ep, port_parent_node;
|
||||
struct udevice *panel_dev;
|
||||
int ret;
|
||||
|
||||
|
|
@ -1193,6 +1193,7 @@ static struct rockchip_panel *rockchip_of_find_panel(struct udevice *dev)
|
|||
ofnode_for_each_subnode(ep, port) {
|
||||
ofnode _ep, _port;
|
||||
uint phandle;
|
||||
bool is_ports_node = false;
|
||||
|
||||
if (ofnode_read_u32(ep, "remote-endpoint", &phandle))
|
||||
continue;
|
||||
|
|
@ -1205,7 +1206,12 @@ static struct rockchip_panel *rockchip_of_find_panel(struct udevice *dev)
|
|||
if (!ofnode_valid(_port))
|
||||
continue;
|
||||
|
||||
panel_node = ofnode_get_parent(_port);
|
||||
port_parent_node = ofnode_get_parent(_port);
|
||||
is_ports_node = strstr(port_parent_node.np->full_name, "ports") ? 1 : 0;
|
||||
if (is_ports_node)
|
||||
panel_node = ofnode_get_parent(port_parent_node);
|
||||
else
|
||||
panel_node = ofnode_get_parent(_port);
|
||||
if (!ofnode_valid(panel_node))
|
||||
continue;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue