Skip to contentSkip to conversation

mt8183 emi bandwidth monitor support

PATCH New Xi Chen 1 participant 4 messages Jul 26, 2019 1 message not in the archive

Subsystems (3)

v4 of 5 New Latest is v5 →

lore
Share & tools
lore

Xi Chen

author
#0 lore raw

v4 cover mt8183 emi bandwidth monitor support

Xi Chen (3):
dt-bindings: soc: Add MT8183 emi dt-bindings
arm64: dts: mt8183: add emi node
mt8183: emi: add bandwidth driver support

 .../bindings/memory-controllers/mediatek,emi.txt   |  14 +
 arch/arm64/boot/dts/mediatek/mt8183.dtsi           |   5 +
 drivers/memory/Kconfig                             |   9 +
 drivers/memory/Makefile                            |   1 +
 drivers/memory/mtk-emi.c                           | 352 +++++++++++++++++++++
 include/soc/mediatek/emi.h                         |  70 ++++
 6 files changed, 451 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/memory-controllers/mediatek,emi.txt
 create mode 100644 drivers/memory/mtk-emi.c
 create mode 100644 include/soc/mediatek/emi.h
Signature · 1 line
1.9.1

A message that is not in the archive (sent off-list or not yet received): 1564129432-15214-1-git-send-email-xixi.chen-NuS5LvNUpcJWk0Htik3J/[email protected]

author
#2 lore raw

PATCH v4 1/3 dt-bindings: soc: Add MT8183 emi dt-bindings

Add emi dt-bindings of MT8183 in binding document.

---
 .../bindings/memory-controllers/mediatek,emi.txt           | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/memory-controllers/mediatek,emi.txt
Documentation/devicetree/bindings/memory-controllers/mediatek,emi.txt new file +14 -0
new file mode 100644
index 0000000..14676d6
@@ -0,0 +1,14 @@
+EMI (External Memory Interface)
+  EMI is a HW module which processing memory read/write requests to DRAM.
+It makes memory access more efficiently .
+
+Required properties:
+- compatible : must be one of :
+	"mediatek,mt8183-emi"
+- reg : the central emi register base and size of the EMI HW.
+
+Example:
+	emi@10219000 {
+		compatible = "mediatek,mt8183-emi";
+		reg = <0 0x10219000 0 0x1000>; /* CEN EMI */
+	};
Signature · 1 line
1.9.1
author
#3 lore raw

PATCH v4 2/3 arm64: dts: mt8183: add emi node

In reply to a message not in the archive

Add emi dts node.

---
 arch/arm64/boot/dts/mediatek/mt8183.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/mediatek/mt8183.dtsi +5 -0
index 75c4881..cb6fd18 100644
@@ -269,6 +269,11 @@
 			clock-names = "spi", "wrap";
 		};
 
+		emi@10219000 {
+			compatible = "mediatek,mt8183-emi";
+			reg = <0 0x10219000 0 0x1000>; /* CEN EMI */
+		};
+
 		uart0: serial@11002000 {
 			compatible = "mediatek,mt8183-uart",
 				     "mediatek,mt6577-uart";
Signature · 1 line
1.9.1
author
#4 lore raw

PATCH v4 3/3 mt8183: emi: add bandwidth driver support

In reply to a message not in the archive

EMI provides interface for get bandwidth on every 1 miliseconds. Currently, just support GPU bandwidth info.

---
 drivers/memory/Kconfig     |   9 ++
 drivers/memory/Makefile    |   1 +
 drivers/memory/mtk-emi.c   | 352 +++++++++++++++++++++++++++++++++++++++++++++
 include/soc/mediatek/emi.h |  70 +++++++++
 4 files changed, 432 insertions(+)
 create mode 100644 drivers/memory/mtk-emi.c
 create mode 100644 include/soc/mediatek/emi.h
drivers/memory/Kconfig +9 -0
index 2d91b00..72ec6d6 100644
@@ -129,6 +129,15 @@ config JZ4780_NEMC
 	  the Ingenic JZ4780. This controller is used to handle external
 	  memory devices such as NAND and SRAM.
 
+config MTK_EMI_MBW
+	bool "Mediatek EMI bandwidth driver"
+	depends on ARCH_MEDIATEK || COMPILE_TEST
+	help
+	  This driver is for MTK EMI(External Memory Interface) control.
+	  It contains features like bandwidth, MPU and so on.
+	  Bandwidth feature is for getting different port throughoutput,
+	  like CPU, GPU, MM and so on.
+
 config MTK_SMI
 	bool
 	depends on ARCH_MEDIATEK || COMPILE_TEST
drivers/memory/Makefile +1 -0
index 90161de..4f8b241 100644
@@ -17,6 +17,7 @@ obj-$(CONFIG_FSL_CORENET_CF)	+= fsl-corenet-cf.o
 obj-$(CONFIG_FSL_IFC)		+= fsl_ifc.o
 obj-$(CONFIG_MVEBU_DEVBUS)	+= mvebu-devbus.o
 obj-$(CONFIG_JZ4780_NEMC)	+= jz4780-nemc.o
+obj-$(CONFIG_MTK_EMI_MBW)	+= mtk-emi.o
 obj-$(CONFIG_MTK_SMI)		+= mtk-smi.o
 obj-$(CONFIG_DA8XX_DDRCTL)	+= da8xx-ddrctl.o
 obj-$(CONFIG_PL353_SMC)		+= pl353-smc.o
drivers/memory/mtk-emi.c new file +352 -0

352 lines not on this page · raw message

include/soc/mediatek/emi.h new file +70 -0

70 lines not on this page · raw message

Signature · 1 line
1.9.1