[PATCH 0/2] ramips: add support for ELECOM 2x2 11ac devices with MT7621

INAGAKI Hiroshi musashino.open at gmail.com
Sat Nov 28 04:41:11 EST 2020


This is a continuation of the PR #3132 on GitHub.
After the commit 37615174f5b360bfbcf5f11813500599e3b8196d, the secondary phy on
MT7615D is registered automatically.

This patch series adds following two MT7621 devices sold by
ELECOM:

- WRC-1167GS2-B
- WRC-1167GST2

These models and WRC-*GST series already supported in OpenWrt are very
close, but there are several differences and created new dtsi for that
two models.

descriptions of notes in commits:

- there is no way to configure the correct MAC address for secondary phy on
  MT7615D

  The MAC address cannot be changed by using
  /sys/class/ieee80211/phy1/macaddress. I've found ext_mac_addr file on debugfs
  in mt76 driver repository for MT7615[1], but it's not generated on the device.

root at OpenWrt:/# ls -alh /sys/kernel/debug/ieee80211/phy0/mt76
drwxr-xr-x    2 root     root           0 Nov 28 01:54 .
drwxr-xr-x    7 root     root           0 Nov 28 01:54 ..
-r--r--r--    1 root     root           0 Nov 28 01:54 acq
-r--------    1 root     root           0 Nov 28 01:54 ampdu_stat
-rw-------    1 root     root           0 Nov 28 01:54 dbdc
-r--------    1 root     root           0 Nov 28 01:54 dfs_hw_pattern
-r--------    1 root     root           0 Nov 28 01:54 eeprom
-rw-------    1 root     root           0 Nov 28 01:54 fw_debug
-rw-------    1 root     root           0 Nov 28 01:54 idle-timeout
-rw-------    1 root     root           0 Nov 28 01:54 led_active_low
-rw-------    1 root     root           0 Nov 28 01:54 led_pin
-r--------    1 root     root           0 Nov 28 01:54 otp
-rw-------    1 root     root           0 Nov 28 01:54 pattern_len
-rw-------    1 root     root           0 Nov 28 01:54 pulse_period
-rw-------    1 root     root           0 Nov 28 01:54 pulse_power
-rw-------    1 root     root           0 Nov 28 01:54 pulse_width
--w-------    1 root     root           0 Nov 28 01:54 radar_trigger
-r--r--r--    1 root     root           0 Nov 28 01:54 radio
-r--r--r--    1 root     root           0 Nov 28 01:54 rate_txpower
-rw-------    1 root     root           0 Nov 28 01:54 regidx
-rw-------    1 root     root           0 Nov 28 01:54 regval
--w-------    1 root     root           0 Nov 28 01:54 reset_test
-rw-------    1 root     root           0 Nov 28 01:54 rf_regidx
-rw-------    1 root     root           0 Nov 28 01:54 rf_regval
-rw-------    1 root     root           0 Nov 28 01:54 rf_wfidx
-rw-------    1 root     root           0 Nov 28 01:54 runtime-pm
-r--r--r--    1 root     root           0 Nov 28 01:54 rx-queues
-rw-------    1 root     root           0 Nov 28 01:54 scs
-r--r--r--    1 root     root           0 Nov 28 01:54 temperature
-r--r--r--    1 root     root           0 Nov 28 01:54 xmit-queues

- Wi-Fi band on primary phy (2.4GHz) cannot be limitted by specifying
  ieee80211-freq-limit

  if specified, mt76 driver fails to register the secondary phy due to following
  error:

