All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/4] dt-bindings: reset: convert Hisilicon reset controller bindings to json-schema
@ 2020-12-08 12:46 ` Zhen Lei
  0 siblings, 0 replies; 32+ messages in thread
From: Zhen Lei @ 2020-12-08 12:46 UTC (permalink / raw)
  To: Philipp Zabel, Wei Xu, Rob Herring, linux-arm-kernel, devicetree,
	linux-kernel
  Cc: Zhen Lei, Zhangfei Gao, Chen Feng, Manivannan Sadhasivam

v2 --> v3:
1. Keep device tree patches and reset driver patch separate, as they were in v1.
   That is, revert v2.
2. When the new compatible match failed, fall back to the deprecated compatible.
3. Fix a typo, correct "hi3660,rst-syscon" to "hisilicon,rst-syscon".

v1 --> v2:
Merge the driver and DT modification(correct vendor prefix hisi to hisilicon) into one patch.

v1:
Patch 1-3 change the vendor prefix from "hisi" to "hisilicon", to eliminate below warnings:
  crg_rst_controller: 'hisi,rst-syscon' does not match any of the regexes: '^#.*', ... , '^hisilicon,.*', ...
  From schema: /root/leizhen/linux-next/Documentation/devicetree/bindings/vendor-prefixes.yaml

Patch 4 does the json-schema conversion.


Zhen Lei (4):
  reset: hisilicon: correct vendor prefix
  arm64: dts: correct vendor prefix hisi to hisilicon
  dt-bindings: reset: correct vendor prefix hisi to hisilicon
  dt-bindings: reset: convert Hisilicon reset controller bindings to
    json-schema

 .../bindings/reset/hisilicon,hi3660-reset.txt      | 44 -------------
 .../bindings/reset/hisilicon,hi3660-reset.yaml     | 77 ++++++++++++++++++++++
 arch/arm64/boot/dts/hisilicon/hi3660.dtsi          |  4 +-
 arch/arm64/boot/dts/hisilicon/hi3670.dtsi          |  2 +-
 drivers/reset/hisilicon/reset-hi3660.c             |  9 ++-
 5 files changed, 87 insertions(+), 49 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.txt
 create mode 100644 Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.yaml

-- 
1.8.3



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

* [PATCH v3 0/4] dt-bindings: reset: convert Hisilicon reset controller bindings to json-schema
@ 2020-12-08 12:46 ` Zhen Lei
  0 siblings, 0 replies; 32+ messages in thread
From: Zhen Lei @ 2020-12-08 12:46 UTC (permalink / raw)
  To: Philipp Zabel, Wei Xu, Rob Herring, linux-arm-kernel, devicetree,
	linux-kernel
  Cc: Zhangfei Gao, Manivannan Sadhasivam, Chen Feng, Zhen Lei

v2 --> v3:
1. Keep device tree patches and reset driver patch separate, as they were in v1.
   That is, revert v2.
2. When the new compatible match failed, fall back to the deprecated compatible.
3. Fix a typo, correct "hi3660,rst-syscon" to "hisilicon,rst-syscon".

v1 --> v2:
Merge the driver and DT modification(correct vendor prefix hisi to hisilicon) into one patch.

v1:
Patch 1-3 change the vendor prefix from "hisi" to "hisilicon", to eliminate below warnings:
  crg_rst_controller: 'hisi,rst-syscon' does not match any of the regexes: '^#.*', ... , '^hisilicon,.*', ...
  From schema: /root/leizhen/linux-next/Documentation/devicetree/bindings/vendor-prefixes.yaml

Patch 4 does the json-schema conversion.


Zhen Lei (4):
  reset: hisilicon: correct vendor prefix
  arm64: dts: correct vendor prefix hisi to hisilicon
  dt-bindings: reset: correct vendor prefix hisi to hisilicon
  dt-bindings: reset: convert Hisilicon reset controller bindings to
    json-schema

 .../bindings/reset/hisilicon,hi3660-reset.txt      | 44 -------------
 .../bindings/reset/hisilicon,hi3660-reset.yaml     | 77 ++++++++++++++++++++++
 arch/arm64/boot/dts/hisilicon/hi3660.dtsi          |  4 +-
 arch/arm64/boot/dts/hisilicon/hi3670.dtsi          |  2 +-
 drivers/reset/hisilicon/reset-hi3660.c             |  9 ++-
 5 files changed, 87 insertions(+), 49 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.txt
 create mode 100644 Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.yaml

-- 
1.8.3



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v3 1/4] reset: hisilicon: correct vendor prefix
  2020-12-08 12:46 ` Zhen Lei
@ 2020-12-08 12:46   ` Zhen Lei
  -1 siblings, 0 replies; 32+ messages in thread
From: Zhen Lei @ 2020-12-08 12:46 UTC (permalink / raw)
  To: Philipp Zabel, Wei Xu, Rob Herring, linux-arm-kernel, devicetree,
	linux-kernel
  Cc: Zhen Lei, Zhangfei Gao, Chen Feng, Manivannan Sadhasivam

The vendor prefix of "Hisilicon Limited" is "hisilicon", it is clearly
stated in "vendor-prefixes.yaml".

For backward compatibility reasons fall back to the deprecated compatible
if the new one failed.

Fixes: 1527058736fa ("reset: hisilicon: add reset-hi3660")
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Cc: Zhangfei Gao <zhangfei.gao@linaro.org>
---
 drivers/reset/hisilicon/reset-hi3660.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/reset/hisilicon/reset-hi3660.c b/drivers/reset/hisilicon/reset-hi3660.c
index a7d4445924e558c..965f5ceba7d8f4d 100644
--- a/drivers/reset/hisilicon/reset-hi3660.c
+++ b/drivers/reset/hisilicon/reset-hi3660.c
@@ -83,9 +83,14 @@ static int hi3660_reset_probe(struct platform_device *pdev)
 	if (!rc)
 		return -ENOMEM;
 
-	rc->map = syscon_regmap_lookup_by_phandle(np, "hisi,rst-syscon");
+	rc->map = syscon_regmap_lookup_by_phandle(np, "hisilicon,rst-syscon");
+	if (rc->map == ERR_PTR(-ENODEV)) {
+		/* fall back to the deprecated compatible */
+		rc->map = syscon_regmap_lookup_by_phandle(np,
+							  "hisi,rst-syscon");
+	}
 	if (IS_ERR(rc->map)) {
-		dev_err(dev, "failed to get hi3660,rst-syscon\n");
+		dev_err(dev, "failed to get hisilicon,rst-syscon\n");
 		return PTR_ERR(rc->map);
 	}
 
-- 
1.8.3



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

* [PATCH v3 1/4] reset: hisilicon: correct vendor prefix
@ 2020-12-08 12:46   ` Zhen Lei
  0 siblings, 0 replies; 32+ messages in thread
From: Zhen Lei @ 2020-12-08 12:46 UTC (permalink / raw)
  To: Philipp Zabel, Wei Xu, Rob Herring, linux-arm-kernel, devicetree,
	linux-kernel
  Cc: Zhangfei Gao, Manivannan Sadhasivam, Chen Feng, Zhen Lei

The vendor prefix of "Hisilicon Limited" is "hisilicon", it is clearly
stated in "vendor-prefixes.yaml".

For backward compatibility reasons fall back to the deprecated compatible
if the new one failed.

Fixes: 1527058736fa ("reset: hisilicon: add reset-hi3660")
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Cc: Zhangfei Gao <zhangfei.gao@linaro.org>
---
 drivers/reset/hisilicon/reset-hi3660.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/reset/hisilicon/reset-hi3660.c b/drivers/reset/hisilicon/reset-hi3660.c
index a7d4445924e558c..965f5ceba7d8f4d 100644
--- a/drivers/reset/hisilicon/reset-hi3660.c
+++ b/drivers/reset/hisilicon/reset-hi3660.c
@@ -83,9 +83,14 @@ static int hi3660_reset_probe(struct platform_device *pdev)
 	if (!rc)
 		return -ENOMEM;
 
-	rc->map = syscon_regmap_lookup_by_phandle(np, "hisi,rst-syscon");
+	rc->map = syscon_regmap_lookup_by_phandle(np, "hisilicon,rst-syscon");
+	if (rc->map == ERR_PTR(-ENODEV)) {
+		/* fall back to the deprecated compatible */
+		rc->map = syscon_regmap_lookup_by_phandle(np,
+							  "hisi,rst-syscon");
+	}
 	if (IS_ERR(rc->map)) {
-		dev_err(dev, "failed to get hi3660,rst-syscon\n");
+		dev_err(dev, "failed to get hisilicon,rst-syscon\n");
 		return PTR_ERR(rc->map);
 	}
 
-- 
1.8.3



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v3 2/4] arm64: dts: correct vendor prefix hisi to hisilicon
  2020-12-08 12:46 ` Zhen Lei
@ 2020-12-08 12:46   ` Zhen Lei
  -1 siblings, 0 replies; 32+ messages in thread
From: Zhen Lei @ 2020-12-08 12:46 UTC (permalink / raw)
  To: Philipp Zabel, Wei Xu, Rob Herring, linux-arm-kernel, devicetree,
	linux-kernel
  Cc: Zhen Lei, Zhangfei Gao, Chen Feng, Manivannan Sadhasivam

The vendor prefix of "Hisilicon Limited" is "hisilicon", it is clearly
stated in "vendor-prefixes.yaml".

Fixes: 35ca8168133c ("arm64: dts: Add dts files for Hisilicon Hi3660 SoC")
Fixes: dd8c7b78c11b ("arm64: dts: Add devicetree for Hisilicon Hi3670 SoC")
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Cc: Chen Feng <puck.chen@hisilicon.com>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
 arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 4 ++--
 arch/arm64/boot/dts/hisilicon/hi3670.dtsi | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
index 49c19c6879f95ce..bfb1375426d2b58 100644
--- a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
+++ b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
@@ -345,7 +345,7 @@
 		crg_rst: crg_rst_controller {
 			compatible = "hisilicon,hi3660-reset";
 			#reset-cells = <2>;
-			hisi,rst-syscon = <&crg_ctrl>;
+			hisilicon,rst-syscon = <&crg_ctrl>;
 		};
 
 
@@ -376,7 +376,7 @@
 
 		iomcu_rst: reset {
 			compatible = "hisilicon,hi3660-reset";
-			hisi,rst-syscon = <&iomcu>;
+			hisilicon,rst-syscon = <&iomcu>;
 			#reset-cells = <2>;
 		};
 
diff --git a/arch/arm64/boot/dts/hisilicon/hi3670.dtsi b/arch/arm64/boot/dts/hisilicon/hi3670.dtsi
index 85b0dfb35d6d396..5c5a5dc964ea848 100644
--- a/arch/arm64/boot/dts/hisilicon/hi3670.dtsi
+++ b/arch/arm64/boot/dts/hisilicon/hi3670.dtsi
@@ -155,7 +155,7 @@
 			compatible = "hisilicon,hi3670-reset",
 				     "hisilicon,hi3660-reset";
 			#reset-cells = <2>;
-			hisi,rst-syscon = <&crg_ctrl>;
+			hisilicon,rst-syscon = <&crg_ctrl>;
 		};
 
 		pctrl: pctrl@e8a09000 {
-- 
1.8.3



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

* [PATCH v3 2/4] arm64: dts: correct vendor prefix hisi to hisilicon
@ 2020-12-08 12:46   ` Zhen Lei
  0 siblings, 0 replies; 32+ messages in thread
From: Zhen Lei @ 2020-12-08 12:46 UTC (permalink / raw)
  To: Philipp Zabel, Wei Xu, Rob Herring, linux-arm-kernel, devicetree,
	linux-kernel
  Cc: Zhangfei Gao, Manivannan Sadhasivam, Chen Feng, Zhen Lei

The vendor prefix of "Hisilicon Limited" is "hisilicon", it is clearly
stated in "vendor-prefixes.yaml".

Fixes: 35ca8168133c ("arm64: dts: Add dts files for Hisilicon Hi3660 SoC")
Fixes: dd8c7b78c11b ("arm64: dts: Add devicetree for Hisilicon Hi3670 SoC")
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Cc: Chen Feng <puck.chen@hisilicon.com>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
 arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 4 ++--
 arch/arm64/boot/dts/hisilicon/hi3670.dtsi | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
index 49c19c6879f95ce..bfb1375426d2b58 100644
--- a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
+++ b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
@@ -345,7 +345,7 @@
 		crg_rst: crg_rst_controller {
 			compatible = "hisilicon,hi3660-reset";
 			#reset-cells = <2>;
-			hisi,rst-syscon = <&crg_ctrl>;
+			hisilicon,rst-syscon = <&crg_ctrl>;
 		};
 
 
@@ -376,7 +376,7 @@
 
 		iomcu_rst: reset {
 			compatible = "hisilicon,hi3660-reset";
-			hisi,rst-syscon = <&iomcu>;
+			hisilicon,rst-syscon = <&iomcu>;
 			#reset-cells = <2>;
 		};
 
diff --git a/arch/arm64/boot/dts/hisilicon/hi3670.dtsi b/arch/arm64/boot/dts/hisilicon/hi3670.dtsi
index 85b0dfb35d6d396..5c5a5dc964ea848 100644
--- a/arch/arm64/boot/dts/hisilicon/hi3670.dtsi
+++ b/arch/arm64/boot/dts/hisilicon/hi3670.dtsi
@@ -155,7 +155,7 @@
 			compatible = "hisilicon,hi3670-reset",
 				     "hisilicon,hi3660-reset";
 			#reset-cells = <2>;
-			hisi,rst-syscon = <&crg_ctrl>;
+			hisilicon,rst-syscon = <&crg_ctrl>;
 		};
 
 		pctrl: pctrl@e8a09000 {
-- 
1.8.3



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v3 3/4] dt-bindings: reset: correct vendor prefix hisi to hisilicon
  2020-12-08 12:46 ` Zhen Lei
@ 2020-12-08 12:46   ` Zhen Lei
  -1 siblings, 0 replies; 32+ messages in thread
From: Zhen Lei @ 2020-12-08 12:46 UTC (permalink / raw)
  To: Philipp Zabel, Wei Xu, Rob Herring, linux-arm-kernel, devicetree,
	linux-kernel
  Cc: Zhen Lei, Zhangfei Gao, Chen Feng, Manivannan Sadhasivam

The vendor prefix of "Hisilicon Limited" is "hisilicon", it is clearly
stated in "vendor-prefixes.yaml".

Fixes: 836e23549583 ("dt-bindings: Document the hi3660 reset bindings")
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Cc: Zhangfei Gao <zhangfei.gao@linaro.org>
---
 Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.txt b/Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.txt
index 2df4bddeb688918..aefd26710f9e87d 100644
--- a/Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.txt
+++ b/Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.txt
@@ -11,7 +11,7 @@ Required properties:
 - compatible: should be one of the following:
 		 "hisilicon,hi3660-reset" for HI3660
 		 "hisilicon,hi3670-reset", "hisilicon,hi3660-reset" for HI3670
-- hisi,rst-syscon: phandle of the reset's syscon.
+- hisilicon,rst-syscon: phandle of the reset's syscon.
 - #reset-cells : Specifies the number of cells needed to encode a
   reset source.  The type shall be a <u32> and the value shall be 2.
 
@@ -29,7 +29,7 @@ Example:
 
 	iomcu_rst: iomcu_rst_controller {
 		compatible = "hisilicon,hi3660-reset";
-		hisi,rst-syscon = <&iomcu>;
+		hisilicon,rst-syscon = <&iomcu>;
 		#reset-cells = <2>;
 	};
 
-- 
1.8.3



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

* [PATCH v3 3/4] dt-bindings: reset: correct vendor prefix hisi to hisilicon
@ 2020-12-08 12:46   ` Zhen Lei
  0 siblings, 0 replies; 32+ messages in thread
From: Zhen Lei @ 2020-12-08 12:46 UTC (permalink / raw)
  To: Philipp Zabel, Wei Xu, Rob Herring, linux-arm-kernel, devicetree,
	linux-kernel
  Cc: Zhangfei Gao, Manivannan Sadhasivam, Chen Feng, Zhen Lei

The vendor prefix of "Hisilicon Limited" is "hisilicon", it is clearly
stated in "vendor-prefixes.yaml".

Fixes: 836e23549583 ("dt-bindings: Document the hi3660 reset bindings")
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Cc: Zhangfei Gao <zhangfei.gao@linaro.org>
---
 Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.txt b/Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.txt
index 2df4bddeb688918..aefd26710f9e87d 100644
--- a/Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.txt
+++ b/Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.txt
@@ -11,7 +11,7 @@ Required properties:
 - compatible: should be one of the following:
 		 "hisilicon,hi3660-reset" for HI3660
 		 "hisilicon,hi3670-reset", "hisilicon,hi3660-reset" for HI3670
-- hisi,rst-syscon: phandle of the reset's syscon.
+- hisilicon,rst-syscon: phandle of the reset's syscon.
 - #reset-cells : Specifies the number of cells needed to encode a
   reset source.  The type shall be a <u32> and the value shall be 2.
 
@@ -29,7 +29,7 @@ Example:
 
 	iomcu_rst: iomcu_rst_controller {
 		compatible = "hisilicon,hi3660-reset";
-		hisi,rst-syscon = <&iomcu>;
+		hisilicon,rst-syscon = <&iomcu>;
 		#reset-cells = <2>;
 	};
 
-- 
1.8.3



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v3 4/4] dt-bindings: reset: convert Hisilicon reset controller bindings to json-schema
  2020-12-08 12:46 ` Zhen Lei
