reset: Add brcm,bcm6345-reset device tree binding
Subsystems (3)
PATCH 1/2 reset: Add brcm,bcm6345-reset device tree binding
Add device tree binding for the BCM6345 soft reset controller.
The BCM6345 contains a soft-reset controller activated by setting a bit (that must previously have cleared).
---
Renamed to bcm6345, removed "mask" property.
.../bindings/reset/brcm,bcm6345-reset.txt | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Documentation/devicetree/bindings/reset/brcm,bcm6345-reset.txt
Documentation/devicetree/bindings/reset/brcm,bcm6345-reset.txt new file +33 -0
@@ -0,0 +1,33 @@ +Broadcom BCM6345 reset controller + +The BCM6345 contains a basic soft reset controller in the perf register +set which resets components using a bit in a register. + +Please also refer to reset.txt in this directory for common reset +controller binding usage. + +Required properties: +- compatible: Should be "brcm,bcm<soc>-reset", "brcm,bcm6345-reset" +- regmap: The register map phandle +- offset: Offset in the register map for the reset register (in bytes) +- #reset-cells: Must be set to 1 + +Example: + +periph_soft_rst: reset-controller { + compatible = "brcm,bcm63168-reset", "brcm,bcm6345-reset"; + regmap = <&periph_cntl>; + offset = <0x10>; + + #reset-cells = <1>; +}; + +usbh: usbphy@10002700 { + compatible = "brcm,bcm63168-usbh"; + reg = <0x10002700 0x38>; + clocks = <&periph_clk 13>, <&timer_clk 18>; + resets = <&periph_soft_rst 6>; + power-supply = <&power_usbh>; + #phy-cells = <0>; +}; +
Signature · 4 lines
2.1.4 -- Simon Arlott
PATCH 2/2 reset: bcm6345: Add support for the BCM6345 soft-reset controller
The BCM6345 contains a soft-reset controller activated by setting a bit (that must previously have cleared).
--- MAINTAINERS | 1 + drivers/reset/Kconfig | 1 + drivers/reset/Makefile | 17 +++--- drivers/reset/bcm/Kconfig | 10 ++++ drivers/reset/bcm/Makefile | 1 + drivers/reset/bcm/reset-bcm6345.c | 109 ++++++++++++++++++++++++++++++++++++++ 6 files changed, 131 insertions(+), 8 deletions(-) create mode 100644 drivers/reset/bcm/Kconfig create mode 100644 drivers/reset/bcm/Makefile create mode 100644 drivers/reset/bcm/reset-bcm6345.c
MAINTAINERS +1 -0
@@ -2378,6 +2378,7 @@ F: drivers/irqchip/irq-bcm63* F: drivers/irqchip/irq-bcm7* F: drivers/irqchip/irq-brcmstb* F: drivers/regulator/bcm63* +F: drivers/reset/bcm/reset-bcm6345* F: include/linux/bcm63xx_wdt.h BROADCOM TG3 GIGABIT ETHERNET DRIVER
drivers/reset/Kconfig +1 -0
@@ -12,4 +12,5 @@ menuconfig RESET_CONTROLLER If unsure, say no. +source "drivers/reset/bcm/Kconfig" source "drivers/reset/sti/Kconfig"
drivers/reset/Makefile +9 -8
@@ -1,8 +1,9 @@ -obj-$(CONFIG_RESET_CONTROLLER) += core.o -obj-$(CONFIG_ARCH_LPC18XX) += reset-lpc18xx.o -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_ZYNQ) += reset-zynq.o -obj-$(CONFIG_ATH79) += reset-ath79.o +obj-$(CONFIG_RESET_CONTROLLER) += core.o +obj-$(CONFIG_ARCH_LPC18XX) += reset-lpc18xx.o +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_ZYNQ) += reset-zynq.o +obj-$(CONFIG_ATH79) += reset-ath79.o +obj-y += bcm/
drivers/reset/bcm/Kconfig new file +10 -0
@@ -0,0 +1,10 @@ +if RESET_CONTROLLER + +config RESET_BCM6345 + bool "BCM6345 Reset Controller" + depends on BMIPS_GENERIC + default BMIPS_GENERIC + help + Support resetting of devices on BCM6345 boards. + +endif
drivers/reset/bcm/Makefile new file +1 -0
@@ -0,0 +1 @@ +obj-$(CONFIG_RESET_BCM6345) += reset-bcm6345.o
drivers/reset/bcm/reset-bcm6345.c new file +109 -0
109 lines not on this page · raw message
Signature · 4 lines
2.1.4 -- Simon Arlott
Philipp Zabel
maintainerHi Simon,
Am Mittwoch, den 02.12.2015, 21:03 +0000 schrieb Simon Arlott:
Quoted 22 lines
Add device tree binding for the BCM6345 soft reset controller.
The BCM6345 contains a soft-reset controller activated by setting a bit (that must previously have cleared).
Signed-off-by Simon Arlott <[email protected]>---
Renamed to bcm6345, removed "mask" property..../bindings/reset/brcm,bcm6345-reset.txt | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Documentation/devicetree/bindings/reset/brcm,bcm6345-reset.txtDocumentation/devicetree/bindings/reset/brcm,bcm6345-reset.txt new file +3
-0@@ -0,0 +1,33 @@ +Broadcom BCM6345 reset controller + +The BCM6345 contains a basic soft reset controller in the perf register
Documentation/devicetree/bindings/reset/brcm,bcm6345-reset.txt line 12
Quoted 10 lines
Documentation/devicetree/bindings/reset/brcm,bcm6345-reset.txt new file +9
-0+set which resets components using a bit in a register. + +Please also refer to reset.txt in this directory for common reset +controller binding usage. + +Required properties: +- compatible: Should be "brcm,bcm<soc>-reset", "brcm,bcm6345-reset" +- regmap: The register map phandle +- offset: Offset in the register map for the reset register (in bytes)
Is this something the device tree maintainers are happy with? I see there are already some regmap properties in the device tree, but in this case it looks to me like the reset controller node should be a child of the periph_cntl node as that register space is the only means of controlling it.
Documentation/devicetree/bindings/reset/brcm,bcm6345-reset.txt line 23
Quoted 11 lines
+- #reset-cells: Must be set to 1
Documentation/devicetree/bindings/reset/brcm,bcm6345-reset.txt new file +10
-0+ +Example: + +periph_soft_rst: reset-controller { + compatible = "brcm,bcm63168-reset", "brcm,bcm6345-reset"; + regmap = <&periph_cntl>; + offset = <0x10>; + + #reset-cells = <1>; +};
I would have written it something like this:
periph_cntl: ... {
compatible = "syscon", "simple-mfd";
#address-cells = <1>;
#size-cells = <1>;
periph_soft_rst: reset-controller {
compatible = "brcm,bcm6345-reset";
reg = <0x10 0x4>;
#reset-cells = <1>;
};
};for a device that is only controlled through a syscon. The driver itself looks good to me.
best regards
Philipp
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 23 lines · Philipp Zabel
Am Mittwoch, den 02.12.2015, 21:03 +0000 schrieb Simon Arlott:
Documentation/devicetree/bindings/reset/brcm,bcm6345-reset.txt line 23
Quoted 7 lines
Documentation/devicetree/bindings/reset/brcm,bcm6345-reset.txt new file +7
-0+periph_soft_rst: reset-controller { + compatible = "brcm,bcm63168-reset", "brcm,bcm6345-reset"; + regmap = <&periph_cntl>; + offset = <0x10>; + + #reset-cells = <1>; +};I would have written it something like this:
periph_cntl: ... { compatible = "syscon", "simple-mfd"; #address-cells = <1>; #size-cells = <1>; periph_soft_rst: reset-controller { compatible = "brcm,bcm6345-reset"; reg = <0x10 0x4>; #reset-cells = <1>; }; };
Quoted 1 line
for a device that is only controlled through a syscon.
Rob, do you want me to change this or is my version ok?
Quoted 6 lines
The driver itself looks good to me.
best regards
Philipp
Signature · 5 lines
Simon Arlott -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 8 lines · Simon Arlott
Add device tree binding for the BCM6345 soft reset controller.
The BCM6345 contains a soft-reset controller activated by setting a bit (that must previously have cleared).
Signed-off-by Simon Arlott <[email protected]>---
Renamed to bcm6345, removed "mask" property.
Quoted 49 lines
.../bindings/reset/brcm,bcm6345-reset.txt | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Documentation/devicetree/bindings/reset/brcm,bcm6345-reset.txtDocumentation/devicetree/bindings/reset/brcm,bcm6345-reset.txt new file +33
-0@@ -0,0 +1,33 @@ +Broadcom BCM6345 reset controller + +The BCM6345 contains a basic soft reset controller in the perf register +set which resets components using a bit in a register. + +Please also refer to reset.txt in this directory for common reset +controller binding usage. + +Required properties: +- compatible: Should be "brcm,bcm<soc>-reset", "brcm,bcm6345-reset" +- regmap: The register map phandle +- offset: Offset in the register map for the reset register (in bytes) +- #reset-cells: Must be set to 1 + +Example: + +periph_soft_rst: reset-controller { + compatible = "brcm,bcm63168-reset", "brcm,bcm6345-reset"; + regmap = <&periph_cntl>; + offset = <0x10>; + + #reset-cells = <1>; +}; + +usbh: usbphy@10002700 { + compatible = "brcm,bcm63168-usbh"; + reg = <0x10002700 0x38>; + clocks = <&periph_clk 13>, <&timer_clk 18>; + resets = <&periph_soft_rst 6>; + power-supply = <&power_usbh>; + #phy-cells = <0>; +}; +Signature · 4 lines
2.1.4 -- Simon Arlott