Forum Discussion
孝大村00
New Contributor
6 years agoHow to implement sspi command in uboot in Arria10 SoC Devkit
I am running Linux on Arria10 SoC Devkit. I refer to the link here to create uboot. And it is working fine. With Arria10 SoC Devkit, you can give instructions to the System Controller (MAX V) from ...
孝大村00
New Contributor
6 years agoI solved myself.
The problem was resetting "Per-Master Security bit for spi_master1: 0xFFD13020".
It was necessary to add "resets = <& rst SPIM1_RESET>;" to uboot DTS.
The changes are as follows.
[Configure uboot]
CONFIG_CMD_SPI=y
CONFIG_DEFAULT_SPI_BUS=0
CONFIG_DEFAULT_SPI_MODE=0
CONFIG_DESIGNWARE_SPI=y[Device Tree]
<< socfpga_arria10.dtsi >>
spi1: spi@ffda5000 {
compatible = "snps,dw-apb-ssi";
#address-cells = <1>;
#size-cells = <0>;
reg = <0xffda5000 0x100>;
interrupts = <0 102 4>;
num-chipselect = <4>;
bus-num = <0>;
/*32bit_access;*/
tx-dma-channel = <&pdma 16>;
rx-dma-channel = <&pdma 17>;
resets = <&rst SPIM1_RESET>; /* ADD */
clocks = <&spi_m_clk>;
status = "okay";
spidev@0 { /* ADD---> */
compatible = "rohm,dh2228fv";
reg = <0x0>;
spi-max-frequency = <100000>;
}; /* <---ADD */
};<< socfpga_arria10_socdk.dtsi >>
aliases {
ethernet0 = &gmac0;
serial0 = &uart1;
i2c0 = &i2c1;
spi0 = &spi1; /* ADD */
};However, while Read seems to work fine, Write does not seem to work properly.
>> sspi 0:0 16 02C0 --->LED control is not performed correctly.
>> sspi 0:0 16 0500 ---> The status of DipSW and Push Button can be read correctly.
Thanks!