Commit Graph

135 Commits

Author SHA1 Message Date
Derek Snell 569ef4ce30 doc: boards: NXP serial port features documented
Updated docs for NXP boards using the nxp_lpc_usart, for supported
serial port features.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2022-09-29 10:11:51 +00:00
Mahesh Mahadevan 948b2ab089 boards: nxp: Fix various broken links
Fix the links on boards with SoC's from NXP

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2022-09-26 07:55:23 +00:00
Derek Snell f6cb8fe296 boards: doc: Update NXP boards docs with references to superset boards
Detail which NXP boards are superset boards.  Other boards will link to
their closest superset boards.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2022-09-19 11:05:55 -05:00
Kumar Gala 390464ce3b timers: remove defconfig setting of timer drivers
Now that timer drivers are enabled based on devicetree we can
remove any cases of them getting enabled by *_defconfig files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-09-09 09:58:48 +00:00
Daniel DeGrasse 60a2097296 boards: lpcxpresso55s69: enable SD host controller
enable SD host controller for lpcxpresso55s69_cpu0. Tested
using tests/subsys/sd/sdmmc.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-09-08 10:06:28 +02:00
Gerard Marull-Paretas e81e92dbb9 boards: convert images to JPEG and reduce image size
The boards folder uses ~142.8 MB, being the largest in the repository.
This is due mostly to board images, which are in most cases not
optimized for web content. This patch tries to address this problem by
converting all pictures to JPEG (quality 75) and by adjusting its size
up to 750 px (the width of the documentation content). Images that
specified a fixed width in rst files are converted down to that value
instead.

With this patch, folder goes down to ~53.5 MB from 142.8 MB (-~63%).
Note that this patch introduces a new set of binary files to git
history, though (bad).

The process has been automated using this quickly crafted Python script:

```python
from pathlib import Path
import re
import subprocess

def process(doc, image, image_jpeg, size):
    subprocess.run(
        (
	     f"convert {image}"
	     "-background white -alpha remove -alpha off -quality 75"
	     f"-resize {size}\> {image_jpeg}"
	),
        shell=True,
        check=True,
        cwd=doc.parent,
    )
    if image != image_jpeg:
        (doc.parent / image).unlink()

for doc in Path(".").glob("boards/**/*.rst"):
    with open(doc) as f:
        content = ""
        image = None
        for line in f:
            m = re.match(r"^(\s*)\.\. (image|figure):: (.*)$", line)
            if m:
                if image:
                    process(doc, image, image_jpeg, size)

                image = Path(m.group(3))
                if image.suffix not in (".jpg", ".jpeg", ".png"):
                    content += line
                    image = None
                    continue

                image_jpeg = image.parent / (image.stem + ".jpg")
                size = 750
                content += (
                    f"{m.group(1)}.. {m.group(2)}:: {image_jpeg}\n"
                )
            elif image:
                m = re.match(r"\s*:height:\s*[0-9]+.*$", line)
                if m:
                    continue

                m = re.match(r"\s*:width:\s*([0-9]+).*$", line)
                if m:
                    size = min(int(m.group(1)), size)
                    continue

                content += line
                if line == "\n":
                    process(doc, image, image_jpeg, size)
                    image = None
            else:
                content += line

    with open(doc, "w") as f:
        f.write(content)
```

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-29 10:18:18 +02:00
Daniel DeGrasse 41f26e5dca boards: lpcxpresso55s69: update documentation to indicate IAP support
Update documentation to indicate that lpcxpresso55s69_cpu0 supports IAP
flash controller.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-08-25 08:26:53 -05:00
Fabio Baltieri f136070088 boards: drop pinmux subsystem references from board code
Drop few references to pinmux.h from board pinmux specific code. The
header is not neeeded since no pinmux subsystem functions are used here.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-08-18 12:13:14 +00:00
Kumar Gala f2a6c73800 boards: arm: lpcxpresso55s69: Fix build of lpcxpresso55s69_cpu1
The samples/sensor/thermometer fails to build on lpcxpresso55s69_cpu1
due to the fact that we try and build the fxos8700 driver however the
bus that this driver is on is not enabled.  Disable the sensor in the
devicetree since the bus is not enabled.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-17 22:02:15 +00:00
Kumar Gala f7496df804 boards: remove unnecessary I2C / SPI bus Kconfig enablement
We now 'select I2C' and/or SPI bus in Kconfig in the sensor driver
Kconfig's so there is no need to have boards do the following:

