Skip to content

Commit 89bf0ed

Browse files
nordicjmnashif
authored andcommitted
boards: nordic: thingy53: Add missing FEM entries
Adds missing SPI definition and settings for usage of FEM on this platform Signed-off-by: Jamie McCrae <[email protected]>
1 parent 4c0a72b commit 89bf0ed

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
@@ -131,6 +131,18 @@
131131
};
132132
};
133133

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