Skip to content

Commit

Permalink
boards: shields: add support for nrf2240ek
Browse files Browse the repository at this point in the history
This commit adds initial support for the nrf2240ek shield.

Signed-off-by: Andrzej Kuros <andrzej.kuros@nordicsemi.no>
  • Loading branch information
ankuns authored and rlubos committed May 9, 2024
1 parent f641ec3 commit f1ea890
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 0 deletions.
8 changes: 8 additions & 0 deletions boards/shields/nrf2240ek/Kconfig.shield
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#
# Copyright (c) 2024 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

config SHIELD_NRF2240EK
def_bool $(shields_list_contains,nrf2240ek)
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/* On nrf5340_cpunet the uart0 conflicts with nrf_radio_fem_twi and must be disabled. */
&uart0 {
status = "disabled";
};
2 changes: 2 additions & 0 deletions boards/shields/nrf2240ek/nrf2240ek.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CONFIG_BOOT_BANNER=n
CONFIG_EARLY_CONSOLE=n
30 changes: 30 additions & 0 deletions boards/shields/nrf2240ek/nrf2240ek.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/* Pin mapping suitable for use nRF2240-EK PCA63564 with
* Nordic Interposer Board A PCA64172 v0.2.0.
* The nRF2240-EK in SLOT 2 of PCA64172.
*/

/ {
nrf_radio_fem: nrf2240_fem {
compatible = "nordic,nrf2240-fem";
cs-gpios = <&arduino_header 14 GPIO_ACTIVE_HIGH>; /* D8 */
md-gpios = <&arduino_header 13 GPIO_ACTIVE_HIGH>; /* D7 */
pwrmd-gpios = <&arduino_header 4 GPIO_ACTIVE_HIGH>; /* A4 */
twi-if = <&nrf_radio_fem_twi>;
};
};

fem_twi: &arduino_i2c {
status = "okay";
compatible = "nordic,nrf-twim";

nrf_radio_fem_twi: nrf2240_fem_twi@30 {
compatible = "nordic,nrf2240-fem-twi";
status = "okay";
reg = <0x30>;
};
};
27 changes: 27 additions & 0 deletions boards/shields/nrf2240ek/nrf2240ek_fwd.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/* This file matches the contents of nrf2240ek.overlay and is intended to be applied to nRF5340
* application core when nrf2240ek shield is provided to the network core's image build.
*
* For instance, consider an application targeted for nRF5340 application core that specifies
* a child image targeted for nRF5340 network core, which drives the nRF2240 Front-End Module.
* The shield overlays could be provided to the build using the following command:
*
* west build -p -b nrf5340dk/nrf5340/cpuapp -- -DSHIELD=nrf2240ek_fwd -D<child_image>_SHIELD=nrf2240ek
*/

&gpio_fwd {
nrf2240-gpio-if {
gpios = <&arduino_header 14 0>, /* cs-gpios */
<&arduino_header 13 0>, /* md-gpios */
<&arduino_header 4 0>; /* pwrmd-gpios */
};
nrf2240-twi-if {
gpios = <&gpio1 2 0>, /* TWIM_SDA */
<&gpio1 3 0>; /* TWIM_SCL */
};
};

0 comments on commit f1ea890

Please sign in to comment.