Commit Graph

101 Commits

Author SHA1 Message Date
Mahesh Mahadevan 381c7c7dfb boards: lpcxpresso55s69: Add I2S support
Add I2S support for LPCXpresso55S69 board

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2021-09-01 14:39:03 -04:00
Toby Firth 893bfc0fc1 drivers: counter: added ctimer driver for lpcexpresso55s69
Added shim driver for the CTIMERs for the lpcexpresso55s69 board.

Fixes: #22705

Signed-off-by: Toby Firth <tobyjfirth@gmail.com>
2021-08-24 17:13:22 -04:00
Mahesh Mahadevan 95ee8f0f64 soc: LPC55S69: Add USB support
1. Update soc.c file to add USB clock setup
2. Add a linker script file to move USB transfer
   buffer and controller buffers to USB RAM
3. Update Kconfig's to add USB support
4. Add zephyr_udc0 nodelabel

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2021-08-19 17:19:11 -04:00
Kumar Gala 5c3ccf97ec boards: arm: lpcxpresso55s69: Fix sram partitioning in devicetree
SRAM partitioning for non-secure should be done via a reserved-memory
node and not fixed-partitions.  fixed-partitions is meant for flash
style devices.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-07-23 09:10:56 -05:00
Mahesh Mahadevan 6d86e4836f dts: lpc55s6x: Add support for hwinfo
Add support to read 128-bit unique id from Flash

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2021-06-23 18:24:08 -05:00
Kumar Gala dad05106ef boards: arm: lpcxpresso55s69: Fix flash/ram sizes for non-secure
Fix the settings in lpcxpresso55s69_ns.yaml to reflect the normal amount
of flash/ram that is allocated to the non-secure side.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-15 07:50:14 -05:00
Maureen Helm d83bbc2f25 boards: arm: Enable arduino serial port on lpcxpresso55s69
Configures flexcomm2 to operate in USART mode and enables the associated
peripheral clock and pinmuxes. This instance is attached to the Arduino
serial header pins and can be used for Bluetooth serial HCI with a
frdm_kw41z or other BLE controller shield.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2021-06-12 08:55:31 -05:00
Kumar Gala 7f77240126 drivers: gpio: mcux_lpc: Convert driver to use devicetree port prop
Move to using port property for a few cases in which we need to know
which specific hardware port a device is for.  This allows us to
remove the PORT0/1 Kconfig options.  This also fixes the issue that
assumed pio0 would map to DT_INST(0) and pio1 would map to DT_INST(1)

Fixes #35693

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-05-31 17:45:05 +02:00
Ioannis Glaropoulos fa041ddb23 boards: lpcxpresso55s69: fix TFM offset for builds without MCUboot
The flash layout definition has changed in upstream TF-M for the
LCPXPRESSO55S69 platform, for builds without bootloader. Fix the
layout in the boards' configuration, as well.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-26 18:58:15 -05:00
Kevin Townsend 794acbc9e2 boards: arm: lpcxpresso55s69: Force TF-M when using NS boards
This commit forces the `CONFIG_BUILD_WITH_TFM=y` option when
using the `_ns` build targets for the LPC55sXX.

Using these targets in samples or in CI without an accompanying
secure environment image (ex. TF-M) leads to execution failures,
since the NS images are offset a predetermined amount.

