linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 00/19] refactor dts and add support for more boards
@ 2018-02-23 10:16 sean.wang
  2018-02-23 10:16 ` [PATCH v1 01/19] dt-bindings: pinctrl: mediatek: use - instead of _ in examples sean.wang
                   ` (18 more replies)
  0 siblings, 19 replies; 51+ messages in thread
From: sean.wang @ 2018-02-23 10:16 UTC (permalink / raw)
  To: robh+dt, matthias.bgg, mark.rutland, devicetree, linux-mediatek
  Cc: linux-arm-kernel, linux-kernel, Sean Wang

From: Sean Wang <sean.wang@mediatek.com>

The series is to refactor current .dts for allowing more boards can properly
join and reuse almost the same device node definitions.

Before we're doing that, some works about enhancements and fixups are being
made on the dt-binding document and .dts files. In addition, the series has to
depend on the patch [1][2]. Otherwise, certain build failure would have an
occurrence.

[1] arm: dts: mt7623: add PCIe related nodes
http://lists.infradead.org/pipermail/linux-mediatek/2018-February/012053.html

[2] dt-bindings: soc: add header files required for MT7623A SCPSYS dt-binding
http://lists.infradead.org/pipermail/linux-mediatek/2018-February/011930.html

Sean Wang (19):
  dt-bindings: pinctrl: mediatek: use - instead of _ in examples
  dt-bindings: cpufreq: mediatek: use - instead of _ in examples
  dt-bindings: pinctrl: mediatek: add bindings for I2C2 and SPI2 on
    MT7623
  dt-bindings: arm: mediatek: add support for more mt7623 reference
    boards
  arm: dts: mt7623: add BTIF, HSDMA and SPI-NOR device nodes
  arm: dts: mt7623: fix USB initialization fails on bananapi-r2
  arm: dts: mt7623: fix the regulators mmc should use on bananapi-r2
  arm: dts: mt7623: enable three available UARTs on bananapi-r2
  arm: dts: mt7623: add related clock properties to cpu[1-3] nodes
  arm: dts: mt7623: remove useless property pinctrl-names at node
    switch@0
  arm: dts: mt7623: use - instead of _ in DT node name
  arm: dts: mt7623: fix all Warnings (unit_address_vs_reg)
  arm: dts: mt7623: move node mt6323 leds to mt6323.dtsi
  arm: dts: mt7623: extend common file to unify all boards with MT7623
    SoCs
  arm: dts: mt7623: add SPI[1,2], I2C2 and sound related nodes to
    reference board
  arm: dts: mt7623: fixup available memory size on bananapi-r2
  arm: dts: mt7623: add MT7623N reference board with eMMC
  arm: dts: mt7623: add MT7623A reference boards
  arm: dts: mediatek: converted to using SPDX identifiers

 Documentation/devicetree/bindings/arm/mediatek.txt |   9 +
 .../bindings/cpufreq/cpufreq-mediatek.txt          |   6 +-
 .../devicetree/bindings/pinctrl/pinctrl-mt65xx.txt |   4 +-
 arch/arm/boot/dts/Makefile                         |   3 +
 arch/arm/boot/dts/mt2701-evb.dts                   |   9 +-
 arch/arm/boot/dts/mt2701.dtsi                      |   9 +-
 arch/arm/boot/dts/mt6323.dtsi                      |  34 +-
 arch/arm/boot/dts/mt6580-evbp1.dts                 |   9 +-
 arch/arm/boot/dts/mt6580.dtsi                      |   9 +-
 arch/arm/boot/dts/mt6589-aquaris5.dts              |  10 +-
 arch/arm/boot/dts/mt6589.dtsi                      |  12 +-
 arch/arm/boot/dts/mt6592-evb.dts                   |   9 +-
 arch/arm/boot/dts/mt6592.dtsi                      |   9 +-
 arch/arm/boot/dts/mt7623.dtsi                      |  70 ++-
 arch/arm/boot/dts/mt7623a-rfb-emmc.dts             |  22 +
 arch/arm/boot/dts/mt7623a-rfb-nand.dts             |  26 +
 arch/arm/boot/dts/mt7623a-rfb.dtsi                 |  84 +++
 arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts      | 462 +--------------
 arch/arm/boot/dts/mt7623n-rfb-emmc.dts             |  37 ++
 arch/arm/boot/dts/mt7623n-rfb-nand.dts             | 100 +---
 arch/arm/boot/dts/mt7623n-rfb.dtsi                 | 652 ++++++++++++++++++++-
 arch/arm/boot/dts/mt8127-moose.dts                 |   9 +-
 arch/arm/boot/dts/mt8127.dtsi                      |   9 +-
 arch/arm/boot/dts/mt8135-evbp1.dts                 |   9 +-
 arch/arm/boot/dts/mt8135.dtsi                      |   9 +-
 include/dt-bindings/pinctrl/mt7623-pinfunc.h       |  24 +
 26 files changed, 966 insertions(+), 679 deletions(-)
 create mode 100644 arch/arm/boot/dts/mt7623a-rfb-emmc.dts
 create mode 100644 arch/arm/boot/dts/mt7623a-rfb-nand.dts
 create mode 100644 arch/arm/boot/dts/mt7623a-rfb.dtsi
 create mode 100644 arch/arm/boot/dts/mt7623n-rfb-emmc.dts

-- 
2.7.4

^ permalink raw reply	[flat|nested] 51+ messages in thread

* [PATCH v1 01/19] dt-bindings: pinctrl: mediatek: use - instead of _ in examples
  2018-02-23 10:16 [PATCH v1 00/19] refactor dts and add support for more boards sean.wang
@ 2018-02-23 10:16 ` sean.wang
  2018-03-02  7:43   ` Linus Walleij
  2018-02-23 10:16 ` [PATCH v1 02/19] dt-bindings: cpufreq: " sean.wang
                   ` (17 subsequent siblings)
  18 siblings, 1 reply; 51+ messages in thread
From: sean.wang @ 2018-02-23 10:16 UTC (permalink / raw)
  To: robh+dt, matthias.bgg, mark.rutland, devicetree, linux-mediatek
  Cc: linux-arm-kernel, linux-kernel, Sean Wang, Linus Walleij, linux-gpio

From: Sean Wang <sean.wang@mediatek.com>

It should be good that no use "_" is in examples. Consequently,
those nodes in certain files which have an inappropriate name containing
"_" are all being replaced with "-".

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: linux-gpio@vger.kernel.org
Cc: devicetree@vger.kernel.org
---
 Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt
index afa8a18..e7d6f81 100644
--- a/Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt
+++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt
@@ -76,12 +76,12 @@ Examples:
 
 ...
 {
-	syscfg_pctl_a: syscfg_pctl_a@10005000 {
+	syscfg_pctl_a: syscfg-pctl-a@10005000 {
 		compatible = "mediatek,mt8135-pctl-a-syscfg", "syscon";
 		reg = <0 0x10005000 0 0x1000>;
 	};
 
-	syscfg_pctl_b: syscfg_pctl_b@1020c020 {
+	syscfg_pctl_b: syscfg-pctl-b@1020c020 {
 		compatible = "mediatek,mt8135-pctl-b-syscfg", "syscon";
 		reg = <0 0x1020C020 0 0x1000>;
 	};
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [PATCH v1 02/19] dt-bindings: cpufreq: mediatek: use - instead of _ in examples
  2018-02-23 10:16 [PATCH v1 00/19] refactor dts and add support for more boards sean.wang
  2018-02-23 10:16 ` [PATCH v1 01/19] dt-bindings: pinctrl: mediatek: use - instead of _ in examples sean.wang
@ 2018-02-23 10:16 ` sean.wang
  2018-02-26  4:13   ` Viresh Kumar
  2018-03-02 15:53   ` Rob Herring
  2018-02-23 10:16 ` [PATCH v1 03/19] dt-bindings: pinctrl: mediatek: add bindings for I2C2 and SPI2 on MT7623 sean.wang
                   ` (16 subsequent siblings)
  18 siblings, 2 replies; 51+ messages in thread
From: sean.wang @ 2018-02-23 10:16 UTC (permalink / raw)
  To: robh+dt, matthias.bgg, mark.rutland, devicetree, linux-mediatek
  Cc: linux-arm-kernel, linux-kernel, Sean Wang, Rafael J. Wysocki,
	Viresh Kumar, linux-pm

From: Sean Wang <sean.wang@mediatek.com>

It should be good that no use "_" is in examples. Consequently,
those nodes in certain files which have an inappropriate name containing
"_" are all being replaced with "-".

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: linux-pm@vger.kernel.org
Cc: devicetree@vger.kernel.org
---
 Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek.txt b/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek.txt
index d36f07e..38cfbb5 100644
--- a/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek.txt
+++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek.txt
@@ -26,7 +26,7 @@ Optional properties:
 
 Example 1 (MT7623 SoC):
 
-	cpu_opp_table: opp_table {
+	cpu_opp_table: opp-table {
 		compatible = "operating-points-v2";
 		opp-shared;
 
@@ -86,7 +86,7 @@ Example 1 (MT7623 SoC):
 	};
 
 Example 2 (MT8173 SoC):
-	cpu_opp_table_a: opp_table_a {
+	cpu_opp_table_a: opp-table-a {
 		compatible = "operating-points-v2";
 		opp-shared;
 
@@ -131,7 +131,7 @@ Example 2 (MT8173 SoC):
 		};
 	};
 
-	cpu_opp_table_b: opp_table_b {
+	cpu_opp_table_b: opp-table-b {
 		compatible = "operating-points-v2";
 		opp-shared;
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [PATCH v1 03/19] dt-bindings: pinctrl: mediatek: add bindings for I2C2 and SPI2 on MT7623
  2018-02-23 10:16 [PATCH v1 00/19] refactor dts and add support for more boards sean.wang
  2018-02-23 10:16 ` [PATCH v1 01/19] dt-bindings: pinctrl: mediatek: use - instead of _ in examples sean.wang
  2018-02-23 10:16 ` [PATCH v1 02/19] dt-bindings: cpufreq: " sean.wang
@ 2018-02-23 10:16 ` sean.wang
  2018-03-02  7:44   ` Linus Walleij
  2018-02-23 10:16 ` [PATCH v1 04/19] dt-bindings: arm: mediatek: add support for more mt7623 reference boards sean.wang
                   ` (15 subsequent siblings)
  18 siblings, 1 reply; 51+ messages in thread
From: sean.wang @ 2018-02-23 10:16 UTC (permalink / raw)
  To: robh+dt, matthias.bgg, mark.rutland, devicetree, linux-mediatek
  Cc: linux-arm-kernel, linux-kernel, Sean Wang, Linus Walleij, linux-gpio

From: Sean Wang <sean.wang@mediatek.com>

Add missing pinctrl binding about I2C2 and SPI2 which would be used in
devicetree related files.

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-gpio@vger.kernel.org
Cc: devicetree@vger.kernel.org
---
 include/dt-bindings/pinctrl/mt7623-pinfunc.h | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/include/dt-bindings/pinctrl/mt7623-pinfunc.h b/include/dt-bindings/pinctrl/mt7623-pinfunc.h
index 2d6a7b1..4878a67 100644
--- a/include/dt-bindings/pinctrl/mt7623-pinfunc.h
+++ b/include/dt-bindings/pinctrl/mt7623-pinfunc.h
@@ -251,6 +251,12 @@
 #define MT7623_PIN_76_SCL0_FUNC_GPIO76 (MTK_PIN_NO(76) | 0)
 #define MT7623_PIN_76_SCL0_FUNC_SCL0 (MTK_PIN_NO(76) | 1)
 
+#define MT7623_PIN_77_SDA2_FUNC_GPIO77 (MTK_PIN_NO(77) | 0)
+#define MT7623_PIN_77_SDA2_FUNC_SDA2 (MTK_PIN_NO(77) | 1)
+
+#define MT7623_PIN_78_SCL2_FUNC_GPIO78 (MTK_PIN_NO(78) | 0)
+#define MT7623_PIN_78_SCL2_FUNC_SCL2 (MTK_PIN_NO(78) | 1)
+
 #define MT7623_PIN_79_URXD0_FUNC_GPIO79 (MTK_PIN_NO(79) | 0)
 #define MT7623_PIN_79_URXD0_FUNC_URXD0 (MTK_PIN_NO(79) | 1)
 #define MT7623_PIN_79_URXD0_FUNC_UTXD0 (MTK_PIN_NO(79) | 2)
@@ -291,6 +297,24 @@
 #define MT7623_PIN_100_MIPI_TDP0_FUNC_GPIO100 (MTK_PIN_NO(100) | 0)
 #define MT7623_PIN_100_MIPI_TDP0_FUNC_TDP0 (MTK_PIN_NO(100) | 1)
 
+#define MT7623_PIN_101_SPI2_CSN_FUNC_GPIO101 (MTK_PIN_NO(101) | 0)
+#define MT7623_PIN_101_SPI2_CSN_FUNC_SPI2_CS (MTK_PIN_NO(101) | 1)
+#define MT7623_PIN_101_SPI2_CSN_FUNC_SCL3 (MTK_PIN_NO(101) | 3)
+
+#define MT7623_PIN_102_SPI2_MI_FUNC_GPIO102 (MTK_PIN_NO(102) | 0)
+#define MT7623_PIN_102_SPI2_MI_FUNC_SPI2_MI (MTK_PIN_NO(102) | 1)
+#define MT7623_PIN_102_SPI2_MI_FUNC_SPI2_MO (MTK_PIN_NO(102) | 2)
+#define MT7623_PIN_102_SPI2_MI_FUNC_SDA3 (MTK_PIN_NO(102) | 3)
+
+#define MT7623_PIN_103_SPI2_MO_FUNC_GPIO103 (MTK_PIN_NO(103) | 0)
+#define MT7623_PIN_103_SPI2_MO_FUNC_SPI2_MO (MTK_PIN_NO(103) | 1)
+#define MT7623_PIN_103_SPI2_MO_FUNC_SPI2_MI (MTK_PIN_NO(103) | 2)
+#define MT7623_PIN_103_SPI2_MO_FUNC_SCL3 (MTK_PIN_NO(103) | 3)
+
+#define MT7623_PIN_104_SPI2_CK_FUNC_GPIO104 (MTK_PIN_NO(104) | 0)
+#define MT7623_PIN_104_SPI2_CK_FUNC_SPI2_CK (MTK_PIN_NO(104) | 1)
+#define MT7623_PIN_104_SPI2_CK_FUNC_SDA3 (MTK_PIN_NO(104) | 3)
+
 #define MT7623_PIN_105_MSDC1_CMD_FUNC_GPIO105 (MTK_PIN_NO(105) | 0)
 #define MT7623_PIN_105_MSDC1_CMD_FUNC_MSDC1_CMD (MTK_PIN_NO(105) | 1)
 #define MT7623_PIN_105_MSDC1_CMD_FUNC_SDA1 (MTK_PIN_NO(105) | 3)
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [PATCH v1 04/19] dt-bindings: arm: mediatek: add support for more mt7623 reference boards
  2018-02-23 10:16 [PATCH v1 00/19] refactor dts and add support for more boards sean.wang
                   ` (2 preceding siblings ...)
  2018-02-23 10:16 ` [PATCH v1 03/19] dt-bindings: pinctrl: mediatek: add bindings for I2C2 and SPI2 on MT7623 sean.wang
@ 2018-02-23 10:16 ` sean.wang
  2018-03-02 16:00   ` Rob Herring
  2018-02-23 10:16 ` [PATCH v1 05/19] arm: dts: mt7623: add BTIF, HSDMA and SPI-NOR device nodes sean.wang
                   ` (14 subsequent siblings)
  18 siblings, 1 reply; 51+ messages in thread
From: sean.wang @ 2018-02-23 10:16 UTC (permalink / raw)
  To: robh+dt, matthias.bgg, mark.rutland, devicetree, linux-mediatek
  Cc: linux-arm-kernel, linux-kernel, Sean Wang

From: Sean Wang <sean.wang@mediatek.com>

Update binding document for more mt7623[A,N] reference boards being
supported.

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: devicetree@vger.kernel.org
---
 Documentation/devicetree/bindings/arm/mediatek.txt | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/mediatek.txt b/Documentation/devicetree/bindings/arm/mediatek.txt
index 91d5178..7d21ab3 100644
--- a/Documentation/devicetree/bindings/arm/mediatek.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek.txt
@@ -50,6 +50,15 @@ Supported boards:
 - Reference board variant 1 for MT7622:
     Required root node properties:
       - compatible = "mediatek,mt7622-rfb1", "mediatek,mt7622";
+- Reference board for MT7623a with eMMC:
+    Required root node properties:
+      - compatible = "mediatek,mt7623a-rfb-emmc", "mediatek,mt7623";
+- Reference board for MT7623a with NAND:
+    Required root node properties:
+      - compatible = "mediatek,mt7623a-rfb-nand", "mediatek,mt7623";
+- Reference board for MT7623n with eMMC:
+    Required root node properties:
+      - compatible = "mediatek,mt7623n-rfb-emmc", "mediatek,mt7623";
 - Reference  board for MT7623n with NAND:
     Required root node properties:
       - compatible = "mediatek,mt7623n-rfb-nand", "mediatek,mt7623";
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [PATCH v1 05/19] arm: dts: mt7623: add BTIF, HSDMA and SPI-NOR device nodes
  2018-02-23 10:16 [PATCH v1 00/19] refactor dts and add support for more boards sean.wang
                   ` (3 preceding siblings ...)
  2018-02-23 10:16 ` [PATCH v1 04/19] dt-bindings: arm: mediatek: add support for more mt7623 reference boards sean.wang
@ 2018-02-23 10:16 ` sean.wang
  2018-03-12  9:40   ` Matthias Brugger
  2018-02-23 10:16 ` [PATCH v1 06/19] arm: dts: mt7623: fix USB initialization fails on bananapi-r2 sean.wang
                   ` (13 subsequent siblings)
  18 siblings, 1 reply; 51+ messages in thread
From: sean.wang @ 2018-02-23 10:16 UTC (permalink / raw)
  To: robh+dt, matthias.bgg, mark.rutland, devicetree, linux-mediatek
  Cc: linux-arm-kernel, linux-kernel, Sean Wang

From: Sean Wang <sean.wang@mediatek.com>

add BTIF, HSDMA and SPI-NOR device nodes and enable it on relevant boards

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
---
 arch/arm/boot/dts/mt7623.dtsi                 | 36 ++++++++++++++++++++++++++-
 arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts |  6 ++++-
 2 files changed, 40 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/mt7623.dtsi b/arch/arm/boot/dts/mt7623.dtsi
index 91317a1..da56c54 100644
--- a/arch/arm/boot/dts/mt7623.dtsi
+++ b/arch/arm/boot/dts/mt7623.dtsi
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 MediaTek Inc.
+ * Copyright (c) 2017-2018 MediaTek Inc.
  * Author: John Crispin <john@phrozen.org>
  *	   Sean Wang <sean.wang@mediatek.com>
  *
@@ -483,6 +483,18 @@
 		nvmem-cell-names = "calibration-data";
 	};
 
+	btif: serial@1100c000 {
+		compatible = "mediatek,mt7623-btif",
+			     "mediatek,mtk-btif";
+		reg = <0 0x1100c000 0 0x1000>;
+		interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_LOW>;
+		clocks = <&pericfg CLK_PERI_BTIF>;
+		clock-names = "main";
+		reg-shift = <2>;
+		reg-io-width = <4>;
+		status = "disabled";
+	};
+
 	nandc: nfi@1100d000 {
 		compatible = "mediatek,mt7623-nfc",
 			     "mediatek,mt2701-nfc";
@@ -508,6 +520,18 @@
 		status = "disabled";
 	};
 
+	nor_flash: spi@11014000 {
+		compatible = "mediatek,mt7623-nor",
+			     "mediatek,mt8173-nor";
+		reg = <0 0x11014000 0 0x1000>;
+		clocks = <&pericfg CLK_PERI_FLASH>,
+			 <&topckgen CLK_TOP_FLASH_SEL>;
+		clock-names = "spi", "sf";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		status = "disabled";
+	};
+
 	spi1: spi@11016000 {
 		compatible = "mediatek,mt7623-spi",
 			     "mediatek,mt2701-spi";
@@ -861,6 +885,16 @@
 		#reset-cells = <1>;
 	};
 
+	hsdma: dma-controller@1b007000 {
+		compatible = "mediatek,mt7623-hsdma";
+		reg = <0 0x1b007000 0 0x1000>;
+		interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_LOW>;
+		clocks = <&ethsys CLK_ETHSYS_HSDMA>;
+		clock-names = "hsdma";
+		power-domains = <&scpsys MT2701_POWER_DOMAIN_ETH>;
+		#dma-cells = <1>;
+	};
+
 	eth: ethernet@1b100000 {
 		compatible = "mediatek,mt7623-eth",
 			     "mediatek,mt2701-eth",
diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
index 3efecc5..ec11e14 100644
--- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
+++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017 Sean Wang <sean.wang@mediatek.com>
+ * Copyright 2017-2018 Sean Wang <sean.wang@mediatek.com>
  *
  * SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  */
@@ -86,6 +86,10 @@
 	};
 };
 
+&btif {
+	status = "okay";
+};
+
 &cir {
 	pinctrl-names = "default";
 	pinctrl-0 = <&cir_pins_a>;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [PATCH v1 06/19] arm: dts: mt7623: fix USB initialization fails on bananapi-r2
  2018-02-23 10:16 [PATCH v1 00/19] refactor dts and add support for more boards sean.wang
                   ` (4 preceding siblings ...)
  2018-02-23 10:16 ` [PATCH v1 05/19] arm: dts: mt7623: add BTIF, HSDMA and SPI-NOR device nodes sean.wang
@ 2018-02-23 10:16 ` sean.wang
  2018-03-12 11:03   ` Matthias Brugger
  2018-02-23 10:16 ` [PATCH v1 07/19] arm: dts: mt7623: fix the regulators mmc should use " sean.wang
                   ` (12 subsequent siblings)
  18 siblings, 1 reply; 51+ messages in thread
From: sean.wang @ 2018-02-23 10:16 UTC (permalink / raw)
  To: robh+dt, matthias.bgg, mark.rutland, devicetree, linux-mediatek
  Cc: linux-arm-kernel, linux-kernel, Sean Wang, stable

From: Sean Wang <sean.wang@mediatek.com>

Fix that USB initialization fails as below runtime log is present during
booting on bananapi-r2 board by adding missing regulators the USB device
requires. Current regulators USB device uses are being updated with the
correct ones to reflect real configurations which are all from fixed
regulators rather than MT6323 one's output.

[    6.473958] xhci-mtk 1a1c0000.usb: fail to get vbus
[    6.479313] xhci-mtk 1a240000.usb: fail to get vbus

Cc: stable@vger.kernel.org
Fixes: f4ff257cd160 ("arm: dts: mt7623: add support for Bananapi R2 (BPI-R2) board")
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
---
 arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
index ec11e14..f660d15 100644
--- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
+++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
@@ -39,6 +39,24 @@
 		};
 	};
 
+	reg_3p3v: regulator-3p3v {
+		compatible = "regulator-fixed";
+		regulator-name = "fixed-3.3V";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
+
+	reg_5v: regulator-5v {
+		compatible = "regulator-fixed";
+		regulator-name = "fixed-5V";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
+
 	gpio_keys {
 		compatible = "gpio-keys";
 		pinctrl-names = "default";
@@ -502,12 +520,14 @@
 };
 
 &usb1 {
-	vusb33-supply = <&mt6323_vusb_reg>;
+	vusb33-supply = <&reg_3p3v>;
+	vbus-supply = <&reg_5v>;
 	status = "okay";
 };
 
 &usb2 {
-	vusb33-supply = <&mt6323_vusb_reg>;
+	vusb33-supply = <&reg_3p3v>;
+	vbus-supply = <&reg_5v>;
 	status = "okay";
 };
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [PATCH v1 07/19] arm: dts: mt7623: fix the regulators mmc should use on bananapi-r2
  2018-02-23 10:16 [PATCH v1 00/19] refactor dts and add support for more boards sean.wang
                   ` (5 preceding siblings ...)
  2018-02-23 10:16 ` [PATCH v1 06/19] arm: dts: mt7623: fix USB initialization fails on bananapi-r2 sean.wang
@ 2018-02-23 10:16 ` sean.wang
  2018-03-18 23:49   ` Matthias Brugger
  2018-02-23 10:16 ` [PATCH v1 08/19] arm: dts: mt7623: enable three available UARTs " sean.wang
                   ` (11 subsequent siblings)
  18 siblings, 1 reply; 51+ messages in thread
From: sean.wang @ 2018-02-23 10:16 UTC (permalink / raw)
  To: robh+dt, matthias.bgg, mark.rutland, devicetree, linux-mediatek
  Cc: linux-arm-kernel, linux-kernel, Sean Wang

From: Sean Wang <sean.wang@mediatek.com>

Both mmc devices on bananapi-r2 board should all use the fixed regulators
as their power source instead of PMIC MT6323 exports.

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
---
 arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
index f660d15..8ef91d6 100644
--- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
+++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
@@ -39,6 +39,15 @@
 		};
 	};
 
+	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;
+	};
+
 	reg_3p3v: regulator-3p3v {
 		compatible = "regulator-fixed";
 		regulator-name = "fixed-3.3V";
@@ -213,8 +222,8 @@
 	bus-width = <8>;
 	max-frequency = <50000000>;
 	cap-mmc-highspeed;
-	vmmc-supply = <&mt6323_vemc3v3_reg>;
-	vqmmc-supply = <&mt6323_vio18_reg>;
+	vmmc-supply = <&reg_3p3v>;
+	vqmmc-supply = <&reg_1p8v>;
 	non-removable;
 };
 
@@ -227,8 +236,8 @@
 	max-frequency = <50000000>;
 	cap-sd-highspeed;
 	cd-gpios = <&pio 261 GPIO_ACTIVE_LOW>;
-	vmmc-supply = <&mt6323_vmch_reg>;
-	vqmmc-supply = <&mt6323_vio18_reg>;
+	vmmc-supply = <&reg_3p3v>;
+	vqmmc-supply = <&reg_3p3v>;
 };
 
 &pcie {
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [PATCH v1 08/19] arm: dts: mt7623: enable three available UARTs on bananapi-r2
  2018-02-23 10:16 [PATCH v1 00/19] refactor dts and add support for more boards sean.wang
                   ` (6 preceding siblings ...)
  2018-02-23 10:16 ` [PATCH v1 07/19] arm: dts: mt7623: fix the regulators mmc should use " sean.wang
@ 2018-02-23 10:16 ` sean.wang
  2018-03-18 23:49   ` Matthias Brugger
  2018-02-23 10:16 ` [PATCH v1 09/19] arm: dts: mt7623: add related clock properties to cpu[1-3] nodes sean.wang
                   ` (10 subsequent siblings)
  18 siblings, 1 reply; 51+ messages in thread
From: sean.wang @ 2018-02-23 10:16 UTC (permalink / raw)
  To: robh+dt, matthias.bgg, mark.rutland, devicetree, linux-mediatek
  Cc: linux-arm-kernel, linux-kernel, Sean Wang

From: Sean Wang <sean.wang@mediatek.com>

On bpi-r2 board, totally there're four UARTs which we usually called
uart[0-3] helpful to extend slow-I/O devices. Among those ones, uart2 has
dedicated pin slot which is used to console log. uart[0-1] appear at the
40-pins connector and uart3 has no pinout, but just has test points (TP47
for TX and TP48 for RX, respectively) nearby uart2, but we don't enable
uart3 in the patch. The missing pinctrl is also being supplemented for
those newly added devices.

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
---
 arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
index 8ef91d6..6b760be 100644
--- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
+++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
@@ -470,6 +470,13 @@
 				 <MT7623_PIN_82_UTXD1_FUNC_UTXD1>;
 		};
 	};
+
+	uart2_pins_a: uart@2 {
+		pins_dat {
+			pinmux = <MT7623_PIN_14_GPIO14_FUNC_URXD2>,
+				 <MT7623_PIN_15_GPIO15_FUNC_UTXD2>;
+		};
+	};
 };
 
 &pwm {
@@ -515,16 +522,18 @@
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
-	status = "disabled";
+	status = "okay";
 };
 
 &uart1 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart1_pins_a>;
-	status = "disabled";
+	status = "okay";
 };
 
 &uart2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart2_pins_a>;
 	status = "okay";
 };
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [PATCH v1 09/19] arm: dts: mt7623: add related clock properties to cpu[1-3] nodes
  2018-02-23 10:16 [PATCH v1 00/19] refactor dts and add support for more boards sean.wang
                   ` (7 preceding siblings ...)
  2018-02-23 10:16 ` [PATCH v1 08/19] arm: dts: mt7623: enable three available UARTs " sean.wang
