mips: bmips: add bcm6345-rst driver support for BCM6328
authorÁlvaro Fernández Rojas <noltari@gmail.com>
Wed, 3 May 2017 13:10:23 +0000 (15:10 +0200)
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Wed, 10 May 2017 14:16:09 +0000 (16:16 +0200)
This driver can control up to 32 clocks.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/mips/dts/brcm,bcm6328.dtsi
include/dt-bindings/reset/bcm6328-reset.h [new file with mode: 0644]

index 6b5c5dd7342639dd35c536c730f2612312af1e59..9b76a2322ce11fd4b1e21b7a17e81da324d85d26 100644 (file)
@@ -6,6 +6,7 @@
 
 #include <dt-bindings/clock/bcm6328-clock.h>
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/reset/bcm6328-reset.h>
 #include "skeleton.dtsi"
 
 / {
                #size-cells = <1>;
                u-boot,dm-pre-reloc;
 
+               periph_rst: reset-controller@10000010 {
+                       compatible = "brcm,bcm6345-reset";
+                       reg = <0x10000010 0x4>;
+                       #reset-cells = <1>;
+               };
+
                pll_cntl: syscon@10000068 {
                        compatible = "syscon";
                        reg = <0x10000068 0x4>;
diff --git a/include/dt-bindings/reset/bcm6328-reset.h b/include/dt-bindings/reset/bcm6328-reset.h
new file mode 100644 (file)
index 0000000..c144ad2
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * Derived from linux/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef __DT_BINDINGS_RESET_BCM6328_H
+#define __DT_BINDINGS_RESET_BCM6328_H
+
+#define BCM6328_RST_SPI                0
+#define BCM6328_RST_EPHY       1
+#define BCM6328_RST_SAR                2
+#define BCM6328_RST_ENETSW     3
+#define BCM6328_RST_USBS       4
+#define BCM6328_RST_USBH       5
+#define BCM6328_RST_PCM                6
+#define BCM6328_RST_PCIE_CORE  7
+#define BCM6328_RST_PCIE       8
+#define BCM6328_RST_PCIE_EXT   9
+#define BCM6328_RST_PCIE_HARD  10
+
+#endif /* __DT_BINDINGS_RESET_BCM6328_H */