Hi,all:
I use the Orin NX Demo board and use SPI1 to connect to Winbound 25Q64JVSIQ, but the spi flash cannot be recognized.
root@tegra:/home/robot# dmesg |grep spi
[ 4.264995] spi-tegra114 3210000.spi: Adding to iommu group 0
[ 4.271049] spi-tegra114 3210000.spi: can not get clock
[ 4.276476] spi-tegra114 3230000.spi: Adding to iommu group 0
[ 4.282391] spi-tegra114 3230000.spi: can not get clock
[ 7.475944] spi-tegra114 3210000.spi: prod settings failed with error -19
[ 7.477131] spi-tegra114 3210000.spi: registered master spi0
[ 7.477502] spi spi0.0: setup 8 bpw, ~cpol, ~cpha, 40000000Hz
[ 7.477507] spi spi0.0: child node ‘controller-data’ not found
[ 7.477683] spi spi0.0: setup mode 0, 8 bits/w, 40000000 Hz max → 0
[ 7.479843] spi-tegra114 3210000.spi: Setting clk_src pll_p
[ 7.481084] spi-tegra114 3210000.spi: prod settings failed with error -19
[ 7.481090] spi-tegra114 3210000.spi: The def 0x40408000 and written 0x40608807
[ 7.481123] spi-tegra114 3210000.spi: The def 0x40408000 and written 0x40609027
[ 7.481182] spi-nor spi0.0: unrecognized JEDEC id bytes: ff ff ff ff ff ff
[ 7.488279] spi-nor: probe of spi0.0 failed with error -2
[ 7.493846] spi-tegra114 3210000.spi: registered child spi0.0
[ 7.493856] spi spi0.1: setup 8 bpw, ~cpol, ~cpha, 50000000Hz
[ 7.494027] spi spi0.1: setup mode 0, 8 bits/w, 50000000 Hz max → 0
[ 7.494257] spi-tegra114 3210000.spi: registered child spi0.1
[ 7.495036] spi-tegra114 3230000.spi: prod settings failed with error -19
[ 7.495859] spi-tegra114 3230000.spi: registered master spi2
[ 7.496254] spi spi2.0: setup 8 bpw, ~cpol, ~cpha, 50000000Hz
[ 7.496415] spi spi2.0: setup mode 0, 8 bits/w, 50000000 Hz max → 0
[ 7.496531] spi-tegra114 3230000.spi: registered child spi2.0
[ 7.496541] spi spi2.1: setup 8 bpw, ~cpol, ~cpha, 50000000Hz
[ 7.496806] spi spi2.1: setup mode 0, 8 bits/w, 50000000 Hz max → 0
[ 7.496918] spi-tegra114 3230000.spi: registered child spi2.1
PINMUX Config(SPI1):
sudo /opt/nvidia/jetson-io/jetson-io.py
dts:
spi@3210000 {
compatible = "nvidia,tegra186-spi";
reg = <0x00 0x3210000 0x00 0x10000>;
interrupts = <0x00 0x24 0x04>;
#address-cells = <0x01>;
#size-cells = <0x00>;
iommus = <0x06 0x04>;
dma-coherent;
dmas = <0x3f 0x0f 0x3f 0x0f>;
dma-names = "rx\0tx";
spi-max-frequency = <0x3dfd240>;
nvidia,clk-parents = "pll_p\0clk_m";
clocks = <0x02 0x87 0x02 0x66 0x02 0x0e>;
clock-names = "spi\0pll_p\0clk_m";
resets = <0x02 0x5b>;
reset-names = "spi";
status = "okay";
phandle = <0x31f>;
prod-settings {
#prod-cells = <0x04>;
prod {
prod = <0x00 0x194 0x80000000 0x00>;
};
};
spi@0 {
compatible = "jedec,spi-nor";
reg = <0x00>;
spi-max-frequency = <0x2625a00>;
#address-cells = <0x01>;
#size-cells = <0x01>;
m25p,fast-read;
};
spi@1 {
compatible = "tegra-spidev";
reg = <0x01>;
spi-max-frequency = <0x2faf080>;
controller-data {
nvidia,rx-clk-tap-delay = <0x10>;
nvidia,tx-clk-tap-delay = <0x00>;
};
};
};
$ defconfig
@@ -1,4 +1,5 @@
# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_MTD_OF_PARTS=y
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
CONFIG_WATCH_QUEUE=y
@@ -330,13 +331,13 @@ CONFIG_BRCMSTB_GISB_ARB=y
CONFIG_SIMPLE_PM_BUS=y
CONFIG_TEGRA_ACONNECT=y
CONFIG_VEXPRESS_CONFIG=y
-CONFIG_MTD=m
+CONFIG_MTD=y
CONFIG_MTD_CMDLINE_PARTS=m
CONFIG_MTD_BLOCK=m
CONFIG_MTD_QSPI_FLASH=m
CONFIG_MTD_TEGRA_VIRT=m
CONFIG_MTD_RAW_NAND=m
-CONFIG_MTD_SPI_NOR=m
+CONFIG_MTD_SPI_NOR=y
CONFIG_MTD_UBI=m
# CONFIG_PNP_DEBUG_MESSAGES is not set
CONFIG_ZRAM=m
@@ -736,19 +737,20 @@ CONFIG_I2C_TEGRA194_SLAVE=m
CONFIG_I2C_STUB=m
CONFIG_I2C_SLAVE_EEPROM=m
CONFIG_SPI=y
+CONFIG_SPI_DEBUG=y
CONFIG_SPI_CADENCE=m
CONFIG_SPI_CADENCE_QUADSPI=y
CONFIG_SPI_NXP_FLEXSPI=y
CONFIG_SPI_PXA2XX=m
CONFIG_SPI_SC18IS602=m
-CONFIG_SPI_TEGRA114=m
+CONFIG_SPI_TEGRA114=y
CONFIG_SPI_TEGRA124_SLAVE=y
CONFIG_SPI_TEGRA194_SLAVE=y
CONFIG_QSPI_TEGRA23x=y
CONFIG_QSPI_TEGRA210=m
CONFIG_SPI_XCOMM=m
CONFIG_SPI_ZYNQMP_GQSPI=m
-CONFIG_SPI_SPIDEV=m
+CONFIG_SPI_SPIDEV=y
CONFIG_SPI_TLE62X0=m
CONFIG_SPMI=m
CONFIG_PPS_DEBUG=y
(it’s no problem)
dmesg:
dmesg.txt (76.8 KB)
whole dts:
dts.txt (430.3 KB)
version:
cat /etc/nv_tegra_release
R35 (release), REVISION: 4.1, GCID: 33958178, BOARD: t186ref, EABI: aarch64, DATE: Tue Aug 1 19:57:35 UTC 2023