Commit graph

59 commits

Author SHA1 Message Date
Stephanos Ioannidis 5d91d985e8 boards: arm: Fix deprecated "gccarmemb" toolchain references
The "gccarmemb" toolchain type has been renamed to "gnuarmemb" to
better reflect the official naming.

This commit replaces all references to the "gccarmemb" toolchain type
to "gnuarmemb".

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-06-10 09:22:03 +02:00
Erwan Gouriou 0993fa5682 boards: stm32: pinmux: Restore Kconfig control on pinmux (adc)
In order to avoid pin configuration conflicts between peripherals,
add CONFIG_ADC flag to for each adc pinmux configuration.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-05-20 12:09:19 +02:00
Erwan Gouriou b3fbc3aa8e boards: stm32: pinmux: Restore Kconfig control on pinmux (pwm)
In order to avoid pin configuration conflicts between peripherals,
add CONFIG_PWM flag to for each pwm pinmux configuration.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-05-20 12:09:19 +02:00
Erwan Gouriou 572e1c4980 boards: stm32: pinmux: Restore Kconfig control on pinmux (i2c)
In order to avoid pin configuration conflicts between peripherals,
add CONFIG_I2C flag to for each i2c pinmux configuration.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-05-20 12:09:19 +02:00
Erwan Gouriou 1a7bcccd69 boards: stm32: pinmux: Restore Kconfig control on pinmux (spi)
In order to avoid pin configuration conflicts between peripherals,
add CONFIG_SPI flag to for each spi pinmux configuration.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-05-20 12:09:19 +02:00
Erwan Gouriou f9d5df3937 boards: stm32: pinmux: Restore Kconfig control on pinmux (serial)
In order to avoid pin configuration conflicts between peripherals,
add CONFIG_SERIAL flag to for each serial pinmux configuration.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-05-20 12:09:19 +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
Martí Bolívar edeb555a8b devicetree: fix a couple of late-breaking DT_HAS_NODE()
Replace with DT_HAS_NODE_STATUS_OKAY.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-06 13:59:27 -05:00
Pete Johanson 91d6139338 boards: arm: nucleo_wb55rg: Enable USB for stm32wb.
* Define USB driver for base stm32wb device.
* Enable USB for the nucleo_wb55rg board.
* Properly initialize USB power + clock for the platform.

Signed-off-by: Pete Johanson <peter@peterjohanson.com>
2020-05-06 10:46:23 -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
Pete Johanson 2c0f7f20cb boards: arm: nucleo_wb55rg: Add missing sw2 alias.
The P Nucleo WB55RG board has SW1, SW2, SW3, and Reset/SW4.

Signed-off-by: Pete Johanson <peter@peterjohanson.com>
2020-05-05 19:33:32 +02:00
Gerard Marull-Paretas c6b1375400 drivers: pwm: stm32: remove remaining Kconfig instances
Following other drivers, Kconfig based instances are now entirely
removed. In order to do this change, PWM nodes in board DT files have
been given a pwm{N} label so that both:

- DT API checks such as #if DT_HAS_NODE(DT_NODELABEL(pwmN)) can be
  used (N being PWM instance number).
- DT references can be written as pwms = <&pwmN x y>; instead of
  pwms = <&{/soc/timers@XXXXXXXX/pwm} x y>;

