Re: PINE64 Rock64 - How to get SPI driver working
I finally resolved the issue: => sf probe SF: Detected gd25q128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB => The flash device will be correctly detected. The problem was missing support in the clock driver of the SoC. Should I release a patch for it? On 24.06.20 at 17:52, Johannes Krottmayer wrote: > Sorry for my late response. > > Thanks for the suggestions. > > On 22.05.20 at 16:28, Peter Robinson wrote: >> Make sure you enable the driver for the actual flash chip too, some of >> the popular ones are: >> CONFIG_SPI_FLASH_WINBOND=y >> CONFIG_SPI_FLASH_MACRONIX=y >> CONFIG_SPI_FLASH_SPANSION=y >> CONFIG_SPI_FLASH_GIGADEVICE=y > > I have enabled 'CONFIG_SPI_FLASH_GIGADEVICE'. But still getting > the same error code (-2). On board is the GD25Q127C from Gigadevice. > > The device ID for the operation code 0x9F according to the datasheet > should be 0xC84018. I also found this device ID in the SPI-NOR IDS > file. >
Re: PINE64 Rock64 - How to get SPI driver working
Sorry for my late response. Thanks for the suggestions. On 22.05.20 at 16:28, Peter Robinson wrote: > Make sure you enable the driver for the actual flash chip too, some of > the popular ones are: > CONFIG_SPI_FLASH_WINBOND=y > CONFIG_SPI_FLASH_MACRONIX=y > CONFIG_SPI_FLASH_SPANSION=y > CONFIG_SPI_FLASH_GIGADEVICE=y I have enabled 'CONFIG_SPI_FLASH_GIGADEVICE'. But still getting the same error code (-2). On board is the GD25Q127C from Gigadevice. The device ID for the operation code 0x9F according to the datasheet should be 0xC84018. I also found this device ID in the SPI-NOR IDS file.
Re: PINE64 Rock64 - How to get SPI driver working
On Fri, May 22, 2020 at 12:12 AM Johannes Krottmayer wrote: > > Hi Kever, > > I think you answered the wrong person. :) > > Okay, thanks for the suggestions. > > I will check the sources. There was also a missing alias > in the Device-Tree source. I have added the specific alias > for the SPI bus. Now I'm getting the error code -2. Make sure you enable the driver for the actual flash chip too, some of the popular ones are: CONFIG_SPI_FLASH_WINBOND=y CONFIG_SPI_FLASH_MACRONIX=y CONFIG_SPI_FLASH_SPANSION=y CONFIG_SPI_FLASH_GIGADEVICE=y > I'm new with U-Boot and the source code itself, but I > think the problem occurs still in the device tree file for > the specific board. > > Cheers, > > Johannes K. > > > On 21.05.20 at 15:35, Kever Yang wrote: > > Jagan may some idea here. > > > > > > I would suggest you to add some log in the spi/flash driver for bind, > > probe and etc > > > > to check what's wrong. > > > > > > Thanks, > > > > - Kever > > > > On 2020/5/20 上午7:41, Johannes Krottmayer wrote: > >> Hello, > >> > >> I just compiled U-Boot v2020.04 for a PINE64 Rock media board. > >> It compiles fine without errors, but when I try to probe the > >> on board flash I get an error: > >> > >> => sf probe > >> Invalid bus 0 (err=-19) > >> Failed to initialize SPI flash at 0:0 (error -19) > >> => > >> > >> SPI is activated in the Device-Tree blob. I also added support > >> to the Rockchip SPI driver (added IDS strings for this SoC). > >> > >> In the device config I added the following: > >> > >> CONFIG_SPI=y > >> CONFIG_ROCKCHIP_SPI=y > >> CONFIG_SPI_FLASH=y > >> > >> But the driver still doesn't work. Output of DM (shortened): > >> > >> => dm tree > >> [...] > >>spi 0 [ ] rockchip_spi |-- spi@ff19 > >> > >>spi_flash 0 [ ] spi_flash_std | `-- spiflash@0 > >> [...] > >> > >> What is missing? Is there a way to load driver? > >> > >> Any kind of help is highly appreciated. > >> > > > >
Re: PINE64 Rock64 - How to get SPI driver working
Hi Kever, I think you answered the wrong person. :) Okay, thanks for the suggestions. I will check the sources. There was also a missing alias in the Device-Tree source. I have added the specific alias for the SPI bus. Now I'm getting the error code -2. I'm new with U-Boot and the source code itself, but I think the problem occurs still in the device tree file for the specific board. Cheers, Johannes K. On 21.05.20 at 15:35, Kever Yang wrote: > Jagan may some idea here. > > > I would suggest you to add some log in the spi/flash driver for bind, > probe and etc > > to check what's wrong. > > > Thanks, > > - Kever > > On 2020/5/20 上午7:41, Johannes Krottmayer wrote: >> Hello, >> >> I just compiled U-Boot v2020.04 for a PINE64 Rock media board. >> It compiles fine without errors, but when I try to probe the >> on board flash I get an error: >> >> => sf probe >> Invalid bus 0 (err=-19) >> Failed to initialize SPI flash at 0:0 (error -19) >> => >> >> SPI is activated in the Device-Tree blob. I also added support >> to the Rockchip SPI driver (added IDS strings for this SoC). >> >> In the device config I added the following: >> >> CONFIG_SPI=y >> CONFIG_ROCKCHIP_SPI=y >> CONFIG_SPI_FLASH=y >> >> But the driver still doesn't work. Output of DM (shortened): >> >> => dm tree >> [...] >>spi 0 [ ] rockchip_spi |-- spi@ff19 >> >>spi_flash 0 [ ] spi_flash_std | `-- spiflash@0 >> [...] >> >> What is missing? Is there a way to load driver? >> >> Any kind of help is highly appreciated. >> > >
Re: PINE64 Rock64 - How to get SPI driver working
Jagan may some idea here. I would suggest you to add some log in the spi/flash driver for bind, probe and etc to check what's wrong. Thanks, - Kever On 2020/5/20 上午7:41, Johannes Krottmayer wrote: Hello, I just compiled U-Boot v2020.04 for a PINE64 Rock media board. It compiles fine without errors, but when I try to probe the on board flash I get an error: => sf probe Invalid bus 0 (err=-19) Failed to initialize SPI flash at 0:0 (error -19) => SPI is activated in the Device-Tree blob. I also added support to the Rockchip SPI driver (added IDS strings for this SoC). In the device config I added the following: CONFIG_SPI=y CONFIG_ROCKCHIP_SPI=y CONFIG_SPI_FLASH=y But the driver still doesn't work. Output of DM (shortened): => dm tree [...] spi 0 [ ] rockchip_spi |-- spi@ff19 spi_flash 0 [ ] spi_flash_std | `-- spiflash@0 [...] What is missing? Is there a way to load driver? Any kind of help is highly appreciated.
Re: PINE64 Rock64 - How to get SPI driver working
Hello, I want to add a helper function to uboot i.e uboot# help will show a list of commands. I want to add 1 for my own private command. which file contains the list of cmd that will be displayed and the indirection? thanks -kamal On Wed, May 20, 2020 at 8:58 AM Johannes Krottmayer wrote: > Hello, > > I just compiled U-Boot v2020.04 for a PINE64 Rock media board. > It compiles fine without errors, but when I try to probe the > on board flash I get an error: > > => sf probe > Invalid bus 0 (err=-19) > Failed to initialize SPI flash at 0:0 (error -19) > => > > SPI is activated in the Device-Tree blob. I also added support > to the Rockchip SPI driver (added IDS strings for this SoC). > > In the device config I added the following: > > CONFIG_SPI=y > CONFIG_ROCKCHIP_SPI=y > CONFIG_SPI_FLASH=y > > But the driver still doesn't work. Output of DM (shortened): > > => dm tree > [...] > spi 0 [ ] rockchip_spi |-- spi@ff19 > > spi_flash 0 [ ] spi_flash_std | `-- spiflash@0 > [...] > > What is missing? Is there a way to load driver? > > Any kind of help is highly appreciated. > > -- > Kind regards, > > Johannes K. >
PINE64 Rock64 - How to get SPI driver working
Hello, I just compiled U-Boot v2020.04 for a PINE64 Rock media board. It compiles fine without errors, but when I try to probe the on board flash I get an error: => sf probe Invalid bus 0 (err=-19) Failed to initialize SPI flash at 0:0 (error -19) => SPI is activated in the Device-Tree blob. I also added support to the Rockchip SPI driver (added IDS strings for this SoC). In the device config I added the following: CONFIG_SPI=y CONFIG_ROCKCHIP_SPI=y CONFIG_SPI_FLASH=y But the driver still doesn't work. Output of DM (shortened): => dm tree [...] spi 0 [ ] rockchip_spi |-- spi@ff19 spi_flash 0 [ ] spi_flash_std | `-- spiflash@0 [...] What is missing? Is there a way to load driver? Any kind of help is highly appreciated. -- Kind regards, Johannes K.