From patchwork Fri Oct 23 13:19:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 318932 Delivered-To: patch@linaro.org Received: by 2002:a92:d1d1:0:0:0:0:0 with SMTP id u17csp426041ilg; Fri, 23 Oct 2020 06:19:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwbsb23QNDT/qwDHydQ8olfVaaQ8Nvc/L2FbvPcbi/L3wnZdchmaB/JHcw4MtFZ3/w0vVN X-Received: by 2002:aa7:cf93:: with SMTP id z19mr2084102edx.26.1603459187405; Fri, 23 Oct 2020 06:19:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603459187; cv=none; d=google.com; s=arc-20160816; b=xk8LKFJOgBy6cey+pdEsJhuEdvgMUaCbKGBqUfHu4YyO59qduUHADmyB8dU6OiRlFA nk3kPwomcm0ZRMoZ25JOX95nQv0371Vt5z0CtL9Q86l1lM7F4GuadrX1KkMk/6jDoqoI mQI53vvhH8RVhOt49K5TymYoiO7D8T9dZWLtZO9WN5cI7UZf0SMVwAQvKkdyqqG2Es4f UzJiIxI9fNtu33hpqwOdK6Um52WvpzBp170plsB5KkjQbK0zHWWee9lLI5GUYF8fEXTR GpbjfAtAIVkmTl2biXx0DzOTNK/QptbUlmYCPpxQNRGe6V2Emcl3fPqVnSxcQON6pROr XKVQ== 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=AqOOQJkhUfvKoNHnpeyzoyANmDhc3aHrYoF+q2ExrGE=; b=dANHcg4dWZxfXwixk6N2ML/bsNZZ2q099StPr37rqyfacf8odV7MeGmmWQLCxm84Nh Gv+9FgTARY+dpPrb/8JxUqXzRzvX2l/0X7iEnB9MAZofRO08rnSD/sez44E+V5idPYRy C6V1DnoMPsSe1lzCRlSuFgysvzLa0TTVpYhQVeCDHwBqmkWWRcXJRLlya7NDXAiC1h9o EExUqsCqtgyz+m7u4JWPgTw4KkKWrkLHTdU/r8bYQrptVeD3CjrI2g0E2ZHGy/dlvfS3 thOMkGDRyPxzcxfoXsKGvep4fBiKjr86y1JZXHbkMEUPiyk5vQc9tybWUfGAET5zdso7 iAmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="X9/k2IJL"; 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 cy27si738892edb.52.2020.10.23.06.19.47; Fri, 23 Oct 2020 06:19:47 -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="X9/k2IJL"; 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 S464459AbgJWNTk (ORCPT + 6 others); Fri, 23 Oct 2020 09:19:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S464450AbgJWNTi (ORCPT ); Fri, 23 Oct 2020 09:19:38 -0400 Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B27F0C0613D2 for ; Fri, 23 Oct 2020 06:19:36 -0700 (PDT) Received: by mail-lj1-x243.google.com with SMTP id i2so1530509ljg.4 for ; Fri, 23 Oct 2020 06:19:36 -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=AqOOQJkhUfvKoNHnpeyzoyANmDhc3aHrYoF+q2ExrGE=; b=X9/k2IJLvlOHdTHBPXpgN4RmgFl3Oq62n61bxmVEhlMNmljFgL94Rd4cOvNlRLehAD GIS4FbH9mh3Qvqh0/li1DbfMKSjAImGtgWKCqn7IKBgyGAChiOLr5kXnwDQjzgRyyWHr CcATQGMj704tN98Lp+HEFgs1L3wG424ko9dpXlQurxVu42r4vqzwPvtkoa1X/BxpDqeI 651Cdtn6q/zdmRJNAXHxY9OJFX8uoc9xa3XLMxdCE1SMnvNn0OtlzNr1TVUPPIA3jd0R G0PAvM53ysGj/72ELEYqo4xYNjgWPkduqv3fdkEiVjbB/JdCW+tZqtC4BTqyGkJMkYJ0 Da7A== 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=AqOOQJkhUfvKoNHnpeyzoyANmDhc3aHrYoF+q2ExrGE=; b=mWXDZRvRb0M1jcd9w0MuJtJv0e9LEev5MbjtR97afYoiSwCubaV098nmmZIDEe2Viv 7EWwLPGEV0jEHUtc+O7e9CJbKOuiuiN8/eVY4Bu+95iK/60p0l7xW8DRbbOYZ63yWDYH MHve2BmZ8rMwPZgaJPRadEW33qMzIYU9VLnuyTucugVv4xH1MxwrIwY2Hs9qD0VHChY9 UOUOyZpSIbW9VwtvkhKwX1VduDNe6hyBgz73hEBKYB8xE2C2TpKzAJis6eDwiXX5vwHw 55e23DmmSeKDrZnh46fivgAW1Tu1MwG3iJXVtwvnKwRxdHCdK9+zagYV0jx546dSxRRR kMuw== X-Gm-Message-State: AOAM5314QHvDNZjizH87FYnEl980e2gJRiLxm1X4rmdWENBpoGvIPlAn 1lnCnyE4eCuhYq8/vbas7WaLVg== X-Received: by 2002:a2e:b0e4:: with SMTP id h4mr816744ljl.119.1603459175157; Fri, 23 Oct 2020 06:19:35 -0700 (PDT) Received: from eriador.lan ([188.162.64.195]) by smtp.gmail.com with ESMTPSA id o22sm161564ljg.122.2020.10.23.06.19.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Oct 2020 06:19:34 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Rob Herring , Jonathan Marek , Stephen Boyd , Michael Turquette , Liam Girdwood , Mark Brown Cc: linux-arm-msm@vger.kernel.org, Manivannan Sadhasivam , devicetree@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/5] regulator: fixed: support using power domain for enable/disable Date: Fri, 23 Oct 2020 16:19:22 +0300 Message-Id: <20201023131925.334864-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201023131925.334864-1-dmitry.baryshkov@linaro.org> References: <20201023131925.334864-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Adds possibility to choose the compatible "fixed-regulator-domain" for regulators which use power domain for enabling/disabling corresponding regulator. Signed-off-by: Dmitry Baryshkov --- drivers/regulator/fixed.c | 63 +++++++++++++++++++++++++++++++++++---- 1 file changed, 57 insertions(+), 6 deletions(-) -- 2.28.0 diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c index 3de7709bdcd4..02ad83153e19 100644 --- a/drivers/regulator/fixed.c +++ b/drivers/regulator/fixed.c @@ -18,6 +18,8 @@ #include #include #include +#include +#include #include #include #include @@ -34,11 +36,13 @@ struct fixed_voltage_data { struct regulator_dev *dev; struct clk *enable_clock; - unsigned int clk_enable_counter; + unsigned int enable_counter; + int performance_state; }; struct fixed_dev_type { bool has_enable_clock; + bool has_performance_state; }; static int reg_clock_enable(struct regulator_dev *rdev) @@ -50,7 +54,7 @@ static int reg_clock_enable(struct regulator_dev *rdev) if (ret) return ret; - priv->clk_enable_counter++; + priv->enable_counter++; return ret; } @@ -60,16 +64,41 @@ static int reg_clock_disable(struct regulator_dev *rdev) struct fixed_voltage_data *priv = rdev_get_drvdata(rdev); clk_disable_unprepare(priv->enable_clock); - priv->clk_enable_counter--; + priv->enable_counter--; return 0; } -static int reg_clock_is_enabled(struct regulator_dev *rdev) +static int reg_domain_enable(struct regulator_dev *rdev) { struct fixed_voltage_data *priv = rdev_get_drvdata(rdev); + struct device *dev = rdev->dev.parent; + int ret; + + ret = dev_pm_genpd_set_performance_state(dev, priv->performance_state); + if (ret) + return ret; - return priv->clk_enable_counter > 0; + priv->enable_counter++; + + return ret; +} + +static int reg_domain_disable(struct regulator_dev *rdev) +{ + struct fixed_voltage_data *priv = rdev_get_drvdata(rdev); + struct device *dev = rdev->dev.parent; + + priv->enable_counter--; + + return dev_pm_genpd_set_performance_state(dev, 0); +} + +static int reg_is_enabled(struct regulator_dev *rdev) +{ + struct fixed_voltage_data *priv = rdev_get_drvdata(rdev); + + return priv->enable_counter > 0; } @@ -129,7 +158,13 @@ static const struct regulator_ops fixed_voltage_ops = { static const struct regulator_ops fixed_voltage_clkenabled_ops = { .enable = reg_clock_enable, .disable = reg_clock_disable, - .is_enabled = reg_clock_is_enabled, + .is_enabled = reg_is_enabled, +}; + +static const struct regulator_ops fixed_voltage_domain_ops = { + .enable = reg_domain_enable, + .disable = reg_domain_disable, + .is_enabled = reg_is_enabled, }; static int reg_fixed_voltage_probe(struct platform_device *pdev) @@ -177,6 +212,14 @@ static int reg_fixed_voltage_probe(struct platform_device *pdev) dev_err(dev, "Can't get enable-clock from devicetree\n"); return -ENOENT; } + } else if (drvtype && drvtype->has_performance_state) { + drvdata->desc.ops = &fixed_voltage_domain_ops; + + drvdata->performance_state = of_get_required_opp_performance_state(dev->of_node, 0); + if (drvdata->performance_state < 0) { + dev_err(dev, "Can't get performance state from devicetree\n"); + return drvdata->performance_state; + } } else { drvdata->desc.ops = &fixed_voltage_ops; } @@ -260,6 +303,10 @@ static const struct fixed_dev_type fixed_clkenable_data = { .has_enable_clock = true, }; +static const struct fixed_dev_type fixed_domain_data = { + .has_performance_state = true, +}; + static const struct of_device_id fixed_of_match[] = { { .compatible = "regulator-fixed", @@ -269,6 +316,10 @@ static const struct of_device_id fixed_of_match[] = { .compatible = "regulator-fixed-clock", .data = &fixed_clkenable_data, }, + { + .compatible = "regulator-fixed-domain", + .data = &fixed_domain_data, + }, { }, }; From patchwork Fri Oct 23 13:19:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 318935 Delivered-To: patch@linaro.org Received: by 2002:a92:d1d1:0:0:0:0:0 with SMTP id u17csp426217ilg; Fri, 23 Oct 2020 06:19:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfs6sxhX1otqRxrlJs4Ic5eLNNpchISB88bwK9ZuqQkF5OG7lPLaoQglHGXYLRNIT6OVjG X-Received: by 2002:a17:906:6453:: with SMTP id l19mr1915638ejn.366.1603459199182; Fri, 23 Oct 2020 06:19:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603459199; cv=none; d=google.com; s=arc-20160816; b=EDrmt08sKehS6YEwLurZePLKsrxaImDazZnuTJSE+RO9v2nQ/eqebi5o9MezKIuCc4 AYQUbwWLBQAx8W3OymCIMM9iKf3kcN2+t/OWQAhitqA58mO0bLh2ylEsxUB/mIfNCRL2 6fzlKwow5OJ7JNz+U/vzQJ6GLJWZRcALDv9IQZ/JHpfdLrI+Yv892zSIksk2SR0G5R+d AhB60GmbfjpkEwD0WnCUcVc0A6ZPYe/0qPbF0RqyJ3oUmcgH4jV2njTQcn3e6wJyNFz+ 414jjxBwRXP2OlostP5OurGZw3Jsxl25LG541EoutbTOYbIEoEuzwBgeRvnfEZy0hcDC WR9Q== 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=8zrW3F4EtDxIXqxN4rkTzSpTYyKGY7/NdRqYOW9zNVQ=; b=doO/gXUQbXgKVRXRkQywq4mBImhsCDu+ZmhqWi1W39cbxxjsYX+UHVk3wvyKpbGMnD lg6h7+DKC22bn06OrEYMI/XyxFPMqLpc0ZEuLM2DxRyeegsJjrtl8opncAfqACXm5ebv qNcs3nMLbuZPHb2Qcg13XQxcn9sWyMAx/IcBvLJBoW2+3hKxPSBWf6Z+0DCkPFyQzwjh OgnTzkG1reuvbjPLtDBmge+RTOVp7nS9AjwlF0V106oJRczkf/ASRmyW7FqcEsAcjY5W Ml7JhTpKiu4H8qimCZF1Wb7pA/kijVdbBparQWciivBGx+01nOeoU9Hyn0YygRW0vHoF MnzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=najjhWzJ; 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 y20si733335edv.92.2020.10.23.06.19.59; Fri, 23 Oct 2020 06:19:59 -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=najjhWzJ; 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 S464468AbgJWNTn (ORCPT + 6 others); Fri, 23 Oct 2020 09:19:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S464464AbgJWNTl (ORCPT ); Fri, 23 Oct 2020 09:19:41 -0400 Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0CEDC0613D5 for ; Fri, 23 Oct 2020 06:19:39 -0700 (PDT) Received: by mail-lj1-x241.google.com with SMTP id y16so1542920ljk.1 for ; Fri, 23 Oct 2020 06:19:39 -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=8zrW3F4EtDxIXqxN4rkTzSpTYyKGY7/NdRqYOW9zNVQ=; b=najjhWzJOGwlVwchFVVSyXcA5bTEsXvJ1MPlZBGtaKzm59NlBIzWj4Rjiyn718eTbJ 7Ve97wVO9+QachB6aDhu6nL1klAKC8KH/RhrPvPc661tYf5ax4Rn6MZUap6XSYCICbYy 3ZiOAlyb0pVB4L47+ctSNn4I2C+Yw+WR37P0Gg8O+Of/jYdM47BWS9A0v2qLP3w6kWa/ h9c+dQcjzjXxu/+PGBsfKYXR7EAESmCbBgTyNG2l4+FCohoLYuULBPvUJ0JxgBMDvG6C fAhnTXoiQJbiJex0wj+5srxVJ37uQyBrn8o/Gh+znaheq4XQO4T6yTcMIRLPwqCastc7 p3DQ== 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=8zrW3F4EtDxIXqxN4rkTzSpTYyKGY7/NdRqYOW9zNVQ=; b=UfVckFAgtOpPLzmzf2fITcsvSNu7VMyvEB8//ZWkSesvZf3qo3Km9hlDPPcFfgjwrY OMIz9bIN7nwd7WeiiUsKJZobfuXVla4CnVscmtJWHJ8+C7lJ5gqbV13GnSvS4RozeLgh 9FyKlHWie9g31JFonUCXC/QDeSGGBABUjRhnvNrw0zEcPP8m5bRUCVwhW1a0H7X5Hzgt gtSZXOMJV8uiZ0mfMK3vWqQbVEnIVV//Ko032LfvpcctzkcWEncX7QiBZn8XYsBGqf5K 59ov4mbTVU24c6WLZ/3B7TfrMr5yeDLhEWUTM+MwVIxFzx+6uYElbfO3+RPZmj4ZrsXO q4rQ== X-Gm-Message-State: AOAM530eljykyn3kNtZ4akckONKi9Ga5coye42mZMQkJqmSeDc/wx8AB SStAGG8uGxlOpXUJe7oTjyHIBA== X-Received: by 2002:a2e:8416:: with SMTP id z22mr950001ljg.72.1603459178362; Fri, 23 Oct 2020 06:19:38 -0700 (PDT) Received: from eriador.lan ([188.162.64.195]) by smtp.gmail.com with ESMTPSA id o22sm161564ljg.122.2020.10.23.06.19.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Oct 2020 06:19:37 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Rob Herring , Jonathan Marek , Stephen Boyd , Michael Turquette , Liam Girdwood , Mark Brown Cc: linux-arm-msm@vger.kernel.org, Manivannan Sadhasivam , devicetree@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/5] arm64: dts: qcom: sm8150: add mmcx regulator Date: Fri, 23 Oct 2020 16:19:23 +0300 Message-Id: <20201023131925.334864-4-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201023131925.334864-1-dmitry.baryshkov@linaro.org> References: <20201023131925.334864-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add regulator controlling MMCX power domain to be used by display clock controller on SM8150. Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/sm8150.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.28.0 diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi index f0a872e02686..4c3d694b7dab 100644 --- a/arch/arm64/boot/dts/qcom/sm8150.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi @@ -172,6 +172,13 @@ tcsr_mutex: hwlock { #hwlock-cells = <1>; }; + mmcx_reg: mmcx-reg { + compatible = "regulator-fixed-domain"; + power-domains = <&rpmhpd SM8150_MMCX>; + required-opps = <&rpmhpd_opp_low_svs>; + regulator-name = "MMCX"; + }; + memory@80000000 { device_type = "memory"; /* We expect the bootloader to fill in the size */ From patchwork Fri Oct 23 13:19:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 318934 Delivered-To: patch@linaro.org Received: by 2002:a92:d1d1:0:0:0:0:0 with SMTP id u17csp426191ilg; Fri, 23 Oct 2020 06:19:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOX2PQJG6zMRjHSL0zh8TjaCAclGuIqmlNninEp6fx9putQyDbqR95jyDop/AwS+G4D7EM X-Received: by 2002:a17:907:366:: with SMTP id rs6mr1908240ejb.352.1603459197846; Fri, 23 Oct 2020 06:19:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603459197; cv=none; d=google.com; s=arc-20160816; b=tB9cfbq4ek3YMzq6uhxeyiPi2S3a7TxoNUlTiBGxfDCtKalz4UbJabrWzcWpFoKO7C ohkWLjKJmNj8Hzz1dNLqzP4c9gCLNLxMq67nNymWe5hp2KCR1AS9uEJ3xf60kBuS5Noc TV1MlSR8GuoeUMdwOJNEJPqd+3PU3WTzmZ/HdnXpzotUAk/i04kYbAsrVdik8YPromIy Wlkicyg711iYy5b3Tu86LYLjElpECrcCKQZQ1jA8MP3VCasvbd5BnTfmYSkgOSd5kcEJ LvzZHCKr/aFw2GcgExB2ZjtTZf/Z4cfD4P1pXE+1YvHeOOHi063O4TTTlGWhkxWyq3mD UHcw== 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=vs5mIrV/vf6dXVUTDjt/isM2L9GuwwyE1om4bgY/ZkU=; b=KgvQmgo3XHGfPPi5zhY1tOmKeCEM3nGfLJnZfzd0Mf0x6vAy3zsS0nP4hAYy9cxo2i ApBUs9zgUD9/wMXp7F/yCzMUAz95z1cxjmYOpUdHUqe2LIs6xWxseymU7Po9ncQbRzJH vE39auffxFBvdduzPCwzWHKqfPKQKFvcga1Y7yzjSwSrEUWUpDpb80359uv+Ogfpg3VU I+B0Mxr87RP1TS+CJ9is46YTV5NUvs+slpX8S8DVJvNtQfNjv7tFNg9iremUBrilRFDA vZ3unj/D35utJxJOKx2+4xzN/0t9EZh4LzI9Od99U2I3BJX2l2R8+BmNMl2hri8VZZiR 59tQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CpTp4wLu; 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 y20si733335edv.92.2020.10.23.06.19.57; Fri, 23 Oct 2020 06:19:57 -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=CpTp4wLu; 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 S464463AbgJWNTr (ORCPT + 6 others); Fri, 23 Oct 2020 09:19:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S464482AbgJWNTo (ORCPT ); Fri, 23 Oct 2020 09:19:44 -0400 Received: from mail-lf1-x143.google.com (mail-lf1-x143.google.com [IPv6:2a00:1450:4864:20::143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D25AC0613CE for ; Fri, 23 Oct 2020 06:19:42 -0700 (PDT) Received: by mail-lf1-x143.google.com with SMTP id z2so2076070lfr.1 for ; Fri, 23 Oct 2020 06:19:42 -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=vs5mIrV/vf6dXVUTDjt/isM2L9GuwwyE1om4bgY/ZkU=; b=CpTp4wLudC7DAsrK1ThoOcKozcTO0vn/+OJRKPKooHTPqgO9ZFJmTTfAdC7YcLIeIz pDwIay79IUiwsxhjAFJg1a5VAo5gMpSVcDWkmiJrEaAAtO5DTgZpcEYfSCUkG33Vj5PG vUYgZxKYPsL0y3gf6Ee20myRXrgimuasFlBpqofZ/uEEllU3OXJB7dELxbZf7yUJMhEV /B57sdfKz8n6408WAfe5JxsAwEaz2gDQ3F3czB2nK3ssd/vozqMxIuVtJ32iVYkUjdSG jcluEtB63dJkJDOElwj6N7yy6srLXcof8S6OX7mqrEEi+DiGm0n0LwngI/s2Ld9NOWRZ Hg2w== 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=vs5mIrV/vf6dXVUTDjt/isM2L9GuwwyE1om4bgY/ZkU=; b=a44QD3mUxEtjqjJn+7FyC9E8qv3wyVpFI4FrdTitRsWvHRaee+rpez7jk4yHK8rHZW Hwq+vELii7IUWSTkDFHR6jppg2rZwBI8JkdedD0fEjqLbDjtcPLI4//5OAxYx6NUox9C Da14Qcr/ca43UiRorq8jVcZCEA60xouFddhKNpjRW4IzhGtUZZEtD+rWmEPo/LTu86Am jZZ4l0nVA8LVAJgrttmkzgjwrRBzEqQw0x0gye/s/VCkvHhIO21QPtdUi11ZNfKVBlsN 6oME/oBxGeUXdJXqvnnpy0ZRMT8Nie9AVYfyFtvrZWpKtZqTA3tEiupAFaiK+SNLDmQM SZOw== X-Gm-Message-State: AOAM530gIp7cijPQ5BzQ+s6KsSnJreHiqSm5TKwLhH4ZaHMGUUTUm/TF 6Xf0H6t7Vg21dZ3AnAVJePJXog== X-Received: by 2002:ac2:5976:: with SMTP id h22mr708794lfp.507.1603459181044; Fri, 23 Oct 2020 06:19:41 -0700 (PDT) Received: from eriador.lan ([188.162.64.195]) by smtp.gmail.com with ESMTPSA id o22sm161564ljg.122.2020.10.23.06.19.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Oct 2020 06:19:40 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Rob Herring , Jonathan Marek , Stephen Boyd , Michael Turquette , Liam Girdwood , Mark Brown Cc: linux-arm-msm@vger.kernel.org, Manivannan Sadhasivam , devicetree@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 4/5] arm64: dts: qcom: sm8250: add mmcx regulator Date: Fri, 23 Oct 2020 16:19:24 +0300 Message-Id: <20201023131925.334864-5-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201023131925.334864-1-dmitry.baryshkov@linaro.org> References: <20201023131925.334864-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add regulator controlling MMCX power domain to be used by display clock controller on SM8250. Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/sm8250.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.28.0 diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi index d057d85a19fb..c1d4a63cd2de 100644 --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi @@ -214,6 +214,13 @@ 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 = ; From patchwork Fri Oct 23 13:19:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 318933 Delivered-To: patch@linaro.org Received: by 2002:a92:d1d1:0:0:0:0:0 with SMTP id u17csp426089ilg; Fri, 23 Oct 2020 06:19:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJywdbd+g4RkDKHpbUiBjhVXxRG1XPuTW/OrsAx68WbRbyCVOH264vazP9wZ+7RoZFyDAojY X-Received: by 2002:a17:906:3e4b:: with SMTP id t11mr1845094eji.420.1603459190947; Fri, 23 Oct 2020 06:19:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603459190; cv=none; d=google.com; s=arc-20160816; b=zT7Z87HaE90JDYXMAP4ikrPN06kYU/V/zZfEnjhfRiFldJUj1DjI4ZFNXFpo6BuYGu 7VgOJr4HbE28kM2VU1VsVHOwlkSxkatL/lPoqwxVva7wn24BsnYHEPbwDcq8KDzVjzqr VGqMJvzlJGr1IPzxUhJuwkK3tcNmywEhl5PB4qQ1hbfWLBMow4vZ94GWwl192dnn9zrF +2PyFwe36aTABZuwLEJndHm1mokXnoomvOePo2X4sneEDoNThF3cJXrqWxv7WqpVLxMW LBggVJtqLQbeNrtVKIqU8XJgmxMu/B3q821GV0jjjr1z45YrCvIEZRCeLox3rQ8dTRpc fHyQ== 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=42/QJnTBpzJfK34Z8I/i86Pa85pWKg6cU4DTrB1R8G0=; b=yrIxSGNOvyTg9mdSvEqj0g+rcm1iF0zaM/PTjZ4wjLZEEBLWwkUuTvsRUVWlmKtPp7 LedhPkwPXgEn+rAoIbjmrrMEsSEZ4UY3cgtulUC51NKNsAul8QS+8gH78E5ZQyKWqn8a kIbXzmsB8BM8F1FeRfSpncW/F5CXV85OvUx64Syz6MaagLiODsXKv8UXcXAFl9UErJyV CEq/9VgFP8rxWPnr4av0QLlxhglByruPysPEk/CuKxm0CvI65Hi3XDo81h896DIjJH24 XlK6pc2jLqgpSoqylWk6w+XYdAgIFVbrRXfNUqADGrChAGIIgW56XbXhEBEZikhiiGPs 7C0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WsD3RCjB; 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 cy27si738892edb.52.2020.10.23.06.19.50; Fri, 23 Oct 2020 06:19:50 -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=WsD3RCjB; 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 S464503AbgJWNTt (ORCPT + 6 others); Fri, 23 Oct 2020 09:19:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S464494AbgJWNTp (ORCPT ); Fri, 23 Oct 2020 09:19:45 -0400 Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFFB6C0613D4 for ; Fri, 23 Oct 2020 06:19:44 -0700 (PDT) Received: by mail-lf1-x142.google.com with SMTP id v6so2021745lfa.13 for ; Fri, 23 Oct 2020 06:19:44 -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=42/QJnTBpzJfK34Z8I/i86Pa85pWKg6cU4DTrB1R8G0=; b=WsD3RCjBU2/gDCOB79XWImHCGbaDA9pH/0eqBfD4sCzHj+1JAxMaNdzaNP8k/KA9rn t2pmFfbqqRunMeULfNBVr1WkuRi0qMo8o7guSHaPx80XPDOzne1yKmW22FU9Z6GlKhta vBbALKwQWVLdAD/slIMWsiYhIjZrKChouZkNOrVzNh77QPW2pdNTnuSzpM5KZ/espzqa gOSKt4AMn5T4zEiNt2Qpx3IDwfuDLcb4iB80CEdrUO5vuNdqAJ3HQqVeXPGtXocFBLE/ M/KxpyXhyN3WRwtys/GmKWqmpsEXm8pQgYwHrPHZqpbxXqhuQeaneQo2oAjB6B3UzDii tH3Q== 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=42/QJnTBpzJfK34Z8I/i86Pa85pWKg6cU4DTrB1R8G0=; b=Sw5Zr1G9F3OydR5eOAd+I1J8ypIBkrucB7R6Ov4/c8grIbRvlWa0baL36aE59CWyyj 5SxPZKalUNdeqTbAo93PcndEzdLnzrBgZyRUrHcBAL52IfNMn5RDnme91KcCKMVfyW2x DVotr/Yp/XiKrlruORbTmPPPhm7XLsvmKrBDbn136Bx2an9qUWmck2qSkEPzH+flXzAu 4rDcyXSf6Pzt5Hvg3JqMKc76Eshc6cQNehnC0gluSpeHPzhBShyiGELy5K4t0AA6kyPC +Jg7wOPrEF4AQ39NNinglVZjy29KPoOPmExBWnADa2IC++n+SH5zSfNxiLobAAp7AHLb sC6w== X-Gm-Message-State: AOAM532Kh7QXRJrUwPGeX5miLHu20gfhv7xhJ1huv8i8rwSZPUbQqELm 4IgXVlHlhpDRTO2F6WEll34YNQ== X-Received: by 2002:a19:b14:: with SMTP id 20mr867172lfl.308.1603459183251; Fri, 23 Oct 2020 06:19:43 -0700 (PDT) Received: from eriador.lan ([188.162.64.195]) by smtp.gmail.com with ESMTPSA id o22sm161564ljg.122.2020.10.23.06.19.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Oct 2020 06:19:42 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Rob Herring , Jonathan Marek , Stephen Boyd , Michael Turquette , Liam Girdwood , Mark Brown Cc: linux-arm-msm@vger.kernel.org, Manivannan Sadhasivam , devicetree@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 5/5] clk: qcom: dispcc-sm8250: handle MMCX power domain Date: Fri, 23 Oct 2020 16:19:25 +0300 Message-Id: <20201023131925.334864-6-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201023131925.334864-1-dmitry.baryshkov@linaro.org> References: <20201023131925.334864-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On SM8250 MMCX power domain is required to access MMDS_GDSC registers. This power domain is expressed as mmcx-supply regulator property. Use this regulator as MDSS_GDSC supply. Signed-off-by: Dmitry Baryshkov --- drivers/clk/qcom/dispcc-sm8250.c | 1 + 1 file changed, 1 insertion(+) -- 2.28.0 diff --git a/drivers/clk/qcom/dispcc-sm8250.c b/drivers/clk/qcom/dispcc-sm8250.c index 07a98d3f882d..588575e1169d 100644 --- a/drivers/clk/qcom/dispcc-sm8250.c +++ b/drivers/clk/qcom/dispcc-sm8250.c @@ -963,6 +963,7 @@ static struct gdsc mdss_gdsc = { }, .pwrsts = PWRSTS_OFF_ON, .flags = HW_CTRL, + .supply = "mmcx", }; static struct clk_regmap *disp_cc_sm8250_clocks[] = {