From patchwork Fri May 15 13:36:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 6414911 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 220489F32E for ; Fri, 15 May 2015 14:49:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2CE7620377 for ; Fri, 15 May 2015 14:49:10 +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 3677320155 for ; Fri, 15 May 2015 14:49:09 +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 1YtGsn-00016b-U2; Fri, 15 May 2015 14:46:37 +0000 Received: from mail-bn1bon0116.outbound.protection.outlook.com ([157.56.111.116] helo=na01-bn1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YtGs7-0000bx-As for linux-arm-kernel@lists.infradead.org; Fri, 15 May 2015 14:45:56 +0000 Received: from CO2PR03CA0042.namprd03.prod.outlook.com (10.141.194.169) by BLUPR03MB1348.namprd03.prod.outlook.com (10.163.80.26) with Microsoft SMTP Server (TLS) id 15.1.154.19; Fri, 15 May 2015 14:45:30 +0000 Received: from BN1BFFO11FD023.protection.gbl (2a01:111:f400:7c10::1:175) by CO2PR03CA0042.outlook.office365.com (2a01:111:e400:1414::41) with Microsoft SMTP Server (TLS) id 15.1.166.22 via Frontend Transport; Fri, 15 May 2015 14:45:30 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=freescale.com; freescale.mail.onmicrosoft.com; dkim=none (message not signed) header.d=none; Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11FD023.mail.protection.outlook.com (10.58.144.86) with Microsoft SMTP Server (TLS) id 15.1.160.8 via Frontend Transport; Fri, 15 May 2015 14:45:30 +0000 Received: from shlinux2.ap.freescale.net (shlinux2.ap.freescale.net [10.192.224.44]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id t4FEjA52016852; Fri, 15 May 2015 07:45:25 -0700 From: To: , , , , , , , Subject: [PATCH 3/7] Document: dt: fsl: snvs: change support syscon Date: Fri, 15 May 2015 21:36:26 +0800 Message-ID: <1431696990-23078-4-git-send-email-Frank.Li@freescale.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1431696990-23078-1-git-send-email-Frank.Li@freescale.com> References: <1431696990-23078-1-git-send-email-Frank.Li@freescale.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD023; 1:nZ+QYBvvZ6bw6xJr95O2/rbh/FqJEIlamXORl3kwak9bUPS5ktuARpml84WoW796wo6PkXuADI/gHF5pposUZZV8lZOenLci8x3v4sMqWRNKxdrLgx55pHs+j5vz0C39nPjKVgMdTEVdoKtuJlZ6wZJWH9SqAzuhLCh83sA/6gCvLWKWqRk20RmGos7d6Y1ivQ0Z4NFQ715mPksRm/hsaPOZGFoZzSYjIaW4J57ULmzIeIL+aoZ/3crUDO4YTUqN7jhWrhqqGwbleBfL88CMiPsTNfGbnTIQgzfXw2s4epxAmwU2rbwhIGvVBVWeQLdPX3Zz24O7xT09FjE5iqgkDQ== X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(339900001)(199003)(189002)(105606002)(229853001)(106466001)(77096005)(104016003)(5001770100001)(50226001)(189998001)(5001960100002)(107886002)(50986999)(76176999)(19580405001)(19580395003)(85426001)(46102003)(47776003)(86362001)(87936001)(6806004)(2201001)(86152002)(77156002)(62966003)(36756003)(92566002)(2950100001)(50466002)(48376002)(4001430100001)(2101003); DIR:OUT; SFP:1102; SCL:1; SRVR:BLUPR03MB1348; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:sfv; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR03MB1348; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(3002001); SRVR:BLUPR03MB1348; BCL:0; PCL:0; RULEID:; SRVR:BLUPR03MB1348; X-Forefront-PRVS: 0577AD41D6 X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 May 2015 14:45:30.1117 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR03MB1348 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150515_074555_561621_B12C4391 X-CRM114-Status: UNSURE ( 9.62 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) Cc: devicetree@vger.kernel.org, Frank Li , rtc-linux@googlegroups.com, linux-pm@vger.kernel.org, linux-input@vger.kernel.org, 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: , 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 From: Frank Li snvs actually is multi fucntion driver. Change to use syscon to access register. Signed-off-by: Frank Li --- .../devicetree/bindings/crypto/fsl-sec4.txt | 51 ++++++++++++++++------ .../bindings/power_supply/imx-snvs-poweroff.txt | 24 +--------- 2 files changed, 39 insertions(+), 36 deletions(-) diff --git a/Documentation/devicetree/bindings/crypto/fsl-sec4.txt b/Documentation/devicetree/bindings/crypto/fsl-sec4.txt index e402277..ca04206 100644 --- a/Documentation/devicetree/bindings/crypto/fsl-sec4.txt +++ b/Documentation/devicetree/bindings/crypto/fsl-sec4.txt @@ -288,12 +288,13 @@ Secure Non-Volatile Storage (SNVS) Node Node defines address range and the associated interrupt for the SNVS function. This function monitors security state information & reports - security violations. + security violations. This also included rtc, + system power off and ON/OFF key. - compatible Usage: required Value type: - Definition: Must include "fsl,sec-v4.0-mon". + Definition: Must include "fsl,sec-v4.0-mon" and "syscon". - reg Usage: required @@ -324,7 +325,7 @@ Secure Non-Volatile Storage (SNVS) Node the child address, parent address, & length. - interrupts - Usage: required + Usage: optional Value type: Definition: Specifies the interrupts generated by this device. The value of the interrupts property @@ -341,7 +342,7 @@ Secure Non-Volatile Storage (SNVS) Node EXAMPLE sec_mon@314000 { - compatible = "fsl,sec-v4.0-mon"; + compatible = "fsl,sec-v4.0-mon", "syscon"; reg = <0x314000 0x1000>; ranges = <0 0x314000 0x1000>; interrupt-parent = <&mpic>; @@ -358,19 +359,41 @@ Secure Non-Volatile Storage (SNVS) Low Power (LP) RTC Node Value type: Definition: Must include "fsl,sec-v4.0-mon-rtc-lp". - - reg + - interrupts Usage: required - Value type: - Definition: A standard property. Specifies the physical - address and length of the SNVS LP configuration registers. + Value type: + Definition: Specifies the interrupts generated by this + device. The value of the interrupts property + consists of one interrupt specifier. The format + of the specifier is defined by the binding document + describing the node's interrupt parent. EXAMPLE - sec_mon_rtc_lp@314000 { + sec_mon_rtc_lp@1 { compatible = "fsl,sec-v4.0-mon-rtc-lp"; - reg = <0x34 0x58>; + interrupts = <93 2>; }; ===================================================================== +System power off Driver + + A SNVS child node that define system power off + SNVS_LPCR in SNVS module can power off the whole system by pull + PMIC_ON_REQ low if PMIC_ON_REQ is connected with external PMIC. + If you don't want to use PMIC_ON_REQ as power on/off control, + please set status='disabled' to disable this driver. + + - compatible + Usage: regquied + Value type: + Definition: Must include "fsl,sec-v4.0-poweroff" + +EXAMPLE + snvs_poweroff: snvs-poweroff { + compatible = "fsl,sec-v4.0-poweroff"; +}; + +===================================================================== FULL EXAMPLE crypto: crypto@300000 { @@ -443,13 +466,15 @@ FULL EXAMPLE compatible = "fsl,sec-v4.0-mon"; reg = <0x314000 0x1000>; ranges = <0 0x314000 0x1000>; - interrupt-parent = <&mpic>; - interrupts = <93 2>; sec_mon_rtc_lp@34 { compatible = "fsl,sec-v4.0-mon-rtc-lp"; - reg = <0x34 0x58>; + interrupts = <93 2>; }; + + snvs_poweroff: snvs-poweroff@38 { + compatible = "fsl,sec-v4.0-poweroff"; + }; }; ===================================================================== diff --git a/Documentation/devicetree/bindings/power_supply/imx-snvs-poweroff.txt b/Documentation/devicetree/bindings/power_supply/imx-snvs-poweroff.txt index dc7c9ba..70c1425 100644 --- a/Documentation/devicetree/bindings/power_supply/imx-snvs-poweroff.txt +++ b/Documentation/devicetree/bindings/power_supply/imx-snvs-poweroff.txt @@ -1,23 +1 @@ -i.mx6 Poweroff Driver - -SNVS_LPCR in SNVS module can power off the whole system by pull -PMIC_ON_REQ low if PMIC_ON_REQ is connected with external PMIC. -If you don't want to use PMIC_ON_REQ as power on/off control, -please set status='disabled' to disable this driver. - -Required Properties: --compatible: "fsl,sec-v4.0-poweroff" --reg: Specifies the physical address of the SNVS_LPCR register - -Example: - snvs@020cc000 { - compatible = "fsl,sec-v4.0-mon", "simple-bus"; - #address-cells = <1>; - #size-cells = <1>; - ranges = <0 0x020cc000 0x4000>; - ..... - snvs_poweroff: snvs-poweroff@38 { - compatible = "fsl,sec-v4.0-poweroff"; - reg = <0x38 0x4>; - }; - } +See Documentation/devicetree/bindings/crypto/fsl-sec4.txt