Help: CONFIG_ENV_IS_IN_SPI_FLASH on AllWinner H5?
Greetings. Please let me know if there is a better place to ask this question.
Any clues here? I've got an AllWinner H5 with Winbond SPI flash attached on SPI0. The flash is programmed using the sunxi FEL tools and boots perfectly. Now I'd like to save the environment there too.
Loading Environment from SPI Flash...
Invalid bus 0 (err=-19)
*** Warning - spi_flash_probe_bus_cs() failed, using default environment
TAIA
Jerry.
-------------------------------------------------------CONFIG_ARM=yCONFIG_ARCH_SUNXI=yCONFIG_SPL=yCONFIG_MACH_SUN50I_H5=yCONFIG_DRAM_CLK=504CONFIG_DRAM_ZQ=3881977CONFIG_DRAM_ODT_EN=yCONFIG_MACPWR="PD6"CONFIG_MMC_SUNXI_SLOT_EXTRA=2CONFIG_SPL_SPI_SUNXI=yCONFIG_SPL_SPI_FLASH_SUPPORT=yCONFIG_CMD_SF=yCONFIG_CMD_SF_TEST=yCONFIG_DEFAULT_DEVICE_TREE="anemos-sc5"CONFIG_ENV_IS_IN_SPI_FLASH=yCONFIG_NET_RANDOM_ETHADDR=yCONFIG_MTD=yCONFIG_MTD_DEVICE=yCONFIG_DM_SPI_FLASH=yCONFIG_SUN8I_EMAC=yCONFIG_SPI=yCONFIG_DM_SPI=yCONFIG_SUN4I_SPI=yCONFIG_SOFT_SPI=yCONFIG_USB_EHCI_HCD=yCONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=yCONFIG_USB_HOST_ETHER=y
...
------------------------------------------------
Device tree looks sane but I am no judge.
-------------------------------------------------------
=> fdt list /soc/spi at 1c68000
spi at 1c68000 {
compatible = "allwinner,sun8i-h3-spi";
reg = <0x01c68000 0x00001000>;
interrupts = <0x00000000 0x00000041 0x00000004>;
clocks = <0x00000003 0x0000001e 0x00000003 0x00000052>;
clock-names = "ahb", "mod";
dmas = <0x00000014 0x00000017 0x00000014 0x00000017>;
dma-names = "rx", "tx";
pinctrl-names = "default";
pinctrl-0 = <0x00000015>;
resets = <0x00000003 0x0000000f>;
status = "okay";
#address-cells = <0x00000001>;
#size-cells = <0x00000000>;
spi_flash at 0 {
};-------------------------------------------------------
=> fdt list /soc/spi at 1c68000/spi_flash at 0
spi_flash at 0 {
compatible = "spi-flash";
reg = <0x00000000>;
spi-max-frequency = <0x02faf080>;
u-boot,dm-pre-reloc;
};Quoted 31 lines · On Thu, Jan 31, 2019 at 8:57 PM <[email protected]> wrote:
Greetings. Please let me know if there is a better place to ask this question.
Any clues here? I've got an AllWinner H5 with Winbond SPI flash attached on SPI0. The flash is programmed using the sunxi FEL tools and boots perfectly. Now I'd like to save the environment there too.
Loading Environment from SPI Flash...
Invalid bus 0 (err=-19)
*** Warning -spi_flash_probe_bus_cs()failed, using default environmentTAIA
Jerry.
-------------------------------------------------------CONFIG_ARM=yCONFIG_ARCH_SUNXI=yCONFIG_SPL=yCONFIG_MACH_SUN50I_H5=yCONFIG_DRAM_CLK=504CONFIG_DRAM_ZQ=3881977CONFIG_DRAM_ODT_EN=yCONFIG_MACPWR="PD6"CONFIG_MMC_SUNXI_SLOT_EXTRA=2CONFIG_SPL_SPI_SUNXI=yCONFIG_SPL_SPI_FLASH_SUPPORT=yCONFIG_CMD_SF=yCONFIG_CMD_SF_TEST=yCONFIG_DEFAULT_DEVICE_TREE="anemos-sc5"CONFIG_ENV_IS_IN_SPI_FLASH=y
Quoted 8 lines
CONFIG_NET_RANDOM_ETHADDR=yCONFIG_MTD=yCONFIG_MTD_DEVICE=yCONFIG_DM_SPI_FLASH=yCONFIG_SUN8I_EMAC=yCONFIG_SPI=yCONFIG_DM_SPI=yCONFIG_SUN4I_SPI=y
Existing controller cann't handle SPI on H5, try below branch [1] it has sun6i spi driver and sample patch for sopine.
Thank you Jagan, most kind. I will report back.
-----Original Message-----
From: Jagan Teki <[email protected]>
Sent: 31 January 2019 15:44
To: g4 at novadsp.com
Cc: U-Boot-Denx <[email protected]>
Subject: Re: [U-Boot] Help: CONFIG_ENV_IS_IN_SPI_FLASH on AllWinner H5?
Quoted 32 lines · On Thu, Jan 31, 2019 at 8:57 PM <[email protected]> wrote:
Greetings. Please let me know if there is a better place to ask this question.
Any clues here? I've got an AllWinner H5 with Winbond SPI flash
attached on SPI0. The flash is programmed using the sunxi FEL tools and boots perfectly. Now I'd like to save the environment there too.Loading Environment from SPI Flash...
Invalid bus 0 (err=-19)
*** Warning -spi_flash_probe_bus_cs()failed, using default environmentTAIA
Jerry.
-------------------------------------------------------CONFIG_ARM=yCONFIG_ARCH_SUNXI=yCONFIG_SPL=yCONFIG_MACH_SUN50I_H5=yCONFIG_DRAM_CLK=504CONFIG_DRAM_ZQ=3881977CONFIG_DRAM_ODT_EN=yCONFIG_MACPWR="PD6"CONFIG_MMC_SUNXI_SLOT_EXTRA=2CONFIG_SPL_SPI_SUNXI=yCONFIG_SPL_SPI_FLASH_SUPPORT=yCONFIG_CMD_SF=yCONFIG_CMD_SF_TEST=yCONFIG_DEFAULT_DEVICE_TREE="anemos-sc5"CONFIG_ENV_IS_IN_SPI_FLASH=y
Quoted 8 lines
CONFIG_NET_RANDOM_ETHADDR=yCONFIG_MTD=yCONFIG_MTD_DEVICE=yCONFIG_DM_SPI_FLASH=yCONFIG_SUN8I_EMAC=yCONFIG_SPI=yCONFIG_DM_SPI=yCONFIG_SUN4I_SPI=y
Existing controller cann't handle SPI on H5, try below branch [1] it has sun6i spi driver and sample patch for sopine.