Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to use the extended GPIO resources of AM335X development board?

Shulou Source: shulou.com Published: 2022-06-02 15:06:24 10月01日 Update

How can I use the extended GPIO of the J11 terminal of the Mir MYD-AM335X-J development board, and what is the corresponding GPIO definition or pin?

Mir technical support replied: this only needs to configure a device tree. Refer to the following way to use TI's pinmux tool for configuration. Once configured, you can use sysfs to control gpio. The specific pin definition can be determined by combining the schematic of the backplane and 01-Documents\ UserManual\ Chinese\ MYC_J335X PIN List.pdf.

& am33xx_pinmux {

Pinctrl-names = "default"

Pinctrl-0 =

Misc_gpios: pinmux_misc_gpios {

Pinctrl-single,pins = <

0x20 (PIN_OUTPUT_PULLUP | MUX_MODE7) / (U10) gpmc_ad8.gpio0 [22] /

0x24 (PIN_OUTPUT_PULLUP | MUX_MODE7) / (T10) gpmc_ad9.gpio0 [23] /

0x28 (PIN_OUTPUT_PULLUP | MUX_MODE7) / (T11) gpmc_ad10.gpio0 [26] /

0x2c (PIN_OUTPUT_PULLUP | MUX_MODE7) / (U12) gpmc_ad11.gpio0 [27] /

0x30 (PIN_INPUT_PULLUP | MUX_MODE7) / (T12) gpmc_ad12.gpio1 [12] /

0x34 (PIN_INPUT_PULLUP | MUX_MODE7) / (R12) gpmc_ad13.gpio1 [13] /

0x38 (PIN_OUTPUT_PULLUP | MUX_MODE7) / (V13) gpmc_ad14.gpio1 [14] /

0x3c (PIN_OUTPUT_PULLUP | MUX_MODE7) / (U13) gpmc_ad15.gpio1 [15] /

0x88 (PIN_OUTPUT_PULLUP | MUX_MODE7) / (T13) gpmc_csn3.gpio2 [0] /

0x8c (PIN_OUTPUT_PULLUP | MUX_MODE7) / (V12) gpmc_clk.gpio2 [1] /

}

& gpio0 {

Status = "okay"

Ti,no-reset-on-init

}

& gpio1 {

Status = "okay"

Ti,no-reset-on-init

}

& gpio2 {

Status = "okay"

Ti,no-reset-on-init

}

After the modification, use the following command to recompile the device tree

Make dtbs

Tags: Configuration device Mir development principle command tool backplane technology technical support mode terminal facet control support compilation resources Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Docker Linux Xiaomi Apple