From patchwork Thu Jun 29 20:35:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 114440 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp9905720vqr; Thu, 29 Jun 2023 13:53:01 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7288x4vueFhO1vzUnAsHjeqwQTM/bPd8yDebGHIfMvlBYbyWBtaWbp4v1bx+qta2CzrUkV X-Received: by 2002:a05:6871:85c6:b0:1b0:4e71:590 with SMTP id xt6-20020a05687185c600b001b04e710590mr926332oab.9.1688071980836; Thu, 29 Jun 2023 13:53:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688071980; cv=none; d=google.com; s=arc-20160816; b=kj9Kzf/SEWqapi0RDrKM9uGhy9kGOzUfSxVz5/5l0v1PYOgXtNVJ0azW376hKVNX3J 5Pvdb//FwSJBsoeTc/bSHJKyiBP4tTH6AUIRTN4IuR9t88BvbH81HMe2ake/qy5iZKFt wIrtlL0lMMkNtb6MEofEJjESKdTOKcz0pnhBAKnJ6Xi1hmgQo9JDkKvJGbLt4JWb+SIj AUZHKL1hrtRRDdWfF81Irms+nn43UNUvXKcjeTd/ztHlrW7lKsabClGkILWYzjCCpBFa GYoEUVEbStiWoORc8ZdcfoUKN9gEzcTaB5QvaaLpQi5+s1s+XwmWSyH9HgnnfLgkh5zL TBXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=PXHn6Y9ohB66Fq7/rdy4/Qmz5PjvLS1WDR/plz/VYq8=; fh=sA1D0MxvGvJ8XlKz0SCxjda2eeO11z/vR4gfSh63OoY=; b=NwrdX5/FdWEqQo9MdetoCADW4YliaOBVWrCOLL2WDZL3IDuzjphN4AsPWrWlWF4kPL vl48fTO3wbrP4+kXNMhS3OxEsffK6wH9cXxL4CHFkTrqAOi5zBlaC7YeqYt54iQG5xOb 9f1kdYzJENWaDCaQKpcBu0OGQgUnoB8YRG8SWPb9tpETvjlxlRafbkEGbjK22fPsC/CP QZB1Pf1Sl2vdT91cr7/WifqCKAD+xYkrsxwcjLFlnfXkC4hsgGgEckeJ8MmQuh3otPeC 3fclrrMbRc4eTwdLhAerYN02rVQeIUE4MA5kdpWfFaKeL6QZctNqVhSHPm+j7Jeml9b9 p1pQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="TE/g4WJA"; 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=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pw11-20020a17090b278b00b0024b9e5aa258si5845390pjb.0.2023.06.29.13.52.48; Thu, 29 Jun 2023 13:53:00 -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=@linaro.org header.s=google header.b="TE/g4WJA"; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229873AbjF2Uf5 (ORCPT + 99 others); Thu, 29 Jun 2023 16:35:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230104AbjF2Ufx (ORCPT ); Thu, 29 Jun 2023 16:35:53 -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 963DD30EC for ; Thu, 29 Jun 2023 13:35:51 -0700 (PDT) Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2b6985de215so18601081fa.2 for ; Thu, 29 Jun 2023 13:35:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688070949; x=1690662949; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=PXHn6Y9ohB66Fq7/rdy4/Qmz5PjvLS1WDR/plz/VYq8=; b=TE/g4WJAzyHfArQXO/l9lmbm0FJZUGuiMXs+69BkFhJvABj1bj8B5IQlnKKwwZKV3e SuArpH+cehs42DKf1L2fhNyV08peyqG4nr7ValchciuTjTQxCKiEiE9Y1yWx81GcZoCO TdeAQ1+ryuBMKk8UkrrYtw07in93r0Fjs6dviP42jCNO6sR23gNM3GvaXuEbeTGRuu+A /E3XfBy1NQJO25jfSLOdACUyzWp1r+3q61RXRzhWGeAT8mIMeNfmMwzHJ5ngnFtVqBEv 1pyDDZRhWC1gP/+Y25vyfu4QX31rJN2O7vjICVFhQhR+LJVRwBXB2GZhO436Tn7EDfv/ FVjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688070949; x=1690662949; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PXHn6Y9ohB66Fq7/rdy4/Qmz5PjvLS1WDR/plz/VYq8=; b=IY56L83atQRCWb8+AwMb1drTrzIGsiPeJPIt9vZnDYCCNkmKsytSZczQbq744LgrK0 rYOxEppYC/nwJ/txq6SesBRxxCT4HaB/o9JRt26vCgyLSW6eZYUtSyKKjjsMazysWWdp GwGHAqeEajrwA+FDmWW2PqKWxsw2Fo/pP9FoGC94UNAfvp/He5ZiLXxwkJmz/t8EHwAU 59/7PuFvAhCH8ubqAoqEwnCfxElcDWyRajokHtT30hbszhkbYEtZwhvfj6PjKkGMKaqm SyxcAHk9ny15nz6UE2YaPYlkVpaWSn3ZDos1mql3QKDhUXjU/VP+MNnjcwhPtST5oh9e lKzw== X-Gm-Message-State: ABy/qLZb+thXPxcSu1NVHkPjRrpjz9qAxkGuyf1pSs9ABMA3jp4JcIZB jVsAlaE1Y/9fb8TT5GEM/LjUFA== X-Received: by 2002:a2e:b60f:0:b0:2b6:cd12:24f7 with SMTP id r15-20020a2eb60f000000b002b6cd1224f7mr535567ljn.44.1688070949717; Thu, 29 Jun 2023 13:35:49 -0700 (PDT) Received: from [192.168.1.101] (abyk82.neoplus.adsl.tpnet.pl. [83.9.30.82]) by smtp.gmail.com with ESMTPSA id k3-20020a2e2403000000b002b6b849c894sm1136008ljk.111.2023.06.29.13.35.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jun 2023 13:35:49 -0700 (PDT) From: Konrad Dybcio Date: Thu, 29 Jun 2023 22:35:41 +0200 Subject: [PATCH v2 1/4] dt-bindings: regulator: Describe Qualcomm REFGEN regulator MIME-Version: 1.0 Message-Id: <20230628-topic-refgen-v2-1-6136487c78c5@linaro.org> References: <20230628-topic-refgen-v2-0-6136487c78c5@linaro.org> In-Reply-To: <20230628-topic-refgen-v2-0-6136487c78c5@linaro.org> To: Andy Gross , Bjorn Andersson , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , David Airlie , Daniel Vetter , Krishna Manikandan Cc: Marijn Suijten , Konrad Dybcio , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1688070946; l=2256; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=Dw17w0X3yguWSuWVzgIdOAGrOkzUUOLcbRD0QrQwKtw=; b=h9RLdfs6fCutcVVX8MqQ32l9TWdlE5G4S2/xc+l4+TR1xjoXppM6fF/S6Vpm4DnzAmBgWGCjT vK0WMm5WYxlAy2sFeLLaMPMaV+jsNOWD9qCXyS5jkr4+nf/4g7bCnER X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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?1770071765606301297?= X-GMAIL-MSGID: =?utf-8?q?1770071765606301297?= Modern Qualcomm SoCs have a REFGEN (reference voltage generator) regulator, providing reference voltage to on-chip IP, like PHYs. It's controlled through MMIO and we can toggle it or read its state back. Describe it. Signed-off-by: Konrad Dybcio Reviewed-by: Rob Herring --- .../regulator/qcom,sdm845-refgen-regulator.yaml | 57 ++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/Documentation/devicetree/bindings/regulator/qcom,sdm845-refgen-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,sdm845-refgen-regulator.yaml new file mode 100644 index 000000000000..f02f97d4fdd2 --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/qcom,sdm845-refgen-regulator.yaml @@ -0,0 +1,57 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/qcom,sdm845-refgen-regulator.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Technologies, Inc. REFGEN Regulator + +maintainers: + - Konrad Dybcio + +description: + The REFGEN (reference voltage generator) regulator provides reference + voltage for on-chip IPs (like PHYs) on some Qualcomm SoCs. + +allOf: + - $ref: regulator.yaml# + +properties: + compatible: + oneOf: + - items: + - enum: + - qcom,sc7180-refgen-regulator + - qcom,sc8180x-refgen-regulator + - qcom,sm8150-refgen-regulator + - const: qcom,sdm845-refgen-regulator + + - items: + - enum: + - qcom,sc7280-refgen-regulator + - qcom,sc8280xp-refgen-regulator + - qcom,sm6350-refgen-regulator + - qcom,sm6375-refgen-regulator + - qcom,sm8350-refgen-regulator + - const: qcom,sm8250-refgen-regulator + + - enum: + - qcom,sdm845-refgen-regulator + - qcom,sm8250-refgen-regulator + + reg: + maxItems: 1 + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - | + regulator@162f000 { + compatible = "qcom,sm8250-refgen-regulator"; + reg = <0x0162f000 0x84>; + }; +... From patchwork Thu Jun 29 20:35:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 114445 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp9912381vqr; Thu, 29 Jun 2023 14:05:49 -0700 (PDT) X-Google-Smtp-Source: APBJJlHn9iFsrWQupRvrlQrSx1EPlsccViHiQzA+R0tqFyX/U75mH5lUC5b4WSpD6Rd5w+F0RgQm X-Received: by 2002:a17:902:c94f:b0:1ac:84dd:6d1f with SMTP id i15-20020a170902c94f00b001ac84dd6d1fmr369938pla.1.1688072749605; Thu, 29 Jun 2023 14:05:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688072749; cv=none; d=google.com; s=arc-20160816; b=PHvHOQx8vNkHHqyEA0zG+iagae+Q+tSbDO5ltqA9U467FCigsBdt9gzskWZ3+h11qW WqSzIvyTTcqDTt+xmZzbwpNPrPFeZl/muOvO6EwnkPfNhMY/RPXgSplHoHEORApVhtsp OfZnF+P6WnSZzZZKs7S8rIwT1GWYSh92+KQwJfvboFYVZvmHXcSm+b+XjWY1DhUtKHMT 61NPOdGLhAcfiJCU1ROQj9BoKw3Nc4+Lv+UkFAZ2wCYDT8nNbBT70j7kobY0asjIQvnV r8iWQ74HdNlD1fH4O6X0m1iY//hI8GDxTVGPJf4ws1rC+veUj2olM/v9673jtw/n3SmS rsEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=78qKnLJsNPm4roROV2WGW5c+8kMl5RLkTh9XlFlH21k=; fh=qvdqMbXAE/qcPdFiL/QUg6KLKapmCEtGXJzQKn2xN9U=; b=el6WTK6TE0MDYWjOG1XXFjEThnepQqBHMcpPPPtbtx/GaZXPIKMow6xououPN8wVPX utRVtsvTBNbwalz6Lz9O56IkRljMJnWogvhZ7Om+/3l0pR1h0TGkstph5OX7vvRrakPQ GBsYS2hVKmuTOaRdysFTkB9bHumUHsUGceJQZARSZF5cG2C4V5PP0IeTxjmdFu7eobsA ZsmeEJPJgPIPkUyoPN1786p8DdrU5GZJ4SfiiwyeDjKZ5AWZep7zbR//G/LeKemSG92m 4SXj/2OHDvNCXKMnpXGl8WlA4n1zMyzWfdRQCcoz/VCEtwuZiHA4mUaxMIQj7AgJo/UV riCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JXSKL36Q; 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=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k9-20020a170902760900b001b25e9a76d7si10255335pll.316.2023.06.29.14.05.36; Thu, 29 Jun 2023 14:05: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=@linaro.org header.s=google header.b=JXSKL36Q; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231691AbjF2UgB (ORCPT + 99 others); Thu, 29 Jun 2023 16:36:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230079AbjF2Ufy (ORCPT ); Thu, 29 Jun 2023 16:35:54 -0400 Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DCBA30C4 for ; Thu, 29 Jun 2023 13:35:53 -0700 (PDT) Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-2b6985de215so18601541fa.2 for ; Thu, 29 Jun 2023 13:35:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688070951; x=1690662951; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=78qKnLJsNPm4roROV2WGW5c+8kMl5RLkTh9XlFlH21k=; b=JXSKL36QI/i4HBF+i46JoZgRfI6BsQeag+0MxuQJ7IIqIOtcWKatyxQ4Jj03Bh6JDj CFDq0PbbadZJ6VTfwShXyPKuV/mOtR+P61gCj2Y3dmxlpq/T0ZtS9dZ+tu4kliUuIMNY VEdBKGZOGTN8FjyLpIzOWNRuSf+eUgZtpw4CXf00DaiOX8Ch758ReQ2IqfunN0LP1apz Vi8tuy5dTiyAnZTXPMCwtDLGMDws+Zk79RQAVCjmxQHWdlj7A9hsD6sifKYPo0ia6tiq qD6ENKAYCuCc8bgQtCuFD7mEoa0jZn5xbciCyQx2okYJUqtvMzkkWCnofg4JilZvaS/q 30fA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688070951; x=1690662951; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=78qKnLJsNPm4roROV2WGW5c+8kMl5RLkTh9XlFlH21k=; b=ChKoAeBxXQtpkt+jjfAw7bK1EYI+h9SOHqXQa2yKP55GtwuvhgxRdB469yAXUn6Zky U4MIjpW/xEacr2IZNczdc+0e1lXe0BTpHp73H4U05KpYUPYKnzCSadwy1X0z/i6ipG5G Z7KfmLn0s/fnULNjRU4ILEW6uWGxluR1nE8hKMhukhbXicask+mZC/d6wzJ5TQaXc1sL +TZ3Zz3cdDTiEKFLXGDTeNTEW1NWBC7eU5rZyrKAqXdiIdEEBig5yuUsEfik44ndnxur Dwof3WJ8x2i/muwEj3LFL1khURwwr+KUBv1L34YKu7R2dQL2PBIIl6ARM2lBFkroB/GP TsNw== X-Gm-Message-State: ABy/qLal6yGub9xnPZ4aHh5wTZ8EDKuX7YqTFiad52emOShFe0bmcm6e wqtwfidY7DxV08JzWROZyR39PA== X-Received: by 2002:a2e:8215:0:b0:2b6:cf64:7a8e with SMTP id w21-20020a2e8215000000b002b6cf647a8emr290113ljg.19.1688070951582; Thu, 29 Jun 2023 13:35:51 -0700 (PDT) Received: from [192.168.1.101] (abyk82.neoplus.adsl.tpnet.pl. [83.9.30.82]) by smtp.gmail.com with ESMTPSA id k3-20020a2e2403000000b002b6b849c894sm1136008ljk.111.2023.06.29.13.35.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jun 2023 13:35:51 -0700 (PDT) From: Konrad Dybcio Date: Thu, 29 Jun 2023 22:35:42 +0200 Subject: [PATCH v2 2/4] regulator: Introduce Qualcomm REFGEN regulator driver MIME-Version: 1.0 Message-Id: <20230628-topic-refgen-v2-2-6136487c78c5@linaro.org> References: <20230628-topic-refgen-v2-0-6136487c78c5@linaro.org> In-Reply-To: <20230628-topic-refgen-v2-0-6136487c78c5@linaro.org> To: Andy Gross , Bjorn Andersson , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , David Airlie , Daniel Vetter , Krishna Manikandan Cc: Marijn Suijten , Konrad Dybcio , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1688070946; l=6725; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=9J+G1r4h/EMnhrwYXmB1C+J6Eslvg/Etw+wK9dwKeMQ=; b=luzseCDHJnUJW71XyhNDp+tGF6TUrtrtFpoYlc1+41Xmjwzz5MqqByqSYOl3JomQKIzXtbwdX zx2dIqR9O67A+s8fIQJRINb+zToRC5+wE+DXPPHQkcNqlXA+MOAP900 X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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?1770072571879760665?= X-GMAIL-MSGID: =?utf-8?q?1770072571879760665?= Modern Qualcomm SoCs have a REFGEN (reference voltage generator) regulator, providing reference voltage to on-chip IP, like PHYs. Add a driver to support toggling that regulator. Signed-off-by: Konrad Dybcio --- drivers/regulator/Kconfig | 10 ++ drivers/regulator/Makefile | 1 + drivers/regulator/qcom-refgen-regulator.c | 154 ++++++++++++++++++++++++++++++ 3 files changed, 165 insertions(+) diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig index 2c2405024ace..ea5549d62825 100644 --- a/drivers/regulator/Kconfig +++ b/drivers/regulator/Kconfig @@ -978,6 +978,16 @@ config REGULATOR_PWM This driver supports PWM controlled voltage regulators. PWM duty cycle can increase or decrease the voltage. +config REGULATOR_QCOM_REFGEN + tristate "Qualcomm REFGEN regulator driver" + depends on REGMAP + help + This driver supports the MMIO-mapped reference voltage regulator, + used internally by some PHYs on many Qualcomm SoCs. + + Say M here if you want to include support for this regulator as + a module. The module will be named "qcom-refgen-regulator". + config REGULATOR_QCOM_RPM tristate "Qualcomm RPM regulator driver" depends on MFD_QCOM_RPM diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile index ebfa75379c20..a044ad20e202 100644 --- a/drivers/regulator/Makefile +++ b/drivers/regulator/Makefile @@ -107,6 +107,7 @@ obj-$(CONFIG_REGULATOR_MT6380) += mt6380-regulator.o obj-$(CONFIG_REGULATOR_MT6397) += mt6397-regulator.o obj-$(CONFIG_REGULATOR_MTK_DVFSRC) += mtk-dvfsrc-regulator.o obj-$(CONFIG_REGULATOR_QCOM_LABIBB) += qcom-labibb-regulator.o +obj-$(CONFIG_REGULATOR_QCOM_REFGEN) += qcom-refgen-regulator.o obj-$(CONFIG_REGULATOR_QCOM_RPM) += qcom_rpm-regulator.o obj-$(CONFIG_REGULATOR_QCOM_RPMH) += qcom-rpmh-regulator.o obj-$(CONFIG_REGULATOR_QCOM_SMD_RPM) += qcom_smd-regulator.o diff --git a/drivers/regulator/qcom-refgen-regulator.c b/drivers/regulator/qcom-refgen-regulator.c new file mode 100644 index 000000000000..4c442fa3f552 --- /dev/null +++ b/drivers/regulator/qcom-refgen-regulator.c @@ -0,0 +1,154 @@ +// SPDX-License-Identifier: GPL-2.0-only +// Copyright (c) 2017, 2019-2020, The Linux Foundation. All rights reserved. +// Copyright (c) 2023, Linaro Limited + +#include +#include +#include +#include +#include +#include +#include +#include + +#define REFGEN_REG_BIAS_EN 0x08 +#define REFGEN_BIAS_EN_MASK GENMASK(2, 0) + #define REFGEN_BIAS_EN_ENABLE 0x7 + #define REFGEN_BIAS_EN_DISABLE 0x6 + +#define REFGEN_REG_BG_CTRL 0x14 +#define REFGEN_BG_CTRL_MASK GENMASK(2, 1) + #define REFGEN_BG_CTRL_ENABLE 0x3 + #define REFGEN_BG_CTRL_DISABLE 0x2 + +#define REFGEN_REG_PWRDWN_CTRL5 0x80 +#define REFGEN_PWRDWN_CTRL5_MASK BIT(0) + #define REFGEN_PWRDWN_CTRL5_ENABLE 0x1 + +static int qcom_sdm845_refgen_enable(struct regulator_dev *rdev) +{ + regmap_update_bits(rdev->regmap, REFGEN_REG_BG_CTRL, REFGEN_BG_CTRL_MASK, + FIELD_PREP(REFGEN_BG_CTRL_MASK, REFGEN_BG_CTRL_ENABLE)); + + regmap_write(rdev->regmap, REFGEN_REG_BIAS_EN, + FIELD_PREP(REFGEN_BIAS_EN_MASK, REFGEN_BIAS_EN_ENABLE)); + + return 0; +} + +static int qcom_sdm845_refgen_disable(struct regulator_dev *rdev) +{ + regmap_write(rdev->regmap, REFGEN_REG_BIAS_EN, + FIELD_PREP(REFGEN_BIAS_EN_MASK, REFGEN_BIAS_EN_DISABLE)); + + regmap_update_bits(rdev->regmap, REFGEN_REG_BG_CTRL, REFGEN_BG_CTRL_MASK, + FIELD_PREP(REFGEN_BG_CTRL_MASK, REFGEN_BG_CTRL_DISABLE)); + + return 0; +} + +static int qcom_sdm845_refgen_is_enabled(struct regulator_dev *rdev) +{ + u32 val; + + regmap_read(rdev->regmap, REFGEN_REG_BG_CTRL, &val); + if (FIELD_GET(REFGEN_BG_CTRL_MASK, val) != REFGEN_BG_CTRL_ENABLE) + return 0; + + regmap_read(rdev->regmap, REFGEN_REG_BIAS_EN, &val); + if (FIELD_GET(REFGEN_BIAS_EN_MASK, val) != REFGEN_BIAS_EN_ENABLE) + return 0; + + return 1; +} + +static struct regulator_desc sdm845_refgen_desc = { + .enable_time = 5, + .name = "refgen", + .owner = THIS_MODULE, + .type = REGULATOR_VOLTAGE, + .ops = &(struct regulator_ops) { + .enable = qcom_sdm845_refgen_enable, + .disable = qcom_sdm845_refgen_disable, + .is_enabled = qcom_sdm845_refgen_is_enabled, + }, +}; + +static struct regulator_desc sm8250_refgen_desc = { + .enable_reg = REFGEN_REG_PWRDWN_CTRL5, + .enable_mask = REFGEN_PWRDWN_CTRL5_MASK, + .enable_val = REFGEN_PWRDWN_CTRL5_ENABLE, + .disable_val = 0, + .enable_time = 5, + .name = "refgen", + .owner = THIS_MODULE, + .type = REGULATOR_VOLTAGE, + .ops = &(struct regulator_ops) { + .enable = regulator_enable_regmap, + .disable = regulator_disable_regmap, + .is_enabled = regulator_is_enabled_regmap, + }, +}; + +static const struct regmap_config qcom_refgen_regmap_config = { + .reg_bits = 32, + .reg_stride = 4, + .val_bits = 32, + .fast_io = true, +}; + +static int qcom_refgen_probe(struct platform_device *pdev) +{ + struct regulator_init_data *init_data; + struct regulator_config config = {}; + const struct regulator_desc *rdesc; + struct device *dev = &pdev->dev; + struct regulator_dev *rdev; + struct regmap *regmap; + void __iomem *base; + + rdesc = of_device_get_match_data(dev); + if (!rdesc) + return -ENODATA; + + base = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(base)) + return PTR_ERR(base); + + regmap = devm_regmap_init_mmio(dev, base, &qcom_refgen_regmap_config); + if (IS_ERR(regmap)) + return PTR_ERR(regmap); + + init_data = of_get_regulator_init_data(dev, dev->of_node, rdesc); + if (!init_data) + return -ENOMEM; + + config.dev = dev; + config.init_data = init_data; + config.of_node = dev->of_node; + config.regmap = regmap; + + rdev = devm_regulator_register(dev, rdesc, &config); + if (IS_ERR(rdev)) + return PTR_ERR(rdev); + + return 0; +} + +static const struct of_device_id qcom_refgen_match_table[] = { + { .compatible = "qcom,sdm845-refgen-regulator", .data = &sdm845_refgen_desc }, + { .compatible = "qcom,sm8250-refgen-regulator", .data = &sm8250_refgen_desc }, + { } +}; + +static struct platform_driver qcom_refgen_driver = { + .probe = qcom_refgen_probe, + .driver = { + .name = "qcom-refgen-regulator", + .of_match_table = qcom_refgen_match_table, + }, +}; +module_platform_driver(qcom_refgen_driver); + +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("Qualcomm REFGEN regulator driver"); From patchwork Thu Jun 29 20:35:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 114436 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp9905264vqr; Thu, 29 Jun 2023 13:52:03 -0700 (PDT) X-Google-Smtp-Source: APBJJlHxDoUe28VcAcRyfOKVbFMrt+GQqKIhlcVit1HgadVrUwZD5awtARyzBVQZB57xHpaapeU2 X-Received: by 2002:a17:903:11c7:b0:1b0:2658:daf7 with SMTP id q7-20020a17090311c700b001b02658daf7mr325632plh.36.1688071923400; Thu, 29 Jun 2023 13:52:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688071923; cv=none; d=google.com; s=arc-20160816; b=Xt5JZQcxd4A9dz1mxBJhHlI1UGapl7l+YSb5sGjVOlq0Q9/iYq4YzH6cVdVdfGWSpz oUvcoUiEbLab3XfYwhcBPUtXn4LUSj3CuQJdoPGnRROcD2h3UZa3Hf3inuJlxJ1UgrVa 17nSBYl/AQJOB0KQcfaA6QH6ih3Xr2uDz9nqsUzyVyXfgae41WrX1jw09Tg4cmsbg7uH L8IWawkw65DEOeJR0uKEr/RRUzsNNfbzZLDOb6qFl4dBEe2N5Ixb93vfKIjXsqXxMzHL 2BHHYBoutk+HDqg9tQgUQyxc+qSaowNWmjjSNoKWQiG6rUKuNa5ymvYlGzlC3VXO4uqX Vsww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=rfbq0gETnI1sgMFmbHrdDFl/8/rFlwdeWeNPy1LZMAk=; fh=xqhvKFBEPfFJW68pxDib7dkLFOwl12mV3dmpZF+xzUU=; b=JPeqCxOzjFogukOwur4PqRdrrNcNenLuKetIAgB1G4apaER0sqkN9xmxq67Yw5EYAJ shjsAhw0t+t/4k+dolHKhN/GY8vsD7PvYrfjvjlc6NjQUcwHr7ggh/zc5QGmgU94bgkj HsF93UC39+L5PD9mMZgYIFgmQhjx4Xsq+1pTHCLKbuMMzqDQftTzRDkse0p3ygnEYi/h Y9giqphbYtoBFOhCYiPiRh50maN/INHHfmEK6gntU0JHGT3pK9PWdIYmMI1U25cvsGn6 NNNrPpRHiZYv6utTd+RocqaMp2Q1Idp9J057vvO+Q/37Aq4DsY6EghWTry/a/JvSq3zi mqEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=a7dYpfNx; 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=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n4-20020a170903110400b001b046acc853si11752033plh.589.2023.06.29.13.51.50; Thu, 29 Jun 2023 13:52:03 -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=@linaro.org header.s=google header.b=a7dYpfNx; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231886AbjF2UgF (ORCPT + 99 others); Thu, 29 Jun 2023 16:36:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231631AbjF2Uf4 (ORCPT ); Thu, 29 Jun 2023 16:35:56 -0400 Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E25330E6 for ; Thu, 29 Jun 2023 13:35:55 -0700 (PDT) Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-2b6adef5c22so16857341fa.3 for ; Thu, 29 Jun 2023 13:35:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688070953; x=1690662953; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=rfbq0gETnI1sgMFmbHrdDFl/8/rFlwdeWeNPy1LZMAk=; b=a7dYpfNxH+XUVa4XGpS3GsvyrwIEBIW55hdtr/VmWRbkn+FIC/0VhaVwWwHGFaVgwN a5Nqi4M7RBPSaqHz+/fT0wUmknkqY4jOLB/WHoAwJTYCf2jAVVvtD/V1D/hsHGEbqanl GruiEE4GttHXAAqW8DQ802405xABkYeI0zARbpwO9ghKMV5jML4Mp4q8WODFFx5c6FZW czzG2M03Ywpg5veqZ4PWZNzrfKuZVdEdkG7YHwa/8EFO8Q8d8dmPVX1X5wb4wCVkWAb5 EGKnH9lK6HdRs+MhNXAI/ln7IGUJ9XOWtIfZMvZBMWeujfLn6qpeVvWPUdBaeJq5NIqq WwPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688070953; x=1690662953; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rfbq0gETnI1sgMFmbHrdDFl/8/rFlwdeWeNPy1LZMAk=; b=L+/Tvl6r43LvdxTRQQNATiERwQoPqpGmBIms0ZukZmhEc08txNTwrh3c/XhThFg0Ro b+EpbQ3oXV+fj6QTC99cBh7iFSxBIaIdSntTMmKukFsZgNf7UiCrNZM8xIhLeUhaEYFj 1Lm/lBHHAXJ6gImSTaQ6Epc+Q2z5e2VBUcABCvN2SLKZpPaJfik3xFCQQIW15sbM6ko5 SG0U5h7dg/KB3ITudIj3zKSWgcIfppleQce3u3/me9BCmeipsENXI7Ji2ZRPoFcL91pJ pF+4s4qj//PQOSQ4hhKXI3MCG9nXj2PBuFLqK+9udc3aKWJbXodXD1eNNWh6MHNWPMtf UZlw== X-Gm-Message-State: ABy/qLZa8iHUa36CSskOBWCwusANxCC+PAIAY2QBzsU4gBuU14gcypBL k+nJ79P/Vmnhg+2KP/GRyWro8w== X-Received: by 2002:a2e:91c5:0:b0:2b5:85a9:7e9b with SMTP id u5-20020a2e91c5000000b002b585a97e9bmr726666ljg.33.1688070953445; Thu, 29 Jun 2023 13:35:53 -0700 (PDT) Received: from [192.168.1.101] (abyk82.neoplus.adsl.tpnet.pl. [83.9.30.82]) by smtp.gmail.com with ESMTPSA id k3-20020a2e2403000000b002b6b849c894sm1136008ljk.111.2023.06.29.13.35.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jun 2023 13:35:53 -0700 (PDT) From: Konrad Dybcio Date: Thu, 29 Jun 2023 22:35:43 +0200 Subject: [PATCH v2 3/4] dt-bindings: display/msm: dsi-controller-main: Allow refgen-supply MIME-Version: 1.0 Message-Id: <20230628-topic-refgen-v2-3-6136487c78c5@linaro.org> References: <20230628-topic-refgen-v2-0-6136487c78c5@linaro.org> In-Reply-To: <20230628-topic-refgen-v2-0-6136487c78c5@linaro.org> To: Andy Gross , Bjorn Andersson , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , David Airlie , Daniel Vetter , Krishna Manikandan Cc: Marijn Suijten , Konrad Dybcio , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, Konrad Dybcio , Rob Herring X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1688070946; l=960; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=UEARP/nzfff11sHWpuDiJ7VAKYi5TYY87h31tjxPZWc=; b=Zh4ieYGR01IajQXIpIis5nYeiG9d7gZkzbUVO4D1/MFHUp3xc+Lx9LuDvOacrEd4x58ruCcwR gYJutyIQEjFC3I7az0ZY2z0YRr22ByWu35pqVDreVgChHohR4DfbjAY X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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?1770071705251077543?= X-GMAIL-MSGID: =?utf-8?q?1770071705251077543?= DSI host needs REFGEN to be enabled (if it's present on a given platform). Allow consuming it. Acked-by: Rob Herring Signed-off-by: Konrad Dybcio --- .../devicetree/bindings/display/msm/dsi-controller-main.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml index 01848bdd5873..76270992305a 100644 --- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml +++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml @@ -166,6 +166,10 @@ properties: description: Phandle to vdd regulator device node + refgen-supply: + description: + Phandle to REFGEN regulator device node + vcca-supply: description: Phandle to vdd regulator device node From patchwork Thu Jun 29 20:35:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 114437 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp9905528vqr; Thu, 29 Jun 2023 13:52:39 -0700 (PDT) X-Google-Smtp-Source: APBJJlE8A7mQ8pHm9BxZhrMJXchUBL7WipO4TBiiJ6O12rUEL6DVbZH3mlXI8hFjD/57ua6du5Hy X-Received: by 2002:a92:c52e:0:b0:345:79eb:e009 with SMTP id m14-20020a92c52e000000b0034579ebe009mr352363ili.23.1688071959549; Thu, 29 Jun 2023 13:52:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688071959; cv=none; d=google.com; s=arc-20160816; b=noZvMvWTuRTAd5Tpb2AbyDaxoBYfuaz5+NTOkBY3T3k3m48dI74xRA/M2ZGf65MLpl b2niNgXZ5XDjXqOy7WOjcR+L2s+PC+HK5BjCenLBQvGmPeeLXN/96coiAnjFJjagXrkh tc/fG0Vgib2fqzvrQfvRIdPHudfACWcKL2dGooOgJIAEU4LH/sgo+4qsOnlDx9gTbyv8 PAenPpgv3LO4XcFquRtYGHTznqmuc+VIQbL7AVLcSYLiQrcnfPqCtCqeIELn4iWSbIH9 CtzdylHRIx2KUbaEynx/xgzlTCjKh9mGweFgYyIs6TiAHiQ4IKhiGYrM1RSOgkc5p/Ot W3JA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=SEhHQ8qdRfQQVMmnLHDVdeTjikaeU7SDTha8pASydDI=; fh=qvdqMbXAE/qcPdFiL/QUg6KLKapmCEtGXJzQKn2xN9U=; b=OuzkA48ptgpMxqWBH3q6aCKupiL8BndyO1uGOZBgH+HHDCSY5e2WOYT6HakovJtY7G inMcEeXr2wmKXCcFOCz544PiC1g7o6FcD54Kany/63qI6XKJgyfF6Ss7xiGbjKLLtBNb fiDTsmAp7JAYNZPpbIj+OwuPVAXzXwwTvNezXVl4lNUIcOnKL+xxxe9Cgsc504cPHLdt z2t2aFOVTuqHoS4pa+u8sdfbgfLO82Dg14AoyOoR2RBL/jurby8CgO5zFv24zl0FBXn/ iXEhctoRnXMr59RAVOuoPO13NPQl3vL478bRIjSzLMj1X11V8SUie165wx51C2gZ91FN 4AJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=m3hhlMn6; 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=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b7-20020a656687000000b005486b0ebbafsi11845859pgw.626.2023.06.29.13.52.22; Thu, 29 Jun 2023 13:52:39 -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=@linaro.org header.s=google header.b=m3hhlMn6; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232192AbjF2UgJ (ORCPT + 99 others); Thu, 29 Jun 2023 16:36:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230436AbjF2Uf7 (ORCPT ); Thu, 29 Jun 2023 16:35:59 -0400 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A4DC30F0 for ; Thu, 29 Jun 2023 13:35:57 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2b6a16254a4so17775561fa.0 for ; Thu, 29 Jun 2023 13:35:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688070955; x=1690662955; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=SEhHQ8qdRfQQVMmnLHDVdeTjikaeU7SDTha8pASydDI=; b=m3hhlMn60IL1waEjrx0D33Ti5jOy4qgbY1zwxUHKfKVTEGzhFuNiPbZ7tmI6qrrSH2 4aOJaC0opR5xQsPOukW/lvTykomgPtkcEXH4CMAed1wt1M7+Pp62YjYMm6zXnL2Heexa 8cD1jaM/oTvEiUApCdMpYAOlSO+7ylXRRG4xO1/b1ekgyomZP54dv7Ky/rwwocfSSN69 m6ZrSmUkP5fFNS0t9sf+/fOZozaxQ6UNxQWxbjnRXoMpEgs+V6ev4HEM6Fvly6zpfwwv HsOuAh6YnbqYakHg9hITq+Bya04sWPNalfeDX9TndlCdEOU7519XytxyIlR6GlcO2FIK 24rA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688070955; x=1690662955; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SEhHQ8qdRfQQVMmnLHDVdeTjikaeU7SDTha8pASydDI=; b=OG2eKzS/o6QDU+yC27kQP7NcZpjLi27EfBCsbhgkV5wmX5pmAjuJtCeXLnGBOmHuEK NnDSQJ8fzKtoFEOGwzoEBS9AxkCl5SN2yYP9/RqJuAWXJVXHdY8J2aaz2ZmCkpIe+Dn8 PtJGtfoabkaignn0WPXRWqRygO0q4xVJAXxgGK9x4+9x8Zg/wfzUYZKvn25l+fg7iNii zoWqs41j+4RkG/PjEWTHoH6OJ1RQnE3MC8529iW0uxkGX2emi4LCYaOT1xAbo4xCT3re Q+kxHNvrkNVvG9ewtuNrAYR1vYsS/ARZgenaSEmLfXQBWVaIwOHRteQ5CAS2DQzTTntx bqJQ== X-Gm-Message-State: ABy/qLarAbyqJB5IvgluHPdQ/wF4H0vYgGueu5kaDkfPA4uodhjjhCiY tW4g/rpAN6Aw2Mk1w7sKrPsfkQ== X-Received: by 2002:a2e:494a:0:b0:2b6:c9f9:9f8f with SMTP id b10-20020a2e494a000000b002b6c9f99f8fmr577770ljd.4.1688070955475; Thu, 29 Jun 2023 13:35:55 -0700 (PDT) Received: from [192.168.1.101] (abyk82.neoplus.adsl.tpnet.pl. [83.9.30.82]) by smtp.gmail.com with ESMTPSA id k3-20020a2e2403000000b002b6b849c894sm1136008ljk.111.2023.06.29.13.35.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jun 2023 13:35:55 -0700 (PDT) From: Konrad Dybcio Date: Thu, 29 Jun 2023 22:35:44 +0200 Subject: [PATCH v2 4/4] drm/msm/dsi: Hook up refgen regulator MIME-Version: 1.0 Message-Id: <20230628-topic-refgen-v2-4-6136487c78c5@linaro.org> References: <20230628-topic-refgen-v2-0-6136487c78c5@linaro.org> In-Reply-To: <20230628-topic-refgen-v2-0-6136487c78c5@linaro.org> To: Andy Gross , Bjorn Andersson , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , David Airlie , Daniel Vetter , Krishna Manikandan Cc: Marijn Suijten , Konrad Dybcio , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1688070946; l=1019; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=bdVFkIHME+ksW97iOZJH0yeZoPTsVUfCpblAjJVbJjI=; b=WWHSrbYLRRkudi8WmumNn/DjTCsjM+ZBe0IDArrKqLIbchE2qvRZwS1cjEwKIOOjoGwojapCH lf+swQw2gHODxIICQ93jYJ+yf4+oZOiY1Zo5FrbmyCxLXFFy07oqzBB X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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?1770071742957628516?= X-GMAIL-MSGID: =?utf-8?q?1770071742957628516?= Consume the refgen supply on configurations that may use it. Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/msm/dsi/dsi_cfg.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/msm/dsi/dsi_cfg.c b/drivers/gpu/drm/msm/dsi/dsi_cfg.c index 8a5fb6df7210..1f98ff74ceb0 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_cfg.c +++ b/drivers/gpu/drm/msm/dsi/dsi_cfg.c @@ -160,6 +160,7 @@ static const char * const dsi_v2_4_clk_names[] = { static const struct regulator_bulk_data dsi_v2_4_regulators[] = { { .supply = "vdda", .init_load_uA = 21800 }, /* 1.2 V */ + { .supply = "refgen" }, }; static const struct msm_dsi_config sdm845_dsi_cfg = { @@ -191,6 +192,7 @@ static const struct msm_dsi_config sm8550_dsi_cfg = { static const struct regulator_bulk_data sc7280_dsi_regulators[] = { { .supply = "vdda", .init_load_uA = 8350 }, /* 1.2 V */ + { .supply = "refgen" }, }; static const struct msm_dsi_config sc7280_dsi_cfg = {