From patchwork Fri May 6 15:27:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcel Ziswiler X-Patchwork-Id: 12841331 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 58562C433F5 for ; Fri, 6 May 2022 15:33:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=V1llrwi9eBq5ZsznDPwNA7KgJEj9Agx3TczeJLnN+y0=; b=EneFFRl+tKoWzY +jfhRtq4CpJd3yUQn67V9ItCe6xEIZ0uu10f0HeFt60BWCDiKZNsnEoSnUYZaCMp40/DJjv4JXA0x CsfLfFTeB60zRUb9TMJT9nlM1lZybYqr5TfXVEsuNABtQaP4WGV2eYG6/YYpeGfwIOZnGK7/oVUCX yctJY/yzvN8rv3QD3zh7WfyAJY1i6CimBfxdhldiqjGmUwFkQF8DWaBnETpCq91Gmb+oUU9vE5VWU W6ZDeypwYNoNVj3NghQys/ZaITMcgpkr506JP0XuHhJHlGKCNN4syr0W9riAjbJAqKUcpZfBVF0FO zz3oM+fpThS3/+PRoLsw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nmzwC-0045AS-SK; Fri, 06 May 2022 15:32:13 +0000 Received: from mout.perfora.net ([74.208.4.196]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nmztC-0043DA-Eg for linux-arm-kernel@lists.infradead.org; Fri, 06 May 2022 15:29:08 +0000 Received: from toolbox.int.toradex.com ([81.221.85.15]) by mrelay.perfora.net (mreueus004 [74.208.5.2]) with ESMTPSA (Nemesis) id 1M1IF4-1npjiB0NZq-002llS; Fri, 06 May 2022 17:28:53 +0200 From: Marcel Ziswiler To: linux-arm-kernel@lists.infradead.org Cc: Oleksandr Suvorov , Marcel Ziswiler , Fabio Estevam , Frank Rowand , Krzysztof Kozlowski , NXP Linux Team , Pengutronix Kernel Team , Rob Herring , Russell King , Sascha Hauer , Shawn Guo , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 10/24] ARM: dts: imx7-colibri: add delay for on-module phy supply Date: Fri, 6 May 2022 17:27:55 +0200 Message-Id: <20220506152809.295409-11-marcel@ziswiler.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220506152809.295409-1-marcel@ziswiler.com> References: <20220506152809.295409-1-marcel@ziswiler.com> MIME-Version: 1.0 X-Provags-ID: V03:K1:prmmGjODMASiwQejOwpv0+0U+9fTCcyS5sPOIBvSBXEiafxEZ7b r+JpfOV9IvW0/ap3plhwe4q3Up2MHeEAGG8QJZ3oUw6HDc6kbn/PPgkTbI6smr3BlrhN95r i7maoZADPFMHcOWslw+8toWzBv1Q4z1tpVG4mBdNgWdUyMnenmC917ojFMWyrcPbPtkeSWE JgdvgE+PWlRzk4AwMzpcQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:QgdhHhQYsaU=:YquTNlcSgdxRp4GmRwPkBJ +v2rhl1QYWfndIu4pexiXn7kP+QNGjW5GfGDb4xNfBnN8EeYFaER6oiB3ySNH6K8kaBvXeNu6 68NINcI2s1CzU9/koc1OZoboGg32SaqZtPmnfwxBdpSZnOGAXSqb0vstkDpj69W6zQLU+czOp 8XFlkzOLLbCiZ0whYoLXTaVugZUWrpSgPUvCPgPogyx5S8kWtoPOF9sIcqR13g/xmlTD8Athr Vl1OH9xbQwA/Y1FZjhgegoHvikrEOgp7r2yjz/5v3qCUo5LI3WjymWOdhwI8qTCOKx0lb/vcu 5mmBX1BZ2XSo4ZlNElv3LmBl7ludFj7OjGXWqAoZMtM2IF4HHubhlRomChYI4LN+7quwmTrGa yOOLxqTSFRYQVbwrY4hhyv0Ctia8S2yu3MbNnRoC0WQmLBj9RKsN3hN06SCpoFMRScIGwsDq5 hRrle0Wh7Vzqv9ajlAusonZOh4eoH0Ri8L/gauv5p9YysKjvEdQW/efznVy0Nvlequalcc+9J LJbS6rZgnfViX9WSKUiqvzm7iwUz4ZPY5TYimCVE7Gcfgofx6l+Gf00ohSDwSltO6E86VkQaP 7DzWlzREGRqAcl2IBRXoBGMx9dzfAsO1CRcErcy9zzvBrv1JcUQCeRGxieY46uYh00yUTlgtf BZ3eSJh6IBArnBfSXqFyMk8JIZWQ7ChL7nP6ZGksN/deoybXSeY4KlPJNc58FeZnn0UA= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220506_082906_645669_0541768F X-CRM114-Status: GOOD ( 12.20 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Oleksandr Suvorov 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 Signed-off-by: Marcel Ziswiler --- 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 = <®_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 = <ðphy0>; phy-mode = "rmii"; - phy-supply = <®_LDO1>; + phy-supply = <®_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; };