Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp308049rwb; Thu, 1 Dec 2022 02:26:06 -0800 (PST) X-Google-Smtp-Source: AA0mqf7C+UaCYB4nbrm/sO8DJPnvndDtotRXf8HN4kFQczjZ4iWo0rvu3OI4e1NPYjITsGoTFfmQ X-Received: by 2002:a63:2052:0:b0:478:57b0:1c91 with SMTP id r18-20020a632052000000b0047857b01c91mr8206973pgm.371.1669890366229; Thu, 01 Dec 2022 02:26:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669890366; cv=none; d=google.com; s=arc-20160816; b=IeUkuTtb463P4wJNh1jR8K0IAWizcKGjuRi3HnadOQqHu97uNkxwLeSDrS1ZmV4qOf VQauApHYAyPjqEXZUj0Jl3i2v+XLcskFRmtNl8vM1DRgXsyFGDHwY5Ap/prwj3Ar36Tt n/doa8c86tPB3KwcRQAJ7NaARnq5qrBpjiFltVkGdaKiohIFABt5qHSVADBoMd4HCWGC 8dNuGrvuD90xJWQ3v+0e4PEmCrlHcgV3ngq29yIE/QFNeSYYWJ9yUjAxARLq3JZJPaAi l3+uWpdqT+itEzokJ7ZM0kllhk6ij4hNVPBbODlY+XFaJqaQ+tXl8C3fz8dWXSHL3LxF wVIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=/qKuTYY7Z1nj0LQIWFYuKi0dnnF/GbIxaRDJqeVElrM=; b=xg6znVfeEWB1EXVTBEo74+Gp6d8AIKGf40ocIuNsMlrVhrPUHG+7v2hn4Hcji7Behr dVFP2MWlRWs2Dr+L12xEVmXq42yA3kuYIUAkkc9cJ2nWzI3vzlEETFxrdPQ00+U8qJn+ BqqWfdqRhOa3ZukVCpbSEnVQTtLpMcdpHUbCAyDS1N2HToXsnr3djKY1kgb8cdRpJj6T EZ7nvXtAMmeD3qML46SBNCCgGQrwQcpTXyPqzzXVKC8QMyvkIWgw4rzPClu55Pcntvwk yppkoBfGPmvxN8XO15nT4cGiTIEOs53BiZZrQlo+CL0UQVp2BAb405q5Y1AmeD7ac6dj nKPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=kAynYHE5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t22-20020a656096000000b004775a57f324si3932469pgu.296.2022.12.01.02.25.54; Thu, 01 Dec 2022 02:26:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=kAynYHE5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230131AbiLAKLH (ORCPT + 83 others); Thu, 1 Dec 2022 05:11:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229807AbiLAKKg (ORCPT ); Thu, 1 Dec 2022 05:10:36 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 777A01B1C5; Thu, 1 Dec 2022 02:10:34 -0800 (PST) Received: from [192.168.1.100] (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 792856602AC1; Thu, 1 Dec 2022 10:10:32 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1669889433; bh=T8Mv1kLojBuRdbHzbub+mx4q2+A4SuXT+pni77g+sfs=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=kAynYHE5O4jVBHrd3yKzNM+aWXpDQfzOZO55Qdq2Ca1rrXt56jMmq/Vz4A+/Nw/nj tn6H8N8e3wkAY27aSAS85AUa4IXr4rhxBjbahsl2fmz9fWJJ4jnECB10TbHEkq5yMg GzzxqlxTUBEUSkBmW71YPu5ncOzzfMO+12oMQKu9ZKq0+RC/ULt+xgU5ursrPGlz2I GZmBgpFyKNryvSMAwpUXb/wz7LvT73kf6iezQ7UiYz7t57F2y198JhdUdgo539gKNb Nj4wImy6gmZ+eknVMNJapnmfybq2lrgbm7+3cUHW8nYJfF79Yvkoskw7teIwCKHCAC 8itwbZJs3JX2Q== Message-ID: <28d94df0-6e87-3019-dc10-a587f84488fb@collabora.com> Date: Thu, 1 Dec 2022 11:10:30 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH] arm64: dts: mt8192: Add adsp power domain controller Content-Language: en-US To: Chen-Yu Tsai Cc: Allen-KH Cheng , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , Project_Global_Chrome_Upstream_Group@mediatek.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org References: <20221201073328.1559-1-allen-kh.cheng@mediatek.com> <8ae2a510-abf6-6e1b-9893-293db7d930e7@collabora.com> From: AngeloGioacchino Del Regno In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Il 01/12/22 11:05, Chen-Yu Tsai ha scritto: > On Thu, Dec 1, 2022 at 5:39 PM AngeloGioacchino Del Regno > wrote: >> >> Il 01/12/22 10:10, Chen-Yu Tsai ha scritto: >>> On Thu, Dec 1, 2022 at 5:07 PM AngeloGioacchino Del Regno >>> wrote: >>>> >>>> Il 01/12/22 08:33, Allen-KH Cheng ha scritto: >>>>> Add adsp power domain controller node for mt8192 SoC. >>>>> >>>>> Signed-off-by: Allen-KH Cheng >>>>> --- >>>>> Ref: https://lore.kernel.org/all/2ec80bd8-dfef-d2e6-eb41-6e6088043e33@collabora.com/ >>>>> [Allen-KH Cheng ] >>>>> --- >>>>> --- >>>>> arch/arm64/boot/dts/mediatek/mt8192.dtsi | 8 ++++++++ >>>>> include/dt-bindings/power/mt8192-power.h | 1 + >>>>> 2 files changed, 9 insertions(+) >>>>> >>>> >>>> Allen, thanks for this one, but it's incomplete... >>>> >>>> First of all, you must add the power domain on the driver itself, specifically, >>>> in drivers/soc/mediatek/mt8192-pm-domains.h - otherwise this change will have no >>>> effect! >>> >>> Actually it's worse. The driver doesn't know about the new power domain, >>> and so it will fail to probe. We might need to make the power domain driver >>> fail gracefully and skip unknown power domains. >>> >> >> Right. It's worse. I don't know, though, if gracefully skipping unknown power >> domains in the driver would be a good decision... as sometimes error messages >> go unnoticed. >> >> When the platform "explodes" instead, you're forced to read that log carefully >> and get it working again... Anyway, I'm only thinking out loud, nothing less and >> nothing more than that :-) > > Me too. :) > >> By the way, we can probably expand on that topic a bit later, as it's outside of >> the scope of this specific change. >> >> Back to topic, if we get one series containing both changes (devicetree, bindings >> and driver) with the right Fixes tags and/or Cc stable, we shouldn't have such >> issue on backports so we can probably ignore that potential issue, I think? :-) > > Everything goes through the soc tree, so they should appear in Linus's tree > and get picked by stable at more or less the same time. I think we would > want the driver change to appear before the dts change, for bisectability's > sake (because of header dependencies and driver errors). > > So we probably want: > 1. driver + binding header changes > 2. dtsi changes > > And have these merged through fixes so that the history between them is linear. > Perfect, I fully agree. > > ChenYu > >> Cheers, >> Angelo >> >>> ChenYu >>> >>>> ...Then, as Chen-Yu said, you should also add the power domain to the scp_adsp >>>> clock node as that's solving the lockup issue... >>>> >>>> .......and last, but not least: we need a Fixes tag to backport this fix, here >>>> and on the commit that adds the missing power domain in the driver. >>>> >>>> Thanks, >>>> Angelo >>>> >>>>> diff --git a/arch/arm64/boot/dts/mediatek/mt8192.dtsi b/arch/arm64/boot/dts/mediatek/mt8192.dtsi >>>>> index 424fc89cc6f7..e71afba871fc 100644 >>>>> --- a/arch/arm64/boot/dts/mediatek/mt8192.dtsi >>>>> +++ b/arch/arm64/boot/dts/mediatek/mt8192.dtsi >>>>> @@ -514,6 +514,14 @@ >>>>> }; >>>>> }; >>>>> }; >>>>> + >>>>> + power-domain@MT8192_POWER_DOMAIN_ADSP { >>>>> + reg = ; >>>>> + clocks = <&topckgen CLK_TOP_ADSP_SEL>; >>>>> + clock-names = "adsp"; >>>>> + mediatek,infracfg = <&infracfg>; >>>>> + #power-domain-cells = <0>; >>>>> + }; >>>>> }; >>>>> }; >>>>> >>>>> diff --git a/include/dt-bindings/power/mt8192-power.h b/include/dt-bindings/power/mt8192-power.h >>>>> index 4eaa53d7270a..63e81cd0d06d 100644 >>>>> --- a/include/dt-bindings/power/mt8192-power.h >>>>> +++ b/include/dt-bindings/power/mt8192-power.h >>>>> @@ -28,5 +28,6 @@ >>>>> #define MT8192_POWER_DOMAIN_CAM_RAWA 18 >>>>> #define MT8192_POWER_DOMAIN_CAM_RAWB 19 >>>>> #define MT8192_POWER_DOMAIN_CAM_RAWC 20 >>>>> +#define MT8192_POWER_DOMAIN_ADSP 21 >>>>> >>>>> #endif /* _DT_BINDINGS_POWER_MT8192_POWER_H */ >>>>> >>>> >> >> -- AngeloGioacchino Del Regno Software Engineer Collabora Ltd. Platinum Building, St John's Innovation Park, Cambridge CB4 0DS, UK Registered in England & Wales, no. 5513718