Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp4247038imm; Mon, 8 Oct 2018 18:11:23 -0700 (PDT) X-Google-Smtp-Source: ACcGV622Yj6jD1aOrV+V4h/qa3Pjhb/qyup9RuGT6ltIV1gWvdh7o9c508ogr4sJL0XW9sH76kqF X-Received: by 2002:a17:902:22cc:: with SMTP id o12-v6mr26477473plg.108.1539047483434; Mon, 08 Oct 2018 18:11:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539047483; cv=none; d=google.com; s=arc-20160816; b=BULnORrgQhluKrYMdt1M5YhVNDyh4UHG/cJeHAFeVmcAEuvhFF1ytTT7hrr3WkByB/ SBbwwnskRHWf4WbZVF2cq/VF2PYqJjYz5nGq84F2OdPCDW6+u6EcKJB1uGsI30iP+EJf aUUZVQXBb5xORD4WluMRxn+jqc1npk3KSZbNMyZ0fMmbKd7gPBUWNlBm9BvglqNNQuut +HF26e+ilOJniWSvVx03UZmLldTaM3kaHYpPJS8zI4zWTB0NAhXdvgSXNr5ziGmpp+8f vaUbAcMdHG4HYmOPTE3niZ9YE2OLENqetwxlTFbSAQHCCX60Uz3zjXi9fSZXgeQVrCH4 JF6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=jBPURB8OqKyrEMiB3VtOmKrfQY8CkTF11pyf5IXMhfY=; b=xr86csgYHTPEDMnBJbsddob7dq31T2s9ONH9buGaMsDh4SoRLs9uvgc8t5W7+lqSql gz9cDTHEAeEgMvosPydT6o5Ed/7JvcuCARoAAIfDJxRTQokO11A+JIBzK+/Cpe4A2SUy v298nR50bwUCDJx+FN20i6aYPWBU58BOgrMsjabTpuk5N7q+VjkH3mODuHRCwXlHDzCZ p9xgKZqFHk0jm5NTJkZQdhfXFhxU63s0nXsZXRsyh8ANjRzAGw+HDOA6iErtXVTIbwsB rDptmNs5ETEkzix9vP1lJMNym33ao2NsyOoRlTi65jVe2Izu6w3BjiPO27ZXlpS1pg8f nLvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fGBtwovR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p71-v6si20181369pfk.275.2018.10.08.18.11.08; Mon, 08 Oct 2018 18:11:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fGBtwovR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726503AbeJIIXy (ORCPT + 99 others); Tue, 9 Oct 2018 04:23:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:46842 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725823AbeJIIXx (ORCPT ); Tue, 9 Oct 2018 04:23:53 -0400 Received: from dragon (unknown [45.56.155.247]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7A3DD205C9; Tue, 9 Oct 2018 01:09:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539047369; bh=Rnot5tT6fURBk34qaTER+XuF/2CG0QdaXuHehTefF9M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fGBtwovRwkYsRoH6YakUHZKCUNN8R8Egb21Zyzn+bm3rhQNX0Y6GZEyVLORYVuBT7 M4DrHwGTwrzzoKtLGqsX8zdr3xJnkzTGS2di5vJI2x+zVneDh17OP5XoMd4c+dASQM jTGRSkswhFeDLo53ow41XYzEqMYpkTn3kz0zC+Vc= Date: Tue, 9 Oct 2018 09:09:07 +0800 From: Shawn Guo To: Leonard Crestez Cc: Andy Duan , Fabio Estevam , Linus Walleij , Mark Brown , Liam Girdwood , "linux-gpio@vger.kernel.org" , dl-linux-imx , "kernel@pengutronix.de" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v3] ARM: dts: imx6sx-sdb: Fix enet phy regulator Message-ID: <20181009010905.GY3587@dragon> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 08, 2018 at 03:28:01PM +0000, Leonard Crestez wrote: > Bindings for "fixed-regulator" only explicitly support "gpio" property, > not "gpios". Fix by correcting the property name. > > The enet PHYs on imx6sx-sdb needs to be explicitly reset after a power > cycle, this can be handled by the phy-reset-gpios property. Sadly this > is not handled on suspend: the fec driver turns phy-supply off but > doesn't assert phy-reset-gpios again on resume. > > Since additional phy-level work is required to support powering off the > phy in suspend fix the problem by just marking the regulator as > "boot-on" "always-on" so that it's never turned off. This behavior is > equivalent to older releases. > > Keep the phy-reset-gpios property on fec anyway because it is a correct > description of board design. > > This issue was exposed by commit efdfeb079cc3 ("regulator: fixed: > Convert to use GPIO descriptor only") which causes the "gpios" property > to also be parsed. Before that commit the "gpios" property had no > effect, PHY reset was only handled in the the bootloader. > > This fixes linux-next boot failures previously reported here: > https://lore.kernel.org/patchwork/patch/982437/#1177900 > https://lore.kernel.org/patchwork/patch/994091/#1178304 So this is a fix we only need to apply for 4.20-rc, right? Shawn > > Signed-off-by: Leonard Crestez > > --- > I attempted to fix by asserting phy-reset-gpios on resume but apparently > phy fixups are still lost and need to be reapplied (not sure why/how). > > Changes since v2: > * Mark as always-on boot-enable-on because phy power cycling is hard > * Clear Reviewed-by because of large behavior change > * Link to v2: https://lore.kernel.org/patchwork/patch/995520/ > > Changes since v1: > * Use 0x10b0 for phy reset pinctrl value (Fabio) > * Link to v1: https://lore.kernel.org/patchwork/patch/994871/ > > arch/arm/boot/dts/imx6sx-sdb.dtsi | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/arch/arm/boot/dts/imx6sx-sdb.dtsi b/arch/arm/boot/dts/imx6sx-sdb.dtsi > index 53b3408b5fab..7d7d679945d2 100644 > --- a/arch/arm/boot/dts/imx6sx-sdb.dtsi > +++ b/arch/arm/boot/dts/imx6sx-sdb.dtsi > @@ -115,11 +115,13 @@ > pinctrl-names = "default"; > pinctrl-0 = <&pinctrl_enet_3v3>; > regulator-name = "enet_3v3"; > regulator-min-microvolt = <3300000>; > regulator-max-microvolt = <3300000>; > - gpios = <&gpio2 6 GPIO_ACTIVE_LOW>; > + gpio = <&gpio2 6 GPIO_ACTIVE_LOW>; > + regulator-boot-on; > + regulator-always-on; > }; > > reg_pcie_gpio: regulator-pcie-gpio { > compatible = "regulator-fixed"; > pinctrl-names = "default"; > @@ -178,10 +180,11 @@ > pinctrl-names = "default"; > pinctrl-0 = <&pinctrl_enet1>; > phy-supply = <®_enet_3v3>; > phy-mode = "rgmii"; > phy-handle = <ðphy1>; > + phy-reset-gpios = <&gpio2 7 GPIO_ACTIVE_LOW>; > status = "okay"; > > mdio { > #address-cells = <1>; > #size-cells = <0>; > @@ -371,10 +374,12 @@ > MX6SX_PAD_RGMII1_RD1__ENET1_RX_DATA_1 0x3081 > MX6SX_PAD_RGMII1_RD2__ENET1_RX_DATA_2 0x3081 > MX6SX_PAD_RGMII1_RD3__ENET1_RX_DATA_3 0x3081 > MX6SX_PAD_RGMII1_RX_CTL__ENET1_RX_EN 0x3081 > MX6SX_PAD_ENET2_RX_CLK__ENET2_REF_CLK_25M 0x91 > + /* phy reset */ > + MX6SX_PAD_ENET2_CRS__GPIO2_IO_7 0x10b0 > >; > }; > > pinctrl_enet_3v3: enet3v3grp { > fsl,pins = < > -- > 2.17.1 >