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 07596EB64D9 for ; Tue, 4 Jul 2023 16:10:30 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7A81585E44; Tue, 4 Jul 2023 18:10:28 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.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=gmail.com header.i=@gmail.com header.b="rnpwYlGe"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8E07584775; Tue, 4 Jul 2023 18:10:27 +0200 (CEST) Received: from mail-ot1-x335.google.com (mail-ot1-x335.google.com [IPv6:2607:f8b0: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 2E11184782 for ; Tue, 4 Jul 2023 18:10:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=festevam@gmail.com Received: by mail-ot1-x335.google.com with SMTP id 46e09a7af769-6b879511707so729174a34.0 for ; Tue, 04 Jul 2023 09:10:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688487024; x=1691079024; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=6ZyosEExEwlfCGNkEPr35X2CRUqmUbUU3oWHSCw5rBY=; b=rnpwYlGe0QNQazGaVYxQQyrz/+4LWMYexy5CEjYQUASTFcR0xEK/2u/eGuYjNNDRhY nP4bpxxJZspauCkyJIoFBt5V5poVB0ZWcdF7tZINa+Z3+5XMevobspSJrAebKx62BajV bCetgylXMzuSnmeZKMmbgALGxX2+a+Qv3tbNpPcB2wqZ33FJs4vp2qbNcZHTj79pZC2H B9SdCeyP8Ce5P+IhNu3NaZLFW9tRm4E9rgzx7Mzo9xXnx5Ir9kfYSSWaTUOf/MeVsGFf 2JMEVVd2Z0X6tQOJBdbh3g8AOW4EaML0nmXTZiXdXVUPcnImLg/3dcJBu2U+pf9/UH97 Wk2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688487024; x=1691079024; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=6ZyosEExEwlfCGNkEPr35X2CRUqmUbUU3oWHSCw5rBY=; b=ToUmWjFdBboyXBPtkr3BoWiS/K9z513JHXne/EeVnpXNHTPp914Oeg7pQc+9Gtqt40 TCsRAVZJ3g0el+tyKgit9Rh7ft2x3mYSyegIc+KegRmnX1NInD9Sek7X+7fJU5wXTdIF xxqB3RcBKJNNZo1rzNAxsj6DnUyTcZ+HpH3+Lib0sy8LVYrC4QGFTbMaPkb84X/Olve/ NQxFKbVFBRFY+AjkC5EAnhtlf1dmyGyUHjhryO4oDcQ12h1kOopd4smahF+NI5WlEpxL uzdVrv69FlOuv5ca5PzWx9FMArGQB6Vsz0c+yM8/RSvFod9LabsblugLUPrF+RK7d3mC 04Lw== X-Gm-Message-State: ABy/qLZICfqabja5ay7Z8pqirMi/Fil+JqJvJc5lLH1Borc1Rdcs19yw zLlyUmMz7pJImaGD8gSG1Uw= X-Google-Smtp-Source: APBJJlGjpJVmu25osOeq0siFtTcUJGq0J9zVqFQelm9o96+D7mV1w4fFnlAFeDyj8sqshfmROsTMbg== X-Received: by 2002:a05:6870:d61f:b0:1b3:8cfd:fecf with SMTP id a31-20020a056870d61f00b001b38cfdfecfmr7983558oaq.0.1688487023647; Tue, 04 Jul 2023 09:10:23 -0700 (PDT) Received: from fabio-Precision-3551.. ([2804:14c:485:4b61:63de:601b:ee1b:6e91]) by smtp.gmail.com with ESMTPSA id c4-20020a9d6c84000000b006af7580c84csm5018877otr.60.2023.07.04.09.10.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jul 2023 09:10:23 -0700 (PDT) From: Fabio Estevam To: trini@konsulko.com Cc: u-boot@lists.denx.de, marcel.ziswiler@toradex.com, francesco.dolcini@toradex.com, sbabic@denx.de, Fabio Estevam Subject: [PATCH] colibri-imx7: Call fdt_increase_size() Date: Tue, 4 Jul 2023 13:10:03 -0300 Message-Id: <20230704161003.1517154-1-festevam@gmail.com> X-Mailer: git-send-email 2.34.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: Fabio Estevam For changing the USB OTG node status from "okay" to "disabled" more space is needed, so call fdt_increase_size() to avoid the following error: ``` U-Boot 2023.07-rc5-0.0.0-devel+git.580eb31199be (Jun 27 2023 - 13:39:58 +0000) CPU: Freescale i.MX7S rev1.2 800 MHz (running at 792 MHz) CPU: Extended Commercial temperature grade (-20C to 105C) at 30C Reset cause: POR DRAM: initcall sequence 8786eafc failed at call 8781b351 (err=-3) ### ERROR ### Please RESET the board ### ``` Ideally, fdt_status_disabled() should call fdt_increase_size() internally, so that there would be no need for manually calling it in board code. Do it manually for now to fix the regression. Based on the code from board/CZ.NIC/turris_omnia/turris_omnia.c. Reported-by: Francesco Dolcini Signed-off-by: Fabio Estevam --- board/toradex/colibri_imx7/colibri_imx7.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/board/toradex/colibri_imx7/colibri_imx7.c b/board/toradex/colibri_imx7/colibri_imx7.c index 3e79ab93a982..78be17c3b550 100644 --- a/board/toradex/colibri_imx7/colibri_imx7.c +++ b/board/toradex/colibri_imx7/colibri_imx7.c @@ -311,10 +311,22 @@ int ft_board_setup(void *blob, struct bd_info *bd) #ifdef CONFIG_USB_EHCI_MX7 int board_fix_fdt(void *rw_fdt_blob) { + int ret; + /* i.MX 7Solo has only one single USB OTG1 but no USB host port */ if (is_cpu_type(MXC_CPU_MX7S)) { int offset = fdt_path_offset(rw_fdt_blob, "/soc/bus@30800000/usb@30b20000"); + /* + * We're changing from status = "okay" to status = "disabled". + * In this case we'll need more space, so increase the size + * a little bit. + */ + ret = fdt_increase_size(rw_fdt_blob, 32); + if (ret < 0) { + printf("Cannot increase FDT size: %d\n", ret); + return ret; + } return fdt_status_disabled(rw_fdt_blob, offset); } -- 2.34.1