Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp5735398imb; Fri, 8 Mar 2019 00:48:28 -0800 (PST) X-Google-Smtp-Source: APXvYqxOcDyGRwUexTc6i7ltfgd5GI/zovhh2vOSkjrdCuQLJIy95CdMo3jiXB2hptZRWfzFFN1O X-Received: by 2002:a62:1212:: with SMTP id a18mr17213792pfj.177.1552034908747; Fri, 08 Mar 2019 00:48:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1552034908; cv=none; d=google.com; s=arc-20160816; b=lidseu9wyAEw1Q1ZYCpNAES40Lnj2T/W5VqYJAJ7YHFlMaf87S/asbzeD/NakKcdos 6eChbwrke/gTHgkmrekuCSa14zXyn1/AX7lEbKc9kJbLUvVg3sfzmNKVAQlJQx8/E1sw ERgPeIAb0ykeQ6w+w9Hn1gLHOrnUfg1zaEjKLX5xHmyVxZtNwWppVGnJ99U5GdYyc1bR QcH+Y2wc8VjdFc3q3EtEN6h6Ou/dBVrpT8auF96fZdWout0VQg4jlIDSUCSz5p+ipaA7 +RAcWqKUQtOsKjXhJZ6P92Pq75SI8w/YpWsCgEssUpHBDqF6x3clsc1eW9WCpTmHOu0x AzZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=4xjxcG7LPH7s9T2flZ7kPFT7F4hhmRt1pvHIKAqq35o=; b=DgWcuaZgHEWdjuTmerEdcupOYwQv4hbZPkHrgTAyQD1O/Ju+7ZQq0y0DRBJ6BCyWdk s+Ch2Msl28CyOf1HtkS6yxyfhRfq/GlEaGc5DS+pw7XlkvGyDQ0jmilTjy1oE05MRT0O ZaBSNGhtYJUPvpSA8jtt2OaK7bUsNaP1aM/oV36fKEKwEX+cPXidP34H9WF4AAW/5Mko KM7OcZP1KWx4QUQLL1k5nY0sym9c5+gFRxx2G2oQxZ+Nc3ALko5lWnIRSaSXfbzKtsNh Rpnshaw2ByY/uIpVkOMmvlKTRCc/R8as/gIIymsqY6LO+DFcpPDMyg5n67dyJYguGEuV 30Dw== ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j16si6244725pfa.197.2019.03.08.00.48.12; Fri, 08 Mar 2019 00:48:28 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726305AbfCHIrw (ORCPT + 99 others); Fri, 8 Mar 2019 03:47:52 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:1969 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726238AbfCHIrw (ORCPT ); Fri, 8 Mar 2019 03:47:52 -0500 X-UUID: c6a993b043be42d7bad82109c0eb2468-20190308 X-UUID: c6a993b043be42d7bad82109c0eb2468-20190308 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 110564800; Fri, 08 Mar 2019 16:47:40 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs01n2.mediatek.inc (172.21.101.79) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 8 Mar 2019 16:47:39 +0800 Received: from [172.21.77.4] (172.21.77.4) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Fri, 8 Mar 2019 16:47:39 +0800 Message-ID: <1552034858.2863.25.camel@mtksdaap41> Subject: Re: [PATCH v2 02/10] dt-binding: gce: add binding for gce event property From: CK Hu To: Bibby Hsieh CC: Jassi Brar , Matthias Brugger , Rob Herring , Daniel Kurtz , Sascha Hauer , , , , , , Sascha Hauer , "Philipp Zabel" , Nicolas Boichat , "YT Shen" , Daoyuan Huang , Jiaguang Zhang , Dennis-YC Hsieh , Houlong Wei , , , Frederic Chen Date: Fri, 8 Mar 2019 16:47:38 +0800 In-Reply-To: <1551865835-50974-3-git-send-email-bibby.hsieh@mediatek.com> References: <1551865835-50974-1-git-send-email-bibby.hsieh@mediatek.com> <1551865835-50974-3-git-send-email-bibby.hsieh@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-SNTS-SMTP: 53E949AEC08988B78A0AC1647D487C3228351745EA3C37EF067C1A23601FEB272000:8 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Bibby: On Wed, 2019-03-06 at 17:50 +0800, Bibby Hsieh wrote: > cmdq driver provide a function that get event number > from device node for client. I think device tree is based on the view of hardware design, so you need not to mention how the driver design. Client hardware would send event to GCE hardware, so this property present this event. > add specification for #event-cells, > mediatek,gce-event-names, mediatek,gce-events. > > Signed-off-by: Bibby Hsieh > --- > Documentation/devicetree/bindings/mailbox/mtk-gce.txt | 16 +++++++++++++--- > 1 file changed, 13 insertions(+), 3 deletions(-) > > diff --git a/Documentation/devicetree/bindings/mailbox/mtk-gce.txt b/Documentation/devicetree/bindings/mailbox/mtk-gce.txt > index 9c0d982..812698f 100644 > --- a/Documentation/devicetree/bindings/mailbox/mtk-gce.txt > +++ b/Documentation/devicetree/bindings/mailbox/mtk-gce.txt > @@ -21,12 +21,20 @@ Required properties: > priority: Priority of GCE thread. > atomic_exec: GCE processing continuous packets of commands in atomic > way. > +- #event-cells: Should be 1. > + <&phandle event_number> > + phandle: Label name of a gce node. > + event_number: the event number defined in 'dt-bindings/gce/mt8173-gce.h' > + or 'dt-binding/gce/mt8183-gce.h'. > > Required properties for a client device: > - mboxes: Client use mailbox to communicate with GCE, it should have this > property and list of phandle, mailbox specifiers. > - mediatek,gce-subsys: u32, specify the sub-system id which is corresponding > to the register address. > +- mediatek,gce-event-names: the event name can be defined by user. > +- mediatek,gce-events: u32, the event number defined in > + 'dt-bindings/gce/mt8173-gce.h' or 'dt-binding/gce/mt8183-gce.h'. I think both gce-subsys and gce-event are optional and depend on the hardware design. Regards, CK > > Some vaules of properties are defined in 'dt-bindings/gce/mt8173-gce.h' > or 'dt-binding/gce/mt8183-gce.h'. Such as sub-system ids, thread priority, event ids. > @@ -41,6 +49,7 @@ Example: > clock-names = "gce"; > thread-num = CMDQ_THR_MAX_COUNT; > #mbox-cells = <3>; > + #event-cells = <1>; > }; > > Example for a client device: > @@ -50,8 +59,9 @@ Example for a client device: > mboxes = <&gce 0 CMDQ_THR_PRIO_LOWEST 1>, > <&gce 1 CMDQ_THR_PRIO_LOWEST 1>; > mediatek,gce-subsys = ; > - mutex-event-eof = - CMDQ_EVENT_MUTEX1_STREAM_EOF>; > - > + mediatek,gce-event-names = "rdma0_sof", > + "rsz0_sof"; > + mediatek,gce-events = <&gce CMDQ_EVENT_MDP_RDMA0_SOF>, > + <&gce CMDQ_EVENT_MDP_RSZ0_SOF>; > ... > };