Hi, I’m the Toradex AI Assistant.
I might make mistakes or occasionally get you wrong. Our support team will step in if needed.
The switches on the Verdin Development Board (SW_4, SW_5, SW_6, SW_7, SW_8, SW_9, SW_10, SW_11) are connected to specific connectors but are not directly mapped to SODIMM pins. These switches are carrier board-specific features that connect to the module through GPIO breakout connectors.
Understanding the Switch Configuration
The switches you mentioned are connected to header connectors on the Verdin Development Board, not directly to SODIMM pins. This is why you don’t see them listed in your gpioinfo output with SODIMM numbers.
Solution: Device Tree Configuration
To use these switches in your code, you need to create a device tree overlay that maps these switches to available GPIO pins. Based on the community discussion, here’s the approach (1):
1. Create a Device Tree Overlay
You’ll need to create a device tree overlay that configures the pinmux and GPIO settings. Here’s the general structure (1):
/dts-v1/;
/plugin/;
#include "imx8mp-pinfunc.h"
/ {
compatible = "toradex,verdin-imx8mp";
};
&iomuxc {
pinctrl_gpio_switches: gpio_switches_grp {
fsl,pins = <
/* Configure your chosen GPIO pins for switches */
MX8MP_IOMUXC_GPIO1_IO00__GPIO1_IO00 0x140
/* Add more pins as needed */
>;
};
};
&gpio1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpio_switches>;
switch_hog: switches {
gpio-hog;
gpios = <0 GPIO_ACTIVE_HIGH>;
input;
line-name = "switch_input";
};
};
2. Device Tree Compilation Process
To compile and deploy your device tree overlay (2):
$ make DTC_FLAGS="-@" freescale/<your-custom-overlay>.dtb
3. Key Points for Implementation
- Pin Selection: Choose available GPIO pins from your
gpioinfooutput that show as “unnamed” and “input” (1) - Pinmux Configuration: Configure the pinmux in the
&iomuxcnode (3) - GPIO Configuration: Set up the GPIO behavior in the appropriate GPIO bank node (3)
Recommended Approach
Since the switches are carrier board-specific and not directly connected to SODIMM pins, you should:
- Identify available GPIO pins from your
gpioinfooutput - Physically connect your switches to these GPIO pins via the GPIO breakout connectors
- Create a device tree overlay to configure these pins appropriately
- Access them in your application code using the configured GPIO numbers
To get more specific guidance for your exact hardware configuration, could you let me know which version of the OS you are running and confirm you’re using the Verdin iMX8M Plus with the Verdin Development Board?
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.