Add Arria10 System Manager Reset Controller
v2 cover Add Arria10 System Manager Reset Controller
From: Thor Thayer <[email protected]>
This series of patches adds the Altera Arria10 Development Kit System Resource Chip's Reset Controller.
Thor Thayer (5):
dt-bindings: mfd: Add Altera Arria10 SR Reset Controller bindings
dt-bindings: reset: a10sr: Add Arria10 SR Reset Controller offsets
reset: Add Altera Arria10 SR Reset Controller
mfd: altr_a10sr: Add Arria10 DevKit Reset Controller
ARM: dts: socfpga: Add Devkit A10-SR Reset Controller
.../devicetree/bindings/mfd/altera-a10sr.txt | 11 ++ MAINTAINERS | 2 + arch/arm/boot/dts/socfpga_arria10_socdk.dtsi | 5 + drivers/mfd/altera-a10sr.c | 4 + drivers/reset/Kconfig | 7 ++ drivers/reset/Makefile | 1 + drivers/reset/reset-a10sr.c | 138 +++++++++++++++++++++ include/dt-bindings/reset/altr,rst-mgr-a10sr.h | 33 +++++ 8 files changed, 201 insertions(+) create mode 100644 drivers/reset/reset-a10sr.c create mode 100644 include/dt-bindings/reset/altr,rst-mgr-a10sr.h
Signature · 1 line
1.9.1
PATCH v2 1/5 dt-bindings: mfd: Add Altera Arria10 SR Reset Controller bindings
From: Thor Thayer <[email protected]>
This patch adds documentation for the Altera A10-SR Reset Controller DT bindings.
---
v2 No change
--- Documentation/devicetree/bindings/mfd/altera-a10sr.txt | 11 +++++++++++ 1 file changed, 11 insertions(+)
Documentation/devicetree/bindings/mfd/altera-a10sr.txt +11 -0
@@ -18,6 +18,7 @@ The A10SR consists of these sub-devices: Device Description ------ ---------- a10sr_gpio GPIO Controller +a10sr_rst Reset Controller Arria10 GPIO Required Properties:
@@ -27,6 +28,11 @@ Required Properties: the second cell is used to specify flags. See ../gpio/gpio.txt for more information. +Arria10 Peripheral PHY Reset +Required Properties: +- compatible : Should be "altr,a10sr-reset" +- #reset-cells : Should be one. + Example: resource-manager at 0 {
@@ -43,4 +49,9 @@ Example: gpio-controller; #gpio-cells = <2>; }; + + a10sr_rst: reset-controller { + compatible = "altr,a10sr-reset"; + #reset-cells = <1>; + }; };
Signature · 1 line
1.9.1
Re: [PATCHv2 1/5] dt-bindings: mfd: Add Altera Arria10 SR Reset Controller bindings
Quoted 11 lines · thor.thayer at linux.intel.com
From: Thor Thayer <[email protected]>
This patch adds documentation for the Altera A10-SR Reset Controller DT bindings.
Signed-off-by Thor Thayer <[email protected]>---
v2 No change--- Documentation/devicetree/bindings/mfd/altera-a10sr.txt | 11 +++++++++++ 1 file changed, 11 insertions(+)
Re: [PATCHv2 1/5] dt-bindings: mfd: Add Altera Arria10 SR Reset Controller bindings
In reply to [email protected]Quoted 11 lines · thor.thayer at linux.intel.com
From: Thor Thayer <[email protected]>
This patch adds documentation for the Altera A10-SR Reset Controller DT bindings.
Signed-off-by Thor Thayer <[email protected]>---
v2 No change--- Documentation/devicetree/bindings/mfd/altera-a10sr.txt | 11 +++++++++++ 1 file changed, 11 insertions(+)
Applied with Rob's Ack.
Quoted 34 lines
Documentation/devicetree/bindings/mfd/altera-a10sr.txt +11
-0@@ -18,6 +18,7 @@ The A10SR consists of these sub-devices: Device Description ------ ---------- a10sr_gpio GPIO Controller +a10sr_rst Reset Controller Arria10 GPIO Required Properties:@@ -27,6 +28,11 @@ Required Properties: the second cell is used to specify flags. See ../gpio/gpio.txt for more information. +Arria10 Peripheral PHY Reset +Required Properties: +- compatible : Should be "altr,a10sr-reset" +- #reset-cells : Should be one. + Example: resource-manager at 0 {@@ -43,4 +49,9 @@ Example: gpio-controller; #gpio-cells = <2>; }; + + a10sr_rst: reset-controller { + compatible = "altr,a10sr-reset"; + #reset-cells = <1>; + }; };
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Philipp Zabel
maintainerRe: [PATCHv2 1/5] dt-bindings: mfd: Add Altera Arria10 SR Reset Controller bindings
Quoted 7 lines · Lee Jones
Quoted 5 lines · thor.thayer at linux.intel.com
From: Thor Thayer <[email protected]>
This patch adds documentation for the Altera A10-SR Reset Controller DT bindings.
Quoted 8 lines
Quoted 6 lines
Signed-off-by Thor Thayer <[email protected]>---
v2 No change--- Documentation/devicetree/bindings/mfd/altera-a10sr.txt | 11 +++++++++++ 1 file changed, 11 insertions(+)Applied with Rob's Ack.
Thanks, I've picked up patches 2 and 3.
regards
Philipp
PATCH v2 2/5 dt-bindings: reset: a10sr: Add Arria10 SR Reset Controller offsets
In reply to [email protected]From: Thor Thayer <[email protected]>
The Arria10 System Resource Chip reset controller handles the Arria10 peripheral PHYs. This patch adds the offsets for these PHYs.
---
v2 Add NUM_RESETs to altr,rst-mgr-a10sr.h for maximum count.
--- MAINTAINERS | 1 + include/dt-bindings/reset/altr,rst-mgr-a10sr.h | 33 ++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 include/dt-bindings/reset/altr,rst-mgr-a10sr.h
MAINTAINERS +1 -0
@@ -654,6 +654,7 @@ S: Maintained F: drivers/gpio/gpio-altera-a10sr.c F: drivers/mfd/altera-a10sr.c F: include/linux/mfd/altera-a10sr.h +F: include/dt-bindings/reset/altr,rst-mgr-a10sr.h ALTERA TRIPLE SPEED ETHERNET DRIVER M: Vince Bridgers <[email protected]>
include/dt-bindings/reset/altr,rst-mgr-a10sr.h new file +33 -0
@@ -0,0 +1,33 @@ +/* +* Copyright Intel Corporation (C) 2017. All Rights Reserved +* +* 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/>. +* +* Reset binding definitions for Altera Arria10 MAX5 System Resource Chip +* +* Adapted from altr,rst-mgr-a10.h +*/ + +#ifndef _DT_BINDINGS_RESET_ALTR_RST_MGR_A10SR_H +#define _DT_BINDINGS_RESET_ALTR_RST_MGR_A10SR_H + +/* Peripheral PHY resets */ +#define A10SR_RESET_ENET_HPS 0 +#define A10SR_RESET_PCIE 1 +#define A10SR_RESET_FILE 2 +#define A10SR_RESET_BQSPI 3 +#define A10SR_RESET_USB 4 + +#define A10SR_RESET_NUM 5 + +#endif
Signature · 1 line
1.9.1
PATCH v2 3/5 reset: Add Altera Arria10 SR Reset Controller
In reply to [email protected]From: Thor Thayer <[email protected]>
This patch adds the reset controller functionality for Peripheral PHYs to the Arria10 System Resource Chip.
---
V2 Rename and move new Kconfig to correct alphabetical order.
Update Makefile with better Kconfig name.
Alphabetize MAINTAINER drivers entry.
Remove unused include files.
Replace 16 reset size with actual size. Enumerate size in header file.
Remove extra id in-range checks since framework checks this. Return error code from regmap_read() fail instead of fixed error. Remove device_node validation since framework handles this. Remove device_node and device local variables in cleanup. Delete a10sr_reset_remove() since using devm_ functions. Delete .remove function and .owner from platform_driver struct. Minor cleanup of commit header and commit description.
--- MAINTAINERS | 1 + drivers/reset/Kconfig | 7 +++ drivers/reset/Makefile | 1 + drivers/reset/reset-a10sr.c | 138 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 147 insertions(+) create mode 100644 drivers/reset/reset-a10sr.c
MAINTAINERS +1 -0
@@ -653,6 +653,7 @@ M: Thor Thayer <[email protected]> S: Maintained F: drivers/gpio/gpio-altera-a10sr.c F: drivers/mfd/altera-a10sr.c +F: drivers/reset/reset-a10sr.c F: include/linux/mfd/altera-a10sr.h F: include/dt-bindings/reset/altr,rst-mgr-a10sr.h
drivers/reset/Kconfig +7 -0
@@ -14,6 +14,13 @@ menuconfig RESET_CONTROLLER if RESET_CONTROLLER +config RESET_A10SR + tristate "Altera Arria10 System Resource Reset" + depends on MFD_ALTERA_A10SR + help + This option enables support for the external reset functions for + peripheral PHYs on the Altera Arria10 System Resource Chip. + config RESET_ATH79 bool "AR71xx Reset Driver" if COMPILE_TEST default ATH79
drivers/reset/Makefile +1 -0
@@ -2,6 +2,7 @@ obj-y += core.o obj-y += hisilicon/ obj-$(CONFIG_ARCH_STI) += sti/ obj-$(CONFIG_ARCH_TEGRA) += tegra/ +obj-$(CONFIG_RESET_A10SR) += reset-a10sr.o obj-$(CONFIG_RESET_ATH79) += reset-ath79.o obj-$(CONFIG_RESET_BERLIN) += reset-berlin.o obj-$(CONFIG_RESET_LPC18XX) += reset-lpc18xx.o
drivers/reset/reset-a10sr.c new file +138 -0
138 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v2 4/5 mfd: altr_a10sr: Add Arria10 DevKit Reset Controller
In reply to [email protected]From: Thor Thayer <[email protected]>
Add Peripheral PHY Reset Controller to the Arria10 Development Kit System Resource Chip's MFD.
---
v2 Changes to commit header & body for clarification.
--- drivers/mfd/altera-a10sr.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/mfd/altera-a10sr.c +4 -0
@@ -33,6 +33,10 @@ .name = "altr_a10sr_gpio", .of_compatible = "altr,a10sr-gpio", }, + { + .name = "altr_a10sr_reset", + .of_compatible = "altr,a10sr-reset", + }, };static bool altr_a10sr_reg_readable (struct device *dev,unsigned int reg)
Signature · 1 line
1.9.1
Philipp Zabel
maintainerRe: [PATCHv2 4/5] mfd: altr_a10sr: Add Arria10 DevKit Reset Controller
Quoted 17 lines · thor.thayer at linux.intel.com
From: Thor Thayer <[email protected]>
Add Peripheral PHY Reset Controller to the Arria10 Development Kit System Resource Chip's MFD.
Signed-off-by Thor Thayer <[email protected]>---
v2 Changes to commit header & body for clarification.--- drivers/mfd/altera-a10sr.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/mfd/altera-a10sr.c +0
-0
drivers/mfd/altera-a10sr.c line 42
Quoted 10 lines
drivers/mfd/altera-a10sr.c +4
-0@@ -33,6 +33,10 @@ .name = "altr_a10sr_gpio", .of_compatible = "altr,a10sr-gpio", }, + { + .name = "altr_a10sr_reset", + .of_compatible = "altr,a10sr-reset", + }, };static bool altr_a10sr_reg_readable (struct device *dev,unsigned int reg)
Lee, should this be merged through the reset tree? Otherwise I'll just pick up patches 1-3.
regards
Philipp
Re: [PATCHv2 4/5] mfd: altr_a10sr: Add Arria10 DevKit Reset Controller
Hi Lee,
Quoted 27 lines · Philipp Zabel
Quoted 26 lines · On Wed, 2017-02-22 at 11:10 -0600, [email protected] wrote:
From: Thor Thayer <[email protected]>
Add Peripheral PHY Reset Controller to the Arria10 Development Kit System Resource Chip's MFD.
Signed-off-by Thor Thayer <[email protected]>---
v2 Changes to commit header & body for clarification.--- drivers/mfd/altera-a10sr.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/mfd/altera-a10sr.c +4
-0@@ -33,6 +33,10 @@ .name = "altr_a10sr_gpio", .of_compatible = "altr,a10sr-gpio", }, + { + .name = "altr_a10sr_reset", + .of_compatible = "altr,a10sr-reset", + }, };
Quoted 8 lines
drivers/mfd/altera-a10sr.c line 42
Quoted 1 line
drivers/mfd/altera-a10sr.c +0
-0static bool altr_a10sr_reg_readable (struct device *dev,unsigned int reg)Lee, should this be merged through the reset tree? Otherwise I'll just pick up patches 1-3.
regards
Philipp
Any comments on this patch and the patch series?
Thanks,
Thor
Philipp Zabel
maintainerRe: [PATCHv2 4/5] mfd: altr_a10sr: Add Arria10 DevKit Reset Controller
Quoted 34 lines · Thor Thayer
Hi Lee,
Quoted 31 lines · Philipp Zabel
Quoted 17 lines · thor.thayer at linux.intel.com
From: Thor Thayer <[email protected]>
Add Peripheral PHY Reset Controller to the Arria10 Development Kit System Resource Chip's MFD.
Signed-off-by Thor Thayer <[email protected]>---
v2 Changes to commit header & body for clarification.--- drivers/mfd/altera-a10sr.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/mfd/altera-a10sr.c +0
-0drivers/mfd/altera-a10sr.c line 42
Quoted 10 lines
drivers/mfd/altera-a10sr.c +4
-0@@ -33,6 +33,10 @@ .name = "altr_a10sr_gpio", .of_compatible = "altr,a10sr-gpio", }, + { + .name = "altr_a10sr_reset", + .of_compatible = "altr,a10sr-reset", + }, };static bool altr_a10sr_reg_readable (struct device *dev,unsigned int reg)Lee, should this be merged through the reset tree? Otherwise I'll just pick up patches 1-3.
I have picked up patches 1-3, but I only just noticed that patch 1 also would require Lee's ack for me to submit this.
regards
Philipp
Re: [PATCHv2 4/5] mfd: altr_a10sr: Add Arria10 DevKit Reset Controller
Quoted 36 lines · Philipp Zabel
Quoted 34 lines · Thor Thayer
Hi Lee,
Quoted 31 lines · Philipp Zabel
Quoted 17 lines · On Wed, 2017-02-22 at 11:10 -0600, [email protected] wrote:
From: Thor Thayer <[email protected]>
Add Peripheral PHY Reset Controller to the Arria10 Development Kit System Resource Chip's MFD.
Signed-off-by Thor Thayer <[email protected]>---
v2 Changes to commit header & body for clarification.--- drivers/mfd/altera-a10sr.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/mfd/altera-a10sr.c +0
-0drivers/mfd/altera-a10sr.c line 42
Quoted 10 lines
drivers/mfd/altera-a10sr.c +4
-0@@ -33,6 +33,10 @@ .name = "altr_a10sr_gpio", .of_compatible = "altr,a10sr-gpio", }, + { + .name = "altr_a10sr_reset", + .of_compatible = "altr,a10sr-reset", + }, };static bool altr_a10sr_reg_readable (struct device *dev,unsigned int reg)Lee, should this be merged through the reset tree? Otherwise I'll just pick up patches 1-3.
Quoted 6 lines
I have picked up patches 1-3, but I only just noticed that patch 1 also would require Lee's ack for me to submit this.
regards
Philipp
OK. Thanks Philipp.
FWIW, Patch 1 was acked by Rob Herring on 2/27/2017 although I understand that Lee may want a say in this as well.
Thanks again for reviewing and picking up those patches!
Thor
Lee Jones
AppliedRe: [PATCHv2 4/5] mfd: altr_a10sr: Add Arria10 DevKit Reset Controller
In reply to [email protected]Quoted 11 lines · thor.thayer at linux.intel.com
From: Thor Thayer <[email protected]>
Add Peripheral PHY Reset Controller to the Arria10 Development Kit System Resource Chip's MFD.
Signed-off-by Thor Thayer <[email protected]>---
v2 Changes to commit header & body for clarification.--- drivers/mfd/altera-a10sr.c | 4 ++++ 1 file changed, 4 insertions(+)
Sorry for the delay, I've been AFK on vacation and conferences.
Applied, thanks.
Quoted 15 lines
drivers/mfd/altera-a10sr.c +4
-0@@ -33,6 +33,10 @@ .name = "altr_a10sr_gpio", .of_compatible = "altr,a10sr-gpio", }, + { + .name = "altr_a10sr_reset", + .of_compatible = "altr,a10sr-reset", + }, };static bool altr_a10sr_reg_readable (struct device *dev,unsigned int reg)
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH v2 5/5 ARM: dts: socfpga: Add Devkit A10-SR Reset Controller
In reply to [email protected]From: Thor Thayer <[email protected]>
Add the Altera Arria10 System Resource Reset Controller to the MFD
---
v2 change commit header to ARM: dts: socfpga.
--- arch/arm/boot/dts/socfpga_arria10_socdk.dtsi | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm/boot/dts/socfpga_arria10_socdk.dtsi +5 -0
@@ -121,6 +121,11 @@ gpio-controller; #gpio-cells = <2>; }; + + a10sr_rst: reset-controller { + compatible = "altr,a10sr-reset"; + #reset-cells = <1>; + }; }; };
Signature · 1 line
1.9.1
Dinh Nguyen
AppliedRe: [PATCHv2 5/5] ARM: dts: socfpga: Add Devkit A10-SR Reset Controller
Quoted 9 lines · thor.thayer at linux.intel.com
From: Thor Thayer <[email protected]>
Add the Altera Arria10 System Resource Reset Controller to the MFD
Signed-off-by Thor Thayer <[email protected]>Acked-by Dinh Nguyen <[email protected]>---
v2 change commit header to ARM: dts: socfpga.
---
Applied.
Thanks,
Dinh