From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1463FC433FE for ; Mon, 20 Sep 2021 07:43:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E867B60F26 for ; Mon, 20 Sep 2021 07:43:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235118AbhITHpC (ORCPT ); Mon, 20 Sep 2021 03:45:02 -0400 Received: from ssl.serverraum.org ([176.9.125.105]:52861 "EHLO ssl.serverraum.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231657AbhITHpB (ORCPT ); Mon, 20 Sep 2021 03:45:01 -0400 Received: from [127.0.0.1] (ip-109-43-48-5.web.vodafone.de [109.43.48.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id 2536522205; Mon, 20 Sep 2021 09:43:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1632123810; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jG+FiHLnsnQBouOgKZIw3mJf4cZfLDOlFHAh4FbgyyE=; b=oTr7dekHcylXJI3ctaSGGEIpcd+KbBzAu3ARkdt7wQG/GvZJ1N5wPBBQ3Ryklgg4KoDEwg eEpQwfiIIQ3AzjIPbXL4SPTFdYJmmM8/6j5oPhvHZDbR2WOYLo9Zz2qxeDFFcqYzvIelbr l/4gT0v9B1c9BzYsxl9v/5AAyup2k2s= Date: Mon, 20 Sep 2021 09:43:23 +0200 From: Michael Walle To: Frieder Schrempf , Heiko Thiery , Lucas Stach CC: devicetree@vger.kernel.org, =?ISO-8859-1?Q?Guido_G=FCnther?= , Fabio Estevam , Shengjiu Wang , "Angus Ainslie (Purism)" , linux-kernel@vger.kernel.org, Krzysztof Kozlowski , Joakim Zhang , Rob Herring , NXP Linux Team , Pengutronix Kernel Team , Shawn Guo , Sascha Hauer , linux-arm-kernel@lists.infradead.org Subject: =?US-ASCII?Q?Re=3A_=5BPATCH=5D_arm64=3A_dts=3A_imx8mm-kontron-n8?= =?US-ASCII?Q?01x-som=3A_do_not_allow_to_switch_off_buck2?= User-Agent: K-9 Mail for Android In-Reply-To: References: <20210915120325.20248-1-heiko.thiery@gmail.com> <7e7ee4244ababc0a46e0875222c7e37d@walle.cc> <898fd5e0-2073-3689-89b6-2c5071773786@kontron.de> <9bcf7b749dca57d42aa2e7afd88b5a26f3eeff2a.camel@pengutronix.de> Message-ID: <447B96FA-2B75-4C72-A72B-1C1D29137B2C@walle.cc> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 20=2E September 2021 09:31:20 MESZ schrieb Frieder Schrempf : >On 17=2E09=2E21 18:10, Heiko Thiery wrote: >> Hi Lucas, >>=20 >> Am Fr=2E, 17=2E Sept=2E 2021 um 13:44 Uhr schrieb Lucas Stach >> : >>> >>> Am Freitag, dem 17=2E09=2E2021 um 09:28 +0200 schrieb Heiko Thiery: >>>> Hi Frieder, >>>> >>>> Am Mi=2E, 15=2E Sept=2E 2021 um 14:09 Uhr schrieb Frieder Schrempf >>>> : >>>>> >>>>> On 15=2E09=2E21 14:05, Michael Walle wrote: >>>>>> Am 2021-09-15 14:03, schrieb Heiko Thiery: >>>>>>> The buck2 output of the PMIC is the VDD core voltage of the cpu=2E >>>>>>> Switching off this will poweroff the CPU=2E Add the 'regulator-alw= ays-on' >>>>>>> property to avoid this=2E >>>>>> >>>>>> Mh, have this ever worked? Is there a commit which introduced a reg= ression? >>>>> >>>>> Yes, this did work before, even without 'regulator-always-on'=2E I >>>>> currently don't understand why this is needed=2E The regulator is >>>>> referenced in the CPU nodes as 'cpu-supply'=2E This should be enough= to >>>>> not disable it as long as the CPU is up=2E >>>> >>>> I rechecked that with 5=2E11, 5=2E10 and 5=2E9 and I see on all of th= em the >>>> same issue: >>>> >>>> [ 31=2E716031] vdd-5v: disabling >>>> [ 31=2E719032] rst-usb-eth2: disabling >>>> [ 31=2E722553] buck2: disabling >>>> >>>> While on that I tried to compare with other boards and see that they >>>> also have the cpu-voltage marked as "regulator-always-on"=2E The only >>>> exception in dts/freescale is in imx8mq-librem5-devkit=2Edts [1] that >>>> has not set this property=2E >>>> >>>> I agree with you and don't understand why this is happening=2E Has >>>> anyone else an explanation? >>>> >>>> [1] https://eur04=2Esafelinks=2Eprotection=2Eoutlook=2Ecom/?url=3Dhtt= ps%3A%2F%2Felixir=2Ebootlin=2Ecom%2Flinux%2Flatest%2Fsource%2Farch%2Farm64%= 2Fboot%2Fdts%2Ffreescale%2Fimx8mq-librem5-devkit=2Edts%23L319&data=3D04= %7C01%7Cfrieder=2Eschrempf%40kontron=2Ede%7Cce9d266ad78a4d06721008d979f5aee= d%7C8c9d3c973fd941c8a2b1646f3942daf1%7C0%7C0%7C637674918380815550%7CUnknown= %7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6= Mn0%3D%7C1000&sdata=3DPsTKX4MXGwvvP6WxmQ1OWc8e32YI6Nsu%2FEkcNR4V8is%3D&= amp;reserved=3D0 >>>> >>> Maybe your kernel config is missing the cpufreq driver, so you don't >>> have a consumer of the regulator? >>> >>> Marking the regulator as always-on seems like the right thing to do, >>> you don't want to depend on a consumer showing up to make sure that >>> your CPU voltage isn't cut=2E=2E=2E >>=20 >> shouldn't it be that the node cpu-supply here is a consumer of the >> referenced voltage? > >Yes, but as Michael and Lucas noted, the consumer is only active if the >cpufreq driver is loaded and we don't want to depend on this=2E In my >config I always had this compiled into the kernel so I didn't notice >that the always-on property is missing=2E Hm=2E So any cpu core voltage has to have the "always-on" property? On any= SoC? Shouldn't there be some code to prevent the disabling of the voltage = if the cpu nodes have a cpu-supply phandle? -michael From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5612BC433F5 for ; Mon, 20 Sep 2021 07:45:45 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 2741B60F48 for ; Mon, 20 Sep 2021 07:45:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2741B60F48 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=walle.cc Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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:Message-ID:References: In-Reply-To:Subject:CC:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5AT3aKSLkAbE6+F7bbm1uNb2UVd5Jg/08qK7gSx5KIM=; b=Ch7Nt5TZUxgSCR a1vpibXZLD4gRLy6/tQ0tRRhjkKg1jhi7JswZTUD6/rolgjt+3OFRq93eoa/vn9bfwF2KXwNb2EC0 aUAxZ64F/OxGQ48JLNd53hZgSmjhQmMPFSlqH+H/pSuyqZMLXtm7GgI+mFoohHmgOFwIMREO0Jpao fPOQDGuJBAQPtS71X4u7WhU1Po5b6AJEHID76ZoN+A1N9jxC7va6kZpix26mW5TR1vBtzoz5UdYRQ 7HIfFfO0w9UZLdnrHSGGgJBgCmnb2e1qqzMDhJwlbMFkTkKPHURp461MRKe5slWUNzJ5Qivecxt31 hWfYj4rvV7zI88niO4vw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mSDxu-000oIZ-Mq; Mon, 20 Sep 2021 07:43:50 +0000 Received: from ssl.serverraum.org ([176.9.125.105]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mSDxk-000oGX-29 for linux-arm-kernel@lists.infradead.org; Mon, 20 Sep 2021 07:43:42 +0000 Received: from [127.0.0.1] (ip-109-43-48-5.web.vodafone.de [109.43.48.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id 2536522205; Mon, 20 Sep 2021 09:43:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1632123810; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jG+FiHLnsnQBouOgKZIw3mJf4cZfLDOlFHAh4FbgyyE=; b=oTr7dekHcylXJI3ctaSGGEIpcd+KbBzAu3ARkdt7wQG/GvZJ1N5wPBBQ3Ryklgg4KoDEwg eEpQwfiIIQ3AzjIPbXL4SPTFdYJmmM8/6j5oPhvHZDbR2WOYLo9Zz2qxeDFFcqYzvIelbr l/4gT0v9B1c9BzYsxl9v/5AAyup2k2s= Date: Mon, 20 Sep 2021 09:43:23 +0200 From: Michael Walle To: Frieder Schrempf , Heiko Thiery , Lucas Stach CC: devicetree@vger.kernel.org, =?ISO-8859-1?Q?Guido_G=FCnther?= , Fabio Estevam , Shengjiu Wang , "Angus Ainslie (Purism)" , linux-kernel@vger.kernel.org, Krzysztof Kozlowski , Joakim Zhang , Rob Herring , NXP Linux Team , Pengutronix Kernel Team , Shawn Guo , Sascha Hauer , linux-arm-kernel@lists.infradead.org Subject: =?US-ASCII?Q?Re=3A_=5BPATCH=5D_arm64=3A_dts=3A_imx8mm-kontron-n8?= =?US-ASCII?Q?01x-som=3A_do_not_allow_to_switch_off_buck2?= User-Agent: K-9 Mail for Android In-Reply-To: References: <20210915120325.20248-1-heiko.thiery@gmail.com> <7e7ee4244ababc0a46e0875222c7e37d@walle.cc> <898fd5e0-2073-3689-89b6-2c5071773786@kontron.de> <9bcf7b749dca57d42aa2e7afd88b5a26f3eeff2a.camel@pengutronix.de> Message-ID: <447B96FA-2B75-4C72-A72B-1C1D29137B2C@walle.cc> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210920_004340_326898_80B1EF04 X-CRM114-Status: GOOD ( 15.04 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Am 20. September 2021 09:31:20 MESZ schrieb Frieder Schrempf : >On 17.09.21 18:10, Heiko Thiery wrote: >> Hi Lucas, >> >> Am Fr., 17. Sept. 2021 um 13:44 Uhr schrieb Lucas Stach >> : >>> >>> Am Freitag, dem 17.09.2021 um 09:28 +0200 schrieb Heiko Thiery: >>>> Hi Frieder, >>>> >>>> Am Mi., 15. Sept. 2021 um 14:09 Uhr schrieb Frieder Schrempf >>>> : >>>>> >>>>> On 15.09.21 14:05, Michael Walle wrote: >>>>>> Am 2021-09-15 14:03, schrieb Heiko Thiery: >>>>>>> The buck2 output of the PMIC is the VDD core voltage of the cpu. >>>>>>> Switching off this will poweroff the CPU. Add the 'regulator-always-on' >>>>>>> property to avoid this. >>>>>> >>>>>> Mh, have this ever worked? Is there a commit which introduced a regression? >>>>> >>>>> Yes, this did work before, even without 'regulator-always-on'. I >>>>> currently don't understand why this is needed. The regulator is >>>>> referenced in the CPU nodes as 'cpu-supply'. This should be enough to >>>>> not disable it as long as the CPU is up. >>>> >>>> I rechecked that with 5.11, 5.10 and 5.9 and I see on all of them the >>>> same issue: >>>> >>>> [ 31.716031] vdd-5v: disabling >>>> [ 31.719032] rst-usb-eth2: disabling >>>> [ 31.722553] buck2: disabling >>>> >>>> While on that I tried to compare with other boards and see that they >>>> also have the cpu-voltage marked as "regulator-always-on". The only >>>> exception in dts/freescale is in imx8mq-librem5-devkit.dts [1] that >>>> has not set this property. >>>> >>>> I agree with you and don't understand why this is happening. Has >>>> anyone else an explanation? >>>> >>>> [1] https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Felixir.bootlin.com%2Flinux%2Flatest%2Fsource%2Farch%2Farm64%2Fboot%2Fdts%2Ffreescale%2Fimx8mq-librem5-devkit.dts%23L319&data=04%7C01%7Cfrieder.schrempf%40kontron.de%7Cce9d266ad78a4d06721008d979f5aeed%7C8c9d3c973fd941c8a2b1646f3942daf1%7C0%7C0%7C637674918380815550%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=PsTKX4MXGwvvP6WxmQ1OWc8e32YI6Nsu%2FEkcNR4V8is%3D&reserved=0 >>>> >>> Maybe your kernel config is missing the cpufreq driver, so you don't >>> have a consumer of the regulator? >>> >>> Marking the regulator as always-on seems like the right thing to do, >>> you don't want to depend on a consumer showing up to make sure that >>> your CPU voltage isn't cut... >> >> shouldn't it be that the node cpu-supply here is a consumer of the >> referenced voltage? > >Yes, but as Michael and Lucas noted, the consumer is only active if the >cpufreq driver is loaded and we don't want to depend on this. In my >config I always had this compiled into the kernel so I didn't notice >that the always-on property is missing. Hm. So any cpu core voltage has to have the "always-on" property? On any SoC? Shouldn't there be some code to prevent the disabling of the voltage if the cpu nodes have a cpu-supply phandle? -michael _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel