From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jagan Teki Date: Wed, 21 Oct 2015 22:15:16 +0530 Subject: [U-Boot] u-boot device model SPI + SPI Flash In-Reply-To: <0af28a07c7704451be0aa3fce01764d0@LysExc01.nanotronic.local> References: <7ccbb9ae7fdb4663832167baa173d6b8@LysExc01.nanotronic.local> <0af28a07c7704451be0aa3fce01764d0@LysExc01.nanotronic.local> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 21 October 2015 at 22:10, Hoefle Marco wrote: > Hello Jagan, > Thank you for your reply. > Please find my comments bellow. I missed to mention that I am using mainline 2015.07 > > >> -----Original Message----- >> From: Jagan Teki [mailto:jteki at openedev.com] >> Sent: Mittwoch, 21. Oktober 2015 18:28 >> To: Hoefle Marco >> Cc: u-boot at lists.denx.de >> Subject: Re: [U-Boot] u-boot device model SPI + SPI Flash >> >> On 21 October 2015 at 16:25, Hoefle Marco >> wrote: >> > >> > Hello, >> > I saw that here is also a mailing list dedicated to device model issues but it >> looks obsolete (last post February 2014) so I am using this forum. >> >> Please note its driver model - not a device model. > Ok >> >> > >> > I have a problem nearly identically to >> > http://lists.denx.de/pipermail/u-boot/2015-April/210754.html >> > >> > >> > The SPI initialization does not work: >> > >> > Invalid bus 0 (err=-19) >> > *** Warning - spi_flash_probe() failed, using default environment >> >> Which board it is? dts file name? > It is a custom dts file. It is for a Microblaze CPU in an Artix FPGA. The dts reflects that one below >> >> > >> > >> > This is the device tree compiled into u-boot: >> > >> > U-Boot> fdt addr 0x8FEB8A7C >> > U-Boot> fdt print >> > / { >> > #address-cells = <0x00000001>; >> > #size-cells = <0x00000001>; >> > aliases { >> > serial0 = "serial at 40600000"; >> > spi0 = "/axi_quad_spi at 44a00000"; >> > }; >> > memory { >> > device_type = "memory"; >> > reg = <0x80000000 0x10000000>; >> > }; >> > axi_quad_spi at 44a00000 { >> > compatible = "xlnx,xps-spi-2.00.a"; >> >> Do you need zynq spi or qspi driver there is no compatible string with >> "xlnx,xps-spi-2.00.a" do know which source you're using? > This driver is used: > u-boot/drivers/spi/xilinx_spi.c In that case, use the compatible in your dts as below static const struct udevice_id xilinx_spi_ids[] = { { .compatible = "xlnx,xilinx-spi" }, { } }; Or if you want to change it on driver update your compatible string on above udevice_id > > >> >> > reg = <0x44a00000 0x00010000>; >> > spi-max-frequency = <0x423a35c7>; >> > #address-cells = <0x00000001>; >> > #size-cells = <0x00000000>; >> > status = "okay"; >> > is-dual = <0x00000000>; >> > num-cs = <0x00000001>; >> > flash at 0 { >> > compatible = "n25q128a11"; >> > reg = <0x00000000>; >> > spi-tx-bus-width = <0x00000001>; >> > spi-rx-bus-width = <0x00000004>; >> > spi-max-frequency = <0x0d3ed78e>; >> > #address-cells = <0x00000001>; >> > #size-cells = <0x00000001>; >> > partition at qspi-fsbl-uboot { >> > label = "qspi-fsbl-uboot"; >> > reg = <0x00000000 0x00100000>; >> > }; >> > partition at qspi-linux { >> > label = "qspi-linux"; >> > reg = <0x00100000 0x00500000>; >> > }; >> > partition at qspi-device-tree { >> > label = "qspi-device-tree"; >> > reg = <0x00600000 0x00020000>; >> > }; >> > partition at qspi-rootfs { >> > label = "qspi-rootfs"; >> > reg = <0x00620000 0x005e0000>; >> > }; >> > partition at qspi-bitstream { >> > label = "qspi-bitstream"; >> > reg = <0x00c00000 0x00400000>; >> > }; >> > }; >> > }; >> > }; >> > >> > Has anybody an idea how to debug this further? thanks! -- Jagan | openedev.