Fixes #35100

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
2021-05-19 14:02:27 -05:00
Kevin Townsend 829e02ffc8 boards: arm: lpc55s: Add missing trustzone flag
This commit adds the missing `ARM_TRUSTZONE_M` config flag
from TrustZone-enabled cores on LPC55sxx board targets.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
2021-05-17 08:04:07 -05:00
Ioannis Glaropoulos d93c25c343 boards: lpcxpresso55s69: switch to use the TFM_PROFILE_TYPE choice
Switch the default LPC board configuration to select the
TFM_PROFILE_TYPE_MEDIUM choice, instead of directly setting
the TFM_PROFILE variable, as this is now made hidden.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-04-08 13:26:14 +02:00
Kumar Gala 834c847ebe boards: lpc: Remove unneeded zephyr_include_directories
The include of ${ZEPHYR_BASE}/drivers isn't needed anymore for
board code so remove it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-03-23 15:43:19 -05:00
Kumar Gala b9ed2d33fd drivers: spi: Remove unused Kconfig symbols
Remove SPI_[0-8] and SPI_[0-8]_OP_MODES Kconfig symbols as no driver
uses them anymore.  We also cleanup board and sample code to remove
use of these symbols.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-03-09 04:53:46 -05:00
Kumar Gala 263ac3e9e5 drivers: pinmux: mcux_lpc: Convert to using devicetree
Convert driver and users of pinmux on mcux lpc platforms to getting
basic port info from devicetree (register address, label)

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-03-01 12:04:53 -06:00
Mahesh Mahadevan d8283b63ec boards: lpc: Update pinmux setting to remove the const keyword
This would save some space by using a local variable

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2021-02-22 18:21:31 -06:00
Øyvind Rønningstad 5137135ead boards: Consolidate all TFM signing code
Place the new signing code in the TFM module CMakeLists.txt.
Make some small tweaks and add a sentence to the docs.

In the process, make a few changes to the signing code:
- Change some names of files created.
- Minimize the number of files created.
- Use hex files instead of bin files. This is so we don't need to know
  the offset when creating hex files from bin files.

Also add signing for MCUBOOT_IMAGE_NUMBER=1 based on the code from the
v2m_musca_b1 board, though, this board does not build with =1 now
because of (I assume) some flash aliasing which places the S and NS
images 0x10000000 apart, where the manual algorithm places them next to
each other. It builds with =2, though.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2021-02-21 18:44:18 +03:00
Øyvind Rønningstad edfaa3998b tfm: Change TFM_BL2 config from a choice to a bool
The choice allowed for using TFM's own default. We now need full
knowledge over whether BL2 is enabled or not (e.g. to do signing),
so remove this option and simplify to a bool.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2021-02-17 19:42:44 +03:00
Torsten Rasmussen dfa52a3ba7 module: moving TFM CMakeLists.txt into Zephyr repo
This commit moves TFM CMakeLists.txt into Zephyr and relocates the
Kconfig.tfm file under the modules/tfm folder.

Updates the manifest to point to related TFM changes.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-02-16 10:01:36 +01:00
Kumar Gala c109e7691d dts: atmel/nxp: supress duplicate unit-address warning
A number of SoCs have overlapping devices at the same unit address.
Surpress the warning for those cases:

* Atmel - pinmux@41004400 & gpio@41004400
* Atmel - pinmux@41004480 & gpio@41004480
* Atmel - pinmux@41008000 & gpio@41008000
* NXP - flash@0 & gpio@0
* NXP - syscon@0 & gpio@0

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-02-04 10:05:47 -05:00
Andrei Gansari 37284c7035 boards: lpcxpresso55s69: doc memory mappings
Document on how memory is mapped in different configurations starting
from the MCUboot partitioning of the flash. The given examples are for
TFM use cases and dual-core samples.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2021-01-10 15:38:54 -05:00
Andrei Gansari c68a4a29b8 boards: lpcxpresso55s69: update docs with dualcore
Updates lpcxpresso55s69 board's documentation with mailbox and multicore
setups. Explain how _cpu1 and _ns targets are used.
Also fixes TFM related documentation.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2021-01-10 15:38:54 -05:00
Andrei Gansari 2c82ccd6ab boards: lpcxpresso55s69: merge dual core images
Merges cpu0 and cpu1 targets to a single image, named multicore.bin,
this image can be found in the build folder.
Documentation is to be updated in a later commit.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2021-01-10 15:38:54 -05:00
Andrei Gansari a2089fe882 boards: lpcxpresso55s69: mailboxes and memory
Partitions memory and flash for multi-core purposes.
Also enabes mailboxes for cpu0 and cpu1.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2021-01-10 15:38:54 -05:00
Andrei Gansari e8a35231a2 soc: lpc55xxx: enable GPIO, disable SERIAL
Enables GPIO on LPC55xxx SoC and explictily mentions SERIAL is off.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2021-01-10 15:38:54 -05:00
Øyvind Rønningstad 3f9d277bdc boards: Use tfm target properties for executable paths
for the signing procedures for boards an521, nrf5340, nrf9160,
nucleo_l552ze_q, and musca_b1.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2020-12-14 11:24:16 +01:00
Andrei Gansari f48c82ebe7 boards: lpcxpresso55s69: enable TFM with MCUboot
Set building TFM with MCUboot. Set the build configuration to
profile_medium, we need smaller TFM images to fit into flash.
Build MCUboot, TFM, sign it, sign Zephyr NS image and merge all the
images. Also change the other configuration, BL2=OFF, to merge as a
single image.
Update documentation on how to flash the board.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-12-04 15:06:56 +02:00
Andrei Gansari d969debb10 boards: lpcxpresso55s69: BL2=OFF memory settings
Create a special configuration when BL2=OFF is set. DTS partitioning is
used for MCUboot, but does not match TFM's flash_layout.h configuration
when BL2=OFF, DTS matches when BL2=ON.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-12-04 15:06:56 +02:00
Andrei Gansari 38c5cf63e9 boards: lpcxpresso55s69: partition refactor
Refactor lpcxpresso55s69's partitions to match TFM's flash_layout.h
configuration. This matches TFM with MCUboot configuration.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-12-04 15:06:56 +02:00
Christian Taedcke ec6e09a6e0 boards: lpcxpresso55s69 fix some arduino an mikrobus pins
Some pins on the arduino header and on the mikrobus header were wrong.
These are now corrected. They are the same on the lpcxpresso55s28
board.

Signed-off-by: Christian Taedcke <christian.taedcke@lemonbeat.com>
2020-12-03 03:58:58 -06:00
Øyvind Rønningstad a28da5118d tfm: Configure TFM via Kconfig instead of Cmake
Add Kconfig options that will be used by the module
to call the function with the desired parameters.
Refactor the tfm_integration samples and
the supported boards.

Update west.yml to bring in Cmake changes that use the new KConfigs.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2020-11-17 14:39:52 +02:00
Ioannis Glaropoulos 792bec2be8 boards: arm: remove non-existing doc link from partition definitions
In the flash partition definitions for ARM boards,
the link to the legacy partition macros does not
exist any more. The commit cleans up the partition
definition by removing this link.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-10-27 15:01:19 -04:00
Mahesh Mahadevan 256ad8ab2d boards: LPC55S69: Add DMA support for HS_SPI device
-Add DMA channel details for the SPI DMA transfer
-Reserve HEAP_SPACE for DMA channel descriptors

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2020-10-21 06:26:40 -05:00
Ioannis Glaropoulos c9fd62a2ea boards: arm: update board definitions due to new TF-M build system
TF-M related information in the relevant board definitions
needs to be updated in the wake of the new TF-M Build
system.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-10-19 21:08:34 +02:00
Mahesh Mahadevan 4db6f4c735 doc: Add clock control details
Include support for clock control in the documentation

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2020-10-15 11:17:24 -05:00
Toby Firth dc37f988e0 drivers: adc: added support adc driver for lpcexpresso55s69
Added shim driver for the LPADC for lpcexpresso55s69 board.

Fixes #22703.

Signed-off-by: Toby Firth <tobyjfirth@gmail.com>
2020-10-12 14:59:40 -05:00
Maureen Helm 4310b7ed1a boards: arm: Enable hardware stack protection on nxp lpc boards
Enables hardware stack protection on all possible nxp lpc boards to
help detect stack overflows more easily. Boards that do not have mpu
support are excluded.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-10-09 10:23:34 +02:00
Maureen Helm 319e28102b Revert "boards: lpcxpresso55s69_cpu1: disable sanitycheck"
This reverts commit 774ab86617.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-09-16 09:27:54 -05:00
Maureen Helm 7d2b75861e boards: arm: Add entropy dts chosen node for lpcxpresso55s69_cpu1
Adds an entropy dts chosen node for the lpcxpresso55s69_cpu1 board
configuration. Commit 50830385d8 added
this for the _cpu0 and _ns board configurations, but missed the _cpu1
board configuration.

