Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp831327rdb; Tue, 23 Jan 2024 17:15:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IH5yoKWindZw6ZqxEQQEf99PBYvCvbHFY+5IFMaR4knVfY+UgIp6iYiVqEOcNwgMalztHIp X-Received: by 2002:a05:6214:c26:b0:685:edc7:6e83 with SMTP id a6-20020a0562140c2600b00685edc76e83mr2145776qvd.89.1706058935550; Tue, 23 Jan 2024 17:15:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706058935; cv=pass; d=google.com; s=arc-20160816; b=k2iRDFRgKQZ3iA/m424op/jTOJGD1lDJ7Ri1bKtgsO84fz8kYsUWONkAcZV7DTRBXT eymm/K+upy5w8rOBAhdgy2oFgmcatFhDSLI+B8cuHJYgCY1v5U/Vi+9WwQADo/mEtB3J xiXRw5IvQgKrhh6mQHM6QxUic5Vo5wndgaIS8GqPu46mNi8hlSamOsSRwRUJA2KRWibq /EkAvYimeyNg1Rd3rLPOHXtBUWZoSls6f/R2w47dBydnsrfpZycgHumMb7fo400kfLPw bd4CiTM1CPFlS5WzbhPODJlXBXHr0P3z6ltie0L8ItS/bObxLp97z6bNkdYhC4KB7/16 WZlg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=RMIo1guccMFVDfkHmK7frFW/6/qfxStJTqou8qVMu6o=; fh=Ai0mTXzI1IEpr3AXaUr5RGm8S69zHzYUPf0DW9EG7O0=; b=AbHBlocJkGAUiUEdKcZhK0HqOGHOz84u7mXkhHMozSTwqc+cfr7SfzQ6t452vzvEyh PX680VJvQAMXHaV/fvV/0hbyMulawSHb/Ppu1P4ajzgL3GrPK/ZRhrufZeBjslJnEy1x /Im7WqS+R9ze+4QIUOirdYC/eNqqxsb9NvVHHXbjDhFfV00oXQ7sMYbemwJWdrY7+5Ar LT55+X1/ComF+Mq8tbOlyfuko08+8jlkz2rOMI+zZp4dOIKICDq+jPVYTactZlRZQlk1 LtQqZHFOL1u6QIRXDWU3Mwpz7xB39UFNuUz3oE1blfI6CvIvFV+0aAW7J8kVFZH2FVGk 8wNg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b="g2+v/KPH"; arc=pass (i=1 spf=pass spfdomain=mediatek.com dkim=pass dkdomain=mediatek.com dmarc=pass fromdomain=mediatek.com); spf=pass (google.com: domain of linux-kernel+bounces-36260-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-36260-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id n6-20020a0cdc86000000b0068183d75b20si9173914qvk.564.2024.01.23.17.15.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 17:15:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-36260-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b="g2+v/KPH"; arc=pass (i=1 spf=pass spfdomain=mediatek.com dkim=pass dkdomain=mediatek.com dmarc=pass fromdomain=mediatek.com); spf=pass (google.com: domain of linux-kernel+bounces-36260-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-36260-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com 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 747BC1C25E55 for ; Wed, 24 Jan 2024 01:15:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ABF541FDC; Wed, 24 Jan 2024 01:15:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="g2+v/KPH" Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) (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 8FD4010EF; Wed, 24 Jan 2024 01:15:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=60.244.123.138 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706058911; cv=none; b=WbU3bIGD2RtnYi2X6jDWqXCx59+GhDbOO4SogzRBxTdl7vMRTb315WBhWGy4EemaOAMPWwZ8WqGhS5nU/0Bbv5IWoL19A4WRsjZNQNw5dIr3T20qA+BSSP95RILUEYpbDLQa3DT7dWtzcigOoqz5xTwSCji/Xy5V8D2MfOWbfmY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706058911; c=relaxed/simple; bh=U0iDmyg6R5d9UuwxxDyqjyV2C/5tHfTz9ek8Dc+8btQ=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=C4LrHoMoCZeiVlCRa2l1K9CbC6rQGZCZVbUvJT2wpa1Oia9VEecG9nEBLOT/o5z60wsdG3tGdNhA5ZufH/DL46G7GRbrJjf5SGdjAyzm2KMbRv77C2KixRwlQt6OkpskBYR6kr/zgN+taLNSHD+451zcTdw/GZqA4YSN8fSebl4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com; spf=pass smtp.mailfrom=mediatek.com; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b=g2+v/KPH; arc=none smtp.client-ip=60.244.123.138 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mediatek.com X-UUID: ffbfa9e6ba5511ee9e680517dc993faa-20240124 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=RMIo1guccMFVDfkHmK7frFW/6/qfxStJTqou8qVMu6o=; b=g2+v/KPHws3QB5H5WYltqUzOAP9CiTse+XwvpmG1taYDPuyf+ZQ2rJJTOucluDF36ItrNifqfrp5RcQtUFi+2U1zfE0gkd/IifoAfoyDzGV7xwXSOOGyIk2eR3empAOcH5EcAUvFNpuEpuUpghW7VoT5FKXM/R2GvkENUob89RU=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.36,REQID:3a12a735-c1c4-4498-99bb-8fa85966b2e8,IP:0,U RL:25,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:25 X-CID-META: VersionHash:6e16cf4,CLOUDID:a17813fe-c16b-4159-a099-3b9d0558e447,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:11|1,File:nil,RT:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES :1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR,TF_CID_SPAM_ULN X-UUID: ffbfa9e6ba5511ee9e680517dc993faa-20240124 Received: from mtkmbs14n2.mediatek.inc [(172.21.101.76)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 940778163; Wed, 24 Jan 2024 09:15:02 +0800 Received: from mtkmbs11n1.mediatek.inc (172.21.101.185) by mtkmbs11n2.mediatek.inc (172.21.101.187) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Wed, 24 Jan 2024 09:15:00 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Wed, 24 Jan 2024 09:15:00 +0800 From: Jason-JH.Lin To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Chun-Kuang Hu CC: , , , , , , , Jason-ch Chen , Johnson Wang , "Jason-JH . Lin" , Singo Chang , Nancy Lin , Shawn Sung , , Fei Shao Subject: [PATCH v4 1/3] dt-bindings: mailbox: Add mediatek,gce-props.yaml Date: Wed, 24 Jan 2024 09:14:57 +0800 Message-ID: <20240124011459.12204-2-jason-jh.lin@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20240124011459.12204-1-jason-jh.lin@mediatek.com> References: <20240124011459.12204-1-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: text/plain X-MTK: N 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. The property "mediatek,gce-events" is used for GCE event ID corresponding to a hardware event signal sent by the hardware or a software driver. If the mailbox providers or consumers want to manipulate the value of the event ID, they need to know the specific event ID. Signed-off-by: Jason-JH.Lin Reviewed-by: Conor Dooley --- .../bindings/mailbox/mediatek,gce-props.yaml | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Documentation/devicetree/bindings/mailbox/mediatek,gce-props.yaml diff --git a/Documentation/devicetree/bindings/mailbox/mediatek,gce-props.yaml b/Documentation/devicetree/bindings/mailbox/mediatek,gce-props.yaml new file mode 100644 index 000000000000..c25eed4606fe --- /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 Properties + +maintainers: + - Houlong Wei + +description: + The Global Command Engine (GCE) is an instruction based, multi-threaded, + 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 consumers + and configure GCE to execute the specified instruction set in the message. + We use mediatek,gce-mailbox.yaml to define the properties for CMDQ mailbox + driver. A device driver that uses the CMDQ driver to configure its hardware + registers is a mailbox consumer. The mailbox consumer can request a mailbox + channel corresponding to a GCE hardware thread to send a message, specifying + that the GCE thread to configure its hardware. The mailbox provider can also + reserve a mailbox channel to configure GCE hardware register by the specific + GCE thread. This binding defines the common GCE properties for both mailbox + provider and consumers. + +properties: + mediatek,gce-events: + description: + GCE has an event table in SRAM, consisting of 1024 event IDs (0~1023). + 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 software. + 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 when + 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 driver + 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: 32 + +additionalProperties: true -- 2.18.0