Received: by 10.223.185.116 with SMTP id b49csp3452281wrg; Tue, 13 Feb 2018 02:37:57 -0800 (PST) X-Google-Smtp-Source: AH8x224HFsyi85yg9B/3jvBQac/c91IO6HK1O0mR3kKT3JzgToOX9kGckwZy6n3OY3XacsYWXZSO X-Received: by 2002:a17:902:b7ca:: with SMTP id v10-v6mr707893plz.437.1518518276950; Tue, 13 Feb 2018 02:37:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518518276; cv=none; d=google.com; s=arc-20160816; b=o44i09nLUDh2wy1dkuV27KOqBnJXtV0zXHhcJvagKuOpk7UdZUXf6FSOVV6szDulkP cXhCQ1DPZd/JN165iehtY2MEaIRoSvK6il/Ewa8K2/5EnI9SISCG/p2V7EbR9BauetAZ eOZY0Y+RksPFXaYC5Lwkcb40ks2K9szu7SvsXCqPqNJ9e5Czhyld6mBtLUe0L2aTiIyd kd/UOJffmNmMaoULdRfsq8wQ0kkjF02AXd6r/c9erFwbdlSlKmGPOHOJGcqAF6AxFXig BXz84SMbrx2/tTD0oOAXoZ+fMtyqcK07G+b2TbV5c80FOxiFQ/Ix5FRDm+G4cIbuMCNF 04Kw== 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:cc:to:subject :message-id:date:from:references:in-reply-to:mime-version :arc-authentication-results; bh=qapUBq12tswhhVedmLgeukm5Ew7IDSxqtFAjLvtxmYI=; b=hO+ZMaS61W9fwpawRjhjU5QOb3c9MCSNLCJvtWxz+KgR5bwTKingu2enMbXMu7opzx vgAYYeh97De+OVJ7Zu+jocYQIbcASs8XNy36PJ4vBewjoGaxcggfomL3w4eOM1YHgbec Ob5av9ecHyKb16N6cq68DWNpAkMLioUvVJEj9iZHs3KeHsZw4mkULmEyUfT0tjb6qpjV rrC/qZPyviCDaJGggbL2Sjrl/Qum5FMCn4iPZfNT0WF/VyGip1CF1ErEOcvf1/hFTJZT f2XXokJBOaGxK6FenJp2n1n8yq2yB6e9tFeNmAF/uEz6GCWExkmhuTitlhppLuqJq358 WaNw== 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 u12si5614692pfl.24.2018.02.13.02.37.41; Tue, 13 Feb 2018 02:37:56 -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 S934034AbeBMKgw convert rfc822-to-8bit (ORCPT + 99 others); Tue, 13 Feb 2018 05:36:52 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:51533 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933865AbeBMKgs (ORCPT ); Tue, 13 Feb 2018 05:36:48 -0500 Received: by mail-wm0-f67.google.com with SMTP id r71so15113787wmd.1; Tue, 13 Feb 2018 02:36:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=V3c0CzIBCiSWjmafEmzMTjTCVHjffWY/f1kMjipujnc=; b=Thrma4h7OiuMnxsEemsN2mZZKmeBN2m0HgcG57fpOnVUoyr4n1wIZ4b9u9U/S7uL4q x5DlQIaq3/3mCnBpT+eYP0VQeUBJFCEdZiGE+qmPFBdcYaO9hQ6fZocdmfYwKMSiLpnW nPgx9I9IVbBlhjuZZoswxsjQizNW4xLn9nZD4ymbco5gtEkfkchRTlpcBW5LXs8ckvu9 ZCqi9TVA2KgQFlYX/D0QVeTWu2vqEDo2mf4U7mQpDCeldoLRMwmdbVUQP/QwnBtmTGdb Wjveh6Krt3Y+fOgYsuPOCMJ1exeQnZnan7tfys9plVnCf9vCYMuVor+OzwTtq5OaFxoj xTRA== X-Gm-Message-State: APf1xPCyuOPvu40Nm57SaPlKTNqvMsuB5H65NYGYgsMPCoS2If39ETf0 ngrvH22jGD6dINYgWvVYByaur9K/ X-Received: by 10.80.144.79 with SMTP id z15mr1469945edz.235.1518518206505; Tue, 13 Feb 2018 02:36:46 -0800 (PST) Received: from mail-wr0-f176.google.com (mail-wr0-f176.google.com. [209.85.128.176]) by smtp.gmail.com with ESMTPSA id q11sm6397812edj.64.2018.02.13.02.36.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Feb 2018 02:36:46 -0800 (PST) Received: by mail-wr0-f176.google.com with SMTP id k9so4330572wre.9; Tue, 13 Feb 2018 02:36:45 -0800 (PST) X-Received: by 10.223.142.3 with SMTP id n3mr778292wrb.151.1518518205539; Tue, 13 Feb 2018 02:36:45 -0800 (PST) MIME-Version: 1.0 Received: by 10.223.208.197 with HTTP; Tue, 13 Feb 2018 02:36:24 -0800 (PST) In-Reply-To: References: <20180203112353.13497-1-icenowy@aosc.io> <20180205095558.2e713c24cdb7c3232943db52@bidouilliste.com> <207CD143-6535-42C9-BEF3-9D2614336482@aosc.io> From: Chen-Yu Tsai Date: Tue, 13 Feb 2018 18:36:24 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] Revert "ARM: dts: sunxi: Add regulators for Sinovoip BPI-M2" To: Emmanuel Vadot Cc: Icenowy Zheng , devicetree , Maxime Ripard , linux-sunxi , linux-kernel , linux-arm-kernel Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 10, 2018 at 5:20 AM, Emmanuel Vadot wrote: > 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. They are defined. See axp22x.dtsi, which you included in your patch. 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. > >> 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. It adheres to the bindings, but does not accurately describe the hardware constraints. ChenYu > > >>> >>> 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 = <®_dcdc3>; >>>> -}; >>>> - >>>> &ehci0 { >>>> status = "okay"; >>>> }; >>>> @@ -155,17 +151,6 @@ >>>> status = "okay"; >>>> }; >>>> >>>> -&p2wi { >>>> - status = "okay"; >>>> - >>>> - axp22x: pmic@68 { >>>> - compatible = "x-powers,axp221"; >>>> - reg = <0x68>; >>>> - interrupt-parent = <&nmi_intc>; >>>> - interrupts = <0 IRQ_TYPE_LEVEL_LOW>; >>>> - }; >>>> -}; >>>> - >>>> &pio { >>>> gmac_phy_reset_pin_bpi_m2: gmac_phy_reset_pin@0 { >>>> pins = "PA21"; >>>> @@ -191,48 +176,6 @@ >>>> }; >>>> }; >>>> >>>> -#include "axp22x.dtsi" >>>> - >>>> -®_dc5ldo { >>>> - regulator-min-microvolt = <700000>; >>>> - regulator-max-microvolt = <1320000>; >>>> - regulator-name = "vdd-cpus"; >>>> -}; >>>> - >>>> -®_dcdc1 { >>>> - regulator-always-on; >>>> - regulator-min-microvolt = <3000000>; >>>> - regulator-max-microvolt = <3000000>; >>>> - regulator-name = "vdd-3v0"; >>>> -}; >>>> - >>>> -®_dcdc2 { >>>> - regulator-min-microvolt = <700000>; >>>> - regulator-max-microvolt = <1320000>; >>>> - regulator-name = "vdd-gpu"; >>>> -}; >>>> - >>>> -®_dcdc3 { >>>> - regulator-always-on; >>>> - regulator-min-microvolt = <700000>; >>>> - regulator-max-microvolt = <1320000>; >>>> - regulator-name = "vdd-cpu"; >>>> -}; >>>> - >>>> -®_dcdc4 { >>>> - regulator-always-on; >>>> - regulator-min-microvolt = <700000>; >>>> - regulator-max-microvolt = <1320000>; >>>> - regulator-name = "vdd-sys-dll"; >>>> -}; >>>> - >>>> -®_dcdc5 { >>>> - regulator-always-on; >>>> - regulator-min-microvolt = <1500000>; >>>> - regulator-max-microvolt = <1500000>; >>>> - regulator-name = "vcc-dram"; >>>> -}; >>>> - >>>> &uart0 { >>>> pinctrl-names = "default"; >>>> pinctrl-0 = <&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