This is an automated email from the ASF dual-hosted git repository. acassis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 762d2b7958dfd0fa94bec92d647b6ecb30755ffd Author: Ulaş Sertan Kemeç <[email protected]> AuthorDate: Thu Sep 10 10:35:25 2026 +0300 Documentation/am67: Document GPIO and SPI support on t3-gem-o1. Add a Peripheral Support section to the board page listing the GPIO and MCU_MCSPI0 drivers, and replace the "UART console only" warning on both the chip and board pages -- it no longer describes the port. The replacement states what actually constrains the port: NuttX runs on the R5F under RemoteProc and depends on the bootloader or Linux Device Manager having powered and clocked the peripherals, because there is no TISCI client yet. Assisted-by: Claude Code:claude-opus-5 Signed-off-by: Ulaş Sertan Kemeç <[email protected]> --- .../platforms/arm/am67/boards/t3-gem-o1/index.rst | 18 +++- Documentation/platforms/arm/am67/index.rst | 8 +- arch/arm/src/am67/am67_pinmux.c | 116 +++++++++++++++++++-- boards/arm/am67/t3-gem-o1/configs/nsh/defconfig | 2 +- 4 files changed, 129 insertions(+), 15 deletions(-) diff --git a/Documentation/platforms/arm/am67/boards/t3-gem-o1/index.rst b/Documentation/platforms/arm/am67/boards/t3-gem-o1/index.rst index c660fa9bf4a..5b1eee618a0 100644 --- a/Documentation/platforms/arm/am67/boards/t3-gem-o1/index.rst +++ b/Documentation/platforms/arm/am67/boards/t3-gem-o1/index.rst @@ -76,9 +76,11 @@ Features .. warning:: - This board currently only supports a basic implementation of NuttX with - only UART console as a supported peripheral. Please see the contributing - documentation if you would like to help contribute to the support. + NuttX runs on the main-domain R5F core, loaded by U-Boot or Linux via + RemoteProc. It relies on the bootloader / Linux Device Manager to have + powered and clocked the peripherals it uses (NuttX does not yet run a TISCI + client of its own). Support is a work in progress -- please see the + contributing documentation if you would like to help. Serial console ============== @@ -89,6 +91,16 @@ HAT: - **UART-MAIN1 TX:** GPIO-14 - **UART-MAIN1 RX:** GPIO-15 +Peripheral Support +================== + +Beyond the serial console, the following peripherals have drivers for the +main-domain R5F core: + +- **GPIO:** pad configuration and read/write over the AM67 GPIO controller. +- **SPI:** MCU_MCSPI0 master, with the hardware chip-select driven per channel + (used for the on-board ICM-20948 IMU and LPS22DF barometer). + Installation ============ diff --git a/Documentation/platforms/arm/am67/index.rst b/Documentation/platforms/arm/am67/index.rst index 9d8fd59c09d..d98afe7dc13 100644 --- a/Documentation/platforms/arm/am67/index.rst +++ b/Documentation/platforms/arm/am67/index.rst @@ -25,9 +25,11 @@ The TI AM67 platform integrates a dual‑domain architecture comprising: .. warning:: - This chip currently only supports a basic implementation of NuttX with - only UART console as a supported peripheral. Please see the contributing - documentation if you would like to help contribute to the support. + NuttX runs on the Cortex-R5F cores, loaded by U-Boot or Linux via + RemoteProc, and relies on the bootloader / Linux Device Manager to have + powered and clocked the peripherals it uses (NuttX does not yet run a TISCI + client of its own). Support is a work in progress -- please see the + contributing documentation if you would like to help. Supported Boards ================ diff --git a/arch/arm/src/am67/am67_pinmux.c b/arch/arm/src/am67/am67_pinmux.c index b68da465fc5..c0e2cdd8d46 100644 --- a/arch/arm/src/am67/am67_pinmux.c +++ b/arch/arm/src/am67/am67_pinmux.c @@ -10,7 +10,7 @@ * "License"); you may not use this file except in compliance with the * License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT @@ -68,6 +68,42 @@ static struct pinmux_conf_s g_am67_pinmux_conf[] = {PINMUX_END, PINMUX_END} }; +static struct pinmux_conf_s g_am67_epwm0_pinmux_conf[] = +{ + /* EPWM0 A output pin (B20, mode 2 = EHRPWM0_A) */ + + { + PIN_SPI0_CS0, + (PIN_MODE(2) | PIN_PULL_DISABLE) + }, + + /* EPWM0 B output pin (C20, mode 2 = EHRPWM0_B) */ + + { + PIN_SPI0_CS1, + (PIN_MODE(2) | PIN_PULL_DISABLE) + }, + {PINMUX_END, PINMUX_END} +}; + +static struct pinmux_conf_s g_am67_epwm1_pinmux_conf[] = +{ + /* EPWM1 A output pin (D20, mode 2 = EHRPWM1_A) */ + + { + PIN_SPI0_CLK, + (PIN_MODE(2) | PIN_PULL_DISABLE) + }, + + /* EPWM1 B output pin (E19, mode 2 = EHRPWM1_B) */ + + { + PIN_SPI0_D0, + (PIN_MODE(2) | PIN_PULL_DISABLE) + }, + {PINMUX_END, PINMUX_END} +}; + static struct pinmux_conf_s g_am67_mcu_spi_pinmux_conf[] = { /* MCU_SPI0_CLK */ @@ -107,13 +143,6 @@ static struct pinmux_conf_s g_am67_mcu_spi_pinmux_conf[] = (PIN_MODE(0) | PIN_PULL_DISABLE) }, - /* MCU_SPI0_CS2 (HAT spidev, channel 2) - WKUP_UART0_RXD pad, mode 2 */ - - { - PIN_WKUP_UART0_RXD, - (PIN_MODE(2) | PIN_PULL_DISABLE) - }, - /* MCU_SPI0_CS3 (ICM20948, channel 3) - MCU_MCAN0_TX pad, mode 2 */ { @@ -130,6 +159,42 @@ static struct pinmux_conf_s g_am67_mcu_spi_pinmux_conf[] = {PINMUX_END, PINMUX_END} }; +static struct pinmux_conf_s g_am67_mcu_i2c_pinmux_conf[] = +{ +#ifdef CONFIG_AM67_I2C0 + /* MCU_I2C0_SCL */ + + { + PIN_MCU_I2C0_SCL, + (PIN_MODE(0) | PIN_INPUT_ENABLE | PIN_PULL_DISABLE) + }, + + /* MCU_I2C0_SDA */ + + { + PIN_MCU_I2C0_SDA, + (PIN_MODE(0) | PIN_INPUT_ENABLE | PIN_PULL_DISABLE) + }, +#endif + +#ifdef CONFIG_AM67_WKUP_I2C0 + /* WKUP_I2C0_SCL */ + + { + PIN_WKUP_I2C0_SCL, + (PIN_MODE(0) | PIN_INPUT_ENABLE | PIN_PULL_DISABLE) + }, + + /* WKUP_I2C0_SDA */ + + { + PIN_WKUP_I2C0_SDA, + (PIN_MODE(0) | PIN_INPUT_ENABLE | PIN_PULL_DISABLE) + }, +#endif + {PINMUX_END, PINMUX_END} +}; + /**************************************************************************** * Private Functions ****************************************************************************/ @@ -260,3 +325,38 @@ void am67_spi_pinmux_init(void) { am67_mcu_pinmux_config(g_am67_mcu_spi_pinmux_conf); } + +/**************************************************************************** + * Name: am67_i2c_pinmux_init + * + * Description: + * Configure MCU_I2C0 pin multiplexing for onboard sensors. + * + ****************************************************************************/ + +void am67_i2c_pinmux_init(void) +{ + am67_mcu_pinmux_config(g_am67_mcu_i2c_pinmux_conf); +} + +/**************************************************************************** + * Name: am67_epwm_pinmux_init + * + * Description: + * Configure the output pin multiplexing (A and B pads) for the given + * EPWM instance. + * + ****************************************************************************/ + +void am67_epwm_pinmux_init(int epwm) +{ + if (epwm == 0) + { + am67_pinmux_config(g_am67_epwm0_pinmux_conf); + } + else + { + am67_pinmux_config(g_am67_epwm1_pinmux_conf); + } +} + diff --git a/boards/arm/am67/t3-gem-o1/configs/nsh/defconfig b/boards/arm/am67/t3-gem-o1/configs/nsh/defconfig index 68d2167dbad..bb1161f5b32 100644 --- a/boards/arm/am67/t3-gem-o1/configs/nsh/defconfig +++ b/boards/arm/am67/t3-gem-o1/configs/nsh/defconfig @@ -47,6 +47,6 @@ CONFIG_SCHED_HAVE_PARENT=y CONFIG_SCHED_WAITPID=y CONFIG_SIG_DEFAULT=y CONFIG_SPI=y -CONFIG_SPI_DRIVER=y CONFIG_SYSTEM_NSH=y +CONFIG_SYSTEM_SPITOOL=y CONFIG_TESTING_OSTEST=y
