All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian Bräuner Sørensen" <yocto@bsorensen.net>
To: u-boot@lists.denx.de
Subject: [PATCH] arm: dts: imx7d-sdb: Fix enet by setting soft spi mode to 3 for extended io
Date: Fri, 19 Feb 2021 08:23:58 +0100	[thread overview]
Message-ID: <20210219072358.20157-1-yocto@bsorensen.net> (raw)

This patch sets SPI MODE 3 for the fairchild 74HC595 device that is used
to reset the ethernet device, which fixes ethernet.

Reasoning:
The imx7dsabresd board uses SPI for setting the extended IO.
One of the purposes of this extended IO, is having the ability to set
ENET_RST i.e. reset the ethernet PHY. Without proper reset of the PHY,
ethernet does not work.

commit 0e146993bb3d ("spi: add support for all spi modes with soft spi")
broke network support for boards using imx7d-sdb, since it actually
corrected default SPI mode setting for the software emulated soft_spi to 0,
i.e. CPHA to 0 and CPOL to 0.
Previously, the driver defaulted to CPHA 1 and CPOL 1 (i.e. spi mode 3).
After the default SPI mode is now 0 (which is the correct default value)
we now need to actively set CPHA and CPOL to 1 for the specific devices
that actually needs this.

Signed-off-by: Christian Br?uner S?rensen <yocto@bsorensen.net>
---

 arch/arm/dts/imx7d-sdb.dts | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/dts/imx7d-sdb.dts b/arch/arm/dts/imx7d-sdb.dts
index 8191ac7c33..6ed21ce8b0 100644
--- a/arch/arm/dts/imx7d-sdb.dts
+++ b/arch/arm/dts/imx7d-sdb.dts
@@ -58,6 +58,8 @@
 			reg = <0>;
 			registers-number = <1>;
 			spi-max-frequency = <100000>;
+			spi-cpha;
+			spi-cpol;
 		};
 	};
 
-- 
2.25.1

             reply	other threads:[~2021-02-19  7:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-19  7:23 Christian Bräuner Sørensen [this message]
2021-02-19 13:44 ` [PATCH] arm: dts: imx7d-sdb: Fix enet by setting soft spi mode to 3 for extended io Fabio Estevam

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=20210219072358.20157-1-yocto@bsorensen.net \
    --to=yocto@bsorensen.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.