Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1722013ybn; Thu, 26 Sep 2019 00:54:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqwxamWW/dyFDMUrB94uLxz5lf1BsKIVTTqRq/g37j3fJINHs8xjtY24G+DXV3US+Uugj+G9 X-Received: by 2002:a17:906:7ac6:: with SMTP id k6mr1822949ejo.243.1569484458777; Thu, 26 Sep 2019 00:54:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1569484458; cv=pass; d=google.com; s=arc-20160816; b=oFreEgG8yQHlA4BMSYXbAPY13hSJZTszsUCR5LKWFBiq3Cw1edHoU84UUQF3CMrhzR BDXTT6N80MXz3DyfBE9jnUkhk2fUCWccKMzVapiOU8Krmxq2W1E5Fz6Mq4hTq/xixkkC +lr+vLd1tg36C65+su40HhfO8a2BA+40mfuo1ubLKo0g2x1rrSEzMngk+PavbWVWFglW INFDUcH+CfzXVgEXnK7hqRWJ+GO/hv1Lgut8ZxJqzgvfQhQEN17tHmp8In9YaNffhTj6 y3fYqXaP8WWzU7OuD88QHnVxrMeXQknkytOynAn3lCUxuR4QME6Xt4NaIz/1EHlJG+ie eUuQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=SZEmrTrLvcHhk4Rwl/9jaIFU1TZCoQCs1/2nesl5Lhs=; b=LIRAlfvNMGta7Jl32A2TxtUsXBi5EjVjbr0SdXEM3stmeMEKp3G1w2M4rsyOc0Evb/ BirDxW1BUXVWhWGAWLPSDpkYEcOKluuUvZ/t7Sd26Lp3QBG9nwoYxunau4o7izOYtLRT oR60SGJ7VfZhMUy5XlHKwYs9qF8k2d9xOjVNi8DooWu4uF4X1zLBjGwxA6QgO2NCZvFg TJIrzsMJvsaYt3Y+s6zhZuQbHaFq8+QnaZ/e2SKOz5Kj/RQ2pWtfgbbsSxiLwGf5COBC CzX28Hf1SP1qUg70PJSv21hROmIOY/GdXzBuV1SxtShRglSy23uHgFw1tCqfJm5z91E4 PTxA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=TrIOhJ2c; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id jz12si590918ejb.193.2019.09.26.00.53.55; Thu, 26 Sep 2019 00:54:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=TrIOhJ2c; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2503815AbfIXBOM (ORCPT + 99 others); Mon, 23 Sep 2019 21:14:12 -0400 Received: from mail-eopbgr10047.outbound.protection.outlook.com ([40.107.1.47]:24205 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2391681AbfIXBOL (ORCPT ); Mon, 23 Sep 2019 21:14:11 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=goStEW2sYLJO9z0CQfEAeEuG7805zQSLxj6k+CLRuPfrkhs8LWlifyvtLhGtz03X/9QckWCCYmidAIL1DqlNgun7BhP6rmcSZ0lVJS/8m/d5rjqfYVwYE50KxhzN/tWmih+wV7w0LGdmQWldQktHLliQy6gFYNx8RoGVGSQwjI/9ES1rIMQ/38YCK0RMJDrlOxIW5urY31XrRiQfmLbVZfmZSOWL95FaJjqNZ8tlHlObL7hOQtPBuRWkt8n+3NoPgP/xc99t+e8rOd288qj2JAqbj/bU23UCmO/w962GZwuiz1uBLqn3HFtGEuaLXmLMYk8Cej0RekF2NFLJwkb4QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SZEmrTrLvcHhk4Rwl/9jaIFU1TZCoQCs1/2nesl5Lhs=; b=ClNE6LsJgXjKAO7bQhBbEI+aUpcT/IaLTA2ekf0Fh/up5zgH/C4+YH9wEhipz1d1hF0GECOixJRkEw+t/MnM/4k4v3GglrlOgFj3j9AzJwE5cW3zjI1M7yA22T2/t3ZT57TC1991B/E0B9rIU3ElsDmKxrEJRXdfugy60dU4yu14nbDqWaFIo526CtQ1jcjqh4+cD+nO1886ejsW7AyRlSZpG4lWprVrmU/xayMn37ocFRFyeG6wD4NilsXQFPmcNWucrwo+voGsWJztW3xu94Uyim8oUbVEDABZ+FTy4qBzpNpy1v24wPeHDe+ORXMBIO5puAIgvsBQ8Zkr8tn64A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SZEmrTrLvcHhk4Rwl/9jaIFU1TZCoQCs1/2nesl5Lhs=; b=TrIOhJ2cOC5MQ2ohbFwCIA5znBjyQXvzaRu8X5rokTwuAFkHuIIm3ThV1vDP3alyUKuMgsk9widyl3VsQc4I9ZBNXouGiZk5kVG/rjgWALP4Z83UWyY+VpYGKO3HkQX4hq6E6DEB76D6hiYdKfpWK9OhGVRjtK484qfyojcBEVM= Received: from AM0PR04MB4481.eurprd04.prod.outlook.com (52.135.147.15) by AM0PR04MB5396.eurprd04.prod.outlook.com (20.178.113.213) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2284.20; Tue, 24 Sep 2019 01:14:07 +0000 Received: from AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::6ca2:ec08:2b37:8ab8]) by AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::6ca2:ec08:2b37:8ab8%6]) with mapi id 15.20.2284.023; Tue, 24 Sep 2019 01:14:07 +0000 From: Peng Fan To: "robh+dt@kernel.org" , "mark.rutland@arm.com" , "jassisinghbrar@gmail.com" , "sudeep.holla@arm.com" , "andre.przywara@arm.com" , "f.fainelli@gmail.com" CC: "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , dl-linux-imx , Peng Fan Subject: [PATCH V8 1/2] dt-bindings: mailbox: add binding doc for the ARM SMC/HVC mailbox Thread-Topic: [PATCH V8 1/2] dt-bindings: mailbox: add binding doc for the ARM SMC/HVC mailbox Thread-Index: AQHVcnVdFX3gX9rzB0uylBnhc7LQFw== Date: Tue, 24 Sep 2019 01:14:07 +0000 Message-ID: <1569287538-10854-2-git-send-email-peng.fan@nxp.com> References: <1569287538-10854-1-git-send-email-peng.fan@nxp.com> In-Reply-To: <1569287538-10854-1-git-send-email-peng.fan@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.7.4 x-clientproxiedby: HK0P153CA0001.APCP153.PROD.OUTLOOK.COM (2603:1096:203:18::13) To AM0PR04MB4481.eurprd04.prod.outlook.com (2603:10a6:208:70::15) authentication-results: spf=none (sender IP is ) smtp.mailfrom=peng.fan@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [119.31.174.66] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f52c62cc-63ee-44b0-c97d-08d7408c7f6f x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600167)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020);SRVR:AM0PR04MB5396; x-ms-traffictypediagnostic: AM0PR04MB5396:|AM0PR04MB5396: x-ms-exchange-purlcount: 2 x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 0170DAF08C x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(4636009)(376002)(366004)(39860400002)(396003)(136003)(346002)(189003)(199004)(66066001)(6436002)(2420400007)(7110500001)(36756003)(478600001)(2201001)(316002)(14454004)(966005)(305945005)(66946007)(26005)(86362001)(71200400001)(66446008)(64756008)(66476007)(71190400001)(6116002)(3846002)(256004)(99286004)(6306002)(386003)(66556008)(486006)(6512007)(186003)(76176011)(6486002)(2501003)(6506007)(2906002)(4326008)(446003)(2616005)(102836004)(8676002)(54906003)(11346002)(110136005)(8936002)(52116002)(81166006)(50226002)(5660300002)(81156014)(44832011)(15650500001)(7736002)(25786009)(476003);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR04MB5396;H:AM0PR04MB4481.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: /6ZBm1RhjiAsnelTsWi9meaFflB62ZngcCbfdAcpYuWqYyAKOTlJf90SoF45RQ7ha0v/gmPhalIO+ohaMGFvVI9NEVa1nqySxZwTWCyN7+afFo71+3dKl9be5EQXxGPrzYJW53E8MTJuCxG4tG0u141S8quZnHNOAUGOjWh+K3SY1a0QOftzoVvItbuNyKOHn0Hw5PKSUaURgdFNBsNLC4SVWnOeW1Z6l/141+wX57EqB2+xENqtve6M6rpSKgLw19L3PesIxUAJc6UndSIzQQ7bV3iZmDC+REuBL6IyJXIzQK0IPb9z7bCjWJGfjIS33KCQJ/zaOliKxW3+uU26fVT0CHSBIDAFISqhkCs2nNzVKrRQ9P8Y2bE0QhNCZ+s5So4pNxF0svFuuYwv6lyDDX2tGX2xf7Nc5qPFZW0xlok= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f52c62cc-63ee-44b0-c97d-08d7408c7f6f X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Sep 2019 01:14:07.5405 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: lWXANa/jYaGy5//Goesp2hdW0NSyCLY34ABqlgkpihcLus7JosbgTjie5JjVLPYUOCDUyZnPcPxtpl6IqcjhcQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB5396 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peng Fan The ARM SMC/HVC mailbox binding describes a firmware interface to trigger actions in software layers running in the EL2 or EL3 exception levels. The term "ARM" here relates to the SMC instruction as part of the ARM instruction set, not as a standard endorsed by ARM Ltd. Signed-off-by: Peng Fan --- .../devicetree/bindings/mailbox/arm-smc.yaml | 95 ++++++++++++++++++= ++++ 1 file changed, 95 insertions(+) create mode 100644 Documentation/devicetree/bindings/mailbox/arm-smc.yaml diff --git a/Documentation/devicetree/bindings/mailbox/arm-smc.yaml b/Docum= entation/devicetree/bindings/mailbox/arm-smc.yaml new file mode 100644 index 000000000000..8764ad2726b2 --- /dev/null +++ b/Documentation/devicetree/bindings/mailbox/arm-smc.yaml @@ -0,0 +1,95 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mailbox/arm-smc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ARM SMC Mailbox Interface + +maintainers: + - Peng Fan + +description: | + This mailbox uses the ARM smc (secure monitor call) or hvc (hypervisor + call) instruction to trigger a mailbox-connected activity in firmware, + executing on the very same core as the caller. The value of r0/w0/x0 + the firmware returns after the smc call is delivered as a received + message to the mailbox framework, so synchronous communication can be + established. The exact meaning of the action the mailbox triggers as + well as the return value is defined by their users and is not subject + to this binding. + + One example use case of this mailbox is the SCMI interface, which uses + shared memory to transfer commands and parameters, and a mailbox to + trigger a function call. This allows SoCs without a separate management + processor (or when such a processor is not available or used) to use + this standardized interface anyway. + + This binding describes no hardware, but establishes a firmware interface= . + Upon receiving an SMC using the described SMC function identifier, the + firmware is expected to trigger some mailbox connected functionality. + The communication follows the ARM SMC calling convention. + Firmware expects an SMC function identifier in r0 or w0. The supported + identifier are passed from consumers, or listed in the the arm,func-id + property as described below. The firmware can return one value in + the first SMC result register, it is expected to be an error value, + which shall be propagated to the mailbox client. + + Any core which supports the SMC or HVC instruction can be used, as long + as a firmware component running in EL3 or EL2 is handling these calls. + +properties: + compatible: + oneOf: + - description: + For implementations using ARM SMC instruction. + const: arm,smc-mbox + + - description: + For implementations using ARM HVC instruction. + const: arm,hvc-mbox + + "#mbox-cells": + const: 0 + + arm,func-id: + description: | + An single 32-bit value specifying the function ID used by the mailbo= x. + The function ID follows the ARM SMC calling convention standard. + $ref: /schemas/types.yaml#/definitions/uint32 + +required: + - compatible + - "#mbox-cells" + +examples: + - | + sram@93f000 { + compatible =3D "mmio-sram"; + reg =3D <0x0 0x93f000 0x0 0x1000>; + #address-cells =3D <1>; + #size-cells =3D <1>; + ranges =3D <0x0 0x93f000 0x1000>; + + cpu_scp_lpri: scp-shmem@0 { + compatible =3D "arm,scmi-shmem"; + reg =3D <0x0 0x200>; + }; + }; + + smc_tx_mbox: tx_mbox { + #mbox-cells =3D <0>; + compatible =3D "arm,smc-mbox"; + arm,func-id =3D <0xc20000fe>; + }; + + firmware { + scmi { + compatible =3D "arm,scmi"; + mboxes =3D <&smc_tx_mbox>; + mbox-names =3D "tx"; + shmem =3D <&cpu_scp_lpri>; + }; + }; + +... --=20 2.16.4