From patchwork Thu May 14 17:18:49 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 6409321 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 26E51C0432 for ; Thu, 14 May 2015 18:32:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 274A820351 for ; Thu, 14 May 2015 18:32:01 +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 27F48202D1 for ; Thu, 14 May 2015 18:32:00 +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 1Ysxse-0004rG-TL; Thu, 14 May 2015 18:29:12 +0000 Received: from mail-bl2on0138.outbound.protection.outlook.com ([65.55.169.138] helo=na01-bl2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ysxrd-0004P3-Ll for linux-arm-kernel@lists.infradead.org; Thu, 14 May 2015 18:28:11 +0000 Received: from BY2PR03CA010.namprd03.prod.outlook.com (10.255.93.27) by CY1PR03MB1357.namprd03.prod.outlook.com (10.163.16.23) with Microsoft SMTP Server (TLS) id 15.1.160.19; Thu, 14 May 2015 18:27:46 +0000 Received: from BL2FFO11FD035.protection.gbl (10.255.93.4) by BY2PR03CA010.outlook.office365.com (10.255.93.27) with Microsoft SMTP Server (TLS) id 15.1.160.19 via Frontend Transport; Thu, 14 May 2015 18:27:46 +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 BL2FFO11FD035.mail.protection.outlook.com (10.173.161.131) with Microsoft SMTP Server (TLS) id 15.1.160.8 via Frontend Transport; Thu, 14 May 2015 18:27:44 +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 t4EIRUpK019483; Thu, 14 May 2015 11:27:41 -0700 From: To: , , , Subject: [PATCH 3/7] Document: dt: fsl: snvs: change support syscon Date: Fri, 15 May 2015 01:18:49 +0800 Message-ID: <1431623933-3473-4-git-send-email-Frank.Li@freescale.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1431623933-3473-1-git-send-email-Frank.Li@freescale.com> References: <1431623933-3473-1-git-send-email-Frank.Li@freescale.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD035; 1:VET4YnqhIrd7wqKC8vBWT2aHAsbLAnJxxBFJEJqE0DNKLtCMRjrZ4vSP4kSC1ZiF1K8IaN7GPHD6wTcedl1x2AjcXT4BejAFHG3y6BpJlhJAG7lgIXs9VXToaN9AUN68kXy7RI1u56lpRhGiQth3HoOJljPg1fQv7nfVL7Q5GK42URHIG9K9cqNZznQwDyfteSI0r5K9SagOPUMivf/STqJFLifnFy/k+0Us0oJWNcF/A0DxRjB8l/6vFE3xhXZdgtaeLCtGP0N6OiGcPmGA/65DIwiY/FK4modFI+wpoU1o4jAAeJBNdtHp7+tOOUSE8Ar7WKuAXP1HMP0rhMzbhw== X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(339900001)(199003)(189002)(77096005)(229853001)(6806004)(85426001)(107886002)(106466001)(5001960100002)(104016003)(48376002)(2201001)(86152002)(46102003)(50986999)(76176999)(189998001)(47776003)(5001770100001)(92566002)(50226001)(36756003)(50466002)(62966003)(77156002)(2950100001)(19580395003)(87936001)(86362001)(19580405001)(105606002)(4001430100001); DIR:OUT; SFP:1102; SCL:1; SRVR:CY1PR03MB1357; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:sfv; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB1357; 2:B8Q21CQUlyFbdmcAY/mYfCGCDxOJ4+LP3dtmPIplk6zWpbxniQCnRHw8Cf18/nSr; 2:ALrUxWK2YF6uW0QuFjb71NGbclW2B5mAjldS3djjZw/2ra2HxIOdbMWOpuZ8wXAyr6zXBqBatQt53L/66+yAepcMscIM52wdn1R9KM12AdQyCX+8Fc4Fj1Dl2Za66MiHQa6XNS6kn3ELU5gbOLQDiUMeDvohooswmQVe8w2qYru5Dobz4+6Pxz72A5TZ7PcRDH4JsXI1FVu1BmIMVpLAWMoaEu8Vhwt4g5TBQNpHe5g=; 6:hgL2bznqtOqE4c2WK2wc4y0iYz4BZDsRK39pSgulI3VZJEpihO4AN1iQkBdfCRT/HJdAU/bjv8dYEf4YrjmsE72CA8U6sxc1pdp3gQMaNCv/aTB0Ff10X+o7X/AA/YRQLLFf/m28xE8OOSgoibGwZ/5v/S1xcm/hp64Gec0FNjA9hum6baW2jS5GKkqvXUPOwDFK+86rzxjVZB3COvxKKD559LxL+UfhvZGHyx8RMVGW80iefWYPp5E7J1fx+jxdYCZ96F06OacZj810vRkWTKgdJrfN+rgDa+Itxlt3SL4UZpjY0anQjNA8Rr0r7i1TlVye3G49XpjgyKvsheVa4A==; 3:eVnk3lqh0e/CDI3DOl91fVJOPaGnzpWQalooJyG+W54hlG1+OJe5ZYBOGhLG1gcLZWmTynfFw3t835am+Ix5OqzFQ1UgTzG/Le51764AwqHZE22Z/faAbe/H0XdI2aF3u9qVj4pJH9BuxYDCHaZtNPA9f9sfOfIyP/lRESgU+Dt0ZQXJFQB7ndD844E/zXF6ou89SY7dGC7LSxPWg6xT18V7uXKZFI4trB6mO3YcFzuuhjq8/3P3G/Us3j+uHHfN2vBZIzLKVfGMZrji2quDhc7evaGHOYlcFl/1v1Z3DWc= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR03MB1357; 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:CY1PR03MB1357; BCL:0; PCL:0; RULEID:; SRVR:CY1PR03MB1357; X-Forefront-PRVS: 0576145E86 X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB1357; 9:TRrAS7rYxhXDI5LHgKwBGyk81/3Uik9x6RjRBu/f6bqlLQ40pKpBbIvHoD8Y47qCLao+zMwv6UTSpSK1iyGjCfA8ez6IEcmg/Nz/YvlyGz+giRSU9taKUX/gTLa5AN3tv3c9LfWBdoIZNaC07V7y+Fvm9AaHsEmyGWCG+NZkAHZ/P23pbpzsj6JQqwZkSaBjL1X0qEt+ved9x47YBByo/srR/RSykg3V1/nI4CxJrPESLjYg0GzchMZvVrnj63TMptUqJ1Y0kvaroC5CPSuiVkiS5sxQh7kkxceGCeWsa9ZDNytv6jrzmfOJWvwBnsmxXOS09CSejXpigcPIKWZ9EqvBR1FbVCdKNCh49cmympz7k0ZCo1NuynrSobShEhgFrVjhcRuYNA5B9jysU6qigydAvxVae+uJZJRcJgNl370QhIljXi4D7K47LAk6jayR1EH2n3x6XgzkIjDq0WrzXriYVYVQQyNifvXOZ7IfojyUtagAS2VCGkvrEviTG1xH1pRrm4ypxbiVkgmhWwFuiRAv7N1oPIKSDomozaUDLFeURvUrmp62YHY0zFRMI0j5psYSfW7z+1IKGL8TYl+c6Ud5Sogis92kDFKr7gwNHvHQqEo6JpBStmUnPTiUujgcoML6Lj6OHD4gSXyYVBvJ9jTEJkYpNcKxJMxMMYqnmphQ+5bitIJNqnTH49vlJ+zE3aIGQ0BGXeuXFQMsF3V50z02AtYgB5CQxflpfs76NZLVZi3rY8XJ0WQcj2TK3P7hBJlbhpGSTxXpm/RxHeEzsq0TnDinkgI4kdd6n6N8vpXuufH92PNFXcWcHndeM7uzh8jw+L6PjNWzWupzbbq/VEdN7fvLHlOF/dctKoS/WCi+vFRwK8Nwl9DgWBG/5d0loIzjI9brgT/DhUqmYl2UHcqOS7NKjlwfwDuPtbGjDeM= X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB1357; 3:Ct2j+la83NyoyCUD7mGX/9STPmkxk0mWorxOuwflmDY0Es91iOAjorZFrHSM0+jkHXrQqlaalYE6gind/BR6jjZzk9HuWZpWyCcRRreZnCgu5Dx2CGvutqk+NLPr+YkQxKq3w4HYIeOvV+q6aV2sbA==; 10:lUkMztk/yrI1RaEwq+du4fYiqLzR+zVZWFz+PAKjmAU8U+vyLY6SnakW+ooX3Zz3lAJNwUaEkX7CGPCBvpHuWR980fduL67pE5Ja6TsAnMM=; 6:O8w97b7n3Rtz8SBsdJ1CjIxnqdzVLdSvMBVkO0Nj+x71wA6ibeuUkLEdeLfb6ULq X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 May 2015 18:27:44.9959 (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: CY1PR03MB1357 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150514_112810_104078_5C0CE3B6 X-CRM114-Status: UNSURE ( 9.83 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.0 (/) 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