From patchwork Fri May 26 18:07:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yassine Oudjana X-Patchwork-Id: 99598 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp666126vqr; Fri, 26 May 2023 11:13:01 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7C93GM0UojCyHPq1JDmNh765bomz58dRlNXDIrtW10FRSouCoJTd90PrJ5sgovlPErJfaZ X-Received: by 2002:a17:903:1207:b0:1ab:bfb:4b6e with SMTP id l7-20020a170903120700b001ab0bfb4b6emr3745043plh.31.1685124781241; Fri, 26 May 2023 11:13:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685124781; cv=none; d=google.com; s=arc-20160816; b=bhENmQiGPFPARdgKjX1dUdHeUpN7Z6+DIjmLByA88Vro+itOWWHW1nNr1aXzhZ2Zyk CiMometBPCaE111kA2+iKKKnjLw/InSeqofUHd3+/ciPbeAWpxiI7axXiPPJ4Nybpawk txflUoAyyFYelWGB2/PVuPU6z1RYv+hDyK8ay/h3foPdCDvEzZTFRpmENJHq+y0m4cxf bDMXvwSTvETe0+5q8KtPGMWM6m01oEecXUWMO2LLk/abmtjB0no4v07QLLnLgIaJNdla pMbfwKPMNB9fdw8mkjq4Ifb28JQX4OdUlmvZUN6HPPBZbt69URjWThIwa1+2ncVH0IqY ELlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=n1w9YqBJg1t/GBfhAmcVQVw/GD/zxil33PlKHiL+BD8=; b=BBS4Lzlp+IRjdYlq23ReOxkrmF/pmkJEr3I3x56m4XGPJKZaTuAY8a3HO7BbrZQ2qP 216osMzhiVXNzVh5EseQ8R4ow4rxi9hFUA9BUqjLVNP8dKZOWeDFNOei47Awgj7KAjYI /EDpYyNuV6g8t9yp6b8x9cujx74frBSD+CE3HOyktOo36AU5v3dfOxDJVRqdsswaLc5W TXN51wgaNT8K4zBw26FKesSxVh0v7+SpwS0E+IsXXKCqPM5xP+i4tsntUclTsalj47X/ fZtCS/cF9/YlnLWQuwXvu+p8reHmY7fGMEI9CucHn1ARhK1OcYTH4CmXvRbrWxiRrhp7 TctQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=NWO9GNc9; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u17-20020a170903125100b001aafc5b5ca3si4555803plh.524.2023.05.26.11.12.47; Fri, 26 May 2023 11:13:01 -0700 (PDT) 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=@gmail.com header.s=20221208 header.b=NWO9GNc9; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229977AbjEZSHs (ORCPT + 99 others); Fri, 26 May 2023 14:07:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236768AbjEZSHn (ORCPT ); Fri, 26 May 2023 14:07:43 -0400 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 41DAB119; Fri, 26 May 2023 11:07:42 -0700 (PDT) Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-96f99222e80so235589666b.1; Fri, 26 May 2023 11:07:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685124461; x=1687716461; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=n1w9YqBJg1t/GBfhAmcVQVw/GD/zxil33PlKHiL+BD8=; b=NWO9GNc9Lrd8OS2zFQjDYuDJLesvnWm84bKgQQWmK84p1IjfaTXwRJ+pKpOX460Pc7 YZOzNad00zNfy1DQD/8qaXPZXHTLVWmgqI1rXvqC5MsrUXO9LGQbo83cKST4c6a4A5xY O0UoT9EIH/tNs8Fl5h83Lm0zgCxQ0ODNmN3C8VKNbFokx+zwstQuaLRyK8hEk7xAIS/Y Z7BUilQoHZhAUseuK3RX40PrVo04KtDeZ6GRJpuYDJhcE3KEpJUQgARNj6sh8Cj5rTKT joGT1alhPRLu7BtLJM9weS1ZxLpfgYgYookLKhlCbPt29jxU7+tMPLzQCyihZhZFOG4c G35g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685124461; x=1687716461; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=n1w9YqBJg1t/GBfhAmcVQVw/GD/zxil33PlKHiL+BD8=; b=l/EPJ9RCpha77cNrg1hZd1pPF/9knY5P9gbyvCzpRrdxy/NGHckWUFZ1uWTSwv7F68 0ZBE6l1Rq8FOiYpWh5+UcVcIYakdt9GbsZGMvh0AZigJwK5chxrUR5zEI04x+r5atY2z n85vg9xXHfrRUsHUST4oiretQU/d4mwNP21zTWPpdGos8ksCD7j7CF1psRoB6+tGbSI+ iwgG2j8h1WhtZKSUFWwowhv9L3aH//Eez96K7ezTGDrZIQOxG3H2XPJZ3HG+divDngRU s/bfgqK73jI8I7/3+HNESvC1W7/VoFt7A5FqTaw8Tm0Cnl+FuXAjs8s2ueQAZzCVeFqw 7vXg== X-Gm-Message-State: AC+VfDxWSBv2j/23fXgsXNFT0GsgFT2hpNL8RDCVQ1YMkNUg72Qeqais BOgrES1hP3E9qJRoRGuQ+gQ= X-Received: by 2002:a17:907:da6:b0:96f:8afc:b310 with SMTP id go38-20020a1709070da600b0096f8afcb310mr2703876ejc.3.1685124460508; Fri, 26 May 2023 11:07:40 -0700 (PDT) Received: from localhost.localdomain ([95.183.227.33]) by smtp.gmail.com with ESMTPSA id j11-20020a170906410b00b0096f689848desm2410823ejk.195.2023.05.26.11.07.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 May 2023 11:07:40 -0700 (PDT) From: Yassine Oudjana X-Google-Original-From: Yassine Oudjana To: Robert Foss , Todor Tomov , "Bryan O'Donoghue" , Andy Gross , Bjorn Andersson , Konrad Dybcio , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Hans Verkuil Cc: Yassine Oudjana , Yassine Oudjana , Vladimir Zapolskiy , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/3] dt-bindings: media: camss: qcom,msm8996-camss: Add CAMSS power domain Date: Fri, 26 May 2023 21:07:10 +0300 Message-Id: <20230526180712.8481-2-y.oudjana@protonmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230526180712.8481-1-y.oudjana@protonmail.com> References: <20230526180712.8481-1-y.oudjana@protonmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766981402896805981?= X-GMAIL-MSGID: =?utf-8?q?1766981402896805981?= From: Yassine Oudjana Add the CAMSS power domain which is needed for the proper operation of CAMSS, and add power-domain-names to ease fetching it as well as the other power domains. Signed-off-by: Yassine Oudjana Reviewed-by: Bryan O'Donoghue --- .../bindings/media/qcom,msm8996-camss.yaml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/media/qcom,msm8996-camss.yaml b/Documentation/devicetree/bindings/media/qcom,msm8996-camss.yaml index 8a10aa1cafc5..27c9a11f0df9 100644 --- a/Documentation/devicetree/bindings/media/qcom,msm8996-camss.yaml +++ b/Documentation/devicetree/bindings/media/qcom,msm8996-camss.yaml @@ -85,6 +85,13 @@ properties: items: - description: VFE0 GDSC - Video Front End, Global Distributed Switch Controller. - description: VFE1 GDSC - Video Front End, Global Distributed Switch Controller. + - description: CAMSS GDSC - Camera Subsystem, Global Distributed Switch Controller. + + power-domain-names: + items: + - const: vfe0 + - const: vfe1 + - const: camss ports: $ref: /schemas/graph.yaml#/properties/ports @@ -209,6 +216,7 @@ required: - interrupts - iommus - power-domains + - power-domain-names - reg - reg-names - vdda-supply @@ -326,7 +334,10 @@ examples: <&vfe_smmu 3>; power-domains = <&mmcc VFE0_GDSC>, - <&mmcc VFE1_GDSC>; + <&mmcc VFE1_GDSC>, + <&mmcc CAMSS_GDSC>; + + power-domain-names = "vfe0", "vfe1", "camss"; reg = <0x00a34000 0x1000>, <0x00a00030 0x4>, From patchwork Fri May 26 18:07:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yassine Oudjana X-Patchwork-Id: 99599 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp667957vqr; Fri, 26 May 2023 11:16:40 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4LSh7l1+vLjZag43hlMonYQiwvkx8y/7D6EMrqgQnOlhVUCy2zO8no6bxyEDLRtZtwkiFK X-Received: by 2002:a05:6a20:7f92:b0:105:8173:93a0 with SMTP id d18-20020a056a207f9200b00105817393a0mr282129pzj.5.1685125000157; Fri, 26 May 2023 11:16:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685125000; cv=none; d=google.com; s=arc-20160816; b=fvTUiIbh+XGJ97HTsAgKb94p4xeDSOip+pjPoz+2rZ0n/yxtPp8fQD2gYRvhtbHDJ3 JUAODNcOOtydNWH0V+F6UZ2cuYqyecdfBoAdfagRSz/qDxZqKTxENtMgpsxZJoOlQ2Hh a37Q77Z1Oxl4jBdRs8TUF132oBf9t+mgBD49YAw/xxERSVHah1M/TP/cPvo6YHYvPth2 g6QXtgr9DGstH8GrVab6VXspQWmL/ESoruBrTgkNvScsAbUbrgfZQGkAagkRYXW8hUVt TTtSHV+BShgTTqv55QErktDpanUq6Af02jJk2kYBi1uZF/jpiTwsLfJMccPZE3jwc7dl ymvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=hHJFOn/9WZgbcQQiY2pB91pDyOoBlsFjWDhIaVT8XDI=; b=uVDy90T4BkAMKSYNZra8/Wq2+yuu7/swRbnC0BZIYQUycFbSeBLW41q6qPn5YfZDDM I3Y4xqaJEuaK955DNJY+Qk/WXLX6X25m5mf/ctNuzdkzB8wUuB3XbSsipX2iKKo4GLgm 8+A/9K3zcSQj7dLemoriU0ynByoBk75h9flfLyExJuij1Bm0OnDg6D+UOPKjTAccsDXW LXAtGFauhQFnGsO/cliNqf0HA8nCjVTCOy0xVpREe13sr8KeakuyvehVkVEksAaqtLpn x41Y/o2ICdiHHSEpMwvYVLvRnsUcnJpTXZEwSlGK5nZ/LEEv6eSbbMr8t2uqDSEs6x+x T+iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=FYmQ+w+h; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h16-20020a17090adb9000b0024e35ef410fsi4631207pjv.131.2023.05.26.11.16.19; Fri, 26 May 2023 11:16:40 -0700 (PDT) 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=@gmail.com header.s=20221208 header.b=FYmQ+w+h; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242949AbjEZSHw (ORCPT + 99 others); Fri, 26 May 2023 14:07:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242344AbjEZSHt (ORCPT ); Fri, 26 May 2023 14:07:49 -0400 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9A86189; Fri, 26 May 2023 11:07:45 -0700 (PDT) Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-5147e8972a1so1135543a12.0; Fri, 26 May 2023 11:07:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685124464; x=1687716464; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hHJFOn/9WZgbcQQiY2pB91pDyOoBlsFjWDhIaVT8XDI=; b=FYmQ+w+h2ysoJlHGZx1SBr3kgLrddcHHSHHjNTPMypvxUBBr+BQle7TrG4IbTS9+aR +n34R8CtQq70PebIGw+pK6PS3j7jiQHgq/h0b8ovu2xIjMgXnuyNgw7aOnsedSlMWz66 tdRtnCcDYQ0M/mFBI/0TNnKUJE8TnNEd4SUsCILR9jj7pzalEIPZxQATqHQaWlT1FakW I1rn8nHpTcCbqV5VQJ4xzZNSEf+SUMJoznCex3OZGuyNXpD5zaBLUFfvND0W4JO9XrpA Rrule0SrzDaUc4r++kxvLc8+cghD7HNCbhiJOJ+S/dbCeHqSvKLYBhC+J9Iswt5jLMQK jtGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685124464; x=1687716464; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hHJFOn/9WZgbcQQiY2pB91pDyOoBlsFjWDhIaVT8XDI=; b=TR2MA8cMCBsbsXFjHkVw3E0xjJffhEMe018deE7ADcUL5d67VK/wPqBSH5ULTeCcGH Dg0KFZV5o0qaGoehuy3c710CLfnA6ndPPTUH3L84ZHXhG/faUK4wjqFz2rsunQbNpWv1 npgu4U40gK4EEQYR4ZtnqvBRo9HZpCBg60Pr25K/WgpOzoX3L9t6FndM6ZTPzG3rGKbI /DowGI2jRnLYV2KPa2FhMht09eA34WEN1iZVQ8MdypGS1ucb09aQcDNN0YElhSEu6zfa 7+MGDdWKiGEOYnUO4xKJz7K82dYrlHKBXDUSAhRlcKmg3GWa0e/2gQiVPeScZHFmX9O+ eHvQ== X-Gm-Message-State: AC+VfDxK3oZ/HLF6kMp0GcmgApqTk5S7CBi0whw/4VFX+FIIN3LC8r/7 R9QwIBifGd1G5zSVd+QYl+E= X-Received: by 2002:a17:907:2d07:b0:973:d8a4:f486 with SMTP id gs7-20020a1709072d0700b00973d8a4f486mr529923ejc.10.1685124464063; Fri, 26 May 2023 11:07:44 -0700 (PDT) Received: from localhost.localdomain ([95.183.227.33]) by smtp.gmail.com with ESMTPSA id j11-20020a170906410b00b0096f689848desm2410823ejk.195.2023.05.26.11.07.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 May 2023 11:07:43 -0700 (PDT) From: Yassine Oudjana X-Google-Original-From: Yassine Oudjana To: Robert Foss , Todor Tomov , "Bryan O'Donoghue" , Andy Gross , Bjorn Andersson , Konrad Dybcio , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Hans Verkuil Cc: Yassine Oudjana , Yassine Oudjana , Vladimir Zapolskiy , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/3] arm64: dts: qcom: msm8996: Add CAMSS power domain and power-domain-names to CAMSS Date: Fri, 26 May 2023 21:07:11 +0300 Message-Id: <20230526180712.8481-3-y.oudjana@protonmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230526180712.8481-1-y.oudjana@protonmail.com> References: <20230526180712.8481-1-y.oudjana@protonmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766981631889800913?= X-GMAIL-MSGID: =?utf-8?q?1766981631889800913?= From: Yassine Oudjana Add the CAMSS power domain which powers CAMSS and is needed to enable its clocks, as well as power-domain-names for all CAMSS power domains to make fetching them easier. Signed-off-by: Yassine Oudjana Reviewed-by: Bryan O'Donoghue --- arch/arm64/boot/dts/qcom/msm8996.dtsi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi index 2b35cb3f5292..b2e0cd739d90 100644 --- a/arch/arm64/boot/dts/qcom/msm8996.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi @@ -2118,7 +2118,9 @@ camss: camss@a00000 { "vfe0", "vfe1"; power-domains = <&mmcc VFE0_GDSC>, - <&mmcc VFE1_GDSC>; + <&mmcc VFE1_GDSC>, + <&mmcc CAMSS_GDSC>; + power-domain-names = "vfe0", "vfe1", "camss"; clocks = <&mmcc CAMSS_TOP_AHB_CLK>, <&mmcc CAMSS_ISPIF_AHB_CLK>, <&mmcc CAMSS_CSI0PHYTIMER_CLK>, From patchwork Fri May 26 18:07:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yassine Oudjana X-Patchwork-Id: 99600 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp668223vqr; Fri, 26 May 2023 11:17:08 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7GPhYA1gfwIBWdibjulmmWNOCsqNGRl/kbLkUt9E0q0CePAZ6QM9PIKukvVOE+rgwETibs X-Received: by 2002:a05:6a20:258b:b0:10c:1a3d:6b9c with SMTP id k11-20020a056a20258b00b0010c1a3d6b9cmr287986pzd.21.1685125028220; Fri, 26 May 2023 11:17:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685125028; cv=none; d=google.com; s=arc-20160816; b=1I04X0R/VHIVnJFu7vnkW8EXwCwDZ+C+xHgqUaBhWFdT1ELZNqI8E4hlPV8449ixqZ ZKZj7IHrTSjak1HX4DB0zd9a8B6YU2b4WMnLgMErlMKWnU2uRZZA3430eURI5ISQEnbr 7fHQAU1YPfaotdEriOYdrIJIp5RYT82YBwwEBkkbkA4JqtN/jSoPN7S+Iapt7bafrOtK nJPsa6GVQ5K76fWZnskBBSc+xEppkd63d3yYtXbtTBnidACuk2amVL7tQWC13R7T4Nj0 xWR4AgL9tzDpzqaHtXnwEr1oPNku2SZe+0bycx+WNWAxCRBcSxzI7wFFVltjb5hEdDx7 KmKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=1WNhXWuAHGSvY84FPzjUJiY/WdxRG1SooFMStX8dS0s=; b=TZKKWEEwVy+0ldKETtGvl4Fvfa0gdpWBUghE2U3cpiV4nPlUwsOdFAb9okAdp8dDjT 6T865gAwmUzhGOgZc8ymqCdqO0Rklwftv8xV8mnvmWn6iDW4QkiPMBzT5enrOc0Fwh3t XjVb2POmnMmemjmnp6azJZZtYYtbRpWMLXJjx6KqBg06AqeB/oUazJ+5ECzoJwLDhxcA yDOcBKvSmAICAE3SkzC5uXedtcdeRD0kHB70u2T3rXRyzuYztPgTBL4FPtPGNfJvXonH 3GxipjHltMbUKR3prYQys5Xy3JAT7ur/VsvrFPB644DOWiqZMVvEurIL4OFc9fGAQQZo ABfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=p076qqBS; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l62-20020a638841000000b004fc257265cfsi4040427pgd.267.2023.05.26.11.16.46; Fri, 26 May 2023 11:17:08 -0700 (PDT) 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=@gmail.com header.s=20221208 header.b=p076qqBS; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242921AbjEZSH7 (ORCPT + 99 others); Fri, 26 May 2023 14:07:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242167AbjEZSHv (ORCPT ); Fri, 26 May 2023 14:07:51 -0400 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BACAF13A; Fri, 26 May 2023 11:07:49 -0700 (PDT) Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-969f90d71d4so145760966b.3; Fri, 26 May 2023 11:07:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685124468; x=1687716468; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=1WNhXWuAHGSvY84FPzjUJiY/WdxRG1SooFMStX8dS0s=; b=p076qqBSbmH95CyWYwmxDLH1EofZTcSiQwfiZ/E2g+jrabSJlxYZAL8tW5SovUU0kl yLBT6ySFrxmU6QBCoG+/w9wNaXrhM6kSFDav/FoWx57bbKxeMC0zSf+jgfbdaSbCA3D0 +yyffE5niZ+54MJDvnh3PdrOH51yGAGIzB7/3QNQ9Vr4IUFQ35ESQj8Z0XaViynvnlxD 43tGsEqpLFaW5vnMFYkdhgIpzXE9nJHz7Om8Y+Iqbjhb0JIWkbGOT0+QPUmAH3MS0mdT RRtORElzNkNcV286rOehX3U5leti+tVt6mhHQOhvu8Sgf3XWJhh3VUoBFjV2kKEfDLBo A1/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685124468; x=1687716468; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1WNhXWuAHGSvY84FPzjUJiY/WdxRG1SooFMStX8dS0s=; b=bpDjAZWzNOc4UTHUQw0kolOpZDMWgOVOiyQgBt9p8Zaf0BIemJLHoAjPy6mEgfkDLi GCrgD/OjBTNu+7Wy3z+vspT8o4Ma/swLS6rU3orcX/jlPBmXVtIzWtazHwhtZm8MmzvE uFVnbt5UM1earM+LeR2y2fQNmwtQGDiPBemZWPyZ6U0cE5QEpl5PvDcGjTUmrugH3sJp FwOx5ZVJd3G6COzuUOnO5Ss3wi/F/gk6oFKTlkRkLs9CWSXDsfHGNr3LPp/ZCEuZN3fA jaIZ0llFENbv5+xIpL7tugR4c9VuqqackLlPeLk5GbwZ5f/9sSX6erAL9lkmTS1PmCfg yjcg== X-Gm-Message-State: AC+VfDxziYzqVdUNNLoC9bmCypCIMneM+k178mf5wpBCxbDsrh+0CfPf tPpV+wi31qNMDQ4ZaSNAmz8= X-Received: by 2002:a17:907:a40d:b0:968:1102:1fb7 with SMTP id sg13-20020a170907a40d00b0096811021fb7mr2680886ejc.6.1685124468084; Fri, 26 May 2023 11:07:48 -0700 (PDT) Received: from localhost.localdomain ([95.183.227.33]) by smtp.gmail.com with ESMTPSA id j11-20020a170906410b00b0096f689848desm2410823ejk.195.2023.05.26.11.07.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 May 2023 11:07:47 -0700 (PDT) From: Yassine Oudjana X-Google-Original-From: Yassine Oudjana To: Robert Foss , Todor Tomov , "Bryan O'Donoghue" , Andy Gross , Bjorn Andersson , Konrad Dybcio , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Hans Verkuil Cc: Yassine Oudjana , Yassine Oudjana , Vladimir Zapolskiy , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/3] media: camss: Link CAMSS power domain Date: Fri, 26 May 2023 21:07:12 +0300 Message-Id: <20230526180712.8481-4-y.oudjana@protonmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230526180712.8481-1-y.oudjana@protonmail.com> References: <20230526180712.8481-1-y.oudjana@protonmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766981661382328358?= X-GMAIL-MSGID: =?utf-8?q?1766981661382328358?= From: Yassine Oudjana The CAMSS power domain was previously enabled implicitly when the VFE power domains were enabled. Commit 46cc03175498 ("media: camss: Split power domain management") delayed enabling VFE power domains which in turn delayed enabling the CAMSS power domain. This made CSIPHY fail to enable camss_top_ahb_clk which requires the CAMSS power domain to be on: [ 199.097810] ------------[ cut here ]------------ [ 199.097893] camss_top_ahb_clk status stuck at 'off' [ 199.097913] WARNING: CPU: 3 PID: 728 at drivers/clk/qcom/clk-branch.c:91 clk_branch_wait+0x140/0x160 ... [ 199.100064] clk_branch_wait+0x140/0x160 [ 199.100112] clk_branch2_enable+0x30/0x40 [ 199.100159] clk_core_enable+0x6c/0xb0 [ 199.100211] clk_enable+0x2c/0x50 [ 199.100257] camss_enable_clocks+0x94/0xe0 [qcom_camss] [ 199.100342] csiphy_set_power+0x154/0x2a0 [qcom_camss] ... [ 199.101594] ---[ end trace 0000000000000000 ]--- Link the CAMSS power domain in camss_configure_pd to make sure it gets enabled before CSIPHY tries to enable clocks. Fixes: 02afa816dbbf ("media: camss: Add basic runtime PM support") Signed-off-by: Yassine Oudjana --- drivers/media/platform/qcom/camss/camss.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c index 1ef26aea3eae..9aea8220d923 100644 --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c @@ -1453,6 +1453,7 @@ static const struct media_device_ops camss_media_ops = { static int camss_configure_pd(struct camss *camss) { struct device *dev = camss->dev; + int camss_pd_index; int i; int ret; @@ -1496,7 +1497,13 @@ static int camss_configure_pd(struct camss *camss) } } - if (i > camss->vfe_num) { + /* Link CAMSS power domain if available */ + camss_pd_index = device_property_match_string(camss->dev, "power-domain-names", "camss"); + if (camss_pd_index >= 0) + device_link_add(camss->dev, camss->genpd[camss_pd_index], DL_FLAG_STATELESS | + DL_FLAG_PM_RUNTIME | DL_FLAG_RPM_ACTIVE); + + if (i > camss->vfe_num && i != camss_pd_index) { camss->genpd_link[i - 1] = device_link_add(camss->dev, camss->genpd[i - 1], DL_FLAG_STATELESS | DL_FLAG_PM_RUNTIME | DL_FLAG_RPM_ACTIVE);