Skip to content

Commit 98aca4a

Browse files
aurel32galak
authored andcommitted
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 <[email protected]>
1 parent 68bfdab commit 98aca4a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

scripts/genpinctrl/stm32-pinctrl-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@
191191
- name: SPI_SCK
192192
match: "^SPI\\d+_SCK$"
193193
slew-rate: very-high-speed
194+
bias: pull-down
194195

195196
- name: SPI_NSS
196197
match: "^SPI\\d+_NSS$"

0 commit comments

Comments
 (0)