Received: by 10.223.185.116 with SMTP id b49csp1082888wrg; Wed, 14 Feb 2018 11:20:32 -0800 (PST) X-Google-Smtp-Source: AH8x227vefwuHTkTl1EhhbLlCg+ykr8LXB/VJTcwFc50w1ah+BnnLe9fuwe6TsvHGVwhBOg75ker X-Received: by 2002:a17:902:60c4:: with SMTP id k4-v6mr57148pln.347.1518636032060; Wed, 14 Feb 2018 11:20:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518636032; cv=none; d=google.com; s=arc-20160816; b=lj0Pfryu13piPX4LncBXldJANKyiOhQxncZUdHPrwsVc14BEru+zMeqHjskdCV7cQu fjTm0lKj58q3pzmZamuqhLnebUI/zgnmxVHilOzeK3NGX5Ted4TTXeJ6wD0sYC4RkVSc CIt+j1LRe/NqJfSPbZmtWQ56S7nVLPZu5zLyvfpLGpg10yFa8C7Ftsms1E3YpCabspVX j/721irFyHmSwuvTUKppo+nWHvYwByHYzuB5oKkJQDCz5DXdh5ZOIlu+Xucp9ngeLICj NCHqG6L/m6dqrLSXYIr3LZmYUYP2bvfknbMqJXil+wo+ssA5gMu8yah0+9nPVt6VHhpT zqfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :domainkey-signature:dkim-signature:arc-authentication-results; bh=OO563LEltleUSSEZ0c+ad0A2sCdki5UuYwS/MAKoYkU=; b=VaUhPHlx8zwi/CcCzlp7JCuCXzPCHxMPq0oGwfSAMdWOfTQGgbcDdw8oEZ5B4OTlmW mfW41aJA4ASo4aaHLPN9j1Ez5hylYIgJ40/X2uoxK9NycqcqsTRNv5qHBBxVHN64DbJU 10J+nIG6gVsO3O0JdkR1Q7JogtcE7qg/FOInCyvZvitZKItkh4hq7ndDivjwkSRp5QDs 09MXIyILe3uxU/1TsP2ytSrEp5rjLsR08fXSfsJifuAOc68WwT7o6pxlEHC0MA6eAOKH lanEdpjCj1r+w7vq3fuLuqXu1hyylmpPBqmTiDdLtFTx+GS4Ew5elgvpAqZ4IBjB8Kbe yp7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bidouilliste.com header.s=mail header.b=fyPoQajU; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d16si873710pfk.27.2018.02.14.11.20.17; Wed, 14 Feb 2018 11:20:32 -0800 (PST) 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=@bidouilliste.com header.s=mail header.b=fyPoQajU; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1162780AbeBNTRB (ORCPT + 99 others); Wed, 14 Feb 2018 14:17:01 -0500 Received: from mail.blih.net ([212.83.177.182]:13994 "EHLO mail.blih.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1162753AbeBNTQ5 (ORCPT ); Wed, 14 Feb 2018 14:16:57 -0500 Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id 4a74c7f2; Wed, 14 Feb 2018 20:16:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mail; bh=znCV13Yb3RW4PeDH5LToX/mSvjg=; b=fyPoQajUE9jiC6y2Eota3N2xp1B6 HaPI0UK6X4i3rPglfGYsfo6sE5IyTFfOOhAOyryoLBEW4cRcGftjYTTStoGHovbN 9DMVfoWXx4UYpk0vSc1YKvyN8RvhQz/hBcFb7eTMojVeiqVIRQ2lVZiSnb/K/R4j n6CoRfIHuEiRmTg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= mail; b=rmpGG2/QDG/VhASByjssliiFBR1Wav2fdShzgQkQpX9jO4c/TcYmRREO MZcsGf7CSpcppz9iZ5ZtGjosjDM6P6Hx4LapX2YHbHWw88qETQIhSfS26bU0iwXA KvrL2hUroiDyaINUtqws+NPJO0p/h9NDdr4BLRDHIZVX2CjiNw4= Received: from arcadia.home.blih.net (ip-9.net-89-3-105.rev.numericable.fr [89.3.105.9]) by mail.blih.net (OpenSMTPD) with ESMTPSA id 820710db TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Wed, 14 Feb 2018 20:16:55 +0100 (CET) Date: Wed, 14 Feb 2018 20:16:54 +0100 From: Emmanuel Vadot To: Chen-Yu Tsai Cc: devicetree , Maxime Ripard , linux-kernel , linux-sunxi , linux-arm-kernel , Icenowy Zheng Subject: Re: [PATCH] Revert "ARM: dts: sunxi: Add regulators for Sinovoip BPI-M2" Message-Id: <20180214201654.cb8cb64bf50b958a53ebebbd@bidouilliste.com> In-Reply-To: References: <20180203112353.13497-1-icenowy@aosc.io> <20180205095558.2e713c24cdb7c3232943db52@bidouilliste.com> <207CD143-6535-42C9-BEF3-9D2614336482@aosc.io> X-Mailer: Sylpheed 3.6.0 (GTK+ 2.24.31; amd64-portbld-freebsd12.0) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 13 Feb 2018 18:36:24 +0800 Chen-Yu Tsai wrote: > On Sat, Feb 10, 2018 at 5:20 AM, Emmanuel Vadot w= rote: > > On 2018-02-05 10:05, Icenowy Zheng wrote: > >> > >> ? 2018?2?5? GMT+08:00 ??4:55:58, Emmanuel Vadot > >> ??: > >>> > >>> > >>> Hello, > >>> > >>> On Sat, 3 Feb 2018 19:23:53 +0800 > >>> Icenowy Zheng wrote: > >>> > >>>> This reverts commit 7daa213700758b5b08fc0daab09bb139dd334165. > >>>> > >>>> The original commit has several problems: > >>>> > >>>> - vdd-cpus and aldo3 (AVCC of the SoC) are not set to always-on, > >>> > >>> which > >>>> > >>>> leads to system hang when disabling unused regulators. > >>> > >>> > >>> Indeed I should have make those always-on. > >>> > >>>> - GMAC (which uses dldo1 and aldo2) and Wi-Fi (which uses aldo1) are > >>> > >>> not > >>>> > >>>> considered, and will fail to work after adding this commit. > >>> > >>> > >>> While I understand the problem with vdd-cpus and aldo3 I don't see why > >>> when you don't declare regulator the code should do something with it. > >>> DT is supposed to describe the hardware and the code should not use > >>> hardware not described right ? > >>> The gmac node doesn't declare any regulators and the mmc2 uses > >>> reg_vcc3v0 (haven't checked on the schematics yet if it is correct). > >> > >> > >> It's because the regulator support isn't present before > >> this commit. However these parts really need special > >> regulators. I don't have M2 schematics at hand, so you'd > >> check it by yourself. > > > > > > Yes but why does the PMIC should disable regulators not defined in the= DTS > > ? That the part I don't understand and want to know where it is > > described/documented. >=20 > They are defined. See axp22x.dtsi, which you included in your patch. >=20 > Now the system is free to do whatever it wants under the constraints > of the device tree. Since you do not reference the regulator, the > kernel is free to turn it off to save power. Yeah I realized that now and feel stupid ... Thanks for the clarification. > > > >> P.S. a proper device tree with AXP shouldn't use > >> reg_vcc3v0/3v3/1v8/etc. They're dummy > >> regulator nodes for > >> not implemented or not controllable regulators. > >> > >>> > >>>> This indicates that this patch should be not tested at all. > >>> > >>> > >>> This have indeed not been tested with linux. > >>> I think that this commit should not be reverted, I'll send a proper > >>> patch tonight or tomorow night max. > >> > >> > >> Please test patches sent to Linux on Linux :-) > > > > > > If my patches adhere to the bindings I don't see why. >=20 > It adheres to the bindings, but does not accurately describe the > hardware constraints. Is there a place where there is build of the linux kernel for sunxi/multi7 and initrd available for download so I can add that to my test bench ? Cheers, > ChenYu >=20 > > > > > >>> > >>> P.S.: Also as I'm the original sender I think I should have been in CC > >>> no ? > >> > >> > >> get_maintainer.pl didn't mention you and I forgot... sorry. > >> > >>> > >>> Cheers, > >>> > >>>> Signed-off-by: Icenowy Zheng > >>>> --- > >>>> arch/arm/boot/dts/sun6i-a31s-sinovoip-bpi-m2.dts | 57 > >>> > >>> ------------------------ > >>>> > >>>> 1 file changed, 57 deletions(-) > >>>> > >>>> diff --git a/arch/arm/boot/dts/sun6i-a31s-sinovoip-bpi-m2.dts > >>> > >>> b/arch/arm/boot/dts/sun6i-a31s-sinovoip-bpi-m2.dts > >>>> > >>>> index 51e6f1d21c32..a565316eb340 100644 > >>>> --- a/arch/arm/boot/dts/sun6i-a31s-sinovoip-bpi-m2.dts > >>>> +++ b/arch/arm/boot/dts/sun6i-a31s-sinovoip-bpi-m2.dts > >>>> @@ -86,10 +86,6 @@ > >>>> }; > >>>> }; > >>>> > >>>> -&cpu0 { > >>>> - cpu-supply =3D <®_dcdc3>; > >>>> -}; > >>>> - > >>>> &ehci0 { > >>>> status =3D "okay"; > >>>> }; > >>>> @@ -155,17 +151,6 @@ > >>>> status =3D "okay"; > >>>> }; > >>>> > >>>> -&p2wi { > >>>> - status =3D "okay"; > >>>> - > >>>> - axp22x: pmic@68 { > >>>> - compatible =3D "x-powers,axp221"; > >>>> - reg =3D <0x68>; > >>>> - interrupt-parent =3D <&nmi_intc>; > >>>> - interrupts =3D <0 IRQ_TYPE_LEVEL_LOW>; > >>>> - }; > >>>> -}; > >>>> - > >>>> &pio { > >>>> gmac_phy_reset_pin_bpi_m2: gmac_phy_reset_pin@0 { > >>>> pins =3D "PA21"; > >>>> @@ -191,48 +176,6 @@ > >>>> }; > >>>> }; > >>>> > >>>> -#include "axp22x.dtsi" > >>>> - > >>>> -®_dc5ldo { > >>>> - regulator-min-microvolt =3D <700000>; > >>>> - regulator-max-microvolt =3D <1320000>; > >>>> - regulator-name =3D "vdd-cpus"; > >>>> -}; > >>>> - > >>>> -®_dcdc1 { > >>>> - regulator-always-on; > >>>> - regulator-min-microvolt =3D <3000000>; > >>>> - regulator-max-microvolt =3D <3000000>; > >>>> - regulator-name =3D "vdd-3v0"; > >>>> -}; > >>>> - > >>>> -®_dcdc2 { > >>>> - regulator-min-microvolt =3D <700000>; > >>>> - regulator-max-microvolt =3D <1320000>; > >>>> - regulator-name =3D "vdd-gpu"; > >>>> -}; > >>>> - > >>>> -®_dcdc3 { > >>>> - regulator-always-on; > >>>> - regulator-min-microvolt =3D <700000>; > >>>> - regulator-max-microvolt =3D <1320000>; > >>>> - regulator-name =3D "vdd-cpu"; > >>>> -}; > >>>> - > >>>> -®_dcdc4 { > >>>> - regulator-always-on; > >>>> - regulator-min-microvolt =3D <700000>; > >>>> - regulator-max-microvolt =3D <1320000>; > >>>> - regulator-name =3D "vdd-sys-dll"; > >>>> -}; > >>>> - > >>>> -®_dcdc5 { > >>>> - regulator-always-on; > >>>> - regulator-min-microvolt =3D <1500000>; > >>>> - regulator-max-microvolt =3D <1500000>; > >>>> - regulator-name =3D "vcc-dram"; > >>>> -}; > >>>> - > >>>> &uart0 { > >>>> pinctrl-names =3D "default"; > >>>> pinctrl-0 =3D <&uart0_pins_a>; > >>>> -- > >>>> 2.15.1 > >>>> > >>>> > >>>> _______________________________________________ > >>>> linux-arm-kernel mailing list > >>>> linux-arm-kernel@lists.infradead.org > >>>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > >> > >> > >> _______________________________________________ > >> linux-arm-kernel mailing list > >> linux-arm-kernel@lists.infradead.org > >> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > > > > > > -- > > Emmanuel Vadot >=20 > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --=20 Emmanuel Vadot