Commit graph

16 commits

Author SHA1 Message Date
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
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 024ea0e44e adc: Kconfig: Remove per instance ADC_{0..2} Kconfig symbols
No code utilizes CONFIG_ADC_{0..2} so we can now remove the Kconfig
sybmols for them.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-04 09:04:16 -05:00
Kumar Gala fd021da59a drivers: uart: mcux_lpsci: 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-28 16:54:30 -05:00
Kumar Gala 22e65cb9ba gpio: mcux: Convert convert to DT_INST defines
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>
2020-04-23 17:07:41 -05:00
Kumar Gala 806c540f71 boards: arm: nxp: kinetis: 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-17 09:49:03 -05: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 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
Ulf Magnusson 4638652214 Kconfig: Use 'default' instead of 'def_bool' in Kconfig.defconfig files
This can help find unused symbols. Those end up without a type if
'default' is used instead of 'def_bool', which generates a warning.

Search for "Kconfig.defconfig" in
https://docs.zephyrproject.org/latest/application/kconfig-tips.html for
a longer explanation.

Keep the 'def_bool' for the following symbols, which seem to be
deliberately defined only in Kconfig.defconfig files:

 - ALTERA_AVALON_I2C
 - ALTERA_AVALON_MSGDMA
 - ALTERA_AVALON_PIO
 - ALTERA_AVALON_QSPI
 - ALTERA_AVALON_SYSID
 - CLOCK_CONTROL_IMX_CCM
 - CPU_EM4_DMIPS
 - CPU_EM4_FPUDA
 - CPU_EM4_FPUS
 - FP_FPU_DA
 - I2C_GECKO

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-11-13 16:04:01 -05:00
Ulf Magnusson a3128e6a2c boards: defconfig: Consistently quote string defaults
In preparation for introducing a warning.

Unquoted string defaults work through a quirk of Kconfig (undefined
symbols get their name as their string value), but look confusing. It's
done inconsistently now too.

Suggested by Kumar Gala.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-05-26 19:17:48 -04:00
Maureen Helm b5db62ca94 frdm_kl25z: Remove incorrect references to spi
The kl25z does not have the same spi hardware as the k64f and therefore
cannot use the same spi driver. Remove all references to spi for the
kl25z soc and frdm_kl25z board until we have a valid spi driver.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-05-21 13:26:10 -05:00
Maureen Helm dfdf5e37e1 boards: Move default pinmux enable to <board>_defconfig
Most boards enable the pinmux by default by setting CONFIG_PINMUX=y in
<board>_defconfig, but several boards did it in Kconfig.defconfig
instead. Several code reviews, such as #5043, have suggested using a
select in Kconfig.board to enable the pinmux, however this caused
warnings:

warning: (BOARD_LPCXPRESSO54114) selects PINMUX which has unmet direct
dependencies (BOARD_FRDM_K64F || BOARD_FRDM_KL25Z || BOARD_FRDM_KW41Z ||
BOARD_HEXIWEAR_K64 || BOARD_USB_KW24D512 || BOARD_GALILEO)

Fix how these boards enable the pinmux so they are more consistent with
other boards.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-01-18 11:40:56 -06:00
Kumar Gala 54933b3833 i2c: mcux: Remove usage of CONFIG_I2C_x_DEFAULT_CFG
Stop using CONFIG_I2C_x_DEFAULT_CFG to get the initial value.  Since we
only support master mode we always default to it for initial config and
we get the bitrate from the device tree.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-08-16 10:03:34 -05:00
Kumar Gala 563f8f1464 i2c: mcux: Convert to supporting device tree
Update the MCUX I2C driver and related platforms to get their I2C
information from the device tree.  We also updated a few of the sensor
drivers found on the FRDM & Hexiwear boards to get their I2C bus name
from the device tree instead of directly from Kconfig.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-07-19 14:28:08 -05:00
Maureen Helm 1d75c6a395 frdm_kl25z: Enable adc driver instance and pins
Enables a usable adc driver instance based on the board design and
configures the pinmux to enable one adc channel on the SoC's PTB2 pin,
which is routed to the Arduino header A2 pin. Updates the board
documentation to reflect that the board now supports an adc driver.

Jira: ZEP-1396

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-07-19 14:28:08 -05:00
Gustavo Denardin 94abb1f7fb arm: Support for new ARM board FRDM-KL25Z
In order to allow the use of such board, a very preliminar port was
developed. It consists of board files, as well as pinmux, uart, gpio,
spi drivers and device tree files.

Change-Id: I5753064e39e0b023cf4481744c176de26d8dbebb
Signed-off-by: Gustavo Denardin <gustavo.denardin@gmail.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-28 15:26:38 -05:00