[PATCH 2/8] soc: Add MediaTek pericfg controller support

From: Sascha Hauer
Date: Tue Jan 20 2015 - 04:47:53 EST


This adds support for the MediaTek pericfg controller found
on the MT8135/MT8173 SoCs. The pericfg controller contains
miscellaneous registers for controlling peripheral resets and
clocks.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
.../devicetree/bindings/soc/mediatek/pericfg.txt | 19 +++++++++++++++++++
drivers/soc/mediatek/Kconfig | 10 ++++++++++
drivers/soc/mediatek/Makefile | 1 +
drivers/soc/mediatek/mtk-pericfg.c | 1 -
4 files changed, 30 insertions(+), 1 deletion(-)
create mode 100644 Documentation/devicetree/bindings/soc/mediatek/pericfg.txt

diff --git a/Documentation/devicetree/bindings/soc/mediatek/pericfg.txt b/Documentation/devicetree/bindings/soc/mediatek/pericfg.txt
new file mode 100644
index 0000000..81d1aee
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/mediatek/pericfg.txt
@@ -0,0 +1,19 @@
+MediaTek pericfg Controller
+
+The pericfg controller contains miscellaneous registers for controlling
+clocks, resets and bus settings.
+
+Required properties:
+- compatible: must be one of:
+ mediatek,mt8135-pericfg
+ mediatek,mt8173-pericfg
+- reg: Address range for the pericfg controller
+
+Example:
+
+ pericfg: pericfg@10003000 {
+ #reset-cells = <1>;
+ #clock-cells = <1>;
+ compatible = "mediatek,mt8135-pericfg";
+ reg = <0 0x10003000 0 0x1000>;
+ };
diff --git a/drivers/soc/mediatek/Kconfig b/drivers/soc/mediatek/Kconfig
index 3ad39fe..9bdb88f 100644
--- a/drivers/soc/mediatek/Kconfig
+++ b/drivers/soc/mediatek/Kconfig
@@ -10,3 +10,13 @@ config MTK_INFRACFG
contains several miscellaneous registers for clock, reset and bus
settings. Say yes here if you want to run your kernel on one of these
SoCs.
+
+config MTK_PERICFG
+ tristate "MediaTek pericfg controller support"
+ depends on ARCH_MEDIATEK || COMPILE_TEST
+ select REGMAP
+ help
+ The MediaTek pericfg controller found on MT8135 and MT8173 SoCs
+ contains several miscellaneous registers for clock, reset and bus
+ settings. Say yes here if you want to run your kernel on one of these
+ SoCs.
diff --git a/drivers/soc/mediatek/Makefile b/drivers/soc/mediatek/Makefile
index dbeb627..e67be7c 100644
--- a/drivers/soc/mediatek/Makefile
+++ b/drivers/soc/mediatek/Makefile
@@ -1 +1,2 @@
obj-$(CONFIG_MTK_INFRACFG) += mtk-infracfg.o
+obj-$(CONFIG_MTK_PERICFG) += mtk-pericfg.o
diff --git a/drivers/soc/mediatek/mtk-pericfg.c b/drivers/soc/mediatek/mtk-pericfg.c
index b7ee902..aa9a7eb 100644
--- a/drivers/soc/mediatek/mtk-pericfg.c
+++ b/drivers/soc/mediatek/mtk-pericfg.c
@@ -1,6 +1,5 @@
/*
* Copyright (c) 2014 MediaTek Inc.
- * Author: Flora Fu <flora.fu@xxxxxxxxxxxx>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
--
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/