drivers/pinctrl/stm32/pinctrl-stm32mp135.c

Source file repositories/reference/linux-study-clean/drivers/pinctrl/stm32/pinctrl-stm32mp135.c

File Facts

System
Linux kernel
Corpus path
drivers/pinctrl/stm32/pinctrl-stm32mp135.c
Extension
.c
Size
49768 bytes
Lines
1681
Domain
Driver Families
Bucket
drivers/pinctrl
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) STMicroelectronics 2021 - All Rights Reserved
 * Author: Alexandre Torgue <alexandre.torgue@foss.st.com> for STMicroelectronics.
 */
#include <linux/init.h>
#include <linux/of.h>
#include <linux/platform_device.h>

#include "pinctrl-stm32.h"

static const struct stm32_desc_pin stm32mp135_pins[] = {
	STM32_PIN(
		PINCTRL_PIN(0, "PA0"),
		STM32_FUNCTION(0, "GPIOA0"),
		STM32_FUNCTION(2, "TIM2_CH1"),
		STM32_FUNCTION(3, "TIM5_CH1"),
		STM32_FUNCTION(4, "TIM8_ETR"),
		STM32_FUNCTION(5, "TIM15_BKIN"),
		STM32_FUNCTION(7, "SAI1_SD_B"),
		STM32_FUNCTION(9, "UART5_TX"),
		STM32_FUNCTION(12, "ETH1_MII_CRS"),
		STM32_FUNCTION(13, "ETH2_MII_CRS"),
		STM32_FUNCTION(17, "ANALOG")
	),
	STM32_PIN(
		PINCTRL_PIN(1, "PA1"),
		STM32_FUNCTION(0, "GPIOA1"),
		STM32_FUNCTION(2, "TIM2_CH2"),
		STM32_FUNCTION(3, "TIM5_CH2"),
		STM32_FUNCTION(4, "LPTIM3_OUT"),
		STM32_FUNCTION(5, "TIM15_CH1N"),
		STM32_FUNCTION(7, "DFSDM1_CKIN0"),
		STM32_FUNCTION(8, "USART2_RTS USART2_DE"),
		STM32_FUNCTION(12, "ETH1_MII_RX_CLK ETH1_RGMII_RX_CLK ETH1_RMII_REF_CLK"),
		STM32_FUNCTION(17, "ANALOG")
	),
	STM32_PIN(
		PINCTRL_PIN(2, "PA2"),
		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(12, "ETH1_MDIO"),
		STM32_FUNCTION(17, "ANALOG")
	),
	STM32_PIN(
		PINCTRL_PIN(3, "PA3"),
		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(6, "SPI1_MOSI I2S1_SDO"),
		STM32_FUNCTION(7, "SAI1_FS_B"),
		STM32_FUNCTION(8, "USART2_RX"),
		STM32_FUNCTION(12, "ETH1_MII_COL"),
		STM32_FUNCTION(13, "ETH2_MII_COL"),
		STM32_FUNCTION(17, "ANALOG")
	),
	STM32_PIN(
		PINCTRL_PIN(4, "PA4"),
		STM32_FUNCTION(0, "GPIOA4"),
		STM32_FUNCTION(3, "TIM5_ETR"),
		STM32_FUNCTION(4, "USART2_CK"),
		STM32_FUNCTION(5, "SAI1_SCK_B"),
		STM32_FUNCTION(6, "SPI1_NSS I2S1_WS"),
		STM32_FUNCTION(7, "DFSDM1_CKIN1"),
		STM32_FUNCTION(11, "ETH1_PPS_OUT"),
		STM32_FUNCTION(12, "ETH2_PPS_OUT"),
		STM32_FUNCTION(13, "SAI1_SCK_A"),
		STM32_FUNCTION(17, "ANALOG")
	),
	STM32_PIN(
		PINCTRL_PIN(5, "PA5"),
		STM32_FUNCTION(0, "GPIOA5"),
		STM32_FUNCTION(2, "TIM2_CH1 TIM2_ETR"),
		STM32_FUNCTION(3, "USART2_CK"),
		STM32_FUNCTION(4, "TIM8_CH1N"),
		STM32_FUNCTION(5, "SAI1_D1"),
		STM32_FUNCTION(6, "SPI1_NSS I2S1_WS"),
		STM32_FUNCTION(7, "SAI1_SD_A"),
		STM32_FUNCTION(11, "ETH1_PPS_OUT"),
		STM32_FUNCTION(12, "ETH2_PPS_OUT"),
		STM32_FUNCTION(17, "ANALOG")
	),
	STM32_PIN(
		PINCTRL_PIN(6, "PA6"),

Annotation

Implementation Notes