Commit graph

67 commits

Author SHA1 Message Date
Maureen Helm 877997e71f boards: arm: Remove OPENSDA_FW cmake variables from nxp boards
The OPENSDA_FW and LPCLINK_FW cmake variables are remnants of pre-west
days where we used an environment variable to set the desired debug host
tool, such as jlink or pyocd, based on which debug probe firmware was
loaded on the board. We now have two possible ways to do this, neither
of which requires the nxp-specific OPENSDA_FW or LPCLINK_FW variables:

1. Set standardized cmake runner variables when generating the build
   system:
   $ west build -- -DBOARD_FLASH_RUNNER=jlink -DBOARD_DEBUG_RUNNER=jlink

2. Use the west "--runner" argument with the debug and flash commands:
   $ west debug -r jlink

Remove the now unnecessary OPENSDA_FW ond LPCLINK_FW variables and
update board documentation accordingly.

A few boards (frdm_kw41z, hexiwear_k64, mimxrt10{20,50,60,64}_evk)
reordered pyocd.board.cmake and jlink.board.cmake includes to preserve
the default runner when OPENSDA_FW was not explicitly set.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-07-09 07:58:50 -05:00
Kumar Gala a1b77fd589 zephyr: replace zephyr integer types with C99 types
git grep -l 'u\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/u\(8\|16\|32\|64\)_t/uint\1_t/g"
	git grep -l 's\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/s\(8\|16\|32\|64\)_t/int\1_t/g"

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-06-08 08:23:57 -05:00
Maureen Helm 1a89ca1238 boards: arm: Conditionalize csi pinmuxes on nxp boards
Conditionalizes csi pinmuxes on CONFIG_VIDEO for all nxp boards
(kinetis, lpc, and imx families) to avoid possible conflicts between
peripherals.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-05-22 14:56:00 +02:00
Maureen Helm de22784ce1 boards: arm: Conditionalize display pinmuxes on nxp boards
Conditionalizes display pinmuxes on CONFIG_DISPLAY for all nxp boards
(kinetis, lpc, and imx families) to avoid possible conflicts between
peripherals.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-05-22 14:56:00 +02:00
Maureen Helm 572f44090b boards: arm: Conditionalize ethernet pinmuxes on nxp boards
Conditionalizes ethernet pinmuxes on CONFIG_NET_L2_ETHERNET for all nxp
boards (kinetis, lpc, and imx families) to avoid possible conflicts
between peripherals.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-05-22 14:56:00 +02:00
Maureen Helm 78eab7f3f2 boards: arm: Conditionalize pwm pinmuxes on nxp boards
Conditionalizes pwm pinmuxes on CONFIG_PWM for all nxp boards (kinetis,
lpc, and imx families) to avoid possible conflicts between peripherals.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-05-22 14:56:00 +02:00
Maureen Helm 5c2d8f3e2a boards: arm: Conditionalize i2c pinmuxes on nxp boards
Conditionalizes i2c pinmuxes on CONFIG_I2C for all nxp boards (kinetis,
lpc, and imx families) to avoid possible conflicts between peripherals.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-05-22 14:56:00 +02:00
Maureen Helm ab2d73379a boards: arm: Conditionalize serial pinmuxes on nxp boards
Conditionalizes serial pinmuxes on CONFIG_SERIAL for all nxp boards
(kinetis, lpc, and imx families) to avoid possible conflicts between
peripherals.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-05-22 14:56:00 +02:00
Martí Bolívar 6e8775ff84 devicetree: remove DT_HAS_NODE_STATUS_OKAY
Several reviewers agreed that DT_HAS_NODE_STATUS_OKAY(...) was an
undesirable API for the following reasons:

- it's inconsistent with the rest of the DT_NODE_HAS_FOO names
- DT_NODE_HAS_FOO_BAR_BAZ(node) was agreed upon as a shorthand
  for macros which are equivalent to
  DT_NODE_HAS_FOO(node) && DT_NODE_HAS_BAR(node) &&