@ 2018-02-23 10:16 ` sean.wang
  2018-02-26  4:13   ` Viresh Kumar
  2018-03-18 23:49   ` Matthias Brugger
  2018-02-23 10:16 ` [PATCH v1 10/19] arm: dts: mt7623: remove useless property pinctrl-names at node switch@0 sean.wang
                   ` (9 subsequent siblings)
  18 siblings, 2 replies; 51+ messages in thread
From: sean.wang @ 2018-02-23 10:16 UTC (permalink / raw)
  To: robh+dt, matthias.bgg, mark.rutland, devicetree, linux-mediatek
  Cc: linux-arm-kernel, linux-kernel, Sean Wang, Rafael J. Wysocki,
	Viresh Kumar, linux-pm

From: Sean Wang <sean.wang@mediatek.com>

Complement the missing clock properties cpu[1-3] should depend on.

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: linux-pm@vger.kernel.org
---
 arch/arm/boot/dts/mt7623.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/boot/dts/mt7623.dtsi b/arch/arm/boot/dts/mt7623.dtsi
index da56c54..5cf93a4 100644
--- a/arch/arm/boot/dts/mt7623.dtsi
+++ b/arch/arm/boot/dts/mt7623.dtsi
@@ -94,6 +94,9 @@
 			device_type = "cpu";
 			compatible = "arm,cortex-a7";
 			reg = <0x1>;
+			clocks = <&infracfg CLK_INFRA_CPUSEL>,
+				 <&apmixedsys CLK_APMIXED_MAINPLL>;
+			clock-names = "cpu", "intermediate";
 			operating-points-v2 = <&cpu_opp_table>;
 			clock-frequency = <1300000000>;
 		};
@@ -102,6 +105,9 @@
 			device_type = "cpu";
 			compatible = "arm,cortex-a7";
 			reg = <0x2>;
+			clocks = <&infracfg CLK_INFRA_CPUSEL>,
+				 <&apmixedsys CLK_APMIXED_MAINPLL>;
+			clock-names = "cpu", "intermediate";
 			operating-points-v2 = <&cpu_opp_table>;
 			clock-frequency = <1300000000>;
 		};
@@ -110,6 +116,9 @@
 			device_type = "cpu";
 			compatible = "arm,cortex-a7";
 			reg = <0x3>;
+			clocks = <&infracfg CLK_INFRA_CPUSEL>,
+				 <&apmixedsys CLK_APMIXED_MAINPLL>;
+			clock-names = "cpu", "intermediate";
 			operating-points-v2 = <&cpu_opp_table>;
 			clock-frequency = <1300000000>;
 		};
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [PATCH v1 10/19] arm: dts: mt7623: remove useless property pinctrl-names at node switch@0
  2018-02-23 10:16 [PATCH v1 00/19] refactor dts and add support for more boards sean.wang
                   ` (8 preceding siblings ...)
  2018-02-23 10:16 ` [PATCH v1 09/19] arm: dts: mt7623: add related clock properties to cpu[1-3] nodes sean.wang
@ 2018-02-23 10:16 ` sean.wang
  2018-03-18 23:50   ` Matthias Brugger
  2018-02-23 10:16 ` [PATCH v1 11/19] arm: dts: mt7623: use - instead of _ in DT node name sean.wang
                   ` (8 subsequent siblings)
  18 siblings, 1 reply; 51+ messages in thread
From: sean.wang @ 2018-02-23 10:16 UTC (permalink / raw)
  To: robh+dt, matthias.bgg, mark.rutland, devicetree, linux-mediatek
  Cc: linux-arm-kernel, linux-kernel, Sean Wang

From: Sean Wang <sean.wang@mediatek.com>

The property pinctrl-names is totally superfluous. It would be good to
remove the property to keep the node neatness. There is actually
unnecessary to set up any pins for data path TRGMII between main SoC and
MT7530. Furthermore, it's more reasonable for the pin setup of control
path MDIO bus is being placed inside the node of ethernet controller.

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
---
 arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
index 6b760be..f2d3cfb 100644
--- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
+++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
@@ -151,7 +151,6 @@
 			#address-cells = <1>;
 			#size-cells = <0>;
 			reg = <0>;
-			pinctrl-names = "default";
 			reset-gpios = <&pio 33 0>;
 			core-supply = <&mt6323_vpa_reg>;
 			io-supply = <&mt6323_vemc3v3_reg>;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [PATCH v1 11/19] arm: dts: mt7623: use - instead of _ in DT node name
  2018-02-23 10:16 [PATCH v1 00/19] refactor dts and add support for more boards sean.wang
                   ` (9 preceding siblings ...)
  2018-02-23 10:16 ` [PATCH v1 10/19] arm: dts: mt7623: remove useless property pinctrl-names at node switch@0 sean.wang
@ 2018-02-23 10:16 ` sean.wang
  2018-03-18 23:50   ` Matthias Brugger
  2018-02-23 10:16 ` [PATCH v1 12/19] arm: dts: mt7623: fix all Warnings (unit_address_vs_reg) sean.wang
                   ` (7 subsequent siblings)
  18 siblings, 1 reply; 51+ messages in thread
From: sean.wang @ 2018-02-23 10:16 UTC (permalink / raw)
  To: robh+dt, matthias.bgg, mark.rutland, devicetree, linux-mediatek
  Cc: linux-arm-kernel, linux-kernel, Sean Wang

From: Sean Wang <sean.wang@mediatek.com>

It should be good that no use "_" is in DT node name. Consequently,
those nodes in certain files which have an inappropriate name containing
"_" are all being replaced with "-".

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: devicetree@vger.kernel.org
---
 arch/arm/boot/dts/mt7623.dtsi                 | 12 +++----
 arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 50 +++++++++++++--------------
 arch/arm/boot/dts/mt7623n-rfb-nand.dts        |  6 ++--
 3 files changed, 34 insertions(+), 34 deletions(-)

diff --git a/arch/arm/boot/dts/mt7623.dtsi b/arch/arm/boot/dts/mt7623.dtsi
index 5cf93a4..4b68448 100644
--- a/arch/arm/boot/dts/mt7623.dtsi
+++ b/arch/arm/boot/dts/mt7623.dtsi
@@ -28,7 +28,7 @@
 	compatible = "mediatek,mt7623";
 	interrupt-parent = <&sysirq>;
 
-	cpu_opp_table: opp_table {
+	cpu_opp_table: opp-table {
 		compatible = "operating-points-v2";
 		opp-shared;
 
@@ -145,32 +145,32 @@
 	};
 
 	thermal-zones {
-			cpu_thermal: cpu_thermal {
+			cpu_thermal: cpu-thermal {
 				polling-delay-passive = <1000>;
 				polling-delay = <1000>;
 
 				thermal-sensors = <&thermal 0>;
 
 				trips {
-					cpu_passive: cpu_passive {
+					cpu_passive: cpu-passive {
 						temperature = <47000>;
 						hysteresis = <2000>;
 						type = "passive";
 					};
 
-					cpu_active: cpu_active {
+					cpu_active: cpu-active {
 						temperature = <67000>;
 						hysteresis = <2000>;
 						type = "active";
 					};
 
-					cpu_hot: cpu_hot {
+					cpu_hot: cpu-hot {
 						temperature = <87000>;
 						hysteresis = <2000>;
 						type = "hot";
 					};
 
-					cpu_crit {
+					cpu-crit {
 						temperature = <107000>;
 						hysteresis = <2000>;
 						type = "critical";
diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
index f2d3cfb..a6295ef 100644
--- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
+++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
@@ -66,7 +66,7 @@
 		regulator-always-on;
 	};
 
-	gpio_keys {
+	gpio-keys {
 		compatible = "gpio-keys";
 		pinctrl-names = "default";
 		pinctrl-0 = <&key_pins_a>;
@@ -263,14 +263,14 @@
 
 &pio {
 	cir_pins_a:cir@0 {
-		pins_cir {
+		pins-cir {
 			pinmux = <MT7623_PIN_46_IR_FUNC_IR>;
 			bias-disable;
 		};
 	};
 
 	i2c0_pins_a: i2c@0 {
-		pins_i2c0 {
+		pins-i2c0 {
 			pinmux = <MT7623_PIN_75_SDA0_FUNC_SDA0>,
 				 <MT7623_PIN_76_SCL0_FUNC_SCL0>;
 			bias-disable;
@@ -278,7 +278,7 @@
 	};
 
 	i2c1_pins_a: i2c@1 {
-		pin_i2c1 {
+		pin-i2c1 {
 			pinmux = <MT7623_PIN_57_SDA1_FUNC_SDA1>,
 				 <MT7623_PIN_58_SCL1_FUNC_SCL1>;
 			bias-disable;
@@ -286,7 +286,7 @@
 	};
 
 	i2s0_pins_a: i2s@0 {
-		pin_i2s0 {
+		pin-i2s0 {
 			pinmux = <MT7623_PIN_49_I2S0_DATA_FUNC_I2S0_DATA>,
 				 <MT7623_PIN_72_I2S0_DATA_IN_FUNC_I2S0_DATA_IN>,
 				 <MT7623_PIN_73_I2S0_LRCK_FUNC_I2S0_LRCK>,
@@ -298,7 +298,7 @@
 	};
 
 	i2s1_pins_a: i2s@1 {
-		pin_i2s1 {
+		pin-i2s1 {
 			pinmux = <MT7623_PIN_33_I2S1_DATA_FUNC_I2S1_DATA>,
 				 <MT7623_PIN_34_I2S1_DATA_IN_FUNC_I2S1_DATA_IN>,
 				 <MT7623_PIN_35_I2S1_BCK_FUNC_I2S1_BCK>,
@@ -310,7 +310,7 @@
 	};
 
 	key_pins_a: keys@0 {
-		pins_keys {
+		pins-keys {
 			pinmux = <MT7623_PIN_256_GPIO256_FUNC_GPIO256>,
 				 <MT7623_PIN_257_GPIO257_FUNC_GPIO257> ;
 			input-enable;
@@ -318,7 +318,7 @@
 	};
 
 	led_pins_a: leds@0 {
-		pins_leds {
+		pins-leds {
 			pinmux = <MT7623_PIN_239_EXT_SDIO0_FUNC_GPIO239>,
 				 <MT7623_PIN_240_EXT_XCS_FUNC_GPIO240>,
 				 <MT7623_PIN_241_EXT_SCK_FUNC_GPIO241>;
@@ -326,7 +326,7 @@
 	};
 
 	mmc0_pins_default: mmc0default {
-		pins_cmd_dat {
+		pins-cmd-dat {
 			pinmux = <MT7623_PIN_111_MSDC0_DAT7_FUNC_MSDC0_DAT7>,
 				 <MT7623_PIN_112_MSDC0_DAT6_FUNC_MSDC0_DAT6>,
 				 <MT7623_PIN_113_MSDC0_DAT5_FUNC_MSDC0_DAT5>,
@@ -340,19 +340,19 @@
 			bias-pull-up;
 		};
 
-		pins_clk {
+		pins-clk {
 			pinmux = <MT7623_PIN_117_MSDC0_CLK_FUNC_MSDC0_CLK>;
 			bias-pull-down;
 		};
 
-		pins_rst {
+		pins-rst {
 			pinmux = <MT7623_PIN_115_MSDC0_RSTB_FUNC_MSDC0_RSTB>;
 			bias-pull-up;
 		};
 	};
 
 	mmc0_pins_uhs: mmc0 {
-		pins_cmd_dat {
+		pins-cmd-dat {
 			pinmux = <MT7623_PIN_111_MSDC0_DAT7_FUNC_MSDC0_DAT7>,
 				 <MT7623_PIN_112_MSDC0_DAT6_FUNC_MSDC0_DAT6>,
 				 <MT7623_PIN_113_MSDC0_DAT5_FUNC_MSDC0_DAT5>,
@@ -367,20 +367,20 @@
 			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
 		};
 
-		pins_clk {
+		pins-clk {
 			pinmux = <MT7623_PIN_117_MSDC0_CLK_FUNC_MSDC0_CLK>;
 			drive-strength = <MTK_DRIVE_2mA>;
 			bias-pull-down = <MTK_PUPD_SET_R1R0_01>;
 		};
 
-		pins_rst {
+		pins-rst {
 			pinmux = <MT7623_PIN_115_MSDC0_RSTB_FUNC_MSDC0_RSTB>;
 			bias-pull-up;
 		};
 	};
 
 	mmc1_pins_default: mmc1default {
-		pins_cmd_dat {
+		pins-cmd-dat {
 			pinmux = <MT7623_PIN_107_MSDC1_DAT0_FUNC_MSDC1_DAT0>,
 				 <MT7623_PIN_108_MSDC1_DAT1_FUNC_MSDC1_DAT1>,
 				 <MT7623_PIN_109_MSDC1_DAT2_FUNC_MSDC1_DAT2>,
@@ -391,26 +391,26 @@
 			bias-pull-up = <MTK_PUPD_SET_R1R0_10>;
 		};
 
-		pins_clk {
+		pins-clk {
 			pinmux = <MT7623_PIN_106_MSDC1_CLK_FUNC_MSDC1_CLK>;
 			bias-pull-down;
 			drive-strength = <MTK_DRIVE_4mA>;
 		};
 
-		pins_wp {
+		pins-wp {
 			pinmux = <MT7623_PIN_29_EINT7_FUNC_MSDC1_WP>;
 			input-enable;
 			bias-pull-up;
 		};
 
-		pins_insert {
+		pins-insert {
 			pinmux = <MT7623_PIN_261_MSDC1_INS_FUNC_GPIO261>;
 			bias-pull-up;
 		};
 	};
 
 	mmc1_pins_uhs: mmc1 {
-		pins_cmd_dat {
+		pins-cmd-dat {
 			pinmux = <MT7623_PIN_107_MSDC1_DAT0_FUNC_MSDC1_DAT0>,
 				 <MT7623_PIN_108_MSDC1_DAT1_FUNC_MSDC1_DAT1>,
 				 <MT7623_PIN_109_MSDC1_DAT2_FUNC_MSDC1_DAT2>,
@@ -421,7 +421,7 @@
 			bias-pull-up = <MTK_PUPD_SET_R1R0_10>;
 		};
 
-		pins_clk {
+		pins-clk {
 			pinmux = <MT7623_PIN_106_MSDC1_CLK_FUNC_MSDC1_CLK>;
 			drive-strength = <MTK_DRIVE_4mA>;
 			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
@@ -437,7 +437,7 @@
 	};
 
 	pwm_pins_a: pwm@0 {
-		pins_pwm {
+		pins-pwm {
 			pinmux = <MT7623_PIN_203_PWM0_FUNC_PWM0>,
 				 <MT7623_PIN_204_PWM1_FUNC_PWM1>,
 				 <MT7623_PIN_205_PWM2_FUNC_PWM2>,
@@ -447,7 +447,7 @@
 	};
 
 	spi0_pins_a: spi@0 {
-		pins_spi {
+		pins-spi {
 			pinmux = <MT7623_PIN_53_SPI0_CSN_FUNC_SPI0_CS>,
 				<MT7623_PIN_54_SPI0_CK_FUNC_SPI0_CK>,
 				<MT7623_PIN_55_SPI0_MI_FUNC_SPI0_MI>,
@@ -457,21 +457,21 @@
 	};
 
 	uart0_pins_a: uart@0 {
-		pins_dat {
+		pins-dat {
 			pinmux = <MT7623_PIN_79_URXD0_FUNC_URXD0>,
 				 <MT7623_PIN_80_UTXD0_FUNC_UTXD0>;
 		};
 	};
 
 	uart1_pins_a: uart@1 {
-		pins_dat {
+		pins-dat {
 			pinmux = <MT7623_PIN_81_URXD1_FUNC_URXD1>,
 				 <MT7623_PIN_82_UTXD1_FUNC_UTXD1>;
 		};
 	};
 
 	uart2_pins_a: uart@2 {
-		pins_dat {
+		pins-dat {
 			pinmux = <MT7623_PIN_14_GPIO14_FUNC_URXD2>,
 				 <MT7623_PIN_15_GPIO15_FUNC_UTXD2>;
 		};
diff --git a/arch/arm/boot/dts/mt7623n-rfb-nand.dts b/arch/arm/boot/dts/mt7623n-rfb-nand.dts
index e66de86..f729c71 100644
--- a/arch/arm/boot/dts/mt7623n-rfb-nand.dts
+++ b/arch/arm/boot/dts/mt7623n-rfb-nand.dts
@@ -81,13 +81,13 @@
 
 &pio {
 	nand_pins_default: nanddefault {
-		pins_ale {
+		pins-ale {
 			pinmux = <MT7623_PIN_116_MSDC0_CMD_FUNC_NALE>;
 			drive-strength = <MTK_DRIVE_8mA>;
 			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
 		};
 
-		pins_dat {
+		pins-dat {
 			pinmux = <MT7623_PIN_111_MSDC0_DAT7_FUNC_NLD7>,
 				 <MT7623_PIN_112_MSDC0_DAT6_FUNC_NLD6>,
 				 <MT7623_PIN_114_MSDC0_DAT4_FUNC_NLD4>,
@@ -102,7 +102,7 @@
 			bias-pull-up;
 		};
 
-		pins_we {
+		pins-we {
 			pinmux = <MT7623_PIN_117_MSDC0_CLK_FUNC_NWEB>;
 			drive-strength = <MTK_DRIVE_8mA>;
 			bias-pull-up = <MTK_PUPD_SET_R1R0_10>;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [PATCH v1 12/19] arm: dts: mt7623: fix all Warnings (unit_address_vs_reg)
  2018-02-23 10:16 [PATCH v1 00/19] refactor dts and add support for more boards sean.wang
                   ` (10 preceding siblings ...)
  2018-02-23 10:16 ` [PATCH v1 11/19] arm: dts: mt7623: use - instead of _ in DT node name sean.wang
@ 2018-02-23 10:16 ` sean.wang
  2018-03-18 21:54   ` Matthias Brugger
  2018-02-23 10:16 ` [PATCH v1 13/19] arm: dts: mt7623: move node mt6323 leds to mt6323.dtsi sean.wang
                   ` (6 subsequent siblings)
  18 siblings, 1 reply; 51+ messages in thread
From: sean.wang @ 2018-02-23 10:16 UTC (permalink / raw)
  To: robh+dt, matthias.bgg, mark.rutland, devicetree, linux-mediatek
  Cc: linux-arm-kernel, linux-kernel, Sean Wang

From: Sean Wang <sean.wang@mediatek.com>

Fix below a lot of warnings that dtc complains so much

Warning (unit_address_vs_reg): Node /oscillator@1 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /oscillator@0 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /pinctrl@10005000/cir@0 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /pinctrl@10005000/i2c@0 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /pinctrl@10005000/i2c@1 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /pinctrl@10005000/i2s@0 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /pinctrl@10005000/i2s@1 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /pinctrl@10005000/keys@0 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /pinctrl@10005000/leds@0 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /pinctrl@10005000/pwm@0 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /pinctrl@10005000/spi@0 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /pinctrl@10005000/uart@0 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /pinctrl@10005000/uart@1 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /pinctrl@10005000/uart@2 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /ethernet@1b100000/mdio-bus/switch@0/ports has a reg or ranges property, but no unit name

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: devicetree@vger.kernel.org
---
 arch/arm/boot/dts/mt7623.dtsi                 |  4 ++--
 arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 29 +++++++++++++--------------
 arch/arm/boot/dts/mt7623n-rfb.dtsi            |  2 +-
 3 files changed, 17 insertions(+), 18 deletions(-)

diff --git a/arch/arm/boot/dts/mt7623.dtsi b/arch/arm/boot/dts/mt7623.dtsi
index 4b68448..bf9db44 100644
--- a/arch/arm/boot/dts/mt7623.dtsi
+++ b/arch/arm/boot/dts/mt7623.dtsi
@@ -130,14 +130,14 @@
 		#clock-cells = <0>;
 	};
 
-	rtc32k: oscillator@1 {
+	rtc32k: oscillator-1 {
 		compatible = "fixed-clock";
 		#clock-cells = <0>;
 		clock-frequency = <32000>;
 		clock-output-names = "rtc32k";
 	};
 
-	clk26m: oscillator@0 {
+	clk26m: oscillator-0 {
 		compatible = "fixed-clock";
 		#clock-cells = <0>;
 		clock-frequency = <26000000>;
diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
index a6295ef..75e61c4 100644
--- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
+++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
@@ -158,7 +158,6 @@
 			ports {
 				#address-cells = <1>;
 				#size-cells = <0>;
-				reg = <0>;
 
 				port@0 {
 					reg = <0>;
@@ -262,14 +261,14 @@
 };
 
 &pio {
-	cir_pins_a:cir@0 {
+	cir_pins_a:cir-default {
 		pins-cir {
 			pinmux = <MT7623_PIN_46_IR_FUNC_IR>;
 			bias-disable;
 		};
 	};
 
-	i2c0_pins_a: i2c@0 {
+	i2c0_pins_a: i2c0-default {
 		pins-i2c0 {
 			pinmux = <MT7623_PIN_75_SDA0_FUNC_SDA0>,
 				 <MT7623_PIN_76_SCL0_FUNC_SCL0>;
@@ -277,7 +276,7 @@
 		};
 	};
 
-	i2c1_pins_a: i2c@1 {
+	i2c1_pins_a: i2c1-default {
 		pin-i2c1 {
 			pinmux = <MT7623_PIN_57_SDA1_FUNC_SDA1>,
 				 <MT7623_PIN_58_SCL1_FUNC_SCL1>;
@@ -285,7 +284,7 @@
 		};
 	};
 
-	i2s0_pins_a: i2s@0 {
+	i2s0_pins_a: i2s0-default {
 		pin-i2s0 {
 			pinmux = <MT7623_PIN_49_I2S0_DATA_FUNC_I2S0_DATA>,
 				 <MT7623_PIN_72_I2S0_DATA_IN_FUNC_I2S0_DATA_IN>,
@@ -297,7 +296,7 @@
 		};
 	};
 
-	i2s1_pins_a: i2s@1 {
+	i2s1_pins_b: i2s1-default {
 		pin-i2s1 {
 			pinmux = <MT7623_PIN_33_I2S1_DATA_FUNC_I2S1_DATA>,
 				 <MT7623_PIN_34_I2S1_DATA_IN_FUNC_I2S1_DATA_IN>,
@@ -309,7 +308,7 @@
 		};
 	};
 
-	key_pins_a: keys@0 {
+	key_pins_a: keys-alt {
 		pins-keys {
 			pinmux = <MT7623_PIN_256_GPIO256_FUNC_GPIO256>,
 				 <MT7623_PIN_257_GPIO257_FUNC_GPIO257> ;
@@ -317,7 +316,7 @@
 		};
 	};
 
-	led_pins_a: leds@0 {
+	led_pins_a: leds-alt {
 		pins-leds {
 			pinmux = <MT7623_PIN_239_EXT_SDIO0_FUNC_GPIO239>,
 				 <MT7623_PIN_240_EXT_XCS_FUNC_GPIO240>,
@@ -428,15 +427,15 @@
 		};
 	};
 
-	pcie_default: pcie_pin_default {
-		pins_cmd_dat {
+	pcie_default: pcie-pin-default {
+		pins-cmd-dat {
 			pinmux = <MT7623_PIN_208_AUD_EXT_CK1_FUNC_PCIE0_PERST_N>,
 				 <MT7623_PIN_209_AUD_EXT_CK2_FUNC_PCIE1_PERST_N>;
 			bias-disable;
 		};
 	};
 
-	pwm_pins_a: pwm@0 {
+	pwm_pins_a: pwm-default {
 		pins-pwm {
 			pinmux = <MT7623_PIN_203_PWM0_FUNC_PWM0>,
 				 <MT7623_PIN_204_PWM1_FUNC_PWM1>,
@@ -446,7 +445,7 @@
 		};
 	};
 
-	spi0_pins_a: spi@0 {
+	spi0_pins_a: spi0-default {
 		pins-spi {
 			pinmux = <MT7623_PIN_53_SPI0_CSN_FUNC_SPI0_CS>,
 				<MT7623_PIN_54_SPI0_CK_FUNC_SPI0_CK>,
@@ -456,21 +455,21 @@
 		};
 	};
 
-	uart0_pins_a: uart@0 {
+	uart0_pins_a: uart0-default {
 		pins-dat {
 			pinmux = <MT7623_PIN_79_URXD0_FUNC_URXD0>,
 				 <MT7623_PIN_80_UTXD0_FUNC_UTXD0>;
 		};
 	};
 
-	uart1_pins_a: uart@1 {
+	uart1_pins_a: uart1-default {
 		pins-dat {
 			pinmux = <MT7623_PIN_81_URXD1_FUNC_URXD1>,
 				 <MT7623_PIN_82_UTXD1_FUNC_UTXD1>;
 		};
 	};
 
-	uart2_pins_a: uart@2 {
+	uart2_pins_a: uart2-default {
 		pins-dat {
 			pinmux = <MT7623_PIN_14_GPIO14_FUNC_URXD2>,
 				 <MT7623_PIN_15_GPIO15_FUNC_UTXD2>;
diff --git a/arch/arm/boot/dts/mt7623n-rfb.dtsi b/arch/arm/boot/dts/mt7623n-rfb.dtsi
index 256c5fd..128586d 100644
--- a/arch/arm/boot/dts/mt7623n-rfb.dtsi
+++ b/arch/arm/boot/dts/mt7623n-rfb.dtsi
@@ -50,7 +50,7 @@
 		reg = <0 0x80000000 0 0x40000000>;
 	};
 
-	usb_p1_vbus: regulator@0 {
+	usb_p1_vbus: regulator-5v {
 		compatible = "regulator-fixed";
 		regulator-name = "usb_vbus";
 		regulator-min-microvolt = <5000000>;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [PATCH v1 13/19] arm: dts: mt7623: move node mt6323 leds to mt6323.dtsi
  2018-02-23 10:16 [PATCH v1 00/19] refactor dts and add support for more boards sean.wang
                   ` (11 preceding siblings ...)
  2018-02-23 10:16 ` [PATCH v1 12/19] arm: dts: mt7623: fix all Warnings (unit_address_vs_reg) sean.wang
@ 2018-02-23 10:16 ` sean.wang
  2018-03-02 15:40   ` Rob Herring
  2018-03-18 22:01   ` Matthias Brugger
  2018-02-23 10:16 ` [PATCH v1 14/19] arm: dts: mt7623: extend common file to unify all boards with MT7623 SoCs sean.wang
                   ` (5 subsequent siblings)
  18 siblings, 2 replies; 51+ messages in thread
From: sean.wang @ 2018-02-23 10:16 UTC (permalink / raw)
  To: robh+dt, matthias.bgg, mark.rutland, devicetree, linux-mediatek
  Cc: linux-arm-kernel, linux-kernel, Sean Wang, Lee Jones

From: Sean Wang <sean.wang@mediatek.com>

Since those LEDs are parts of PMIC MT6323, it is reasonable to merge
those LEDs node definition back into mt6323.dtsi. This way can improve
the reusability of those nodes among different boards with the same PMIC.

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Cc: Lee Jones <lee.jones@linaro.org>
---
 arch/arm/boot/dts/mt6323.dtsi                 | 26 ++++++++++++++++++++++++-
 arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 28 ---------------------------
 2 files changed, 25 insertions(+), 29 deletions(-)

diff --git a/arch/arm/boot/dts/mt6323.dtsi b/arch/arm/boot/dts/mt6323.dtsi
index 7c783d6..44c5642 100644
--- a/arch/arm/boot/dts/mt6323.dtsi
+++ b/arch/arm/boot/dts/mt6323.dtsi
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 MediaTek Inc.
+ * Copyright (c) 2017-2018 MediaTek Inc.
  * Author: John Crispin <john@phrozen.org>
  *	   Sean Wang <sean.wang@mediatek.com>
  * This program is free software; you can redistribute it and/or modify
@@ -237,5 +237,29 @@
 				regulator-enable-ramp-delay = <216>;
 			};
 		};
+
+		leds {
+			compatible = "mediatek,mt6323-led";
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			led@0 {
+				reg = <0>;
+				label = "mt6323:isink:green";
+				default-state = "off";
+			};
+
+			led@1 {
+				reg = <1>;
+				label = "mt6323:isink:red";
+				default-state = "off";
+			};
+
+			led@2 {
+				reg = <2>;
+				label = "mt6323:isink:blue";
+				default-state = "off";
+			};
+		};
 	};
 };
diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
index 75e61c4..767b225 100644
--- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
+++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
@@ -483,34 +483,6 @@
 	status = "okay";
 };
 
-&pwrap {
-	mt6323 {
-		mt6323led: led {
-			compatible = "mediatek,mt6323-led";
-			#address-cells = <1>;
-			#size-cells = <0>;
-
-			led@0 {
-				reg = <0>;
-				label = "bpi-r2:isink:green";
-				default-state = "off";
-			};
-
-			led@1 {
-				reg = <1>;
-				label = "bpi-r2:isink:red";
-				default-state = "off";
-			};
-
-			led@2 {
-				reg = <2>;
-				label = "bpi-r2:isink:blue";
-				default-state = "off";
-			};
-		};
-	};
-};
-
 &spi0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&spi0_pins_a>;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [PATCH v1 14/19] arm: dts: mt7623: extend common file to unify all boards with MT7623 SoCs
  2018-02-23 10:16 [PATCH v1 00/19] refactor dts and add support for more boards sean.wang
                   ` (12 preceding siblings ...)
  2018-02-23 10:16 ` [PATCH v1 13/19] arm: dts: mt7623: move node mt6323 leds to mt6323.dtsi sean.wang
