linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] dt-bindings: reset: convert Hisilicon reset controller bindings to json-schema
@ 2020-12-04  1:42 Zhen Lei
  2020-12-04  1:42 ` [PATCH v2 1/3] reset: hisilicon: correct vendor prefix Zhen Lei
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Zhen Lei @ 2020-12-04  1:42 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

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 (3):
  reset: hisilicon: correct vendor prefix
  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             |  2 +-
 5 files changed, 81 insertions(+), 48 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] 11+ messages in thread

* [PATCH v2 1/3] reset: hisilicon: correct vendor prefix
  2020-12-04  1:42 [PATCH v2 0/3] dt-bindings: reset: convert Hisilicon reset controller bindings to json-schema Zhen Lei
@ 2020-12-04  1:42 ` Zhen Lei
  2020-12-07 23:08   ` Rob Herring
  2020-12-08  9:25   ` Philipp Zabel
  2020-12-04  1:42 ` [PATCH v2 2/3] dt-bindings: reset: correct vendor prefix hisi to hisilicon Zhen Lei
  2020-12-04  1:42 ` [PATCH v2 3/3] dt-bindings: reset: convert Hisilicon reset controller bindings to json-schema Zhen Lei
  2 siblings, 2 replies; 11+ messages in thread
From: Zhen Lei @ 2020-12-04  1:42 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: 1527058736fa ("reset: hisilicon: add reset-hi3660")
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: Zhangfei Gao <zhangfei.gao@linaro.org>
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 +-
 drivers/reset/hisilicon/reset-hi3660.c    | 2 +-
 3 files changed, 4 insertions(+), 4 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 {
diff --git a/drivers/reset/hisilicon/reset-hi3660.c b/drivers/reset/hisilicon/reset-hi3660.c
index a7d4445924e558c..8f1953159a65b31 100644
--- a/drivers/reset/hisilicon/reset-hi3660.c
+++ b/drivers/reset/hisilicon/reset-hi3660.c
@@ -83,7 +83,7 @@ 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 (IS_ERR(rc->map)) {
 		dev_err(dev, "failed to get hi3660,rst-syscon\n");
 		return PTR_ERR(rc->map);
-- 
1.8.3



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

* [PATCH v2 2/3] dt-bindings: reset: correct vendor prefix hisi to hisilicon
  2020-12-04  1:42 [PATCH v2 0/3] dt-bindings: reset: convert Hisilicon reset controller bindings to json-schema Zhen Lei
  2020-12-04  1:42 ` [PATCH v2 1/3] reset: hisilicon: correct vendor prefix Zhen Lei
@ 2020-12-04  1:42 ` Zhen Lei
  2020-12-04  1:42 ` [PATCH v2 3/3] dt-bindings: reset: convert Hisilicon reset controller bindings to json-schema Zhen Lei
  2 siblings, 0 replies; 11+ messages in thread
From: Zhen Lei @ 2020-12-04  1:42 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: 1527058736fa ("reset: hisilicon: add reset-hi3660")
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	[flat|nested] 11+ messages in thread

* [PATCH v2 3/3] dt-bindings: reset: convert Hisilicon reset controller bindings to json-schema
  2020-12-04  1:42 [PATCH v2 0/3] dt-bindings: reset: convert Hisilicon reset controller bindings to json-schema Zhen Lei
  2020-12-04  1:42 ` [PATCH v2 1/3] reset: hisilicon: correct vendor prefix Zhen Lei
  2020-12-04  1:42 ` [PATCH v2 2/3] dt-bindings: reset: correct vendor prefix hisi to hisilicon Zhen Lei
@ 2020-12-04  1:42 ` Zhen Lei
  2020-12-07 23:10   ` Rob Herring
  2 siblings, 1 reply; 11+ messages in thread
From: Zhen Lei @ 2020-12-04  1:42 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	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 1/3] reset: hisilicon: correct vendor prefix
  2020-12-04  1:42 ` [PATCH v2 1/3] reset: hisilicon: correct vendor prefix Zhen Lei
@ 2020-12-07 23:08   ` Rob Herring
  2020-12-08  2:16     ` Leizhen (ThunderTown)
  2020-12-08  9:25   ` Philipp Zabel
  1 sibling, 1 reply; 11+ messages in thread
From: Rob Herring @ 2020-12-07 23:08 UTC (permalink / raw)
  To: Zhen Lei
  Cc: Philipp Zabel, Wei Xu, linux-arm-kernel, devicetree,
	linux-kernel, Zhangfei Gao, Chen Feng, Manivannan Sadhasivam

On Fri, Dec 04, 2020 at 09:42:34AM +0800, Zhen Lei wrote:
> The vendor prefix of "Hisilicon Limited" is "hisilicon", it is clearly
> stated in "vendor-prefixes.yaml".

Yes, but you can't fix this as changing it breaks compability between 
DTBs and kernels.

hisi has to be documented and marked 'deprecated'.

> 
> Fixes: 1527058736fa ("reset: hisilicon: add reset-hi3660")
> 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: Zhangfei Gao <zhangfei.gao@linaro.org>
> 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 +-
>  drivers/reset/hisilicon/reset-hi3660.c    | 2 +-
>  3 files changed, 4 insertions(+), 4 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 {
> diff --git a/drivers/reset/hisilicon/reset-hi3660.c b/drivers/reset/hisilicon/reset-hi3660.c
> index a7d4445924e558c..8f1953159a65b31 100644
> --- a/drivers/reset/hisilicon/reset-hi3660.c
> +++ b/drivers/reset/hisilicon/reset-hi3660.c
> @@ -83,7 +83,7 @@ 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 (IS_ERR(rc->map)) {
>  		dev_err(dev, "failed to get hi3660,rst-syscon\n");
>  		return PTR_ERR(rc->map);
> -- 
> 1.8.3
> 
> 

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

* Re: [PATCH v2 3/3] dt-bindings: reset: convert Hisilicon reset controller bindings to json-schema
  2020-12-04  1:42 ` [PATCH v2 3/3] dt-bindings: reset: convert Hisilicon reset controller bindings to json-schema Zhen Lei
@ 2020-12-07 23:10   ` Rob Herring
  2020-12-08  3:07     ` Leizhen (ThunderTown)
  0 siblings, 1 reply; 11+ messages in thread
From: Rob Herring @ 2020-12-07 23:10 UTC (permalink / raw)
  To: Zhen Lei
  Cc: Philipp Zabel, Wei Xu, linux-arm-kernel, devicetree,
	linux-kernel, Zhangfei Gao, Chen Feng, Manivannan Sadhasivam

On Fri, Dec 04, 2020 at 09:42:36AM +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
> 
> 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>;

Really, if you are going to break things, this node should be a child of 
iomcu instead and you don't need this property (just get the parent). Or 
just add '#reset-cells' to 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	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 1/3] reset: hisilicon: correct vendor prefix
  2020-12-07 23:08   ` Rob Herring
@ 2020-12-08  2:16     ` Leizhen (ThunderTown)
  2020-12-08 19:30       ` Rob Herring
  0 siblings, 1 reply; 11+ messages in thread
From: Leizhen (ThunderTown) @ 2020-12-08  2:16 UTC (permalink / raw)
  To: Rob Herring
  Cc: Philipp Zabel, Wei Xu, linux-arm-kernel, devicetree,
	linux-kernel, Zhangfei Gao, Chen Feng, Manivannan Sadhasivam



On 2020/12/8 7:08, Rob Herring wrote:
> On Fri, Dec 04, 2020 at 09:42:34AM +0800, Zhen Lei wrote:
>> The vendor prefix of "Hisilicon Limited" is "hisilicon", it is clearly
>> stated in "vendor-prefixes.yaml".
> 
> Yes, but you can't fix this as changing it breaks compability between 
> DTBs and kernels.
> 
> hisi has to be documented and marked 'deprecated'.

I searched, and this is the only place that uses the hisi prefix. Currently,
YAML check will report warnings due to mismatch any of the regexes defined
in Documentation/devicetree/bindings/vendor-prefixes.yaml

Is it not good to add hisi prefix to clear warnings?
"^hisi,.*":
  description: Hisilicon Limited, deprecated.


By the way, Hi Rob:
The license information in some YAML files is incorrect. Can you correct it in v5.11?
For example:
WARNING: DT binding documents should be licensed (GPL-2.0-only OR BSD-2-Clause)
#26: FILE: Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml:1:
+# SPDX-License-Identifier: GPL-2.0

> 
>>
>> Fixes: 1527058736fa ("reset: hisilicon: add reset-hi3660")
>> 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: Zhangfei Gao <zhangfei.gao@linaro.org>
>> 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 +-
>>  drivers/reset/hisilicon/reset-hi3660.c    | 2 +-
>>  3 files changed, 4 insertions(+), 4 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 {
>> diff --git a/drivers/reset/hisilicon/reset-hi3660.c b/drivers/reset/hisilicon/reset-hi3660.c
>> index a7d4445924e558c..8f1953159a65b31 100644
>> --- a/drivers/reset/hisilicon/reset-hi3660.c
>> +++ b/drivers/reset/hisilicon/reset-hi3660.c
>> @@ -83,7 +83,7 @@ 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 (IS_ERR(rc->map)) {
>>  		dev_err(dev, "failed to get hi3660,rst-syscon\n");
>>  		return PTR_ERR(rc->map);
>> -- 
>> 1.8.3
>>
>>
> 
> .
> 


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

* Re: [PATCH v2 3/3] dt-bindings: reset: convert Hisilicon reset controller bindings to json-schema
  2020-12-07 23:10   ` Rob Herring
@ 2020-12-08  3:07     ` Leizhen (ThunderTown)
  0 siblings, 0 replies; 11+ messages in thread
From: Leizhen (ThunderTown) @ 2020-12-08  3:07 UTC (permalink / raw)
  To: Rob Herring
  Cc: Philipp Zabel, Wei Xu, linux-arm-kernel, devicetree,
	linux-kernel, Zhangfei Gao, Chen Feng, Manivannan Sadhasivam



On 2020/12/8 7:10, Rob Herring wrote:
> On Fri, Dec 04, 2020 at 09:42:36AM +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
>>
>> 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>;
> 
> Really, if you are going to break things, this node should be a child of 
> iomcu instead and you don't need this property (just get the parent). Or 
> just add '#reset-cells' to iomcu.

There are two compatible strings, which belong to two different functional
modules. This should be done to keep the code architecture clear.

drivers/clk/hisilicon/clk-hi3660.c		//compatible = "hisilicon,hi3660-iomcu"
drivers/reset/hisilicon/reset-hi3660.c		//compatible = "hisilicon,hi3660-reset"

> 
>> +        #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	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 1/3] reset: hisilicon: correct vendor prefix
  2020-12-04  1:42 ` [PATCH v2 1/3] reset: hisilicon: correct vendor prefix Zhen Lei
  2020-12-07 23:08   ` Rob Herring
@ 2020-12-08  9:25   ` Philipp Zabel
  2020-12-08 11:29     ` Leizhen (ThunderTown)
  1 sibling, 1 reply; 11+ messages in thread
From: Philipp Zabel @ 2020-12-08  9:25 UTC (permalink / raw)
  To: Zhen Lei, Wei Xu, Rob Herring, linux-arm-kernel, devicetree,
	linux-kernel
  Cc: Zhangfei Gao, Chen Feng, Manivannan Sadhasivam

Hi Zhen,

On Fri, 2020-12-04 at 09:42 +0800, Zhen Lei wrote:
> The vendor prefix of "Hisilicon Limited" is "hisilicon", it is clearly
> stated in "vendor-prefixes.yaml".
> 
> Fixes: 1527058736fa ("reset: hisilicon: add reset-hi3660")
> 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: Zhangfei Gao <zhangfei.gao@linaro.org>
> 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 +-
>  drivers/reset/hisilicon/reset-hi3660.c    | 2 +-

Please keep device tree patches and reset driver patch separate, as they
were in v1.

>  3 files changed, 4 insertions(+), 4 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 {
> diff --git a/drivers/reset/hisilicon/reset-hi3660.c b/drivers/reset/hisilicon/reset-hi3660.c
> index a7d4445924e558c..8f1953159a65b31 100644
> --- a/drivers/reset/hisilicon/reset-hi3660.c
> +++ b/drivers/reset/hisilicon/reset-hi3660.c
> @@ -83,7 +83,7 @@ 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");

This should fall back to the deprecated compatible, for example:

	rc->map = syscon_regmap_lookup_by_phandle(np, "hisilicon,rst-syscon");
	if (PTR_ERR(rc->map) == -ENODEV)
		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");
>  		return PTR_ERR(rc->map);

regards
Philipp

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

* Re: [PATCH v2 1/3] reset: hisilicon: correct vendor prefix
  2020-12-08  9:25   ` Philipp Zabel
@ 2020-12-08 11:29     ` Leizhen (ThunderTown)
  0 siblings, 0 replies; 11+ messages in thread
From: Leizhen (ThunderTown) @ 2020-12-08 11:29 UTC (permalink / raw)
  To: Philipp Zabel, Wei Xu, Rob Herring, linux-arm-kernel, devicetree,
	linux-kernel
  Cc: Zhangfei Gao, Chen Feng, Manivannan Sadhasivam



On 2020/12/8 17:25, Philipp Zabel wrote:
> Hi Zhen,
> 
> On Fri, 2020-12-04 at 09:42 +0800, Zhen Lei wrote:
>> The vendor prefix of "Hisilicon Limited" is "hisilicon", it is clearly
>> stated in "vendor-prefixes.yaml".
>>
>> Fixes: 1527058736fa ("reset: hisilicon: add reset-hi3660")
>> 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: Zhangfei Gao <zhangfei.gao@linaro.org>
>> 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 +-
>>  drivers/reset/hisilicon/reset-hi3660.c    | 2 +-
> 
> Please keep device tree patches and reset driver patch separate, as they
> were in v1.

OK

> 
>>  3 files changed, 4 insertions(+), 4 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 {
>> diff --git a/drivers/reset/hisilicon/reset-hi3660.c b/drivers/reset/hisilicon/reset-hi3660.c
>> index a7d4445924e558c..8f1953159a65b31 100644
>> --- a/drivers/reset/hisilicon/reset-hi3660.c
>> +++ b/drivers/reset/hisilicon/reset-hi3660.c
>> @@ -83,7 +83,7 @@ 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");
> 
> This should fall back to the deprecated compatible, for example:
> 
> 	rc->map = syscon_regmap_lookup_by_phandle(np, "hisilicon,rst-syscon");
> 	if (PTR_ERR(rc->map) == -ENODEV)
> 		rc->map = syscon_regmap_lookup_by_phandle(np, "hisi,rst-
> syscon");

Oh, thanks. I misunderstood your suggestion the other day. I'll fix it right away.

> 
>>  	if (IS_ERR(rc->map)) {
>>  		dev_err(dev, "failed to get hi3660,rst-syscon\n");
>>  		return PTR_ERR(rc->map);
> 
> regards
> Philipp
> 
> .
> 


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

* Re: [PATCH v2 1/3] reset: hisilicon: correct vendor prefix
  2020-12-08  2:16     ` Leizhen (ThunderTown)
@ 2020-12-08 19:30       ` Rob Herring
  0 siblings, 0 replies; 11+ messages in thread
From: Rob Herring @ 2020-12-08 19:30 UTC (permalink / raw)
  To: Leizhen (ThunderTown)
  Cc: Philipp Zabel, Wei Xu, linux-arm-kernel, devicetree,
	linux-kernel, Zhangfei Gao, Chen Feng, Manivannan Sadhasivam

On Mon, Dec 7, 2020 at 8:16 PM Leizhen (ThunderTown)
<thunder.leizhen@huawei.com> wrote:
>
>
>
> On 2020/12/8 7:08, Rob Herring wrote:
> > On Fri, Dec 04, 2020 at 09:42:34AM +0800, Zhen Lei wrote:
> >> The vendor prefix of "Hisilicon Limited" is "hisilicon", it is clearly
> >> stated in "vendor-prefixes.yaml".
> >
> > Yes, but you can't fix this as changing it breaks compability between
> > DTBs and kernels.
> >
> > hisi has to be documented and marked 'deprecated'.
>
> I searched, and this is the only place that uses the hisi prefix. Currently,
> YAML check will report warnings due to mismatch any of the regexes defined
> in Documentation/devicetree/bindings/vendor-prefixes.yaml
>
> Is it not good to add hisi prefix to clear warnings?
> "^hisi,.*":
>   description: Hisilicon Limited, deprecated.
>
>
> By the way, Hi Rob:
> The license information in some YAML files is incorrect. Can you correct it in v5.11?
> For example:
> WARNING: DT binding documents should be licensed (GPL-2.0-only OR BSD-2-Clause)
> #26: FILE: Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml:1:
> +# SPDX-License-Identifier: GPL-2.0

No, I can't change them. I'm not the copyright holder. The ones that
are not dual licensed are most likely converted from the old text
bindings which were default GPL2.

Rob

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

end of thread, other threads:[~2020-12-08 20:26 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-04  1:42 [PATCH v2 0/3] dt-bindings: reset: convert Hisilicon reset controller bindings to json-schema Zhen Lei
2020-12-04  1:42 ` [PATCH v2 1/3] reset: hisilicon: correct vendor prefix Zhen Lei
2020-12-07 23:08   ` Rob Herring
2020-12-08  2:16     ` Leizhen (ThunderTown)
2020-12-08 19:30       ` Rob Herring
2020-12-08  9:25   ` Philipp Zabel
2020-12-08 11:29     ` Leizhen (ThunderTown)
2020-12-04  1:42 ` [PATCH v2 2/3] dt-bindings: reset: correct vendor prefix hisi to hisilicon Zhen Lei
2020-12-04  1:42 ` [PATCH v2 3/3] dt-bindings: reset: convert Hisilicon reset controller bindings to json-schema Zhen Lei
2020-12-07 23:10   ` Rob Herring
2020-12-08  3:07     ` Leizhen (ThunderTown)

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).