Skip to content

Commit

Permalink
build: add gpio configuration for nrf54l15
Browse files Browse the repository at this point in the history
allows to initialize FSK/LoRa, but still does not work

Signed-off-by: Robert Gałat <[email protected]>
  • Loading branch information
RobertGalatNordic committed Apr 11, 2024
1 parent c723d50 commit 863bd13
Show file tree
Hide file tree
Showing 4 changed files with 103 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@
# which does not support interrupts.
CONFIG_DK_LIBRARY_BUTTON_NO_ISR=y

CONFIG_SIDEWALK_SUBGHZ_SUPPORT=n
CONFIG_SOC_FLASH_NRF_TIMEOUT_MULTIPLIER=100
96 changes: 96 additions & 0 deletions samples/sid_end_device/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
/*
* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/


&pinctrl {
spi21_default: spi21_default {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 2, 6)>,
<NRF_PSEL(SPIM_MISO, 2, 9)>,
<NRF_PSEL(SPIM_MOSI, 2, 8)>;
};
};

spi21_sleep: spi21_sleep {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 2, 6)>,
<NRF_PSEL(SPIM_MISO, 2, 9)>,
<NRF_PSEL(SPIM_MOSI, 2, 8)>;
low-power-enable;
};
};
};

sid_semtech: &spi21 {
compatible = "nordic,nrf-spim";
status = "okay";
pinctrl-0 = <&spi21_default>;
pinctrl-1 = <&spi21_sleep>;
pinctrl-names = "default", "sleep";
clock-frequency = <DT_FREQ_M(8)>;
};

/{
semtech_sx1262_gpios{
compatible = "gpio-keys";
semtech_sx1262_cs: cs {
gpios = <&gpio2 0xa GPIO_PULL_UP>;
label = "semtech_sx1262 CS";
};
semtech_sx1262_reset_gpios: reset {
gpios = <&gpio1 0xb (GPIO_ACTIVE_LOW|GPIO_PULL_UP)>;
label = "semtech_sx1262 Reset";
};
semtech_sx1262_busy_gpios: busy {
gpios = <&gpio1 0xc 0x0>;
label = "semtech_sx1262 Busy";
};
semtech_sx1262_antenna_enable_gpios: antena_enable {
gpios = <&gpio2 0x7 0x0>;
label = "semtech_sx1262 Antena Enable";
};
semtech_sx1262_dio1_gpios: dio1 {
gpios = <&gpio1 0xa 0x0>;
label = "semtech_sx1262 DIO1";
};
};
aliases {
led0 = &led0;
led1 = &led1;
led2 = &led2;
led3 = &led3;
watchdog0 = &wdt30;
/delete-property/ sw0;
/delete-property/ sw1;
/delete-property/ sw2;
/delete-property/ sw3;
};
};

/delete-node/ &button3;
/delete-node/ &button2;
/delete-node/ &button1;
/delete-node/ &button0;

&gpiote20 {
status = "okay";
};

&gpiote30 {
status = "okay";
};

&gpio1 {
status = "okay";
};

&gpio2 {
status = "okay";
};

&gpio0 {
status = "okay";
};
3 changes: 3 additions & 0 deletions subsys/sal/sid_pal/src/sid_gpio_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ uint32_t sid_gpio_utils_register_gpio(struct gpio_dt_spec gpio_from_dts)
static bool initialized = false;
if (!initialized) {
initialized = true;
sid_gpio_utils_gpio_set_flags(
ctx.next_free_slot,
ctx.supported_pins[ctx.next_free_slot].configuration_cache);
k_work_queue_init(&sidewalk_gpio_workq);
k_work_queue_start(&sidewalk_gpio_workq, sidewalk_gpio_workq_stack,
CONFIG_SIDEWALK_GPIO_IRQ_STACK_SIZE,
Expand Down
8 changes: 4 additions & 4 deletions utils/include/application_states.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@
X(receiving, gpio1, 3)
#elif defined(NRF54L15_ENGA_XXAA)
#define X_APPLICAITON_STATES \
X(error, gpio1, 4) \
X(error, gpio0, 4) \
X(working, gpio1, 14) \
X(registered, gpio1, 13) \
X(time_sync, gpio1, 8) \
X(connected, gpio0, 4) \
X(dfu, gpio1, 5) \
X(sending, gpio1, 6) \
X(receiving, gpio1, 7)
X(dfu, gpio0, 4) \
X(sending, gpio0, 4) \
X(receiving, gpio0, 4)
#else
#error "Unknow device application states."
#endif
Expand Down

0 comments on commit 863bd13

Please sign in to comment.