public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali@kernel.org>
To: "Stefan Roese" <sr@denx.de>, "Marek Behún" <kabel@kernel.org>
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	[thread overview]
Message-ID: <20220810105411.13577-1-pali@kernel.org> (raw)

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 <pali@kernel.org>
---
 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


             reply	other threads:[~2022-08-10 10:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-10 10:54 Pali Rohár [this message]
2022-08-10 18:11 ` [PATCH] arm: mvebu: turris_mox: Set "sfp" label in eth1 DT node when only Mox SFP is detected Marek Behún
2022-08-17  6:17 ` Stefan Roese
2022-08-23 14:59 ` Stefan Roese

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220810105411.13577-1-pali@kernel.org \
    --to=pali@kernel.org \
    --cc=kabel@kernel.org \
    --cc=sr@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox