mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marcel Ziswiler <marcel@ziswiler.com>
To: linux-arm-kernel@lists.infradead.org
Cc: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>,
	Marcel Ziswiler <marcel.ziswiler@toradex.com>,
	Fabio Estevam <festevam@gmail.com>,
	Frank Rowand <frowand.list@gmail.com>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	NXP Linux Team <linux-imx@nxp.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Rob Herring <robh+dt@kernel.org>,
	Russell King <linux@armlinux.org.uk>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Shawn Guo <shawnguo@kernel.org>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 10/24] ARM: dts: imx7-colibri: add delay for on-module phy supply
Date: Mon, 16 May 2022 15:47:20 +0200	[thread overview]
Message-ID: <20220516134734.493065-11-marcel@ziswiler.com> (raw)
In-Reply-To: <20220516134734.493065-1-marcel@ziswiler.com>

From: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>

There is a significant time required for PHY Micrel KSZ8041 to power up.
Add a delay on start-up/wake-up before the FEC starts communicating with
the PHY.

LDO1 takes 6 ms, R39 + C44 takes ~100ms, the KSZ8041 datasheet asks for
~11 ms before starting any programming on the MIIM.

Counting that, add a 200 ms delay to be sure the PHY is ready for
programming. Also, add the same off delay time to give the capacitor
time to discharge in order to properly reset.

Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
---

(no changes since v1)

 arch/arm/boot/dts/imx7-colibri.dtsi | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/imx7-colibri.dtsi b/arch/arm/boot/dts/imx7-colibri.dtsi
index 329638985db6..09dbd262dad1 100644
--- a/arch/arm/boot/dts/imx7-colibri.dtsi
+++ b/arch/arm/boot/dts/imx7-colibri.dtsi
@@ -94,6 +94,17 @@ reg_module_3v3_avdd: regulator-module-3v3-avdd {
 		regulator-name = "+V3.3_AVDD_AUDIO";
 	};
 
+	reg_module_3v3_eth: regulator-module-3v3-eth {
+		compatible = "regulator-fixed";
+		off-on-delay-us = <200000>;
+		regulator-name = "+V3.3_ETH";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-boot-on;
+		startup-delay-us = <200000>;
+		vin-supply = <&reg_LDO1>;
+	};
+
 	reg_usbh_vbus: regulator-usbh-vbus {
 		compatible = "regulator-fixed";
 		gpio = <&gpio4 7 GPIO_ACTIVE_LOW>; /* SODIMM 129 / USBH_PEN */
@@ -153,7 +164,7 @@ &fec1 {
 	fsl,magic-packet;
 	phy-handle = <&ethphy0>;
 	phy-mode = "rmii";
-	phy-supply = <&reg_LDO1>;
+	phy-supply = <&reg_module_3v3_eth>;
 	pinctrl-names = "default", "sleep";
 	pinctrl-0 = <&pinctrl_enet1>;
 	pinctrl-1 = <&pinctrl_enet1_sleep>;
@@ -440,7 +451,7 @@ reg_DCDC4: DCDC4 { /* V1.35_DRAM */
 			};
 
 			reg_LDO1: LDO1 { /* PWR_EN_+V3.3_ETH */
-				regulator-min-microvolt = <1800000>;
+				regulator-min-microvolt = <3300000>;
 				regulator-max-microvolt = <3300000>;
 				regulator-boot-on;
 			};
-- 
2.35.1


  parent reply	other threads:[~2022-05-16 13:49 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-16 13:47 [PATCH v2 00/24] ARM: dts: imx7-colibri: device tree improvements Marcel Ziswiler
2022-05-16 13:47 ` [PATCH v2 01/24] ARM: dts: imx7-colibri: overhaul display/touch functionality Marcel Ziswiler
2022-05-16 13:47 ` [PATCH v2 02/24] ARM: dts: imx7-colibri: add mdio phy node Marcel Ziswiler
2022-05-16 13:47 ` [PATCH v2 03/24] ARM: dts: imx7-colibri: set lcdif clock source to video pll Marcel Ziswiler
2022-05-16 13:47 ` [PATCH v2 04/24] ARM: dts: imx7-colibri: add usb dual-role switching using extcon Marcel Ziswiler
2022-05-16 13:47 ` [PATCH v2 05/24] ARM: dts: imx7-colibri: improve licensing and compatible strings Marcel Ziswiler
2022-05-16 13:47 ` [PATCH v2 06/24] ARM: dts: imx7-colibri: improve wake-up with gpio key Marcel Ziswiler
2022-05-16 13:47 ` [PATCH v2 07/24] ARM: dts: imx7-colibri: move aliases, chosen, extcon and gpio-keys Marcel Ziswiler
2022-05-16 13:47 ` [PATCH v2 08/24] ARM: dts: imx7-colibri: add ethernet aliases Marcel Ziswiler
2022-05-16 13:47 ` [PATCH v2 09/24] ARM: dts: imx7-colibri: move regulators Marcel Ziswiler
2022-05-16 13:47 ` Marcel Ziswiler [this message]
2022-05-16 13:47 ` [PATCH v2 11/24] ARM: dts: imx7-colibri: clean-up usdhc1 and add sleep config Marcel Ziswiler
2022-05-16 13:47 ` [PATCH v2 12/24] ARM: dts: imx7-colibri: move rtc node Marcel Ziswiler
2022-05-16 13:47 ` [PATCH v2 13/24] ARM: dts: imx7d-colibri-emmc: add cpu1 supply Marcel Ziswiler
2022-05-16 13:47 ` [PATCH v2 14/24] ARM: dts: imx7-colibri-eval-v3: correct can controller comment Marcel Ziswiler
2022-05-16 13:47 ` [PATCH v2 15/24] ARM: dts: imx7-colibri: disable adc2 Marcel Ziswiler
2022-05-16 13:47 ` [PATCH v2 16/24] ARM: dts: imx7-colibri-aster: add ssp aka spi cs aka ss pins Marcel Ziswiler
2022-05-16 13:47 ` [PATCH v2 17/24] ARM: dts: imx7-colibri: add clarifying comments Marcel Ziswiler
2022-05-16 13:47 ` [PATCH v2 18/24] ARM: dts: imx7-colibri: alphabetical re-order Marcel Ziswiler
2022-05-16 14:09 ` [PATCH v2 19/24] ARM: dts: imx7-colibri: clean-up device enabling/disabling Marcel Ziswiler
2022-05-16 14:11 ` [PATCH v2 20/24] ARM: dts: imx7-colibri: remove leading zero from reg address Marcel Ziswiler
2022-05-16 14:11 ` [PATCH v2 21/24] ARM: dts: imx7-colibri: set regulator-name properties Marcel Ziswiler
2022-05-16 14:12 ` [PATCH v2 22/24] ARM: dts: imx7-colibri: clean-up iomuxc pinctrl group naming Marcel Ziswiler
2022-05-16 14:12 ` [PATCH v2 23/24] dt-bindings: arm: fsl: add toradex,colibri-imx7s/d/d-emmc-iris/-v2 Marcel Ziswiler
2022-05-16 14:13 ` [PATCH v2 24/24] ARM: dts: imx7-colibri: add support for Toradex Iris carrier boards Marcel Ziswiler
     [not found] ` <20220611091613.GH254723@dragon>
     [not found]   ` <CAL_JsqJ5VhU+_QXejPYRSOpkC8Q=gJ7BzYHwqaTw9Pb1Wa04tg@mail.gmail.com>
2022-06-14 15:16     ` [PATCH v2 00/24] ARM: dts: imx7-colibri: device tree improvements Francesco Dolcini

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=20220516134734.493065-11-marcel@ziswiler.com \
    --to=marcel@ziswiler.com \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=frowand.list@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=marcel.ziswiler@toradex.com \
    --cc=oleksandr.suvorov@toradex.com \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.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

all inboxes | Powered by JetHome®