mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Oleksij Rempel <o.rempel@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Oleksij Rempel <o.rempel@pengutronix.de>
Subject: [PATCH v1 2/2] ARM: boards: protonic-imx6: properly configure RGMII direction for the FEC MAC
Date: Mon, 21 Mar 2022 10:21:03 +0100	[thread overview]
Message-ID: <20220321092103.1357659-2-o.rempel@pengutronix.de> (raw)
In-Reply-To: <20220321092103.1357659-1-o.rempel@pengutronix.de>

To make SJA1105 switch work properly with bareobx, we need to configure
RGMII ref_clk.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
 arch/arm/boards/protonic-imx6/board.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/arm/boards/protonic-imx6/board.c b/arch/arm/boards/protonic-imx6/board.c
index 5ca80bd306..1a5c1a7bbd 100644
--- a/arch/arm/boards/protonic-imx6/board.c
+++ b/arch/arm/boards/protonic-imx6/board.c
@@ -654,6 +654,18 @@ static int prt_imx6_init_prtvt7(struct prt_imx6_priv *priv)
 	return 0;
 }
 
+static int prt_imx6_init_prtwd3(struct prt_imx6_priv *priv)
+{
+	void __iomem *iomux = (void *)MX6_IOMUXC_BASE_ADDR;
+	uint32_t val;
+
+	val = readl(iomux + IOMUXC_GPR1);
+	val |= IMX6Q_GPR1_ENET_CLK_SEL_ANATOP;
+	writel(val, iomux + IOMUXC_GPR1);
+
+	return 0;
+}
+
 static int prt_imx6_rfid_fixup(struct prt_imx6_priv *priv,
 			       struct device_node *root)
 {
@@ -1116,6 +1128,7 @@ static const struct prt_machine_data prt_imx6_cfg_prtwd3[] = {
 		.i2c_adapter = 0,
 		.emmc_usdhc = 2,
 		.sd_usdhc = 0,
+		.init = prt_imx6_init_prtwd3,
 		.flags = PRT_IMX6_BOOTSRC_EMMC,
 	}, {
 		.hw_id = UINT_MAX
-- 
2.30.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


  reply	other threads:[~2022-03-21  9:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-21  9:21 [PATCH v1 1/2] ARM: boards: protonic-imx6: add board specific BBU SD handlers Oleksij Rempel
2022-03-21  9:21 ` Oleksij Rempel [this message]
2022-03-28  8:48 ` Sascha Hauer

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=20220321092103.1357659-2-o.rempel@pengutronix.de \
    --to=o.rempel@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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