08-07-2014 07:26 AM
Hi ,
I am trying to add spi node entry in DTS file. For this I'm using spi-cadence.c driver for SPI and m25p80.c for mtd flash.
when i try to boot kernel then get following error in flash driver
[ 92.283853] m25p80 spi32766.0: unrecognized JEDEC id ffffff
[ 92.294093] cdns-spi ff004000.ps7-spi: at 0xFF004000 mapped to 0x0006E000, irq=72
Below is my DTS node entry,
spi_clk: spi_clk { #clock-cells = <0>; clock-frequency = <50000000>; compatible = "fixed-clock"; }; ps7_spi_0: ps7-spi@0xFF004000 { #address-cells = <1>; #size-cells = <0>; clock-names = "ref_clk", "pclk"; clocks = <&spi_clk &spi_clk>; compatible = "cdns,spi-r1p6"; interrupt-parent = <&ps7_scugic_0>; interrupts = <0 40 4>; num-chip-select = <1>; reg = <0x0 0xff004000 0x1000>; spi0_flash0: spi0_flash0@0 { #address-cells = <1>; #size-cells = <1>; compatible = "m25p80", "st,m25p80"; spi-max-frequency = <50000000>; reg = <0x0>; spi0_flash0@0x00000000 { label = "spi0_flash0"; reg = <0x0 0x100000>; }; }; }
Please help!!
Thnaks in Advance
Vishnu
08-07-2014 10:17 AM
08-07-2014 10:17 AM
08-10-2014 11:58 PM
Hi Milosoftware,
Thanks for your help.
I checked the hardware setting it was problem with hardware. I fixed that problem now my SPI driver is able to read flash id from device but still i am getting unrecongnised jedec id error,
m25p80 spi32766.0: unrecognized JEDEC id bf2505
i checcked for this id in /driver/mtd/devices/m25p80.c file in spi_device_id table
static const struct spi_device_id m25p_ids[] = {
{ "sst25wf080", INFO(0xbf2505, 0, 64 * 1024, 16, SECT_4K | SST_WRITE) },
}
and modified my device node,
misc_clk: misc_clk { #clock-cells = <0>; clock-frequency = <50000000>; compatible = "fixed-clock"; }; ps7_spi_0: ps7-spi@0xFF004000 { #address-cells = <0x1>; #size-cells = <0x0>; clock-names = "ref_clk", "pclk"; clocks = <&misc_clk &misc_clk>; compatible = "cdns,spi-r1p6"; interrupt-parent = <&ps7_scugic_0>; interrupts = <0 40 4>; num-chip-select = <0x4>; reg = <0x0 0xff004000 0x1000>; spi0_flash0: spi0_flash0@0 { #address-cells = <0x1>; #size-cells = <0x1>; compatible = "sst25wf080", "st,m25p80"; //compatible = "sst,sst25wf080"; spi-max-frequency = <0x2faf08>; reg = <0x0>; spi0_flash0@0x00000000 { label = "spi0_flash0"; reg = <0x0 0x100000>; }; }; };
Don't know why driver is not able to find out device id from table.
Thanks,
Vishnu
08-11-2014 03:42 AM
Make sure you're actually running the kernel that contains that message.
I find your clock setup really weird, the SPI clock should be generated internally (I doubt you have some external 50MHz clock to provide the signals)
My SPI0 DT binding contains these lines for the clock:
clock-names = "ref_clk", "pclk";
clocks = <&clkc 25>, <&clkc 34>;
03-31-2020 01:22 PM
Hello, can you explain more about this hardware error. It's seem that I am running into the same problem. How could this issue happens and how to fix that.