Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp297563rwb; Thu, 1 Dec 2022 02:15:47 -0800 (PST) X-Google-Smtp-Source: AA0mqf5V+2u5orjkLvs/kFt++CePDiFEgVyku0o4OWLPLIcSGZQxHI5ZuqeVD90kNG5bTql2K0/F X-Received: by 2002:a17:906:2552:b0:7ad:917b:61ec with SMTP id j18-20020a170906255200b007ad917b61ecmr41822402ejb.513.1669889747727; Thu, 01 Dec 2022 02:15:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669889747; cv=none; d=google.com; s=arc-20160816; b=tRU02XIu7eGNA+U7+1u02LK/NEC5FQaZwUDtgoK2p+zHeM9J48mVIYUgZSaN6dOGtj SfCWaFBUjhG/5Ts2YFnvhr/vs5hW7hVyYJ3L26K/+MlOkrHIBxt8ddyzCa8rof1W3HyC ydwiy8uMjw8NKH4jxfxzjmOx8db/7ViiOeGY/atF0eOTTOLAZmOL7PzadNb8TVkhpfPa 7KRLWNLMw/i4/5rlRE5iUW4GjVGvRt9G7ekuaCW3t8BJpxCQj35/ZMNW4XeTGz7NmnrN +aL3tay/KFd78AXcMbg2mw3ymKpD6BYCzObThNLKlSyKbn+8P+VfypfGqJS1iETS6o5G xJvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=XrM8HiqXnZzTUWvDOAD7xr6db8l4mNmr+646ESgVc/Q=; b=cwZQRPFZ5uMb4uyS1Khm7P4iEtyRUFjc7MCxDKFQV77gl2qNX2nJjA6SrIkYeUaTw1 gQOC0jEBCsyjst+14j++P5LYJAhxwEu9Or5DvBOKNpuDzjJVVK+N64EyLX4ibQLsV9zk keUWZ765ejKoMNNaiPhq1pgUbePbYxbZmIKdzkJeIxhN/xNSEI+CsKZ5OY2oqc08Mcpd pUPkfjrRzHr+GUrNJwUPe/l9uwUfYIDnfhmp7gVYylLaIL+39UfvJrHejixH16AhNZjZ xJ3wGTmX8UppKu7YKuEXnSbdNCbNwOg8BtmYKouq4R0rNsvlAqZPNSNuRzvomvlcbTBX tvnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=cJbZWSet; 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=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z14-20020a05640240ce00b004595af54eacsi3789649edb.226.2022.12.01.02.15.27; Thu, 01 Dec 2022 02:15:47 -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=@chromium.org header.s=google header.b=cJbZWSet; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230198AbiLAKF4 (ORCPT + 82 others); Thu, 1 Dec 2022 05:05:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230115AbiLAKFx (ORCPT ); Thu, 1 Dec 2022 05:05:53 -0500 Received: from mail-vk1-xa33.google.com (mail-vk1-xa33.google.com [IPv6:2607:f8b0:4864:20::a33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6A54326F9 for ; Thu, 1 Dec 2022 02:05:51 -0800 (PST) Received: by mail-vk1-xa33.google.com with SMTP id g137so585196vke.10 for ; Thu, 01 Dec 2022 02:05:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=XrM8HiqXnZzTUWvDOAD7xr6db8l4mNmr+646ESgVc/Q=; b=cJbZWSetyvmZNNWfKs/XjqCxg926Jsjxx8jgSzxrFnHfI9lA7CTAQmRtPIFXhfNX8k tPeidGD0TdPRJA0MAxXbWI1LLJ6kadkbOW8vukkZjIKO9kmuJglBgh1/d3QABwZtbP66 JzLAAQPysycvtiJyWjdqKtej8VBeKHxyXOWHY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=XrM8HiqXnZzTUWvDOAD7xr6db8l4mNmr+646ESgVc/Q=; b=m6ygM6iPMRp0kEp4ODYv7gpOV4KKzQch8TO2rn+ll0rfUCg1N0n1GMsuh1ed0OwWGr A/Hyl1Wfpvjk5JARiG7unm1umns5yzi113UGd8ON/q7M3kCdw0Nm+AMUe9gvw4y/Hufy jJj+nDiy/K6tHkeF316RbBONFLI0HpgybEroBQKKDhLLSRo0RrsGk38pCmb1h/tEKem4 pnNF1hcXy7E3vuynwGO877W7r6teLzX5y2IlmsrxswtxOTp1YbgTO8b3HpSM6XW+BtQe U3CbN+SVijc+ue1PeUl0AN0RM1BbY/NWUovW12SA/a1Y5H/K+4///K85m3UzsD4Ob93e DEUg== X-Gm-Message-State: ANoB5plwUXVxrECUVc7rPWbXWm260Whu43WvmtR/X6FlTnX/ycF/sLQs IH9t4M46RnThH8aqFns83zT6huWQwmRtEOfMx8wZOw== X-Received: by 2002:a1f:9f0f:0:b0:3b6:90df:eb0 with SMTP id i15-20020a1f9f0f000000b003b690df0eb0mr37365702vke.30.1669889150895; Thu, 01 Dec 2022 02:05:50 -0800 (PST) MIME-Version: 1.0 References: <20221201073328.1559-1-allen-kh.cheng@mediatek.com> <8ae2a510-abf6-6e1b-9893-293db7d930e7@collabora.com> In-Reply-To: <8ae2a510-abf6-6e1b-9893-293db7d930e7@collabora.com> From: Chen-Yu Tsai Date: Thu, 1 Dec 2022 18:05:39 +0800 Message-ID: Subject: Re: [PATCH] arm64: dts: mt8192: Add adsp power domain controller To: AngeloGioacchino Del Regno 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 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. 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 */ > >>> > >> > >