On 02/12/2018 10:35 PM, Simon Glass wrote:
> Hi Kever,
> On 4 February 2018 at 18:00, Kever Yang <kever.y...@rock-chips.com> wrote:
>> On 02/04/2018 09:40 PM, Simon Glass wrote:
>>> Hi Kever,
>>> On 4 February 2018 at 00:44, Kever Yang <kever.y...@rock-chips.com> wrote:
>>>> Hi Simon, Philipp,
>>>> When I try to convert to live dt, I fount there are many APIs work
>>>> in fdt are missing in live dt,
>>>> do you have any suggestion to add these APIs in live dt quickly? I need:
>>> dev_read_addr_size() - not having a parent doesn't happen with livetree
>>> We don't support changing the live tree yet.
>>> This is an odd function. Can you first check that the property exists,
>>> and then use a dev_read_...() function to read it?
>>> dev_read_name() - although I see that the comment is wrong
>>> Not available but you can add it
>>> Why do you need this?
>> Most of the APIs are used in this file or other files in this folder,
>> It needs to handle quite complicated dts node for display system in
>> rockchip drm display driver(not upstream yet):
> One difference I see with Linux is that U-Boot creates devices for all
> nodes automatically, provided that they have a compatible string and
> matching driver. This should simplify things in U-Boot.
> The supernode-at-depth function looks like it just takes the parent of
> the parent when an argument of -2 is used.
> The existing rockchip driver in U-Boot handles a similar binding,
> doesn't it? It has phandles and multiple nodes and subnodes.
Yes, but it does not able to migrate to support both live dt and fdt,
because there is no same api in live dt, and here is what I do locally
for live dt:
823 phandle = ofnode_read_u32_default(node, "connect",
824 if (phandle < 0)
825 printf("Warn: can't find connect node's
828 ep_node =
829 if (!ofnode_valid(np_to_ofnode(ep_node)))
830 printf("Warn: can't find endpoint node from
833 port_node =
834 if (!ofnode_valid(np_to_ofnode(port_node)))
835 printf("Warn: can't find port node from
838 vop_node =
839 if (!ofnode_valid(np_to_ofnode(vop_node)))
840 printf("Warn: can't find crtc node from
843 ret =
In usb phy, we have similar requirement, but only need find "-1" depth
>> - Kever
>>> uclass_get_device_by_phandle() or similar?
>>> ofnode_path() although it does not return a device. Best avoided.
>>> You can't change the livtree at present.
>>> Why do you want that?
>>> This should be found by scanning, generally using separate drivers for
>>> each DT node.
>>> If you like you could send a patch with the info above, to
>>> doc/driver-model/livetree.txt to help others.
U-Boot mailing list