Commit graph

228 commits

Author SHA1 Message Date
Alexander Kozhinov 3ad1f91a80 drivers: pinumx: stm32: pinmux_stm32h7: added ethernet pins
added ethernet pins definition for stm32h7 SoC series

Signed-off-by: Alexander Kozhinov <AlexanderKozhinov@yandex.com>
2020-07-21 15:12:18 +02:00
Jeremy LOCHE 8344b8080b drivers: pinmux: corrected all USART6 alternate functions
Fixed AF for USART 6 on PC6/PC7 PG8/PG9/PG12/PG13/PG14/PG15
All RTS/CTS/RX/TX pins now have correct AF7 instead of wrong AF8.

Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
2020-07-13 11:53:12 +02:00
Jeremy LOCHE 695bd85b99 drivers: pinmux: stm32h7: fix incorrect PG9/PG14 usart6 AF
Fixes AF of PG9/PG14 for usart6. Must be AF7 instead of AF8

Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
2020-07-13 11:53:12 +02:00
Kwon Tae-young a4d5207675 drivers: pinmux: stm32f7: CAN, SPI, I2C pinmuxes added
All pinmux supporting CAN, SPI and I2C of F7 series are added.
Since the F7 series supports up to two CANs,
the pin names of CANs have been changed.

Several minor pinmux errors have also been fixed.
Sorted by Alternate function.

Signed-off-by: Kwon Tae-young <tykwon@m2i.co.kr>
2020-06-23 19:05:26 +02:00
Markus Becker 51d84c9eb4 drivers: pinmux: stm32: add PWM pinmux on PA3 for F4 series
Add PWM2 CH4 functionality on PA3 pin.

Signed-off-by: Markus Becker <markus.becker@tridonic.com>
2020-06-16 19:11:35 +02:00
Ilya Tagunov b899bbf9b9 soc: stm32l1: Enable DAC support
Enable STM32 DAC driver for STM32L1 series.

Signed-off-by: Ilya Tagunov <tagunil@gmail.com>
2020-06-12 11:06:44 +02:00
Andreas Sandberg aec341e677 boards: arm: b_l072z_lrwan1: Enable the USB controller
The STM32L072CZ MCU has a built-in USB device controller which is
supported by Zephyr's USB STM32 driver. The b_l072z_lrwan1 board has a
micro-USB connector that is wired to the MCU via two solder bridges
(SB15 and SB16) that need to be closed to connect the data lines.

Update the board documentation to describe the solder bridges and
enable the USB controller in the device tree.

Signed-off-by: Andreas Sandberg <andreas@sandberg.pp.se>
2020-06-11 13:11:59 -05:00
Dimitris Tassopoulos c2e9c1fa49 boards: nucleo_f401re: added pwm-led0
Added onboard led to the devicetree to be supported also with pwm-led0

Signed-off-by: Dimitris Tassopoulos <dimtass@gmail.com>
2020-06-11 10:58:58 +02:00
Kumar Gala a1b77fd589 zephyr: replace zephyr integer types with C99 types
git grep -l 'u\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/u\(8\|16\|32\|64\)_t/uint\1_t/g"
	git grep -l 's\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/s\(8\|16\|32\|64\)_t/int\1_t/g"

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-06-08 08:23:57 -05:00
Sahaj Sarup 351f39f9cd board: arm: Add Support For 96Boards Aerocore2
Changes:

- Added all required board files in /boards/arm/96b_aerocore2
- Modified pinmux for stm32f4

Most of the changes in this PR is based on reverse-engineering of the
PCB layout and following commits in the PX4 firmware repository for
the same board. The manufacturer does not provide and or generate
schematics and pinout tables for this board.

This PR includes almost all of the interfaces connected to the STM32
MCU, the only thing not included is the J9 and J8 headers that connect
to a 96Boards baseboard.
These headers are not vital to the functionality of the Aerocore2.

Signed-off-by: Sahaj Sarup <sahaj.sarup@linaro.org>
2020-05-08 07:33:43 -05:00
Helge Juul dc0c938359 boards: arm: stm32f746g_disco: enable sdmmc support
Update dtsi and pinmux macros for stm32f7 family. Add sdmmc1 to dts file
for stm32f746g_disco. Also add board specific configuration file for
fat_fs sample.