- DT_NODE_HAS_BAZ(node), and DT_HAS_NODE_STATUS_OKAY is an odd duck
- DT_NODE_HAS_STATUS(..., okay) was viewed as more readable anyway
- it is seen as a somewhat aesthetically challenged name

Replace all users with DT_NODE_HAS_STATUS(..., okay), which is
semantically equivalent.

This is mostly done with sed, but a few remaining cases were done by
hand, along with whitespace, docs, and comment changes. These special
cases include the Nordic SOC static assert files.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-13 18:24:42 +02:00
Maureen Helm 3114b84c37 boards: mimxrt1064_evk: Enable sdhc
Enables sdhc on the mimxrt1064_evk board. Configures pinmuxes and device
tree, and updates board documentation accordingly.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-05-07 14:47:43 +02:00
Kumar Gala a5b45d9567 boards: Remove Kconfig I2C_[0-9] usage
The Kconfig I2C_[0-9] sybmols don't have any meaning for the majority of
SoCs.  The drivers doesn't utilize them and no sample or test code does
either so we can remove setting them in board Kconfig.defconfig files.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-06 10:55:38 -05:00
Kumar Gala fdd85d5ad7 dts: Rename DT_HAS_NODE macro to DT_HAS_NODE_STATUS_OKAY
Rename DT_HAS_NODE to DT_HAS_NODE_STATUS_OKAY so the semantics are
clear.  As going forward DT_HAS_NODE will report if a NODE exists
regardless of its status.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-06 05:25:41 -05:00
Maureen Helm 30dbdc511f boards: mimxrt1064_evk: Enable ft5336 touch interrupt
Enables the ft5336 touch controller interrupt on the mimxrt1064_evk
board.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-05-05 11:08:02 -05:00
Mark Olsson 1bb8a42422 boards: Change dependency for I2C on i.mx rt boards
Changes dependency for I2C so that it's enabled if kscan is enabled.
This is to allow the kscan_ft5336 sample to run.
Note: LVGL has KSCAN as a dependency.
Applies to the mimxrt10{50,60,64}_evk boards.

Signed-off-by: Mark Olsson <mark@markolsson.se>
2020-04-24 09:49:46 -05:00
Kumar Gala 6a55334d07 boards: arm: mimxrt106x_evk: Remove stale eth1 ref in devicetree
In conversion of nodelabels to match SoC docs, we missed a case in the
board dts files.  However these delete-node commands are not needed as
we normally handle this via the 'status' property being disabled which
enet2 is by default in the SoC dtsi files.  So we can safely just remove
the stale /delete-node/ eth1 lines.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-23 08:05:23 -05:00
Kumar Gala 9a65318a5b drivers: uart: mcux_lpuart: Convert to DT_INST
Convert driver to use new DT_INST macros throughout.  Removed per
instance Kconfig symbols and replaced with DT_NODELABEL references
where needed.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-20 15:50:45 -05:00
Kumar Gala 476e90a6a5 drivers: pwm: pwm_mcux: Convert driver to new DT_INST macros
Convert driver to use DT_INST macros and remove related board per
instance Kconfig symbol usage.  We also remove dts_fixup.h defines that
are no longer needed.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-20 11:08:46 -05:00
Kumar Gala 87186e5039 arm: nxp: imx-rt: default to PWMs being disabled in dts
Mark all the individual PWMs as disabled in dts and enable the one
explicitly used on the mimxrt1064_evk.dts in the board dts file.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-20 11:08:46 -05:00
Kumar Gala 50129f8dd7 drivers: gpio: mcux_igpio: Convert driver to new DT_INST macros
Convert driver to use DT_INST macros and remove related board per
instance Kconfig symbol usage.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-20 11:08:46 -05:00
Kumar Gala 542e8c8d09 boards: arm: nxp: imx-rt: Convert from Kconfig to DT_NODELABEL
As prep for drivers being converted to utilize DT_INST and removal of
per instance Kconfig symbols, move board pinmux.c code to utilize
DT_NODELABEL instead.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-20 11:08:46 -05:00
Kumar Gala 1688d4b071 dts: arm: nxp: nxp_rt: rename nodelabels to match SoC docs
Have nodelabels match the SoC docs so when a nodelabel reference is
made in the code its easier to relate to the SoC.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-20 11:08:46 -05:00
Armand Ciejak 39a1183e19 drivers: eth: mcux: Delete eth1 node for EVK boards
These boards have a SoC with 2 Ethernet controllers but the second
controller it is not wired.

Signed-off-by: Armand Ciejak <armandciejak@users.noreply.github.com>
2020-03-20 10:55:04 +01:00
Maureen Helm 2c95d04c35 boards: arm: Fix broken links in nxp board docs
Fixes broken links in several imx rt and lpc board documentation pages.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-03-10 12:21:36 +02:00
Alexander Wachter 57bd09186b boards: Remove "supported: -hwinfo" from all boards
Remove all "supported: -hwinfo" definitions from the boards
yaml files and documentation. hwinfo can generally be tested
on every board because it returns -ENOTSUP if not supported.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2020-02-27 21:14:54 +01:00
Ulf Magnusson a42a42cd5a kconfig: Replace defconfig singe-symbol 'if's with 'depends on'
Same deal as in commit eddd98f ("kconfig: Replace some single-symbol
'if's with 'depends on'"), for all symbols defined within defconfig
files. See that commit for an explanation.

Maybe 'if's were used originally to mirror the 'if's in the main Kconfig
files, and then it got copied around by people assuming 'if' must work
differently from 'depends on'. It doesn't match in every spot at least.
Better to keep it simple and just consistently use 'depends on' when
it's a single symbol/choice I think. Helps reinforce that 'if' isn't
magic too.

Verified by printing all Kconfig menu nodes (symbols, choices, menus,
etc.) before and after the change and diffing (should show no
difference).

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-02-12 10:32:13 -06:00
Ulf Magnusson c5839f834b kconfig: Remove assignments to CONFIG_<arch> syms and hide them
All board defconfig files currently set the architecture in addition to
the board and the SoC, by setting e.g. CONFIG_ARM=y. This spams up
defconfig files.

CONFIG_<arch> symbols currently being set in configuration files also
means that they are configurable (can be changed in menuconfig and in
configuration files), even though changing the architecture won't work,
since other things get set from -DBOARD=<board>. Many boards also allow
changing the architecture symbols independently from the SoC symbols,
which doesn't make sense.

Get rid of all assignments to CONFIG_<arch> symbols and clean up the
relationships between symbols and the configuration interface, like
this:

1. Remove the choice with the CONFIG_<arch> symbols in arch/Kconfig and
   turn the CONFIG_<arch> symbols into invisible
   (promptless/nonconfigurable) symbols instead.

   Getting rid of the choice allows the symbols to be 'select'ed (choice
   symbols don't support 'select').

2. Select the right CONFIG_<arch> symbol from the SOC_SERIES_* symbols.
   This makes sense since you know the architecture if you know the SoC.

   Put the select on the SOC_* symbol instead for boards that don't have
   a SOC_SERIES_*.

3. Remove all assignments to CONFIG_<arch> symbols. The assignments
   would generate errors now, since the symbols are promptless.

The change was done by grepping for assignments to CONFIG_<arch>
symbols, finding the SOC_SERIES_* (or SOC_*) symbol being set in the
same defconfig file, and putting a 'select' on it instead.

See
https://github.com/ulfalizer/zephyr/commits/hide-arch-syms-unsquashed
for a split-up version of this commit, which will make it easier to see
how stuff was done. This needs to go in as one commit though.

This change is safer than it might seem re. outstanding PRs, because any
assignment to CONFIG_<arch> symbols generates an error now, making
outdated stuff easy to catch.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-02-08 00:50:08 -06:00
Kumar Gala 1dc4b1dd2f boards: shrink image sizes
Reduce images sizes of boards.  Get a roughly 3x reduction in size.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-02-07 13:52:45 -05:00
Maureen Helm 6b23acbfb9 boards: arm: Remove redundant CONFIG_BOARD_* from imx rt defconfigs
The Kconfig board choice only has only one option which is implicitly
enabled, therefore it is not necessary to set the symbol explicitly in
board defconfigs.

mimxrt10{50,60}_evk boards are excluded from this change because they
have multiple board configurations (e.g., hyperflash vs. qspi) in the
board choice.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-02-07 05:43:46 -06:00
Maureen Helm 5f09966380 gpio: Update mcux igpio driver to use new gpio api
Updates the mcux igpio driver and all associated boards to use new
device tree compatible gpio configuration flags. Implements new port
get/set/clear/toggle and pin_interrupt_configure functions recently
added to the gpio api.

Assumes the gpio api layer handles translating logical flags to physical
flags.

Removes port configuration support since that feature is deprecated in
the new gpio api.

Tested with:
- samples/basic/blinky
- samples/basic/button
- tests/drivers/gpio/gpio_api_1pin

On boards:
- mimxrt1015_evk
- mimxrt1020_evk
- mimxrt1050_evk
- mimxrt1060_evk
- mimxrt1064_evk

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-02-05 12:00:36 +01:00
Maureen Helm cad729dcfb boards: Configure ft5336 touch panel on i.mx rt boards
Adds device tree nodes and configures Kconfig defaults for the ft5336
touch panel driver on mimxrt10{50,60,64}_evk boards.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-02-01 08:50:16 -05:00
Maureen Helm 201f8897cd dts: boards: Define dts aliases at soc level for i.mx rt socs
Defines device tree aliases for on-chip peripherals at the soc level
instead of the board level for all i.mx rt socs. The eliminates some
duplicate code in the board level device trees, and will allow drivers
to use device-tree generated macros directly instead of through dts
fixups.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-01-13 10:22:09 -05:00
Maureen Helm 5a19106396 boards: arm: Add arduino header to all mimxrt boards
Adds a device tree nexus node to define which gpio pins are mapped from
the soc to the arduino header.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-12-10 08:49:31 -06:00
Maureen Helm 3bbb96f49d boards: arm: Add missing supported features to nxp imx rt boards
Adds missing items to the list of supported features for all nxp imx rt
boards. These features were already supported, just missing from the
list.

This change increases the number of samples and tests that sanitycheck
selects for these boards.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-11-19 13:53:09 -05:00
Maureen Helm 5ca1e08ab9 boards: arm: Sort supported list in alpha order for nxp boards
Sorts the list of supported features in alphabetical order for all nxp
boards. No features are added or removed.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-11-19 13:53:09 -05:00
Loic Poulain 187397ab16 boards: arm: mimxrt1064_evk: Fix display support
Delete wrong LVGL_BITS_PER_PIXEL config and add mimxrt1064_evk
to the lvgl sample platform whitelist.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2019-11-15 10:06:56 +01:00
Ulf Magnusson bd6e04411e kconfig: Clean up header comments and make them consistent
Use this short header style in all Kconfig files:

    # <description>

    # <copyright>
    # <license>

    ...

Also change all <description>s from

    # Kconfig[.extension] - Foo-related options

to just

    # Foo-related options

It's clear enough that it's about Kconfig.

The <description> cleanup was done with this command, along with some
manual cleanup (big letter at the start, etc.)

    git ls-files '*Kconfig*' | \
        xargs sed -i -E '1 s/#\s*Kconfig[\w.-]*\s*-\s*/# /'

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-11-04 17:31:27 -05:00
Loic Poulain 1990b8d94b boards: mimxrt1064_evk: Add MT9M114 digital image sensor node
Sensor can be connected to the 24pin camera connector.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2019-10-25 15:13:53 -05:00
Loic Poulain 9c72d59874 boards: arm: nxp: mimxrt1064_evk: Enable CSI video support
This enables CSI node, and configures pinmux when driver is enabled.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2019-10-25 15:13:53 -05:00
Loic Poulain 5533da9aa2 boards: mimzzrt1064_evk: Add pwm-led0 alias
Used to build/run blink_led sample.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2019-08-07 07:38:40 -05:00
Loic Poulain 2e1bed513a boards: mimxrt1064: Add PWM support
PWM on GPIO_AD_B0_09 (USER_LED/Arduino J22 pin 5)

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2019-08-07 07:38:40 -05:00
Loic Poulain 77581fcdb0 boards: mimxrt10xx: Add counter to supported list
mimxrt10xx boards now have counter support via GPT.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2019-07-01 11:53:07 -05:00
Kumar Gala c129ac4467 boards: dts: Cleanup some "ok" -> "okay"
Some new cases of:
	status = "ok"

that we want to be:
	status = "okay"

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-06-28 14:38:57 -05:00
Loic Poulain d47df7f73f boards: mimxrt1064_evk: Enable USB device controller 1
Enabled node and add feature to doc.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2019-06-17 16:25:06 -04:00
Ulf Magnusson a84ded74ea dts: Replace status = "ok" with status = "okay"
The DT spec. only has "okay" and not "ok". The Linux kernel has around
12k "okay"s and 300 "ok"s.

The scripts/dts scripts only check for "disabled", so should be safe re.
those at least.

The replacement was done with

    git ls-files | xargs sed -i 's/status\s*=\s*"ok"/status = "okay"/'

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-06-14 19:51:13 -05:00
Marti Bolivar 1717332c7a cmake: add helpers for setting board runners
This helps by letting us add checks for when the runner has already
been set. There is documentation saying you can set
-DBOARD_DEBUG_RUNNER at the command line and have it take effect,
which turns out not to be true for a large number of boards.
A status message helps the user debug.

(We'll address the existing in-tree boards in the next patch.)

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-06-07 13:43:51 +02:00
Loic Poulain e5609997e0 soc: nxp_imx: mimxrt1064_evk: Add I2C support
I2C1 is routed to J24 Arduino interface (D14/I2C_SDA, D15/I2C_SCL).

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2019-04-26 03:48:07 -07:00
Maureen Helm ab712b2d67 mimxrt1060_evk: mimxrt1064_evk: Enable pyocd runner
Enables the pyocd runner on mimxrt1060_evk and mimxrt1064_evk boards
using the generic cortex_m target. Note that this target is not capable
of programming flash, therefore can only load an application to internal
SRAM (set CONFIG_CODE_ITCM=y and CONFIG_DATA_DTCM=y) or attach to an
application already programmed to flash by other means (e.g., DAPLink
drag-and-drop).

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-04-18 12:23:34 -04:00
Ulf Magnusson 7fdb525754 kconfig: Use 'default' instead of 'def_bool' in Kconfig.defconfig files
Same deal as in commit 4638652214 ("Kconfig: Use 'default' instead of
'def_bool' in Kconfig.defconfig files"), fixing new stuff that got
introduced since then.

Some symbols, like ALTERA_AVALON_PIO, are only defined in
Kconfig.defconfig files, and so need the def_bool.

Motivation (from the note at the end of
guides/kconfig/index.html#common-shorthands):

For a symbol defined in multiple locations (e.g., in a Kconfig.defconfig
file in Zephyr), it is best to only give the symbol type for the "base"
definition of the symbol, and to use 'default' (instead of 'def_<type>'
value) for the remaining definitions. That way, if the base definition
of the symbol is removed, the symbol ends up without a type, which
generates a warning that points to the other definitions. That makes the
extra definitions easier to discover and remove.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-04-18 12:20:49 -04:00
Maureen Helm c4c31fcdb1 boards: mimxrt10{60,64}_evk: Rework programming and debugging doc
Reworks the programming and debugging section in the mimxrt1060_evk and
mimxrt1064_evk board documents to leverage the new debugging guide
covering debug probes and host tools.

Neither of these boards have OpenSDA J-Link board-specific firmware,
therefore the only debug probe currently supported is the external
J-Link.

Updates the flashing section to reflect that the ``flash`` build system
target is now supported.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-03-29 22:50:44 -04:00
Patrik Flykt 21358baa72 all: Update unsigend 'U' suffix due to multiplication
As the multiplication rule is updated, new unsigned suffixes
are added in the code.

Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
2019-03-28 17:15:58 -05:00