Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp7698992ybc; Thu, 28 Nov 2019 23:23:39 -0800 (PST) X-Google-Smtp-Source: APXvYqxp3hr/UYYyaK5WrSqRE73sUnf+ZVEfnH5tMH/OzHjUWDgNCfTBQM7tkaG3Yy4eiTpRuKGG X-Received: by 2002:aa7:df8e:: with SMTP id b14mr43517763edy.59.1575012219571; Thu, 28 Nov 2019 23:23:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575012219; cv=none; d=google.com; s=arc-20160816; b=oOsUi9c4T6zpeqv2CCEdTF2CaZSe8j2v6YiBQ8tWirnc/XJ9T/KlwrM9kCgOlQb9zi g2pZbS4P60TtpcZI3oq0wtUl5oauFSvJjCzW+DqFTu0r1RIGcqPMn/ytwyh/W7oti1Jv vempezP+FGuZNzWBofgNqi9YLzgtTsqU/3I8Cvtbm8P2gIad5QsuPsbLgSmgmZyAPJSb pRmiAhzH81F6aIGnrgP6ZpFuN/DV3TmfqWH5FaRtdiiONAgpu7LSDnkEa8HngIdvGxd4 Fb86olfSI7+svGxOfRvdTVkXeZj7y9NUWxeFnuKwkQEmsmfKn4uMzIEApNo9MducxtBO Tm6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=FpwbWO/nDN0tYLyCDgmNXYqWvYBonkS11jx+UdrBseM=; b=FGl9jysmY/YGs9/6R3XXhs0nqzVZVbopO8lnGPGGxfCT0MmVpfWx9utY1+6Y1ze2Ox +Trz2b75gQomFqT9kHrrjG1L+FVKG8JGpM4ZOCJDxCJqRw97BLA1gNNjEliKmgsg11Dk rioEii3iIYDja9PzLHwLsyGayf6qd+1/f3x7I7xnKZ8f+6WodtsWfGpFXeAAS1Y+4ckP Zk4u2pP+tNUUjJZ1aEyRVYetWL97ON0pddXK2AbwBxVljZxca2BtV4IRTgJ6iVK1qy4I GMSwRbeQuFLuPNSAOfvvLbbTghBy//pFcZIsmFlsk4uN9uvE703+ijaScGV8x+Cz1Yp2 fzUw== ARC-Authentication-Results: i=1; mx.google.com; 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 j30si5436062ejo.214.2019.11.28.23.23.13; Thu, 28 Nov 2019 23:23:39 -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; 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 S1726763AbfK2HWO (ORCPT + 99 others); Fri, 29 Nov 2019 02:22:14 -0500 Received: from olimex.com ([184.105.72.32]:47448 "EHLO olimex.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725856AbfK2HWN (ORCPT ); Fri, 29 Nov 2019 02:22:13 -0500 Received: from 94.155.250.134 ([94.155.250.134]) by olimex.com with ESMTPSA (ECDHE-RSA-AES128-GCM-SHA256:TLSv1.2:Kx=ECDH:Au=RSA:Enc=AESGCM(128):Mac=AEAD) (SMTP-AUTH username stefan@olimex.com, mechanism PLAIN) for ; Thu, 28 Nov 2019 23:22:04 -0800 Subject: Re: [PATCH 1/1] arm64: dts: allwinner: a64: olinuxino: Add VCC-PG supply To: Maxime Ripard Cc: Stefan Mavrodiev , Chen-Yu Tsai , Rob Herring , Mark Rutland , "moderated list:ARM/Allwinner sunXi SoC support" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , open list , linux-sunxi@googlegroups.com References: <20191126110508.15264-1-stefan@olimex.com> <20191126162721.qi7scp3vadxn7k2i@gilmour.lan> <0c1d7377-7064-f509-ffc5-bd1e8f2fbaa8@olimex.com> <20191128103301.vjpkvjscy45ycgwg@gilmour.lan> From: Stefan Mavrodiev Message-ID: <1e0509cc-4afc-d46f-84a9-5e54c60c9d7b@olimex.com> Date: Fri, 29 Nov 2019 09:22:00 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191128103301.vjpkvjscy45ycgwg@gilmour.lan> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/28/19 12:33 PM, Maxime Ripard wrote: Hi Maxime, > Hi Stefan, > > On Wed, Nov 27, 2019 at 09:07:40AM +0200, Stefan Mavrodiev wrote: >> On 11/26/19 6:27 PM, Maxime Ripard wrote: >>> Hi Stefan, >>> >>> On Tue, Nov 26, 2019 at 01:05:08PM +0200, Stefan Mavrodiev wrote: >>>> On A64-OLinuXino boards, PG9 is used for USB1 enable/disable. The >>>> port is supplied by DLDO4, which is disabled by default. The patch >>>> adds the regulator as vcc-pg, which is later used by the pinctrl. >>>> >>>> Signed-off-by: Stefan Mavrodiev >>>> --- >>>> arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts | 4 ++++ >>>> 1 file changed, 4 insertions(+) >>>> >>>> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts >>>> index 01a9a52edae4..c9d8c9c4ef20 100644 >>>> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts >>>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts >>>> @@ -163,6 +163,10 @@ >>>> status = "okay"; >>>> }; >>>> >>>> +&pio { >>>> + vcc-pg-supply=<®_dldo4>; >>> The equal sign should have spaces around it. >>> >>> Also, can you please list all the bank supplies while you're at it? >> Sure. Should the supplies defined as regulators names be added also to the >> pio node? >> For example reg_aldo1 is named "vcc-pe". > As far as I can tell, the A64 has regulators for PC, PD, PE, PG and > PL, so you should list those (PL being under r_pio) After quick check I've found a bug (maybe?). It's not possible to specify vcc-pl-supply, because of this: https://elixir.bootlin.com/linux/latest/source/drivers/pinctrl/sunxi/pinctrl-sunxi.c#L778 During the probe of the pmu, the pinctrl tries to get a regulator, that doesn't exist yet. Because of this the system doesn't start (as expected). I've tried to ignore -EPROBE_DEFER. This seems to work, but only because the regulator for PL is defined as "regulator-always-on". The problem is that the refcount is not incremented. So if you export one gpio and the unexport it, the regulator will be disabled. I'm not sure how this can be resolved. Should I skip vcc-pl-supply for now and list the other bank supplies? Stefan > >> Also, since the commit message will be different for better representation >> of the changes, should I send the next >> patch as v2 or as a new one? > Either way works for me as long as the commit message matches the changes. > > Thanks! > Maxime