Signed-off-by: Helge Juul <helge@fastmail.com>
2020-05-08 10:53:10 +02:00
Anthony Brandon a71f77e601 boards: arm: stm32l496g_disco: enable sdmmc support
Update the dtsi for stm32l471 (which the higher SoCs are based on) to
support the stm32-sdmmc disk access device. Enable the device for the
stm32l496g_disco board, and update the pinmuxing.
Note that the stm32l496g_disco board also has a card detect gpio
(MFX_GPIO8), but this is not supported yet. When not specified the
driver will assume a card is present.

Signed-off-by: Anthony Brandon <anthony@amarulasolutions.com>
2020-05-08 10:53:10 +02:00
Erwan Gouriou 4b3d79f1bb drivers: stm32: Add pinmux headers for stm32l5
Copy/pasted from L4 series.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-05-08 00:34:34 -05:00
Gerard Marull-Paretas cfebfc188e drivers: adc: stm32: add support for H7 series
Add support for ADC on H7 series. Note that ADC1 and ADC2 share the same
register set, so it is added as "adc1_2".

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-05-07 23:01:59 -05:00
Francois Ramu 01e9983142 drivers: pinmux: stm32wb: use a pull-down for SPI SCK pin
Like stm32 L4 does,
when the STM32WBx SoC goes into STOP mode, the SPI device is disabled.
This cause the pins to not be drived anymore (i.e. they are floating)
except through their pull-up or pull-down.

From the logical point of view, the NSS pin is held high by a pull-up
so it's not a problem if the other pins are floating. However those pins
are floating input for the slaves, which increase their power
consumption.

The solution is to hold the state of the pins through a pull-up or a
pull-down. This is already done for the NSS and MOSI pins, but not for
SCK. Fix that by using pull-down on the SCK pin the same way it is
already done for the MOSI pin.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-05-07 23:00:32 -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
Martin Jäger e55483495e drivers: pinmux: stm32: Complete STM32F0 series
Fix some wrong assignments for SPI2 and add all other alternative
functions for USART, I2C, SPI and CAN according to STM32F091VC
datasheet, which is at the top end of this series.

https://www.st.com/resource/en/datasheet/stm32f091vc.pdf

Signed-off-by: Martin Jäger <martin@libre.solar>
2020-05-05 11:06:47 -05:00
Kwon Tae-young 84817f4906 drivers: pinmux: stm32l4: I2C_1, CAN pinmuxes added
Add pin configuration for I2C_1 and CAN.

Signed-off-by: Kwon Tae-young <tykwon@m2i.co.kr>
2020-04-24 06:36:35 -05:00
Aurelien Jarno 298df51c0c drivers: pinmux: stm32l4: Add extra pins for I2C1
Add I2C1 SDA/SCL configuration on pins PA9 and PA10, as they are
currently only available on other pins.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2020-04-22 17:39:12 +02:00
Martin Jäger 414527926d drivers: dac: Add support for STM32L0 series
First implementation for STM32L0 series MCUs to be used for testing.

Signed-off-by: Martin Jäger <martin@libre.solar>
2020-04-20 17:41:48 +02:00
Takumi Ando c2b2aad8ae soc: arm: stm32l1: Add UART4 and UART5 supports
Add UART4 and UART5 supports for STM32L1 series.

Signed-off-by: Takumi Ando <takumi@t15.red>
2020-04-20 15:54:22 +02:00
Aurelien Jarno 2a396561d4 drivers: pinmux: stm32l4: use a pull-down for SPI SCK pin
When the STM32L4x SoC goes into STOP mode, the SPI device is disabled.
This cause the pins to not be drived anymore (i.e. they are floating)
except through their pull-up or pull-down.

From the logical point of view, the NSS pin is held high by a pull-up
so it's not a problem if the other pins are floating. However those pins
are floating input for the slaves, which increase their power
consumption.

