This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] SK-AM62B-P1:帮助配置引脚

Guru**** 2466550 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1343219/sk-am62b-p1-help-configure-pins

器件型号:SK-AM62B-P1

我不理解在引脚配置中使用的十六进制数:

main_mmc2_pins_default: main-mmc2-pins-default {
		pinctrl-single,pins = <
			AM62X_IOPAD(0x120, PIN_INPUT, 0) /* (C24) MMC2_CMD */
			AM62X_IOPAD(0x118, PIN_INPUT, 0) /* (D25) MMC2_CLK */
			AM62X_IOPAD(0x114, PIN_INPUT, 0) /* (B24) MMC2_DAT0 */
			AM62X_IOPAD(0x110, PIN_INPUT, 0) /* (C25) MMC2_DAT1 */
			AM62X_IOPAD(0x10c, PIN_INPUT, 0) /* (E23) MMC2_DAT2 */
			AM62X_IOPAD(0x108, PIN_INPUT, 0) /* (D24) MMC2_DAT3 */
			AM62X_IOPAD(0x11c, PIN_INPUT, 0) /* (#N/A) MMC2_CLKB */
		>;
	};

我尝试使用"TCA64WRARGJR" IO 扩展器上的引脚"IO_EXP_TEST_LED"、但不知道我需要什么配置。

我在"k3-am625-sk.dts"上找到以下内容:

&main_i2c1 {
	exp1: gpio@22 {
		compatible = "ti,tca6424";
		reg = <0x22>;
		gpio-controller;
		#gpio-cells = <2>;
		gpio-line-names = "GPIO_CPSW2_RST", "GPIO_CPSW1_RST",
				   "PRU_DETECT", "MMC1_SD_EN",
				   "VPP_LDO_EN", "EXP_PS_3V3_En",
				   "EXP_PS_5V0_En", "EXP_HAT_DETECT",
				   "GPIO_AUD_RSTn", "GPIO_eMMC_RSTn",
				   "UART1_FET_BUF_EN", "WL_LT_EN",
				   "GPIO_HDMI_RSTn", "CSI_GPIO1",
				   "CSI_GPIO2", "PRU_3V3_EN",
				   "HDMI_INTn", "PD_I2C_IRQ",
				   "MCASP1_FET_EN", "MCASP1_BUF_BT_EN",
				   "MCASP1_FET_SEL", "UART1_FET_SEL",
				   "TSINT#", "IO_EXP_TEST_LED";

		interrupt-parent = <&main_gpio1>;
		interrupts = <23 IRQ_TYPE_EDGE_FALLING>;
		interrupt-controller;
		#interrupt-cells = <2>;

		pinctrl-names = "default";
		pinctrl-0 = <&main_gpio1_ioexp_intr_pins_default>;
	};
};

后来我看到像这样使用了 phandle"exp1":

wlan_lten: regulator-6 {
		compatible = "regulator-fixed";
		regulator-name = "wlan_lten";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		vin-supply = <&vcc_3v3_sys>;
		gpios = <&exp1 11 GPIO_ACTIVE_LOW>;
	};

那么、我想我必须做一些类似的事情吗?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Alexandre、

    [quote userid="59867" url="~/support/processors-group/processors/f/processors-forum/1343219/sk-am62b-p1-help-configure-pins 我不明白引脚配置中使用的十六进制数:

    十六进制数等于引脚 PADCONFIG 寄存器的偏移。

    [quote userid="59867" url="~/support/processors-group/processors/f/processors-forum/1343219/sk-am62b-p1-help-configure-pins 这样我想我必须做类似的事情吗?

    是或否、具体取决于您希望从 Linux 用户空间或内核空间使用此 IO_EXP_TEST_LED 引脚的确切方式。 此"&exp1 11"示例仅用于内核中的用途、当您想要控制 Linux 用户空间中的 exp1 GPIO 时、不需要该示例。