Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752337AbdIVRhN (ORCPT ); Fri, 22 Sep 2017 13:37:13 -0400 Received: from mail-sn1nam01on0056.outbound.protection.outlook.com ([104.47.32.56]:19536 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751882AbdIVRhL (ORCPT ); Fri, 22 Sep 2017 13:37:11 -0400 From: Jiaying Liang To: Sudeep Holla CC: "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "devicetree@vger.kernel.org" , "jassisinghbrar@gmail.com" , Cyril Chemparathy , "Michal Simek" , "robh+dt@kernel.org" , "mark.rutland@arm.com" , Soren Brinkmann Subject: RE: [RFC LINUX PATCH] Dcoumentation: dt: mailbox: Add Xilinx IPI Mailbox Thread-Topic: [RFC LINUX PATCH] Dcoumentation: dt: mailbox: Add Xilinx IPI Mailbox Thread-Index: AQHTMy74PWGgZB9l/UWdWBL7zW7KlKLAaPZggABXW4CAAFnhcA== Date: Fri, 22 Sep 2017 17:37:07 +0000 Message-ID: References: <1506034724-14639-1-git-send-email-jliang@xilinx.com> <20170922111005.GA11613@e107155-lin> In-Reply-To: <20170922111005.GA11613@e107155-lin> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=jliang@xilinx.com; x-originating-ip: [149.199.62.254] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;CY4PR02MB2534;6:QLwBQqiBW3lKbylq2OrZH/M4338O50Mo7pl6DEkESqxz5AFYPNuGhyouLJ0/6qc/9kA0xYLO3vObfDHqsBBzCYvTQV6hG8ygRTh5Gy5HE4m9bgF53IPHmQb4ZeSrFUMi47lnooxYN891wbn0bhduCJ54S6MxmBGwX29cqoY5gDo7rB2H4Isrfo6oNfYr1D1bsodaNQ456MRvaRRdWS3EQKZIshGdZpAEnUHM6JSKk0QXICD+p3UO59QsUTfIYRHbhsmKuWJhSmei76LYnJQ9YMLJy58JWrIIFzSg59FvGLOMyQv49fioMhT2mX2GW8NDbDwpll4xPNqTRY56XwwP/A==;5:Ly9zCIhoWyF59qOMUtAaw28FPJpJbxirAx9cm4wqOeL0vnJuIKOtYUxEVsxUAKtzVL0xoFGJFdbATKMLEOTwcfG6pq4KvYswniHV3EFFgno5k8Bbl6vh3n5k/Jw+0he7gklkui4jEb2zK8Ky8DxmLg==;24:MB24eDaq2j0NtiVZAu0j4JC116frB8yqb6XJpkuFwO52blGsCyai9uAKTVIuP45QhRtGKjdldVdyZTMUhAbO9QmcthDieUoxeQQgRpFZ/2w=;7:3F4Q37x9Ol6XCtJPx23oEbTCu5rZ1ARXemiz3kUpGBRuQKO2pV1euUpN6tSN3aATJBrQphvgtZS/uYzBWh13jYkXVcBqHZdfaT3wH0LaXOxBE5MeHOdiYWKTDcw9mn7jnnF6HkqrPhuELlfFuq+Wj2oQnYeW50/65M5kaw3htJbTe3s4VqWZasxX5rLzdFO0xTDY0KsAEvZ4e34zwxDn9Bntg75KPK8F7sc4+qXtau4= x-ms-exchange-antispam-srfa-diagnostics: SSOS;SSOR; x-forefront-antispam-report: SFV:SKI;SCL:-1;SFV:NSPM;SFS:(10009020)(6009001)(346002)(39860400002)(376002)(189002)(199003)(51694002)(13464003)(377454003)(24454002)(76176999)(54356999)(50986999)(4326008)(305945005)(74316002)(97736004)(6916009)(5250100002)(2950100002)(86362001)(3846002)(478600001)(33656002)(106356001)(105586002)(316002)(7736002)(101416001)(6506006)(81156014)(81166006)(5660300001)(68736007)(55016002)(2900100001)(14454004)(189998001)(3660700001)(6436002)(6246003)(53546010)(15650500001)(107886003)(25786009)(54906003)(39060400002)(53936002)(9686003)(66066001)(102836003)(8676002)(8936002)(7696004)(6116002)(3280700002)(229853002)(2906002)(99286003)(217873001);DIR:OUT;SFP:1101;SCL:1;SRVR:CY4PR02MB2534;H:BY1PR0201MB0885.namprd02.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; x-ms-office365-filtering-correlation-id: ae52fb95-2102-4343-3a49-08d501e08bc0 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:CY4PR02MB2534; x-ms-traffictypediagnostic: CY4PR02MB2534: x-exchange-antispam-report-test: UriScan:(180628864354917)(9452136761055)(258649278758335)(192813158149592); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(10201501046)(100000703101)(100105400095)(6055026)(6041248)(20161123564025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123560025)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY4PR02MB2534;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY4PR02MB2534; x-forefront-prvs: 0438F90F17 spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Sep 2017 17:37:07.0319 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR02MB2534 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id v8MHbJF5025701 Content-Length: 6227 Lines: 163 HI Sudeep, > -----Original Message----- > From: Sudeep Holla [mailto:sudeep.holla@arm.com] > Sent: Friday, September 22, 2017 4:10 AM > To: Jiaying Liang > Cc: linux-kernel@vger.kernel.org; linux-arm-kernel@lists.infradead.org; > devicetree@vger.kernel.org; jassisinghbrar@gmail.com; Cyril Chemparathy > ; Michal Simek ; > robh+dt@kernel.org; mark.rutland@arm.com; Soren Brinkmann > ; Sudeep Holla > Subject: Re: [RFC LINUX PATCH] Dcoumentation: dt: mailbox: Add Xilinx IPI > Mailbox > > On Fri, Sep 22, 2017 at 06:05:18AM +0000, Jiaying Liang wrote: > > > > Xilinx ZynqMP IPI(Inter Processor Interrupt) is a hardware block in > > ZynqMP SoC used for the communication between various processor > systems. > > > > Signed-off-by: Wendy Liang > > --- > > .../bindings/mailbox/xlnx,zynqmp-ipi-mailbox.txt | 88 > ++++++++++++++++++++++ > > 1 file changed, 88 insertions(+) > > create mode 100644 > > Documentation/devicetree/bindings/mailbox/xlnx,zynqmp-ipi-mailbox.txt > > > > diff --git > > a/Documentation/devicetree/bindings/mailbox/xlnx,zynqmp-ipi- > > mailbox.txt > > b/Documentation/devicetree/bindings/mailbox/xlnx,zynqmp-ipi- > > mailbox.txt > > new file mode 100644 > > index 0000000..5d915d1 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/mailbox/xlnx,zynqmp-ipi- > mailbox. > > +++ txt > > @@ -0,0 +1,88 @@ > > +Xilinx IPI Mailbox Driver > > +======================================== > > + > > +The Xilinx IPI(Inter Processor Interrupt) mailbox driver is a mailbox > > +controller that manages the messaging between two IPI agents. Each > > +IPI mailbox has request and response buffers between the two IPI agents. > > + > > ++-------------------------------------+ > > +| | Xilinx ZynqMP IPI Mailbox > > +| Controller| > > +| | > > +| +-------------+ > > +| | SMC | > > +| | | > > ++--------+--------------+------+------+ > > + | | > > + | +-----------------+ > > + | | ATF (ARM trusted firmware) > > I suppose it should work with any EL3 firmware, ATF reference can be > removed IMO. > > > + | | > > ++-------------------------------------+ > > + | | Hardware > > + | | > > + +--------------------------------------+ > > + | | > > + +----------------------+ +-----------+ | > > + | | Buffers between | | IPI Agent | | > > + | | two IPI agents | | Registers | | > > + | +--------------------+ +-----------+ | > > + | | > > + | Xilinx ZynqMP IPI | > > + +--------------------------------------+ > > + > > + > > +Message Manager Device Node: > > +=========================== > > +Required properties: > > +-------------------- > > +- compatible: Shall be: "xlnx,zynqmp-ipi-mailbox" > > +- ipi-smc-fid-base Base offset of SMC function IDs for IPI mailbox SMC. > > + It contains the IPI IDs of the two IPI agents. > > Why is "SMC" associated with this hardware block ? Is it secure device ? > Can Linux access it ? If so, why do you need SMC ? [Wendy] one IPI agent uses its own IPI agent registers to notify (write to register to raise interrupt) Other IPI agents. The IPI agent registers are shared between secure and non-secure. And thus, I think about to access the IPI agent registers in ATF. And thus Use SMC for registers access. > > > +- reg: IPI request and response buffers address > range. It > > + can be the IPI buffers from the hardware or it can > > + be carved out shared memory. > > It sounds like buffer used for communication and not part of this IP. > Shouldn't this be part of mailbox client binding rather than controller > binding. [Wendy] the IPI hardware has IPI buffers (32bytes request buffer and 32bytes response buffer per) But we also want user to be able to use other shared memory. The reason I am considering to make it part of the mailbox is, we can have logical Channels on top of the physical channels. Each mailbox controller controls the physical connection(IPI agent registers and buffers), each Mailbox client requests for a logical channel. > > > +- reg-names: Reg resource name of the IPI request and response > > + buffers. > > +- #mbox-cells: Shall be 1. Contains the logical channel IDs of > the > > + channels on the IPI mailbox. > > +- interrupt-parent: Phandle for the interrupt controller. > > +- interrupts: Interrupt mapping. > > + > > +Required properties: > > +-------------------- > > +- method: The method of accessing the IPI agent registers. > > + Permitted values are: "smc" and "hvc". Default is > > + "smc". > > +Example: > > +------------ > > + /* APU IPI mailbox driver */ > > + ipis { > > + #address-cells = <1>; > > + #size-cells = <0>; > > + ipi_mailbox_apu_rpu0: ipi_mailbox@0 { > > + compatible = "xlnx,zynqmp-ipi-mailbox"; > > + reg = <0 0xff990400 40>; > > + reg-names = "apu-rpu0"; > > + ipi-smc-fid-base = <0x1010>; > > + method = "smc"; > > + #mbox-cells = <1>; > > + interrupt-parent = <&gic>; > > + interrupts = <0 35 4>; > > + }; > > + ipi_mailbox_apu_rpu1: ipi_mailbox@1 { > > + compatible = "xlnx,zynqmp-ipi-mailbox"; > > + reg = <0 0xff990440 40>; > > + reg-names = "apu-rpu1"; > > + ipi-smc-fid-base = <0x1020>; > > + method = "smc"; > > + #mbox-cells = <1>; > > + interrupt-parent = <&gic>; > > + interrupts = <0 35 4>; > > + }; > > Why do you need the above 2 ? They don't look like 2 controller blocks. > You just need to represent single mailbox controller. [Wendy] I just wanted to have single mailbox controller to control one Physical connection and allows logical channels on top of it. Is there any framework to support logical channels on top of mailbox? Or we need to write the mailbox client driver to support logical channels on top of one mailbox client? Thanks, Wendy > > -- > Regards, > Sudeep