Other Parts Discussed in Thread: SYSCONFIG
Tool/software:
Hello,
I'm trying to use SPI0 as a Master in linux. I updated the DTS accordingly to assign the needed pins.
You can find the changes to DTS file below:
main_spi0_pins_default: main-spi0-default-pins {
pinctrl-single,pins = <
AM62AX_IOPAD(0x1c0, PIN_OUTPUT, 0) /* (B15) SPI0_D0 */
AM62AX_IOPAD(0x1c4, PIN_INPUT, 0) /* (E15) SPI0_D1 */
AM62AX_IOPAD(0x1b4, PIN_OUTPUT, 0) /* (D16) SPI0_CS0 */
AM62AX_IOPAD(0x1bc, PIN_OUTPUT, 0) /* (A17) SPI0_CLK */
>;
};&main_spi0 {
pinctrl-names = "default";
pinctrl-0 = <&main_spi0_pins_default>;
status = "okay";
spidev@0 {
spi-max-frequency = <24000000>;
reg = <0>;
compatible = "rohm,dh2228fv";
};
};
I tried to test it using the test application found in ./tools/spi/
The query here is how to identify whether D0 assigned to MOSI or MISO?
I was expecting D0 assigned to MOSI and D1 assigned to MISO.
But the actual behavior is data sent over pin SPI0_D1 which means it acts as MOSI
How to identify/assign pins to MOSI and MISO?
Another query, What If I want to use spidev to test SPI0 as a slave?
Thank you,