The solution is to hold the state of the pins through a pull-up or a
pull-down. This is already done for the NSS and MOSI pins, but not for
SCK. Fix that by using pull-down on the SCK pin the same way it is
already done for the MOSI pin.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2020-04-17 13:21:12 -05:00
Aurelien Jarno c695899e04 drivers: pinmux: stm32l4: use consistent config for SPI pins
Most of the MISO and MOSI SPI pins of STM32L4 SoCs are configured with
a pull-down except PE14 and PE15. Change them for consistency.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2020-04-17 13:21:12 -05:00
Abe Kohandel 5f3ed2660c drivers: pinmux: stm32: add pin for I2S3_WS on F4 series
Enable I2S3 WS functionality on PA15 pin

Signed-off-by: Abe Kohandel <abe@electronshepherds.com>
2020-04-08 12:07:14 -05:00
Gerard Marull-Paretas 4194360cb5 drivers: pwm: stm32: add support for H7 series
Enable PWM support for H7 series.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-04-04 15:00:11 +02:00
Francois Ramu 66fd31959c drivers: pinmux: stm32: add pin for UART5 on H7 series
Enable UART5 Rx and TX pins for H7 series:
H742, H743/753, H745/755, H747/757, H750.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-03-30 12:58:10 -05:00
Takumi Ando 8d106d198e drivers: adc: Add STM32L1X ADC support
Add ADC driver support for STM32L1X SoC series.

Signed-off-by: Takumi Ando <takumi@t15.red>
2020-03-19 03:10:39 -05:00
Gerard Marull-Paretas 39b1f6cbba drivers: i2c: stm32: add support for H7 series
Enable I2C driver for STM32 H7 series.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-03-18 15:48:48 -05:00
Gerard Marull-Paretas f2b9e5235f drivers: pinmux: stm32: fix PB6 LPUART1 alt function on H7
LPUART1 TX alternate function number for PB6 was not correct in the
pinmux settings for H7 series.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-03-18 15:48:48 -05:00
Francois Ramu 36ec040473 driver: pinmux: stm32f7 configure speed for SPI clock pins
This patch is setting the pin to very high speed for all
the SPI2 clock outputs, for the stm32f7 soc series.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-03-17 16:01:22 -05:00
Jukka Rissanen f53d9756be board: arm: black_f407ve: Initial support
Add support for black_f407ve board which is based on
stm32f407xx soc.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-03-12 20:18:39 +02:00
Richard Osterloh 8ccccbb7f6 drivers: pinmux: Add SPI1 NSS config on PA15
Add alternative function 5 configuration for PA15
on STM32F4 devices.

Signed-off-by: Richard Osterloh <richard.osterloh@gmail.com>
2020-03-11 13:06:55 -05:00
Ivo Clarysse 29d2a438ab drivers: pinmux: stm32f4: add CAN_2 pins
Add pinmux definitions for CAN_2 RX/TX pins on PB5/PB6 and PB12/PB13.

Signed-off-by: Ivo Clarysse <ivo@bcdevices.com>
2020-01-30 14:27:28 -05:00
Henrik Brix Andersen 0b15a836a5 drivers: pinmux: stm32f3: add CAN_1 pins
Add pinmux definitions for CAN_1 RX/TX pins on PD0/PD1.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-01-29 09:47:27 +01:00
Peter Bigot 0b0d2e640b treewide: use full path to clock_control/stm32_clock_control.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
Pushpal Sidhu 74f9c23ac6 pinmux: stm32: l4: Make SPI SCK and MOSI pins Very High Speed
Ensure that the SPI SCK and MOSI pins are set to very high as slower
SPI speeds will cause device hangs when used. This is due to the state
changing too fast for hardware, causing RXE to never fire and thus
hang.

Signed-off-by: Pushpal Sidhu <psidhu.devel@gmail.com>
2020-01-17 06:47:20 -06:00
Filip Brozovic 19d1ea2646 boards: stm32g0316-disco: add support for the ST STM32G0316-DISCO board
Add support for the ST STM32G0316-DISCO development board. This board
features an ST STM32G031J6 MCU on a breakable SO8 to DIL8 module, a user
LED and a button.

Signed-off-by: Filip Brozovic <fbrozovic@gmail.com>
2019-12-18 22:06:39 +01:00
Pauli Salmenrinne ca6eee5444 boards: stm32f411e_disco: Add pwm to drive green led
This enables the fade_led example to work with this board.

