From patchwork Wed Dec 15 15:55:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hector Martin X-Patchwork-Id: 12696287 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 791E3C433FE for ; Wed, 15 Dec 2021 16:00:53 +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:MIME-Version:References: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=rBk1MXaTwaODY6UhmrjbyEMMd/O9S59A97foOMDmryM=; b=fyQNCK4ISTmGMZ T9DCp5iRChR3Cw+/q/Q45BjIUDNpadLOI0TFEi8NZokzaDOQFbxa5CmNt+eDOo2q0ig/W6ETCDsrt vWAG6j9HlbNpvw3gIVWanR3sOnmSVwLT/w4m2CRCEn28CeHPZeyJFplwYF0dWW70SCddiMRoY6vYq P4kdVFAX/0G5BtJmS1sPIQGUTSFqtTBMnLsSDQGVjGJdKsIsww1Cl08OJoEvmk9V/aJuB48TuBzlN 1JEp6hr5yNg98s/WBC7wwUQSeLPhuRI8GCOFzTj2JCjMXTRvTpNQAiz4TklMXowPhfzj5yYZY0di5 FnaEcL/95CnD9IBo9H5g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxWe7-001UNz-Ia; Wed, 15 Dec 2021 15:56:47 +0000 Received: from marcansoft.com ([212.63.210.85] helo=mail.marcansoft.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxWdQ-001UB6-7N for linux-arm-kernel@lists.infradead.org; Wed, 15 Dec 2021 15:56:05 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: hector@marcansoft.com) by mail.marcansoft.com (Postfix) with ESMTPSA id 73E38421F5; Wed, 15 Dec 2021 15:55:59 +0000 (UTC) From: Hector Martin To: Sven Peter , Jassi Brar , Rob Herring Cc: Hector Martin , Alyssa Rosenzweig , Mark Kettenis , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v2 1/2] dt-bindings: mailbox: apple, mailbox: Add generic and t6000 compatibles Date: Thu, 16 Dec 2021 00:55:26 +0900 Message-Id: <20211215155527.36775-2-marcan@marcan.st> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211215155527.36775-1-marcan@marcan.st> References: <20211215155527.36775-1-marcan@marcan.st> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211215_075604_473737_69277227 X-CRM114-Status: GOOD ( 11.04 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Much as we've done with other blocks, let's introduce generic compatibles so drivers can bind to those and still work with future SoCs, as long as the hardware remains the same. Also go ahead and add compatibles for the new t600x SoCs (we group those as t6000). Note that no DTs instantiate devices with this binding yet. Reviewed-by: Mark Kettenis Signed-off-by: Hector Martin Reviewed-by: Sven Peter Reviewed-by: Rob Herring --- .../devicetree/bindings/mailbox/apple,mailbox.yaml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/mailbox/apple,mailbox.yaml b/Documentation/devicetree/bindings/mailbox/apple,mailbox.yaml index 2c1704b34e7a..e3d87239811c 100644 --- a/Documentation/devicetree/bindings/mailbox/apple,mailbox.yaml +++ b/Documentation/devicetree/bindings/mailbox/apple,mailbox.yaml @@ -27,14 +27,20 @@ properties: for example for the display controller, the system management controller and the NVMe coprocessor. items: - - const: apple,t8103-asc-mailbox + - enum: + - apple,t8103-asc-mailbox + - apple,t6000-asc-mailbox + - const: apple,asc-mailbox-v4 - description: M3 mailboxes are an older variant with a slightly different MMIO interface still found on the M1. It is used for the Thunderbolt co-processors. items: - - const: apple,t8103-m3-mailbox + - enum: + - apple,t8103-m3-mailbox + - apple,t6000-m3-mailbox + - const: apple,m3-mailbox-v2 reg: maxItems: 1 @@ -68,7 +74,7 @@ additionalProperties: false examples: - | mailbox@77408000 { - compatible = "apple,t8103-asc-mailbox"; + compatible = "apple,t8103-asc-mailbox", "apple,asc-mailbox-v4"; reg = <0x77408000 0x4000>; interrupts = <1 583 4>, <1 584 4>, <1 585 4>, <1 586 4>; interrupt-names = "send-empty", "send-not-empty", From patchwork Wed Dec 15 15:55:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hector Martin X-Patchwork-Id: 12696286 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 9900DC43219 for ; Wed, 15 Dec 2021 15:59:01 +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:MIME-Version:References: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=AF5ujeRunIOx1jaLOsRZwTQms4x7K2th/vRH+vsj3CY=; b=0AKOTeKYhIeIyZ g18fO4I7iv6chxhLe27+SydWGgntTZ2gc4MxRcJDELHmNohfQj7QBfIZYPQuZCgB0c686NQ7D/nMG fC8zZSZGruI8+GlWwxKaBJYKhGOGSIukiqOUgnbjZFvEBh5eTjJaJ5lzlmisNrbgr3/37Tk0jsyqZ tMjV72dix+9e7EUh2j1PzWIieAtCc7WnBBQfrWdYxDl00i1q/yObBIWTS/RkFYvAFWRfbTTg/Wa/c wCRGfrjNU7jlw8aH8uGbfRkrW4K1a9P/w2EF1IXcLX6QNq8ewn0l5pknQb1gjdd4KfxQSqaJxvPsy KY3fQnu7rw5qonCQTczQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxWen-001Ucn-2Q; Wed, 15 Dec 2021 15:57:29 +0000 Received: from marcansoft.com ([2a01:298:fe:f::2] helo=mail.marcansoft.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxWdT-001UCe-NX for linux-arm-kernel@lists.infradead.org; Wed, 15 Dec 2021 15:56:09 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: hector@marcansoft.com) by mail.marcansoft.com (Postfix) with ESMTPSA id 84F53424D0; Wed, 15 Dec 2021 15:56:02 +0000 (UTC) From: Hector Martin To: Sven Peter , Jassi Brar , Rob Herring Cc: Hector Martin , Alyssa Rosenzweig , Mark Kettenis , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v2 2/2] mailbox: apple: Bind to generic compatibles Date: Thu, 16 Dec 2021 00:55:27 +0900 Message-Id: <20211215155527.36775-3-marcan@marcan.st> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211215155527.36775-1-marcan@marcan.st> References: <20211215155527.36775-1-marcan@marcan.st> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211215_075607_996288_D4D69CD2 X-CRM114-Status: GOOD ( 11.49 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org As with other blocks, we intend to have drivers bind to generic compatibles as long as there are no SoC-specific quirks. This allows forward-compatibility with future SoCs. No upstream DTs instantiate this yet, so it's still safe to make this breaking change. Signed-off-by: Hector Martin Reviewed-by: Sven Peter --- drivers/mailbox/apple-mailbox.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mailbox/apple-mailbox.c b/drivers/mailbox/apple-mailbox.c index 72942002a54a..496c4951ccb1 100644 --- a/drivers/mailbox/apple-mailbox.c +++ b/drivers/mailbox/apple-mailbox.c @@ -364,8 +364,8 @@ static const struct apple_mbox_hw apple_mbox_m3_hw = { }; static const struct of_device_id apple_mbox_of_match[] = { - { .compatible = "apple,t8103-asc-mailbox", .data = &apple_mbox_asc_hw }, - { .compatible = "apple,t8103-m3-mailbox", .data = &apple_mbox_m3_hw }, + { .compatible = "apple,asc-mailbox-v4", .data = &apple_mbox_asc_hw }, + { .compatible = "apple,m3-mailbox-v2", .data = &apple_mbox_m3_hw }, {} }; MODULE_DEVICE_TABLE(of, apple_mbox_of_match);