From patchwork Mon Jan 20 17:20:56 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Wilczynski X-Patchwork-Id: 13945366 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A33BAC0218C for ; Mon, 20 Jan 2025 17:23:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:References:MIME-Version:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DVULiKY+7ixHEwNHg9BL11WhwIxvQTask/V6NQfgO4U=; b=vujwX+d/c5acQh KKdqFzRLQKDYcORSqnd//MgsHKB1T0IPOAUGn5vm3Ms0w9pmlIGlQLtbCD5D16eFI7HXHJdllSPzL V/5zrdsM9Sxp02fCpDcrazWoL9Gpi6m+E325/ttdLmUHUrMrBJtKQxmHWDfI2KUMp58gjlMqVEget VjKWVujghCWUF+SdFXY/grSc3mJjfJ8ET2g31Z0p5JFrYK6NNXEAWib5RQLESk//kWS7yjI6aVXKs eun8t8c+lWgC+eK3FQYaUmy3gF7lZpT5w+WBrdWQBXu3DyDJmWMRT/eRbIo+s/tY5nps2TIWh86Fp tXNalqhNYuyPPb2zEIdA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tZvUh-000000067ot-0aDy; Mon, 20 Jan 2025 17:23:23 +0000 Received: from [210.118.77.12] (helo=mailout2.w1.samsung.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tZvSp-000000066vZ-2KFB for linux-riscv@lists.infradead.org; Mon, 20 Jan 2025 17:21:31 +0000 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20250120172124euoutp02319285af22a3f074f825ab5060f7eab8~cdlnNjICr1370613706euoutp02K for ; Mon, 20 Jan 2025 17:21:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20250120172124euoutp02319285af22a3f074f825ab5060f7eab8~cdlnNjICr1370613706euoutp02K DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1737393684; bh=0OEwJDD9UosNBE7/klOOmElhNj46cDXsS2V1zQFs2EU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=p7ZyCUIXI8EelxIS5vr1q1aG4blH7+/N+kY+kF95csDYNZ0M0HBVKRmIvTJrLvt+h xZ4UyBZJzTcEcMINzsluNgDfvPpib9EWoeV+sCB4ELO+Jjn4qKuwjGEg5P3adCUxFi uzxKyk8zUKSHsQXU31ZWfYLgpOQkdxShjmg5WPzY= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20250120172123eucas1p1e17c4ff78a73499e160eb28d9a1a52b2~cdlmqt4Jh0503405034eucas1p1i; Mon, 20 Jan 2025 17:21:23 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 5B.7B.20821.3168E876; Mon, 20 Jan 2025 17:21:23 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20250120172123eucas1p13564bf2d07000506caf44cf55bda7fd9~cdlmMcU7W0726407264eucas1p16; Mon, 20 Jan 2025 17:21:23 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20250120172123eusmtrp20400e15340aab59212cb82ef85870e6e~cdlmLnAXi0490804908eusmtrp2f; Mon, 20 Jan 2025 17:21:23 +0000 (GMT) X-AuditID: cbfec7f2-b09c370000005155-01-678e86131473 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 9A.C8.19920.3168E876; Mon, 20 Jan 2025 17:21:23 +0000 (GMT) Received: from AMDC4942.home (unknown [106.210.136.40]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20250120172121eusmtip11cb0a66c108a17251b163a3a6dd5443a~cdlk2OBOf1307113071eusmtip1O; Mon, 20 Jan 2025 17:21:21 +0000 (GMT) From: Michal Wilczynski To: mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, drew@pdp7.com, guoren@kernel.org, wefu@redhat.com, jassisinghbrar@gmail.com, paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, frank.binns@imgtec.com, matt.coster@imgtec.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, ulf.hansson@linaro.org, jszhang@kernel.org, p.zabel@pengutronix.de, m.szyprowski@samsung.com Cc: linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, dri-devel@lists.freedesktop.org, linux-pm@vger.kernel.org, Michal Wilczynski Subject: [RFC v3 03/18] dt-bindings: firmware: thead,th1520: Add support for firmware node Date: Mon, 20 Jan 2025 18:20:56 +0100 Message-Id: <20250120172111.3492708-4-m.wilczynski@samsung.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250120172111.3492708-1-m.wilczynski@samsung.com> M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JTiYlUR4RT/0pAvxpiRWVqUW5ccXleak Fh9iNAU6eyKzlGhyPjC95ZXEG5oZmBqamFkamFqaGSuJ87pdPp8mJJCeWJKanZpakFoE08fE wSnVwDTNfx9P2qmM1Yu3tjx5VhPSt/n98tbuQx/q+u4VTm1r9gtPmherqH/J/uyznR++H87r X3dBUPr7Xgduzrtsn1UZr3zamzi9Wrzv5dLUz1+2tVoXKt2+OWXjztU9mX/9JeZc4UswOJg3 lfVehNiFib/217GGXr4qlHd0UqJTrOLfoKPHbjf+3LlX8Sajpa30pxv/SgKup6w7saLUZc2L jvP/WNIsjDnD+9t/XPLwuHW8Qa8kNbhwxr7C2Hgrk5QTN14VXDzx4O2LreExPTHF05qn+HqW ll+f62njWRpZZtLAo1Ln2Sk8M7clyelT070+qal1VQWHbobeV5vR8iS0+qFEvde9qE4TA/9d Ku8tWpRYijMSDbWYi4oTATFqopu3AwAA X-CMS-MailID: 20250120172123eucas1p13564bf2d07000506caf44cf55bda7fd9 X-Msg-Generator: CA X-RootMTR: 20250120172123eucas1p13564bf2d07000506caf44cf55bda7fd9 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20250120172123eucas1p13564bf2d07000506caf44cf55bda7fd9 References: <20250120172111.3492708-1-m.wilczynski@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250120_092127_860096_4C0006C5 X-CRM114-Status: GOOD ( 17.22 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org The kernel communicates with the E902 core through the mailbox transport using AON firmware protocol. Add dt-bindings to document it the dt node. Signed-off-by: Michal Wilczynski --- .../bindings/firmware/thead,th1520-aon.yaml | 53 +++++++++++++++++++ MAINTAINERS | 2 + .../dt-bindings/firmware/thead,th1520-aon.h | 18 +++++++ 3 files changed, 73 insertions(+) create mode 100644 Documentation/devicetree/bindings/firmware/thead,th1520-aon.yaml create mode 100644 include/dt-bindings/firmware/thead,th1520-aon.h diff --git a/Documentation/devicetree/bindings/firmware/thead,th1520-aon.yaml b/Documentation/devicetree/bindings/firmware/thead,th1520-aon.yaml new file mode 100644 index 000000000000..bbc183200400 --- /dev/null +++ b/Documentation/devicetree/bindings/firmware/thead,th1520-aon.yaml @@ -0,0 +1,53 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/firmware/thead,th1520-aon.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: T-HEAD TH1520 AON (Always-On) Firmware + +description: | + The Always-On (AON) subsystem in the TH1520 SoC is responsible for managing + low-power states, system wakeup events, and power management tasks. It is + designed to operate independently in a dedicated power domain, allowing it to + remain functional even during the SoC's deep sleep states. + + At the heart of the AON subsystem is the E902, a low-power core that executes + firmware responsible for coordinating tasks such as power domain control, + clock management, and system wakeup signaling. Communication between the main + SoC and the AON subsystem is handled through a mailbox interface, which + enables message-based interactions with the AON firmware. + +maintainers: + - Michal Wilczynski + +properties: + compatible: + const: thead,th1520-aon + + mboxes: + maxItems: 1 + + mbox-names: + items: + - const: aon + + "#power-domain-cells": + const: 1 + +required: + - compatible + - mboxes + - mbox-names + - "#power-domain-cells" + +additionalProperties: false + +examples: + - | + aon: aon { + compatible = "thead,th1520-aon"; + mboxes = <&mbox_910t 1>; + mbox-names = "aon"; + #power-domain-cells = <1>; + }; diff --git a/MAINTAINERS b/MAINTAINERS index 0fa7c5728f1e..c56a1fb6e02a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -20184,6 +20184,7 @@ M: Fu Wei L: linux-riscv@lists.infradead.org S: Maintained T: git https://github.com/pdp7/linux.git +F: Documentation/devicetree/bindings/firmware/thead,th1520-aon.yaml F: Documentation/devicetree/bindings/clock/thead,th1520-clk-ap.yaml F: Documentation/devicetree/bindings/mailbox/thead,th1520-mbox.yaml F: Documentation/devicetree/bindings/net/thead,th1520-gmac.yaml @@ -20194,6 +20195,7 @@ F: drivers/mailbox/mailbox-th1520.c F: drivers/net/ethernet/stmicro/stmmac/dwmac-thead.c F: drivers/pinctrl/pinctrl-th1520.c F: include/dt-bindings/clock/thead,th1520-clk-ap.h +F: include/dt-bindings/firmware/thead,th1520-aon.h RNBD BLOCK DRIVERS M: Md. Haris Iqbal diff --git a/include/dt-bindings/firmware/thead,th1520-aon.h b/include/dt-bindings/firmware/thead,th1520-aon.h new file mode 100644 index 000000000000..7607522289f7 --- /dev/null +++ b/include/dt-bindings/firmware/thead,th1520-aon.h @@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +/* + * Copyright (C) 2022 Alibaba Group Holding Limited. + * Copyright (c) 2024 Samsung Electronics Co., Ltd. + * Author: Michal Wilczynski + */ + +#ifndef __DT_BINDINGS_AON_TH1520_H +#define __DT_BINDINGS_AON_TH1520_H + +#define TH1520_AON_VDEC_PD 1 +#define TH1520_AON_NPU_PD 2 +#define TH1520_AON_VENC_PD 3 +#define TH1520_AON_GPU_PD 4 +#define TH1520_AON_DSP0_PD 5 +#define TH1520_AON_DSP1_PD 6 + +#endif