@ 2018-02-23 10:16 ` sean.wang
  2018-02-23 10:16 ` [PATCH v1 15/19] arm: dts: mt7623: add SPI[1,2], I2C2 and sound related nodes to reference board sean.wang
                   ` (4 subsequent siblings)
  18 siblings, 0 replies; 51+ messages in thread
From: sean.wang @ 2018-02-23 10:16 UTC (permalink / raw)
  To: robh+dt, matthias.bgg, mark.rutland, devicetree, linux-mediatek
  Cc: linux-arm-kernel, linux-kernel, Sean Wang

From: Sean Wang <sean.wang@mediatek.com>

In fact, bananapi-r2 board is derived and customized from the official
MT7623N reference board with eMMC.

In order to introduce more boards such as official MT7623A reference
boards to current devicetree without copy-n-pasting the almost same
content of nodes into every new file, it's better to reuse those nodes
by consolidating them into common files mt7623n-rfb.dtsi from
mt7623n-bananapi-bpi-r2.dts and allow existing or new .dts files to refer
to them.

After grouping those common nodes into mt7623n-rfb.dtsi, it becomes more
simple to know what differences are between each board from terminal .dts
such that bananapi-r2 uses eMMC as the primary storage, has the dedicated
GPIO LEDs, and I2C1 working through pin 57 and 58 as the pin-usage,
enables the second USB slot and owns its definition for each switch port
against the existing mt7623n-rfb-nand.dts.

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
---
 arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 467 +--------------------
 arch/arm/boot/dts/mt7623n-rfb-nand.dts        |  91 +---
 arch/arm/boot/dts/mt7623n-rfb.dtsi            | 570 +++++++++++++++++++++++++-
 3 files changed, 575 insertions(+), 553 deletions(-)

diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
index 767b225..373a0dd 100644
--- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
+++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
@@ -5,83 +5,14 @@
  */
 
 /dts-v1/;
-#include <dt-bindings/input/input.h>
-#include "mt7623.dtsi"
-#include "mt6323.dtsi"
+#include "mt7623n-rfb.dtsi"
 
 / {
 	model = "Bananapi BPI-R2";
 	compatible = "bananapi,bpi-r2", "mediatek,mt7623";
 
-	aliases {
-		serial2 = &uart2;
-	};
-
 	chosen {
-		stdout-path = "serial2:115200n8";
-	};
-
-	cpus {
-		cpu@0 {
-			proc-supply = <&mt6323_vproc_reg>;
-		};
-
-		cpu@1 {
-			proc-supply = <&mt6323_vproc_reg>;
-		};
-
-		cpu@2 {
-			proc-supply = <&mt6323_vproc_reg>;
-		};
-
-		cpu@3 {
-			proc-supply = <&mt6323_vproc_reg>;
-		};
-	};
-
-	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;
-	};
-
-	reg_3p3v: regulator-3p3v {
-		compatible = "regulator-fixed";
-		regulator-name = "fixed-3.3V";
-		regulator-min-microvolt = <3300000>;
-		regulator-max-microvolt = <3300000>;
-		regulator-boot-on;
-		regulator-always-on;
-	};
-
-	reg_5v: regulator-5v {
-		compatible = "regulator-fixed";
-		regulator-name = "fixed-5V";
-		regulator-min-microvolt = <5000000>;
-		regulator-max-microvolt = <5000000>;
-		regulator-boot-on;
-		regulator-always-on;
-	};
-
-	gpio-keys {
-		compatible = "gpio-keys";
-		pinctrl-names = "default";
-		pinctrl-0 = <&key_pins_a>;
-
-		factory {
-			label = "factory";
-			linux,code = <BTN_0>;
-			gpios = <&pio 256 GPIO_ACTIVE_LOW>;
-		};
-
-		wps {
-			label = "wps";
-			linux,code = <KEY_WPS_BUTTON>;
-			gpios = <&pio 257 GPIO_ACTIVE_HIGH>;
-		};
+		bootargs = "console=ttyS2,115200n8 earlyprintk";
 	};
 
 	leds {
@@ -107,215 +38,38 @@
 			default-state = "off";
 		};
 	};
-
-	memory@80000000 {
-		reg = <0 0x80000000 0 0x40000000>;
-	};
-};
-
-&btif {
-	status = "okay";
-};
-
-&cir {
-	pinctrl-names = "default";
-	pinctrl-0 = <&cir_pins_a>;
-	status = "okay";
-};
-
-&crypto {
-	status = "okay";
-};
-
-&eth {
-	status = "okay";
-
-	gmac0: mac@0 {
-		compatible = "mediatek,eth-mac";
-		reg = <0>;
-		phy-mode = "trgmii";
-
-		fixed-link {
-			speed = <1000>;
-			full-duplex;
-			pause;
-		};
-	};
-
-	mdio: mdio-bus {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		switch@0 {
-			compatible = "mediatek,mt7530";
-			#address-cells = <1>;
-			#size-cells = <0>;
-			reg = <0>;
-			reset-gpios = <&pio 33 0>;
-			core-supply = <&mt6323_vpa_reg>;
-			io-supply = <&mt6323_vemc3v3_reg>;
-
-			ports {
-				#address-cells = <1>;
-				#size-cells = <0>;
-
-				port@0 {
-					reg = <0>;
-					label = "wan";
-				};
-
-				port@1 {
-					reg = <1>;
-					label = "lan0";
-				};
-
-				port@2 {
-					reg = <2>;
-					label = "lan1";
-				};
-
-				port@3 {
-					reg = <3>;
-					label = "lan2";
-				};
-
-				port@4 {
-					reg = <4>;
-					label = "lan3";
-				};
-
-				port@6 {
-					reg = <6>;
-					label = "cpu";
-					ethernet = <&gmac0>;
-					phy-mode = "trgmii";
-
-					fixed-link {
-						speed = <1000>;
-						full-duplex;
-					};
-				};
-			};
-		};
-	};
-};
-
-&i2c0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c0_pins_a>;
-	status = "okay";
 };
 
 &i2c1 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&i2c1_pins_a>;
-	status = "okay";
 };
 
 &mmc0 {
-	pinctrl-names = "default", "state_uhs";
-	pinctrl-0 = <&mmc0_pins_default>;
-	pinctrl-1 = <&mmc0_pins_uhs>;
 	status = "okay";
-	bus-width = <8>;
-	max-frequency = <50000000>;
-	cap-mmc-highspeed;
-	vmmc-supply = <&reg_3p3v>;
-	vqmmc-supply = <&reg_1p8v>;
-	non-removable;
 };
 
-&mmc1 {
-	pinctrl-names = "default", "state_uhs";
-	pinctrl-0 = <&mmc1_pins_default>;
-	pinctrl-1 = <&mmc1_pins_uhs>;
-	status = "okay";
-	bus-width = <4>;
-	max-frequency = <50000000>;
-	cap-sd-highspeed;
-	cd-gpios = <&pio 261 GPIO_ACTIVE_LOW>;
-	vmmc-supply = <&reg_3p3v>;
-	vqmmc-supply = <&reg_3p3v>;
+&mt7530p0 {
+	label = "wan";
 };
 
-&pcie {
-	pinctrl-names = "default";
-	pinctrl-0 = <&pcie_default>;
-	status = "okay";
-
-	pcie@0,0 {
-		status = "okay";
-	};
+&mt7530p1 {
+	label = "lan0";
+};
 
-	pcie@1,0 {
-		status = "okay";
-	};
+&mt7530p2 {
+	label = "lan1";
 };
 
-&pcie0_phy {
-	status = "okay";
+&mt7530p3 {
+	label = "lan2";
 };
 
-&pcie1_phy {
-	status = "okay";
+&mt7530p4 {
+	label = "lan3";
 };
 
 &pio {
-	cir_pins_a:cir-default {
-		pins-cir {
-			pinmux = <MT7623_PIN_46_IR_FUNC_IR>;
-			bias-disable;
-		};
-	};
-
-	i2c0_pins_a: i2c0-default {
-		pins-i2c0 {
-			pinmux = <MT7623_PIN_75_SDA0_FUNC_SDA0>,
-				 <MT7623_PIN_76_SCL0_FUNC_SCL0>;
-			bias-disable;
-		};
-	};
-
-	i2c1_pins_a: i2c1-default {
-		pin-i2c1 {
-			pinmux = <MT7623_PIN_57_SDA1_FUNC_SDA1>,
-				 <MT7623_PIN_58_SCL1_FUNC_SCL1>;
-			bias-disable;
-		};
-	};
-
-	i2s0_pins_a: i2s0-default {
-		pin-i2s0 {
-			pinmux = <MT7623_PIN_49_I2S0_DATA_FUNC_I2S0_DATA>,
-				 <MT7623_PIN_72_I2S0_DATA_IN_FUNC_I2S0_DATA_IN>,
-				 <MT7623_PIN_73_I2S0_LRCK_FUNC_I2S0_LRCK>,
-				 <MT7623_PIN_74_I2S0_BCK_FUNC_I2S0_BCK>,
-				 <MT7623_PIN_126_I2S0_MCLK_FUNC_I2S0_MCLK>;
-			drive-strength = <MTK_DRIVE_12mA>;
-			bias-pull-down;
-		};
-	};
-
-	i2s1_pins_b: i2s1-default {
-		pin-i2s1 {
-			pinmux = <MT7623_PIN_33_I2S1_DATA_FUNC_I2S1_DATA>,
-				 <MT7623_PIN_34_I2S1_DATA_IN_FUNC_I2S1_DATA_IN>,
-				 <MT7623_PIN_35_I2S1_BCK_FUNC_I2S1_BCK>,
-				 <MT7623_PIN_36_I2S1_LRCK_FUNC_I2S1_LRCK>,
-				 <MT7623_PIN_37_I2S1_MCLK_FUNC_I2S1_MCLK>;
-			drive-strength = <MTK_DRIVE_12mA>;
-			bias-pull-down;
-		};
-	};
-
-	key_pins_a: keys-alt {
-		pins-keys {
-			pinmux = <MT7623_PIN_256_GPIO256_FUNC_GPIO256>,
-				 <MT7623_PIN_257_GPIO257_FUNC_GPIO257> ;
-			input-enable;
-		};
-	};
-
 	led_pins_a: leds-alt {
 		pins-leds {
 			pinmux = <MT7623_PIN_239_EXT_SDIO0_FUNC_GPIO239>,
@@ -323,207 +77,12 @@
 				 <MT7623_PIN_241_EXT_SCK_FUNC_GPIO241>;
 		};
 	};
-
-	mmc0_pins_default: mmc0default {
-		pins-cmd-dat {
-			pinmux = <MT7623_PIN_111_MSDC0_DAT7_FUNC_MSDC0_DAT7>,
-				 <MT7623_PIN_112_MSDC0_DAT6_FUNC_MSDC0_DAT6>,
-				 <MT7623_PIN_113_MSDC0_DAT5_FUNC_MSDC0_DAT5>,
-				 <MT7623_PIN_114_MSDC0_DAT4_FUNC_MSDC0_DAT4>,
-				 <MT7623_PIN_118_MSDC0_DAT3_FUNC_MSDC0_DAT3>,
-				 <MT7623_PIN_119_MSDC0_DAT2_FUNC_MSDC0_DAT2>,
-				 <MT7623_PIN_120_MSDC0_DAT1_FUNC_MSDC0_DAT1>,
-				 <MT7623_PIN_121_MSDC0_DAT0_FUNC_MSDC0_DAT0>,
-				 <MT7623_PIN_116_MSDC0_CMD_FUNC_MSDC0_CMD>;
-			input-enable;
-			bias-pull-up;
-		};
-
-		pins-clk {
-			pinmux = <MT7623_PIN_117_MSDC0_CLK_FUNC_MSDC0_CLK>;
-			bias-pull-down;
-		};
-
-		pins-rst {
-			pinmux = <MT7623_PIN_115_MSDC0_RSTB_FUNC_MSDC0_RSTB>;
-			bias-pull-up;
-		};
-	};
-
-	mmc0_pins_uhs: mmc0 {
-		pins-cmd-dat {
-			pinmux = <MT7623_PIN_111_MSDC0_DAT7_FUNC_MSDC0_DAT7>,
-				 <MT7623_PIN_112_MSDC0_DAT6_FUNC_MSDC0_DAT6>,
-				 <MT7623_PIN_113_MSDC0_DAT5_FUNC_MSDC0_DAT5>,
-				 <MT7623_PIN_114_MSDC0_DAT4_FUNC_MSDC0_DAT4>,
-				 <MT7623_PIN_118_MSDC0_DAT3_FUNC_MSDC0_DAT3>,
-				 <MT7623_PIN_119_MSDC0_DAT2_FUNC_MSDC0_DAT2>,
-				 <MT7623_PIN_120_MSDC0_DAT1_FUNC_MSDC0_DAT1>,
-				 <MT7623_PIN_121_MSDC0_DAT0_FUNC_MSDC0_DAT0>,
-				 <MT7623_PIN_116_MSDC0_CMD_FUNC_MSDC0_CMD>;
-			input-enable;
-			drive-strength = <MTK_DRIVE_2mA>;
-			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
-		};
-
-		pins-clk {
-			pinmux = <MT7623_PIN_117_MSDC0_CLK_FUNC_MSDC0_CLK>;
-			drive-strength = <MTK_DRIVE_2mA>;
-			bias-pull-down = <MTK_PUPD_SET_R1R0_01>;
-		};
-
-		pins-rst {
-			pinmux = <MT7623_PIN_115_MSDC0_RSTB_FUNC_MSDC0_RSTB>;
-			bias-pull-up;
-		};
-	};
-
-	mmc1_pins_default: mmc1default {
-		pins-cmd-dat {
-			pinmux = <MT7623_PIN_107_MSDC1_DAT0_FUNC_MSDC1_DAT0>,
-				 <MT7623_PIN_108_MSDC1_DAT1_FUNC_MSDC1_DAT1>,
-				 <MT7623_PIN_109_MSDC1_DAT2_FUNC_MSDC1_DAT2>,
-				 <MT7623_PIN_110_MSDC1_DAT3_FUNC_MSDC1_DAT3>,
-				 <MT7623_PIN_105_MSDC1_CMD_FUNC_MSDC1_CMD>;
-			input-enable;
-			drive-strength = <MTK_DRIVE_4mA>;
-			bias-pull-up = <MTK_PUPD_SET_R1R0_10>;
-		};
-
-		pins-clk {
-			pinmux = <MT7623_PIN_106_MSDC1_CLK_FUNC_MSDC1_CLK>;
-			bias-pull-down;
-			drive-strength = <MTK_DRIVE_4mA>;
-		};
-
-		pins-wp {
-			pinmux = <MT7623_PIN_29_EINT7_FUNC_MSDC1_WP>;
-			input-enable;
-			bias-pull-up;
-		};
-
-		pins-insert {
-			pinmux = <MT7623_PIN_261_MSDC1_INS_FUNC_GPIO261>;
-			bias-pull-up;
-		};
-	};
-
-	mmc1_pins_uhs: mmc1 {
-		pins-cmd-dat {
-			pinmux = <MT7623_PIN_107_MSDC1_DAT0_FUNC_MSDC1_DAT0>,
-				 <MT7623_PIN_108_MSDC1_DAT1_FUNC_MSDC1_DAT1>,
-				 <MT7623_PIN_109_MSDC1_DAT2_FUNC_MSDC1_DAT2>,
-				 <MT7623_PIN_110_MSDC1_DAT3_FUNC_MSDC1_DAT3>,
-				 <MT7623_PIN_105_MSDC1_CMD_FUNC_MSDC1_CMD>;
-			input-enable;
-			drive-strength = <MTK_DRIVE_4mA>;
-			bias-pull-up = <MTK_PUPD_SET_R1R0_10>;
-		};
-
-		pins-clk {
-			pinmux = <MT7623_PIN_106_MSDC1_CLK_FUNC_MSDC1_CLK>;
-			drive-strength = <MTK_DRIVE_4mA>;
-			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
-		};
-	};
-
-	pcie_default: pcie-pin-default {
-		pins-cmd-dat {
-			pinmux = <MT7623_PIN_208_AUD_EXT_CK1_FUNC_PCIE0_PERST_N>,
-				 <MT7623_PIN_209_AUD_EXT_CK2_FUNC_PCIE1_PERST_N>;
-			bias-disable;
-		};
-	};
-
-	pwm_pins_a: pwm-default {
-		pins-pwm {
-			pinmux = <MT7623_PIN_203_PWM0_FUNC_PWM0>,
-				 <MT7623_PIN_204_PWM1_FUNC_PWM1>,
-				 <MT7623_PIN_205_PWM2_FUNC_PWM2>,
-				 <MT7623_PIN_206_PWM3_FUNC_PWM3>,
-				 <MT7623_PIN_207_PWM4_FUNC_PWM4>;
-		};
-	};
-
-	spi0_pins_a: spi0-default {
-		pins-spi {
-			pinmux = <MT7623_PIN_53_SPI0_CSN_FUNC_SPI0_CS>,
-				<MT7623_PIN_54_SPI0_CK_FUNC_SPI0_CK>,
-				<MT7623_PIN_55_SPI0_MI_FUNC_SPI0_MI>,
-				<MT7623_PIN_56_SPI0_MO_FUNC_SPI0_MO>;
-			bias-disable;
-		};
-	};
-
-	uart0_pins_a: uart0-default {
-		pins-dat {
-			pinmux = <MT7623_PIN_79_URXD0_FUNC_URXD0>,
-				 <MT7623_PIN_80_UTXD0_FUNC_UTXD0>;
-		};
-	};
-
-	uart1_pins_a: uart1-default {
-		pins-dat {
-			pinmux = <MT7623_PIN_81_URXD1_FUNC_URXD1>,
-				 <MT7623_PIN_82_UTXD1_FUNC_UTXD1>;
-		};
-	};
-
-	uart2_pins_a: uart2-default {
-		pins-dat {
-			pinmux = <MT7623_PIN_14_GPIO14_FUNC_URXD2>,
-				 <MT7623_PIN_15_GPIO15_FUNC_UTXD2>;
-		};
-	};
-};
-
-&pwm {
-	pinctrl-names = "default";
-	pinctrl-0 = <&pwm_pins_a>;
-	status = "okay";
-};
-
-&spi0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&spi0_pins_a>;
-	status = "okay";
-};
-
-&uart0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&uart0_pins_a>;
-	status = "okay";
-};
-
-&uart1 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&uart1_pins_a>;
-	status = "okay";
-};
-
-&uart2 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&uart2_pins_a>;
-	status = "okay";
-};
-
-&usb1 {
-	vusb33-supply = <&reg_3p3v>;
-	vbus-supply = <&reg_5v>;
-	status = "okay";
 };
 
 &usb2 {
-	vusb33-supply = <&reg_3p3v>;
-	vbus-supply = <&reg_5v>;
-	status = "okay";
-};
-
-&u3phy1 {
 	status = "okay";
 };
 
 &u3phy2 {
 	status = "okay";
 };
-
diff --git a/arch/arm/boot/dts/mt7623n-rfb-nand.dts b/arch/arm/boot/dts/mt7623n-rfb-nand.dts
index f729c71..05f1171 100644
--- a/arch/arm/boot/dts/mt7623n-rfb-nand.dts
+++ b/arch/arm/boot/dts/mt7623n-rfb-nand.dts
@@ -1,6 +1,7 @@
 /*
- * Copyright (c) 2017 MediaTek Inc.
+ * Copyright (c) 2017-2018 MediaTek Inc.
  * Author: John Crispin <john@phrozen.org>
+ *	   Sean Wang <sean.wang@mediatek.com>
  *
  * 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
@@ -16,8 +17,12 @@
 #include "mt7623n-rfb.dtsi"
 
 / {
-	model = "MediaTek MT7623N NAND reference board";
+	model = "MediaTek MT7623N with NAND reference board";
 	compatible = "mediatek,mt7623n-rfb-nand", "mediatek,mt7623";
+
+	chosen {
+		bootargs = "console=ttyS2,115200n8 earlyprintk";
+	};
 };
 
 &bch {
@@ -26,86 +31,4 @@
 
 &nandc {
 	status = "okay";
-	pinctrl-names = "default";
-	pinctrl-0 = <&nand_pins_default>;
-
-	nand@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@0 {
-				label = "preloader";
-				reg = <0x0 0x40000>;
-			};
-
-			partition@40000 {
-				label = "uboot";
-				reg = <0x40000 0x80000>;
-			};
-
-			partition@c0000 {
-				label = "uboot-env";
-				reg = <0xC0000 0x40000>;
-			};
-
-			partition@140000 {
-				label = "bootimg";
-				reg = <0x140000 0x2000000>;
-			};
-
-			partition@2140000 {
-				label = "recovery";
-				reg = <0x2140000 0x2000000>;
-			};
-
-			partition@4140000 {
-				label = "rootfs";
-				reg = <0x4140000 0x1000000>;
-			};
-
-			partition@5140000 {
-				label = "usrdata";
-				reg = <0x5140000 0x1000000>;
-			};
-		};
-	};
-};
-
-&pio {
-	nand_pins_default: nanddefault {
-		pins-ale {
-			pinmux = <MT7623_PIN_116_MSDC0_CMD_FUNC_NALE>;
-			drive-strength = <MTK_DRIVE_8mA>;
-			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
-		};
-
-		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>;
-		};
-	};
 };
diff --git a/arch/arm/boot/dts/mt7623n-rfb.dtsi b/arch/arm/boot/dts/mt7623n-rfb.dtsi
index 128586d..b9e3b3d 100644
--- a/arch/arm/boot/dts/mt7623n-rfb.dtsi
+++ b/arch/arm/boot/dts/mt7623n-rfb.dtsi
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 MediaTek Inc.
+ * Copyright (c) 2017-2018 MediaTek Inc.
  * Author: John Crispin <john@phrozen.org>
  *	   Sean Wang <sean.wang@mediatek.com>
  *
@@ -14,6 +14,7 @@
  */
 
 /dts-v1/;
+#include <dt-bindings/input/input.h>
 #include "mt7623.dtsi"
 #include "mt6323.dtsi"
 
@@ -29,64 +30,603 @@
 	};
 
 	cpus {
-		cpu0 {
+		cpu@0 {
 			proc-supply = <&mt6323_vproc_reg>;
 		};
 
-		cpu1 {
+		cpu@1 {
 			proc-supply = <&mt6323_vproc_reg>;
 		};
 
-		cpu2 {
+		cpu@2 {
 			proc-supply = <&mt6323_vproc_reg>;
 		};
 
-		cpu3 {
+		cpu@3 {
 			proc-supply = <&mt6323_vproc_reg>;
 		};
 	};
 
-	memory@80000000 {
+	gpio-keys {
+		compatible = "gpio-keys";
+		pinctrl-names = "default";
+		pinctrl-0 = <&key_pins_a>;
+
+		factory {
+			label = "factory";
+			linux,code = <BTN_0>;
+			gpios = <&pio 256 GPIO_ACTIVE_LOW>;
+		};
+
+		wps {
+			label = "wps";
+			linux,code = <KEY_WPS_BUTTON>;
+			gpios = <&pio 257 GPIO_ACTIVE_HIGH>;
+		};
+	};
+
+	memory {
+		device_type = "memory";
 		reg = <0 0x80000000 0 0x40000000>;
 	};
 
-	usb_p1_vbus: regulator-5v {
+	reg_1p8v: regulator-1p8v {
 		compatible = "regulator-fixed";
-		regulator-name = "usb_vbus";
+		regulator-name = "fixed-1.8V";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
+
+	reg_3p3v: regulator-3p3v {
+		compatible = "regulator-fixed";
+		regulator-name = "fixed-3.3V";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
+
+	reg_5v: regulator-5v {
+		compatible = "regulator-fixed";
+		regulator-name = "fixed-5V";
 		regulator-min-microvolt = <5000000>;
 		regulator-max-microvolt = <5000000>;
-		gpio = <&pio 135 GPIO_ACTIVE_HIGH>;
-		enable-active-high;
+		regulator-boot-on;
+		regulator-always-on;
+	};
+};
+
+&bch {
+	status = "disabled";
+};
+
+&btif {
+	status = "okay";
+};
+
+&cir {
+	pinctrl-names = "default";
+	pinctrl-0 = <&cir_pins_a>;
+	status = "okay";
+};
+
+&crypto {
+	status = "okay";
+};
+
+&eth {
+	status = "okay";
+
+	gmac0: mac@0 {
+		compatible = "mediatek,eth-mac";
+		reg = <0>;
+		phy-mode = "trgmii";
+
+		fixed-link {
+			speed = <1000>;
+			full-duplex;
+			pause;
+		};
+	};
+
+	mdio: mdio-bus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		mt7530: switch@0 {
+			compatible = "mediatek,mt7530";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			reg = <0>;
+			reset-gpios = <&pio 33 0>;
+			core-supply = <&mt6323_vpa_reg>;
+			io-supply = <&mt6323_vemc3v3_reg>;
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				mt7530p0: port@0 {
+					reg = <0>;
+					label = "lan0";
+				};
+
+				mt7530p1: port@1 {
+					reg = <1>;
+					label = "lan1";
+				};
+
+				mt7530p2: port@2 {
+					reg = <2>;
+					label = "lan2";
+				};
+
+				mt7530p3: port@3 {
+					reg = <3>;
+					label = "lan3";
+				};
+
+				mt7530p4: port@4 {
+					reg = <4>;
+					label = "wan";
+				};
+
+				port@6 {
+					reg = <6>;
+					label = "cpu";
+					ethernet = <&gmac0>;
+					phy-mode = "trgmii";
+
+					fixed-link {
+						speed = <1000>;
+						full-duplex;
+					};
+				};
+			};
+		};
 	};
 };
 
+&i2c0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c0_pins_a>;
+	status = "okay";
+};
+
+&i2c1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c1_pins_b>;
+	status = "okay";
+};
+
 &mmc0 {
-	vmmc-supply = <&mt6323_vemc3v3_reg>;
-	vqmmc-supply = <&mt6323_vio18_reg>;
+	pinctrl-names = "default", "state_uhs";
+	pinctrl-0 = <&mmc0_pins_default>;
+	pinctrl-1 = <&mmc0_pins_uhs>;
+	status = "disabled";
+	bus-width = <8>;
+	max-frequency = <50000000>;
+	cap-mmc-highspeed;
+	vmmc-supply = <&reg_3p3v>;
+	vqmmc-supply = <&reg_1p8v>;
+	non-removable;
 };
 
 &mmc1 {
-	vmmc-supply = <&mt6323_vmch_reg>;
-	vqmmc-supply = <&mt6323_vmc_reg>;
+	pinctrl-names = "default", "state_uhs";
+	pinctrl-0 = <&mmc1_pins_default>;
+	pinctrl-1 = <&mmc1_pins_uhs>;
+	status = "okay";
+	bus-width = <4>;
+	max-frequency = <50000000>;
+	cap-sd-highspeed;
+	cd-gpios = <&pio 261 GPIO_ACTIVE_LOW>;
+	vmmc-supply = <&reg_3p3v>;
+	vqmmc-supply = <&reg_3p3v>;
+};
+
+&nandc {
+	pinctrl-names = "default";
+	pinctrl-0 = <&nand_pins_default>;
+	status = "disabled";
+
+	nand@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@0 {
+				label = "preloader";
+				reg = <0x0 0x40000>;
+			};
+
+			partition@40000 {
+				label = "uboot";
+				reg = <0x40000 0x80000>;
+			};
+
+			partition@c0000 {
+				label = "uboot-env";
+				reg = <0xC0000 0x40000>;
+			};
+
+			partition@140000 {
+				label = "bootimg";
+				reg = <0x140000 0x2000000>;
+			};
+
+			partition@2140000 {
+				label = "recovery";
+				reg = <0x2140000 0x2000000>;
+			};
+
+			partition@4140000 {
+				label = "rootfs";
+				reg = <0x4140000 0x1000000>;
+			};
+
+			partition@5140000 {
+				label = "usrdata";
+				reg = <0x5140000 0x1000000>;
+			};
+		};
+	};
+};
+
+&nor_flash {
+	pinctrl-names = "default";
+	pinctrl-0 = <&nor_pins_a>;
+	status = "disabled";
+	max-frequency = <50000000>;
+	non-removable;
+};
+
+&pcie {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pcie_default>;
+	status = "okay";
+
+	pcie0: pcie@0,0 {
+		status = "okay";
+	};
+
+	pcie1: pcie@1,0 {
+		status = "okay";
+	};
+};
+
+&pcie0_phy {
+	status = "okay";
+};
+
+&pcie1_phy {
+	status = "okay";
+};
+
+&pio {
+	cir_pins_a:cir-default {
+		pins-cir {
+			pinmux = <MT7623_PIN_46_IR_FUNC_IR>;
+			bias-disable;
+		};
+	};
+
+	i2c0_pins_a: i2c0-default {
+		pins-i2c0 {
+			pinmux = <MT7623_PIN_75_SDA0_FUNC_SDA0>,
+				 <MT7623_PIN_76_SCL0_FUNC_SCL0>;
+			bias-disable;
+		};
+	};
+
+	i2c1_pins_a: i2c1-default {
+		pin-i2c1 {
+			pinmux = <MT7623_PIN_57_SDA1_FUNC_SDA1>,
+				 <MT7623_PIN_58_SCL1_FUNC_SCL1>;
+			bias-disable;
+		};
+	};
+
+	i2c1_pins_b: i2c1-alt {
+		pin-i2c1 {
+			pinmux = <MT7623_PIN_242_URTS2_FUNC_SCL1>,
+				 <MT7623_PIN_243_UCTS2_FUNC_SDA1>;
+			bias-disable;
+		};
+	};
+
+	i2c2_pins_a: i2c2-default {
+		pin-i2c2 {
+			pinmux = <MT7623_PIN_77_SDA2_FUNC_SDA2>,
+				 <MT7623_PIN_78_SCL2_FUNC_SCL2>;
+			bias-disable;
+		};
+	};
+
+	i2s0_pins_a: i2s0-default {
+		pin-i2s0 {
+			pinmux = <MT7623_PIN_49_I2S0_DATA_FUNC_I2S0_DATA>,
+				 <MT7623_PIN_72_I2S0_DATA_IN_FUNC_I2S0_DATA_IN>,
+				 <MT7623_PIN_73_I2S0_LRCK_FUNC_I2S0_LRCK>,
+				 <MT7623_PIN_74_I2S0_BCK_FUNC_I2S0_BCK>,
+				 <MT7623_PIN_126_I2S0_MCLK_FUNC_I2S0_MCLK>;
+			drive-strength = <MTK_DRIVE_12mA>;
+			bias-pull-down;
+		};
+	};
+
+	i2s1_pins_b: i2s1-default {
+		pin-i2s1 {
+			pinmux = <MT7623_PIN_33_I2S1_DATA_FUNC_I2S1_DATA>,
+				 <MT7623_PIN_34_I2S1_DATA_IN_FUNC_I2S1_DATA_IN>,
+				 <MT7623_PIN_35_I2S1_BCK_FUNC_I2S1_BCK>,
+				 <MT7623_PIN_36_I2S1_LRCK_FUNC_I2S1_LRCK>,
+				 <MT7623_PIN_37_I2S1_MCLK_FUNC_I2S1_MCLK>;
+			drive-strength = <MTK_DRIVE_12mA>;
+			bias-pull-down;
+		};
+	};
+
+	key_pins_a: keys-alt {
+		pins-keys {
+			pinmux = <MT7623_PIN_256_GPIO256_FUNC_GPIO256>,
+				 <MT7623_PIN_257_GPIO257_FUNC_GPIO257> ;
+			input-enable;
+		};
+	};
+
+	mmc0_pins_default: mmc0-default {
+		pins-cmd-dat {
+			pinmux = <MT7623_PIN_111_MSDC0_DAT7_FUNC_MSDC0_DAT7>,
+				 <MT7623_PIN_112_MSDC0_DAT6_FUNC_MSDC0_DAT6>,
+				 <MT7623_PIN_113_MSDC0_DAT5_FUNC_MSDC0_DAT5>,
+				 <MT7623_PIN_114_MSDC0_DAT4_FUNC_MSDC0_DAT4>,
+				 <MT7623_PIN_118_MSDC0_DAT3_FUNC_MSDC0_DAT3>,
+				 <MT7623_PIN_119_MSDC0_DAT2_FUNC_MSDC0_DAT2>,
+				 <MT7623_PIN_120_MSDC0_DAT1_FUNC_MSDC0_DAT1>,
+				 <MT7623_PIN_121_MSDC0_DAT0_FUNC_MSDC0_DAT0>,
+				 <MT7623_PIN_116_MSDC0_CMD_FUNC_MSDC0_CMD>;
+			input-enable;
+			bias-pull-up;
+		};
+
+		pins-clk {
+			pinmux = <MT7623_PIN_117_MSDC0_CLK_FUNC_MSDC0_CLK>;
+			bias-pull-down;
+		};
+
+		pins-rst {
+			pinmux = <MT7623_PIN_115_MSDC0_RSTB_FUNC_MSDC0_RSTB>;
+			bias-pull-up;
+		};
+	};
+
+	mmc0_pins_uhs: mmc0-uhs {
+		pins-cmd-dat {
+			pinmux = <MT7623_PIN_111_MSDC0_DAT7_FUNC_MSDC0_DAT7>,
+				 <MT7623_PIN_112_MSDC0_DAT6_FUNC_MSDC0_DAT6>,
+				 <MT7623_PIN_113_MSDC0_DAT5_FUNC_MSDC0_DAT5>,
+				 <MT7623_PIN_114_MSDC0_DAT4_FUNC_MSDC0_DAT4>,
+				 <MT7623_PIN_118_MSDC0_DAT3_FUNC_MSDC0_DAT3>,
+				 <MT7623_PIN_119_MSDC0_DAT2_FUNC_MSDC0_DAT2>,
+				 <MT7623_PIN_120_MSDC0_DAT1_FUNC_MSDC0_DAT1>,
+				 <MT7623_PIN_121_MSDC0_DAT0_FUNC_MSDC0_DAT0>,
+				 <MT7623_PIN_116_MSDC0_CMD_FUNC_MSDC0_CMD>;
+			input-enable;
+			drive-strength = <MTK_DRIVE_2mA>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+		};
+
+		pins-clk {
+			pinmux = <MT7623_PIN_117_MSDC0_CLK_FUNC_MSDC0_CLK>;
+			drive-strength = <MTK_DRIVE_2mA>;
+			bias-pull-down = <MTK_PUPD_SET_R1R0_01>;
+		};
+
+		pins-rst {
+			pinmux = <MT7623_PIN_115_MSDC0_RSTB_FUNC_MSDC0_RSTB>;
+			bias-pull-up;
+		};
+	};
+
+	mmc1_pins_default: mmc1-default {
+		pins-cmd-dat {
+			pinmux = <MT7623_PIN_107_MSDC1_DAT0_FUNC_MSDC1_DAT0>,
+				 <MT7623_PIN_108_MSDC1_DAT1_FUNC_MSDC1_DAT1>,
+				 <MT7623_PIN_109_MSDC1_DAT2_FUNC_MSDC1_DAT2>,
+				 <MT7623_PIN_110_MSDC1_DAT3_FUNC_MSDC1_DAT3>,
+				 <MT7623_PIN_105_MSDC1_CMD_FUNC_MSDC1_CMD>;
+			input-enable;
+			drive-strength = <MTK_DRIVE_4mA>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_10>;
+		};
+
+		pins-clk {
+			pinmux = <MT7623_PIN_106_MSDC1_CLK_FUNC_MSDC1_CLK>;
+			bias-pull-down;
+			drive-strength = <MTK_DRIVE_4mA>;
+		};
+
+		pins-wp {
+			pinmux = <MT7623_PIN_29_EINT7_FUNC_MSDC1_WP>;
+			input-enable;
+			bias-pull-up;
+		};
+
+		pins-insert {
+			pinmux = <MT7623_PIN_261_MSDC1_INS_FUNC_GPIO261>;
+			bias-pull-up;
+		};
+	};
+
+	mmc1_pins_uhs: mmc1-uhs {
+		pins-cmd-dat {
+			pinmux = <MT7623_PIN_107_MSDC1_DAT0_FUNC_MSDC1_DAT0>,
+				 <MT7623_PIN_108_MSDC1_DAT1_FUNC_MSDC1_DAT1>,
+				 <MT7623_PIN_109_MSDC1_DAT2_FUNC_MSDC1_DAT2>,
+				 <MT7623_PIN_110_MSDC1_DAT3_FUNC_MSDC1_DAT3>,
+				 <MT7623_PIN_105_MSDC1_CMD_FUNC_MSDC1_CMD>;
+			input-enable;
+			drive-strength = <MTK_DRIVE_4mA>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_10>;
+		};
+
+		pins-clk {
+			pinmux = <MT7623_PIN_106_MSDC1_CLK_FUNC_MSDC1_CLK>;
+			drive-strength = <MTK_DRIVE_4mA>;
+			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
+		};
+	};
+
+	nand_pins_default: nand-default {
+		pins-ale {
+			pinmux = <MT7623_PIN_116_MSDC0_CMD_FUNC_NALE>;
+			drive-strength = <MTK_DRIVE_8mA>;
+			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
+		};
+
+		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>;
+		};
+	};
+
+	nor_pins_a: nor-default {
+		pins1 {
+			pinmux = <MT7623_PIN_240_EXT_XCS_FUNC_EXT_XCS>,
+				 <MT7623_PIN_236_EXT_SDIO3_FUNC_EXT_SDIO3>,
+				 <MT7623_PIN_239_EXT_SDIO0_FUNC_EXT_SDIO0>,
+				 <MT7623_PIN_241_EXT_SCK_FUNC_EXT_SCK>;
+			input-enable;
+			drive-strength = <MTK_DRIVE_4mA>;
+			bias-pull-up;
+		};
+
+		pins2 {
+			pinmux = <MT7623_PIN_238_EXT_SDIO1_FUNC_EXT_SDIO1>,
+				 <MT7623_PIN_237_EXT_SDIO2_FUNC_EXT_SDIO2>;
+			drive-strength = <MTK_DRIVE_4mA>;
+			bias-pull-up;
+		};
+	};
+
+	pcie_default: pcie-pin-default {
+		pins-cmd-dat {
+			pinmux = <MT7623_PIN_208_AUD_EXT_CK1_FUNC_PCIE0_PERST_N>,
+				 <MT7623_PIN_209_AUD_EXT_CK2_FUNC_PCIE1_PERST_N>;
+			bias-disable;
+		};
+	};
+
+	pwm_pins_a: pwm-default {
+		pins-pwm {
+			pinmux = <MT7623_PIN_203_PWM0_FUNC_PWM0>,
+				 <MT7623_PIN_204_PWM1_FUNC_PWM1>,
+				 <MT7623_PIN_205_PWM2_FUNC_PWM2>,
+				 <MT7623_PIN_206_PWM3_FUNC_PWM3>,
+				 <MT7623_PIN_207_PWM4_FUNC_PWM4>;
+		};
+	};
+
+	spi0_pins_a: spi0-default {
+		pins-spi {
+			pinmux = <MT7623_PIN_53_SPI0_CSN_FUNC_SPI0_CS>,
+				<MT7623_PIN_54_SPI0_CK_FUNC_SPI0_CK>,
+				<MT7623_PIN_55_SPI0_MI_FUNC_SPI0_MI>,
+				<MT7623_PIN_56_SPI0_MO_FUNC_SPI0_MO>;
+			bias-disable;
+		};
+	};
+
+	uart0_pins_a: uart0-default {
+		pins-dat {
+			pinmux = <MT7623_PIN_79_URXD0_FUNC_URXD0>,
+				 <MT7623_PIN_80_UTXD0_FUNC_UTXD0>;
+		};
+	};
+
+	uart1_pins_a: uart1-default {
+		pins-dat {
+			pinmux = <MT7623_PIN_81_URXD1_FUNC_URXD1>,
+				 <MT7623_PIN_82_UTXD1_FUNC_UTXD1>;
+		};
+	};
+
+	uart2_pins_a: uart2-default {
+		pins-dat {
+			pinmux = <MT7623_PIN_14_GPIO14_FUNC_URXD2>,
+				 <MT7623_PIN_15_GPIO15_FUNC_UTXD2>;
+		};
+	};
+};
+
+&pwm {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pwm_pins_a>;
+	status = "okay";
+};
+
+&spi0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi0_pins_a>;
+	status = "okay";
 };
 
 &uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_pins_a>;
 	status = "okay";
 };
 
 &uart1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart1_pins_a>;
 	status = "okay";
 };
 
 &uart2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart2_pins_a>;
 	status = "okay";
 };
 
 &usb1 {
-	vbus-supply = <&usb_p1_vbus>;
+	vusb33-supply = <&reg_3p3v>;
+	vbus-supply = <&reg_5v>;
 	status = "okay";
 };
 
+&usb2 {
+	vusb33-supply = <&reg_3p3v>;
+	vbus-supply = <&reg_5v>;
+	status = "disabled";
+};
+
 &u3phy1 {
 	status = "okay";
 };
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [PATCH v1 15/19] arm: dts: mt7623: add SPI[1,2], I2C2 and sound related nodes to reference board
  2018-02-23 10:16 [PATCH v1 00/19] refactor dts and add support for more boards sean.wang
                   ` (13 preceding siblings ...)
  2018-02-23 10:16 ` [PATCH v1 14/19] arm: dts: mt7623: extend common file to unify all boards with MT7623 SoCs sean.wang
@ 2018-02-23 10:16 ` sean.wang
  2018-02-23 10:16 ` [PATCH v1 16/19] arm: dts: mt7623: fixup available memory size on bananapi-r2 sean.wang
                   ` (3 subsequent siblings)
  18 siblings, 0 replies; 51+ messages in thread