@ 2020-12-08 12:46   ` Zhen Lei
  -1 siblings, 0 replies; 32+ messages in thread
From: Zhen Lei @ 2020-12-08 12:46 UTC (permalink / raw)
  To: Philipp Zabel, Wei Xu, Rob Herring, linux-arm-kernel, devicetree,
	linux-kernel
  Cc: Zhen Lei, Zhangfei Gao, Chen Feng, Manivannan Sadhasivam

Convert the Hisilicon reset controller binding to DT schema format using
json-schema.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 .../bindings/reset/hisilicon,hi3660-reset.txt      | 44 -------------
 .../bindings/reset/hisilicon,hi3660-reset.yaml     | 77 ++++++++++++++++++++++
 2 files changed, 77 insertions(+), 44 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.txt
 create mode 100644 Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.yaml

diff --git a/Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.txt b/Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.txt
deleted file mode 100644
index aefd26710f9e87d..000000000000000
--- a/Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-Hisilicon System Reset Controller
-======================================
-
-Please also refer to reset.txt in this directory for common reset
-controller binding usage.
-
-The reset controller registers are part of the system-ctl block on
-hi3660 and hi3670 SoCs.
-
-Required properties:
-- compatible: should be one of the following:
-		 "hisilicon,hi3660-reset" for HI3660
-		 "hisilicon,hi3670-reset", "hisilicon,hi3660-reset" for HI3670
-- hisilicon,rst-syscon: phandle of the reset's syscon.
-- #reset-cells : Specifies the number of cells needed to encode a
-  reset source.  The type shall be a <u32> and the value shall be 2.
-
-	 Cell #1 : offset of the reset assert control
-	           register from the syscon register base
-		   offset + 4: deassert control register
-		   offset + 8: status control register
-	 Cell #2 : bit position of the reset in the reset control register
-
-Example:
-	iomcu: iomcu@ffd7e000 {
-		compatible = "hisilicon,hi3660-iomcu", "syscon";
-		reg = <0x0 0xffd7e000 0x0 0x1000>;
-	};
-
-	iomcu_rst: iomcu_rst_controller {
-		compatible = "hisilicon,hi3660-reset";
-		hisilicon,rst-syscon = <&iomcu>;
-		#reset-cells = <2>;
-	};
-
-Specifying reset lines connected to IP modules
-==============================================
-example:
-
-        i2c0: i2c@..... {
-                ...
-		resets = <&iomcu_rst 0x20 3>; /* offset: 0x20; bit: 3 */
-                ...
-        };
diff --git a/Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.yaml b/Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.yaml
new file mode 100644
index 000000000000000..9bf40952e5b7d28
--- /dev/null
+++ b/Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.yaml
@@ -0,0 +1,77 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/reset/hisilicon,hi3660-reset.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Hisilicon System Reset Controller
+
+maintainers:
+  - Wei Xu <xuwei5@hisilicon.com>
+
+description: |
+  Please also refer to reset.txt in this directory for common reset
+  controller binding usage.
+  The reset controller registers are part of the system-ctl block on
+  hi3660 and hi3670 SoCs.
+
+properties:
+  compatible:
+    oneOf:
+      - items:
+          - const: hisilicon,hi3660-reset
+      - items:
+          - const: hisilicon,hi3670-reset
+          - const: hisilicon,hi3660-reset
+
+  hisilicon,rst-syscon:
+    description: phandle of the reset's syscon.
+    $ref: /schemas/types.yaml#/definitions/phandle
+
+  '#reset-cells':
+    description: |
+      Specifies the number of cells needed to encode a reset source.
+      Cell #1 : offset of the reset assert control register from the syscon
+                register base
+                offset + 4: deassert control register
+                offset + 8: status control register
+      Cell #2 : bit position of the reset in the reset control register
+    const: 2
+
+required:
+  - compatible
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/clock/hi3660-clock.h>
+
+    iomcu: iomcu@ffd7e000 {
+        compatible = "hisilicon,hi3660-iomcu", "syscon";
+        reg = <0xffd7e000 0x1000>;
+    };
+
+    iomcu_rst: iomcu_rst_controller {
+        compatible = "hisilicon,hi3660-reset";
+        hisilicon,rst-syscon = <&iomcu>;
+        #reset-cells = <2>;
+    };
+
+    /* Specifying reset lines connected to IP modules */
+    i2c@ffd71000 {
+        compatible = "snps,designware-i2c";
+        reg = <0xffd71000 0x1000>;
+        interrupts = <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>;
+        #address-cells = <1>;
+        #size-cells = <0>;
+        clock-frequency = <400000>;
+        clocks = <&crg_ctrl HI3660_CLK_GATE_I2C0>;
+        resets = <&iomcu_rst 0x20 3>;
+        pinctrl-names = "default";
+        pinctrl-0 = <&i2c0_pmx_func &i2c0_cfg_func>;
+        status = "disabled";
+    };
+...
-- 
1.8.3



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

* [PATCH v3 4/4] dt-bindings: reset: convert Hisilicon reset controller bindings to json-schema
@ 2020-12-08 12:46   ` Zhen Lei
  0 siblings, 0 replies; 32+ messages in thread
From: Zhen Lei @ 2020-12-08 12:46 UTC (permalink / raw)
  To: Philipp Zabel, Wei Xu, Rob Herring, linux-arm-kernel, devicetree,
	linux-kernel
  Cc: Zhangfei Gao, Manivannan Sadhasivam, Chen Feng, Zhen Lei

Convert the Hisilicon reset controller binding to DT schema format using
json-schema.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 .../bindings/reset/hisilicon,hi3660-reset.txt      | 44 -------------
 .../bindings/reset/hisilicon,hi3660-reset.yaml     | 77 ++++++++++++++++++++++
 2 files changed, 77 insertions(+), 44 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.txt
 create mode 100644 Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.yaml

diff --git a/Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.txt b/Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.txt
deleted file mode 100644
index aefd26710f9e87d..000000000000000
--- a/Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-Hisilicon System Reset Controller
-======================================
-
-Please also refer to reset.txt in this directory for common reset
-controller binding usage.
-
-The reset controller registers are part of the system-ctl block on
-hi3660 and hi3670 SoCs.
-
-Required properties:
-- compatible: should be one of the following:
-		 "hisilicon,hi3660-reset" for HI3660
-		 "hisilicon,hi3670-reset", "hisilicon,hi3660-reset" for HI3670
-- hisilicon,rst-syscon: phandle of the reset's syscon.
-- #reset-cells : Specifies the number of cells needed to encode a
-  reset source.  The type shall be a <u32> and the value shall be 2.
-
-	 Cell #1 : offset of the reset assert control
-	           register from the syscon register base
-		   offset + 4: deassert control register
-		   offset + 8: status control register
-	 Cell #2 : bit position of the reset in the reset control register
-
-Example:
-	iomcu: iomcu@ffd7e000 {
-		compatible = "hisilicon,hi3660-iomcu", "syscon";
-		reg = <0x0 0xffd7e000 0x0 0x1000>;
-	};
-
-	iomcu_rst: iomcu_rst_controller {
-		compatible = "hisilicon,hi3660-reset";
-		hisilicon,rst-syscon = <&iomcu>;
-		#reset-cells = <2>;
-	};
-
-Specifying reset lines connected to IP modules
-==============================================
-example:
-
-        i2c0: i2c@..... {
-                ...
-		resets = <&iomcu_rst 0x20 3>; /* offset: 0x20; bit: 3 */
-                ...
-        };
diff --git a/Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.yaml b/Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.yaml
new file mode 100644
index 000000000000000..9bf40952e5b7d28
--- /dev/null
+++ b/Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.yaml
@@ -0,0 +1,77 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/reset/hisilicon,hi3660-reset.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Hisilicon System Reset Controller
+
+maintainers:
+  - Wei Xu <xuwei5@hisilicon.com>
+
+description: |
+  Please also refer to reset.txt in this directory for common reset
+  controller binding usage.
+  The reset controller registers are part of the system-ctl block on
+  hi3660 and hi3670 SoCs.
+
+properties:
+  compatible:
+    oneOf:
+      - items:
+          - const: hisilicon,hi3660-reset
+      - items:
+          - const: hisilicon,hi3670-reset
+          - const: hisilicon,hi3660-reset
+
+  hisilicon,rst-syscon:
+    description: phandle of the reset's syscon.
+    $ref: /schemas/types.yaml#/definitions/phandle
+
+  '#reset-cells':
+    description: |
+      Specifies the number of cells needed to encode a reset source.
+      Cell #1 : offset of the reset assert control register from the syscon
+                register base
+                offset + 4: deassert control register
+                offset + 8: status control register
+      Cell #2 : bit position of the reset in the reset control register
+    const: 2
+
+required:
+  - compatible
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/clock/hi3660-clock.h>
+
+    iomcu: iomcu@ffd7e000 {
+        compatible = "hisilicon,hi3660-iomcu", "syscon";
+        reg = <0xffd7e000 0x1000>;
+    };
+
+    iomcu_rst: iomcu_rst_controller {
+        compatible = "hisilicon,hi3660-reset";
+        hisilicon,rst-syscon = <&iomcu>;
+        #reset-cells = <2>;
+    };
+
+    /* Specifying reset lines connected to IP modules */
+    i2c@ffd71000 {
+        compatible = "snps,designware-i2c";
+        reg = <0xffd71000 0x1000>;
+        interrupts = <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>;
+        #address-cells = <1>;
+        #size-cells = <0>;
+        clock-frequency = <400000>;
+        clocks = <&crg_ctrl HI3660_CLK_GATE_I2C0>;
+        resets = <&iomcu_rst 0x20 3>;
+        pinctrl-names = "default";
+        pinctrl-0 = <&i2c0_pmx_func &i2c0_cfg_func>;
+        status = "disabled";
+    };
+...
-- 
1.8.3



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v3 3/4] dt-bindings: reset: correct vendor prefix hisi to hisilicon
  2020-12-08 12:46   ` Zhen Lei
@ 2020-12-10 14:01     ` Rob Herring
  -1 siblings, 0 replies; 32+ messages in thread
From: Rob Herring @ 2020-12-10 14:01 UTC (permalink / raw)
  To: Zhen Lei
  Cc: Manivannan Sadhasivam, devicetree, Wei Xu, Philipp Zabel,
	Chen Feng, Rob Herring, linux-arm-kernel, linux-kernel,
	Zhangfei Gao

On Tue, 08 Dec 2020 20:46:40 +0800, Zhen Lei wrote:
> The vendor prefix of "Hisilicon Limited" is "hisilicon", it is clearly
> stated in "vendor-prefixes.yaml".
> 
> Fixes: 836e23549583 ("dt-bindings: Document the hi3660 reset bindings")
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> Cc: Zhangfei Gao <zhangfei.gao@linaro.org>
> ---
>  Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.txt | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 

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

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

* Re: [PATCH v3 3/4] dt-bindings: reset: correct vendor prefix hisi to hisilicon
@ 2020-12-10 14:01     ` Rob Herring
  0 siblings, 0 replies; 32+ messages in thread
From: Rob Herring @ 2020-12-10 14:01 UTC (permalink / raw)
  To: Zhen Lei
  Cc: devicetree, Chen Feng, linux-kernel, Wei Xu, Rob Herring,
	Philipp Zabel, Manivannan Sadhasivam, Zhangfei Gao,
	linux-arm-kernel

On Tue, 08 Dec 2020 20:46:40 +0800, Zhen Lei wrote:
> The vendor prefix of "Hisilicon Limited" is "hisilicon", it is clearly
> stated in "vendor-prefixes.yaml".
> 
> Fixes: 836e23549583 ("dt-bindings: Document the hi3660 reset bindings")
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> Cc: Zhangfei Gao <zhangfei.gao@linaro.org>
> ---
>  Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.txt | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v3 4/4] dt-bindings: reset: convert Hisilicon reset controller bindings to json-schema
  2020-12-08 12:46   ` Zhen Lei
