From patchwork Tue Oct 22 06:04:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 2000258 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=siemens.com header.i=jan.kiszka@siemens.com header.a=rsa-sha256 header.s=fm1 header.b=Rer3y7kk; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XXhTr2yXsz1xw0 for ; Tue, 22 Oct 2024 17:04:48 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 239C188F28; Tue, 22 Oct 2024 08:04:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=siemens.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; secure) header.d=siemens.com header.i=jan.kiszka@siemens.com header.b="Rer3y7kk"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E59CD88FA8; Tue, 22 Oct 2024 08:04:35 +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=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, SPF_HELO_PASS,SPF_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mta-64-228.siemens.flowmailer.net (mta-64-228.siemens.flowmailer.net [185.136.64.228]) (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 4430E88ECB for ; Tue, 22 Oct 2024 08:04:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=siemens.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jan.kiszka@siemens.com Received: by mta-64-228.siemens.flowmailer.net with ESMTPSA id 20241022060431a516bb2e1e4ca32ff7 for ; Tue, 22 Oct 2024 08:04:31 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=jan.kiszka@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc:References:In-Reply-To; bh=7w1mqQws2jHAteuxILou+N2K8bKbQWWcFJuN3eYmP/0=; b=Rer3y7kko512EEBZ3fN3z/pa9byz/8/oyhr1uv30CVziYbD0gDlA4bZO30H9JGmzqqry6w zhu/T8t+yWQX9sIl79UKOqWCgTflLq+cLQzOd9tPd3PQNRuGHisgxfJyUADQEkF5qEqGYijm fTnlI2vXINb1y2tmkULiOrot7CmDdBVGZHKzeRJ+9BYWt5L/Fg+vrCrTeCLwk8UvKChOt5MD IHxjkJWbMbALGh47bJAvjQO6oUiTt8hiqgFzAbbKijn3wkWgbK7x/n36Ge/xQA7pSbGjLr+D ZIuFFgR7P9dgKEIToNZum78dWRuYigXC/RA7YYUTElwkVXKtYoWwnVGA==; From: Jan Kiszka To: U-Boot Mailing List Cc: Bryan Brattlof , Nishanth Menon Subject: [PATCH v2 01/13] board: siemens: iot2050: Fix mistake in list of writable env vars Date: Tue, 22 Oct 2024 08:04:18 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-294854:519-21489:flowmailer 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: Jan Kiszka This prevented to set m2_manual_config - as evaluated by m2_connector_setup - under strict configurations for secure boot. Signed-off-by: Jan Kiszka --- include/configs/iot2050.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/configs/iot2050.h b/include/configs/iot2050.h index 94a9c767882..0f92e0d25dc 100644 --- a/include/configs/iot2050.h +++ b/include/configs/iot2050.h @@ -39,7 +39,7 @@ #define CFG_ENV_FLAGS_LIST_STATIC \ "board_uuid:sw,board_name:sw,board_serial:sw,board_a5e:sw," \ "mlfb:sw,fw_version:sw,seboot_version:sw," \ - "m2_manuel_config:sw," \ + "m2_manual_config:sw," \ "eth1addr:mw,eth2addr:mw,watchdog_timeout_ms:dw,boot_targets:sw" #endif From patchwork Tue Oct 22 06:04:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 2000260 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=siemens.com header.i=jan.kiszka@siemens.com header.a=rsa-sha256 header.s=fm1 header.b=XjWc1u5a; dkim-atps=neutral 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 4XXhVF0bGHz1xw0 for ; Tue, 22 Oct 2024 17:05:09 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E6C2988F8E; Tue, 22 Oct 2024 08:04:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=siemens.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; secure) header.d=siemens.com header.i=jan.kiszka@siemens.com header.b="XjWc1u5a"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4036E88FA9; Tue, 22 Oct 2024 08:04:36 +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=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, SPF_HELO_PASS,SPF_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mta-64-226.siemens.flowmailer.net (mta-64-226.siemens.flowmailer.net [185.136.64.226]) (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 986AE88F31 for ; Tue, 22 Oct 2024 08:04:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=siemens.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jan.kiszka@siemens.com Received: by mta-64-226.siemens.flowmailer.net with ESMTPSA id 20241022060432088616a28753a3305d for ; Tue, 22 Oct 2024 08:04:32 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=jan.kiszka@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc:References:In-Reply-To; bh=crvIBNMRVdst8Ptbi0etmgNingRc1mo0IL2pglxwKus=; b=XjWc1u5a0bQOvZnkyRE0hxg/SeUORQ4TKtEhGTS1ywvG0shpUzhtddx0Bt4K9kLp4grIhq Ky0JYHQiI+OndsNB70yRRLxA/ipxswCcutGZ994++V2A0T6234AIdJbEdGeJcUqFgfNqTVKl 68aHWrY9jAX7vgxE8SFOn0JG4GNF8PyTOctKug35KYXjJGm3VTaN6yJsOCtk6aTt6xXx/fC/ IbPPP+dc3TsDUHq0yzxPzNOVNulV59yaitLmjwSbm080zy8lk85t8EgU7CURK+5a127xGLsc onUozhYtwrkt3M8toPJZszf5FoADDSEJChw0ciV6g7OchbecvauIsUfg==; From: Jan Kiszka To: U-Boot Mailing List Cc: Bryan Brattlof , Nishanth Menon Subject: [PATCH v2 02/13] board: siemens: iot2050: Fix coding style Date: Tue, 22 Oct 2024 08:04:19 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-294854:519-21489:flowmailer 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: Baocheng Su Add a space after the 'if' Signed-off-by: Baocheng Su Signed-off-by: Jan Kiszka --- board/siemens/iot2050/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/siemens/iot2050/board.c b/board/siemens/iot2050/board.c index ed292c364a5..e5c7ce58b06 100644 --- a/board/siemens/iot2050/board.c +++ b/board/siemens/iot2050/board.c @@ -220,7 +220,7 @@ void set_board_info_env(void) if (board_is_advanced()) { if (board_is_pg1()) fdtfile = "ti/k3-am6548-iot2050-advanced.dtb"; - else if(board_is_m2()) + else if (board_is_m2()) fdtfile = "ti/k3-am6548-iot2050-advanced-m2.dtb"; else fdtfile = "ti/k3-am6548-iot2050-advanced-pg2.dtb"; From patchwork Tue Oct 22 06:04:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 2000259 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=siemens.com header.i=jan.kiszka@siemens.com header.a=rsa-sha256 header.s=fm1 header.b=ORdwe9+2; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (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 4XXhV15Rqfz1xw0 for ; Tue, 22 Oct 2024 17:04:57 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8608888E02; Tue, 22 Oct 2024 08:04:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=siemens.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; secure) header.d=siemens.com header.i=jan.kiszka@siemens.com header.b="ORdwe9+2"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F277388F28; Tue, 22 Oct 2024 08:04:35 +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=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, SPF_HELO_PASS,SPF_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mta-64-228.siemens.flowmailer.net (mta-64-228.siemens.flowmailer.net [185.136.64.228]) (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 98A0088F47 for ; Tue, 22 Oct 2024 08:04:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=siemens.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jan.kiszka@siemens.com Received: by mta-64-228.siemens.flowmailer.net with ESMTPSA id 20241022060432ed3b1df2f80b1e8690 for ; Tue, 22 Oct 2024 08:04:32 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=jan.kiszka@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc:References:In-Reply-To; bh=Lv0ut2tY6XlI1jFjodmFd39h11wE5epFQMypq6ar62Q=; b=ORdwe9+29Fp4GgDLkT0Go5SDlZQwK0Pw4Zic2+aLHrLZBVCGBAX89xobImgJUuRuwNGr4U R658SNsWV/wewcQycjxkxK/U3EP97xSk88FyfEhdclJBLImZszI6RNCF8GQhRvZYMGOGtFN8 gqWIip32OLTzxTR5uO3FNBncSahaBTvJWlYThAmqMXbb2nZlR+89xxfxWd2qBpPhgn8gG6H9 tfqIt1US6HxAHAw7fXFw9g9rXsSEOHJyCKlbeiiSfGLc5AOaTdTO7ADUPswYekFYuB9SRUuu kEvpu1SzpFEY8MicTgpVAWDDOsns+aVW2l/G6ZxEaNTz4S8KK/E1K96Q==; From: Jan Kiszka To: U-Boot Mailing List Cc: Bryan Brattlof , Nishanth Menon Subject: [PATCH v2 03/13] board: siemens: iot2050: Control pcie power for all variants Date: Tue, 22 Oct 2024 08:04:20 +0200 Message-ID: <91c60e8db41f6709d37889a2a7af56f930a703b9.1729577070.git.jan.kiszka@siemens.com> In-Reply-To: References: MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-294854:519-21489:flowmailer 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: Baocheng Su The power control pin of pcie interface not only works for M.2 interface but also for miniPCIE, so promote this logic to all variants to workaround the module hang issue. Signed-off-by: Baocheng Su Signed-off-by: Jan Kiszka --- board/siemens/iot2050/board.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/board/siemens/iot2050/board.c b/board/siemens/iot2050/board.c index e5c7ce58b06..85cb999f17f 100644 --- a/board/siemens/iot2050/board.c +++ b/board/siemens/iot2050/board.c @@ -185,6 +185,12 @@ static void remove_mmc1_target(void) free(boot_targets); } +static void enable_pcie_connector_power(void) +{ + set_pinvalue("gpio@601000_17", "P3V3_PCIE_CON_EN", 1); + udelay(4 * 100); +} + void set_board_info_env(void) { struct iot2050_info *info = IOT2050_INFO_DATA; @@ -288,10 +294,6 @@ static void m2_connector_setup(void) struct m2_config_pins config_pins; unsigned int n; - /* enable M.2 connector power */ - set_pinvalue("gpio@601000_17", "P3V3_M2_EN", 1); - udelay(4 * 100); - if (m2_manual_config < CONNECTOR_MODE_INVALID) { mode_info = " [manual mode]"; connector_mode = m2_manual_config; @@ -429,6 +431,8 @@ int board_late_init(void) /* change CTRL_MMR register to let serdes0 not output USB3.0 signals. */ writel(0x3, SERDES0_LANE_SELECT); + enable_pcie_connector_power(); + if (board_is_m2()) m2_connector_setup(); From patchwork Tue Oct 22 06:04:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 2000261 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=siemens.com header.i=jan.kiszka@siemens.com header.a=rsa-sha256 header.s=fm1 header.b=bpYeBC90; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (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 4XXhVR3DBPz1xtp for ; Tue, 22 Oct 2024 17:05:19 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5367088FC4; Tue, 22 Oct 2024 08:04:39 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=siemens.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; secure) header.d=siemens.com header.i=jan.kiszka@siemens.com header.b="bpYeBC90"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8778088FA9; Tue, 22 Oct 2024 08:04:36 +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=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, SPF_HELO_PASS,SPF_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mta-64-228.siemens.flowmailer.net (mta-64-228.siemens.flowmailer.net [185.136.64.228]) (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 A7BD388F4B for ; Tue, 22 Oct 2024 08:04:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=siemens.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jan.kiszka@siemens.com Received: by mta-64-228.siemens.flowmailer.net with ESMTPSA id 2024102206043260f325bcf053ba996f for ; Tue, 22 Oct 2024 08:04:32 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=jan.kiszka@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc:References:In-Reply-To; bh=33QB1cQ3NTSXbL0UtgY6v2lJz57vchqb9Z8WGR6j4WM=; b=bpYeBC90UR2CB9yFjAonxVT/76Ni5N8pTsQOqkPaAOmVSDCSJ39pz6XrHgUcbBJR3eUyhB KGL6Y0c56xmizzU2cryyRK/1jWGTJIU98OC4vqimn82zA9JHTj4H2enokxrhVcZx+7nYPN1j xJYlPg0dyt795ClQKcWe3w3vNmUdVhR6z7COy2YBVsb8XRxDw9PxmtFH2daifkQYATRL361C yH7V4y8XVyOeb+HX77vMjYZWkIIM3SL4/R7wAxjXMo1jolbQAaa8xoPI1Esm2s2aTofj6GNF xxxJUH4gdehyMWSJydBYDD5v7gWGUiogbEIybj0HI6x6nK0olKJZkRxg==; From: Jan Kiszka To: U-Boot Mailing List Cc: Bryan Brattlof , Nishanth Menon Subject: [PATCH v2 04/13] board: siemens: iot2050: Pass DDR size from FSBL Date: Tue, 22 Oct 2024 08:04:21 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-294854:519-21489:flowmailer 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: Baocheng Su Due to new DDR size introduction, the current logic of determining the DDR size is not able to get the correct size. Instead, the DDR size is determined by the FSBL(SEBOOT) then passed to u-boot through the scratchpad info. The SEBoot version must be >= D/V01.04.01.02 to support this change. Also now for some variants, the DDR size may > 2GB, so borrow some code from the TI evm to iot2050 to support more than 2GB DDR. Signed-off-by: Baocheng Su Signed-off-by: Jan Kiszka --- board/siemens/iot2050/board.c | 39 ++++++++++++++++++++++++++--------- doc/board/siemens/iot2050.rst | 3 +++ include/configs/iot2050.h | 3 +++ 3 files changed, 35 insertions(+), 10 deletions(-) diff --git a/board/siemens/iot2050/board.c b/board/siemens/iot2050/board.c index 85cb999f17f..16082ae2afe 100644 --- a/board/siemens/iot2050/board.c +++ b/board/siemens/iot2050/board.c @@ -38,6 +38,8 @@ struct iot2050_info { u8 mac_addr_cnt; u8 mac_addr[8][ARP_HLEN]; char seboot_version[40 + 1]; + u8 padding[3]; + u32 ddr_size_mb; } __packed; /* @@ -341,25 +343,42 @@ int board_init(void) int dram_init(void) { - if (board_is_advanced()) - gd->ram_size = SZ_2G; - else - gd->ram_size = SZ_1G; + struct iot2050_info *info = IOT2050_INFO_DATA; + gd->ram_size = ((phys_size_t)(info->ddr_size_mb)) << 20; return 0; } +ulong board_get_usable_ram_top(ulong total_size) +{ + /* Limit RAM used by U-Boot to the DDR low region */ + if (gd->ram_top > 0x100000000) + return 0x100000000; + + return gd->ram_top; +} + int dram_init_banksize(void) { dram_init(); - /* Bank 0 declares the memory available in the DDR low region */ - gd->bd->bi_dram[0].start = CFG_SYS_SDRAM_BASE; - gd->bd->bi_dram[0].size = gd->ram_size; + if (gd->ram_size > SZ_2G) { + /* Bank 0 declares the memory available in the DDR low region */ + gd->bd->bi_dram[0].start = CFG_SYS_SDRAM_BASE; + gd->bd->bi_dram[0].size = SZ_2G; + + /* Bank 1 declares the memory available in the DDR high region */ + gd->bd->bi_dram[1].start = CFG_SYS_SDRAM_BASE1; + gd->bd->bi_dram[1].size = gd->ram_size - SZ_2G; + } else { + /* Bank 0 declares the memory available in the DDR low region */ + gd->bd->bi_dram[0].start = CFG_SYS_SDRAM_BASE; + gd->bd->bi_dram[0].size = gd->ram_size; - /* Bank 1 declares the memory available in the DDR high region */ - gd->bd->bi_dram[1].start = 0; - gd->bd->bi_dram[1].size = 0; + /* Bank 1 declares the memory available in the DDR high region */ + gd->bd->bi_dram[1].start = 0; + gd->bd->bi_dram[1].size = 0; + } return 0; } diff --git a/doc/board/siemens/iot2050.rst b/doc/board/siemens/iot2050.rst index ee3c5c95846..d0c0a412097 100644 --- a/doc/board/siemens/iot2050.rst +++ b/doc/board/siemens/iot2050.rst @@ -29,6 +29,9 @@ The following binaries from that source need to be present in the build folder: - seboot_pg1.bin - seboot_pg2.bin +Note that SE-Boot D/V01.04.01.02 or greater is required, otherwise the DDR size +will not be picked up correctly by U-Boot. + When using the watchdog, a related firmware for the R5 core(s) is needed, e.g. https://github.com/siemens/k3-rti-wdt. The name and location of the image is configured via CONFIG_WDT_K3_RTI_FW_FILE. diff --git a/include/configs/iot2050.h b/include/configs/iot2050.h index 0f92e0d25dc..5c58c7bbaab 100644 --- a/include/configs/iot2050.h +++ b/include/configs/iot2050.h @@ -24,6 +24,9 @@ func(USB, usb, 2) #endif +/* DDR Configuration */ +#define CFG_SYS_SDRAM_BASE1 0x880000000 + /* * This defines all MMC devices, even if the basic variant has no mmc1. * The non-supported device will be removed from the boot targets during From patchwork Tue Oct 22 06:04:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 2000263 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=siemens.com header.i=jan.kiszka@siemens.com header.a=rsa-sha256 header.s=fm1 header.b=ThXvFVv/; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (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 4XXhVr0FFJz1xtp for ; Tue, 22 Oct 2024 17:05:40 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 819428905F; Tue, 22 Oct 2024 08:04:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=siemens.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; secure) header.d=siemens.com header.i=jan.kiszka@siemens.com header.b="ThXvFVv/"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CE9C288F28; Tue, 22 Oct 2024 08:04:37 +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=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, SPF_HELO_PASS,SPF_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mta-64-226.siemens.flowmailer.net (mta-64-226.siemens.flowmailer.net [185.136.64.226]) (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 15CF088F66 for ; Tue, 22 Oct 2024 08:04:33 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=siemens.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jan.kiszka@siemens.com Received: by mta-64-226.siemens.flowmailer.net with ESMTPSA id 202410220604326caac37a2e5faf40e9 for ; Tue, 22 Oct 2024 08:04:32 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=jan.kiszka@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc:References:In-Reply-To; bh=b8CWqpHNIJYEj9JLsGa35ZfQxwxSA8aisUiLuWwjW+A=; b=ThXvFVv/LacbN0YMYNUo9Pg8jzEVD+mJQwvq9P67CAjTL/tAt3p+nRa+jIC7Au48QEUCrl skO95Nx9oiHsybWBpz0ctoUHTjGR3YiWC35NFrTQ/wDCZmYEA2j2hJS82lXcX5fSoUjqW+7h 3L4ZuCDoel/8iMbJqbCOAabuBCdGm8Jsbej7Praj6DnBto5AU8JnTkp1+k2al40l7JbPcp8v LlkWCaHLOKEGaXFP6OTtnSeB4nz2VQMy/2ocysfgj2HyUkxafZ+weO53wJ12PiJTrP1HVA9b wkoVyyaznPp2CR66Z+IwkZK7pY8BS6OQCo/to7fMAvK7o3zs3dAi/Hlg==; From: Jan Kiszka To: U-Boot Mailing List Cc: Bryan Brattlof , Nishanth Menon Subject: [PATCH v2 05/13] board: siemens: iot2050: Generalize the fdt fixup Date: Tue, 22 Oct 2024 08:04:22 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-294854:519-21489:flowmailer 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: Baocheng Su The fdt fixup logic actually also applies to other possible variants who also have device tree overlays. So generalize this part by extracting it from the m.2 specific function and make it a standalone one. Since now we only have M.2 variant consuming the overlay, it may not have immediate effect for other variant, however this makes the future variant more easier to apply fdt fixups. Signed-off-by: Baocheng Su Signed-off-by: Jan Kiszka --- board/siemens/iot2050/board.c | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/board/siemens/iot2050/board.c b/board/siemens/iot2050/board.c index 16082ae2afe..fad6bc04735 100644 --- a/board/siemens/iot2050/board.c +++ b/board/siemens/iot2050/board.c @@ -245,23 +245,14 @@ void set_board_info_env(void) env_save(); } -static void m2_overlay_prepare(void) +static void do_overlay_prepare(const char *overlay_path) { #if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) - const char *overlay_path; void *overlay; u64 loadaddr; ofnode node; int ret; - if (connector_mode == BKEY_PCIEX2) - return; - - if (connector_mode == BKEY_PCIE_EKEY_PCIE) - overlay_path = "/fit-images/bkey-ekey-pcie-overlay"; - else - overlay_path = "/fit-images/bkey-usb3-overlay"; - node = ofnode_path(overlay_path); if (!ofnode_valid(node)) goto fit_error; @@ -288,6 +279,21 @@ fit_error: #endif } +static void m2_overlay_prepare(void) +{ + const char *overlay_path; + + if (connector_mode == BKEY_PCIEX2) + return; + + if (connector_mode == BKEY_PCIE_EKEY_PCIE) + overlay_path = "/fit-images/bkey-ekey-pcie-overlay"; + else + overlay_path = "/fit-images/bkey-usb3-overlay"; + + do_overlay_prepare(overlay_path); +} + static void m2_connector_setup(void) { ulong m2_manual_config = env_get_ulong("m2_manual_config", 10, @@ -466,7 +472,7 @@ int board_late_init(void) } #if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) -static void m2_fdt_fixup(void *blob) +static void variants_fdt_fixup(void *blob) { void *overlay_copy = NULL; void *fdt_copy = NULL; @@ -506,14 +512,14 @@ cleanup: return; fixup_error: - pr_err("Could not apply M.2 device tree overlay\n"); + pr_err("Could not apply device tree overlay\n"); goto cleanup; } int ft_board_setup(void *blob, struct bd_info *bd) { if (board_is_m2()) - m2_fdt_fixup(blob); + variants_fdt_fixup(blob); return 0; } From patchwork Tue Oct 22 06:04:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 2000262 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=siemens.com header.i=jan.kiszka@siemens.com header.a=rsa-sha256 header.s=fm1 header.b=N1Jbq4U7; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (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 4XXhVd6hBsz1xtp for ; Tue, 22 Oct 2024 17:05:29 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BA17889056; Tue, 22 Oct 2024 08:04:39 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=siemens.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; secure) header.d=siemens.com header.i=jan.kiszka@siemens.com header.b="N1Jbq4U7"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8A40588F28; Tue, 22 Oct 2024 08:04:36 +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=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, SPF_HELO_PASS,SPF_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mta-64-226.siemens.flowmailer.net (mta-64-226.siemens.flowmailer.net [185.136.64.226]) (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 5CB5988F6B for ; Tue, 22 Oct 2024 08:04:33 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=siemens.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jan.kiszka@siemens.com Received: by mta-64-226.siemens.flowmailer.net with ESMTPSA id 20241022060432afa43c6cd2c3500d7d for ; Tue, 22 Oct 2024 08:04:33 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=jan.kiszka@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc:References:In-Reply-To; bh=n3jEwr/grmNkY7KwOj6DiZA3y/JvR1XzA1s6V2L3Rc0=; b=N1Jbq4U7AUjR5FGkhxFmYSgpigkZyQLGDFDrWuX8+ehxckznGPFbVBYvGUm12yctndDQkq YB7vPy/4w6oNfwW2Su5zp8Y1GB7So8CMt4GUFUvnmXXZqK9FSyG4hYD2akWLRiYC1BLYDYBJ ij3x+JAla+YYywifT9jTiYJaNTlJFCZkKuEitSLeazOmZZl41gLmXNuK1RHICkyTAGfJuHgT tuxCWAtqGLjO+yc3fDVrSqr0e0OREFewlImFaxnHqA3Fuy623IFVxQy6zUR5JT9eOSoRHL3j jSXusefxR3m+XCTpx0wBHL/sqMZ336vQjZTXFgkehttGGTEdIf54YKDg==; From: Jan Kiszka To: U-Boot Mailing List Cc: Bryan Brattlof , Nishanth Menon Subject: [PATCH v2 06/13] board: siemens: iot2050: Stop using special spl DT sources Date: Tue, 22 Oct 2024 08:04:23 +0200 Message-ID: <011ce4240310f606ac2cb9f307e918a81d7e3ce5.1729577070.git.jan.kiszka@siemens.com> In-Reply-To: References: MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-294854:519-21489:flowmailer 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: Jan Kiszka We can simply use the default DT, Basic PG1, because no nodes that are different between the variants play a role for SPL. Will help with the migration to OF_UPSTREAM. Signed-off-by: Jan Kiszka --- arch/arm/dts/Makefile | 1 - arch/arm/dts/k3-am65-iot2050-boot-image.dtsi | 4 ++-- arch/arm/dts/k3-am65-iot2050-spl.dts | 17 ----------------- configs/iot2050_defconfig | 1 - 4 files changed, 2 insertions(+), 21 deletions(-) delete mode 100644 arch/arm/dts/k3-am65-iot2050-spl.dts diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 8b9ced128b6..077a36c07a4 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -1163,7 +1163,6 @@ dtb-$(CONFIG_STM32MP25X) += \ dtb-$(CONFIG_SOC_K3_AM654) += \ k3-am654-base-board.dtb \ k3-am654-r5-base-board.dtb \ - k3-am65-iot2050-spl.dtb \ k3-am6528-iot2050-basic.dtb \ k3-am6528-iot2050-basic-pg2.dtb \ k3-am6548-iot2050-advanced.dtb \ diff --git a/arch/arm/dts/k3-am65-iot2050-boot-image.dtsi b/arch/arm/dts/k3-am65-iot2050-boot-image.dtsi index 3a6db91e132..e17cd78e56c 100644 --- a/arch/arm/dts/k3-am65-iot2050-boot-image.dtsi +++ b/arch/arm/dts/k3-am65-iot2050-boot-image.dtsi @@ -84,12 +84,12 @@ }; fdt-0 { - description = "k3-am65-iot2050-spl.dtb"; + description = "k3-am6528-iot2050-basic.dtb"; type = "flat_dt"; arch = "arm"; compression = "none"; blob-ext { - filename = "spl/dts/k3-am65-iot2050-spl.dtb"; + filename = "spl/dts/k3-am6528-iot2050-basic.dtb"; }; }; }; diff --git a/arch/arm/dts/k3-am65-iot2050-spl.dts b/arch/arm/dts/k3-am65-iot2050-spl.dts deleted file mode 100644 index 4e668fa3e03..00000000000 --- a/arch/arm/dts/k3-am65-iot2050-spl.dts +++ /dev/null @@ -1,17 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * Copyright (c) Siemens AG, 2018-2021 - * - * Authors: - * Jan Kiszka - */ - -/dts-v1/; - -#include "k3-am65-iot2050-common.dtsi" -#include "k3-am65-iot2050-common-u-boot.dtsi" - -/ { - compatible = "siemens,iot2050", "ti,am654"; - model = "Siemens IOT2050"; -}; diff --git a/configs/iot2050_defconfig b/configs/iot2050_defconfig index 401e57adeca..22990ba1f96 100644 --- a/configs/iot2050_defconfig +++ b/configs/iot2050_defconfig @@ -80,7 +80,6 @@ CONFIG_CMD_TIME=y CONFIG_OF_CONTROL=y CONFIG_SPL_OF_CONTROL=y CONFIG_SPL_MULTI_DTB_FIT=y -CONFIG_SPL_OF_LIST="k3-am65-iot2050-spl" CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_SYS_REDUNDAND_ENVIRONMENT=y From patchwork Tue Oct 22 06:04:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 2000264 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=siemens.com header.i=jan.kiszka@siemens.com header.a=rsa-sha256 header.s=fm1 header.b=LTmWFn9x; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (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 4XXhW23tbqz1xtp for ; Tue, 22 Oct 2024 17:05:50 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DD583891E6; Tue, 22 Oct 2024 08:04:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=siemens.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; secure) header.d=siemens.com header.i=jan.kiszka@siemens.com header.b="LTmWFn9x"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3BECD88F5E; Tue, 22 Oct 2024 08:04:38 +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=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, SPF_HELO_PASS,SPF_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mta-64-226.siemens.flowmailer.net (mta-64-226.siemens.flowmailer.net [185.136.64.226]) (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 6BB7888F6C for ; Tue, 22 Oct 2024 08:04:33 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=siemens.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jan.kiszka@siemens.com Received: by mta-64-226.siemens.flowmailer.net with ESMTPSA id 20241022060433c77011a35c66ea831f for ; Tue, 22 Oct 2024 08:04:33 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=jan.kiszka@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc:References:In-Reply-To; bh=DBW4WuJ41Y3HNejY83R0MIL9XPL2w1AnbLRoOx/q8Ho=; b=LTmWFn9xE6Rv1pj/ENgJfPRToi3G5oq81QAToNXPcSJi0N6Kg9akKooePelyASUxR1cESA vNWuLFCm1Ma5NkJC9T+1j+FzHHf6/5H3d6xuxfVQ7/jwMG1aBroxBl//+I4cvV7N/oq8fkjr U/gduWSfGCvyDuXxUOnEKjGSA1I9AR568X8J/dNgWMezyUCLov4ZdCmMpOzhz/W/nrFcbns5 f3RNNe9lZWItXxJKg/L6UhkEF7ayowSfCQ74LUdRxO3VBdCK6vn4WZ+dLKL/MAyvyOSXe7SA dBxHxujtK39J0g/SpyMPfUdlYKmSc7aF7vIbJuqm+4BFSN65QUSzsDRw==; From: Jan Kiszka To: U-Boot Mailing List Cc: Bryan Brattlof , Nishanth Menon Subject: [PATCH v2 07/13] arm64: dts: ti: iot2050: Disable lock-step for all iot2050 boards Date: Tue, 22 Oct 2024 08:04:24 +0200 Message-ID: <00089092a49a5356736e0df553a60b7e1bee97b4.1729577070.git.jan.kiszka@siemens.com> In-Reply-To: References: MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-294854:519-21489:flowmailer 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: Li Hua Qian The PG1 A variant of the iot2050 series has been identified which partially lacks support for lock-step mode. This implies that all iot2050 boards can't support this mode. As a result, lock-step mode has been disabled across all iot2050 boards for consistency and to avoid potential issues. Signed-off-by: Li Hua Qian Signed-off-by: Jan Kiszka Link: https://lore.kernel.org/r/d1f5f84db7a1597cd29628a0b503e578367b7b40.1724830741.git.jan.kiszka@siemens.com Signed-off-by: Nishanth Menon [ upstream commit: e0133f883cf115d9e97e704169a9fb6003caefb2 ] (cherry picked from commit 4b4872feb66a9043741819a57af280ffb4a96608) --- dts/upstream/src/arm64/ti/k3-am65-iot2050-common-pg2.dtsi | 5 ----- dts/upstream/src/arm64/ti/k3-am65-iot2050-common.dtsi | 5 +++++ dts/upstream/src/arm64/ti/k3-am6528-iot2050-basic.dts | 5 ----- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/dts/upstream/src/arm64/ti/k3-am65-iot2050-common-pg2.dtsi b/dts/upstream/src/arm64/ti/k3-am65-iot2050-common-pg2.dtsi index e2584a5efe3..b3c4c0eec3d 100644 --- a/dts/upstream/src/arm64/ti/k3-am65-iot2050-common-pg2.dtsi +++ b/dts/upstream/src/arm64/ti/k3-am65-iot2050-common-pg2.dtsi @@ -9,11 +9,6 @@ * Common bits of the IOT2050 Basic and Advanced variants, PG2 */ -&mcu_r5fss0 { - /* lock-step mode not supported on PG2 boards */ - ti,cluster-mode = <0>; -}; - &main_pmx0 { cp2102n_reset_pin_default: cp2102n-reset-default-pins { pinctrl-single,pins = < diff --git a/dts/upstream/src/arm64/ti/k3-am65-iot2050-common.dtsi b/dts/upstream/src/arm64/ti/k3-am65-iot2050-common.dtsi index ef34b851e17..e76828ccf21 100644 --- a/dts/upstream/src/arm64/ti/k3-am65-iot2050-common.dtsi +++ b/dts/upstream/src/arm64/ti/k3-am65-iot2050-common.dtsi @@ -635,3 +635,8 @@ ti,fifo-depth = ; }; }; + +&mcu_r5fss0 { + /* lock-step mode not supported on iot2050 boards */ + ti,cluster-mode = <0>; +}; diff --git a/dts/upstream/src/arm64/ti/k3-am6528-iot2050-basic.dts b/dts/upstream/src/arm64/ti/k3-am6528-iot2050-basic.dts index 29a31891b3d..4968a47f31e 100644 --- a/dts/upstream/src/arm64/ti/k3-am6528-iot2050-basic.dts +++ b/dts/upstream/src/arm64/ti/k3-am6528-iot2050-basic.dts @@ -22,8 +22,3 @@ compatible = "siemens,iot2050-basic", "ti,am654"; model = "SIMATIC IOT2050 Basic"; }; - -&mcu_r5fss0 { - /* lock-step mode not supported on this board */ - ti,cluster-mode = <0>; -}; From patchwork Tue Oct 22 06:04:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 2000265 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=siemens.com header.i=jan.kiszka@siemens.com header.a=rsa-sha256 header.s=fm1 header.b=GyxNxLMh; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (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 4XXhWD4bTyz1xtp for ; Tue, 22 Oct 2024 17:06:00 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4EA398926A; Tue, 22 Oct 2024 08:04:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=siemens.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; secure) header.d=siemens.com header.i=jan.kiszka@siemens.com header.b="GyxNxLMh"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 684CC88F5E; Tue, 22 Oct 2024 08:04:38 +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=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, SPF_HELO_PASS,SPF_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mta-64-228.siemens.flowmailer.net (mta-64-228.siemens.flowmailer.net [185.136.64.228]) (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 B66B888F75 for ; Tue, 22 Oct 2024 08:04:33 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=siemens.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jan.kiszka@siemens.com Received: by mta-64-228.siemens.flowmailer.net with ESMTPSA id 20241022060433653deb012efab508a4 for ; Tue, 22 Oct 2024 08:04:33 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=jan.kiszka@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc:References:In-Reply-To; bh=2Mx1X5J1tTQQsp7b5OGUiI81YRXrfDBSX+uGme72rvc=; b=GyxNxLMhGZxwV20Ja+6rT/vSF+iDs3/jbp+5E6nuVJgOmQJJYcglhF6Ckz9RIj8/KmO1W7 FCtNvC74sT3kMhgXo0ThSeXNl0vd6Ylp92YTqF3SdBL6bPcZHsQFGAzRCa085A5iFfDbZro9 03hGKAknqAR/VwJk0ZBTIbz2+sFwLkuZCCnpZwY8/DWDgO1pz/Sjvg05Vz+EISf7KrAAf5+Z fH44t0+vHy5bg4bm45DQvI+EzH91g9PkP1Aqvon5Pl0heBhs3LyX5xxZqCLjMYUB6l/R8WSI Xr4VLioKoWbeP4FpdhEujbAMFUxRO5MOqEc6GBnzuFSN4NEqKs+3/CDg==; From: Jan Kiszka To: U-Boot Mailing List Cc: Bryan Brattlof , Nishanth Menon Subject: [PATCH v2 08/13] arm64: dts: ti: iot2050: Add overlays for M.2 used by firmware Date: Tue, 22 Oct 2024 08:04:25 +0200 Message-ID: <247548111148ba32e8aa920df7c4fa97440feb0b.1729577070.git.jan.kiszka@siemens.com> In-Reply-To: References: MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-294854:519-21489:flowmailer 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: Jan Kiszka To allow firmware to pick up all DTs from here, move the overlays that are normally applied during DT fixup to the kernel source as well. Hook then into the build nevertheless to ensure that regular checks are performed. Signed-off-by: Jan Kiszka Link: https://lore.kernel.org/r/91f8b825467651ebd51a4051f153ab136eeb1849.1724830741.git.jan.kiszka@siemens.com Signed-off-by: Nishanth Menon [ upstream commit: dba27d026fc841d28a0ed373f617cc84ec0e4504 ] (cherry picked from commit 741915246a92fc4c21537f9623a69612f7cef03a) --- ...48-iot2050-advanced-m2-bkey-ekey-pcie.dtso | 27 +++++++++++ ...-am6548-iot2050-advanced-m2-bkey-usb3.dtso | 47 +++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 dts/upstream/src/arm64/ti/k3-am6548-iot2050-advanced-m2-bkey-ekey-pcie.dtso create mode 100644 dts/upstream/src/arm64/ti/k3-am6548-iot2050-advanced-m2-bkey-usb3.dtso diff --git a/dts/upstream/src/arm64/ti/k3-am6548-iot2050-advanced-m2-bkey-ekey-pcie.dtso b/dts/upstream/src/arm64/ti/k3-am6548-iot2050-advanced-m2-bkey-ekey-pcie.dtso new file mode 100644 index 00000000000..666237f6d79 --- /dev/null +++ b/dts/upstream/src/arm64/ti/k3-am6548-iot2050-advanced-m2-bkey-ekey-pcie.dtso @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * IOT2050 M.2 variant, overlay for B-key PCIE0_LANE0 + E-key PCIE1_LANE0 + * Copyright (c) Siemens AG, 2022-2024 + * + * Authors: + * Chao Zeng + * Jan Kiszka + */ + +/dts-v1/; +/plugin/; + +#include +#include + +&pcie0_rc { + num-lanes = <1>; + phys = <&serdes0 PHY_TYPE_PCIE 1>; + phy-names = "pcie-phy0"; + reset-gpios = <&main_gpio1 15 GPIO_ACTIVE_HIGH>; + status = "okay"; +}; + +&pcie1_rc { + status = "okay"; +}; diff --git a/dts/upstream/src/arm64/ti/k3-am6548-iot2050-advanced-m2-bkey-usb3.dtso b/dts/upstream/src/arm64/ti/k3-am6548-iot2050-advanced-m2-bkey-usb3.dtso new file mode 100644 index 00000000000..0f86235c977 --- /dev/null +++ b/dts/upstream/src/arm64/ti/k3-am6548-iot2050-advanced-m2-bkey-usb3.dtso @@ -0,0 +1,47 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * IOT2050 M.2 variant, overlay for B-key USB3.0 + E-key PCIE1_LANE0 + * Copyright (c) Siemens AG, 2022-2024 + * + * Authors: + * Chao Zeng + * Jan Kiszka + */ + +/dts-v1/; +/plugin/; + +#include +#include + +&serdes0 { + assigned-clock-parents = <&k3_clks 153 7>, <&k3_clks 153 4>; +}; + +&pcie0_rc { + status = "disabled"; +}; + +&pcie1_rc { + pinctrl-names = "default"; + pinctrl-0 = <&minipcie_pins_default>; + + num-lanes = <1>; + phys = <&serdes1 PHY_TYPE_PCIE 0>; + phy-names = "pcie-phy0"; + reset-gpios = <&wkup_gpio0 27 GPIO_ACTIVE_HIGH>; + status = "okay"; +}; + +&dwc3_0 { + assigned-clock-parents = <&k3_clks 151 4>, /* set REF_CLK to 20MHz i.e. PER0_PLL/48 */ + <&k3_clks 151 8>; /* set PIPE3_TXB_CLK to WIZ8B2M4VSB */ + phys = <&serdes0 PHY_TYPE_USB3 0>; + phy-names = "usb3-phy"; +}; + +&usb0 { + maximum-speed = "super-speed"; + snps,dis-u1-entry-quirk; + snps,dis-u2-entry-quirk; +}; From patchwork Tue Oct 22 06:04:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 2000267 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=siemens.com header.i=jan.kiszka@siemens.com header.a=rsa-sha256 header.s=fm1 header.b=SCnXD1Mz; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (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 4XXhWc31r7z1xtp for ; Tue, 22 Oct 2024 17:06:20 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 29D1A892B8; Tue, 22 Oct 2024 08:04:44 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=siemens.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; secure) header.d=siemens.com header.i=jan.kiszka@siemens.com header.b="SCnXD1Mz"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C04E388FD9; Tue, 22 Oct 2024 08:04:39 +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=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, SPF_HELO_PASS,SPF_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mta-64-228.siemens.flowmailer.net (mta-64-228.siemens.flowmailer.net [185.136.64.228]) (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 0338A883D4 for ; Tue, 22 Oct 2024 08:04:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=siemens.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jan.kiszka@siemens.com Received: by mta-64-228.siemens.flowmailer.net with ESMTPSA id 2024102206043329e1b9d1c18c3318f8 for ; Tue, 22 Oct 2024 08:04:33 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=jan.kiszka@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc:References:In-Reply-To; bh=mR+a72BskWaP28li6teV21TVoA9cTRw29KBjxJ/E6yo=; b=SCnXD1MzpZSL/eiOgSAYdp7HqIGxszUriCjBGRtnBN1GVk5JFMI0Muj65TYMDogRX16Vzg 72FwKoWmv6ncd2E58osp1S8nc4mRgj3JjQhi9tThjSpe4b0IVN2WTS0lf55j+z10B4BsGWqZ 4O907ejf298G6Vx7bFRa2N4RscI55Tal65LhT63s1WaQRmkUvjtcdAn0lcLq0xrIhYb11JuO gs/rkgUuf3znaZwJv4r1yxPbaWKi2aZe0TSJQMtVGH/45m9YLraWa0A/xLXi7eY2b9iLOpFy AXAJdIzz7ojp1Lz1odX+IgtVGp0CPzhjH8N1u7rFmJic4NQMQXSiIkug==; From: Jan Kiszka To: U-Boot Mailing List Cc: Bryan Brattlof , Nishanth Menon Subject: [PATCH v2 09/13] board: siemens: iot2050: Migrate to OF_UPSTREAM Date: Tue, 22 Oct 2024 08:04:26 +0200 Message-ID: <2a4743b7708fad4fc328ba35face602c65249178.1729577070.git.jan.kiszka@siemens.com> In-Reply-To: References: MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-294854:519-21489:flowmailer 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: Jan Kiszka This requires some tweaking of the defconfig and board_fit_config_name_match so that the new sources are taken into account. Signed-off-by: Jan Kiszka --- arch/arm/dts/Makefile | 7 - arch/arm/dts/k3-am65-iot2050-boot-image.dtsi | 16 +- arch/arm/dts/k3-am65-iot2050-common-pg1.dtsi | 46 -- arch/arm/dts/k3-am65-iot2050-common-pg2.dtsi | 51 -- arch/arm/dts/k3-am65-iot2050-common.dtsi | 738 ------------------ .../dts/k3-am6528-iot2050-basic-common.dtsi | 61 -- arch/arm/dts/k3-am6528-iot2050-basic-pg2.dts | 24 - arch/arm/dts/k3-am6528-iot2050-basic.dts | 24 - .../k3-am6548-iot2050-advanced-common.dtsi | 52 -- ...50-advanced-m2-bkey-ekey-pcie-overlay.dtso | 27 - ...iot2050-advanced-m2-bkey-usb3-overlay.dtso | 47 -- .../arm/dts/k3-am6548-iot2050-advanced-m2.dts | 119 --- .../dts/k3-am6548-iot2050-advanced-pg2.dts | 29 - arch/arm/dts/k3-am6548-iot2050-advanced.dts | 24 - board/siemens/iot2050/board.c | 4 +- configs/iot2050_defconfig | 6 +- 16 files changed, 15 insertions(+), 1260 deletions(-) delete mode 100644 arch/arm/dts/k3-am65-iot2050-common-pg1.dtsi delete mode 100644 arch/arm/dts/k3-am65-iot2050-common-pg2.dtsi delete mode 100644 arch/arm/dts/k3-am65-iot2050-common.dtsi delete mode 100644 arch/arm/dts/k3-am6528-iot2050-basic-common.dtsi delete mode 100644 arch/arm/dts/k3-am6528-iot2050-basic-pg2.dts delete mode 100644 arch/arm/dts/k3-am6528-iot2050-basic.dts delete mode 100644 arch/arm/dts/k3-am6548-iot2050-advanced-common.dtsi delete mode 100644 arch/arm/dts/k3-am6548-iot2050-advanced-m2-bkey-ekey-pcie-overlay.dtso delete mode 100644 arch/arm/dts/k3-am6548-iot2050-advanced-m2-bkey-usb3-overlay.dtso delete mode 100644 arch/arm/dts/k3-am6548-iot2050-advanced-m2.dts delete mode 100644 arch/arm/dts/k3-am6548-iot2050-advanced-pg2.dts delete mode 100644 arch/arm/dts/k3-am6548-iot2050-advanced.dts diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 077a36c07a4..5b2382b78f3 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -1163,13 +1163,6 @@ dtb-$(CONFIG_STM32MP25X) += \ dtb-$(CONFIG_SOC_K3_AM654) += \ k3-am654-base-board.dtb \ k3-am654-r5-base-board.dtb \ - k3-am6528-iot2050-basic.dtb \ - k3-am6528-iot2050-basic-pg2.dtb \ - k3-am6548-iot2050-advanced.dtb \ - k3-am6548-iot2050-advanced-pg2.dtb \ - k3-am6548-iot2050-advanced-m2.dtb \ - k3-am6548-iot2050-advanced-m2-bkey-usb3-overlay.dtbo \ - k3-am6548-iot2050-advanced-m2-bkey-ekey-pcie-overlay.dtbo \ k3-am654-icssg2.dtbo dtb-$(CONFIG_SOC_K3_J721E) += k3-j721e-r5-common-proc-board.dtb \ diff --git a/arch/arm/dts/k3-am65-iot2050-boot-image.dtsi b/arch/arm/dts/k3-am65-iot2050-boot-image.dtsi index e17cd78e56c..1b31d412b4c 100644 --- a/arch/arm/dts/k3-am65-iot2050-boot-image.dtsi +++ b/arch/arm/dts/k3-am65-iot2050-boot-image.dtsi @@ -84,12 +84,12 @@ }; fdt-0 { - description = "k3-am6528-iot2050-basic.dtb"; + description = "ti/k3-am6528-iot2050-basic.dtb"; type = "flat_dt"; arch = "arm"; compression = "none"; blob-ext { - filename = "spl/dts/k3-am6528-iot2050-basic.dtb"; + filename = "spl/dts/ti/k3-am6528-iot2050-basic.dtb"; }; }; }; @@ -205,10 +205,10 @@ }; fit@380000 { - fit,fdt-list-val = "k3-am6528-iot2050-basic", "k3-am6548-iot2050-advanced"; + fit,fdt-list-val = "ti/k3-am6528-iot2050-basic", "ti/k3-am6548-iot2050-advanced"; configurations { - default = "k3-am6528-iot2050-basic"; + default = "ti/k3-am6528-iot2050-basic"; @config-SEQ { loadables = #ifdef CONFIG_WDT_K3_RTI_FW_FILE @@ -229,7 +229,7 @@ }; fit@380000 { - fit,fdt-list-val = "k3-am6528-iot2050-basic-pg2", "k3-am6548-iot2050-advanced-pg2", "k3-am6548-iot2050-advanced-m2"; + fit,fdt-list-val = "ti/k3-am6528-iot2050-basic-pg2", "ti/k3-am6548-iot2050-advanced-pg2", "ti/k3-am6548-iot2050-advanced-m2"; images { bkey-usb3-overlay { @@ -239,7 +239,7 @@ arch = "arm64"; compression = "none"; blob-ext { - filename = "k3-am6548-iot2050-advanced-m2-bkey-usb3-overlay.dtbo"; + filename = "ti/k3-am6548-iot2050-advanced-m2-bkey-usb3.dtbo"; }; hash { algo = "sha256"; @@ -253,7 +253,7 @@ arch = "arm64"; compression = "none"; blob-ext { - filename = "k3-am6548-iot2050-advanced-m2-bkey-ekey-pcie-overlay.dtbo"; + filename = "ti/k3-am6548-iot2050-advanced-m2-bkey-ekey-pcie.dtbo"; }; hash { algo = "sha256"; @@ -262,7 +262,7 @@ }; configurations { - default = "k3-am6528-iot2050-basic-pg2"; + default = "ti/k3-am6528-iot2050-basic-pg2"; @config-SEQ { loadables = #ifdef CONFIG_WDT_K3_RTI_FW_FILE diff --git a/arch/arm/dts/k3-am65-iot2050-common-pg1.dtsi b/arch/arm/dts/k3-am65-iot2050-common-pg1.dtsi deleted file mode 100644 index 51f902fa35a..00000000000 --- a/arch/arm/dts/k3-am65-iot2050-common-pg1.dtsi +++ /dev/null @@ -1,46 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * Copyright (c) Siemens AG, 2021 - * - * Authors: - * Jan Kiszka - * - * Common bits of the IOT2050 Basic and Advanced variants, PG1 - */ - -&dss { - assigned-clocks = <&k3_clks 67 2>; - assigned-clock-parents = <&k3_clks 67 5>; -}; - -&serdes0 { - status = "disabled"; -}; - -&sdhci1 { - no-1-8-v; -}; - -&tx_pru0_0 { - status = "disabled"; -}; - -&tx_pru0_1 { - status = "disabled"; -}; - -&tx_pru1_0 { - status = "disabled"; -}; - -&tx_pru1_1 { - status = "disabled"; -}; - -&tx_pru2_0 { - status = "disabled"; -}; - -&tx_pru2_1 { - status = "disabled"; -}; diff --git a/arch/arm/dts/k3-am65-iot2050-common-pg2.dtsi b/arch/arm/dts/k3-am65-iot2050-common-pg2.dtsi deleted file mode 100644 index e9419c4fe60..00000000000 --- a/arch/arm/dts/k3-am65-iot2050-common-pg2.dtsi +++ /dev/null @@ -1,51 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * Copyright (c) Siemens AG, 2021 - * - * Authors: - * Chao Zeng - * Jan Kiszka - * - * Common bits of the IOT2050 Basic and Advanced variants, PG2 - */ - -&main_pmx0 { - cp2102n_reset_pin_default: cp2102n-reset-default-pins { - pinctrl-single,pins = < - /* (AF12) GPIO1_24, used as cp2102 reset */ - AM65X_IOPAD(0x01e0, PIN_OUTPUT, 7) - >; - }; -}; - -&main_gpio1 { - pinctrl-names = "default"; - pinctrl-0 = <&cp2102n_reset_pin_default>; - gpio-line-names = - "", "", "", "", "", "", "", "", "", "", - "", "", "", "", "", "", "", "", "", "", - "", "", "", "", "CP2102N-RESET"; -}; - -&dss { - /* Workaround needed to get DP clock of 154Mhz */ - assigned-clocks = <&k3_clks 67 0>; -}; - -&serdes0 { - assigned-clocks = <&k3_clks 153 4>, <&serdes0 AM654_SERDES_CMU_REFCLK>; - assigned-clock-parents = <&k3_clks 153 7>, <&k3_clks 153 4>; -}; - -&dwc3_0 { - assigned-clock-parents = <&k3_clks 151 4>, /* set REF_CLK to 20MHz i.e. PER0_PLL/48 */ - <&k3_clks 151 8>; /* set PIPE3_TXB_CLK to WIZ8B2M4VSB */ - phys = <&serdes0 PHY_TYPE_USB3 0>; - phy-names = "usb3-phy"; -}; - -&usb0 { - maximum-speed = "super-speed"; - snps,dis-u1-entry-quirk; - snps,dis-u2-entry-quirk; -}; diff --git a/arch/arm/dts/k3-am65-iot2050-common.dtsi b/arch/arm/dts/k3-am65-iot2050-common.dtsi deleted file mode 100644 index fa7178144b8..00000000000 --- a/arch/arm/dts/k3-am65-iot2050-common.dtsi +++ /dev/null @@ -1,738 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * Copyright (c) Siemens AG, 2018-2021 - * - * Authors: - * Le Jin - * Jan Kiszka - * - * Common bits of the IOT2050 Basic and Advanced variants, PG1 and PG2 - */ - -#include "k3-am654.dtsi" -#include - -/ { - aliases { - serial0 = &wkup_uart0; - serial1 = &mcu_uart0; - serial2 = &main_uart0; - serial3 = &main_uart1; - i2c0 = &wkup_i2c0; - i2c1 = &mcu_i2c0; - i2c2 = &main_i2c0; - i2c3 = &main_i2c1; - i2c4 = &main_i2c2; - i2c5 = &main_i2c3; - spi0 = &mcu_spi0; - mmc0 = &sdhci1; - mmc1 = &sdhci0; - }; - - chosen { - stdout-path = "serial3:115200n8"; - }; - - reserved-memory { - #address-cells = <2>; - #size-cells = <2>; - ranges; - - secure_ddr: secure-ddr@9e800000 { - reg = <0 0x9e800000 0 0x01800000>; /* for OP-TEE */ - alignment = <0x1000>; - no-map; - }; - - mcu_r5fss0_core0_dma_memory_region: r5f-dma-memory@a0000000 { - compatible = "shared-dma-pool"; - reg = <0 0xa0000000 0 0x100000>; - no-map; - }; - - mcu_r5fss0_core0_memory_region: r5f-memory@a0100000 { - compatible = "shared-dma-pool"; - reg = <0 0xa0100000 0 0xf00000>; - no-map; - }; - - mcu_r5fss0_core1_dma_memory_region: r5f-dma-memory@a1000000 { - compatible = "shared-dma-pool"; - reg = <0 0xa1000000 0 0x100000>; - no-map; - }; - - mcu_r5fss0_core1_memory_region: r5f-memory@a1100000 { - compatible = "shared-dma-pool"; - reg = <0 0xa1100000 0 0xf00000>; - no-map; - }; - - rtos_ipc_memory_region: ipc-memories@a2000000 { - reg = <0x00 0xa2000000 0x00 0x00200000>; - alignment = <0x1000>; - no-map; - }; - - /* To reserve the power-on(PON) reason for watchdog reset */ - wdt_reset_memory_region: wdt-memory@a2200000 { - reg = <0x00 0xa2200000 0x00 0x00001000>; - no-map; - }; - }; - - leds { - compatible = "gpio-leds"; - pinctrl-names = "default"; - pinctrl-0 = <&leds_pins_default>; - - status-led-red { - gpios = <&wkup_gpio0 32 GPIO_ACTIVE_HIGH>; - panic-indicator; - }; - - status-led-green { - gpios = <&wkup_gpio0 24 GPIO_ACTIVE_HIGH>; - }; - - user-led1-red { - gpios = <&pcal9535_3 14 GPIO_ACTIVE_HIGH>; - }; - - user-led1-green { - gpios = <&pcal9535_2 15 GPIO_ACTIVE_HIGH>; - }; - - user-led2-red { - gpios = <&wkup_gpio0 17 GPIO_ACTIVE_HIGH>; - }; - - user-led2-green { - gpios = <&wkup_gpio0 22 GPIO_ACTIVE_HIGH>; - }; - }; - - dp_refclk: clock { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <19200000>; - }; -}; - -&wkup_pmx0 { - wkup_i2c0_pins_default: wkup-i2c0-default-pins { - pinctrl-single,pins = < - /* (AC7) WKUP_I2C0_SCL */ - AM65X_WKUP_IOPAD(0x00e0, PIN_INPUT, 0) - /* (AD6) WKUP_I2C0_SDA */ - AM65X_WKUP_IOPAD(0x00e4, PIN_INPUT, 0) - >; - }; - - mcu_i2c0_pins_default: mcu-i2c0-default-pins { - pinctrl-single,pins = < - /* (AD8) MCU_I2C0_SCL */ - AM65X_WKUP_IOPAD(0x00e8, PIN_INPUT, 0) - /* (AD7) MCU_I2C0_SDA */ - AM65X_WKUP_IOPAD(0x00ec, PIN_INPUT, 0) - >; - }; - - arduino_i2c_aio_switch_pins_default: arduino-i2c-aio-switch-default-pins { - pinctrl-single,pins = < - /* (R2) WKUP_GPIO0_21 */ - AM65X_WKUP_IOPAD(0x0024, PIN_OUTPUT, 7) - >; - }; - - push_button_pins_default: push-button-default-pins { - pinctrl-single,pins = < - /* (T1) MCU_OSPI1_CLK.WKUP_GPIO0_25 */ - AM65X_WKUP_IOPAD(0x0034, PIN_INPUT, 7) - >; - }; - - arduino_uart_pins_default: arduino-uart-default-pins { - pinctrl-single,pins = < - /* (P4) MCU_UART0_RXD */ - AM65X_WKUP_IOPAD(0x0044, PIN_INPUT, 4) - /* (P5) MCU_UART0_TXD */ - AM65X_WKUP_IOPAD(0x0048, PIN_OUTPUT, 4) - >; - }; - - arduino_io_d2_to_d3_pins_default: arduino-io-d2-to-d3-default-pins { - pinctrl-single,pins = < - /* (P1) WKUP_GPIO0_31 */ - AM65X_WKUP_IOPAD(0x004C, PIN_OUTPUT, 7) - /* (N3) WKUP_GPIO0_33 */ - AM65X_WKUP_IOPAD(0x0054, PIN_OUTPUT, 7) - >; - }; - - arduino_io_oe_pins_default: arduino-io-oe-default-pins { - pinctrl-single,pins = < - /* (N4) WKUP_GPIO0_34 */ - AM65X_WKUP_IOPAD(0x0058, PIN_OUTPUT, 7) - /* (M2) WKUP_GPIO0_36 */ - AM65X_WKUP_IOPAD(0x0060, PIN_OUTPUT, 7) - /* (M3) WKUP_GPIO0_37 */ - AM65X_WKUP_IOPAD(0x0064, PIN_OUTPUT, 7) - /* (M4) WKUP_GPIO0_38 */ - AM65X_WKUP_IOPAD(0x0068, PIN_OUTPUT, 7) - /* (M1) WKUP_GPIO0_41 */ - AM65X_WKUP_IOPAD(0x0074, PIN_OUTPUT, 7) - >; - }; - - mcu_fss0_ospi0_pins_default: mcu-fss0-ospi0-default-pins { - pinctrl-single,pins = < - /* (V1) MCU_OSPI0_CLK */ - AM65X_WKUP_IOPAD(0x0000, PIN_OUTPUT, 0) - /* (U2) MCU_OSPI0_DQS */ - AM65X_WKUP_IOPAD(0x0008, PIN_INPUT, 0) - /* (U4) MCU_OSPI0_D0 */ - AM65X_WKUP_IOPAD(0x000c, PIN_INPUT, 0) - /* (U5) MCU_OSPI0_D1 */ - AM65X_WKUP_IOPAD(0x0010, PIN_INPUT, 0) - /* (R4) MCU_OSPI0_CSn0 */ - AM65X_WKUP_IOPAD(0x002c, PIN_OUTPUT, 0) - >; - }; - - db9_com_mode_pins_default: db9-com-mode-default-pins { - pinctrl-single,pins = < - /* (AD3) WKUP_GPIO0_5, used as uart0 mode 0 */ - AM65X_WKUP_IOPAD(0x00c4, PIN_OUTPUT, 7) - /* (AC3) WKUP_GPIO0_4, used as uart0 mode 1 */ - AM65X_WKUP_IOPAD(0x00c0, PIN_OUTPUT, 7) - /* (AC1) WKUP_GPIO0_7, used as uart0 term */ - AM65X_WKUP_IOPAD(0x00cc, PIN_OUTPUT, 7) - /* (AC2) WKUP_GPIO0_6, used as uart0 en */ - AM65X_WKUP_IOPAD(0x00c8, PIN_OUTPUT, 7) - >; - }; - - leds_pins_default: leds-default-pins { - pinctrl-single,pins = < - /* (T2) WKUP_GPIO0_17, used as user led1 red */ - AM65X_WKUP_IOPAD(0x0014, PIN_OUTPUT, 7) - /* (R3) WKUP_GPIO0_22, used as user led1 green */ - AM65X_WKUP_IOPAD(0x0028, PIN_OUTPUT, 7) - /* (R5) WKUP_GPIO0_24, used as status led red */ - AM65X_WKUP_IOPAD(0x0030, PIN_OUTPUT, 7) - /* (N2) WKUP_GPIO0_32, used as status led green */ - AM65X_WKUP_IOPAD(0x0050, PIN_OUTPUT, 7) - >; - }; - - mcu_spi0_pins_default: mcu-spi0-default-pins { - pinctrl-single,pins = < - /* (Y1) MCU_SPI0_CLK */ - AM65X_WKUP_IOPAD(0x0090, PIN_INPUT, 0) - /* (Y3) MCU_SPI0_D0 */ - AM65X_WKUP_IOPAD(0x0094, PIN_INPUT, 0) - /* (Y2) MCU_SPI0_D1 */ - AM65X_WKUP_IOPAD(0x0098, PIN_INPUT, 0) - /* (Y4) MCU_SPI0_CS0 */ - AM65X_WKUP_IOPAD(0x009c, PIN_OUTPUT, 0) - >; - }; - - minipcie_pins_default: minipcie-default-pins { - pinctrl-single,pins = < - /* (P2) MCU_OSPI1_DQS.WKUP_GPIO0_27 */ - AM65X_WKUP_IOPAD(0x003C, PIN_OUTPUT, 7) - >; - }; -}; - -&main_pmx0 { - main_uart1_pins_default: main-uart1-default-pins { - pinctrl-single,pins = < - AM65X_IOPAD(0x0174, PIN_INPUT, 6) /* (AE23) UART1_RXD */ - AM65X_IOPAD(0x014c, PIN_OUTPUT, 6) /* (AD23) UART1_TXD */ - AM65X_IOPAD(0x0178, PIN_INPUT, 6) /* (AD22) UART1_CTSn */ - AM65X_IOPAD(0x017c, PIN_OUTPUT, 6) /* (AC21) UART1_RTSn */ - >; - }; - - main_i2c3_pins_default: main-i2c3-default-pins { - pinctrl-single,pins = < - AM65X_IOPAD(0x01c0, PIN_INPUT, 2) /* (AF13) I2C3_SCL */ - AM65X_IOPAD(0x01d4, PIN_INPUT, 2) /* (AG12) I2C3_SDA */ - >; - }; - - main_mmc1_pins_default: main-mmc1-default-pins { - pinctrl-single,pins = < - AM65X_IOPAD(0x02d4, PIN_INPUT_PULLDOWN, 0) /* (C27) MMC1_CLK */ - AM65X_IOPAD(0x02d8, PIN_INPUT_PULLUP, 0) /* (C28) MMC1_CMD */ - AM65X_IOPAD(0x02d0, PIN_INPUT_PULLUP, 0) /* (D28) MMC1_DAT0 */ - AM65X_IOPAD(0x02cc, PIN_INPUT_PULLUP, 0) /* (E27) MMC1_DAT1 */ - AM65X_IOPAD(0x02c8, PIN_INPUT_PULLUP, 0) /* (D26) MMC1_DAT2 */ - AM65X_IOPAD(0x02c4, PIN_INPUT_PULLUP, 0) /* (D27) MMC1_DAT3 */ - AM65X_IOPAD(0x02dc, PIN_INPUT_PULLUP, 0) /* (B24) MMC1_SDCD */ - AM65X_IOPAD(0x02e0, PIN_INPUT_PULLUP, 0) /* (C24) MMC1_SDWP */ - >; - }; - - usb0_pins_default: usb0-default-pins { - pinctrl-single,pins = < - AM65X_IOPAD(0x02bc, PIN_OUTPUT, 0) /* (AD9) USB0_DRVVBUS */ - >; - }; - - usb1_pins_default: usb1-default-pins { - pinctrl-single,pins = < - AM65X_IOPAD(0x02c0, PIN_OUTPUT, 0) /* (AC8) USB1_DRVVBUS */ - >; - }; - - arduino_io_d4_to_d9_pins_default: arduino-io-d4-to-d9-default-pins { - pinctrl-single,pins = < - AM65X_IOPAD(0x0084, PIN_OUTPUT, 7) /* (AG18) GPIO0_33 */ - AM65X_IOPAD(0x008C, PIN_OUTPUT, 7) /* (AF17) GPIO0_35 */ - AM65X_IOPAD(0x0098, PIN_OUTPUT, 7) /* (AH16) GPIO0_38 */ - AM65X_IOPAD(0x00AC, PIN_OUTPUT, 7) /* (AH15) GPIO0_43 */ - AM65X_IOPAD(0x00C0, PIN_OUTPUT, 7) /* (AG15) GPIO0_48 */ - AM65X_IOPAD(0x00CC, PIN_OUTPUT, 7) /* (AD15) GPIO0_51 */ - >; - }; - - dss_vout1_pins_default: dss-vout1-default-pins { - pinctrl-single,pins = < - AM65X_IOPAD(0x0000, PIN_OUTPUT, 1) /* VOUT1_DATA0 */ - AM65X_IOPAD(0x0004, PIN_OUTPUT, 1) /* VOUT1_DATA1 */ - AM65X_IOPAD(0x0008, PIN_OUTPUT, 1) /* VOUT1_DATA2 */ - AM65X_IOPAD(0x000c, PIN_OUTPUT, 1) /* VOUT1_DATA3 */ - AM65X_IOPAD(0x0010, PIN_OUTPUT, 1) /* VOUT1_DATA4 */ - AM65X_IOPAD(0x0014, PIN_OUTPUT, 1) /* VOUT1_DATA5 */ - AM65X_IOPAD(0x0018, PIN_OUTPUT, 1) /* VOUT1_DATA6 */ - AM65X_IOPAD(0x001c, PIN_OUTPUT, 1) /* VOUT1_DATA7 */ - AM65X_IOPAD(0x0020, PIN_OUTPUT, 1) /* VOUT1_DATA8 */ - AM65X_IOPAD(0x0024, PIN_OUTPUT, 1) /* VOUT1_DATA9 */ - AM65X_IOPAD(0x0028, PIN_OUTPUT, 1) /* VOUT1_DATA10 */ - AM65X_IOPAD(0x002c, PIN_OUTPUT, 1) /* VOUT1_DATA11 */ - AM65X_IOPAD(0x0030, PIN_OUTPUT, 1) /* VOUT1_DATA12 */ - AM65X_IOPAD(0x0034, PIN_OUTPUT, 1) /* VOUT1_DATA13 */ - AM65X_IOPAD(0x0038, PIN_OUTPUT, 1) /* VOUT1_DATA14 */ - AM65X_IOPAD(0x003c, PIN_OUTPUT, 1) /* VOUT1_DATA15 */ - AM65X_IOPAD(0x0040, PIN_OUTPUT, 1) /* VOUT1_DATA16 */ - AM65X_IOPAD(0x0044, PIN_OUTPUT, 1) /* VOUT1_DATA17 */ - AM65X_IOPAD(0x0048, PIN_OUTPUT, 1) /* VOUT1_DATA18 */ - AM65X_IOPAD(0x004c, PIN_OUTPUT, 1) /* VOUT1_DATA19 */ - AM65X_IOPAD(0x0050, PIN_OUTPUT, 1) /* VOUT1_DATA20 */ - AM65X_IOPAD(0x0054, PIN_OUTPUT, 1) /* VOUT1_DATA21 */ - AM65X_IOPAD(0x0058, PIN_OUTPUT, 1) /* VOUT1_DATA22 */ - AM65X_IOPAD(0x005c, PIN_OUTPUT, 1) /* VOUT1_DATA23 */ - AM65X_IOPAD(0x0060, PIN_OUTPUT, 1) /* VOUT1_VSYNC */ - AM65X_IOPAD(0x0064, PIN_OUTPUT, 1) /* VOUT1_HSYNC */ - AM65X_IOPAD(0x0068, PIN_OUTPUT, 1) /* VOUT1_PCLK */ - AM65X_IOPAD(0x006c, PIN_OUTPUT, 1) /* VOUT1_DE */ - >; - }; - - dp_pins_default: dp-default-pins { - pinctrl-single,pins = < - AM65X_IOPAD(0x0078, PIN_OUTPUT, 7) /* (AF18) DP rst_n */ - >; - }; - - main_i2c2_pins_default: main-i2c2-default-pins { - pinctrl-single,pins = < - AM65X_IOPAD(0x0074, PIN_INPUT, 5) /* (T27) I2C2_SCL */ - AM65X_IOPAD(0x0070, PIN_INPUT, 5) /* (R25) I2C2_SDA */ - >; - }; -}; - -&main_pmx1 { - main_i2c0_pins_default: main-i2c0-default-pins { - pinctrl-single,pins = < - AM65X_IOPAD(0x0000, PIN_INPUT, 0) /* (D20) I2C0_SCL */ - AM65X_IOPAD(0x0004, PIN_INPUT, 0) /* (C21) I2C0_SDA */ - >; - }; - - main_i2c1_pins_default: main-i2c1-default-pins { - pinctrl-single,pins = < - AM65X_IOPAD(0x0008, PIN_INPUT, 0) /* (B21) I2C1_SCL */ - AM65X_IOPAD(0x000c, PIN_INPUT, 0) /* (E21) I2C1_SDA */ - >; - }; - - ecap0_pins_default: ecap0-default-pins { - pinctrl-single,pins = < - AM65X_IOPAD(0x0010, PIN_INPUT, 0) /* (D21) ECAP0_IN_APWM_OUT */ - >; - }; -}; - -&wkup_uart0 { - /* Wakeup UART is used by System firmware */ - status = "reserved"; -}; - -&main_uart1 { - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&main_uart1_pins_default>; -}; - -&mcu_uart0 { - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&arduino_uart_pins_default>; -}; - -&main_gpio0 { - pinctrl-names = "default"; - pinctrl-0 = <&arduino_io_d4_to_d9_pins_default>; - gpio-line-names = - "main_gpio0-base", "", "", "", "", "", "", "", "", "", - "", "", "", "", "", "", "", "", "", "", - "", "", "", "", "", "", "", "", "", "", - "", "", "", "IO4", "", "IO5", "", "", "IO6", "", - "", "", "", "IO7", "", "", "", "", "IO8", "", - "", "IO9"; -}; - -&wkup_gpio0 { - pinctrl-names = "default"; - pinctrl-0 = - <&arduino_io_d2_to_d3_pins_default>, - <&arduino_i2c_aio_switch_pins_default>, - <&arduino_io_oe_pins_default>, - <&push_button_pins_default>, - <&db9_com_mode_pins_default>; - gpio-line-names = - /* 0..9 */ - "wkup_gpio0-base", "", "", "", "UART0-mode1", "UART0-mode0", - "UART0-enable", "UART0-terminate", "", "WIFI-disable", - /* 10..19 */ - "", "", "", "", "", "", "", "", "", "", - /* 20..29 */ - "", "A4A5-I2C-mux", "", "", "", "USER-button", "", "", "","IO0", - /* 30..39 */ - "IO1", "IO2", "", "IO3", "IO17-direction", "A5", - "IO16-direction", "IO15-direction", "IO14-direction", "A3", - /* 40..49 */ - "", "IO18-direction", "A4", "A2", "A1", "A0", "", "", "IO13", - "IO11", - /* 50..51 */ - "IO12", "IO10"; -}; - -&wkup_i2c0 { - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&wkup_i2c0_pins_default>; - clock-frequency = <400000>; -}; - -&mcu_i2c0 { - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&mcu_i2c0_pins_default>; - clock-frequency = <400000>; - - psu: regulator@60 { - compatible = "ti,tps62363"; - reg = <0x60>; - regulator-name = "tps62363-vout"; - regulator-min-microvolt = <500000>; - regulator-max-microvolt = <1500000>; - regulator-boot-on; - ti,vsel0-state-high; - ti,vsel1-state-high; - ti,enable-vout-discharge; - }; - - /* D4200 */ - pcal9535_1: gpio@20 { - compatible = "nxp,pcal9535"; - reg = <0x20>; - #gpio-cells = <2>; - gpio-controller; - gpio-line-names = - "A0-pull", "A1-pull", "A2-pull", "A3-pull", "A4-pull", - "A5-pull", "", "", - "IO14-enable", "IO15-enable", "IO16-enable", - "IO17-enable", "IO18-enable", "IO19-enable"; - }; - - /* D4201 */ - pcal9535_2: gpio@21 { - compatible = "nxp,pcal9535"; - reg = <0x21>; - #gpio-cells = <2>; - gpio-controller; - gpio-line-names = - "IO0-direction", "IO1-direction", "IO2-direction", - "IO3-direction", "IO4-direction", "IO5-direction", - "IO6-direction", "IO7-direction", - "IO8-direction", "IO9-direction", "IO10-direction", - "IO11-direction", "IO12-direction", "IO13-direction", - "IO19-direction"; - }; - - /* D4202 */ - pcal9535_3: gpio@25 { - compatible = "nxp,pcal9535"; - reg = <0x25>; - #gpio-cells = <2>; - gpio-controller; - gpio-line-names = - "IO0-pull", "IO1-pull", "IO2-pull", "IO3-pull", - "IO4-pull", "IO5-pull", "IO6-pull", "IO7-pull", - "IO8-pull", "IO9-pull", "IO10-pull", "IO11-pull", - "IO12-pull", "IO13-pull"; - }; -}; - -&main_i2c0 { - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&main_i2c0_pins_default>; - clock-frequency = <400000>; - - rtc: rtc@51 { - compatible = "nxp,pcf8563"; - reg = <0x51>; - }; - - eeprom: eeprom@54 { - compatible = "atmel,24c08"; - reg = <0x54>; - pagesize = <16>; - }; -}; - -&main_i2c1 { - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&main_i2c1_pins_default>; - clock-frequency = <400000>; -}; - -&main_i2c2 { - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&main_i2c2_pins_default>; - clock-frequency = <400000>; -}; - -&main_i2c3 { - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&main_i2c3_pins_default>; - clock-frequency = <400000>; - - #address-cells = <1>; - #size-cells = <0>; - - edp-bridge@f { - compatible = "toshiba,tc358767"; - reg = <0x0f>; - pinctrl-names = "default"; - pinctrl-0 = <&dp_pins_default>; - reset-gpios = <&main_gpio0 30 GPIO_ACTIVE_HIGH>; - - clock-names = "ref"; - clocks = <&dp_refclk>; - - toshiba,hpd-pin = <0>; - - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@1 { - reg = <1>; - - bridge_in: endpoint { - remote-endpoint = <&dpi_out>; - }; - }; - }; - }; -}; - -&mcu_cpsw { - status = "disabled"; -}; - -&ecap0 { - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&ecap0_pins_default>; -}; - -&sdhci1 { - pinctrl-names = "default"; - pinctrl-0 = <&main_mmc1_pins_default>; - ti,driver-strength-ohm = <50>; - disable-wp; -}; - -&usb0 { - pinctrl-names = "default"; - pinctrl-0 = <&usb0_pins_default>; - dr_mode = "host"; -}; - -&usb1 { - pinctrl-names = "default"; - pinctrl-0 = <&usb1_pins_default>; - dr_mode = "host"; -}; - -&mcu_spi0 { - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&mcu_spi0_pins_default>; - - #address-cells = <1>; - #size-cells = <0>; - ti,pindir-d0-out-d1-in; -}; - -&tscadc1 { - status = "okay"; - adc { - ti,adc-channels = <0 1 2 3 4 5>; - }; -}; - -&ospi0 { - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&mcu_fss0_ospi0_pins_default>; - - flash@0 { - compatible = "jedec,spi-nor"; - reg = <0x0>; - spi-tx-bus-width = <1>; - spi-rx-bus-width = <1>; - spi-max-frequency = <50000000>; - cdns,tshsl-ns = <60>; - cdns,tsd2d-ns = <60>; - cdns,tchsh-ns = <60>; - cdns,tslch-ns = <60>; - cdns,read-delay = <2>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - seboot@0 { - label = "seboot"; - reg = <0x0 0x180000>; /* 1.5M */ - }; - - tispl@180000 { - label = "tispl"; - reg = <0x180000 0x200000>; /* 2M */ - }; - - u-boot@380000 { - label = "u-boot"; - reg = <0x380000 0x300000>; /* 3M */ - }; - - env@680000 { - label = "env"; - reg = <0x680000 0x20000>; /* 128K */ - }; - - env-backup@6a0000 { - label = "env.backup"; - reg = <0x6a0000 0x20000>; /* 128K */ - }; - - otpcmd@6c0000 { - label = "otpcmd"; - reg = <0x6c0000 0x10000>; /* 64K */ - }; - - unused@6d0000 { - label = "unused"; - reg = <0x6d0000 0x7b0000>; /* 7872K */ - }; - - seboot-backup@e80000 { - label = "seboot.backup"; - reg = <0xe80000 0x180000>; /* 1.5M */ - }; - }; - }; -}; - -&dss { - pinctrl-names = "default"; - pinctrl-0 = <&dss_vout1_pins_default>; - - assigned-clocks = <&k3_clks 67 2>; - assigned-clock-parents = <&k3_clks 67 5>; -}; - -&dss_ports { - #address-cells = <1>; - #size-cells = <0>; - port@1 { - reg = <1>; - - dpi_out: endpoint { - remote-endpoint = <&bridge_in>; - }; - }; -}; - -&pcie1_rc { - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&minipcie_pins_default>; - - num-lanes = <1>; - phys = <&serdes1 PHY_TYPE_PCIE 0>; - phy-names = "pcie-phy0"; - reset-gpios = <&wkup_gpio0 27 GPIO_ACTIVE_HIGH>; -}; - -&mailbox0_cluster0 { - status = "okay"; - interrupts = <436>; - - mbox_mcu_r5fss0_core0: mbox-mcu-r5fss0-core0 { - ti,mbox-tx = <1 0 0>; - ti,mbox-rx = <0 0 0>; - }; -}; - -&mailbox0_cluster1 { - status = "okay"; - interrupts = <432>; - - mbox_mcu_r5fss0_core1: mbox-mcu-r5fss0-core1 { - ti,mbox-tx = <1 0 0>; - ti,mbox-rx = <0 0 0>; - }; -}; - -&mcu_r5fss0_core0 { - memory-region = <&mcu_r5fss0_core0_dma_memory_region>, - <&mcu_r5fss0_core0_memory_region>; - mboxes = <&mailbox0_cluster0>, <&mbox_mcu_r5fss0_core0>; -}; - -&mcu_r5fss0_core1 { - memory-region = <&mcu_r5fss0_core1_dma_memory_region>, - <&mcu_r5fss0_core1_memory_region>; - mboxes = <&mailbox0_cluster1>, <&mbox_mcu_r5fss0_core1>; -}; - -&mcu_rti1 { - memory-region = <&wdt_reset_memory_region>; -}; diff --git a/arch/arm/dts/k3-am6528-iot2050-basic-common.dtsi b/arch/arm/dts/k3-am6528-iot2050-basic-common.dtsi deleted file mode 100644 index 5ab434c02ab..00000000000 --- a/arch/arm/dts/k3-am6528-iot2050-basic-common.dtsi +++ /dev/null @@ -1,61 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * Copyright (c) Siemens AG, 2018-2021 - * - * Authors: - * Le Jin - * Jan Kiszka - * - * Common bits of the IOT2050 Basic variant, PG1 and PG2 - */ - -#include "k3-am65-iot2050-common.dtsi" - -/ { - memory@80000000 { - device_type = "memory"; - /* 1G RAM */ - reg = <0x00000000 0x80000000 0x00000000 0x40000000>; - }; - - cpus { - cpu-map { - /delete-node/ cluster1; - }; - /delete-node/ cpu@100; - /delete-node/ cpu@101; - }; - - /delete-node/ l2-cache1; -}; - -/* eMMC */ -&sdhci0 { - status = "disabled"; -}; - -&main_pmx0 { - main_uart0_pins_default: main-uart0-default-pins { - pinctrl-single,pins = < - AM65X_IOPAD(0x01e4, PIN_INPUT, 0) /* (AF11) UART0_RXD */ - AM65X_IOPAD(0x01e8, PIN_OUTPUT, 0) /* (AE11) UART0_TXD */ - AM65X_IOPAD(0x01ec, PIN_INPUT, 0) /* (AG11) UART0_CTSn */ - AM65X_IOPAD(0x01f0, PIN_OUTPUT, 0) /* (AD11) UART0_RTSn */ - AM65X_IOPAD(0x0188, PIN_INPUT, 1) /* (D25) UART0_DCDn */ - AM65X_IOPAD(0x018c, PIN_INPUT, 1) /* (B26) UART0_DSRn */ - AM65X_IOPAD(0x0190, PIN_OUTPUT, 1) /* (A24) UART0_DTRn */ - AM65X_IOPAD(0x0194, PIN_INPUT, 1) /* (E24) UART0_RIN */ - >; - }; -}; - -&main_uart0 { - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&main_uart0_pins_default>; -}; - -&mcu_r5fss0 { - /* lock-step mode not supported on Basic boards */ - ti,cluster-mode = <0>; -}; diff --git a/arch/arm/dts/k3-am6528-iot2050-basic-pg2.dts b/arch/arm/dts/k3-am6528-iot2050-basic-pg2.dts deleted file mode 100644 index c62549a4b43..00000000000 --- a/arch/arm/dts/k3-am6528-iot2050-basic-pg2.dts +++ /dev/null @@ -1,24 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * Copyright (c) Siemens AG, 2018-2021 - * - * Authors: - * Le Jin - * Jan Kiszka - * - * AM6528-based (dual-core) IOT2050 Basic variant, Product Generation 2 - * 1 GB RAM, no eMMC, main_uart0 on connector X30 - * - * Product homepage: - * https://new.siemens.com/global/en/products/automation/pc-based/iot-gateways/simatic-iot2050.html - */ - -/dts-v1/; - -#include "k3-am6528-iot2050-basic-common.dtsi" -#include "k3-am65-iot2050-common-pg2.dtsi" - -/ { - compatible = "siemens,iot2050-basic-pg2", "ti,am654"; - model = "SIMATIC IOT2050 Basic PG2"; -}; diff --git a/arch/arm/dts/k3-am6528-iot2050-basic.dts b/arch/arm/dts/k3-am6528-iot2050-basic.dts deleted file mode 100644 index 87928ff2821..00000000000 --- a/arch/arm/dts/k3-am6528-iot2050-basic.dts +++ /dev/null @@ -1,24 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * Copyright (c) Siemens AG, 2018-2021 - * - * Authors: - * Le Jin - * Jan Kiszka - * - * AM6528-based (dual-core) IOT2050 Basic variant, Product Generation 1 - * 1 GB RAM, no eMMC, main_uart0 on connector X30 - * - * Product homepage: - * https://new.siemens.com/global/en/products/automation/pc-based/iot-gateways/simatic-iot2050.html - */ - -/dts-v1/; - -#include "k3-am6528-iot2050-basic-common.dtsi" -#include "k3-am65-iot2050-common-pg1.dtsi" - -/ { - compatible = "siemens,iot2050-basic", "ti,am654"; - model = "SIMATIC IOT2050 Basic"; -}; diff --git a/arch/arm/dts/k3-am6548-iot2050-advanced-common.dtsi b/arch/arm/dts/k3-am6548-iot2050-advanced-common.dtsi deleted file mode 100644 index be55494b1f3..00000000000 --- a/arch/arm/dts/k3-am6548-iot2050-advanced-common.dtsi +++ /dev/null @@ -1,52 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * Copyright (c) Siemens AG, 2018-2021 - * - * Authors: - * Le Jin - * Jan Kiszka - * - * Common bits of the IOT2050 Advanced variant, PG1 and PG2 - */ - -/dts-v1/; - -#include "k3-am65-iot2050-common.dtsi" - -/ { - memory@80000000 { - device_type = "memory"; - /* 2G RAM */ - reg = <0x00000000 0x80000000 0x00000000 0x80000000>; - }; -}; - -&main_pmx0 { - main_mmc0_pins_default: main-mmc0-default-pins { - pinctrl-single,pins = < - AM65X_IOPAD(0x01a8, PIN_INPUT_PULLDOWN, 0) /* (B25) MMC0_CLK */ - AM65X_IOPAD(0x01ac, PIN_INPUT_PULLUP, 0) /* (B27) MMC0_CMD */ - AM65X_IOPAD(0x01a4, PIN_INPUT_PULLUP, 0) /* (A26) MMC0_DAT0 */ - AM65X_IOPAD(0x01a0, PIN_INPUT_PULLUP, 0) /* (E25) MMC0_DAT1 */ - AM65X_IOPAD(0x019c, PIN_INPUT_PULLUP, 0) /* (C26) MMC0_DAT2 */ - AM65X_IOPAD(0x0198, PIN_INPUT_PULLUP, 0) /* (A25) MMC0_DAT3 */ - AM65X_IOPAD(0x0194, PIN_INPUT_PULLUP, 0) /* (E24) MMC0_DAT4 */ - AM65X_IOPAD(0x0190, PIN_INPUT_PULLUP, 0) /* (A24) MMC0_DAT5 */ - AM65X_IOPAD(0x018c, PIN_INPUT_PULLUP, 0) /* (B26) MMC0_DAT6 */ - AM65X_IOPAD(0x0188, PIN_INPUT_PULLUP, 0) /* (D25) MMC0_DAT7 */ - AM65X_IOPAD(0x01b8, PIN_OUTPUT_PULLUP, 7) /* (B23) MMC0_SDWP */ - AM65X_IOPAD(0x01b4, PIN_INPUT_PULLUP, 0) /* (A23) MMC0_SDCD */ - AM65X_IOPAD(0x01b0, PIN_INPUT, 0) /* (C25) MMC0_DS */ - >; - }; -}; - -/* eMMC */ -&sdhci0 { - pinctrl-names = "default"; - pinctrl-0 = <&main_mmc0_pins_default>; - bus-width = <8>; - non-removable; - ti,driver-strength-ohm = <50>; - disable-wp; -}; diff --git a/arch/arm/dts/k3-am6548-iot2050-advanced-m2-bkey-ekey-pcie-overlay.dtso b/arch/arm/dts/k3-am6548-iot2050-advanced-m2-bkey-ekey-pcie-overlay.dtso deleted file mode 100644 index c9e736098f9..00000000000 --- a/arch/arm/dts/k3-am6548-iot2050-advanced-m2-bkey-ekey-pcie-overlay.dtso +++ /dev/null @@ -1,27 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * IOT2050 M.2 variant, overlay for B-key PCIE0_LANE0 + E-key PCIE1_LANE0 - * Copyright (c) Siemens AG, 2022 - * - * Authors: - * Chao Zeng - * Jan Kiszka - */ - -/dts-v1/; -/plugin/; - -#include -#include - -&pcie0_rc { - num-lanes = <1>; - phys = <&serdes0 PHY_TYPE_PCIE 1>; - phy-names = "pcie-phy0"; - reset-gpios = <&main_gpio1 15 GPIO_ACTIVE_HIGH>; - status = "okay"; -}; - -&pcie1_rc { - status = "okay"; -}; diff --git a/arch/arm/dts/k3-am6548-iot2050-advanced-m2-bkey-usb3-overlay.dtso b/arch/arm/dts/k3-am6548-iot2050-advanced-m2-bkey-usb3-overlay.dtso deleted file mode 100644 index 72fc011bd54..00000000000 --- a/arch/arm/dts/k3-am6548-iot2050-advanced-m2-bkey-usb3-overlay.dtso +++ /dev/null @@ -1,47 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * IOT2050 M.2 variant, overlay for B-key USB3.0 + E-key PCIE1_LANE0 - * Copyright (c) Siemens AG, 2022 - * - * Authors: - * Chao Zeng - * Jan Kiszka - */ - -/dts-v1/; -/plugin/; - -#include -#include - -&serdes0 { - assigned-clock-parents = <&k3_clks 153 7>, <&k3_clks 153 4>; -}; - -&pcie0_rc { - status = "disabled"; -}; - -&pcie1_rc { - pinctrl-names = "default"; - pinctrl-0 = <&minipcie_pins_default>; - - num-lanes = <1>; - phys = <&serdes1 PHY_TYPE_PCIE 0>; - phy-names = "pcie-phy0"; - reset-gpios = <&wkup_gpio0 27 GPIO_ACTIVE_HIGH>; - status = "okay"; -}; - -&dwc3_0 { - assigned-clock-parents = <&k3_clks 151 4>, /* set REF_CLK to 20MHz i.e. PER0_PLL/48 */ - <&k3_clks 151 8>; /* set PIPE3_TXB_CLK to WIZ8B2M4VSB */ - phys = <&serdes0 PHY_TYPE_USB3 0>; - phy-names = "usb3-phy"; -}; - -&usb0 { - maximum-speed = "super-speed"; - snps,dis-u1-entry-quirk; - snps,dis-u2-entry-quirk; -}; diff --git a/arch/arm/dts/k3-am6548-iot2050-advanced-m2.dts b/arch/arm/dts/k3-am6548-iot2050-advanced-m2.dts deleted file mode 100644 index 774eb14ac90..00000000000 --- a/arch/arm/dts/k3-am6548-iot2050-advanced-m2.dts +++ /dev/null @@ -1,119 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * Copyright (c) Siemens AG, 2018-2023 - * - * Authors: - * Chao Zeng - * Jan Kiszka - * - * AM6548-based (quad-core) IOT2050 M.2 variant (based on Advanced Product - * Generation 2), 2 GB RAM, 16 GB eMMC, USB-serial converter on connector X30 - * - * Product homepage: - * https://new.siemens.com/global/en/products/automation/pc-based/iot-gateways/simatic-iot2050.html - */ - -#include "k3-am6548-iot2050-advanced-common.dtsi" -#include "k3-am65-iot2050-common-pg2.dtsi" - -/ { - compatible = "siemens,iot2050-advanced-m2", "ti,am654"; - model = "SIMATIC IOT2050 Advanced M2"; -}; - -&mcu_r5fss0 { - /* lock-step mode not supported on this board */ - ti,cluster-mode = <0>; -}; - -&main_pmx0 { - main_m2_enable_pins_default: main-m2-enable-default-pins { - pinctrl-single,pins = < - AM65X_IOPAD(0x01c4, PIN_INPUT_PULLUP, 7) /* (AH13) GPIO1_17 */ - >; - }; - - main_bkey_pcie_reset: main-bkey-pcie-reset-default-pins { - pinctrl-single,pins = < - AM65X_IOPAD(0x01bc, PIN_OUTPUT_PULLUP, 7) /* (AG13) GPIO1_15 */ - >; - }; - - main_pmx0_m2_config_pins_default: main-pmx0-m2-config-default-pins { - pinctrl-single,pins = < - AM65X_IOPAD(0x01c8, PIN_INPUT_PULLUP, 7) /* (AE13) GPIO1_18 */ - AM65X_IOPAD(0x01cc, PIN_INPUT_PULLUP, 7) /* (AD13) GPIO1_19 */ - >; - }; - - main_m2_pcie_mux_control: main-m2-pcie-mux-control-default-pins { - pinctrl-single,pins = < - AM65X_IOPAD(0x0148, PIN_INPUT_PULLUP, 7) /* (AG22) GPIO0_82 */ - AM65X_IOPAD(0x0160, PIN_INPUT_PULLUP, 7) /* (AE20) GPIO0_88 */ - AM65X_IOPAD(0x0164, PIN_INPUT_PULLUP, 7) /* (AF19) GPIO0_89 */ - >; - }; -}; - -&main_pmx1 { - main_pmx1_m2_config_pins_default: main-pmx1-m2-config-default-pins { - pinctrl-single,pins = < - AM65X_IOPAD(0x0018, PIN_INPUT_PULLUP, 7) /* (B22) GPIO1_88 */ - AM65X_IOPAD(0x001c, PIN_INPUT_PULLUP, 7) /* (C23) GPIO1_89 */ - >; - }; -}; - -&main_gpio0 { - pinctrl-names = "default"; - pinctrl-0 = - <&main_m2_pcie_mux_control>, - <&arduino_io_d4_to_d9_pins_default>; -}; - -&main_gpio1 { - pinctrl-names = "default"; - pinctrl-0 = - <&main_m2_enable_pins_default>, - <&main_pmx0_m2_config_pins_default>, - <&main_pmx1_m2_config_pins_default>, - <&cp2102n_reset_pin_default>; -}; - -/* - * Base configuration for B-key slot with PCIe x2, E-key with USB 2.0 only. - * Firmware switches to other modes via device tree overlays. - */ - -&serdes0 { - assigned-clocks = <&k3_clks 153 4>, <&serdes0 AM654_SERDES_CMU_REFCLK>; - assigned-clock-parents = <&k3_clks 153 8>, <&k3_clks 153 4>; -}; - -&pcie0_rc { - pinctrl-names = "default"; - pinctrl-0 = <&main_bkey_pcie_reset>; - - num-lanes = <2>; - phys = <&serdes0 PHY_TYPE_PCIE 1>, <&serdes1 PHY_TYPE_PCIE 1>; - phy-names = "pcie-phy0","pcie-phy1"; - reset-gpios = <&main_gpio1 15 GPIO_ACTIVE_HIGH>; - status = "okay"; -}; - -&pcie1_rc { - status = "disabled"; -}; - -&dwc3_0 { - assigned-clock-parents = <&k3_clks 151 4>, /* set REF_CLK to 20MHz i.e. PER0_PLL/48 */ - <&k3_clks 151 9>; /* set PIPE3_TXB_CLK to CLK_12M_RC/256 (for HS only) */ - /delete-property/ phys; - /delete-property/ phy-names; -}; - -&usb0 { - maximum-speed = "high-speed"; - /delete-property/ snps,dis-u1-entry-quirk; - /delete-property/ snps,dis-u2-entry-quirk; -}; diff --git a/arch/arm/dts/k3-am6548-iot2050-advanced-pg2.dts b/arch/arm/dts/k3-am6548-iot2050-advanced-pg2.dts deleted file mode 100644 index f00dc86d01b..00000000000 --- a/arch/arm/dts/k3-am6548-iot2050-advanced-pg2.dts +++ /dev/null @@ -1,29 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * Copyright (c) Siemens AG, 2018-2021 - * - * Authors: - * Le Jin - * Jan Kiszka - * - * AM6548-based (quad-core) IOT2050 Advanced variant, Product Generation 2 - * 2 GB RAM, 16 GB eMMC, USB-serial converter on connector X30 - * - * Product homepage: - * https://new.siemens.com/global/en/products/automation/pc-based/iot-gateways/simatic-iot2050.html - */ - -/dts-v1/; - -#include "k3-am6548-iot2050-advanced-common.dtsi" -#include "k3-am65-iot2050-common-pg2.dtsi" - -/ { - compatible = "siemens,iot2050-advanced-pg2", "ti,am654"; - model = "SIMATIC IOT2050 Advanced PG2"; -}; - -&mcu_r5fss0 { - /* lock-step mode not supported on this board */ - ti,cluster-mode = <0>; -}; diff --git a/arch/arm/dts/k3-am6548-iot2050-advanced.dts b/arch/arm/dts/k3-am6548-iot2050-advanced.dts deleted file mode 100644 index 077f165bdc6..00000000000 --- a/arch/arm/dts/k3-am6548-iot2050-advanced.dts +++ /dev/null @@ -1,24 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * Copyright (c) Siemens AG, 2018-2021 - * - * Authors: - * Le Jin - * Jan Kiszka - * - * AM6548-based (quad-core) IOT2050 Advanced variant, Product Generation 1 - * 2 GB RAM, 16 GB eMMC, USB-serial converter on connector X30 - * - * Product homepage: - * https://new.siemens.com/global/en/products/automation/pc-based/iot-gateways/simatic-iot2050.html - */ - -/dts-v1/; - -#include "k3-am6548-iot2050-advanced-common.dtsi" -#include "k3-am65-iot2050-common-pg1.dtsi" - -/ { - compatible = "siemens,iot2050-advanced", "ti,am654"; - model = "SIMATIC IOT2050 Advanced"; -}; diff --git a/board/siemens/iot2050/board.c b/board/siemens/iot2050/board.c index fad6bc04735..9d4c9cf1b31 100644 --- a/board/siemens/iot2050/board.c +++ b/board/siemens/iot2050/board.c @@ -395,8 +395,8 @@ int board_fit_config_name_match(const char *name) struct iot2050_info *info = IOT2050_INFO_DATA; char upper_name[32]; - /* skip the prefix "k3-am65x8-" */ - name += 10; + /* skip the prefix "ti/k3-am65x8-" */ + name += 13; if (info->magic != IOT2050_INFO_MAGIC || strlen(name) >= sizeof(upper_name)) diff --git a/configs/iot2050_defconfig b/configs/iot2050_defconfig index 22990ba1f96..78db6d21099 100644 --- a/configs/iot2050_defconfig +++ b/configs/iot2050_defconfig @@ -17,7 +17,7 @@ CONFIG_ENV_OFFSET=0x680000 CONFIG_ENV_SECT_SIZE=0x20000 CONFIG_DM_GPIO=y CONFIG_SPL_DM_SPI=y -CONFIG_DEFAULT_DEVICE_TREE="k3-am6528-iot2050-basic" +CONFIG_DEFAULT_DEVICE_TREE="ti/k3-am6528-iot2050-basic" CONFIG_SPL_TEXT_BASE=0x80080000 CONFIG_OF_LIBFDT_OVERLAY=y CONFIG_DM_RESET=y @@ -79,7 +79,11 @@ CONFIG_CMD_TIME=y # CONFIG_ISO_PARTITION is not set CONFIG_OF_CONTROL=y CONFIG_SPL_OF_CONTROL=y +CONFIG_OF_UPSTREAM=y +CONFIG_OF_LIST="ti/k3-am6528-iot2050-basic ti/k3-am6528-iot2050-basic-pg2 ti/k3-am6548-iot2050-advanced ti/k3-am6548-iot2050-advanced-pg2 ti/k3-am6548-iot2050-advanced-m2" +CONFIG_OF_OVERLAY_LIST="ti/k3-am6548-iot2050-advanced-m2-bkey-usb3 ti/k3-am6548-iot2050-advanced-m2-bkey-ekey-pcie" CONFIG_SPL_MULTI_DTB_FIT=y +CONFIG_SPL_OF_LIST="ti/k3-am6528-iot2050-basic" CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_SYS_REDUNDAND_ENVIRONMENT=y From patchwork Tue Oct 22 06:04:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 2000266 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=siemens.com header.i=jan.kiszka@siemens.com header.a=rsa-sha256 header.s=fm1 header.b=PaIYgXkv; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (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 4XXhWQ3wpcz1xtp for ; Tue, 22 Oct 2024 17:06:10 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B714E88F6C; Tue, 22 Oct 2024 08:04:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=siemens.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; secure) header.d=siemens.com header.i=jan.kiszka@siemens.com header.b="PaIYgXkv"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 859ED88F5E; Tue, 22 Oct 2024 08:04:38 +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=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, SPF_HELO_PASS,SPF_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mta-64-228.siemens.flowmailer.net (mta-64-228.siemens.flowmailer.net [185.136.64.228]) (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 5065C88E02 for ; Tue, 22 Oct 2024 08:04:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=siemens.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jan.kiszka@siemens.com Received: by mta-64-228.siemens.flowmailer.net with ESMTPSA id 2024102206043466f049aff969913681 for ; Tue, 22 Oct 2024 08:04:34 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=jan.kiszka@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc:References:In-Reply-To; bh=ZPH2xGic+MRq0YewuQduIu2O2kIQKIEmrwTHSZ5OhfY=; b=PaIYgXkvAkVmOf9ZykuRPEPsoJAqs3l7FB8ICY4NP2KbpcwDtNTmrPr2uyNqPkqXwGVKLv 3SWPg3Dno9x/lXPBD0DcetP9917ws1WRrfL3Dg5hhFmlHotCA97d6Asl++U0mXe3HiyhILM6 ZwUchnIgDsT/PC9omekjKwPVIMqIcPCC2ClOeuu8kQZvBg1iX8ff/krljOLQIBNpK4avdPU6 5x7HJYDnk+pBoSoe6Kohy6SOXfw0BSvpyN+SWtjDuQ57qGwD7pgXtn1Au+SgqKruecoBUslU NkHm7ZRnDfp6V2UVCeXJFBjVXsPwwZFmTFMQEH+Vq+c7QV4A5mdoaM0w==; From: Jan Kiszka To: U-Boot Mailing List Cc: Bryan Brattlof , Nishanth Menon Subject: [PATCH v2 10/13] board: iot2050: Support new IOT2050-SM variant Date: Tue, 22 Oct 2024 08:04:27 +0200 Message-ID: <5b9f683e79aa4d169bd6da24e9293dbeb2576925.1729577070.git.jan.kiszka@siemens.com> In-Reply-To: References: MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-294854:519-21489:flowmailer 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: Baocheng Su Main differences between the new variant and Advanced PG2: 1. Arduino interface is removed. Instead, an new ASIC is added for communicating with PLC 1200 signal modules. 2. USB 3.0 type A connector is removed, only USB 2.0 type A connector is avaiable. 3. DP interface is tailored down. Instead, to communicate with the PLC 1200 signal modules, a USB 3.0 type B connector is added but the signal is not USB. 4. DDR size is increased to 4 GB. 5. Two sensors are added, one tilt sensor and one light sensor. Signed-off-by: Baocheng Su [Jan: rebased over OF_UPSTREAM] Signed-off-by: Jan Kiszka --- arch/arm/dts/k3-am65-iot2050-boot-image.dtsi | 5 ++++- .../dts/k3-am6548-iot2050-advanced-sm-u-boot.dtsi | 1 + board/siemens/iot2050/board.c | 15 ++++++++++++++- configs/iot2050_defconfig | 2 +- doc/board/siemens/iot2050.rst | 4 +++- 5 files changed, 23 insertions(+), 4 deletions(-) create mode 120000 arch/arm/dts/k3-am6548-iot2050-advanced-sm-u-boot.dtsi diff --git a/arch/arm/dts/k3-am65-iot2050-boot-image.dtsi b/arch/arm/dts/k3-am65-iot2050-boot-image.dtsi index 1b31d412b4c..f49d6f262f2 100644 --- a/arch/arm/dts/k3-am65-iot2050-boot-image.dtsi +++ b/arch/arm/dts/k3-am65-iot2050-boot-image.dtsi @@ -229,7 +229,10 @@ }; fit@380000 { - fit,fdt-list-val = "ti/k3-am6528-iot2050-basic-pg2", "ti/k3-am6548-iot2050-advanced-pg2", "ti/k3-am6548-iot2050-advanced-m2"; + fit,fdt-list-val = "ti/k3-am6528-iot2050-basic-pg2", + "ti/k3-am6548-iot2050-advanced-pg2", + "ti/k3-am6548-iot2050-advanced-m2", + "ti/k3-am6548-iot2050-advanced-sm"; images { bkey-usb3-overlay { diff --git a/arch/arm/dts/k3-am6548-iot2050-advanced-sm-u-boot.dtsi b/arch/arm/dts/k3-am6548-iot2050-advanced-sm-u-boot.dtsi new file mode 120000 index 00000000000..859776d3ffe --- /dev/null +++ b/arch/arm/dts/k3-am6548-iot2050-advanced-sm-u-boot.dtsi @@ -0,0 +1 @@ +k3-am6528-iot2050-basic-pg2-u-boot.dtsi \ No newline at end of file diff --git a/board/siemens/iot2050/board.c b/board/siemens/iot2050/board.c index 9d4c9cf1b31..e6bedc38917 100644 --- a/board/siemens/iot2050/board.c +++ b/board/siemens/iot2050/board.c @@ -174,6 +174,14 @@ static bool board_is_m2(void) strcmp((char *)info->name, "IOT2050-ADVANCED-M2") == 0; } +static bool board_is_sm(void) +{ + struct iot2050_info *info = IOT2050_INFO_DATA; + + return info->magic == IOT2050_INFO_MAGIC && + strcmp((char *)info->name, "IOT2050-ADVANCED-SM") == 0; +} + static void remove_mmc1_target(void) { char *boot_targets = strdup(env_get("boot_targets")); @@ -189,7 +197,10 @@ static void remove_mmc1_target(void) static void enable_pcie_connector_power(void) { - set_pinvalue("gpio@601000_17", "P3V3_PCIE_CON_EN", 1); + if (board_is_sm()) + set_pinvalue("gpio@601000_22", "P3V3_PCIE_CON_EN", 1); + else + set_pinvalue("gpio@601000_17", "P3V3_PCIE_CON_EN", 1); udelay(4 * 100); } @@ -230,6 +241,8 @@ void set_board_info_env(void) fdtfile = "ti/k3-am6548-iot2050-advanced.dtb"; else if (board_is_m2()) fdtfile = "ti/k3-am6548-iot2050-advanced-m2.dtb"; + else if (board_is_sm()) + fdtfile = "ti/k3-am6548-iot2050-advanced-sm.dtb"; else fdtfile = "ti/k3-am6548-iot2050-advanced-pg2.dtb"; } else { diff --git a/configs/iot2050_defconfig b/configs/iot2050_defconfig index 78db6d21099..2624f0cb573 100644 --- a/configs/iot2050_defconfig +++ b/configs/iot2050_defconfig @@ -80,7 +80,7 @@ CONFIG_CMD_TIME=y CONFIG_OF_CONTROL=y CONFIG_SPL_OF_CONTROL=y CONFIG_OF_UPSTREAM=y -CONFIG_OF_LIST="ti/k3-am6528-iot2050-basic ti/k3-am6528-iot2050-basic-pg2 ti/k3-am6548-iot2050-advanced ti/k3-am6548-iot2050-advanced-pg2 ti/k3-am6548-iot2050-advanced-m2" +CONFIG_OF_LIST="ti/k3-am6528-iot2050-basic ti/k3-am6528-iot2050-basic-pg2 ti/k3-am6548-iot2050-advanced ti/k3-am6548-iot2050-advanced-pg2 ti/k3-am6548-iot2050-advanced-m2 ti/k3-am6548-iot2050-advanced-sm" CONFIG_OF_OVERLAY_LIST="ti/k3-am6548-iot2050-advanced-m2-bkey-usb3 ti/k3-am6548-iot2050-advanced-m2-bkey-ekey-pcie" CONFIG_SPL_MULTI_DTB_FIT=y CONFIG_SPL_OF_LIST="ti/k3-am6528-iot2050-basic" diff --git a/doc/board/siemens/iot2050.rst b/doc/board/siemens/iot2050.rst index d0c0a412097..37b23f6146b 100644 --- a/doc/board/siemens/iot2050.rst +++ b/doc/board/siemens/iot2050.rst @@ -8,7 +8,9 @@ The SIMATIC IOT2050 is an open industrial IoT gateway that is using the TI AM6528 GP (Basic variant) or the AM6548 HS (Advanced variant). The Advanced variant is prepared for secure boot. M.2 Variant also uses the AM6548 HS. Instead of a MiniPCI connector, it comes with two M.2 connectors and can -support 5G/WIFI/BT applications or connect an SSD. +support 5G/WIFI/BT applications or connect an SSD. Compared with the AM6548 +Advanced variant, SM variant removes the Arduino interface, and adds a new +ASIC for communicating with the PLC 1200 signal modules. The IOT2050 starts only from OSPI. It loads a Siemens-provided bootloader called SE-Boot for the MCU domain (R5F cores), then hands over to ATF and From patchwork Tue Oct 22 06:04:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 2000270 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=siemens.com header.i=jan.kiszka@siemens.com header.a=rsa-sha256 header.s=fm1 header.b=CkO44+nW; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (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 4XXhXD3zb2z1xtp for ; Tue, 22 Oct 2024 17:06:52 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 724BC892DB; Tue, 22 Oct 2024 08:04:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=siemens.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; secure) header.d=siemens.com header.i=jan.kiszka@siemens.com header.b="CkO44+nW"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C0A4D88E31; Tue, 22 Oct 2024 08:04:40 +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=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, SPF_HELO_PASS,SPF_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mta-64-226.siemens.flowmailer.net (mta-64-226.siemens.flowmailer.net [185.136.64.226]) (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 6BAA888D9C for ; Tue, 22 Oct 2024 08:04:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=siemens.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jan.kiszka@siemens.com Received: by mta-64-226.siemens.flowmailer.net with ESMTPSA id 202410220604340407e353008a999e01 for ; Tue, 22 Oct 2024 08:04:34 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=jan.kiszka@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc:References:In-Reply-To; bh=eM9CpalP0jNbG0jNQ8Vjec1ox+mg0xKNezQTWCO+VbA=; b=CkO44+nWgb0VwExs6au0yHvJ1jf+J3/I9KKvKfkW7JzIssaqkd2JqZza1+PRNdlThBrBvh YsT8VeTNfVmd5MIkcS3unBszU3FcbGknoMIkmxe7DdcXjAnq4gWLZ0H51+qamDoOWEYULpMD G/Ixc1HePdFfDr8LXWbYAeoLmurcZI3rBM2oe+nQjOTSXEZAZMqgakJoPaTnkjBZ660UKAMM +EOwQAOFPfruNyKM48NYJMiswTw7Ofur3jRgDuxo/UrAGaTE9ZdEm45PoJjDxQuoNsC+hdvI hFi8cw3oj4SUr8h0H1G9CzM88BYxefrHbO01YgeTPOJKh3A4abtZFoiA==; From: Jan Kiszka To: U-Boot Mailing List Cc: Bryan Brattlof , Nishanth Menon Subject: [PATCH v2 11/13] smbios: Fill UUID from sysinfo when available Date: Tue, 22 Oct 2024 08:04:28 +0200 Message-ID: <9e440edc2a6bdcb7d768d277dd6afb02ab941ecd.1729577070.git.jan.kiszka@siemens.com> In-Reply-To: References: MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-294854:519-21489:flowmailer 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: Jan Kiszka Allow for the sysinfo drivers to provide a system UUID to SMBIOS. Will be first used by the IOT2050 boards. Based on original patch by Li Hua Qian. Signed-off-by: Jan Kiszka Reviewed-by: Simon Glass --- include/sysinfo.h | 1 + lib/smbios.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/include/sysinfo.h b/include/sysinfo.h index 8a77ef44856..1c5008b5f23 100644 --- a/include/sysinfo.h +++ b/include/sysinfo.h @@ -49,6 +49,7 @@ enum sysinfo_id { SYSINFO_ID_SMBIOS_SYSTEM_SERIAL, SYSINFO_ID_SMBIOS_SYSTEM_SKU, SYSINFO_ID_SMBIOS_SYSTEM_FAMILY, + SYSINFO_ID_SMBIOS_SYSTEM_UUID, SYSINFO_ID_SMBIOS_BASEBOARD_MANUFACTURER, SYSINFO_ID_SMBIOS_BASEBOARD_PRODUCT, SYSINFO_ID_SMBIOS_BASEBOARD_VERSION, diff --git a/lib/smbios.c b/lib/smbios.c index 7c24ea129eb..1441fa4cde6 100644 --- a/lib/smbios.c +++ b/lib/smbios.c @@ -387,6 +387,7 @@ static int smbios_write_type1(ulong *current, int handle, struct smbios_type1 *t; int len = sizeof(struct smbios_type1); char *serial_str = env_get("serial#"); + char uuid[sizeof(t->uuid)]; t = map_sysmem(*current, len); memset(t, 0, sizeof(struct smbios_type1)); @@ -409,6 +410,9 @@ static int smbios_write_type1(ulong *current, int handle, SYSINFO_ID_SMBIOS_SYSTEM_SERIAL, NULL); } + if (!sysinfo_get_str(ctx->dev, SYSINFO_ID_SMBIOS_SYSTEM_UUID, + sizeof(uuid), uuid)) + strncpy((char *)t->uuid, uuid, sizeof(t->uuid)); t->wakeup_type = SMBIOS_WAKEUP_TYPE_UNKNOWN; t->sku_number = smbios_add_prop_si(ctx, "sku", SYSINFO_ID_SMBIOS_SYSTEM_SKU, NULL); From patchwork Tue Oct 22 06:04:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 2000268 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=siemens.com header.i=jan.kiszka@siemens.com header.a=rsa-sha256 header.s=fm1 header.b=eOZ7ozU9; dkim-atps=neutral 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 4XXhWq4sG4z1xtp for ; Tue, 22 Oct 2024 17:06:31 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 93E12892CD; Tue, 22 Oct 2024 08:04:44 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=siemens.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; secure) header.d=siemens.com header.i=jan.kiszka@siemens.com header.b="eOZ7ozU9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 455DA88FD9; Tue, 22 Oct 2024 08:04:40 +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=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, SPF_HELO_PASS,SPF_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mta-64-228.siemens.flowmailer.net (mta-64-228.siemens.flowmailer.net [185.136.64.228]) (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 E8C9688F8A for ; Tue, 22 Oct 2024 08:04:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=siemens.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jan.kiszka@siemens.com Received: by mta-64-228.siemens.flowmailer.net with ESMTPSA id 202410220604345db6c1bbb7db800500 for ; Tue, 22 Oct 2024 08:04:34 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=jan.kiszka@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc:References:In-Reply-To; bh=NrOyHsHnUQd9bJrX18sWYtDhoGTDFlA1hXeabaqwqsU=; b=eOZ7ozU9Qdand0h0r3yBEETayxZqyJMorcgR6tbawPjrj1z+U9U/3xoD143BNOAV/bJI9K prYZORGof1RwfHLXUwUYcI1yzgKo+WRB0qFb7gUai2BtLtAyb5Ayho16EywV5qnD/XiC1Mb5 tP43F33bVHeJK42xk+l3KuMTnxMX3qdSChPZOGnwMysrQIr9aOX/rvacLrbuo1wTzLbhibl6 /ciS3lLbuFyfnjaY1HmtlJ4QJ6LlSzLwR4d8a6xgmNW7HD6qG0XPvbfwMEuFfFMU80cl+zx2 oAhlEGxAb2ohdUMqmXbDTFxNFh0zJDOIJt6ZKL68qZ6eaynvfPYThMzg==; From: Jan Kiszka To: U-Boot Mailing List Cc: Bryan Brattlof , Nishanth Menon Subject: [PATCH v2 12/13] sysinfo: Add driver for IOT2050 boards Date: Tue, 22 Oct 2024 08:04:29 +0200 Message-ID: <64b2dae0ae60feded514b774f0e91c303c81a52d.1729577070.git.jan.kiszka@siemens.com> In-Reply-To: References: MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-294854:519-21489:flowmailer 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: Li Hua Qian This brings a sysinfo driver and DT entry for the IOT2050 board series. It translates the board information passed from SE-Boot to SPL into values that can be retrieved via the sysinfo API. Will is already used to fill the SMBIOS table when booting via EFI. Signed-off-by: Li Hua Qian [Jan: split-off as separate patch, cleanup] Signed-off-by: Jan Kiszka --- .../dts/k3-am65-iot2050-common-u-boot.dtsi | 18 +++ configs/iot2050_defconfig | 1 + drivers/sysinfo/Kconfig | 7 + drivers/sysinfo/Makefile | 1 + drivers/sysinfo/iot2050.c | 143 ++++++++++++++++++ drivers/sysinfo/iot2050.h | 26 ++++ 6 files changed, 196 insertions(+) create mode 100644 drivers/sysinfo/iot2050.c create mode 100644 drivers/sysinfo/iot2050.h diff --git a/arch/arm/dts/k3-am65-iot2050-common-u-boot.dtsi b/arch/arm/dts/k3-am65-iot2050-common-u-boot.dtsi index b6d2c816acc..55337179f9f 100644 --- a/arch/arm/dts/k3-am65-iot2050-common-u-boot.dtsi +++ b/arch/arm/dts/k3-am65-iot2050-common-u-boot.dtsi @@ -14,6 +14,24 @@ spi0 = &ospi0; }; + sysinfo { + compatible = "siemens,sysinfo-iot2050"; + /* TI_SRAM_SCRATCH_BOARD_EEPROM_START */ + offset = <0x40280000>; + bootph-all; + + smbios { + system { + manufacturer = "SIEMENS AG"; + product = "SIMATIC IOT2050"; + }; + + baseboard { + manufacturer = "SIEMENS AG"; + }; + }; + }; + leds { bootph-all; status-led-red { diff --git a/configs/iot2050_defconfig b/configs/iot2050_defconfig index 2624f0cb573..574e232d119 100644 --- a/configs/iot2050_defconfig +++ b/configs/iot2050_defconfig @@ -141,6 +141,7 @@ CONFIG_SOC_TI=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_CADENCE_QSPI=y +CONFIG_SYSINFO=y CONFIG_SYSRESET=y CONFIG_SPL_SYSRESET=y CONFIG_SYSRESET_TI_SCI=y diff --git a/drivers/sysinfo/Kconfig b/drivers/sysinfo/Kconfig index 2030e4babc9..df83df69ffb 100644 --- a/drivers/sysinfo/Kconfig +++ b/drivers/sysinfo/Kconfig @@ -31,6 +31,13 @@ config SYSINFO_RCAR3 help Support querying SoC version information for Renesas R-Car Gen3. +config SYSINFO_IOT2050 + bool "Enable sysinfo driver for the Siemens IOT2050" + depends on TARGET_IOT2050_A53 + default y if TARGET_IOT2050_A53 + help + Support querying device information for Siemens IOT2050. + config SYSINFO_SANDBOX bool "Enable sysinfo driver for the Sandbox board" help diff --git a/drivers/sysinfo/Makefile b/drivers/sysinfo/Makefile index 680dde77fe8..26ca3150999 100644 --- a/drivers/sysinfo/Makefile +++ b/drivers/sysinfo/Makefile @@ -5,6 +5,7 @@ obj-y += sysinfo-uclass.o obj-$(CONFIG_SYSINFO_GAZERBEAM) += gazerbeam.o obj-$(CONFIG_SYSINFO_GPIO) += gpio.o +obj-$(CONFIG_SYSINFO_IOT2050) += iot2050.o obj-$(CONFIG_SYSINFO_RCAR3) += rcar3.o obj-$(CONFIG_SYSINFO_SANDBOX) += sandbox.o obj-$(CONFIG_SYSINFO_SMBIOS) += smbios.o diff --git a/drivers/sysinfo/iot2050.c b/drivers/sysinfo/iot2050.c new file mode 100644 index 00000000000..5359d6b8d62 --- /dev/null +++ b/drivers/sysinfo/iot2050.c @@ -0,0 +1,143 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) Siemens AG, 2024 + */ + +#include +#include +#include +#include + +#include "iot2050.h" + +#define IOT2050_INFO_MAGIC 0x20502050 + +struct iot2050_info { + u32 magic; + u16 size; + char name[20 + 1]; + char serial[16 + 1]; + char mlfb[18 + 1]; + char uuid[32 + 1]; + char a5e[18 + 1]; + u8 mac_addr_cnt; + u8 mac_addr[8][ARP_HLEN]; + char seboot_version[40 + 1]; + u8 padding[3]; + u32 ddr_size_mb; +} __packed; + +/** + * struct sysinfo_iot2050_priv - sysinfo private data + * @info: iot2050 board info + */ +struct sysinfo_iot2050_priv { + struct iot2050_info *info; +}; + +static int sysinfo_iot2050_detect(struct udevice *dev) +{ + struct sysinfo_iot2050_priv *priv = dev_get_priv(dev); + + if (priv->info == NULL || priv->info->magic != IOT2050_INFO_MAGIC) + return -EFAULT; + + return 0; +} + +static int sysinfo_iot2050_get_str(struct udevice *dev, int id, size_t size, + char *val) +{ + struct sysinfo_iot2050_priv *priv = dev_get_priv(dev); + char byte_str[3] = {0}; + unsigned int n; + + switch (id) { + case BOARD_NAME: + strncpy(val, priv->info->name, size); + break; + case BOARD_SERIAL: + strncpy(val, priv->info->serial, size); + break; + case BOARD_MLFB: + strncpy(val, priv->info->mlfb, size); + break; + case BOARD_UUID: + for (n = 0; n < min(size, (size_t)16); n++) { + memcpy(byte_str, priv->info->uuid + n * 2, 2); + val[n] = (char)hextoul(byte_str, NULL); + } + break; + case BOARD_A5E: + strncpy(val, priv->info->a5e, size); + break; + case BOARD_SEBOOT_VER: + strncpy(val, priv->info->seboot_version, size); + break; + case BOARD_MAC_ADDR_1: + case BOARD_MAC_ADDR_2: + case BOARD_MAC_ADDR_3: + case BOARD_MAC_ADDR_4: + case BOARD_MAC_ADDR_5: + case BOARD_MAC_ADDR_6: + case BOARD_MAC_ADDR_7: + case BOARD_MAC_ADDR_8: + memcpy(val, priv->info->mac_addr[id - BOARD_MAC_ADDR_START], + ARP_HLEN); + return 0; + case BOARD_DDR_SIZE: + memcpy(val, &priv->info->ddr_size_mb, + sizeof(priv->info->ddr_size_mb)); + return 0; + default: + return -EINVAL; + }; + + val[size - 1] = '\0'; + return 0; +} + +static int sysinfo_iot2050_get_int(struct udevice *dev, int id, int *val) +{ + struct sysinfo_iot2050_priv *priv = dev_get_priv(dev); + + switch (id) { + case BOARD_MAC_ADDR_CNT: + *val = priv->info->mac_addr_cnt; + return 0; + default: + return -EINVAL; + }; +} + +static const struct sysinfo_ops sysinfo_iot2050_ops = { + .detect = sysinfo_iot2050_detect, + .get_str = sysinfo_iot2050_get_str, + .get_int = sysinfo_iot2050_get_int, +}; + +static int sysinfo_iot2050_probe(struct udevice *dev) +{ + struct sysinfo_iot2050_priv *priv = dev_get_priv(dev); + unsigned long offset; + + offset = dev_read_u32_default(dev, "offset", + TI_SRAM_SCRATCH_BOARD_EEPROM_START); + priv->info = (struct iot2050_info *)offset; + + return 0; +} + +static const struct udevice_id sysinfo_iot2050_ids[] = { + { .compatible = "siemens,sysinfo-iot2050" }, + { /* sentinel */ } +}; + +U_BOOT_DRIVER(sysinfo_iot2050) = { + .name = "sysinfo_iot2050", + .id = UCLASS_SYSINFO, + .of_match = sysinfo_iot2050_ids, + .ops = &sysinfo_iot2050_ops, + .priv_auto = sizeof(struct sysinfo_iot2050_priv), + .probe = sysinfo_iot2050_probe, +}; diff --git a/drivers/sysinfo/iot2050.h b/drivers/sysinfo/iot2050.h new file mode 100644 index 00000000000..f659a8282b5 --- /dev/null +++ b/drivers/sysinfo/iot2050.h @@ -0,0 +1,26 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) Siemens AG, 2024 + */ + +#include + +enum sysinfo_id_iot2050 { + BOARD_MLFB = SYSINFO_ID_SMBIOS_SYSTEM_VERSION, + BOARD_SERIAL = SYSINFO_ID_SMBIOS_SYSTEM_SERIAL, + BOARD_UUID = SYSINFO_ID_SMBIOS_SYSTEM_UUID, + BOARD_A5E = SYSINFO_ID_SMBIOS_BASEBOARD_PRODUCT, + BOARD_NAME = SYSINFO_ID_SMBIOS_BASEBOARD_VERSION, + BOARD_SEBOOT_VER = SYSINFO_ID_USER + 0, + BOARD_MAC_ADDR_CNT = SYSINFO_ID_USER + 1, + BOARD_MAC_ADDR_1 = SYSINFO_ID_USER + 2, + BOARD_MAC_ADDR_START = BOARD_MAC_ADDR_1, + BOARD_MAC_ADDR_2 = SYSINFO_ID_USER + 3, + BOARD_MAC_ADDR_3 = SYSINFO_ID_USER + 4, + BOARD_MAC_ADDR_4 = SYSINFO_ID_USER + 5, + BOARD_MAC_ADDR_5 = SYSINFO_ID_USER + 6, + BOARD_MAC_ADDR_6 = SYSINFO_ID_USER + 7, + BOARD_MAC_ADDR_7 = SYSINFO_ID_USER + 8, + BOARD_MAC_ADDR_8 = SYSINFO_ID_USER + 9, + BOARD_DDR_SIZE = SYSINFO_ID_USER + 10, +}; From patchwork Tue Oct 22 06:04:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 2000269 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=siemens.com header.i=jan.kiszka@siemens.com header.a=rsa-sha256 header.s=fm1 header.b=MG6k8aXy; dkim-atps=neutral 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 4XXhX206bRz1xwf for ; Tue, 22 Oct 2024 17:06:41 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0A25F892D5; Tue, 22 Oct 2024 08:04:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=siemens.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; secure) header.d=siemens.com header.i=jan.kiszka@siemens.com header.b="MG6k8aXy"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 771E588EFB; Tue, 22 Oct 2024 08:04:40 +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=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, SPF_HELO_PASS,SPF_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mta-64-228.siemens.flowmailer.net (mta-64-228.siemens.flowmailer.net [185.136.64.228]) (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 3F16188F82 for ; Tue, 22 Oct 2024 08:04:35 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=siemens.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jan.kiszka@siemens.com Received: by mta-64-228.siemens.flowmailer.net with ESMTPSA id 202410220604340c71802f7e97bb359b for ; Tue, 22 Oct 2024 08:04:34 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=jan.kiszka@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc:References:In-Reply-To; bh=tV4DrDemqUcN6H5XpWpN2fo3oAli/E+sxNjfyERGKUA=; b=MG6k8aXy67exlVaqHIVukF2iTSBWIlSq02lXmq2l/T3ZrM5TyT3p2K7f6cpngENHI7OCOr DntoVC6PHap2wmDUzXuAWgVm204z9lSxP9S09xQ8gYABTdz4ZapxWhW9doJfBwSyGC24a05E g8DFr4zP+H5XowpjoYbI636FNzq0qwpCpiZbU19MhryK8O7+fSvrfiWvkfOpnAi6xx5pARxr YjoONzdp/2qyry9bDeQMiztguVOp2QpgQN36mfUCLUP1tKPspVw9DTEMSlhA8wH9IKml6UOR +y8iAv+ZgEU1iG16r9LLhZmJC8C7O3NFOD9M2kt8zJNtrYs8MJRgJRRA==; From: Jan Kiszka To: U-Boot Mailing List Cc: Bryan Brattlof , Nishanth Menon Subject: [PATCH v2 13/13] board: siemens: iot2050: Use sysinfo for board initialization Date: Tue, 22 Oct 2024 08:04:30 +0200 Message-ID: <4b15546c745a160cad76e563a7ddedf68bbeda2c.1729577070.git.jan.kiszka@siemens.com> In-Reply-To: References: MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-294854:519-21489:flowmailer 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: Li Hua Qian Drop the info structure parsing of the board in favor of our new sysinfo driver to avoid code duplication. Signed-off-by: Baocheng Su Signed-off-by: Li Hua Qian [Jan: rebasing, split-up, cleanup] Signed-off-by: Jan Kiszka --- arch/arm/mach-k3/am65x/Kconfig | 2 + board/siemens/iot2050/board.c | 142 +++++++++++++++++++-------------- configs/iot2050_defconfig | 1 - 3 files changed, 82 insertions(+), 63 deletions(-) diff --git a/arch/arm/mach-k3/am65x/Kconfig b/arch/arm/mach-k3/am65x/Kconfig index f17b641e136..88c6be33a7b 100644 --- a/arch/arm/mach-k3/am65x/Kconfig +++ b/arch/arm/mach-k3/am65x/Kconfig @@ -34,6 +34,8 @@ config TARGET_IOT2050_A53 select BOARD_LATE_INIT select SYS_DISABLE_DCACHE_OPS select BINMAN + select SYSINFO + select SPL_SYSINFO if SPL help This builds U-Boot for the IOT2050 devices. diff --git a/board/siemens/iot2050/board.c b/board/siemens/iot2050/board.c index e6bedc38917..c355f5bd3fd 100644 --- a/board/siemens/iot2050/board.c +++ b/board/siemens/iot2050/board.c @@ -21,32 +21,12 @@ #include #include #include +#include #include #include #include -#define IOT2050_INFO_MAGIC 0x20502050 - -struct iot2050_info { - u32 magic; - u16 size; - char name[20 + 1]; - char serial[16 + 1]; - char mlfb[18 + 1]; - char uuid[32 + 1]; - char a5e[18 + 1]; - u8 mac_addr_cnt; - u8 mac_addr[8][ARP_HLEN]; - char seboot_version[40 + 1]; - u8 padding[3]; - u32 ddr_size_mb; -} __packed; - -/* - * Scratch SRAM (available before DDR RAM) contains extracted EEPROM data. - */ -#define IOT2050_INFO_DATA ((struct iot2050_info *) \ - TI_SRAM_SCRATCH_BOARD_EEPROM_START) +#include "../../../../drivers/sysinfo/iot2050.h" DECLARE_GLOBAL_DATA_PTR; @@ -117,6 +97,8 @@ static const char *m2_connector_mode_name[] = { static enum m2_connector_mode connector_mode; +static char iot2050_board_name[21]; + #if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) static void *connector_overlay; static u32 connector_overlay_size; @@ -149,37 +131,57 @@ static void set_pinvalue(const char *gpio_name, const char *label, int value) dm_gpio_set_value(&gpio, value); } +static bool setup_sysinfo(struct udevice **sysinfo_ptr) +{ + if (sysinfo_get(sysinfo_ptr)) { + pr_err("Could not find sysinfo device.\n"); + return false; + } + if (sysinfo_detect(*sysinfo_ptr)) { + pr_err("Board info parsing error\n"); + return false; + } + return true; +} + +static void get_board_name(void) +{ + struct udevice *sysinfo; + + if (iot2050_board_name[0] != 0) + return; + + if (!setup_sysinfo(&sysinfo)) + return; + + sysinfo_get_str(sysinfo, BOARD_NAME, sizeof(iot2050_board_name), + iot2050_board_name); +} + static bool board_is_advanced(void) { - struct iot2050_info *info = IOT2050_INFO_DATA; - return info->magic == IOT2050_INFO_MAGIC && - strstr((char *)info->name, "IOT2050-ADVANCED") != NULL; + get_board_name(); + return strstr(iot2050_board_name, "IOT2050-ADVANCED") != NULL; } static bool board_is_pg1(void) { - struct iot2050_info *info = IOT2050_INFO_DATA; - - return info->magic == IOT2050_INFO_MAGIC && - (strcmp((char *)info->name, "IOT2050-BASIC") == 0 || - strcmp((char *)info->name, "IOT2050-ADVANCED") == 0); + get_board_name(); + return strcmp(iot2050_board_name, "IOT2050-BASIC") == 0 || + strcmp(iot2050_board_name, "IOT2050-ADVANCED") == 0; } static bool board_is_m2(void) { - struct iot2050_info *info = IOT2050_INFO_DATA; - - return info->magic == IOT2050_INFO_MAGIC && - strcmp((char *)info->name, "IOT2050-ADVANCED-M2") == 0; + get_board_name(); + return strcmp(iot2050_board_name, "IOT2050-ADVANCED-M2") == 0; } static bool board_is_sm(void) { - struct iot2050_info *info = IOT2050_INFO_DATA; - - return info->magic == IOT2050_INFO_MAGIC && - strcmp((char *)info->name, "IOT2050-ADVANCED-SM") == 0; + get_board_name(); + return strcmp(iot2050_board_name, "IOT2050-ADVANCED-SM") == 0; } static void remove_mmc1_target(void) @@ -206,33 +208,40 @@ static void enable_pcie_connector_power(void) void set_board_info_env(void) { - struct iot2050_info *info = IOT2050_INFO_DATA; - u8 __maybe_unused mac_cnt; + struct udevice *sysinfo; const char *fdtfile; + char buf[41]; - if (info->magic != IOT2050_INFO_MAGIC) { - pr_err("IOT2050: Board info parsing error!\n"); + if (env_get("board_uuid")) return; - } - if (env_get("board_uuid")) + if (!setup_sysinfo(&sysinfo)) return; - env_set("board_name", info->name); - env_set("board_serial", info->serial); - env_set("mlfb", info->mlfb); - env_set("board_uuid", info->uuid); - env_set("board_a5e", info->a5e); + if (sysinfo_get_str(sysinfo, BOARD_NAME, sizeof(buf), buf) == 0) + env_set("board_name", buf); + if (sysinfo_get_str(sysinfo, BOARD_SERIAL, sizeof(buf), buf) == 0) + env_set("board_serial", buf); + if (sysinfo_get_str(sysinfo, BOARD_MLFB, sizeof(buf), buf) == 0) + env_set("mlfb", buf); + if (sysinfo_get_str(sysinfo, BOARD_UUID, sizeof(buf), buf) == 0) + env_set("board_uuid", buf); + if (sysinfo_get_str(sysinfo, BOARD_A5E, sizeof(buf), buf) == 0) + env_set("board_a5e", buf); + if (sysinfo_get_str(sysinfo, BOARD_SEBOOT_VER, sizeof(buf), buf) == 0) + env_set("seboot_version", buf); env_set("fw_version", PLAIN_VERSION); - env_set("seboot_version", info->seboot_version); if (IS_ENABLED(CONFIG_NET)) { + int mac_cnt, n; + + sysinfo_get_int(sysinfo, BOARD_MAC_ADDR_CNT, &mac_cnt); /* set MAC addresses to ensure forwarding to the OS */ - for (mac_cnt = 0; mac_cnt < info->mac_addr_cnt; mac_cnt++) { - if (is_valid_ethaddr(info->mac_addr[mac_cnt])) - eth_env_set_enetaddr_by_index("eth", - mac_cnt + 1, - info->mac_addr[mac_cnt]); + for (n = 0; n < mac_cnt; n++) { + sysinfo_get_str(sysinfo, BOARD_MAC_ADDR_START + n, + sizeof(buf), buf); + if (is_valid_ethaddr(buf)) + eth_env_set_enetaddr_by_index("eth", n + 1, buf); } } @@ -288,7 +297,7 @@ static void do_overlay_prepare(const char *overlay_path) return; fit_error: - pr_err("M.2 device tree overlay %s not available,\n", overlay_path); + pr_err("M.2 device tree overlay %s not available.\n", overlay_path); #endif } @@ -362,8 +371,17 @@ int board_init(void) int dram_init(void) { - struct iot2050_info *info = IOT2050_INFO_DATA; - gd->ram_size = ((phys_size_t)(info->ddr_size_mb)) << 20; + struct udevice *sysinfo; + char buf[10]; + + if (!setup_sysinfo(&sysinfo)) + return -ENODEV; + + sysinfo_get_str(sysinfo, BOARD_DDR_SIZE, sizeof(buf), buf); + + u32 ddr_size_mb = *((u32 *)buf); + + gd->ram_size = ((phys_size_t)(ddr_size_mb)) << 20; return 0; } @@ -405,18 +423,18 @@ int dram_init_banksize(void) #ifdef CONFIG_SPL_LOAD_FIT int board_fit_config_name_match(const char *name) { - struct iot2050_info *info = IOT2050_INFO_DATA; char upper_name[32]; + get_board_name(); + /* skip the prefix "ti/k3-am65x8-" */ name += 13; - if (info->magic != IOT2050_INFO_MAGIC || - strlen(name) >= sizeof(upper_name)) + if (strlen(name) >= sizeof(upper_name)) return -1; str_to_upper(name, upper_name, sizeof(upper_name)); - if (!strcmp(upper_name, (char *)info->name)) + if (!strcmp(upper_name, iot2050_board_name)) return 0; return -1; diff --git a/configs/iot2050_defconfig b/configs/iot2050_defconfig index 574e232d119..2624f0cb573 100644 --- a/configs/iot2050_defconfig +++ b/configs/iot2050_defconfig @@ -141,7 +141,6 @@ CONFIG_SOC_TI=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_CADENCE_QSPI=y -CONFIG_SYSINFO=y CONFIG_SYSRESET=y CONFIG_SPL_SYSRESET=y CONFIG_SYSRESET_TI_SCI=y