From patchwork Wed May 3 07:25:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yassine Oudjana X-Patchwork-Id: 89594 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1138271vqo; Wed, 3 May 2023 00:29:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7elTKbXL65eADoQ7bI948bwS6OPRFEd25fcBver57gYhrdDmQKExHXSdFPNR5qZ/SaVRif X-Received: by 2002:a17:90b:17c4:b0:247:78eb:cb96 with SMTP id me4-20020a17090b17c400b0024778ebcb96mr18884877pjb.17.1683098989661; Wed, 03 May 2023 00:29:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683098989; cv=none; d=google.com; s=arc-20160816; b=WjPjOsp/445IxyHtQYsZlw+AOyHm8D4fkNQpyFSmyC42z1676wit2JItS96ls/6OsL QeXu3KtuczsTzqjooyDU+y98107FjuvFGw0d0nkxwIvH4tC+1Zok0fYs/OI5cS5HS+HR +nFmmY9VIMG41SPxHKQgR/Ze6UuWx2MiEzp9m1HgCnLzqEUrbTd4pOzhdU0xFosW/0er yz8v48EAuzZJZOsjqxNinejzIS05UgGBI+kQQgg8VIDAVVH3FSikJc67VeyHBKIKlWjd MTMBC9zPaUIOiDX3mQu88o/OQGP6mSfeB2XfVwq9jmlbIeNXTFmXLjyZQZbyzAIli+Sq FIMA== 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=+ypdkqPJjbiclAH5MyIicuceDqAshp12bpImWLmn/d8=; b=mZlcNDolKCmJTPFPsrmWeN/pyI5+SholvVe+ZOdMSK9BShE1zYdpVWqnJlkkMU5o8M 1YmG9r7ghDYJrsUFmU6ydFUuIgiEwQ2knqPepeOOWkK2Zcbji7tuGjrgIpp5L7AGPJLY 4nCAj49AaMZzsNxRrkVA9CRmgd2rjl34+5thEr9Bny/klKLf5NYMor5nz6/bT7IdpHL3 dwLev/Fut1KOpE2Iu77CdI0lUOpiVfBPc6XfrRxJMuWqF6t3GWInqyUyUeriRrwp5o1T 3XpKRCZOZc7/anOcit+aB9KwiORvirJhlV9uKUXT2XUWLLbNbuEPmNPyD2RdNMx4GMIF 9saw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=jQtVuZXO; 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 bs188-20020a6328c5000000b00520b3928bebsi19500671pgb.7.2023.05.03.00.29.35; Wed, 03 May 2023 00:29:49 -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=jQtVuZXO; 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 S229519AbjECH2p (ORCPT + 99 others); Wed, 3 May 2023 03:28:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229887AbjECH1y (ORCPT ); Wed, 3 May 2023 03:27:54 -0400 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10C6B4C08; Wed, 3 May 2023 00:27:28 -0700 (PDT) Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-50bc3a2d333so5698596a12.0; Wed, 03 May 2023 00:27:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683098846; x=1685690846; 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=+ypdkqPJjbiclAH5MyIicuceDqAshp12bpImWLmn/d8=; b=jQtVuZXOwV0WGZ/MPDTF/me9uREk3t2/WE9ZiVZAbgcw/aA/He1E273lKAaxmd3oBS q9hCC9qWrW3FGtK6fOiJ+vbKof5vzX/g6Y/OHLVXD4RAfOgKsKcweda2w5tFOO/MgGsc 3ufy5EGnbYTNbh1GHEUWxzuCLV1Y4gYbN6cJUqwi1rY+MqL4Hc60/8inuV0PnWFxlaOw h5hYhateHNi+K2gDpB4CYcfgDFf/ZUAvT9aTIiwZalNx5hW1EveN2aXb/IGXi5eT2gPR MeAiRtyui7iM1Sw/3PESawMo+ZEN5b889WQCGNQhFKyeqyFiNxpyjq+hP4yEVhricPzJ bDgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683098846; x=1685690846; 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=+ypdkqPJjbiclAH5MyIicuceDqAshp12bpImWLmn/d8=; b=Q5JAv9VYym95YxVvlEyGeKxMawqt9sTYI1BvmEdJNSlm9maOnIHnp9dpE/zWe4x4jM NjV1HffWzI+t+MCFUBHa0uBE9EI7Z3sg27jb23OHl+CLIAN0HtZptMdMuWV6/hzrRh0L dUwO+L2W4ZzJUKHQAT/moXaD9mIbPpNWpJtYVYIzDcJidZnJCDhPx7r+umc5AscRSRvY XjALBBR4Z7a2N0ruGiFgaXnM2QEBdrYjoW9RTrvWgPvo6NTCX3AmviptB4v6GaHiWlcJ oruCcAOG7aJHi9wmHbRuUijxbtLx2t4rElra4A/T2msaeBV55fDYuDCj/4HVl+AxxTT/ FjBA== X-Gm-Message-State: AC+VfDxWKRZ5xYjs0Y90gX0UKt1XAohL+KIS2oQy0e9tY+FDBM6TeRxT MkwaSIA06HgY9n8d5t3K9axs2uC9m2g= X-Received: by 2002:a17:907:8a24:b0:933:3a22:8513 with SMTP id sc36-20020a1709078a2400b009333a228513mr2877794ejc.53.1683098846189; Wed, 03 May 2023 00:27:26 -0700 (PDT) Received: from localhost.localdomain ([95.183.227.33]) by smtp.gmail.com with ESMTPSA id t26-20020a1709064f1a00b0094f34fe27c6sm17072009eju.170.2023.05.03.00.27.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 May 2023 00:27:25 -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 1/3] media: dt-bindings: media: camss: qcom,msm8996-camss: Add CAMSS power domain and power-domain-names Date: Wed, 3 May 2023 10:25:41 +0300 Message-Id: <20230503072543.4837-2-y.oudjana@protonmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230503072543.4837-1-y.oudjana@protonmail.com> References: <20230503072543.4837-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?1764857206360503215?= X-GMAIL-MSGID: =?utf-8?q?1764857206360503215?= 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 Wed May 3 07:25:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yassine Oudjana X-Patchwork-Id: 89601 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1143505vqo; Wed, 3 May 2023 00:42:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6eKkhRNrc9pZuE2vX/bK7s7BiEwaSxbIERBpBFfYyuhJXqXYH85EHnhy1PcxZIjmKsEA49 X-Received: by 2002:a05:6a00:13a2:b0:63b:5501:6795 with SMTP id t34-20020a056a0013a200b0063b55016795mr28841901pfg.24.1683099770224; Wed, 03 May 2023 00:42:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683099770; cv=none; d=google.com; s=arc-20160816; b=NgRB1tuQ+FkJUGjvd3i1gj23NqtXyNilSJGftSIFZoja6tzQlK4qmI/sxckdTOH0F0 pnKW9J/Y9ZrAbYFaWHR4yU2SOXwrUegHXhs19sM2tdipTRnws23xshN1yYRje+UBaeC6 vLaC6PQN3py4rmCuSQNJ2yYdsW1qaFFMKbkL/ZAQNQRFRcubY605VOtOIlGsPheok+dk xN5z8rbm4zmG0VeEDeQqHSFmoDpInxpOGLaj79lnzgZ8MjvJjAGxF3ch1t8LlyjTEUBi m0qhEaTpprHK5kxr/mRHnRXYmPP6Q5T8Ybqc3qFRRK7qXyG9y/7fntHtXQAZogRQQbo+ xFxQ== 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=5Vjy0njVYlk4DJBe6xXSLpMploNAvBdfi1zWVLfGo2U=; b=LU8UpDrK3t3zPkGIcgHnIHb3+o1gco6/DlQWt9ofU4tJlWtUVtrfJcyFxphstuPIWh P1TPxLyP5jQcQSWt4pFvGgInZHnOPM5iFgLkULaM0pD54wbIZFs+jNAXRY7xkd87ojaL YdbVr+CirEAQGzh3fNzDxeZUh95uQtoaki22TLpgtFHOQyyy4f4T2G0RToeMuu2lUwA+ E06webPwTeZqw0oym7vJJE0Vzm97OlNokvM6UeWzQ0EETVYGhGuy6W4V5xJC171YqfaJ l/PXYKY/YfI3UBdt49KjNkXap0K0u76Ga1Vnb1XEAOlsxW/8w+wXoSt2+9QhX9vb8jT3 u8LQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=RUTK25Yi; 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 h6-20020a056a00000600b0064140b05b6dsi10148758pfk.228.2023.05.03.00.42.36; Wed, 03 May 2023 00:42:50 -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=RUTK25Yi; 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 S229780AbjECH2s (ORCPT + 99 others); Wed, 3 May 2023 03:28:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229898AbjECH16 (ORCPT ); Wed, 3 May 2023 03:27:58 -0400 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D56262D6B; Wed, 3 May 2023 00:27:34 -0700 (PDT) Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-956eacbe651so958026066b.3; Wed, 03 May 2023 00:27:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683098853; x=1685690853; 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=5Vjy0njVYlk4DJBe6xXSLpMploNAvBdfi1zWVLfGo2U=; b=RUTK25YiYQ7CLZ05QlEdu4wwlG6TLGr87ALM61BMl/m6DuJmNWK1nuTM3Wmac9dMoB yHhe09fi/Sr4sqM/xTuNKniouv5zKjknoZCWtP/wNmrkPiIcnl2549PIwfvVG5x6KDfT oNQ5kt9So95GgFCbgc2diRmJ5A8c0FR+oC06PIASBr5+yrJliznri9dfJIHzPQDRjifr FTRUJJCTOAOYLWc25G4IHNp3uLlLEQ5+QIMvs/gCgZUCO6Aeg7o+7ipgGVCEbC5fBCyP Q2FXc+Pn9+l067pWUplTRbZm52Fvgw68QdXfyyHIFGHkOUpnz5F6jidVAAVFGWAPs3Sr ZDFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683098853; x=1685690853; 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=5Vjy0njVYlk4DJBe6xXSLpMploNAvBdfi1zWVLfGo2U=; b=ip3UhNbWX548rYOEbEvfh7+9IvlXWT/iiMIrh5Z20XB/BEpTnah/YbFoQ39ZFbat/L dr889RRbl8AGLo3k5WE+0RmAab6Rq8Qdi234gUi8BY398NcNjogsgjft90Iic6nISJ/4 BAwN/xd1Tr8h2MHkVOFjwirpWMGpWwADwSHWOPwUESqV//y+o78N3Y7zTxlYXfozLblQ qVL+KB37G4+F4JMmiG1iJdwZEZBy/3M7SJWkED0FreQLtzbCb4THhM2D6KlUQLB0hEv/ z5lEfE6pVT3J1fW7MvQ5RVwEFoQ7Oogbn1gxAr+pKswGDGvnytSNqvC/5UvBzef4pnCo 1LuQ== X-Gm-Message-State: AC+VfDyoyN7Vc29zgsWWyVA6CIt+LTpRbGNOeRcc+g3Y1/AEG2267QKl nv5Hwa/QwUYD9XHol2YMIso= X-Received: by 2002:a17:907:3da2:b0:960:f1a6:6a12 with SMTP id he34-20020a1709073da200b00960f1a66a12mr2444084ejc.55.1683098853270; Wed, 03 May 2023 00:27:33 -0700 (PDT) Received: from localhost.localdomain ([95.183.227.33]) by smtp.gmail.com with ESMTPSA id t26-20020a1709064f1a00b0094f34fe27c6sm17072009eju.170.2023.05.03.00.27.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 May 2023 00:27:33 -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 2/3] arm64: dts: qcom: msm8996: Add CAMSS power domain and power-domain-names to CAMSS Date: Wed, 3 May 2023 10:25:42 +0300 Message-Id: <20230503072543.4837-3-y.oudjana@protonmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230503072543.4837-1-y.oudjana@protonmail.com> References: <20230503072543.4837-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?1764858024589829782?= X-GMAIL-MSGID: =?utf-8?q?1764858024589829782?= From: Yassine Oudjana Add the CAMSS power domain as well as power-domain-names for all CAMSS power domains. 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 30f6ebc4bd11..0168a086f57d 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 Wed May 3 07:25:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yassine Oudjana X-Patchwork-Id: 89595 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1139121vqo; Wed, 3 May 2023 00:31:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5JzsisWn/rKYu5dT2Y7biSBnTAcIyPIp39c2dSExjf+aiZe1EldcA3NralzT6LLMmBtUxA X-Received: by 2002:a05:6a20:a124:b0:f3:ae06:c4e6 with SMTP id q36-20020a056a20a12400b000f3ae06c4e6mr26292989pzk.6.1683099101884; Wed, 03 May 2023 00:31:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683099101; cv=none; d=google.com; s=arc-20160816; b=pIc83E8j8mAml3GFU7vbHPtIufSnbtfiL3w9ttdRWOQ+7ftuas3J3GFra0tVGOZ6ia MkZgelW+LDFetluQzrL5udVE4UcUn9CPRQWDsDhIyqVTKuZ5vv5Wfsec/ISyNlbkCGTZ n3ADeatdm04GXjMWsnRlhBo0asHzaHBJymm2UbrFisxwFcRwIQ+NI/bY4VYZ+eKFfDoK O61dsJnrwNwCfczVot+zLpOcCy+VkugZo/JBS3E9R4INWKv36VidCiWonOvPCIG1I8WN WouyRjexC2ewJStPA0HNW8HmIVTbgCN2lum/osEDFjypSjIhagCrzNJObsDHWqImrmR8 9ViQ== 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=YJwlvnk2QOdQ9AieHi7YHl4/Jlfed/PX+1LmVtBDjCk=; b=zRbT9Yen+jQ4myWx2lEGXrbdUcyEw9R/udGM7tfx59v5c5nV/Gy9PBdO4Mw0X3JSDv 4AaYDwgPNV7N2lQqv2nLiNupkBu6oMh2c8THqgKj0w7qgXZn0nI1vT/GtAXt7g1UPMZp YP2WnJAlmtS23Rc7QtXEWChU7rC/ZLNK7CmyxjuhzCTGSNqYqJayVKDpe3u2voGnqVvD lhutAHR3iAMURRMpYPDp5u+48gyEfMn363ze7M4WkH1RcsDAL8s0Mez9dmXv0t7LPPMV ogbMooT8ki5gzGZX33at1gTarWAJS609Kxsrlb/jjdMp/Fv9CW9YUr6FOHTN0ZrgiioX O5wQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=qpNz7E1+; 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 a8-20020aa78e88000000b0062d781f1f87si31811254pfr.355.2023.05.03.00.31.27; Wed, 03 May 2023 00:31:41 -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=qpNz7E1+; 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 S229884AbjECH2v (ORCPT + 99 others); Wed, 3 May 2023 03:28:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229903AbjECH17 (ORCPT ); Wed, 3 May 2023 03:27:59 -0400 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 925DF468B; Wed, 3 May 2023 00:27:41 -0700 (PDT) Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-95678d891d6so971247566b.1; Wed, 03 May 2023 00:27:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683098860; x=1685690860; 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=YJwlvnk2QOdQ9AieHi7YHl4/Jlfed/PX+1LmVtBDjCk=; b=qpNz7E1+VFzfePkVMnoVHtoW/8IE7Quy0IjJVHeRuJEgGBJ2wZV6mKpbfWtxhRhnTB Pkt9Ja9tb4KNAEaZdsQuvv4RITeunowlxbR453JsaqzgkDX/+JvQeHI42uGslw9W2JdG NqNgrgtI81T9c25P1N9B7AD7vxUdlmp97Jc98Vn6lSeU0B9pCuY68hy/r6V96YlVyXvW 07CLLoHkIYFO/xPmHX7jL5yKpyehTt5gDseiuvprl825NpcaOxPzgMitiH0G41Ejxwy7 KByAC5zcQvxgGNOp5RaVsBD9PBhy83TJ1AtM7Sh7APR3F+isGHVqPvl+vc3LvMG5EQBh ZWBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683098860; x=1685690860; 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=YJwlvnk2QOdQ9AieHi7YHl4/Jlfed/PX+1LmVtBDjCk=; b=KVrzL+mHd7jPIK5/gHmt2dmixcTyKSmJsdVzPsZVsx7175SRzmssvKTg1WNgVvPspi fG9G/Gg5hMreqz1oUXayx+B/7CJ30Ny5sLakMH7/kK0rsLXG4J9lydlx3i+XeHMAED1g MRfJXQ+3bO5+BO99l9JtxtXsvaafegTJD2ojnvthQnJeECODoCB37NlOPV1TYs8Eq9kC hBimxdLv8zL7jEXVC3/0mH5Gk+cEyVoALVBh7m1qel4+M32ih8bTIeOIpvtG39W1/GDQ pr91iSbdcg6NL+ALDJ28RojwiQ7zp3KU6bt4eKlhmI7SV/1f5KAUTx7zCIGiB7Ufb40p y/ZA== X-Gm-Message-State: AC+VfDzvyyx/8l8aLEG3hvF75nGNnYNCSrWTNasgGGCqQ+VwFrKKUL/S IdMEsOBsG6Pd4HyJuKg0Zfs= X-Received: by 2002:a17:907:5c2:b0:961:b0:3dfd with SMTP id wg2-20020a17090705c200b0096100b03dfdmr2301653ejb.7.1683098859957; Wed, 03 May 2023 00:27:39 -0700 (PDT) Received: from localhost.localdomain ([95.183.227.33]) by smtp.gmail.com with ESMTPSA id t26-20020a1709064f1a00b0094f34fe27c6sm17072009eju.170.2023.05.03.00.27.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 May 2023 00:27:39 -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 3/3] media: camss: Link CAMSS power domain Date: Wed, 3 May 2023 10:25:43 +0300 Message-Id: <20230503072543.4837-4-y.oudjana@protonmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230503072543.4837-1-y.oudjana@protonmail.com> References: <20230503072543.4837-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?1764857323667973726?= X-GMAIL-MSGID: =?utf-8?q?1764857323667973726?= 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, 2022-07-04) 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, 2018-07-25) 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);