public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] reset: Add support for OX820 SoC
@ 2016-09-09 13:19 Neil Armstrong
  2016-09-09 13:19 ` [PATCH 1/3] reset: oxnas: Add OX820 support Neil Armstrong
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Neil Armstrong @ 2016-09-09 13:19 UTC (permalink / raw)
  To: Philipp Zabel
  Cc: Neil Armstrong, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

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

-- 
2.7.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 1/3] reset: oxnas: Add OX820 support
  2016-09-09 13:19 [PATCH 0/3] reset: Add support for OX820 SoC Neil Armstrong
@ 2016-09-09 13:19 ` Neil Armstrong
  2016-09-09 13:19 ` [PATCH 2/3] dt-bindings: reset: oxnas: Add include file with reset indexes Neil Armstrong
  2016-09-09 13:19 ` [PATCH 3/3] dt-bindings: reset: oxnas: Update for OX820 Neil Armstrong
  2 siblings, 0 replies; 7+ messages in thread
From: Neil Armstrong @ 2016-09-09 13:19 UTC (permalink / raw)
  To: Philipp Zabel; +Cc: Neil Armstrong, devicetree, linux-arm-kernel, linux-kernel

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

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
 drivers/reset/reset-oxnas.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/reset/reset-oxnas.c b/drivers/reset/reset-oxnas.c
index 9449805..0d9036d 100644
--- a/drivers/reset/reset-oxnas.c
+++ b/drivers/reset/reset-oxnas.c
@@ -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);
-- 
2.7.0

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

* [PATCH 2/3] dt-bindings: reset: oxnas: Add include file with reset indexes
  2016-09-09 13:19 [PATCH 0/3] reset: Add support for OX820 SoC Neil Armstrong
  2016-09-09 13:19 ` [PATCH 1/3] reset: oxnas: Add OX820 support Neil Armstrong
@ 2016-09-09 13:19 ` Neil Armstrong
  2016-09-09 13:19 ` [PATCH 3/3] dt-bindings: reset: oxnas: Update for OX820 Neil Armstrong
  2 siblings, 0 replies; 7+ messages in thread
From: Neil Armstrong @ 2016-09-09 13:19 UTC (permalink / raw)
  To: Philipp Zabel; +Cc: Neil Armstrong, devicetree, linux-arm-kernel, linux-kernel

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

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
 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

diff --git a/include/dt-bindings/reset/oxsemi,ox810se.h b/include/dt-bindings/reset/oxsemi,ox810se.h
new file mode 100644
index 0000000..960c26e
--- /dev/null
+++ b/include/dt-bindings/reset/oxsemi,ox810se.h
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2016 Neil Armstrong <narmstrong@baylibre.com>
+ *
+ * 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 */
diff --git a/include/dt-bindings/reset/oxsemi,ox820.h b/include/dt-bindings/reset/oxsemi,ox820.h
new file mode 100644
index 0000000..cc6797b
--- /dev/null
+++ b/include/dt-bindings/reset/oxsemi,ox820.h
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2016 Neil Armstrong <narmstrong@baylibre.com>
+ *
+ * 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_OX820_H
+#define DT_RESET_OXSEMI_OX820_H
+
+#define RESET_SCU	0
+#define RESET_LEON	1
+#define RESET_ARM0	2
+#define RESET_ARM1	3
+#define RESET_USBHS	4
+#define RESET_USBPHYA	5
+#define RESET_MAC	6
+#define RESET_PCIEA	7
+#define RESET_SGDMA	8
+#define RESET_CIPHER	9
+#define RESET_DDR	10
+#define RESET_SATA	11
+#define RESET_SATA_LINK	12
+#define RESET_SATA_PHY	13
+#define RESET_PCIEPHY	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_SD	21
+#define RESET_MAC_2	22
+#define RESET_PCIEB	23
+#define RESET_VIDEO	24
+#define RESET_DDR_PHY	25
+#define RESET_USBPHYB	26
+#define RESET_USBDEV	27
+/* Reserved		29 */
+#define RESET_ARMDBG	29
+#define RESET_PLLA	30
+#define RESET_PLLB	31
+
+#endif /* DT_RESET_OXSEMI_OX820_H */
-- 
2.7.0

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

* [PATCH 3/3] dt-bindings: reset: oxnas: Update for OX820
  2016-09-09 13:19 [PATCH 0/3] reset: Add support for OX820 SoC Neil Armstrong
  2016-09-09 13:19 ` [PATCH 1/3] reset: oxnas: Add OX820 support Neil Armstrong
  2016-09-09 13:19 ` [PATCH 2/3] dt-bindings: reset: oxnas: Add include file with reset indexes Neil Armstrong
@ 2016-09-09 13:19 ` Neil Armstrong
       [not found]   ` <20160909131955.27334-4-narmstrong-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
  2 siblings, 1 reply; 7+ messages in thread
From: Neil Armstrong @ 2016-09-09 13:19 UTC (permalink / raw)
  To: Philipp Zabel; +Cc: Neil Armstrong, devicetree, linux-arm-kernel, linux-kernel

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.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
 .../devicetree/bindings/reset/oxnas,reset.txt      | 39 ++--------------------
 1 file changed, 3 insertions(+), 36 deletions(-)

diff --git a/Documentation/devicetree/bindings/reset/oxnas,reset.txt b/Documentation/devicetree/bindings/reset/oxnas,reset.txt
index 6f06db9..df0488e 100644
--- a/Documentation/devicetree/bindings/reset/oxnas,reset.txt
+++ b/Documentation/devicetree/bindings/reset/oxnas,reset.txt
@@ -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:
 
-- 
2.7.0

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

* Re: [PATCH 3/3] dt-bindings: reset: oxnas: Update for OX820
       [not found]   ` <20160909131955.27334-4-narmstrong-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
