Part Number: AM6548
Hello,
We are having trouble testing SPI loopback using spidev on mcu_spi1 on the AM65x IDK. Using the following devicetree changes, we've enabled mcu_spi1 and spidev:
diff --git a/arch/arm64/boot/dts/ti/k3-am654-gp.dtso b/arch/arm64/boot/dts/ti/k3-am654-gp.dtso
index 3cd5d3c..54aa405 100644
--- a/arch/arm64/boot/dts/ti/k3-am654-gp.dtso
+++ b/arch/arm64/boot/dts/ti/k3-am654-gp.dtso
@@ -131,3 +131,36 @@
tx-num-evt = <32>;
rx-num-evt = <32>;
};
+
+&wkup_pmx0 {
+ mcu_spi1_pins_default: mcu_spi1_pins_default {
+ pinctrl-single,pins = <
+ AM65X_WKUP_IOPAD(0x00b0, PIN_INPUT, 1) /* (AF4) WKUP_GPIO0_0.MCU_SPI1_CLK */
+ AM65X_WKUP_IOPAD(0x00b4, PIN_INPUT, 1) /* (AF3) WKUP_GPIO0_1.MCU_SPI1_D0 */
+ AM65X_WKUP_IOPAD(0x00b8, PIN_INPUT, 1) /* (AE3) WKUP_GPIO0_2.MCU_SPI1_D1 */
+ AM65X_WKUP_IOPAD(0x00bc, PIN_OUTPUT, 1) /* (AD1) WKUP_GPIO0_3.MCU_SPI1_CS0 */
+ >;
+ };
+};
+
+
+/* MikroBus */
+&mcu_spi1 {
+ status = "okay";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ pinctrl-0 = <&mcu_spi1_pins_default>;
+ pinctrl-names = "default";
+ ti,spi-num-cs = <1>;
+ ti,hwmods = "mcu_spi1";
+ ti,pindir-d0-out-d1-in = <1>;
+
+ /* mcu_spi1 enumerates as spi1 */
+ spidev1_0: spidev1@0 {
+ status = "okay";
+ compatible = "spidev";
+
+ reg = <0>;
+ spi-max-frequency = <48000000>;
+ };
+};
When connecting the MISO and MOSI signals and running "/opt/ltp/testcases/bin/ddt/spidev_test -D /dev/spidev1.0" included in the Linux SDK, we see no RX activity.
Has mcu_spi1 or any mcu_spi interface been validated in Linux?
Thanks,
Matt McKee