This approach is also used on the Linux Kernel.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-05-05 10:52:51 -05:00
Erwan Gouriou 1be8bda215 boards: stm32: Fix boards names in yaml and/or doc files
For auto doc generation purpose, get name value of boards' yaml files
in sync with name provided as board name in .rst file


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-05-05 10:05:56 -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
Erwan Gouriou c29e94ca12 boards: stm32: adc: Move adc pinmuxing to device tree
Use new DT API to configure ADC peripheral pins.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-04-29 16:09:15 -05:00
Erwan Gouriou 4008960afc boards: nucleo_wb55rg: Update HCI lib to version 1.5
Update STM32WB HCI lib support to version 1.5.0.
Additionally provide a doc section to clarify compatibility
with stm32wb wireless co-processor binaries.


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-04-28 09:09:40 -05:00
Erwan Gouriou 81f27c2265 boards: stm32: Use dt API for serial peripheral configuration
Replace use of Kconfig UART_X symbols by calls to DT API.
Clean driver from symbols definitions

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-04-20 15:27:56 -05:00
Erwan Gouriou bfaa1091fd boards: stm32: Use dt API for peripheral configuration
Replace use of Kconfig SPI_X symbols by calls to DT API.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-04-18 12:40:59 -05:00
Erwan Gouriou 67f9b6527b boards: stm32: Remove Kconfig I2C symbols
Following conversion of stm32 i2c driver to use of DT_NODELABEL
macros, configuration of i2c instance in stm32 boards should
no more be done thanks to Kconfig symbols, but is done thanks
to device tree file.
Clean boards files from these symbols.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-04-15 08:21:30 -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 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
Erwan Gouriou fc52f097b8 boards: stm32: Fix buttons and leds configuration
On some stm32 based boards buttons and leds configuration
was wrong. Fix that.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-02-05 12:00:36 +01:00
Erwan Gouriou 31ed7e931b boards: stm32: Update board definition using new GPIO api
Move GPIO_ACTIVE_INT_HIGH/LOW to GPIO_ACTIVE_HIGH/LOW.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-02-05 12:00:36 +01:00
Erwan Gouriou f44b120449 boards: nucleo_wb55rg: Add openocd support and set to default runner
Flashing stm32wb SoCs is available since Zephyr SDK-0.11.0.
Enables it on nuclmeo_wb55rg and set it as default as it is
faster in flashing and support doesn't require additional
action (vs pyocd package support).

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-27 15:26:25 -06:00
Armando Visconti 8dbe9806ff drivers/i2c: Kconfig.stm32: Enable interrupts usage by default
I2C interrupts usage should be the preferred way. This commit
enables them by default in the STM32 I2C driver itself.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2020-01-24 21:34:45 -05:00
Francois Ramu 02ff0e45a2 boards: arm: st_stm32: add lptimer to nucleo_wb55rg board
This patch introduces the support of the LowPower Timer
     for the STM32WBxx from STMicroelectronics.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2019-11-13 10:31:06 -06:00
Erwan Gouriou eaa6058ebd boards: nucleo_wb55rg: Update doc with BLE support
BLE was missing as supported feature.


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-11-07 02:42:24 -06:00
Fabio Utzig d6d79933c1 boards: nucleo_wb55: align partition boundaries
This MCU has sectors of size 4096, but some partitions were aligned to
0x800 addresses. MCUBoot detects this incosistency and halts. This patch
fixes the partitions to use properly aligned addresses (multiples of
0x1000).

Signed-off-by: Fabio Utzig <utzig@apache.org>
2019-11-05 08:58:33 +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
Peter Bigot f8bfc7e175 devicetree: tree-wide: add nexus map properties for arduino headers
We need to be able to specify GPIO flags in devicetree without that
preventing translation from the Arduino specifier to the host GPIO
specifier.  Set up to ignore the low 6 bits of the flags field when
matching the child specifier, and to copy those bits to the parent
specifier.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-10-22 14:40:41 -05:00
Pavlo Hamov e5d7b2bc51 boards: nucleo_wb55: select LSE by default
use LSE as RF clock source on nucleo board

Signed-off-by: Pavlo Hamov <pavlo_hamov@jabil.com>
2019-10-17 14:02:40 -05:00
David B. Kinder 18e28c4e2a doc: use multi-column display for long lists
A style was recently added that will allow long narrow lists to display
as three columns across the page (with a responsive design that
self-adjusts based on screen width).  This looks much better than a long
list that runs down the page.

Adding this directive before a block (or nested under the directive)
will allow the content to be multi-column:

   .. rst-class:: rst-columns

as explained in
https://docs.zephyrproject.org/latest/guides/documentation/index.html
in the Multi-column lists section.

This PR tweaks a few remaining documents that have such long narrow
lists.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-10-16 13:02:35 -05:00
Erwan Gouriou 5881f118c0 soc: stm32: Enable cortex-m systick timer by default
Move systick activation in soc/ as a Kconfig.defconfig file and
remove activation in boards _defconfig files.
This will allow to deactivate it in a more flexible way
with upcoming LPTIMER as tick source when power management
features are enabled.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-10-11 14:55:48 -07:00
Pavlo Hamov ad708306c0 boards: nucleo_wb55rg: add omitted code-partition
Add omitted chosen entry. Required for MCUBOOT

