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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 2B011C433F5 for ; Tue, 18 Jan 2022 10:13:49 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E143C83817; Tue, 18 Jan 2022 11:13:46 +0100 (CET) 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="eNHveA1U"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 403D6837F2; Tue, 18 Jan 2022 11:13:45 +0100 (CET) Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) (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 45FDC837D2 for ; Tue, 18 Jan 2022 11:13:39 +0100 (CET) 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-wm1-x335.google.com with SMTP id j5-20020a05600c1c0500b0034d2e956aadso3409412wms.4 for ; Tue, 18 Jan 2022 02:13:39 -0800 (PST) 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=BQNIK0Q4GYB2ifovp7l07vJmNaF3mp+tLmLY1/TkW7Q=; b=eNHveA1Upg7Uk2Uu+Dg6Z/nEBYwEq61v5DzPSGbAMSacV9rsqhGx7uzE3Rpi1124eh YK8JZRTBNzQPRP6p32vpFpUrFHqRpCc+v1O8FdYeuNMTGp+qRrjGRomtsDdVSJLy65E+ 27S8iUDK9TbpyWOagw5vgTdFkivPzXm+zGo+L8V9VA2xXcvoAFC2e1S0gmH4qy7BB1tO 4wxHmsDXKrWS+jU5My+4jrzsyU/LURK2qPUnPU1QkUp2qpRXoDmHVMtGV4p+7Bvq0plj 5fGuHLTXcHplofDEQ9xsH0/jIfOu2szhnTIbrKGTwD+sGoKcQuUZFTOvVM65G6aICs4M KdTw== 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=BQNIK0Q4GYB2ifovp7l07vJmNaF3mp+tLmLY1/TkW7Q=; b=l+AfC/OORVopcR3dyKwck/eXbYdnWN7ZU9iE5vhzGEEPeN1vLnVUc72org0/4uWUDu LTcZLw1x4XqTAY8pUmNAX2YsmPoZ9KR8fLvGU/wzAhTl9A0huQKnbCk8+OBT5H093Nei klRgEjOcXsogIw5TYO7lgeoTJEUMedqMixY1LVA3X8FxwPPvBuV491rq3g72oxmVm0Ra 2vVaL7dpjz94I024iwicgOlj+DXft4dPAISZtsaI2yBk4hZvHMQN2btrs3+qcSv8S20s 4mbJlEY5bwWKT29BurZaPeh4md+ivexU7IQKZ/4xWPspBKTII99O+YAfTcoRiYUowSow N8Eg== X-Gm-Message-State: AOAM530dcqdIoLT2FdkUu9pHe1KA1WHNdaPeFq2aFTBd9nTvjGkPBZkF 6lIbFjFAVAr1wYFYB5jl2J6t+OgjeZvfnw== X-Google-Smtp-Source: ABdhPJyli1YIEQIdH7tzBZQN0GazSjI1Kxbof0wF3DdtjXrm/3XNyMGP1JMoc3cj+d9r8htZRdqEOQ== X-Received: by 2002:a5d:5745:: with SMTP id q5mr2020226wrw.160.1642500818762; Tue, 18 Jan 2022 02:13:38 -0800 (PST) Received: from localhost.localdomain (203.247.120.78.rev.sfr.net. [78.120.247.203]) by smtp.googlemail.com with ESMTPSA id f16sm2213622wmg.48.2022.01.18.02.13.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jan 2022 02:13:38 -0800 (PST) From: Amjad Ouled-Ameur To: u-boot@lists.denx.de Cc: khilman@baylibre.com, Amjad Ouled-Ameur , "Andrew F. Davis" , Asherah Connor , Bin Meng , "Chia-Wei, Wang" , Green Wan , Igor Opaniuk , Keerthy , Leo Yu-Chi Liang , Lokesh Vutla , Michael Scott , Michal Simek , Murali Karicheri , Patrick Delaunay , Peng Fan , Roger Quadros , Ryan Chen , Simon Glass , Suman Anna , Tom Rini , Wasim Khan , Wolfgang Denk , Ye Li Subject: [PATCH v3 00/11] dra7: bring up and support IPU load/start Date: Tue, 18 Jan 2022 11:12:38 +0100 Message-Id: <20220118101249.87031-1-aouledameur@baylibre.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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 [1] - 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 [1], "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/QGUYSPRt 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 Changes in v3: - Add a new patch for dra7xx_evm to expand SPL_MULTI_DTB_FIT Changes in v2: - Add useful checks and remove redundant code. Amjad Ouled-Ameur (1): configs: dra7xx_evm: Increase the size of SPL_MULTI_DTB_FIT 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/dra7xx_evm_defconfig | 2 +- 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 | 534 ++++++++++++ drivers/reset/Kconfig | 6 + drivers/reset/Makefile | 1 + drivers/reset/reset-dra7.c | 97 +++ include/linux/bitmap.h | 26 + include/remoteproc.h | 384 ++++++++- 34 files changed, 2269 insertions(+), 18 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