技术专栏
xavier nx平台调试sdio WiFi模块
1. 前言
使用WiFi板与Jetson Xavier NX模块连接调试。
模块是BCM43455模块,使用的是SDIO接口。
dts定义如下:
sdhci@3440000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "nvidia,tegra194-sdhci";
reg = <0x0 0x3440000 0x0 0x00020000>;
interrupts = < 0 TEGRA194_IRQ_SDMMC3 0x04>;
iommus = <&smmu TEGRA_SID_SDMMC3A>;
dma-coherent;
max-clk-limit = <208000000>;
bus-width = <4>;
cap-mmc-highspeed;
cap-sd-highspeed;
sd-uhs-sdr104;
sd-uhs-sdr50;
sd-uhs-sdr25;
sd-uhs-sdr12;
mmc-ddr-1_8v;
mmc-hs200-1_8v;
cd-inverted;
nvidia,min-tap-delay = <96>;
nvidia,max-tap-delay = <139>;
nvidia,vqmmc-always-on;
pwrdet-support;
pinctrl-names = "sdmmc_e_33v_enable", "sdmmc_e_33v_disable";
pinctrl-0 = <&sdmmc3_e_33V_enable>;
pinctrl-1 = <&sdmmc3_e_33V_disable>;
ignore-pm-notify;
resets = <&bpmp_resets TEGRA194_RESET_SDMMC3>;
reset-names = "sdhci";
pll_source = "pll_p", "pll_c4_muxed";
nvidia,set-parent-clk;
nvidia,parent_clk_list = "pll_p", "pll_p", "pll_p", "pll_p", "pll_p", "pll_c4_muxed", "pll_c4_muxed", "pll_c4_muxed", "pll_c4_muxed", "pll_c4_muxed", "NULL";
clocks = <&bpmp_clks TEGRA194_CLK_SDMMC3>,
<&bpmp_clks TEGRA194_CLK_PLLP_OUT0>,
<&bpmp_clks TEGRA194_CLK_PLLC4_MUXED>,
<&bpmp_clks TEGRA194_CLK_SDMMC_LEGACY_TM>;
clock-names = "sdmmc", "pll_p", "pll_c4_muxed", "sdmmc_legacy_tm";
uhs-mask = <0x08>;
nvidia,en-periodic-calib;
status = "okay";
brcmf: wifi@0 {
reg = <0>;
compatible = "brcm,bcm4329-fmac";
};
};
sdhci正常注册
[ 5.285300] sdhci-tegra 3440000.sdhci: Client registration for eMC Successful
但WiFi模块探测本身没有发生
WIFI固件如下
~$ ls -l /lib/firmware/brcm/brcmfmac43455-sdio.bin
-rw-r–r-- 1 root root 488193 Mar 30 2017 /lib/firmware/brcm/brcmfmac43455-sdio.bin
开启内核配置
CONFIG_CFG80211=y
CONFIG_BRCMUTIL=y
CONFIG_BRCMFMAC=y
CONFIG_BRCMFMAC_SDIO=y
2. 查询 driver & dmesg & 硬件
(1)/sys/bus/sdio/drivers
$ ls -l /sys/bus/sdio/drivers
total 0
drwxr-xr-x 2 root root 0 Sep 24 14:04 brcmfmac
$ ls -l /sys/bus/sdio/devices
total 0
(2)查询dmesg
可能SDIO没有被枚举出来
问题不是fw或客户端驱动程序
这是TX2上的sdio wifi日志
[ 1.461159] sdhci-tegra 3440000.sdhci: Client registration for eMC Successful
[ 1.506029] mmc1: SDHCI controller on 3440000.sdhci [3440000.sdhci] using ADMA 64-bit with 64 bit addr
[ 1.757516] mmc1: hw tuning done …
[ 1.761158] mmc1: new ultra high speed SDR104 SDIO card at address 0001
(3)检测硬件
在启动时能看到时钟
原理图
3. 咨询nvidia FAE
提到Xavier系列不支持SDIO wifi
我们的软件不验证任何类型的wifi卡在Xavier系列芯片上的SDIO,
我们没有这样做的计划。
因此,你仍然可以尝试,但我们可能不会提供太多经验,因
为它也没有经过我们这边的验证。
只有TX1和TX2是验证过sdio WiFi的。
我不能给你一个明确的“是”或“否”的答案,因为这是我们尚未核实的事情,
目前也没有相关计划。
也许其他用户也有成功的经验。
但是从官方支持的角度来看,我们建议用户在Xavier系列中使用Wifi而不是SDIO
4. 调试记录
(1)修改sdhci 设备树
sdhci@700b0400 { /* SDMMC3 for Wifi */
#address-cells = <1>;
#size-cells = <0>;
force-non-removable-rescan;
non-removable;
status = "okay";
brcmf: brcmf@0 {
reg = <0>;
compatible = "brcm,bcm4329-fmac";
};
};
有时我在mmc1上得到这个错误,
[ 5.466191] mmc1: CMD CRC or end bit error, int mask 0xc0001
[ 5.466589] mmc1: CMD CRC or end bit error, int mask 0xc0000
[ 5.466987] mmc1: CMD CRC or end bit error, int mask 0xc0000
[ 5.467382] mmc1: CMD CRC or end bit error, int mask 0xc0000
(2)是否使用一个永远开机的电源作为wifi模块的VIN
当“WL_REG_ON”变高时,启用VIN_LDO (1.3v)
(3)系统启动时是否启用GPIO12 (WL_REG_ON) ?
是的,系统启动时启用GPIO12 (WL_REG_ON)
我在dts中这样定义,以便在引导时启用GPIO12
gpio: gpio@6000d000 {
wlan-output-high {
gpio-hog;
output-high;
gpios = <TEGRA_GPIO(Y, 2) GPIO_ACTIVE_HIGH>;
label = “wlan-out-high”;
};
}
SDIO时钟只在启动时被看到
GPIO12(WL_REG_ON)-在SDIO时钟激活前启用
仍然没有枚举SDIO和WiFi客户端驱动程序探测没有发生
[ 1.595331] mmc1: new ultra high speed SDR104 SDIO card at address 0001
and WiFi client driver probe is happening
(4)dts只设置成1.8v
WiFi加载正常
我可以在Jetson Nano上打开wifi,但同样的驱动程序在Xavier NX上不能工作
错误如下:
[ 8.279684] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code (0x30 0x30)
[ 11.551637] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code (0x30 0x30)
[ 14.166818] brcmfmac: brcmf_proto_bcdc_query_dcmd: brcmf_proto_bcdc_msg failed w/status -110
[ 17.494892] brcmfmac: brcmf_proto_bcdc_query_dcmd: brcmf_proto_bcdc_msg failed w/status -110
[ 17.495084] brcmfmac: brcmf_cfg80211_get_channel: chanspec failed (-110)
[ 23.386799] brcmfmac: brcmf_proto_bcdc_query_dcmd: brcmf_proto_bcdc_msg failed w/status -110
[ 23.386994] brcmfmac: brcmf_cfg80211_get_tx_power: error (-110)
[ 26.454885] brcmfmac: brcmf_do_escan: error (-110)
[ 26.455009] brcmfmac: brcmf_cfg80211_scan: scan error (-110)
[ 27.443516] brcmfmac: brcmf_run_escan: error (-4)
[ 27.443643] brcmfmac: brcmf_cfg80211_scan: scan error (-4)
[ 80.215022] brcmfmac: _brcmf_set_multicast_list: Setting mcast_list failed, -110
[ 105.302828] brcmfmac: brcmf_proto_bcdc_query_dcmd: brcmf_proto_bcdc_msg failed w/status -110
[ 105.303017] brcmfmac: brcmf_cfg80211_get_channel: chanspec failed (-110)
[ 315.990889] brcmfmac: brcmf_do_escan: error (-110)
[ 315.991134] brcmfmac: brcmf_cfg80211_scan: scan error (-110)
[ 386.088003] brcmfmac: brcmf_run_escan: error (-4)
[ 386.088224] brcmfmac: brcmf_cfg80211_scan: scan error (-4)
Wlan0正常,但我不能连接任何wifi网络
$ ifconfig
wlan0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 48:eb:62:c0:f0:87 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
$ nmcli device wifi list
IN-USE SSID MODE CHAN RATE SIGNAL BARS SECURITY
arunkumar Infra 4 270 Mbit/s 37 ▂▄__ WPA2
(5)检查syslog
[ 368.989771] ieee80211 phy0: brcmf_escan_timeout: timer expired
[ 376.575141] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 386.909776] ieee80211 phy0: brcmf_escan_timeout: timer expired
[ 414.301765] ieee80211 phy0: brcmf_escan_timeout: timer expired
[ 444.720654] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 455.005784] ieee80211 phy0: brcmf_escan_timeout: timer expired
[ 473.437767] ieee80211 phy0: brcmf_escan_timeout: timer expired
[ 488.406253] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
5. 解决办法
修改sdhci为如下:
sdhci@3440000 {
#address-cells = <1>;
#size-cells = <0>;
non-removable;
force-non-removable-rescan;
no-sd;
max-clk-limit = <25000000>;
only-1-8-v;
status = “okay”;
brcmf: brcmf@0 {
reg = <0>;
compatible = “brcm,bcm4329-fmac”;
};
};
并使用最新的brcmfmac驱动程序
地址如下:
https://community.cypress.com/t5/Resource-Library/Cypress-Linux-WiFi-Driver-Release-FMAC-2020-09-25/ta-p/251089
声明:本文内容由易百纳平台入驻作者撰写,文章观点仅代表作者本人,不代表易百纳立场。如有内容侵权或者其他问题,请联系本站进行删除。
红包
92
5
评论
打赏
- 分享
- 举报
评论
0个
手气红包
暂无数据
相关专栏
-
浏览量:8583次2021-05-14 14:43:43
-
浏览量:7445次2021-06-09 14:29:23
-
浏览量:10204次2021-06-08 17:32:00
-
浏览量:9456次2021-05-26 14:17:15
-
浏览量:7867次2021-06-09 14:49:23
-
浏览量:7417次2021-05-11 17:51:48
-
浏览量:9407次2021-04-27 17:56:41
-
2021-05-06 16:03:00
-
浏览量:5980次2021-06-03 17:33:36
-
浏览量:10848次2021-05-06 16:22:01
-
浏览量:11439次2021-02-05 14:30:37
-
浏览量:5289次2021-07-09 15:20:08
-
浏览量:5249次2021-05-10 17:48:42
-
浏览量:5199次2021-07-09 15:23:33
-
浏览量:6225次2021-07-09 15:17:28
-
浏览量:7087次2021-05-11 17:04:57
-
浏览量:9387次2021-05-25 17:31:40
-
浏览量:7481次2021-05-20 17:08:14
-
浏览量:7081次2021-05-20 16:37:42
置顶时间设置
结束时间
删除原因
-
广告/SPAM
-
恶意灌水
-
违规内容
-
文不对题
-
重复发帖
打赏作者
free-jdx
您的支持将鼓励我继续创作!
打赏金额:
¥1
¥5
¥10
¥50
¥100
支付方式:
微信支付
打赏成功!
感谢您的打赏,如若您也想被打赏,可前往 发表专栏 哦~
举报反馈
举报类型
- 内容涉黄/赌/毒
- 内容侵权/抄袭
- 政治相关
- 涉嫌广告
- 侮辱谩骂
- 其他
详细说明
审核成功
发布时间设置
发布时间:
请选择发布时间设置
是否关联周任务-专栏模块
审核失败
失败原因
请选择失败原因
备注
请输入备注