mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
* [PATCH 0/3] Meson8/Meson8b reset improvements
@ 2017-12-26 11:43 Martin Blumenstingl
  2017-12-26 11:43 ` [PATCH 1/3] ARM: dts: meson8b: grow the reset controller memory zone Martin Blumenstingl
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Martin Blumenstingl @ 2017-12-26 11:43 UTC (permalink / raw)
  To: linus-amlogic

Recently Neil landed reset level support (.assert/.deassert) for the
reset-meson driver.
While the driver does not support level resets on Meson8b yet we can
already prepare the .dts to do so (I actually found out that level
resets are implemented identical on Meson8/Meson8b/GX - a patch for
the reset-meson driver will follow in a separate series).

I also noticed that Meson8 does not have the reset controller in it's
.dtsi yet, so this series adds that as well.
It also adds the USB reset lines on Meson8 afterwards to stay
consistent with Meson8b.


Martin Blumenstingl (3):
  ARM: dts: meson8b: grow the reset controller memory zone
  ARM: dts: meson8: add the reset controller
  ARM: dts: meson8: add the USB reset line

 arch/arm/boot/dts/meson8.dtsi  | 9 +++++++++
 arch/arm/boot/dts/meson8b.dtsi | 2 +-
 2 files changed, 10 insertions(+), 1 deletion(-)

-- 
2.15.1

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

* [PATCH 1/3] ARM: dts: meson8b: grow the reset controller memory zone
  2017-12-26 11:43 [PATCH 0/3] Meson8/Meson8b reset improvements Martin Blumenstingl
@ 2017-12-26 11:43 ` Martin Blumenstingl
  2018-01-02 12:43   ` Neil Armstrong
  2017-12-26 11:43 ` [PATCH 2/3] ARM: dts: meson8: add the reset controller Martin Blumenstingl
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Martin Blumenstingl @ 2017-12-26 11:43 UTC (permalink / raw)
  To: linus-amlogic

The reset controller in the Meson8b SoCs also supports level resets.
These use the same defines (from
dt-bindings/reset/amlogic,meson8b-reset.h) as the reset pulses.

The reset-meson driver internally handles the difference if a consumer
requests a reset pulse or a level reset. However, for this to work we
must extend the memory zone of the reset controller.

Suggested-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm/boot/dts/meson8b.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/meson8b.dtsi b/arch/arm/boot/dts/meson8b.dtsi
index df21b066c60b..ade602bbe482 100644
--- a/arch/arm/boot/dts/meson8b.dtsi
+++ b/arch/arm/boot/dts/meson8b.dtsi
@@ -257,7 +257,7 @@
 
 	reset: reset-controller at 4404 {
 		compatible = "amlogic,meson8b-reset";
-		reg = <0x4404 0x20>;
+		reg = <0x4404 0x9c>;
 		#reset-cells = <1>;
 	};
 
-- 
2.15.1

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

* [PATCH 2/3] ARM: dts: meson8: add the reset controller
  2017-12-26 11:43 [PATCH 0/3] Meson8/Meson8b reset improvements Martin Blumenstingl
  2017-12-26 11:43 ` [PATCH 1/3] ARM: dts: meson8b: grow the reset controller memory zone Martin Blumenstingl
@ 2017-12-26 11:43 ` Martin Blumenstingl
  2018-01-02 12:43   ` Neil Armstrong
  2017-12-26 11:43 ` [PATCH 3/3] ARM: dts: meson8: add the USB reset line Martin Blumenstingl
  2018-01-07 20:11 ` [PATCH 0/3] Meson8/Meson8b reset improvements Martin Blumenstingl
  3 siblings, 1 reply; 8+ messages in thread
From: Martin Blumenstingl @ 2017-12-26 11:43 UTC (permalink / raw)
  To: linus-amlogic

Meson8 uses the same reset controller as Meson8b. Add the node along
with the #include for the reset lines to meson8.dtsi so we can use it
from there as well.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm/boot/dts/meson8.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/boot/dts/meson8.dtsi b/arch/arm/boot/dts/meson8.dtsi
index ff619f2b3495..ad4cfbeaf706 100644
--- a/arch/arm/boot/dts/meson8.dtsi
+++ b/arch/arm/boot/dts/meson8.dtsi
@@ -46,6 +46,7 @@
 #include <dt-bindings/clock/meson8b-clkc.h>
 #include <dt-bindings/gpio/meson8-gpio.h>
 #include <dt-bindings/reset/amlogic,meson8b-clkc-reset.h>
+#include <dt-bindings/reset/amlogic,meson8b-reset.h>
 #include "meson.dtsi"
 
 / {
@@ -292,6 +293,12 @@
 		reg = <0x8000 0x4>, <0x4000 0x460>;
 	};
 
+	reset: reset-controller at 4404 {
+		compatible = "amlogic,meson8b-reset";
+		reg = <0x4404 0x9c>;
+		#reset-cells = <1>;
+	};
+
 	analog_top: analog-top at 81a8 {
 		compatible = "amlogic,meson8-analog-top", "syscon";
 		reg = <0x81a8 0x14>;
-- 
2.15.1

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

* [PATCH 3/3] ARM: dts: meson8: add the USB reset line
  2017-12-26 11:43 [PATCH 0/3] Meson8/Meson8b reset improvements Martin Blumenstingl
  2017-12-26 11:43 ` [PATCH 1/3] ARM: dts: meson8b: grow the reset controller memory zone Martin Blumenstingl
  2017-12-26 11:43 ` [PATCH 2/3] ARM: dts: meson8: add the reset controller Martin Blumenstingl
@ 2017-12-26 11:43 ` Martin Blumenstingl
  2018-01-02 12:43   ` Neil Armstrong
  2018-01-07 20:11 ` [PATCH 0/3] Meson8/Meson8b reset improvements Martin Blumenstingl
  3 siblings, 1 reply; 8+ messages in thread
