From patchwork Tue Jul 15 04:18:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiubo Li X-Patchwork-Id: 369835 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 5D336140142 for ; Tue, 15 Jul 2014 14:36:50 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751093AbaGOEgs (ORCPT ); Tue, 15 Jul 2014 00:36:48 -0400 Received: from mail-bl2lp0203.outbound.protection.outlook.com ([207.46.163.203]:22869 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750972AbaGOEgr (ORCPT ); Tue, 15 Jul 2014 00:36:47 -0400 Received: from BY2PR03CA042.namprd03.prod.outlook.com (10.141.249.15) by BN1PR0301MB0612.namprd03.prod.outlook.com (25.160.170.27) with Microsoft SMTP Server (TLS) id 15.0.985.8; Tue, 15 Jul 2014 04:22:20 +0000 Received: from BN1AFFO11FD028.protection.gbl (2a01:111:f400:7c10::181) by BY2PR03CA042.outlook.office365.com (2a01:111:e400:2c5d::15) with Microsoft SMTP Server (TLS) id 15.0.985.8 via Frontend Transport; Tue, 15 Jul 2014 04:22:19 +0000 Received: from az84smr01.freescale.net (192.88.158.2) by BN1AFFO11FD028.mail.protection.outlook.com (10.58.52.88) with Microsoft SMTP Server (TLS) id 15.0.980.11 via Frontend Transport; Tue, 15 Jul 2014 04:22:19 +0000 Received: from titan.ap.freescale.net ([10.192.208.233]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id s6F4M7Gc030059; Mon, 14 Jul 2014 21:22:15 -0700 From: Xiubo Li To: , CC: , , , , , , , Xiubo Li Subject: [PATCHv5 2/2] dt/bindings: Add the DT binding documentation for endianness Date: Tue, 15 Jul 2014 12:18:24 +0800 Message-ID: <1405397904-31202-3-git-send-email-Li.Xiubo@freescale.com> X-Mailer: git-send-email 1.8.5 In-Reply-To: <1405397904-31202-1-git-send-email-Li.Xiubo@freescale.com> References: <1405397904-31202-1-git-send-email-Li.Xiubo@freescale.com> X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:CAL; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(6009001)(189002)(199002)(6806004)(69596002)(87286001)(88136002)(87936001)(21056001)(107046002)(36756003)(86362001)(76482001)(83072002)(85852003)(89996001)(77156001)(50466002)(81342001)(48376002)(74502001)(19580395003)(20776003)(26826002)(74662001)(47776003)(79102001)(81542001)(44976005)(68736004)(64706001)(19580405001)(83322001)(76176999)(102836001)(84676001)(80022001)(104016003)(229853001)(4396001)(105606002)(97736001)(85306003)(46102001)(106466001)(81156004)(50226001)(62966002)(93916002)(77982001)(104166001)(92566001)(99396002)(31966008)(92726001)(50986999)(95666004); DIR:OUT; SFP:; SCL:1; SRVR:BN1PR0301MB0612; H:az84smr01.freescale.net; FPR:; MLV:ovrnspm; PTR:InfoDomainNonexistent; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID: X-Forefront-PRVS: 027367F73D Received-SPF: Fail (: domain of freescale.com does not designate 192.88.158.2 as permitted sender) receiver=; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=Li.Xiubo@freescale.com; X-OriginatorOrg: freescale.com Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Device-Tree binding for device endianness Index Device Endianness properties --------------------------------------------------- 1 BE 'big-endian' 2 LE 'little-endian' For one device driver, which will run in different scenarios above on different SoCs using the devicetree, we need one way to simplify this. Signed-off-by: Xiubo Li --- .../devicetree/bindings/regmap/regmap.txt | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 Documentation/devicetree/bindings/regmap/regmap.txt diff --git a/Documentation/devicetree/bindings/regmap/regmap.txt b/Documentation/devicetree/bindings/regmap/regmap.txt new file mode 100644 index 0000000..cc5f7f8 --- /dev/null +++ b/Documentation/devicetree/bindings/regmap/regmap.txt @@ -0,0 +1,48 @@ +Device-Tree binding for device endianness + +The endianness mode of CPU & Device scenarios: +Index CPU Device Endianness properties +------------------------------------------------------------ +1 LE LE - +2 LE BE 'big-endian{,-*}' +3 BE BE - +4 BE LE 'little-endian{,-*}' + +For one device driver, which will run in different scenarios above +on different SoCs using the devicetree, we need one way to simplify +this. + +Required properties: +- {big,little}-endian{,-*}: these are boolean properties, if absent + meaning that the CPU and the Device are in the same endianness mode. + +Examples: +Scenario 1 : CPU in LE mode & device in LE mode. +dev: dev@40031000 { + compatible = "name"; + reg = <0x40031000 0x1000>; + ... +}; + +Scenario 2 : CPU in LE mode & device in BE mode. +dev: dev@40031000 { + compatible = "name"; + reg = <0x40031000 0x1000>; + ... + big-endian{,-*}; +}; + +Scenario 3 : CPU in BE mode & device in BE mode. +dev: dev@40031000 { + compatible = "name"; + reg = <0x40031000 0x1000>; + ... +}; + +Scenario 4 : CPU in BE mode & device in LE mode. +dev: dev@40031000 { + compatible = "name"; + reg = <0x40031000 0x1000>; + ... + little-endian{,-*}; +};