Commit 8e01fb15 authored by Frank Wunderlich's avatar Frank Wunderlich Committed by Matthias Brugger
Browse files

arm64: dts: mt7986: add Bananapi R3

Add support for Bananapi R3 SBC.

- SD/eMMC support (switching first 4 bits of data-bus with sw6/D)
- SPI-NAND/NOR support (switched CS by sw5/C)
- all rj45 ports and both SFP working (eth1/lan4)
- all USB-Ports + SIM-Slot tested
- i2c and all uarts tested
- wifi tested (with eeprom calibration data)

The device can boot from all 4 storage options. Both, SPI and MMC, can
be switched using hardware switches on the board, see
https://wiki.banana-pi.org/Banana_Pi_BPI-R3#Jumper_setting



Signed-off-by: default avatarFrank Wunderlich <frank-w@public-files.de>
Link: https://lore.kernel.org/r/20230106152845.88717-6-linux@fw-web.de


Signed-off-by: default avatarMatthias Brugger <matthias.bgg@gmail.com>
parent 918aed7a
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -8,6 +8,11 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-evb.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-x20-dev.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt7622-rfb1.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt7622-bananapi-bpi-r64.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3-emmc.dtbo
dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3-nand.dtbo
dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3-nor.dtbo
dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3-sd.dtbo
dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-rfb.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986b-rfb.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt8167-pumpkin.dtb
+29 −0
Original line number Diff line number Diff line
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/*
 * Copyright (C) 2021 MediaTek Inc.
 * Author: Sam.Shih <sam.shih@mediatek.com>
 */

/dts-v1/;
/plugin/;

/ {
	compatible = "bananapi,bpi-r3", "mediatek,mt7986a";

	fragment@0 {
		target-path = "/soc/mmc@11230000";
		__overlay__ {
			bus-width = <8>;
			max-frequency = <200000000>;
			cap-mmc-highspeed;
			mmc-hs200-1_8v;
			mmc-hs400-1_8v;
			hs400-ds-delay = <0x14014>;
			non-removable;
			no-sd;
			no-sdio;
			status = "okay";
		};
	};
};
+55 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */
/*
 * Authors: Daniel Golle <daniel@makrotopia.org>
 *          Frank Wunderlich <frank-w@public-files.de>
 */

/dts-v1/;
/plugin/;

/ {
	compatible = "bananapi,bpi-r3", "mediatek,mt7986a";

	fragment@0 {
		target-path = "/soc/spi@1100a000";
		__overlay__ {
			#address-cells = <1>;
			#size-cells = <0>;
			spi_nand: spi_nand@0 {
				compatible = "spi-nand";
				reg = <0>;
				spi-max-frequency = <10000000>;
				spi-tx-buswidth = <4>;
				spi-rx-buswidth = <4>;

				partitions {
					compatible = "fixed-partitions";
					#address-cells = <1>;
					#size-cells = <1>;

					partition@0 {
						label = "bl2";
						reg = <0x0 0x80000>;
						read-only;
					};

					partition@80000 {
						label = "reserved";
						reg = <0x80000 0x300000>;
					};

					partition@380000 {
						label = "fip";
						reg = <0x380000 0x200000>;
						read-only;
					};

					partition@580000 {
						label = "ubi";
						reg = <0x580000 0x7a80000>;
					};
				};
			};
		};
	};
};
+68 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */
/*
 * Authors: Daniel Golle <daniel@makrotopia.org>
 *          Frank Wunderlich <frank-w@public-files.de>
 */

/dts-v1/;
/plugin/;

/ {
	compatible = "bananapi,bpi-r3", "mediatek,mt7986a";

	fragment@0 {
		target-path = "/soc/spi@1100a000";
		__overlay__ {
			#address-cells = <1>;
			#size-cells = <0>;
			flash@0 {
				compatible = "jedec,spi-nor";
				reg = <0>;
				spi-max-frequency = <10000000>;

				partitions {
					compatible = "fixed-partitions";
					#address-cells = <1>;
					#size-cells = <1>;

					partition@0 {
						label = "bl2";
						reg = <0x0 0x20000>;
						read-only;
					};

					partition@20000 {
						label = "reserved";
						reg = <0x20000 0x20000>;
					};

					partition@40000 {
						label = "u-boot-env";
						reg = <0x40000 0x40000>;
					};

					partition@80000 {
						label = "reserved2";
						reg = <0x80000 0x80000>;
					};

					partition@100000 {
						label = "fip";
						reg = <0x100000 0x80000>;
						read-only;
					};

					partition@180000 {
						label = "recovery";
						reg = <0x180000 0xa80000>;
					};

					partition@c00000 {
						label = "fit";
						reg = <0xc00000 0x1400000>;
					};
				};
			};
		};
	};
};
+23 −0
Original line number Diff line number Diff line
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/*
 * Copyright (C) 2021 MediaTek Inc.
 * Author: Sam.Shih <sam.shih@mediatek.com>
 */

/dts-v1/;
/plugin/;

/ {
	compatible = "bananapi,bpi-r3", "mediatek,mt7986a";

	fragment@0 {
		target-path = "/soc/mmc@11230000";
		__overlay__ {
			bus-width = <4>;
			max-frequency = <52000000>;
			cap-sd-highspeed;
			status = "okay";
		};
	};
};
Loading