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 37E7AC77B61 for ; Mon, 10 Apr 2023 14:16:21 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5E25C85D20; Mon, 10 Apr 2023 16:16:06 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="re14pGML"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 143D385D1E; Mon, 10 Apr 2023 16:16:00 +0200 (CEST) Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B7560856FA for ; Mon, 10 Apr 2023 16:15:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=n-francis@ti.com Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 33AEFs34096211; Mon, 10 Apr 2023 09:15:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1681136154; bh=hV8G7m285Z+9Y7Q2Po9m6EI+vYP/tDj06ZdWUNSbsRA=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=re14pGMLU3mrm8WJHYuQpRmZXn4Poe6l6zusB4mMziLMyo3Rhzqg+LD8BOWV14xa+ gOelSXZGZF8+ipPlLTa2rkUC+M0vBbPmwmS/Xn4UGjv1xdxcd8ImZ2oDob0vOq2zQ1 i5JHFDn6vtKs09ce4qgFSMqu8QBV6FYath3ZsCxc= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 33AEFsx6031053 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 10 Apr 2023 09:15:54 -0500 Received: from DFLE113.ent.ti.com (10.64.6.34) 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.16; Mon, 10 Apr 2023 09:15:53 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Mon, 10 Apr 2023 09:15:54 -0500 Received: from ula0497641.ent.ti.com (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 33AEFlKI004920; Mon, 10 Apr 2023 09:15:51 -0500 From: Neha Malcom Francis To: , , , CC: , , Subject: [PATCH 1/8] arm: mach-k3: j721e_init: initialize ESM support Date: Mon, 10 Apr 2023 19:45:39 +0530 Message-ID: <20230410141546.98922-2-n-francis@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230410141546.98922-1-n-francis@ti.com> References: <20230410141546.98922-1-n-francis@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 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: Tero Kristo Initialize both ESM and ESM_PMIC support if available for the board. If support is not available for either, a warning is printed out. Signed-off-by: Tero Kristo Signed-off-by: Gowtham Tammana Signed-off-by: Neha Malcom Francis --- arch/arm/mach-k3/j721e_init.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-k3/j721e_init.c b/arch/arm/mach-k3/j721e_init.c index 9cae3ac67e..b22530f39d 100644 --- a/arch/arm/mach-k3/j721e_init.c +++ b/arch/arm/mach-k3/j721e_init.c @@ -23,6 +23,7 @@ #include #include #include +#include "../../../board/ti/common/board_detect.h" #ifdef CONFIG_K3_LOAD_SYSFW struct fwl_data cbass_hc_cfg0_fwls[] = { @@ -189,7 +190,8 @@ void do_dt_magic(void) void board_init_f(ulong dummy) { -#if defined(CONFIG_K3_J721E_DDRSS) || defined(CONFIG_K3_LOAD_SYSFW) +#if defined(CONFIG_K3_J721E_DDRSS) || defined(CONFIG_K3_LOAD_SYSFW) || \ + defined(CONFIG_ESM_K3) || defined(CONFIG_ESM_PMIC) struct udevice *dev; int ret; #endif @@ -277,6 +279,25 @@ void board_init_f(ulong dummy) printf("AVS init failed: %d\n", ret); #endif +#ifdef CONFIG_ESM_K3 + if (board_ti_k3_is("J721EX-PM2-SOM")) { + ret = uclass_get_device_by_driver(UCLASS_MISC, + DM_DRIVER_GET(k3_esm), &dev); + if (ret) + printf("MISC init failed: %d\n", ret); + } +#endif + +#ifdef CONFIG_ESM_PMIC + if (board_ti_k3_is("J721EX-PM2-SOM")) { + ret = uclass_get_device_by_driver(UCLASS_MISC, + DM_DRIVER_GET(pmic_esm), + &dev); + if (ret) + printf("ESM PMIC init failed: %d\n", ret); + } +#endif + #if defined(CONFIG_K3_J721E_DDRSS) ret = uclass_get_device(UCLASS_RAM, 0, &dev); if (ret) -- 2.34.1