Commit Graph

1056167 Commits

Author SHA1 Message Date
c482328ed5 arch:arm enable xfrm feature 2025-07-08 21:23:28 +08:00
658a6b7a76 arm: config: remove unsupport option 2025-03-19 21:45:35 +08:00
56021ad257 arm:config enable netfilter netlink option 2025-03-12 20:39:03 +08:00
da7d08ef4e driver: add Lierda NR90 5G module 2024-05-22 10:45:16 +08:00
ced3ab1c20 driver:phy configure led state 2024-05-22 10:45:16 +08:00
9966461848 arm:dts enable gpio watchdog 2024-05-22 10:45:16 +08:00
cc3792e44c driver:usb add Quectel EC200A module 2023-10-30 15:56:09 +08:00
17b6044099 arm:dts disable rts of serial 2023-10-10 20:03:25 +08:00
7fb4e1bb72 driver:usb add RG200U 5G module 2023-07-04 15:11:46 +08:00
94b2e0328a driver:net merger motorcom driver 2023-07-04 15:10:56 +08:00
1aafc35ee6 Add defconfig for stm32mp1 gateway 2023-07-04 15:10:37 +08:00
a5e86672a3 Add dts for stm32mp13 gateway 2023-07-04 15:09:14 +08:00
661e4b11da gpiolib: allow line names from device props to override driver names
Some GPIO providers set names for GPIO lines that match the names of
the pins on the SoC, or variations on that theme. These names are
generic more often that not, such as pioC12 in the at91 case. These
generic names block the possibility to set more useful GPIO line
names with device properties (i.e. gpio-line-names).

Allow overriding a generic name given by the GPIO driver if there is
a name given to the GPIO line using device properties, but leave the
generic name alone if no better name is available.

However, there is a risk. If user space is depending on the above
mentioned fixed GPIO names, AND there are device properties that
previously did not reach the surface, the name change might cause
regressions. But hopefully this stays below the radar...

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Tested-by: Alexander Dahl <ada@thorsis.com>
Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Signed-off-by: Valentin Caron <valentin.caron@foss.st.com>
Change-Id: I26f7f2e1dcc49a7496da0d36ee526a4594189890
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/271951
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
Reviewed-by: Amelie DELAUNAY <amelie.delaunay@foss.st.com>
Reviewed-by: Antonio Maria BORNEO <antonio.borneo@st.com>
Reviewed-by: Eric FOURMONT <eric.fourmont-ext@st.com>
Domain-Review: Amelie DELAUNAY <amelie.delaunay@foss.st.com>
v5.15-stm32mp-r2
2022-10-26 10:41:24 +02:00
8a71c8c31b pinctrl: stm32: set default gpio line names using pin names
Add stm32_pctrl_get_desc_pin_from_gpio function to find a stm32 pin
descriptor which is matching with a gpio.
Most of the time pin number is equal to pin index in array. So the first
part of the function is useful to speed up.

And during gpio bank register, we set default gpio names with pin names.

Signed-off-by: Valentin Caron <valentin.caron@foss.st.com>
Change-Id: I4bf65ae77cc3f01d2e81c3944d3be69f00f70aff
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/271696
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
Reviewed-by: Antonio Maria BORNEO <antonio.borneo@st.com>
Reviewed-by: Amelie DELAUNAY <amelie.delaunay@foss.st.com>
Reviewed-by: Eric FOURMONT <eric.fourmont-ext@st.com>
Domain-Review: Amelie DELAUNAY <amelie.delaunay@foss.st.com>
2022-10-26 10:41:24 +02:00
7f29f81666 serial: stm32: Clear prev values before setting RTS delays
The code lacks clearing of previous DEAT/DEDT values. Thus, changing
values on the fly results in garbage delays tending towards the maximum
value as more and more bits are ORed together. (Leaving RS485 mode
would have cleared the old values though).

Fixes: 1bcda09d29 ("serial: stm32: add support for RS485 hardware control mode")
Cc: stable@kernel.org
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20220627150753.34510-1-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Valentin Caron <valentin.caron@foss.st.com>
Change-Id: I2f1f2c0675180f65c524948a9103d03abf8f4ee8
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/272029
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
Reviewed-by: Eric FOURMONT <eric.fourmont-ext@st.com>
Domain-Review: Amelie DELAUNAY <amelie.delaunay@foss.st.com>
2022-10-26 10:41:24 +02:00
ef0c423932 clk: stm32mp13: SPIx clocks are missing
These clocks are needed for I2S.