From: Martin Blumenstingl @ 2017-12-26 11:43 UTC (permalink / raw)
  To: linus-amlogic

Now that we support the reset controller on Meson8 we can add the reset
line to the USB PHYs (just like on Meson8b).

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm/boot/dts/meson8.dtsi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/meson8.dtsi b/arch/arm/boot/dts/meson8.dtsi
index ad4cfbeaf706..77f7c992ff70 100644
--- a/arch/arm/boot/dts/meson8.dtsi
+++ b/arch/arm/boot/dts/meson8.dtsi
@@ -539,10 +539,12 @@
 	compatible = "amlogic,meson8-usb2-phy", "amlogic,meson-mx-usb2-phy";
 	clocks = <&clkc CLKID_USB>, <&clkc CLKID_USB0>;
 	clock-names = "usb_general", "usb";
+	resets = <&reset RESET_USB_OTG>;
 };
 
 &usb1_phy {
 	compatible = "amlogic,meson8-usb2-phy", "amlogic,meson-mx-usb2-phy";
 	clocks = <&clkc CLKID_USB>, <&clkc CLKID_USB1>;
 	clock-names = "usb_general", "usb";
+	resets = <&reset RESET_USB_OTG>;
 };
-- 
2.15.1

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

* [PATCH 1/3] ARM: dts: meson8b: grow the reset controller memory zone
  2017-12-26 11:43 ` [PATCH 1/3] ARM: dts: meson8b: grow the reset controller memory zone Martin Blumenstingl
@ 2018-01-02 12:43   ` Neil Armstrong
  0 siblings, 0 replies; 8+ messages in thread
From: Neil Armstrong @ 2018-01-02 12:43 UTC (permalink / raw)
  To: linus-amlogic

On 26/12/2017 12:43, Martin Blumenstingl wrote:
> The reset controller in the Meson8b SoCs also supports level resets.
> These use the same defines (from
> dt-bindings/reset/amlogic,meson8b-reset.h) as the reset pulses.
> 
> The reset-meson driver internally handles the difference if a consumer
> requests a reset pulse or a level reset. However, for this to work we
> must extend the memory zone of the reset controller.
> 
> Suggested-by: Neil Armstrong <narmstrong@baylibre.com>
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> ---
>  arch/arm/boot/dts/meson8b.dtsi | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/boot/dts/meson8b.dtsi b/arch/arm/boot/dts/meson8b.dtsi
> index df21b066c60b..ade602bbe482 100644
> --- a/arch/arm/boot/dts/meson8b.dtsi
> +++ b/arch/arm/boot/dts/meson8b.dtsi
> @@ -257,7 +257,7 @@
>  
>  	reset: reset-controller at 4404 {
>  		compatible = "amlogic,meson8b-reset";
> -		reg = <0x4404 0x20>;
> +		reg = <0x4404 0x9c>;
>  		#reset-cells = <1>;
>  	};
>  
>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>

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

* [PATCH 2/3] ARM: dts: meson8: add the reset controller
  2017-12-26 11:43 ` [PATCH 2/3] ARM: dts: meson8: add the reset controller Martin Blumenstingl
@ 2018-01-02 12:43   ` Neil Armstrong
  0 siblings, 0 replies; 8+ messages in thread
From: Neil Armstrong @ 2018-01-02 12:43 UTC (permalink / raw)
  To: linus-amlogic

