Skip to contentSkip to conversation

reset: Add support for OX820 SoC

PATCH Superseded Neil Armstrong 3 participants 7 messages Sep 9, 2016 – Sep 19, 2016

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover reset: Add support for OX820 SoC

This patchset adds support for the reset controller in the Oxford Semiconductor OX820 SoC, big brother of the OX810SE.

Since this driver uses a regmap access, it's important to tag each compatible SoC since the regmap offset could differ in later SoCs.

This patchet also moves the reset indices to a clean DT include file.

Neil Armstrong (3):
reset: oxnas: Add OX820 support
dt-bindings: reset: oxnas: Add include file with reset indexes
dt-bindings: reset: oxnas: Update for OX820

 .../devicetree/bindings/reset/oxnas,reset.txt      | 39 ++--------------
 drivers/reset/reset-oxnas.c                        |  1 +
 include/dt-bindings/reset/oxsemi,ox810se.h         | 53 ++++++++++++++++++++++
 include/dt-bindings/reset/oxsemi,ox820.h           | 53 ++++++++++++++++++++++
 4 files changed, 110 insertions(+), 36 deletions(-)
 create mode 100644 include/dt-bindings/reset/oxsemi,ox810se.h
 create mode 100644 include/dt-bindings/reset/oxsemi,ox820.h
Signature · 1 line
2.7.0
#1 lore raw

PATCH 1/3 reset: oxnas: Add OX820 support

In order to support the Oxford Semiconductor OX820 SoC, add a new compatible string.

---
 drivers/reset/reset-oxnas.c | 1 +
 1 file changed, 1 insertion(+)
