Skip to contentSkip to conversation

arm: dts: extend mt7623 support

PATCH Superseded [email protected] 4 participants 19 messages May 12, 2017 – May 15, 2017

Subsystems (5)

v3 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

v3 cover arm: dts: extend mt7623 support

From: Sean Wang <[email protected]>

Changes since v2:
- exclude those patches already queued into v4.11-next/dts32
- exclude those patches already sent in separation
- add mt7623a SoC basic support
- update binding SoC for mt7623n and relevant boards

Changes since v1:
Continue the upstream journey based on the previous John Crispin's good work.
- add fixes for the v1 suggestion
- fix typo in the commit log
- add missing pinctrl bindings for mt7623
- reuse pinctrl driver for mt7623
- enhance existing nodes since the way for binding is changed e.g USB
- add more nodes which already gets support from the latest tree e.g MT7530 DSA
- add the dts file for Bananapi R2 (BPI-R2) board

John Crispin (4):
arm: dts: mt7623: add mt7623-mt6323.dtsi file
arm: dts: mt7623: cleanup the mt7623n rfb uart nodes
arm: dts: mt7623: enable the usb device on the mt7623n rfb
arm: dts: mt7623: enable the nand device on the mt7623n nand rfb

Sean Wang (5):
arm: dts: mt7623: rename mt7623-evb.dts to

    arch/arm/boot/dts/mt7623n-rfb.dtsi

dt-bindings: arm: mediatek: update for MT7623n SoC and relevant boards
dt-bindings: arm: mediatek: add bindings for mediatek MT7623a SoC
Platform
ARM: mediatek: add MT7623a smp bringup code
arm: dts: mt7623: add dts file for Bananapi R2 (BPI-R2) board

 Documentation/devicetree/bindings/arm/mediatek.txt |  11 +-
 arch/arm/boot/dts/Makefile                         |   3 +-
 arch/arm/boot/dts/mt7623-evb.dts                   |  33 --
 arch/arm/boot/dts/mt7623-mt6323.dtsi               | 269 ++++++++++++
 arch/arm/boot/dts/mt7623.dtsi                      |   8 +-
 arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts      | 478 +++++++++++++++++++++
 arch/arm/boot/dts/mt7623n-rfb-nand.dts             | 109 +++++
 arch/arm/boot/dts/mt7623n-rfb.dtsi                 |  61 +++
 arch/arm/mach-mediatek/mediatek.c                  |   2 +
 arch/arm/mach-mediatek/platsmp.c                   |   1 +
 10 files changed, 933 insertions(+), 42 deletions(-)
 delete mode 100644 arch/arm/boot/dts/mt7623-evb.dts
 create mode 100644 arch/arm/boot/dts/mt7623-mt6323.dtsi
 create mode 100644 arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
 create mode 100644 arch/arm/boot/dts/mt7623n-rfb-nand.dts
 create mode 100644 arch/arm/boot/dts/mt7623n-rfb.dtsi
Signature · 1 line
2.7.4
#1 lore raw

PATCH v3 1/9 arm: dts: mt7623: add mt7623-mt6323.dtsi file

From: John Crispin <[email protected]>

MediaTek produces various PMICs. Which one is used depends on the actual circuit design. Instead of adding the correct PMIC node to every dts file we instead add a new intermediate dtsi file which adds the PMIC node. Additionally we also add the phandles for the regulators to various nodes.

---
 arch/arm/boot/dts/mt7623-evb.dts     |   2 +-
 arch/arm/boot/dts/mt7623-mt6323.dtsi | 269 +++++++++++++++++++++++++++++++++++
 arch/arm/boot/dts/mt7623.dtsi        |   8 +-
 3 files changed, 274 insertions(+), 5 deletions(-)
 create mode 100644 arch/arm/boot/dts/mt7623-mt6323.dtsi
arch/arm/boot/dts/mt7623-evb.dts +1 -1
index b60b41c..a769149 100644
@@ -13,7 +13,7 @@
  */
 
 /dts-v1/;
