Commit graph

65 commits

Author SHA1 Message Date
Henrik Brix Andersen b84dd9e5fe boards: remove unused canfd tag
Remove the now unused "canfd" from lists of supported board features.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-02-21 18:02:37 -05:00
Erwan Gouriou 69cc659c92 boards: stm32: fix --reset argument for stm32cubeprogrammer runner
stm32cubeprogrammer runner takes a --reset-mode argument to specify the
type of reset used in the flashing process.
Though, argparse default configuration in python allows shortened command
arguments and it happened that --reset was used on most boards instead
of --reset-mode.
This argparse configuration is being changed in order to prevent shortened
command  args (see #53495). As a consequence all board configs using
--reset should be updated to use the full length version.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2023-01-05 11:16:03 -06:00
Francois Ramu 4f42512d8e boards: arm: enabling hsi48 for RNG peripheral on stm32 platforms
The different boards with stm32 which have node enabled in their DTS
also requires the HSI48 clock to be enabled.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-12-07 10:03:11 +00:00
Guillaume Gautier dbbfff5002 boards: arm: Add RTC clock source for STM32 boards dts
For every board using an STM32, add the RTC clock source in its dts

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2022-11-10 11:27:49 +00:00
Gerard Marull-Paretas e81e92dbb9 boards: convert images to JPEG and reduce image size
The boards folder uses ~142.8 MB, being the largest in the repository.
This is due mostly to board images, which are in most cases not
optimized for web content. This patch tries to address this problem by
converting all pictures to JPEG (quality 75) and by adjusting its size
up to 750 px (the width of the documentation content). Images that
specified a fixed width in rst files are converted down to that value
instead.

With this patch, folder goes down to ~53.5 MB from 142.8 MB (-~63%).
Note that this patch introduces a new set of binary files to git
history, though (bad).

The process has been automated using this quickly crafted Python script:

```python
from pathlib import Path
import re
import subprocess

def process(doc, image, image_jpeg, size):
    subprocess.run(
        (
	     f"convert {image}"
	     "-background white -alpha remove -alpha off -quality 75"
	     f"-resize {size}\> {image_jpeg}"
	),
        shell=True,
        check=True,
        cwd=doc.parent,
    )
    if image != image_jpeg:
        (doc.parent / image).unlink()

for doc in Path(".").glob("boards/**/*.rst"):
    with open(doc) as f:
        content = ""
        image = None
        for line in f:
            m = re.match(r"^(\s*)\.\. (image|figure):: (.*)$", line)
            if m:
                if image:
                    process(doc, image, image_jpeg, size)

                image = Path(m.group(3))
                if image.suffix not in (".jpg", ".jpeg", ".png"):
                    content += line
                    image = None
                    continue

                image_jpeg = image.parent / (image.stem + ".jpg")
                size = 750
                content += (
                    f"{m.group(1)}.. {m.group(2)}:: {image_jpeg}\n"
                )
            elif image:
                m = re.match(r"\s*:height:\s*[0-9]+.*$", line)
                if m:
                    continue

                m = re.match(r"\s*:width:\s*([0-9]+).*$", line)
                if m:
                    size = min(int(m.group(1)), size)
                    continue

                content += line
                if line == "\n":
                    process(doc, image, image_jpeg, size)
                    image = None
            else:
                content += line

    with open(doc, "w") as f:
        f.write(content)
```

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-29 10:18:18 +02:00
TLIG Dhaou d97b51d248 boards: arm: Enable the die-temp capabilities of ADC
-Enable the die-temp capabilities of ADC in each dts file of stm32
 boards where it is available.
-Execute the testcase running the samples/sensor/stm32_temp_sensor on each
 available target board.

Signed-off-by: TLIG Dhaou <dhaou.tlig-ext@st.com>
2022-08-24 11:35:45 +02:00
Benjamin Björnsson ab4a926c27 boards: Add alias to boards with watchdog enabled
Add alias to boards with watchdog enabled to facilitate the
move of samples/drivers/watchdog to use DT_ALIAS.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-19 09:28:43 -05:00
Erwan Gouriou be217004a1 boards: stm32h7: Update openocd runner to specify target handle
Openocd scripts for STM32H7 SoCs use _CHIPNAME.cpu{0|1} as
target handle.
Specify this thanks to new openocd runner option '-target-handle'.

This is required to allow thread awareness debugging on these targets.

Fixes #45778

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-05-24 08:52:16 -07:00
TLIG Dhaou 4de1d01956 boards: stm32: use size helpers to describe size of storage partition
The goal of this commit is to update existing STM32 boards descriptions
to use these size "DT_SIZE" macros to enhance readability. To realize this
i used a python script, which will detect the STM32 Boards
/zephyr/board/arm, and then will update in the dts files the partition
description using "DT_SIZE_K" and "DT_SIZE_M" macros.
Check manually and modify in .overlay files in samples and tests.

Signed-off-by: TLIG Dhaou <dhaou.tlig-ext@st.com>
2022-05-10 09:22:43 -05:00
Gerard Marull-Paretas 5a0b12c230 boards: arm: stm32: set LEDs period to 20ms
Most LEDs had 0 or 4 nanoseconds set as a period, a value that doesn't
make sense for a PWM signal driving an LED. A period of 20ms (50Hz) is a
frequently used value as it is above the flicker fusion threshold. All
STM32 based boards have been updated.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-06 07:58:16 -07:00
Francois Ramu c942d5ff87 boards: arm: nucleo_h743zi runner openocd requires reset halt
Add the command to the openocd runner so that a board reset happens
after flash and verify

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-04-05 11:21:30 -07:00
Francois Ramu 0c4e22c7d6 boards: stm32 adding dac features on nucleo boards nucleo_h743zi
It enables he DAC peripheral on the nucleo_h743zi target
boards from STMicroelectronics

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-03-10 13:30:06 -05:00
Jeremy Wood 9d346cc2b2 boards: arm: add can1 to nucleo_h743/753.
* Enable and configure can1 for nucleo_h743/753.
* Update documentation.

Signed-off-by: Jeremy Wood <jeremy@bcdevices.com>
2022-01-19 16:07:54 -05:00
Erwan Gouriou 955ef39623 boards: stm32: Remove use of CONFIG_PINMUX
Now that all drivers and all boards have been converted to the
use of PINCTRL, remove usage of PINMUX.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-11-26 11:36:42 +01:00
Erwan Gouriou 1d14517ede boards: arm: stm32: add pinctrl state name for PWM peripheral
Add the pinctrl state name (default) for the PWM peripherals.
Changes performed based on the script proposed in
"boards: arm: stm32: add pinctrl state name for UART peripheral"

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-11-26 11:36:42 +01:00
Erwan Gouriou ad4e5d85fe boards: arm: stm32: add pinctrl state name for USB peripheral
Add the pinctrl state name (default) for the USB peripherals.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-11-26 11:36:42 +01:00
Erwan Gouriou 1c66ccdac3 boards: arm: stm32: add pinctrl state name for SPI peripheral
Add the pinctrl state name (default) for the CAN peripherals.
Changes performed based on the script proposed in
"boards: arm: stm32: add pinctrl state name for UART peripheral"

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-11-26 11:36:42 +01:00
Erwan Gouriou dfbaa4149d boards: arm: stm32: add pinctrl state name for I2C peripheral
Add the pinctrl state name (default) for the I2C peripherals.
Changes performed based on the script proposed in
"boards: arm: stm32: add pinctrl state name for UART peripheral"

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-11-26 11:36:42 +01:00
Erwan Gouriou ed5ea6022a boards: arm: stm32: add pinctrl state name for ethernet peripheral
Add the pinctrl state name (default) for the ethernet peripherals.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-11-26 11:36:42 +01:00
Erwan Gouriou 36204c3c80 boards: arm: stm32: add pinctrl state name for ADC peripheral
Add the pinctrl state name (default) for the ADC peripherals.
Changes performed based on the script proposed in
"boards: arm: stm32: add pinctrl state name for UART peripheral"

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-11-26 11:36:42 +01:00
Gerard Marull-Paretas 4b9c3d7134 boards: arm: stm32: add pinctrl state name for UART peripheral
Add the pinctrl state name (default) for the UART/USART/LPUART
peripherals. Changes performed using the following Python script run
from the repository root:

```
from pathlib import Path
import re

for fpath in Path(".").glob("boards/arm/**/*.dts"):
    lines = open(fpath).readlines()

    is_stm32 = False
    for line in lines:
        if "stm32" in line:
            is_stm32 = True
            break

    if not is_stm32:
        continue

    with open(fpath, "w") as f:
        for line in lines:
            f.write(line)

            m = re.match(r"(\s+)pinctrl-0.*us?art.*", line)
            if m:
                f.write(m.group(1) + "pinctrl-names = \"default\";\n")
```

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-26 11:36:42 +01:00
Gerard Marull-Paretas 070e2f0782 boards: arm: stm32: enable pinctrl driver
Enable the pin control driver on all STM32 based boards. The following
script has been used to do this task:

```
from pathlib import Path
import re

for fpath in Path(".").glob("boards/arm/**/*_defconfig"):
    lines = open(fpath).readlines()

    is_stm32 = False
    for line in lines:
        if "CONFIG_SOC_SERIES_STM32" in line:
            is_stm32 = True
            break

    if not is_stm32:
        continue

    lines += ["\n", "# enable pin controller\n", "CONFIG_PINCTRL=y\n"]

    with open(fpath, "w") as f:
        f.writelines(lines)
```

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-26 11:36:42 +01:00
Alexandre Bourdiol 877379fba4 boards: arm: stm32: move "st,prescaler" to timers instead of pwm
Prescaler was misplaced in pwm binding, instead of timers binding.
For example, TIM6/TIM7 doesn't have PWM capability,
but have a prescaler.
This change also prepares the introduction of timer based counter
(which requires prescaler at timer level)

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-11-16 09:55:30 -06:00
Johann Fischer e4f894788a boards: add zephyr_udc0 nodelabel to all boards with USB support
USB devicetree nodes in Zephyr have different names,
mostly derived from the designations in data sheets.
Add zephyr_udc0 (USB device controller) nodelabel to
specific USB node to allow generic USB sample to be build.

Follow up on commit b4242a8 ("boards: add USB node aliases")

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-08-19 16:56:54 +02:00
Alexandre Bourdiol 092ffa5d1e boards: arm: nucleo_h743zi: full Arduino SPI support
Full Arduino SPI support for nucleo_h743zi

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-06-29 11:32:15 -04:00
Erwan Gouriou 0d320b3d6b boards: stm32: Update pwm nodes after change of default "st,prescaler"
Since "st,prescaler" default value is now 0,
set the expected application value on board side.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-06-16 10:41:01 +02:00
Erwan Gouriou 3e6666d53d boards: nucleo_h743zi: Use dts for clocks configuration
Convert board to use of device tree for clocks configuration.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-05-04 13:57:41 -05:00
Jeremy Wood a3edc4213f boards: arm: Add usbotg_fs to nucleo_h743 and nucleo_h753.
* Add usbotg_fs to nucleo_h743 and nucleo_h753.
* Add usb_device support to docs and yaml.

Signed-off-by: Jeremy Wood <jeremy@bcdevices.com>
2021-03-29 13:42:46 -04:00
Harry Jiang e287fd7ab2 boards: nucleo_h743zi: Add the IWDG support
This patch enable the independent watchdog support for the
NUCLEO-H743ZI board.

Signed-off-by: Harry Jiang <explora26@gmail.com>
2021-02-17 16:19:21 -06:00
Gerard Marull-Paretas 3a786c6179 boards: arm: nucleo_h743zi: enable backup SRAM
Enable backup SRAM DT node and update documentation.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2021-02-15 08:04:24 -05:00
Nicolas VINCENT 8c70316187 board: fix led1 on nucleo_h743 platform
led1 is mapped on PE1 instead of PB7.
led color is yellow instead of blue.

Signed-off-by: Nicolas VINCENT <nicolas.vincent@vossloh.com>
2021-01-10 15:40:25 -05:00
Nicolas VINCENT f1a205093a boards: define flash partitions for nucleo_h743zi
Defines partitions that can be used by mcuboot on nucleo_h743zi board.
Please note that mcuboot is not yet supported on stm32 h7 family as the
write-block-size is greater than 8.

Signed-off-by: Nicolas VINCENT <nicolas.vincent@vossloh.com>
2020-12-14 16:47:05 +01:00
Anas Nashif 6bf01e6b10 Revert "boards: define flash partitions for nucleo_h743zi"
This reverts commit 7516d5846d.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-12-07 19:02:48 -05:00
Nicolas VINCENT 7516d5846d boards: define flash partitions for nucleo_h743zi
Defines partitions that can be used by mcuboot on nucleo_h743zi board.
Please note that mcuboot is not yet supported on stm32 h7 family as the
write-block-size is greater than 8.

Signed-off-by: Nicolas VINCENT <nicolas.vincent@vossloh.com>
2020-12-07 16:16:11 -05:00
Erwan Gouriou 348996fbe4 boards: nucleo_h743zi: Fix openocd configuration
Similar to what was done for other h7 based boards,
use 'connect_assert_srst' and fix init routine.

Fixes #29732

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-12-03 11:33:20 -05:00
Harry Jiang c37a0897f6 boards: nucleo_h743zi: Add SPI support
Add SPI1 support on the Arduino R3 connector

Signed-off-by: Harry Jiang <explora26@gmail.com>
2020-11-19 12:35:12 +01:00
Gerard Marull-Paretas 394c7d0bef boards: arm: update pwm signals on all STM32 based boards
Update PWM pinctrl signal names of all non-F1 STM32 boards.
`pwm` variant is not available anymore on non-F1 series.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-11-09 16:04:24 -06:00
Jeremy LOCHE d943d146c9 boards: nucleo_h743zi: enable ethernet support
Since STM32H7 series now have a working ethernet driver,
nucleo_h743zi ethernet can be enabled.

Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
2020-11-05 08:30:06 -06:00
Gerard Marull-Paretas ddd0a97206 boards: arm: nucleo_h743zi: add support for stm32cubeprogrammer runner
Add support for the recently introduced STM32CubeProgrammer runner.
Updated documentation to mention its availability as latest official
OpenOCD releases do not support H7 series.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-11-04 14:47:35 -06:00
Erwan Gouriou bf62ef172e boards: stm32: Remove pinmux.c files
Following migration of pinctrl configuration from pinmux.c files
to device tree and deprecation of pinctrl defines, remove
pinmux.c files when possible.
Additionally remove the CMakeLists.txt files when it makes sense.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-11-03 11:11:04 +01:00
Erwan Gouriou cb22d8ece7 boards: stm32: Convert boards I2C pins to devicetree
Get STM32 boards configuring I2C using device tree and
remove configuration from pinmux.c

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-14 11:14:15 -05:00
Martin Jäger cd908d9085 boards: arm: stm32: use DT for ADC pinmux
Use the new DT facilities to configure ADC pinmux on all boards with
STM32 MCUs currently supporting the ADC.

Signed-off-by: Martin Jäger <martin@libre.solar>
2020-10-14 07:15:12 -05:00
Gerard Marull-Paretas b2d24ce5bd boards: arm: nucleo_h743zi: use DT for PWM pinmux configuration
Use the new DT facilities to configure PWM pinmux on Nucleo H743Zi
board.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-10-07 12:27:37 -05:00
Jeremy LOCHE ee2c66a627 boards: nucleo_h743zi: Configure serial console pins using dt
usart3 pin configuration is now done through device tree.

Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
2020-10-02 08:36:57 -05:00
Erwan Gouriou 3ab5ac81ca boards: stm32: Turn hardware stack protection on by default
Enable HW stack protection by default on all STM32 when possible.
This excludes all series based on M0(FO) and M0+(G0/L0).
Also this is made only on boards with enabled MPU (SRAM > 64K).

Cf similar change on nRF boards: #28470

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-09-30 10:46:16 -05:00
Erwan Gouriou 8efd1d7767 boards/arm: Remove soc compatible from board compatible
There's no reason to add soc compatible at this level.


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-09-30 09:54:41 -05:00
Tomasz Bursztyka e18fcbba5a device: Const-ify all device driver instance pointers
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>
2020-09-02 13:48:13 +02:00
Alexandre Bourdiol 1d4cb620f4 boards: arm: nucleo_h743zi: add rng support
Add RNG support to nucleo_h743zi board.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2020-08-27 14:14:35 +02:00
Gerard Marull-Paretas 76f0d72e5d drivers: pwm: stm32: add support for polarity
Add support for the polarity flag in the STM32 PWM driver.

STM32 boards using PWM have been updated accordingly.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-06-19 15:18:50 +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