Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp1120026rdb; Fri, 19 Jan 2024 08:44:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IHLERPtvDgYebVHKO5d2d6nDge6vL1V0FjfIVEGk5h+D9C86/FPnqvnVRGpn0F00io/4Zgr X-Received: by 2002:a25:2f55:0:b0:dc2:65ff:7948 with SMTP id v82-20020a252f55000000b00dc265ff7948mr163749ybv.0.1705682663164; Fri, 19 Jan 2024 08:44:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705682663; cv=pass; d=google.com; s=arc-20160816; b=e+P43GXwnGGt3kj3gFSKqZ+AU0oGUUIx2KutvbJYnoHVu88NSuAz9gVn7CSoldFVRT mS8PL8capS4fKqBp3XOK1xbj2LLYTh5FJGI5qBQPmDfrbSjmgnWoWOOv7OXYXSqkEVQW cWqDE6q9aDYcI1EetJFSGdldsa/iUAA7xn3NSXH4xW8SZImn8UZErmr8cU0urjWBdiSC VqrnWhTKlwsq49nyKGfKsByeQD7Pswmax4wM8zTAoHYmCRK5jcQy11YvlnCdU4ot5Qxq skdbTobXG3tKuh+532ACIuBd7q2dok5WWtDcT0G6a/qGTx4Yxd47GxB8gytCk9b7OR4A 8qKQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=AGRNxhDMi/k5YQaQHuywe9UxkvfxjWnt233hPEUmO18=; fh=FqTaXqx8oN3Rud22roD0kloQ284NXJgv20pnzs3t+ao=; b=F0zYiWHlFH5AC6lh+kuL0PmfGp2TEV/d3e4cOMxJf67xoS0RYVlnZidsU/ju4aXAXo ukli06ivov9k2n/eSTO4Ix1pvZZXT8/lqZrVG8jE9P3dvRfywJ4UWNnbd7GliV74P0Ej wJh80r0jQh/Hj+bIyby6L2qEEbMUnbVA0dOVBKaI2lpe/Nzr+s6vO75ECTqriM7Iiyyy 8dppYXTKiVRO+LqvH0F3+1atNHj/Gw/bsEbcfJzghe95sstWCnF2eAxsQQeLk1oiPk81 z/vU9DexYTIcuLanZwUOPnC2PZw6SFB0SWV1SD4qvMxzm2lOm1rWs/iw2qRPeTw8Ljtj dnGA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=q7kZGfi2; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-31376-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31376-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id l22-20020a05620a0c1600b00781565bc683si16257224qki.203.2024.01.19.08.44.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 08:44:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-31376-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=q7kZGfi2; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-31376-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31376-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id D7E201C246E9 for ; Fri, 19 Jan 2024 16:44:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 888AF55782; Fri, 19 Jan 2024 16:44:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="q7kZGfi2" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 96B2154FA8; Fri, 19 Jan 2024 16:44:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705682650; cv=none; b=W00uEan0Jz8YMJ9pvNPnkCIddz8wHmfxolPVxzmiCIiWtm45o/5oEqsbbXgwCYK3whtU36x7rAcaVoAdl2mUpSZ36lgV5QvpZ6KnIvSNYBDsU8YX8E4Pvgg950w0EMdsckPffUIUHdJQ94ZjphhZp7zUOsSBzaEHBjSJwVNRp2s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705682650; c=relaxed/simple; bh=rRw2O8xwrDlJ45VGXmvgJkqhcUfZQFmZYjMTGiQcFo0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YkxaITieULiuQzJAOUz5uTnqB310zGJRpNXSR/0HR/xo/4TsGM/MAvd2qBmXsMKE1SOPyHqbAt0kkVqdvazlqtbulDxc7lrekw3G03a7ysHLn8LSjjmSIUdJ0NYQKSIe/eppMOzd/Cl54SzqOsawYKYSQ53thj7oB43L+33DWBg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=q7kZGfi2; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 27A60C433C7; Fri, 19 Jan 2024 16:44:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705682650; bh=rRw2O8xwrDlJ45VGXmvgJkqhcUfZQFmZYjMTGiQcFo0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=q7kZGfi2i22e2F/TmsZJrGGsmi1v+fJ9bhNNWQLcIh56t/cwSl/tPVh0WD9bi/AEj Y4toGR1r5VwBuR+dCg0x42dZdoR0WTCryYhydFUp7TQvIKMuzemhX/bYaVldx/nyAL Jq2JrYHng9RIX6ivrVNikYrqbVdI/Q11/7fETP2FWoiD/1AAQ9WTeqDUOzM0yi9h5i rtsllgRARjyaNb8br7SkPkjaDfdFzf+nyMzqXAVrTJNIBVUGB9Q/PNh0A8pxneHvpD oNzkUIUn98Ovk/z75q0iJEbuZ/lvN3a4tzxcK2s8S0f8UYpm+U+76e5T7nLoP6if+O zntyEg7xT6WBg== Date: Fri, 19 Jan 2024 16:44:03 +0000 From: Conor Dooley To: "Jason-JH.Lin" Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Chun-Kuang Hu , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org, Jason-ch Chen , Johnson Wang , Singo Chang , Nancy Lin , Shawn Sung , Project_Global_Chrome_Upstream_Group@mediatek.com Subject: Re: [PATCH v3 1/3] dt-bindings: mailbox: Add mediatek,gce-props.yaml Message-ID: <20240119-demote-fragment-624a35367a87@spud> References: <20240119063224.29671-1-jason-jh.lin@mediatek.com> <20240119063224.29671-2-jason-jh.lin@mediatek.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="5+I8isPEC3Mumo7F" Content-Disposition: inline In-Reply-To: <20240119063224.29671-2-jason-jh.lin@mediatek.com> --5+I8isPEC3Mumo7F Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Rob, On Fri, Jan 19, 2024 at 02:32:22PM +0800, Jason-JH.Lin wrote: > Add mediatek,gce-props.yaml for common GCE properties that is used for > both mailbox providers and consumers. We place the common property > "mediatek,gce-events" in this binding currently. >=20 > The property "mediatek,gce-events" is used for GCE event ID corresponding > to a hardware event signal sent by the hardware or a sofware driver. > If the mailbox providers or consumers want to manipulate the value of > the event ID, they need to know the specific event ID. >=20 > Signed-off-by: Jason-JH.Lin > --- > .../bindings/mailbox/mediatek,gce-props.yaml | 52 +++++++++++++++++++ Is bindings/mailbox the correct directory to put this in? > 1 file changed, 52 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mailbox/mediatek,gc= e-props.yaml >=20 > diff --git a/Documentation/devicetree/bindings/mailbox/mediatek,gce-props= =2Eyaml b/Documentation/devicetree/bindings/mailbox/mediatek,gce-props.yaml > new file mode 100644 > index 000000000000..68b519ff089f > --- /dev/null > +++ b/Documentation/devicetree/bindings/mailbox/mediatek,gce-props.yaml > @@ -0,0 +1,52 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/mailbox/mediatek,gce-props.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: MediaTek Global Command Engine Common Propertes > + > +maintainers: > + - Houlong Wei > + > +description: > + The Global Command Engine (GCE) is an instruction based, multi-threade= d, > + single-core command dispatcher for MediaTek hardware. The Command Queue > + (CMDQ) mailbox driver is a driver for GCE, implemented using the Linux > + mailbox framework. It is used to receive messages from mailbox consume= rs > + and configure GCE to execute the specified instruction set in the mess= age. > + We use mediatek,gce-mailbox.yaml to define the properties for CMDQ mai= lbox > + driver. A device driver that uses the CMDQ driver to configure its har= dware > + registers is a mailbox consumer. The mailbox consumer can request a ma= ilbox > + channel corresponding to a GCE hardware thread to send a message, spec= ifying > + that the GCE thread to configure its hardware. The mailbox provider ca= n also > + reserved a mailbox channel to configure GCE hardware register by the s= pcific > + GCE thread. This binding defines the common GCE properties for both ma= ilbox > + provider and consumers. > + > +properties: > + mediatek,gce-events: > + description: > + GCE has an event table in SRAM, consisting of 1024 event IDs (0~10= 23). > + Each event ID has a boolean event value with the default value 0. > + The property mediatek,gce-events is used to obtain the event IDs. > + Some gce-events are hardware-bound and cannot be changed by softwa= re. > + For instance, in MT8195, when VDO0_MUTEX is stream done, VDO_MUTEX= will > + send an event signal to GCE, setting the value of event ID 597 to = 1. > + Similarly, in MT8188, the value of event ID 574 will be set to 1 w= hen > + VOD0_MUTEX is stream done. > + On the other hand, some gce-events are not hardware-bound and can = be > + changed by software. For example, in MT8188, we can set the value = of > + event ID 855, which is not bound to any hardware, to 1 when the dr= iver > + in the secure world completes a task. However, in MT8195, event ID= 855 > + is already bound to VDEC_LAT1, so we need to select another event = ID to > + achieve the same purpose. This event ID can be any ID that is not = bound > + to any hardware and is not yet used in any software driver. > + To determine if the event ID is bound to the hardware or used by a > + software driver, refer to the GCE header > + include/dt-bindings/gce/-gce.h of each chip. > + $ref: /schemas/types.yaml#/definitions/uint32-array > + minItems: 1 > + maxItems: 1024 > + > +additionalProperties: true > --=20 > 2.18.0 >=20 --5+I8isPEC3Mumo7F Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZaqm0wAKCRB4tDGHoIJi 0no0AQC56hKuU1fmtkZ0/SFR3pDacK2I9XoVgG8Zhv6/MlLMfwEAnf7AHDe29oll GZ8VqDNg5+hCVNwBevuCStPe9uK+WAw= =kej4 -----END PGP SIGNATURE----- --5+I8isPEC3Mumo7F--