config I2C
       default y if SENSOR

config SPI
       default y if SENSOR

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-09 07:28:11 -05:00
Declan Snyder f3e5967cd4 doc: Updated NXP Docs to indicate entropy support
Updated documentation to indicate support for
random number generation on NXP boards.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2022-08-04 16:45:51 -05:00
TOKITA Hiroshi 8277efb96c boards: Set devicetree alias for NXP FXOS8700 and compatible nodes
Set accel0 alias for all boards with the FXOS8700 and compatible
accelerometer to use by the accel_polling sample.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2022-08-04 09:06:57 -05:00
TOKITA Hiroshi 342f74a792 boards: Configure I2C/SPI default for boards with accelerometer
For boards with an accelerometer, configure the appropriate bus
(I2C or SPI) default to be enabled if the sensor driver class was enabled.

This change makes no need to add a bunch of board-specific configuration
overlays to the application.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2022-08-04 09:06:57 -05:00
Kumar Gala 96bca6d656 boards: arm: nxp: Remove label property from devicetree
The label property isn't needed in devicetree so remove it.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-04 13:46:30 +02:00
Kumar Gala 1c1c57b31b gpio: remove defconfig/proj setting of GPIO drivers
Now that gpio drivers are enabled based on devicetree we can remove
any cases of them getting enabled by *defconfig and proj.conf files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-26 08:49:38 +02:00
Benjamin Björnsson ab4a926c27 boards: Add alias to boards with watchdog enabled
Add alias to boards with watchdog enabled to facilitate the
move of samples/drivers/watchdog to use DT_ALIAS.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-19 09:28:43 -05:00
Kumar Gala 2f49bec7b7 sdhc: dts: remove label property from SDHC nodes
Remove 'label' property from SDHC nodes.  We can use variants of
DEVICE_DT_GET to get access to a device pointer for use in an
application.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-15 16:04:12 -05:00
Kumar Gala a5d16f32fc boards: Add sdhc0 alias for testing purposes
Add 'sdhc0' alias that points to SDHC controller to use for testing
purposes.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-14 10:29:14 +02:00
Maureen Helm b789c11775 drivers: sensor: Change fxos8700 default mode from accel-only to hybrid
The fxos8700 device supports 3 modes: accelerometer-only,
magnetometer-only, or hybrid (accelerometer and magnetometer) modes. The
accelerometer-only mode is register compatible with mma8451q, mma8652fc,
and mma8653fc, which allows the fxos8700 driver to be used with these
devices as well.

Most in-tree boards can use hybrid mode because they have the fxos8700
device, therefore we change the driver default to match the common case.
For the handful of boards that have an mma86xx or mma84xx device, we
override the driver default to accelerometer-only mode. As a result, we
can enable the magn_polling sample application for the fxos8700 driver
without having to add a bunch of board-specific configuration overlays
for hybrid mode.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-07-02 06:03:33 -04:00
Kumar Gala a7af8ce6a7 drivers: disk: Remove use of unused devicetree "label" property
We should avoid use of the label property in devicetrees.  The
'zephyr,sdmmc-disk' compatible node has a 'label' property set
but there isn't any code utilizing this so removing the property
from any devicetrees that have it set (as well as example in docs).

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-10 09:46:46 +02:00
Felipe Neves 2494db7191 boards: arm: lpcexpresso5569: enables mikrobus
serial connector in its dts file.

