Skip to content

Commit 79b618c

Browse files
nordicjmbjarki-andreasen
authored andcommitted
[nrf fromlist] boards: nordic: thingy53: Add missing FEM entries
Adds missing SPI definition and settings for usage of FEM on this platform Upstream PR: zephyrproject-rtos/zephyr#78657 Signed-off-by: Jamie McCrae <[email protected]>
1 parent b78be6b commit 79b618c

File tree

3 files changed

+50
-0
lines changed

3 files changed

+50
-0
lines changed

boards/nordic/thingy53/thingy53_nrf5340_common.dtsi

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,18 @@
132132
};
133133
};
134134

135+
/* Disabled by default as SPI lines are shared with peripherals on application core */
136+
spi_fwd: nrf-spi-forwarder {
137+
compatible = "nordic,nrf-gpio-forwarder";
138+
status = "disabled";
139+
fem-spi-if {
140+
gpios = <&gpio0 24 0>,
141+
<&gpio0 29 0>,
142+
<&gpio0 27 0>,
143+
<&gpio0 28 0>;
144+
};
145+
};
146+
135147
aliases {
136148
sw0 = &button0;
137149
sw1 = &button1;

boards/nordic/thingy53/thingy53_nrf5340_cpunet-pinctrl.dtsi

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,20 @@
2323
};
2424
};
2525

26+
spi0_default: spi0_default {
27+
group1 {
28+
psels = <NRF_PSEL(SPIM_SCK, 0, 29)>,
29+
<NRF_PSEL(SPIM_MISO, 0, 27)>,
30+
<NRF_PSEL(SPIM_MOSI, 0, 28)>;
31+
};
32+
};
33+
34+
spi0_sleep: spi0_sleep {
35+
group1 {
36+
psels = <NRF_PSEL(SPIM_SCK, 0, 29)>,
37+
<NRF_PSEL(SPIM_MISO, 0, 27)>,
38+
<NRF_PSEL(SPIM_MOSI, 0, 28)>;
39+
low-power-enable;
40+
};
41+
};
2642
};

boards/nordic/thingy53/thingy53_nrf5340_cpunet.dts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
mode-gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
6464
pdn-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
6565
tx-en-gpios = <&gpio0 30 GPIO_ACTIVE_HIGH>;
66+
spi-if = <&nrf_radio_fem_spi>;
6667
supply-voltage-mv = <3000>;
6768
};
6869

@@ -111,6 +112,27 @@
111112
pinctrl-names = "default", "sleep";
112113
};
113114

115+
/* Disabled by default as shares same GPIO lines as SPI peripherals on application core */
116+
fem_spi: &spi0 {
117+
status = "disabled";
118+
cs-gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
119+
pinctrl-0 = <&spi0_default>;
120+
pinctrl-1 = <&spi0_sleep>;
121+
pinctrl-names = "default", "sleep";
122+
123+
nrf_radio_fem_spi: nrf21540_fem_spi@0 {
124+
compatible = "nordic,nrf21540-fem-spi";
125+
status = "disabled";
126+
reg = <0>;
127+
spi-max-frequency = <8000000>;
128+
};
129+
};
130+
131+
&radio {
132+
/* Uncomment to enable SPI interface for FEM */
133+
/* fem = <&nrf_radio_fem>; */
134+
};
135+
114136
&flash1 {
115137

116138
partitions {

0 commit comments

Comments
 (0)