Skip to contentSkip to conversation

arm: dts: extend mt7623 support

PATCH Superseded [email protected] 5 participants 18 messages May 25, 2017 – Jul 31, 2017

Subsystems (5)

v4 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

v4 cover arm: dts: extend mt7623 support

From: Sean Wang <[email protected]>

Changes since v3:
- explain in the commit message why this binding is changed
- patches for dt-binding is reordered at the beginning of patch list
- be concise wigh using SPDX-License-Identifier in new dts file

Changes since v2:
- exclude those patch are 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):
dt-bindings: arm: mediatek: update for MT7623n SoC and relevant boards
dt-bindings: arm: mediatek: add bindings for mediatek MT7623a SoC
Platform
arm: dts: mt7623: rename mt7623-evb.dts to

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

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      | 440 +++++++++++++++++++++
 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, 895 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 v4 1/9 dt-bindings: arm: mediatek: update for MT7623n SoC and relevant boards

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.

And "mediatek,mt7623-evb" can be safely changed to "mediatek,mt7623n-rfb-nand" because mt7623-evb is a kind of debug board internally in Mediatek which real users can't get. So instead we should indicate which variants it belongs to with more specific postfix as the adding here to let people easily know what board they use.

---
 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
maintainer Acked-by on v4 1/9
#2 lore raw

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

Quoted 12 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.

And "mediatek,mt7623-evb" can be safely changed to "mediatek,mt7623n-rfb-nand" because mt7623-evb is a kind of debug board internally in Mediatek which real users can't get. So instead we should indicate which variants it belongs to with more specific postfix as the adding here to let people easily know what board they use.

Quoted 5 lines
---
 Documentation/devicetree/bindings/arm/mediatek.txt | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
#3 lore raw

PATCH v4 2/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
#4 lore raw

PATCH v4 3/9 arm: dts: mt7623: add mt7623-mt6323.dtsi file