From: sean.wang @ 2018-02-23 10:16 UTC (permalink / raw)
  To: robh+dt, matthias.bgg, mark.rutland, devicetree, linux-mediatek
  Cc: linux-arm-kernel, linux-kernel, Sean Wang

From: Sean Wang <sean.wang@mediatek.com>

There are SPI[1,2] and I2C2 and sound device with WM8960 codec which
MT7623 reference board is equipped with.

However, some of those devices cannot be found on bananapi-r2, they should
be disabled properly for that.

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
---
 arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 16 ++++++++
 arch/arm/boot/dts/mt7623n-rfb.dtsi            | 58 +++++++++++++++++++++++++++
 2 files changed, 74 insertions(+)

diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
index 373a0dd..140ff78 100644
--- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
+++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
@@ -40,6 +40,10 @@
 	};
 };
 
+&afe {
+	status = "disabled";
+};
+
 &i2c1 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&i2c1_pins_a>;
@@ -79,6 +83,14 @@
 	};
 };
 
+&sound {
+	status = "disabled";
+};
+
+&spi1 {
+	status = "disabled";
+};
+
 &usb2 {
 	status = "okay";
 };
@@ -86,3 +98,7 @@
 &u3phy2 {
 	status = "okay";
 };
+
+&wm8960 {
+	status = "disabled";
+};
diff --git a/arch/arm/boot/dts/mt7623n-rfb.dtsi b/arch/arm/boot/dts/mt7623n-rfb.dtsi
index b9e3b3d..0237476 100644
--- a/arch/arm/boot/dts/mt7623n-rfb.dtsi
+++ b/arch/arm/boot/dts/mt7623n-rfb.dtsi
@@ -96,6 +96,23 @@
 		regulator-boot-on;
 		regulator-always-on;
 	};
+
+	sound:sound {
+		compatible = "mediatek,mt2701-wm8960-machine";
+		mediatek,platform = <&afe>;
+		audio-routing =
+			"Headphone", "HP_L",
+			"Headphone", "HP_R",
+			"LINPUT1", "AMIC",
+			"RINPUT1", "AMIC";
+		mediatek,audio-codec = <&wm8960>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&i2s0_pins_a>;
+	};
+};
+
+&afe {
+	status = "okay";
 };
 
 &bch {
@@ -199,6 +216,17 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&i2c1_pins_b>;
 	status = "okay";
+
+	wm8960: wm8960@1a {
+		compatible = "wlf,wm8960";
+		reg = <0x1a>;
+	};
+};
+
+&i2c2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c2_pins_a>;
+	status = "okay";
 };
 
 &mmc0 {
@@ -563,6 +591,24 @@
 		};
 	};
 
+	spi1_pins_a: spi1-default {
+		pins-spi {
+			pinmux = <MT7623_PIN_7_SPI1_CSN_FUNC_SPI1_CS>,
+				<MT7623_PIN_199_SPI1_CK_FUNC_SPI1_CK>,
+				<MT7623_PIN_8_SPI1_MI_FUNC_SPI1_MI>,
+				<MT7623_PIN_9_SPI1_MO_FUNC_SPI1_MO>;
+		};
+	};
+
+	spi2_pins_a: spi2-default {
+		pins-spi {
+			pinmux = <MT7623_PIN_101_SPI2_CSN_FUNC_SPI2_CS>,
+				<MT7623_PIN_104_SPI2_CK_FUNC_SPI2_CK>,
+				<MT7623_PIN_102_SPI2_MI_FUNC_SPI2_MI>,
+				<MT7623_PIN_103_SPI2_MO_FUNC_SPI2_MO>;
+		};
+	};
+
 	uart0_pins_a: uart0-default {
 		pins-dat {
 			pinmux = <MT7623_PIN_79_URXD0_FUNC_URXD0>,
@@ -597,6 +643,18 @@
 	status = "okay";
 };
 
+&spi1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi1_pins_a>;
+	status = "okay";
+};
+
+&spi2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi2_pins_a>;
+	status = "disabled";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [PATCH v1 16/19] arm: dts: mt7623: fixup available memory size on bananapi-r2
  2018-02-23 10:16 [PATCH v1 00/19] refactor dts and add support for more boards sean.wang
                   ` (14 preceding siblings ...)
  2018-02-23 10:16 ` [PATCH v1 15/19] arm: dts: mt7623: add SPI[1,2], I2C2 and sound related nodes to reference board sean.wang
@ 2018-02-23 10:16 ` sean.wang
  2018-03-02 15:42   ` Rob Herring
  2018-02-23 10:16 ` [PATCH v1 17/19] arm: dts: mt7623: add MT7623N reference board with eMMC sean.wang
                   ` (2 subsequent siblings)
  18 siblings, 1 reply; 51+ messages in thread
From: sean.wang @ 2018-02-23 10:16 UTC (permalink / raw)
  To: robh+dt, matthias.bgg, mark.rutland, devicetree, linux-mediatek
  Cc: linux-arm-kernel, linux-kernel, Sean Wang

From: Sean Wang <sean.wang@mediatek.com>

There is 2GB DDR3 available on bananapi-r2 board as [1] specified.

[1] http://www.banana-pi.org/r2.html

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
---
 arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
index 140ff78..3e8d02c 100644
--- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
+++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
@@ -38,6 +38,11 @@
 			default-state = "off";
 		};
 	};
+
+	memory {
+		device_type = "memory";
+		reg = <0 0x80000000 0 0x80000000>;
+	};
 };
 
 &afe {
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [PATCH v1 17/19] arm: dts: mt7623: add MT7623N reference board with eMMC
  2018-02-23 10:16 [PATCH v1 00/19] refactor dts and add support for more boards sean.wang
                   ` (15 preceding siblings ...)
  2018-02-23 10:16 ` [PATCH v1 16/19] arm: dts: mt7623: fixup available memory size on bananapi-r2 sean.wang
@ 2018-02-23 10:16 ` sean.wang
  2018-02-23 10:16 ` [PATCH v1 18/19] arm: dts: mt7623: add MT7623A reference boards sean.wang
  2018-02-23 10:16 ` [PATCH v1 19/19] arm: dts: mediatek: converted to using SPDX identifiers sean.wang
  18 siblings, 0 replies; 51+ messages in thread
From: sean.wang @ 2018-02-23 10:16 UTC (permalink / raw)
  To: robh+dt, matthias.bgg, mark.rutland, devicetree, linux-mediatek
  Cc: linux-arm-kernel, linux-kernel, Sean Wang

From: Sean Wang <sean.wang@mediatek.com>

Add MT7623N reference board with eMMC. On the board, there is additional
external PHY which is ICPlus IP1001 transceiver available by port 5 on the
MDIO bus connectted with GMAC2.

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
---
 arch/arm/boot/dts/Makefile             |  1 +
 arch/arm/boot/dts/mt7623n-rfb-emmc.dts | 37 ++++++++++++++++++++++++++++++++++
 2 files changed, 38 insertions(+)
 create mode 100644 arch/arm/boot/dts/mt7623n-rfb-emmc.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index ade7a38..5af6fce 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -1122,6 +1122,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
 	mt6580-evbp1.dtb \
 	mt6589-aquaris5.dtb \
 	mt6592-evb.dtb \
+	mt7623n-rfb-emmc.dtb \
 	mt7623n-rfb-nand.dtb \
 	mt7623n-bananapi-bpi-r2.dtb \
 	mt8127-moose.dtb \
diff --git a/arch/arm/boot/dts/mt7623n-rfb-emmc.dts b/arch/arm/boot/dts/mt7623n-rfb-emmc.dts
new file mode 100644
index 0000000..0db75bc
--- /dev/null
+++ b/arch/arm/boot/dts/mt7623n-rfb-emmc.dts
@@ -0,0 +1,37 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2017-2018 MediaTek Inc.
+ * Author: Sean Wang <sean.wang@mediatek.com>
+ *
+ */
+
+/dts-v1/;
+#include "mt7623n-rfb.dtsi"
+
+/ {
+	model = "MediaTek MT7623N with eMMC reference board";
+	compatible = "mediatek,mt7623n-rfb-nand", "mediatek,mt7623";
+
+	chosen {
+		bootargs = "console=ttyS2,115200n8 earlyprintk";
+	};
+};
+
+&eth {
+	gmac1: mac@1 {
+		compatible = "mediatek,eth-mac";
+		reg = <1>;
+		phy-handle = <&phy5>;
+	};
+};
+
+&mdio {
+	phy5: ethernet-phy@5 {
+		reg = <5>;
+		phy-mode = "rgmii-rxid";
+	};
+};
+
+&mmc0 {
+	status = "okay";
+};
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [PATCH v1 18/19] arm: dts: mt7623: add MT7623A reference boards
  2018-02-23 10:16 [PATCH v1 00/19] refactor dts and add support for more boards sean.wang
                   ` (16 preceding siblings ...)
  2018-02-23 10:16 ` [PATCH v1 17/19] arm: dts: mt7623: add MT7623N reference board with eMMC sean.wang
@ 2018-02-23 10:16 ` sean.wang
  2018-03-02 15:45   ` Rob Herring
  2018-02-23 10:16 ` [PATCH v1 19/19] arm: dts: mediatek: converted to using SPDX identifiers sean.wang
  18 siblings, 1 reply; 51+ messages in thread
From: sean.wang @ 2018-02-23 10:16 UTC (permalink / raw)
  To: robh+dt, matthias.bgg, mark.rutland, devicetree, linux-mediatek
  Cc: linux-arm-kernel, linux-kernel, Sean Wang

From: Sean Wang <sean.wang@mediatek.com>

Add mt7623a-rfb.dtsi where most nodes can be inherited from
mt7623n-rfb.dtsi and keep these distinctions from MT7623A boards in
mt7623a-rfb.dtsi for most definition can be reused among MT7623A board
variants.

MT7623A has its specific definition of power domain and thus we need
to change related devices such as audio, ethernet, crypto, high-speed
DMA, NAND, and USB controller to the power domain they specifically
belong to. In addition, MT7530 exists as built-in module inside MT7623A
SoC and I2C2 and UART[0-1] get being removed and UART2 have distinct pin
usage. Those all differences can be totally seen in mt7623a-rfb.dtsi.

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
---
 arch/arm/boot/dts/Makefile             |  2 +
 arch/arm/boot/dts/mt7623a-rfb-emmc.dts | 22 +++++++++
 arch/arm/boot/dts/mt7623a-rfb-nand.dts | 26 +++++++++++
 arch/arm/boot/dts/mt7623a-rfb.dtsi     | 84 ++++++++++++++++++++++++++++++++++
 arch/arm/boot/dts/mt7623n-rfb.dtsi     | 15 ++++++
 5 files changed, 149 insertions(+)
 create mode 100644 arch/arm/boot/dts/mt7623a-rfb-emmc.dts
 create mode 100644 arch/arm/boot/dts/mt7623a-rfb-nand.dts
 create mode 100644 arch/arm/boot/dts/mt7623a-rfb.dtsi

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 5af6fce..818817c 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -1122,6 +1122,8 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
 	mt6580-evbp1.dtb \
 	mt6589-aquaris5.dtb \
 	mt6592-evb.dtb \
+	mt7623a-rfb-emmc.dtb \
+	mt7623a-rfb-nand.dtb \
 	mt7623n-rfb-emmc.dtb \
 	mt7623n-rfb-nand.dtb \
 	mt7623n-bananapi-bpi-r2.dtb \
diff --git a/arch/arm/boot/dts/mt7623a-rfb-emmc.dts b/arch/arm/boot/dts/mt7623a-rfb-emmc.dts
new file mode 100644
index 0000000..ef6398e
--- /dev/null
+++ b/arch/arm/boot/dts/mt7623a-rfb-emmc.dts
@@ -0,0 +1,22 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2017-2018 MediaTek Inc.
+ * Author: Sean Wang <sean.wang@mediatek.com>
+ *
+ */
+
+/dts-v1/;
+#include "mt7623a-rfb.dtsi"
+
+/ {
+	model = "MediaTek MT7623A with eMMC reference board";
+	compatible = "mediatek,mt7623a-rfb-emmc", "mediatek,mt7623";
+
+	chosen {
+		bootargs = "console=ttyS0,115200n8 earlyprintk";
+	};
+};
+
+&mmc0 {
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/mt7623a-rfb-nand.dts b/arch/arm/boot/dts/mt7623a-rfb-nand.dts
new file mode 100644
index 0000000..592d5d7
--- /dev/null
+++ b/arch/arm/boot/dts/mt7623a-rfb-nand.dts
@@ -0,0 +1,26 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2017-2018 MediaTek Inc.
+ * Author: Sean Wang <sean.wang@mediatek.com>
+ *
+ */
+
+/dts-v1/;
+#include "mt7623a-rfb.dtsi"
+
+/ {
+	model = "MediaTek MT7623A with NAND reference board";
+	compatible = "mediatek,mt7623a-rfb-nand", "mediatek,mt7623";
+
+	chosen {
+		bootargs = "console=ttyS0,115200n8 earlyprintk";
+	};
+};
+
+&bch {
+	status = "okay";
+};
+
+&nandc {
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/mt7623a-rfb.dtsi b/arch/arm/boot/dts/mt7623a-rfb.dtsi
new file mode 100644
index 0000000..3a15c46
--- /dev/null
+++ b/arch/arm/boot/dts/mt7623a-rfb.dtsi
@@ -0,0 +1,84 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2017-2018 MediaTek Inc.
+ * Author: Sean Wang <sean.wang@mediatek.com>
+ *
+ */
+
+/dts-v1/;
+#include <dt-bindings/power/mt7623a-power.h>
+#include "mt7623n-rfb.dtsi"
+
+/ {
+	memory {
+		device_type = "memory";
+		reg = <0 0x80000000 0 0x20000000>;
+	};
+};
+
+&afe {
+	power-domains = <&scpsys MT7623A_POWER_DOMAIN_IFR_MSC>;
+};
+
+&cir {
+	status = "disabled";
+};
+
+&crypto {
+	power-domains = <&scpsys MT7623A_POWER_DOMAIN_ETH>;
+};
+
+&eth {
+	power-domains = <&scpsys MT7623A_POWER_DOMAIN_ETH>;
+};
+
+&hsdma {
+	power-domains = <&scpsys MT7623A_POWER_DOMAIN_ETH>;
+};
+
+&i2c2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c2_pins_b>;
+};
+
+&mt7530 {
+	mediatek,mcm;
+	resets = <&ethsys MT2701_ETHSYS_MCM_RST>;
+	reset-names = "mcm";
+};
+
+&nandc {
+	power-domains = <&scpsys MT7623A_POWER_DOMAIN_IFR_MSC>;
+};
+
+&pcie {
+	power-domains = <&scpsys MT7623A_POWER_DOMAIN_HIF>;
+};
+
+&scpsys {
+	compatible = "mediatek,mt7623a-scpsys",
+		     "syscon";
+	clocks = <&topckgen CLK_TOP_ETHIF_SEL>;
+	clock-names = "ethif";
+};
+
+&uart0 {
+	status = "disabled";
+};
+
+&uart1 {
+	status = "disabled";
+};
+
+&uart2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart2_pins_b>;
+};
+
+&usb1 {
+	power-domains = <&scpsys MT7623A_POWER_DOMAIN_HIF>;
+};
+
+&usb2 {
+	power-domains = <&scpsys MT7623A_POWER_DOMAIN_HIF>;
+};
diff --git a/arch/arm/boot/dts/mt7623n-rfb.dtsi b/arch/arm/boot/dts/mt7623n-rfb.dtsi
index 0237476..07ed15d 100644
--- a/arch/arm/boot/dts/mt7623n-rfb.dtsi
+++ b/arch/arm/boot/dts/mt7623n-rfb.dtsi
@@ -380,6 +380,14 @@
 		};
 	};
 
+	i2c2_pins_b: i2c2-alt {
+		pin-i2c2 {
+			pinmux = <MT7623_PIN_122_GPIO122_FUNC_SDA2>,
+				 <MT7623_PIN_123_HTPLG_FUNC_SCL2>;
+			bias-disable;
+		};
+	};
+
 	i2s0_pins_a: i2s0-default {
 		pin-i2s0 {
 			pinmux = <MT7623_PIN_49_I2S0_DATA_FUNC_I2S0_DATA>,
@@ -629,6 +637,13 @@
 				 <MT7623_PIN_15_GPIO15_FUNC_UTXD2>;
 		};
 	};
