Skip to contentSkip to conversation

Amlogic: Meson: Add reset controller

PATCH Applied Neil Armstrong 3 participants 10 messages May 30, 2016 – Aug 18, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v3 cover Amlogic: Meson: Add reset controller

Patchset to add and enable the reset controller driver on Meson SoCs platforms.

This reset controller has up to 256 reset lines with reset pulse generation only, so the assert and deassert calls are not available.

Depends on the patch :
- "reset: add devm_reset_controller_register API" [1]

Changes since v2 at http://lkml.kernel.org/r/[email protected] :
- Get back __iomem in _reset() callback
- Get rid of MODULE_ALIAS

Changes since v1 at http://lkml.kernel.org/r/[email protected] :
- Remove _gxbb_ in names
- Depends build on ARCH_MESON only
- Add meson8b compatible and bindings
- Re-indent dt-bindings headers
- Switch to devm_ reset controller register
- Remove platform "remove" callback
- Update Dual BSD/GPL file headers

Changes since the RFC at http://lkml.kernel.org/r/[email protected] :
- Fix register mapping and bit defines in bindings header
- Remove assert and unassert calls
- Fix missing __iomem

[1] https://patchwork.kernel.org/patch/8988471/

Neil Armstrong (4):
reset: Add support for the Amlogic Meson SoC Reset Controller
dt-bindings: reset: Add bindings for the Meson SoC Reset Controller
ARM64: dts: amlogic: Enable Reset Controller on GXBB-based platforms
ARM: dts: amlogic: Enable Reset Controller on Meson8b platforms

 .../bindings/reset/amlogic,meson-reset.txt         |  18 ++
 arch/arm/boot/dts/meson8b.dtsi                     |   7 +
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi        |   7 +
 drivers/reset/Makefile                             |   1 +
 drivers/reset/reset-meson.c                        | 136 +++++++++++++
 .../dt-bindings/reset/amlogic,meson-gxbb-reset.h   | 210 +++++++++++++++++++++
 include/dt-bindings/reset/amlogic,meson8b-reset.h  | 175 +++++++++++++++++
 7 files changed, 554 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/reset/amlogic,meson-reset.txt
 create mode 100644 drivers/reset/reset-meson.c
 create mode 100644 include/dt-bindings/reset/amlogic,meson-gxbb-reset.h
 create mode 100644 include/dt-bindings/reset/amlogic,meson8b-reset.h
Signature · 1 line
2.7.0
#1 lore raw

PATCH v3 1/4 reset: Add support for the Amlogic Meson SoC Reset Controller

This patch adds the platform driver for the Amlogic Meson SoC Reset Controller.

The Meson8b and GXBB SoCs are supported.

---
 drivers/reset/Makefile      |   1 +
 drivers/reset/reset-meson.c | 136 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 137 insertions(+)
 create mode 100644 drivers/reset/reset-meson.c
drivers/reset/Makefile +1 -0
index f173fc3..03dc1bb 100644
@@ -3,6 +3,7 @@ obj-$(CONFIG_ARCH_LPC18XX) += reset-lpc18xx.o
 obj-$(CONFIG_ARCH_SOCFPGA) += reset-socfpga.o
 obj-$(CONFIG_ARCH_BERLIN) += reset-berlin.o
 obj-$(CONFIG_MACH_PISTACHIO) += reset-pistachio.o
+obj-$(CONFIG_ARCH_MESON) += reset-meson.o
 obj-$(CONFIG_ARCH_SUNXI) += reset-sunxi.o
 obj-$(CONFIG_ARCH_STI) += sti/
 obj-$(CONFIG_ARCH_HISI) += hisilicon/
drivers/reset/reset-meson.c new file +136 -0

136 lines not on this page · raw message

Signature · 1 line
2.7.0
#2 lore raw

PATCH v3 2/4 dt-bindings: reset: Add bindings for the Meson SoC Reset Controller

In reply to Neil Armstrong

Add DT bindings for the Meson SoC Reset Controller documentation and the associated include file.

---
 .../bindings/reset/amlogic,meson-reset.txt         |  18 ++
 .../dt-bindings/reset/amlogic,meson-gxbb-reset.h   | 210 +++++++++++++++++++++
 include/dt-bindings/reset/amlogic,meson8b-reset.h  | 175 +++++++++++++++++
 3 files changed, 403 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/reset/amlogic,meson-reset.txt
 create mode 100644 include/dt-bindings/reset/amlogic,meson-gxbb-reset.h
 create mode 100644 include/dt-bindings/reset/amlogic,meson8b-reset.h
