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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E99F1C77B7C for ; Fri, 26 May 2023 21:17:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243945AbjEZVRM (ORCPT ); Fri, 26 May 2023 17:17:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237887AbjEZVRL (ORCPT ); Fri, 26 May 2023 17:17:11 -0400 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C2C3AD for ; Fri, 26 May 2023 14:17:09 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-3f6094cb2d2so12266125e9.2 for ; Fri, 26 May 2023 14:17:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685135828; x=1687727828; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=OTZ2eTIi+dbM8D638/pa8mpVNPNj7JMHBYTJceqIyYw=; b=HSdLPH4/oJa1eARDfOrecCl7rMzSudwuX7YbfKpsJepRkJEUTOtE7NAgeK7NmY6Mc+ QZKj2STMXSR7dTR+WXvkfvrUY66tuDLC4pnXt+BhgIFM48Z2VLWVXHq2vkGCiUeqKkX3 PCWQg4kIGzNQzpzxIibTFdtRjsv2+E9juaNW7D1xillrtYAGVXkDtQrZaETbUFSpu+aA cLLk4s8M22vP8rA4k3RLIWHAyzHV75t74rB83Efu1Y3mA5ZICwRa1krG6HmUXx7IrJ9s Ijozp6sNwGxh6UYfnRSPmaONvO5g2eAY68xxO0NplwRJuyHUIy8fqDMlR+Dfp1L4wnb7 S7sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685135828; x=1687727828; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=OTZ2eTIi+dbM8D638/pa8mpVNPNj7JMHBYTJceqIyYw=; b=a0vPsjESO3GT+MLXfzFpJB29HSHK2+Wjjy90ZomEyI0yOfrym7rVDPJuuTOpba7aoC a230W6TJY+op6Lyk57xoV7VfpVlSXQIwkArX9GMf4ohs2gd42hyjmVmBXZ9plHHeJqoy D2YlApaNzIta0tcmKXORraM8v4k3lYUhmK+nsA8ZBzaJwj1NkBqVI6M1A51fS3vVioqu rgmfLg3RkRT9efhX93aewqz6smZtXfJDUuXiXcj8gOfM5LqTccZFlFpSuXmM1m4i8b2F FYGfLF65tiGp/0v/rDVaZvpRWhZKTsoYDAQKb0UsA2wtLanP3LtNojIIL03TTqzaAvF/ wTsg== X-Gm-Message-State: AC+VfDyoJvsN1G6U/Z1P8aWW22sQmcRVWi6C36O8BL2k7mU6DBy1bsXs gnH+N0GbaVxj/DrIR9LmSUbrHQ== X-Google-Smtp-Source: ACHHUZ7mmG08d1oCokGQ0OUOjjya3HeUe1ATW3LFm5q7dy7RvaiKWJRYLkGlsTmSEucp5+EGF0/NZA== X-Received: by 2002:a05:600c:228c:b0:3f6:1a9:b9db with SMTP id 12-20020a05600c228c00b003f601a9b9dbmr2388250wmf.21.1685135828039; Fri, 26 May 2023 14:17:08 -0700 (PDT) Received: from [192.168.0.162] (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id t11-20020a5d49cb000000b0030732d6e104sm6187025wrs.105.2023.05.26.14.17.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 26 May 2023 14:17:07 -0700 (PDT) Message-ID: <7bbbf520-d70f-5df6-33ce-a888bf364aa5@linaro.org> Date: Fri, 26 May 2023 22:17:06 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH v2 3/3] media: camss: Link CAMSS power domain Content-Language: en-US To: Konrad Dybcio , Yassine Oudjana , Robert Foss , Todor Tomov , Andy Gross , Bjorn Andersson , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Hans Verkuil Cc: Yassine Oudjana , Vladimir Zapolskiy , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230526180712.8481-1-y.oudjana@protonmail.com> <20230526180712.8481-4-y.oudjana@protonmail.com> From: Bryan O'Donoghue In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org On 26/05/2023 21:57, Konrad Dybcio wrote: > This code contains a whole bunch of hacky counting logic that should have > been substituted with _byname, but now we're stuck with indices to keep > compatibility with old DTs :/ > > If CAMSS_GDSC (talking about pre-TITAN hw) was a parent of all the other > CAMSS-related GDSCs, we could make it their parent in the clock driver > and call it a day. I mean, it wouldn't make much sense from a hw design POV if that weren't the case.. Hmm looks like its already there. static struct gdsc vfe0_gdsc = { .gdscr = 0x3664, .cxcs = (unsigned int []){ 0x36a8 }, .cxc_count = 1, .pd = { .name = "vfe0", }, .parent = &camss_gdsc.pd, .pwrsts = PWRSTS_OFF_ON, }; static struct gdsc vfe1_gdsc = { .gdscr = 0x3674, .cxcs = (unsigned int []){ 0x36ac }, .cxc_count = 1, .pd = { .name = "vfe1", }, .parent = &camss_gdsc.pd, .pwrsts = PWRSTS_OFF_ON, }; I feel this is probably a problem in the description of dependencies for the CSIPHY in the dts for the 8996.. I.e. the CSIPHY requires some clocks and power-rails to be switched on ah.. static const struct resources csiphy_res_8x96[] = { /* CSIPHY0 */ { .regulators = {}, .clock = { "top_ahb", "ispif_ahb", "ahb", "csiphy0_timer" }, should probably look something like static const struct resources csiphy_res_8x96[] = { /* CSIPHY0 */ { .regulators = {}, .clock = { "top_ahb", "ispif_ahb", "ahb", "csiphy0_timer", "vfe0"}, But basically yeah, we haven't modeled the dependency to the CAMSS_GDSC via the VFEx Hmm wait - why haven't we included the CAMSS_GDSC in the dtsi for the 8996 ? git diff diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi index 30257c07e1279..60e5d3f5336d4 100644 --- a/arch/arm64/boot/dts/qcom/msm8996.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi @@ -2120,7 +2120,8 @@ camss: camss@a00000 { "vfe0", "vfe1"; power-domains = <&mmcc VFE0_GDSC>, - <&mmcc VFE1_GDSC>; + <&mmcc VFE1_GDSC>, + <&mmcc CAMSS_GDSC>; Either of those approaches should mitigate this patch. --- bod