From patchwork Thu Apr 15 14:19:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 12205607 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0FDE1C433B4 for ; Thu, 15 Apr 2021 14:21:03 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5BBDA6113D for ; Thu, 15 Apr 2021 14:21:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5BBDA6113D Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=ti.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=rOvENmg09uGqev9oFTkEY1x3r855ijwZ4pbZI1YO5oQ=; b=Y216WOF4KR9oNt5iYwYrDnfXl6 y+ZkCw8JiRtzbREh3A++QDkHDKXmfui/pveJmpWMm1FYp9ruri2VcVvQCu+aTT/yJKmg8DFfadmoW dmKXoCDITtvNhUrhJA4JlO+cc0l2d0n7YMf0qLzpWG9JUaaGKtyM2lezRVHbCxEaHMazEihlppcqX rYPZ+p6wrTgWNmpCKPigELDqKTxBaqbebdWJsJYf+9fDEgfnsfPjEiDFG9057i4DfH4V1T9/H14zS kF4eQ8mD484F0FBWAOHFGX7BiLmZrmkYpibUYDYpwnRsQJCVucpFYw4WUsjf4b6D6el/XJSsRGXh8 AN57BbCQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lX2py-00GQ8Z-B2; Thu, 15 Apr 2021 14:19:18 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lX2pw-00GQ84-36 for linux-arm-kernel@desiato.infradead.org; Thu, 15 Apr 2021 14:19:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type: Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject:CC:To:From: Sender:Reply-To:Content-ID:Content-Description:In-Reply-To:References; bh=9+JIo8dGh10N/Eg2M52luFkO22/RrXwGwB/XpTEpCEg=; b=ihM3S+HiL5xxzoyd8FBEkNY0L7 q253dvP9Mj7YOzc4SZcA4/VBSUxcoLQ1qeBJoD0JgPo77RzAq41tNLx9TfYiJLnD8lo/qN6QICYMT XkTHF6hsvuYzMZqEmp/73h9lul0yJz5kMqXV452NflDBU4FkgeLSCjqu+DzJFsjVdyRIU6RxIu8kC qzH2wj1RgcNvX3E2+bo/g0Hyvd8W0OrSL70u8irlllookR8xGKi8q92vCBRtuDAWFLgrG6DJxxWCS bN+2HLzYKGO7Xu2D45iM3EydDuIZkYUhMRI/IFJUtb+dmBp174p+NAI9qoS3xPZCmkGRI5qGfRTZi S4Bu6n5A==; Received: from fllv0015.ext.ti.com ([198.47.19.141]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lX2ps-008e76-Pc for linux-arm-kernel@lists.infradead.org; Thu, 15 Apr 2021 14:19:14 +0000 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 13FEJB2Y083373; Thu, 15 Apr 2021 09:19:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1618496351; bh=9+JIo8dGh10N/Eg2M52luFkO22/RrXwGwB/XpTEpCEg=; h=From:To:CC:Subject:Date; b=Ly1yurVKAfODvugaArU3Dm4KZbAf66C6LCd5uZ6nN4OlJrRL4wDZXNn8PatO8idVG 6iqYjyAK9qCAe2jP14Ou1CJTmg72dRxLIXmNo9PIHwsV2PdBxygHs9immfrdkynIQ8 XVAlgIVdrGG2Llp4Z46EEMBcjP2/oJ3xvqraiVPU= Received: from DLEE106.ent.ti.com (dlee106.ent.ti.com [157.170.170.36]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 13FEJADP034375 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 15 Apr 2021 09:19:10 -0500 Received: from DLEE102.ent.ti.com (157.170.170.32) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Thu, 15 Apr 2021 09:19:10 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2 via Frontend Transport; Thu, 15 Apr 2021 09:19:10 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 13FEJA2p035823; Thu, 15 Apr 2021 09:19:10 -0500 From: Nishanth Menon To: Jassi Brar , Rob Herring Subject: [PATCH V2] dt-bindings: mailbox: ti, message-manager: Convert to json schema Date: Thu, 15 Apr 2021 09:19:09 -0500 Message-ID: <20210415141909.3013-1-nm@ti.com> X-Mailer: git-send-email 2.31.0 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210415_071912_937957_6976C75E X-CRM114-Status: GOOD ( 19.02 ) 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: , Cc: Nishanth Menon , devicetree@vger.kernel.org, lokeshvutla@ti.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Convert the ti,message-manager to yaml for better checks and documentation. Differences being mostly in the examples: - I've dropped the example usage of mailbox client, it is better done in tisci node definition - included header in example for buildable example NOTE: The following checkpatch warning is generated since we do include the header in the example, but this is a false positive warning. WARNING: DT binding docs and includes should be a separate patch. See: Documentation/devicetree/bindings/submitting-patches.rst Signed-off-by: Nishanth Menon Reviewed-by: Rob Herring --- Changes since v1: - Fixed title in yaml (not driver) - Commit message update to fix up a copy paste error (not secure-proxy). - Subject line rewording to indicate json schema rather than yaml - more inline with patches elsewhere. V1: https://lore.kernel.org/linux-arm-kernel/20210414002721.23638-1-nm@ti.com/ .../bindings/mailbox/ti,message-manager.txt | 50 ------------- .../bindings/mailbox/ti,message-manager.yaml | 75 +++++++++++++++++++ 2 files changed, 75 insertions(+), 50 deletions(-) delete mode 100644 Documentation/devicetree/bindings/mailbox/ti,message-manager.txt create mode 100644 Documentation/devicetree/bindings/mailbox/ti,message-manager.yaml diff --git a/Documentation/devicetree/bindings/mailbox/ti,message-manager.txt b/Documentation/devicetree/bindings/mailbox/ti,message-manager.txt deleted file mode 100644 index ebf0e3710cee..000000000000 --- a/Documentation/devicetree/bindings/mailbox/ti,message-manager.txt +++ /dev/null @@ -1,50 +0,0 @@ -Texas Instruments' Message Manager Driver -======================================== - -The Texas Instruments' Message Manager is a mailbox controller that has -configurable queues selectable at SoC(System on Chip) integration. The Message -manager is broken up into queues in different address regions that are called -"proxies" - each instance is unidirectional and is instantiated at SoC -integration level to indicate receive or transmit path. - -Message Manager Device Node: -=========================== -Required properties: --------------------- -- compatible: Shall be: "ti,k2g-message-manager" -- reg-names queue_proxy_region - Map the queue proxy region. - queue_state_debug_region - Map the queue state debug - region. -- reg: Contains the register map per reg-names. -- #mbox-cells Shall be 2. Contains the queue ID and proxy ID in that - order referring to the transfer path. -- interrupt-names: Contains interrupt names matching the rx transfer path - for a given SoC. Receive interrupts shall be of the - format: "rx_". - For ti,k2g-message-manager, this shall contain: - "rx_005", "rx_057" -- interrupts: Contains the interrupt information corresponding to - interrupt-names property. - -Example(K2G): ------------- - - msgmgr: msgmgr@2a00000 { - compatible = "ti,k2g-message-manager"; - #mbox-cells = <2>; - reg-names = "queue_proxy_region", "queue_state_debug_region"; - reg = <0x02a00000 0x400000>, <0x028c3400 0x400>; - interrupt-names = "rx_005", "rx_057"; - interrupts = , - ; - }; - - pmmc: pmmc { - [...] - mbox-names = "rx", "tx"; - # RX queue ID is 5, proxy ID is 2 - # TX queue ID is 0, proxy ID is 0 - mboxes= <&msgmgr 5 2>, - <&msgmgr 0 0>; - [...] - }; diff --git a/Documentation/devicetree/bindings/mailbox/ti,message-manager.yaml b/Documentation/devicetree/bindings/mailbox/ti,message-manager.yaml new file mode 100644 index 000000000000..1cbf9a75522e --- /dev/null +++ b/Documentation/devicetree/bindings/mailbox/ti,message-manager.yaml @@ -0,0 +1,75 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mailbox/ti,message-manager.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Texas Instruments' message manager node bindings + +maintainers: + - Nishanth Menon + +description: | + The Texas Instruments' Message Manager is a mailbox controller that has + configurable queues selectable at SoC(System on Chip) integration. The Message + manager is broken up into queues in different address regions that are called + "proxies" - each instance is unidirectional and is instantiated at SoC + integration level to indicate receive or transmit path. + +properties: + $nodename: + pattern: "^mailbox@[0-9a-f]+$" + + compatible: + const: ti,k2g-message-manager + + "#mbox-cells": + const: 2 + description: + Contains the queue ID and proxy ID in that order referring to the + transfer path. + + reg-names: + items: + - const: queue_proxy_region + - const: queue_state_debug_region + + reg: + minItems: 2 + + interrupt-names: + items: + - const: rx_005 + - const: rx_057 + description: + Contains interrupt names matching the Rx transfer path for a given SoC. + Receive interrupts shall be of the format "rx_". + + interrupts: + minItems: 2 + description: + Contains the interrupt information for the Rx interrupt paths for message + manager corresponding to the interrupt-names. + +required: + - compatible + - reg-names + - reg + - interrupt-names + - interrupts + - "#mbox-cells" + +additionalProperties: false + +examples: + - | + #include + msgmgr: mailbox@2a00000 { + compatible = "ti,k2g-message-manager"; + #mbox-cells = <2>; + reg-names = "queue_proxy_region", "queue_state_debug_region"; + reg = <0x02a00000 0x400000>, <0x028c3400 0x400>; + interrupt-names = "rx_005", "rx_057"; + interrupts = , + ; + };