Commit graph

26 commits

Author SHA1 Message Date
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
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
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
Anas Nashif 0d2f31f2ee board: more stm board renames in yaml file
Put descriptive board name in yaml file.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-05-01 15:43:37 -04: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
Francois Ramu e8bfa52e54 board: arm: nucleo_g071 support openocd
This adds the support of openocd for nucleo board stm32g071rb
It requires the openocd that supports stm32G0xx
(zephyrproject-rtos/openocd#24)

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-04-15 13:00:44 +02:00
Thomas Stranger 17f5b67d8b boards: nucleo_g071rb: Enable IWDG
Enable the independent watchdog on the nucleo_g071rb

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2020-03-10 14:46:07 +02: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 124004c29a boards: stm32: Remove useless CONFIG_BOARD_FOO from _defconfig files
CONFIG_BOARD_FOO is enabled in a number of board *_defconfig files
although it is useless as it is set by default (as defined as a
one option choice, symbol defaults to 'y').
CONFIG_BOARD_FOO should remain only in target that are defined
in boards providing multiple choices (dual cores, board with multiple
revisions).

Clean it from STM32 impacted boards.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-02-05 11:29:21 -06: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
Peter Bigot 4549d379da treewide: use full path to pinmux.h header
The build infrastructure should not be adding the drivers subdirectory
to the include path.  Fix the legacy uses that depended on that
addition.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-26 17:52:12 +01:00
Erwan Gouriou d9e6009a73 boards: nucleo_g071rb: Enable comman line flashing using pyocd
On nucleo_g071rb, flashing using pyocd requested to hold reset button
during flashing operation.
Using newly available pyocd arguments this is no more needed and
nucleo_g071rb can now be flashed in a fully automated way.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-13 11:49:57 +01:00
Kumar Gala cd0f8d5c4f include: Fix use of <sys_io.h> -> <sys/sys_io.h>
Fix #include <sys_io.h> as it has been deprecated and
should be #include <sys/sys_io.h>.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-12-10 08:39:37 -05:00
Erwan Gouriou 4dc303b99b dts: stm32: Remove pinctrl definitions
dts pinctrl definitions were pushed in tree without the code
available to deal with it. They have been kept waiting for the
code, but this is taking much more time than initially thought.

So in current zephyr tree, for all STM32 boards, we have pinmux.c
file which is used to configure pins and these files that are
basically no-op. This situation is creating a lot of confusion
especially to new comers, and create useless maintenance effort.

Remove these files for now.
When zephyr will ready to use them, this commit could be reverted.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-11-06 18:26:04 +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
Ioannis Glaropoulos f00429cc2f boards: arm: nucleo_g071rb: include MPU in HW features
Include ARM MPU in the list of supported features
in nucleo_g071rb platform.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-10-24 09:19:46 +02: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
Ioannis Glaropoulos 0f7fe2406c boards: arm: nucleo_g071rb: enable ARM MPU
We enable Memory Protection on stm32 nucleo_g071rb board,
since the respective SoC series implements the ARM MPU.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-10-18 08:46:03 -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
Erwan Gouriou b3bcfcde7e boards: stm32: Set arduino gpio connector on nucleo 64 pins boards
Apply same scheme for all nucleo_64 pins boards:
-provide a separate arduino connector dtsi file
-provide complete gpio map
-update board.yaml vs arduino support (i2c, spi and gpio)

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-10-07 12:51:14 -05:00
Ulf Magnusson 6e5e1e028d dts: Replace more status = "ok" with status = "okay"
Same deal as in commit a84ded74ea ("dts: Replace status = "ok" with
status = "okay""), for newly introduced stuff.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-08-08 14:03:25 -05:00
Francois Ramu 9f6a28742d boards: arm: Add nucleo for nucleo_g071rb board
This patch adds support for the STM32 nucleo_g071rb board
 from STMicroelectronics.

Signed-off-by: Philippe Retornaz <philippe@shapescale.com>
Signed-off-by: Francois Ramu <francois.ramu@st.com>
2019-07-05 10:35:55 -05:00