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.

J784S4XEVM: Device tree of main_spi5 on J26, but in /dev can not find the spidev**

Part Number: J784S4XEVM

Tool/software:

Hi  Ti!

      We used the sdk ti-processor-sdk-linux-adas-j784s4-evm-10_01_00_05 to test spi5 of  J784S4-evm board ,

We had changed the dts file \board-support\ti-linux-kernel-6.6.44+git-ti\arch\arm64\boot\dts\ti\k3-j784s4-evm.dts ,  the diff is:

diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts b/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts
index 56a037532..e8df2cea0 100644
--- a/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts
+++ b/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts
@@ -356,19 +356,6 @@ mux1: mux-controller {
 		mux-gpios = <&exp2 14 GPIO_ACTIVE_HIGH>;
 		idle-state = <1>;
 	};
-
-	codec_audio: sound {
-		compatible = "ti,j7200-cpb-audio";
-		model = "j784s4-cpb";
-
-		ti,cpb-mcasp = <&mcasp0>;
-		ti,cpb-codec = <&pcm3168a_1>;
-
-		clocks = <&k3_clks 265 0>, <&k3_clks 265 1>,
-			 <&k3_clks 157 34>, <&k3_clks 157 63>;
-		clock-names = "cpb-mcasp-auxclk", "cpb-mcasp-auxclk-48000",
-			      "cpb-codec-scki", "cpb-codec-scki-48000";
-	};
 };
 
 &wkup_gpio0 {
@@ -465,13 +452,6 @@ J784S4_IOPAD(0x0ec, PIN_OUTPUT, 6) /* (AN37) TIMER_IO1.USB0_DRVVBUS */
 		>;
 	};
 
-	main_mcan4_pins_default: main-mcan4-default-pins {
-		pinctrl-single,pins = <
-			J784S4_IOPAD(0x088, PIN_INPUT, 0) /* (AF36) MCAN4_RX */
-			J784S4_IOPAD(0x084, PIN_OUTPUT, 0) /* (AG38) MCAN4_TX */
-		>;
-	};
-
 	main_mcan16_pins_default: main-mcan16-default-pins {
 		pinctrl-single,pins = <
 			J784S4_IOPAD(0x028, PIN_INPUT, 0) /* (AE33) MCAN16_RX */
@@ -479,10 +459,15 @@ J784S4_IOPAD(0x024, PIN_OUTPUT, 0) /* (AH34) MCAN16_TX */
 		>;
 	};
 