@ 2020-12-10 14:02     ` Rob Herring
  -1 siblings, 0 replies; 32+ messages in thread
From: Rob Herring @ 2020-12-10 14:02 UTC (permalink / raw)
  To: Zhen Lei
  Cc: Philipp Zabel, Wei Xu, linux-kernel, Rob Herring, Zhangfei Gao,
	devicetree, Chen Feng, linux-arm-kernel, Manivannan Sadhasivam

On Tue, 08 Dec 2020 20:46:41 +0800, Zhen Lei wrote:
> Convert the Hisilicon reset controller binding to DT schema format using
> json-schema.
> 
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> ---
>  .../bindings/reset/hisilicon,hi3660-reset.txt      | 44 -------------
>  .../bindings/reset/hisilicon,hi3660-reset.yaml     | 77 ++++++++++++++++++++++
>  2 files changed, 77 insertions(+), 44 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.txt
>  create mode 100644 Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.yaml
> 

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

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

* Re: [PATCH v3 4/4] dt-bindings: reset: convert Hisilicon reset controller bindings to json-schema
@ 2020-12-10 14:02     ` Rob Herring
  0 siblings, 0 replies; 32+ messages in thread
From: Rob Herring @ 2020-12-10 14:02 UTC (permalink / raw)
  To: Zhen Lei
  Cc: devicetree, Chen Feng, linux-kernel, Wei Xu, Rob Herring,
	Philipp Zabel, Manivannan Sadhasivam, Zhangfei Gao,
	linux-arm-kernel

On Tue, 08 Dec 2020 20:46:41 +0800, Zhen Lei wrote:
> Convert the Hisilicon reset controller binding to DT schema format using
> json-schema.
> 
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> ---
>  .../bindings/reset/hisilicon,hi3660-reset.txt      | 44 -------------
>  .../bindings/reset/hisilicon,hi3660-reset.yaml     | 77 ++++++++++++++++++++++
>  2 files changed, 77 insertions(+), 44 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.txt
>  create mode 100644 Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.yaml
> 

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v3 0/4] dt-bindings: reset: convert Hisilicon reset controller bindings to json-schema
  2020-12-08 12:46 ` Zhen Lei
@ 2020-12-10 15:06   ` Philipp Zabel
  -1 siblings, 0 replies; 32+ messages in thread
From: Philipp Zabel @ 2020-12-10 15:06 UTC (permalink / raw)
  To: Zhen Lei, Wei Xu, Rob Herring, linux-arm-kernel, devicetree,
	linux-kernel
  Cc: Zhangfei Gao, Chen Feng, Manivannan Sadhasivam

On Tue, 2020-12-08 at 20:46 +0800, Zhen Lei wrote:
> v2 --> v3:
> 1. Keep device tree patches and reset driver patch separate, as they were in v1.
>    That is, revert v2.
> 2. When the new compatible match failed, fall back to the deprecated compatible.
> 3. Fix a typo, correct "hi3660,rst-syscon" to "hisilicon,rst-syscon".
> 
> v1 --> v2:
> Merge the driver and DT modification(correct vendor prefix hisi to hisilicon) into one patch.
> 
> v1:
> Patch 1-3 change the vendor prefix from "hisi" to "hisilicon", to eliminate below warnings:
>   crg_rst_controller: 'hisi,rst-syscon' does not match any of the regexes: '^#.*', ... , '^hisilicon,.*', ...
>   From schema: /root/leizhen/linux-next/Documentation/devicetree/bindings/vendor-prefixes.yaml
> 
> Patch 4 does the json-schema conversion.

Thank you, I've applied patches 1, 3, and 4 to the reset/next branch.

regards
Philipp

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

* Re: [PATCH v3 0/4] dt-bindings: reset: convert Hisilicon reset controller bindings to json-schema
@ 2020-12-10 15:06   ` Philipp Zabel
  0 siblings, 0 replies; 32+ messages in thread
From: Philipp Zabel @ 2020-12-10 15:06 UTC (permalink / raw)
  To: Zhen Lei, Wei Xu, Rob Herring, linux-arm-kernel, devicetree,
	linux-kernel
  Cc: Zhangfei Gao, Manivannan Sadhasivam, Chen Feng

On Tue, 2020-12-08 at 20:46 +0800, Zhen Lei wrote:
> v2 --> v3:
> 1. Keep device tree patches and reset driver patch separate, as they were in v1.
>    That is, revert v2.
> 2. When the new compatible match failed, fall back to the deprecated compatible.
> 3. Fix a typo, correct "hi3660,rst-syscon" to "hisilicon,rst-syscon".
> 
> v1 --> v2:
> Merge the driver and DT modification(correct vendor prefix hisi to hisilicon) into one patch.
> 
> v1:
> Patch 1-3 change the vendor prefix from "hisi" to "hisilicon", to eliminate below warnings:
>   crg_rst_controller: 'hisi,rst-syscon' does not match any of the regexes: '^#.*', ... , '^hisilicon,.*', ...
>   From schema: /root/leizhen/linux-next/Documentation/devicetree/bindings/vendor-prefixes.yaml
> 
> Patch 4 does the json-schema conversion.

Thank you, I've applied patches 1, 3, and 4 to the reset/next branch.

regards
Philipp

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v3 2/4] arm64: dts: correct vendor prefix hisi to hisilicon
  2020-12-08 12:46   ` Zhen Lei
@ 2021-01-26  8:53     ` Wei Xu
  -1 siblings, 0 replies; 32+ messages in thread
From: Wei Xu @ 2021-01-26  8:53 UTC (permalink / raw)
  To: Zhen Lei, Philipp Zabel, Rob Herring, linux-arm-kernel,
	devicetree, linux-kernel
  Cc: Zhangfei Gao, Chen Feng, Manivannan Sadhasivam

Hi Zhen Lei,

On 2020/12/8 20:46, Zhen Lei wrote:
> The vendor prefix of "Hisilicon Limited" is "hisilicon", it is clearly
> stated in "vendor-prefixes.yaml".
> 
> Fixes: 35ca8168133c ("arm64: dts: Add dts files for Hisilicon Hi3660 SoC")
> Fixes: dd8c7b78c11b ("arm64: dts: Add devicetree for Hisilicon Hi3670 SoC")
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> Cc: Chen Feng <puck.chen@hisilicon.com>
> Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

Thanks!
Applied to the hisilicon arm64 dt tree.

Best Regards,
Wei

> ---
>  arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 4 ++--
>  arch/arm64/boot/dts/hisilicon/hi3670.dtsi | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
> index 49c19c6879f95ce..bfb1375426d2b58 100644
> --- a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
> +++ b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
> @@ -345,7 +345,7 @@
>  		crg_rst: crg_rst_controller {
>  			compatible = "hisilicon,hi3660-reset";
>  			#reset-cells = <2>;
> -			hisi,rst-syscon = <&crg_ctrl>;
> +			hisilicon,rst-syscon = <&crg_ctrl>;
>  		};
>  
>  
> @@ -376,7 +376,7 @@
>  
>  		iomcu_rst: reset {
>  			compatible = "hisilicon,hi3660-reset";
> -			hisi,rst-syscon = <&iomcu>;
> +			hisilicon,rst-syscon = <&iomcu>;
>  			#reset-cells = <2>;
>  		};
>  
> diff --git a/arch/arm64/boot/dts/hisilicon/hi3670.dtsi b/arch/arm64/boot/dts/hisilicon/hi3670.dtsi
> index 85b0dfb35d6d396..5c5a5dc964ea848 100644
> --- a/arch/arm64/boot/dts/hisilicon/hi3670.dtsi
> +++ b/arch/arm64/boot/dts/hisilicon/hi3670.dtsi
> @@ -155,7 +155,7 @@
>  			compatible = "hisilicon,hi3670-reset",
>  				     "hisilicon,hi3660-reset";
>  			#reset-cells = <2>;
> -			hisi,rst-syscon = <&crg_ctrl>;
> +			hisilicon,rst-syscon = <&crg_ctrl>;
>  		};
>  
>  		pctrl: pctrl@e8a09000 {
> 

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

* Re: [PATCH v3 2/4] arm64: dts: correct vendor prefix hisi to hisilicon
@ 2021-01-26  8:53     ` Wei Xu
  0 siblings, 0 replies; 32+ messages in thread
From: Wei Xu @ 2021-01-26  8:53 UTC (permalink / raw)
  To: Zhen Lei, Philipp Zabel, Rob Herring, linux-arm-kernel,
	devicetree, linux-kernel
  Cc: Zhangfei Gao, Manivannan Sadhasivam, Chen Feng

Hi Zhen Lei,

On 2020/12/8 20:46, Zhen Lei wrote:
> The vendor prefix of "Hisilicon Limited" is "hisilicon", it is clearly
> stated in "vendor-prefixes.yaml".
> 
> Fixes: 35ca8168133c ("arm64: dts: Add dts files for Hisilicon Hi3660 SoC")
> Fixes: dd8c7b78c11b ("arm64: dts: Add devicetree for Hisilicon Hi3670 SoC")
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> Cc: Chen Feng <puck.chen@hisilicon.com>
> Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

Thanks!
Applied to the hisilicon arm64 dt tree.

Best Regards,
Wei

