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>
This commit is contained in:
parent
3efa11b3f2
commit
19256b48c0
|
@ -410,6 +410,9 @@ def get_mcu_signals(cube_path, gpio_ip_afs):
|
|||
pin_af = None
|
||||
elif signal_name in pin_afs:
|
||||
pin_af = pin_afs[signal_name]
|
||||
# STM32F1: assume NO_REMAP (af=0) if signal is not listed in pin_afs
|
||||
elif family == "STM32F1":
|
||||
pin_af = 0
|
||||
else:
|
||||
continue
|
||||
|
||||
|
|
|
@ -9,5 +9,7 @@
|
|||
<Signal Name="UART1_RX"/>
|
||||
<!-- Valid signal (analog) -->
|
||||
<Signal Name="ADC1_IN0"/>
|
||||
<!-- Valid signal (not in GPIO IP file) -->
|
||||
<Signal Name="I2C2_SCL"/>
|
||||
</Pin>
|
||||
</Mcu>
|
||||
|
|
|
@ -16,6 +16,13 @@
|
|||
pinmux = <STM32F1_PINMUX('A', 0, ANALOG, NO_REMAP)>;
|
||||
};
|
||||
|
||||
/* I2C_SCL */
|
||||
|
||||
i2c2_scl_pa0: i2c2_scl_pa0 {
|
||||
pinmux = <STM32F1_PINMUX('A', 0, ALTERNATE, NO_REMAP)>;
|
||||
drive-open-drain;
|
||||
};
|
||||
|
||||
/* UART_RX / USART_RX */
|
||||
|
||||
uart1_rx_pa0: uart1_rx_pa0 {
|
||||
|
|
|
@ -207,6 +207,7 @@ def test_get_mcu_signals(cubemx):
|
|||
{"name": "UART1_TX", "af": 0},
|
||||
{"name": "UART1_RX", "af": 1},
|
||||
{"name": "ADC1_IN0", "af": None},
|
||||
{"name": "I2C2_SCL", "af": 0},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue