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=-11.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 8BC17C433F5 for ; Thu, 23 Sep 2021 16:53:20 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7E94061214 for ; Thu, 23 Sep 2021 16:53:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7E94061214 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BE93C833CF; Thu, 23 Sep 2021 18:53:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20210112.gappssmtp.com header.i=@baylibre-com.20210112.gappssmtp.com header.b="2Mr+koKu"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8BC34833DA; Thu, 23 Sep 2021 18:47:21 +0200 (CEST) Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id CD447833CE for ; Thu, 23 Sep 2021 18:47:17 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=aouledameur@baylibre.com Received: by mail-ej1-x62d.google.com with SMTP id qq21so503750ejb.10 for ; Thu, 23 Sep 2021 09:47:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=feJ34GsjmGOC0Vwk3PWsh5sqbJMAHPgP2sSX0ilVQ9U=; b=2Mr+koKuVMQJMxixcFmcAUtU77g8Imydg7aUyFX7Zy01PtDJyuSUsN9W2j1XRr1fnQ Nc9Y7bFbL4oXNN60UvrszVO6txGMPEzT9vyG5miQViP4SppZH89W2ZW+8E6r+2z4sl2U dmfEd5eIbrjJDKw8eIM49dMZ6VNwhfaP3A/t1Bfi2RCAv+wMH03ENkVtpxbm/2M5cY3h lpUKqez2wkw+MQTzLmBkN6b+af5zUj5XaH9HgnDO0freilDR8NDlA+z5ZrUqRYxskaDX SxsxCd81VKs6QwD+FAW/BXo7/F7ooZpoMU4l3y0Ha2Wkt4FPqpM/CkTBXGwiMHabdKDL cmjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=feJ34GsjmGOC0Vwk3PWsh5sqbJMAHPgP2sSX0ilVQ9U=; b=KuizxDVdW9AcLURgmCHU03a6F7qCsgleFMX3zsUeH1DrVXoH/I9Pg/5eK3UduewU8x KToMRaF2oOng5W5fMmRgUevyFF/IieIt9rHgZTahdqgpvY+/6Bed4EpCrqubEimYa3pc zyD0EvAB0LKUEJ2BNbDug9O8Epn7BH+wcrmTjlSKC7u5GI7MoFFDWKsfPqPiWg7ahj7S j0PdT8WMgxD+FZRlNsIIZQLPUQsDlfUIey5z9DSQlsmxTO7zt17HqTkyEmoFUzPPHYmX JYNMoH6u7h+xhIptZsybTmIwDOLB9L5060T5t3X0ie7BQSVUvnzw/nbJhQAbLG/1XrYk V6ZA== X-Gm-Message-State: AOAM5331lzfk0FKD6NgEV7dRybrNdK74t4oOhfjH3caP+B6W0pM/dbl/ ynn8uiO0AMCUKFs8rERqb1UAbghaZFD75w== X-Google-Smtp-Source: ABdhPJysSfhkKodp/cESCHEw9pLs3girlcXIBlYRxfzDMW84Zuutvk7PcE/9G3Kj4zYCfgVxX9wl3g== X-Received: by 2002:a17:907:75ca:: with SMTP id jl10mr6256022ejc.302.1632415637343; Thu, 23 Sep 2021 09:47:17 -0700 (PDT) Received: from localhost.localdomain (203.247.120.78.rev.sfr.net. [78.120.247.203]) by smtp.googlemail.com with ESMTPSA id u4sm3323277ejc.19.2021.09.23.09.47.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Sep 2021 09:47:16 -0700 (PDT) From: Amjad Ouled-Ameur To: u-boot@lists.denx.de Cc: Amjad Ouled-Ameur , "Andrew F. Davis" , Andy Shevchenko , Asherah Connor , Aswath Govindraju , Bin Meng , "Chia-Wei, Wang" , Etienne Carriere , Faiz Abbas , Green Wan , Igor Opaniuk , Keerthy , Lokesh Vutla , Michal Simek , Murali Karicheri , Patrick Delaunay , Pratyush Yadav , Roger Quadros , Ryan Chen , Sean Anderson , Simon Glass , Suman Anna , Tero Kristo , Tom Rini , Wasim Khan , Ye Li , khilman@baylibre.com Subject: [PATCH 00/10] dra7: bring up and support IPU load/start Date: Thu, 23 Sep 2021 18:46:39 +0200 Message-Id: <20210923164649.214770-1-aouledameur@baylibre.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Thu, 23 Sep 2021 18:53:13 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean This patchset enables support for loading and starting IPU firmware, the following have been implemented: - Enable fs_loader compilation at SPL Level, that is necessary in order to load IPU firmware from /boot partition. - Define necessary related IPU dts nodes. - Add necessary drivers and helpers to bring up, load and start IPU firmware. The underlying patches are interdependent, therefore should be applied in the order they are numbered in this patchset. Tests: - Please find SPL, u-boot and kernel console logs in here [0] - At SPL stage, debug logs have been enabled to make sure that IPU1 and IPU2 are loaded and started properly. In fact, these two log messages are only displayed when the firmware has been loaded, and if no errors appear afterwards, it means that firmware started successfully as well: - Starting IPU1... - Starting IPU2... At U-boot stage, "rproc" command-line tool was used for the testing. In the logs [0], "rproc list" was run before and after IPU1 and IPU2 are initialized by "rproc init". The before run gave an empty list, while the after run listed successfully the two IPUs with their correct addresses: - 0 - Name:'ipu@58820000' type:'internal memory mapped' - 1 - Name:'ipu@55020000' type:'internal memory mapped' "rproc start" and "rproc stop" were also used for both IPU1 and IPU2, both were successful as no error logs were displayed. [0]: https://pastebin.com/puCZ5GSm These U-boot/SPL flags have been purposely enabled during tests to ensure IPU load/start work properly: - CONFIG_DM_RESET=y - CONFIG_RESET_DRA7=y - CONFIG_SPL_DM_RESET=y - CONFIG_FS_LOADER=y - CONFIG_SPL_FS_LOADER=y - CONFIG_SPL_DRIVERS_MISC_SUPPORT=y - CONFIG_REMOTEPROC_TI_IPU=y - CONFIG_SPL_REMOTEPROC=y - CONFIG_CMD_REMOTEPROC=y Keerthy (10): reset: dra7: Add a reset driver arm: mach-omap2: load/start remoteproc IPU1/IPU2 drivers: misc: Makefile: Enable fs_loader compilation at SPL Level linux: bitmap.h: Add find_next_zero_area function remoteproc: uclass: Add remoteproc resource handling helpers remoteproc: ipu: Add driver to bring up ipu dts: dra7-ipu-common-early-boot.dtsi: Add all the ipu early boot related nodes arm: dts: dra7: Add ipu and related nodes arm: dts: dra7*/am57xx-idk-evm-u-boot: Add ipu early boot DT changes dts: am57xx*: Add ipu early boot DT changes MAINTAINERS | 4 + .../dts/am57xx-beagle-x15-revb1-u-boot.dtsi | 7 + .../dts/am57xx-beagle-x15-revc-u-boot.dtsi | 7 + arch/arm/dts/am57xx-beagle-x15-u-boot.dtsi | 7 + arch/arm/dts/am57xx-cl-som-am57x-u-boot.dtsi | 7 + arch/arm/dts/am57xx-idk-common-u-boot.dtsi | 1 + arch/arm/dts/am57xx-sbc-am57x-u-boot.dtsi | 7 + arch/arm/dts/dra7-evm-u-boot.dtsi | 1 + arch/arm/dts/dra7-ipu-common-early-boot.dtsi | 113 +++ arch/arm/dts/dra7.dtsi | 45 +- arch/arm/dts/dra71-evm-u-boot.dtsi | 1 + arch/arm/dts/dra72-evm-revc-u-boot.dtsi | 1 + arch/arm/dts/dra76-evm-u-boot.dtsi | 1 + arch/arm/include/asm/arch-omap5/clock.h | 3 + arch/arm/include/asm/omap_common.h | 10 + arch/arm/mach-k3/common.c | 10 +- arch/arm/mach-omap2/boot-common.c | 95 +++ arch/arm/mach-omap2/clocks-common.c | 33 + arch/arm/mach-omap2/omap5/hw_data.c | 92 ++- arch/arm/mach-omap2/omap5/prcm-regs.c | 9 +- configs/j721e_evm_r5_defconfig | 1 + configs/j721e_hs_evm_r5_defconfig | 1 + drivers/misc/Kconfig | 9 + drivers/misc/Makefile | 2 +- drivers/remoteproc/Kconfig | 10 + drivers/remoteproc/Makefile | 1 + drivers/remoteproc/ipu_rproc.c | 759 ++++++++++++++++++ drivers/remoteproc/rproc-uclass.c | 562 +++++++++++++ drivers/reset/Kconfig | 6 + drivers/reset/Makefile | 1 + drivers/reset/reset-dra7.c | 97 +++ include/linux/bitmap.h | 26 + include/remoteproc.h | 384 ++++++++- 33 files changed, 2296 insertions(+), 17 deletions(-) create mode 100644 arch/arm/dts/am57xx-beagle-x15-revb1-u-boot.dtsi create mode 100644 arch/arm/dts/am57xx-beagle-x15-revc-u-boot.dtsi create mode 100644 arch/arm/dts/am57xx-beagle-x15-u-boot.dtsi create mode 100644 arch/arm/dts/am57xx-cl-som-am57x-u-boot.dtsi create mode 100644 arch/arm/dts/am57xx-sbc-am57x-u-boot.dtsi create mode 100644 arch/arm/dts/dra7-ipu-common-early-boot.dtsi create mode 100644 drivers/remoteproc/ipu_rproc.c create mode 100644 drivers/reset/reset-dra7.c -- 2.25.1