[   11.136105] mt7621-pci 1e140000.pcie: bus=1 slot=0 irq=22
[   11.146925] pci 0000:00:00.0: enabling device (0004 -> 0007)
[   11.153771] random: crng init done
[   11.158230] mt7615e 0000:01:00.0: enabling device (0000 -> 0002)
[   11.164961] random: 7 urandom warning(s) missed due to ratelimiting
[   11.225191] mt7615e 0000:01:00.0: HW/SW Version: 0x8a108a10, Build Time: 20180518100604a
[   11.225191]
[   11.235313] PPP generic driver version 2.4.2
[   11.254500] NET: Registered protocol family 24
[   11.299683] kmodloader: done loading kernel modules from /etc/modules.d/*
[   11.548627] mt7615e 0000:01:00.0: N9 Firmware Version: _reserved_, Build Time: 20200814163649
[   11.576412] mt7615e 0000:01:00.0: CR4 Firmware Version: _reserved_, Build Time: 20190121161307
[   12.254653] ------------[ cut here ]------------
[   12.264122] WARNING: CPU: 0 PID: 29 at backports-5.8-1/net/wireless/core.c:872 wiphy_register+0xd80/0xd88 [cfg80211]
[   12.285164] Modules linked in: xt_connlimit pppoe ppp_async nf_conncount iptable_nat xt_state xt_nat xt_helper xt_conntrack xt_connmark xt_connbytes xt_REDIRECT xt_MASQUERADE xt_FLOWOFFLOAD xt_CT pppox ppp_generic nf_nat nf_flow_table_hw nf_flow_table nf_conntrack_rtcache nf_conntrack mt7615e mt7615_common mt76 mac80211 ipt_REJECT cfg80211 xt_time xt_tcpudp xt_tcpmss xt_statistic xt_recent xt_multiport xt_mark xt_mac xt_limit xt_length xt_hl xt_ecn xt_dscp xt_comment xt_TCPMSS xt_LOG xt_HL xt_DSCP xt_CLASSIFY slhc nf_reject_ipv4 nf_log_ipv4 nf_defrag_ipv6 nf_defrag_ipv4 iptable_raw iptable_mangle iptable_filter ipt_ECN ip_tables crc_ccitt compat ledtrig_heartbeat xt_set ip_set_list_set ip_set_hash_netportnet ip_set_hash_netport ip_set_hash_netnet ip_set_hash_netiface ip_set_hash_net ip_set_hash_mac ip_set_hash_ipportnet ip_set_hash_ipportip ip_set_hash_ipport ip_set_hash_ipmark ip_set_hash_ip ip_set_bitmap_port ip_set_bitmap_ipmac ip_set_bitmap_ip ip_set nfnetlink nf_log_ipv6 nf_log_common
[   12.285443]  ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables nf_reject_ipv6 nat46 ip6_tunnel tunnel6 leds_gpio gpio_button_hotplug
[   12.486568] CPU: 0 PID: 29 Comm: kworker/u8:1 Not tainted 5.4.75 #0
[   12.499091] Workqueue: phy0 0x86fb42e0
[   12.506553] Stack : 806071f8 87d3fc7c 80680000 806c0000 87ce9080 80618d40 8640123c 00000009
[   12.523182]         865756a8 00000001 00000004 8007d620 00000000 00000001 87d3fc38 88093ab2
[   12.539810]         00000000 00000000 000000dd 00000000 00000030 000000dd 6870203a 30203079
[   12.556434]         00000000 00000000 00000000 00079d93 00000000 806e0000 00000000 8640123c
[   12.573060]         00000009 865756a8 00000001 00000004 00000001 80337ad4 00000000 80820000
[   12.589686]         ...
[   12.594544] Call Trace:
[   12.599424] [<8000b72c>] show_stack+0x30/0x100
[   12.608292] [<8055f738>] dump_stack+0xa4/0xdc
[   12.616970] [<8002c00c>] __warn+0xc0/0x10c
[   12.625117] [<8002c0b4>] warn_slowpath_fmt+0x5c/0xac
[   12.635072] [<8640123c>] wiphy_register+0xd80/0xd88 [cfg80211]
[   12.646838] [<865014ac>] ieee80211_register_hw+0x9bc/0xd8c [mac80211]
[   12.659716] [<86f523c0>] mt76_register_phy+0x18/0x38 [mt76]
[   12.670829] [<86fa31ec>] mt7615_register_ext_phy+0x274/0x2ac [mt7615_common]
[   12.684871] [<80045a70>] process_one_work+0x244/0x498
[   12.694919] [<80045e2c>] worker_thread+0x168/0x5ec
[   12.704459] [<8004b630>] kthread+0x140/0x148
[   12.712952] [<800068d8>] ret_from_kernel_thread+0x14/0x1c
[   12.724271] ---[ end trace 3c804470b09f795e ]---

[1]: https://github.com/openwrt/mt76/blob/066cc441eb8fcec7a3aeb6a320f5f9e6c21790f1/mt7615/debugfs.c#L522

INAGAKI Hiroshi (2):
  ramips: add support for ELECOM WRC-1167GS2-B
  ramips: add support for ELECOM WRC-1167GST2

 .../dts/mt7621_elecom_wrc-1167gs2-b.dts       |  57 ++++++
 .../ramips/dts/mt7621_elecom_wrc-1167gst2.dts |  57 ++++++
 .../dts/mt7621_elecom_wrc-1167gsxx.dtsi       | 179 ++++++++++++++++++
 target/linux/ramips/image/mt7621.mk           |  16 ++
 4 files changed, 309 insertions(+)
 create mode 100644 target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts
 create mode 100644 target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts
 create mode 100644 target/linux/ramips/dts/mt7621_elecom_wrc-1167gsxx.dtsi

-- 
2.28.0.windows.1




More information about the openwrt-devel mailing list