Commit graph

35 commits

Author SHA1 Message Date
Kumar Gala 30f3121c55 boards: arm: nrf: Remove Kconfig PWM_[0-3] usage
The Kconfig PWM_[0-3] sybmols don't have any meaning for nrf family of
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>
2020-05-05 08:40:19 -05:00
Kumar Gala d929e874c2 boards: dts: nrf: Remove SoC compatible in top-level compatible
The SoC node has compatibles for the specific SoC in place, having the
same compatible at the top level is technically a conflict and the
top-level one should really just be about the board.  Remove the SoC
related compatibles at the top-level.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-29 08:20:15 -05:00
Andrzej Głąbek 0b300da221 tree-wide: Remove assignments to Kconfig options unused in nRF drivers
Kconfig options that enable I2C and SPI instances are no longer used
in nRF drivers. Remove all assignments done to these options in related
board definitions, samples, and tests.

For nrf52_pca20020, also no longer needed setting of default values
for GPIO_SX1509B* options is removed (now the gpio_sx1509b driver is
enabled by default when a corresponding devicetree node is enabled).

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2020-04-03 14:47:32 +02:00
Andrzej Głąbek 97b07b943a drivers/serial/Kconfig.nrfx: Choose driver type basing on DT compatible
Remove prompts from Kconfig options `UART_x_NRF_UART*` that select
the type of nrfx driver (for UART or UARTE peripheral) to be used
for a given instance. This prevents the options from being modified
from configuration files.
Instead, make one of these options selected by default according to the
"compatible" property set for the corresponding UART node in devicetree.

This eliminates the need of changing both the "compatible" property in
devicetree and the Kconfig option selecting the driver type when a user
wants to switch between UART and UARTE for a given instance.