> ---
>  arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 4 ++--
>  arch/arm64/boot/dts/hisilicon/hi3670.dtsi | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
> index 49c19c6879f95ce..bfb1375426d2b58 100644
> --- a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
> +++ b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
> @@ -345,7 +345,7 @@
>  		crg_rst: crg_rst_controller {
>  			compatible = "hisilicon,hi3660-reset";
>  			#reset-cells = <2>;
> -			hisi,rst-syscon = <&crg_ctrl>;
> +			hisilicon,rst-syscon = <&crg_ctrl>;
>  		};
>  
>  
> @@ -376,7 +376,7 @@
>  
>  		iomcu_rst: reset {
>  			compatible = "hisilicon,hi3660-reset";
> -			hisi,rst-syscon = <&iomcu>;
> +			hisilicon,rst-syscon = <&iomcu>;
>  			#reset-cells = <2>;
>  		};
>  
> diff --git a/arch/arm64/boot/dts/hisilicon/hi3670.dtsi b/arch/arm64/boot/dts/hisilicon/hi3670.dtsi
> index 85b0dfb35d6d396..5c5a5dc964ea848 100644
> --- a/arch/arm64/boot/dts/hisilicon/hi3670.dtsi
> +++ b/arch/arm64/boot/dts/hisilicon/hi3670.dtsi
> @@ -155,7 +155,7 @@
>  			compatible = "hisilicon,hi3670-reset",
>  				     "hisilicon,hi3660-reset";
>  			#reset-cells = <2>;
> -			hisi,rst-syscon = <&crg_ctrl>;
> +			hisilicon,rst-syscon = <&crg_ctrl>;
>  		};
>  
>  		pctrl: pctrl@e8a09000 {
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v3 2/4] arm64: dts: correct vendor prefix hisi to hisilicon
  2020-12-08 12:46   ` Zhen Lei
@ 2021-01-26 22:23     ` Arnd Bergmann
  -1 siblings, 0 replies; 32+ messages in thread
From: Arnd Bergmann @ 2021-01-26 22:23 UTC (permalink / raw)
  To: Zhen Lei
  Cc: Philipp Zabel, Wei Xu, Rob Herring, linux-arm-kernel, devicetree,
	linux-kernel, Zhangfei Gao, Chen Feng, Manivannan Sadhasivam

On Tue, Dec 8, 2020 at 1:46 PM Zhen Lei <thunder.leizhen@huawei.com> wrote:
>
> The vendor prefix of "Hisilicon Limited" is "hisilicon", it is clearly
> stated in "vendor-prefixes.yaml".
>
> Fixes: 35ca8168133c ("arm64: dts: Add dts files for Hisilicon Hi3660 SoC")
> Fixes: dd8c7b78c11b ("arm64: dts: Add devicetree for Hisilicon Hi3670 SoC")
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> Cc: Chen Feng <puck.chen@hisilicon.com>
> Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

I see this change in the pull request I got, but I'm a bit worried about the
incompatible binding change. Wouldn't the correct path forward be to
list both the correct and the incorrect properties, both in the dts file
and in the driver that interprets the properties?

The binding file in this case would need to list the old name as deprecated,
though I'm not sure how that would work without causing a warning about
the unknown vendor prefix.

        Arnd

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

* Re: [PATCH v3 2/4] arm64: dts: correct vendor prefix hisi to hisilicon
@ 2021-01-26 22:23     ` Arnd Bergmann
  0 siblings, 0 replies; 32+ messages in thread
From: Arnd Bergmann @ 2021-01-26 22:23 UTC (permalink / raw)
  To: Zhen Lei
  Cc: devicetree, Chen Feng, linux-kernel, Wei Xu, Rob Herring,
	Philipp Zabel, Manivannan Sadhasivam, Zhangfei Gao,
	linux-arm-kernel

On Tue, Dec 8, 2020 at 1:46 PM Zhen Lei <thunder.leizhen@huawei.com> wrote:
>
> The vendor prefix of "Hisilicon Limited" is "hisilicon", it is clearly
> stated in "vendor-prefixes.yaml".
>
> Fixes: 35ca8168133c ("arm64: dts: Add dts files for Hisilicon Hi3660 SoC")
> Fixes: dd8c7b78c11b ("arm64: dts: Add devicetree for Hisilicon Hi3670 SoC")
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> Cc: Chen Feng <puck.chen@hisilicon.com>
> Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

I see this change in the pull request I got, but I'm a bit worried about the
incompatible binding change. Wouldn't the correct path forward be to
list both the correct and the incorrect properties, both in the dts file
and in the driver that interprets the properties?

The binding file in this case would need to list the old name as deprecated,
though I'm not sure how that would work without causing a warning about
the unknown vendor prefix.

        Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v3 2/4] arm64: dts: correct vendor prefix hisi to hisilicon
  2021-01-26 22:23     ` Arnd Bergmann
@ 2021-01-27  0:42       ` Wei Xu
  -1 siblings, 0 replies; 32+ messages in thread
From: Wei Xu @ 2021-01-27  0:42 UTC (permalink / raw)
  To: Arnd Bergmann, Zhen Lei
  Cc: Philipp Zabel, Rob Herring, linux-arm-kernel, devicetree,
	linux-kernel, Zhangfei Gao, Chen Feng, Manivannan Sadhasivam

Hi Arnd,

On 2021/1/27 6:23, Arnd Bergmann wrote:
> On Tue, Dec 8, 2020 at 1:46 PM Zhen Lei <thunder.leizhen@huawei.com> wrote:
>>
>> The vendor prefix of "Hisilicon Limited" is "hisilicon", it is clearly
>> stated in "vendor-prefixes.yaml".
>>
>> Fixes: 35ca8168133c ("arm64: dts: Add dts files for Hisilicon Hi3660 SoC")
>> Fixes: dd8c7b78c11b ("arm64: dts: Add devicetree for Hisilicon Hi3670 SoC")
>> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
>> Cc: Chen Feng <puck.chen@hisilicon.com>
>> Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> 
> I see this change in the pull request I got, but I'm a bit worried about the
> incompatible binding change. Wouldn't the correct path forward be to
> list both the correct and the incorrect properties, both in the dts file
> and in the driver that interprets the properties?

Thanks for the comment!
The reset driver will look for "hisilicon" firstly and fall back to "hisi".
And the DTS is shipped with the driver together.
So I think there is no compatible issue here.
Please let me know if missed anything. Thanks!

Best Regards,
Wei

> 
> The binding file in this case would need to list the old name as deprecated,
> though I'm not sure how that would work without causing a warning about
> the unknown vendor prefix.
> 
>         Arnd
> .
> 

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

* Re: [PATCH v3 2/4] arm64: dts: correct vendor prefix hisi to hisilicon
@ 2021-01-27  0:42       ` Wei Xu
  0 siblings, 0 replies; 32+ messages in thread
From: Wei Xu @ 2021-01-27  0:42 UTC (permalink / raw)
  To: Arnd Bergmann, Zhen Lei
  Cc: devicetree, Chen Feng, linux-kernel, Rob Herring, Philipp Zabel,
	Manivannan Sadhasivam, Zhangfei Gao, linux-arm-kernel

Hi Arnd,

On 2021/1/27 6:23, Arnd Bergmann wrote:
> On Tue, Dec 8, 2020 at 1:46 PM Zhen Lei <thunder.leizhen@huawei.com> wrote:
>>
>> The vendor prefix of "Hisilicon Limited" is "hisilicon", it is clearly
>> stated in "vendor-prefixes.yaml".
>>
>> Fixes: 35ca8168133c ("arm64: dts: Add dts files for Hisilicon Hi3660 SoC")
>> Fixes: dd8c7b78c11b ("arm64: dts: Add devicetree for Hisilicon Hi3670 SoC")
>> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
>> Cc: Chen Feng <puck.chen@hisilicon.com>
>> Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> 
> I see this change in the pull request I got, but I'm a bit worried about the
> incompatible binding change. Wouldn't the correct path forward be to
> list both the correct and the incorrect properties, both in the dts file
> and in the driver that interprets the properties?

Thanks for the comment!
The reset driver will look for "hisilicon" firstly and fall back to "hisi".
And the DTS is shipped with the driver together.
So I think there is no compatible issue here.
Please let me know if missed anything. Thanks!

Best Regards,
Wei

> 
> The binding file in this case would need to list the old name as deprecated,
> though I'm not sure how that would work without causing a warning about
> the unknown vendor prefix.
> 
>         Arnd
> .
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v3 2/4] arm64: dts: correct vendor prefix hisi to hisilicon
  2021-01-26 22:23     ` Arnd Bergmann
@ 2021-01-27  1:21       ` Leizhen (ThunderTown)
  -1 siblings, 0 replies; 32+ messages in thread
From: Leizhen (ThunderTown) @ 2021-01-27  1:21 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Philipp Zabel, Wei Xu, Rob Herring, linux-arm-kernel, devicetree,
	linux-kernel, Zhangfei Gao, Chen Feng, Manivannan Sadhasivam



On 2021/1/27 6:23, Arnd Bergmann wrote:
> On Tue, Dec 8, 2020 at 1:46 PM Zhen Lei <thunder.leizhen@huawei.com> wrote:
>>
>> The vendor prefix of "Hisilicon Limited" is "hisilicon", it is clearly
>> stated in "vendor-prefixes.yaml".
>>
>> Fixes: 35ca8168133c ("arm64: dts: Add dts files for Hisilicon Hi3660 SoC")
>> Fixes: dd8c7b78c11b ("arm64: dts: Add devicetree for Hisilicon Hi3670 SoC")
>> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
>> Cc: Chen Feng <puck.chen@hisilicon.com>
>> Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> 
> I see this change in the pull request I got, but I'm a bit worried about the
> incompatible binding change. Wouldn't the correct path forward be to
> list both the correct and the incorrect properties, both in the dts file
> and in the driver that interprets the properties?