Signed-off-by: Felipe Neves <felipe.neves@linaro.org>
2022-05-15 21:34:32 +02:00
Derek Snell 8b3e0e6622 boards: lpcxpresso55s69: fix JLink device name
Incorrect device name for JLink runner causing wrong device selected,
causing issues flashing the device when flash size is large.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2022-05-10 11:05:29 -05:00
Daniel DeGrasse 49b06dbf9e boards: lpcxpresso55s28/lpcxpresso55s69: add pinmux for lpadc
Add pinmux settings for lpadc to LPCXpresso55s69 and LPCXpresso55s28
boards. Enable ADC driver sample for LPCXpresso55s69, to aid in testing
pinmux settings.

Fixes #45401

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-05-09 08:56:11 -05:00
Gerard Marull-Paretas db508379c2 boards: migrate includes to <zephyr/...>
In order to bring consistency in-tree, migrate all boards code to the
new prefix <zephyr/...>. Note that the conversion has been scripted,
refer to zephyrproject-rtos#45388 for more details.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-06 19:57:15 +02:00
David Leach e41d69932a dts: lpc55S6x: fix memory size definitions
The LPC platforms define memory in SRAM blocks that can be
combined to represent larger memory blocks to the CPU. Change
the cpu0 allocation to use SRAM0-SRAM2 for 192K and change
cpu1 to use SRAM3-SRAM4 for 80K.

Signed-off-by: David Leach <david.leach@nxp.com>
2022-05-02 10:56:23 +02:00
Daniel DeGrasse d108b6417f boards: lpcxpresso55s69_cpu0: enable spi mode SD card.
Enable SD card running in SPI mode, using the SD subsystem.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-04-29 14:21:36 -05:00
Gerard Marull-Paretas 49476f4fac boards: arm: lpcxpresso55s69: add PWM period cell
Updated all PWM specs to include the period cell. Because all specs
refer to PWM driven LEDs, a period of 20 msec has been chosen, as most
other platforms do.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-24 19:48:36 +02:00
Daniel DeGrasse 916c059f3d drivers: pinctrl: update lpc pin control implementation to use offsets
update pin control implementation to use offsets for pin registers
instead of pin/port combination, to permit additional flexibility for
lpc devices with non contiguous register layouts. Update LPC55s69 pin
control names to align with newly generated pin control header.

This change also requires an update to the NXP HAL to use the new pin
control headers with offsets.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-04-19 15:53:50 -05:00
Daniel DeGrasse 06a6c233bb boards: lpcxpresso55s69: remove pinmux settings
All peripherals used by lpcxpresso55s69 support pinctrl driver, so
remove pinmux settings. Pinmux file is retained for board specific I2S
loopback configuration.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-04-06 20:57:22 -07:00
Daniel DeGrasse f7f8529365 boards: lpcxpresso55s69: Add pullup/pulldown fields to user buttons
Pinmux initialization function for lpcxpresso55s69 was setting user
button gpios as pullups, now that pin control will be used these
settings should be handled by the GPIO driver.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-04-06 20:57:22 -07:00
Daniel DeGrasse 8946745cf1 boards: lpcxpresso55s69: Add pinctrl dts files for lpcxpresso55s69
Add pinctrl dtsi file for lpcxpresso55s69 board, as well as pinctrl
groups for lpcxpresso55s69 peripherals.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-04-06 20:57:22 -07:00
Jason Martin 50dfb4fbf7 boards: arm: Fix led active state on the lpcxpresso55s69
Happily corrected the incorrect active state of the on-board LEDs.

Signed-off-by: Jason Martin <jason.martin1@nxp.com>
2022-03-02 09:19:59 -06:00
Daniel DeGrasse a00041851d boards: lpcxpresso_55s69: Do not relocate image unless BUILD_WITH_TFM=y
Ensure that cpu1 only has its image load offset and flash size changed
if BUILD_WITH_TFM is selected, to prevent the flash size being changed
when TFM_BL2=n because TFM dependencies are not met.

Fixes #41127

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-01-13 10:32:45 +01:00
Mahesh Mahadevan 34ffd5a7d4 boards: lpcxpresso55s69: Add PWM support
Add PWM support

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2021-11-01 11:14:29 -04:00
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