mediatek: more clean solution for out-of-tree DTS

Use approach suggested by Adrian Schmutzler instead of introducing
another device variable.
Also revert the unnecessary white-space changes accidentally introduced
by the previous commit.

Fixed: c067b1e79b ("mediatek: move out-of-tree DTS files to dedicated dts folder")
Suggested-by: Adrian Schmutzler <mail@adrianschmutzler.de>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
Daniel Golle 2021-02-19 01:13:26 +00:00
parent c067b1e79b
commit e3b8849088
No known key found for this signature in database
GPG Key ID: 5A8F39C31C3217CA
4 changed files with 80 additions and 82 deletions

View File

@ -31,7 +31,7 @@ mkfs_target_dir = $(if $(call param_get,pkg,$(1)),$(KDIR)/target-dir-$(call para
KDIR=$(KERNEL_BUILD_DIR) KDIR=$(KERNEL_BUILD_DIR)
KDIR_TMP=$(KDIR)/tmp KDIR_TMP=$(KDIR)/tmp
DTS_DIR:=$(LINUX_DIR)/arch/$(LINUX_KARCH)/boot/dts$$(if $$(DTS_VENDOR),/$$(DTS_VENDOR)) DTS_DIR:=$(LINUX_DIR)/arch/$(LINUX_KARCH)/boot/dts
IMG_PREFIX_EXTRA:=$(if $(EXTRA_IMAGE_NAME),$(call sanitize,$(EXTRA_IMAGE_NAME))-) IMG_PREFIX_EXTRA:=$(if $(EXTRA_IMAGE_NAME),$(call sanitize,$(EXTRA_IMAGE_NAME))-)
IMG_PREFIX_VERNUM:=$(if $(CONFIG_VERSION_FILENAMES),$(call sanitize,$(VERSION_NUMBER))-) IMG_PREFIX_VERNUM:=$(if $(CONFIG_VERSION_FILENAMES),$(call sanitize,$(VERSION_NUMBER))-)
@ -416,7 +416,7 @@ DEFAULT_DEVICE_VARS := \
DEVICE_NAME KERNEL KERNEL_INITRAMFS KERNEL_INITRAMFS_IMAGE KERNEL_SIZE \ DEVICE_NAME KERNEL KERNEL_INITRAMFS KERNEL_INITRAMFS_IMAGE KERNEL_SIZE \
CMDLINE UBOOTENV_IN_UBI KERNEL_IN_UBI BLOCKSIZE PAGESIZE SUBPAGESIZE \ CMDLINE UBOOTENV_IN_UBI KERNEL_IN_UBI BLOCKSIZE PAGESIZE SUBPAGESIZE \
VID_HDR_OFFSET UBINIZE_OPTS UBINIZE_PARTS MKUBIFS_OPTS DEVICE_DTS \ VID_HDR_OFFSET UBINIZE_OPTS UBINIZE_PARTS MKUBIFS_OPTS DEVICE_DTS \
DEVICE_DTS_CONFIG DEVICE_DTS_DIR DEVICE_FDT_NUM DTS_VENDOR SOC BOARD_NAME \ DEVICE_DTS_CONFIG DEVICE_DTS_DIR DEVICE_FDT_NUM SOC BOARD_NAME \
UIMAGE_MAGIC UIMAGE_NAME \ UIMAGE_MAGIC UIMAGE_NAME \
SUPPORTED_DEVICES IMAGE_METADATA KERNEL_ENTRY KERNEL_LOADADDR \ SUPPORTED_DEVICES IMAGE_METADATA KERNEL_ENTRY KERNEL_LOADADDR \
UBOOT_PATH IMAGE_SIZE \ UBOOT_PATH IMAGE_SIZE \

View File

@ -59,13 +59,11 @@
green { green {
label = "bpi-r64:pio:green"; label = "bpi-r64:pio:green";
gpios = <&pio 89 GPIO_ACTIVE_HIGH>; gpios = <&pio 89 GPIO_ACTIVE_HIGH>;
default-state = "off";
}; };
red { red {
label = "bpi-r64:pio:red"; label = "bpi-r64:pio:red";
gpios = <&pio 88 GPIO_ACTIVE_HIGH>; gpios = <&pio 88 GPIO_ACTIVE_HIGH>;
default-state = "off";
}; };
}; };
@ -258,15 +256,15 @@
}; };
&pcie0 { &pcie0 {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&pcie0_pins>; pinctrl-0 = <&pcie0_pins>;
status = "okay"; status = "okay";
}; };
&pcie1 { &pcie1 {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&pcie1_pins>; pinctrl-0 = <&pcie1_pins>;
status = "okay"; status = "okay";
}; };
&pio { &pio {

View File

@ -156,19 +156,19 @@
regulator-always-on; regulator-always-on;
}; };
rtkgsw: rtkgsw@0 { rtkgsw: rtkgsw@0 {
compatible = "mediatek,rtk-gsw"; compatible = "mediatek,rtk-gsw";
mediatek,ethsys = <&ethsys>; mediatek,ethsys = <&ethsys>;
mediatek,mdio = <&mdio>; mediatek,mdio = <&mdio>;
mediatek,reset-pin = <&pio 54 0>; mediatek,reset-pin = <&pio 54 0>;
status = "okay"; status = "okay";
}; };
}; };
&pcie0 { &pcie0 {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&pcie0_pins>; pinctrl-0 = <&pcie0_pins>;
status = "okay"; status = "okay";
}; };
&slot0 { &slot0 {
@ -450,29 +450,31 @@
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&eth_pins>; pinctrl-0 = <&eth_pins>;
gmac0: mac@0 { gmac0: mac@0 {
compatible = "mediatek,eth-mac"; compatible = "mediatek,eth-mac";
reg = <0>; reg = <0>;
phy-mode = "sgmii"; phy-mode = "sgmii";
fixed-link { fixed-link {
speed = <1000>; speed = <1000>;
full-duplex; full-duplex;
pause; pause;
}; };
}; };
gmac1: mac@1 {
compatible = "mediatek,eth-mac"; gmac1: mac@1 {
reg = <1>; compatible = "mediatek,eth-mac";
phy-mode = "rgmii"; reg = <1>;
fixed-link { phy-mode = "rgmii";
speed = <1000>; fixed-link {
full-duplex; speed = <1000>;
pause; full-duplex;
}; pause;
}; };
mdio: mdio-bus { };
#address-cells = <1>;
#size-cells = <0>; mdio: mdio-bus {
}; #address-cells = <1>;
#size-cells = <0>;
};
}; };
&i2c1 { &i2c1 {
@ -512,53 +514,51 @@
spi-max-frequency = <104000000>; spi-max-frequency = <104000000>;
reg = <0>; reg = <0>;
mediatek,bmt-v2;
partitions { partitions {
compatible = "fixed-partitions"; compatible = "fixed-partitions";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
partition@0 { partition@0 {
label = "Preloader"; label = "Preloader";
reg = <0x00000 0x0080000>; reg = <0x00000 0x0080000>;
read-only; read-only;
}; };
partition@80000 { partition@80000 {
label = "ATF"; label = "ATF";
reg = <0x80000 0x0040000>; reg = <0x80000 0x0040000>;
read-only; read-only;
}; };
partition@c0000 { partition@c0000 {
label = "uboot"; label = "uboot";
reg = <0xc0000 0x0080000>; reg = <0xc0000 0x0080000>;
read-only; read-only;
}; };
partition@140000 { partition@140000 {
label = "uboot-env"; label = "uboot-env";
reg = <0x140000 0x0080000>; reg = <0x140000 0x0080000>;
read-only; read-only;
}; };
factory: partition@1c0000 { factory: partition@1c0000 {
label = "factory"; label = "factory";
reg = <0x1c0000 0x0040000>; reg = <0x1c0000 0x0040000>;
read-only; read-only;
}; };
partition@200000 { partition@200000 {
label = "firmware"; label = "firmware";
reg = <0x200000 0x2000000>; reg = <0x200000 0x2000000>;
}; };
partition@2200000 { partition@2200000 {
label = "reserved"; label = "reserved";
reg = <0x2200000 0x4000000>; reg = <0x2200000 0x4000000>;
}; };
}; };
}; };
}; };

View File

@ -1,4 +1,4 @@
DTS_VENDOR := mediatek DTS_DIR := $(DTS_DIR)/mediatek
KERNEL_LOADADDR := 0x44080000 KERNEL_LOADADDR := 0x44080000
define Device/bpi_bananapi-r64 define Device/bpi_bananapi-r64