Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp2286110imm; Sat, 23 Jun 2018 14:12:54 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKigk0A6oQ1GiFTVse7mPJkpkMyfU3WYCwD/NVo+1vZrTmzTwNqlsnkZcOgBXN1rYPEVa4E X-Received: by 2002:a62:1c43:: with SMTP id c64-v6mr7002303pfc.176.1529788374179; Sat, 23 Jun 2018 14:12:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529788374; cv=none; d=google.com; s=arc-20160816; b=QzTbwaKWFupvkijDgA5a1kNTdaezBlRsrYlVBCmDahkIk+m4K58Hl0RERmKP8I1+PR vfXRh/MZp+q3HX6+6OUnc705hv/3og7taWv9p/erXHyEEzsoSBn2wHa3ERczHpsaLnBJ it/weh/acF++2h0kd3nEogrAK6D5ZGhfiwnziwJ1xDFkkG/aKdRUoiJvIdEjCv6xdWTi pKw9WPWwiVSParwr6ayT8cVp8U63WA/NUolai/BoUtBAuNRm4DI8OJI4IdYAbd4+OA9Y Y9iX1DZhKUBJazoLR7h2TvCPUHKJreFl+KWgvm1uwLNzHTl3yxo//yHIhaD6fvGMAASv 8cPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=VGyOC0TYMY3vC4YSRzQwrMaNy8b4ebNqjFVPZDhRGvw=; b=iPnH7ClEe+PuJxWcpt2tkFwAOQFHquozrWoYdjKJmZgs2WLAn32RXt2NINzpcfY/Pw zyRGq2Y7RU3XpYZRDY2As5zm6wZka2PzM6bv1pynOp8ajf/XiLICLevLzErEsuGpn6LP xwJw/lIkLqEHkRrC5e4Gra2xvjSfxrrnYvVEFfQ3RNbnUYhoLWlk4G2SmhmdF6jB+8p/ 9XOlkMf/SI3/n5qFs744sCBZGFjTvAb3S5FnLD3QcR/xMuvw7TYUHm/ySPU/qH+LGw/W jOwmLIyfy0sGGm6Jw3DtvB1gX2lz3nvyd984WQUOnCNzR6bH/WGF+y0pn+de5Zab2/iU 6eDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=uyPh11y5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 63-v6si10121704pfx.61.2018.06.23.14.12.40; Sat, 23 Jun 2018 14:12:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=uyPh11y5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751721AbeFWVJ2 (ORCPT + 99 others); Sat, 23 Jun 2018 17:09:28 -0400 Received: from vern.gendns.com ([206.190.152.46]:36147 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751582AbeFWVJZ (ORCPT ); Sat, 23 Jun 2018 17:09:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lechnology.com; s=default; h=Message-Id:Date:Subject:Cc:To:From:Sender: Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=VGyOC0TYMY3vC4YSRzQwrMaNy8b4ebNqjFVPZDhRGvw=; b=uyPh11y5Gir7Ddv29nttzAN9u+ 5Y/yXhri8FXt7h4/pLViIEwM8+thitVFjJ3gPb9syAODniXJS9Sx3zvb+U6pNIrv1W8J5JjiukUHL qP9agQR/8MTgS7tmTqDLsj2dOifpbfWNZNc8dKx2/5rxhXSVl04lviXGLYespxM4kMdz5N9medSHS 2WewVg0wIp5GjjsiV1kQWoJqcAPO+/MvT6waghq6pSNXD5aVz4/JIZccKs5foAb9ZGIYUgdvbNIxl YG/1RjgvcpLUlAonI7/DqhVnrZPmvpe0dw7vtEK+EJlBA+Nrley7CLosVSDk3/TtPk+xg7CXFIsBK 6iqFUcjQ==; Received: from 108-198-5-147.lightspeed.okcbok.sbcglobal.net ([108.198.5.147]:51098 helo=freyr.lechnology.com) by vern.gendns.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1fWpmc-00CkwS-Na; Sat, 23 Jun 2018 17:09:22 -0400 From: David Lechner To: linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: David Lechner , Ohad Ben-Cohen , Bjorn Andersson , Rob Herring , Mark Rutland , =?UTF-8?q?Beno=C3=AEt=20Cousson?= , Tony Lindgren , Sekhar Nori , Kevin Hilman , linux-kernel@vger.kernel.org Subject: Date: Sat, 23 Jun 2018 16:08:02 -0500 Message-Id: <20180623210810.21232-1-david@lechnology.com> X-Mailer: git-send-email 2.17.1 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Date: Sat, 23 Jun 2018 15:43:59 -0500 Subject: [PATCH 0/8] New remoteproc driver for TI PRU This series adds a new remoteproc driver for the TI Programmable Runtime Unit (PRU) that is present in some TI Sitara processors. This code has been tested working on AM1808 (LEGO MINDSTORMS EV3) and AM3358 (BeagleBone Green). There are a couple of quirks that had to be worked around in order to get this working. The PRU units have multiple memory maps. Notably, both the instruction RAM and data RAM are at address 0x0. This caused the da_to_va callback to not work because the same address could refer to two different locations. To work around this, the first two patches add a "map" parameter to the da_to_va callbacks so that we have an extra bit of information to make this distinction. Also, on AM38xx we have to use pdata for accessing a reset since there is not a reset controller. There are several other devices doing this, so the seems the best way for now. For anyone else who would like to test, I used the rpmsg-client-sample driver. Just enable it in your kernel config. Then grab the appropriate firmware[1] and put in in /lib/firmware/. Use sysfs to start and stop the PRU: echo start > /sys/class/remoteproc/state echo stop > /sys/class/remoteproc/state [1]: firmware downloads: AM18XX: https://github.com/ev3dev/ev3dev-pru-firmware/releases/download/mainline-kernel-testing/AM18xx-PRU-rpmsg-client-sample.zip AM335X: https://github.com/ev3dev/ev3dev-pru-firmware/releases/download/mainline-kernel-testing/AM335x-PRU-rpmsg-client-sample.zip David Lechner (8): remoteproc: add map parameter to da_to_va remoteproc: add page lookup for TI PRU to ELF loader ARM: OMAP2+: add pdata quirks for PRUSS reset dt-bindings: add bindings for TI PRU as remoteproc remoteproc: new driver for TI PRU ARM: davinci_all_defconfig: enable PRU remoteproc module ARM: dts: da850: add node for PRUSS ARM: dts: am33xx: add node for PRU remoteproc .../bindings/remoteproc/ti_pru_rproc.txt | 51 ++ MAINTAINERS | 5 + arch/arm/boot/dts/am33xx.dtsi | 9 + arch/arm/boot/dts/da850.dtsi | 8 + arch/arm/configs/davinci_all_defconfig | 2 + arch/arm/mach-omap2/pdata-quirks.c | 9 + drivers/remoteproc/Kconfig | 7 + drivers/remoteproc/Makefile | 1 + drivers/remoteproc/imx_rproc.c | 2 +- drivers/remoteproc/keystone_remoteproc.c | 3 +- drivers/remoteproc/qcom_adsp_pil.c | 2 +- drivers/remoteproc/qcom_q6v5_pil.c | 2 +- drivers/remoteproc/qcom_wcnss.c | 2 +- drivers/remoteproc/remoteproc_core.c | 10 +- drivers/remoteproc/remoteproc_elf_loader.c | 117 +++- drivers/remoteproc/remoteproc_internal.h | 2 +- drivers/remoteproc/st_slim_rproc.c | 2 +- drivers/remoteproc/ti_pru_rproc.c | 660 ++++++++++++++++++ drivers/remoteproc/wkup_m3_rproc.c | 3 +- include/linux/platform_data/ti-pruss.h | 18 + include/linux/remoteproc.h | 2 +- include/uapi/linux/elf-em.h | 1 + 22 files changed, 899 insertions(+), 19 deletions(-) create mode 100644 Documentation/devicetree/bindings/remoteproc/ti_pru_rproc.txt create mode 100644 drivers/remoteproc/ti_pru_rproc.c create mode 100644 include/linux/platform_data/ti-pruss.h -- 2.17.1