使用CAN1 RX引脚作为例子
arch\arm\boot\dts\imx6ul-14x14-evk.dts:
pinctrl_flexcan1: flexcan1grp{
fsl,pins = <
MX6UL_PAD_UART3_RTS_B__FLEXCAN1_RX 0x1b020
MX6UL_PAD_UART3_CTS_B__FLEXCAN1_TX 0x1b020
>;
};
而imx6ul-14x14-evk.dts包含imx6ul.dtsi(#include "imx6ul.dtsi"),而imx6ul.dtsi又包含imx6ul-pinfunc.h
arch\arm\boot\dts\imx6ul-pinfunc.h中对FLEXCAN1_RX有如下定义:
/*
* The pin function ID is a tuple of
* <mux_reg conf_reg input_reg mux_mode input_val>
*/
#define MX6UL_PAD_UART3_RTS_B__FLEXCAN1_RX 0x00B0 0x033C 0x0584 0x2 0x0
mux_reg: IOMUXC_SW_MUX_CTL_PAD_UART3_RTS_B: 偏移地址