|
15 | 15 | #include <linux/ioport.h>
|
16 | 16 | #include <linux/iopoll.h>
|
17 | 17 | #include <linux/math64.h>
|
| 18 | +#include <dm/of_access.h> |
18 | 19 |
|
19 | 20 | #include "rockchip_phy.h"
|
20 | 21 |
|
@@ -899,8 +900,26 @@ static int inno_video_phy_probe(struct udevice *dev)
|
899 | 900 |
|
900 | 901 | ret = dev_read_resource(dev, 1, &inno->host);
|
901 | 902 | if (ret < 0) {
|
902 |
| - dev_err(dev, "resource \"host\" not found\n"); |
903 |
| - return ret; |
| 903 | + int node; |
| 904 | + const fdt32_t *php = NULL; |
| 905 | + struct fdt_resource fres; |
| 906 | + |
| 907 | + fdt_for_each_subnode(node, gd->fdt_blob, 0) { |
| 908 | + php = fdt_getprop(gd->fdt_blob, node, "phys", NULL); |
| 909 | + if (fdt32_to_cpu(*php) == dev->node.np->phandle) { |
| 910 | + if (fdt_get_resource(gd->fdt_blob, node, "reg", 0, &fres)) |
| 911 | + php = NULL; |
| 912 | + break; |
| 913 | + } |
| 914 | + } |
| 915 | + |
| 916 | + if (!php) { |
| 917 | + dev_err(dev, "resource \"host\" not found\n"); |
| 918 | + return ret; |
| 919 | + } |
| 920 | + |
| 921 | + inno->host.start = fres.start; |
| 922 | + inno->host.end = fres.end; |
904 | 923 | }
|
905 | 924 |
|
906 | 925 | phy->dev = dev;
|
@@ -966,6 +985,12 @@ static const struct udevice_id inno_video_phy_ids[] = {
|
966 | 985 | .compatible = "rockchip,rk3568-video-phy",
|
967 | 986 | .data = (ulong)&rk3568_inno_video_phy_driver_data,
|
968 | 987 | },
|
| 988 | +#if defined(CONFIG_TARGET_ODROID_M1) || defined(CONFIG_TARGET_ODROID_M1S) |
| 989 | + { |
| 990 | + .compatible = "rockchip,rk3568-dsi-dphy", |
| 991 | + .data = (ulong)&rk3568_inno_video_phy_driver_data, |
| 992 | + }, |
| 993 | +#endif |
969 | 994 | {}
|
970 | 995 | };
|
971 | 996 |
|
|
0 commit comments