From patchwork Fri Jun 3 12:15:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Puranjay Mohan X-Patchwork-Id: 12869016 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 0DE76C433EF for ; Fri, 3 Jun 2022 12:16:49 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: 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: List-Owner; bh=pwKlOjHagypktTLP0TVJmzm90Gc3fefxNIAuPmCI/ls=; b=06wxA2r+EIxeqq gYD+yZSWupfgcqLcd40f1Aq8lzQh9c7hjl0v85YcikzPQ00oa6vz6DS4poFw2nAK/dWiUyQQXCF4I fRtapNSdKMpOEJDLziONVWj2ra+mmXjrI/4o3En2cHK7Ztu1c6xMpdEL0aT+YoF/kVK2g1s1RwBGN rSWdpqdHLpAJCtR8zgXOjvvbmndsGMTd1Pzk6lJepVRBNahGkAjQ+ESIFbb6Hxb4F12FkGNq+Ijxh nA7fO/odbCgA//yPiY9KUmtEIl6FQ4153cozuN6XFV6aE3AWM/mIHnUrBsZNVvYqK9I/2/LEhxIae ZPJpHvBMfQovi1yh4Kfg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nx6DS-007Lfv-1D; Fri, 03 Jun 2022 12:15:46 +0000 Received: from lelv0143.ext.ti.com ([198.47.23.248]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nx6DF-007Lbv-D1 for linux-arm-kernel@lists.infradead.org; Fri, 03 Jun 2022 12:15:35 +0000 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 253CFP0Y122098; Fri, 3 Jun 2022 07:15:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1654258525; bh=YoWLvrq7QDqg9g9ZGyYPJAamjcdAAoFZffqn4aPenFg=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=gkFBTTssn8mmrsogpKBNe+ic50U8pELmBV/qLLwNR6CG3kIuZCVRm8u3OF/XZUMhU 39kZnydU0EeRRWAUJO6Yhqn6AEamaRW/U68XSEF6FrBNKNMTw5dcXFUAH7nYOgy4Q2 0HboNm2wcis0/jzAGgCy8UU2bc82RBHvRnAt1jxo= Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 253CFP3r097480 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 3 Jun 2022 07:15:25 -0500 Received: from DLEE100.ent.ti.com (157.170.170.30) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Fri, 3 Jun 2022 07:15:24 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14 via Frontend Transport; Fri, 3 Jun 2022 07:15:24 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 253CFNGU128924; Fri, 3 Jun 2022 07:15:24 -0500 From: Puranjay Mohan To: Subject: [PATCH v4 1/6] dt-bindings: remoteproc: Add PRU consumer bindings Date: Fri, 3 Jun 2022 17:45:15 +0530 Message-ID: <20220603121520.13730-2-p-mohan@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220603121520.13730-1-p-mohan@ti.com> References: <20220603121520.13730-1-p-mohan@ti.com> 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-20220603_051533_629241_C847D2A6 X-CRM114-Status: GOOD ( 17.98 ) 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: nm@ti.com, devicetree@vger.kernel.org, grygorii.strashko@ti.com, vigneshr@ti.com, mathieu.poirier@linaro.org, kishon@ti.com, linux-remoteproc@vger.kernel.org, bjorn.andersson@linaro.org, rogerq@kernel.org, krzysztof.kozlowski+dt@linaro.org, ssantosh@kernel.org, p-mohan@ti.com, robh@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 From: Suman Anna Add a YAML binding document for PRU consumers. The binding includes all the common properties that can be used by different PRU consumer or application nodes and supported by the PRU remoteproc driver. These are used to configure the PRU hardware for specific user applications. The application nodes themselves should define their own bindings. Co-developed-by: Tero Kristo Signed-off-by: Tero Kristo Signed-off-by: Suman Anna Co-developed-by: Grzegorz Jaszczyk Signed-off-by: Grzegorz Jaszczyk Signed-off-by: Puranjay Mohan Reviewed-by: Rob Herring --- V3->V4: * Addressed Rob's comments regarding max and min Items. * removed the dependencies tag as it was redundant. --- .../bindings/remoteproc/ti,pru-consumer.yaml | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 Documentation/devicetree/bindings/remoteproc/ti,pru-consumer.yaml diff --git a/Documentation/devicetree/bindings/remoteproc/ti,pru-consumer.yaml b/Documentation/devicetree/bindings/remoteproc/ti,pru-consumer.yaml new file mode 100644 index 000000000000..df384b44259b --- /dev/null +++ b/Documentation/devicetree/bindings/remoteproc/ti,pru-consumer.yaml @@ -0,0 +1,69 @@ +# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/remoteproc/ti,pru-consumer.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Common TI PRU Consumer Binding + +maintainers: + - Suman Anna + +description: | + A PRU application/consumer/user node typically uses one or more PRU device + nodes to implement a PRU application/functionality. Each application/client + node would need a reference to at least a PRU node, and optionally define + some properties needed for hardware/firmware configuration. The below + properties are a list of common properties supported by the PRU remoteproc + infrastructure. + + The application nodes shall define their own bindings like regular platform + devices, so below are in addition to each node's bindings. + +properties: + ti,prus: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: phandles to the PRU, RTU or Tx_PRU nodes used + minItems: 1 + maxItems: 6 + items: + maxItems: 1 + + firmware-name: + $ref: /schemas/types.yaml#/definitions/string-array + minItems: 1 + maxItems: 6 + description: | + firmwares for the PRU cores, the default firmware for the core from + the PRU node will be used if not provided. The firmware names should + correspond to the PRU cores listed in the 'ti,prus' property + + ti,pruss-gp-mux-sel: + $ref: /schemas/types.yaml#/definitions/uint32-array + minItems: 1 + maxItems: 6 + items: + enum: [0, 1, 2, 3, 4] + description: | + array of values for the GP_MUX_SEL under PRUSS_GPCFG register for a PRU. + This selects the internal muxing scheme for the PRU instance. Values + should correspond to the PRU cores listed in the 'ti,prus' property. The + GP_MUX_SEL setting is a per-slice setting (one setting for PRU0, RTU0, + and Tx_PRU0 on K3 SoCs). Use the same value for all cores within the + same slice in the associative array. If the array size is smaller than + the size of 'ti,prus' property, the default out-of-reset value (0) for the + PRU core is used. + +required: + - ti,prus + +additionalProperties: true + +examples: + - | + /* PRU application node example */ + pru-app { + ti,prus = <&pru0>, <&pru1>; + firmware-name = "pruss-app-fw0", "pruss-app-fw1"; + ti,pruss-gp-mux-sel = <2>, <1>; + };