Skip to content

Commit

Permalink
uboot-mediatek: add spi-nand build for bananapi bpi-r64
Browse files Browse the repository at this point in the history
Some of bpi-r64 boards have serial NAND attached to SPI bus.
Build U-Boot for booting from SPI-NAND.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
  • Loading branch information
dangowrt committed Apr 11, 2021
1 parent 8cc0139 commit 987562b
Show file tree
Hide file tree
Showing 3 changed files with 302 additions and 21 deletions.
12 changes: 12 additions & 0 deletions package/boot/uboot-mediatek/Makefile
Expand Up @@ -54,6 +54,17 @@ define U-Boot/mt7622_bananapi_bpi-r64-sdmmc
DEPENDS:=+trusted-firmware-a-mt7622-sdmmc-2ddr
endef

define U-Boot/mt7622_bananapi_bpi-r64-snand
NAME:=BananaPi R64 (SNAND)
UBOOT_CONFIG:=mt7622_bananapi_bpi-r64-snand
BUILD_DEVICES:=bananapi_bpi-r64
BUILD_SUBTARGET:=mt7622
UBOOT_IMAGE:=u-boot.fip
BL2_BOOTDEV:=snand
BL2_DDRBLOB:=2
DEPENDS:=+trusted-firmware-a-mt7622-snand-2ddr
endef

define U-Boot/mt7622_ubnt_unifi-6-lr
NAME:=Ubiquiti UniFi 6 LR
UBOOT_CONFIG:=mt7622_ubnt_unifi-6-lr
Expand Down Expand Up @@ -90,6 +101,7 @@ endef
UBOOT_TARGETS := \
mt7622_bananapi_bpi-r64-emmc \
mt7622_bananapi_bpi-r64-sdmmc \
mt7622_bananapi_bpi-r64-snand \
mt7622_linksys_e8450 \
mt7622_rfb1 \
mt7622_ubnt_unifi-6-lr \
Expand Down
@@ -0,0 +1,33 @@
--- a/arch/arm/dts/mt7622-bananapi-bpi-r64.dts
+++ b/arch/arm/dts/mt7622-bananapi-bpi-r64.dts
@@ -19,7 +19,7 @@
};

aliases {
- spi0 = &snfi;
+ spi0 = &snand;
ethernet0 = &eth;
};

@@ -205,17 +205,11 @@
};
};

-&snfi {
- pinctrl-names = "default", "snfi";
- pinctrl-0 = <&snor_pins>;
- pinctrl-1 = <&snfi_pins>;
+&snand {
+ pinctrl-names = "default";
+ pinctrl-0 = <&snfi_pins>;
status = "okay";
-
- spi-flash@0{
- compatible = "jedec,spi-nor";
- reg = <0>;
- u-boot,dm-pre-reloc;
- };
+ quad-spi;
};

&uart0 {

0 comments on commit 987562b

Please sign in to comment.