By Toradex胡珊逢
Verdin AM62 所使用的 AM623/AM625 处理器的 GPIO 控制器如下图所示。GPIO 控制器根据不同的处理器可能有多个模块,AM623/AM625 拥有一个 MCU_GPIO0,一个 GPIO0 和一个 GPIO1 共三个模块。每个模块有 9 个 bank,每个 bank 有 16 个引脚,所以理论上最多有 3x9x46 = 432 个引脚。但 AM623/AM625 SoC 并不能使用所有引脚,SoC 实际可用的为 198 个引脚。Verdin AM62 模块并没有把 SoC 的引脚都引出,因而可用的引脚少于 198。
SODIMM | SoC Ball ID | SoC ball name | PADCONFIG Address | ALT7 |
61 | A6 | MCU_UART0_CTSn | 0x0408401C | MCU_GPIO0_7 |
21 | U24 | GPMC0_AD15 | 0x000F4078 | GPIO0_30 |
19 | A14 | SPI0_CLK | 0x000F41BC | GPIO1_17 |
/* Verdin PWM_3_DSI */
pinctrl_epwm1_a: main-epwm1a-pins-default {
pinctrl-single,pins = <
AM62X_IOPAD(0x01bc, PIN_OUTPUT, 2)
/* (A14) SPI0_CLK.EHRPWM1_A */ /* SODIMM 19 */
;
};
pinctrl_pwm3_dsi_gpio: main-gpio1-17-pins-default {
pinctrl-single,pins = <
AM62X_IOPAD(0x01bc, PIN_INPUT, 7)
/* (A14) SPI0_CLK.GPIO1_17 */ /* SODIMM 19 */
;
};
/* Only these macros are expected be used directly in device tree files */
/* Verdin PWM_3_DSI */
&epwm1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_epwm1_a>;
status = "disabled";
};
/* Verdin PWM_3_DSI */&epwm1 { status = "disabled";};
&main_gpio1 { gpio-line-names = "", /* 0 */ "", "", "", "", "", "", "", "", "", "", /* 10 */ "", "", "", "", "SODIMM_15", "SODIMM_16", "SODIMM_19",
&main_gpio1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_pwm3_dsi_gpio>;};
/* Verdin DSI_1_BKL_EN */
pinctrl_dsi1_bkl_en: main-gpio0-30-pins-default {
pinctrl-single,pins = <
AM62X_IOPAD(0x0078, PIN_INPUT, 7)
/* (U24) GPMC0_AD15.GPIO0_30 */ /* SODIMM 21 */
;
};
&main_gpio0 {
gpio-line-names =
"",
"SODIMM_76",
"SODIMM_21", /* 30 */
&main_gpio0 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_ctrl_sleep_moci>, <&pinctrl_gpio_5>, <&pinctrl_gpio_6>, <&pinctrl_gpio_7>, <&pinctrl_gpio_8>, <&pinctrl_dsi1_bkl_en>;};
pinctrl_sdhci2: main-mmc2-pins-default {
pinctrl-single,pins = <
AM62X_IOPAD(0x120, PIN_INPUT, 0)
/* (C24) MMC2_CMD */ /* WiFi_SDIO_CMD */
AM62X_IOPAD(0x118, PIN_INPUT, 0)
/* (D25) MMC2_CLK */ /* WiFi_SDIO_CLK */
AM62X_IOPAD(0x114, PIN_INPUT, 0)
/* (B24) MMC2_DAT0 */ /* WiFi_SDIO_DATA0 */
AM62X_IOPAD(0x110, PIN_INPUT, 0)
/* (C25) MMC2_DAT1 */ /* WiFi_SDIO_DATA1 */
AM62X_IOPAD(0x10c, PIN_INPUT, 0)
/* (E23) MMC2_DAT2 */ /* WiFi_SDIO_DATA2 */
&mcu_pmx0 { /* Verdin GPIO_9 */ pinctrl_gpio_9: mcu-gpio0-7-pins-default { pinctrl-single,pins = < AM62X_MCU_IOPAD(0x001c, PIN_INPUT, 7) /* (A6) MCU_UART0_CTSn.MCU_GPIO0_7 */ /* SODIMM 61 */ >; };
&mcu_gpio0 { gpio-line-names = "SODIMM_244", "SODIMM_206", "SODIMM_208", "SODIMM_210", "SODIMM_212", "", "", "SODIMM_61",
&mcu_gpio0 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_gpio_1>, <&pinctrl_gpio_2>, <&pinctrl_gpio_3>, <&pinctrl_gpio_4>, <&pinctrl_pcie_1_reset>, <&pinctrl_gpio_9>;};
make ti/k3-am625-verdin-nonwifi-dev.dtb
gpiochip1 - 24 lines:
line 7: "SODIMM_61" unused input active-high
gpiochip2 - 92 lines:
line 30: "SODIMM_21" unused input active-high
gpiochip3 - 52 lines:
line 17: "SODIMM_19" unused input active-high
rootam62:~# gpioset 3 17=1
-rootam62:~# gpioset 2 30=1
-rootam62:~# gpioset 1 7=1
-
rootam62:~# gpioset 3 17=0
-rootam62:~# gpioset 2 30=0
-rootam62:~# gpioset 1 7=0
-
gpio-leds {
compatible = "gpio-leds";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpio_9>;
led-yellow {
gpios = <&mcu_gpio0 7 GPIO_ACTIVE_HIGH>;
default-state = "on";
label = "status";
};
};
作者: hai.qin_651820742, 来源:面包板社区
链接: https://mbb.eet-china.com/blog/uid-me-1864768.html
版权声明:本文为博主原创,未经本人允许,禁止转载!
文章评论(0条评论)
登录后参与讨论