工具与软件:
大家好、我目前使用的是 SK-AM69、我需要使用的模块使用 SPI。
我发现有一些 GPIO 引脚可多路复用为40引脚接头上的 SPI。
我想在 Linux (在 main 域运行)上控制它们、但它们是 WKUP 域 GPIO。
是否有办法控制主域中的 WKUP 域 GPIO?

This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
您好、Tanmay、
感谢您的快速响应。
我签出了上述文件、并将其添加到了设备树中。
&mcu_spi0 {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&mcu_spi1_pins_default>;
spidev@0 {
compatible = "rohm,dh2228fv";
spi-max-frequency = <20000000>;
reg = <0>;
};
};
&wkup_pmx2 {
bootph-all;
#if 1
mcu_spi1_pins_default: mcu_spi1-default-pins {
pinctrl-single,pins = <
J784S4_WKUP_IOPAD(0x038, PIN_INPUT, 0) /* (G38) MCU_SPI0_CLK */
J784S4_WKUP_IOPAD(0x044, PIN_INPUT, 0) /* (F37) MCU_SPI0_CS0 */
J784S4_WKUP_IOPAD(0x03c, PIN_INPUT, 0) /* (H36) MCU_SPI0_D0 */
J784S4_WKUP_IOPAD(0x040, PIN_INPUT, 0) /* (J38) MCU_SPI0_D1 */
>;
};
#endif
}
当我启动 Linux 内核时、它成功探测并显示器件路径(/dev/spidev1.0)。

但当我尝试在用户空间上通过此器件测试 SPI 通信时、器件会冻结、并且我需要使用重启开关强制重启它。
我使用(https://github.com/torvalds/linux/blob/master/tools/spi/spidev_test.c)测试 SPI 通信。
我发现 MCU_SPI1_*引脚连接到 CPLD。
这是否会导致冻结?
此致、
Minsoo
您好!
我发现 spidev 的常见问题解答。 您能不能看一下下面的内容、看看是否遗漏了什么。
我发现 MCU_SPI1_*引脚连接到 CPLD。
什么是 CPLD?
此致、
Tanmay