Skip to content

Commit 87deede

Browse files
committed
samples: support for nrf54l15 with tfm
[KRKNWK-19489] Fix faults after application start. Align mfg address with non tfm variant. Disable logs in tf-m, pins are needed for Semtech. Signed-off-by: Krzysztof Taborowski <krzysztof.taborowski@nordicsemi.no>
1 parent 5ea2aee commit 87deede

4 files changed

Lines changed: 172 additions & 141 deletions

File tree

samples/sid_end_device/boards/nrf54l15dk_nrf54l15_cpuapp_ns.conf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,15 @@
77
# Multirole is the only currently supported role by SoftDevice.
88
CONFIG_BT_LL_SOFTDEVICE_MULTIROLE=y
99

10+
# nRF54L15 requires bigger stack sizes than nRF52/nRF53 families
11+
CONFIG_MPSL_WORK_STACK_SIZE=2048
12+
1013
# Not supported for 54L15 _NS
1114
CONFIG_FPROTECT=n
1215

1316
# Set the ZMS sector count to match the settings partition size that is 40 kB for this application.
1417
CONFIG_SETTINGS_ZMS_SECTOR_COUNT=10
18+
19+
# Disable tf-m uart to reuse pins for semtech
20+
CONFIG_TFM_LOG_LEVEL_SILENCE=y
21+
CONFIG_TFM_SECURE_UART=n

samples/sid_end_device/boards/nrf54l15dk_nrf54l15_cpuapp_ns.overlay

Lines changed: 59 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,7 @@
44
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
55
*/
66

7-
&pinctrl {
8-
spi21_default: spi21_default {
9-
group1 {
10-
psels = <NRF_PSEL(SPIM_SCK, 2, 6)>,
11-
<NRF_PSEL(SPIM_MISO, 1, 11)>,
12-
<NRF_PSEL(SPIM_MOSI, 2, 8)>;
13-
};
14-
};
15-
16-
spi21_sleep: spi21_sleep {
17-
group1 {
18-
psels = <NRF_PSEL(SPIM_SCK, 2, 6)>,
19-
<NRF_PSEL(SPIM_MISO, 1, 11)>,
20-
<NRF_PSEL(SPIM_MOSI, 2, 8)>;
21-
low-power-enable;
22-
};
23-
};
24-
};
25-
26-
sid_semtech: &spi21 {
27-
compatible = "nordic,nrf-spim";
28-
status = "okay";
29-
cs-gpios = <&gpio2 0xa GPIO_PULL_UP>;
30-
pinctrl-0 = <&spi21_default>;
31-
pinctrl-1 = <&spi21_sleep>;
32-
pinctrl-names = "default", "sleep";
33-
clock-frequency = <DT_FREQ_M(8)>;
34-
};
35-
36-
/{
7+
/{
378
aliases {
389
state-notifier-connected = &led0;
3910
state-notifier-time-sync = &led1;
@@ -44,25 +15,34 @@
4415
semtech_sx1262_gpios{
4516
compatible = "gpio-keys";
4617
semtech_sx1262_reset_gpios: reset {
47-
gpios = <&gpio0 0x2 (GPIO_ACTIVE_LOW|GPIO_PULL_UP)>;
18+
gpios = <&gpio2 8 (GPIO_ACTIVE_LOW|GPIO_PULL_UP)>;
4819
label = "semtech_sx1262 Reset";
4920
};
5021
semtech_sx1262_busy_gpios: busy {
51-
gpios = <&gpio0 0x0 0x0>;
22+
gpios = <&gpio2 6 (GPIO_ACTIVE_HIGH)>;
5223
label = "semtech_sx1262 Busy";
5324
};
5425
semtech_sx1262_antenna_enable_gpios: antena_enable {
55-
gpios = <&gpio0 0x1 0x0>;
26+
gpios = <&gpio2 10 (GPIO_ACTIVE_HIGH)>;
5627
label = "semtech_sx1262 Antena Enable";
5728
};
5829
semtech_sx1262_dio1_gpios: dio1 {
59-
gpios = <&gpio0 0x3 0x0>;
30+
gpios = <&gpio1 11 (GPIO_ACTIVE_HIGH|GPIO_PULL_DOWN)>;
6031
label = "semtech_sx1262 DIO1";
6132
};
62-
};
33+
};
34+
};
35+
36+
sid_semtech: &spi30 {
37+
compatible = "nordic,nrf-spim";
38+
status = "okay";
39+
cs-gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
40+
pinctrl-0 = <&spi30_default_alt>;
41+
pinctrl-1 = <&spi30_sleep_alt>;
42+
pinctrl-names = "default", "sleep";
43+
clock-frequency = <DT_FREQ_M(8)>;
6344
};
6445

65-
// restore full RRAM and SRAM space - by default some parts are dedicated to FLRP
6646
&cpuapp_rram {
6747
reg = <0x0 DT_SIZE_K(1524)>;
6848
};
@@ -72,6 +52,49 @@
7252
ranges = <0x0 0x20000000 0x40000>;
7353
};
7454

55+
&pinctrl {
56+
spi30_default_alt: spi30_default_alt {
57+
group1 {
58+
psels = <NRF_PSEL(SPIM_SCK, 0, 3)>,
59+
<NRF_PSEL(SPIM_MISO, 0, 2)>,
60+
<NRF_PSEL(SPIM_MOSI, 0, 1)>;
61+
};
62+
};
63+
64+
spi30_sleep_alt: spi30_sleep_alt {
65+
group1 {
66+
psels = <NRF_PSEL(SPIM_SCK, 0, 3)>,
67+
<NRF_PSEL(SPIM_MISO, 0, 2)>,
68+
<NRF_PSEL(SPIM_MOSI, 0, 1)>;
69+
low-power-enable;
70+
};
71+
};
72+
};
73+
74+
&adc {
75+
status = "disabled";
76+
};
77+
&uart21 {
78+
status = "disabled";
79+
};
80+
&pwm20 {
81+
status = "disabled";
82+
};
83+
&i2c20 {
84+
status = "disabled";
85+
};
86+
&spi20 {
87+
status = "disabled";
88+
};
89+
&spi22 {
90+
status = "disabled";
91+
};
92+
93+
// TODO: re-enable HWFC once it's fixed
94+
&uart20 {
95+
/delete-property/ hw-flow-control;
96+
};
97+
7598

7699
// Change IRQ ids to handle button interrupts.
77100

0 commit comments

Comments
 (0)