On 7/3/21 11:38 PM, Fabio Estevam wrote:

[...]

+#ifdef CONFIG_IMX8MM
+#define USB1_BASE_ADDR               0x32E40000
+#define USB2_BASE_ADDR               0x32E50000
+#else
+#define USB1_BASE_ADDR               0x38100000
+#define USB2_BASE_ADDR               0x38200000
+#endif
+#define USB_BASE_ADDR                USB1_BASE_ADDR
+#define USB1_PHY_BASE_ADDR   0x381F0000
+#define USB2_PHY_BASE_ADDR   0x382F0000

All of this should come from DT, no ?

Retrieving the USB base addresses from DT would be preferred, yes, but
the current code does not do that.

I implemented exactly that in mx6_parse_dt_addrs() , see:
4dcfa3bcbcb ("usb: ehci-mx6: Parse USB PHY and MISC offsets from DT")

Without providing these defines:

drivers/usb/host/ehci-mx6.c:254:62: error: ‘USB_BASE_ADDR’ undeclared
(first use in this function); did you mean ‘SRC_BASE_ADDR’?
   254 |  struct usbnc_regs *usbnc = (struct usbnc_regs
*)(uintptr_t)(USB_BASE_ADDR +

I suspect you need CONFIG_PHY for mx8m .

Reply via email to