+
+	uart2_pins_b: uart2-alt {
+		pins-dat {
+			pinmux = <MT7623_PIN_200_URXD2_FUNC_URXD2>,
+				 <MT7623_PIN_201_UTXD2_FUNC_UTXD2>;
+		};
+	};
 };
 
 &pwm {
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 51+ messages in thread

* [PATCH v1 19/19] arm: dts: mediatek: converted to using SPDX identifiers
  2018-02-23 10:16 [PATCH v1 00/19] refactor dts and add support for more boards sean.wang
                   ` (17 preceding siblings ...)
  2018-02-23 10:16 ` [PATCH v1 18/19] arm: dts: mt7623: add MT7623A reference boards sean.wang
@ 2018-02-23 10:16 ` sean.wang
  2018-03-02 15:52   ` Rob Herring
  18 siblings, 1 reply; 51+ messages in thread
From: sean.wang @ 2018-02-23 10:16 UTC (permalink / raw)
  To: robh+dt, matthias.bgg, mark.rutland, devicetree, linux-mediatek
  Cc: linux-arm-kernel, linux-kernel, Sean Wang, Philippe Ombredanne

From: Sean Wang <sean.wang@mediatek.com>

Convert boilerplate license statement into proper SPDX identifier style.

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
---
 arch/arm/boot/dts/mt2701-evb.dts              |  9 +--------
 arch/arm/boot/dts/mt2701.dtsi                 |  9 +--------
 arch/arm/boot/dts/mt6323.dtsi                 |  8 +-------
 arch/arm/boot/dts/mt6580-evbp1.dts            |  9 +--------
 arch/arm/boot/dts/mt6580.dtsi                 |  9 +--------
 arch/arm/boot/dts/mt6589-aquaris5.dts         | 10 +---------
 arch/arm/boot/dts/mt6589.dtsi                 | 12 ++----------
 arch/arm/boot/dts/mt6592-evb.dts              |  9 +--------
 arch/arm/boot/dts/mt6592.dtsi                 |  9 +--------
 arch/arm/boot/dts/mt7623.dtsi                 |  9 +--------
 arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts |  2 +-
 arch/arm/boot/dts/mt7623n-rfb-nand.dts        |  9 +--------
 arch/arm/boot/dts/mt7623n-rfb.dtsi            |  9 +--------
 arch/arm/boot/dts/mt8127-moose.dts            |  9 +--------
 arch/arm/boot/dts/mt8127.dtsi                 |  9 +--------
 arch/arm/boot/dts/mt8135-evbp1.dts            |  9 +--------
 arch/arm/boot/dts/mt8135.dtsi                 |  9 +--------
 17 files changed, 18 insertions(+), 131 deletions(-)

diff --git a/arch/arm/boot/dts/mt2701-evb.dts b/arch/arm/boot/dts/mt2701-evb.dts
index 63af4b1..be0edb3 100644
--- a/arch/arm/boot/dts/mt2701-evb.dts
+++ b/arch/arm/boot/dts/mt2701-evb.dts
@@ -1,15 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2015 MediaTek Inc.
  * Author: Erin Lo <erin.lo@mediatek.com>
  *
- * 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/;
diff --git a/arch/arm/boot/dts/mt2701.dtsi b/arch/arm/boot/dts/mt2701.dtsi
index 9109a2b..0c8a17c1 100644
--- a/arch/arm/boot/dts/mt2701.dtsi
+++ b/arch/arm/boot/dts/mt2701.dtsi
@@ -1,15 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2015 MediaTek Inc.
  * Author: Erin.Lo <erin.lo@mediatek.com>
  *
- * 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.
  */
 
 #include <dt-bindings/clock/mt2701-clk.h>
diff --git a/arch/arm/boot/dts/mt6323.dtsi b/arch/arm/boot/dts/mt6323.dtsi
index 44c5642..0ebc132 100644
--- a/arch/arm/boot/dts/mt6323.dtsi
+++ b/arch/arm/boot/dts/mt6323.dtsi
@@ -1,15 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2017-2018 MediaTek Inc.
  * Author: John Crispin <john@phrozen.org>
  *	   Sean Wang <sean.wang@mediatek.com>
- * 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.
  */
 
 &pwrap {
diff --git a/arch/arm/boot/dts/mt6580-evbp1.dts b/arch/arm/boot/dts/mt6580-evbp1.dts
index 17daeae..ca13789 100644
--- a/arch/arm/boot/dts/mt6580-evbp1.dts
+++ b/arch/arm/boot/dts/mt6580-evbp1.dts
@@ -1,15 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2015 MediaTek Inc.
  * Author: Mars.C <mars.cheng@mediatek.com>
  *
- * 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/;
diff --git a/arch/arm/boot/dts/mt6580.dtsi b/arch/arm/boot/dts/mt6580.dtsi
index a349dba..2bdc5ed 100644
--- a/arch/arm/boot/dts/mt6580.dtsi
+++ b/arch/arm/boot/dts/mt6580.dtsi
@@ -1,15 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2015 MediaTek Inc.
  * Author: Mars.C <mars.cheng@mediatek.com>
  *
- * 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.
  */
 
 #include <dt-bindings/interrupt-controller/irq.h>
diff --git a/arch/arm/boot/dts/mt6589-aquaris5.dts b/arch/arm/boot/dts/mt6589-aquaris5.dts
index 594a6f3..e31d5952 100644
--- a/arch/arm/boot/dts/mt6589-aquaris5.dts
+++ b/arch/arm/boot/dts/mt6589-aquaris5.dts
@@ -1,16 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2014 MundoReader S.L.
  * Author: Matthias Brugger <matthias.bgg@gmail.com>
  *
- * This program 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 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/;
diff --git a/arch/arm/boot/dts/mt6589.dtsi b/arch/arm/boot/dts/mt6589.dtsi
index 41df742..b47b5e5 100644
--- a/arch/arm/boot/dts/mt6589.dtsi
+++ b/arch/arm/boot/dts/mt6589.dtsi
@@ -1,17 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2014 MundoReader S.L.
  * Author: Matthias Brugger <matthias.bgg@gmail.com>
  *
- * This program 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 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.
- */
+*/
 
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
diff --git a/arch/arm/boot/dts/mt6592-evb.dts b/arch/arm/boot/dts/mt6592-evb.dts
index b57237e..02849f6 100644
--- a/arch/arm/boot/dts/mt6592-evb.dts
+++ b/arch/arm/boot/dts/mt6592-evb.dts
@@ -1,15 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2014 MediaTek Inc.
  * Author: Howard Chen <ibanezchen@gmail.com>
  *
- * 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/;
diff --git a/arch/arm/boot/dts/mt6592.dtsi b/arch/arm/boot/dts/mt6592.dtsi
index c69201f..8696ac8 100644
--- a/arch/arm/boot/dts/mt6592.dtsi
+++ b/arch/arm/boot/dts/mt6592.dtsi
@@ -1,15 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2014 MediaTek Inc.
  * Author: Howard Chen <ibanezchen@gmail.com>
  *
- * 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.
  */
 
 #include <dt-bindings/interrupt-controller/irq.h>
diff --git a/arch/arm/boot/dts/mt7623.dtsi b/arch/arm/boot/dts/mt7623.dtsi
index bf9db44..1e1c60a 100644
--- a/arch/arm/boot/dts/mt7623.dtsi
+++ b/arch/arm/boot/dts/mt7623.dtsi
@@ -1,16 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2017-2018 MediaTek Inc.
  * Author: John Crispin <john@phrozen.org>
  *	   Sean Wang <sean.wang@mediatek.com>
  *
- * 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.
  */
 
 #include <dt-bindings/interrupt-controller/irq.h>
diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
index 3e8d02c..204c2be 100644
--- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
+++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
@@ -1,7 +1,7 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 /*
  * Copyright 2017-2018 Sean Wang <sean.wang@mediatek.com>
  *
- * SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  */
 
 /dts-v1/;
diff --git a/arch/arm/boot/dts/mt7623n-rfb-nand.dts b/arch/arm/boot/dts/mt7623n-rfb-nand.dts
index 05f1171..61930f2 100644
--- a/arch/arm/boot/dts/mt7623n-rfb-nand.dts
+++ b/arch/arm/boot/dts/mt7623n-rfb-nand.dts
@@ -1,16 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2017-2018 MediaTek Inc.
  * Author: John Crispin <john@phrozen.org>
  *	   Sean Wang <sean.wang@mediatek.com>
  *
- * 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/;
diff --git a/arch/arm/boot/dts/mt7623n-rfb.dtsi b/arch/arm/boot/dts/mt7623n-rfb.dtsi
index 07ed15d..6609f50 100644
--- a/arch/arm/boot/dts/mt7623n-rfb.dtsi
+++ b/arch/arm/boot/dts/mt7623n-rfb.dtsi
@@ -1,16 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2017-2018 MediaTek Inc.
  * Author: John Crispin <john@phrozen.org>
  *	   Sean Wang <sean.wang@mediatek.com>
  *
- * 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/;
diff --git a/arch/arm/boot/dts/mt8127-moose.dts b/arch/arm/boot/dts/mt8127-moose.dts
index 073e295..308829b 100644
--- a/arch/arm/boot/dts/mt8127-moose.dts
+++ b/arch/arm/boot/dts/mt8127-moose.dts
@@ -1,15 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2014 MediaTek Inc.
  * Author: Joe.C <yingjoe.chen@mediatek.com>
  *
- * 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/;
diff --git a/arch/arm/boot/dts/mt8127.dtsi b/arch/arm/boot/dts/mt8127.dtsi
index 916c095..3adfc6f 100644
--- a/arch/arm/boot/dts/mt8127.dtsi
+++ b/arch/arm/boot/dts/mt8127.dtsi
@@ -1,15 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2014 MediaTek Inc.
  * Author: Joe.C <yingjoe.chen@mediatek.com>
  *
- * 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.
  */
 
 #include <dt-bindings/interrupt-controller/irq.h>
diff --git a/arch/arm/boot/dts/mt8135-evbp1.dts b/arch/arm/boot/dts/mt8135-evbp1.dts
index 460db6d..0ace7a4 100644
--- a/arch/arm/boot/dts/mt8135-evbp1.dts
+++ b/arch/arm/boot/dts/mt8135-evbp1.dts
@@ -1,15 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2014 MediaTek Inc.
  * Author: Joe.C <yingjoe.chen@mediatek.com>
  *
- * 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/;
diff --git a/arch/arm/boot/dts/mt8135.dtsi b/arch/arm/boot/dts/mt8135.dtsi
index a97b4ee..688069d 100644
--- a/arch/arm/boot/dts/mt8135.dtsi
+++ b/arch/arm/boot/dts/mt8135.dtsi
@@ -1,15 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2014 MediaTek Inc.
  * Author: Joe.C <yingjoe.chen@mediatek.com>
  *
- * 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.
  */
 
 #include <dt-bindings/clock/mt8135-clk.h>
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 51+ messages in thread

* Re: [PATCH v1 09/19] arm: dts: mt7623: add related clock properties to cpu[1-3] nodes
  2018-02-23 10:16 ` [PATCH v1 09/19] arm: dts: mt7623: add related clock properties to cpu[1-3] nodes sean.wang
@ 2018-02-26  4:13   ` Viresh Kumar
  2018-03-18 23:49   ` Matthias Brugger
  1 sibling, 0 replies; 51+ messages in thread
From: Viresh Kumar @ 2018-02-26  4:13 UTC (permalink / raw)
  To: sean.wang
  Cc: robh+dt, matthias.bgg, mark.rutland, devicetree, linux-mediatek,
	linux-arm-kernel, linux-kernel, Rafael J. Wysocki, linux-pm

On 23-02-18, 18:16, sean.wang@mediatek.com wrote:
> From: Sean Wang <sean.wang@mediatek.com>
> 
> Complement the missing clock properties cpu[1-3] should depend on.
> 
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> Cc: Viresh Kumar <viresh.kumar@linaro.org>
> Cc: linux-pm@vger.kernel.org
> ---
>  arch/arm/boot/dts/mt7623.dtsi | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/mt7623.dtsi b/arch/arm/boot/dts/mt7623.dtsi
> index da56c54..5cf93a4 100644
> --- a/arch/arm/boot/dts/mt7623.dtsi
> +++ b/arch/arm/boot/dts/mt7623.dtsi
> @@ -94,6 +94,9 @@
>  			device_type = "cpu";
>  			compatible = "arm,cortex-a7";
>  			reg = <0x1>;
> +			clocks = <&infracfg CLK_INFRA_CPUSEL>,
> +				 <&apmixedsys CLK_APMIXED_MAINPLL>;
> +			clock-names = "cpu", "intermediate";
>  			operating-points-v2 = <&cpu_opp_table>;
>  			clock-frequency = <1300000000>;
>  		};
> @@ -102,6 +105,9 @@
>  			device_type = "cpu";
>  			compatible = "arm,cortex-a7";
>  			reg = <0x2>;
> +			clocks = <&infracfg CLK_INFRA_CPUSEL>,
> +				 <&apmixedsys CLK_APMIXED_MAINPLL>;
> +			clock-names = "cpu", "intermediate";
>  			operating-points-v2 = <&cpu_opp_table>;
>  			clock-frequency = <1300000000>;
>  		};
> @@ -110,6 +116,9 @@
>  			device_type = "cpu";
>  			compatible = "arm,cortex-a7";
>  			reg = <0x3>;
> +			clocks = <&infracfg CLK_INFRA_CPUSEL>,
> +				 <&apmixedsys CLK_APMIXED_MAINPLL>;
> +			clock-names = "cpu", "intermediate";
>  			operating-points-v2 = <&cpu_opp_table>;
>  			clock-frequency = <1300000000>;
>  		};

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v1 02/19] dt-bindings: cpufreq: mediatek: use - instead of _ in examples
  2018-02-23 10:16 ` [PATCH v1 02/19] dt-bindings: cpufreq: " sean.wang
@ 2018-02-26  4:13   ` Viresh Kumar
  2018-03-19  2:51     ` Sean Wang
  2018-03-02 15:53   ` Rob Herring
  1 sibling, 1 reply; 51+ messages in thread
From: Viresh Kumar @ 2018-02-26  4:13 UTC (permalink / raw)
  To: sean.wang
  Cc: robh+dt, matthias.bgg, mark.rutland, devicetree, linux-mediatek,
	linux-arm-kernel, linux-kernel, Rafael J. Wysocki, linux-pm

On 23-02-18, 18:16, sean.wang@mediatek.com wrote:
> From: Sean Wang <sean.wang@mediatek.com>
> 
> It should be good that no use "_" is in examples. Consequently,
> those nodes in certain files which have an inappropriate name containing
> "_" are all being replaced with "-".
> 
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> Cc: Viresh Kumar <viresh.kumar@linaro.org>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: linux-pm@vger.kernel.org
> Cc: devicetree@vger.kernel.org
> ---
>  Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek.txt | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek.txt b/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek.txt
> index d36f07e..38cfbb5 100644
> --- a/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek.txt
> +++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek.txt
> @@ -26,7 +26,7 @@ Optional properties:
>  
>  Example 1 (MT7623 SoC):
>  
> -	cpu_opp_table: opp_table {
> +	cpu_opp_table: opp-table {
>  		compatible = "operating-points-v2";
>  		opp-shared;
>  
> @@ -86,7 +86,7 @@ Example 1 (MT7623 SoC):
>  	};
>  
>  Example 2 (MT8173 SoC):
> -	cpu_opp_table_a: opp_table_a {
> +	cpu_opp_table_a: opp-table-a {
>  		compatible = "operating-points-v2";
>  		opp-shared;
>  
> @@ -131,7 +131,7 @@ Example 2 (MT8173 SoC):
>  		};
>  	};
>  
> -	cpu_opp_table_b: opp_table_b {
> +	cpu_opp_table_b: opp-table-b {
>  		compatible = "operating-points-v2";
>  		opp-shared;

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v1 01/19] dt-bindings: pinctrl: mediatek: use - instead of _ in examples
  2018-02-23 10:16 ` [PATCH v1 01/19] dt-bindings: pinctrl: mediatek: use - instead of _ in examples sean.wang
@ 2018-03-02  7:43   ` Linus Walleij
  0 siblings, 0 replies; 51+ messages in thread
From: Linus Walleij @ 2018-03-02  7:43 UTC (permalink / raw)
  To: sean.wang
  Cc: Rob Herring, Matthias Brugger, Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	moderated list:ARM/Mediatek SoC support, Linux ARM, linux-kernel,
	open list:GPIO SUBSYSTEM

On Fri, Feb 23, 2018 at 11:16 AM,  <sean.wang@mediatek.com> wrote:

> From: Sean Wang <sean.wang@mediatek.com>
>
> It should be good that no use "_" is in examples. Consequently,
> those nodes in certain files which have an inappropriate name containing
> "_" are all being replaced with "-".
>
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: linux-gpio@vger.kernel.org
> Cc: devicetree@vger.kernel.org

Patch applied.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v1 03/19] dt-bindings: pinctrl: mediatek: add bindings for I2C2 and SPI2 on MT7623
  2018-02-23 10:16 ` [PATCH v1 03/19] dt-bindings: pinctrl: mediatek: add bindings for I2C2 and SPI2 on MT7623 sean.wang
@ 2018-03-02  7:44   ` Linus Walleij
  0 siblings, 0 replies; 51+ messages in thread
From: Linus Walleij @ 2018-03-02  7:44 UTC (permalink / raw)
  To: sean.wang
  Cc: Rob Herring, Matthias Brugger, Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	moderated list:ARM/Mediatek SoC support, Linux ARM, linux-kernel,
	open list:GPIO SUBSYSTEM

On Fri, Feb 23, 2018 at 11:16 AM,  <sean.wang@mediatek.com> wrote:

> From: Sean Wang <sean.wang@mediatek.com>
>
> Add missing pinctrl binding about I2C2 and SPI2 which would be used in
> devicetree related files.
>
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: linux-gpio@vger.kernel.org
> Cc: devicetree@vger.kernel.org

Patch applied.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v1 13/19] arm: dts: mt7623: move node mt6323 leds to mt6323.dtsi
  2018-02-23 10:16 ` [PATCH v1 13/19] arm: dts: mt7623: move node mt6323 leds to mt6323.dtsi sean.wang
@ 2018-03-02 15:40   ` Rob Herring
  2018-03-02 22:46     ` Sean Wang
  2018-03-18 22:01   ` Matthias Brugger
  1 sibling, 1 reply; 51+ messages in thread
From: Rob Herring @ 2018-03-02 15:40 UTC (permalink / raw)
  To: sean.wang
  Cc: matthias.bgg, mark.rutland, devicetree, linux-mediatek,
	linux-arm-kernel, linux-kernel, Lee Jones

On Fri, Feb 23, 2018 at 06:16:33PM +0800, sean.wang@mediatek.com wrote:
> From: Sean Wang <sean.wang@mediatek.com>
> 
> Since those LEDs are parts of PMIC MT6323, it is reasonable to merge
> those LEDs node definition back into mt6323.dtsi. This way can improve
> the reusability of those nodes among different boards with the same PMIC.
> 
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> Cc: Lee Jones <lee.jones@linaro.org>
> ---
>  arch/arm/boot/dts/mt6323.dtsi                 | 26 ++++++++++++++++++++++++-
>  arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 28 ---------------------------
>  2 files changed, 25 insertions(+), 29 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/mt6323.dtsi b/arch/arm/boot/dts/mt6323.dtsi
> index 7c783d6..44c5642 100644
> --- a/arch/arm/boot/dts/mt6323.dtsi
> +++ b/arch/arm/boot/dts/mt6323.dtsi
> @@ -1,5 +1,5 @@
>  /*
> - * Copyright (c) 2017 MediaTek Inc.
> + * Copyright (c) 2017-2018 MediaTek Inc.
>   * Author: John Crispin <john@phrozen.org>
>   *	   Sean Wang <sean.wang@mediatek.com>
>   * This program is free software; you can redistribute it and/or modify
> @@ -237,5 +237,29 @@
>  				regulator-enable-ramp-delay = <216>;
>  			};
>  		};
> +
> +		leds {
> +			compatible = "mediatek,mt6323-led";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +
> +			led@0 {
> +				reg = <0>;
> +				label = "mt6323:isink:green";

Changing the label potentially breaks userspace. And the fact that it is 
a green LED is very much board specific. So I think the old location was 
correct. You could put the parent node here and leave these child nodes 
in the board specific dts file.


> +				default-state = "off";
> +			};
> +
> +			led@1 {
> +				reg = <1>;
> +				label = "mt6323:isink:red";
> +				default-state = "off";
> +			};
> +
> +			led@2 {
> +				reg = <2>;
> +				label = "mt6323:isink:blue";
> +				default-state = "off";
> +			};
> +		};
>  	};
>  };
> diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> index 75e61c4..767b225 100644
> --- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> +++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> @@ -483,34 +483,6 @@
>  	status = "okay";
>  };
>  
> -&pwrap {
> -	mt6323 {
> -		mt6323led: led {
> -			compatible = "mediatek,mt6323-led";
> -			#address-cells = <1>;
> -			#size-cells = <0>;
> -
> -			led@0 {
> -				reg = <0>;
> -				label = "bpi-r2:isink:green";
> -				default-state = "off";
> -			};
> -
> -			led@1 {
> -				reg = <1>;
> -				label = "bpi-r2:isink:red";
> -				default-state = "off";
> -			};
> -
> -			led@2 {
> -				reg = <2>;
> -				label = "bpi-r2:isink:blue";
> -				default-state = "off";
> -			};
> -		};
> -	};
> -};
> -
>  &spi0 {
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&spi0_pins_a>;
> -- 
> 2.7.4
> 

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v1 16/19] arm: dts: mt7623: fixup available memory size on bananapi-r2
  2018-02-23 10:16 ` [PATCH v1 16/19] arm: dts: mt7623: fixup available memory size on bananapi-r2 sean.wang
@ 2018-03-02 15:42   ` Rob Herring
  2018-03-02 23:27     ` Sean Wang
  0 siblings, 1 reply; 51+ messages in thread
From: Rob Herring @ 2018-03-02 15:42 UTC (permalink / raw)
  To: sean.wang
  Cc: matthias.bgg, mark.rutland, devicetree, linux-mediatek,
	linux-arm-kernel, linux-kernel

On Fri, Feb 23, 2018 at 06:16:36PM +0800, sean.wang@mediatek.com wrote:
> From: Sean Wang <sean.wang@mediatek.com>
> 
> There is 2GB DDR3 available on bananapi-r2 board as [1] specified.
> 
> [1] http://www.banana-pi.org/r2.html
> 
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> ---
>  arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> index 140ff78..3e8d02c 100644
> --- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> +++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> @@ -38,6 +38,11 @@
>  			default-state = "off";
>  		};
>  	};
> +
> +	memory {

Unit address?

> +		device_type = "memory";
> +		reg = <0 0x80000000 0 0x80000000>;
> +	};
>  };
>  
>  &afe {
> -- 
> 2.7.4
> 

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v1 18/19] arm: dts: mt7623: add MT7623A reference boards
  2018-02-23 10:16 ` [PATCH v1 18/19] arm: dts: mt7623: add MT7623A reference boards sean.wang
@ 2018-03-02 15:45   ` Rob Herring
  2018-03-03  2:15     ` Sean Wang
  0 siblings, 1 reply; 51+ messages in thread
From: Rob Herring @ 2018-03-02 15:45 UTC (permalink / raw)
  To: sean.wang
  Cc: matthias.bgg, mark.rutland, devicetree, linux-mediatek,
	linux-arm-kernel, linux-kernel

On Fri, Feb 23, 2018 at 06:16:38PM +0800, sean.wang@mediatek.com wrote:
> From: Sean Wang <sean.wang@mediatek.com>
> 
> Add mt7623a-rfb.dtsi where most nodes can be inherited from
> mt7623n-rfb.dtsi and keep these distinctions from MT7623A boards in
> mt7623a-rfb.dtsi for most definition can be reused among MT7623A board
> variants.
> 
> MT7623A has its specific definition of power domain and thus we need
> to change related devices such as audio, ethernet, crypto, high-speed
> DMA, NAND, and USB controller to the power domain they specifically
> belong to. In addition, MT7530 exists as built-in module inside MT7623A
> SoC and I2C2 and UART[0-1] get being removed and UART2 have distinct pin
> usage. Those all differences can be totally seen in mt7623a-rfb.dtsi.
> 
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> ---
>  arch/arm/boot/dts/Makefile             |  2 +
>  arch/arm/boot/dts/mt7623a-rfb-emmc.dts | 22 +++++++++
>  arch/arm/boot/dts/mt7623a-rfb-nand.dts | 26 +++++++++++
>  arch/arm/boot/dts/mt7623a-rfb.dtsi     | 84 ++++++++++++++++++++++++++++++++++
>  arch/arm/boot/dts/mt7623n-rfb.dtsi     | 15 ++++++
>  5 files changed, 149 insertions(+)
>  create mode 100644 arch/arm/boot/dts/mt7623a-rfb-emmc.dts
>  create mode 100644 arch/arm/boot/dts/mt7623a-rfb-nand.dts
>  create mode 100644 arch/arm/boot/dts/mt7623a-rfb.dtsi
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index 5af6fce..818817c 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -1122,6 +1122,8 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
>  	mt6580-evbp1.dtb \
>  	mt6589-aquaris5.dtb \
>  	mt6592-evb.dtb \
> +	mt7623a-rfb-emmc.dtb \
> +	mt7623a-rfb-nand.dtb \
>  	mt7623n-rfb-emmc.dtb \
>  	mt7623n-rfb-nand.dtb \
>  	mt7623n-bananapi-bpi-r2.dtb \
> diff --git a/arch/arm/boot/dts/mt7623a-rfb-emmc.dts b/arch/arm/boot/dts/mt7623a-rfb-emmc.dts
> new file mode 100644
> index 0000000..ef6398e
> --- /dev/null
> +++ b/arch/arm/boot/dts/mt7623a-rfb-emmc.dts
> @@ -0,0 +1,22 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright (c) 2017-2018 MediaTek Inc.
> + * Author: Sean Wang <sean.wang@mediatek.com>
> + *
> + */
> +
> +/dts-v1/;
> +#include "mt7623a-rfb.dtsi"
> +
> +/ {
> +	model = "MediaTek MT7623A with eMMC reference board";
> +	compatible = "mediatek,mt7623a-rfb-emmc", "mediatek,mt7623";
> +
> +	chosen {
> +		bootargs = "console=ttyS0,115200n8 earlyprintk";

Use stdout-path instead. earlyprintk option only works for a kernel 
built with a debug uart at a fixed address, so drop it.

> +	};
> +};
> +
> +&mmc0 {
> +	status = "okay";
> +};
> diff --git a/arch/arm/boot/dts/mt7623a-rfb-nand.dts b/arch/arm/boot/dts/mt7623a-rfb-nand.dts
> new file mode 100644
> index 0000000..592d5d7
> --- /dev/null
> +++ b/arch/arm/boot/dts/mt7623a-rfb-nand.dts
> @@ -0,0 +1,26 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright (c) 2017-2018 MediaTek Inc.
> + * Author: Sean Wang <sean.wang@mediatek.com>
> + *
> + */
> +
> +/dts-v1/;
> +#include "mt7623a-rfb.dtsi"
> +
> +/ {
> +	model = "MediaTek MT7623A with NAND reference board";
> +	compatible = "mediatek,mt7623a-rfb-nand", "mediatek,mt7623";
> +
> +	chosen {
> +		bootargs = "console=ttyS0,115200n8 earlyprintk";

ditto.

> +	};
> +};
> +
> +&bch {
> +	status = "okay";
> +};
> +
> +&nandc {
> +	status = "okay";
> +};
> diff --git a/arch/arm/boot/dts/mt7623a-rfb.dtsi b/arch/arm/boot/dts/mt7623a-rfb.dtsi
> new file mode 100644
> index 0000000..3a15c46
> --- /dev/null
> +++ b/arch/arm/boot/dts/mt7623a-rfb.dtsi
> @@ -0,0 +1,84 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright (c) 2017-2018 MediaTek Inc.
> + * Author: Sean Wang <sean.wang@mediatek.com>
> + *
> + */
> +
> +/dts-v1/;
> +#include <dt-bindings/power/mt7623a-power.h>
> +#include "mt7623n-rfb.dtsi"
> +
> +/ {
> +	memory {

Unit-address?

> +		device_type = "memory";
> +		reg = <0 0x80000000 0 0x20000000>;
> +	};
> +};
> +
> +&afe {
> +	power-domains = <&scpsys MT7623A_POWER_DOMAIN_IFR_MSC>;
> +};
> +
> +&cir {
> +	status = "disabled";
> +};
> +
> +&crypto {
> +	power-domains = <&scpsys MT7623A_POWER_DOMAIN_ETH>;
> +};
> +
> +&eth {
> +	power-domains = <&scpsys MT7623A_POWER_DOMAIN_ETH>;
> +};
> +
> +&hsdma {
> +	power-domains = <&scpsys MT7623A_POWER_DOMAIN_ETH>;
> +};
> +
> +&i2c2 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&i2c2_pins_b>;
> +};
> +
> +&mt7530 {
> +	mediatek,mcm;
> +	resets = <&ethsys MT2701_ETHSYS_MCM_RST>;
> +	reset-names = "mcm";
> +};
> +
> +&nandc {
> +	power-domains = <&scpsys MT7623A_POWER_DOMAIN_IFR_MSC>;
> +};
> +
> +&pcie {
> +	power-domains = <&scpsys MT7623A_POWER_DOMAIN_HIF>;
> +};
> +
> +&scpsys {
> +	compatible = "mediatek,mt7623a-scpsys",
> +		     "syscon";
> +	clocks = <&topckgen CLK_TOP_ETHIF_SEL>;
> +	clock-names = "ethif";
> +};
> +
> +&uart0 {
> +	status = "disabled";
> +};
> +
> +&uart1 {
> +	status = "disabled";
> +};
> +
> +&uart2 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&uart2_pins_b>;
> +};
> +
> +&usb1 {
> +	power-domains = <&scpsys MT7623A_POWER_DOMAIN_HIF>;
> +};
> +
> +&usb2 {
> +	power-domains = <&scpsys MT7623A_POWER_DOMAIN_HIF>;
> +};
> diff --git a/arch/arm/boot/dts/mt7623n-rfb.dtsi b/arch/arm/boot/dts/mt7623n-rfb.dtsi
> index 0237476..07ed15d 100644
> --- a/arch/arm/boot/dts/mt7623n-rfb.dtsi
> +++ b/arch/arm/boot/dts/mt7623n-rfb.dtsi
> @@ -380,6 +380,14 @@
>  		};
>  	};
>  
> +	i2c2_pins_b: i2c2-alt {
> +		pin-i2c2 {
> +			pinmux = <MT7623_PIN_122_GPIO122_FUNC_SDA2>,
> +				 <MT7623_PIN_123_HTPLG_FUNC_SCL2>;
> +			bias-disable;
> +		};
> +	};
> +
>  	i2s0_pins_a: i2s0-default {
>  		pin-i2s0 {
>  			pinmux = <MT7623_PIN_49_I2S0_DATA_FUNC_I2S0_DATA>,
> @@ -629,6 +637,13 @@
>  				 <MT7623_PIN_15_GPIO15_FUNC_UTXD2>;
>  		};
>  	};
> +
> +	uart2_pins_b: uart2-alt {
> +		pins-dat {
> +			pinmux = <MT7623_PIN_200_URXD2_FUNC_URXD2>,
> +				 <MT7623_PIN_201_UTXD2_FUNC_UTXD2>;
> +		};
> +	};
>  };
>  
>  &pwm {
> -- 
> 2.7.4
> 

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v1 19/19] arm: dts: mediatek: converted to using SPDX identifiers
  2018-02-23 10:16 ` [PATCH v1 19/19] arm: dts: mediatek: converted to using SPDX identifiers sean.wang
@ 2018-03-02 15:52   ` Rob Herring
  0 siblings, 0 replies; 51+ messages in thread
From: Rob Herring @ 2018-03-02 15:52 UTC (permalink / raw)
  To: sean.wang
  Cc: matthias.bgg, mark.rutland, devicetree, linux-mediatek,
	linux-arm-kernel, linux-kernel, Philippe Ombredanne

On Fri, Feb 23, 2018 at 06:16:39PM +0800, sean.wang@mediatek.com wrote:
> From: Sean Wang <sean.wang@mediatek.com>
> 
> Convert boilerplate license statement into proper SPDX identifier style.
> 
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> Cc: Philippe Ombredanne <pombredanne@nexb.com>
> ---
>  arch/arm/boot/dts/mt2701-evb.dts              |  9 +--------
>  arch/arm/boot/dts/mt2701.dtsi                 |  9 +--------
>  arch/arm/boot/dts/mt6323.dtsi                 |  8 +-------
>  arch/arm/boot/dts/mt6580-evbp1.dts            |  9 +--------
>  arch/arm/boot/dts/mt6580.dtsi                 |  9 +--------
>  arch/arm/boot/dts/mt6589-aquaris5.dts         | 10 +---------
>  arch/arm/boot/dts/mt6589.dtsi                 | 12 ++----------
>  arch/arm/boot/dts/mt6592-evb.dts              |  9 +--------
>  arch/arm/boot/dts/mt6592.dtsi                 |  9 +--------
>  arch/arm/boot/dts/mt7623.dtsi                 |  9 +--------
>  arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts |  2 +-
>  arch/arm/boot/dts/mt7623n-rfb-nand.dts        |  9 +--------
>  arch/arm/boot/dts/mt7623n-rfb.dtsi            |  9 +--------
>  arch/arm/boot/dts/mt8127-moose.dts            |  9 +--------
>  arch/arm/boot/dts/mt8127.dtsi                 |  9 +--------
>  arch/arm/boot/dts/mt8135-evbp1.dts            |  9 +--------
>  arch/arm/boot/dts/mt8135.dtsi                 |  9 +--------
>  17 files changed, 18 insertions(+), 131 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/mt2701-evb.dts b/arch/arm/boot/dts/mt2701-evb.dts
> index 63af4b1..be0edb3 100644
> --- a/arch/arm/boot/dts/mt2701-evb.dts
> +++ b/arch/arm/boot/dts/mt2701-evb.dts
> @@ -1,15 +1,8 @@
> +// SPDX-License-Identifier: GPL-2.0
>  /*
>   * Copyright (c) 2015 MediaTek Inc.
>   * Author: Erin Lo <erin.lo@mediatek.com>
>   *
> - * 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/;
> diff --git a/arch/arm/boot/dts/mt2701.dtsi b/arch/arm/boot/dts/mt2701.dtsi
> index 9109a2b..0c8a17c1 100644
> --- a/arch/arm/boot/dts/mt2701.dtsi
> +++ b/arch/arm/boot/dts/mt2701.dtsi
> @@ -1,15 +1,8 @@
> +// SPDX-License-Identifier: GPL-2.0
>  /*
>   * Copyright (c) 2015 MediaTek Inc.
>   * Author: Erin.Lo <erin.lo@mediatek.com>
>   *
> - * 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.
>   */
>  
>  #include <dt-bindings/clock/mt2701-clk.h>
> diff --git a/arch/arm/boot/dts/mt6323.dtsi b/arch/arm/boot/dts/mt6323.dtsi
> index 44c5642..0ebc132 100644
> --- a/arch/arm/boot/dts/mt6323.dtsi
> +++ b/arch/arm/boot/dts/mt6323.dtsi
> @@ -1,15 +1,9 @@
> +// SPDX-License-Identifier: GPL-2.0
>  /*
>   * Copyright (c) 2017-2018 MediaTek Inc.
>   * Author: John Crispin <john@phrozen.org>
>   *	   Sean Wang <sean.wang@mediatek.com>
> - * 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.
>   */
>  
>  &pwrap {
> diff --git a/arch/arm/boot/dts/mt6580-evbp1.dts b/arch/arm/boot/dts/mt6580-evbp1.dts
> index 17daeae..ca13789 100644
> --- a/arch/arm/boot/dts/mt6580-evbp1.dts
> +++ b/arch/arm/boot/dts/mt6580-evbp1.dts
> @@ -1,15 +1,8 @@
> +// SPDX-License-Identifier: GPL-2.0
>  /*
>   * Copyright (c) 2015 MediaTek Inc.
>   * Author: Mars.C <mars.cheng@mediatek.com>
>   *
> - * 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/;
> diff --git a/arch/arm/boot/dts/mt6580.dtsi b/arch/arm/boot/dts/mt6580.dtsi
> index a349dba..2bdc5ed 100644
> --- a/arch/arm/boot/dts/mt6580.dtsi
> +++ b/arch/arm/boot/dts/mt6580.dtsi
> @@ -1,15 +1,8 @@
> +// SPDX-License-Identifier: GPL-2.0
>  /*
>   * Copyright (c) 2015 MediaTek Inc.
>   * Author: Mars.C <mars.cheng@mediatek.com>
>   *
> - * 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.
>   */
>  
>  #include <dt-bindings/interrupt-controller/irq.h>
> diff --git a/arch/arm/boot/dts/mt6589-aquaris5.dts b/arch/arm/boot/dts/mt6589-aquaris5.dts
> index 594a6f3..e31d5952 100644
> --- a/arch/arm/boot/dts/mt6589-aquaris5.dts
> +++ b/arch/arm/boot/dts/mt6589-aquaris5.dts
> @@ -1,16 +1,8 @@
> +// SPDX-License-Identifier: GPL-2.0
>  /*
>   * Copyright (c) 2014 MundoReader S.L.
>   * Author: Matthias Brugger <matthias.bgg@gmail.com>
>   *
> - * This program 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.

You are changing the license from 2.0+ to 2.0.

> - *
> - * 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/;
> diff --git a/arch/arm/boot/dts/mt6589.dtsi b/arch/arm/boot/dts/mt6589.dtsi
> index 41df742..b47b5e5 100644
> --- a/arch/arm/boot/dts/mt6589.dtsi
> +++ b/arch/arm/boot/dts/mt6589.dtsi
> @@ -1,17 +1,9 @@
> +// SPDX-License-Identifier: GPL-2.0
>  /*
>   * Copyright (c) 2014 MundoReader S.L.
>   * Author: Matthias Brugger <matthias.bgg@gmail.com>
>   *
> - * This program 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.

ditto

> - *
> - * 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.
> - */
> +*/
>  
>  #include <dt-bindings/interrupt-controller/irq.h>
>  #include <dt-bindings/interrupt-controller/arm-gic.h>
> diff --git a/arch/arm/boot/dts/mt6592-evb.dts b/arch/arm/boot/dts/mt6592-evb.dts
> index b57237e..02849f6 100644
> --- a/arch/arm/boot/dts/mt6592-evb.dts
> +++ b/arch/arm/boot/dts/mt6592-evb.dts
> @@ -1,15 +1,8 @@
> +// SPDX-License-Identifier: GPL-2.0
>  /*
>   * Copyright (c) 2014 MediaTek Inc.
>   * Author: Howard Chen <ibanezchen@gmail.com>
>   *
> - * 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/;
> diff --git a/arch/arm/boot/dts/mt6592.dtsi b/arch/arm/boot/dts/mt6592.dtsi
> index c69201f..8696ac8 100644
> --- a/arch/arm/boot/dts/mt6592.dtsi
> +++ b/arch/arm/boot/dts/mt6592.dtsi
> @@ -1,15 +1,8 @@
> +// SPDX-License-Identifier: GPL-2.0
>  /*
>   * Copyright (c) 2014 MediaTek Inc.
>   * Author: Howard Chen <ibanezchen@gmail.com>
>   *
> - * 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.
>   */
>  
>  #include <dt-bindings/interrupt-controller/irq.h>
> diff --git a/arch/arm/boot/dts/mt7623.dtsi b/arch/arm/boot/dts/mt7623.dtsi
> index bf9db44..1e1c60a 100644
> --- a/arch/arm/boot/dts/mt7623.dtsi
> +++ b/arch/arm/boot/dts/mt7623.dtsi
> @@ -1,16 +1,9 @@
> +// SPDX-License-Identifier: GPL-2.0
>  /*
>   * Copyright (c) 2017-2018 MediaTek Inc.
>   * Author: John Crispin <john@phrozen.org>
>   *	   Sean Wang <sean.wang@mediatek.com>
>   *
> - * 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.
>   */
>  
>  #include <dt-bindings/interrupt-controller/irq.h>
> diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> index 3e8d02c..204c2be 100644
> --- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> +++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> @@ -1,7 +1,7 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)

This probably can't really be MIT because other files included are GPL 
only and this file is not too useful on its own. But as copyright 
holder, you could change it (that should be a separate commit).

>  /*
>   * Copyright 2017-2018 Sean Wang <sean.wang@mediatek.com>
>   *
> - * SPDX-License-Identifier: (GPL-2.0+ OR MIT)
>   */
>  
>  /dts-v1/;
> diff --git a/arch/arm/boot/dts/mt7623n-rfb-nand.dts b/arch/arm/boot/dts/mt7623n-rfb-nand.dts
> index 05f1171..61930f2 100644
> --- a/arch/arm/boot/dts/mt7623n-rfb-nand.dts
> +++ b/arch/arm/boot/dts/mt7623n-rfb-nand.dts
> @@ -1,16 +1,9 @@
> +// SPDX-License-Identifier: GPL-2.0
>  /*
>   * Copyright (c) 2017-2018 MediaTek Inc.
>   * Author: John Crispin <john@phrozen.org>
>   *	   Sean Wang <sean.wang@mediatek.com>
>   *
> - * 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/;
> diff --git a/arch/arm/boot/dts/mt7623n-rfb.dtsi b/arch/arm/boot/dts/mt7623n-rfb.dtsi
> index 07ed15d..6609f50 100644
> --- a/arch/arm/boot/dts/mt7623n-rfb.dtsi
> +++ b/arch/arm/boot/dts/mt7623n-rfb.dtsi
> @@ -1,16 +1,9 @@
> +// SPDX-License-Identifier: GPL-2.0
>  /*
>   * Copyright (c) 2017-2018 MediaTek Inc.
>   * Author: John Crispin <john@phrozen.org>
>   *	   Sean Wang <sean.wang@mediatek.com>
>   *
> - * 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/;
> diff --git a/arch/arm/boot/dts/mt8127-moose.dts b/arch/arm/boot/dts/mt8127-moose.dts
> index 073e295..308829b 100644
> --- a/arch/arm/boot/dts/mt8127-moose.dts
> +++ b/arch/arm/boot/dts/mt8127-moose.dts
> @@ -1,15 +1,8 @@
> +// SPDX-License-Identifier: GPL-2.0
>  /*
>   * Copyright (c) 2014 MediaTek Inc.
>   * Author: Joe.C <yingjoe.chen@mediatek.com>
>   *
> - * 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/;
> diff --git a/arch/arm/boot/dts/mt8127.dtsi b/arch/arm/boot/dts/mt8127.dtsi
> index 916c095..3adfc6f 100644
> --- a/arch/arm/boot/dts/mt8127.dtsi
> +++ b/arch/arm/boot/dts/mt8127.dtsi
> @@ -1,15 +1,8 @@
> +// SPDX-License-Identifier: GPL-2.0
>  /*
>   * Copyright (c) 2014 MediaTek Inc.
>   * Author: Joe.C <yingjoe.chen@mediatek.com>
>   *
> - * 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.
>   */
>  
>  #include <dt-bindings/interrupt-controller/irq.h>
> diff --git a/arch/arm/boot/dts/mt8135-evbp1.dts b/arch/arm/boot/dts/mt8135-evbp1.dts
> index 460db6d..0ace7a4 100644
> --- a/arch/arm/boot/dts/mt8135-evbp1.dts
> +++ b/arch/arm/boot/dts/mt8135-evbp1.dts
> @@ -1,15 +1,8 @@
> +// SPDX-License-Identifier: GPL-2.0
>  /*
>   * Copyright (c) 2014 MediaTek Inc.
>   * Author: Joe.C <yingjoe.chen@mediatek.com>
>   *
> - * 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/;
> diff --git a/arch/arm/boot/dts/mt8135.dtsi b/arch/arm/boot/dts/mt8135.dtsi
> index a97b4ee..688069d 100644
> --- a/arch/arm/boot/dts/mt8135.dtsi
> +++ b/arch/arm/boot/dts/mt8135.dtsi
> @@ -1,15 +1,8 @@
> +// SPDX-License-Identifier: GPL-2.0
>  /*
>   * Copyright (c) 2014 MediaTek Inc.
>   * Author: Joe.C <yingjoe.chen@mediatek.com>
>   *
> - * 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.
>   */
>  
>  #include <dt-bindings/clock/mt8135-clk.h>
> -- 
> 2.7.4
> 

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v1 02/19] dt-bindings: cpufreq: mediatek: use - instead of _ in examples
  2018-02-23 10:16 ` [PATCH v1 02/19] dt-bindings: cpufreq: " sean.wang
  2018-02-26  4:13   ` Viresh Kumar
@ 2018-03-02 15:53   ` Rob Herring
  1 sibling, 0 replies; 51+ messages in thread
From: Rob Herring @ 2018-03-02 15:53 UTC (permalink / raw)
  To: sean.wang
  Cc: matthias.bgg, mark.rutland, devicetree, linux-mediatek,
	linux-arm-kernel, linux-kernel, Rafael J. Wysocki, Viresh Kumar,
	linux-pm