Documentation/devicetree/bindings/reset/amlogic,meson-reset.txt new file +18 -0
new file mode 100644
index 0000000..e746b63
@@ -0,0 +1,18 @@
+Amlogic Meson SoC Reset Controller
+=======================================
+
+Please also refer to reset.txt in this directory for common reset
+controller binding usage.
+
+Required properties:
+- compatible: Should be "amlogic,meson8b-reset" or "amlogic,meson-gxbb-reset"
+- reg: should contain the register address base
+- #reset-cells: 1, see below
+
+example:
+
+reset: reset-controller {
+	compatible = "amlogic,meson-gxbb-reset";
+	reg = <0x0 0x04404 0x0 0x20>;
+	#reset-cells = <1>;
+};
include/dt-bindings/reset/amlogic,meson-gxbb-reset.h new file +210 -0

210 lines not on this page · raw message

include/dt-bindings/reset/amlogic,meson8b-reset.h new file +175 -0

175 lines not on this page · raw message

Signature · 1 line
2.7.0
#3 lore raw

PATCH v3 3/4 ARM64: dts: amlogic: Enable Reset Controller on GXBB-based platforms

In reply to Neil Armstrong

Update DTSI file to add the reset controller node.

---
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi +7 -0
index 832815d..45e9c55 100644
@@ -43,6 +43,7 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/reset/amlogic,meson-gxbb-reset.h>
 
 / {
 	compatible = "amlogic,meson-gxbb";
@@ -129,6 +130,12 @@
 			#size-cells = <2>;
 			ranges = <0x0 0x0 0x0 0xc1100000 0x0 0x100000>;
 
+			reset: reset-controller at 4404 {
+				compatible = "amlogic,meson-gxbb-reset";
+				reg = <0x0 0x04404 0x0 0x20>;
+				#reset-cells = <1>;
+			};
+
 			uart_A: serial at 84c0 {
 				compatible = "amlogic,meson-uart";
 				reg = <0x0 0x084c0 0x0 0x14>;
Signature · 1 line
2.7.0
#4 lore raw

PATCH v3 4/4 ARM: dts: amlogic: Enable Reset Controller on Meson8b platforms

In reply to Neil Armstrong

Update DTSI file to add the reset controller node.

---
 arch/arm/boot/dts/meson8b.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/boot/dts/meson8b.dtsi +7 -0
index 2bfe401..fc4080d 100644
@@ -46,6 +46,7 @@
 
 #include <dt-bindings/clock/meson8b-clkc.h>
 #include <dt-bindings/gpio/meson8b-gpio.h>
+#include <dt-bindings/reset/amlogic,meson8b-reset.h>
 #include "skeleton.dtsi"
 
 / {
@@ -105,6 +106,12 @@
 			#interrupt-cells = <3>;
 		};
 
+		reset: reset-controller at c1104404 {
+			compatible = "amlogic,meson8b-reset";
+			reg = <0xc1104404 0x20>;
+			#reset-cells = <1>;
+		};
+
 		wdt: watchdog at c1109900 {
 			compatible = "amlogic,meson8b-wdt";
 			reg = <0xc1109900 0x8>;
Signature · 1 line
2.7.0
maintainer
#5 lore raw
In reply to Neil Armstrong

Hi Kevin,

Am Montag, den 30.05.2016, 15:27 +0200 schrieb Neil Armstrong:

Quoted 26 lines

Patchset to add and enable the reset controller driver on Meson SoCs platforms.

This reset controller has up to 256 reset lines with reset pulse generation only, so the assert and deassert calls are not available.

Depends on the patch :
- "reset: add devm_reset_controller_register API" [1]

Changes since v2 at http://lkml.kernel.org/r/1464169758-26975-1-git-send-email-narmstrong at baylibre.com :
- Get back __iomem in _reset() callback
- Get rid of MODULE_ALIAS

Changes since v1 at http://lkml.kernel.org/r/1463732875-23141-1-git-send-email-narmstrong at baylibre.com :
- Remove _gxbb_ in names
- Depends build on ARCH_MESON only
- Add meson8b compatible and bindings
- Re-indent dt-bindings headers
- Switch to devm_ reset controller register
- Remove platform "remove" callback
- Update Dual BSD/GPL file headers

Changes since the RFC at http://lkml.kernel.org/r/1463148012-25988-1-git-send-email-narmstrong at baylibre.com :
- Fix register mapping and bit defines in bindings header
- Remove assert and unassert calls
- Fix missing __iomem

Quoted 7 lines

[1] https://patchwork.kernel.org/patch/8988471/

Neil Armstrong (4):
reset: Add support for the Amlogic Meson SoC Reset Controller
dt-bindings: reset: Add bindings for the Meson SoC Reset Controller
ARM64: dts: amlogic: Enable Reset Controller on GXBB-based platforms
ARM: dts: amlogic: Enable Reset Controller on Meson8b platforms

Should I take the two device tree patches into the reset tree? Is resolving the reset/deassert situation a prerequisite for these patches?

regards
Philipp

maintainer
#6 lore raw
Quoted 31 lines · Philipp Zabel

Hi Kevin,

Am Montag, den 30.05.2016, 15:27 +0200 schrieb Neil Armstrong:

Quoted 28 lines

Patchset to add and enable the reset controller driver on Meson SoCs platforms.

This reset controller has up to 256 reset lines with reset pulse generation only, so the assert and deassert calls are not available.

Depends on the patch :
- "reset: add devm_reset_controller_register API" [1]

Changes since v2 at http://lkml.kernel.org/r/1464169758-26975-1-git-send-email-narmstrong at baylibre.com :
- Get back __iomem in _reset() callback
- Get rid of MODULE_ALIAS

Changes since v1 at http://lkml.kernel.org/r/1463732875-23141-1-git-send-email-narmstrong at baylibre.com :
- Remove _gxbb_ in names
- Depends build on ARCH_MESON only
- Add meson8b compatible and bindings
- Re-indent dt-bindings headers
- Switch to devm_ reset controller register
- Remove platform "remove" callback
- Update Dual BSD/GPL file headers

Changes since the RFC at http://lkml.kernel.org/r/1463148012-25988-1-git-send-email-narmstrong at baylibre.com :
- Fix register mapping and bit defines in bindings header
- Remove assert and unassert calls
- Fix missing __iomem

[1] https://patchwork.kernel.org/patch/8988471/

Quoted 7 lines
Quoted 5 lines

Neil Armstrong (4):
reset: Add support for the Amlogic Meson SoC Reset Controller
dt-bindings: reset: Add bindings for the Meson SoC Reset Controller
ARM64: dts: amlogic: Enable Reset Controller on GXBB-based platforms
ARM: dts: amlogic: Enable Reset Controller on Meson8b platforms

Should I take the two device tree patches into the reset tree?

You can take the driver and the bindings. We will take the DT patches through the amlogic tree, and submit via arm-soc.

Quoted 2 lines

Is resolving the reset/deassert situation a prerequisite for these patches?

No, not a prerequisite. Go ahead and merge the driver.

It just means that hardware reset doesn't actually happen when using drivers/net/ethernet/stmicro/stmmac/* because it only uses assert/reassert currently.

Kevin

maintainer Applied
#7 lore raw
In reply to Neil Armstrong

Hi Neil,

Am Montag, den 30.05.2016, 15:27 +0200 schrieb Neil Armstrong:

Quoted 26 lines

Patchset to add and enable the reset controller driver on Meson SoCs platforms.

This reset controller has up to 256 reset lines with reset pulse generation only, so the assert and deassert calls are not available.

Depends on the patch :
- "reset: add devm_reset_controller_register API" [1]

Changes since v2 at http://lkml.kernel.org/r/1464169758-26975-1-git-send-email-narmstrong at baylibre.com :
- Get back __iomem in _reset() callback
- Get rid of MODULE_ALIAS

Changes since v1 at http://lkml.kernel.org/r/1463732875-23141-1-git-send-email-narmstrong at baylibre.com :
- Remove _gxbb_ in names
- Depends build on ARCH_MESON only
- Add meson8b compatible and bindings
- Re-indent dt-bindings headers
- Switch to devm_ reset controller register
- Remove platform "remove" callback
- Update Dual BSD/GPL file headers

Changes since the RFC at http://lkml.kernel.org/r/1463148012-25988-1-git-send-email-narmstrong at baylibre.com :
- Fix register mapping and bit defines in bindings header
- Remove assert and unassert calls
- Fix missing __iomem

Quoted 5 lines

[1] https://patchwork.kernel.org/patch/8988471/

Neil Armstrong (4):
reset: Add support for the Amlogic Meson SoC Reset Controller
dt-bindings: reset: Add bindings for the Meson SoC Reset Controller

I've applied these two patches to the reset/next branch.

regards
Philipp

Quoted 16 lines

ARM64: dts: amlogic: Enable Reset Controller on GXBB-based platforms
ARM: dts: amlogic: Enable Reset Controller on Meson8b platforms

 .../bindings/reset/amlogic,meson-reset.txt         |  18 ++
 arch/arm/boot/dts/meson8b.dtsi                     |   7 +
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi        |   7 +
 drivers/reset/Makefile                             |   1 +
 drivers/reset/reset-meson.c                        | 136 +++++++++++++
 .../dt-bindings/reset/amlogic,meson-gxbb-reset.h   | 210 +++++++++++++++++++++
 include/dt-bindings/reset/amlogic,meson8b-reset.h  | 175 +++++++++++++++++
 7 files changed, 554 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/reset/amlogic,meson-reset.txt
 create mode 100644 drivers/reset/reset-meson.c
 create mode 100644 include/dt-bindings/reset/amlogic,meson-gxbb-reset.h
 create mode 100644 include/dt-bindings/reset/amlogic,meson8b-reset.h
maintainer
#8 lore raw

Hi Philipp,

Quoted 29 lines · Philipp Zabel

Hi Neil,

Am Montag, den 30.05.2016, 15:27 +0200 schrieb Neil Armstrong:

Quoted 26 lines

Patchset to add and enable the reset controller driver on Meson SoCs platforms.

This reset controller has up to 256 reset lines with reset pulse generation only, so the assert and deassert calls are not available.

Depends on the patch :
- "reset: add devm_reset_controller_register API" [1]

Changes since v2 at http://lkml.kernel.org/r/1464169758-26975-1-git-send-email-narmstrong at baylibre.com :
- Get back __iomem in _reset() callback
- Get rid of MODULE_ALIAS

Changes since v1 at http://lkml.kernel.org/r/1463732875-23141-1-git-send-email-narmstrong at baylibre.com :
- Remove _gxbb_ in names
- Depends build on ARCH_MESON only
- Add meson8b compatible and bindings
- Re-indent dt-bindings headers
- Switch to devm_ reset controller register
- Remove platform "remove" callback
- Update Dual BSD/GPL file headers

Changes since the RFC at http://lkml.kernel.org/r/1463148012-25988-1-git-send-email-narmstrong at baylibre.com :
- Fix register mapping and bit defines in bindings header
- Remove assert and unassert calls
- Fix missing __iomem

Quoted 8 lines
Quoted 5 lines

[1] https://patchwork.kernel.org/patch/8988471/

Neil Armstrong (4):
reset: Add support for the Amlogic Meson SoC Reset Controller
dt-bindings: reset: Add bindings for the Meson SoC Reset Controller

I've applied these two patches to the reset/next branch.

I'm just noticing now that these didn't make it into v4.8-rc1. Was there reason for that?

Kevin

maintainer
#9 lore raw
Quoted 38 lines · Kevin Hilman

Hi Philipp,

Quoted 35 lines · Philipp Zabel

Hi Neil,

Am Montag, den 30.05.2016, 15:27 +0200 schrieb Neil Armstrong:

Quoted 31 lines

Patchset to add and enable the reset controller driver on Meson SoCs platforms.

This reset controller has up to 256 reset lines with reset pulse generation only, so the assert and deassert calls are not available.

Depends on the patch :
- "reset: add devm_reset_controller_register API" [1]

Changes since v2 at http://lkml.kernel.org/r/1464169758-26975-1-git-send-email-narmstrong at baylibre.com :
- Get back __iomem in _reset() callback
- Get rid of MODULE_ALIAS

Changes since v1 at http://lkml.kernel.org/r/1463732875-23141-1-git-send-email-narmstrong at baylibre.com :
- Remove _gxbb_ in names
- Depends build on ARCH_MESON only
- Add meson8b compatible and bindings
- Re-indent dt-bindings headers
- Switch to devm_ reset controller register
- Remove platform "remove" callback
- Update Dual BSD/GPL file headers

Changes since the RFC at http://lkml.kernel.org/r/1463148012-25988-1-git-send-email-narmstrong at baylibre.com :
- Fix register mapping and bit defines in bindings header
- Remove assert and unassert calls
- Fix missing __iomem

[1] https://patchwork.kernel.org/patch/8988471/

Neil Armstrong (4):
reset: Add support for the Amlogic Meson SoC Reset Controller
dt-bindings: reset: Add bindings for the Meson SoC Reset Controller

Quoted 5 lines
Quoted 2 lines

I've applied these two patches to the reset/next branch.

I'm just noticing now that these didn't make it into v4.8-rc1. Was there reason for that?

Doh, nevermind, I'm blind (and was looking at the wrong tree.) I see them now.

Kevin