Problems enabling the PCIe/USB3.0 port on MT7623N
John Crispin
john at phrozen.org
Fri Nov 3 05:19:15 PDT 2017
On 03/11/17 12:07, Kristian Evensen wrote:
> Hi Ryder,
>
> Thanks for the quick reply!
>
> On Fri, Nov 3, 2017 at 3:13 AM, Ryder Lee <ryder.lee at mediatek.com> wrote:
>> Glad to see someone else interested in the MT7623N. In your case you
>> need to set extra bit to switch the PCIe/USB function, which is not
>> supported in mainline yet...
>>
>> Please see the below link and search 'HIF_SYSCFG1'.
>>
>> https://patchwork.kernel.org/patch/9694575/
> I am currently building LEDE for the board and noticed that they have
> a different patch for PCIe
> (https://git.lede-project.org/?p=source.git;a=blob;f=target/linux/mediatek/patches-4.9/0003-PCI-mediatek-add-support-for-PCIe-found-on-MT7623-MT.patch;h=43f51ef6b334d6ff859dca6218a9710ba1b9e3d5;hb=HEAD).
> This patch does the same regmap_update_bits() call (with the same
> values) and I added some logs to confirm that the functions is called.
> So at least that part should be fine.
>
> Yesterday evening, I had some discussions with the producer of the
> board, as they provided me with two firmware images - one where I can
> see the device connected to the slot (provided to the vendor by
> Mediatek) and one where the device is not available (image compiled by
> the vendor). According to the vendor, the difference between the
> images is that the image provided by Mediatek enables USB
> OTG-functionality and this is required for the slot. However, they
> could not give me any technical details on how to enable OTG. When
> searching the linux-mediatek mailing list archives, I couldn't find
> any OTG-specific patches. Are there any specific steps that has to be
> taken to enable OTG?
>
> I am not sure if it matters, but when I look at the image where I can
> see the device, the content of USB devices is:
> # ls /sys/bus/usb/devices/
> 2-0:1.0 1-0:1.0 3-1:1.0 usb3 usb1 1-1
> 1-1:1.0 3-1:1.1 3-0:1.0 usb2 3-1
>
> With LEDE or the other vendor-firmware, it contains the follows:
> root at LEDE:/# ls /sys/bus/usb/devices/
> 1-0:1.0 2-0:1.0 usb1 usb2
>
> I was also provided with the toolchain yesterday, so I will try to
> compile the linux-mediatek kernel for the board. Which branch is the
> best to use?
>
> Thanks for all the help so far,
> Kristian
>
> _______________________________________________
> Linux-mediatek mailing list
> Linux-mediatek at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-mediatek
Hi Kristian,
the patch in LEDE is an old version of the driver, feel free to send a
patch backporting latest from upstream.
I managed to get the 2nd USBport working on the LEDE last night and will
push a patch today. the usb2 node is simply not getting enabled and the
2nd phys node is missing 2 properties.
John
More information about the Linux-mediatek
mailing list