On Fri, Feb 23, 2018 at 06:16:22PM +0800, sean.wang@mediatek.com wrote:
> From: Sean Wang <sean.wang@mediatek.com>
> 
> It should be good that no use "_" is in examples. Consequently,
> those nodes in certain files which have an inappropriate name containing
> "_" are all being replaced with "-".
> 
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> Cc: Viresh Kumar <viresh.kumar@linaro.org>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: linux-pm@vger.kernel.org
> Cc: devicetree@vger.kernel.org
> ---
>  Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek.txt | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v1 04/19] dt-bindings: arm: mediatek: add support for more mt7623 reference boards
  2018-02-23 10:16 ` [PATCH v1 04/19] dt-bindings: arm: mediatek: add support for more mt7623 reference boards sean.wang
@ 2018-03-02 16:00   ` Rob Herring
  2018-03-12 11:03     ` Matthias Brugger
  0 siblings, 1 reply; 51+ messages in thread
From: Rob Herring @ 2018-03-02 16:00 UTC (permalink / raw)
  To: sean.wang
  Cc: matthias.bgg, mark.rutland, devicetree, linux-mediatek,
	linux-arm-kernel, linux-kernel

On Fri, Feb 23, 2018 at 06:16:24PM +0800, sean.wang@mediatek.com wrote:
> From: Sean Wang <sean.wang@mediatek.com>
> 
> Update binding document for more mt7623[A,N] reference boards being
> supported.
> 
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: devicetree@vger.kernel.org
> ---
>  Documentation/devicetree/bindings/arm/mediatek.txt | 9 +++++++++
>  1 file changed, 9 insertions(+)

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v1 13/19] arm: dts: mt7623: move node mt6323 leds to mt6323.dtsi
  2018-03-02 15:40   ` Rob Herring
@ 2018-03-02 22:46     ` Sean Wang
  2018-03-18 23:46       ` Matthias Brugger
  0 siblings, 1 reply; 51+ messages in thread
From: Sean Wang @ 2018-03-02 22:46 UTC (permalink / raw)
  To: Rob Herring
  Cc: matthias.bgg, mark.rutland, devicetree, linux-mediatek,
	linux-arm-kernel, linux-kernel, Lee Jones

On Fri, 2018-03-02 at 09:40 -0600, Rob Herring wrote:
> On Fri, Feb 23, 2018 at 06:16:33PM +0800, sean.wang@mediatek.com wrote:
> > From: Sean Wang <sean.wang@mediatek.com>
> > 
> > Since those LEDs are parts of PMIC MT6323, it is reasonable to merge
> > those LEDs node definition back into mt6323.dtsi. This way can improve
> > the reusability of those nodes among different boards with the same PMIC.
> > 
> > Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> > Cc: Lee Jones <lee.jones@linaro.org>
> > ---
> >  arch/arm/boot/dts/mt6323.dtsi                 | 26 ++++++++++++++++++++++++-
> >  arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 28 ---------------------------
> >  2 files changed, 25 insertions(+), 29 deletions(-)
> > 
> > diff --git a/arch/arm/boot/dts/mt6323.dtsi b/arch/arm/boot/dts/mt6323.dtsi
> > index 7c783d6..44c5642 100644
> > --- a/arch/arm/boot/dts/mt6323.dtsi
> > +++ b/arch/arm/boot/dts/mt6323.dtsi
> > @@ -1,5 +1,5 @@
> >  /*
> > - * Copyright (c) 2017 MediaTek Inc.
> > + * Copyright (c) 2017-2018 MediaTek Inc.
> >   * Author: John Crispin <john@phrozen.org>
> >   *	   Sean Wang <sean.wang@mediatek.com>
> >   * This program is free software; you can redistribute it and/or modify
> > @@ -237,5 +237,29 @@
> >  				regulator-enable-ramp-delay = <216>;
> >  			};
> >  		};
> > +
> > +		leds {
> > +			compatible = "mediatek,mt6323-led";
> > +			#address-cells = <1>;
> > +			#size-cells = <0>;
> > +
> > +			led@0 {
> > +				reg = <0>;
> > +				label = "mt6323:isink:green";
> 
> Changing the label potentially breaks userspace. And the fact that it is 
> a green LED is very much board specific. So I think the old location was 
> correct. You could put the parent node here and leave these child nodes 
> in the board specific dts file.
> 

yes, I really made a mistake on breaking userspace with a label change.

I will keep the parent node here and then leave these child nodes into
board specific dts files. thanks for your idea!

> 
> > +				default-state = "off";
> > +			};
> > +
> > +			led@1 {
> > +				reg = <1>;
> > +				label = "mt6323:isink:red";
> > +				default-state = "off";
> > +			};
> > +
> > +			led@2 {
> > +				reg = <2>;
> > +				label = "mt6323:isink:blue";
> > +				default-state = "off";
> > +			};
> > +		};
> >  	};
> >  };
> > diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> > index 75e61c4..767b225 100644
> > --- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> > +++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> > @@ -483,34 +483,6 @@
> >  	status = "okay";
> >  };
> >  
> > -&pwrap {
> > -	mt6323 {
> > -		mt6323led: led {
> > -			compatible = "mediatek,mt6323-led";
> > -			#address-cells = <1>;
> > -			#size-cells = <0>;
> > -
> > -			led@0 {
> > -				reg = <0>;
> > -				label = "bpi-r2:isink:green";
> > -				default-state = "off";
> > -			};
> > -
> > -			led@1 {
> > -				reg = <1>;
> > -				label = "bpi-r2:isink:red";
> > -				default-state = "off";
> > -			};
> > -
> > -			led@2 {
> > -				reg = <2>;
> > -				label = "bpi-r2:isink:blue";
> > -				default-state = "off";
> > -			};
> > -		};
> > -	};
> > -};
> > -
> >  &spi0 {
> >  	pinctrl-names = "default";
> >  	pinctrl-0 = <&spi0_pins_a>;
> > -- 
> > 2.7.4
> > 

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v1 16/19] arm: dts: mt7623: fixup available memory size on bananapi-r2
  2018-03-02 15:42   ` Rob Herring
@ 2018-03-02 23:27     ` Sean Wang
  2018-03-05 14:16       ` Rob Herring
  0 siblings, 1 reply; 51+ messages in thread
From: Sean Wang @ 2018-03-02 23:27 UTC (permalink / raw)
  To: Rob Herring
  Cc: matthias.bgg, mark.rutland, devicetree, linux-mediatek,
	linux-arm-kernel, linux-kernel

On Fri, 2018-03-02 at 09:42 -0600, Rob Herring wrote:
> On Fri, Feb 23, 2018 at 06:16:36PM +0800, sean.wang@mediatek.com wrote:
> > From: Sean Wang <sean.wang@mediatek.com>
> > 
> > There is 2GB DDR3 available on bananapi-r2 board as [1] specified.
> > 
> > [1] http://www.banana-pi.org/r2.html
> > 
> > Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> > ---
> >  arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 5 +++++
> >  1 file changed, 5 insertions(+)
> > 
> > diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> > index 140ff78..3e8d02c 100644
> > --- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> > +++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> > @@ -38,6 +38,11 @@
> >  			default-state = "off";
> >  		};
> >  	};
> > +
> > +	memory {
> 
> Unit address?
> 

If I did it with adding unit address

-       memory {
+       memory@80000000 {
                device_type = "memory";
                reg = <0 0x80000000 0 0x80000000>;
        };


bad dtc blob is being generated and contains two memory nodes, one is
memory and the other is memory@80000000 whose blob disassembly detail is
as the following.

      memory {
                device_type = "memory";
                reg = <0x0 0x0 0x0 0x0>;
        };



      memory@80000000 {
                device_type = "memory";
                reg = <0x0 0x80000000 0x0 0x80000000>;
        };


and bad memory node with size 0 would cause the boot fails.


is it a dtc compiler problem ?

> > +		device_type = "memory";
> > +		reg = <0 0x80000000 0 0x80000000>;
> > +	};
> >  };
> >  
> >  &afe {
> > -- 
> > 2.7.4
> > 

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v1 18/19] arm: dts: mt7623: add MT7623A reference boards
  2018-03-02 15:45   ` Rob Herring
@ 2018-03-03  2:15     ` Sean Wang
  2018-03-05 14:10       ` Rob Herring
  0 siblings, 1 reply; 51+ messages in thread
From: Sean Wang @ 2018-03-03  2:15 UTC (permalink / raw)
  To: Rob Herring
  Cc: matthias.bgg, mark.rutland, devicetree, linux-mediatek,
	linux-arm-kernel, linux-kernel

On Fri, 2018-03-02 at 09:45 -0600, Rob Herring wrote:
> On Fri, Feb 23, 2018 at 06:16:38PM +0800, sean.wang@mediatek.com wrote:
> > From: Sean Wang <sean.wang@mediatek.com>
> > 
> > Add mt7623a-rfb.dtsi where most nodes can be inherited from
> > mt7623n-rfb.dtsi and keep these distinctions from MT7623A boards in
> > mt7623a-rfb.dtsi for most definition can be reused among MT7623A board
> > variants.
> > 
> > MT7623A has its specific definition of power domain and thus we need
> > to change related devices such as audio, ethernet, crypto, high-speed
> > DMA, NAND, and USB controller to the power domain they specifically
> > belong to. In addition, MT7530 exists as built-in module inside MT7623A
> > SoC and I2C2 and UART[0-1] get being removed and UART2 have distinct pin
> > usage. Those all differences can be totally seen in mt7623a-rfb.dtsi.
> > 
> > Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> > ---
> >  arch/arm/boot/dts/Makefile             |  2 +
> >  arch/arm/boot/dts/mt7623a-rfb-emmc.dts | 22 +++++++++
> >  arch/arm/boot/dts/mt7623a-rfb-nand.dts | 26 +++++++++++
> >  arch/arm/boot/dts/mt7623a-rfb.dtsi     | 84 ++++++++++++++++++++++++++++++++++
> >  arch/arm/boot/dts/mt7623n-rfb.dtsi     | 15 ++++++
> >  5 files changed, 149 insertions(+)
> >  create mode 100644 arch/arm/boot/dts/mt7623a-rfb-emmc.dts
> >  create mode 100644 arch/arm/boot/dts/mt7623a-rfb-nand.dts
> >  create mode 100644 arch/arm/boot/dts/mt7623a-rfb.dtsi
> > 
> > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> > index 5af6fce..818817c 100644
> > --- a/arch/arm/boot/dts/Makefile
> > +++ b/arch/arm/boot/dts/Makefile
> > @@ -1122,6 +1122,8 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
> >  	mt6580-evbp1.dtb \
> >  	mt6589-aquaris5.dtb \
> >  	mt6592-evb.dtb \
> > +	mt7623a-rfb-emmc.dtb \
> > +	mt7623a-rfb-nand.dtb \
> >  	mt7623n-rfb-emmc.dtb \
> >  	mt7623n-rfb-nand.dtb \
> >  	mt7623n-bananapi-bpi-r2.dtb \
> > diff --git a/arch/arm/boot/dts/mt7623a-rfb-emmc.dts b/arch/arm/boot/dts/mt7623a-rfb-emmc.dts
> > new file mode 100644
> > index 0000000..ef6398e
> > --- /dev/null
> > +++ b/arch/arm/boot/dts/mt7623a-rfb-emmc.dts
> > @@ -0,0 +1,22 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/*
> > + * Copyright (c) 2017-2018 MediaTek Inc.
> > + * Author: Sean Wang <sean.wang@mediatek.com>
> > + *
> > + */
> > +
> > +/dts-v1/;
> > +#include "mt7623a-rfb.dtsi"
> > +
> > +/ {
> > +	model = "MediaTek MT7623A with eMMC reference board";
> > +	compatible = "mediatek,mt7623a-rfb-emmc", "mediatek,mt7623";
> > +
> > +	chosen {
> > +		bootargs = "console=ttyS0,115200n8 earlyprintk";
> 
> Use stdout-path instead. earlyprintk option only works for a kernel 
> built with a debug uart at a fixed address, so drop it.
> 

thanks, I will try and have stdout-path instead. 

But for earlyprintk, our kernel can support and be built with a debug
uart at a fixed address and it is greatly useful to know what's going
on when a system hang happens on certain device's initialization prior
to uart initialization such as PCI device.

Thus, I consider to keep it there in special on such kinds of
development boards for debugging purpose.

> > +	};
> > +};
> > +
> > +&mmc0 {
> > +	status = "okay";
> > +};
> > diff --git a/arch/arm/boot/dts/mt7623a-rfb-nand.dts b/arch/arm/boot/dts/mt7623a-rfb-nand.dts
> > new file mode 100644
> > index 0000000..592d5d7
> > --- /dev/null
> > +++ b/arch/arm/boot/dts/mt7623a-rfb-nand.dts
> > @@ -0,0 +1,26 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/*
> > + * Copyright (c) 2017-2018 MediaTek Inc.
> > + * Author: Sean Wang <sean.wang@mediatek.com>
> > + *
> > + */
> > +
> > +/dts-v1/;
> > +#include "mt7623a-rfb.dtsi"
> > +
> > +/ {
> > +	model = "MediaTek MT7623A with NAND reference board";
> > +	compatible = "mediatek,mt7623a-rfb-nand", "mediatek,mt7623";
> > +
> > +	chosen {
> > +		bootargs = "console=ttyS0,115200n8 earlyprintk";
> 
> ditto.
> 
> > +	};
> > +};
> > +
> > +&bch {
> > +	status = "okay";
> > +};
> > +
> > +&nandc {
> > +	status = "okay";
> > +};
> > diff --git a/arch/arm/boot/dts/mt7623a-rfb.dtsi b/arch/arm/boot/dts/mt7623a-rfb.dtsi
> > new file mode 100644
> > index 0000000..3a15c46
> > --- /dev/null
> > +++ b/arch/arm/boot/dts/mt7623a-rfb.dtsi
> > @@ -0,0 +1,84 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/*
> > + * Copyright (c) 2017-2018 MediaTek Inc.
> > + * Author: Sean Wang <sean.wang@mediatek.com>
> > + *
> > + */
> > +
> > +/dts-v1/;
> > +#include <dt-bindings/power/mt7623a-power.h>
> > +#include "mt7623n-rfb.dtsi"
> > +
> > +/ {
> > +	memory {
> 
> Unit-address?

If unit-address is being included, it seem there is dtc problem two ,
memory nodes are generated, one with invalid size 0 would cause boot
fails as [1] I addressed.

[1]
http://lists.infradead.org/pipermail/linux-mediatek/2018-March/012249.html


> > +		device_type = "memory";
> > +		reg = <0 0x80000000 0 0x20000000>;
> > +	};
> > +};
> > +
> > +&afe {
> > +	power-domains = <&scpsys MT7623A_POWER_DOMAIN_IFR_MSC>;
> > +};
> > +
> > +&cir {
> > +	status = "disabled";
> > +};
> > +
> > +&crypto {
> > +	power-domains = <&scpsys MT7623A_POWER_DOMAIN_ETH>;
> > +};
> > +
> > +&eth {
> > +	power-domains = <&scpsys MT7623A_POWER_DOMAIN_ETH>;
> > +};
> > +
> > +&hsdma {
> > +	power-domains = <&scpsys MT7623A_POWER_DOMAIN_ETH>;
> > +};
> > +
> > +&i2c2 {
> > +	pinctrl-names = "default";
> > +	pinctrl-0 = <&i2c2_pins_b>;
> > +};
> > +
> > +&mt7530 {
> > +	mediatek,mcm;
> > +	resets = <&ethsys MT2701_ETHSYS_MCM_RST>;
> > +	reset-names = "mcm";
> > +};
> > +
> > +&nandc {
> > +	power-domains = <&scpsys MT7623A_POWER_DOMAIN_IFR_MSC>;
> > +};
> > +
> > +&pcie {
> > +	power-domains = <&scpsys MT7623A_POWER_DOMAIN_HIF>;
> > +};
> > +
> > +&scpsys {
> > +	compatible = "mediatek,mt7623a-scpsys",
> > +		     "syscon";
> > +	clocks = <&topckgen CLK_TOP_ETHIF_SEL>;
> > +	clock-names = "ethif";
> > +};
> > +
> > +&uart0 {
> > +	status = "disabled";
> > +};
> > +
> > +&uart1 {
> > +	status = "disabled";
> > +};
> > +
> > +&uart2 {
> > +	pinctrl-names = "default";
> > +	pinctrl-0 = <&uart2_pins_b>;
> > +};
> > +
> > +&usb1 {
> > +	power-domains = <&scpsys MT7623A_POWER_DOMAIN_HIF>;
> > +};
> > +
> > +&usb2 {
> > +	power-domains = <&scpsys MT7623A_POWER_DOMAIN_HIF>;
> > +};
> > diff --git a/arch/arm/boot/dts/mt7623n-rfb.dtsi b/arch/arm/boot/dts/mt7623n-rfb.dtsi
> > index 0237476..07ed15d 100644
> > --- a/arch/arm/boot/dts/mt7623n-rfb.dtsi
> > +++ b/arch/arm/boot/dts/mt7623n-rfb.dtsi
> > @@ -380,6 +380,14 @@
> >  		};
> >  	};
> >  
> > +	i2c2_pins_b: i2c2-alt {
> > +		pin-i2c2 {
> > +			pinmux = <MT7623_PIN_122_GPIO122_FUNC_SDA2>,
> > +				 <MT7623_PIN_123_HTPLG_FUNC_SCL2>;
> > +			bias-disable;
> > +		};
> > +	};
> > +
> >  	i2s0_pins_a: i2s0-default {
> >  		pin-i2s0 {
> >  			pinmux = <MT7623_PIN_49_I2S0_DATA_FUNC_I2S0_DATA>,
> > @@ -629,6 +637,13 @@
> >  				 <MT7623_PIN_15_GPIO15_FUNC_UTXD2>;
> >  		};
> >  	};
> > +
> > +	uart2_pins_b: uart2-alt {
> > +		pins-dat {
> > +			pinmux = <MT7623_PIN_200_URXD2_FUNC_URXD2>,
> > +				 <MT7623_PIN_201_UTXD2_FUNC_UTXD2>;
> > +		};
> > +	};
> >  };
> >  
> >  &pwm {
> > -- 
> > 2.7.4
> > 

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v1 18/19] arm: dts: mt7623: add MT7623A reference boards
  2018-03-03  2:15     ` Sean Wang
@ 2018-03-05 14:10       ` Rob Herring
  2018-03-05 15:10         ` Sean Wang
  0 siblings, 1 reply; 51+ messages in thread
From: Rob Herring @ 2018-03-05 14:10 UTC (permalink / raw)
  To: Sean Wang
  Cc: Matthias Brugger, Mark Rutland, devicetree, linux-mediatek,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	linux-kernel

On Fri, Mar 2, 2018 at 8:15 PM, Sean Wang <sean.wang@mediatek.com> wrote:
> On Fri, 2018-03-02 at 09:45 -0600, Rob Herring wrote:
>> On Fri, Feb 23, 2018 at 06:16:38PM +0800, sean.wang@mediatek.com wrote:
>> > From: Sean Wang <sean.wang@mediatek.com>
>> >
>> > Add mt7623a-rfb.dtsi where most nodes can be inherited from
>> > mt7623n-rfb.dtsi and keep these distinctions from MT7623A boards in
>> > mt7623a-rfb.dtsi for most definition can be reused among MT7623A board
>> > variants.
>> >
>> > MT7623A has its specific definition of power domain and thus we need
>> > to change related devices such as audio, ethernet, crypto, high-speed
>> > DMA, NAND, and USB controller to the power domain they specifically
>> > belong to. In addition, MT7530 exists as built-in module inside MT7623A
>> > SoC and I2C2 and UART[0-1] get being removed and UART2 have distinct pin
>> > usage. Those all differences can be totally seen in mt7623a-rfb.dtsi.
>> >
>> > Signed-off-by: Sean Wang <sean.wang@mediatek.com>
>> > ---
>> >  arch/arm/boot/dts/Makefile             |  2 +
>> >  arch/arm/boot/dts/mt7623a-rfb-emmc.dts | 22 +++++++++
>> >  arch/arm/boot/dts/mt7623a-rfb-nand.dts | 26 +++++++++++
>> >  arch/arm/boot/dts/mt7623a-rfb.dtsi     | 84 ++++++++++++++++++++++++++++++++++
>> >  arch/arm/boot/dts/mt7623n-rfb.dtsi     | 15 ++++++
>> >  5 files changed, 149 insertions(+)
>> >  create mode 100644 arch/arm/boot/dts/mt7623a-rfb-emmc.dts
>> >  create mode 100644 arch/arm/boot/dts/mt7623a-rfb-nand.dts
>> >  create mode 100644 arch/arm/boot/dts/mt7623a-rfb.dtsi
>> >
>> > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
>> > index 5af6fce..818817c 100644
>> > --- a/arch/arm/boot/dts/Makefile
>> > +++ b/arch/arm/boot/dts/Makefile
>> > @@ -1122,6 +1122,8 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
>> >     mt6580-evbp1.dtb \
>> >     mt6589-aquaris5.dtb \
>> >     mt6592-evb.dtb \
>> > +   mt7623a-rfb-emmc.dtb \
>> > +   mt7623a-rfb-nand.dtb \
>> >     mt7623n-rfb-emmc.dtb \
>> >     mt7623n-rfb-nand.dtb \
>> >     mt7623n-bananapi-bpi-r2.dtb \
>> > diff --git a/arch/arm/boot/dts/mt7623a-rfb-emmc.dts b/arch/arm/boot/dts/mt7623a-rfb-emmc.dts
>> > new file mode 100644
>> > index 0000000..ef6398e
>> > --- /dev/null
>> > +++ b/arch/arm/boot/dts/mt7623a-rfb-emmc.dts
>> > @@ -0,0 +1,22 @@
>> > +// SPDX-License-Identifier: GPL-2.0
>> > +/*
>> > + * Copyright (c) 2017-2018 MediaTek Inc.
>> > + * Author: Sean Wang <sean.wang@mediatek.com>
>> > + *
>> > + */
>> > +
>> > +/dts-v1/;
>> > +#include "mt7623a-rfb.dtsi"
>> > +
>> > +/ {
>> > +   model = "MediaTek MT7623A with eMMC reference board";
>> > +   compatible = "mediatek,mt7623a-rfb-emmc", "mediatek,mt7623";
>> > +
>> > +   chosen {
>> > +           bootargs = "console=ttyS0,115200n8 earlyprintk";
>>
>> Use stdout-path instead. earlyprintk option only works for a kernel
>> built with a debug uart at a fixed address, so drop it.
>>
>
> thanks, I will try and have stdout-path instead.
>
> But for earlyprintk, our kernel can support and be built with a debug
> uart at a fixed address and it is greatly useful to know what's going
> on when a system hang happens on certain device's initialization prior
> to uart initialization such as PCI device.

These days, you only need earlyprintk for *really* early console like
in the assembly boot entry code and before the DT is unflattened. For
anything else, use earlycon instead because earlycon is a runtime
option.

> Thus, I consider to keep it there in special on such kinds of
> development boards for debugging purpose.

Then add this option when you are doing debug. But for what's
"shipped" in mainline, you should not have this enabled.

Rob

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v1 16/19] arm: dts: mt7623: fixup available memory size on bananapi-r2
  2018-03-02 23:27     ` Sean Wang
@ 2018-03-05 14:16       ` Rob Herring
  2018-03-05 15:46         ` Sean Wang
  0 siblings, 1 reply; 51+ messages in thread
From: Rob Herring @ 2018-03-05 14:16 UTC (permalink / raw)
  To: Sean Wang
  Cc: Matthias Brugger, Mark Rutland, devicetree, linux-mediatek,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	linux-kernel

