<commit_before>/*
 * Copyright (c) 2016 Linaro Limited.
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#ifndef _STM32F4_PINMUX_H_
#define _STM32F4_PINMUX_H_

/**
 * @file Header for STM32F4 pin multiplexing helper
 */

/* Port A */
#define STM32F4_PINMUX_FUNC_PA0_PWM2_CH1    STM32_PINMUX_ALT_FUNC_1 | STM32_PUSHPULL_PULLUP
#define STM32F4_PINMUX_FUNC_PA0_UART4_TX    STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP

#define STM32F4_PINMUX_FUNC_PA1_UART4_RX    STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP
#define STM32F4_PINMUX_FUNC_PA1_ETH         STM32_PINMUX_ALT_FUNC_11 | STM32_PUSHPULL_NOPULL | STM32_OSPEEDR_VERY_HIGH_SPEED

#define STM32F4_PINMUX_FUNC_PA2_USART2_TX   STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP
#define STM32F4_PINMUX_FUNC_PA2_ETH         STM32_PINMUX_ALT_FUNC_11 | STM32_PUSHPULL_NOPULL | STM32_OSPEEDR_VERY_HIGH_SPEED

#define STM32F4_PINMUX_FUNC_PA3_USART2_RX   STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP
#define STM32F4_PINMUX_FUNC_PA3_ETH         STM32_PINMUX_ALT_FUNC_11 | STM32_PUSHPULL_NOPULL | STM32_OSPEEDR_VERY_HIGH_SPEED

#define STM32F4_PINMUX_FUNC_PA4_SPI1_NSS    STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL

#define STM32F4_PINMUX_FUNC_PA5_SPI1_SCK    STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL

#define STM32F4_PINMUX_FUNC_PA6_SPI1_MISO   STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL

#define STM32F4_PINMUX_FUNC_PA7_SPI1_MOSI   STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL
#define STM32F4_PINMUX_FUNC_PA7_ETH         STM32_PINMUX_ALT_FUNC_11 | STM32_PUSHPULL_NOPULL | STM32_OSPEEDR_VERY_HIGH_SPEED

#define STM32F4_PINMUX_FUNC_PA8_I2C3_SCL    STM32_PINMUX_ALT_FUNC_4 | STM32_OPENDRAIN_PULLUP
#define STM32F4_PINMUX_FUNC_PA8_UART7_RX    STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP

#define STM32F4_PINMUX_FUNC_PA9_USART1_TX   STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP

#define STM32F4_PINMUX_FUNC_PA10_USART1_RX  STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP

#define STM32F4_PINMUX_FUNC_PA11_USART6_TX  STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP
#define STM32F4_PINMUX_FUNC_PA11_UART4_RX   STM32_PINMUX_ALT_FUNC_11 | STM32_PUSHPULL_PULLUP

#define STM32F4_PINMUX_FUNC_PA12_USART6_RX  STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP
#define STM32F4_PINMUX_FUNC_PA12_UART4_TX   STM32_PINMUX_ALT_FUNC_11 | STM32_PUSHPULL_PULLUP

#define STM32F4_PINMUX_FUNC_PA15_USART1_TX  STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP
#define STM32F4_PINMUX_FUNC_PA15_UART7_TX   STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP

/* Port B */
#define STM32F4_PINMUX_FUNC_PB3_USART1_RX   STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP
#define STM32F4_PINMUX_FUNC_PB3_UART7_RX    STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP
#define STM32F4_PINMUX_FUNC_PB3_I2C2_SDA    STM32_PINMUX_ALT_FUNC_9 | STM32_OPENDRAIN_PULLUP

#define STM32F4_PINMUX_FUNC_PB4_UART7_TX    STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP
#define STM32F4_PINMUX_FUNC_PB4_I2C3_SDA    STM32_PINMUX_ALT_FUNC_9 | STM32_OPENDRAIN_PULLUP

#define STM32F4_PINMUX_FUNC_PB5_UART5_RX    STM32_PINMUX_ALT_FUNC_11 | STM32_PUSHPULL_PULLUP

#define STM32F4_PINMUX_FUNC_PB6_I2C1_SCL    STM32_PINMUX_ALT_FUNC_4 | STM32_OPENDRAIN_PULLUP
#define STM32F4_PINMUX_FUNC_PB6_USART1_TX   STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP
#define STM32F4_PINMUX_FUNC_PB6_UART5_TX    STM32_PINMUX_ALT_FUNC_11 | STM32_PUSHPULL_PULLUP

#define STM32F4_PINMUX_FUNC_PB7_I2C1_SDA    STM32_PINMUX_ALT_FUNC_4 | STM32_OPENDRAIN_PULLUP
#define STM32F4_PINMUX_FUNC_PB7_USART1_RX   STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP

#define STM32F4_PINMUX_FUNC_PB8_I2C1_SCL    STM32_PINMUX_ALT_FUNC_4 | STM32_OPENDRAIN_PULLUP
#define STM32F4_PINMUX_FUNC_PB8_UART5_RX    STM32_PINMUX_ALT_FUNC_11 | STM32_PUSHPULL_PULLUP

#define STM32F4_PINMUX_FUNC_PB9_I2C1_SDA    STM32_PINMUX_ALT_FUNC_4 | STM32_OPENDRAIN_PULLUP<commit_msg>pinmux: stm32: stm32f4: Add USB FS pinmux<commit_after>/*
 * Copyright (c) 2016 Linaro Limited.
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#ifndef _STM32F4_PINMUX_H_
#define _STM32F4_PINMUX_H_

/**
 * @file Header for STM32F4 pin multiplexing helper
 */

/* Port A */
#define STM32F4_PINMUX_FUNC_PA0_PWM2_CH1    STM32_PINMUX_ALT_FUNC_1 | STM32_PUSHPULL_PULLUP
#define STM32F4_PINMUX_FUNC_PA0_UART4_TX    STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP

#define STM32F4_PINMUX_FUNC_PA1_UART4_RX    STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP
#define STM32F4_PINMUX_FUNC_PA1_ETH         STM32_PINMUX_ALT_FUNC_11 | STM32_PUSHPULL_NOPULL | STM32_OSPEEDR_VERY_HIGH_SPEED

#define STM32F4_PINMUX_FUNC_PA2_USART2_TX   STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP
#define STM32F4_PINMUX_FUNC_PA2_ETH         STM32_PINMUX_ALT_FUNC_11 | STM32_PUSHPULL_NOPULL | STM32_OSPEEDR_VERY_HIGH_SPEED

#define STM32F4_PINMUX_FUNC_PA3_USART2_RX   STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP
#define STM32F4_PINMUX_FUNC_PA3_ETH         STM32_PINMUX_ALT_FUNC_11 | STM32_PUSHPULL_NOPULL | STM32_OSPEEDR_VERY_HIGH_SPEED

#define STM32F4_PINMUX_FUNC_PA4_SPI1_NSS    STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL

#define STM32F4_PINMUX_FUNC_PA5_SPI1_SCK    STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL

#define STM32F4_PINMUX_FUNC_PA6_SPI1_MISO   STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL

#define STM32F4_PINMUX_FUNC_PA7_SPI1_MOSI   STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL
#define STM32F4_PINMUX_FUNC_PA7_ETH         STM32_PINMUX_ALT_FUNC_11 | STM32_PUSHPULL_NOPULL | STM32_OSPEEDR_VERY_HIGH_SPEED

#define STM32F4_PINMUX_FUNC_PA8_I2C3_SCL    STM32_PINMUX_ALT_FUNC_4 | STM32_OPENDRAIN_PULLUP
#define STM32F4_PINMUX_FUNC_PA8_UART7_RX    STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP

#define STM32F4_PINMUX_FUNC_PA9_USART1_TX   STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP

#define STM32F4_PINMUX_FUNC_PA10_USART1_RX  STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP

#define STM32F4_PINMUX_FUNC_PA11_USART6_TX  STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP
#define STM32F4_PINMUX_FUNC_PA11_UART4_RX   STM32_PINMUX_ALT_FUNC_11 | STM32_PUSHPULL_PULLUP
#define STM32F4_PINMUX_FUNC_PA11_OTG_FS_DM  (STM32_PINMUX_ALT_FUNC_10 | STM32_PUSHPULL_NOPULL)

#define STM32F4_PINMUX_FUNC_PA12_USART6_RX  STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP
#define STM32F4_PINMUX_FUNC_PA12_UART4_TX   STM32_PINMUX_ALT_FUNC_11 | STM32_PUSHPULL_PULLUP
#define STM32F4_PINMUX_FUNC_PA12_OTG_FS_DP  (STM32_PINMUX_ALT_FUNC_10 | STM32_PUSHPULL_NOPULL)

#define STM32F4_PINMUX_FUNC_PA15_USART1_TX  STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP
#define STM32F4_PINMUX_FUNC_PA15_UART7_TX   STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP

/* Port B */
#define STM32F4_PINMUX_FUNC_PB3_USART1_RX   STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP
#define STM32F4_PINMUX_FUNC_PB3_UART7_RX    STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP
#define STM32F4_PINMUX_FUNC_PB3_I2C2_SDA    STM32_PINMUX_ALT_FUNC_9 | STM32_OPENDRAIN_PULLUP

#define STM32F4_PINMUX_FUNC_PB4_UART7_TX    STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP
#define STM32F4_PINMUX_FUNC_PB4_I2C3_SDA    STM32_PINMUX_ALT_FUNC_9 | STM32_OPENDRAIN_PULLUP

#define STM32F4_PINMUX_FUNC_PB5_UART5_RX    STM32_PINMUX_ALT_FUNC_11 | STM32_PUSHPULL_PULLUP

#define STM32F4_PINMUX_FUNC_PB6_I2C1_SCL    STM32_PINMUX_ALT_FUNC_4 | STM32_OPENDRAIN_PULLUP
#define STM32F4_PINMUX_FUNC_PB6_USART1_TX   STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP
#define STM32F4_PINMUX_FUNC_PB6_UART5_TX    STM32_PINMUX_ALT_FUNC_11 | STM32_PUSHPULL_PULLUP

#define STM32F4_PINMUX_FUNC_PB7_I2C1_SDA    STM32_PINMUX_ALT_FUNC_4 | STM32_OPENDRAIN_PULLUP
#define STM32F4_PINMUX_FUNC_PB7_USART1_RX   STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP

#define STM32F4_PINMUX_FUNC_PB8_I2C1_SCL    STM32_PINMUX_ALT_FUNC_4 | STM32_OPENDRAIN_PULLUP
#define STM32F4_PINMUX_FUNC_PB8_UART5_RX    STM32_PINMUX_ALT_FUNC_11 | STM32_PUSHPULL_PULLUP

#define STM32F4_PINMUX_FUNC_PB9_I2C1_SDA    STM32_PINMUX_ALT_FUNC_4 | STM32_OPENDRAIN_PULLUP
{'fraction_non_alphanumeric': 0.030129672006102212, 'fraction_numerical': 0.10844139333841851, 'mean_word_length': 9.098844672657252, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2476151', 'n_tokens_mistral': 4523, 'n_tokens_neox': 3933, 'n_words': 363}