Remove board code and a few associated samples/tests that explicitly
call pinmux_pin_set() to set a given pin as GPIO. This is handled as
part of gpio_mcux_configure() so we don't need to do it again.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Add pinctrl-0 properties for configuration of peripherals like UARTs,
I2C, SPI, FTMs, etc. These settings are based on what is defined in
the board/pinmux.c file.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Configures the pinmux for the Arduino D4 pin to allow using it as a
gpio. This is needed by the adafruit_2_8_tft_touch_v2 shield for SDMMC.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
On the FRDM-K64F board the SoC uses the 100 pin LQFP package version of
the SoC (MK64FN1M0VLL12). This pacakge doesn't pin out PTA28 or PTC19.
So remove setting them.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Add dts files for the specific chip instances that are used on the
boards in prep of having pin data in devicetree. The pin data will
be specific to the given chip instance so we need to distinguish
unique chips for the same SoC as the pin mux will differ.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Configures the pinmux for the Arduino D9 pin to allow using it as a
gpio. This is needed by the adafruit_2_8_tft_touch_v2 shield for
cmd-data-gpios.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
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>
Switch to use DEVICE_DT_GET instead of device_get_binding for pinmux
device. As part of this change drop the "label" property from
the pinmux devicetree node and update the binding and dts files to
reflect that.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Now that we generate a header that extern's all possible devicetree
based device struct we can remove DEVICE_DT_DECLARE and
DEVICE_DT_INST_DECLARE as they aren't needed anymore.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
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>
Enables hardware stack protection on all possible nxp kinetis 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>
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>
Adds a troubleshooting section to the frdm_k64f board document that
describes how to unlock the flash after normal west flash/debug commands
fail.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
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>
Fixes the frdm_k64f and twr_ke18f boards to enable the kinetis
temperature sensor only if the sensor and adc drivers are both enabled.
This fixes a logging error seen at runtime in
samples/bluetooth/peripheral_hr.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
tested on mimxrt1060_evt
MEMORY_NOCACHE is needed
test on frdmk64f
special test slot need configure with
CONFIG_DMA_TEST_SLOT_START
Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
Conditionalizes can pinmuxes on CONFIG_CAN for all nxp boards (kinetis,
lpc, and imx families) to avoid possible conflicts between peripherals.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
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>
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>
Conditionalizes adc pinmuxes on CONFIG_ADC for all nxp boards (kinetis,
lpc, and imx families) to avoid possible conflicts between peripherals.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
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>
Conditionalizes spi pinmuxes on CONFIG_SPI for all nxp boards (kinetis,
lpc, and imx families) to avoid possible conflicts between peripherals.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
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>
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>
Swap this out and make the status a parameter.
Leave a couple of cases of DT_NODE_HAS_COMPAT().
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
These are redundantly checking a node's status twice.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Usually, we want to operate only on "available" device
nodes ("available" means "status is okay and a matching binding is
found"), but that's not true in all cases.
Sometimes we want to operate on special nodes without matching
bindings, such as those describing memory.
To handle the distinction, change various additional devicetree APIs
making it clear that they operate only on available device nodes,
adjusting gen_defines and devicetree.h implementation details
accordingly:
- emit macros for all existing nodes in gen_defines.py, regardless
of status or matching binding
- rename DT_NUM_INST to DT_NUM_INST_STATUS_OKAY
- rename DT_NODE_HAS_COMPAT to DT_NODE_HAS_COMPAT_STATUS_OKAY
- rename DT_INST_FOREACH to DT_INST_FOREACH_STATUS_OKAY
- rename DT_ANY_INST_ON_BUS to DT_ANY_INST_ON_BUS_STATUS_OKAY
- rewrite DT_HAS_NODE_STATUS_OKAY in terms of a new DT_NODE_HAS_STATUS
- resurrect DT_HAS_NODE in the form of DT_NODE_EXISTS
- remove DT_COMPAT_ON_BUS as a public API
- use the new default_prop_types edtlib parameter
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
As we phase out per instance Kconfig symbols convert to utilize
DT_DRV_INST to initialize CAN instances.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
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>
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>
The Kconfig PWM_[0-3] sybmols don't have any meaning for kinetis family
SoCs. The driver 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>
Do not assume in the SoC level device trees that NXP Kinetis FlexTimer
nodes will always be configured as PWM. Instead, configure FlexTimer
nodes for PWM at the board level for NXP Kinetis boards.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Convert CAN to use a chosen node property that is similar to how we
handle zephyr,entroy or zephyr,flash-controller as the means to select a
specific peripheral instance utilized by a subsystem.
Replace references of the form:
alias {
can-primary = &can1;
};
with:
chosen {
zephyr,can-primary = &can1;
};
Replace various macro/define references with either
DT_CHOSEN(zephyr_can_primary) or replace DT_ALIAS_CAN_PRIMARY_LABEL
with DT_CHOSEN_ZEPHYR_CAN_PRIMARY_LABEL.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Convert driver to use DT_INST_ defines. As part of this conversion we
remove the Kconfig options for per GPIO controller enables and instead
get that information from device tree. This means we now disable each
GPIO controller by default in the DTS and have each board dts enable the
GPIO controller ports it needs.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
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>
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>
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>
Towards moving uart mcux driver to DT_INST based, we need to convert
uses of CONFIG_UART_MCUX_[0-9] to use DT_NODELABEL instead. This way
the pinmux settings are still based on specific instances of the uart.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>