Thank you for providing the system information! Now I can help you configure the switches on your Verdin Development Board with the Verdin iMX8M Plus SoM running Torizon OS 7.5.0.
Understanding the Issue
The switches on the Verdin Development Board are carrier board-specific components that need to be configured through device tree overlays to be accessible as GPIO lines in your application(1). Since they don’t appear in your gpioinfo output with SODIMM names, they likely need proper device tree configuration.
Device Tree Overlay Configuration
To configure the switches as GPIO inputs, you’ll need to create a device tree overlay(1). Here’s the general approach:
1. Create a Device Tree Overlay
You’ll need to write an overlay that configures the pins for GPIO function(1). The overlay structure should include:
/dts-v1/; // Declares the syntax version of the DTS file.
/plugin/; // Indicates that this is a Device Tree Overlay.
// Header file with GPIO macros
#include <dt-bindings/gpio/gpio.h>
// Header file with SoC-specific pinmux macros
#include "k3-pinctrl.h"
/ {
compatible = "toradex,verdin-am62"; // Set hardware compatibility
};
2. Define Pin Control Groups
Create a function multiplexing group for your switches(1):
&main_pmx0 {
pinctrl_sodimm_202_gpio: sodimm_202_gpio_grp {
pinctrl-single,pins = <
AM62X_IOPAD(0x001c, PIN_INPUT, 7) /* (J23) OSPI0_D4.GPIO0_7 */ /* SODIMM 202 */
>;
};
};
3. Activate the GPIO Controller
Add your pin group to the GPIO controller(1):
&main_gpio0 {
pinctrl-0 = <&pinctrl_ctrl_sleep_moci>,
<&pinctrl_gpio_5>,
<&pinctrl_gpio_6>,
<&pinctrl_gpio_7>,
<&pinctrl_gpio_8>,
<&pinctrl_sodimm_202_gpio>;
};
Build and Deploy Process
For Torizon OS, you can use TorizonCore Builder to apply device tree overlays(1). The process involves:
- Creating a YAML configuration file
- Specifying the overlay in the configuration
- Building a custom Torizon OS image with your overlay(1)
Additional Considerations
Based on community discussions, when working with GPIO configuration through device tree overlays(2):
- You may need to disable conflicting interfaces that use the same pins
- Ensure proper pin control settings are applied
- Include necessary header files for compilation(2)
Next Steps
To provide more specific guidance, I would need to know:
- Which specific switches you want to configure (SW1, SW2, SW3, or SW4)
- The exact pin connections from the Verdin Development Board schematic
The switches should be documented in the Verdin Development Board datasheet with their specific GPIO connections, which will determine the exact pin control configuration needed.
Best regards, Toradex AI Assistant.
If I answered your question, please tick the “Solution” checkbox.
For follow-up questions to me, please use @ToradexAI in your post.