// SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause)
/*
 * U-Boot-only additions for the MT8183 Kukui (krane) boards.
 *
 * The upstream mt8183.dtsi models the SSUSB block for the Linux mtu3
 * dual-role driver: the IPPC register space and the phys are declared
 * on the parent "mediatek,mtu3" node (ssusb@11201000), and the host
 * child (usb@11200000) carries only its "mac" register.
 *
 * U-Boot has no mtu3 driver; it binds the "mediatek,mtk-xhci" child
 * directly with drivers/usb/host/xhci-mtk.c, which expects the "mac"
 * and "ippc" register names and a phys list on the xHCI node itself.
 * Add the missing ippc address (taken from the ssusb node's "ippc"
 * reg entry) and the port phys there.
 *
 * DM only scans the subnodes of nodes that a driver binds (bus drivers
 * recurse via dm_scan_fdt_dev). Nothing binds "mediatek,mtu3", so the
 * xHCI child would never be bound and usb_start() would report "No USB
 * controllers found". Adding "simple-mfd" makes the generic simple-bus
 * driver bind the ssusb node and scan its children.
 */

&ssusb {
	compatible = "mediatek,mt8183-mtu3", "mediatek,mtu3", "simple-mfd";
};

&usb_host {
	reg = <0x0 0x11200000 0x0 0x1000>,
	      <0x0 0x11203e00 0x0 0x0100>;
	reg-names = "mac", "ippc";
	phys = <&u2port0 PHY_TYPE_USB2>,
	       <&u3port0 PHY_TYPE_USB3>;
};
