From patchwork Wed Apr 17 20:01:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Harvey X-Patchwork-Id: 1924745 X-Patchwork-Delegate: festevam@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VKWyh4Mlnz1yYB for ; Thu, 18 Apr 2024 06:02:04 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6A4CC884D0; Wed, 17 Apr 2024 22:02:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=gateworks.com 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 64D3E884D8; Wed, 17 Apr 2024 22:01:59 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from finn.localdomain (finn.gateworks.com [108.161.129.64]) (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 0CFF68847B for ; Wed, 17 Apr 2024 22:01:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=gateworks.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=tharvey@gateworks.com Received: from [68.189.91.139] (helo=tharvey.pdc.gateworks.com) by finn.localdomain with esmtp (Exim 4.95) (envelope-from ) id 1rxBTe-006Wfm-QH; Wed, 17 Apr 2024 20:01:54 +0000 From: Tim Harvey To: Fabio Estevam , u-boot@lists.denx.de Cc: Tim Harvey Subject: [PATCH] board: gateworks: venice: fix dt adjustment for gw73xx baseboard for imx8mp Date: Wed, 17 Apr 2024 13:01:53 -0700 Message-Id: <20240417200153.3748943-1-tharvey@gateworks.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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 The GW73xx baseboard needs a PCI dt adjustment for revC/D based on a change of the PCIe switch. Make sure we are only doing this for a pci based ethernet to avoid causing a boot hang when the ethernet1 alias points to eqos or fec. To know this is a pcie device ensure the alias begins with the pcie controller. Signed-off-by: Tim Harvey --- board/gateworks/venice/venice.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/board/gateworks/venice/venice.c b/board/gateworks/venice/venice.c index f54f1186b686..5b105d7659e4 100644 --- a/board/gateworks/venice/venice.c +++ b/board/gateworks/venice/venice.c @@ -230,6 +230,7 @@ uint mmc_get_env_part(struct mmc *mmc) int ft_board_setup(void *fdt, struct bd_info *bd) { const char *base_model = eeprom_get_baseboard_model(); + const char *path; char pcbrev; int off; @@ -238,10 +239,10 @@ int ft_board_setup(void *fdt, struct bd_info *bd) if (!strncmp(base_model, "GW73", 4)) { pcbrev = get_pcb_rev(base_model); + path = fdt_get_alias(fdt, "ethernet1"); - if (pcbrev > 'B' && pcbrev < 'E') { - printf("adjusting dt for %s\n", base_model); - + if (pcbrev > 'B' && pcbrev < 'E' && path && !strncmp(path, "/soc@0/pcie@", 12)) { + printf("adjusting %s pcie\n", base_model); /* * revC/D/E has PCIe 4-port switch which changes * ethernet1 PCIe GbE: