SLAAEJ0A November 2023 – April 2026 AM625 , AM62L , MSPM0C1105 , MSPM0C1106 , MSPM0L1306
Follow the steps provided on AM62L Getting Started Guide.
Processor SDK Linux for AM62L Version 11.0.15 was used in the experiment below.
Setup the SPI driver in Linux by applying the following patch in ti-linux-kernel repo within AM62L SDK.
Note: The HDMI is disabled in the patch provided below. This is because, on the TMDS62LEVM, the HDMI is muxed with the Expansion header and only one of them can be used at a time.
diff --git a/arch/arm64/boot/dts/ti/k3-am62l3-evm.dts b/arch/arm64/boot/dts/ti/k3-am62l3-evm.dts
index 2dd056ce0538..6cf837274c6e 100644
--- a/arch/arm64/boot/dts/ti/k3-am62l3-evm.dts
+++ b/arch/arm64/boot/dts/ti/k3-am62l3-evm.dts
@@ -36,6 +36,7 @@ memory@80000000 {
hdmi0: connector-hdmi {
compatible = "hdmi-connector";
+ status = "disabled";
label = "hdmi";
type = "a";
@@ -389,6 +390,15 @@ AM62PX_IOPAD(0x0188, PIN_INPUT, 0) /* (A9) MCASP0_AXR1 */
>;
};
+ main_spi1_pins_default: main-spi1-pins-default {
+ pinctrl-single,pins = <
+ AM62LX_IOPAD(0x008c, PIN_OUTPUT, 4) /* (H22) SPI1_CLK */
+ AM62LX_IOPAD(0x0080, PIN_INPUT, 4) /* (K22) SPI1_D0 */
+ AM62LX_IOPAD(0x0084, PIN_OUTPUT, 4) /* (J23) SPI1_D1 */
+ AM62LX_IOPAD(0x0088, PIN_OUTPUT, 4) /* (K23) SPI1_CS0 */
+ >;
+ };
+
pmic_irq_pins_default: pmic-irq-default-pins {
pinctrl-single,pins = <
AM62LX_IOPAD(0x01e8, PIN_INPUT, 0) /* (C8) EXTINTn */
@@ -410,6 +420,17 @@ &main_uart0 {
bootph-all;
};
+&main_spi1 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_spi1_pins_default>;
+ spidev@0 {
+ spi-max-frequency = <24000000>;
+ reg = <0>;
+ compatible = "rohm,dh2228fv";
+ };
+};
+
&main_uart1 {
pinctrl-names = "default";
pinctrl-0 = <&main_uart1_pins_default>;
@@ -488,11 +509,14 @@ exp2: gpio@23 {
sii9022: bridge-hdmi@3b {
compatible = "sil,sii9022";
+ status="disabled";
reg = <0x3b>;
interrupt-parent = <&exp1>;
interrupts = <16 IRQ_TYPE_EDGE_FALLING>;
#sound-dai-cells = <0>;
sil,i2s-data-lanes = < 0 >;
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_dpi_pins_default>;
bootph-all;
ports {
@@ -774,8 +798,6 @@ partition@7fe0000 {
&dss {
status = "okay";
- pinctrl-names = "default";
- pinctrl-0 = <&main_dpi_pins_default>;
bootph-all;
};
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 94dfc265a61c..157d0d62fb53 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -1828,3 +1828,5 @@ CONFIG_CORESIGHT_STM=m
CONFIG_CORESIGHT_CPU_DEBUG=m
CONFIG_CORESIGHT_CTI=m
CONFIG_MEMTEST=y
+CONFIG_UHID=y
+CONFIG_SPI_SPIDEV=y
\ No newline at end of file
Rebuild Linux and install Image, dtbs and modules on SD/eMMC.
Use and compile the C file linked here in Linux Userspace
For the Multi Byte Example, there are 2 methods of receiving the data at the controller's end. One method is to send the data in 2 clocks - 8 bit each from the MSPM0. The other option is to send the entire data in a single clock burst of double duration. Both the methods have been tested and can be implemented from the C files linked here.
Note: In case of difficulty while running the SPI script in Linux Userspace for higher SPI frequencies, connect the Ground pins of the MSPM0 and AM62L.