Other Parts Discussed in Thread: DRA821U, , DRA821, DRA829, SYSCONFIG
Tool/software:
Dear TI
I'm using TDA4x EVM with DRA821U.
I followed "https://www.ti.com/lit/pdf/sprad26?keyMatch=DRA821" to enable spi, but it generated crash during boot up.
I'm using ti-processor-sdk-linux-j7200-evm-09_02_00_04 and the changes are like below
----------------------------------------------------------------------------------------------------------------------
diff --git a/arch/arm64/boot/dts/ti/k3-j7200-common-proc-board.dts b/arch/arm64/boot/dts/ti/k3-j7200-common-proc-board.dts
index fa965cdca..2e2189e59 100644
--- a/arch/arm64/boot/dts/ti/k3-j7200-common-proc-board.dts
+++ b/arch/arm64/boot/dts/ti/k3-j7200-common-proc-board.dts
@@ -235,6 +235,18 @@ J721E_IOPAD(0x3c, PIN_INPUT, 0) /* (W16) MCAN3_RX */
J721E_IOPAD(0x38, PIN_OUTPUT, 0) /* (Y21) MCAN3_TX */
>;
};
+
+ spi6_pins_default: spi6_pins_default {
+ pinctrl-single,pins = <
+ J721E_IOPAD(0x9c, PIN_INPUT, 4) /* (AC22) PRG1_PRU1_GPO17.SPI6_CLK */
+ J721E_IOPAD(0x74, PIN_INPUT, 4) /* (AC21) PRG1_PRU1_GPO7.SPI6_CS0 */
+ J721E_IOPAD(0x28, PIN_INPUT, 4) /* (AG20) PRG1_PRU0_GPO9.SPI6_CS1 */
+ J721E_IOPAD(0x2c, PIN_INPUT, 4) /* (AD21) PRG1_PRU0_GPO10.SPI6_CS2 */
+ J721E_IOPAD(0x7c, PIN_INPUT, 4) /* (AF21) PRG1_PRU1_GPO9.SPI6_CS3 */
+ J721E_IOPAD(0xa0, PIN_INPUT, 4) /* (AJ22) PRG1_PRU1_GPO18.SPI6_D0 */
+ J721E_IOPAD(0xa4, PIN_INPUT, 4) /* (AH22) PRG1_PRU1_GPO19.SPI6_D1 */
+ >;
+ };
};
&main_pmx1 {
@@ -482,3 +494,15 @@ 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";
+ };
+};
[In Docker Env] builder@a4b59b0143ee:~/build_place/DRA821U/ti-processor-sdk-linux-j7200-evm-09_02_00_04/board-support/ti-linux-kernel-6.1.80+gitAUTOINC+1c154b1fe4-ti$
----------------------------------------------------------------------------------------------------------------------
[ 5.517057] Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP
[ 5.523317] Modules linked in: k3_j72xx_bandgap spi_omap2_mcspi(+) ti_am335x_tscadc sa2ul m_can_platform m_can pci_j721e_host(+) pci_j721e pcie_cadence_host pcie_cadence can_dev cdns3_ti rti_wdt optee_rng rng_core cryptodev(O) fuse drm drm_panel_orientation_quirks ipv6
[ 5.547113] CPU: 1 PID: 198 Comm: systemd-udevd Tainted: G O 6.1.80-ti-g1c154b1fe4c4 #1
[ 5.556488] Hardware name: Texas Instruments J7200 EVM (DT)
[ 5.562045] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[ 5.568993] pc : clk_get_rate+0x20/0x80
[ 5.572825] lr : clk_get_rate+0x20/0x80
[ 5.576655] sp : ffff800009b738c0
[ 5.579957] x29: ffff800009b738c0 x28: 0000000000000000 x27: ffff800009b73c80
[ 5.587076] x26: ffff000800136c00 x25: ffff000800136c10 x24: ffff800000d30218
[ 5.594194] x23: ffff800000d30220 x22: 0000000000000000 x21: ffff0008032ae800
[ 5.601311] x20: 0000000000000030 x19: ffffffffffffffed x18: 0000000000000000
[ 5.608428] x17: 0000000000000000 x16: ffff800008ca0598 x15: 0000ffffaa652fff
[ 5.615545] x14: 000000000000027b x13: 1fffe00100464a81 x12: 0000000000000001
[ 5.622662] x11: 0000000000000000 x10: 00000000000009b0 x9 : ffff800009b73680
[ 5.629779] x8 : ffff00080128a4a0 x7 : 0000000000000000 x6 : ffff000801bb2ac0
[ 5.636896] x5 : ffff000801bb2ac0 x4 : 0000000000000000 x3 : ffff8000091f78e8
[ 5.644013] x2 : ffff000801bb2ac0 x1 : ffff000801bb2ac0 x0 : 0000000000000001
[ 5.651131] Call trace:
[ 5.653565] clk_get_rate+0x20/0x80
[ 5.657044] omap2_mcspi_probe+0x3a4/0x57c [spi_omap2_mcspi]
[ 5.662697] platform_probe+0x68/0xe0
[ 5.666349] really_probe+0xbc/0x2dc
[ 5.669913] __driver_probe_device+0x78/0x114
[ 5.674256] driver_probe_device+0xd8/0x15c
[ 5.678426] __driver_attach+0x94/0x19c
[ 5.682248] bus_for_each_dev+0x74/0xd4
[ 5.686070] driver_attach+0x24/0x30
[ 5.689633] bus_add_driver+0x154/0x20c
[ 5.693454] driver_register+0x78/0x130
[ 5.697277] __platform_driver_register+0x28/0x34
[ 5.701967] omap2_mcspi_driver_init+0x20/0x1000 [spi_omap2_mcspi]
[ 5.708134] do_one_initcall+0x54/0x1d0
[ 5.711957] do_init_module+0x48/0x1d0
[ 5.715695] load_module+0x18f4/0x1c80
[ 5.719432] __do_sys_finit_module+0xac/0x104
[ 5.723776] __arm64_sys_finit_module+0x20/0x30
[ 5.728292] invoke_syscall+0x48/0x114
[ 5.732029] el0_svc_common.constprop.0+0xd4/0xfc
[ 5.736718] do_el0_svc+0x20/0x30
[ 5.740020] el0_svc+0x28/0xa0
[ 5.743064] el0t_64_sync_handler+0xbc/0x140
[ 5.747320] el0t_64_sync+0x18c/0x190
[ 5.750971] Code: d2800013 b40001a0 aa0003f3 97fff669 (f9400273)
[ 5.757047] ---[ end trace 0000000000000000 ]---
BR
Jace