Signed-off-by: Pauli Salmenrinne <susundberg@gmail.com>
2019-12-18 14:48:06 -06:00
Sahaj Sarup d072ab83ac arm: 96b_stm32_sensor_mez: spi: Enable SPI4
This patch enables SPI4 on the 96Boards STM32 Sensors Mezzanine.
SPI4 has been broken out to a Grove Connector on the board.

Changes:

- Updated board dts to enable spi4
- Updated board Kconfig
- Updated board documentation
- Update board pinmux
- Updated stm32f4 pinmux header file
- Updated stm32f401 dtsi
- Updated stm32f4 defconfig to enable PORTE GPIO
- Added board to spi_loopback test

Test: spi_loopback test passed

Signed-off-by: Sahaj Sarup <sahaj.sarup@linaro.org>
2019-12-18 07:34:37 -06:00
Martin Jaeger 5441016f66 drivers: pinmux: stm32l0: More I2C pinmuxes added
Based on alternate functions table in STM32L073 datasheet

Signed-off-by: Martin Jaeger <17674105+martinjaeger@users.noreply.github.com>
2019-12-09 09:48:23 -06:00
Alexander Wachter c180e059bf soc: stm32f103Xb: Enable CAN support for this SoC
This commit enables CAN on the STM32F103Xb SoC series.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-11-13 10:30:19 -06:00
Karl Palsson e3fdf47b85 pinmux: stm32l1: add spi2 pins
SPI1 pins were already included, add SPI2.

Signed-off-by: Karl Palsson <karlp@etactica.com>
2019-10-16 14:42:54 -05:00
Richard Osterloh b0ecf0fec3 drivers: pinmux: Add STM32G4X pinmux support
Add pinmux support for STM32G4X SoC series.

Signed-off-by: Richard Osterloh <richard.osterloh@gmail.com>
2019-10-04 18:44:24 -07:00
Armando Visconti 3f72c4262c drivers: pinmux: stm32l4x: Add missing SPI macros
This commit adds:

 1. pin definitions for SPI1 on PE12-15 on STM32L4 devices
 2. SPI3 on PA15_SPI3_NSS

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-09-19 09:47:45 -05:00
Erwin Rol efa44b1885 arm: stm32f4: Add CAN1 support
Add CAN1 pinmux definitions and DT entries for STM32F4 series.

Signed-off-by: Erwin Rol <erwin@erwinrol.com>
2019-09-19 08:52:53 -05:00
Pavlo Hamov 97e1ad1b8c boards: stm32f429i_disc1: add SPI5 support
Add support of RCC configuration.
Add pinmux items

Signed-off-by: Pavlo Hamov <pavlo_hamov@jabil.com>
2019-09-18 06:43:47 -05:00
Erwan Gouriou 90df6a3291 drivers/pinmux: stm32: Use pull-up for _SPI_NSS pins
To work efficiently, SPI_NSS pins require pull-up configuration.
Fix this for whole STM32 series.

Fixes #17998

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-09-10 06:39:50 -05:00
Yaël Boutreux 3a967f92c3 soc: arm: st_stm32: stm32mp1: Add SPI support
Add SPI support for STM32MP1x SoC.

Signed-off-by: Yaël Boutreux <yael.boutreux@st.com>
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@st.com>
2019-08-05 13:52:34 -05:00
Ioannis Konstantelias dca08c95dd stm32: pinmux: spi: Opt for lower power consumption
Fixes #16739. Changed the STM32's SPI MISO/MOSI configurations in order
to reduce the power consumption by approximately 20uA per pin.

According to STM32's Application Notes on GPIO configuration for
low-power consumption, the input pins should be configured with internal
pull-up or pull-down resistor. If a pin is configured as a floating
input, and there is no signal present, the Schmitt trigger randomly
toggles between the logical levels induced by the external noise, thus
increasing the consumption.

Signed-off-by: Ioannis Konstantelias <ikonstadel@gmail.com>
2019-08-01 11:52:31 -04:00
Findlay Feng 3bc7d9e50e drivers: spi: Fix spi related files of stm32f1x
pinmux: Add the relevant definition of the spi3 pin
dts: Fix a bug, spi3 does not have a label
soc: Supplement spi3 related definition

Signed-off-by: Findlay Feng <i@fengch.me>
2019-07-31 14:26:50 -05:00