Since all `UART_x_NRF_UART*` options are made "hidden" by this commit,
all their occurrences in configuration files are removed.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2020-04-03 14:47:32 +02:00
Ulf Magnusson 378d6b137a kconfig: Replace non-defconfig single-symbol 'if's with 'depends on'
Same deal as in commit eddd98f811 ("kconfig: Replace some single-symbol
'if's with 'depends on'"), for the remaining cases outside defconfig
files. See that commit for an explanation.

Will do the defconfigs separately in case there are any complaints
there.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-02-12 10:32:34 -06: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
Piotr Mienkowski ff90b2c1d6 drivers: gpio_nrfx: update to use new GPIO API
Update driver code and board files to use new GPIO configuration flags
such as GPIO_ACTIVE_LOW. Also add implementation of new port_* driver
API as well as gpio_pin_interrupt_configure function.

Tested on nrf52840_pca10056 board.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-02-05 12:00:36 +01:00
Henrik Brix Andersen d45b279e50 boards: nrf52832_mdk: add RGB PWM LED to dts
Add RGB PWM LED to the nrf52832_mdk board device tree.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-02 17:01:16 -05:00
Ulf Magnusson b292f7643b kconfig: Remove assignments to promptless SOC_FAMILY_NRF symbol
SOC_FAMILY_NRF has no prompt. Assignments in configuration files have no
effect on symbols without prompts. A prompt means the symbol is
user-configurable.

SOC_FAMILY_NRF is instead enabled indirectly through being selected by
other symbols.

Detected through some work-in-progress improved error checking.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-18 14:42:58 +01:00
Ulf Magnusson 984bfae831 global: Remove leading/trailing blank lines in files
Remove leading/trailing blank lines in .c, .h, .py, .rst, .yml, and
.yaml files.

Will avoid failures with the new CI test in
https://github.com/zephyrproject-rtos/ci-tools/pull/112, though it only
checks changed files.

Move the 'target-notes' target in boards/xtensa/odroid_go/doc/index.rst
to get rid of the trailing blank line there. It was probably misplaced.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-11 19:17:27 +01:00
Ulf Magnusson 1f38ea77ba kconfig: Clean up 'config FOO' (two spaces) definitions
Must've been copy-pasted around.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-11-04 17:31:27 -05: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
Andrzej Głąbek dd4c57d564 dts: Use separate compatibles for Nordic TWI/TWIM/TWIS peripherals
This commit introduces separate "compatible" strings for dts nodes
representing different types of Nordic TWI peripherals. Previously
"nordic,nrf-i2c" was used for both TWI and TWIM, and TWIS was not
supported.

Quite a few files need to be touched by this commit but the changes can
be divided into groups of related or very similar ones, distinguishable
by the initial part of the path to the modified file:

* dts/bindings/i2c/
  new bindings for "nordic,nrf-twim" and "nordic,nrf-twis" are added
  and the one for "nordic,nrf-i2s" is renamed to "nordic,nrf-twi",
  common fields for all these bindings are extracted to a shared file

* dts/arm/nordic/
  "compatible" properties in i2cX nodes are updated (when there is no
  choice as only one type of TWI peripheral is available) or replaced
  with a comment pointing out that the proper type of peripheral needs
  to be picked at some upper layer

* drivers/i2c/
  both flavors of i2c_nrfx drivers are updated with the new names of
  macros generated from dts

* boards/
  all i2cX nodes in dts files for boards equipped with an nRF chip are
  updated with the proper "compatible" property, according to the type
  of TWI peripheral that is currently selected for the board by the
  corresponding Kconfig choice option (I2C_x_NRF_TWI*)

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-09-26 19:13:17 +02:00
Anas Nashif 5f24b419bb tests: pwm_api: remove whitelisting
Remove whitelisting and enable broader testing on all boards with needed
features.
Add pwm to board yaml where it applies.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-07-12 05:54:16 -07:00
Carles Cufi 3b3bbc1ee0 Bluetooth: hci_uart: Use DT for the hci_uart UART
Use Device Tree,and in particular a new 'bt-c2h-uart' to select which
UART is being used to communicate with an external BLE Host when acting
as a Controller.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-06-26 12:37:04 +02: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
Anas Nashif 3ae52624ff license: cleanup: add SPDX Apache-2.0 license identifier
Update the files which contain no license information with the
'Apache-2.0' SPDX license identifier.  Many source files in the tree are
missing licensing information, which makes it harder for compliance
tools to determine the correct license.

By default all files without license information are under the default
license of Zephyr, which is Apache version 2.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-07 08:45:22 -04:00
Andrzej Głąbek 32223bd2ae boards: Enable GPIO by default on boards with nRF SoCs
This patch enables the GPIO driver by default on all boards equipped
with an nRF SoC (all boards having `CONFIG_SOC_FAMILY_NRF=y` in their
`_defconfig` file).
In vast majority of cases the driver is needed, so it is more
convenient to enable it at board level than in particular
applications.
And if the driver is undesired for some reason, it can be still
disabled in the application config.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-03-28 16:46:39 -05:00
Carles Cufi c616f215b0 boards: nrf: Add bt-mon-uart to all nRF-based boards
Add the bt-mon-uart chosen node to all the nRF-based boards so that they
can all use CONFIG_BT_DEBUG_MONITOR without additional changes.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-03-21 17:23:08 +02:00
David B. Kinder 6000a6205a doc: prepare for improving doc API linking
Linking to API material requires knowing the pecularities of how
doxygen, sphinx, and breathe work. In an attempt to hide some of this
we're preparing the current docs to allow use of configuration defaults
that will let us more simply use a default role that will hunt for a
reference target in the various domains that are available by using a
default "role" of "all".  This will let us use the simple notation
`functionname` or `typename` without fully specifying the reference as
:c:func:`functionname`.

This patch cleans up exising docs that were (incorrectly) using single
backtics where double backtics should have been used, and also found
some typos (such as a space between the role name and the reference,
such as :file: `filename`, and a missing colon such as
c:func:`functionname`)

This is a start to address issue #14313

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-03-15 05:47:19 +01:00
Andrzej Głąbek 41e09725bb boards: nrf: Enable HW PWMs on nrf52832_mdk and nrf52840_mdk
This is a follow-up to commit e2b38e02bf.
Default PWM instances are enabled in Kconfig and DTS (with channel 0
set to LED0 pin) for these boards so that it is possible to build basic
samples blink_led and fade_led for them without extra modifications.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-02-14 18:50:00 -06:00
Anas Nashif 0e4ff809d7 doc: boards: move all board docs to be index.rst
Be consistent in how board docs are named and move all to index.rst.
This will make the URL to the board documentation predictable and easier
to remember.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-09 17:22:08 -06:00
Carles Cufi 9f1acfe2fd boards: arm: nrf: Make Bluetooth optional
Instead of enabling Bluetooth by default on nRF5x boards, only enable
the controller if Bluetooth has been enabled by the applicaiton.

Fixes #5454
Fixes #12215

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-02-07 16:17:27 -05:00
Anas Nashif 58632f8da7 doc: change board dts documentation with new URLs
flash-partitions page has moved...

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-05 07:04:40 -05:00
Kumar Gala 5977b3db2f dts: Remove mcuboot.overlay
As we want to remove dts dependency on Kconfig, we had a case based on
CONFIG_BOOTLOADER_MCUBOOT.  From a DTS point of view that was just
getting the chosen property 'zephyr,code-partition' set.  We can easily
move this to the actual dts files and remove the mcuboot.overlay.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-01 10:16:06 -06:00
Kumar Gala 67af71e01d boards: arm: Add xtools as a supported toolchain
Update all ARM boards to have xtools as a supported toolchain.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-09 14:18:58 -05:00
Andrzej Głąbek 9d44cad921 boards: nrf: Enable ADC, I2C, and SPI instances by default
Enable by default the following hardware instances in Kconfig:
- ADC_0
- I2C_0
- SPI_1 (SPI_0 for nRF52810)
for all nRF development kit boards having the corresponding DT nodes
enabled. This way there is no need to enable these instances in
particular applications, like samples for sensors or tests for drivers.

I2C_0 and SPI_0 cannot be used simultaneously in most of nRF SoCs,
nRF52810 is the only exception so far (and in this SoC SPI_1 is not
present, hence SPI_0 is enabled for it).

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-12-21 21:01:37 +01:00
Andrzej Głąbek 326be98f74 boards: nrf: Remove redundant Kconfig adjustments
The options selecting nRF drivers are now enabled by default when
an nRF SoC is selected as the build target.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-12-21 21:01:37 +01:00
Florian Gärtner eb5211aaec boards: arm: Fix and update nordic board doc links
Fixes old and some broken links to nordic documentation.

Signed-off-by: Florian Gärtner <florian.gaertner@ledcity.ch>
2018-12-14 21:19:21 +01:00
Jakub Rzeszutko f8178dcb05 shell: remove Console dependencies
Removed Console dependencies from shell uart backend.
Generated define: CONFIG_UART_SHELL_ON_DEV_NAME for each board.

Fixes #10191

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-12-07 12:11:11 +01:00
Kumar Gala 90823520e2 dts: Remove ifdef CONFIG_FS_FLASH_STORAGE_PARTITION from dts files
Remove the ifdef related to CONFIG_FS_FLASH_STORAGE_PARTITION.  There
shouldn't be any harm in always having the partition around as we'll
just generate the defines related to and most applications will ignore
them.

Helps get one step closer to have DTS not depend on Kconfig.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-15 17:37:59 -05:00
Kumar Gala 758d5b14a9 boards: Remove board.h from boards that don't need it
These boards don't need board.h to work so remove it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-14 06:44:02 -06:00
Kumar Gala aafc5d51de boards: arm: Remove CONFIG_MCUMGR_SMP_UART from dts files
In an effort to reduce the number of CONFIG_ defines in dts files, we
can remove CONFIG_MCUMGR_SMP_UART and just always set
'zephyr,uart-mcumgr' as there is no harm to always having this set for
those board dts files that define the property.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-30 14:38:59 -05:00
Zelin Cai db653404b0 boards: nrf52832_mdk: add board support for nRF52832-MDK
Add support for nRF52832-MDK board.

Signed-off-by: Zelin Cai <zelin@makerdiary.com>
Signed-off-by: Jean-Paul Saman <jpsaman@videolan.org>
2018-10-17 12:51:22 -05:00