Commit Graph

271 Commits

Author SHA1 Message Date
Gerard Marull-Paretas f0e1139812 readme: update pinctrl instructions
Update pinctrl instructions to cover STM32 Open Pin Data changes.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-12-03 08:39:09 -06:00
Gerard Marull-Paretas 7bd7d8e49a dts: generate with STM32 open pin data
Re-generate pinctrl files using STM32 open pin data. No changes are
present since data is based on the same CubeMX version.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-12-03 08:39:09 -06:00
Gerard Marull-Paretas 79a847bf2b scripts: tests: update genpinctrl tests
Update genpinctrl unit tests to match latest changes.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-12-03 08:39:09 -06:00
Gerard Marull-Paretas cfa91174ff scripts: genpinctrl: use STM32 open pin data
Change script to require STM32 Open Pin Data as input. README file is
now autogenerated so that it will always include the STM32 Open Pin Data
commit used for generation.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-12-03 08:39:09 -06:00
Gerard Marull-Paretas c8e88fd73e dts: update pinctrl files to latest cubemx
Update pinctrl files based on CubeMX 6.1.0 release.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-11-23 08:48:33 -06:00
Gerard Marull-Paretas 77b7692fac scripts: genpinctrl: remove fmc mode
Mode is not required now, and in this case it causes mode detection
problems when specified.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-11-23 08:48:33 -06:00
Gerard Marull-Paretas 87c1cd3167 dts: update files with FMC signals
Add generated FMC peripheral signals.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-11-23 11:39:45 +01:00
Gerard Marull-Paretas e999fb82f4 scripts: genpinctrl: add configuration for FMC signals
Add Flexible Memory Controller (FMC) signals. Only available on some
non-F1 series.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-11-23 11:39:45 +01:00
Erwan Gouriou fadf64171c dts: New set of -pinctrl.dtsi with "additional functions"
This new set of files includes "additional functions"
analog signals as defined in reference manuals.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-11-06 06:33:37 -06:00
Erwan Gouriou df82a758cb scripts/tests: Update tests following new algo
It is now possible that mode is not provided for non-F1 series
configs.
On F1 series ADC1_IN0 could be af 0.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-11-06 06:33:37 -06:00
Erwan Gouriou 0f855853fe scripts/genpinctrl: Remove mode for default (non-F1) config
Due to inference of mode for default configurations, mode
should not be set unless it specifies a specific signal variant.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-11-06 06:33:37 -06:00
Erwan Gouriou 634a286b27 scripts/genpinctrl: Add generation of additional functions
For non-F1 series:
Add generation of additional functions by inferring mode based
on AF detection instead of the mode value filed in config file.
This allows to detect that a signal should use 'analog' mode
when no AF function is associated to it.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-11-06 06:33:37 -06:00
Alexandre Bourdiol 4304374c39 scripts: serie_update.py: add systematic compilation of '_hal_rcc_ex.c'
Add systematic compialtion of '..._hal_rcc_ex.c' in 'CMakeLists.txt'
generation. There is more and more dependence of HAL IP to
'..._hal_rcc_ex.c'

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2020-11-05 22:06:47 -06:00
Alexandre Bourdiol 00ba06a3c7 scripts: fully redesign STM32Cube update scripts
Define class Stm32SerieUpdate
Use Pathlib instead of os.path
Add CLI option to provide directory path where to clone
STM32Cube repo (-r <repo_path>)
Reformat README.rst
Add *.pyc to .gitignore
Refactor variable naming (mainly paths),
* to be fully compilant with PEP8
* to be more understandable
* to simplify maintenance
Usage changed. Basic usage:
* update a single serie:
  'python3 update_stm32_package.py -s <stm32_serie>'