Fixes sanitycheck build errors for network socket samples.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-09-16 09:27:54 -05:00
Anas Nashif 774ab86617 boards: lpcxpresso55s69_cpu1: disable sanitycheck
This board is broken and is preventing us from fixing issues that
allowed it to be merged skipping CI checks. Disabling the board from
sanitycheck to avoid more boards with the same issue from happening
again.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-09-15 13:17:08 -04:00
Anas Nashif 0d566d0887 boards: LPCXpresso55S69: remove duplicate identifier
Use unique identifier for this configuration. cpu0 is already used.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-09-15 13:17:08 -04:00
Andrei Gansari b8b31f9a76 samples: tfm_integration: lpc55s69 support
Adds documentation on how to run TFM samples on LPCxpresso55S69 board.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-09-04 10:36:42 -05:00
Andrei Gansari 7ff38a9b6d boards: lpcxpress55s69: NS target with TFM support
Configures the Non-Secure target to work with TFM.
Memory (Flash and RAM) mapping according to TFM definitions.
How to build and flash the board.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
Signed-off-by: Kevin Townsend <kevin@ktownsend.com>
2020-09-04 10:36:42 -05:00
Andrei Gansari 3d6e6a9900 boards: lpcxpresso55s69 mcuboot and tfm partitions
Moved the flash partitioning to the shared device tree include so all
targets can benefit from the partitioning.
This is implemented to MCUboot can run TFM(S) with Zephyr
(lpc55s69 cpu 0 NS).
Also defines RAM partitions as TFM expects them, first part of ram for
S, second half for NS.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-09-04 10:36:42 -05:00
Tomasz Bursztyka e18fcbba5a device: Const-ify all device driver instance pointers
Now that device_api attribute is unmodified at runtime, as well as all
the other attributes, it is possible to switch all device driver
instance to be constant.

A coccinelle rule is used for this:

@r_const_dev_1
  disable optional_qualifier
@
@@
-struct device *
+const struct device *

@r_const_dev_2
 disable optional_qualifier
@
@@
-struct device * const
+const struct device *

Fixes #27399

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-09-02 13:48:13 +02:00
Andrei Gansari 14331906bd boards: lpcxpresso55s69_cpu1: fix build errors
Remove bad configurations added full gpio configuration.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-09-01 15:37:30 -04:00
Jiří Keresteš 3a87517c5e drivers: watchdog: mcux_wwdt: add driver for NXP LPC 55xxx WWDT
Adds shim driver for LPC 55xxx Windowed Watchdog Timer (WWDT).

Also updates the "Supported features" table in LPCXpresso55S69
board documentation page.

Fixes #22704.

Signed-off-by: Jiří Keresteš <jiri@kerestes.cz>
2020-08-04 15:13:25 -05:00
Eug Krashtan a6ea1cffc9 boards: dts: Fix broken link in comment
Update broken hyperlink in comment to current location

Signed-off-by: Eug Krashtan <eug.krashtan@gmail.com>
2020-07-31 09:00:32 -05:00
David Brown 79daf21189 dts: arm: nxp: nxp_lpc55s6x: Use proper code partition
The zephyr,code-parition was set incorrectly to SRAM.  Set it to the
slot0 partition, so that enabling BOOTLOADER_MCUBOOT will place the code
at the proper address.

Signed-off-by: David Brown <david.brown@linaro.org>
2020-07-15 13:29:50 +02:00
David Brown e2f4b9ef37 dts: arm: nxp: nxp_lpc55s6x: Fix partition table
The partition table in DTS are offsets within the flash device, not
absolute addresses.  The flash doesn't start at 0 on the lpc55s6x
(because of the secure execution bit), but the offsets in the partition
table should.

Signed-off-by: David Brown <david.brown@linaro.org>
2020-07-15 13:29:50 +02:00