mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-18 02:38:56 +00:00
8285b928c5
Commit0934dddc64
("arm: a37xx: Update DTS files to version from upstream Linux kernel") ported Linux's device-tree files for Armada 3720 SOCs. This broke SPI support on some Espressobin boards and results in following U-Boot error: Loading Environment from SPIFlash... jedec_spi_nor flash@0: unrecognized JEDEC id bytes: f7, 30, 0b *** Warning - spi_flash_probe_bus_cs() failed, using default environment Before that commit DT node for SPI was called 'spi-flash@0' and after that commit it is called 'flash@0'. Before that commit 'spi-max-frequency' was set to 50000000 and after it is 104000000. Rename DT node 'spi-flash@0 in armada-3720-espressobin-u-boot.dtsi to 'flash@0' and set custom U-Boot 'spi-max-frequency' back to 50000000. With this change SPI is working on Espressobin again and it is detected with JEDEC ids ef, 60, 16 on our tested unit. Loading Environment from SPIFlash... SF: Detected w25q32dw with page size 256 Bytes, erase size 4 KiB, total 4 MiB OK Note that it is unknown why spi-max-frequency with value 104000000 does not work in U-Boot as it works fine with Linux kernel. Also note that in defconfig file configs/mvebu_espressobin-88f3720_defconfig is set option CONFIG_SF_DEFAULT_SPEED=40000000 which is different value than in DT. Fixes:0934dddc64
("arm: a37xx: Update DTS files to version from upstream Linux kernel") Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
38 lines
808 B
Text
38 lines
808 B
Text
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
|
|
|
&spi0 {
|
|
flash@0 {
|
|
/*
|
|
* For some unknown reason U-Boot SPI driver cannot access
|
|
* SPI-NOR with higher frequency. Linux kernel SPI driver
|
|
* does not have this problem.
|
|
*/
|
|
spi-max-frequency = <50000000>;
|
|
|
|
#ifdef CONFIG_ENV_IS_IN_SPI_FLASH
|
|
partitions {
|
|
compatible = "fixed-partitions";
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
|
|
partition@firmware {
|
|
reg = <0 CONFIG_ENV_OFFSET>;
|
|
label = "firmware";
|
|
};
|
|
|
|
partition@u-boot-env {
|
|
reg = <CONFIG_ENV_OFFSET CONFIG_ENV_SIZE>;
|
|
label = "u-boot-env";
|
|
};
|
|
};
|
|
#endif
|
|
};
|
|
};
|
|
|
|
/*
|
|
* U-Boot requires to have this eMMC node by default in "okay" status. U-Boot
|
|
* at runtime changes status to "disabled" if eMMC is not present on the board.
|
|
*/
|
|
&sdhci0 {
|
|
status = "okay";
|
|
};
|