From patchwork Fri Jul 9 01:30:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 471757 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp830068jao; Thu, 8 Jul 2021 18:31:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxnBzN4NfmijUATiF82PfsRvqMG+4yRRooMNmoBmYsMy6iDCaMeADVEr/tGIgULlezU9vQQ X-Received: by 2002:a17:906:7302:: with SMTP id di2mr33457918ejc.409.1625794293785; Thu, 08 Jul 2021 18:31:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625794293; cv=none; d=google.com; s=arc-20160816; b=QMaYsK7Xu8HFFqOabsUC0KqVwg/ubt0FlzFVjFN6sQdi7+xyF5/vsbMERlrmbLUjPD oaiMBo4OwZyPztZrfJGDxN2QSUOsQN3W0tmCnFzcfU5Q8Y9lfaQGVHFZpnNtxUlEQZZ3 S+LpyhY1FMKas90WVBr6H1wG8mdV2cC8avGC7PSEBHAphnp1YMAjGlOCpFJ9mDzD95yn Qe9zcCFvvqx4Ms4ElwQsT/+eRn8qok/8M+KX8IIMFSAY++U9KaTH5eIT+CG5z82yJwU8 wboajFLuuvlXtM/F1ppde06yELGngSLRYSD+g0RTqSiowmZkvvqZygoC3PixtF51xyZz aXcg== 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=KLWZj85HgqkOqv1HxmNCRrODidaWLC0A2DygbxwWKbA=; b=QLtfS0HUdrCcz2bdR2+xj99wciAM6lRFrCxg9fkhjxKAGGdw7ceDkyOCeRR1eICzOc n6PSNCRstigO6729F1+qEfP9e7+V2xEby16/3FY8LZzgSaSUJ1Y+Mj+kHHhImbhjIsP8 8uvWPem25Fn/HBEQqI3jewsZGkV9CisNqewS/bhBVZGWWHHQM7YExfCzSNVKsE+ClNq1 XUhi/xCpDhlEC2Tksq4003DIJZi7HDWtmCMeT0vj7P8KF7LUP8y7874DqYNppGAWBpoe Gx7DEZlUfW0/yLWhvkhTcuU5nnUzQDh/v8TXvXyTuNHziwnjVuEGBg7eCGDwMJ4HAyLb jmGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Q+7Q06TZ; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hb19si4810005ejc.597.2021.07.08.18.31.33; Thu, 08 Jul 2021 18:31:33 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Q+7Q06TZ; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230313AbhGIBdd (ORCPT + 7 others); Thu, 8 Jul 2021 21:33:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230194AbhGIBdc (ORCPT ); Thu, 8 Jul 2021 21:33:32 -0400 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13C5BC06175F for ; Thu, 8 Jul 2021 18:30:49 -0700 (PDT) Received: by mail-lj1-x231.google.com with SMTP id e20so5364552ljn.8 for ; Thu, 08 Jul 2021 18:30:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KLWZj85HgqkOqv1HxmNCRrODidaWLC0A2DygbxwWKbA=; b=Q+7Q06TZMaRjb0umJVm8KyLu9MHa3JJHlLCPzVZ7OBOVBMu7IhodPJTBciQftzkP27 Z9bskE9ahMvfBjG+XIf7Y/uhylwsmrCMDjm46DuoMBO+nAxF5BZbNDEYifc69xgt47aY l8uRhn4igEMAydPH4TU1JZUpHrnhC15LsuIakC1sqlCFye9ZkM+YIih3MeP1UpaAOyvv 13WBz0AFMfa8G6gk/SJx9Z0Cdu2Hqc/IbqyDI1IBWQQJ/YSR1UiQ5BkVle+FdQ3XVNR3 esK5CIfXyX9bjc9V24g9frP8cftRFEr6pTODIkXeHyeiUTVhf7duaeY9ZNMjvY/wEVwM tmJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KLWZj85HgqkOqv1HxmNCRrODidaWLC0A2DygbxwWKbA=; b=bHArHdcLvT5xyD+CRKjJk3aH7GLxwkY89pcnlxhoJdbacnqehrdv62Aw5wGlAzx+FL xNbrbk6Owo2otT+LIfYC/aWEJhXkjP4q/0x59h7vGbm7sGlERKMhoHcyoiVR1xrnSeA+ LmIfenJJpDlYmyxaNzV68r+LLaYdYse6anwiF+M223nsSMQfnPGclD0W5HlhihfTnNYp arUN/ifYmh/AGMGAtMKgcHWHXHdNUInj+dxxdMu48CyawcxasKneIcGNslHBGLwINz02 0vRqLKlWqOGhatGAuZZgXmObXkVYLljr4b53IQWBkb7ONGBhNOYsSJitl3417EkwBZbs +CUA== X-Gm-Message-State: AOAM530hN1DgG3kSBfmXHQxYiMHsFrdK/iH+7eaI8C0x6K8NYb6vDqhd sWU1gI/3v0J8DnCyr6TOZ/DZRg== X-Received: by 2002:a05:651c:d4:: with SMTP id 20mr27455105ljr.68.1625794248294; Thu, 08 Jul 2021 18:30:48 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id u16sm405637ljj.113.2021.07.08.18.30.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 18:30:47 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Rob Herring , Stephen Boyd , Taniya Das , Jonathan Marek , Michael Turquette Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-clk@vger.kernel.org, Bryan O'Donoghue , Mark Brown , Ulf Hansson , linux-kernel@vger.kernel.org Subject: [PATCH v2 1/7] dt-bindings: clock: qcom, dispcc-sm8x50: add mmcx power domain Date: Fri, 9 Jul 2021 04:30:37 +0300 Message-Id: <20210709013043.495233-2-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210709013043.495233-1-dmitry.baryshkov@linaro.org> References: <20210709013043.495233-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On sm8250 dispcc requires MMCX power domain to be powered up before clock controller's registers become available. For now sm8250 was using external regulator driven by the power domain to describe this relationship. Switch into specifying power-domain and required opp-state directly. Signed-off-by: Dmitry Baryshkov --- .../devicetree/bindings/clock/qcom,dispcc-sm8x50.yaml | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.30.2 diff --git a/Documentation/devicetree/bindings/clock/qcom,dispcc-sm8x50.yaml b/Documentation/devicetree/bindings/clock/qcom,dispcc-sm8x50.yaml index 0cdf53f41f84..d5c4fed56b6e 100644 --- a/Documentation/devicetree/bindings/clock/qcom,dispcc-sm8x50.yaml +++ b/Documentation/devicetree/bindings/clock/qcom,dispcc-sm8x50.yaml @@ -55,6 +55,11 @@ properties: reg: maxItems: 1 + power-domains: + description: + A phandle and PM domain specifier for the MMCX power domain. + maxItems: 1 + required: - compatible - reg @@ -69,6 +74,7 @@ additionalProperties: false examples: - | #include + #include clock-controller@af00000 { compatible = "qcom,sm8250-dispcc"; reg = <0x0af00000 0x10000>; @@ -89,5 +95,6 @@ examples: #clock-cells = <1>; #reset-cells = <1>; #power-domain-cells = <1>; + power-domains = <&rpmhpd SM8250_MMCX>; }; ... From patchwork Fri Jul 9 01:30:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 472046 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2941C07E96 for ; Fri, 9 Jul 2021 01:31:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8E3E461467 for ; Fri, 9 Jul 2021 01:31:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230339AbhGIBdt (ORCPT ); Thu, 8 Jul 2021 21:33:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229953AbhGIBdh (ORCPT ); Thu, 8 Jul 2021 21:33:37 -0400 Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF667C061768 for ; Thu, 8 Jul 2021 18:30:50 -0700 (PDT) Received: by mail-lj1-x22b.google.com with SMTP id q4so5340458ljp.13 for ; Thu, 08 Jul 2021 18:30:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+l6RNZfO6t53h33tKaqwIC7dbp1+6FXvY3b6ZyHCbIM=; b=ZZEqGAZCU2TkOIQNC//EmuOwpy7TQr2lniHCokxqka0DIqhGUcpgcnvIpZjmdFc/S7 RIAnTOeKGfIFk3P3m3AMboRRkBvC+v38PeEn3Ej9VgEO8lq+l0/wdDVHPAEUT9JB4ifB JyHmVnGuXsVPv3uQNxpNx7dzfFrmMYanKA8o+IeP6eiok00DHpdaxUcCAE6dLeszJd/x xpJcWJJZ++VKTrvzzdVTRZ+ptl7bj9qyBoPCYtWtQ0Lha1fOr/o82hSQBkbpS7WF8Zx+ mj7jLwz+KAXhCH9tGDaIyK3BJcjSQBflR076b3Glji62H6TUWAtGbu3DVHnDLddH818J jtvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+l6RNZfO6t53h33tKaqwIC7dbp1+6FXvY3b6ZyHCbIM=; b=OVyLEEI036NCudsRO2FaLkLdbm0sC8qCPIvSJIyzec4Fw+49yHpETN6FRcb6Pn+Zsi cd8QPXwHQX+T+Pamj2mExysXOkdOJHz5rKjJ2yWk17hFIOO1QlgAM1QWtVyYKI0H3VK+ COXZVOVKLP8WUSkr6WkQHexJ2/DRO7u24C4rglPQBWOqfqrV2CY5oyQNhDsMXE6UW93p WV18LlbeKlOsLsjhpvqdALQWAcz0MYUzTFL0Zd5SL57+btUjyD2CHMubuc9JK5c7n6f2 +pWXWrQlC4dQqdEf/8HXUVZGMOyaE4yF1aIU9CSifWSrtVXzN/Und1+6jNF7aRXgo6D9 /RwA== X-Gm-Message-State: AOAM532NuWlJdSFXIYVYEMrccJdGWs4pIw09HfCHNyoIKPq6AEsgbrUT mb+x0MftVwudcQ6MIi3j0sbWHw== X-Google-Smtp-Source: ABdhPJzJHBrtrgx0MRckehvohWFIxVb0UbKrJyjrQYAJFyl/NqebfeWi1xRAfMxCLN44HpTyoXi4CA== X-Received: by 2002:a2e:8244:: with SMTP id j4mr16500025ljh.364.1625794249066; Thu, 08 Jul 2021 18:30:49 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id u16sm405637ljj.113.2021.07.08.18.30.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 18:30:48 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Rob Herring , Stephen Boyd , Taniya Das , Jonathan Marek , Michael Turquette Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-clk@vger.kernel.org, Bryan O'Donoghue , Mark Brown , Ulf Hansson , linux-kernel@vger.kernel.org Subject: [PATCH v2 2/7] dt-bindings: clock: qcom, videocc: add mmcx power domain Date: Fri, 9 Jul 2021 04:30:38 +0300 Message-Id: <20210709013043.495233-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210709013043.495233-1-dmitry.baryshkov@linaro.org> References: <20210709013043.495233-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On sm8250 videocc requires MMCX power domain to be powered up before clock controller's registers become available. For now sm8250 was using external regulator driven by the power domain to describe this relationship. Switch into specifying power-domain and required opp-state directly. Signed-off-by: Dmitry Baryshkov --- Documentation/devicetree/bindings/clock/qcom,videocc.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Documentation/devicetree/bindings/clock/qcom,videocc.yaml b/Documentation/devicetree/bindings/clock/qcom,videocc.yaml index 567202942b88..db4ada6acf27 100644 --- a/Documentation/devicetree/bindings/clock/qcom,videocc.yaml +++ b/Documentation/devicetree/bindings/clock/qcom,videocc.yaml @@ -47,6 +47,11 @@ properties: reg: maxItems: 1 + power-domains: + description: + A phandle and PM domain specifier for the MMCX power domain. + maxItems: 1 + required: - compatible - reg @@ -61,6 +66,7 @@ additionalProperties: false examples: - | #include + #include clock-controller@ab00000 { compatible = "qcom,sdm845-videocc"; reg = <0x0ab00000 0x10000>; @@ -69,5 +75,6 @@ examples: #clock-cells = <1>; #reset-cells = <1>; #power-domain-cells = <1>; + power-domains = <&rpmhpd SM8250_MMCX>; }; ... From patchwork Fri Jul 9 01:30:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 471758 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp830082jao; Thu, 8 Jul 2021 18:31:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfwHwXeSm5R3HxwCjbkQFvZl3yADU7roxZZ6ya1feVqDZzNnlnTO7PfyuLKtgkjrE1TLL0 X-Received: by 2002:a05:6402:cb4:: with SMTP id cn20mr41857366edb.254.1625794295217; Thu, 08 Jul 2021 18:31:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625794295; cv=none; d=google.com; s=arc-20160816; b=hxsAVWViEum55hXkgYDGFMhDzVymbw4taRmNBZbjhJzYQbuHf9i678OcY0fjfo7l32 ylZ1OQGRIsXnnbWiXHc5BUrhmuhoYSHq+jq9HwPgNIgl632uvMh+tQRWUKpuHF/kYnzV XootkMhHEJIHEM1MF6TXpK84OYKZfs/9CoRbIwa20lKmK40M9pd/GH8lD0YR8JMZaR9/ Pb63ozAAVZrG/JvqYIyUqr08IWGMKwvsAMQ9+5HGvn1Og0bySt2OREOW48Vl0/QZMDpZ oIIzhhpOaj1/rDF9PpXsplgif6zsEiX1xB5w8xYEoyHtIpeiqqX4rFI1jDrVd/ScFesh y8PA== 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=ViWAwMziOjMwHhwls8FGGD+OSf0htK/WswqBD2gjBM4=; b=dBoiWu5D57pDzM5yNvwYYcbHa+ky2f7/I/tzzi5KRegbqP648+6K2QaQCOPZlDRvcY f8AVlDlPpIsicet1Kf3ATg7bDjOq9jUTAzm489/PYeBASgXhUWnd7vQ64SodfSAyOvB0 tg67JQ+Qidy/wRhe5DwrihaqTVsCO3R40N0CIxQQpwn/bcHKBMqqhkYF0ReSB0hzOCKn ObMfYsG4fOs8rVQMqpJBuOgej/PTrSOSKleilErX+zbJsrrs3Ymo9FyRe/gkboJfj7sU V/k1CVxemzDIwdcMX9Wv1rirzh4c95jPgjpMZV4hcIgP160oJ3ZYVqe7spbyRDiiyDXC B4yA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DbTxSS1j; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hb19si4810005ejc.597.2021.07.08.18.31.34; Thu, 08 Jul 2021 18:31:35 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DbTxSS1j; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230233AbhGIBdh (ORCPT + 7 others); Thu, 8 Jul 2021 21:33:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230347AbhGIBde (ORCPT ); Thu, 8 Jul 2021 21:33:34 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0BF6C061766 for ; Thu, 8 Jul 2021 18:30:51 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id t17so20014648lfq.0 for ; Thu, 08 Jul 2021 18:30:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ViWAwMziOjMwHhwls8FGGD+OSf0htK/WswqBD2gjBM4=; b=DbTxSS1jLF83CsCHOvMsMre+MPG0QQCLcdDPMJxLGEsa7fhokx3Awpk8KWm3mEiC/d yDGbbBKMvX5h2fM7h93fjZmxwgg6In3iZnRLdXIcTpa8wGHec6UF7IL31D5ZySMUuxUX /IjNk0kZW6taAw2ZqXIIFwM5PniYFlasJjyqv7GpZ0tXrrVbT50Vv63TskTUIniSf1ui glYlS7W8XBssjAjhhDbDximXDo+y6Un2LqZXRbXJhhRcJOjx2jqg1ETvEy9kWM8Vorqu /GmMv/rgJAQCDere/Pw0Z6rjFhISpoHOgZM30w3yWxwBW5l7SfzcEfOgs+jvbefGnxr/ wfnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ViWAwMziOjMwHhwls8FGGD+OSf0htK/WswqBD2gjBM4=; b=ExJqOx65iPM9jsmYpgLEsBXIkuroJfujwWn96n/bAjXSX+CZzUcXvXuZ4hA2xoCEUt GldW1MUpDOylPRgnPuWscdO+4lVhn8EukFm3OuiwwssSh/nsG7u98tixeXhwmjNvGoob tS86Spg/iUIxjUaocVUL4fOJbSPXG/WLwU+eJQ8II6w7dV/kMQIgscujskE3taGj8WpZ 26kDKb6SKuMTb7rmqxogREQSAEyuGwIZKtfB9MUlW3QIx/4oy7fSPQaSBg2mIMmdyIHm 9g/aCxgetS8TywI6lBjFLxBTaGDvB4Z8CqB+1187bzhPJLEWco8VEhRFDFy4YzBFcrtp /ePg== X-Gm-Message-State: AOAM531cmj0NRmxopm94674s5RlQ0sUX+7zOvc9jGROU953W3aCfnxE0 JBUDHjm1GTbCsYgwojtIiD+QAg== X-Received: by 2002:a05:6512:50e:: with SMTP id o14mr25137340lfb.286.1625794249897; Thu, 08 Jul 2021 18:30:49 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id u16sm405637ljj.113.2021.07.08.18.30.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 18:30:49 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Rob Herring , Stephen Boyd , Taniya Das , Jonathan Marek , Michael Turquette Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-clk@vger.kernel.org, Bryan O'Donoghue , Mark Brown , Ulf Hansson , linux-kernel@vger.kernel.org Subject: [PATCH v2 3/7] PM: domains: Add support for runtime PM Date: Fri, 9 Jul 2021 04:30:39 +0300 Message-Id: <20210709013043.495233-4-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210709013043.495233-1-dmitry.baryshkov@linaro.org> References: <20210709013043.495233-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Registers for some genpds can be located in the SoC area, powered up by another power domain. To enabled access to those registers, respective domain should be turned on. This patch adds basic infrastructure to the genpd code to allow implementing drivers for such genpd. PM domain can provide the parent device through the genpd->dev.parent pointer. If its provided at the pm_genpd_init() call time and if it is pm-enabled, genpd power_on and power_off operations will call pm_runtime_get_sync() before powering up the domain and pm_runtime_put_sync() after powering it down. Signed-off-by: Dmitry Baryshkov --- drivers/base/power/domain.c | 33 +++++++++++++++++++++++++++++++++ include/linux/pm_domain.h | 6 ++++++ 2 files changed, 39 insertions(+) -- 2.30.2 diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index e5d97174c254..14e75a62254d 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -482,6 +482,30 @@ void dev_pm_genpd_set_next_wakeup(struct device *dev, ktime_t next) } EXPORT_SYMBOL_GPL(dev_pm_genpd_set_next_wakeup); +static int _genpd_pm_runtime_get(struct generic_pm_domain *genpd) +{ + int ret; + + if (!(genpd->flags & _GENPD_FLAG_RPM_ENABLED)) + return 0; + + ret = pm_runtime_get_sync(genpd->dev.parent); + if (ret < 0) { + pm_runtime_put_noidle(genpd->dev.parent); + return ret; + } + + return 0; +} + +static void _genpd_pm_runtime_put(struct generic_pm_domain *genpd) +{ + if (!(genpd->flags & _GENPD_FLAG_RPM_ENABLED)) + return; + + pm_runtime_put_sync(genpd->dev.parent); +} + static int _genpd_power_on(struct generic_pm_domain *genpd, bool timed) { unsigned int state_idx = genpd->state_idx; @@ -497,6 +521,10 @@ static int _genpd_power_on(struct generic_pm_domain *genpd, bool timed) if (ret) return ret; + ret = _genpd_pm_runtime_get(genpd); + if (ret) + return ret; + if (!genpd->power_on) goto out; @@ -526,6 +554,7 @@ static int _genpd_power_on(struct generic_pm_domain *genpd, bool timed) raw_notifier_call_chain(&genpd->power_notifiers, GENPD_NOTIFY_ON, NULL); return 0; err: + _genpd_pm_runtime_put(genpd); raw_notifier_call_chain(&genpd->power_notifiers, GENPD_NOTIFY_OFF, NULL); return ret; @@ -572,6 +601,7 @@ static int _genpd_power_off(struct generic_pm_domain *genpd, bool timed) genpd->name, "off", elapsed_ns); out: + _genpd_pm_runtime_put(genpd); raw_notifier_call_chain(&genpd->power_notifiers, GENPD_NOTIFY_OFF, NULL); return 0; @@ -1986,6 +2016,9 @@ int pm_genpd_init(struct generic_pm_domain *genpd, genpd->domain.ops.complete = genpd_complete; genpd->domain.start = genpd_dev_pm_start; + if (genpd->dev.parent && pm_runtime_enabled(genpd->dev.parent)) + genpd->flags |= GENPD_FLAG_RPM_ENABLED; + if (genpd->flags & GENPD_FLAG_PM_CLK) { genpd->dev_ops.stop = pm_clk_suspend; genpd->dev_ops.start = pm_clk_resume; diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h index 21a0577305ef..e86cd7cfc9ec 100644 --- a/include/linux/pm_domain.h +++ b/include/linux/pm_domain.h @@ -60,6 +60,10 @@ * GENPD_FLAG_MIN_RESIDENCY: Enable the genpd governor to consider its * components' next wakeup when determining the * optimal idle state. + * + * _GENPD_FLAG_RPM_ENABLED: Use genpd's parent dev for runtime power + * management. There is no need to set this flag, + * it will be detected automatically. */ #define GENPD_FLAG_PM_CLK (1U << 0) #define GENPD_FLAG_IRQ_SAFE (1U << 1) @@ -69,6 +73,8 @@ #define GENPD_FLAG_RPM_ALWAYS_ON (1U << 5) #define GENPD_FLAG_MIN_RESIDENCY (1U << 6) +#define _GENPD_FLAG_RPM_ENABLED (1U << 31) + enum gpd_status { GENPD_STATE_ON = 0, /* PM domain is on */ GENPD_STATE_OFF, /* PM domain is off */ From patchwork Fri Jul 9 01:30:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 472508 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5BB69C47E4D for ; Fri, 9 Jul 2021 01:31:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1248B6162B for ; Fri, 9 Jul 2021 01:31:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230336AbhGIBdi (ORCPT ); Thu, 8 Jul 2021 21:33:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230367AbhGIBdf (ORCPT ); Thu, 8 Jul 2021 21:33:35 -0400 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 621C9C061766 for ; Thu, 8 Jul 2021 18:30:52 -0700 (PDT) Received: by mail-lj1-x22e.google.com with SMTP id u25so5350315ljj.11 for ; Thu, 08 Jul 2021 18:30:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=89M3kJH8Z+ezz3X5xX4Jb+p6yEZY6o3ZbKwB3aRtLuw=; b=yoiW7ZFuSlfNOroLD2nvWqab6XWApbxovd9lF6axBaihMwQRpP5yZvXh1v5FrYjkfu t/EeMmokjrecX5fojZ6cQK1C3ZMr/TpiyNMvsv2M5yEC1xgBnmA3/i7u/2OK+uS6lxDy RiMuy8bhw22etISLo/TvxZmR2qNbjEhQ/urtbT0PAEzLFCYJkFAM9HTmRD/9QFo6yprM CGfwJhVLfDEMgc/WBrtKE2t4lza23imUcUn5ryHko2+KrT5brI4Gd9nRPKGAtxE6WExW g7jnsvWz1Tqe+Ewn0oMyTS/IbqX6jsOg8MBHLAIwIcMNEgjUloPNs8UTReO6ee/8IYhh ByHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=89M3kJH8Z+ezz3X5xX4Jb+p6yEZY6o3ZbKwB3aRtLuw=; b=REOYo5Sc9+PIpDHz+o+9R83gvI7xDGDMcgskigzvSX8/dR2OSmWFbPb3E+2Xcd8n7n D1ayuceKsb3FEQBNvoIW9qs3XFn/MIUDgjagAVBiHMSBtFFe0OO6qsyIjB00KwhTdihp 7Dkhm8RC31eeCPBqINj3MUaLMYpwIhgVy0ocy+oz31IKZrl2WXbzuGqRWqY229jGj2o8 h/8EOnUlOo/Qw8RRY+a2/qok9tkOI0NsoZTK/HfiAhBabK5vl9g/Bkl0A277gEOuPEDJ sHnDJm5ZyHyxoJRBAq9eaWB1WFcx9B+kGNmf7do/PGQQVPxQrNYEEoqOdwwkZw6raP9Q m7eA== X-Gm-Message-State: AOAM530+ODHIxgdNTZv7uzMcS8w5HBHpIl+uGyeZ3y9tMUhkZkF8xy5a 4obf5IowSmkg32SbZEH7/sn4tg== X-Google-Smtp-Source: ABdhPJzXXUETOMzQ3cJvd4xc+brSmZp2RHVeNURZ3nwD9/LEPByiDCUB1Xg17f/TFg7PhGPsTi5nWg== X-Received: by 2002:a2e:7302:: with SMTP id o2mr18519317ljc.245.1625794250704; Thu, 08 Jul 2021 18:30:50 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id u16sm405637ljj.113.2021.07.08.18.30.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 18:30:50 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Rob Herring , Stephen Boyd , Taniya Das , Jonathan Marek , Michael Turquette Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-clk@vger.kernel.org, Bryan O'Donoghue , Mark Brown , Ulf Hansson , linux-kernel@vger.kernel.org Subject: [PATCH v2 4/7] clk: qcom: gdsc: enable optional power domain support Date: Fri, 9 Jul 2021 04:30:40 +0300 Message-Id: <20210709013043.495233-5-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210709013043.495233-1-dmitry.baryshkov@linaro.org> References: <20210709013043.495233-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On sm8250 dispcc and videocc registers are powered up by the MMCX power domain. Currently we used a regulator to enable this domain on demand, however this has some consequences, as genpd code is not reentrant. Teach Qualcomm clock controller code about setting up power domains and using them for gdsc control. Signed-off-by: Dmitry Baryshkov --- drivers/clk/qcom/common.c | 37 +++++++++++++++++++++++++++++++------ drivers/clk/qcom/gdsc.c | 5 +++++ 2 files changed, 36 insertions(+), 6 deletions(-) diff --git a/drivers/clk/qcom/common.c b/drivers/clk/qcom/common.c index 60d2a78d1395..43d8f8feeb3c 100644 --- a/drivers/clk/qcom/common.c +++ b/drivers/clk/qcom/common.c @@ -10,6 +10,7 @@ #include #include #include +#include #include "common.h" #include "clk-rcg.h" @@ -224,6 +225,11 @@ static struct clk_hw *qcom_cc_clk_hw_get(struct of_phandle_args *clkspec, return cc->rclks[idx] ? &cc->rclks[idx]->hw : NULL; } +static void qcom_cc_pm_runtime_disable(void *data) +{ + pm_runtime_disable(data); +} + int qcom_cc_really_probe(struct platform_device *pdev, const struct qcom_cc_desc *desc, struct regmap *regmap) { @@ -241,6 +247,18 @@ int qcom_cc_really_probe(struct platform_device *pdev, if (!cc) return -ENOMEM; + pm_runtime_enable(dev); + ret = pm_runtime_get_sync(dev); + if (ret < 0) { + pm_runtime_put(dev); + pm_runtime_disable(dev); + return ret; + } + + ret = devm_add_action_or_reset(dev, qcom_cc_pm_runtime_disable, dev); + if (ret) + goto err; + reset = &cc->reset; reset->rcdev.of_node = dev->of_node; reset->rcdev.ops = &qcom_reset_ops; @@ -251,7 +269,7 @@ int qcom_cc_really_probe(struct platform_device *pdev, ret = devm_reset_controller_register(dev, &reset->rcdev); if (ret) - return ret; + goto err; if (desc->gdscs && desc->num_gdscs) { scd = devm_kzalloc(dev, sizeof(*scd), GFP_KERNEL); @@ -262,11 +280,11 @@ int qcom_cc_really_probe(struct platform_device *pdev, scd->num = desc->num_gdscs; ret = gdsc_register(scd, &reset->rcdev, regmap); if (ret) - return ret; + goto err; ret = devm_add_action_or_reset(dev, qcom_cc_gdsc_unregister, scd); if (ret) - return ret; + goto err; } cc->rclks = rclks; @@ -277,7 +295,7 @@ int qcom_cc_really_probe(struct platform_device *pdev, for (i = 0; i < num_clk_hws; i++) { ret = devm_clk_hw_register(dev, clk_hws[i]); if (ret) - return ret; + goto err; } for (i = 0; i < num_clks; i++) { @@ -286,14 +304,21 @@ int qcom_cc_really_probe(struct platform_device *pdev, ret = devm_clk_register_regmap(dev, rclks[i]); if (ret) - return ret; + goto err; } ret = devm_of_clk_add_hw_provider(dev, qcom_cc_clk_hw_get, cc); if (ret) - return ret; + goto err; + + pm_runtime_put(dev); return 0; + +err: + pm_runtime_put(dev); + + return ret; } EXPORT_SYMBOL_GPL(qcom_cc_really_probe); diff --git a/drivers/clk/qcom/gdsc.c b/drivers/clk/qcom/gdsc.c index 51ed640e527b..9401d01533c8 100644 --- a/drivers/clk/qcom/gdsc.c +++ b/drivers/clk/qcom/gdsc.c @@ -427,6 +427,7 @@ int gdsc_register(struct gdsc_desc *desc, continue; scs[i]->regmap = regmap; scs[i]->rcdev = rcdev; + scs[i]->pd.dev.parent = desc->dev; ret = gdsc_init(scs[i]); if (ret) return ret; @@ -439,6 +440,8 @@ int gdsc_register(struct gdsc_desc *desc, continue; if (scs[i]->parent) pm_genpd_add_subdomain(scs[i]->parent, &scs[i]->pd); + else if (!IS_ERR_OR_NULL(dev->pm_domain)) + pm_genpd_add_subdomain(pd_to_genpd(dev->pm_domain), &scs[i]->pd); } return of_genpd_add_provider_onecell(dev->of_node, data); @@ -457,6 +460,8 @@ void gdsc_unregister(struct gdsc_desc *desc) continue; if (scs[i]->parent) pm_genpd_remove_subdomain(scs[i]->parent, &scs[i]->pd); + else if (!IS_ERR_OR_NULL(dev->pm_domain)) + pm_genpd_remove_subdomain(pd_to_genpd(dev->pm_domain), &scs[i]->pd); } of_genpd_del_provider(dev->of_node); } From patchwork Fri Jul 9 01:30:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 471760 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp830214jao; Thu, 8 Jul 2021 18:31:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvaMxiZi1TLOgHjd7ZzEGVN376I7RQ7/SDVUz3bxK7WPcOP4h3iAumr0PKVA3yjckOzH+c X-Received: by 2002:a17:906:7311:: with SMTP id di17mr34225325ejc.397.1625794305446; Thu, 08 Jul 2021 18:31:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625794305; cv=none; d=google.com; s=arc-20160816; b=cXO4vCnqRUlspw63pejetZtA1kAxJsGDhzzfVZ9KQrwkH6KZQKeoWDuguVdraRrvlJ kafg42En6R4NE2hAlOnDg9lhMXkZRhms3vmQ6Nq0Yt5TyHqKgbW3A4qmO9wbtm/MadAd be1t+fkGB34u/NXuA0IK3dT4S2s44zP3Ap+HSWd3wR00FSK3JtL5sOXtQjhcqgfM7tcV jCfTviwU07fceR6h5gqXL3Ijgc6LhsLZPJoKgYjhxNLHzCHdDMstvrcoyfDoHdSsu0ko ulx241r5PXUGk7RNV0zcnwvub8C4pkJCj/V1hRShZpWwAyC1+wOd64KuqocvpYALN9zZ Hh5g== 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=lQik2DiDxCRZSgw55nEoC87xQcPQoKmEJ4pXz+846Ts=; b=r/ezB9j83DnLIrB584lpnR311gyn7oFmwidsBKOxgO3zd5+rzUJGtGHUquWLuGxwFX Z1GrZQpu6fq739Tbjsei58s4RrKrmHECZ5D0dYwNpK3OKEt23HCDdpg9cHdN+AZDn4VQ bESiqqGDbY2dm/1WAOqVyJVBh40At3XzgJsXDZOHEmwZwo3iDwO+LVW7KgInRtapRf1V wsrcChDYaHYOFtGvee6ssN+ffVtRsA1bpxhbjkMidNtWSU97q8s3doA+MbfUxIEY2+bG QFjvoWtmPgRUo7QcI5SjNnfMUEzBtmdTqssdKJkZMOEwYvmeMI3XFQ+4eTYNVSvn9sW+ GQcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Vvn7xfp/"; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hb19si4810005ejc.597.2021.07.08.18.31.45; Thu, 08 Jul 2021 18:31:45 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Vvn7xfp/"; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230436AbhGIBdi (ORCPT + 7 others); Thu, 8 Jul 2021 21:33:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230385AbhGIBdg (ORCPT ); Thu, 8 Jul 2021 21:33:36 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18E63C061764 for ; Thu, 8 Jul 2021 18:30:53 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id p16so20010492lfc.5 for ; Thu, 08 Jul 2021 18:30:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lQik2DiDxCRZSgw55nEoC87xQcPQoKmEJ4pXz+846Ts=; b=Vvn7xfp/i6tzTdBjRg4q4hkQrI5vAlJtd542sc1SnDneVWbxGp0Q6D4BiURKBIRrph 39EnnYZXl2keLaFTkd3REZGtpgvLFBMRDQnQFvF5PRyF9s85oRC+VT8pZTzV4B/1KPaH TG5HpoFc1yJG76mGR8NLZaXCxcs5ydxRPRsKnLjb/7SL4BcDRGIHB0Nea3Yb+s3f5zTY ZYR5emnAR85K5J/oTb3pS5Yo9lw9N55LTomd4uzL8nOHWX2C9KDuujncRH0bCiz8Tpdz 4adWuyeVRWZYG6+nGdMNKForDKr0JJ2L0vLQXa2Mrsokxw8BTdrNugKu/PlUnr0d6PtM 7WJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lQik2DiDxCRZSgw55nEoC87xQcPQoKmEJ4pXz+846Ts=; b=DLDYD1PXF6aswrxCaVRXH/Z8kELWxyeXJse9x0b3Bd20M7Bp/EJPZHYcwIuoIsGqQu xW3Gm7ndxpQ3r6wuEptDk9auGkO686IDQ1vI3def9E1OhzTfAbGUXZubUkm9lMxvsP53 X+etCtHLmv25NFoWD0xAlMdiKM53QuJvongO8fUGIiNJiOiWYx+n8QspP7oyvAY1o8Q6 WPavLfUzS7quV3EBnF9lIrqkWspISIG5p0tfyJqIs5lfl2PLcO3wzw7sXlvfVcWcZKlY 4F1pPATWJosptMtV0NUYbDNoXHus8Jgo+zbhHR9cpDy84kujE376Z/A8nu7gn2m0Zl8n XTtA== X-Gm-Message-State: AOAM530cqakXOiLdKGTFkbql3pKTcvugZDHG/D5zJEvdSGtc2iF6xn7s cMYpS2MyhUdYqA/KDiI4gT5RGQ== X-Received: by 2002:ac2:4c55:: with SMTP id o21mr22983322lfk.122.1625794251485; Thu, 08 Jul 2021 18:30:51 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id u16sm405637ljj.113.2021.07.08.18.30.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 18:30:51 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Rob Herring , Stephen Boyd , Taniya Das , Jonathan Marek , Michael Turquette Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-clk@vger.kernel.org, Bryan O'Donoghue , Mark Brown , Ulf Hansson , linux-kernel@vger.kernel.org Subject: [PATCH v2 5/7] arm64: dts: qcom: sm8250: remove mmcx regulator Date: Fri, 9 Jul 2021 04:30:41 +0300 Message-Id: <20210709013043.495233-6-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210709013043.495233-1-dmitry.baryshkov@linaro.org> References: <20210709013043.495233-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Switch dispcc and videocc into using MMCX domain directly. Drop the now unused mmcx regulator. Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/sm8250.dtsi | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) -- 2.30.2 diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi index 4c0de12aaba6..2a468b85dc09 100644 --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi @@ -271,13 +271,6 @@ memory@80000000 { reg = <0x0 0x80000000 0x0 0x0>; }; - mmcx_reg: mmcx-reg { - compatible = "regulator-fixed-domain"; - power-domains = <&rpmhpd SM8250_MMCX>; - required-opps = <&rpmhpd_opp_low_svs>; - regulator-name = "MMCX"; - }; - pmu { compatible = "arm,armv8-pmuv3"; interrupts = ; @@ -2362,7 +2355,7 @@ videocc: clock-controller@abf0000 { clocks = <&gcc GCC_VIDEO_AHB_CLK>, <&rpmhcc RPMH_CXO_CLK>, <&rpmhcc RPMH_CXO_CLK_A>; - mmcx-supply = <&mmcx_reg>; + power-domains = <&rpmhpd SM8250_MMCX>; clock-names = "iface", "bi_tcxo", "bi_tcxo_ao"; #clock-cells = <1>; #reset-cells = <1>; @@ -2627,7 +2620,7 @@ opp-358000000 { dispcc: clock-controller@af00000 { compatible = "qcom,sm8250-dispcc"; reg = <0 0x0af00000 0 0x10000>; - mmcx-supply = <&mmcx_reg>; + power-domains = <&rpmhpd SM8250_MMCX>; clocks = <&rpmhcc RPMH_CXO_CLK>, <&dsi0_phy 0>, <&dsi0_phy 1>, From patchwork Fri Jul 9 01:30:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 471763 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp830323jao; Thu, 8 Jul 2021 18:31:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzU6AOUcBMnJaLtt8NGSRHsThme2uXyMJkm0XtO35AGf0X7JWm8E8lBABMhl3ZTw9heBlzh X-Received: by 2002:a17:906:16cd:: with SMTP id t13mr13577047ejd.250.1625794311534; Thu, 08 Jul 2021 18:31:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625794311; cv=none; d=google.com; s=arc-20160816; b=gCqHM/hEC6BdQN7nbc5ZQkc7J1wf83EsA2Q8CQDhglvTQ2CS4lDrgfJhfIvirZ7V3f aDws67XkElkZWhn7UMnKdNmiJqENt4G2ntD7v+Ncx0oZ4EItERcaqli1kz5MKLZf4ajn K6A0ynwctfu5NhNKUjgvbQG2LCFke8XQOGxWRWi8ybykEYdSCtWfZGY961jba5yZkhsQ EaIKylufzIk1oj4duTEPZR3Jo3yFEq/oj8U4nD0bhshFG4XjmiRAqEGGvM7H7sWXf02N GmjoW/9DhbVlhdiQoSluLTcSS/HvXG09Eln3HGpbMM1QGQ2/EvVi7lh738NKLgKyDWIj XChA== 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=f0ldkE5j34OXHAqh3I/xyyl0k1n40wAos/+0qzuAEic=; b=pnp+502mUOkEpYNa1o2QeLQn3uVuEPEBx+rffkE46wSCG27ouySWhu1Gg/xXAHjMi2 m0GPhKpdyX3QaCex5bpdLvO6HtfGZJJryzW9eCtv6hK9dL0bEEPogYNKCL6RkKWn4Zsk Jrw2ufHcSLP60I2Bi6rFcSwqL5LR/mxPjX7KIY2wuNRugcyVANZaouKn4LnyXmpIyUQP 968y3+Gv8TpL7D9MbAgUeCRiCdXRUSGoZ+npAoyf9OeUGrfmXpkCWFx0pbi1xzMlXiAe srlLUPF6xWHJxoDNuHXlXNL3c9zaI87FCbwDwN38JilfbZUwP8/3TOF32anIPqnioXs0 gWZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="nm/hroiu"; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hb19si4810005ejc.597.2021.07.08.18.31.51; Thu, 08 Jul 2021 18:31:51 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="nm/hroiu"; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230347AbhGIBdu (ORCPT + 7 others); Thu, 8 Jul 2021 21:33:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230217AbhGIBdh (ORCPT ); Thu, 8 Jul 2021 21:33:37 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DAB8C061765 for ; Thu, 8 Jul 2021 18:30:54 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id f13so19790266lfh.6 for ; Thu, 08 Jul 2021 18:30:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=f0ldkE5j34OXHAqh3I/xyyl0k1n40wAos/+0qzuAEic=; b=nm/hroiuWo+iD98b1WyHvUy5UayywXgtAa9rZPMVCVjmNl3WMEkz8+2uF+ZJJyM2hs U9Qqx5chOha+qv+IGYUDu+moP9I72CV2Sf0u521YC2O9cx1SN9KzhufbSV9CDHripyfq qokUVOMeGAxjdSy2u1YKov0IIv8pFGAW18pA2VgnE84WZM8RhrQBLz1aJmd3YZKSGU6J wH/pjxt7XTHJCmyG9Kr2Kpqpt2zxPb2wMuZm2oOzLbPeNJid6rPg7P+rI/NAa8zvC9Ey vKhOuiIu5rtV8TXErMket3WTCmTL87hGzHqKvjMWweNIVC4h0Bg+4LsCP9qks22uxkJ/ 7Dtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=f0ldkE5j34OXHAqh3I/xyyl0k1n40wAos/+0qzuAEic=; b=SGqkTb6CAPU81jLvkk6wM2dSWuVVXUCoxTol2SHtqmBsxVpCKupgMr+AlII/LMvaum dGJbfG7J4nNc/lmogKMfqlMDgSTYBjumuzsYxbG8ZISpNE3k+y2yAA1bgg0M8WWaPIe/ 4nZ+2OokoCKpMf+8mtThahOaT4pI8sORaBvwaBjCK82ZhMTv+foPA4sWqXu9eVr0MrnA qXL9X++TWwmEpBel3m7ISIMegWtnngtuVlQf0aLc82S+eQN183wqOfCNCzzFlxb6/8WI IxbYiQeYTwyiVpkUjchjOAKwm44YacMey3HAajTWEs31qhNuaxM9Bsvj941LewAw5s41 38pQ== X-Gm-Message-State: AOAM533Abg+XIYgcMW0ZQNxF1f/TecaT8plMTmI8pCCyyK/W422YkT3a JKaSde2ydAGYe/4GGyoXaAwhCg== X-Received: by 2002:a05:6512:3d0a:: with SMTP id d10mr26656661lfv.143.1625794252428; Thu, 08 Jul 2021 18:30:52 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id u16sm405637ljj.113.2021.07.08.18.30.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 18:30:51 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Rob Herring , Stephen Boyd , Taniya Das , Jonathan Marek , Michael Turquette Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-clk@vger.kernel.org, Bryan O'Donoghue , Mark Brown , Ulf Hansson , linux-kernel@vger.kernel.org Subject: [PATCH v2 6/7] clk: qcom: dispcc-sm8250: stop using mmcx regulator Date: Fri, 9 Jul 2021 04:30:42 +0300 Message-Id: <20210709013043.495233-7-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210709013043.495233-1-dmitry.baryshkov@linaro.org> References: <20210709013043.495233-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Now as the common qcom clock controller code has been taught about power domains, stop mentioning mmcx supply as a way to power up the clock controller's gdsc. Signed-off-by: Dmitry Baryshkov --- drivers/clk/qcom/dispcc-sm8250.c | 1 - 1 file changed, 1 deletion(-) -- 2.30.2 diff --git a/drivers/clk/qcom/dispcc-sm8250.c b/drivers/clk/qcom/dispcc-sm8250.c index de09cd5c209f..dfbfe64b12f6 100644 --- a/drivers/clk/qcom/dispcc-sm8250.c +++ b/drivers/clk/qcom/dispcc-sm8250.c @@ -955,7 +955,6 @@ static struct gdsc mdss_gdsc = { }, .pwrsts = PWRSTS_OFF_ON, .flags = HW_CTRL, - .supply = "mmcx", }; static struct clk_regmap *disp_cc_sm8250_clocks[] = { From patchwork Fri Jul 9 01:30:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 472045 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 360D1C11F67 for ; Fri, 9 Jul 2021 01:31:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1E594613B2 for ; Fri, 9 Jul 2021 01:31:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230370AbhGIBdx (ORCPT ); Thu, 8 Jul 2021 21:33:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230416AbhGIBdi (ORCPT ); Thu, 8 Jul 2021 21:33:38 -0400 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0B2BC061766 for ; Thu, 8 Jul 2021 18:30:54 -0700 (PDT) Received: by mail-lj1-x231.google.com with SMTP id q4so5340652ljp.13 for ; Thu, 08 Jul 2021 18:30:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OW6r9Ztak14Z94NLN85hpavnPWferFff+9qy6SUKk4g=; b=JC+1co9x/j+ssxCI+b1ed91TSXIs9SSXm9M04kPMKTty2jG2kt3NTohLWEdszrJp4d OWjYXBEqxswxPVRdX5oD8bvjermQG4xTqOsvtdmnRPRuUsqAxSGxhpxhzso8xFWxnasP Sqb7IkQzYU1yYKlpoCpIIaVj8QnuzQOtDu3+ABjl0d6FRKmhGHyk3IAJphS0InJR3csZ ZXrhWEXgym+/thivB1uxBvE97x5RoP3GK7VzLL3rZ3229L9G9zmcjqxFRfW5sDhUmmHz fbM5C10WwxdB2P3KgcQAPKrB9l9R8YMjwQtO69myRBsg5nKrbkPDS+7FzuyPRGmFmOnT 9BIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OW6r9Ztak14Z94NLN85hpavnPWferFff+9qy6SUKk4g=; b=VvX1tjdwn+4SDc1qI/67nJUuR/IiZ0xCLHjCddsltCVMfDNdJGmXV2Cv+P8sn7qi+0 hc8rWL3L6baEzjmwAdt+f/VTOL0OyiKQjMKWe0kjHH8IXiEONQpq+6t3Rqp4K3W1RWWc 1VxTffEFHEGjuyFT10d9+fR63jZw/uoVbLm6QkLjKxBCj8Yj1Vr3mvvCgExo9lkzo5LQ aDgeh+6rrnpXBJhpFND6n/PwBUOECFiiQIHFlB6MJEB5FAMGsvr4qUGejyPUaPTAo5m2 pqlZtcZJg38slF1tdDkE5V5VyktqCooQjQzzRdv7GHFKI8lPD2VqQUJ3Zeo2EHw7tbfX fHcg== X-Gm-Message-State: AOAM530ECWd2qgFQAyozCLjSaLRCMVUT9v40eIM+dq244JDVXEbeba8F jotji6kVLaH+pkvTys9rQqkVKg== X-Google-Smtp-Source: ABdhPJx6WXDWhJBZKd7QHCOxQwuu4v3iDZQQH1YLUxtdkVc6jIf8iadLgiyW6VaFmzWYsqE9wRVDQA== X-Received: by 2002:a05:651c:1798:: with SMTP id bn24mr26944102ljb.72.1625794253278; Thu, 08 Jul 2021 18:30:53 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id u16sm405637ljj.113.2021.07.08.18.30.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 18:30:52 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Rob Herring , Stephen Boyd , Taniya Das , Jonathan Marek , Michael Turquette Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-clk@vger.kernel.org, Bryan O'Donoghue , Mark Brown , Ulf Hansson , linux-kernel@vger.kernel.org Subject: [PATCH v2 7/7] clk: qcom: videocc-sm8250: stop using mmcx regulator Date: Fri, 9 Jul 2021 04:30:43 +0300 Message-Id: <20210709013043.495233-8-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210709013043.495233-1-dmitry.baryshkov@linaro.org> References: <20210709013043.495233-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Now as the common qcom clock controller code has been taught about power domains, stop mentioning mmcx supply as a way to power up the clock controller's gdscs. Signed-off-by: Dmitry Baryshkov --- drivers/clk/qcom/videocc-sm8250.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/clk/qcom/videocc-sm8250.c b/drivers/clk/qcom/videocc-sm8250.c index 7b435a1c2c4b..eedef85d90e5 100644 --- a/drivers/clk/qcom/videocc-sm8250.c +++ b/drivers/clk/qcom/videocc-sm8250.c @@ -276,7 +276,6 @@ static struct gdsc mvs0c_gdsc = { }, .flags = 0, .pwrsts = PWRSTS_OFF_ON, - .supply = "mmcx", }; static struct gdsc mvs1c_gdsc = { @@ -286,7 +285,6 @@ static struct gdsc mvs1c_gdsc = { }, .flags = 0, .pwrsts = PWRSTS_OFF_ON, - .supply = "mmcx", }; static struct gdsc mvs0_gdsc = { @@ -296,7 +294,6 @@ static struct gdsc mvs0_gdsc = { }, .flags = HW_CTRL, .pwrsts = PWRSTS_OFF_ON, - .supply = "mmcx", }; static struct gdsc mvs1_gdsc = { @@ -306,7 +303,6 @@ static struct gdsc mvs1_gdsc = { }, .flags = HW_CTRL, .pwrsts = PWRSTS_OFF_ON, - .supply = "mmcx", }; static struct clk_regmap *video_cc_sm8250_clocks[] = {