Skip to contentSkip to conversation

Add DT bindings documentation for hi6220 SoC reset controller.

PATCH In review Chen Feng 2 participants 6 messages Oct 29, 2015 – Oct 30, 2015

Subsystems (3)
lore
Share & tools
lore

Chen Feng

author
#0 lore raw

PATCH v6 1/3 Add DT bindings documentation for hi6220 SoC reset controller.

docs: dts: Added documentation for hi6220 Reset Controller

---
 .../bindings/reset/hisilicon,hi6220-reset.txt      | 32 ++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/reset/hisilicon,hi6220-reset.txt
Documentation/devicetree/bindings/reset/hisilicon,hi6220-reset.txt new file +32 -0
new file mode 100644
index 0000000..be06352
@@ -0,0 +1,32 @@
+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
+hi6220 SoC.
+
+Required properties:
+- compatible: may be "hisilicon,hi6220-sysctrl"
+- reg: should be register base and length as documented in the
+  datasheet
+- #reset-cells: 1, see below
+
+Example:
+sys_ctrl: sys_ctrl@f7030000 {
+	compatible = "hisilicon,hi6220-sysctrl", "syscon";
+	reg = <0x0 0xf7030000 0x0 0x2000>;
+	#clock-cells = <1>;
+	#reset-cells = <1>;
+};
+
+Specifying reset lines connected to IP modules
+==============================================
+example:
+
+        uart1: uart1@..... {
+                ...
+                resets = <&sys_ctrl 0x305>;
+                ...
+        };
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH v6 2/3 Add reset controller for hi6220 SoC platform.

reset: add driver for hi6220 reset controller

---
 drivers/reset/Kconfig                          |   1 +
 drivers/reset/Makefile                         |   1 +
 drivers/reset/hisilicon/Kconfig                |   5 ++
 drivers/reset/hisilicon/Makefile               |   1 +
 drivers/reset/hisilicon/hi6220_reset.c         | 108 +++++++++++++++++++++++++
 include/dt-bindings/reset/hisi,hi6220-resets.h |  67 +++++++++++++++
 6 files changed, 183 insertions(+)
 create mode 100644 drivers/reset/hisilicon/Kconfig
 create mode 100644 drivers/reset/hisilicon/Makefile
 create mode 100644 drivers/reset/hisilicon/hi6220_reset.c
 create mode 100644 include/dt-bindings/reset/hisi,hi6220-resets.h
drivers/reset/Kconfig +1 -0
index 0615f50..df37212 100644
@@ -13,3 +13,4 @@ menuconfig RESET_CONTROLLER
 	  If unsure, say no.
 
 source "drivers/reset/sti/Kconfig"
+source "drivers/reset/hisilicon/Kconfig"
drivers/reset/Makefile +1 -0
index 85d5904..99e18c8 100644
@@ -4,5 +4,6 @@ obj-$(CONFIG_ARCH_SOCFPGA) += reset-socfpga.o
 obj-$(CONFIG_ARCH_BERLIN) += reset-berlin.o
 obj-$(CONFIG_ARCH_SUNXI) += reset-sunxi.o
 obj-$(CONFIG_ARCH_STI) += sti/
+obj-$(CONFIG_ARCH_HISI) += hisilicon/
 obj-$(CONFIG_ARCH_ZYNQ) += reset-zynq.o
 obj-$(CONFIG_ATH79) += reset-ath79.o
drivers/reset/hisilicon/Kconfig new file +5 -0
new file mode 100644
index 0000000..26bf95a
@@ -0,0 +1,5 @@
+config COMMON_RESET_HI6220
+	tristate "Hi6220 Reset Driver"
+	depends on (ARCH_HISI && RESET_CONTROLLER)
+	help
+	  Build the Hisilicon Hi6220 reset driver.
drivers/reset/hisilicon/Makefile new file +1 -0
new file mode 100644
index 0000000..c932f86
@@ -0,0 +1 @@
+obj-$(CONFIG_COMMON_RESET_HI6220) += hi6220_reset.o
drivers/reset/hisilicon/hi6220_reset.c new file +108 -0

108 lines not on this page · raw message

include/dt-bindings/reset/hisi,hi6220-resets.h new file +67 -0

67 lines not on this page · raw message

Signature · 1 line
1.9.1
maintainer
#2 lore raw

Re: [PATCH V6 2/3] Add reset controller for hi6220 SoC platform.

Am Donnerstag, den 29.10.2015, 20:55 +0800 schrieb Chen Feng:

Quoted 1 line

reset: add driver for hi6220 reset controller

Same comment as for patch 1, this should probably be the subject, the commit message body was better in V4.

Quoted 8 lines
---
 drivers/reset/Kconfig                          |   1 +
 drivers/reset/Makefile                         |   1 +
 drivers/reset/hisilicon/Kconfig                |   5 ++
 drivers/reset/hisilicon/Makefile               |   1 +
 drivers/reset/hisilicon/hi6220_reset.c         | 108 +++++++++++++++++++++++++
 include/dt-bindings/reset/hisi,hi6220-resets.h |  67 +++++++++++++++

