linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Add Reset controller support for HI3670 SoC
@ 2019-02-01 15:38 Manivannan Sadhasivam
  2019-02-01 15:38 ` [PATCH 1/3] dt-bindings: reset: Add HI3670 reset controller binding Manivannan Sadhasivam
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Manivannan Sadhasivam @ 2019-02-01 15:38 UTC (permalink / raw)
  To: p.zabel, xuwei5, robh+dt
  Cc: devicetree, guodong.xu, linux-kernel, linux-arm-kernel,
	Manivannan Sadhasivam

Hello,

This patchset adds Reset controller support for HiSilicon HI3670 SoC.
HI3670 SoC is architecturally same as HI3660 SoC, hence the same driver
is reused.

This patchset has been tested on HiKey970 board.

Thanks,
Mani

Manivannan Sadhasivam (3):
  dt-bindings: reset: Add HI3670 reset controller binding
  arm64: dts: hisilicon: hi3670: Add reset controller support
  reset: hisilicon: Add HiSilicon HI3670 reset support

 .../devicetree/bindings/reset/hisilicon,hi3660-reset.txt    | 5 +++--
 arch/arm64/boot/dts/hisilicon/hi3670.dtsi                   | 6 ++++++
 drivers/reset/hisilicon/reset-hi3660.c                      | 1 +
 3 files changed, 10 insertions(+), 2 deletions(-)

-- 
2.17.1


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

* [PATCH 1/3] dt-bindings: reset: Add HI3670 reset controller binding
  2019-02-01 15:38 [PATCH 0/3] Add Reset controller support for HI3670 SoC Manivannan Sadhasivam
@ 2019-02-01 15:38 ` Manivannan Sadhasivam
  2019-02-07 10:41   ` Philipp Zabel
  2019-02-01 15:38 ` [PATCH 2/3] arm64: dts: hisilicon: hi3670: Add reset controller support Manivannan Sadhasivam
  2019-02-01 15:38 ` [PATCH 3/3] reset: hisilicon: Add HiSilicon HI3670 reset support Manivannan Sadhasivam
  2 siblings, 1 reply; 8+ messages in thread
From: Manivannan Sadhasivam @ 2019-02-01 15:38 UTC (permalink / raw)
  To: p.zabel, xuwei5, robh+dt
  Cc: devicetree, guodong.xu, linux-kernel, linux-arm-kernel,
	Manivannan Sadhasivam

HI3670 SoC is architecturally same as the HI3660 SoC. Hence, the same
driver is reused for HI3670 SoC and the binding is documented here.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
 .../devicetree/bindings/reset/hisilicon,hi3660-reset.txt     | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.txt b/Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.txt
index 2bf3344b2a02..5d60ec541331 100644
--- a/Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.txt
+++ b/Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.txt
@@ -5,11 +5,12 @@ 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 SoC.
+hi3660 and hi3670 SoCs.
 
 Required properties:
-- compatible: should be
+- compatible: should be one of the following:
 		 "hisilicon,hi3660-reset"
+		 "hisilicon,hi3670-reset"
 - hisi,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.
-- 
2.17.1


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

* [PATCH 2/3] arm64: dts: hisilicon: hi3670: Add reset controller support
  2019-02-01 15:38 [PATCH 0/3] Add Reset controller support for HI3670 SoC Manivannan Sadhasivam
  2019-02-01 15:38 ` [PATCH 1/3] dt-bindings: reset: Add HI3670 reset controller binding Manivannan Sadhasivam
