Skip to content

Commit 4b58511

Browse files
committed
arm64: dts: add bpi-r4 lite overlays
1 parent c410b22 commit 4b58511

7 files changed

+233
-0
lines changed

arch/arm64/boot/dts/mediatek/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ mt7986a-bananapi-bpi-r3-sd-nor-dtbs := \
4242
dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3-sd-nor.dtb
4343
dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-rfb.dtb
4444
dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986b-rfb.dtb
45+
dtb-$(CONFIG_ARCH_MEDIATEK) += mt7987a-bananapi-bpi-r4-lite-1pcie-2L.dtbo
46+
dtb-$(CONFIG_ARCH_MEDIATEK) += mt7987a-bananapi-bpi-r4-lite-2pcie-1L.dtbo
47+
dtb-$(CONFIG_ARCH_MEDIATEK) += mt7987a-bananapi-bpi-r4-lite-sd.dtbo
48+
dtb-$(CONFIG_ARCH_MEDIATEK) += mt7987a-bananapi-bpi-r4-lite-emmc.dtbo
49+
dtb-$(CONFIG_ARCH_MEDIATEK) += mt7987a-bananapi-bpi-r4-lite-nand.dtbo
50+
dtb-$(CONFIG_ARCH_MEDIATEK) += mt7987a-bananapi-bpi-r4-lite-nor.dtbo
4551
dtb-$(CONFIG_ARCH_MEDIATEK) += mt7987a-bananapi-bpi-r4-lite.dtb
4652
dtb-$(CONFIG_ARCH_MEDIATEK) += mt7988a-bananapi-bpi-r4.dtb
4753
dtb-$(CONFIG_ARCH_MEDIATEK) += mt7988a-bananapi-bpi-r4-2g5.dtb
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
2+
/*
3+
* Copyright (C) 2025 MediaTek Inc.
4+
* Author: Sam.Shih <[email protected]>
5+
*/
6+
/dts-v1/;
7+
/plugin/;
8+
#include <dt-bindings/gpio/gpio.h>
9+
10+
&{/soc/pinctrl@1001f000/pcie-1-hog} {
11+
output-high;
12+
};
13+
14+
15+
&{/soc/pcie@11290000} {
16+
status = "disabled";
17+
};
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
2+
/*
3+
* Copyright (C) 2025 MediaTek Inc.
4+
* Author: Sam.Shih <[email protected]>
5+
*/
6+
/dts-v1/;
7+
/plugin/;
8+
#include <dt-bindings/gpio/gpio.h>
9+
10+
&{/soc/pinctrl@1001f000/pcie-1-hog} {
11+
output-low;
12+
};
13+
14+
15+
&{/soc/pcie@11290000} {
16+
status = "okay";
17+
};
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
2+
/*
3+
* Copyright (C) 2025 MediaTek Inc.
4+
* Author: Frank Wunderlich <[email protected]>
5+
*/
6+
7+
/dts-v1/;
8+
/plugin/;
9+
10+
/ {
11+
compatible = "bananapi,bpi-r4-lite", "mediatek,mt7987a";
12+
};
13+
14+
&{/soc/mmc@11230000} {
15+
pinctrl-names = "default", "state_uhs";
16+
pinctrl-0 = <&mmc_pins_default>;
17+
pinctrl-1 = <&mmc_pins_uhs>;
18+
bus-width = <4>; //due to dat5 = sdmmc cd pin
19+
max-frequency = <52000000>;
20+
cap-mmc-highspeed;
21+
//mmc-hs200-1_8v;
22+
//mmc-hs400-1_8v;
23+
//hs400-ds-delay = <0x12814>;
24+
vqmmc-supply = <&reg_1p8v>;
25+
vmmc-supply = <&reg_3p3v>;
26+
non-removable;
27+
no-sd;
28+
no-sdio;
29+
#address-cells = <1>;
30+
#size-cells = <0>;
31+
status = "okay";
32+
};
33+
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */
2+
/*
3+
* Authors: Daniel Golle <[email protected]>
4+
* Frank Wunderlich <[email protected]>
5+
*/
6+
7+
/dts-v1/;
8+
/plugin/;
9+
10+
/ {
11+
compatible = "bananapi,bpi-r4lite", "mediatek,mt7987a";
12+
};
13+
14+
&{/soc/spi@11009800} {
15+
#address-cells = <1>;
16+
#size-cells = <0>;
17+
status = "okay";
18+
19+
spi_nand: flash@0 {
20+
compatible = "spi-nand";
21+
reg = <0>;
22+
spi-max-frequency = <10000000>;
23+
spi-tx-bus-width = <4>;
24+
spi-rx-bus-width = <4>;
25+
26+
partitions {
27+
compatible = "fixed-partitions";
28+
#address-cells = <1>;
29+
#size-cells = <1>;
30+
31+
partition@0 {
32+
label = "bl2";
33+
reg = <0x0 0x200000>;
34+
};
35+
36+
partition@200000 {
37+
label = "ubi";
38+
reg = <0x200000 0xfe00000>;
39+
compatible = "linux,ubi";
40+
41+
volumes {
42+
ubi-volume-fip {
43+
volname = "fip";
44+
};
45+
46+
ubi-volume-ubootenv {
47+
volname = "ubootenv";
48+
nvmem-layout {
49+
compatible = "u-boot,env-redundant-bool";
50+
};
51+
};
52+
53+
ubi-volume-ubootenv2 {
54+
volname = "ubootenv2";
55+
nvmem-layout {
56+
compatible = "u-boot,env-redundant-bool";
57+
};
58+
};
59+
60+
ubi_rootfs: ubi-volume-rootfs {
61+
volname = "rootfs";
62+
};
63+
};
64+
};
65+
};
66+
};
67+
};
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */
2+
/*
3+
* Authors: Daniel Golle <[email protected]>
4+
* Frank Wunderlich <[email protected]>
5+
*/
6+
7+
/dts-v1/;
8+
/plugin/;
9+
10+
/ {
11+
compatible = "bananapi,bpi-r4lite", "mediatek,mt7987a";
12+
};
13+
14+
&{/soc/spi@11009800} {
15+
#address-cells = <1>;
16+
#size-cells = <0>;
17+
status = "okay";
18+
19+
flash@0 {
20+
compatible = "jedec,spi-nor";
21+
reg = <0>;
22+
spi-max-frequency = <10000000>;
23+
24+
partitions {
25+
compatible = "fixed-partitions";
26+
#address-cells = <1>;
27+
#size-cells = <1>;
28+
29+
partition@0 {
30+
label = "bl2";
31+
reg = <0x0 0x40000>;
32+
read-only;
33+
};
34+
35+
partition@40000 {
36+
label = "u-boot-env";
37+
reg = <0x40000 0x40000>;
38+
};
39+
40+
partition@80000 {
41+
label = "reserved2";
42+
reg = <0x80000 0x80000>;
43+
};
44+
45+
partition@100000 {
46+
label = "fip";
47+
reg = <0x100000 0x80000>;
48+
read-only;
49+
};
50+
51+
partition@180000 {
52+
label = "recovery";
53+
reg = <0x180000 0xa80000>;
54+
};
55+
56+
partition@c00000 {
57+
label = "fit";
58+
reg = <0xc00000 0x1400000>;
59+
};
60+
};
61+
};
62+
};
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
2+
/*
3+
* Copyright (C) 2025 MediaTek Inc.
4+
* Author: Frank Wunderlich <[email protected]>
5+
*/
6+
7+
/dts-v1/;
8+
/plugin/;
9+
10+
#include <dt-bindings/gpio/gpio.h>
11+
12+
/ {
13+
compatible = "bananapi,bpi-r4-lite", "mediatek,mt7987a";
14+
};
15+
16+
&{/soc/mmc@11230000} {
17+
max-frequency = <52000000>;
18+
pinctrl-names = "default", "state_uhs";
19+
pinctrl-0 = <&sd_pins_default>;
20+
pinctrl-1 = <&sd_pins_uhs>;
21+
cd-gpios = <&pio 20 GPIO_ACTIVE_LOW>;
22+
bus-width = <4>;
23+
cap-sd-highspeed;
24+
vmmc-supply = <&reg_3p3v>;
25+
vqmmc-supply = <&reg_3p3v>;
26+
no-mmc;
27+
#address-cells = <1>;
28+
#size-cells = <0>;
29+
status = "okay";
30+
};
31+

0 commit comments

Comments
 (0)