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

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             |  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] 7+ messages in thread

* [PATCH 1/4] reset: hisilicon: correct vendor prefix
  2020-12-03 12:02 [PATCH 0/4] dt-bindings: reset: convert Hisilicon reset controller bindings to json-schema Zhen Lei
@ 2020-12-03 12:02 ` Zhen Lei
  2020-12-03 12:54   ` Philipp Zabel
  2020-12-03 12:02 ` [PATCH 2/4] arm64: dts: correct vendor prefix hisi to hisilicon Zhen Lei
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Zhen Lei @ 2020-12-03 12:02 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")
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Cc: Zhangfei Gao <zhangfei.gao@linaro.org>
---
 drivers/reset/hisilicon/reset-hi3660.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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] 7+ messages in thread

* [PATCH 2/4] arm64: dts: correct vendor prefix hisi to hisilicon
  2020-12-03 12:02 [PATCH 0/4] dt-bindings: reset: convert Hisilicon reset controller bindings to json-schema Zhen Lei
  2020-12-03 12:02 ` [PATCH 1/4] reset: hisilicon: correct vendor prefix Zhen Lei
@ 2020-12-03 12:02 ` Zhen Lei
  2020-12-03 12:02 ` [PATCH 3/4] dt-bindings: reset: " Zhen Lei
  2020-12-03 12:02 ` [PATCH 4/4] dt-bindings: reset: convert Hisilicon reset controller bindings to json-schema Zhen Lei
  3 siblings, 0 replies; 7+ messages in thread
From: Zhen Lei @ 2020-12-03 12:02 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	[flat|nested] 7+ messages in thread

* [PATCH 3/4] dt-bindings: reset: correct vendor prefix hisi to hisilicon
  2020-12-03 12:02 [PATCH 0/4] dt-bindings: reset: convert Hisilicon reset controller bindings to json-schema Zhen Lei
  2020-12-03 12:02 ` [PATCH 1/4] reset: hisilicon: correct vendor prefix Zhen Lei
  2020-12-03 12:02 ` [PATCH 2/4] arm64: dts: correct vendor prefix hisi to hisilicon Zhen Lei
@ 2020-12-03 12:02 ` Zhen Lei
  2020-12-03 12:02 ` [PATCH 4/4] dt-bindings: reset: convert Hisilicon reset controller bindings to json-schema Zhen Lei
  3 siblings, 0 replies; 7+ messages in thread
From: Zhen Lei @ 2020-12-03 12:02 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	[flat|nested] 7+ messages in thread

* [PATCH 4/4] dt-bindings: reset: convert Hisilicon reset controller bindings to json-schema
  2020-12-03 12:02 [PATCH 0/4] dt-bindings: reset: convert Hisilicon reset controller bindings to json-schema Zhen Lei
                   ` (2 preceding siblings ...)
  2020-12-03 12:02 ` [PATCH 3/4] dt-bindings: reset: " Zhen Lei
@ 2020-12-03 12:02 ` Zhen Lei
  3 siblings, 0 replies; 7+ messages in thread
From: Zhen Lei @ 2020-12-03 12:02 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] 7+ messages in thread

* Re: [PATCH 1/4] reset: hisilicon: correct vendor prefix
  2020-12-03 12:02 ` [PATCH 1/4] reset: hisilicon: correct vendor prefix Zhen Lei
@ 2020-12-03 12:54   ` Philipp Zabel
  2020-12-04  1:28     ` Leizhen (ThunderTown)
  0 siblings, 1 reply; 7+ messages in thread
From: Philipp Zabel @ 2020-12-03 12:54 UTC (permalink / raw)
  To: Zhen Lei, Wei Xu, Rob Herring, linux-arm-kernel, devicetree,
	linux-kernel
  Cc: Zhangfei Gao, Chen Feng, Manivannan Sadhasivam

On Thu, 2020-12-03 at 20:02 +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")
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> Cc: Zhangfei Gao <zhangfei.gao@linaro.org>
> ---
>  drivers/reset/hisilicon/reset-hi3660.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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");

What about those that don't upgrade kernel and DT in lock-step?
It would be easy to fall back to the old compatible if the new one
fails.

regards
Philipp

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

* Re: [PATCH 1/4] reset: hisilicon: correct vendor prefix
  2020-12-03 12:54   ` Philipp Zabel
@ 2020-12-04  1:28     ` Leizhen (ThunderTown)
  0 siblings, 0 replies; 7+ messages in thread
From: Leizhen (ThunderTown) @ 2020-12-04  1:28 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/3 20:54, Philipp Zabel wrote:
> On Thu, 2020-12-03 at 20:02 +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")
>> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
>> Cc: Zhangfei Gao <zhangfei.gao@linaro.org>
>> ---
>>  drivers/reset/hisilicon/reset-hi3660.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> 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");
> 
> What about those that don't upgrade kernel and DT in lock-step?
> It would be easy to fall back to the old compatible if the new one
> fails.

All right, I'll combine them. I thought they belonged to different maintainers,
and I had to break them apart.

> 
> regards
> Philipp
> 
> .
> 


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

end of thread, other threads:[~2020-12-04  1:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-03 12:02 [PATCH 0/4] dt-bindings: reset: convert Hisilicon reset controller bindings to json-schema Zhen Lei
2020-12-03 12:02 ` [PATCH 1/4] reset: hisilicon: correct vendor prefix Zhen Lei
2020-12-03 12:54   ` Philipp Zabel
2020-12-04  1:28     ` Leizhen (ThunderTown)
2020-12-03 12:02 ` [PATCH 2/4] arm64: dts: correct vendor prefix hisi to hisilicon Zhen Lei
2020-12-03 12:02 ` [PATCH 3/4] dt-bindings: reset: " Zhen Lei
2020-12-03 12:02 ` [PATCH 4/4] dt-bindings: reset: convert Hisilicon reset controller bindings to json-schema Zhen Lei

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