Move the header file into patch 1, it is better to include this with the binding documentation.

regards
Philipp

author
#3 lore raw

Re: [PATCH V6 2/3] Add reset controller for hi6220 SoC platform.

Hi,

Quoted 15 lines · Philipp Zabel

Am Donnerstag, den 29.10.2015, 20:55 +0800 schrieb Chen Feng:

Quoted 1 line

reset: add driver for hi6220 reset controller

Same comment as for patch 1, this should probably be the subject, the commit message body was better in V4.

Quoted 8 lines
---
 drivers/reset/Kconfig                          |   1 +
 drivers/reset/Makefile                         |   1 +
 drivers/reset/hisilicon/Kconfig                |   5 ++
 drivers/reset/hisilicon/Makefile               |   1 +
 drivers/reset/hisilicon/hi6220_reset.c         | 108 +++++++++++++++++++++++++
 include/dt-bindings/reset/hisi,hi6220-resets.h |  67 +++++++++++++++
Quoted 3 lines

Move the header file into patch 1, it is better to include this with the binding documentation.

Thanks for your patience. I will change this and resend it.

Quoted 7 lines

regards
Philipp

.

author
#4 lore raw

PATCH v6 3/3 Add reset-cell node for hi6220 reset controller

In reply to Chen Feng

arm64: dts: Add dts node for reset controller

---
 arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/hisilicon/hi6220.dtsi +1 -0
index 3f03380..e45dbb1 100644
@@ -146,6 +146,7 @@
 			compatible = "hisilicon,hi6220-sysctrl", "syscon";
 			reg = <0x0 0xf7030000 0x0 0x2000>;
 			#clock-cells = <1>;
+			#reset-cells = <1>;
 		};
 
 		media_ctrl: media_ctrl@f4410000 {
Signature · 1 line
1.9.1
maintainer
#5 lore raw
In reply to Chen Feng

Hi,

A few small issues remaining.

Am Donnerstag, den 29.10.2015, 20:55 +0800 schrieb Chen Feng:

Quoted 1 line

docs: dts: Added documentation for hi6220 Reset Controller

Better to switch the description and the Subject of the e-mail. Actually, the subject line and patch description already was fine in V4. Prefixes like "reset: ..." and "dt-bindings: ..." should be in the subject instead of the commit message body.

Quoted 24 lines
---
 .../bindings/reset/hisilicon,hi6220-reset.txt      | 32 ++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/reset/hisilicon,hi6220-reset.txt
Documentation/devicetree/bindings/reset/hisilicon,hi6220-reset.txt new file +12 -0
new file mode 100644
index 0000000..be06352
@@ -0,0 +1,32 @@
+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
+hi6220 SoC.
+
+Required properties:
+- compatible: may be "hisilicon,hi6220-sysctrl"
+- reg: should be register base and length as documented in the

Documentation/devicetree/bindings/reset/hisilicon,hi6220-reset.txt line 22

Quoted 10 lines
Documentation/devicetree/bindings/reset/hisilicon,hi6220-reset.txt new file +10 -0
+  datasheet
+- #reset-cells: 1, see below
+
+Example:
+sys_ctrl: sys_ctrl@f7030000 {
+	compatible = "hisilicon,hi6220-sysctrl", "syscon";
+	reg = <0x0 0xf7030000 0x0 0x2000>;
+	#clock-cells = <1>;
+	#reset-cells = <1>;
+};

This example is not indented. That is ok, but the example below is indented by a tab. Please choose one style for both.

Documentation/devicetree/bindings/reset/hisilicon,hi6220-reset.txt line 26

Quoted 4 lines
Documentation/devicetree/bindings/reset/hisilicon,hi6220-reset.txt new file +4 -0
+
+Specifying reset lines connected to IP modules
+==============================================
+example:

That probably should be "Example:".

Documentation/devicetree/bindings/reset/hisilicon,hi6220-reset.txt line 28

Quoted 2 lines
Documentation/devicetree/bindings/reset/hisilicon,hi6220-reset.txt new file +2 -0
+
+        uart1: uart1@..... {

That should be "uart1: serial@...", as Rob already pointed out.

Documentation/devicetree/bindings/reset/hisilicon,hi6220-reset.txt line 30

Quoted 2 lines
Documentation/devicetree/bindings/reset/hisilicon,hi6220-reset.txt new file +2 -0
+                ...
+                resets = <&sys_ctrl 0x305>;

Better use PERIPH_RSTEN3_UART1 instead of 0x305 here.

Documentation/devicetree/bindings/reset/hisilicon,hi6220-reset.txt line 32

Quoted 2 lines
Documentation/devicetree/bindings/reset/hisilicon,hi6220-reset.txt new file +2 -0
+                ...
+        };

Also add a pointer to the hisi,hi6220-resets.h here, for example:

A list of valid reset signals can be found in:
include/dt-bindings/reset/hisi,hi6220-resets.h

Also, that header file should be part of this patch, instead of the driver patch.

best regards
Philipp