drivers/reset/reset-oxnas.c +1 -0
index 9449805..0d9036d 100644
@@ -80,6 +80,7 @@ static const struct reset_control_ops oxnas_reset_ops = {
 
 static const struct of_device_id oxnas_reset_dt_ids[] = {
 	 { .compatible = "oxsemi,ox810se-reset", },
+	 { .compatible = "oxsemi,ox820-reset", },
 	 { /* sentinel */ },
 };
 MODULE_DEVICE_TABLE(of, oxnas_reset_dt_ids);
Signature · 1 line
2.7.0
#2 lore raw

PATCH 2/3 dt-bindings: reset: oxnas: Add include file with reset indexes

In reply to Neil Armstrong

Add DT include file for Oxford Semiconductor OX810SE and OX820 reset controller support.

---
 include/dt-bindings/reset/oxsemi,ox810se.h | 53 ++++++++++++++++++++++++++++++
 include/dt-bindings/reset/oxsemi,ox820.h   | 53 ++++++++++++++++++++++++++++++
 2 files changed, 106 insertions(+)
 create mode 100644 include/dt-bindings/reset/oxsemi,ox810se.h
 create mode 100644 include/dt-bindings/reset/oxsemi,ox820.h
include/dt-bindings/reset/oxsemi,ox810se.h new file +53 -0
new file mode 100644
index 0000000..960c26e
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2016 Neil Armstrong <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef DT_RESET_OXSEMI_OX810SE_H
+#define DT_RESET_OXSEMI_OX810SE_H
+
+#define RESET_ARM	0
+#define RESET_COPRO	1
+/* Reserved		2 */
+/* Reserved		3 */
+#define RESET_USBHS	4
+#define RESET_USBHSPHY	5
+#define RESET_MAC	6
+#define RESET_PCI	7
+#define RESET_DMA	8
+#define RESET_DPE	9
+#define RESET_DDR	10
+#define RESET_SATA	11
+#define RESET_SATA_LINK	12
+#define RESET_SATA_PHY	13
+ /* Reserved		14 */
+#define RESET_NAND	15
+#define RESET_GPIO	16
+#define RESET_UART1	17
+#define RESET_UART2	18
+#define RESET_MISC	19
+#define RESET_I2S	20
+#define RESET_AHB_MON	21
+#define RESET_UART3	22
+#define RESET_UART4	23
+#define RESET_SGDMA	24
+/* Reserved		25 */
+/* Reserved		26 */
+/* Reserved		27 */
+/* Reserved		28 */
+/* Reserved		29 */
+/* Reserved		30 */
+#define RESET_BUS	31
+
+#endif /* DT_RESET_OXSEMI_OX810SE_H */
include/dt-bindings/reset/oxsemi,ox820.h new file +53 -0

53 lines not on this page · raw message

Signature · 1 line
2.7.0
#3 lore raw

PATCH 3/3 dt-bindings: reset: oxnas: Update for OX820

In reply to Neil Armstrong

Add new compatible string for reset and sys-ctrl for the Oxford Semiconductor OX820 Support.
Drop the OX810SE indices since they moved in a dedicated include file.

---
 .../devicetree/bindings/reset/oxnas,reset.txt      | 39 ++--------------------
 1 file changed, 3 insertions(+), 36 deletions(-)
Documentation/devicetree/bindings/reset/oxnas,reset.txt +3 -36
index 6f06db9..df0488e 100644
@@ -5,45 +5,12 @@ Please also refer to reset.txt in this directory for common reset
 controller binding usage.
 
 Required properties:
-- compatible: Should be "oxsemi,ox810se-reset"
+- compatible: Should be "oxsemi,ox810se-reset" or "oxsemi,ox820-reset"
 - #reset-cells: 1, see below
 
 Parent node should have the following properties :
-- compatible: Should be "oxsemi,ox810se-sys-ctrl", "syscon", "simple-mfd"
-
-For OX810SE, the indices are :
- - 0 : ARM
- - 1 : COPRO
- - 2 : Reserved
- - 3 : Reserved
- - 4 : USBHS
- - 5 : USBHSPHY
- - 6 : MAC
- - 7 : PCI
- - 8 : DMA
- - 9 : DPE
- - 10 : DDR
- - 11 : SATA
- - 12 : SATA_LINK
- - 13 : SATA_PHY
- - 14 : Reserved
- - 15 : NAND
- - 16 : GPIO
- - 17 : UART1
- - 18 : UART2
- - 19 : MISC
- - 20 : I2S
- - 21 : AHB_MON
- - 22 : UART3
- - 23 : UART4
- - 24 : SGDMA
- - 25 : Reserved
- - 26 : Reserved
- - 27 : Reserved
- - 28 : Reserved
- - 29 : Reserved
- - 30 : Reserved
- - 31 : BUS
+- compatible: Should be "oxsemi,ox810se-sys-ctrl", "syscon", "simple-mfd" or
+	"oxsemi,ox820-sys-ctrl", "syscon", "simple-mfd"
 
 example:
 
Signature · 1 line
2.7.0
maintainer
#4 lore raw

Re: [PATCH 3/3] dt-bindings: reset: oxnas: Update for OX820

Hi Neil,

Am Freitag, den 09.09.2016, 15:19 +0200 schrieb Neil Armstrong:

Quoted 3 lines

Add new compatible string for reset and sys-ctrl for the Oxford Semiconductor OX820 Support.
Drop the OX810SE indices since they moved in a dedicated include file.

Not sure if the OX820 reset controller should be considered "compatible" to OX810SE. The register layout and usage is the same, but the reset indices are different. Does this warrant a new compatible string, or should this be

	compatible = "oxsemi,ox820-reset", "oxsemi,ox810se-reset"?
Quoted 45 lines
---
 .../devicetree/bindings/reset/oxnas,reset.txt      | 39 ++--------------------
 1 file changed, 3 insertions(+), 36 deletions(-)
Documentation/devicetree/bindings/reset/oxnas,reset.txt +1 -28
index 6f06db9..df0488e 100644
@@ -5,45 +5,12 @@ Please also refer to reset.txt in this directory for common reset
 controller binding usage.
 
 Required properties:
-- compatible: Should be "oxsemi,ox810se-reset"
+- compatible: Should be "oxsemi,ox810se-reset" or "oxsemi,ox820-reset"
 - #reset-cells: 1, see below
 
 Parent node should have the following properties :
-- compatible: Should be "oxsemi,ox810se-sys-ctrl", "syscon", "simple-mfd"
-
-For OX810SE, the indices are :
- - 0 : ARM
- - 1 : COPRO
- - 2 : Reserved
- - 3 : Reserved
- - 4 : USBHS
- - 5 : USBHSPHY
- - 6 : MAC
- - 7 : PCI
- - 8 : DMA
- - 9 : DPE
- - 10 : DDR
- - 11 : SATA
- - 12 : SATA_LINK
- - 13 : SATA_PHY
- - 14 : Reserved
- - 15 : NAND
- - 16 : GPIO
- - 17 : UART1
- - 18 : UART2
- - 19 : MISC
- - 20 : I2S
- - 21 : AHB_MON
- - 22 : UART3
- - 23 : UART4

Documentation/devicetree/bindings/reset/oxnas,reset.txt Please also refer to reset.txt in this directory for common reset · line 13

Quoted 10 lines
Documentation/devicetree/bindings/reset/oxnas,reset.txt +2 -8
- - 24 : SGDMA
- - 25 : Reserved
- - 26 : Reserved
- - 27 : Reserved
- - 28 : Reserved
- - 29 : Reserved
- - 30 : Reserved
- - 31 : BUS
+- compatible: Should be "oxsemi,ox810se-sys-ctrl", "syscon", "simple-mfd" or
+	"oxsemi,ox820-sys-ctrl", "syscon", "simple-mfd"

Please add a pointer to include/dt-bindings/reset/oxsemi,ox8{10se,20}.h

Otherwise I'm fine with the series, pending DT maintainer approval.

regards
Philipp

#5 lore raw

Re: [PATCH 3/3] dt-bindings: reset: oxnas: Update for OX820

Hi Philipp,

Quoted 7 lines · Philipp Zabel

Hi Neil,

Am Freitag, den 09.09.2016, 15:19 +0200 schrieb Neil Armstrong:

Quoted 3 lines

Add new compatible string for reset and sys-ctrl for the Oxford Semiconductor OX820 Support.
Drop the OX810SE indices since they moved in a dedicated include file.

Quoted 5 lines

Not sure if the OX820 reset controller should be considered "compatible" to OX810SE. The register layout and usage is the same, but the reset indices are different. Does this warrant a new compatible string, or should this be

	compatible = "oxsemi,ox820-reset", "oxsemi,ox810se-reset"?

As indicated on the cover letter, I'll like to have each supported SoC as a specific compatible, to ease maintaining the drivers and clarify what HW is supported.

Having an include file per SoC is also part of the process.

Quoted 1 line

[...]

Quoted 2 lines

Please add a pointer to include/dt-bindings/reset/oxsemi,ox8{10se,20}.h

OK, will do in v2.

Quoted 6 lines

Otherwise I'm fine with the series, pending DT maintainer approval.

regards
Philipp

Thanks,
Neil

maintainer
#6 lore raw

Re: [PATCH 3/3] dt-bindings: reset: oxnas: Update for OX820

In reply to Philipp Zabel
Quoted 7 lines · Philipp Zabel

Hi Neil,

Am Freitag, den 09.09.2016, 15:19 +0200 schrieb Neil Armstrong:

Quoted 3 lines

Add new compatible string for reset and sys-ctrl for the Oxford Semiconductor OX820 Support.
Drop the OX810SE indices since they moved in a dedicated include file.

Quoted 5 lines

Not sure if the OX820 reset controller should be considered "compatible" to OX810SE. The register layout and usage is the same, but the reset indices are different. Does this warrant a new compatible string, or should this be

	compatible = "oxsemi,ox820-reset", "oxsemi,ox810se-reset"?

Correct. Different connections are fine since the connections are described in the DT. However you could have some connections not described, so a new compatible may still be needed for that purpose (in addition to other reasons you do a new compatible for new SoCs).

Rob