@ 2016-09-09 13:35     ` Philipp Zabel
       [not found]       ` <1473428153.3023.34.camel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Philipp Zabel @ 2016-09-09 13:35 UTC (permalink / raw)
  To: Neil Armstrong
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

Hi Neil,

Am Freitag, den 09.09.2016, 15:19 +0200 schrieb 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.

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"?

> Signed-off-by: Neil Armstrong <narmstrong-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
> ---
>  .../devicetree/bindings/reset/oxnas,reset.txt      | 39 ++--------------------
>  1 file changed, 3 insertions(+), 36 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/reset/oxnas,reset.txt b/Documentation/devicetree/bindings/reset/oxnas,reset.txt
> index 6f06db9..df0488e 100644
> --- a/Documentation/devicetree/bindings/reset/oxnas,reset.txt
> +++ b/Documentation/devicetree/bindings/reset/oxnas,reset.txt
> @@ -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"

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

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 3/3] dt-bindings: reset: oxnas: Update for OX820
       [not found]       ` <1473428153.3023.34.camel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
@ 2016-09-09 13:43         ` Neil Armstrong
  2016-09-19 21:18         ` Rob Herring
  1 sibling, 0 replies; 7+ messages in thread
From: Neil Armstrong @ 2016-09-09 13:43 UTC (permalink / raw)
  To: Philipp Zabel
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

Hi Philipp,

On 09/09/2016 03:35 PM, Philipp Zabel wrote:
> Hi Neil,
> 
> Am Freitag, den 09.09.2016, 15:19 +0200 schrieb 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.
> 
> 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.

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

OK, will do in v2.

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

Thanks,
Neil
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 3/3] dt-bindings: reset: oxnas: Update for OX820
       [not found]       ` <1473428153.3023.34.camel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
  2016-09-09 13:43         ` Neil Armstrong
@ 2016-09-19 21:18         ` Rob Herring
  1 sibling, 0 replies; 7+ messages in thread
From: Rob Herring @ 2016-09-19 21:18 UTC (permalink / raw)
  To: Philipp Zabel
  Cc: Neil Armstrong, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

On Fri, Sep 09, 2016 at 03:35:53PM +0200, Philipp Zabel wrote:
> Hi Neil,
> 
> Am Freitag, den 09.09.2016, 15:19 +0200 schrieb 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.
> 
> 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
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2016-09-19 21:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-09 13:19 [PATCH 0/3] reset: Add support for OX820 SoC Neil Armstrong
2016-09-09 13:19 ` [PATCH 1/3] reset: oxnas: Add OX820 support Neil Armstrong
2016-09-09 13:19 ` [PATCH 2/3] dt-bindings: reset: oxnas: Add include file with reset indexes Neil Armstrong
2016-09-09 13:19 ` [PATCH 3/3] dt-bindings: reset: oxnas: Update for OX820 Neil Armstrong
     [not found]   ` <20160909131955.27334-4-narmstrong-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
2016-09-09 13:35     ` Philipp Zabel
     [not found]       ` <1473428153.3023.34.camel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2016-09-09 13:43         ` Neil Armstrong
2016-09-19 21:18         ` Rob Herring

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