Skip to content

Commit d10116d

Browse files
committed
luckfox-lyra-zero-w: Default to onboard wifi antenna, add overlay for ipex.
Currently the luckfox-lyra-zero-w defaults to using the ipex connector for wifi (not the onboard antenna). This has lead to user confusion. Use a gpio hog to set the antenna selection pin HIGH at boot, selecting the onboard by default. Add an overlay for switching to the ipex connector.
1 parent 45533e9 commit d10116d

3 files changed

Lines changed: 39 additions & 0 deletions

File tree

arch/arm/boot/dts/overlay/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ dtbo-$(CONFIG_ARCH_ROCKCHIP) += \
88
rockchip-luckfox-lyra-plus-spi0-1cs-spidev.dtbo \
99
rockchip-luckfox-lyra-plus-spi0-2cs-spidev.dtbo \
1010
rockchip-luckfox-lyra-ultra-w-spi0-1cs-spidev.dtbo \
11+
rockchip-luckfox-lyra-zero-w-ipex-antenna.dtbo \
1112
rockchip-luckfox-lyra-zero-w-spi0-1cs-spidev.dtbo \
1213
rockchip-luckfox-lyra-zero-w-spi0-2cs-spidev.dtbo \
1314
rockchip-luckfox-lyra-zero-w-spi1-1cs-spidev.dtbo \
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2+
/*
3+
* Switch wifi/bluetooth antenna from onboard to external IPEX connector
4+
* on Luckfox Lyra Zero W.
5+
*/
6+
7+
/dts-v1/;
8+
/plugin/;
9+
10+
/ {
11+
metadata {
12+
title = "Enable IPEX antenna on luckfox-lyra-zero-w";
13+
compatible = "rockchip,rk3506b-lyra-zero";
14+
category = "misc";
15+
description = "Switch wifi/bluetooth from onboard antenna to external IPEX connector (GPIO1_C7 low).";
16+
};
17+
};
18+
19+
&gpio1 {
20+
ant-sel-hog {
21+
output-low;
22+
};
23+
};

arch/arm/boot/dts/rk3506b-luckfox-lyra-zero-w-sd.dts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,21 @@
9999
status = "okay";
100100
};
101101

102+
/**********gpio**********/
103+
&gpio1 {
104+
/*
105+
* Antenna selection GPIO
106+
* output-high = Onboard antenna selected
107+
* output-low = External (ipex) antenna selected
108+
*/
109+
ant-sel-hog {
110+
gpio-hog;
111+
gpios = <RK_PC7 GPIO_ACTIVE_HIGH>;
112+
output-high;
113+
line-name = "ant-sel";
114+
};
115+
};
116+
102117
/**********pinctrl**********/
103118
&pinctrl {
104119
lcd {

0 commit comments

Comments
 (0)