* update all serie at once:
  'python3 update_stm32_package.py

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2020-11-05 22:06:47 -06:00
Gerard Marull-Paretas a07d3af971 readme: update LL API usage instructions
Reference the newly introduced generic LL headers.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-11-05 22:00:15 -06:00
Gerard Marull-Paretas 83a33ab973 scripts: genllheaders: add test to check generated headers
Add a test to check that generated output is correct.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-11-05 22:00:15 -06:00
Gerard Marull-Paretas 4925a4f84f stm32cube: initial batch of generic LL headers
Initial batch of auto-generated generic LL headers.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-11-05 22:00:15 -06:00
Gerard Marull-Paretas 7827cf1b6c scripts: genllheaders: add script to generate common LL headers
The script is able to generate common LL headers which can be used in
both Zephyr and applications to make it easier to create family
independent code.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-11-05 22:00:15 -06:00
Gerard Marull-Paretas 80cd7b0d95 dts: update with removed pwm variant on non-F1 series
Updated files with the removed PWM variant on non-F1 series.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-11-03 02:58:37 -06:00
Gerard Marull-Paretas fb17cc5b42 scripts: genpinctrl: remove pwm variant for timer channels
STM32 timers are multi-purpose peripherals ranging from PWM, Input
capture, encoder, HALL sensor... In all series except F1 the timer pins
will always be configured in the same mode, i.e. alternate. So using a
variant for each functionality is not necessary. When working with F1
series mode is still required because the pin may operate in either
alternate or input mode depending on the assigned functionality.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-11-03 02:58:37 -06:00
Gerard Marull-Paretas a0267470e7 scripts: genpinctrl: provide path defaults
Provide script path defaults for CubeMX and output path.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-10-27 08:11:31 -05:00
Gerard Marull-Paretas 162f34b99a scripts: genpinctrl: use pathlib
Use pathlib facilities to improve path handling.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-10-27 08:11:31 -05:00
Erwan Gouriou 49580dd1c8 dts/st: Added SDMMC signals
New batch of -pinctrl.dtsi file that include SDMMC signals

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-27 08:11:12 -05:00
Erwan Gouriou bedf4f7704 scripts/genpinctrl: Add SDMMC pins configuration
Add config for SDMMC signals generation.
Not available on F1 series.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-27 08:11:12 -05:00
Erwan Gouriou 3486cf79f8 dts/st: New batch of signals with very-high-speed I2S CK
Aim is to fit with existing c defined signals

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-27 08:07:15 -05:00
Erwan Gouriou 114ede9e9c script/genpinctrl: Update I2S signals
To be in line with existing c defined I2S signals,
set i2s_ck slew-rate to very-high-speed.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-27 08:07:15 -05:00
Alexandre Bourdiol 1e5111a2c1 stm32cube:add systematic compilation of '_hal_rcc_ex.c'
Add systematic compialtion of '..._hal_rcc_ex.c' in 'CMakeLists.txt'
generation. There is more and more dependence of HAL IP to
'..._hal_rcc_ex.c'

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2020-10-27 08:03:47 -05:00
Alexandre Bourdiol 4fe4e7b09d stm32cube: stm32wbxx: remove i2s references from stm32wbxx_hal_conf.h
Remove i2s references from stm32wbxx_hal_conf.h
which prevent compilation, as there is no i2s in this STM32WB

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2020-10-27 08:03:47 -05:00
Alexandre Bourdiol 1c1f545f1b stm32cube: update stm32wb to version V1.9.0
Update Cube version for STM32WBxx series
on https://github.com/STMicroelectronics
from version v1.5.0
to version v1.9.0

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2020-10-27 08:03:47 -05:00
Alexandre Bourdiol 42f59d7473 stm32cube: update stm32l5 to version V1.3.1
Update Cube version for STM32L5xx series
on https://github.com/STMicroelectronics
from version v1.2.0
to version v1.3.1

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2020-10-27 08:03:47 -05:00
Alexandre Bourdiol 7b0b62ab61 stm32cube: update stm32l4 to version V1.16.0
Update Cube version for STM32L4xx series
on https://github.com/STMicroelectronics
from version v1.15.1
to version v1.16.0

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2020-10-27 08:03:47 -05:00
Alexandre Bourdiol 759099069b stm32cube: update stm32l0 to version V1.11.3
Update Cube version for STM32L0xx series
on https://github.com/STMicroelectronics
from version v1.11.2
to version v1.11.3

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2020-10-27 08:03:47 -05:00
Alexandre Bourdiol 50002e0bc4 stm32cube: update stm32h7 to version V1.8.0
Update Cube version for STM32H7xx series
on https://github.com/STMicroelectronics
from version v1.6.0
to version v1.8.0

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2020-10-27 08:03:47 -05:00
Alexandre Bourdiol 4663d414a5 stm32cube: update stm32g4 to version V1.3.0
Update Cube version for STM32G4xx series
on https://github.com/STMicroelectronics
from version v1.2.0
to version v1.3.0

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2020-10-27 08:03:47 -05:00
Alexandre Bourdiol 0ac0370bec stm32cube: update stm32f7 to version V1.16.0
Update Cube version for STM32F7xx series
on https://github.com/STMicroelectronics
from version v1.15.0
to version v1.16.0

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2020-10-27 08:03:47 -05:00
Alexandre Bourdiol 0db82e1ca1 stm32cube: update stm32f4 to version V1.25.1
Update Cube version for STM32F4xx series
on https://github.com/STMicroelectronics
from version v1.25.0
to version v1.25.1

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2020-10-27 08:03:47 -05:00
Alexandre Bourdiol 91c59251aa stm32cube: update stm32f3 to version V1.11.1
Update Cube version for STM32F3xx series
on https://github.com/STMicroelectronics
from version v1.11.0
to version v1.11.1

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2020-10-27 08:03:47 -05:00
Alexandre Bourdiol fe147dd6aa stm32cube: update stm32f2 to version V1.9.1
Update Cube version for STM32F2xx series
on https://github.com/STMicroelectronics
from version v1.9.0
to version v1.9.1

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2020-10-27 08:03:47 -05:00
Alexandre Bourdiol 1a68ea080a stm32cube: update stm32f1 to version V1.8.2
Update Cube version for STM32F1xx series
on https://github.com/STMicroelectronics
from version v1.8.0
to version v1.8.2

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2020-10-27 08:03:47 -05:00
Alexandre Bourdiol 1473cb6b39 stm32cube: update stm32f0 to version V1.11.1
Update Cube version for STM32F0xx series
on https://github.com/STMicroelectronics
from version v1.11.0
to version v1.11.1

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2020-10-27 08:03:47 -05:00
Gerard Marull-Paretas b89843e2f0 dts: add ethernet entries
Add generated entries for ethernet peripheral pins.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-10-22 07:46:04 -05:00
Gerard Marull-Paretas d8ae28c900 scripts: genpinctrl: add support for ethernet pins
Add support for ethernet pins.

