Add DTS for BPI-R3
Subsystems (2)
cover Add DTS for BPI-R3
From: Frank Wunderlich <[email protected]>
Add board specific devicetree for BananaPi R3.
It is taken from openwrt
https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=package/boot/uboot-mediatek/patches/430-add-bpi-r3.patch;hb=HEAD
only enabled the factory button which was disabled because a HW-bug in rev 1.0 of r3.
Daniel Golle (1):
board: mediatek: add Bananapi-R3 devicetree
Frank Wunderlich (1):
configs: change bpi-r3 to board specific dts and change prompt
arch/arm/dts/Makefile | 2 + arch/arm/dts/mt7986a-bpi-r3-emmc.dts | 32 ++++ arch/arm/dts/mt7986a-bpi-r3-sd.dts | 268 +++++++++++++++++++++++++++ configs/mt7986a_bpir3_emmc_defconfig | 6 +- configs/mt7986a_bpir3_sd_defconfig | 6 +- 5 files changed, 308 insertions(+), 6 deletions(-) create mode 100644 arch/arm/dts/mt7986a-bpi-r3-emmc.dts create mode 100644 arch/arm/dts/mt7986a-bpi-r3-sd.dts
Signature · 1 line
2.34.1
PATCH 2/2 configs: change bpi-r3 to board specific dts and change prompt
From: Frank Wunderlich <[email protected]>
Use own devicetree for the board and change the prompt.
--- configs/mt7986a_bpir3_emmc_defconfig | 6 +++--- configs/mt7986a_bpir3_sd_defconfig | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-)
configs/mt7986a_bpir3_emmc_defconfig +3 -3
@@ -7,15 +7,15 @@ CONFIG_SYS_MALLOC_F_LEN=0x4000 CONFIG_NR_DRAM_BANKS=1 CONFIG_ENV_SIZE=0x80000 CONFIG_ENV_OFFSET=0x300000 -CONFIG_DEFAULT_DEVICE_TREE="mt7986a-emmc-rfb" -CONFIG_SYS_PROMPT="MT7986> " +CONFIG_DEFAULT_DEVICE_TREE="mt7986a-bpi-r3-emmc" +CONFIG_SYS_PROMPT="BPI-R3> " CONFIG_TARGET_MT7986=y CONFIG_DEBUG_UART_BASE=0x11002000 CONFIG_DEBUG_UART_CLOCK=40000000 CONFIG_SYS_LOAD_ADDR=0x46000000 CONFIG_DEBUG_UART=y # CONFIG_AUTOBOOT is not set -CONFIG_DEFAULT_FDT_FILE="mt7986a-emmc-rfb" +CONFIG_DEFAULT_FDT_FILE="mt7986a-bpi-r3-emmc" CONFIG_LOGLEVEL=7 CONFIG_LOG=y CONFIG_SYS_CBSIZE=512
configs/mt7986a_bpir3_sd_defconfig +3 -3
@@ -7,15 +7,15 @@ CONFIG_SYS_MALLOC_F_LEN=0x4000 CONFIG_NR_DRAM_BANKS=1 CONFIG_ENV_SIZE=0x80000 CONFIG_ENV_OFFSET=0x300000 -CONFIG_DEFAULT_DEVICE_TREE="mt7986a-sd-rfb" -CONFIG_SYS_PROMPT="MT7986> " +CONFIG_DEFAULT_DEVICE_TREE="mt7986a-bpi-r3-sd" +CONFIG_SYS_PROMPT="BPI-R3> " CONFIG_TARGET_MT7986=y CONFIG_DEBUG_UART_BASE=0x11002000 CONFIG_DEBUG_UART_CLOCK=40000000 CONFIG_SYS_LOAD_ADDR=0x46000000 CONFIG_DEBUG_UART=y # CONFIG_AUTOBOOT is not set -CONFIG_DEFAULT_FDT_FILE="mt7986a-sd-rfb" +CONFIG_DEFAULT_FDT_FILE="mt7986a-bpi-r3-sd" CONFIG_LOGLEVEL=7 CONFIG_LOG=y CONFIG_SYS_CBSIZE=512
Signature · 1 line
2.34.1
PATCH 1/2 board: mediatek: add Bananapi-R3 devicetree
In reply to Frank WunderlichFrom: Daniel Golle <[email protected]>
Add board specific devicetree for Bananapi R3 SBC.
---
taken from openwrt
https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=package/boot/uboot-mediatek/patches/430-add-bpi-r3.patch;hb=HEAD
only enabled the factory button which was disabled because a HW-bug in rev 1.0 of r3.
--- arch/arm/dts/Makefile | 2 + arch/arm/dts/mt7986a-bpi-r3-emmc.dts | 32 ++++ arch/arm/dts/mt7986a-bpi-r3-sd.dts | 268 +++++++++++++++++++++++++++ 3 files changed, 302 insertions(+) create mode 100644 arch/arm/dts/mt7986a-bpi-r3-emmc.dts create mode 100644 arch/arm/dts/mt7986a-bpi-r3-sd.dts
arch/arm/dts/Makefile +2 -0
@@ -1296,6 +1296,8 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \ mt7981-rfb.dtb \ mt7981-emmc-rfb.dtb \ mt7981-sd-rfb.dtb \ + mt7986a-bpi-r3-sd.dtb \ + mt7986a-bpi-r3-emmc.dtb \ mt7986a-rfb.dtb \ mt7986b-rfb.dtb \ mt7986a-sd-rfb.dtb \
arch/arm/dts/mt7986a-bpi-r3-emmc.dts new file +32 -0
@@ -0,0 +1,32 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2021 MediaTek Inc. + * Author: Sam Shih <[email protected]> + */ + +/dts-v1/; +#include "mt7986a-bpi-r3-sd.dts" +#include <dt-bindings/gpio/gpio.h> +/ { + reg_1p8v: regulator-1p8v { + compatible = "regulator-fixed"; + regulator-name = "fixed-1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; +}; + +&mmc0 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_pins_default>; + bus-width = <8>; + max-frequency = <200000000>; + cap-mmc-highspeed; + cap-mmc-hw-reset; + vmmc-supply = <®_3p3v>; + vqmmc-supply = <®_1p8v>; + non-removable; + status = "okay"; +};
arch/arm/dts/mt7986a-bpi-r3-sd.dts new file +268 -0
268 lines not on this page · raw message
Signature · 1 line
2.34.1
Aw: [v1 1/2] board: mediatek: add Bananapi-R3 devicetree
Hi
noticed that i need to change the label of wps button back to "wps" when enabling the factory button (else there will be 2 buttons with same label).
Quoted 22 lines
Gesendet: Freitag, 07. April 2023 um 23:26 Uhr
Von: "Frank Wunderlich" <[email protected]>
Betreff: [v1 1/2] board: mediatek: add Bananapi-R3 devicetreeFrom: Daniel Golle <[email protected]>
Add board specific devicetree for Bananapi R3 SBC.
Signed-off-by Daniel Golle <[email protected]>Signed-off-by Frank Wunderlich <[email protected]>---
taken from openwrt
https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=package/boot/uboot-mediatek/patches/430-add-bpi-r3.patch;hb=HEAD
only enabled the factory button which was disabled because a HW-bug in rev 1.0 of r3.
---arch/arm/dts/mt7986a-bpi-r3-sd.dts new file +0
-0
arch/arm/dts/mt7986a-bpi-r3-sd.dts line 40
Quoted 10 lines
arch/arm/dts/mt7986a-bpi-r3-sd.dts new file +10
-0+ keys { + compatible = "gpio-keys"; + + factory { + label = "reset"; + gpios = <&gpio 9 GPIO_ACTIVE_LOW>; + }; + + wps { + label = "reset";
label was changed in openwrt to use this button for reset, but hw bug fixed in newer v1.1 versions of the board. I will change this to "wps" like in linux in next version.
just tell me if the structure is right or if there any other things need to be changed.
arch/arm/dts/mt7986a-bpi-r3-sd.dts line 43
Quoted 3 lines
arch/arm/dts/mt7986a-bpi-r3-sd.dts new file +3
-0+ gpios = <&gpio 10 GPIO_ACTIVE_LOW>; + }; + };
regards Frank