SPI としては sspi というコマンドが Uboot に用意されています。
デフォルトの状態では使用できるようになっていませんが、下記修正を加えることにより sspi コマンドが使用できるようになります。
ファイル: /uboot-socfpga/include/configs/socfpga_common.h
編集内容: ファイルに #define CONFIG_CMD_SPI を追加
(例)549~552 行目に下記を 追加
/* * SPI CMD support */ #define CONFIG_CMD_SPI
(参考)編集内容を反映させたファイル(ページ下部よりダウンロードください)
socfpga_common.h
コマンド使用方法については、下記ファイルを参考にしてください。
ファイル: /uboot-socfpga/common/cmd_spi.c
U_BOOT_CMD( sspi, 5, 1, do_spi, "SPI utility command", "[<bus>:]<cs>[.<mode>] <bit_len> <dout> - Send and receive bits\n" "<bus> - Identifies the SPI bus\n" "<cs> - Identifies the chip select\n" "<mode> - Identifies the SPI mode to use\n" "<bit_len> - Number of bits to send (base 10)\n" "<dout> - Hexadecimal string that gets sent" );
--------------------
カテゴリー:SoC
ツール:SoC EDS
デバイス:Cyclone® V