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.

J722SXH01EVM: Enabling SPI in PROCESSOR-SDK-LINUX-J722S

Part Number: J722SXH01EVM
Other Parts Discussed in Thread: TDA4VM

Tool/software:

Hi,

I'm working on enabling SPI on the J722SXH01EVM, using the below app note and E2E threads for the TDA4VM as reference:

1. I added the device tree node and the corresponding pinmux node as shown below:

Pinmux node (k3-j722s-evm.dts, line 272):

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// SPDX-License-Identifier: GPL-2.0-only OR MIT
/*
* Device Tree file for the J722S EVM
* Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/
*
* Schematics: https://www.ti.com/lit/zip/sprr495
*/
/dts-v1/;
#include <dt-bindings/net/ti-dp83867.h>
#include <dt-bindings/phy/phy.h>
#include "k3-j722s.dtsi"
#include "k3-serdes.h"
/ {
compatible = "ti,j722s-evm", "ti,j722s";
model = "Texas Instruments J722S EVM";
aliases {
serial0 = &wkup_uart0;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Pins correspond to SPI0 on the J722S. I have checked that these pins are not in conflict with any others in the .dts.

Device tree node (k3-j722s-main.dtsi, line 26):

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// SPDX-License-Identifier: GPL-2.0-only OR MIT
/*
* Device Tree file for the J722S main domain peripherals
* Copyright (C) 2023-2024 Texas Instruments Incorporated - https://www.ti.com/
*/
#include <dt-bindings/phy/phy-cadence.h>
#include <dt-bindings/phy/phy-ti.h>
/*
* USB1 controller on AM62P and J722S are of different IP.
* Delete AM62P's USBSS1 node definition and redefine it for J722S.
*/
/delete-node/ &usbss1;
/ {
serdes_refclk: clk-0 {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <0>;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

The parameters have been updated according to the J722S TRM and TISCI.

2. I added a spidev node inside the SPI- node as shown below (k3-j722s-evm.dts, line 561):

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
&main_spi0 {
pinctrl-names = "default";
pinctrl-0 = <&main_spi0_pins_default>;
status = "okay";
spidev@0 {
spi-max-frequency=<24000000>;
reg = <0>;
compatible = "linux,spidev";
};
};
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

3. I enabled CONFIG_SPI_SPIDEV=y in arch/arm64/configs/defconfig. CONFIG_SPI_OMAP24XX=y by default.

Problem

When I make the SDK with these changes and boot Linux, spidev does not show, just spi_master (spi1). I'm not sure what the spi0 is doing there, but I see it on the default image as well.

I commented out all the other .dtbo for J722S besides k3-j722s-evm.dtb and make, but no difference in output.

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
# Boards with J722s SoC
dtb-$(CONFIG_ARCH_K3) += k3-j722s-evm.dtb
#dtb-$(CONFIG_ARCH_K3) += k3-j722s-evm-csi2-ov5640.dtbo
#dtb-$(CONFIG_ARCH_K3) += k3-j722s-evm-csi2-quad-rpi-cam-imx219.dtbo
#dtb-$(CONFIG_ARCH_K3) += k3-j722s-evm-csi2-quad-tevi-ov5640.dtbo
#dtb-$(CONFIG_ARCH_K3) += k3-j722s-evm-dsi-rpi-7inch-panel.dtbo
#dtb-$(CONFIG_ARCH_K3) += k3-j722s-evm-fpdlink-fusion.dtbo
#dtb-$(CONFIG_ARCH_K3) += k3-j722s-evm-microtips-mf101hie-panel.dtbo
#dtb-$(CONFIG_ARCH_K3) += k3-j722s-evm-v3link-fusion.dtbo
#dtb-$(CONFIG_ARCH_K3) += k3-j722s-evm-pwm.dtbo
#dtb-$(CONFIG_ARCH_K3) += k3-j722s-vision-apps.dtbo
#dtb-$(CONFIG_ARCH_K3) += k3-j722s-edgeai-apps.dtbo
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Could you advise?

Thank you,

Jin

  • Hi Jin,

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    +&main_spi5 {
    + status = "okay";
    + #address-cells = <1>;
    + #size-cells = <0>;
    + pinctrl-0 = <&main_spi5_pins_default>;
    + pinctrl-names = "default";
    + spidev@0 {
    + spi-max-frequency = <24000000>;
    + reg = <0>;
    + compatible = "rohm,dh2228fv";
    + };
    +};
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    compatible = "rohm,dh2228fv";

    Can you try the above?

    - Keerthy