Hi, Arnd:

This is one of the patch series. The other three patches have been applied by Philipp Zabel and are currently in linux-next.

https://lkml.org/lkml/2020/12/10/697

> 
> The binding file in this case would need to list the old name as deprecated,
> though I'm not sure how that would work without causing a warning about
> the unknown vendor prefix.
> 
>         Arnd
> 
> .
> 


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

* Re: [PATCH v3 2/4] arm64: dts: correct vendor prefix hisi to hisilicon
@ 2021-01-27  1:21       ` Leizhen (ThunderTown)
  0 siblings, 0 replies; 32+ messages in thread
From: Leizhen (ThunderTown) @ 2021-01-27  1:21 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: devicetree, Chen Feng, linux-kernel, Wei Xu, Rob Herring,
	Philipp Zabel, Manivannan Sadhasivam, Zhangfei Gao,
	linux-arm-kernel



On 2021/1/27 6:23, Arnd Bergmann wrote:
> On Tue, Dec 8, 2020 at 1:46 PM Zhen Lei <thunder.leizhen@huawei.com> wrote:
>>
>> The vendor prefix of "Hisilicon Limited" is "hisilicon", it is clearly
>> stated in "vendor-prefixes.yaml".
>>
>> Fixes: 35ca8168133c ("arm64: dts: Add dts files for Hisilicon Hi3660 SoC")
>> Fixes: dd8c7b78c11b ("arm64: dts: Add devicetree for Hisilicon Hi3670 SoC")
>> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
>> Cc: Chen Feng <puck.chen@hisilicon.com>
>> Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> 
> I see this change in the pull request I got, but I'm a bit worried about the
> incompatible binding change. Wouldn't the correct path forward be to
> list both the correct and the incorrect properties, both in the dts file
> and in the driver that interprets the properties?

Hi, Arnd:

This is one of the patch series. The other three patches have been applied by Philipp Zabel and are currently in linux-next.

https://lkml.org/lkml/2020/12/10/697

> 
> The binding file in this case would need to list the old name as deprecated,
> though I'm not sure how that would work without causing a warning about
> the unknown vendor prefix.
> 
>         Arnd
> 
> .
> 


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v3 2/4] arm64: dts: correct vendor prefix hisi to hisilicon
  2021-01-27  0:42       ` Wei Xu
@ 2021-01-28 14:08         ` Arnd Bergmann
  -1 siblings, 0 replies; 32+ messages in thread
From: Arnd Bergmann @ 2021-01-28 14:08 UTC (permalink / raw)
  To: Wei Xu
  Cc: Zhen Lei, Philipp Zabel, Rob Herring, linux-arm-kernel,
	devicetree, linux-kernel, Zhangfei Gao, Chen Feng,
	Manivannan Sadhasivam

On Wed, Jan 27, 2021 at 1:42 AM Wei Xu <xuwei5@hisilicon.com> wrote:
> On 2021/1/27 6:23, Arnd Bergmann wrote:
> > On Tue, Dec 8, 2020 at 1:46 PM Zhen Lei <thunder.leizhen@huawei.com> wrote:
> >>
> >> The vendor prefix of "Hisilicon Limited" is "hisilicon", it is clearly
> >> stated in "vendor-prefixes.yaml".
> >>
> >> Fixes: 35ca8168133c ("arm64: dts: Add dts files for Hisilicon Hi3660 SoC")
> >> Fixes: dd8c7b78c11b ("arm64: dts: Add devicetree for Hisilicon Hi3670 SoC")
> >> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> >> Cc: Chen Feng <puck.chen@hisilicon.com>
> >> Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> >
> > I see this change in the pull request I got, but I'm a bit worried about the
> > incompatible binding change. Wouldn't the correct path forward be to
> > list both the correct and the incorrect properties, both in the dts file
> > and in the driver that interprets the properties?
>
> Thanks for the comment!
> The reset driver will look for "hisilicon" firstly and fall back to "hisi".
> And the DTS is shipped with the driver together.
> So I think there is no compatible issue here.
> Please let me know if missed anything. Thanks!

There are three things that can go wrong here, and this is only addressing
one of them:

1. Updating the kernel on a machine with a dtb provided by the firmware
  is a problem if the new driver can not handle the old properties. This
  is correctly handled by the driver's fallback as soon as both trees
  are merged.

2. Updating the dtb while running an older kernel is now broken since
  the driver can no longer read the property. This is less critical, but
  it does seem easy enough to work around here by leaving both
  properties in place.

3. Bisecting through the git history across an incompatible change
  means you can run into broken commits. We try hard to avoid that
  if we are aware of a problem in advance. In this case it could be
  avoided by only merging the incompatible DT change in a following
  merge window after the driver change, or (better) by making it
  a backward-compatible change the same way as addressing 2.

         Arnd

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

* Re: [PATCH v3 2/4] arm64: dts: correct vendor prefix hisi to hisilicon
@ 2021-01-28 14:08         ` Arnd Bergmann
  0 siblings, 0 replies; 32+ messages in thread
From: Arnd Bergmann @ 2021-01-28 14:08 UTC (permalink / raw)
  To: Wei Xu
  Cc: devicetree, Chen Feng, Manivannan Sadhasivam, linux-kernel,
	Rob Herring, Philipp Zabel, Zhen Lei, Zhangfei Gao,
	linux-arm-kernel

On Wed, Jan 27, 2021 at 1:42 AM Wei Xu <xuwei5@hisilicon.com> wrote:
> On 2021/1/27 6:23, Arnd Bergmann wrote:
> > On Tue, Dec 8, 2020 at 1:46 PM Zhen Lei <thunder.leizhen@huawei.com> wrote:
> >>
> >> The vendor prefix of "Hisilicon Limited" is "hisilicon", it is clearly
> >> stated in "vendor-prefixes.yaml".
> >>
> >> Fixes: 35ca8168133c ("arm64: dts: Add dts files for Hisilicon Hi3660 SoC")
> >> Fixes: dd8c7b78c11b ("arm64: dts: Add devicetree for Hisilicon Hi3670 SoC")
> >> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> >> Cc: Chen Feng <puck.chen@hisilicon.com>
> >> Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> >
> > I see this change in the pull request I got, but I'm a bit worried about the
> > incompatible binding change. Wouldn't the correct path forward be to
> > list both the correct and the incorrect properties, both in the dts file
> > and in the driver that interprets the properties?
>
> Thanks for the comment!
> The reset driver will look for "hisilicon" firstly and fall back to "hisi".
> And the DTS is shipped with the driver together.
> So I think there is no compatible issue here.
> Please let me know if missed anything. Thanks!

There are three things that can go wrong here, and this is only addressing
one of them:

1. Updating the kernel on a machine with a dtb provided by the firmware
  is a problem if the new driver can not handle the old properties. This
  is correctly handled by the driver's fallback as soon as both trees
  are merged.

2. Updating the dtb while running an older kernel is now broken since
  the driver can no longer read the property. This is less critical, but
  it does seem easy enough to work around here by leaving both
  properties in place.

3. Bisecting through the git history across an incompatible change
  means you can run into broken commits. We try hard to avoid that
  if we are aware of a problem in advance. In this case it could be
  avoided by only merging the incompatible DT change in a following
  merge window after the driver change, or (better) by making it
  a backward-compatible change the same way as addressing 2.

         Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v3 2/4] arm64: dts: correct vendor prefix hisi to hisilicon
  2021-01-28 14:08         ` Arnd Bergmann
@ 2021-01-29  1:02           ` Wei Xu
  -1 siblings, 0 replies; 32+ messages in thread
From: Wei Xu @ 2021-01-29  1:02 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Zhen Lei, Philipp Zabel, Rob Herring, linux-arm-kernel,
	devicetree, linux-kernel, Zhangfei Gao, Chen Feng,
	Manivannan Sadhasivam

Hi Arnd,

On 2021/1/28 22:08, Arnd Bergmann wrote:
> On Wed, Jan 27, 2021 at 1:42 AM Wei Xu <xuwei5@hisilicon.com> wrote:
>> On 2021/1/27 6:23, Arnd Bergmann wrote:
>>> On Tue, Dec 8, 2020 at 1:46 PM Zhen Lei <thunder.leizhen@huawei.com> wrote:
>>>>
>>>> The vendor prefix of "Hisilicon Limited" is "hisilicon", it is clearly
>>>> stated in "vendor-prefixes.yaml".
>>>>
>>>> Fixes: 35ca8168133c ("arm64: dts: Add dts files for Hisilicon Hi3660 SoC")
>>>> Fixes: dd8c7b78c11b ("arm64: dts: Add devicetree for Hisilicon Hi3670 SoC")
>>>> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
>>>> Cc: Chen Feng <puck.chen@hisilicon.com>
>>>> Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
>>>
>>> I see this change in the pull request I got, but I'm a bit worried about the
>>> incompatible binding change. Wouldn't the correct path forward be to
>>> list both the correct and the incorrect properties, both in the dts file
>>> and in the driver that interprets the properties?
>>
>> Thanks for the comment!
>> The reset driver will look for "hisilicon" firstly and fall back to "hisi".
>> And the DTS is shipped with the driver together.
>> So I think there is no compatible issue here.
>> Please let me know if missed anything. Thanks!
> 
> There are three things that can go wrong here, and this is only addressing
> one of them:

Thanks for the detailed explanation! 

> 
> 1. Updating the kernel on a machine with a dtb provided by the firmware
>   is a problem if the new driver can not handle the old properties. This
>   is correctly handled by the driver's fallback as soon as both trees
>   are merged.

Agreed and the driver has been merged into the v5.11-rc1.