Signed-off-by: Pavlo Hamov <pavlo_hamov@jabil.com>
2019-10-04 15:38:10 -05:00
Bruno TISSERAND 1911a7599c boards: Add support of arduino connector on nucleo_wb55rg board
Add the support of the Arduino connector on nucleo_wb55rg board

Signed-off-by: Bruno TISSERAND <bruno.tisserand@st.com>
2019-09-16 15:13:33 -05:00
Robert Weber 3a3eb0e3af boards: nucleo_wb55rg: Rename documentation file to match board name
Rename doc/nucleowb55rg.rst to doc/nucleo_wb55rg.rst so the file name
matches the name of the board it is documenting.

Signed-off-by: Robert Weber <robertweber95@gmail.com>
2019-09-12 13:21:06 -05:00
Robert Weber 772b5abae1 boards: nucleo_wb55rg: Enable IWDG
Enable the independent watchdog on the nucleo_wb55rg

Signed-off-by: Robert Weber <robertweber95@gmail.com>
2019-09-12 13:21:06 -05:00
Erwan Gouriou 25b0c04b5d boards: nucleo_wb55rg: Add missing flag around SPI _NSS pin definition
Kconfig symbol SPI_STM32_USE_HW_SS is used to control NSS pin
enabling.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-09-12 09:02:15 -05:00
Erwan Gouriou 27a5cb6048 boards: nucleo_wb55rg: Add link to reference manual
This was missing from board documentation.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-08-06 05:21:33 -04:00
Rick Conrey 710ab470c8 boards: nucleo_wb55rg: Enable ADC
Enable ADC on nucleo_wb55rg

Signed-off-by: Rick Conrey <rick.conrey@witiproducts.com>
2019-07-31 05:38:25 -04:00
Rick Conrey bcd60189c2 boards: nucleo_wb55rg: enable PWM2 on nucleo_wb55rg
enable PWM2 Ch 1 on nucleo_wb55rg

Signed-off-by: Rick Conrey <rick.conrey@witiproducts.com>
2019-07-26 11:27:15 -04:00
Rick Conrey 9bf2e3fdcb boards: nucleo_wb55rg: enable SPI1 on nucleo_wb55rg
enable SPI1 on nucleo_wb55rg

Signed-off-by: Rick Conrey <rick.conrey@witiproducts.com>
2019-07-25 10:49:58 -04:00
Rick Conrey 094d5c2722 boards: nucleo_wb55rg: Enable RTC
Enable RTC on nucleo_wb55rg

Signed-off-by: Rick Conrey <rick.conrey@witiproducts.com>
2019-07-11 13:10:15 -05:00
Andy Ross 7044ce746f boards/arm: Remove 1000 Hz tick rate on STM32 boards
These all have what appears to be a promiscuously cut-and-pasted
declaration for a 1000 Hz tick rate.  They are all SysTick boards and
will work very well with the new 10 kHz default, so use that instead.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-07-02 22:52:29 -04:00
Anas Nashif a8167ab17d cleanup: include/: move pinmux.h to drivers/pinmux.h
move pinmux.h to drivers/pinmux.h and
create a shim for backward-compatibility.

No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.

Related to #16539

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-27 22:55:49 -04:00
Anas Nashif ef281c4237 cleanup: include/: move sys_io.h to sys/sys_io.h
move sys_io.h to sys/sys_io.h and
create a shim for backward-compatibility.

No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.

Related to #16539

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-27 22:55:49 -04:00
Erwan Gouriou d9d6b59e2c boards: nucleo_wb55rg: Enable flash and debug with pyocd
stm32wb is not yet supported on openocd.
But support on pyocd can be enabled thanks to "pack" feature.
Configure board runner with pyocd and provide guidelines
to configure pyocd.


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-06-18 08:04:12 -04:00
Erwan Gouriou b20f288a2b soc: stm32: STM32WB: Remove useless package digit
Fixes #16733, applied to STM32WB series.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-06-17 16:14:45 -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