Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1585612lqb; Sun, 26 May 2024 07:45:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVqffCjp2YofOq6el30ztlHka410V+45HrLUQiEmLFIXdJgSNSFgdkyFbqtqeABoOmIvf+iEeYm98+WZYMr0gBg+0XRMeuRjPKTU3uFNw== X-Google-Smtp-Source: AGHT+IGW3MFoFo4BMQzouhpPyIJJGb/D6WTzU+XBiIc9oaVc4AgyNcyXseJ39oW4C9lcvmEybIsq X-Received: by 2002:a05:6214:4981:b0:6ab:76a2:593d with SMTP id 6a1803df08f44-6abccfa64e1mr73125526d6.45.1716734723205; Sun, 26 May 2024 07:45:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716734723; cv=pass; d=google.com; s=arc-20160816; b=xLTlmh7dOGpGiRk+kX2r+VN1ySHapc/6fJFzS0TmVujneemd7VBWs274zIzaMOb/Ak sDmRBJGHfbQLY25TJquMdsOyEsxqs+XUrea6JE0nqJBIdAoG8hEJpxH7QeSUsWcEaHdU YU3gm8UmzabbxXLyijwHXEBs0fPNnaWQ2P7xkj3ocKUrX5pvn/ZBNBwmX2vsLWFhm/oO 2diSx+JK15kCc/R9XryC/8ZHv++gFmW2OUFvhXRpNNEboB+Tx8MouG1EV8oZeNYH6aT2 NV6/CcgeKMsPWrWKkmZbJP8iVwIF33WoIQddWf3FoRImxwnuEjVflRLzvXZ+EMLNdc9B wcGw== 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=AqleOiYR/bwEkuDF32Wd79pBIWeWQjQLGmzwBFPZ77qFDbhEgCgR5ZnyRazNTUjcno J31XxF7v2FEKwAE9t7HKnhrqPqc5T5LcHJXqSFtTL+PxE5NKYHRatORKG5DeWRZWpT0T MHUvBg+pQioCb4DGCqxU1WElSLSZrVJWnmgX4q5nTMywRd7NoULEm0LuT8uNL80zejj7 Zvm5CNs+P+z0rFEr3EcfSNw4RrpJpyMgBSxDkgClNxHQ7Q5h+9+erki46XHkXyt421AJ hJ3MYXGqxX/XpdxbU21TIO734J7clZEZAiXwZIUDOy+QqCyRltN9vEDyqTJGgv7Th2tz hhig==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=jhJyZkhK; 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-189755-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189755-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. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6ad79de9572si15209166d6.567.2024.05.26.07.45.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 May 2024 07:45:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-189755-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=@mediatek.com header.s=dk header.b=jhJyZkhK; 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-189755-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189755-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 EB61E1C2093B for ; Sun, 26 May 2024 14:45:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7D764200CD; Sun, 26 May 2024 14:44:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="jhJyZkhK" Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) (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 418561758E; Sun, 26 May 2024 14:44:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.61.82.184 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716734694; cv=none; b=mtxP6rFEAeR40hcvsfXWpOdsVVwfajzSa+8+3rVZEpv7XjXk8KiX/V4iLDrfsnGE44uTQ6GibRLq6vyguX8Ff9gR3EFLxnoxFn5Je8WdD337f4WAc0QiXO8JkiDI2Btrg+ofMjAKeAmKxoUq+j4RqHUW2ntxEjaiLKAHmQgbjrA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716734694; c=relaxed/simple; bh=roqVaYWdQf77QaOYdnLuCaahuQfbvw7j0isXQ2rLQJQ=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=jDkcjl984375BU1P/1Aa5njqkkSiYZeUlkAo7fvaF5sjzGvpelNvUqH+QFy/DRkGOFGpJeLiG3jlkcyR9rp87t20bzp3qhEWtNjwqumRwKOLxUt7TPAHoriuYy1mK7mHYuZ51VbAGmIgw7d60zPrgzuxU4Rsl6ttqlzBq+2Zh7U= 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=jhJyZkhK; arc=none smtp.client-ip=210.61.82.184 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: 7f4f40bc1b6e11efbfff99f2466cf0b4-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=jhJyZkhK9j4XP7X1dsdHIBLH0fG+zBK+5WztohqyA0H7XVw5vqwdo3cAh06WFZZdAJLY9AwWtXPcEyB7IpM+wGJ62/sYDDrwMb2F6FBuQdbA7FsdbWJ6B5YRA9Pk05+QRgXFmDZed4eu3W76Lb1LDnn+RMfXhNzWdK6gi0IsWFU=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.38,REQID:5f7acd1a-c93d-4ce4-8526-be88a65538b4,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:d7a85384-4f93-4875-95e7-8c66ea833d57,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: 7f4f40bc1b6e11efbfff99f2466cf0b4-20240526 Received: from mtkmbs14n2.mediatek.inc [(172.21.101.76)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1658814221; Sun, 26 May 2024 22:44:46 +0800 Received: from mtkmbs13n1.mediatek.inc (172.21.101.193) by MTKMBS14N2.mediatek.inc (172.21.101.76) 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 22:44:44 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs13n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Sun, 26 May 2024 22:44:44 +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 RESEND,v6 2/8] dt-bindings: mailbox: Add property for CMDQ secure driver Date: Sun, 26 May 2024 22:44:37 +0800 Message-ID: <20240526144443.14345-3-jason-jh.lin@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20240526144443.14345-1-jason-jh.lin@mediatek.com> References: <20240526144443.14345-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-TM-AS-Product-Ver: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-AS-Result: No-10--7.815100-8.000000 X-TMASE-MatchedRID: OXh+vcntO3AXSulpnju2H23NvezwBrVmgYy8y+HaPlZOCtCDJNptxlkx R/OK+HA0Qv/RxZk9D1F8EK4uBc8FBrM5yFdOCNfRJLZygv5HzOXt/okBLaEo+JIuII6CcB9zTr4 Kjlf+TXdryn58a4qF0HVUSbHuxOT/JogLSXP5a/d0BEBFOTiHn1sChor7BLiNzsQ8iRVyD45ZoZ UwtnkREuLzNWBegCW2wgn7iDBesS15zdAzex5xZi7QVrcw6a2RkF3QJQiIzo4J/ae5Bj5hUe1+s HjxVjEGRUQ1pOGS5K+UTGVAhB5EbQ== X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--7.815100-8.000000 X-TMASE-Version: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-SNTS-SMTP: 8BC45171C859439C88226BB04643934A9F8341B3FAD9BAB923E5E34DB624BF5D2000:8 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