F1 settings taken from RM0008 Rev 20, Table 209.
Other series settings are taken from current Zephyr settings. Note that
they will likely need to be adjusted, as very-high-speed is not needed
for all signals.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-10-22 07:46:04 -05:00
Erwan Gouriou 2b123553b8 dts/st: New batch of -pinctrl.dtsi files including (alt) USB signals
Includes following signals:
F1: USB DM/DP, USB_OTG_FS DM/DP/SOF/ID/VBUS
Others: USB DM/DP/NOE, USB_OTG_FS DM/DP/SOF/ID/VBUS
USB_OTG_HS DM/DP/SOF/ID/VBUS and DIR/STP/NXT/D[0-7]

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-22 07:44:36 -05:00
Erwan Gouriou b861dc701d scripts/genpinctrl: Add config for USB signals generation
Includes USB, OTG_FS and OTG_HS various signals.
This only concerns signals that are configured using alternate.
Signals requiring analog configuration are left a part for now on.
This could lead to situations where only USB_NOE signals are
available on some SoCs (other signals will require a script update
to be generated).


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-22 07:44:36 -05:00
Gerard Marull-Paretas 8895167f75 dts: add missing remaps to F1 series
Some remaps were missing due to an issue with genpinctrl.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-10-14 07:06:14 -05:00
Gerard Marull-Paretas 7beab819d1 scripts: genpinctrl: process all remap blocks
Only first remap block was being processed, take into account all of
them now. Note that ``FULL_REMAP`` has been adjusted to ``REMAP_FULL``
as it was wrong. Tests updated to cover multiple remap cases.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-10-14 07:06:14 -05:00
Gerard Marull-Paretas 6742cc8da8 dts: update f1 pinctrl files with entries missing from IP files
Add F1 series configurations from pins missing in the GPIO IP
configuration files.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-10-14 07:06:14 -05:00
Gerard Marull-Paretas 19256b48c0 scripts: genpinctrl: fix F1 generation for pins not in IP file
When working with F1 series pins not present in the GPIO IP files need
to be taken into account with the NO_REMAP setting.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-10-14 07:06:14 -05:00
Erwan Gouriou 3efa11b3f2 scripts/genpinctrl: Don't clean up README when generating
Now that dts contain a README file, don't clean up the entire
directory but only sub directories.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-09 08:24:11 -05:00
Erwan Gouriou 44f4b9cee2 scripts: Provide more specific name to config*.yaml files
config*.yaml file name is a bit vague.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-09 08:24:11 -05:00