Hi, I have some problems when trying to use the SPI of HiFive Premier P550 (EIC7700X), I didn’t find any device related to spidev in the system, then I recompiled the kernel (the kernel version used is GitHub - sifiveinc/riscv-linux at rel/kernel/hifive-premier-p550) and turned on CONFIG_SPI_SPIDEV, and then also enabled ssi1 in the device tree.
ssi1: spi@50814000 {
compatible = "snps,eic7700-spi";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x0 0x50814000 0x0 0x4000>;
spi-max-frequency = <4800000>;
clocks = <&d0_clock EIC7700_CLK_LSP_SSI1_PCLK>;
clock-names = "clk";
interrupt-parent = <&plic0>;
interrupts = <92>;
resets = <&d0_reset SSI_RST_CTRL SW_SSI_RST_N_1>;
reset-names = "spi";
eswin,spi_dma = <&d0_aon_dmac>;
dmas = <&d0_aon_dmac 36 4>, <&d0_aon_dmac 37 4>;
dma-names = "rx", "tx";
status = "disabled";
};
pinctrl_spi1_default: spi1-default{
mux{
groups = "spi1_group";
function = "spi1_func";
};
};
&ssi1 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_spi1_default>;
num-cs = <1>;
cs-gpios = <&porta 35 GPIO_ACTIVE_LOW>;
spidev1: spidev@0 {
compatible = "spidev";
reg = <0>;
spi-max-frequency = <4800000>;
};
};
But after completing the above work, there is still no way to use spidev, then I found compatible = "snps,eic7700-spi";
. I want to know which driver is responsible for the SPI controller snps,eic7700-spi, and I can’t find any information related to this keyword in the kernel source code.
I am not familiar with device-tree, and I would like to know if there is anything wrong with the steps above? How can I connect peripherals using the SPI interface on the P550?