> 
> 2. Updating the dtb while running an older kernel is now broken since
>   the driver can no longer read the property. This is less critical, but
>   it does seem easy enough to work around here by leaving both
>   properties in place.

Yes, it is.
But if leaving both in place, the dtbs_check will report following warning again:
	'hisi,rst-syscon' does not match any of the regexes

That is why leizhen changed the dtb.
Do you think it is OK to assume no one will use the new dtb with an older kernel?

> 
> 3. Bisecting through the git history across an incompatible change
>   means you can run into broken commits. We try hard to avoid that
>   if we are aware of a problem in advance. In this case it could be
>   avoided by only merging the incompatible DT change in a following
>   merge window after the driver change, or (better) by making it
>   a backward-compatible change the same way as addressing 2.

Yes, agreed.
And The DT change pull request is sent after the driver has been merged into v5.11-rc1.

Really appreciate the detail you went to!

Best Regards,
Wei

> 
>          Arnd
> .
> 

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

* Re: [PATCH v3 2/4] arm64: dts: correct vendor prefix hisi to hisilicon
@ 2021-01-29  1:02           ` Wei Xu
  0 siblings, 0 replies; 32+ messages in thread
From: Wei Xu @ 2021-01-29  1:02 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: devicetree, Chen Feng, Manivannan Sadhasivam, linux-kernel,
	Rob Herring, Philipp Zabel, Zhen Lei, Zhangfei Gao,
	linux-arm-kernel

Hi Arnd,

On 2021/1/28 22:08, Arnd Bergmann wrote:
> On Wed, Jan 27, 2021 at 1:42 AM Wei Xu <xuwei5@hisilicon.com> wrote:
>> On 2021/1/27 6:23, Arnd Bergmann wrote:
>>> On Tue, Dec 8, 2020 at 1:46 PM Zhen Lei <thunder.leizhen@huawei.com> wrote:
>>>>
>>>> The vendor prefix of "Hisilicon Limited" is "hisilicon", it is clearly
>>>> stated in "vendor-prefixes.yaml".
>>>>
>>>> Fixes: 35ca8168133c ("arm64: dts: Add dts files for Hisilicon Hi3660 SoC")
>>>> Fixes: dd8c7b78c11b ("arm64: dts: Add devicetree for Hisilicon Hi3670 SoC")
>>>> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
>>>> Cc: Chen Feng <puck.chen@hisilicon.com>
>>>> Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
>>>
>>> I see this change in the pull request I got, but I'm a bit worried about the
>>> incompatible binding change. Wouldn't the correct path forward be to
>>> list both the correct and the incorrect properties, both in the dts file
>>> and in the driver that interprets the properties?
>>
>> Thanks for the comment!
>> The reset driver will look for "hisilicon" firstly and fall back to "hisi".
>> And the DTS is shipped with the driver together.
>> So I think there is no compatible issue here.
>> Please let me know if missed anything. Thanks!
> 
> There are three things that can go wrong here, and this is only addressing
> one of them:

Thanks for the detailed explanation! 

> 
> 1. Updating the kernel on a machine with a dtb provided by the firmware
>   is a problem if the new driver can not handle the old properties. This
>   is correctly handled by the driver's fallback as soon as both trees
>   are merged.

Agreed and the driver has been merged into the v5.11-rc1.

> 
> 2. Updating the dtb while running an older kernel is now broken since
>   the driver can no longer read the property. This is less critical, but
>   it does seem easy enough to work around here by leaving both
>   properties in place.

Yes, it is.
But if leaving both in place, the dtbs_check will report following warning again:
	'hisi,rst-syscon' does not match any of the regexes

That is why leizhen changed the dtb.
Do you think it is OK to assume no one will use the new dtb with an older kernel?

> 
> 3. Bisecting through the git history across an incompatible change
>   means you can run into broken commits. We try hard to avoid that
>   if we are aware of a problem in advance. In this case it could be
>   avoided by only merging the incompatible DT change in a following
>   merge window after the driver change, or (better) by making it
>   a backward-compatible change the same way as addressing 2.

Yes, agreed.
And The DT change pull request is sent after the driver has been merged into v5.11-rc1.

Really appreciate the detail you went to!

Best Regards,
Wei

> 
>          Arnd
> .
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v3 2/4] arm64: dts: correct vendor prefix hisi to hisilicon
  2021-01-29  1:02           ` Wei Xu
@ 2021-01-29  1:55             ` Wei Xu
  -1 siblings, 0 replies; 32+ messages in thread
From: Wei Xu @ 2021-01-29  1:55 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Zhen Lei, Philipp Zabel, Rob Herring, linux-arm-kernel,
	devicetree, linux-kernel, Zhangfei Gao, Chen Feng,
	Manivannan Sadhasivam, Mauro Carvalho Chehab

Hi Arnd,

On 2021/1/29 9:02, Wei Xu wrote:
> Hi Arnd,
> 
> On 2021/1/28 22:08, Arnd Bergmann wrote:
>> On Wed, Jan 27, 2021 at 1:42 AM Wei Xu <xuwei5@hisilicon.com> wrote:
>>> On 2021/1/27 6:23, Arnd Bergmann wrote:
>>>> On Tue, Dec 8, 2020 at 1:46 PM Zhen Lei <thunder.leizhen@huawei.com> wrote:
>>>>>
>>>>> The vendor prefix of "Hisilicon Limited" is "hisilicon", it is clearly
>>>>> stated in "vendor-prefixes.yaml".
>>>>>
>>>>> Fixes: 35ca8168133c ("arm64: dts: Add dts files for Hisilicon Hi3660 SoC")
>>>>> Fixes: dd8c7b78c11b ("arm64: dts: Add devicetree for Hisilicon Hi3670 SoC")
>>>>> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
>>>>> Cc: Chen Feng <puck.chen@hisilicon.com>
>>>>> Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
>>>>
>>>> I see this change in the pull request I got, but I'm a bit worried about the
>>>> incompatible binding change. Wouldn't the correct path forward be to
>>>> list both the correct and the incorrect properties, both in the dts file
>>>> and in the driver that interprets the properties?
>>>
>>> Thanks for the comment!
>>> The reset driver will look for "hisilicon" firstly and fall back to "hisi".
>>> And the DTS is shipped with the driver together.
>>> So I think there is no compatible issue here.
>>> Please let me know if missed anything. Thanks!
>>
>> There are three things that can go wrong here, and this is only addressing
>> one of them:
> 
> Thanks for the detailed explanation! 
> 
>>
>> 1. Updating the kernel on a machine with a dtb provided by the firmware
>>   is a problem if the new driver can not handle the old properties. This
>>   is correctly handled by the driver's fallback as soon as both trees
>>   are merged.
> 
> Agreed and the driver has been merged into the v5.11-rc1.

Sorry, I made a mistake. It has been merged into linux-next *not* the v5.11-rc1.

> 
>>
>> 2. Updating the dtb while running an older kernel is now broken since
>>   the driver can no longer read the property. This is less critical, but
>>   it does seem easy enough to work around here by leaving both
>>   properties in place.
> 
> Yes, it is.
> But if leaving both in place, the dtbs_check will report following warning again:
> 	'hisi,rst-syscon' does not match any of the regexes
> 
> That is why leizhen changed the dtb.
> Do you think it is OK to assume no one will use the new dtb with an older kernel?
> 
>>
>> 3. Bisecting through the git history across an incompatible change
>>   means you can run into broken commits. We try hard to avoid that
>>   if we are aware of a problem in advance. In this case it could be
>>   avoided by only merging the incompatible DT change in a following
>>   merge window after the driver change, or (better) by making it
>>   a backward-compatible change the same way as addressing 2.
> 
> Yes, agreed.
> And The DT change pull request is sent after the driver has been merged into v5.11-rc1.

I can drop this patch and revert what I have changed in Mauro's following patch:
	"arm64: dts: hisilicon: hi3670.dtsi: add iomcu_rst"

Then resend the pull request. And pick up this patch after the next merge window.
Do you think is it OK?
Thanks!

Best Regards,
Wei

> 
> Really appreciate the detail you went to!
> 
> Best Regards,
> Wei
> 
>>
>>          Arnd
>> .
>>

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

* Re: [PATCH v3 2/4] arm64: dts: correct vendor prefix hisi to hisilicon
@ 2021-01-29  1:55             ` Wei Xu
  0 siblings, 0 replies; 32+ messages in thread
From: Wei Xu @ 2021-01-29  1:55 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: devicetree, Mauro Carvalho Chehab, Chen Feng,
	Manivannan Sadhasivam, linux-kernel, Rob Herring, Philipp Zabel,
	Zhen Lei, Zhangfei Gao, linux-arm-kernel

Hi Arnd,

On 2021/1/29 9:02, Wei Xu wrote:
> Hi Arnd,
> 
> On 2021/1/28 22:08, Arnd Bergmann wrote:
>> On Wed, Jan 27, 2021 at 1:42 AM Wei Xu <xuwei5@hisilicon.com> wrote:
>>> On 2021/1/27 6:23, Arnd Bergmann wrote:
>>>> On Tue, Dec 8, 2020 at 1:46 PM Zhen Lei <thunder.leizhen@huawei.com> wrote:
>>>>>
>>>>> The vendor prefix of "Hisilicon Limited" is "hisilicon", it is clearly
>>>>> stated in "vendor-prefixes.yaml".
>>>>>
>>>>> Fixes: 35ca8168133c ("arm64: dts: Add dts files for Hisilicon Hi3660 SoC")
>>>>> Fixes: dd8c7b78c11b ("arm64: dts: Add devicetree for Hisilicon Hi3670 SoC")
>>>>> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
>>>>> Cc: Chen Feng <puck.chen@hisilicon.com>
>>>>> Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
>>>>
>>>> I see this change in the pull request I got, but I'm a bit worried about the
>>>> incompatible binding change. Wouldn't the correct path forward be to
>>>> list both the correct and the incorrect properties, both in the dts file
>>>> and in the driver that interprets the properties?
>>>
>>> Thanks for the comment!
>>> The reset driver will look for "hisilicon" firstly and fall back to "hisi".
>>> And the DTS is shipped with the driver together.
>>> So I think there is no compatible issue here.
>>> Please let me know if missed anything. Thanks!
>>
>> There are three things that can go wrong here, and this is only addressing
>> one of them:
> 
> Thanks for the detailed explanation! 
> 
>>
>> 1. Updating the kernel on a machine with a dtb provided by the firmware
>>   is a problem if the new driver can not handle the old properties. This
>>   is correctly handled by the driver's fallback as soon as both trees
>>   are merged.
> 
> Agreed and the driver has been merged into the v5.11-rc1.