On Fri, Mar 2, 2018 at 5:27 PM, Sean Wang <sean.wang@mediatek.com> wrote:
> On Fri, 2018-03-02 at 09:42 -0600, Rob Herring wrote:
>> On Fri, Feb 23, 2018 at 06:16:36PM +0800, sean.wang@mediatek.com wrote:
>> > From: Sean Wang <sean.wang@mediatek.com>
>> >
>> > There is 2GB DDR3 available on bananapi-r2 board as [1] specified.
>> >
>> > [1] http://www.banana-pi.org/r2.html
>> >
>> > Signed-off-by: Sean Wang <sean.wang@mediatek.com>
>> > ---
>> >  arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 5 +++++
>> >  1 file changed, 5 insertions(+)
>> >
>> > diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
>> > index 140ff78..3e8d02c 100644
>> > --- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
>> > +++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
>> > @@ -38,6 +38,11 @@
>> >                     default-state = "off";
>> >             };
>> >     };
>> > +
>> > +   memory {
>>
>> Unit address?
>>
>
> If I did it with adding unit address
>
> -       memory {
> +       memory@80000000 {
>                 device_type = "memory";
>                 reg = <0 0x80000000 0 0x80000000>;
>         };
>
>
> bad dtc blob is being generated and contains two memory nodes, one is
> memory and the other is memory@80000000 whose blob disassembly detail is
> as the following.
>
>       memory {
>                 device_type = "memory";
>                 reg = <0x0 0x0 0x0 0x0>;
>         };
>
>
>
>       memory@80000000 {
>                 device_type = "memory";
>                 reg = <0x0 0x80000000 0x0 0x80000000>;
>         };
>
>
> and bad memory node with size 0 would cause the boot fails.
>
>
> is it a dtc compiler problem ?

No, you are declaring "memory" node somewhere else. Perhaps using
skeleton.dtsi which we are trying to remove or you have some default.

Using just 'memory' is fine if the base address is variable and
determined at boot time or you have a bootloader that expects just
'memory'. Otherwise, this should be fixed, but you can do that after
this patch if you want.

Rob

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v1 18/19] arm: dts: mt7623: add MT7623A reference boards
  2018-03-05 14:10       ` Rob Herring
@ 2018-03-05 15:10         ` Sean Wang
  0 siblings, 0 replies; 51+ messages in thread
From: Sean Wang @ 2018-03-05 15:10 UTC (permalink / raw)
  To: Rob Herring
  Cc: Mark Rutland, devicetree, linux-kernel, linux-mediatek,
	Matthias Brugger,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

On Mon, 2018-03-05 at 08:10 -0600, Rob Herring wrote:
> On Fri, Mar 2, 2018 at 8:15 PM, Sean Wang <sean.wang@mediatek.com> wrote:
> > On Fri, 2018-03-02 at 09:45 -0600, Rob Herring wrote:
> >> On Fri, Feb 23, 2018 at 06:16:38PM +0800, sean.wang@mediatek.com wrote:
> >> > From: Sean Wang <sean.wang@mediatek.com>
> >> >
> >> > Add mt7623a-rfb.dtsi where most nodes can be inherited from
> >> > mt7623n-rfb.dtsi and keep these distinctions from MT7623A boards in
> >> > mt7623a-rfb.dtsi for most definition can be reused among MT7623A board
> >> > variants.
> >> >
> >> > MT7623A has its specific definition of power domain and thus we need
> >> > to change related devices such as audio, ethernet, crypto, high-speed
> >> > DMA, NAND, and USB controller to the power domain they specifically
> >> > belong to. In addition, MT7530 exists as built-in module inside MT7623A
> >> > SoC and I2C2 and UART[0-1] get being removed and UART2 have distinct pin
> >> > usage. Those all differences can be totally seen in mt7623a-rfb.dtsi.
> >> >
> >> > Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> >> > ---
> >> >  arch/arm/boot/dts/Makefile             |  2 +
> >> >  arch/arm/boot/dts/mt7623a-rfb-emmc.dts | 22 +++++++++
> >> >  arch/arm/boot/dts/mt7623a-rfb-nand.dts | 26 +++++++++++
> >> >  arch/arm/boot/dts/mt7623a-rfb.dtsi     | 84 ++++++++++++++++++++++++++++++++++
> >> >  arch/arm/boot/dts/mt7623n-rfb.dtsi     | 15 ++++++
> >> >  5 files changed, 149 insertions(+)
> >> >  create mode 100644 arch/arm/boot/dts/mt7623a-rfb-emmc.dts
> >> >  create mode 100644 arch/arm/boot/dts/mt7623a-rfb-nand.dts
> >> >  create mode 100644 arch/arm/boot/dts/mt7623a-rfb.dtsi
> >> >
> >> > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> >> > index 5af6fce..818817c 100644
> >> > --- a/arch/arm/boot/dts/Makefile
> >> > +++ b/arch/arm/boot/dts/Makefile
> >> > @@ -1122,6 +1122,8 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
> >> >     mt6580-evbp1.dtb \
> >> >     mt6589-aquaris5.dtb \
> >> >     mt6592-evb.dtb \
> >> > +   mt7623a-rfb-emmc.dtb \
> >> > +   mt7623a-rfb-nand.dtb \
> >> >     mt7623n-rfb-emmc.dtb \
> >> >     mt7623n-rfb-nand.dtb \
> >> >     mt7623n-bananapi-bpi-r2.dtb \
> >> > diff --git a/arch/arm/boot/dts/mt7623a-rfb-emmc.dts b/arch/arm/boot/dts/mt7623a-rfb-emmc.dts
> >> > new file mode 100644
> >> > index 0000000..ef6398e
> >> > --- /dev/null
> >> > +++ b/arch/arm/boot/dts/mt7623a-rfb-emmc.dts
> >> > @@ -0,0 +1,22 @@
> >> > +// SPDX-License-Identifier: GPL-2.0
> >> > +/*
> >> > + * Copyright (c) 2017-2018 MediaTek Inc.
> >> > + * Author: Sean Wang <sean.wang@mediatek.com>
> >> > + *
> >> > + */
> >> > +
> >> > +/dts-v1/;
> >> > +#include "mt7623a-rfb.dtsi"
> >> > +
> >> > +/ {
> >> > +   model = "MediaTek MT7623A with eMMC reference board";
> >> > +   compatible = "mediatek,mt7623a-rfb-emmc", "mediatek,mt7623";
> >> > +
> >> > +   chosen {
> >> > +           bootargs = "console=ttyS0,115200n8 earlyprintk";
> >>
> >> Use stdout-path instead. earlyprintk option only works for a kernel
> >> built with a debug uart at a fixed address, so drop it.
> >>
> >
> > thanks, I will try and have stdout-path instead.
> >
> > But for earlyprintk, our kernel can support and be built with a debug
> > uart at a fixed address and it is greatly useful to know what's going
> > on when a system hang happens on certain device's initialization prior
> > to uart initialization such as PCI device.
> 
> These days, you only need earlyprintk for *really* early console like
> in the assembly boot entry code and before the DT is unflattened. For
> anything else, use earlycon instead because earlycon is a runtime
> option.
> 
> > Thus, I consider to keep it there in special on such kinds of
> > development boards for debugging purpose.
> 
> Then add this option when you are doing debug. But for what's
> "shipped" in mainline, you should not have this enabled.
> 
> Rob

Okay, for these reasons, I will remove earlyprintk usage here
and try to use earlycon instead in the future.

Really thanks for your detailed explanation!

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

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v1 16/19] arm: dts: mt7623: fixup available memory size on bananapi-r2
  2018-03-05 14:16       ` Rob Herring
@ 2018-03-05 15:46         ` Sean Wang
  0 siblings, 0 replies; 51+ messages in thread
From: Sean Wang @ 2018-03-05 15:46 UTC (permalink / raw)
  To: Rob Herring
  Cc: Matthias Brugger, Mark Rutland, devicetree, linux-mediatek,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	linux-kernel

On Mon, 2018-03-05 at 08:16 -0600, Rob Herring wrote:
> On Fri, Mar 2, 2018 at 5:27 PM, Sean Wang <sean.wang@mediatek.com> wrote:
> > On Fri, 2018-03-02 at 09:42 -0600, Rob Herring wrote:
> >> On Fri, Feb 23, 2018 at 06:16:36PM +0800, sean.wang@mediatek.com wrote:
> >> > From: Sean Wang <sean.wang@mediatek.com>
> >> >
> >> > There is 2GB DDR3 available on bananapi-r2 board as [1] specified.
> >> >
> >> > [1] http://www.banana-pi.org/r2.html
> >> >
> >> > Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> >> > ---
> >> >  arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 5 +++++
> >> >  1 file changed, 5 insertions(+)
> >> >
> >> > diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> >> > index 140ff78..3e8d02c 100644
> >> > --- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> >> > +++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> >> > @@ -38,6 +38,11 @@
> >> >                     default-state = "off";
> >> >             };
> >> >     };
> >> > +
> >> > +   memory {
> >>
> >> Unit address?
> >>
> >
> > If I did it with adding unit address
> >
> > -       memory {
> > +       memory@80000000 {
> >                 device_type = "memory";
> >                 reg = <0 0x80000000 0 0x80000000>;
> >         };
> >
> >
> > bad dtc blob is being generated and contains two memory nodes, one is
> > memory and the other is memory@80000000 whose blob disassembly detail is
> > as the following.
> >
> >       memory {
> >                 device_type = "memory";
> >                 reg = <0x0 0x0 0x0 0x0>;
> >         };
> >
> >
> >
> >       memory@80000000 {
> >                 device_type = "memory";
> >                 reg = <0x0 0x80000000 0x0 0x80000000>;
> >         };
> >
> >
> > and bad memory node with size 0 would cause the boot fails.
> >
> >
> > is it a dtc compiler problem ?
> 
> No, you are declaring "memory" node somewhere else. Perhaps using
> skeleton.dtsi which we are trying to remove or you have some default.
> 

Yes, your guess is right. the DTS explicitly includes skeleton64.dtsi so
two memory node is being generated.

> Using just 'memory' is fine if the base address is variable and
> determined at boot time or you have a bootloader that expects just
> 'memory'. Otherwise, this should be fixed, but you can do that after
> this patch if you want.
> 

The address where memory is located at is fixed so I should insert a
patch removing skeleton64.dtsi before adding a unit address to each
memory node.

Furthermore, the original DTS including skeleton64.dtsi seems to be a
little improper as CPU uses 32-bit addressing way to access all hardware
devices on MT7623 SoC. Thus, it seems to be better even necessary to
explicitly set both #address-cells and #size-cells to 1 at the root node
and change reg property for following the child nodes when
skeleton64.dtsi is being removed.

> Rob

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v1 05/19] arm: dts: mt7623: add BTIF, HSDMA and SPI-NOR device nodes
  2018-02-23 10:16 ` [PATCH v1 05/19] arm: dts: mt7623: add BTIF, HSDMA and SPI-NOR device nodes sean.wang
@ 2018-03-12  9:40   ` Matthias Brugger
  2018-03-12  9:53     ` Sean Wang
  0 siblings, 1 reply; 51+ messages in thread
From: Matthias Brugger @ 2018-03-12  9:40 UTC (permalink / raw)
  To: sean.wang, robh+dt, mark.rutland, devicetree, linux-mediatek
  Cc: linux-arm-kernel, linux-kernel



On 02/23/2018 11:16 AM, sean.wang@mediatek.com wrote:
> From: Sean Wang <sean.wang@mediatek.com>
> 
> add BTIF, HSDMA and SPI-NOR device nodes and enable it on relevant boards

AFAIK hsdma controller is not upstream yet.
Please resubmit when at least the binding got merged.

Thanks,
Matthias

> 
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> ---
>  arch/arm/boot/dts/mt7623.dtsi                 | 36 ++++++++++++++++++++++++++-
>  arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts |  6 ++++-
>  2 files changed, 40 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/mt7623.dtsi b/arch/arm/boot/dts/mt7623.dtsi
> index 91317a1..da56c54 100644
> --- a/arch/arm/boot/dts/mt7623.dtsi
> +++ b/arch/arm/boot/dts/mt7623.dtsi
> @@ -1,5 +1,5 @@
>  /*
> - * Copyright (c) 2017 MediaTek Inc.
> + * Copyright (c) 2017-2018 MediaTek Inc.
>   * Author: John Crispin <john@phrozen.org>
>   *	   Sean Wang <sean.wang@mediatek.com>
>   *
> @@ -483,6 +483,18 @@
>  		nvmem-cell-names = "calibration-data";
>  	};
>  
> +	btif: serial@1100c000 {
> +		compatible = "mediatek,mt7623-btif",
> +			     "mediatek,mtk-btif";
> +		reg = <0 0x1100c000 0 0x1000>;
> +		interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_LOW>;
> +		clocks = <&pericfg CLK_PERI_BTIF>;
> +		clock-names = "main";
> +		reg-shift = <2>;
> +		reg-io-width = <4>;
> +		status = "disabled";
> +	};
> +
>  	nandc: nfi@1100d000 {
>  		compatible = "mediatek,mt7623-nfc",
>  			     "mediatek,mt2701-nfc";
> @@ -508,6 +520,18 @@
>  		status = "disabled";
>  	};
>  
> +	nor_flash: spi@11014000 {
> +		compatible = "mediatek,mt7623-nor",
> +			     "mediatek,mt8173-nor";
> +		reg = <0 0x11014000 0 0x1000>;
> +		clocks = <&pericfg CLK_PERI_FLASH>,
> +			 <&topckgen CLK_TOP_FLASH_SEL>;
> +		clock-names = "spi", "sf";
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +		status = "disabled";
> +	};
> +
>  	spi1: spi@11016000 {
>  		compatible = "mediatek,mt7623-spi",
>  			     "mediatek,mt2701-spi";
> @@ -861,6 +885,16 @@
>  		#reset-cells = <1>;
>  	};
>  
> +	hsdma: dma-controller@1b007000 {
> +		compatible = "mediatek,mt7623-hsdma";
> +		reg = <0 0x1b007000 0 0x1000>;
> +		interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_LOW>;
> +		clocks = <&ethsys CLK_ETHSYS_HSDMA>;
> +		clock-names = "hsdma";
> +		power-domains = <&scpsys MT2701_POWER_DOMAIN_ETH>;
> +		#dma-cells = <1>;
> +	};
> +
>  	eth: ethernet@1b100000 {
>  		compatible = "mediatek,mt7623-eth",
>  			     "mediatek,mt2701-eth",
> diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> index 3efecc5..ec11e14 100644
> --- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> +++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> @@ -1,5 +1,5 @@
>  /*
> - * Copyright 2017 Sean Wang <sean.wang@mediatek.com>
> + * Copyright 2017-2018 Sean Wang <sean.wang@mediatek.com>
>   *
>   * SPDX-License-Identifier: (GPL-2.0+ OR MIT)
>   */
> @@ -86,6 +86,10 @@
>  	};
>  };
>  
> +&btif {
> +	status = "okay";
> +};
> +
>  &cir {
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&cir_pins_a>;
> 

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v1 05/19] arm: dts: mt7623: add BTIF, HSDMA and SPI-NOR device nodes
  2018-03-12  9:40   ` Matthias Brugger
@ 2018-03-12  9:53     ` Sean Wang
  0 siblings, 0 replies; 51+ messages in thread
From: Sean Wang @ 2018-03-12  9:53 UTC (permalink / raw)
  To: Matthias Brugger
  Cc: robh+dt, mark.rutland, devicetree, linux-mediatek,
	linux-arm-kernel, linux-kernel

On Mon, 2018-03-12 at 10:40 +0100, Matthias Brugger wrote:
> 
> On 02/23/2018 11:16 AM, sean.wang@mediatek.com wrote:
> > From: Sean Wang <sean.wang@mediatek.com>
> > 
> > add BTIF, HSDMA and SPI-NOR device nodes and enable it on relevant boards
> 
> AFAIK hsdma controller is not upstream yet.
> Please resubmit when at least the binding got merged.
> 

Sure, I will drop the node for HSDMA in the next version.

> Thanks,
> Matthias
> 
> > 
> > Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> > ---
> >  arch/arm/boot/dts/mt7623.dtsi                 | 36 ++++++++++++++++++++++++++-
> >  arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts |  6 ++++-
> >  2 files changed, 40 insertions(+), 2 deletions(-)
> > 
> > diff --git a/arch/arm/boot/dts/mt7623.dtsi b/arch/arm/boot/dts/mt7623.dtsi
> > index 91317a1..da56c54 100644
> > --- a/arch/arm/boot/dts/mt7623.dtsi
> > +++ b/arch/arm/boot/dts/mt7623.dtsi
> > @@ -1,5 +1,5 @@
> >  /*
> > - * Copyright (c) 2017 MediaTek Inc.
> > + * Copyright (c) 2017-2018 MediaTek Inc.
> >   * Author: John Crispin <john@phrozen.org>
> >   *	   Sean Wang <sean.wang@mediatek.com>
> >   *
> > @@ -483,6 +483,18 @@
> >  		nvmem-cell-names = "calibration-data";
> >  	};
> >  
> > +	btif: serial@1100c000 {
> > +		compatible = "mediatek,mt7623-btif",
> > +			     "mediatek,mtk-btif";
> > +		reg = <0 0x1100c000 0 0x1000>;
> > +		interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_LOW>;
> > +		clocks = <&pericfg CLK_PERI_BTIF>;
> > +		clock-names = "main";
> > +		reg-shift = <2>;
> > +		reg-io-width = <4>;
> > +		status = "disabled";
> > +	};
> > +
> >  	nandc: nfi@1100d000 {
> >  		compatible = "mediatek,mt7623-nfc",
> >  			     "mediatek,mt2701-nfc";
> > @@ -508,6 +520,18 @@
> >  		status = "disabled";
> >  	};
> >  
> > +	nor_flash: spi@11014000 {
> > +		compatible = "mediatek,mt7623-nor",
> > +			     "mediatek,mt8173-nor";
> > +		reg = <0 0x11014000 0 0x1000>;
> > +		clocks = <&pericfg CLK_PERI_FLASH>,
> > +			 <&topckgen CLK_TOP_FLASH_SEL>;
> > +		clock-names = "spi", "sf";
> > +		#address-cells = <1>;
> > +		#size-cells = <0>;
> > +		status = "disabled";
> > +	};
> > +
> >  	spi1: spi@11016000 {
> >  		compatible = "mediatek,mt7623-spi",
> >  			     "mediatek,mt2701-spi";
> > @@ -861,6 +885,16 @@
> >  		#reset-cells = <1>;
> >  	};
> >  
> > +	hsdma: dma-controller@1b007000 {
> > +		compatible = "mediatek,mt7623-hsdma";
> > +		reg = <0 0x1b007000 0 0x1000>;
> > +		interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_LOW>;
> > +		clocks = <&ethsys CLK_ETHSYS_HSDMA>;
> > +		clock-names = "hsdma";
> > +		power-domains = <&scpsys MT2701_POWER_DOMAIN_ETH>;
> > +		#dma-cells = <1>;
> > +	};
> > +
> >  	eth: ethernet@1b100000 {
> >  		compatible = "mediatek,mt7623-eth",
> >  			     "mediatek,mt2701-eth",
> > diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> > index 3efecc5..ec11e14 100644
> > --- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> > +++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> > @@ -1,5 +1,5 @@
> >  /*
> > - * Copyright 2017 Sean Wang <sean.wang@mediatek.com>
> > + * Copyright 2017-2018 Sean Wang <sean.wang@mediatek.com>
> >   *
> >   * SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> >   */
> > @@ -86,6 +86,10 @@
> >  	};
> >  };
> >  
> > +&btif {
> > +	status = "okay";
> > +};
> > +
> >  &cir {
> >  	pinctrl-names = "default";
> >  	pinctrl-0 = <&cir_pins_a>;
> > 

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v1 04/19] dt-bindings: arm: mediatek: add support for more mt7623 reference boards
  2018-03-02 16:00   ` Rob Herring
@ 2018-03-12 11:03     ` Matthias Brugger
  0 siblings, 0 replies; 51+ messages in thread
From: Matthias Brugger @ 2018-03-12 11:03 UTC (permalink / raw)
  To: Rob Herring, sean.wang
  Cc: mark.rutland, devicetree, linux-mediatek, linux-arm-kernel, linux-kernel



On 03/02/2018 05:00 PM, Rob Herring wrote:
> On Fri, Feb 23, 2018 at 06:16:24PM +0800, sean.wang@mediatek.com wrote:
>> From: Sean Wang <sean.wang@mediatek.com>
>>
>> Update binding document for more mt7623[A,N] reference boards being
>> supported.
>>
>> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
>> Cc: Rob Herring <robh+dt@kernel.org>
>> Cc: Mark Rutland <mark.rutland@arm.com>
>> Cc: devicetree@vger.kernel.org
>> ---
>>  Documentation/devicetree/bindings/arm/mediatek.txt | 9 +++++++++
>>  1 file changed, 9 insertions(+)
> 
> Reviewed-by: Rob Herring <robh@kernel.org>
> 

Pushed to v4.16-next/dts32

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v1 06/19] arm: dts: mt7623: fix USB initialization fails on bananapi-r2
  2018-02-23 10:16 ` [PATCH v1 06/19] arm: dts: mt7623: fix USB initialization fails on bananapi-r2 sean.wang
@ 2018-03-12 11:03   ` Matthias Brugger
  0 siblings, 0 replies; 51+ messages in thread
From: Matthias Brugger @ 2018-03-12 11:03 UTC (permalink / raw)
  To: sean.wang, robh+dt, mark.rutland, devicetree, linux-mediatek
  Cc: linux-arm-kernel, linux-kernel, stable



On 02/23/2018 11:16 AM, sean.wang@mediatek.com wrote:
> From: Sean Wang <sean.wang@mediatek.com>
> 
> Fix that USB initialization fails as below runtime log is present during
> booting on bananapi-r2 board by adding missing regulators the USB device
> requires. Current regulators USB device uses are being updated with the
> correct ones to reflect real configurations which are all from fixed
> regulators rather than MT6323 one's output.
> 
> [    6.473958] xhci-mtk 1a1c0000.usb: fail to get vbus
> [    6.479313] xhci-mtk 1a240000.usb: fail to get vbus
> 
> Cc: stable@vger.kernel.org
> Fixes: f4ff257cd160 ("arm: dts: mt7623: add support for Bananapi R2 (BPI-R2) board")
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> ---
>  arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 24 ++++++++++++++++++++++--
>  1 file changed, 22 insertions(+), 2 deletions(-)
> 

Pushed to v4.16-next/dts32

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v1 12/19] arm: dts: mt7623: fix all Warnings (unit_address_vs_reg)
  2018-02-23 10:16 ` [PATCH v1 12/19] arm: dts: mt7623: fix all Warnings (unit_address_vs_reg) sean.wang
@ 2018-03-18 21:54   ` Matthias Brugger
  0 siblings, 0 replies; 51+ messages in thread
From: Matthias Brugger @ 2018-03-18 21:54 UTC (permalink / raw)
  To: sean.wang, robh+dt, mark.rutland, devicetree, linux-mediatek
  Cc: linux-arm-kernel, linux-kernel



On 02/23/2018 11:16 AM, sean.wang@mediatek.com wrote:
> From: Sean Wang <sean.wang@mediatek.com>
> 
> Fix below a lot of warnings that dtc complains so much
> 
> Warning (unit_address_vs_reg): Node /oscillator@1 has a unit name, but no reg property
> Warning (unit_address_vs_reg): Node /oscillator@0 has a unit name, but no reg property
> Warning (unit_address_vs_reg): Node /pinctrl@10005000/cir@0 has a unit name, but no reg property
> Warning (unit_address_vs_reg): Node /pinctrl@10005000/i2c@0 has a unit name, but no reg property
> Warning (unit_address_vs_reg): Node /pinctrl@10005000/i2c@1 has a unit name, but no reg property
> Warning (unit_address_vs_reg): Node /pinctrl@10005000/i2s@0 has a unit name, but no reg property
> Warning (unit_address_vs_reg): Node /pinctrl@10005000/i2s@1 has a unit name, but no reg property
> Warning (unit_address_vs_reg): Node /pinctrl@10005000/keys@0 has a unit name, but no reg property
> Warning (unit_address_vs_reg): Node /pinctrl@10005000/leds@0 has a unit name, but no reg property
> Warning (unit_address_vs_reg): Node /pinctrl@10005000/pwm@0 has a unit name, but no reg property
> Warning (unit_address_vs_reg): Node /pinctrl@10005000/spi@0 has a unit name, but no reg property
> Warning (unit_address_vs_reg): Node /pinctrl@10005000/uart@0 has a unit name, but no reg property
> Warning (unit_address_vs_reg): Node /pinctrl@10005000/uart@1 has a unit name, but no reg property
> Warning (unit_address_vs_reg): Node /pinctrl@10005000/uart@2 has a unit name, but no reg property
> Warning (unit_address_vs_reg): Node /ethernet@1b100000/mdio-bus/switch@0/ports has a reg or ranges property, but no unit name
> 
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: devicetree@vger.kernel.org
> ---
>  arch/arm/boot/dts/mt7623.dtsi                 |  4 ++--
>  arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 29 +++++++++++++--------------
>  arch/arm/boot/dts/mt7623n-rfb.dtsi            |  2 +-
>  3 files changed, 17 insertions(+), 18 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/mt7623.dtsi b/arch/arm/boot/dts/mt7623.dtsi
> index 4b68448..bf9db44 100644
> --- a/arch/arm/boot/dts/mt7623.dtsi
> +++ b/arch/arm/boot/dts/mt7623.dtsi
> @@ -130,14 +130,14 @@
>  		#clock-cells = <0>;
>  	};
>  
> -	rtc32k: oscillator@1 {
> +	rtc32k: oscillator-1 {
>  		compatible = "fixed-clock";
>  		#clock-cells = <0>;
>  		clock-frequency = <32000>;
>  		clock-output-names = "rtc32k";
>  	};
>  
> -	clk26m: oscillator@0 {
> +	clk26m: oscillator-0 {
>  		compatible = "fixed-clock";
>  		#clock-cells = <0>;
>  		clock-frequency = <26000000>;
> diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> index a6295ef..75e61c4 100644
> --- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> +++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> @@ -158,7 +158,6 @@
>  			ports {
>  				#address-cells = <1>;
>  				#size-cells = <0>;
> -				reg = <0>;
>  
>  				port@0 {
>  					reg = <0>;
> @@ -262,14 +261,14 @@
>  };
>  
>  &pio {
> -	cir_pins_a:cir@0 {
> +	cir_pins_a:cir-default {
>  		pins-cir {
>  			pinmux = <MT7623_PIN_46_IR_FUNC_IR>;
>  			bias-disable;
>  		};
>  	};
>  
> -	i2c0_pins_a: i2c@0 {
> +	i2c0_pins_a: i2c0-default {
>  		pins-i2c0 {
>  			pinmux = <MT7623_PIN_75_SDA0_FUNC_SDA0>,
>  				 <MT7623_PIN_76_SCL0_FUNC_SCL0>;
> @@ -277,7 +276,7 @@
>  		};
>  	};
>  
> -	i2c1_pins_a: i2c@1 {
> +	i2c1_pins_a: i2c1-default {
>  		pin-i2c1 {
>  			pinmux = <MT7623_PIN_57_SDA1_FUNC_SDA1>,
>  				 <MT7623_PIN_58_SCL1_FUNC_SCL1>;
> @@ -285,7 +284,7 @@
>  		};
>  	};
>  
> -	i2s0_pins_a: i2s@0 {
> +	i2s0_pins_a: i2s0-default {
>  		pin-i2s0 {
>  			pinmux = <MT7623_PIN_49_I2S0_DATA_FUNC_I2S0_DATA>,
>  				 <MT7623_PIN_72_I2S0_DATA_IN_FUNC_I2S0_DATA_IN>,
> @@ -297,7 +296,7 @@
>  		};
>  	};
>  
> -	i2s1_pins_a: i2s@1 {
> +	i2s1_pins_b: i2s1-default {

Why does this change from i2s1_pins_a to i2s1_pins_b?

>  		pin-i2s1 {
>  			pinmux = <MT7623_PIN_33_I2S1_DATA_FUNC_I2S1_DATA>,
>  				 <MT7623_PIN_34_I2S1_DATA_IN_FUNC_I2S1_DATA_IN>,
> @@ -309,7 +308,7 @@
>  		};
>  	};
>  
> -	key_pins_a: keys@0 {
> +	key_pins_a: keys-alt {
>  		pins-keys {
>  			pinmux = <MT7623_PIN_256_GPIO256_FUNC_GPIO256>,
>  				 <MT7623_PIN_257_GPIO257_FUNC_GPIO257> ;
> @@ -317,7 +316,7 @@
>  		};
>  	};
>  
> -	led_pins_a: leds@0 {
> +	led_pins_a: leds-alt {
>  		pins-leds {
>  			pinmux = <MT7623_PIN_239_EXT_SDIO0_FUNC_GPIO239>,
>  				 <MT7623_PIN_240_EXT_XCS_FUNC_GPIO240>,
> @@ -428,15 +427,15 @@
>  		};
>  	};
>  
> -	pcie_default: pcie_pin_default {
> -		pins_cmd_dat {
> +	pcie_default: pcie-pin-default {
> +		pins-cmd-dat {

No pcie node present in upstream. Please rebase.

Regards,
Matthias

>  			pinmux = <MT7623_PIN_208_AUD_EXT_CK1_FUNC_PCIE0_PERST_N>,
>  				 <MT7623_PIN_209_AUD_EXT_CK2_FUNC_PCIE1_PERST_N>;
>  			bias-disable;
>  		};
>  	};
>  
> -	pwm_pins_a: pwm@0 {
> +	pwm_pins_a: pwm-default {
>  		pins-pwm {
>  			pinmux = <MT7623_PIN_203_PWM0_FUNC_PWM0>,
>  				 <MT7623_PIN_204_PWM1_FUNC_PWM1>,
> @@ -446,7 +445,7 @@
>  		};
>  	};
>  
> -	spi0_pins_a: spi@0 {
> +	spi0_pins_a: spi0-default {
>  		pins-spi {
>  			pinmux = <MT7623_PIN_53_SPI0_CSN_FUNC_SPI0_CS>,
>  				<MT7623_PIN_54_SPI0_CK_FUNC_SPI0_CK>,
> @@ -456,21 +455,21 @@
>  		};
>  	};
>  
> -	uart0_pins_a: uart@0 {
> +	uart0_pins_a: uart0-default {
>  		pins-dat {
>  			pinmux = <MT7623_PIN_79_URXD0_FUNC_URXD0>,
>  				 <MT7623_PIN_80_UTXD0_FUNC_UTXD0>;
>  		};
>  	};
>  
> -	uart1_pins_a: uart@1 {
> +	uart1_pins_a: uart1-default {
>  		pins-dat {
>  			pinmux = <MT7623_PIN_81_URXD1_FUNC_URXD1>,
>  				 <MT7623_PIN_82_UTXD1_FUNC_UTXD1>;
>  		};
>  	};
>  
> -	uart2_pins_a: uart@2 {
> +	uart2_pins_a: uart2-default {
>  		pins-dat {
>  			pinmux = <MT7623_PIN_14_GPIO14_FUNC_URXD2>,
>  				 <MT7623_PIN_15_GPIO15_FUNC_UTXD2>;
> diff --git a/arch/arm/boot/dts/mt7623n-rfb.dtsi b/arch/arm/boot/dts/mt7623n-rfb.dtsi
> index 256c5fd..128586d 100644
> --- a/arch/arm/boot/dts/mt7623n-rfb.dtsi
> +++ b/arch/arm/boot/dts/mt7623n-rfb.dtsi
> @@ -50,7 +50,7 @@
>  		reg = <0 0x80000000 0 0x40000000>;
>  	};
>  
> -	usb_p1_vbus: regulator@0 {
> +	usb_p1_vbus: regulator-5v {
>  		compatible = "regulator-fixed";
>  		regulator-name = "usb_vbus";
>  		regulator-min-microvolt = <5000000>;
> 

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v1 13/19] arm: dts: mt7623: move node mt6323 leds to mt6323.dtsi
  2018-02-23 10:16 ` [PATCH v1 13/19] arm: dts: mt7623: move node mt6323 leds to mt6323.dtsi sean.wang
  2018-03-02 15:40   ` Rob Herring
@ 2018-03-18 22:01   ` Matthias Brugger
  1 sibling, 0 replies; 51+ messages in thread
From: Matthias Brugger @ 2018-03-18 22:01 UTC (permalink / raw)
  To: sean.wang, robh+dt, mark.rutland, devicetree, linux-mediatek
  Cc: linux-arm-kernel, linux-kernel, Lee Jones



On 02/23/2018 11:16 AM, sean.wang@mediatek.com wrote:
> From: Sean Wang <sean.wang@mediatek.com>
> 
> Since those LEDs are parts of PMIC MT6323, it is reasonable to merge
> those LEDs node definition back into mt6323.dtsi. This way can improve
> the reusability of those nodes among different boards with the same PMIC.
> 
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> Cc: Lee Jones <lee.jones@linaro.org>
> ---
>  arch/arm/boot/dts/mt6323.dtsi                 | 26 ++++++++++++++++++++++++-
>  arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 28 ---------------------------
>  2 files changed, 25 insertions(+), 29 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/mt6323.dtsi b/arch/arm/boot/dts/mt6323.dtsi
> index 7c783d6..44c5642 100644
> --- a/arch/arm/boot/dts/mt6323.dtsi
> +++ b/arch/arm/boot/dts/mt6323.dtsi
> @@ -1,5 +1,5 @@
>  /*
> - * Copyright (c) 2017 MediaTek Inc.
> + * Copyright (c) 2017-2018 MediaTek Inc.
>   * Author: John Crispin <john@phrozen.org>
>   *	   Sean Wang <sean.wang@mediatek.com>
>   * This program is free software; you can redistribute it and/or modify
> @@ -237,5 +237,29 @@
>  				regulator-enable-ramp-delay = <216>;
>  			};
>  		};
> +
> +		leds {
> +			compatible = "mediatek,mt6323-led";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +
> +			led@0 {
> +				reg = <0>;
> +				label = "mt6323:isink:green";
> +				default-state = "off";
> +			};
> +
> +			led@1 {
> +				reg = <1>;
> +				label = "mt6323:isink:red";
> +				default-state = "off";
> +			};
> +
> +			led@2 {
> +				reg = <2>;
> +				label = "mt6323:isink:blue";
> +				default-state = "off";
> +			};
> +		};

The color of the leds are defined by the board and not by the PMIC. So as long
as you don't have any good arguments, I tend not to merge this one.

Regards,
Matthias

>  	};
>  };
> diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> index 75e61c4..767b225 100644
> --- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> +++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> @@ -483,34 +483,6 @@
>  	status = "okay";
>  };
>  
> -&pwrap {
> -	mt6323 {
> -		mt6323led: led {
> -			compatible = "mediatek,mt6323-led";
> -			#address-cells = <1>;
> -			#size-cells = <0>;
> -
> -			led@0 {
> -				reg = <0>;
> -				label = "bpi-r2:isink:green";
> -				default-state = "off";
> -			};
> -
> -			led@1 {
> -				reg = <1>;
> -				label = "bpi-r2:isink:red";
> -				default-state = "off";
> -			};
> -
> -			led@2 {
> -				reg = <2>;
> -				label = "bpi-r2:isink:blue";
> -				default-state = "off";
> -			};
> -		};
> -	};
> -};
> -
>  &spi0 {
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&spi0_pins_a>;
> 

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v1 13/19] arm: dts: mt7623: move node mt6323 leds to mt6323.dtsi
  2018-03-02 22:46     ` Sean Wang
@ 2018-03-18 23:46       ` Matthias Brugger
  0 siblings, 0 replies; 51+ messages in thread
From: Matthias Brugger @ 2018-03-18 23:46 UTC (permalink / raw)
  To: Sean Wang, Rob Herring
  Cc: mark.rutland, devicetree, linux-mediatek, linux-arm-kernel,
	linux-kernel, Lee Jones



On 03/02/2018 11:46 PM, Sean Wang wrote:
> On Fri, 2018-03-02 at 09:40 -0600, Rob Herring wrote:
>> On Fri, Feb 23, 2018 at 06:16:33PM +0800, sean.wang@mediatek.com wrote:
>>> From: Sean Wang <sean.wang@mediatek.com>
>>>
>>> Since those LEDs are parts of PMIC MT6323, it is reasonable to merge
>>> those LEDs node definition back into mt6323.dtsi. This way can improve
>>> the reusability of those nodes among different boards with the same PMIC.
>>>
>>> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
>>> Cc: Lee Jones <lee.jones@linaro.org>
>>> ---
>>>  arch/arm/boot/dts/mt6323.dtsi                 | 26 ++++++++++++++++++++++++-
>>>  arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 28 ---------------------------
>>>  2 files changed, 25 insertions(+), 29 deletions(-)
>>>
>>> diff --git a/arch/arm/boot/dts/mt6323.dtsi b/arch/arm/boot/dts/mt6323.dtsi
>>> index 7c783d6..44c5642 100644
>>> --- a/arch/arm/boot/dts/mt6323.dtsi
>>> +++ b/arch/arm/boot/dts/mt6323.dtsi
>>> @@ -1,5 +1,5 @@
>>>  /*
>>> - * Copyright (c) 2017 MediaTek Inc.
>>> + * Copyright (c) 2017-2018 MediaTek Inc.
>>>   * Author: John Crispin <john@phrozen.org>
>>>   *	   Sean Wang <sean.wang@mediatek.com>
>>>   * This program is free software; you can redistribute it and/or modify
>>> @@ -237,5 +237,29 @@
>>>  				regulator-enable-ramp-delay = <216>;
>>>  			};
>>>  		};
>>> +
>>> +		leds {
>>> +			compatible = "mediatek,mt6323-led";
>>> +			#address-cells = <1>;
>>> +			#size-cells = <0>;
>>> +
>>> +			led@0 {
>>> +				reg = <0>;
>>> +				label = "mt6323:isink:green";
>>
>> Changing the label potentially breaks userspace. And the fact that it is 
>> a green LED is very much board specific. So I think the old location was 
>> correct. You could put the parent node here and leave these child nodes 
>> in the board specific dts file.
>>
> 
> yes, I really made a mistake on breaking userspace with a label change.
> 
> I will keep the parent node here and then leave these child nodes into
> board specific dts files. thanks for your idea!
> 

Sorry I didn't see your email when I wrote my first comment. Yes this sounds
like the proper way to do it.

Regards,
Matthias

>>
>>> +				default-state = "off";
>>> +			};
>>> +
>>> +			led@1 {
>>> +				reg = <1>;
>>> +				label = "mt6323:isink:red";
>>> +				default-state = "off";
>>> +			};
>>> +
>>> +			led@2 {
>>> +				reg = <2>;
>>> +				label = "mt6323:isink:blue";
>>> +				default-state = "off";
>>> +			};
>>> +		};
>>>  	};
>>>  };
>>> diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
>>> index 75e61c4..767b225 100644
>>> --- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
>>> +++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
>>> @@ -483,34 +483,6 @@
>>>  	status = "okay";
>>>  };
>>>  
>>> -&pwrap {
>>> -	mt6323 {
>>> -		mt6323led: led {
>>> -			compatible = "mediatek,mt6323-led";
>>> -			#address-cells = <1>;
>>> -			#size-cells = <0>;
>>> -
>>> -			led@0 {
>>> -				reg = <0>;
>>> -				label = "bpi-r2:isink:green";
>>> -				default-state = "off";
>>> -			};
>>> -
>>> -			led@1 {
>>> -				reg = <1>;
>>> -				label = "bpi-r2:isink:red";
>>> -				default-state = "off";
>>> -			};
>>> -
>>> -			led@2 {
>>> -				reg = <2>;
>>> -				label = "bpi-r2:isink:blue";
>>> -				default-state = "off";
>>> -			};
>>> -		};
>>> -	};
>>> -};
>>> -
>>>  &spi0 {
>>>  	pinctrl-names = "default";
>>>  	pinctrl-0 = <&spi0_pins_a>;
>>> -- 
>>> 2.7.4
>>>
> 
> 

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v1 07/19] arm: dts: mt7623: fix the regulators mmc should use on bananapi-r2
  2018-02-23 10:16 ` [PATCH v1 07/19] arm: dts: mt7623: fix the regulators mmc should use " sean.wang
@ 2018-03-18 23:49   ` Matthias Brugger
  0 siblings, 0 replies; 51+ messages in thread
From: Matthias Brugger @ 2018-03-18 23:49 UTC (permalink / raw)
  To: sean.wang, robh+dt, mark.rutland, devicetree, linux-mediatek
  Cc: linux-arm-kernel, linux-kernel



On 02/23/2018 11:16 AM, sean.wang@mediatek.com wrote:
> From: Sean Wang <sean.wang@mediatek.com>
> 
> Both mmc devices on bananapi-r2 board should all use the fixed regulators
> as their power source instead of PMIC MT6323 exports.
> 
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>

Pushed to v4.16-next/dts32

Thanks!

> ---
>  arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 17 +++++++++++++----
>  1 file changed, 13 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> index f660d15..8ef91d6 100644
> --- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> +++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> @@ -39,6 +39,15 @@
>  		};
>  	};
>  
> +	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;
> +	};
> +
>  	reg_3p3v: regulator-3p3v {
>  		compatible = "regulator-fixed";
>  		regulator-name = "fixed-3.3V";
> @@ -213,8 +222,8 @@
>  	bus-width = <8>;
>  	max-frequency = <50000000>;
>  	cap-mmc-highspeed;
> -	vmmc-supply = <&mt6323_vemc3v3_reg>;
> -	vqmmc-supply = <&mt6323_vio18_reg>;
> +	vmmc-supply = <&reg_3p3v>;
> +	vqmmc-supply = <&reg_1p8v>;
>  	non-removable;
>  };
>  
> @@ -227,8 +236,8 @@
>  	max-frequency = <50000000>;
>  	cap-sd-highspeed;
>  	cd-gpios = <&pio 261 GPIO_ACTIVE_LOW>;
> -	vmmc-supply = <&mt6323_vmch_reg>;
> -	vqmmc-supply = <&mt6323_vio18_reg>;
> +	vmmc-supply = <&reg_3p3v>;
> +	vqmmc-supply = <&reg_3p3v>;
>  };
>  
>  &pcie {
> 

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v1 08/19] arm: dts: mt7623: enable three available UARTs on bananapi-r2
  2018-02-23 10:16 ` [PATCH v1 08/19] arm: dts: mt7623: enable three available UARTs " sean.wang
@ 2018-03-18 23:49   ` Matthias Brugger
  0 siblings, 0 replies; 51+ messages in thread
From: Matthias Brugger @ 2018-03-18 23:49 UTC (permalink / raw)
  To: sean.wang, robh+dt, mark.rutland, devicetree, linux-mediatek
  Cc: linux-arm-kernel, linux-kernel



On 02/23/2018 11:16 AM, sean.wang@mediatek.com wrote:
> From: Sean Wang <sean.wang@mediatek.com>
> 
> On bpi-r2 board, totally there're four UARTs which we usually called
> uart[0-3] helpful to extend slow-I/O devices. Among those ones, uart2 has
> dedicated pin slot which is used to console log. uart[0-1] appear at the
> 40-pins connector and uart3 has no pinout, but just has test points (TP47
> for TX and TP48 for RX, respectively) nearby uart2, but we don't enable
> uart3 in the patch. The missing pinctrl is also being supplemented for
> those newly added devices.
> 
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>

Pushed to v4.16-next/dts32

Thanks!

> ---
>  arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 13 +++++++++++--
>  1 file changed, 11 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> index 8ef91d6..6b760be 100644
> --- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> +++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> @@ -470,6 +470,13 @@
>  				 <MT7623_PIN_82_UTXD1_FUNC_UTXD1>;
>  		};
>  	};
> +
> +	uart2_pins_a: uart@2 {
> +		pins_dat {
> +			pinmux = <MT7623_PIN_14_GPIO14_FUNC_URXD2>,
> +				 <MT7623_PIN_15_GPIO15_FUNC_UTXD2>;
> +		};
> +	};
>  };
>  
>  &pwm {
> @@ -515,16 +522,18 @@
>  &uart0 {
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&uart0_pins_a>;
> -	status = "disabled";
> +	status = "okay";
>  };
>  
>  &uart1 {
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&uart1_pins_a>;
> -	status = "disabled";
> +	status = "okay";
>  };
>  
>  &uart2 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&uart2_pins_a>;
>  	status = "okay";
>  };
>  
> 

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v1 09/19] arm: dts: mt7623: add related clock properties to cpu[1-3] nodes
  2018-02-23 10:16 ` [PATCH v1 09/19] arm: dts: mt7623: add related clock properties to cpu[1-3] nodes sean.wang
  2018-02-26  4:13   ` Viresh Kumar
@ 2018-03-18 23:49   ` Matthias Brugger
  1 sibling, 0 replies; 51+ messages in thread
From: Matthias Brugger @ 2018-03-18 23:49 UTC (permalink / raw)
  To: sean.wang, robh+dt, mark.rutland, devicetree, linux-mediatek
  Cc: linux-arm-kernel, linux-kernel, Rafael J. Wysocki, Viresh Kumar,
	linux-pm



On 02/23/2018 11:16 AM, sean.wang@mediatek.com wrote:
> From: Sean Wang <sean.wang@mediatek.com>
> 
> Complement the missing clock properties cpu[1-3] should depend on.
> 
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> Cc: Viresh Kumar <viresh.kumar@linaro.org>
> Cc: linux-pm@vger.kernel.org

Pushed to v4.16-next/dts32

Thanks!

> ---
>  arch/arm/boot/dts/mt7623.dtsi | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/mt7623.dtsi b/arch/arm/boot/dts/mt7623.dtsi
> index da56c54..5cf93a4 100644
> --- a/arch/arm/boot/dts/mt7623.dtsi
> +++ b/arch/arm/boot/dts/mt7623.dtsi
> @@ -94,6 +94,9 @@
>  			device_type = "cpu";
>  			compatible = "arm,cortex-a7";
>  			reg = <0x1>;
> +			clocks = <&infracfg CLK_INFRA_CPUSEL>,
> +				 <&apmixedsys CLK_APMIXED_MAINPLL>;
> +			clock-names = "cpu", "intermediate";
>  			operating-points-v2 = <&cpu_opp_table>;
>  			clock-frequency = <1300000000>;
>  		};
> @@ -102,6 +105,9 @@
>  			device_type = "cpu";
>  			compatible = "arm,cortex-a7";
>  			reg = <0x2>;
> +			clocks = <&infracfg CLK_INFRA_CPUSEL>,
> +				 <&apmixedsys CLK_APMIXED_MAINPLL>;
> +			clock-names = "cpu", "intermediate";
>  			operating-points-v2 = <&cpu_opp_table>;
>  			clock-frequency = <1300000000>;
>  		};
> @@ -110,6 +116,9 @@
>  			device_type = "cpu";
>  			compatible = "arm,cortex-a7";
>  			reg = <0x3>;
> +			clocks = <&infracfg CLK_INFRA_CPUSEL>,
> +				 <&apmixedsys CLK_APMIXED_MAINPLL>;
> +			clock-names = "cpu", "intermediate";
>  			operating-points-v2 = <&cpu_opp_table>;
>  			clock-frequency = <1300000000>;
>  		};
> 

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v1 10/19] arm: dts: mt7623: remove useless property pinctrl-names at node switch@0
  2018-02-23 10:16 ` [PATCH v1 10/19] arm: dts: mt7623: remove useless property pinctrl-names at node switch@0 sean.wang
@ 2018-03-18 23:50   ` Matthias Brugger
  0 siblings, 0 replies; 51+ messages in thread
From: Matthias Brugger @ 2018-03-18 23:50 UTC (permalink / raw)
  To: sean.wang, robh+dt, mark.rutland, devicetree, linux-mediatek
  Cc: linux-arm-kernel, linux-kernel



On 02/23/2018 11:16 AM, sean.wang@mediatek.com wrote:
> From: Sean Wang <sean.wang@mediatek.com>
> 
> The property pinctrl-names is totally superfluous. It would be good to
> remove the property to keep the node neatness. There is actually
> unnecessary to set up any pins for data path TRGMII between main SoC and
> MT7530. Furthermore, it's more reasonable for the pin setup of control
> path MDIO bus is being placed inside the node of ethernet controller.
> 
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>

Pushed to v4.16-next/dts32

Thanks!

> ---
>  arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> index 6b760be..f2d3cfb 100644
> --- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> +++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> @@ -151,7 +151,6 @@
>  			#address-cells = <1>;
>  			#size-cells = <0>;
>  			reg = <0>;
> -			pinctrl-names = "default";
>  			reset-gpios = <&pio 33 0>;
>  			core-supply = <&mt6323_vpa_reg>;
>  			io-supply = <&mt6323_vemc3v3_reg>;
> 

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v1 11/19] arm: dts: mt7623: use - instead of _ in DT node name
  2018-02-23 10:16 ` [PATCH v1 11/19] arm: dts: mt7623: use - instead of _ in DT node name sean.wang
@ 2018-03-18 23:50   ` Matthias Brugger
  0 siblings, 0 replies; 51+ messages in thread
From: Matthias Brugger @ 2018-03-18 23:50 UTC (permalink / raw)
  To: sean.wang, robh+dt, mark.rutland, devicetree, linux-mediatek
  Cc: linux-arm-kernel, linux-kernel



On 02/23/2018 11:16 AM, sean.wang@mediatek.com wrote:
> From: Sean Wang <sean.wang@mediatek.com>
> 
> It should be good that no use "_" is in DT node name. Consequently,
> those nodes in certain files which have an inappropriate name containing
> "_" are all being replaced with "-".
> 
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: devicetree@vger.kernel.org

Pushed to v4.16-next/dts32

Thanks!

> ---
>  arch/arm/boot/dts/mt7623.dtsi                 | 12 +++----
>  arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 50 +++++++++++++--------------
>  arch/arm/boot/dts/mt7623n-rfb-nand.dts        |  6 ++--
>  3 files changed, 34 insertions(+), 34 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/mt7623.dtsi b/arch/arm/boot/dts/mt7623.dtsi
> index 5cf93a4..4b68448 100644
> --- a/arch/arm/boot/dts/mt7623.dtsi
> +++ b/arch/arm/boot/dts/mt7623.dtsi
> @@ -28,7 +28,7 @@
>  	compatible = "mediatek,mt7623";
>  	interrupt-parent = <&sysirq>;
>  
> -	cpu_opp_table: opp_table {
> +	cpu_opp_table: opp-table {
>  		compatible = "operating-points-v2";
>  		opp-shared;
>  
> @@ -145,32 +145,32 @@
>  	};
>  
>  	thermal-zones {
> -			cpu_thermal: cpu_thermal {
> +			cpu_thermal: cpu-thermal {
>  				polling-delay-passive = <1000>;
>  				polling-delay = <1000>;
>  
>  				thermal-sensors = <&thermal 0>;
>  
>  				trips {
> -					cpu_passive: cpu_passive {
> +					cpu_passive: cpu-passive {
>  						temperature = <47000>;
>  						hysteresis = <2000>;
>  						type = "passive";
>  					};
>  
> -					cpu_active: cpu_active {
> +					cpu_active: cpu-active {
>  						temperature = <67000>;
>  						hysteresis = <2000>;
>  						type = "active";
>  					};
>  
> -					cpu_hot: cpu_hot {
> +					cpu_hot: cpu-hot {
>  						temperature = <87000>;
>  						hysteresis = <2000>;
>  						type = "hot";
>  					};
>  
> -					cpu_crit {
> +					cpu-crit {
>  						temperature = <107000>;
>  						hysteresis = <2000>;
>  						type = "critical";
> diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> index f2d3cfb..a6295ef 100644
> --- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> +++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
> @@ -66,7 +66,7 @@
>  		regulator-always-on;
>  	};
>  
> -	gpio_keys {
> +	gpio-keys {
>  		compatible = "gpio-keys";
>  		pinctrl-names = "default";
>  		pinctrl-0 = <&key_pins_a>;
> @@ -263,14 +263,14 @@
>  
>  &pio {
>  	cir_pins_a:cir@0 {
> -		pins_cir {
> +		pins-cir {
>  			pinmux = <MT7623_PIN_46_IR_FUNC_IR>;
>  			bias-disable;
>  		};
>  	};
>  
>  	i2c0_pins_a: i2c@0 {
> -		pins_i2c0 {
> +		pins-i2c0 {
>  			pinmux = <MT7623_PIN_75_SDA0_FUNC_SDA0>,
>  				 <MT7623_PIN_76_SCL0_FUNC_SCL0>;
>  			bias-disable;
> @@ -278,7 +278,7 @@
>  	};
>  
>  	i2c1_pins_a: i2c@1 {
> -		pin_i2c1 {
> +		pin-i2c1 {
>  			pinmux = <MT7623_PIN_57_SDA1_FUNC_SDA1>,
>  				 <MT7623_PIN_58_SCL1_FUNC_SCL1>;
>  			bias-disable;
> @@ -286,7 +286,7 @@
>  	};
>  
>  	i2s0_pins_a: i2s@0 {
> -		pin_i2s0 {
> +		pin-i2s0 {
>  			pinmux = <MT7623_PIN_49_I2S0_DATA_FUNC_I2S0_DATA>,
>  				 <MT7623_PIN_72_I2S0_DATA_IN_FUNC_I2S0_DATA_IN>,
>  				 <MT7623_PIN_73_I2S0_LRCK_FUNC_I2S0_LRCK>,
> @@ -298,7 +298,7 @@
>  	};
>  
>  	i2s1_pins_a: i2s@1 {
> -		pin_i2s1 {
> +		pin-i2s1 {
>  			pinmux = <MT7623_PIN_33_I2S1_DATA_FUNC_I2S1_DATA>,
>  				 <MT7623_PIN_34_I2S1_DATA_IN_FUNC_I2S1_DATA_IN>,
>  				 <MT7623_PIN_35_I2S1_BCK_FUNC_I2S1_BCK>,
> @@ -310,7 +310,7 @@
>  	};
>  
>  	key_pins_a: keys@0 {
> -		pins_keys {
> +		pins-keys {
>  			pinmux = <MT7623_PIN_256_GPIO256_FUNC_GPIO256>,
>  				 <MT7623_PIN_257_GPIO257_FUNC_GPIO257> ;
>  			input-enable;
> @@ -318,7 +318,7 @@
>  	};
>  
>  	led_pins_a: leds@0 {
> -		pins_leds {
> +		pins-leds {
>  			pinmux = <MT7623_PIN_239_EXT_SDIO0_FUNC_GPIO239>,
>  				 <MT7623_PIN_240_EXT_XCS_FUNC_GPIO240>,
>  				 <MT7623_PIN_241_EXT_SCK_FUNC_GPIO241>;
> @@ -326,7 +326,7 @@
>  	};
>  
>  	mmc0_pins_default: mmc0default {
> -		pins_cmd_dat {
> +		pins-cmd-dat {
>  			pinmux = <MT7623_PIN_111_MSDC0_DAT7_FUNC_MSDC0_DAT7>,
>  				 <MT7623_PIN_112_MSDC0_DAT6_FUNC_MSDC0_DAT6>,
>  				 <MT7623_PIN_113_MSDC0_DAT5_FUNC_MSDC0_DAT5>,
> @@ -340,19 +340,19 @@
>  			bias-pull-up;
>  		};
>  
> -		pins_clk {
> +		pins-clk {
>  			pinmux = <MT7623_PIN_117_MSDC0_CLK_FUNC_MSDC0_CLK>;
>  			bias-pull-down;
>  		};
>  
> -		pins_rst {
> +		pins-rst {
>  			pinmux = <MT7623_PIN_115_MSDC0_RSTB_FUNC_MSDC0_RSTB>;
>  			bias-pull-up;
>  		};
>  	};
>  
>  	mmc0_pins_uhs: mmc0 {
> -		pins_cmd_dat {
> +		pins-cmd-dat {
>  			pinmux = <MT7623_PIN_111_MSDC0_DAT7_FUNC_MSDC0_DAT7>,
>  				 <MT7623_PIN_112_MSDC0_DAT6_FUNC_MSDC0_DAT6>,
>  				 <MT7623_PIN_113_MSDC0_DAT5_FUNC_MSDC0_DAT5>,
> @@ -367,20 +367,20 @@
>  			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
>  		};
>  
> -		pins_clk {
> +		pins-clk {
>  			pinmux = <MT7623_PIN_117_MSDC0_CLK_FUNC_MSDC0_CLK>;
>  			drive-strength = <MTK_DRIVE_2mA>;
>  			bias-pull-down = <MTK_PUPD_SET_R1R0_01>;
>  		};
>  
> -		pins_rst {
> +		pins-rst {
>  			pinmux = <MT7623_PIN_115_MSDC0_RSTB_FUNC_MSDC0_RSTB>;
>  			bias-pull-up;
>  		};
>  	};
>  
>  	mmc1_pins_default: mmc1default {
> -		pins_cmd_dat {
> +		pins-cmd-dat {
>  			pinmux = <MT7623_PIN_107_MSDC1_DAT0_FUNC_MSDC1_DAT0>,
>  				 <MT7623_PIN_108_MSDC1_DAT1_FUNC_MSDC1_DAT1>,
>  				 <MT7623_PIN_109_MSDC1_DAT2_FUNC_MSDC1_DAT2>,
> @@ -391,26 +391,26 @@
>  			bias-pull-up = <MTK_PUPD_SET_R1R0_10>;
>  		};
>  
> -		pins_clk {
> +		pins-clk {
>  			pinmux = <MT7623_PIN_106_MSDC1_CLK_FUNC_MSDC1_CLK>;
>  			bias-pull-down;
>  			drive-strength = <MTK_DRIVE_4mA>;
>  		};
>  
> -		pins_wp {
> +		pins-wp {
>  			pinmux = <MT7623_PIN_29_EINT7_FUNC_MSDC1_WP>;
>  			input-enable;
>  			bias-pull-up;
>  		};
>  
> -		pins_insert {
> +		pins-insert {
>  			pinmux = <MT7623_PIN_261_MSDC1_INS_FUNC_GPIO261>;
>  			bias-pull-up;
>  		};
>  	};
>  
>  	mmc1_pins_uhs: mmc1 {
> -		pins_cmd_dat {
> +		pins-cmd-dat {
>  			pinmux = <MT7623_PIN_107_MSDC1_DAT0_FUNC_MSDC1_DAT0>,
>  				 <MT7623_PIN_108_MSDC1_DAT1_FUNC_MSDC1_DAT1>,
>  				 <MT7623_PIN_109_MSDC1_DAT2_FUNC_MSDC1_DAT2>,
> @@ -421,7 +421,7 @@
>  			bias-pull-up = <MTK_PUPD_SET_R1R0_10>;
>  		};
>  
> -		pins_clk {
> +		pins-clk {
>  			pinmux = <MT7623_PIN_106_MSDC1_CLK_FUNC_MSDC1_CLK>;
>  			drive-strength = <MTK_DRIVE_4mA>;
>  			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
> @@ -437,7 +437,7 @@
>  	};
>  
>  	pwm_pins_a: pwm@0 {
> -		pins_pwm {
> +		pins-pwm {
>  			pinmux = <MT7623_PIN_203_PWM0_FUNC_PWM0>,
>  				 <MT7623_PIN_204_PWM1_FUNC_PWM1>,
>  				 <MT7623_PIN_205_PWM2_FUNC_PWM2>,
> @@ -447,7 +447,7 @@
>  	};
>  
>  	spi0_pins_a: spi@0 {
> -		pins_spi {
> +		pins-spi {
>  			pinmux = <MT7623_PIN_53_SPI0_CSN_FUNC_SPI0_CS>,
>  				<MT7623_PIN_54_SPI0_CK_FUNC_SPI0_CK>,
>  				<MT7623_PIN_55_SPI0_MI_FUNC_SPI0_MI>,
> @@ -457,21 +457,21 @@
>  	};
>  
>  	uart0_pins_a: uart@0 {
> -		pins_dat {
> +		pins-dat {
>  			pinmux = <MT7623_PIN_79_URXD0_FUNC_URXD0>,
>  				 <MT7623_PIN_80_UTXD0_FUNC_UTXD0>;
>  		};
>  	};
>  
>  	uart1_pins_a: uart@1 {
> -		pins_dat {
> +		pins-dat {
>  			pinmux = <MT7623_PIN_81_URXD1_FUNC_URXD1>,
>  				 <MT7623_PIN_82_UTXD1_FUNC_UTXD1>;
>  		};
>  	};
>  
>  	uart2_pins_a: uart@2 {
> -		pins_dat {
> +		pins-dat {
>  			pinmux = <MT7623_PIN_14_GPIO14_FUNC_URXD2>,
>  				 <MT7623_PIN_15_GPIO15_FUNC_UTXD2>;
>  		};
> diff --git a/arch/arm/boot/dts/mt7623n-rfb-nand.dts b/arch/arm/boot/dts/mt7623n-rfb-nand.dts
> index e66de86..f729c71 100644
> --- a/arch/arm/boot/dts/mt7623n-rfb-nand.dts
> +++ b/arch/arm/boot/dts/mt7623n-rfb-nand.dts
> @@ -81,13 +81,13 @@
>  
>  &pio {
>  	nand_pins_default: nanddefault {
> -		pins_ale {
> +		pins-ale {
>  			pinmux = <MT7623_PIN_116_MSDC0_CMD_FUNC_NALE>;
>  			drive-strength = <MTK_DRIVE_8mA>;
>  			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
>  		};
>  
> -		pins_dat {
> +		pins-dat {
>  			pinmux = <MT7623_PIN_111_MSDC0_DAT7_FUNC_NLD7>,
>  				 <MT7623_PIN_112_MSDC0_DAT6_FUNC_NLD6>,
>  				 <MT7623_PIN_114_MSDC0_DAT4_FUNC_NLD4>,
> @@ -102,7 +102,7 @@
>  			bias-pull-up;
>  		};
>  
> -		pins_we {
> +		pins-we {
>  			pinmux = <MT7623_PIN_117_MSDC0_CLK_FUNC_NWEB>;
>  			drive-strength = <MTK_DRIVE_8mA>;
>  			bias-pull-up = <MTK_PUPD_SET_R1R0_10>;
> 

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v1 02/19] dt-bindings: cpufreq: mediatek: use - instead of _ in examples
  2018-02-26  4:13   ` Viresh Kumar
@ 2018-03-19  2:51     ` Sean Wang
  2018-03-19 10:35       ` Matthias Brugger
  0 siblings, 1 reply; 51+ messages in thread
From: Sean Wang @ 2018-03-19  2:51 UTC (permalink / raw)
  To: matthias.bgg
  Cc: Viresh Kumar, robh+dt, mark.rutland, devicetree, linux-mediatek,
	linux-arm-kernel, linux-kernel, Rafael J. Wysocki, linux-pm


Hi, Matthias

I'm worried you missed the patch which already got both tags Reviewed-by
from Rob and Acked-by: Viresh and thus I thought it
should be ready for your tree.

For the other patches in the same series, I will have v2 to refine them
according to these suggestions and comments in v1 and let them easy to
review.

Really thanks for your effort!
	
	Sean


On Mon, 2018-02-26 at 09:43 +0530, Viresh Kumar wrote:
> On 23-02-18, 18:16, sean.wang@mediatek.com wrote:
> > From: Sean Wang <sean.wang@mediatek.com>
> > 
> > It should be good that no use "_" is in examples. Consequently,
> > those nodes in certain files which have an inappropriate name containing
> > "_" are all being replaced with "-".
> > 
> > Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> > Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> > Cc: Viresh Kumar <viresh.kumar@linaro.org>
> > Cc: Rob Herring <robh+dt@kernel.org>
> > Cc: Mark Rutland <mark.rutland@arm.com>
> > Cc: linux-pm@vger.kernel.org
> > Cc: devicetree@vger.kernel.org
> > ---
> >  Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek.txt | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek.txt b/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek.txt
> > index d36f07e..38cfbb5 100644
> > --- a/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek.txt
> > +++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek.txt
> > @@ -26,7 +26,7 @@ Optional properties:
> >  
> >  Example 1 (MT7623 SoC):
> >  
> > -	cpu_opp_table: opp_table {
> > +	cpu_opp_table: opp-table {
> >  		compatible = "operating-points-v2";
> >  		opp-shared;
> >  
> > @@ -86,7 +86,7 @@ Example 1 (MT7623 SoC):
> >  	};
> >  
> >  Example 2 (MT8173 SoC):
> > -	cpu_opp_table_a: opp_table_a {
> > +	cpu_opp_table_a: opp-table-a {
> >  		compatible = "operating-points-v2";
> >  		opp-shared;
> >  
> > @@ -131,7 +131,7 @@ Example 2 (MT8173 SoC):
> >  		};
> >  	};
> >  
> > -	cpu_opp_table_b: opp_table_b {
> > +	cpu_opp_table_b: opp-table-b {
> >  		compatible = "operating-points-v2";
> >  		opp-shared;
> 
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
> 

^ permalink raw reply	[flat|nested] 51+ messages in thread

* Re: [PATCH v1 02/19] dt-bindings: cpufreq: mediatek: use - instead of _ in examples
  2018-03-19  2:51     ` Sean Wang
@ 2018-03-19 10:35       ` Matthias Brugger
  0 siblings, 0 replies; 51+ messages in thread
From: Matthias Brugger @ 2018-03-19 10:35 UTC (permalink / raw)
  To: Sean Wang
  Cc: Viresh Kumar, robh+dt, mark.rutland, devicetree, linux-mediatek,
	linux-arm-kernel, linux-kernel, Rafael J. Wysocki, linux-pm

Hi Sean,

On 03/19/2018 03:51 AM, Sean Wang wrote:
> 
> Hi, Matthias
> 
> I'm worried you missed the patch which already got both tags Reviewed-by
> from Rob and Acked-by: Viresh and thus I thought it
> should be ready for your tree.
> 

Yes, sorry I missed this one. Fortunately it is not critical, can you please add
it to v2.

I suppose you realized that I didn't take any from 12/19 onwards, especially 14,
15 and 17, because they have many conflicts with previous patches in the series.

Sorry for the inconvenience.
Matthias

> For the other patches in the same series, I will have v2 to refine them
> according to these suggestions and comments in v1 and let them easy to
> review.
> 
> Really thanks for your effort!
> 	
> 	Sean
> 
> 
> On Mon, 2018-02-26 at 09:43 +0530, Viresh Kumar wrote:
>> On 23-02-18, 18:16, sean.wang@mediatek.com wrote:
>>> From: Sean Wang <sean.wang@mediatek.com>
>>>
>>> It should be good that no use "_" is in examples. Consequently,
>>> those nodes in certain files which have an inappropriate name containing
>>> "_" are all being replaced with "-".
>>>
>>> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
>>> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
>>> Cc: Viresh Kumar <viresh.kumar@linaro.org>
>>> Cc: Rob Herring <robh+dt@kernel.org>
>>> Cc: Mark Rutland <mark.rutland@arm.com>
>>> Cc: linux-pm@vger.kernel.org
>>> Cc: devicetree@vger.kernel.org
>>> ---
>>>  Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek.txt | 6 +++---
>>>  1 file changed, 3 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek.txt b/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek.txt
>>> index d36f07e..38cfbb5 100644
>>> --- a/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek.txt
>>> +++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek.txt
>>> @@ -26,7 +26,7 @@ Optional properties:
>>>  
>>>  Example 1 (MT7623 SoC):
>>>  
>>> -	cpu_opp_table: opp_table {
>>> +	cpu_opp_table: opp-table {
>>>  		compatible = "operating-points-v2";
>>>  		opp-shared;
>>>  
>>> @@ -86,7 +86,7 @@ Example 1 (MT7623 SoC):
>>>  	};
>>>  
>>>  Example 2 (MT8173 SoC):
>>> -	cpu_opp_table_a: opp_table_a {
>>> +	cpu_opp_table_a: opp-table-a {
>>>  		compatible = "operating-points-v2";
>>>  		opp-shared;
>>>  
>>> @@ -131,7 +131,7 @@ Example 2 (MT8173 SoC):
>>>  		};
>>>  	};
>>>  
>>> -	cpu_opp_table_b: opp_table_b {
>>> +	cpu_opp_table_b: opp-table-b {
>>>  		compatible = "operating-points-v2";
>>>  		opp-shared;
>>
>> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
>>
> 
> 

^ permalink raw reply	[flat|nested] 51+ messages in thread

end of thread, other threads:[~2018-03-19 10:35 UTC | newest]

Thread overview: 51+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-23 10:16 [PATCH v1 00/19] refactor dts and add support for more boards sean.wang
2018-02-23 10:16 ` [PATCH v1 01/19] dt-bindings: pinctrl: mediatek: use - instead of _ in examples sean.wang
2018-03-02  7:43   ` Linus Walleij
2018-02-23 10:16 ` [PATCH v1 02/19] dt-bindings: cpufreq: " sean.wang
2018-02-26  4:13   ` Viresh Kumar
2018-03-19  2:51     ` Sean Wang
2018-03-19 10:35       ` Matthias Brugger
2018-03-02 15:53   ` Rob Herring
2018-02-23 10:16 ` [PATCH v1 03/19] dt-bindings: pinctrl: mediatek: add bindings for I2C2 and SPI2 on MT7623 sean.wang
2018-03-02  7:44   ` Linus Walleij
2018-02-23 10:16 ` [PATCH v1 04/19] dt-bindings: arm: mediatek: add support for more mt7623 reference boards sean.wang
2018-03-02 16:00   ` Rob Herring
2018-03-12 11:03     ` Matthias Brugger
2018-02-23 10:16 ` [PATCH v1 05/19] arm: dts: mt7623: add BTIF, HSDMA and SPI-NOR device nodes sean.wang
2018-03-12  9:40   ` Matthias Brugger
2018-03-12  9:53     ` Sean Wang
2018-02-23 10:16 ` [PATCH v1 06/19] arm: dts: mt7623: fix USB initialization fails on bananapi-r2 sean.wang
2018-03-12 11:03   ` Matthias Brugger
2018-02-23 10:16 ` [PATCH v1 07/19] arm: dts: mt7623: fix the regulators mmc should use " sean.wang
2018-03-18 23:49   ` Matthias Brugger
2018-02-23 10:16 ` [PATCH v1 08/19] arm: dts: mt7623: enable three available UARTs " sean.wang
2018-03-18 23:49   ` Matthias Brugger
2018-02-23 10:16 ` [PATCH v1 09/19] arm: dts: mt7623: add related clock properties to cpu[1-3] nodes sean.wang
2018-02-26  4:13   ` Viresh Kumar
2018-03-18 23:49   ` Matthias Brugger
2018-02-23 10:16 ` [PATCH v1 10/19] arm: dts: mt7623: remove useless property pinctrl-names at node switch@0 sean.wang
2018-03-18 23:50   ` Matthias Brugger
2018-02-23 10:16 ` [PATCH v1 11/19] arm: dts: mt7623: use - instead of _ in DT node name sean.wang
2018-03-18 23:50   ` Matthias Brugger
2018-02-23 10:16 ` [PATCH v1 12/19] arm: dts: mt7623: fix all Warnings (unit_address_vs_reg) sean.wang
2018-03-18 21:54   ` Matthias Brugger
2018-02-23 10:16 ` [PATCH v1 13/19] arm: dts: mt7623: move node mt6323 leds to mt6323.dtsi sean.wang
2018-03-02 15:40   ` Rob Herring
2018-03-02 22:46     ` Sean Wang
2018-03-18 23:46       ` Matthias Brugger
2018-03-18 22:01   ` Matthias Brugger
2018-02-23 10:16 ` [PATCH v1 14/19] arm: dts: mt7623: extend common file to unify all boards with MT7623 SoCs sean.wang
2018-02-23 10:16 ` [PATCH v1 15/19] arm: dts: mt7623: add SPI[1,2], I2C2 and sound related nodes to reference board sean.wang
2018-02-23 10:16 ` [PATCH v1 16/19] arm: dts: mt7623: fixup available memory size on bananapi-r2 sean.wang
2018-03-02 15:42   ` Rob Herring
2018-03-02 23:27     ` Sean Wang
2018-03-05 14:16       ` Rob Herring
2018-03-05 15:46         ` Sean Wang
2018-02-23 10:16 ` [PATCH v1 17/19] arm: dts: mt7623: add MT7623N reference board with eMMC sean.wang
2018-02-23 10:16 ` [PATCH v1 18/19] arm: dts: mt7623: add MT7623A reference boards sean.wang
2018-03-02 15:45   ` Rob Herring
2018-03-03  2:15     ` Sean Wang
2018-03-05 14:10       ` Rob Herring
2018-03-05 15:10         ` Sean Wang
2018-02-23 10:16 ` [PATCH v1 19/19] arm: dts: mediatek: converted to using SPDX identifiers sean.wang
2018-03-02 15:52   ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).