scripts/genpinctrl: use a pull-down for SPI SCK pin

When an STM32 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.

(For the STM32L4 series, this is a regression introduced by the switch
to the device tree bindings for SPI pins configuration, see
zephyr #24097).

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
Aurelien Jarno 2021-04-25 23:25:30 +02:00 committed by Kumar Gala
parent 68bfdabe97
commit 98aca4a5e8
1 changed files with 1 additions and 0 deletions

View File

@ -191,6 +191,7 @@
- name: SPI_SCK
match: "^SPI\\d+_SCK$"
slew-rate: very-high-speed
bias: pull-down
- name: SPI_NSS
match: "^SPI\\d+_NSS$"