From mboxrd@z Thu Jan 1 00:00:00 1970 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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 C7773C4361B for ; Wed, 16 Dec 2020 15:56:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9450D22283 for ; Wed, 16 Dec 2020 15:56:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726652AbgLPP4T (ORCPT ); Wed, 16 Dec 2020 10:56:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726574AbgLPP4T (ORCPT ); Wed, 16 Dec 2020 10:56:19 -0500 Received: from mail-qk1-x729.google.com (mail-qk1-x729.google.com [IPv6:2607:f8b0:4864:20::729]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F732C061794 for ; Wed, 16 Dec 2020 07:55:38 -0800 (PST) Received: by mail-qk1-x729.google.com with SMTP id z11so22918439qkj.7 for ; Wed, 16 Dec 2020 07:55:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7Lrr0F4DYTiqu5q7pa2WeMJbEO+sTjt6K5vXhRq26Lw=; b=ssigaWNbMLRE6xPkXPODGln3bD/p0Ti2op/Z+RZ8zwhLxxQcY1yRTnZljKZqHAjEkm QOmCRdEa0jq6enFzV+KSakNFQ+1VnSoPJT77gjhWOJzYRyKpY8yJR0Cepk2awciumUye lLL3NRZPQTTiGJxNaV2dyvgXPStX0xFYvSmrqkbOwRP26cAIhqeG0OQ79ryX//b2F0Ar i4hdIKBoIrXGW6znwbGLMQ2BywBQfsft/uFntTs+i/5/Sm6kF9HibOtzOS13QSShBcIG YuOOUdoBGXK8VP7DhrKJIK6vg9jWDxh5vzzT7VVXxDz6oxF7yQR/9h7BEkVHitJs46dq uuKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7Lrr0F4DYTiqu5q7pa2WeMJbEO+sTjt6K5vXhRq26Lw=; b=L7gmrgTTavCl88hdnFAcKGrv94wAV9TRY6bgbG/IgTNbl4iTVieRo+9u8LNKs3cROB Ygg45pv6UY/l6A/KZJsw+JDWFFvqWLPnnn+VL5rAKAVPdnpflmxVIXly8w3KL/C+8Osr ri3AvLVjl85a4WtYy4l1CeVGUCy0gnFFUR5nDWGAlWDLgcN2LYO9EbYSqCvMC4EcPeIZ 3cuBKbWniMmLbzioWW+jWqsjbRYTGO84avct8KO8TN6O3NQsDPTVM/Q6HHPMZS+QrEkf /wkRkFMdX7P/o/UoAZYr1nsCGS5/3FypRFF3Z66CA/aq+XU/I8K7C2MRwz5E35V/3mwH leaA== X-Gm-Message-State: AOAM533f872VXcLhsuBCB+I7rcwOhd3q5mX/FW4+kkaR+T7eXKFdOInE A4/xXER3c445o2/5A4N8f5t4Ouj+7EhSjp08PQ5sOw== X-Google-Smtp-Source: ABdhPJz8IdFwoMCUGVhbIBauOoQfDl7hiHRrTFY6xSHTSAEoIDWiwK5tREXU/yHC+b+0r0lBo/fmh4QuarzKRUZLY7A= X-Received: by 2002:a37:7487:: with SMTP id p129mr43538264qkc.306.1608134137648; Wed, 16 Dec 2020 07:55:37 -0800 (PST) MIME-Version: 1.0 References: <20201211142933.25784-1-grzegorz.jaszczyk@linaro.org> <20201211142933.25784-2-grzegorz.jaszczyk@linaro.org> <20201214225842.GA2537432@robh.at.kernel.org> In-Reply-To: <20201214225842.GA2537432@robh.at.kernel.org> From: Grzegorz Jaszczyk Date: Wed, 16 Dec 2020 16:55:26 +0100 Message-ID: Subject: Re: [PATCH 1/5] dt-bindings: remoteproc: Add PRU consumer bindings To: Rob Herring Cc: Ohad Ben Cohen , Bjorn Andersson , Mathieu Poirier , "Anna, Suman" , Santosh Shilimkar , linux-remoteproc@vger.kernel.org, Lee Jones , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, "Bajjuri, Praneeth" , Roger Quadros Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org Hi Rob, On Mon, 14 Dec 2020 at 23:58, Rob Herring wrote: > > On Fri, Dec 11, 2020 at 03:29:29PM +0100, Grzegorz Jaszczyk wrote: > > 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 > > --- > > .../bindings/remoteproc/ti,pru-consumer.yaml | 64 +++++++++++++++++++ > > 1 file changed, 64 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..2c5c5e2b6159 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/remoteproc/ti,pru-consumer.yaml > > @@ -0,0 +1,64 @@ > > +# 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: > > + prus: > > ti,prus Thank you - I will change and post v2 but with this I will run into issues when this binding will be referenced by some consumer YAML binding. Running dtbs_check in such case throws: ... k3-am654-base-board.dt.yaml: serial@28000: 'ti,prus' does not match any of the regexes: 'pinctrl-[0-9]+' In the same time if I will remove this property from that node I am getting: ... k3-am654-base-board.dt.yaml: serial@28000: 'ti,prus' is a required property as expected. Getting rid of the comma from this property name workarounds mentioned problem (which is not proper but allows me to correctly test this binding): e.g. s/ti,prus/ti-pruss/ or using the previous name without a comma. It seems to be an issue with dtbs_check itself which we will encounter in the future. Best regards, Grzegorz > > > + $ref: /schemas/types.yaml#/definitions/phandle-array > > + description: phandles to the PRU, RTU or Tx_PRU nodes used > > + > > + firmware-name: > > + $ref: /schemas/types.yaml#/definitions/string-array > > + 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 'prus' property > > + > > + ti,pruss-gp-mux-sel: > > + $ref: /schemas/types.yaml#/definitions/uint32-array > > + 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 '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 'prus' property, the default out-of-reset value (0) for the > > + PRU core is used. > > + > > +required: > > + - prus > > + > > +dependencies: > > + firmware-name: [ prus ] > > + ti,pruss-gp-mux-sel: [ prus ] > > + > > +additionalProperties: true > > + > > +examples: > > + - | > > + /* PRU application node example */ > > + pru-app { > > + prus = <&pru0>, <&pru1>; > > + firmware-name = "pruss-app-fw0", "pruss-app-fw1"; > > + ti,pruss-gp-mux-sel = <2>, <1>; > > + }; > > -- > > 2.29.0 > > From mboxrd@z Thu Jan 1 00:00:00 1970 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=-13.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 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 EECE3C4361B for ; Wed, 16 Dec 2020 15:56:59 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 A5BD122283 for ; Wed, 16 Dec 2020 15:56:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A5BD122283 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org 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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=3e50XKTqs5klfpivQNSAyXK+QMpHohTmfqKameHoWSE=; b=s3mb5e5tHHmMiTh+cgScnNxRY SVLpspPvrZxfDusCzyta5AvPscKFx4CHvoicE98AqY8XW4i7CVvBNys9DE2XrEeueX8PXlE32sb3u EcPliZjXwrlR68ywoOySGoOZIggrNMq8gQrZf2zkHz/KD7Ss58IfeL4UtkEWvGUeprlZhHzMQh+Tp 0GtcbG8mEL9W2xOjD1wbscLlSE1rcdJRGteq84JtLbz7tnV4ORXWtQ8qG3G/6xef8SQc7YKh6zvqA PBLjkgJ8L9IndnGbUF5XvoYb88aRMsAs1HmL4IABj1C29pYvZS/2p0LvHyqeTQ76HQZsi39PnwduD p+S7af+4A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kpZ9T-0005zE-So; Wed, 16 Dec 2020 15:55:43 +0000 Received: from mail-qk1-x734.google.com ([2607:f8b0:4864:20::734]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kpZ9R-0005yC-Eh for linux-arm-kernel@lists.infradead.org; Wed, 16 Dec 2020 15:55:43 +0000 Received: by mail-qk1-x734.google.com with SMTP id 143so22908858qke.10 for ; Wed, 16 Dec 2020 07:55:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7Lrr0F4DYTiqu5q7pa2WeMJbEO+sTjt6K5vXhRq26Lw=; b=ssigaWNbMLRE6xPkXPODGln3bD/p0Ti2op/Z+RZ8zwhLxxQcY1yRTnZljKZqHAjEkm QOmCRdEa0jq6enFzV+KSakNFQ+1VnSoPJT77gjhWOJzYRyKpY8yJR0Cepk2awciumUye lLL3NRZPQTTiGJxNaV2dyvgXPStX0xFYvSmrqkbOwRP26cAIhqeG0OQ79ryX//b2F0Ar i4hdIKBoIrXGW6znwbGLMQ2BywBQfsft/uFntTs+i/5/Sm6kF9HibOtzOS13QSShBcIG YuOOUdoBGXK8VP7DhrKJIK6vg9jWDxh5vzzT7VVXxDz6oxF7yQR/9h7BEkVHitJs46dq uuKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7Lrr0F4DYTiqu5q7pa2WeMJbEO+sTjt6K5vXhRq26Lw=; b=CARL3iBAPtfOUcIu83PusJLF/rz6W02oj8fzeXADL7IQc6md1kP8YX3wl+f9hF+7ch JxmMXzqxbPplOVJJaWJCg+V6EB7BaFmNazvDWuXmE1JwiA7moOvI0rYGJDIZgG2G3MUR MEF9BBurQMbYLKHsL+SuIJg3tFjN4SvaupDnJOltM3oBYn5HlRwgzSHuPLXRineiLiVD QyYMcaheFy/oG2Qsl3gCc3MT+eC5WXe7t+tVRP0QqtttuhDd1u+VrNHFHSlqfKje+eLu GsQ8UgicO7j+48zqqDmYyZoWzqPHl6CW+Qbs7Gf1G2jm34iVStcTwHN/UbxUUGQfP9LX CGAQ== X-Gm-Message-State: AOAM531Y+IzukDkcf+7iQfuNPfoCcT7R+ypNlDlGcaYnZJZvQqxlpAMC Z36qz2lkJja4mcNdAxadHSuR3q/6loQejdJwg0+qlQ== X-Google-Smtp-Source: ABdhPJz8IdFwoMCUGVhbIBauOoQfDl7hiHRrTFY6xSHTSAEoIDWiwK5tREXU/yHC+b+0r0lBo/fmh4QuarzKRUZLY7A= X-Received: by 2002:a37:7487:: with SMTP id p129mr43538264qkc.306.1608134137648; Wed, 16 Dec 2020 07:55:37 -0800 (PST) MIME-Version: 1.0 References: <20201211142933.25784-1-grzegorz.jaszczyk@linaro.org> <20201211142933.25784-2-grzegorz.jaszczyk@linaro.org> <20201214225842.GA2537432@robh.at.kernel.org> In-Reply-To: <20201214225842.GA2537432@robh.at.kernel.org> From: Grzegorz Jaszczyk Date: Wed, 16 Dec 2020 16:55:26 +0100 Message-ID: Subject: Re: [PATCH 1/5] dt-bindings: remoteproc: Add PRU consumer bindings To: Rob Herring X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201216_105541_812344_4B5F2EEF X-CRM114-Status: GOOD ( 31.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ohad Ben Cohen , devicetree@vger.kernel.org, linux-omap@vger.kernel.org, Mathieu Poirier , "Bajjuri, Praneeth" , linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Andersson , Santosh Shilimkar , Lee Jones , linux-arm-kernel@lists.infradead.org, Roger Quadros Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Rob, On Mon, 14 Dec 2020 at 23:58, Rob Herring wrote: > > On Fri, Dec 11, 2020 at 03:29:29PM +0100, Grzegorz Jaszczyk wrote: > > 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 > > --- > > .../bindings/remoteproc/ti,pru-consumer.yaml | 64 +++++++++++++++++++ > > 1 file changed, 64 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..2c5c5e2b6159 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/remoteproc/ti,pru-consumer.yaml > > @@ -0,0 +1,64 @@ > > +# 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: > > + prus: > > ti,prus Thank you - I will change and post v2 but with this I will run into issues when this binding will be referenced by some consumer YAML binding. Running dtbs_check in such case throws: ... k3-am654-base-board.dt.yaml: serial@28000: 'ti,prus' does not match any of the regexes: 'pinctrl-[0-9]+' In the same time if I will remove this property from that node I am getting: ... k3-am654-base-board.dt.yaml: serial@28000: 'ti,prus' is a required property as expected. Getting rid of the comma from this property name workarounds mentioned problem (which is not proper but allows me to correctly test this binding): e.g. s/ti,prus/ti-pruss/ or using the previous name without a comma. It seems to be an issue with dtbs_check itself which we will encounter in the future. Best regards, Grzegorz > > > + $ref: /schemas/types.yaml#/definitions/phandle-array > > + description: phandles to the PRU, RTU or Tx_PRU nodes used > > + > > + firmware-name: > > + $ref: /schemas/types.yaml#/definitions/string-array > > + 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 'prus' property > > + > > + ti,pruss-gp-mux-sel: > > + $ref: /schemas/types.yaml#/definitions/uint32-array > > + 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 '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 'prus' property, the default out-of-reset value (0) for the > > + PRU core is used. > > + > > +required: > > + - prus > > + > > +dependencies: > > + firmware-name: [ prus ] > > + ti,pruss-gp-mux-sel: [ prus ] > > + > > +additionalProperties: true > > + > > +examples: > > + - | > > + /* PRU application node example */ > > + pru-app { > > + prus = <&pru0>, <&pru1>; > > + firmware-name = "pruss-app-fw0", "pruss-app-fw1"; > > + ti,pruss-gp-mux-sel = <2>, <1>; > > + }; > > -- > > 2.29.0 > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel