Questions about bringing up MT7623 board
Kristian Evensen
kristian.evensen at gmail.com
Sun Apr 29 13:18:18 PDT 2018
Hello,
On Mon, Feb 12, 2018 at 3:49 PM, Kristian Evensen
<kristian.evensen at gmail.com> wrote:
> Great, thanks for letting me know. My 4.9-DTS is just a slightly
> modified version of the eMMC-DTS, the only changes I made was to
> update bootargs and switch configuration. So adding upstream support
> should, fingers crossed, be quite fast. My main motivation for adding
> upstream support, in addition to it being fun, interesting and maybe
> can help someone else, is to see if I can get the USB OTG port on the
> board working. The port works with proprietary firmware I got with the
> device, but not with 4.9 and I was not able to get a good answer on
> how to enable it from the vendor. I see patches related to MT7623 and
> USB, but nothing mentioning USB OTG specifically. Has there been any
> work on the OTG-port, or should it "just" work out of the box? The
> reason I am trying to get the OTG-port to work, is that the vendor has
> connect a modem (via mini-PCIe) to this port.
I finally got around to working on my mt7623-board again. As a
starting point for having an easy way of building kernel + rootfs, I
used OpenWRT and the eMMC reference board-dts. I copied the dts,
updated the bootargs + memory node and then added missing nodes by
copying the most recent DTS' that I could find (usually in patches on
the mailing list or the linux-mediatek Github repo). For example, my
board uses pcie, which is not in the OpenWRT reference board dts. I
have attached my WIP patch in case anyone is curios or has time to
look. My DTS probably contains several nodes that are not needed, but
I would like to have as much as possible up and running before putting
the file on a diet.
With the patch above, I am able to bring the board up, networking
works, the USB port on the front of my device works and I can mess
around with the rootfs. However, two things do not not work and I am
starting to run out of ideas of what to try:
* My board is equipped with a 2.4GHz and a 5GHz wifi card, both
connected via PCIe. The 2.4 card is connected to a "pure" PCIe-slot
(pcie at 1,0), while the 5GHz uses the slot that is shared between PCIe
and USB3.0 (I think this is pcie at 2,0). Based on my naive
understanding, in order to enable this slot (as PCIe), I should set
u3phy2 to okay (since phy is u3port1 in dtsi), but not enable usb2.
However, when I set u3phy2 to okay, the 2.4GHz card disappears as well
and I can no long see the PCI bridge (output from lspci is empty). If
I don't add the u3phy2-node, then the 2.4Ghz card appears, but no
5GHz. Does anyone know how to make this slot work in PCIe-mode? I
tried with pcie at 0,0 instead of pcie at 2,0 as well, but it did not have
an effect.
* The board has a PCIe slot connected to the USB OTG-port, intended
for use together with modems. This slot is not working with my kernel
and for example the modem does not show up when I do lsusb. I have
been doing some digging, but so far turned up blank. Does anyone have
any pointers on where to look or where to start in order to add
support for this port? I see that the port + modem works with the
vendor firmware, but I have not been able to figure out which steps
they take to activate it.
* The following message is written to the log a couple of times during boot:
[ 2.341219] ------------[ cut here ]------------
[ 2.341225] WARNING: CPU: 3 PID: 65 at drivers/clk/clk.c:476
clk_unprepare+0x24/0x2c
[ 2.341227] Modules linked in:
[ 2.341233] CPU: 3 PID: 65 Comm: kworker/3:1 Tainted: G W
4.14.36 #0
[ 2.341236] Hardware name: Mediatek Cortex-A7 (Device Tree)
[ 2.341241] Workqueue: pm genpd_power_off_work_fn
[ 2.341250] [<c010f054>] (unwind_backtrace) from [<c010b1f4>]
(show_stack+0x10/0x14)
[ 2.341259] [<c010b1f4>] (show_stack) from [<c0540f9c>]
(dump_stack+0x78/0x8c)
[ 2.341267] [<c0540f9c>] (dump_stack) from [<c01172e8>] (__warn+0xe4/0x100)
[ 2.341273] [<c01172e8>] (__warn) from [<c01173b4>]
(warn_slowpath_null+0x20/0x28)
[ 2.341281] [<c01173b4>] (warn_slowpath_null) from [<c031c4d4>]
(clk_unprepare+0x24/0x2c)
[ 2.341289] [<c031c4d4>] (clk_unprepare) from [<c03260c0>]
(scpsys_power_off+0x130/0x1cc)
[ 2.341297] [<c03260c0>] (scpsys_power_off) from [<c0361348>]
(genpd_power_off+0x17c/0x244)
[ 2.341305] [<c0361348>] (genpd_power_off) from [<c0361bf8>]
(genpd_power_off_work_fn+0x2c/0x40)
[ 2.341313] [<c0361bf8>] (genpd_power_off_work_fn) from
[<c012cd4c>] (process_one_work+0x22c/0x3d0)
[ 2.341320] [<c012cd4c>] (process_one_work) from [<c012dc14>]
(worker_thread+0x308/0x524)
[ 2.341327] [<c012dc14>] (worker_thread) from [<c0132464>]
(kthread+0x12c/0x138)
[ 2.341335] [<c0132464>] (kthread) from [<c0107a08>]
(ret_from_fork+0x14/0x2c)
[ 2.341337] ---[ end trace 7b1c61fe23a78e39 ]---
Error does not seem critical, board works fine, so not sure if this is
something to worry about or not.
Thanks in advance for any help!
BR,
Kristian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-U7623-4.14-patch.patch
Type: text/x-patch
Size: 19008 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mediatek/attachments/20180429/cac68de6/attachment-0001.bin>
More information about the Linux-mediatek
mailing list