Other Parts Discussed in Thread: AM4372,
Tool/software: Linux
Hello,
I am use the AM4378-GP-EVM SPI 1 interface to connect Atmel SPI flash AT45DB161D. I am using Linux on the platform. I can't read out the contents even for read flash manufacturing information command 0x9f. The readout are zeros. I am using the utility spidev_fdx privided with Ti Linux package.
Here is the SPI in device tree: (am437x-gp-evm.dts)
In &am437x_pinmux section:
spi1_pins: pinmux_spi1_pins {
pinctrl-single,pins = <
AM4372_IOPAD(0x990, PIN_INPUT | MUX_MODE3) /* spi1_clk */
AM4372_IOPAD(0x994, PIN_OUTPUT | MUX_MODE3) /* spi1_d0 */
AM4372_IOPAD(0x998, PIN_INPUT | MUX_MODE3) /* spi1_d1 */
AM4372_IOPAD(0x99c, PIN_OUTPUT | MUX_MODE3) /* spi1_cs0 */
>;
};
spi1 node:
&spi1 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&spi1_pins>;
ti,spi-num-cs = <4>;
ti,pindir-d0-out-d1-in;
spidev@1 {
reg = <0>;
status = "okay";
compatible = "rohm,dh2228fv";
spi-max-frequency = <20000000>;
};
};
In am4372.dts:
spi1: spi@481a0000 {
compatible = "ti,am4372-mcspi","ti,omap4-mcspi";
reg = <0x481a0000 0x400>;
interrupts = <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>;
ti,hwmods = "spi1";
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
};
Here is the waveform I captured: (the first readout should be 0x1f)
All other commands are the same. Also I notice when I use the utility spidev_fdx or spidev_test the readouts are not stable when the read count is bigger than 159. (waveform also display all 0s).
Please help!
Thanks,
-Ken