-#include "mt7623.dtsi"
+#include "mt7623-mt6323.dtsi"
 
 / {
 	model = "MediaTek MT7623 evaluation board";
arch/arm/boot/dts/mt7623-mt6323.dtsi new file +269 -0

269 lines not on this page · raw message

arch/arm/boot/dts/mt7623.dtsi +4 -4
index d81158b2..e9e0974 100644
@@ -32,22 +32,22 @@
 		#size-cells = <0>;
 		enable-method = "mediatek,mt6589-smp";
 
-		cpu at 0 {
+		cpu0: cpu at 0 {
 			device_type = "cpu";
 			compatible = "arm,cortex-a7";
 			reg = <0x0>;
 		};
-		cpu at 1 {
+		cpu1: cpu at 1 {
 			device_type = "cpu";
 			compatible = "arm,cortex-a7";
 			reg = <0x1>;
 		};
-		cpu at 2 {
+		cpu2: cpu at 2 {
 			device_type = "cpu";
 			compatible = "arm,cortex-a7";
 			reg = <0x2>;
 		};
-		cpu at 3 {
+		cpu3: cpu at 3 {
 			device_type = "cpu";
 			compatible = "arm,cortex-a7";
 			reg = <0x3>;
Signature · 1 line
2.7.4
#5 lore raw

PATCH v3 2/9 arm: dts: mt7623: rename mt7623-evb.dts to arch/arm/boot/dts/mt7623n-rfb.dtsi

In reply to [email protected]

From: Sean Wang <[email protected]>

There are 2 versions of the MT7623 SoC, the one is MT7623n and the other is MT7623a. MT7623n is almost identical to MT7623a but has some additional multimedia features. The reference boards are available as NAND or MMC and might have a different ethernet setup. In order to reduce the duplication of devicetree code we add an intermediate dtsi file for these reference boards. Additionally Mediatek pointed out, that the EVB is yet another board and the board in question is infact the RFB. Take this into account while renaming the files.

---
 arch/arm/boot/dts/Makefile                          |  2 +-
 arch/arm/boot/dts/mt7623n-rfb-nand.dts              | 21 +++++++++++++++++++++
 .../boot/dts/{mt7623-evb.dts => mt7623n-rfb.dtsi}   |  8 ++------
 3 files changed, 24 insertions(+), 7 deletions(-)
 create mode 100644 arch/arm/boot/dts/mt7623n-rfb-nand.dts
 rename arch/arm/boot/dts/{mt7623-evb.dts => mt7623n-rfb.dtsi} (79%)
arch/arm/boot/dts/Makefile +1 -1
index 9c5e1d9..20a7c9d 100644
@@ -1034,7 +1034,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
 	mt6580-evbp1.dtb \
 	mt6589-aquaris5.dtb \
 	mt6592-evb.dtb \
-	mt7623-evb.dtb \
+	mt7623n-rfb-nand.dtb \
 	mt8127-moose.dtb \
 	mt8135-evbp1.dtb
 dtb-$(CONFIG_ARCH_ZX) += zx296702-ad1.dtb
arch/arm/boot/dts/mt7623n-rfb-nand.dts new file +21 -0
new file mode 100644
index 0000000..436d51c
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) 2016 MediaTek Inc.
+ * Author: John Crispin <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+/dts-v1/;
+#include "mt7623n-rfb.dtsi"
+
+/ {
+	model = "MediaTek MT7623N NAND reference board";
+	compatible = "mediatek,mt7623n-rfb-nand", "mediatek,mt7623";
+};
arch/arm/boot/dts/mt7623n-rfb.dtsi renamed from arch/arm/boot/dts/mt7623-evb.dts +2 -6
similarity index 79%
rename from arch/arm/boot/dts/mt7623-evb.dts
rename to arch/arm/boot/dts/mt7623n-rfb.dtsi
index a769149..c526116 100644
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2016 MediaTek Inc.
- * Author: John Crispin <[email protected]>
+ * Author: John Crispin <[email protected]>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -12,18 +12,14 @@
  * GNU General Public License for more details.
  */
 
-/dts-v1/;
 #include "mt7623-mt6323.dtsi"
 
 / {
-	model = "MediaTek MT7623 evaluation board";
-	compatible = "mediatek,mt7623-evb", "mediatek,mt7623";
-
 	chosen {
 		stdout-path = &uart2;
 	};
 
-	memory {
+	memory at 80000000 {
 		reg = <0 0x80000000 0 0x40000000>;
 	};
 };
Signature · 1 line
2.7.4
#6 lore raw

PATCH v3 3/9 dt-bindings: arm: mediatek: update for MT7623n SoC and relevant boards

In reply to [email protected]

From: Sean Wang <[email protected]>

Because there are two versions of MT7623 SoC that is MT7623a and MT7623n respectively. So update the part of MT7623n bindings to allow that people tend to differentiate which MT7623 SoC the boards applies.

---
 Documentation/devicetree/bindings/arm/mediatek.txt | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/arm/mediatek.txt +4 -4
index c860b24..0924b62 100644
@@ -1,6 +1,6 @@
 MediaTek mt65xx, mt67xx & mt81xx Platforms Device Tree Bindings
 
-Boards with a MediaTek mt65xx/mt67xx/mt81xx SoC shall have the
+Boards with a MediaTek mt65xx/mt67xx/mt762x/mt81xx SoC shall have the
 following property:
 
 Required root node property:
@@ -12,7 +12,7 @@ compatible: Must contain one of
    "mediatek,mt6592"
    "mediatek,mt6755"
    "mediatek,mt6795"
-   "mediatek,mt7623"
+   "mediatek,mt7623" which is referred to MT7623N SoC
    "mediatek,mt8127"
    "mediatek,mt8135"
    "mediatek,mt8173"
@@ -38,9 +38,9 @@ Supported boards:
 - Evaluation board for MT6795(Helio X10):
     Required root node properties:
       - compatible = "mediatek,mt6795-evb", "mediatek,mt6795";
-- Evaluation board for MT7623:
+- Reference  board for MT7623n with NAND:
     Required root node properties:
-      - compatible = "mediatek,mt7623-evb", "mediatek,mt7623";
+      - compatible = "mediatek,mt7623n-rfb-nand", "mediatek,mt7623";
 - MTK mt8127 tablet moose EVB:
     Required root node properties:
       - compatible = "mediatek,mt8127-moose", "mediatek,mt8127";
Signature · 1 line
2.7.4
#9 lore raw

PATCH v3 4/9 dt-bindings: arm: mediatek: add bindings for mediatek MT7623a SoC Platform

In reply to [email protected]

From: Sean Wang <[email protected]>

This adds DT binding documentation for Mediatek MT7623a

---
 Documentation/devicetree/bindings/arm/mediatek.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/mediatek.txt +1 -0
index 0924b62..412c6bd 100644
@@ -13,6 +13,7 @@ compatible: Must contain one of
    "mediatek,mt6755"
    "mediatek,mt6795"
    "mediatek,mt7623" which is referred to MT7623N SoC
+   "mediatek,mt7623a"
    "mediatek,mt8127"
    "mediatek,mt8135"
    "mediatek,mt8173"
Signature · 1 line
2.7.4
#11 lore raw

PATCH v3 5/9 ARM: mediatek: add MT7623a smp bringup code

In reply to [email protected]

From: Sean Wang <[email protected]>

Add support for booting secondary CPUs on MT7623a.

---
 arch/arm/mach-mediatek/mediatek.c | 2 ++
 arch/arm/mach-mediatek/platsmp.c  | 1 +
 2 files changed, 3 insertions(+)
arch/arm/mach-mediatek/mediatek.c +2 -0
index a6e3c98..1b52011 100644
@@ -30,6 +30,7 @@ static void __init mediatek_timer_init(void)
 
 	if (of_machine_is_compatible("mediatek,mt6589") ||
 	    of_machine_is_compatible("mediatek,mt7623") ||
+	    of_machine_is_compatible("mediatek,mt7623a") ||
 	    of_machine_is_compatible("mediatek,mt8135") ||
 	    of_machine_is_compatible("mediatek,mt8127")) {
 		/* turn on GPT6 which ungates arch timer clocks */
@@ -49,6 +50,7 @@ static const char * const mediatek_board_dt_compat[] = {
 	"mediatek,mt6589",
 	"mediatek,mt6592",
 	"mediatek,mt7623",
+	"mediatek,mt7623a",
 	"mediatek,mt8127",
 	"mediatek,mt8135",
 	NULL,
arch/arm/mach-mediatek/platsmp.c +1 -0
index 726eb69..27d78c9 100644
@@ -59,6 +59,7 @@ static const struct of_device_id mtk_tz_smp_boot_infos[] __initconst = {
 static const struct of_device_id mtk_smp_boot_infos[] __initconst = {
 	{ .compatible   = "mediatek,mt6589", .data = &mtk_mt6589_boot },
 	{ .compatible   = "mediatek,mt7623", .data = &mtk_mt7623_boot },
+	{ .compatible   = "mediatek,mt7623a", .data = &mtk_mt7623_boot },
 };
 
 static void __iomem *mtk_smp_base;
Signature · 1 line
2.7.4
#12 lore raw

PATCH v3 6/9 arm: dts: mt7623: cleanup the mt7623n rfb uart nodes

In reply to [email protected]

From: John Crispin <[email protected]>

This patch does a cleanup of the uart nodes in the dts file of the RFB. It adds aliases, enables 2 more uarts and explicitly sets the uart mode of the console.

---
 arch/arm/boot/dts/mt7623n-rfb.dtsi | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)
arch/arm/boot/dts/mt7623n-rfb.dtsi +15 -1
index c526116..4963e6a 100644
@@ -16,12 +16,26 @@
 
 / {
 	chosen {
-		stdout-path = &uart2;
+		stdout-path = "serial2:115200n8";
 	};
 
 	memory at 80000000 {
 		reg = <0 0x80000000 0 0x40000000>;
 	};
+
+	aliases {
+		serial0 = &uart0;
+		serial1 = &uart1;
+		serial2 = &uart2;
+	};
+};
+
+&uart0 {
+	status = "okay";
+};
+
+&uart1 {
+	status = "okay";
 };
 
 &uart2 {
Signature · 1 line
2.7.4
#13 lore raw

PATCH v3 7/9 arm: dts: mt7623: enable the usb device on the mt7623n rfb

In reply to [email protected]

From: John Crispin <[email protected]>

All versions of the mt7623n RFB have an USB port so enable the device. There is a gpio that gets used to power up the port supply. Add support for this gpio using the fixed-regulator driver.

---
 arch/arm/boot/dts/mt7623n-rfb.dtsi | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
arch/arm/boot/dts/mt7623n-rfb.dtsi +18 -0
index 4963e6a..2964b4c 100644
@@ -28,6 +28,15 @@
 		serial1 = &uart1;
 		serial2 = &uart2;
 	};
+
+	usb_p1_vbus: regulator at 0 {
+		compatible = "regulator-fixed";
+		regulator-name = "usb_vbus";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		gpio = <&pio 135 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
 };
 
 &uart0 {
@@ -41,3 +50,12 @@
 &uart2 {
 	status = "okay";
 };
+
+&usb1 {
+	vbus-supply = <&usb_p1_vbus>;
+	status = "okay";
+};
+
+&u3phy1 {
+	status = "okay";
+};
Signature · 1 line
2.7.4
#15 lore raw

PATCH v3 8/9 arm: dts: mt7623: enable the nand device on the mt7623n nand rfb

In reply to [email protected]

From: John Crispin <[email protected]>

Enable the nand device and setup pinmux on the mt7632m rfb with nand support.

---
 arch/arm/boot/dts/mt7623n-rfb-nand.dts | 88 ++++++++++++++++++++++++++++++++++
 1 file changed, 88 insertions(+)
arch/arm/boot/dts/mt7623n-rfb-nand.dts +88 -0
index 436d51c..9356095 100644
@@ -19,3 +19,91 @@
 	model = "MediaTek MT7623N NAND reference board";
 	compatible = "mediatek,mt7623n-rfb-nand", "mediatek,mt7623";
 };
+
+&pio {
+	nand_pins_default: nanddefault {
+		pins_dat {
+			pinmux = <MT7623_PIN_111_MSDC0_DAT7_FUNC_NLD7>,
+				 <MT7623_PIN_112_MSDC0_DAT6_FUNC_NLD6>,
+				 <MT7623_PIN_114_MSDC0_DAT4_FUNC_NLD4>,
+				 <MT7623_PIN_118_MSDC0_DAT3_FUNC_NLD3>,
+				 <MT7623_PIN_121_MSDC0_DAT0_FUNC_NLD0>,
+				 <MT7623_PIN_120_MSDC0_DAT1_FUNC_NLD1>,
+				 <MT7623_PIN_113_MSDC0_DAT5_FUNC_NLD5>,
+				 <MT7623_PIN_115_MSDC0_RSTB_FUNC_NLD8>,
+				 <MT7623_PIN_119_MSDC0_DAT2_FUNC_NLD2>;
+			input-enable;
+			drive-strength = <MTK_DRIVE_8mA>;
+			bias-pull-up;
+		};
+
+		pins_we {
+			pinmux = <MT7623_PIN_117_MSDC0_CLK_FUNC_NWEB>;
+			drive-strength = <MTK_DRIVE_8mA>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_10>;
+		};
+
+		pins_ale {
+			pinmux = <MT7623_PIN_116_MSDC0_CMD_FUNC_NALE>;
+			drive-strength = <MTK_DRIVE_8mA>;
+			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
+		};
+	};
+};
+
+&nandc {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&nand_pins_default>;
+	nand at 0 {
+		reg = <0>;
+		spare_per_sector = <64>;
+		nand-ecc-mode = "hw";
+		nand-ecc-strength = <12>;
+		nand-ecc-step-size = <1024>;
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "preloader";
+				reg = <0x0 0x40000>;
+			};
+
+			partition at 40000 {
+				label = "uboot";
+				reg = <0x40000 0x80000>;
+			};
+
+			partition at C0000 {
+				label = "uboot-env";
+				reg = <0xC0000 0x40000>;
+			};
+
+			partition at 140000 {
+				label = "bootimg";
+				reg = <0x140000 0x2000000>;
+			};
+
+			partition at 2140000 {
+				label = "recovery";
+				reg = <0x2140000 0x2000000>;
+			};
+
+			partition at 4140000 {
+				label = "rootfs";
+				reg = <0x4140000 0x1000000>;
+			};
+
+			partition at 5140000 {
+				label = "usrdata";
+				reg = <0x5140000 0x1000000>;
+			};
+		};
+	};
+};
+
+&bch {
+	status = "okay";
+};
Signature · 1 line
2.7.4
#16 lore raw

PATCH v3 9/9 arm: dts: mt7623: add dts file for Bananapi R2 (BPI-R2) board

In reply to [email protected]

From: Sean Wang <[email protected]>

Add support for the Bananapi R2 (BPI-R2) development board from BIPAI KEJI. Detailed hardware information for BPI-R2 which could be found on http://www.banana-pi.org/r2.html

The patch currently only adds Mediatek GMAC, MT7530 Switch, the crypto engine, USB, IR, I2S, I2C, UART, SPI, PWM, GPIO keys, GPIO LEDs and PMIC LEDs. As to the other missing hardware and peripherals, they would be added and integrated continuously.

---
 Documentation/devicetree/bindings/arm/mediatek.txt |   2 +
 arch/arm/boot/dts/Makefile                         |   1 +
 arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts      | 478 +++++++++++++++++++++
 3 files changed, 481 insertions(+)
 create mode 100644 arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
Documentation/devicetree/bindings/arm/mediatek.txt +2 -0
index 412c6bd..7b289bd 100644
@@ -42,6 +42,8 @@ Supported boards:
 - Reference  board for MT7623n with NAND:
     Required root node properties:
       - compatible = "mediatek,mt7623n-rfb-nand", "mediatek,mt7623";
+- Bananapi BPI-R2 board:
+      - compatible = "bananapi,bpi-r2", "mediatek,mt7623";
 - MTK mt8127 tablet moose EVB:
     Required root node properties:
       - compatible = "mediatek,mt8127-moose", "mediatek,mt8127";
arch/arm/boot/dts/Makefile +1 -0
index 20a7c9d..34eb03f 100644
@@ -1035,6 +1035,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
 	mt6589-aquaris5.dtb \
 	mt6592-evb.dtb \
 	mt7623n-rfb-nand.dtb \
+	mt7623n-bananapi-bpi-r2.dtb \
 	mt8127-moose.dtb \
 	mt8135-evbp1.dtb
 dtb-$(CONFIG_ARCH_ZX) += zx296702-ad1.dtb
arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts new file +478 -0

478 lines not on this page · raw message

Signature · 1 line
2.7.4
#2 lore raw

Re: [PATCH v3 1/9] arm: dts: mt7623: add mt7623-mt6323.dtsi file

In reply to [email protected]
reproduce: wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross…

Hi John,

[auto build test ERROR on robh/for-next]
[also build test ERROR on v4.11 next-20170512]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/sean-wang-mediatek-com/arm-dts-extend-mt7623-support/20170512-165138
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: arm-at91_dt_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705

reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm

All errors (new ones prefixed by >>):

>> Error: arch/arm/boot/dts/mt7623-mt6323.dtsi:33.1-7 Label or path pwrap not found
>> Error: arch/arm/boot/dts/mt7623-mt6323.dtsi:261.1-6 Label or path mmc0 not found
>> Error: arch/arm/boot/dts/mt7623-mt6323.dtsi:266.1-6 Label or path mmc1 not found

FATAL ERROR: Syntax error parsing input tree

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 22403 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170512/5bc622c2/attachment-0001.gz>

#14 lore raw

Re: [PATCH v3 7/9] arm: dts: mt7623: enable the usb device on the mt7623n rfb

In reply to [email protected]
reproduce: wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross…

Hi John,

[auto build test ERROR on robh/for-next]
[also build test ERROR on v4.11 next-20170512]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/sean-wang-mediatek-com/arm-dts-extend-mt7623-support/20170512-165138
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: arm-at91_dt_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705

reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm

All errors (new ones prefixed by >>):

Error: arch/arm/boot/dts/mt7623-mt6323.dtsi:33.1-7 Label or path pwrap not found
Error: arch/arm/boot/dts/mt7623-mt6323.dtsi:261.1-6 Label or path mmc0 not found
Error: arch/arm/boot/dts/mt7623-mt6323.dtsi:266.1-6 Label or path mmc1 not found

>> Error: arch/arm/boot/dts/mt7623n-rfb.dtsi:37.20-21 syntax error

FATAL ERROR: Unable to parse input tree

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 22403 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170512/95d35b43/attachment-0001.gz>

#17 lore raw

Re: [PATCH v3 9/9] arm: dts: mt7623: add dts file for Bananapi R2 (BPI-R2) board

In reply to [email protected]
reproduce: wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross…

Hi Sean,

[auto build test ERROR on robh/for-next]
[also build test ERROR on v4.11 next-20170512]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/sean-wang-mediatek-com/arm-dts-extend-mt7623-support/20170512-165138
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: arm-at91_dt_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705

reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm

All errors (new ones prefixed by >>):

Error: arch/arm/boot/dts/mt7623-mt6323.dtsi:33.1-7 Label or path pwrap not found
Error: arch/arm/boot/dts/mt7623-mt6323.dtsi:261.1-6 Label or path mmc0 not found
Error: arch/arm/boot/dts/mt7623-mt6323.dtsi:266.1-6 Label or path mmc1 not found

>> Error: arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts:69.22-23 syntax error

FATAL ERROR: Unable to parse input tree

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 22403 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170512/4ba453ed/attachment-0001.gz>

maintainer
#3 lore raw

Re: [PATCH v3 1/9] arm: dts: mt7623: add mt7623-mt6323.dtsi file

In reply to kbuild test robot
Quoted 5 lines · kbuild test robot

Hi John,

[auto build test ERROR on robh/for-next]
[also build test ERROR on v4.11 next-20170512]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

Mediatek dts patches should be tested against this branch:
https://github.com/mbgg/linux-mediatek.git for-next

Thanks for maintaining the kbuild test robot.

Matthias

Quoted 22 lines
url:    https://github.com/0day-ci/linux/commits/sean-wang-mediatek-com/arm-dts-extend-mt7623-support/20170512-165138
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: arm-at91_dt_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705

reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm

All errors (new ones prefixed by >>):

Quoted 3 lines
Quoted 3 lines

Error: arch/arm/boot/dts/mt7623-mt6323.dtsi:33.1-7 Label or path pwrap not found
Error: arch/arm/boot/dts/mt7623-mt6323.dtsi:261.1-6 Label or path mmc0 not found
Error: arch/arm/boot/dts/mt7623-mt6323.dtsi:266.1-6 Label or path mmc1 not found

FATAL ERROR: Syntax error parsing input tree

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

build bot
#4 lore raw

Re: [PATCH v3 1/9] arm: dts: mt7623: add mt7623-mt6323.dtsi file

OK. I just send a patch for that.

On Fri, May 12, 2017 at 05:46:06PM +0200, Matthias Brugger wrote:

>
>
>On 12/05/17 12:46, kbuild test robot wrote:
>> Hi John,
>>
>> [auto build test ERROR on robh/for-next]
>> [also build test ERROR on v4.11 next-20170512]
>> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
>
>Mediatek dts patches should be tested against this branch:
>https://github.com/mbgg/linux-mediatek.git for-next

OK. I just send a patch for that.

>Thanks for maintaining the kbuild test robot.

You are welcome!

Thanks,
Fengguang

>>
>> url:    https://github.com/0day-ci/linux/commits/sean-wang-mediatek-com/arm-dts-extend-mt7623-support/20170512-165138
>> base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
>> config: arm-at91_dt_defconfig (attached as .config)
>> compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705
>> reproduce:
>>          wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>>          chmod +x ~/bin/make.cross
>>          # save the attached .config to linux build tree
>>          make.cross ARCH=arm
>>
>> All errors (new ones prefixed by >>):
>>
>>>> Error: arch/arm/boot/dts/mt7623-mt6323.dtsi:33.1-7 Label or path pwrap not found
>>>> Error: arch/arm/boot/dts/mt7623-mt6323.dtsi:261.1-6 Label or path mmc0 not found
>>>> Error: arch/arm/boot/dts/mt7623-mt6323.dtsi:266.1-6 Label or path mmc1 not found
>>     FATAL ERROR: Syntax error parsing input tree
>>
>> ---
>> 0-DAY kernel test infrastructure                Open Source Technology Center
>> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
>>
maintainer
#7 lore raw

Re: [PATCH v3 3/9] dt-bindings: arm: mediatek: update for MT7623n SoC and relevant boards

In reply to [email protected]
Quoted 34 lines · sean.wang at mediatek.com

From: Sean Wang <[email protected]>

Because there are two versions of MT7623 SoC that is MT7623a and MT7623n respectively. So update the part of MT7623n bindings to allow that people tend to differentiate which MT7623 SoC the boards applies.

---
  Documentation/devicetree/bindings/arm/mediatek.txt | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/arm/mediatek.txt +2 -2
index c860b24..0924b62 100644
@@ -1,6 +1,6 @@
  MediaTek mt65xx, mt67xx & mt81xx Platforms Device Tree Bindings
 
-Boards with a MediaTek mt65xx/mt67xx/mt81xx SoC shall have the
+Boards with a MediaTek mt65xx/mt67xx/mt762x/mt81xx SoC shall have the
  following property:
 
  Required root node property:
@@ -12,7 +12,7 @@ compatible: Must contain one of
     "mediatek,mt6592"
     "mediatek,mt6755"
     "mediatek,mt6795"
-   "mediatek,mt7623"
+   "mediatek,mt7623" which is referred to MT7623N SoC
     "mediatek,mt8127"
     "mediatek,mt8135"
     "mediatek,mt8173"

Documentation/devicetree/bindings/arm/mediatek.txt Supported boards: · line 43

Quoted 8 lines
Documentation/devicetree/bindings/arm/mediatek.txt +2 -2
@@ -38,9 +38,9 @@ Supported boards:
  - Evaluation board for MT6795(Helio X10):
      Required root node properties:
        - compatible = "mediatek,mt6795-evb", "mediatek,mt6795";
-- Evaluation board for MT7623:
+- Reference  board for MT7623n with NAND:
      Required root node properties:
-      - compatible = "mediatek,mt7623-evb", "mediatek,mt7623";
+      - compatible = "mediatek,mt7623n-rfb-nand", "mediatek,mt7623";

Please explain in the commit message why you change this binding and why this is not problematic. Either in this patch or add a new one.

For convenience for the device-tree maintainer, add the binding patches at the beginning of your patch list. It makes their life easier and a review faster, a clear win-win situation :)

Thanks,
Matthias

Quoted 4 lines
Documentation/devicetree/bindings/arm/mediatek.txt +0 -0
  - MTK mt8127 tablet moose EVB:
      Required root node properties:
        - compatible = "mediatek,mt8127-moose", "mediatek,mt8127";
author
#8 lore raw

Re: [PATCH v3 3/9] dt-bindings: arm: mediatek: update for MT7623n SoC and relevant boards

Hi Matthias,

Appreciate your help on reviewing. Add my comments inline

Quoted 39 lines · Matthias Brugger
Quoted 37 lines · sean.wang at mediatek.com

From: Sean Wang <[email protected]>

Because there are two versions of MT7623 SoC that is MT7623a and MT7623n respectively. So update the part of MT7623n bindings to allow that people tend to differentiate which MT7623 SoC the boards applies.

---
  Documentation/devicetree/bindings/arm/mediatek.txt | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/arm/mediatek.txt +2 -2
index c860b24..0924b62 100644
@@ -1,6 +1,6 @@
  MediaTek mt65xx, mt67xx & mt81xx Platforms Device Tree Bindings
 
-Boards with a MediaTek mt65xx/mt67xx/mt81xx SoC shall have the
+Boards with a MediaTek mt65xx/mt67xx/mt762x/mt81xx SoC shall have the
  following property:
 
  Required root node property:
@@ -12,7 +12,7 @@ compatible: Must contain one of
     "mediatek,mt6592"
     "mediatek,mt6755"
     "mediatek,mt6795"
-   "mediatek,mt7623"
+   "mediatek,mt7623" which is referred to MT7623N SoC
     "mediatek,mt8127"
     "mediatek,mt8135"
     "mediatek,mt8173"
@@ -38,9 +38,9 @@ Supported boards:
  - Evaluation board for MT6795(Helio X10):
      Required root node properties:
        - compatible = "mediatek,mt6795-evb", "mediatek,mt6795";
Quoted 9 lines

Documentation/devicetree/bindings/arm/mediatek.txt Supported boards: · line 43

Quoted 5 lines
Documentation/devicetree/bindings/arm/mediatek.txt +2 -2
-- Evaluation board for MT7623:
+- Reference  board for MT7623n with NAND:
      Required root node properties:
-      - compatible = "mediatek,mt7623-evb", "mediatek,mt7623";
+      - compatible = "mediatek,mt7623n-rfb-nand", "mediatek,mt7623";

Please explain in the commit message why you change this binding and why this is not problematic. Either in this patch or add a new one.

I will add more description for why changing binding here in the commit message of the patch.

"mediatek,mt7623-evb" can be safely changed to "mediatek,mt7623n-rfb-nand" because real users can't get the board that is a kind of debug board internally in Mediatek. Instead We should add more specific board variants as the adding here to let people easily know what board they uses.

The similar description is done as (2/9) arm: dts: mt7623: rename mt7623-evb.dts to arch/arm/boot/dts/mt7623n-rfb.dtsi that states " Additionally Mediatek pointed out, that the EVB is yet another board and the board in question is infact the RFB. Take this into account while renaming the files."

However I didn't make similar sufficient statements into the patch when I split from the last version of the patch. Sorry:(

Quoted 4 lines

For convenience for the device-tree maintainer, add the binding patches at the beginning of your patch list. It makes their life easier and a review faster, a clear win-win situation :)

Okay. thanks for the suggestion:)
I will reorder them to help direct them to the part they're interested in.

Quoted 7 lines

Thanks,
Matthias

Quoted 4 lines
Documentation/devicetree/bindings/arm/mediatek.txt +0 -0
  - MTK mt8127 tablet moose EVB:
      Required root node properties:
        - compatible = "mediatek,mt8127-moose", "mediatek,mt8127";
maintainer Acked-by on v3 4/9
#10 lore raw

Re: [PATCH v3 4/9] dt-bindings: arm: mediatek: add bindings for mediatek MT7623a SoC Platform

In reply to [email protected]
Quoted 8 lines · sean.wang at mediatek.com

From: Sean Wang <[email protected]>

This adds DT binding documentation for Mediatek MT7623a

---
 Documentation/devicetree/bindings/arm/mediatek.txt | 1 +
 1 file changed, 1 insertion(+)
maintainer Acked-by on v3 9/9
#18 lore raw

Re: [PATCH v3 9/9] arm: dts: mt7623: add dts file for Bananapi R2 (BPI-R2) board

In reply to [email protected]
Quoted 83 lines · sean.wang at mediatek.com

From: Sean Wang <[email protected]>

Add support for the Bananapi R2 (BPI-R2) development board from BIPAI KEJI. Detailed hardware information for BPI-R2 which could be found on http://www.banana-pi.org/r2.html

The patch currently only adds Mediatek GMAC, MT7530 Switch, the crypto engine, USB, IR, I2S, I2C, UART, SPI, PWM, GPIO keys, GPIO LEDs and PMIC LEDs. As to the other missing hardware and peripherals, they would be added and integrated continuously.

---
 Documentation/devicetree/bindings/arm/mediatek.txt |   2 +
 arch/arm/boot/dts/Makefile                         |   1 +
 arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts      | 478 +++++++++++++++++++++
 3 files changed, 481 insertions(+)
 create mode 100644 arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
Documentation/devicetree/bindings/arm/mediatek.txt +2 -0
index 412c6bd..7b289bd 100644
@@ -42,6 +42,8 @@ Supported boards:
 - Reference  board for MT7623n with NAND:
     Required root node properties:
       - compatible = "mediatek,mt7623n-rfb-nand", "mediatek,mt7623";
+- Bananapi BPI-R2 board:
+      - compatible = "bananapi,bpi-r2", "mediatek,mt7623";
 - MTK mt8127 tablet moose EVB:
     Required root node properties:
       - compatible = "mediatek,mt8127-moose", "mediatek,mt8127";
arch/arm/boot/dts/Makefile +1 -0
index 20a7c9d..34eb03f 100644
@@ -1035,6 +1035,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
 	mt6589-aquaris5.dtb \
 	mt6592-evb.dtb \
 	mt7623n-rfb-nand.dtb \
+	mt7623n-bananapi-bpi-r2.dtb \
 	mt8127-moose.dtb \
 	mt8135-evbp1.dtb
 dtb-$(CONFIG_ARCH_ZX) += zx296702-ad1.dtb
arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts new file +33 -0
new file mode 100644
index 0000000..cb1bd20
@@ -0,0 +1,478 @@
+/*
+ * Copyright 2017 Sean Wang <[email protected]>
+ *
+ * Sean Wang <[email protected]>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.

arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts line 43

Quoted 10 lines
arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts new file +10 -0
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */

You can use SPDX tag here if you like:

SPDX-License-Identifier: (GPL-2.0+ OR MIT)

Regardless,