stm32mp157 盘古开发板 Linux内核版本4.19
1.Linux Pinctrl子系统简介
在许多soc内部都包含有pin控制器,通过pin控制器的寄存器,我们可以配置一个或者一组引脚的功能和特性。在软件方面,Linux内核提供了pinctrl子系统,目的是为了统一各soc厂商的pin脚管理。
2.Linux Pinctrl子系统提供的功能
(1)管理系统中所有的可以控制的pin,在系统初始化的时候,枚举所有可以控制的pin,并标识这些pin。
(2)管理这些pin的复用(Multiplexing)。对于SOC而言,其引脚除了配置成普通的GPIO之外,若干个引脚还可以组成一个pin group,行程特定的功能。pin control subsystem要管理所有的pin group。
(3)配置这些pin的特性。例如使能或关闭引脚上的pull-up、pull-down电阻,配置引脚的driver strength。
3.pinctrl相关概念
普通driver调用pin control subsystem的主要目标有两个:
(1)设定该设备的功能复用。
(2)设定该device对应的pin的电气特性。
设定设备的功能复用需要了解两个概念,一个是function,另外一个是pin group。function是功能抽象,对应一个HW逻辑block,例如SPI0.虽然给定了具体的function name,我们并不能确定其使用的pins的情况。例如为了设计灵活,芯片内部的SPI0的功能引出到pin group{C6,C7,C8,C9},也可能引出的另外一个pin group{C22.C23,C24,C25},但毫无疑问,这两个pin group不能同时active,毕竟芯片内部的SPI0的逻辑功能电路只有一个,因此只有给出function selector以及function的pin group selector才能进行function mux 的设定。
此外,由于电源管理的要求,某个device可能处于某个电源管理状态,例如idle或者sleep,这时候,属于device的所有pin就会需要处于另外的状态。
综合上述的需求,就定义了pin control state的概念,也就是说设备可能处于非常多的状态中的一个,device driver可以切换设备处于的状态。为了方便管理pin control state 就有了pin control state holder的概念,用来管理一个设备的所有的pin control状态。
综上所述,普通的driver调用pin control subsystem 的接口就是只有三个步骤:
(1)驱动加载或是运行时,获取pin control state holder的句柄
(2)设定pin control的状态
(3)驱动卸载或是退出时,释放pin control state holder的句柄
4.与GPIO子系统的关系
上图显示了gpio子系统和pinctrl子系统之间的关系,即pinctrl子系统实际上也把gpio一起管理起来,所有的gpio操作也需要透过pinctrl子系统来完成,这样,如果一个pin已经被申请为gpio,再通过pinctrl子系统申请为某个function时就会返回错误。
5.按照老套路直接开始分析:
pinctrl驱动程序位于内核源码目录:linux-st\drivers\pinctrl
这个目录下关于驱动框架文件的描述:
1、pinctrl涉及的主要处理文件
Linux/drivers/pinctrl
core.c core.h //pin control subsystem的core driver
pinctrl-utils.c //pinctrl-utils.h pin control subsystem的一些utility接口函数
pinmux.c pinmux.h //pin control subsystem的core driver(pin muxing部分的代码,也称为pinmux driver)
pinconf.c pinconf.h //pin control subsystem的core driver(pin config部分的代码,也称为pin config driver)
devicetree.c devicetree.h //pin control subsystem的device tree代码
pinctrl-xxxx.c //各种pin controller的low level driver。也就是pin number枚举,如pinctrl-samsung.c
2、pinctrl为其他驱动模块提供的统一接口
linux/include/linux/pinctrl
consumer.h //其他的driver要使用pin control subsystem的下列接口:
a、设置引脚复用功能
b、配置引脚的电气特性
devinfo.h //这是for linux内核的驱动模型模块(driver model)使用的接口。struct device中包括了一个
struct dev_pin_info *pins的成员,这个成员描述了该设备的引脚的初始状态信息,在probe之前,driver model中的core driver在调用driver的probe函数之前会先设定pin state
machine.h //和machine模块的接口。
3、Low level pin controller driver接口
linux/include/linux/pinctrl
pinconf-generic.h /这个接口主要是提供给各种pin controller driver使用的,不是外部接口。
pinconf.h //pin configuration 接口
pinctrl-state.h //pin control state状态定义
pinmux.h //pin mux function接口
在这个驱动框架下,st实现了他们自己的pinctrl驱动,即在这个linux-st\drivers\pinctrl目录下有一个文件夹名字为stm32的文件夹,
这个文件夹里面:
打开pinctrl-stm32mp157.c文件,会发现这个文件的末尾有stm32 pinctrl初始化函数,即stm32mp157_pinctrl_init,如下:
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) STMicroelectronics 2017 - All Rights Reserved
* Author: Alexandre Torgue <alexandre.torgue@st.com> for STMicroelectronics.
*/
#include <linux/init.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include "pinctrl-stm32.h"
//这个数组里面是对stm32mp157所有的引脚的描述,包括引脚复用等
static const struct stm32_desc_pin stm32mp157_pins[] = {
STM32_PIN_PKG(
PINCTRL_PIN(0, "PA0"),
STM32MP157CAA | STM32MP157CAC | STM32MP157CAB | STM32MP157CAD,
STM32_FUNCTION(0, "GPIOA0"),
STM32_FUNCTION(2, "TIM2_CH1 TIM2_ETR"),
STM32_FUNCTION(3, "TIM5_CH1"),
STM32_FUNCTION(4, "TIM8_ETR"),
STM32_FUNCTION(5, "TIM15_BKIN"),
STM32_FUNCTION(8, "USART2_CTS USART2_NSS"),
STM32_FUNCTION(9, "UART4_TX"),
STM32_FUNCTION(10, "SDMMC2_CMD"),
STM32_FUNCTION(11, "SAI2_SD_B"),
STM32_FUNCTION(12, "ETH1_GMII_CRS ETH1_MII_CRS"),
STM32_FUNCTION(16, "EVENTOUT"),
STM32_FUNCTION(17, "ANALOG")
),
STM32_PIN_PKG(
PINCTRL_PIN(1, "PA1"),
STM32MP157CAA | STM32MP157CAC | STM32MP157CAB | STM32MP157CAD,
STM32_FUNCTION(0, "GPIOA1"),
STM32_FUNCTION(1, "ETH_CLK"),
STM32_FUNCTION(2, "TIM2_CH2"),
STM32_FUNCTION(3, "TIM5_CH2"),
STM32_FUNCTION(4, "LPTIM3_OUT"),
STM32_FUNCTION(5, "TIM15_CH1N"),
STM32_FUNCTION(8, "USART2_RTS USART2_DE"),
STM32_FUNCTION(9, "UART4_RX"),
STM32_FUNCTION(10, "QUADSPI_BK1_IO3"),
STM32_FUNCTION(11, "SAI2_MCLK_B"),
STM32_FUNCTION(12, "ETH1_GMII_RX_CLK ETH1_MII_RX_CLK ETH1_RGMII_RX_CLK ETH1_RMII_REF_CLK"),
STM32_FUNCTION(15, "LCD_R2"),
STM32_FUNCTION(16, "EVENTOUT"),
STM32_FUNCTION(17, "ANALOG")
),
STM32_PIN_PKG(
PINCTRL_PIN(2, "PA2"),
STM32MP157CAA | STM32MP157CAC | STM32MP157CAB | STM32MP157CAD,
STM32_FUNCTION(0, "GPIOA2"),
STM32_FUNCTION(2, "TIM2_CH3"),
STM32_FUNCTION(3, "TIM5_CH3"),
STM32_FUNCTION(4, "LPTIM4_OUT"),
STM32_FUNCTION(5, "TIM15_CH1"),
STM32_FUNCTION(8, "USART2_TX"),
STM32_FUNCTION(9, "SAI2_SCK_B"),
STM32_FUNCTION(11, "SDMMC2_D0DIR"),
STM32_FUNCTION(12, "ETH1_MDIO"),
STM32_FUNCTION(13, "MDIOS_MDIO"),
STM32_FUNCTION(15, "LCD_R1"),
STM32_FUNCTION(16, "EVENTOUT"),
STM32_FUNCTION(17, "ANALOG")
),
STM32_PIN_PKG(
PINCTRL_PIN(3, "PA3"),
STM32MP157CAA | STM32MP157CAC | STM32MP157CAB | STM32MP157CAD,
STM32_FUNCTION(0, "GPIOA3"),
STM32_FUNCTION(2, "TIM2_CH4"),
STM32_FUNCTION(3, "TIM5_CH4"),
STM32_FUNCTION(4, "LPTIM5_OUT"),
STM32_FUNCTION(5, "TIM15_CH2"),
STM32_FUNCTION(8, "USART2_RX"),
STM32_FUNCTION(10, "LCD_B2"),
STM32_FUNCTION(12, "ETH1_GMII_COL ETH1_MII_COL"),
STM32_FUNCTION(15, "LCD_B5"),
STM32_FUNCTION(16, "EVENTOUT"),
STM32_FUNCTION(17, "ANALOG")
),
STM32_PIN_PKG(
PINCTRL_PIN(4, "PA4"),
STM32MP157CAA | STM32MP157CAC | STM32MP157CAB | STM32MP157CAD,
STM32_FUNCTION(0, "GPIOA4"),
STM32_FUNCTION(1, "HDP0"),
STM32_FUNCTION(3, "TIM5_ETR"),
STM32_FUNCTION(5, "SAI4_D2"),
STM32_FUNCTION(6, "SPI1_NSS I2S1_WS"),
STM32_FUNCTION(7, "SPI3_NSS I2S3_WS"),
STM32_FUNCTION(8, "USART2_CK"),
STM32_FUNCTION(9, "SPI6_NSS"),
STM32_FUNCTION(13, "SAI4_FS_A"),
STM32_FUNCTION(14, "DCMI_HSYNC"),
STM32_FUNCTION(15, "LCD_VSYNC"),
STM32_FUNCTION(16, "EVENTOUT"),
STM32_FUNCTION(17, "ANALOG")
),
STM32_PIN_PKG(
PINCTRL_PIN(5, "PA5"),
STM32MP157CAA | STM32MP157CAC | STM32MP157CAB | STM32MP157CAD,
STM32_FUNCTION(0, "GPIOA5"),
STM32_FUNCTION(2, "TIM2_CH1 TIM2_ETR"),
STM32_FUNCTION(4, "TIM8_CH1N"),
STM32_FUNCTION(5, "SAI4_CK1"),
STM32_FUNCTION(6, "SPI1_SCK I2S1_CK"),
STM32_FUNCTION(9, "SPI6_SCK"),
STM32_FUNCTION(13, "SAI4_MCLK_A"),
STM32_FUNCTION(15, "LCD_R4"),
STM32_FUNCTION(16, "EVENTOUT"),
STM32_FUNCTION(17, "ANALOG")
),
STM32_PIN_PKG(
PINCTRL_PIN(6, "PA6"),
STM32MP157CAA | STM32MP157CAC | STM32MP157CAB | STM32MP157CAD,
STM32_FUNCTION(0, "GPIOA6"),
STM32_FUNCTION(2, "TIM1_BKIN"),
STM32_FUNCTION(3, "TIM3_CH1"),
STM32_FUNCTION(4, "TIM8_BKIN"),
STM32_FUNCTION(5, "SAI4_CK2"),
STM32_FUNCTION(6, "SPI1_MISO I2S1_SDI"),
STM32_FUNCTION(9, "SPI6_MISO"),
STM32_FUNCTION(10, "TIM13_CH1"),
STM32_FUNCTION(12, "MDIOS_MDC"),
STM32_FUNCTION(13, "SAI4_SCK_A"),
STM32_FUNCTION(14, "DCMI_PIXCLK"),
STM32_FUNCTION(15, "LCD_G2"),
STM32_FUNCTION(16, "EVENTOUT"),
STM32_FUNCTION(17, "ANALOG")
),
STM32_PIN_PKG(
PINCTRL_PIN(7, "PA7"),
STM32MP157CAA | STM32MP157CAC | STM32MP157CAB | STM32MP157CAD,
STM32_FUNCTION(0, "GPIOA7"),
STM32_FUNCTION(2, "TIM1_CH1N"),
STM32_FUNCTION(3, "TIM3_CH2"),
STM32_FUNCTION(4, "TIM8_CH1N"),
STM32_FUNCTION(5, "SAI4_D1"),
STM32_FUNCTION(6, "SPI1_MOSI I2S1_SDO"),
STM32_FUNCTION(9, "SPI6_MOSI"),
STM32_FUNCTION(10, "TIM14_CH1"),
STM32_FUNCTION(11, "QUADSPI_CLK"),
STM32_FUNCTION(12, "ETH1_GMII_RX_DV ETH1_MII_RX_DV ETH1_RGMII_RX_CTL ETH1_RMII_CRS_DV"),
STM32_FUNCTION(13, "SAI4_SD_A"),
STM32_FUNCTION(16, "EVENTOUT"),
STM32_FUNCTION(17, "ANALOG")
),
STM32_PIN_PKG(
PINCTRL_PIN(8, "PA8"),
STM32MP157CAA | STM32MP157CAC | STM32MP157CAB | STM32MP157CAD,
STM32_FUNCTION(0, "GPIOA8"),
STM32_FUNCTION(1, "MCO1"),
STM32_FUNCTION(2, "TIM1_CH1"),
STM32_FUNCTION(4, "TIM8_BKIN2"),
STM32_FUNCTION(5, "I2C3_SCL"),
STM32_FUNCTION(6, "SPI3_MOSI I2S3_SDO"),
STM32_FUNCTION(8, "USART1_CK"),
STM32_FUNCTION(9, "SDMMC2_CKIN"),
STM32_FUNCTION(10, "SDMMC2_D4"),
STM32_FUNCTION(11, "OTG_FS_SOF OTG_HS_SOF"),
STM32_FUNCTION(13, "SAI4_SD_B"),
STM32_FUNCTION(14, "UART7_RX"),
STM32_FUNCTION(15, "LCD_R6"),
STM32_FUNCTION(16, "EVENTOUT"),
STM32_FUNCTION(17, "ANALOG")
),
STM32_PIN_PKG(
PINCTRL_PIN(9, "PA9"),
STM32MP157CAA | STM32MP157CAC | STM32MP157CAB | STM32MP157CAD,
STM32_FUNCTION(0, "GPIOA9"),
STM32_FUNCTION(2, "TIM1_CH2"),
STM32_FUNCTION(5, "I2C3_SMBA"),
STM32_FUNCTION(6, "SPI2_SCK I2S2_CK"),
STM32_FUNCTION(8, "USART1_TX"),
STM32_FUNCTION(9, "SDMMC2_CDIR"),
STM32_FUNCTION(11, "SDMMC2_D5"),
STM32_FUNCTION(14, "DCMI_D0"),
STM32_FUNCTION(15, "LCD_R5"),
STM32_FUNCTION(16, "EVENTOUT"),
STM32_FUNCTION(17, "ANALOG")
),
STM32_PIN_PKG(
PINCTRL_PIN(10, "PA10"),
STM32MP157CAA | STM32MP157CAC | STM32MP157CAB | STM32MP157CAD,
STM32_FUNCTION(0, "GPIOA10"),
STM32_FUNCTION(2, "TIM1_CH3"),
STM32_FUNCTION(6, "SPI3_NSS I2S3_WS"),
STM32_FUNCTION(8, "USART1_RX"),
STM32_FUNCTION(12, "MDIOS_MDIO"),
STM32_FUNCTION(13, "SAI4_FS_B"),
STM32_FUNCTION(14, "DCMI_D1"),
STM32_FUNCTION(15, "LCD_B1"),
STM32_FUNCTION(16, "EVENTOUT"),
STM32_FUNCTION(17, "ANALOG")
),
STM32_PIN_PKG(
PINCTRL_PIN(11, "PA11"),
STM32MP157CAA | STM32MP157CAC | STM32MP157CAB | STM32MP157CAD,
STM32_FUNCTION(0, "GPIOA11"),
STM32_FUNCTION(2, "TIM1_CH4"),
STM32_FUNCTION(3, "I2C6_SCL"),
STM32_FUNCTION(5, "I2C5_SCL"),
STM32_FUNCTION(6, "SPI2_NSS I2S2_WS"),
STM32_FUNCTION(7, "UART4_RX"),
STM32_FUNCTION(8, "USART1_CTS USART1_NSS"),
STM32_FUNCTION(10, "FDCAN1_RX"),
STM32_FUNCTION(15, "LCD_R4"),
STM32_FUNCTION(16, "EVENTOUT"),
STM32_FUNCTION(17, "ANALOG")
),
STM32_PIN_PKG(
PINCTRL_PIN(12, "PA12"),
STM32MP157CAA | STM32MP157CAC | STM32MP157CAB | STM32MP157CAD,
STM32_FUNCTION(0, "GPIOA12"),
STM32_FUNCTION(2, "TIM1_ETR"),
STM32_FUNCTION(3, "I2C6_SDA"),
STM32_FUNCTION(5, "I2C5_SDA"),
STM32_FUNCTION(7, "UART4_TX"),
STM32_FUNCTION(8, "USART1_RTS USART1_DE"),
STM32_FUNCTION(9, "SAI2_FS_B"),
STM32_FUNCTION(10, "FDCAN1_TX"),
STM32_FUNCTION(15, "LCD_R5"),
STM32_FUNCTION(16, "EVENTOUT"),
STM32_FUNCTION(17, "ANALOG")
),
STM32_PIN_PKG(
PINCTRL_PIN(13, "PA13"),
STM32MP157CAA | STM32MP157CAC | STM32MP157CAB | STM32MP157CAD,
STM32_FUNCTION(0, "GPIOA13"),
STM32_FUNCTION(1, "DBTRGO"),
STM32_FUNCTION(2, "DBTRGI"),
STM32_FUNCTION(3, "MCO1"),
STM32_FUNCTION(9, "UART4_TX"),
STM32_FUNCTION(16, "EVENTOUT"),
STM32_FUNCTION(17, "ANALOG")
),
STM32_PIN_PKG(
PINCTRL_PIN(14, "PA14"),
STM32MP157CAA | STM32MP157CAC | STM32MP157CAB | STM32MP157CAD,
STM32_FUNCTION(0, "GPIOA14"),
STM32_FUNCTION(1, "DBTRGO"),
STM32_FUNCTION(2, "DBTRGI"),
STM32_FUNCTION(3, "MCO2"),
STM32_FUNCTION(16, "EVENTOUT"),
STM32_FUNCTION(17, "ANALOG")
),
STM32_PIN_PKG(
PINCTRL_PIN(15, "PA15"),
STM32MP157CAA | STM32MP157CAC | STM32MP157CAB | STM32MP157CAD,
STM32_FUNCTION(0, "GPIOA15"),
STM32_FUNCTION(1, "DBTRGI"),
STM32_FUNCTION(2, "TIM2_CH1 TIM2_ETR"),
STM32_FUNCTION(3, "SAI4_D2"),
STM32_FUNCTION(4, "SDMMC1_CDIR"),
STM32_FUNCTION(5, "CEC"),
STM32_FUNCTION(6, "SPI1_NSS I2S1_WS"),
STM32_FUNCTION(7, "SPI3_NSS I2S3_WS"),
STM32_FUNCTION(8, "SPI6_NSS"),
STM32_FUNCTION(9, "UART4_RTS UART4_DE"),
STM32_FUNCTION(10, "SDMMC2_D5"),
STM32_FUNCTION(11, "SDMMC2_CDIR"),
STM32_FUNCTION(12, "SDMMC1_D5"),
STM32_FUNCTION(13, "SAI4_FS_A"),
STM32_FUNCTION(14, "UART7_TX"),
STM32_FUNCTION(15, "LCD_R1"),
STM32_FUNCTION(16, "EVENTOUT"),
STM32_FUNCTION(17, "ANALOG")
),
STM32_PIN_PKG(
PINCTRL_PIN(16, "PB0"),
STM32MP157CAA | STM32MP157CAC | STM32MP157CAB | STM32MP157CAD,
STM32_FUNCTION(0, "GPIOB0"),
STM32_FUNCTION(2, "TIM1_CH2N"),
STM32_FUNCTION(3, "TIM3_CH3"),
STM32_FUNCTION(4, "TIM8_CH2N"),
STM32_FUNCTION(7, "DFSDM1_CKOUT"),
STM32_FUNCTION(9, "UART4_CTS"),
STM32_FUNCTION(10, "LCD_R3"),
STM32_FUNCTION(12, "ETH1_GMII_RXD2 ETH1_MII_RXD2 ETH1_RGMII_RXD2"),
STM32_FUNCTION(13, "MDIOS_MDIO"),
STM32_FUNCTION(15, "LCD_G1"),
STM32_FUNCTION(16, "EVENTOUT"),
STM32_FUNCTION(17, "ANALOG")
),
STM32_PIN_PKG(
PINCTRL_PIN(17, "PB1"),
STM32MP157CAA | STM32MP157CAC | STM32MP157CAB | STM32MP157CAD,
STM32_FUNCTION(0, "GPIOB1"),
STM32_FUNCTION(2, "TIM1_CH3N"),
STM32_FUNCTION(3, "TIM3_CH4"),
STM32_FUNCTION(4, "TIM8_CH3N"),
STM32_FUNCTION(7, "DFSDM1_DATIN1"),
STM32_FUNCTION(10, "LCD_R6"),
STM32_FUNCTION(12, "ETH1_GMII_RXD3 ETH1_MII_RXD3 ETH1_RGMII_RXD3"),
STM32_FUNCTION(13, "MDIOS_MDC"),
STM32_FUNCTION(15, "LCD_G0"),
STM32_FUNCTION(16, "EVENTOUT"),
STM32_FUNCTION(17, "ANALOG")
),
STM32_PIN_PKG(
PINCTRL_PIN(18, "PB2"),
STM32MP157CAA | STM32MP157CAC | STM32MP157CAB | STM32MP157CAD,
STM32_FUNCTION(0, "GPIOB2"),
STM32_FUNCTION(1, "TRACED4"),
STM32_FUNCTION(2, "RTC_OUT2"),
STM32_FUNCTION(3, "SAI1_D1"),
STM32_FUNCTION(4, "DFSDM1_CKIN1"),
STM32_FUNCTION(5, "USART1_RX"),
STM32_FUNCTION(6, "I2S_CKIN"),
STM32_FUNCTION(7, "SAI1_SD_A"),
STM32_FUNCTION(8, "SPI3_MOSI I2S3_SDO"),
STM32_FUNCTION(9, "UART4_RX"),
STM32_FUNCTION(10, "QUADSPI_CLK"),
STM32_FUNCTION(16, "EVENTOUT"),
STM32_FUNCTION(17, "ANALOG")
),
STM32_PIN_PKG(
PINCTRL_PIN(19, "PB3"),
STM32MP157CAA | STM32MP157CAC | STM32MP157CAB | STM32MP157CAD,
STM32_FUNCTION(0, "GPIOB3"),
STM32_FUNCTION(1, "TRACED9"),
STM32_FUNCTION(2, "TIM2_CH2"),
STM32_FUNCTION(5, "SAI4_CK1"),
STM32_FUNCTION(6, "SPI1_SCK I2S1_CK"),
STM32_FUNCTION(7, "SPI3_SCK I2S3_CK"),
STM32_FUNCTION(9, "SPI6_SCK"),
STM32_FUNCTION(10, "SDMMC2_D2"),
STM32_FUNCTION(13, "SAI4_MCLK_A"),
STM32_FUNCTION(14, "UART7_RX"),
STM32_FUNCTION(16, "EVENTOUT"),
STM32_FUNCTION(17, "ANALOG")
),
STM32_PIN_PKG(
PINCTRL_PIN(20, "PB4"),
STM32MP157CAA | STM32MP157CAC | STM32MP157CAB | STM32MP157CAD,
STM32_FUNCTION(0, "GPIOB4"),
STM32_FUNCTION(1, "TRACED8"),
STM32_FUNCTION(2, "TIM16_BKIN"),
STM32_FUNCTION(3, "TIM3_CH1"),
STM32_FUNCTION(5, "SAI4_CK2"),
STM32_FUNCTION(6, "SPI1_MISO I2S1_SDI"),
STM32_FUNCTION(7, "SPI3_MISO I2S3_SDI"),
STM32_FUNCTION(8, "SPI2_NSS I2S2_WS"),
STM32_FUNCTION(9, "SPI6_MISO"),
STM32_FUNCTION(10, "SDMMC2_D3"),
STM32_FUNCTION(13, "SAI4_SCK_A"),
STM32_FUNCTION(14, "UART7_TX"),
STM32_FUNCTION(16, "EVENTOUT"),
STM32_FUNCTION(17, "ANALOG")
),
STM32_PIN_PKG(
PINCTRL_PIN(21, "PB5"),
STM32MP157CAA | STM32MP157CAC | STM32MP157CAB | STM32MP157CAD,
STM32_FUNCTION(0, "GPIOB5"),
STM32_FUNCTION(1, "ETH_CLK"),
STM32_FUNCTION(2, "TIM17_BKIN"),
STM32_FUNCTION(3, "TIM3_CH2"),
STM32_FUNCTION(4, "SAI4_D1"),
STM32_FUNCTION(5, "I2C1_SMBA"),
STM32_FUNCTION(6, "SPI1_MOSI I2S1_SDO"),
STM32_FUNCTION(7, "I2C4_SMBA"),
STM32_FUNCTION(8, "SPI3_MOSI I2S3_SDO"),
STM32_FUNCTION(9, "SPI6_MOSI"),
STM32_FUNCTION(10, "FDCAN2_RX"),
STM32_FUNCTION(11, "SAI4_SD_A"),
STM32_FUNCTION(12, "ETH1_PPS_OUT"),
STM32_FUNCTION(13, "UART5_RX"),
STM32_FUNCTION(14, "DCMI_D10"),
STM32_FUNCTION(15, "LCD_G7"),
STM32_FUNCTION(16, "EVENTOUT"),
STM32_FUNCTION(17, "ANALOG")
),
STM32_PIN_PKG(
PINCTRL_PIN(22, "PB6"),
STM32MP157CAA | STM32MP157CAC | STM32MP157CAB | STM32MP157CAD,
STM32_FUNCTION(0, "GPIOB6"),
STM32_FUNCTION(2, "TIM16_CH1N"),
STM32_FUNCTION(3, "TIM4_CH1"),
STM32_FUNCTION(5, "I2C1_SCL"),
STM32_FUNCTION(6, "CEC"),
STM32_FUNCTION(7, "I2C4_SCL"),
STM32_FUNCTION(8, "USART1_TX"),
STM32_FUNCTION(10, "FDCAN2_TX"),
STM32_FUNCTION(11, "QUADSPI_BK1_NCS"),
STM32_FUNCTION(12, "DFSDM1_DATIN5"),
STM32_FUNCTION(13, "UART5_TX"),
STM32_FUNCTION(14, "DCMI_D5"),
STM32_FUNCTION(16, "EVENTOUT"),
STM32_FUNCTION(17, "ANALOG")
),
STM32_PIN_PKG(
PINCTRL_PIN(23, "PB7"),
STM32MP157CAA | STM32MP157CAC | STM32MP157CAB | STM32MP157CAD,
STM32_FUNCTION(0, "GPIOB7"),
STM32_FUNCTION(2, "TIM17_CH1N"),
STM32_FUNCTION(3, "TIM4_CH2"),
STM32_FUNCTION(5, "I2C1_SDA"),
STM32_FUNCTION(7, "I2C4_SDA"),
STM32_FUNCTION(8, "USART1_RX"),
STM32_FUNCTION(11, "SDMMC2_D1"),
STM32_FUNCTION(12, "DFSDM1_CKIN5"),
STM32_FUNCTION(13, "FMC_NL"),
STM32_FUNCTION(14, "DCMI_VSYNC"),
STM32_FUNCTION(16, "EVENTOUT"),
STM32_FUNCTION(17, "ANALOG")
),
STM32_PIN_PKG(
PINCTRL_PIN(24, "PB8"),
STM32MP157CAA | STM32MP157CAC | STM32MP157CAB | STM32MP157CAD,
STM32_FUNCTION(0, "GPIOB8"),
STM32_FUNCTION(1, "HDP6"),
STM32_FUNCTION(2, "TIM16_CH1"),
STM32_FUNCTION(3, "TIM4_CH3"),
STM32_FUNCTION(4, "DFSDM1_CKIN7"),
STM32_FUNCTION(5, "I2C1_SCL"),
STM32_FUNCTION(6, "SDMMC1_CKIN"),
STM32_FUNCTION(7, "I2C4_SCL"),
STM32_FUNCTION(8, "SDMMC2_CKIN"),
STM32_FUNCTION(9, "UART4_RX"),
STM32_FUNCTION(10, "FDCAN1_RX"),
STM32_FUNCTION(11, "SDMMC2_D4"),
STM32_FUNCTION(12, "ETH1_GMII_TXD3 ETH1_MII_TXD3 ETH1_RGMII_TXD3"),
STM32_FUNCTION(13, "SDMMC1_D4"),
STM32_FUNCTION(14, "DCMI_D6"),
STM32_FUNCTION(15, "LCD_B6"),
STM32_FUNCTION(16, "EVENTOUT"),
STM32_FUNCTION(17, "ANALOG")
),
STM32_PIN_PKG(
PINCTRL_PIN(25, "PB9"),
STM32MP157CAA | STM32MP157CAC | STM32MP157CAB | STM32MP157CAD,
STM32_FUNCTION(0, "GPIOB9"),
STM32_FUNCTION(1, "HDP7"),
STM32_FUNCTION(2, "TIM17_CH1"),
STM32_FUNCTION(3, "TIM4_CH4"),
STM32_FUNCTION(4, "DFSDM1_DATIN7"),
STM32_FUNCTION(5, "I2C1_SDA"),
STM32_FUNCTION(6, "SPI2_NSS I2S2_WS"),
STM32_FUNCTION(7, "I2C4_SDA"),
STM32_FUNCTION(8, "SDMMC2_CDIR"),
STM32_FUNCTION(9, "UART4_TX"),
STM32_FUNCTION(10, "FDCAN1_TX"),
STM32_FUNCTION(11, "SDMMC2_D5"),
STM32_FUNCTION(12, "SDMMC1_CDIR"),
STM32_FUNCTION(13, "SDMMC1_D5"),
STM32_FUNCTION(14, "DCMI_D7"),
STM32_FUNCTION(15, "LCD_B7"),
STM32_FUNCTION(16, "EVENTOUT"),
STM32_FUNCTION(17, "ANALOG")
),
STM32_PIN_PKG(
PINCTRL_PIN(26, "PB10"),
STM32MP157CAA | STM32MP157CAC | STM32MP157CAB | STM32MP157CAD,
STM32_FUNCTION(0, "GPIOB10"),
STM32_FUNCTION(2, "TIM2_CH3"),
STM32_FUNCTION(4, "LPTIM2_IN1"),
STM32_FUNCTION(5, "I2C2_SCL"),
STM32_FUNCTION(6, "SPI2_SCK I2S2_CK"),
STM32_FUNCTION(7, "DFSDM1_DATIN7"),
STM32_FUNCTION(8, "USART3_TX"),
STM32_FUNCTION(10, "QUADSPI_BK1_NCS"),
STM32_FUNCTION(12, "ETH1_GMII_RX_ER ETH1_MII_RX_ER"),
STM32_FUNCTION(15, "LCD_G4"),
STM32_FUNCTION(16, "EVENTOUT"),
STM32_FUNCTION(17, "ANALOG")
),
STM32_PIN_PKG(
PINCTRL_PIN(27, "PB11"),
STM32MP157CAA | STM32MP157CAC | STM32MP157CAB | STM32MP157CAD,
STM32_FUNCTION(0, "GPIOB11"),
STM32_FUNCTION(2, "TIM2_CH4"),
STM32_FUNCTION(4, "LPTIM2_ETR"),
STM32_FUNCTION(5, "I2C2_SDA"),
STM32_FUNCTION(7, "DFSDM1_CKIN7"),
STM32_FUNCTION(8, "