On 26/12/2017 12:43, Martin Blumenstingl wrote:
> Meson8 uses the same reset controller as Meson8b. Add the node along
> with the #include for the reset lines to meson8.dtsi so we can use it
> from there as well.
> 
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> ---
>  arch/arm/boot/dts/meson8.dtsi | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/meson8.dtsi b/arch/arm/boot/dts/meson8.dtsi
> index ff619f2b3495..ad4cfbeaf706 100644
> --- a/arch/arm/boot/dts/meson8.dtsi
> +++ b/arch/arm/boot/dts/meson8.dtsi
> @@ -46,6 +46,7 @@
>  #include <dt-bindings/clock/meson8b-clkc.h>
>  #include <dt-bindings/gpio/meson8-gpio.h>
>  #include <dt-bindings/reset/amlogic,meson8b-clkc-reset.h>
> +#include <dt-bindings/reset/amlogic,meson8b-reset.h>
>  #include "meson.dtsi"
>  
>  / {
> @@ -292,6 +293,12 @@
>  		reg = <0x8000 0x4>, <0x4000 0x460>;
>  	};
>  
> +	reset: reset-controller at 4404 {
> +		compatible = "amlogic,meson8b-reset";
> +		reg = <0x4404 0x9c>;
> +		#reset-cells = <1>;
> +	};
> +
>  	analog_top: analog-top at 81a8 {
>  		compatible = "amlogic,meson8-analog-top", "syscon";
>  		reg = <0x81a8 0x14>;
> 

Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>

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

* [PATCH 3/3] ARM: dts: meson8: add the USB reset line
  2017-12-26 11:43 ` [PATCH 3/3] ARM: dts: meson8: add the USB reset line Martin Blumenstingl
@ 2018-01-02 12:43   ` Neil Armstrong
  0 siblings, 0 replies; 8+ messages in thread
From: Neil Armstrong @ 2018-01-02 12:43 UTC (permalink / raw)
  To: linus-amlogic

On 26/12/2017 12:43, Martin Blumenstingl wrote:
> Now that we support the reset controller on Meson8 we can add the reset
> line to the USB PHYs (just like on Meson8b).
> 
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> ---
>  arch/arm/boot/dts/meson8.dtsi | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/meson8.dtsi b/arch/arm/boot/dts/meson8.dtsi
> index ad4cfbeaf706..77f7c992ff70 100644
> --- a/arch/arm/boot/dts/meson8.dtsi
> +++ b/arch/arm/boot/dts/meson8.dtsi
> @@ -539,10 +539,12 @@
>  	compatible = "amlogic,meson8-usb2-phy", "amlogic,meson-mx-usb2-phy";
>  	clocks = <&clkc CLKID_USB>, <&clkc CLKID_USB0>;
>  	clock-names = "usb_general", "usb";
> +	resets = <&reset RESET_USB_OTG>;
>  };
>  
>  &usb1_phy {
>  	compatible = "amlogic,meson8-usb2-phy", "amlogic,meson-mx-usb2-phy";
>  	clocks = <&clkc CLKID_USB>, <&clkc CLKID_USB1>;
>  	clock-names = "usb_general", "usb";
> +	resets = <&reset RESET_USB_OTG>;
>  };
> 

Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>

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

* [PATCH 0/3] Meson8/Meson8b reset improvements
  2017-12-26 11:43 [PATCH 0/3] Meson8/Meson8b reset improvements Martin Blumenstingl
                   ` (2 preceding siblings ...)
  2017-12-26 11:43 ` [PATCH 3/3] ARM: dts: meson8: add the USB reset line Martin Blumenstingl
@ 2018-01-07 20:11 ` Martin Blumenstingl
  3 siblings, 0 replies; 8+ messages in thread
From: Martin Blumenstingl @ 2018-01-07 20:11 UTC (permalink / raw)
  To: linus-amlogic

Hi Kevin,

On Tue, Dec 26, 2017 at 12:43 PM, Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
> Recently Neil landed reset level support (.assert/.deassert) for the
> reset-meson driver.
> While the driver does not support level resets on Meson8b yet we can
> already prepare the .dts to do so (I actually found out that level
> resets are implemented identical on Meson8/Meson8b/GX - a patch for
> the reset-meson driver will follow in a separate series).
even though there's no hard dependency on that:
the patch which enables level resets for Meson8b (see [0]) is now
queued for v4.16

> I also noticed that Meson8 does not have the reset controller in it's
> .dtsi yet, so this series adds that as well.
> It also adds the USB reset lines on Meson8 afterwards to stay
> consistent with Meson8b.
will you take this series for v4.16 or should I re-send it (with
Neil's "Reviewed-by") after v4.16-rc1 is out?

>
> Martin Blumenstingl (3):
>   ARM: dts: meson8b: grow the reset controller memory zone
>   ARM: dts: meson8: add the reset controller
>   ARM: dts: meson8: add the USB reset line
>
>  arch/arm/boot/dts/meson8.dtsi  | 9 +++++++++
>  arch/arm/boot/dts/meson8b.dtsi | 2 +-
>  2 files changed, 10 insertions(+), 1 deletion(-)
>
> --
> 2.15.1
>

Regards
Martin


[0] http://lists.infradead.org/pipermail/linux-amlogic/2017-December/005869.html

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

end of thread, other threads:[~2018-01-07 20:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-26 11:43 [PATCH 0/3] Meson8/Meson8b reset improvements Martin Blumenstingl
2017-12-26 11:43 ` [PATCH 1/3] ARM: dts: meson8b: grow the reset controller memory zone Martin Blumenstingl
2018-01-02 12:43   ` Neil Armstrong
2017-12-26 11:43 ` [PATCH 2/3] ARM: dts: meson8: add the reset controller Martin Blumenstingl
2018-01-02 12:43   ` Neil Armstrong
2017-12-26 11:43 ` [PATCH 3/3] ARM: dts: meson8: add the USB reset line Martin Blumenstingl
2018-01-02 12:43   ` Neil Armstrong
2018-01-07 20:11 ` [PATCH 0/3] Meson8/Meson8b reset improvements Martin Blumenstingl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®