From patchwork Tue Jan 20 09:47:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sascha Hauer X-Patchwork-Id: 5666731 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8A117C058D for ; Tue, 20 Jan 2015 09:52:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 849FF203B8 for ; Tue, 20 Jan 2015 09:52:13 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AE521203AF for ; Tue, 20 Jan 2015 09:52:12 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YDVRq-0004MU-T4; Tue, 20 Jan 2015 09:50:10 +0000 Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YDVPn-0002e4-K1 for linux-arm-kernel@lists.infradead.org; Tue, 20 Jan 2015 09:48:04 +0000 Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1YDVPB-00064F-Gz; Tue, 20 Jan 2015 10:47:25 +0100 Received: from sha by dude.hi.pengutronix.de with local (Exim 4.84) (envelope-from ) id 1YDVP9-0000A3-2H; Tue, 20 Jan 2015 10:47:23 +0100 From: Sascha Hauer To: Olof Johansson , Arnd Bergmann Subject: [PATCH 2/8] soc: Add MediaTek pericfg controller support Date: Tue, 20 Jan 2015 10:47:05 +0100 Message-Id: <1421747231-554-3-git-send-email-s.hauer@pengutronix.de> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1421747231-554-1-git-send-email-s.hauer@pengutronix.de> References: <1421747231-554-1-git-send-email-s.hauer@pengutronix.de> X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150120_014803_942543_FEE6E332 X-CRM114-Status: GOOD ( 17.90 ) X-Spam-Score: -0.0 (/) Cc: Samuel Ortiz , Mark Brown , linux-kernel@vger.kernel.org, Rob Herring , Matthias Brugger , Eddie Huang , Lee Jones , Sascha Hauer , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- .../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 * * 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