Other Parts Discussed in Thread: TDA4VL, TDA4VM
Tool/software:
As stated in the title, I am on the J721S2XSOMG01EVM. I have followed the steps outlined in "SPI Enablement & Validation on TDA4 Family" (document SPRAD26) but am not seeing the SPI device in sysfs. This document isn't written explicitly for this platform and I'm not sure what I am missing.
Below are the changes I made before building Linux and installing it on the SD card I'm booting from. At the very end is the output from the procfs for the SPI peripheral instance in question.
I'm happy to provide more information if needed. Some possible solutions in the meantime or directions to places to look would be incredibly appreciated.
diff --git a/arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dts b/arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dts
index 1264c2d86..32eb6bf38 100644
--- a/arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dts
+++ b/arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dts
@@ -160,6 +160,18 @@ dp0_connector_in: endpoint {
};
};
};
+
+ spi6_pins_default: spi6_pins_default {
+ pinctrl-single,pins = <
+ J721S2_IOPAD(0x0C4, PIN_INPUT, 8) /* (AB26) SPI6_D0 */
+ J721S2_IOPAD(0x030, PIN_INPUT, 8) /* (T26) SPI6_CLK */
+ J721S2_IOPAD(0x078, PIN_INPUT, 8) /* (Y25) SPI6_CS1 */
+ J721S2_IOPAD(0x074, PIN_INPUT, 8) /* (R28) SPI6_D1 */
+ J721S2_IOPAD(0x080, PIN_INPUT, 8) /* (U26) SPI6_CS2 */
+ J721S2_IOPAD(0x084, PIN_INPUT, 8) /* (AA28) SPI6_CS3 */
+ J721S2_IOPAD(0x034, PIN_INPUT, 8) /* (AD24) SPI6_CS0 */
+ >;
+ };
};
&main_i2c4 {
@@ -781,3 +793,14 @@ K3_TS_OFFSET(25, 17)
>;
};
};
+
+&main_spi6 {
+ pinctrl-names = "default";
+ pinctrl-0 = <spi6_pins_default>;
+ status = "okay";
+ spidev@0 {
+ spi-max-frequency = <24000000>;
+ reg = <0>;
+ compatible = "linux,spidev";
+ };
+};
diff --git a/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi b/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
index 7b844a8f0..9bd943326 100644
--- a/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
@@ -1867,7 +1867,7 @@ main_spi6: spi@2160000 {
#size-cells = <0>;
power-domains = <&k3_pds 345 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 345 1>;
- status = "disabled";
+ // status = "disabled";
};
main_spi7: spi@2170000 {
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index f8047c965..8508ecf2b 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -579,7 +579,7 @@ CONFIG_SPI_MESON_SPICC=m
CONFIG_SPI_MESON_SPIFC=m
CONFIG_SPI_MT65XX=y
CONFIG_SPI_MTK_NOR=m
-CONFIG_SPI_OMAP24XX=m
+CONFIG_SPI_OMAP24XX=y
CONFIG_SPI_ORION=y
CONFIG_SPI_PL022=y
CONFIG_SPI_ROCKCHIP=y
@@ -595,7 +595,7 @@ CONFIG_SPI_SH_MSIOF=m
CONFIG_SPI_SUN6I=y
CONFIG_SPI_TEGRA210_QUAD=m
CONFIG_SPI_TEGRA114=m
-CONFIG_SPI_SPIDEV=m
+CONFIG_SPI_SPIDEV=y
CONFIG_SPI_SLAVE=y
CONFIG_SPMI=y
CONFIG_SPMI_MTK_PMIF=m
root@j721s2-evm:~# cat /proc/device-tree/bus@100000/spi@2160000/status
disabledroot@j721s2-evm:~#