@ 2019-02-01 15:38 ` Manivannan Sadhasivam
  2019-02-07 10:41   ` Philipp Zabel
  2019-02-01 15:38 ` [PATCH 3/3] reset: hisilicon: Add HiSilicon HI3670 reset support Manivannan Sadhasivam
  2 siblings, 1 reply; 8+ messages in thread
From: Manivannan Sadhasivam @ 2019-02-01 15:38 UTC (permalink / raw)
  To: p.zabel, xuwei5, robh+dt
  Cc: devicetree, guodong.xu, linux-kernel, linux-arm-kernel,
	Manivannan Sadhasivam

Add reset controller support for HiSilicon HI3670 SoC.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
 arch/arm64/boot/dts/hisilicon/hi3670.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm64/boot/dts/hisilicon/hi3670.dtsi b/arch/arm64/boot/dts/hisilicon/hi3670.dtsi
index a5bd6d80b226..83950119100e 100644
--- a/arch/arm64/boot/dts/hisilicon/hi3670.dtsi
+++ b/arch/arm64/boot/dts/hisilicon/hi3670.dtsi
@@ -151,6 +151,12 @@
 			#clock-cells = <1>;
 		};
 
+		crg_rst: crg_rst_controller {
+			compatible = "hisilicon,hi3670-reset";
+			#reset-cells = <2>;
+			hisi,rst-syscon = <&crg_ctrl>;
+		};
+
 		pctrl: pctrl@e8a09000 {
 			compatible = "hisilicon,hi3670-pctrl", "syscon";
 			reg = <0x0 0xe8a09000 0x0 0x1000>;
-- 
2.17.1


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

* [PATCH 3/3] reset: hisilicon: Add HiSilicon HI3670 reset support
  2019-02-01 15:38 [PATCH 0/3] Add Reset controller support for HI3670 SoC Manivannan Sadhasivam
  2019-02-01 15:38 ` [PATCH 1/3] dt-bindings: reset: Add HI3670 reset controller binding Manivannan Sadhasivam
  2019-02-01 15:38 ` [PATCH 2/3] arm64: dts: hisilicon: hi3670: Add reset controller support Manivannan Sadhasivam
@ 2019-02-01 15:38 ` Manivannan Sadhasivam
  2019-02-07 10:41   ` Philipp Zabel
  2 siblings, 1 reply; 8+ messages in thread
From: Manivannan Sadhasivam @ 2019-02-01 15:38 UTC (permalink / raw)
  To: p.zabel, xuwei5, robh+dt
  Cc: devicetree, guodong.xu, linux-kernel, linux-arm-kernel,
	Manivannan Sadhasivam

HI3670 SoC is architecturally same as the HI3660 SoC. Hence, add the
HI3670 compatible to HI3660 reset driver in order to reuse it.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
 drivers/reset/hisilicon/reset-hi3660.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/reset/hisilicon/reset-hi3660.c b/drivers/reset/hisilicon/reset-hi3660.c
index 17d8bb128e6e..1c22f3457ba7 100644
--- a/drivers/reset/hisilicon/reset-hi3660.c
+++ b/drivers/reset/hisilicon/reset-hi3660.c
@@ -103,6 +103,7 @@ static int hi3660_reset_probe(struct platform_device *pdev)
 
 static const struct of_device_id hi3660_reset_match[] = {
 	{ .compatible = "hisilicon,hi3660-reset", },
+	{ .compatible = "hisilicon,hi3670-reset", },
 	{},
 };
 MODULE_DEVICE_TABLE(of, hi3660_reset_match);
-- 
2.17.1


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

* Re: [PATCH 1/3] dt-bindings: reset: Add HI3670 reset controller binding
  2019-02-01 15:38 ` [PATCH 1/3] dt-bindings: reset: Add HI3670 reset controller binding Manivannan Sadhasivam
@ 2019-02-07 10:41   ` Philipp Zabel
  2019-02-07 11:17     ` Manivannan Sadhasivam
  0 siblings, 1 reply; 8+ messages in thread
From: Philipp Zabel @ 2019-02-07 10:41 UTC (permalink / raw)
  To: Manivannan Sadhasivam, xuwei5, robh+dt
  Cc: devicetree, guodong.xu, linux-kernel, linux-arm-kernel

Hi Manivannan,

On Fri, 2019-02-01 at 21:08 +0530, Manivannan Sadhasivam wrote:
> HI3670 SoC is architecturally same as the HI3660 SoC. Hence, the same
> driver is reused for HI3670 SoC and the binding is documented here.
> 
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> ---
>  .../devicetree/bindings/reset/hisilicon,hi3660-reset.txt     | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.txt b/Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.txt
> index 2bf3344b2a02..5d60ec541331 100644
> --- a/Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.txt
> +++ b/Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.txt
> @@ -5,11 +5,12 @@ 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 SoC.
> +hi3660 and hi3670 SoCs.
>  
>  Required properties:
> -- compatible: should be
> +- compatible: should be one of the following:
>  		 "hisilicon,hi3660-reset"
> +		 "hisilicon,hi3670-reset"

If the HI3670 reset controller is compatible to the HI3660 reset
controller, this could be:

- compatible: should be one of the following:
              "hisilicon,hi3660-reset" for HI3660
              "hisilicon,hi3670-reset", "hisilicon,hi3660-reset" for HI3670

That way there would be no need to change the driver and it would be
documented that the two reset controllers are compatible.

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

* Re: [PATCH 2/3] arm64: dts: hisilicon: hi3670: Add reset controller support
  2019-02-01 15:38 ` [PATCH 2/3] arm64: dts: hisilicon: hi3670: Add reset controller support Manivannan Sadhasivam
@ 2019-02-07 10:41   ` Philipp Zabel
  0 siblings, 0 replies; 8+ messages in thread
From: Philipp Zabel @ 2019-02-07 10:41 UTC (permalink / raw)
  To: Manivannan Sadhasivam, xuwei5, robh+dt
  Cc: devicetree, guodong.xu, linux-kernel, linux-arm-kernel

On Fri, 2019-02-01 at 21:08 +0530, Manivannan Sadhasivam wrote:
> Add reset controller support for HiSilicon HI3670 SoC.
> 
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> ---
>  arch/arm64/boot/dts/hisilicon/hi3670.dtsi | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/hisilicon/hi3670.dtsi b/arch/arm64/boot/dts/hisilicon/hi3670.dtsi
> index a5bd6d80b226..83950119100e 100644
> --- a/arch/arm64/boot/dts/hisilicon/hi3670.dtsi
> +++ b/arch/arm64/boot/dts/hisilicon/hi3670.dtsi
> @@ -151,6 +151,12 @@
>  			#clock-cells = <1>;
>  		};
>  
> +		crg_rst: crg_rst_controller {
> +			compatible = "hisilicon,hi3670-reset";

This could be

			compatible = "hisilicon,hi3670-reset", "hisilicon,hi3660-reset";

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

* Re: [PATCH 3/3] reset: hisilicon: Add HiSilicon HI3670 reset support
  2019-02-01 15:38 ` [PATCH 3/3] reset: hisilicon: Add HiSilicon HI3670 reset support Manivannan Sadhasivam
@ 2019-02-07 10:41   ` Philipp Zabel
  0 siblings, 0 replies; 8+ messages in thread
From: Philipp Zabel @ 2019-02-07 10:41 UTC (permalink / raw)
  To: Manivannan Sadhasivam, xuwei5, robh+dt
  Cc: devicetree, guodong.xu, linux-kernel, linux-arm-kernel

On Fri, 2019-02-01 at 21:08 +0530, Manivannan Sadhasivam wrote:
> HI3670 SoC is architecturally same as the HI3660 SoC. Hence, add the
> HI3670 compatible to HI3660 reset driver in order to reuse it.
> 
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> ---
>  drivers/reset/hisilicon/reset-hi3660.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/reset/hisilicon/reset-hi3660.c b/drivers/reset/hisilicon/reset-hi3660.c
> index 17d8bb128e6e..1c22f3457ba7 100644
> --- a/drivers/reset/hisilicon/reset-hi3660.c
> +++ b/drivers/reset/hisilicon/reset-hi3660.c
> @@ -103,6 +103,7 @@ static int hi3660_reset_probe(struct platform_device *pdev)
>  
>  static const struct of_device_id hi3660_reset_match[] = {
>  	{ .compatible = "hisilicon,hi3660-reset", },
> +	{ .compatible = "hisilicon,hi3670-reset", },
>  	{},
>  };
>  MODULE_DEVICE_TABLE(of, hi3660_reset_match);

If the HI3670 device tree contained the hisilicon,hi3660-reset
compatible as well, this change would not be necessary.

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

* Re: [PATCH 1/3] dt-bindings: reset: Add HI3670 reset controller binding
  2019-02-07 10:41   ` Philipp Zabel
@ 2019-02-07 11:17     ` Manivannan Sadhasivam
  0 siblings, 0 replies; 8+ messages in thread
From: Manivannan Sadhasivam @ 2019-02-07 11:17 UTC (permalink / raw)
  To: Philipp Zabel
  Cc: devicetree, guodong.xu, linux-kernel, xuwei5, robh+dt, linux-arm-kernel

Hi Philipp,

On Thu, Feb 07, 2019 at 11:41:34AM +0100, Philipp Zabel wrote:
> Hi Manivannan,
> 
> On Fri, 2019-02-01 at 21:08 +0530, Manivannan Sadhasivam wrote:
> > HI3670 SoC is architecturally same as the HI3660 SoC. Hence, the same
> > driver is reused for HI3670 SoC and the binding is documented here.
> > 
> > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> > ---
> >  .../devicetree/bindings/reset/hisilicon,hi3660-reset.txt     | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.txt b/Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.txt
> > index 2bf3344b2a02..5d60ec541331 100644
> > --- a/Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.txt
> > +++ b/Documentation/devicetree/bindings/reset/hisilicon,hi3660-reset.txt
> > @@ -5,11 +5,12 @@ 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 SoC.
> > +hi3660 and hi3670 SoCs.
> >  
> >  Required properties:
> > -- compatible: should be
> > +- compatible: should be one of the following:
> >  		 "hisilicon,hi3660-reset"
> > +		 "hisilicon,hi3670-reset"
> 
> If the HI3670 reset controller is compatible to the HI3660 reset
> controller, this could be:
> 
> - compatible: should be one of the following:
>               "hisilicon,hi3660-reset" for HI3660
>               "hisilicon,hi3670-reset", "hisilicon,hi3660-reset" for HI3670
> 
> That way there would be no need to change the driver and it would be
> documented that the two reset controllers are compatible.
> 

Yeah, I thought about the fallback approach initially but was unsure
about which method to adopt. Will use fallback compatible in next
revision.

Thanks,
Mani

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

end of thread, other threads:[~2019-02-07 11:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-01 15:38 [PATCH 0/3] Add Reset controller support for HI3670 SoC Manivannan Sadhasivam
2019-02-01 15:38 ` [PATCH 1/3] dt-bindings: reset: Add HI3670 reset controller binding Manivannan Sadhasivam
2019-02-07 10:41   ` Philipp Zabel
2019-02-07 11:17     ` Manivannan Sadhasivam
2019-02-01 15:38 ` [PATCH 2/3] arm64: dts: hisilicon: hi3670: Add reset controller support Manivannan Sadhasivam
2019-02-07 10:41   ` Philipp Zabel
2019-02-01 15:38 ` [PATCH 3/3] reset: hisilicon: Add HiSilicon HI3670 reset support Manivannan Sadhasivam
2019-02-07 10:41   ` Philipp Zabel

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