From patchwork Thu Feb 25 08:33:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Dubey X-Patchwork-Id: 8420561 Return-Path: X-Original-To: patchwork-linux-samsung-soc@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 18DD7C0553 for ; Thu, 25 Feb 2016 08:33:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3F48D200D0 for ; Thu, 25 Feb 2016 08:33:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D0FDB20295 for ; Thu, 25 Feb 2016 08:33:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759093AbcBYIdW (ORCPT ); Thu, 25 Feb 2016 03:33:22 -0500 Received: from mailout3.samsung.com ([203.254.224.33]:52280 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760000AbcBYIci (ORCPT ); Thu, 25 Feb 2016 03:32:38 -0500 Received: from epcpsbgr5.samsung.com (u145.gpu120.samsung.co.kr [203.254.230.145]) by mailout3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O33001FOH2CG010@mailout3.samsung.com>; Thu, 25 Feb 2016 17:32:36 +0900 (KST) Received: from epcpsbgm1new.samsung.com ( [203.254.230.50]) by epcpsbgr5.samsung.com (EPCPMTA) with SMTP id 26.00.04790.42CBEC65; Thu, 25 Feb 2016 17:32:36 +0900 (KST) X-AuditID: cbfee691-f79766d0000012b6-82-56cebc24ba23 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id 21.34.13906.42CBEC65; Thu, 25 Feb 2016 17:32:36 +0900 (KST) Received: from pankaj.sisodomain.com ([107.108.83.125]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O3300GROH1XWM00@mmp2.samsung.com>; Thu, 25 Feb 2016 17:32:36 +0900 (KST) From: Pankaj Dubey To: linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: kgene.kim@samsung.com, k.kozlowski@samsung.com, thomas.ab@samsung.com, olof@lixom.net, p.fedin@samsung.com, devicetree@vger.kernel.org, Pankaj Dubey Subject: [RESPIN 5/6] dt-bindings: EXYNOS: Describe SROMc configuration Date: Thu, 25 Feb 2016 14:03:41 +0530 Message-id: <1456389222-12738-6-git-send-email-pankaj.dubey@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1456389222-12738-1-git-send-email-pankaj.dubey@samsung.com> References: <1456389222-12738-1-git-send-email-pankaj.dubey@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrELMWRmVeSWpSXmKPExsVy+t8zI12VPefCDNZ1aljMP3KO1eL1C0OL 3gVX2Sw2Pb7GanF51xw2ixnn9zFZnLr+mc3i1aVVbBaLtn5ht+hYxujA5bF5Sb3HlRNNrB59 W1YxenzeJBfAEsVlk5Kak1mWWqRvl8CVMfFJB3vBcfmKxXcmszQw/hLvYuTkkBAwkfi3cREj hC0mceHeerYuRi4OIYGVjBKtj6awwRQt+nCGBcQWEpjFKLFgFS9E0U9Giet3JrODJNgEdCWe vJ/LDGKLCGRLzN/bzQ5SxCywnVHi+aPvYJOEBdwl7j1tAStiEVCV+LpiJxOIzSvgIbHl0T2o M+QkTh6bzApicwp4Skw9uZgRYrOHxJ6TnUwQNavYJQ63BEDMEZD4NvkQ0HUcQHFZiU0HmCFK JCUOrrjBMoFReAEjwypG0dSC5ILipPQiU73ixNzi0rx0veT83E2MkKCfuIPx/gHrQ4wCHIxK PLwMP8+GCbEmlhVX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4LQF5L7VC6W2rGsbxfefP+CiuyV fEadtY5uTpcTTcRnpbersq1zFr95b0eiXsLUuJyeFfeOXSiKYPF/zBjL4VTnrcRSnJFoqMVc VJwIAPFakNHDAgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, 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: Pavel Fedin Add documentation for new subnode properties, allowing bank configuration. Based on u-boot implementation, but heavily reworked. Also, fix size of SROMc mapping in the example. CC: devicetree@vger.kernel.org Signed-off-by: Pavel Fedin Signed-off-by: Pankaj Dubey Reviewed-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Krzysztof Kozlowski --- .../bindings/memory-controllers/exynos-srom.txt | 73 +++++++++++++++++++++- 1 file changed, 71 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/memory-controllers/exynos-srom.txt b/Documentation/devicetree/bindings/memory-controllers/exynos-srom.txt index 33886d5..e5c18df 100644 --- a/Documentation/devicetree/bindings/memory-controllers/exynos-srom.txt +++ b/Documentation/devicetree/bindings/memory-controllers/exynos-srom.txt @@ -5,8 +5,77 @@ Required properties: - reg: offset and length of the register set -Example: +Optional properties: +The SROM controller can be used to attach external peripherals. In this case +extra properties, describing the bus behind it, should be specified as below: + +- #address-cells: Must be set to 2 to allow device address translation. + Address is specified as (bank#, offset). + +- #size-cells: Must be set to 1 to allow device size passing + +- ranges: Must be set up to reflect the memory layout with four integer values + per bank: + 0 + +Sub-nodes: +The actual device nodes should be added as subnodes to the SROMc node. These +subnodes, except regular device specification, should contain the following +properties, describing configuration of the relevant SROM bank: + +Required properties: +- reg: bank number, base address (relative to start of the bank) and size of + the memory mapped for the device. Note that base address will be + typically 0 as this is the start of the bank. + +- samsung,srom-timing : array of 6 integers, specifying bank timings in the + following order: Tacp, Tcah, Tcoh, Tacc, Tcos, Tacs. + Each value is specified in cycles and has the following + meaning and valid range: + Tacp : Page mode access cycle at Page mode (0 - 15) + Tcah : Address holding time after CSn (0 - 15) + Tcoh : Chip selection hold on OEn (0 - 15) + Tacc : Access cycle (0 - 31, the actual time is N + 1) + Tcos : Chip selection set-up before OEn (0 - 15) + Tacs : Address set-up before CSn (0 - 15) + +Optional properties: +- reg-io-width : data width in bytes (1 or 2). If omitted, default of 1 is used. + +- samsung,srom-page-mode : page mode configuration for the bank: + 0 - normal (one data) + 1 - four data + If omitted, default of 0 is used. + +Example: basic definition, no banks are configured + sromc@12570000 { + compatible = "samsung,exynos-srom"; + reg = <0x12570000 0x14>; + }; + +Example: SROMc with SMSC911x ethernet chip on bank 3 sromc@12570000 { + #address-cells = <2>; + #size-cells = <1>; + ranges = <0 0 0x04000000 0x20000 // Bank0 + 1 0 0x05000000 0x20000 // Bank1 + 2 0 0x06000000 0x20000 // Bank2 + 3 0 0x07000000 0x20000>; // Bank3 + compatible = "samsung,exynos-srom"; - reg = <0x12570000 0x10>; + reg = <0x12570000 0x14>; + + ethernet@3,0 { + compatible = "smsc,lan9115"; + reg = <3 0 0x10000>; // Bank 3, offset = 0 + phy-mode = "mii"; + interrupt-parent = <&gpx0>; + interrupts = <5 8>; + reg-io-width = <2>; + smsc,irq-push-pull; + smsc,force-internal-phy; + + samsung,srom-page-mode = <1>; + samsung,srom-timing = <9 12 1 9 1 1>; + }; };