From patchwork Tue May 19 17:04:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 6439921 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 416EF9F1C1 for ; Tue, 19 May 2015 17:21:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3558B203DB for ; Tue, 19 May 2015 17:21:36 +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 2191F203B6 for ; Tue, 19 May 2015 17:21:35 +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 1YulB0-0002kk-Ke; Tue, 19 May 2015 17:19:34 +0000 Received: from mail-by2on0122.outbound.protection.outlook.com ([207.46.100.122] helo=na01-by2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Yukxz-0007iC-Dy for linux-arm-kernel@lists.infradead.org; Tue, 19 May 2015 17:06:08 +0000 Received: from CH1PR03CA008.namprd03.prod.outlook.com (10.255.156.153) by BY1PR03MB1354.namprd03.prod.outlook.com (10.162.109.24) with Microsoft SMTP Server (TLS) id 15.1.166.22; Tue, 19 May 2015 17:05:41 +0000 Received: from BY2FFO11FD024.protection.gbl (10.255.156.132) by CH1PR03CA008.outlook.office365.com (10.255.156.153) with Microsoft SMTP Server (TLS) id 15.1.154.19 via Frontend Transport; Tue, 19 May 2015 17:05:41 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) 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.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BY2FFO11FD024.mail.protection.outlook.com (10.1.15.213) with Microsoft SMTP Server (TLS) id 15.1.172.14 via Frontend Transport; Tue, 19 May 2015 17:05:40 +0000 Received: from shlinux2.ap.freescale.net (shlinux2.ap.freescale.net [10.192.224.44]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id t4JH5NNW005054; Tue, 19 May 2015 10:05:37 -0700 From: To: , , , , , , Subject: [PATCH v2 3/7] Document: dt: fsl: snvs: change support syscon Date: Wed, 20 May 2015 01:04:38 +0800 Message-ID: <1432055082-28983-4-git-send-email-Frank.Li@freescale.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1432055082-28983-1-git-send-email-Frank.Li@freescale.com> References: <1432055082-28983-1-git-send-email-Frank.Li@freescale.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD024; 1:EDh77CY8cSVyPoVEXizx6QBmNHYlP8IsUceHLQD1hwKc3j+DcL3Vg9M7H79QAwicvJuhDDxRBqJSNfIs92DSVTiyxZNyyxMh5HLutbqKL9FKiPm/trIimozUFRiNogy2x2lu8i0K/1LFDpHu/t0cecFAC+v7VZFjYKiJN0iAufOmp5yqbWBeX+FHUsEuNc28fX78Cn4ZZY8RQQkxYMOjDG1QTuAYB9RbU4ff1BeqYGJYo0trfFox/40jsGUyg6v1w3LC5LP1lErqcaX51x0vLjFfpcTHNHdQ1zlvmH6Recc50tHlYTRWr5Kbe4hsIYE/yzc26E1J87OOXHr8aLgB9Q== X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(339900001)(199003)(189002)(85426001)(50226001)(87936001)(86152002)(2201001)(6806004)(48376002)(50986999)(50466002)(64706001)(47776003)(86362001)(76176999)(46102003)(105606002)(81156007)(4001540100001)(97736004)(77096005)(68736005)(92566002)(62966003)(77156002)(2950100001)(106466001)(107886002)(189998001)(5001770100001)(5001860100001)(5001960100002)(5001920100001)(5001830100001)(229853001)(36756003)(104016003)(19580395003)(19580405001)(69596002)(4001430100001); DIR:OUT; SFP:1102; SCL:1; SRVR:BY1PR03MB1354; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Exchange-Diagnostics: 1; BY1PR03MB1354; 2:7e1fzLR/4s7Q9GIgYudCOqn9nOK0YpMOhD8aenSC/YIgRKFR5KHO3nR5pwqUNHVb; 2:0HRzXt2m7aWBohmo/L4Il1lTUWWfAcwhQC6uUA0yJHy/qDnTQKkh46sBIiHV0hdvXX4xMu4qwq4QdKUcv8AT4U0mJ7fmfcXDA/mE8xoKM5sAahMLVGime9FHt/dPUwObFCcK0Tm5Jo0WrD2WPGpofDdFOxEZMWOl1kXqIbzezxHZZN+7md2V6T2uzOAKH/ISVnbljb047aeEgcSt9mi2MWwOd5kvuaSe3QFxncye1pw=; 6:KWQQDE8dHiHtHe3BezEBCKo8vYSCxBRphixG9vf40WHMV8Y8J9g86ERcLCHKroUc0CRfCN0pv7xjz9n+imIdYe90IXo+KOrGn8zOf8gjKjPCuvTaZ7koDK6GoPmkliTUF4IBootm4kqNVHCsjRsPNBrizzpaXHUn6ogneBOa7RcjlRxJOMP65RBJD+bbk+ldWJQ6h8w8HmUU5uXyN24QPS/PknUJIbk7dAMf6h7wfeTbQWeEiUEmeFlNvi8QfjwENlbD9J8+evRiFtWWKDvg3mJNJf9RDxvLiP1ljHF3M7/4HjfxQZtbJUAw04rxD6quDPPY0PV70nIZlC96ySzzgg==; 3:Gtmu/Qn/LWQLOCkuTXhmjgwZWiZdIVb/DGGjF9k4a/Xldfb4hd8ufRuloca/VUhztr3zvGtvnUZbMAQt2LwLtfs8MZZ0XxJ4NOB5ffv9O56uAC/0QvlYazXDPcEsqaqN17McPBF3hSd2QP6nQU/tqnPL2Kpzm6zPGWHUZhUnesHLeqYlKau+3hUQ4pzyDOg5cTjOOAVbrvOENVpouxmC1yPnf5Ts3oO5/jqRZK3plnJvZBGtX4OpzMpoUWDB2ZpTNkOasRkZbLDl10Ivxum1o02e1aUnERtGqF8fQQK6Hys= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR03MB1354; 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:BY1PR03MB1354; BCL:0; PCL:0; RULEID:; SRVR:BY1PR03MB1354; X-Forefront-PRVS: 0581B5AB35 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR03MB1354; 9:h8jdaAAQEbkI3d8Z0Xuf0Us0jDEmldEC9WQqY2tPwu?= =?us-ascii?Q?sffgUvCKBDNIyxtP1xQBLyFZXfjpwRtc5a4SArApE66lXllahzAbkjw8O2tQ?= =?us-ascii?Q?zVn8XEA8s2YrxewlLxiQ1ixNGNpVokyBbNz/ve3HlIFFvNtZYYa5zZESktJU?= =?us-ascii?Q?n/XyhvciT94+6f4u85fcIpB/y7YdNDfQByqYYDz+FD7tWnDoBpYZ6aKQhDQX?= =?us-ascii?Q?nFbzGTr58jIkzHq+rkFuTadThiUzaXgdBf6zI3Bv+MPl7VaPDdYvTTssUXH/?= =?us-ascii?Q?1VknVI4+3JuPgg18QznJ+eCnPmwrG11eLX9pxhDSI0q/GcyZVvt1Jc9gB44G?= =?us-ascii?Q?/YMI5EzGkXpQG96Wvkjk0XhpI2YvZwjNA6iC7WO66KgwAk7wTzK+u2+OQN9v?= =?us-ascii?Q?2UXQtvhcIOHWv8NygotLnT4lfvXnbIeXeERaVaSo75Rj/biLfTFbs7Eritce?= =?us-ascii?Q?lZdvpgleqt4plIb87x/G0Ce+F+/Cap40C2ip8387pUbNQwyrq57v8hw9etYU?= =?us-ascii?Q?hR3AvYEEJYivt+MMTYkVMZKULYFw7AztWr50H0sBMjmaD6/kwN6H1um9bNJ9?= =?us-ascii?Q?AlpAuUWl192GcFUu17WWg1sZ2Jv0WrWE4STcNRaZKfo8UoziudZQaus+JN+a?= =?us-ascii?Q?Hlbbd4LlxzURARBUjJPsQhKd9cpi7vFalEHNoLob40q7S3oGVOfSkAADPdyf?= =?us-ascii?Q?3T4B4tdTVN693fPhO8QHqdZgGjkdLVmTBjXPU461CbUhvwD2zQ9QuBG6+JEu?= =?us-ascii?Q?rTSStM176WAcquBCB9EcH/5f1ak5TBkDBswWutWnGAjvNnQ8KxLr8fRsysKT?= =?us-ascii?Q?1rhkHJwN71Qajwco80jg3tcDsl+HGztvtpnlQRqhfbYdpqvAJ4YVvQ8kQibR?= =?us-ascii?Q?Gfv1AOgLy+aCJeRSy+xsXNeWM6S/JGZ6/gaGomjv5PNW15rQ4BplzjNDxekD?= =?us-ascii?Q?rI8L7F9NYdu2YupRtuhNx583LP7zH/LPNv58ARbBSRQJpe+igoRcNki+spFH?= =?us-ascii?Q?yFsJtsULrXFOaLB7H8tjsDykzYhcQM+q+8yZ0OLqQ8l6kcEIfBZYFLwaQxHu?= =?us-ascii?Q?bCkH8IQ9Nw6qBEm0zddzf8h6pL2GrEFmSlf6QrXJqcKamug+bJq+pqFPlS8y?= =?us-ascii?Q?JEsu0NgXebUGS2kDGsIGnZxxn0CzhktnqK/5GkZ2M/dCCq/wyakw=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY1PR03MB1354; 3:idSvrxN06hS91Z6Lqd7TGLMyc6OQSULzHNCO/zOz8qnuSoA0R0Iu9SoWEZoeU4LqNI2rwnHuSPxHqkjY/ph/xAGe0diwH/lquJw9f9UOD6RpKuoUjAVbr1bm+1depMAO+uPYBNT6f1zXNKwR189cNQ==; 10:FW4reipBqXtPdmJmeNMnvDndOCzpnmZOdFhilfIZfsL+0TPaiCZ0KGif+oH78hkUUYKO7hTl78VQglTR+ggLa7QEn5g8A3RpokyHBt22zyQ=; 6:CMTdg9XP0j45wdmbvVrEv6n0cpgqv3KioCOVstN5yUOZa1XaccOUEwyyfScmr705 X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 May 2015 17:05:40.7640 (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.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR03MB1354 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150519_100607_544570_C3CEDB70 X-CRM114-Status: GOOD ( 10.19 ) X-Spam-Score: -1.1 (-) 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=BAD_ENC_HEADER,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