
Hi Marek,
Sorry for late reply. I was stuck in some pitfalls.
On 2023/01/25 22:03, Marek Vasut wrote:
On 1/25/23 09:40, Kunihiko Hayashi wrote:
Hi Marek,
Hello Hayashi-san,
[...]
The idea is that the dwc3-generic.c (or dwc3-uniphier.c , placement does not really matter) binds to "socionext,uniphier-pxs3-dwc3-glue" compatible first.
Then, the dwc3_glue_ops is extended with a new callback glue_get_ctrl_dev, which returns the pointer to controller DT node (the node compatible with "socionext,uniphier-dwc3"). This is used in dwc3_glue_bind(), which either uses the current implementation with a loop over all subnodes and tries to find the controller subnode, OR, calls the glue_get_ctrl_dev callback, obtains controller device node pointer that way, and runs the inner loop of dwc3_glue_bind() (now dwc3_glue_bind_common()) only on that pointer.
I understand your patch adds trying to call "glue_get_ctrl_dev" to get controller device node before finding subnode,
Yes. Feel free to adjust the patch so it fits uniphier better of course.
In either case, the dwc3-generic driver is bound to the controller. You might need to re-use this trick in dwc3_glue_probe() too.
This should allow you to get rid of the custom DT node too.
Does this work ?
I'll try this soon.
Thank you !
I've successfully enabled the regular usb node using your suggested patch [1] and your earlier submitted patch [2].
[1] https://source.denx.de/u-boot/custodians/u-boot-usb/-/commit/028ad9536e50198... - Change 2nd argument type from "udevice *" to "ofnode" because glue_get_ctrl_dev() can give only "ofnode" structure from the device node. - Move soc-dependent stuffs to dwc3-uniphier.c.
[2] https://patchwork.ozlabs.org/project/uboot/patch/20221215223822.137739-1-mar... - correspond to "for top level generic node with no subnode"
However, the uniphier usb3 glue node has more child nodes (not for the controller), so I need to add more patches to enable more clocks that the child nodes have.
I should send new patches as v2 series, though, how do you treat your patches [1] and [2]?
Thank you,
--- Best Regards Kunihiko Hayashi