Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp3300698pxb; Wed, 14 Apr 2021 02:04:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQAOCyzJO4A8FtRmg865C5MnVe8pl7KemN5ZFmJKo3F2qu+fIul/rrcG1rt7ugMGfktHEH X-Received: by 2002:a17:902:e80e:b029:e4:b2b8:e36e with SMTP id u14-20020a170902e80eb02900e4b2b8e36emr36788218plg.45.1618391091290; Wed, 14 Apr 2021 02:04:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618391091; cv=none; d=google.com; s=arc-20160816; b=pmweHdmwF4H5t4EsMNUp87fZKpmX1ssV37r6xx7mVzWtvzDzK7hZ6Wew1nPadcVJnf LNUK1O2uAUHua3fVGZ3NStJwU4H2ckcGauzeRSnYO5nkRr1kuhv/WQWDsOltmP1QlmIJ Tr00ebN9SQ1z+c65fbYlkzS5sAVErGjqpQwp7lKVW7U+ZkHGj0ff8UPKL7Jac9bOhtRB VcsW4G8uyKUW9jrn3nyrvfh4pd+OmPSNjgDgtdEnotrl2B12NFOK6U0uEWMFRKI6ZhH1 c01EnxuRupH3ziJrnz0QJexmsdTKQjOtEQggXpFC+z3Hq3xDMrtB5znr+fzRxy6qciLy uhRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=3Ieq6oJ7r3rnTVtz+R9XBx5g2B/1i20kpZjZYXNDCBs=; b=TOhVX3okDiGW0VShJTSncltq3YBCV/u9JoK8EcxKDx4xykI3Q9eA9+cExJg2cAyyBj TZ9sb2dsLCclRB3r4oDnUrq8WGFCZTPFhfxwxmgVMFu2J3hShxhaLFuxZcfArZ5aNPWo QL0dluLXUnSACLqpiaPOoI42AFz3UwtonejYln2nGxe4mFvOgbFGWihHZFpWU0t3BLfo q+BpvUheZZtumxNoKFZ9jDzx8xu+YG+viv3gWBymk7me0TnSbjQWWTeLHqQxcKXeHf4t Sm7qkyHsUHEzO8cowPajScCS/oPehaQcFP2k+7f4QDSoM5RLuNKZtXooBqWuJAEg0wE0 NulA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=REPIgVeF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a4si20290515pgc.377.2021.04.14.02.04.38; Wed, 14 Apr 2021 02:04:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=REPIgVeF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348674AbhDMWqC (ORCPT + 99 others); Tue, 13 Apr 2021 18:46:02 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:43974 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348605AbhDMWqB (ORCPT ); Tue, 13 Apr 2021 18:46:01 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 13DMjbQ8066593; Tue, 13 Apr 2021 17:45:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1618353937; bh=3Ieq6oJ7r3rnTVtz+R9XBx5g2B/1i20kpZjZYXNDCBs=; h=From:To:CC:Subject:Date; b=REPIgVeFMDd3OsKwm4CPm65TiCk0rXKeAJmvbw4kPO7+Xd3JvFmbcCHQg/O8fITrw nAC0JI+g2HN89HrDMUoH/EhLfiYgCQoX+KINggJOQA/jPGUPkjfEeLCKp1jHUdthTA +bhUAtSv3iQPvwgK/4G029vPlnw9a95RjvwWW/0Y= Received: from DLEE108.ent.ti.com (dlee108.ent.ti.com [157.170.170.38]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 13DMjb8u079074 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 13 Apr 2021 17:45:37 -0500 Received: from DLEE114.ent.ti.com (157.170.170.25) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Tue, 13 Apr 2021 17:45:36 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE114.ent.ti.com (157.170.170.25) 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; Tue, 13 Apr 2021 17:45:36 -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 13DMjaVk033192; Tue, 13 Apr 2021 17:45:36 -0500 From: Nishanth Menon To: Jassi Brar , Rob Herring CC: , , , , Nishanth Menon Subject: [PATCH V2] dt-bindings: mailbox: ti,secure-proxy: Convert to yaml Date: Tue, 13 Apr 2021 17:45:35 -0500 Message-ID: <20210413224535.30910-1-nm@ti.com> X-Mailer: git-send-email 2.31.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert the ti,secure-proxy 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 - Switched reg usage for address-cells and size-cells 1 - aligned with schema checks as well - included header in example for buildable example While at this, lets make sure to support upto 100 rx threads even though typically upto 1 threads is practically in use. 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 --- Changes since V1: (Thanks Suman for some offline comments) - Strengthened interrupt-names property to be on rails - More documentation (we dont want an information loss between txt and yaml) - Added a max interrupts of 100, which is a rather conservative limit on current devices, but who knows.. - Commit message updates - compatible is a simpler const. - interrupt-names are required property - makes no sense in not knowing which interrupts belong to which thread irqs. V1: https://lore.kernel.org/linux-arm-kernel/20210413171230.5872-1-nm@ti.com/ .../bindings/mailbox/ti,secure-proxy.txt | 50 ------------ .../bindings/mailbox/ti,secure-proxy.yaml | 79 +++++++++++++++++++ 2 files changed, 79 insertions(+), 50 deletions(-) delete mode 100644 Documentation/devicetree/bindings/mailbox/ti,secure-proxy.txt create mode 100644 Documentation/devicetree/bindings/mailbox/ti,secure-proxy.yaml diff --git a/Documentation/devicetree/bindings/mailbox/ti,secure-proxy.txt b/Documentation/devicetree/bindings/mailbox/ti,secure-proxy.txt deleted file mode 100644 index 6c9c7daf0f5c..000000000000 --- a/Documentation/devicetree/bindings/mailbox/ti,secure-proxy.txt +++ /dev/null @@ -1,50 +0,0 @@ -Texas Instruments' Secure Proxy -======================================== - -The Texas Instruments' secure proxy is a mailbox controller that has -configurable queues selectable at SoC(System on Chip) integration. The -Message manager is broken up into different address regions that are -called "threads" or "proxies" - each instance is unidirectional and is -instantiated at SoC integration level by system controller to indicate -receive or transmit path. - -Message Manager Device Node: -=========================== -Required properties: --------------------- -- compatible: Shall be "ti,am654-secure-proxy" -- reg-names target_data - Map the proxy data region - rt - Map the realtime status region - scfg - Map the configuration region -- reg: Contains the register map per reg-names. -- #mbox-cells Shall be 1 and shall refer to the transfer path - called thread. -- interrupt-names: Contains interrupt names matching the rx transfer path - for a given SoC. Receive interrupts shall be of the - format: "rx_". -- interrupts: Contains the interrupt information corresponding to - interrupt-names property. - -Example(AM654): ------------- - - secure_proxy: mailbox@32c00000 { - compatible = "ti,am654-secure-proxy"; - #mbox-cells = <1>; - reg-names = "target_data", "rt", "scfg"; - reg = <0x0 0x32c00000 0x0 0x100000>, - <0x0 0x32400000 0x0 0x100000>, - <0x0 0x32800000 0x0 0x100000>; - interrupt-names = "rx_011"; - interrupts = ; - }; - - dmsc: dmsc { - [...] - mbox-names = "rx", "tx"; - # RX Thread ID is 11 - # TX Thread ID is 13 - mboxes= <&secure_proxy 11>, - <&secure_proxy 13>; - [...] - }; diff --git a/Documentation/devicetree/bindings/mailbox/ti,secure-proxy.yaml b/Documentation/devicetree/bindings/mailbox/ti,secure-proxy.yaml new file mode 100644 index 000000000000..08a4837fdfcc --- /dev/null +++ b/Documentation/devicetree/bindings/mailbox/ti,secure-proxy.yaml @@ -0,0 +1,79 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mailbox/ti,secure-proxy.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Texas Instruments' Secure Proxy + +maintainers: + - Nishanth Menon + +description: | + The Texas Instruments' secure proxy is a mailbox controller that has + configurable queues selectable at SoC(System on Chip) integration. The + Message manager is broken up into different address regions that are + called "threads" or "proxies" - each instance is unidirectional and is + instantiated at SoC integration level by system controller to indicate + receive or transmit path. + +properties: + $nodename: + pattern: "^mailbox@[0-9a-f]+$" + + compatible: + const: ti,am654-secure-proxy + + "#mbox-cells": + const: 1 + description: + Contains the secure proxy thread ID used for the specific transfer path. + + reg-names: + items: + - const: target_data + - const: rt + - const: scfg + + reg: + minItems: 3 + + interrupt-names: + minItems: 1 + maxItems: 100 + items: + - pattern: "^rx_[0-9]{3}$" + description: + Contains the interrupt name information for the Rx interrupt path for + secure proxy thread in the form 'rx_'. + + interrupts: + minItems: 1 + maxItems: 100 + description: + Contains the interrupt information for the Rx interrupt path for secure + proxy. + +required: + - compatible + - reg-names + - reg + - interrupt-names + - interrupts + - "#mbox-cells" + +additionalProperties: false + +examples: + - | + #include + secure_proxy: mailbox@32c00000 { + compatible = "ti,am654-secure-proxy"; + #mbox-cells = <1>; + reg-names = "target_data", "rt", "scfg"; + reg = <0x32c00000 0x100000>, + <0x32400000 0x100000>, + <0x32800000 0x100000>; + interrupt-names = "rx_011"; + interrupts = ; + }; -- 2.31.0