In reply to [email protected]

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

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

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.12-rc2 next-20170526]
[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/20170525-142103
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: arm-allyesconfig (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: 60535 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170528/655c3865/attachment-0001.gz>

maintainer
#6 lore raw

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

Quoted 8 lines · kbuild test robot

Hi John,

[auto build test ERROR on robh/for-next]
[also build test ERROR on v4.12-rc2 next-20170526]
[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/20170525-142103
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next

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

Not sure why this happend, as this got already fixed in lkp-tests:
bc0c8847 ("mediatek: mark for-next branch")

Regards,
Matthias

Quoted 19 lines

config: arm-allyesconfig (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

#7 lore raw

Re: [kbuild-all] [PATCH v4 3/9] arm: dts: mt7623: add mt7623-mt6323.dtsi file

Hi, Matthias

Quoted 9 lines · Matthias Brugger
Quoted 6 lines · kbuild test robot

Hi John,

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

Quoted 8 lines
Quoted 2 lines
url:    https://github.com/0day-ci/linux/commits/sean-wang-mediatek-com/arm-dts-extend-mt7623-support/20170525-142103
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next

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

Not sure why this happend, as this got already fixed in lkp-tests:
bc0c8847 ("mediatek: mark for-next branch")

0day mainly relies on MAINTAINERS file to determine the git am base for lkml patches, could you help add your tree in below section?

ARM/Mediatek SoC support

M:      Matthias Brugger <[email protected]>
L:      linux-arm-kernel at lists.infradead.org (moderated for non-subscribers)
L:      linux-mediatek at lists.infradead.org (moderated for non-subscribers)
S:      Maintained
F:      arch/arm/boot/dts/mt6*
F:      arch/arm/boot/dts/mt7*
F:      arch/arm/boot/dts/mt8*
F:      arch/arm/mach-mediatek/
F:      arch/arm64/boot/dts/mediatek/
N:      mtk
K:      mediatek

Thanks,
Xiaolong

Quoted 27 lines

Regards,
Matthias

Quoted 10 lines

config: arm-allyesconfig (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 9 lines
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

_______________________________________________
kbuild-all mailing list
kbuild-all at lists.01.org
https://lists.01.org/mailman/listinfo/kbuild-all

#8 lore raw

PATCH v4 4/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
#9 lore raw

PATCH v4 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
#10 lore raw

PATCH v4 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
#11 lore raw

PATCH v4 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
#12 lore raw

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

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.12-rc2 next-20170526]
[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/20170525-142103
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: arm-allyesconfig (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: 60535 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170529/3a4fb54a/attachment-0001.gz>

#13 lore raw

PATCH v4 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
#14 lore raw

PATCH v4 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      | 440 +++++++++++++++++++++
 3 files changed, 443 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 +440 -0

440 lines not on this page · raw message

Signature · 1 line
2.7.4
#15 lore raw

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

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.12-rc2 next-20170526]
[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/20170525-142103
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: arm-allyesconfig (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:31.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: 60535 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170529/34a5ae13/attachment-0001.gz>

maintainer
#16 lore raw

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

In reply to [email protected]
Quoted 20 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      | 440 +++++++++++++++++++++
  3 files changed, 443 insertions(+)

create mode 100644 arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts

[...]

Quoted 5 lines
arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts new file +0 -0
new file mode 100644
index 0000000..72c7984

[...]

Quoted 10 lines
arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts new file +10 -0
+
+&eth {
+	status = "okay";
+	gmac0: mac at 0 {
+		compatible = "mediatek,eth-mac";
+		reg = <0>;
+		phy-mode = "trgmii";
+		fixed-link {
+			speed = <1000>;
+			full-duplex;

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

Quoted 10 lines
arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts new file +10 -0
+			pause;
+		};
+	};
+
+	mdio: mdio-bus {
+		switch at 0 {
+			compatible = "mediatek,mt7530";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			reg = <0>;

What is this reg needed for? I can't find it neither in the code nor in the bindings (mt7530 and general dsa bindings). Actually it throws a warning when compiling:
arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dtb: Warning (reg_format): "reg" property in /ethernet at 1b100000/mdio-bus/switch at 0 has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1) arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dtb: Warning (avoid_default_addr_size): Relying on default #address-cells value for /ethernet at 1b100000/mdio-bus/switch at 0 arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dtb: Warning (avoid_default_addr_size): Relying on default #size-cells value for /ethernet at 1b100000/mdio-bus/switch at 0

Regards,
Matthias

author
#17 lore raw

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

Quoted 63 lines · Matthias Brugger
Quoted 20 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      | 440 +++++++++++++++++++++
  3 files changed, 443 insertions(+)

create mode 100644 arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts

[...]

Quoted 5 lines
arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts new file +0 -0
new file mode 100644
index 0000000..72c7984

[...]

Quoted 10 lines
arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts new file +10 -0
+
+&eth {
+	status = "okay";
+	gmac0: mac at 0 {
+		compatible = "mediatek,eth-mac";
+		reg = <0>;
+		phy-mode = "trgmii";
+		fixed-link {
+			speed = <1000>;
+			full-duplex;

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

Quoted 10 lines
arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts new file +10 -0
+			pause;
+		};
+	};
+
+	mdio: mdio-bus {
+		switch at 0 {
+			compatible = "mediatek,mt7530";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			reg = <0>;

What is this reg needed for? I can't find it neither in the code nor in the bindings (mt7530 and general dsa bindings). Actually it throws a warning when compiling:
arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dtb: Warning (reg_format): "reg" property in /ethernet at 1b100000/mdio-bus/switch at 0 has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1) arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dtb: Warning (avoid_default_addr_size): Relying on default #address-cells value for /ethernet at 1b100000/mdio-bus/switch at 0 arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dtb: Warning (avoid_default_addr_size): Relying on default #size-cells value for /ethernet at 1b100000/mdio-bus/switch at 0

Quoted 3 lines

Regards,
Matthias

Hi, Matthias

many thanks

It should be just my written mistakes. Recently I prepared the next version including a few fixups and enhancements which also would include the warning correction you reported here.

Sean

Quoted 4 lines

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek