bmips: bcm6358: add bcm6348-iudma support
authorÁlvaro Fernández Rojas <noltari@gmail.com>
Sat, 1 Dec 2018 18:00:18 +0000 (19:00 +0100)
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Wed, 19 Dec 2018 14:23:00 +0000 (15:23 +0100)
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
arch/mips/dts/brcm,bcm6358.dtsi
include/dt-bindings/dma/bcm6358-dma.h [new file with mode: 0644]

index 0617b46e92687af1e3b2d30f9868dec558054994..5605723e8388d645a20ebe6d16e070b395ccaf81 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <dt-bindings/clock/bcm6358-clock.h>
+#include <dt-bindings/dma/bcm6358-dma.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/reset/bcm6358-reset.h>
 #include "skeleton.dtsi"
 
                        status = "disabled";
                };
+
+               iudma: dma-controller@fffe5000 {
+                       compatible = "brcm,bcm6348-iudma";
+                       reg = <0xfffe5000 0x24>,
+                             <0xfffe5100 0x80>,
+                             <0xfffe5200 0x80>;
+                       reg-names = "dma",
+                                   "dma-channels",
+                                   "dma-sram";
+                       #dma-cells = <1>;
+                       dma-channels = <8>;
+                       clocks = <&periph_clk BCM6358_CLK_EMUSB>,
+                                <&periph_clk BCM6358_CLK_USBSU>,
+                                <&periph_clk BCM6358_CLK_EPHY>;
+                       resets = <&periph_rst BCM6358_RST_ENET>,
+                                <&periph_rst BCM6358_RST_EPHY>;
+               };
        };
 };
diff --git a/include/dt-bindings/dma/bcm6358-dma.h b/include/dt-bindings/dma/bcm6358-dma.h
new file mode 100644 (file)
index 0000000..3118b9d
--- /dev/null
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2018 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * Derived from linux/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+ */
+
+#ifndef __DT_BINDINGS_DMA_BCM6358_H
+#define __DT_BINDINGS_DMA_BCM6358_H
+
+#define BCM6358_DMA_ENET0_RX   0
+#define BCM6358_DMA_ENET0_TX   1
+#define BCM6358_DMA_ENET1_RX   2
+#define BCM6358_DMA_ENET1_TX   3
+
+#endif /* __DT_BINDINGS_DMA_BCM6358_H */