Sorry, I made a mistake. It has been merged into linux-next *not* the v5.11-rc1.

> 
>>
>> 2. Updating the dtb while running an older kernel is now broken since
>>   the driver can no longer read the property. This is less critical, but
>>   it does seem easy enough to work around here by leaving both
>>   properties in place.
> 
> Yes, it is.
> But if leaving both in place, the dtbs_check will report following warning again:
> 	'hisi,rst-syscon' does not match any of the regexes
> 
> That is why leizhen changed the dtb.
> Do you think it is OK to assume no one will use the new dtb with an older kernel?
> 
>>
>> 3. Bisecting through the git history across an incompatible change
>>   means you can run into broken commits. We try hard to avoid that
>>   if we are aware of a problem in advance. In this case it could be
>>   avoided by only merging the incompatible DT change in a following
>>   merge window after the driver change, or (better) by making it
>>   a backward-compatible change the same way as addressing 2.
> 
> Yes, agreed.
> And The DT change pull request is sent after the driver has been merged into v5.11-rc1.

I can drop this patch and revert what I have changed in Mauro's following patch:
	"arm64: dts: hisilicon: hi3670.dtsi: add iomcu_rst"

Then resend the pull request. And pick up this patch after the next merge window.
Do you think is it OK?
Thanks!

Best Regards,
Wei

> 
> Really appreciate the detail you went to!
> 
> Best Regards,
> Wei
> 
>>
>>          Arnd
>> .
>>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v3 2/4] arm64: dts: correct vendor prefix hisi to hisilicon
  2021-01-29  1:55             ` Wei Xu
  (?)
@ 2021-01-29  8:21             ` Arnd Bergmann
  2021-01-29  8:27               ` Wei Xu
  -1 siblings, 1 reply; 32+ messages in thread
From: Arnd Bergmann @ 2021-01-29  8:21 UTC (permalink / raw)
  To: Wei Xu
  Cc: devicetree, Mauro Carvalho Chehab, Chen Feng,
	Manivannan Sadhasivam, linux-kernel, Rob Herring, Philipp Zabel,
	Zhen Lei, Zhangfei Gao, linux-arm-kernel

On Fri, Jan 29, 2021 at 2:57 AM Wei Xu <xuwei5@hisilicon.com> wrote:
> On 2021/1/29 9:02, Wei Xu wrote:
> > On 2021/1/28 22:08, Arnd Bergmann wrote:
> >> 2. Updating the dtb while running an older kernel is now broken since
> >>   the driver can no longer read the property. This is less critical, but
> >>   it does seem easy enough to work around here by leaving both
> >>   properties in place.
> >
> > Yes, it is.
> > But if leaving both in place, the dtbs_check will report following warning again:
> >       'hisi,rst-syscon' does not match any of the regexes
> >
> > That is why leizhen changed the dtb.
> > Do you think it is OK to assume no one will use the new dtb with an older kernel?
> >
> >>
> >> 3. Bisecting through the git history across an incompatible change
> >>   means you can run into broken commits. We try hard to avoid that
> >>   if we are aware of a problem in advance. In this case it could be
> >>   avoided by only merging the incompatible DT change in a following
> >>   merge window after the driver change, or (better) by making it
> >>   a backward-compatible change the same way as addressing 2.
> >
> > Yes, agreed.
> > And The DT change pull request is sent after the driver has been merged into v5.11-rc1.
>
> I can drop this patch and revert what I have changed in Mauro's following patch:
>         "arm64: dts: hisilicon: hi3670.dtsi: add iomcu_rst"
>
> Then resend the pull request. And pick up this patch after the next merge window.
> Do you think is it OK?

Let's start with the updated pull request without this patch so I can merge
the other changes you sent.

I'm still not convinced it helps to drop the property rather than having
both. I think it should be possible to list the old property name in the
binding as 'deprecated' and keep it in the .dts for backwards compatibility
but leave it out in future dts files. Maybe move it into the board .dts file(s)
and make the .dtsi file have only the new property.

      Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v3 2/4] arm64: dts: correct vendor prefix hisi to hisilicon
  2021-01-29  8:21             ` Arnd Bergmann
@ 2021-01-29  8:27               ` Wei Xu
  0 siblings, 0 replies; 32+ messages in thread
From: Wei Xu @ 2021-01-29  8:27 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: devicetree, Mauro Carvalho Chehab, Chen Feng,
	Manivannan Sadhasivam, linux-kernel, Rob Herring, Philipp Zabel,
	Zhen Lei, Zhangfei Gao, linux-arm-kernel

Hi Arnd,

On 2021/1/29 16:21, Arnd Bergmann wrote:
> On Fri, Jan 29, 2021 at 2:57 AM Wei Xu <xuwei5@hisilicon.com> wrote:
>> On 2021/1/29 9:02, Wei Xu wrote:
>>> On 2021/1/28 22:08, Arnd Bergmann wrote:
>>>> 2. Updating the dtb while running an older kernel is now broken since
>>>>   the driver can no longer read the property. This is less critical, but
>>>>   it does seem easy enough to work around here by leaving both
>>>>   properties in place.
>>>
>>> Yes, it is.
>>> But if leaving both in place, the dtbs_check will report following warning again:
>>>       'hisi,rst-syscon' does not match any of the regexes
>>>
>>> That is why leizhen changed the dtb.
>>> Do you think it is OK to assume no one will use the new dtb with an older kernel?
>>>
>>>>
>>>> 3. Bisecting through the git history across an incompatible change
>>>>   means you can run into broken commits. We try hard to avoid that
>>>>   if we are aware of a problem in advance. In this case it could be
>>>>   avoided by only merging the incompatible DT change in a following
>>>>   merge window after the driver change, or (better) by making it
>>>>   a backward-compatible change the same way as addressing 2.
>>>
>>> Yes, agreed.
>>> And The DT change pull request is sent after the driver has been merged into v5.11-rc1.
>>
>> I can drop this patch and revert what I have changed in Mauro's following patch:
>>         "arm64: dts: hisilicon: hi3670.dtsi: add iomcu_rst"
>>
>> Then resend the pull request. And pick up this patch after the next merge window.
>> Do you think is it OK?
> 
> Let's start with the updated pull request without this patch so I can merge
> the other changes you sent.

Got it. Thanks!

> 
> I'm still not convinced it helps to drop the property rather than having
> both. I think it should be possible to list the old property name in the
> binding as 'deprecated' and keep it in the .dts for backwards compatibility
> but leave it out in future dts files. Maybe move it into the board .dts file(s)
> and make the .dtsi file have only the new property.

Thanks!
I will check with Lei Zhen to see which is possible.

Best Regards,
Wei

> 
>       Arnd
> .
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2021-01-29  8:30 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-08 12:46 [PATCH v3 0/4] dt-bindings: reset: convert Hisilicon reset controller bindings to json-schema Zhen Lei
2020-12-08 12:46 ` Zhen Lei
2020-12-08 12:46 ` [PATCH v3 1/4] reset: hisilicon: correct vendor prefix Zhen Lei
2020-12-08 12:46   ` Zhen Lei
2020-12-08 12:46 ` [PATCH v3 2/4] arm64: dts: correct vendor prefix hisi to hisilicon Zhen Lei
2020-12-08 12:46   ` Zhen Lei
2021-01-26  8:53   ` Wei Xu
2021-01-26  8:53     ` Wei Xu
2021-01-26 22:23   ` Arnd Bergmann
2021-01-26 22:23     ` Arnd Bergmann
2021-01-27  0:42     ` Wei Xu
2021-01-27  0:42       ` Wei Xu
2021-01-28 14:08       ` Arnd Bergmann
2021-01-28 14:08         ` Arnd Bergmann
2021-01-29  1:02         ` Wei Xu
2021-01-29  1:02           ` Wei Xu
2021-01-29  1:55           ` Wei Xu
2021-01-29  1:55             ` Wei Xu
2021-01-29  8:21             ` Arnd Bergmann
2021-01-29  8:27               ` Wei Xu
2021-01-27  1:21     ` Leizhen (ThunderTown)
2021-01-27  1:21       ` Leizhen (ThunderTown)
2020-12-08 12:46 ` [PATCH v3 3/4] dt-bindings: reset: " Zhen Lei
2020-12-08 12:46   ` Zhen Lei
2020-12-10 14:01   ` Rob Herring
2020-12-10 14:01     ` Rob Herring
2020-12-08 12:46 ` [PATCH v3 4/4] dt-bindings: reset: convert Hisilicon reset controller bindings to json-schema Zhen Lei
2020-12-08 12:46   ` Zhen Lei
2020-12-10 14:02   ` Rob Herring
2020-12-10 14:02     ` Rob Herring
2020-12-10 15:06 ` [PATCH v3 0/4] " Philipp Zabel
2020-12-10 15:06   ` Philipp Zabel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.