Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1312086lqb; Sat, 25 May 2024 16:08:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXiD39kGLceHdIzq7xA+NRtDSUttAMbsxc+swt8LvbckIdheim/y1e8XjDJ3VZKYN2TVwEhYcoRKGHzRvUrUJgfBZnTmsUXuXTMYPUPbw== X-Google-Smtp-Source: AGHT+IGXMl+IYJw1wfHRyUlaxKVwhf/Ai+p2tgyjmCPc0EbJe0fgoHj3rvDdy7OoUsWkGv2SCrqf X-Received: by 2002:a05:6512:2017:b0:520:dc1c:3c5d with SMTP id 2adb3069b0e04-529668c9cc9mr3067888e87.42.1716678524651; Sat, 25 May 2024 16:08:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716678524; cv=pass; d=google.com; s=arc-20160816; b=Iwz+B7lHMm2xj9p2CeBV3hxb9G+SOKC4u7AAgcTM0DpN588RLYt2wl/IRYZYm3lC6M 4V2JB9hVVDmpCHcEra0/7iSsWXJ87C+Cqhz3AAUdAKaPuxsCvLu2ucWN+wD28jyGcgDv y+O7CfXDnUAAA+zBo8RU/YcKG9zrTR1yTqZCY+EXK+zSTdgPi9Z39YbCgmpI5yDXSHcY 2IsQKhQ6+qnwRZ9ffYEp6nf92W7Jx40mPJU3d3Sw4cCfHcR4T2ABvZkjGppBHoWDWSM9 tryC/GXH6WZIY7X2kyoD9Y8YBFdhNbD3mTexpK1pD1xZZj7YOBVf+QVXJEIH+cHERgoA Za0w== 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=5iqv6x/ghbzUOX83DTvSQ+4xvQ/d9I2EOAPbwfRk/TA=; fh=CiF6JGGVH3Hu9hr8h+4ZhiE5t9kmJcq2jSE2QKKRHfw=; b=IW1NWX5DdqPkEZIm+6MzbR4/hn7Pgr43FSIlEw9Xna1GWCkZ4Qionuy5EzMzt9lVNd PwlYjbsUoMxhWCoKTdlNhbc8DVNPkWAiHM01tLua6H5IFQ++krIrkkM0y/s1PKpg7UPL S0GHO3oJcfp22wbphXKzQuCvno7cGJKJLvI9DakaBfsOxWR8or1Km1sS9d/4AXlq9h4s ivopfcAc4NwSM4e/9IQ4twT+2ssPd071SulIa3G6/ahZIcw1EVDgJjd+mKlan+7dmLh8 4xau+IMLnxYMrPPgUobQZMiZiy/BZNsiCn8P4CKJypVmnICyfGvCiZxxp+Fe5cnyq6Qp DXPw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=BIt9lobx; 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-189560-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189560-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-579b633f20dsi875143a12.517.2024.05.25.16.08.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 May 2024 16:08:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-189560-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=BIt9lobx; 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-189560-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189560-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 5FD481F21761 for ; Sat, 25 May 2024 23:08:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0D965129E98; Sat, 25 May 2024 23:08:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="BIt9lobx" 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 08BB23B297; Sat, 25 May 2024 23:08:24 +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=1716678507; cv=none; b=ZJV5grztr8cWigzxwk4g1BzhQem/J5qKshalmG6vimnUCofQXb/j/4Y3r9PXYcRrUS/vuDG/8ISgDj/O9ZwYNhzngeatsGTjsumgfiKe9DR5GPUDR099HzU0mHfRSljSqAoZ0Ge7IfnGvc6RlqnkIeYXc9XD+ZCZoON7pCtjQL8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716678507; c=relaxed/simple; bh=roqVaYWdQf77QaOYdnLuCaahuQfbvw7j0isXQ2rLQJQ=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=M/iJJwKCf2I7TXei2H+lo6JNP574IMD0xI5blt0/PD4rWkDJ9yObTnpDgUJ4m6ZBvxgoHzfkFtjZox+vb9J3ncg0GcE6kwC7CBEITBmWEMzizuWDggd8J5ZaNsXN24VrvKn5pLkqKcMpBAW0rLFUEkwR+Ax+kpWu2ek3moT2CMQ= 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=BIt9lobx; 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: a8f28b641aeb11ef8c37dd7afa272265-20240526 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=5iqv6x/ghbzUOX83DTvSQ+4xvQ/d9I2EOAPbwfRk/TA=; b=BIt9lobxCDc3Yfswvfu3deKDNhuc2iKHp7pemHak/eZXeK5ITaqDmjMy1CHqXkVVxvkTn1pI8zKdTkYG4V2r9aKDvwYB2ginqRnj1NJBVGyFZraTpUzHokh/PoxkAE8ypYK4yac2HooTMxbFCrsuq0TZKdwi7zDepGoAR+S42sc=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.38,REQID:1976d482-b671-41a3-8bdb-d76c20bdc56b,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:82c5f88,CLOUDID:c7f1cf87-8d4f-477b-89d2-1e3bdbef96d1,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,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,NGT X-CID-BAS: 0,NGT,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-UUID: a8f28b641aeb11ef8c37dd7afa272265-20240526 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 1822441264; Sun, 26 May 2024 07:08:12 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) 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; Sun, 26 May 2024 07:08:11 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs13n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Sun, 26 May 2024 07:08:11 +0800 From: Jason-JH.Lin To: Jassi Brar , Krzysztof Kozlowski , Rob Herring , Matthias Brugger , Chun-Kuang Hu , AngeloGioacchino Del Regno CC: Conor Dooley , Jason-ch Chen , "Jason-JH . Lin" , Singo Chang , Nancy Lin , Shawn Sung , , , , , , Subject: [PATCH v6 2/8] dt-bindings: mailbox: Add property for CMDQ secure driver Date: Sun, 26 May 2024 07:08:04 +0800 Message-ID: <20240525230810.24623-3-jason-jh.lin@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20240525230810.24623-1-jason-jh.lin@mediatek.com> References: <20240525230810.24623-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 1. Add mboxes property to define a GCE loopping thread as a secure IRQ handler. The CMDQ secure driver requests a mbox channel and sends a looping command to the GCE thread. The looping command will wait for a secure packet done event signal from secure world and then jump back to the first instuction. Each time it waits for an event, it notifies the CMDQ driver to perform the same action as the IRQ handler. 2. Add gce-events property from gce-props.yaml to define a secure packet done signal in secure world. There are 1024 events IDs for GCE to use to execute instructions in the specific event happened. These events could be signaled by HW or SW and their value would be different in different SoC because of HW event IDs distribution range from 0 to 1023. If we set a static event ID: 855 for mt8188, it might be conflict the event ID original set in mt8195. So we define an event ID that will be set when GCE runs to the end of secure cmdq packet in the secure world. This can reduce the latency of software communication between normal world and secure world. In addition, we can also remove the complex logic after the secure packet done in the secure world. Signed-off-by: Jason-JH.Lin Signed-off-by: Hsiao Chien Sung --- .../devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml b/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml index cef9d7601398..6e5e848d61d9 100644 --- a/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml +++ b/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml @@ -49,6 +49,10 @@ properties: items: - const: gce + mboxes: + items: + - description: GCE looping thread as a secure IRQ handler + required: - compatible - "#mbox-cells" @@ -57,6 +61,8 @@ required: - clocks allOf: + - $ref: /schemas/mailbox/mediatek,gce-props.yaml# + - if: not: properties: @@ -67,7 +73,7 @@ allOf: required: - clock-names -additionalProperties: false +unevaluatedProperties: false examples: - | -- 2.18.0