From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 349A4C00140 for ; Wed, 10 Aug 2022 10:54:37 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7C4E880469; Wed, 10 Aug 2022 12:54:35 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="C+Bb3yx0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8788780192; Wed, 10 Aug 2022 12:54:33 +0200 (CEST) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) (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 150E280469 for ; Wed, 10 Aug 2022 12:54:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 6648DB81A71; Wed, 10 Aug 2022 10:54:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F2E7FC433D7; Wed, 10 Aug 2022 10:54:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1660128869; bh=lnVCl5kMsmocK5FQV2vgQD1xLABAmFbzJYQbShjR69Q=; h=From:To:Cc:Subject:Date:From; b=C+Bb3yx02vGtrh/Y0I3jW20lfUEcSGqCNltcpVoFRnsFg12EU++Gwj6FmDBe5jlp0 0kg62rQ1YpcCXaPMGJLXgJP3MEnVmJaZVd7qo/KGGMqcih7P9g+SL69q25gpcnglY4 EelVweqHClzYtvG8YPbYEWQx7ixO0LqtWC5E7BngtZl6x1IrABB1SZszJL1irqkZ5E HMN56+QxO6xvQL7RL4GhmBzYGHivYxGtk7OyvQeey3eJ0z2fh0f15g3vMYVt6eTulj vJBNgUrT3bjYHpLjQmblp/iGwmpS+qHbfvCZ6vjRg/Gd270mLtf6zvqpDQFWh351wY QEQqPA/mSdaVw== Received: by pali.im (Postfix) id E6837895; Wed, 10 Aug 2022 12:54:25 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Stefan Roese , =?UTF-8?q?Marek=20Beh=C3=BAn?= Cc: u-boot@lists.denx.de Subject: [PATCH] arm: mvebu: turris_mox: Set "sfp" label in eth1 DT node when only Mox SFP is detected Date: Wed, 10 Aug 2022 12:54:11 +0200 Message-Id: <20220810105411.13577-1-pali@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean When Mox SFP module is connected after Topaz or Peridot module then port DT node already contains "sfp" label. But Mox SFP module can be connected also without Topaz or Peridot module in which case it is connected directly into he eth1 DT node, which is without any label. So add "sfp" label into eth1 DT node in this case. Signed-off-by: Pali Rohár --- board/CZ.NIC/turris_mox/turris_mox.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/board/CZ.NIC/turris_mox/turris_mox.c b/board/CZ.NIC/turris_mox/turris_mox.c index 28259e71405f..3dbd68e52366 100644 --- a/board/CZ.NIC/turris_mox/turris_mox.c +++ b/board/CZ.NIC/turris_mox/turris_mox.c @@ -821,6 +821,11 @@ int ft_board_setup(void *blob, struct bd_info *bd) "sgmii"); if (res < 0) return res; + + res = fdt_setprop_string(blob, node, "label", + "sfp"); + if (res < 0) + return res; } res = fdt_status_okay_by_compatible(blob, "cznic,moxtet-gpio"); -- 2.20.1