-	main_i2c3_pins_default: main-i2c3-default-pins {
+	main_spi5_pins_default: main_spi5_pins_default {
 		pinctrl-single,pins = <
-			J784S4_IOPAD(0x064, PIN_INPUT, 13) /* (AF38) MCAN0_TX.I2C3_SCL */
-			J784S4_IOPAD(0x060, PIN_INPUT, 13) /* (AE36) MCASP2_AXR1.I2C3_SDA */
+			J784S4_IOPAD(0x07c, PIN_INPUT, 8) /* (AJ38) MCASP0_AXR3.SPI5_CLK */
+			J784S4_IOPAD(0x068, PIN_INPUT, 8) /* (AE38) MCAN0_RX.SPI5_CS0 */
+			J784S4_IOPAD(0x064, PIN_INPUT, 8) /* (AF38) MCAN0_TX.SPI5_CS1 */
+			J784S4_IOPAD(0x054, PIN_INPUT, 8) /* (AD37) MCASP2_ACLKX.SPI5_CS2 */
+			J784S4_IOPAD(0x058, PIN_INPUT, 8) /* (AE37) MCASP2_AFSX.SPI5_CS3 */
+			J784S4_IOPAD(0x070, PIN_INPUT, 8) /* (AH38) MCAN1_RX.SPI5_D0 */
+			J784S4_IOPAD(0x088, PIN_INPUT, 11) /* (AF36) MCASP0_AXR6.SPI5_D1 */
 		>;
 	};
 
@@ -1049,6 +1034,14 @@ exp2: gpio@22 {
 				  "ENET1_I2CMUX_SEL", "ENET1_EXP_SPARE2", "ENET2_EXP_RESETZ",
 				  "USER_INPUT1", "USER_LED1", "USER_LED2";
 
+		p8-hog {
+			/* P10 - PM_I2C_CTRL_OE */
+			gpio-hog;
+			gpios = <8 GPIO_ACTIVE_HIGH>;
+			output-high;
+			line-name = "CTRL_PM_I2C_OE";
+		};
+
 		p13-hog {
 			/* P13 - CANUART_MUX_SEL0 */
 			gpio-hog;
@@ -1057,11 +1050,19 @@ p13-hog {
 			line-name = "CANUART_MUX_SEL0";
 		};
 
+		p14-hog {
+			/* P14 - CANUART_MUX2_SEL1 */
+			gpio-hog;
+			gpios = <14 GPIO_ACTIVE_HIGH>;
+			output-low;
+			line-name = "CANUART_MUX2_SEL1";
+		};
+
 		p15-hog {
 			/* P15 - CANUART_MUX1_SEL1 */
 			gpio-hog;
 			gpios = <15 GPIO_ACTIVE_HIGH>;
-			output-high;
+			output-low;
 			line-name = "CANUART_MUX1_SEL1";
 		};
 	};
@@ -1620,12 +1621,6 @@ &main_mcan16 {
 	phys = <&transceiver2>;
 };
 
-&main_mcan4 {
-	status = "okay";
-	pinctrl-names = "default";
-	pinctrl-0 = <&main_mcan4_pins_default>;
-	phys = <&transceiver3>;
-};
 
 #define K3_TS_OFFSET(pa, val)  (0x4+(pa)*4) (0x10000 | val)
 
@@ -1649,50 +1644,14 @@ &k3_clks {
 	pinctrl-0 = <&audio_ext_refclk1_pins_default>;
 };
 
-&main_i2c3 {
+&main_spi5 {
 	status = "okay";
+	pinctrl-0 = <&main_spi5_pins_default>;
 	pinctrl-names = "default";
-	pinctrl-0 = <&main_i2c3_pins_default>;
-	clock-frequency = <400000>;
 
-	exp3: gpio@20 {
-		compatible = "ti,tca6408";
-		reg = <0x20>;
-		gpio-controller;
-		#gpio-cells = <2>;
-	};
-
-	pcm3168a_1: audio-codec@44 {
-		compatible = "ti,pcm3168a";
-		reg = <0x44>;
-		#sound-dai-cells = <1>;
-		reset-gpios = <&exp3 0 GPIO_ACTIVE_LOW>;
-		/* C_AUDIO_REFCLK2 -> RGMII6_RXC (W26) */
-		clocks = <&audio_refclk1>;
-		clock-names = "scki";
-		VDD1-supply = <&vsys_3v3>;
-		VDD2-supply = <&vsys_3v3>;
-		VCCAD1-supply = <&vsys_5v0>;
-		VCCAD2-supply = <&vsys_5v0>;
-		VCCDA1-supply = <&vsys_5v0>;
-		VCCDA2-supply = <&vsys_5v0>;
+	spidev@0 {
+		spi-max-frequency = <24000000>;
+		reg = <0>;
+		compatible = "linux,spidev";
 	};
-};
-
-&mcasp0 {
-	status = "okay";
-	#sound-dai-cells = <0>;
-	pinctrl-names = "default";
-	pinctrl-0 = <&mcasp0_pins_default>;
-	op-mode = <0>;          /* MCASP_IIS_MODE */
-	tdm-slots = <2>;
-	auxclk-fs-ratio = <256>;
-	serial-dir = <	/* 0: INACTIVE, 1: TX, 2: RX */
-		0 0 0 1
-		2 0 0 0
-		0 0 0 0
-		0 0 0 0
-	>;
-	tx-num-evt = <0>;
-	rx-num-evt = <0>;
-};
+};
\ No newline at end of file

we used make linux-dts to compile it and update the dtb file to /boot/dts/ti , 

when check the /dev after reboot the board ,  we can not find a "spidev*" int /dev dir , any other changes we need to check ?