Change-Id: I3b8e50cf54e7725435ebc2f6341835a2e970b84f
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/271638
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
Reviewed-by: Eric FOURMONT <eric.fourmont-ext@st.com>
Domain-Review: Alexandre TORGUE <alexandre.torgue@foss.st.com>
2022-10-26 10:41:24 +02:00
f73d7c0713 dt-bindings: clk: stm32mp13: SPIx bus clocks are missing
Add SPI1, SPI2, SPI3, SPI4, SPI5 bus clocks.

Change-Id: I55049c3a27d3698cf300fd86f5691161684b94ce
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/271637
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
Reviewed-by: Eric FOURMONT <eric.fourmont-ext@st.com>
Domain-Review: Alexandre TORGUE <alexandre.torgue@foss.st.com>
2022-10-26 10:41:24 +02:00
dc13279705 reset: stm32mp1: implement reset_control_reset() command.
Add reset timing in match data structure for MP13.

Change-Id: Ie0138deff786900dc97f781a97a1ce8a2ab00399
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/269015
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
Reviewed-by: Eric FOURMONT <eric.fourmont-ext@st.com>
Domain-Review: Alexandre TORGUE <alexandre.torgue@foss.st.com>
2022-10-12 10:50:21 +02:00
2dbf75603c reset: stm32: implement reset_control_reset() command.
This command execute and assert + reset delay + deassert + check if
deassert is ok.
In a driver we can replace these lines
   reset_control_assert(reset);
   reset_control_deassert(reset);
by
   reset_control_reset(reset);

Change-Id: I7852084b78a641ae1ff7e1c7c954af0d3b2e1538
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/234580
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Alexandre TORGUE <alexandre.torgue@foss.st.com>
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/269014
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
Reviewed-by: Eric FOURMONT <eric.fourmont-ext@st.com>
Domain-Review: Alexandre TORGUE <alexandre.torgue@foss.st.com>
2022-10-12 10:50:21 +02:00
0757948541 ARM: dts: stm32: fix eth1 and eth2 support on stm32mp13
Both instances ethernet based on GMAC SNPS IP on stm32mp13,
Ethernet1 is on RMII mode with quartz
Ethernet2 is on RMII mode without quartz

Signed-off-by: Christophe Roullier <christophe.roullier@st.com>
Change-Id: I2d1a85ecbcd2cd25dbedaf995b86c3e02a7b0c40
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/268924
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
Reviewed-by: Eric FOURMONT <eric.fourmont-ext@st.com>
Domain-Review: Alexandre TORGUE <alexandre.torgue@foss.st.com>
2022-10-12 10:50:21 +02:00
395dc02eaa iio: adc: stm32: fix oversampling applicability and initial value
The oversampling ratio is shared by all channels, no matter the type
(e.g. single ended or differential). Currently two attributes are
declared for each type:
- in_voltage-voltage_oversampling_ratio
  in_voltage-voltage_oversampling_ratio_available
- in_voltage_oversampling_ratio
  in_voltage_oversampling_ratio_available
Use the "info_mask_shared_by_all" instead of "info_mask_shared_by_type".

Initial value reported after probe is '0' which isn't a valid ratio.
(it should be at least 1 by default, e.g. no oversampling). Fix it by
storing the oversampling index in the array, instead of its value in
adc struct. This fixes the initial condition.

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Change-Id: Ibb015e32522be01b94d05fd01896ad77fbc31540
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/269087
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
Reviewed-by: Olivier MOYSAN <olivier.moysan@foss.st.com>
Reviewed-by: Eric FOURMONT <eric.fourmont-ext@st.com>
2022-10-12 10:46:00 +02:00
ede21c17fa SECURITY: add security guide to STMicroelectronics/linux repository
Add security guide to STMicroelectronics/linux repository.

Change-Id: I870e05acc5cc61e873dadef0428e551946159868
Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/269089
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
Reviewed-by: Eric FOURMONT <eric.fourmont-ext@st.com>
2022-10-12 10:46:00 +02:00
f2eb34078c CONTRIBUTING: add contributing guide to STMicroelectronics/linux repository
Add contributing guide to STMicroelectronics/linux repository.

Change-Id: Iab6814410323b74633d6146052557fe2ff438423
Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/269088
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
Reviewed-by: Eric FOURMONT <eric.fourmont-ext@st.com>
2022-10-12 10:46:00 +02:00
b45df948b6 ARM: dts: stm32: remove stm32mp135d-dk support
STM32MP13 DK with non-crypto SoC won't be produced.
Remove its support.

Change-Id: Ide4ee02eb58a1622f3a9200bd425f2fa58af518a
Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/266807
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
Reviewed-by: Eric FOURMONT <eric.fourmont-ext@st.com>
2022-10-12 10:46:00 +02:00
882a3964cd ARM: dts: build stm32mp157d-dk1 examples dtb with symbols
Add new 157d-dk1 A7 and M4 examples.

Change-Id: I77b158c62f4a8c3503a2ca0d695e39540228f3d4
Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/266077
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
2022-10-12 10:46:00 +02:00
f6aaeab3fd i2c: stm32: simplify status messages in case of errors
Avoid usage of __func__ when reporting an error message
since dev_err or dev_dbg is already providing enough
details to identify the source of the message.

Change-Id: I84898f71890cf690bcd64b0f74524127d501f2c9
Signed-off-by: Alain VOLMAT <alain.volmat@foss.st.com>
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/230599
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Amelie DELAUNAY <amelie.delaunay@foss.st.com>
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/266177
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
2022-10-12 10:46:00 +02:00
67a6f7358a ARM: dts: stm32: Add passive cooling to stm32mp131
Add passive cooling to the CPU of stm32mp13.
Limit the CPU frequency to step 1 in case of temperatur over 95 degrees.

Signed-off-by: Pascal Paillet <p.paillet@st.com>
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/266081
Change-Id: Ia0c3a93199255e83da8eaa193a0fbd01983ddd98
2022-10-12 10:46:00 +02:00
ae0f8e7acf net: phy: Deactivate WARN in mdio_bus_phy_resume()
NOT_UPSTREAMABLE only avoid verbose message for valid purpose.
And found why in some cases this warning is displayed
(almost 80% of cases)

Signed-off-by: Christophe Roullier <christophe.roullier@st.com>
Change-Id: I3c6865ebddd2d6954832c352d538e9ea94ad35a0
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/266290
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Eric FOURMONT <eric.fourmont-ext@st.com>
2022-10-12 10:46:00 +02:00
c34684f2fc i2c: stm32f7: perform most of irq job in threaded handler
The irq handling is currently split between the irq handler
and the threaded irq handler.  Some of the handling (such as
dma related stuffs) done within the irq handler might sleep or
take some time leading to issues if the kernel is built with
realtime constraints.  In order to fix that, perform an overall
rework to perform most of the job within the threaded handler
and only keep fifo access in the non threaded handler.

Change-Id: I24740c22cacdd143b7036689de1f18353bfa9edb
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/265551
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
Reviewed-by: Amelie DELAUNAY <amelie.delaunay@foss.st.com>
2022-10-12 10:46:00 +02:00
0b9b960165 ARM: dts: stm32: add M4 and A7 examples dts files for stm32mp157d-dk1
NOT_UPSTREAMABLE

This commit adds new files to be able to run either Linux examples or
M4 examples on DK1 board.

Change-Id: Ic7db64f7b53d3da093cb91843b17087dba3b697a
Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/266074
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
2022-10-12 10:46:00 +02:00
c300669bf1 serial: stm32: add support of break control routine
Add support of break control routine to stm32 serial driver.

Signed-off-by: Erwan Le Ray <erwan.leray@foss.st.com>
Signed-off-by: Valentin Caron <valentin.caron@foss.st.com>
Change-Id: I745f35b4c0b8807d018e5a7ab339140873ea33e0
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/264710
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
Reviewed-by: Amelie DELAUNAY <amelie.delaunay@foss.st.com>
2022-10-12 10:46:00 +02:00
acde4ed2f1 usb: typec: ucsi: improve the get current cam error message
The "Get Current Connector Alternate Mode" command is optional. The PPM
will set the "Not Supported Indicator" flag in the command status, if it
isn't supported (-EOPNOTSUPP error is reported by ucsi_exec_command()).

As this command is optional, this case shouldn't be treated as an error:
- Improve the error message to display the error code.
- Turn the not supported case into a dev_dbg instead of a dev_err.

Note: This error message is no longer seen upstream, after:
commit b9aa02ca39 ("usb: typec: ucsi: Add polling mechanism for partner
tasks like alt mode checking")

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Change-Id: Id7fcb5477775b90508790064d0572d310e5db5e8
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/265182
Reviewed-by: Amelie DELAUNAY <amelie.delaunay@foss.st.com>
2022-10-12 10:46:00 +02:00
4904eaca17 usb: typec: ucsi: stm32g0: don't disabke wakeup by default
When the "wakeup-source" flag is found, I2C core marks the device as
wakeup capable and enables the wakeup by default.
Up to now, choice was being made to disable the wakeup by default. Goal was
to simplify the user application, to be able to reach lowest possible
power state by default (standby) on stm32mp135f-dk board.
User had to specifically re-enable the type-c wakeup if needed.
Since the PWR IRQ and wakeup capability is now implemented by the secure
and non-secure side, the standby mode can be reached by default.
So, remove earlier limitation, which was hacky behing "ucsi" and "psy"
frameworks.

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Change-Id: If2593b0d440c97d1e0cbe9da435f17b6e63da547
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/265107
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Alexandre TORGUE <alexandre.torgue@foss.st.com>
2022-10-12 10:46:00 +02:00
b23d8bb0fc tee: optee: flag the irq chip to skip irq_set_wake
OPTEE asynchronous notifications doesn't support the set_wake option
currently.
In case a device is using the optee irq and is marked as wakeup source,
this result in "Unbalanced IRQ xx wake disable" backtrace, since:
- in irq_set_irq_wake(ON), wake_depth gets incremented, then reset due to
  set_irq_wake_real() returns an error (irq_set_wake() isn't unimplemented)
- in irq_set_irq_wake(OFF), wake_depth is always 0, hence the warning
So flag the OPTEE irq_chip to skip set_wake.

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Change-Id: Ieea3acbd2aed15bcdc66fb21e8e71ef5f9b24aa3
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/265106
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Pascal PAILLET <p.paillet@st.com>
Reviewed-by: Alexandre TORGUE <alexandre.torgue@foss.st.com>
Reviewed-by: Gatien CHEVALLIER <gatien.chevallier@st.com>
Reviewed-by: Etienne CARRIERE <etienne.carriere@foss.st.com>
2022-10-12 10:46:00 +02:00
63697dccb1 ARM: dts: stm32: adopt wakeup pin for stm32g0 typec in stm32mp135f-dk
USB Type-c controller (stm32g0) has an interrupt pin wired to a
STM32MP13 PWR wakeup pin on DK board. It can be used as a wakeup source,
to wakeup the system from standby mode, when changes are identified on the
Type-c connector.
All is configured in OPTEE, adopt it.

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Change-Id: I23380dccb337665e06edc1c8d14caf58549efbc9
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/260811
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Alexandre TORGUE <alexandre.torgue@foss.st.com>
2022-10-12 10:46:00 +02:00
1d9ee6aa7c phy: stm32-usbphyc: fix wakeup irq probe deferral
The return code isn't set to the real error code returned by of_irq_get().
In case it returns -EPROBE_DEFER, currently the probe will likely return
zero, preventing later retries. The PHYs will never get registered.

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Change-Id: Ib92f49c4fea9cc61675d838d4f1e12a3cc2d6d3f
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/261448
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Amelie DELAUNAY <amelie.delaunay@foss.st.com>
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
2022-10-12 10:46:00 +02:00
2d760de2d0 spi: stm32: make SPI_MASTER_MUST_TX flags only specific to STM32F4
Commit 61367d0b8f ("spi: stm32: Add 'SPI_SIMPLEX_RX', 'SPI_3WIRE_RX' support for stm32f4")
allowed to properly communicate with the st-gyro-spi even when
there is no tx_buf provided by setting the flag SPI_MASTER_MUST_TX and
thus forcing a dummy TX buffer to work in Full Duplex.
This behavior should kept only for the STM32F4 and not for other
compatible since the STM32H7 do support SIMPLEX_RX and SIMPLEX_TX.
Add the flags variable within the struct stm32_spi_cfg so that flags
used at master registration time are compatible specific.

Fixes: 61367d0b8f ("spi: stm32: Add 'SPI_SIMPLEX_RX', 'SPI_3WIRE_RX' support for stm32f4")

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Change-Id: I5620ad12edf608bb761c5cabd4848ff56edbcbe8
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/235712
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Amelie DELAUNAY <amelie.delaunay@foss.st.com>
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/260233
Tested-by: Amelie DELAUNAY <amelie.delaunay@foss.st.com>
2022-10-12 10:46:00 +02:00
4189318f6b spi: stm32: remove inexistant variables in struct stm32_spi_cfg comment
Variables 'can_dma' and 'has_startbit' are described within the
struct stm32_spi_cfg comment but have never existed in this structure
so remove them.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Change-Id: I8646dcec332346afb563a9a88ae24ee5fe99e87c
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/235711
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Amelie DELAUNAY <amelie.delaunay@foss.st.com>
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/260232
Tested-by: Eric FOURMONT <eric.fourmont-ext@st.com>
Reviewed-by: Eric FOURMONT <eric.fourmont-ext@st.com>
2022-10-12 10:46:00 +02:00
4416234e7d ARM: dts: stm32: fix add goodix touchscreen on stm32mp135f-dk
Remove a typo (space character before ;)

Signed-off-by: Yannick Fertre <yannick.fertre@foss.st.com>
Change-Id: I900ca1de07ead7b868c4bbc6a822c9e1fcf2efbf
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/262828
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
Reviewed-by: Philippe CORNU <philippe.cornu@foss.st.com>
2022-10-12 10:46:00 +02:00
f573ca206b drm/stm: dsi: optimize ioremap resource allocation callchain
devm_platform_ioremap_resource() already encapsulate the mechanism where
previously both functions were called. Fix that.

Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
Change-Id: I780172f61a4c43252f9486de22d469e244a44d02
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/262484
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
Reviewed-by: Yannick FERTRE <yannick.fertre@foss.st.com>
Reviewed-by: Philippe CORNU <philippe.cornu@foss.st.com>
2022-10-12 10:46:00 +02:00
eec2efc91e hwrng: stm32 - rework RNG configuration sequence
This change introduces a change in the application of the
configuration for the RNG at cold boot and during low-power
sequences.

Configuration should be applicable when the conditioning soft
reset is supported. Remove the dependency to the clock error
detection for this part as there is no link between the two.

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Change-Id: Ib12b5a29eebd6dee656bb980af8de21cd4e96e06
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/261072
Tested-by: Eric FOURMONT <eric.fourmont-ext@st.com>
Reviewed-by: Eric FOURMONT <eric.fourmont-ext@st.com>
2022-10-12 10:46:00 +02:00
9e41f30a36 hwrng: stm32 - restrain RNG noise source clock under 3MHz
For NIST certification the noise source sampling must be 3 MHz or
less.

This change implements an algorithm that gets the rate of the RNG
clock and apply the correct value in CLKDIV field in RNG_CR register
to force the RNG clock rate to be 3MHz maximum.

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Change-Id: I0446f818d589b1a96f9d9145aff9b723ff985030
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/261071
Tested-by: Gatien CHEVALLIER <gatien.chevallier@st.com>
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
Reviewed-by: Etienne CARRIERE <etienne.carriere@foss.st.com>
Reviewed-by: Gatien CHEVALLIER <gatien.chevallier@st.com>
2022-10-12 10:46:00 +02:00
4db5bfdeae media: stm32-dcmipp: byteproc: checkpatch style fixes
Fix checkpatch "--strict" style issues.

Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
Change-Id: I29111a1026eb190889c34a3361bf2831b943ab6b
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/265569
Reviewed-by: Hugues FRUCHET <hugues.fruchet@st.com>
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
Reviewed-by: Alain VOLMAT <alain.volmat@foss.st.com>
Reviewed-by: Philippe CORNU <philippe.cornu@foss.st.com>
Tested-by: Hugues FRUCHET <hugues.fruchet@st.com>
2022-10-12 10:46:00 +02:00
07ed170155 media: stm32-dcmipp: fix colorimetry
Fix colorimetry as required by v4l2-compliance.

Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
Change-Id: I46318075646cae509c738d2ddd3a6c256f3057b9
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/265352
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Hugues FRUCHET <hugues.fruchet@st.com>
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
Reviewed-by: Alain VOLMAT <alain.volmat@foss.st.com>
Reviewed-by: Philippe CORNU <philippe.cornu@foss.st.com>
Tested-by: Hugues FRUCHET <hugues.fruchet@st.com>
2022-10-12 10:46:00 +02:00
20c5cea493 media: stm32-dcmipp: byteproc: rework frame interval handling
Add frame intervals enumeration support as required by v4l2-compliance.
Fix support of fractional frame intervals such as 7.5 and 3.75 fps
instead of rounding-up to 7 and 3:
v4l2-ctl -d /dev/v4l-subdev1 --list-subdev-frameintervals pad=1,\
width=640,height=480,code=0
ioctl: VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL (pad=1)
        Interval: 0.033s (30.000 fps)
        Interval: 0.067s (15.000 fps)
        Interval: 0.133s (7.500 fps)
        Interval: 0.267s (3.750 fps)

Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
Change-Id: I439d66a7de32445b0710b05fc700b4ff0265f913
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/265351
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Hugues FRUCHET <hugues.fruchet@st.com>
Reviewed-by: Alain VOLMAT <alain.volmat@foss.st.com>
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
Reviewed-by: Philippe CORNU <philippe.cornu@foss.st.com>
Tested-by: Hugues FRUCHET <hugues.fruchet@st.com>
2022-10-12 10:46:00 +02:00
6f4999e8f9 spi: stm32: add support for stm32h7 SPI slave underrun detection
If stm32h7 SPI controller is in slave role and TX FIFO is abnormally empty
during transaction, controller is able to automatically send either a
pattern, the last transmitted data, or the last received data.

Signed-off-by: Valentin Caron <valentin.caron@foss.st.com>
Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Change-Id: I05bba42003386cc7640e6ed2d3f802c980585353
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/257547
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
Reviewed-by: Alain VOLMAT <alain.volmat@foss.st.com>
2022-10-12 10:46:00 +02:00
d5c2c8c2c9 dt-bindings: spi: stm32: add stm32h7 st,spi-slave-underrun property
This property is used to enable and configure stm32h7 SPI controller to
handle underrun that could appear in slave mode.

Signed-off-by: Valentin Caron <valentin.caron@foss.st.com>
Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Change-Id: Ia8a49b812dec827a2df6b55ce8d706ad1ff778b8
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/257546
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
Reviewed-by: Alain VOLMAT <alain.volmat@foss.st.com>
2022-10-12 10:46:00 +02:00
b195a1701a spi: stm32h7: introduction of stm32h7 SPI slave support
Add support for stm32h7 to use SPI controller in slave role.
In such case, the spi instance should have the spi-slave property
defined.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Signed-off-by: Valentin Caron <valentin.caron@foss.st.com>
Change-Id: Ib8bb6185e06a4ebf9b23635c7dceb1fd431b3577
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/257545
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
2022-10-12 10:46:00 +02:00
12ce2c895b dt-bindings: spi: stm32: add bindings regarding stm32h7 spi slave
Update the spi-stm32 binding yaml regarding to the SPI slave support.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Change-Id: I3117b2f9b4c86a5e8b76e63491e1eb1a8f7bbb03
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/257544
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Valentin CARON <valentin.caron@foss.st.com>
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
Reviewed-by: Amelie DELAUNAY <amelie.delaunay@foss.st.com>
Tested-by: Valentin CARON <valentin.caron@foss.st.com>
2022-10-12 10:46:00 +02:00
bfc5157ec0 spi: stm32: use dmaengine_terminate_{a}sync instead of _all
Avoid usage of deprecated dmaengine_terminate_all and use
dmaengine_terminate_sync and dmaengine_terminate_async instead.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Change-Id: Iefd75d88dd5317febb95b7b27560e04622658d03
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/257543
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Valentin CARON <valentin.caron@foss.st.com>
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
Reviewed-by: Amelie DELAUNAY <amelie.delaunay@foss.st.com>
Tested-by: Valentin CARON <valentin.caron@foss.st.com>
2022-10-12 10:46:00 +02:00