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 B8861EB64DC for ; Fri, 14 Jul 2023 15:23:22 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D69BC86D37; Fri, 14 Jul 2023 17:23:19 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=dolcini.it Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id E817786D88; Fri, 14 Jul 2023 17:23:17 +0200 (CEST) Received: from mail11.truemail.it (mail11.truemail.it [217.194.8.81]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 632EF86D23 for ; Fri, 14 Jul 2023 17:23:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=dolcini.it Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=francesco@dolcini.it Received: from francesco-nb.pivistrello.it (93-49-2-63.ip317.fastwebnet.it [93.49.2.63]) by mail11.truemail.it (Postfix) with ESMTPA id 6A1AF20A2E; Fri, 14 Jul 2023 17:23:14 +0200 (CEST) From: Francesco Dolcini To: u-boot@lists.denx.de, Tom Rini Cc: Francesco Dolcini , Vignesh Raghavendra , Andrew Davis , Wadim Egorov Subject: [PATCH v2 0/3] arm: mach-k3: am62: Add core number, gpu and pru autodetection FDT fixups Date: Fri, 14 Jul 2023 17:23:07 +0200 Message-Id: <20230714152310.30140-1-francesco@dolcini.it> 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.8 at phobos.denx.de X-Virus-Status: Clean From: Francesco Dolcini AM62x SoC is available in multiple variant: - CPU cores (Cortex-A) AM62x1 (1 core), AM62x2 (2 cores), AM62x4 (4 cores) - GPU AM625x with GPU, AM623x without GPU - PRU (Programmable RT unit) can be present or not on AM62x2/AM62x4 Remove the relevant FDT nodes by reading the actual configuration from the SoC registers, with that change is possible to have a single dts/dtb file handling the different variant at runtime. While removing GPU node and CPU nodes also the watchdog node in the same Module Domain is removed. A similar approach is implemented for example on i.MX8 and STM32MP1 SoC. Since we start using ft_system_setup on a SoC without msmc ram and fdt_fixup_msmc_ram function fails on those SoC (triggering a reset loop) the first commit fix it by calling that function only on specific SoC. v2: - Moved fdt common functions to to common_fdt.c and ft_system_setup function to specific SoC files (eg. am654_fdt.c) and compile them using relevant configuration - Add GPU and PRU fdt fixup v1: https://lore.kernel.org/all/20230712134730.30229-1-francesco@dolcini.it/ Emanuele Ghidoli (3): arm: k3: Fix ft_system_setup so it can be enabled on any SoC arm: mach-k3: am62: Add CTRLMMR_WKUP_JTAG_DEVICE_ID register definition arm: mach-k3: am62: Fixup CPU core, gpu and pru nodes in fdt arch/arm/mach-k3/Makefile | 7 ++ arch/arm/mach-k3/am625_fdt.c | 71 +++++++++++ arch/arm/mach-k3/am654_fdt.c | 12 ++ arch/arm/mach-k3/common.c | 91 -------------- arch/arm/mach-k3/common_fdt.c | 113 ++++++++++++++++++ arch/arm/mach-k3/common_fdt.h | 11 ++ arch/arm/mach-k3/include/mach/am62_hardware.h | 22 ++++ arch/arm/mach-k3/j721e_fdt.c | 12 ++ arch/arm/mach-k3/j721s2_fdt.c | 12 ++ 9 files changed, 260 insertions(+), 91 deletions(-) create mode 100644 arch/arm/mach-k3/am625_fdt.c create mode 100644 arch/arm/mach-k3/am654_fdt.c create mode 100644 arch/arm/mach-k3/common_fdt.c create mode 100644 arch/arm/mach-k3/common_fdt.h create mode 100644 arch/arm/mach-k3/j721e_fdt.c create mode 100644 arch/arm/mach-k3/j721s2_fdt.c -- 2.25.1