From nobody Sat Oct 4 17:32:59 2025 Received: from sender4-op-o15.zoho.com (sender4-op-o15.zoho.com [136.143.188.15]) (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 3B3F525A659; Thu, 14 Aug 2025 07:08:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.188.15 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755155322; cv=pass; b=HUIEynSNsXun4MRXZCHRgVXB/T8bqrPAJ49sh82ATO8jdxqLsQmsrIn1MEmxyvsxtwyKh58W0YnBQhCoX0Tf82SgGBBFfQuMeLvpr0sML+IceAP0AyBO4AoPYjWoL61X59PWaeBs8K/wn81h0uEGPuWU8yM/vAkSkyp5BHKlRts= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755155322; c=relaxed/simple; bh=JANo5aeVALGyE7LQf4PAI0V7Ily5gGCmhjra45DYp+c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AUqoJgNhv3nhkHZXNn75MjPeMsIWdGDIrydiLsOmo3RZQVuDJnlADyRoEEukIpUehtdXN47lw+Euum5KsZcdmeiQC5HoAzYH7Z44+ELGtMpA700euaj/XNPKiTWy7ppLNGZXkXdCV/brC2SN3gDS7owfFRkvz8c3+4HZ24bczvk= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=icenowy.me; spf=pass smtp.mailfrom=icenowy.me; dkim=pass (2048-bit key) header.d=icenowy.me header.i=uwu@icenowy.me header.b=YuaaDFVL; arc=pass smtp.client-ip=136.143.188.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=icenowy.me Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=icenowy.me Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=icenowy.me header.i=uwu@icenowy.me header.b="YuaaDFVL" ARC-Seal: i=1; a=rsa-sha256; t=1755155305; cv=none; d=zohomail.com; s=zohoarc; b=ebyI3cNTWBJBqMMSOfACpbLrfiE+Oi8tZqwtCGkduWU2k1GUWhqjp/xKEUk963Yc1pcNeNJLmdaG01G4lzR6Q5K9hMYGEY4lwJNEBXq2A5Vz05glIiEMUScV2zl5KvsC1ZDGHs0GUb6g4s6Kd1/JnWPQvnNzNvk9p/a0e7jEpJ0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1755155305; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=sF/tSvNuuGT3ifsi/fwvjO4PyluzGm3UUcRWCF/Stgg=; b=hWxhDpX6kLJVUyrinxqdRI5ucfdPwzHFM39eJAN9ls0bhn+GTHpIh3Rf0Os0eP6oFowmFiZeYKSpYUqVs5fz58vjxF7TyvqzVDaQXe5VkQxWGGCN7If2JPQbSjblmKIJLtEWoaLvElzSPYad8KEl4FTW2sFXaRSihpCx3FjT7e4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=icenowy.me; spf=pass smtp.mailfrom=uwu@icenowy.me; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1755155305; s=zmail2; d=icenowy.me; i=uwu@icenowy.me; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-ID:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Message-Id:Reply-To; bh=sF/tSvNuuGT3ifsi/fwvjO4PyluzGm3UUcRWCF/Stgg=; b=YuaaDFVLocstJ2E2Hi+eK5zQiGRSHMRDzUMktCL7pVu3Tt4kCEQ8+O37NyC+shRg QeplN6qL2d3+EiRSmPN0DgsFCyf+Z0HtBXBaiYjn8mZfv/MaVdf7a8O0txzfigAQmnv eT5BWiXkF7aTbwzKm7As6lwKhODfLIPVRLjOwHiorNDztvKUL9XACh+iF2pA6ZXzlKW 4Jg3f4prsGhVgY8G2SyCNje1mDGxLLHrad3BPwK8M/Z6cyTecSBlOYeq+cQqoEFRJjB EMvj+dGytW1FFbgqborw8kO9eCHe/b6y8SoIt/ZiNO3VYKCbz6aG7w+djzie9xYUENj s4VytXJMCQ== Received: by mx.zohomail.com with SMTPS id 1755155303099302.5556760104745; Thu, 14 Aug 2025 00:08:23 -0700 (PDT) From: Icenowy Zheng To: Drew Fustini , Guo Ren , Fu Wei , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jassi Brar , Michal Wilczynski Cc: Han Gao , Inochi Amaoto , Yao Zi , linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Icenowy Zheng Subject: [RFC PATCH 1/4] dt-bindings: mailbox: thead,th1520-mbox: retrofit for other mailboxes Date: Thu, 14 Aug 2025 15:07:54 +0800 Message-ID: <20250814070757.2267325-2-uwu@icenowy.me> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250814070757.2267325-1-uwu@icenowy.me> References: <20250814070757.2267325-1-uwu@icenowy.me> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Content-Type: text/plain; charset="utf-8" The current binding of thead,th1520-mbox can only apply to the C910T mailbox (which has an ID of 0). Because of the weird mailbox register mapping practice for world seperation on TH1520, the binding needs some reword, in addition to add a property for mailbox ID, to describe other mailboxes. Update the binding, in order to make it suitable to describe other mailboxes. The example is also updated, with an addition of mbox_c910t label to show that the example describes this specfiic mailbox, mailbox ID added and the register window sizes updated to the values from the manual (previously the remote-icu0 register windows is declared to be overly small that it would never work). Signed-off-by: Icenowy Zheng --- .../bindings/mailbox/thead,th1520-mbox.yaml | 49 ++++++++++++++----- 1 file changed, 36 insertions(+), 13 deletions(-) diff --git a/Documentation/devicetree/bindings/mailbox/thead,th1520-mbox.ya= ml b/Documentation/devicetree/bindings/mailbox/thead,th1520-mbox.yaml index 0971fb97896ef..5a24d2e8a6a8c 100644 --- a/Documentation/devicetree/bindings/mailbox/thead,th1520-mbox.yaml +++ b/Documentation/devicetree/bindings/mailbox/thead,th1520-mbox.yaml @@ -12,6 +12,17 @@ description: through mailbox channels. It also allows one core to signal another proc= essor using interrupts via the Interrupt Controller Unit (ICU). =20 + The SoC is divided to two worlds, REE and TEE, although it's currently u= nknown + how to enable the seperation between worlds so the seperation does not e= xist + yet. However each mailbox is assigned to a certain world, and register w= indows + for mailboxes are assigned to different worlds too. In a certain world's + register windows for mailboxes, only mailboxes assigned to this world wi= ll + have the local ICU part mapped (in addition to the remote ICU part of the + other same-world mailbox), and mailboxes assigned to the other world have + only the coressponding remote ICU part mapped to this world. Two mailbox= es + (C910T and E902) are assigned to the TEE world and two mailboxes (C906 a= nd + C910R) are assigned to the REE world. + maintainers: - Michal Wilczynski =20 @@ -22,9 +33,9 @@ properties: clocks: items: - description: Clock for the local mailbox - - description: Clock for remote ICU 0 - - description: Clock for remote ICU 1 - - description: Clock for remote ICU 2 + - description: Clock for the other mailbox in the same world + - description: Clock for the first mailbox in the other world + - description: Clock for the second mailbox in the other world =20 clock-names: items: @@ -35,10 +46,14 @@ properties: =20 reg: items: - - description: Mailbox local base address - - description: Remote ICU 0 base address - - description: Remote ICU 1 base address - - description: Remote ICU 2 base address + - description: Base address of this specific mailbox + - description: Base address of the other mailbox in the same world + - description: + Base address of the register window in this world corresponding = to the + first other-world mailbox. + - description: + Base address of the register window in this world corresponding = to the + second other-world mailbox. =20 reg-names: items: @@ -50,10 +65,17 @@ properties: interrupts: maxItems: 1 =20 + thead,mbox-id: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + The ID of this specific mailbox that this device tree node describes= . For + compatibility with old device trees, if missing, the ID is default t= o 0, + the C910T mailbox. + '#mbox-cells': const: 1 description: - The one and only cell describes destination CPU ID. + The one and only cell describes destination mailbox ID. =20 required: - compatible @@ -72,12 +94,12 @@ examples: soc { #address-cells =3D <2>; #size-cells =3D <2>; - mailbox@ffffc38000 { + mbox_c910t: mailbox@ffffc38000 { compatible =3D "thead,th1520-mbox"; - reg =3D <0xff 0xffc38000 0x0 0x4000>, - <0xff 0xffc44000 0x0 0x1000>, - <0xff 0xffc4c000 0x0 0x1000>, - <0xff 0xffc54000 0x0 0x1000>; + reg =3D <0xff 0xffc38000 0x0 0x6000>, + <0xff 0xffc44000 0x0 0x6000>, + <0xff 0xffc4c000 0x0 0x2000>, + <0xff 0xffc54000 0x0 0x2000>; reg-names =3D "local", "remote-icu0", "remote-icu1", "remote-icu2"; clocks =3D <&clk CLK_MBOX0>, <&clk CLK_MBOX1>, <&clk CLK_MBOX2>, <&clk CLK_MBOX3>; @@ -85,5 +107,6 @@ examples: "clk-remote-icu2"; interrupts =3D <28>; #mbox-cells =3D <1>; + thead,mbox-id =3D <0>; }; }; --=20 2.50.1 From nobody Sat Oct 4 17:32:59 2025 Received: from sender4-op-o15.zoho.com (sender4-op-o15.zoho.com [136.143.188.15]) (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 ED9C02641D8; Thu, 14 Aug 2025 07:08:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.188.15 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755155329; cv=pass; b=PgUeapQLrS/a58kq7qCruRZ1gXNClu2AdJxBxiyWaHKuiet/KOL0qbkBQUb7yYUdu3tj+2Jz3cLNlhtCAZbnYfk2o7fYCKl3WxSZ4ofm9O+5W4Xvi1+PnvU1FFC4uo2/3ByJy1AAH4Ma3dgURBx2jpycriyPHLgCdy7PGFg/w9c= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755155329; c=relaxed/simple; bh=Kz73ZCQJvQhatb7PIU4bLRz7TI8Eyax0kN2pLgETAnQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=aqq1zqccfXo7zjRBBInrCRm7oiC28t77FAEwS/ed/KzhmSW3BkREACttJwvnCESLxYRgLu8XvYK1xJtJKnsn1MdyeVZZSMmiNYjhOY/NaQhkfbw5wZ4Mk5oe1Jzhbo35hGB68GmjUiGvlKwkErbIiaFXRiehMb0VNiJMJiOzEqg= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=icenowy.me; spf=pass smtp.mailfrom=icenowy.me; dkim=pass (2048-bit key) header.d=icenowy.me header.i=uwu@icenowy.me header.b=RnCy3Eia; arc=pass smtp.client-ip=136.143.188.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=icenowy.me Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=icenowy.me Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=icenowy.me header.i=uwu@icenowy.me header.b="RnCy3Eia" ARC-Seal: i=1; a=rsa-sha256; t=1755155315; cv=none; d=zohomail.com; s=zohoarc; b=fvq9TWrcRHeCodttT+NthzSiPn/hIusOH+1hA7/XQi+uve44lr7AyNVq7BaKcpopw9suuO15/BVQdhuH6DstlShjVBwzMqlcFh5o2C31Zq58JzvCZGByJqA49vYGgEkPGRFccRbTAhaoxwKHwjjvROFE91e+wZI9Wc0/c1Aiq2s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1755155315; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=tg01N9hAPr7V+WeucZx1wgz88In+H8Gy9RZ3eJJm1U0=; b=mWmNYIhHnzz7XR9Nz2f83Qv4lBE5i78j8ps6exmdmqSUDMDUPOzCuEoYsR/H+dD+YNVGezqyGrod1hBKfWAzyZ027vO23eEdrl6fc5OUuae3oOx/idr86iV/O+u52OEK7XEhcKoqkc3tQMKYy3hhWu3H0/C9eJ7IuJM+E4MYp6s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=icenowy.me; spf=pass smtp.mailfrom=uwu@icenowy.me; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1755155315; s=zmail2; d=icenowy.me; i=uwu@icenowy.me; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-ID:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Message-Id:Reply-To; bh=tg01N9hAPr7V+WeucZx1wgz88In+H8Gy9RZ3eJJm1U0=; b=RnCy3EiamG2MV5JSUkoSahSdwpH5PRxQtpddyWyTqBTN8y8yZv/EYof4FV6iBu38 /vFoWQZMq7vjdeB2SJ8TMMbrCyF8FGVaa266SLpgDS1poPAK6C0E+w4w/0ZMB6T7HHa OxjPJ6sZ7N8MxvbUQHj9LkzJ07yJP+dcy+HjGlqokUPE7SthlNv7B2L4YV/65tm+d41 yGKNacis+e3Nb4LNtfkvsm0EjMtYqS9bhv38bBUO5QbJkB4B3W3DmR3TXyX9aawCFKJ uX05/3SuxFy2jgb/62LdCNvpeSCXnnM5tBPU/+q1hbDZSIlJ6zKdwyAfoic5QzA4/Kr QOEbpJtUeQ== Received: by mx.zohomail.com with SMTPS id 1755155312649914.2180861068258; Thu, 14 Aug 2025 00:08:32 -0700 (PDT) From: Icenowy Zheng To: Drew Fustini , Guo Ren , Fu Wei , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jassi Brar , Michal Wilczynski Cc: Han Gao , Inochi Amaoto , Yao Zi , linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Icenowy Zheng Subject: [RFC PATCH 2/4] dt-bindings: firmware: thead,th1520-aon: add a mailbox name for SBI Date: Thu, 14 Aug 2025 15:07:55 +0800 Message-ID: <20250814070757.2267325-3-uwu@icenowy.me> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250814070757.2267325-1-uwu@icenowy.me> References: <20250814070757.2267325-1-uwu@icenowy.me> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Content-Type: text/plain; charset="utf-8" The SBI firmware might want to communicate to the AON firmware too. Add a mbox-name item to allow to allocate a mailbox for SBI. Signed-off-by: Icenowy Zheng --- .../devicetree/bindings/firmware/thead,th1520-aon.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/firmware/thead,th1520-aon.ya= ml b/Documentation/devicetree/bindings/firmware/thead,th1520-aon.yaml index 3365124c7fd47..555465f4aab4e 100644 --- a/Documentation/devicetree/bindings/firmware/thead,th1520-aon.yaml +++ b/Documentation/devicetree/bindings/firmware/thead,th1520-aon.yaml @@ -26,11 +26,12 @@ properties: const: thead,th1520-aon =20 mboxes: - maxItems: 1 + maxItems: 2 =20 mbox-names: items: - const: aon + - const: aon-for-sbi =20 resets: maxItems: 1 @@ -54,7 +55,7 @@ examples: - | aon: aon { compatible =3D "thead,th1520-aon"; - mboxes =3D <&mbox_910t 1>; - mbox-names =3D "aon"; + mboxes =3D <&mbox_910t 1>, <&mbox_910r 1>; + mbox-names =3D "aon", "aon-for-sbi"; #power-domain-cells =3D <1>; }; --=20 2.50.1 From nobody Sat Oct 4 17:32:59 2025 Received: from sender4-op-o15.zoho.com (sender4-op-o15.zoho.com [136.143.188.15]) (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 C1C6C25C816; Thu, 14 Aug 2025 07:09:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.188.15 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755155350; cv=pass; b=kOLTgDxno61SVoxtJXQvUvAaftLQScqc55GPI9iHrFah+RZshIKffGqx2d6e6NS8Bzi0dWQx/VG4ans4rjDstzp+dSJJfn18+FTEZwlfLgooeXtRbOVFNx5ZGwVEKUBE+R3yM31HHBGlpUFBJjPPzvfhlil/zhY02eOan3xo5UM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755155350; c=relaxed/simple; bh=l4A5+l0zqFI3oqSg8PWPxscJngjzxC0M6NvkzedayMg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DfBJlpWCwUgcPER2E3FnMy0vCWA0z7HpdthqEtynAqvAAqR0nH5GxeLXbcHFHthKh82ud46HM+q1lPkifi7/Ah+qsTETNGSsCdFx5G8z10GP2QuOn41c5f5mjiMQhoQFSR/nc+uW7BVD4kU+uTYkXc9jFnT0HBkK/tFagcLrINM= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=icenowy.me; spf=pass smtp.mailfrom=icenowy.me; dkim=pass (2048-bit key) header.d=icenowy.me header.i=uwu@icenowy.me header.b=HrOlw9ew; arc=pass smtp.client-ip=136.143.188.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=icenowy.me Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=icenowy.me Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=icenowy.me header.i=uwu@icenowy.me header.b="HrOlw9ew" ARC-Seal: i=1; a=rsa-sha256; t=1755155335; cv=none; d=zohomail.com; s=zohoarc; b=LWEDSFKbpMaUCdImQ1DRsFbnXyu06Lg9fu7akWCg7onqXewQ74/9DgaxASt5PQOaPoHOIMToe4LJNbRfOzUbxVQQJ70yHNrJoY7FD3q8CH1DPctJC9W6ZyPV4baMUpBLX2KnjXh1RJmae2Q5cuJ9wfHo1bbVfJ+P3v9X1kuphbU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1755155335; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=g+6aGbgSqL+o5xd1mrzWWr83B6zwR2FugBnE+jwf0eY=; b=hPQeqbPtBFIRsufu23wPmwVKIbxWupzgMcD71F+m73sxMjZoI7RUISRwCnVivIN/+3zzEs1yEY7CJ4yIZjfj9emYWiRm4tzIITzTYEA5p33LF262Te0+CZdOwlzitl7AiiAdqIKXEULucNeSf7YMBL/4W1mIJmDbQpFWi5URPEA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=icenowy.me; spf=pass smtp.mailfrom=uwu@icenowy.me; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1755155335; s=zmail2; d=icenowy.me; i=uwu@icenowy.me; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-ID:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Message-Id:Reply-To; bh=g+6aGbgSqL+o5xd1mrzWWr83B6zwR2FugBnE+jwf0eY=; b=HrOlw9ewXqzttP/pB71sOsPTXyeLNo7vOpmtR3/E4IVtQVa/qswS3x7tmVmXl5/M l05fAP2hlCWYY1q5xgNqqIUhVcrgtWgLvNmr1xzSYcA/MJDbNPkABNcQpXD045YQ/Ko 2Hxg4jDuJ+XGon2GypSGayZNv2SwR9J5MU6NshyNXftR1vqm2QGZdfL8aNBQn/ouXuo ynRAtoYJKCZ4IWxkjvDukmFzj/9sDMS5GX5d5qfyy/sNDV0eD/7Y8BS6FE3N6erRo87 pqbMZyvcyVCP0wUlQEn0NTVIeF5vK5xXhfwbERbZWHkfpMdV5/2kua5D7/fZha5nYGE niSiFGRtfw== Received: by mx.zohomail.com with SMTPS id 1755155332438337.2232936507686; Thu, 14 Aug 2025 00:08:52 -0700 (PDT) From: Icenowy Zheng To: Drew Fustini , Guo Ren , Fu Wei , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jassi Brar , Michal Wilczynski Cc: Han Gao , Inochi Amaoto , Yao Zi , linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Icenowy Zheng Subject: [RFC PATCH 3/4] riscv: dts: thead: th1520: add reserved node for C910R mailbox Date: Thu, 14 Aug 2025 15:07:56 +0800 Message-ID: <20250814070757.2267325-4-uwu@icenowy.me> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250814070757.2267325-1-uwu@icenowy.me> References: <20250814070757.2267325-1-uwu@icenowy.me> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Content-Type: text/plain; charset="utf-8" The OpenSBI firmware might want to communicate to E902 CPU too. As we have two mailboxes assigned to the C910 CPU, declare the other C910 mailbox as a "reserved" device for OpenSBI to use. Signed-off-by: Icenowy Zheng --- arch/riscv/boot/dts/thead/th1520.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/arch/riscv/boot/dts/thead/th1520.dtsi b/arch/riscv/boot/dts/th= ead/th1520.dtsi index 42724bf7e90e0..136ebe210b876 100644 --- a/arch/riscv/boot/dts/thead/th1520.dtsi +++ b/arch/riscv/boot/dts/thead/th1520.dtsi @@ -565,6 +565,22 @@ timer3: timer@ffefc3203c { status =3D "disabled"; }; =20 + mbox_910r: mbox@ffefc53000 { + compatible =3D "thead,th1520-mbox"; + reg =3D <0xff 0xefc50000 0x0 0x6000>, + <0xff 0xefc48000 0x0 0x6000>, + <0xff 0xefc3e000 0x0 0x2000>, + <0xff 0xefc46000 0x0 0x2000>; + reg-names =3D "local", "remote-icu0", "remote-icu1", "remote-icu2"; + clocks =3D <&clk CLK_MBOX3>, <&clk CLK_MBOX2>, <&clk CLK_MBOX0>, + <&clk CLK_MBOX1>; + clock-names =3D "clk-local", "clk-remote-icu0", "clk-remote-icu1", + "clk-remote-icu2"; + thead,mbox-id =3D <3>; + #mbox-cells =3D <1>; + status =3D "reserved"; + }; + uart4: serial@fff7f08000 { compatible =3D "snps,dw-apb-uart"; reg =3D <0xff 0xf7f08000 0x0 0x4000>; --=20 2.50.1 From nobody Sat Oct 4 17:32:59 2025 Received: from sender4-op-o15.zoho.com (sender4-op-o15.zoho.com [136.143.188.15]) (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 75F2825C816; Thu, 14 Aug 2025 07:09:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.188.15 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755155370; cv=pass; b=ZCTvt5wi2corzx48Dw7F7/6x86WizN36P1Izp3EF1isxq0dAR6YB35RT7AqFZUvpqCfCv2ynZjUOLhitcyh74m5rlQcsZfl6ogsw7WDXMup2SAZZzgaulO9JUD4muAxh0JVFcj9LZJY5aUy6xjLoBVbFcRIIIXlHKrI+JCTbB9c= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755155370; c=relaxed/simple; bh=tGJQwWPlYMBYIiPn3hm8qMNx+p/F+QNvF2jJny2cDfs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XN+SagmrpnfPvE3NWBrLv4kPaBmdScsHzeCPaK3yg56g57XPsqG3B5TD1wH5/RIBBe2z/50+VYzKD1b9g8g7RzIUVac5vqtZPlhSbCOn+OX+dauEqFDAKKOHFwkSipK7/vVuxXb3f5NP1ZHlIIMUD6ccvkiYWjqfLWVFsrgpne0= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=icenowy.me; spf=pass smtp.mailfrom=icenowy.me; dkim=pass (2048-bit key) header.d=icenowy.me header.i=uwu@icenowy.me header.b=eVPArtS4; arc=pass smtp.client-ip=136.143.188.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=icenowy.me Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=icenowy.me Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=icenowy.me header.i=uwu@icenowy.me header.b="eVPArtS4" ARC-Seal: i=1; a=rsa-sha256; t=1755155349; cv=none; d=zohomail.com; s=zohoarc; b=CGBpP2W8+XyP+ijwC5mVu0sCt/wY6l1nkGT89S//8IAneMCIYxkSEQ+1pt3ogTFm15i3yAwCssCMvRCzyv9Gzhp2tjOQ2ephKg0bMVSabyf7ZaOKX3mtS/6uo3yMpbLFVKWZSSBcJ9ia1Kcm9vLxH8FRnlezU8cCXS5N+BkefdE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1755155349; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=ovEpVAobaOr5oSBqbEFTxrzxetp69gYJsDnRp3Z4kbc=; b=YusffWqmjwbF8xra1OyH9QFNBqY2kNfq4IKnhr7VRyw7R7tjSXmpCzC11L90pKdFmToJJr8GsStcnXziLwJSLio/6mvGEAV/s8TCz7j7Fn2oQzFXP7O1wt4g9mjaUR8zRnufPVfvukQVnYEsZ6Bk1s4onWWwwO+JiikT8s5a2QM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=icenowy.me; spf=pass smtp.mailfrom=uwu@icenowy.me; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1755155349; s=zmail2; d=icenowy.me; i=uwu@icenowy.me; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-ID:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Message-Id:Reply-To; bh=ovEpVAobaOr5oSBqbEFTxrzxetp69gYJsDnRp3Z4kbc=; b=eVPArtS4raaE+ZdXltwOJwjfHIFRpXne6G8ci5hUeEcWGtb2BBoysE3JyxGaWDFy w8WxC+DynbcWgkbS9dcQCE7dXLdCybNncVTB+18cQ7WmoAXDF1TWLqWppnYOTHYlXOy +lNX1USHsX83k6e9SqulDArMtFSDe387sNMgf/vQft0s5NtKvGwKH7lBp2HTS3PCgvG w6+MlRE0JBKUanjSHDMYwntqF0HE/uDDsWSegyJWtXU8n8nlG4nbP5+HoHbwf5Z3LXa yfa9Po7eLkda7x17hX8DlNrOnxzhT9pZJBWnFGyDpCvAQC5dfWmkswYFhI7VU5q4j6r 1McF2xJ7aA== Received: by mx.zohomail.com with SMTPS id 1755155346042254.80641025392765; Thu, 14 Aug 2025 00:09:06 -0700 (PDT) From: Icenowy Zheng To: Drew Fustini , Guo Ren , Fu Wei , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jassi Brar , Michal Wilczynski Cc: Han Gao , Inochi Amaoto , Yao Zi , linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Icenowy Zheng Subject: [RFC PATCH 4/4] riscv: dts: thead: th1520: add mailbox channel for SBI-to-AON comm Date: Thu, 14 Aug 2025 15:07:57 +0800 Message-ID: <20250814070757.2267325-5-uwu@icenowy.me> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250814070757.2267325-1-uwu@icenowy.me> References: <20250814070757.2267325-1-uwu@icenowy.me> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Content-Type: text/plain; charset="utf-8" Add a mailbox channel declaration to the AON firmware node to describe the mailbox channel assigned to the SBI firmware to communicate with AON. Signed-off-by: Icenowy Zheng --- arch/riscv/boot/dts/thead/th1520.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/riscv/boot/dts/thead/th1520.dtsi b/arch/riscv/boot/dts/th= ead/th1520.dtsi index 136ebe210b876..6e5e0223d0c16 100644 --- a/arch/riscv/boot/dts/thead/th1520.dtsi +++ b/arch/riscv/boot/dts/thead/th1520.dtsi @@ -233,8 +233,8 @@ stmmac_axi_config: stmmac-axi-config { =20 aon: aon { compatible =3D "thead,th1520-aon"; - mboxes =3D <&mbox_910t 1>; - mbox-names =3D "aon"; + mboxes =3D <&mbox_910t 1>, <&mbox_910r 1>; + mbox-names =3D "aon", "aon-for-sbi"; resets =3D <&rst TH1520_RESET_ID_GPU_CLKGEN>; reset-names =3D "gpu-clkgen"; #power-domain-cells =3D <1>; --=20 2.50.1