From patchwork Mon Oct 31 07:37:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: MD Danish Anwar X-Patchwork-Id: 902 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2165564wru; Mon, 31 Oct 2022 00:40:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5NXKTo27BoIN1hNLyNSDdJfME7WbdNkacCYk22BV2FDGQwzYSkeXRsVbxC3O6UUeVKrwfG X-Received: by 2002:a05:6402:27c6:b0:461:e426:dc8b with SMTP id c6-20020a05640227c600b00461e426dc8bmr11961533ede.403.1667202057069; Mon, 31 Oct 2022 00:40:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667202057; cv=none; d=google.com; s=arc-20160816; b=TGso1O88Lw+LGZZrTvV+oON77EoPHyUL/JpeyzbgoijHn23dlWmcNQMzVD/9hDKgRn ohOR0EnpBTCaWVhPZ7HIY7Ef1YGcnG2+oxxDqm724UvT4h3f7bF6IDkjElfIQwcSPoPJ gd0yvjUhEOw8kITB22gHWfecKwISheKi2DjOCnApSzFTfVgYZwCECq6we7/1LpBJXu+x Nt1QifxHA+XrxP1oGSeaHn8/eWxXuXBIq978C0yxocpY+FSGHjHRb1ZonbVZ13rQ1WOd drd9gYyWM9rpV7trXP3cOBVa99KHmOa4SDhNA5/FohZiJ7xCQvbZ7aOOPA4eYdXvIzqn hVmA== 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=FMmTCnBDroUBUksIOE1zPfMTpovug+7RGbewpZqQFeA=; b=r3zwKECykd88K0Gl23QKtelAW3hmmJHaDy+AZg2eh8XL9wSOZgkNIv0lmgIgttlImY avQM50zAbV3fpdgp0ai5VBXibk2FyXrqvvtEXiU4DzmGI8dE89lVSOG0ldtDGyaJWRHy op7McmuO4l6gN3lJ4MPzg1jK9nT79nTrfQtES22N6/NMqEl5lFpkJQy1D7c4Np9yYkOW iMIDyxrnpwObmiaO8ib7d70H+eVx6gz28g2vbFjuUeqrXrEZ0J6Ht0D7wlktlknoxpEw chVrzl/ojhrQJ92pIZ8Y/INhIOZY1ggLV/nmpEWPBCCqdlvqNraRXzpmhIrWNww0aesl tneg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=LGAIIWU7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t8-20020a056402524800b0045d0660a039si8658082edd.316.2022.10.31.00.40.33; Mon, 31 Oct 2022 00:40:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=LGAIIWU7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S229663AbiJaHiU (ORCPT + 99 others); Mon, 31 Oct 2022 03:38:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229487AbiJaHiT (ORCPT ); Mon, 31 Oct 2022 03:38:19 -0400 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2402964E5; Mon, 31 Oct 2022 00:38:17 -0700 (PDT) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 29V7c5rg043993; Mon, 31 Oct 2022 02:38:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1667201885; bh=FMmTCnBDroUBUksIOE1zPfMTpovug+7RGbewpZqQFeA=; h=From:To:CC:Subject:Date; b=LGAIIWU75K4p5xqOXZa6efctluOpWTQduaL/hZInM3p948fCVB/5lKHvC9fQ9zrbu r60YCJRKXOxSjIkFpM2hzvmy/Kx3lK/VGmhbHQRi16YtZEwzBt2jtUPzqc/j2ivBBl 09WHpClvMkCr7aFNWzLztY6s9HkV5P5tOU+QEeJk= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 29V7c5mL032197 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 31 Oct 2022 02:38:05 -0500 Received: from DFLE115.ent.ti.com (10.64.6.36) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.6; Mon, 31 Oct 2022 02:38:05 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.6 via Frontend Transport; Mon, 31 Oct 2022 02:38:05 -0500 Received: from lelv0854.itg.ti.com (lelv0854.itg.ti.com [10.181.64.140]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 29V7c5EA053400; Mon, 31 Oct 2022 02:38:05 -0500 Received: from localhost (a0501179-pc.dhcp.ti.com [10.24.69.114]) by lelv0854.itg.ti.com (8.14.7/8.14.7) with ESMTP id 29V7c347012782; Mon, 31 Oct 2022 02:38:04 -0500 From: MD Danish Anwar To: Mathieu Poirier , Krzysztof Kozlowski , Rob Herring CC: Suman Anna , Roger Quadros , "Andrew F . Davis" , , , , , , , , MD Danish Anwar Subject: [PATCH v7 0/5] Introduce PRU remoteproc consumer API Date: Mon, 31 Oct 2022 13:07:56 +0530 Message-ID: <20221031073801.130541-1-danishanwar@ti.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748188064250415265?= X-GMAIL-MSGID: =?utf-8?q?1748188064250415265?= The Programmable Real-Time Unit and Industrial Communication Subsystem (PRU-ICSS or simply PRUSS) on various TI SoCs consists of dual 32-bit RISC cores (Programmable Real-Time Units, or PRUs) for program execution. There are 3 foundation components for PRUSS subsystem: the PRUSS platform driver, the PRUSS INTC driver and the PRUSS remoteproc driver. All were already merged and can be found under: 1) drivers/soc/ti/pruss.c Documentation/devicetree/bindings/soc/ti/ti,pruss.yaml 2) drivers/irqchip/irq-pruss-intc.c Documentation/devicetree/bindings/interrupt-controller/ti,pruss-intc.yaml 3) drivers/remoteproc/pru_rproc.c Documentation/devicetree/bindings/remoteproc/ti,pru-rproc.yaml The programmable nature of the PRUs provide flexibility to implement custom peripheral interfaces, fast real-time responses, or specialized data handling. Example of a PRU consumer drivers will be: - Software UART over PRUSS - PRU-ICSS Ethernet EMAC In order to make usage of common PRU resources and allow the consumer drivers to configure the PRU hardware for specific usage the PRU API is introduced. This is the v7 of the patch series [1]. This version of the patchset addresses the comments made on v6 [7] of the series. Two more patch series have been posted ([2] and [3]) that depends on this series, one has been posted to the soc/ti/ tree and another to the networking tree. All the 3 series including this one, has been sent as RFC [4] to get comments and to explain the dependencies. Changes from v6 to v7 : *) Removed example section from ti,pru-consumer.yaml as the full example included compatible property as well which is not introduced in this series thus creating dt check binding error. Removing the example section fixes the dt binding check error. The example section will be included in "ti,icssg-prueth.yaml" in the next version of series [3] *) Updated the commit message for patch 1/5 of this series to address Krzysztof's comment. Changes from v5 to v6 : *) Added rproc_get_by_phandle() in pru_rproc_get() *) Provided background of Ctable in the commit messege. *) Removed patch "" [6] (6th Patch of the previous version of this series) as it has dependency on series [2], thus creating a cyclic dependency. The patch [6] will be sent along with the next version of series [2]. [1] https://patchwork.kernel.org/project/linux-remoteproc/cover/20220603121520.13730-1-p-mohan@ti.com/ [2] https://lore.kernel.org/all/20220418123004.9332-1-p-mohan@ti.com/ [3] https://lore.kernel.org/all/20220531095108.21757-1-p-mohan@ti.com/ [4] https://patchwork.kernel.org/project/linux-remoteproc/cover/20220406094358.7895-1-p-mohan@ti.com/ [5] https://lore.kernel.org/all/20220607045650.4999-1-p-mohan@ti.com/ [6] https://lore.kernel.org/all/20220607045650.4999-7-p-mohan@ti.com/ [7] https://lore.kernel.org/all/20221012114429.2341215-1-danishanwar@ti.com/ Thanks and Regards, Md Danish Anwar Roger Quadros (1): remoteproc: pru: Add pru_rproc_set_ctable() function Suman Anna (2): dt-bindings: remoteproc: Add PRU consumer bindings remoteproc: pru: Make sysfs entries read-only for PRU client driven boots Tero Kristo (2): remoteproc: pru: Add APIs to get and put the PRU cores remoteproc: pru: Configure firmware based on client setup .../bindings/remoteproc/ti,pru-consumer.yaml | 60 +++++ drivers/remoteproc/pru_rproc.c | 237 +++++++++++++++++- include/linux/pruss.h | 78 ++++++ 3 files changed, 370 insertions(+), 5 deletions(-) create mode 100644 Documentation/devicetree/bindings/remoteproc/ti,pru-consumer.yaml create mode 100644 include/linux/pruss.h