From patchwork Mon Jul 3 18:15:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 115453 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp707870vqx; Mon, 3 Jul 2023 11:20:49 -0700 (PDT) X-Google-Smtp-Source: APBJJlFD3qfJj5kds39Kw3a6g2TrFPJxXo09VkVPkm/aYtszdg7TJ3cz/J33Vrkn7hxS/llwBD80 X-Received: by 2002:a17:902:ea0a:b0:1b8:35fa:cdcc with SMTP id s10-20020a170902ea0a00b001b835facdccmr11662148plg.5.1688408449205; Mon, 03 Jul 2023 11:20:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688408449; cv=none; d=google.com; s=arc-20160816; b=Mx+L52pZyuu0w3rZf1K0AfUyitg3OR8H7TDQUs08b416ZP+kfhrRe78DtmbwcQYk+D /gCyKHRe4GdOMfOf4c7BJr8ghyAJbe8+ivNVC5dFT8hrUqb5sruc5kyrNiGhyx/TdnNG JTBAX4om7vK5yJjkVQRIM/Sq/I0UCCIG93zrJLmivkgN/DKqG3Nd+2flACcgGwfHC9ug Q/ibuGAkVYJyAUPYy0ylLeWutHZ0rBSK5vov/82D/igLUzbxTpq/CWkO7YG+MqxafG7m Mj9zlyATaNecHMasos6ZHVROLSVIjOnUT/a/SK99SxPByi8oAZUS4uKg7XFEJ18fNEfw oPHA== 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=qvdqMbXAE/qcPdFiL/QUg6KLKapmCEtGXJzQKn2xN9U=; b=h7pxQ5EO2JmfMLQxj6TTm7Z/u4iw/gugq49biuN82Q8YBGPPgPHNk1CXX5ZVu8slZe 65ex8greJN3Kr9TZeeAcAi+pucs0D6dplJCy2WG3SOfYDQtkjIWAnFE5AWKc3lyFYiky yFSsHG+0hIUuUMmDzvoCnj50pAXZyd/hnDwrWjn7zHL0Q595lcY8a3pe8DYm7pWQx3w/ rG3Q5RjmTOyJUVdN2i4w5Snx+qSCcnPjzwRnVSl617KItmX142c2wkgV9ftTR2jcDEJY EtC5Y92GAxRvf3ef66KysWuwzauCQqFD9V37jAZWFJGfIzPY99pXj+NqZjEOpqIjzLlZ ttMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="d/qqapgc"; 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 p17-20020a170902ead100b001b04741042csi13755584pld.93.2023.07.03.11.20.34; Mon, 03 Jul 2023 11:20: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="d/qqapgc"; 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 S230494AbjGCSQG (ORCPT + 99 others); Mon, 3 Jul 2023 14:16:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230073AbjGCSQE (ORCPT ); Mon, 3 Jul 2023 14:16:04 -0400 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2578EDD for ; Mon, 3 Jul 2023 11:16:03 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-4fb7769f15aso7453232e87.0 for ; Mon, 03 Jul 2023 11:16:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688408161; x=1691000161; 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=d/qqapgcXdEiKfkb4swP1JWdo2/TxD6rqTvyzR5ljPkPl4nN0/wAYUdtmPa983+GRa J8jPnnVSij6wHzaxugl2bmiaIefpqJoTNtDHPux1FlmaFO72wpGbRk8oDTusgtqhwdG6 zJ19u2o6rMowAgQt6A8KTYB46HaHBrkqK7ibmSiF2MD3dkOT4jgkKlcAfdfR1Y5cvDWo isIaiantfFEDK8ibuzPzJ1N+6zPEdfthUolbPvjiVF3JBWYNphk8ATU7dYNSSLsPp6pZ yMXVpJiCEsnSGP0njkrKvDAVI8FB4waM1lG5zP5ZDPuSDs+l+x7+0TnMO2ENKA5MoaWi GKaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688408161; x=1691000161; 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=h/SKluXMU/I/EVFAlHj0DUJohyR0UKGSIRVnlCOUxSlZO2+bJ1UDgeQd8Z1CNA8Ci6 Ch6uG9cW6jqxSciGwvA1IXrWNSorJz+s5Br4zR5eynvv3zV2IpzEZUSVSagxswfWEtW/ lziM6sVKx7uDjD5faTqWycJTgVYoANOb+2ktPkOjE/PUXJfVR6LznjX5soADWnxcIBiq FZplLEBgds1m3li46pgeDMrmnJY/706UlRkKtl1HrALXnggqZdy7MhiJEPbS56Z1hVxj qO618ovR8gBpeUoE3/FpbiWcpLieNxwFMr5NGutoENG9+1N1Ud8gX53nz+CD59p5/VAN b+XQ== X-Gm-Message-State: ABy/qLbeJ3qJmQMAHTcAkcnOJW9TX+dYMpsGu/GZzVQPUHh1ztKIdGNT AIbxlfPLqCC1iFlYmvn2IOh30w== X-Received: by 2002:a19:2d45:0:b0:4fb:b11:c99d with SMTP id t5-20020a192d45000000b004fb0b11c99dmr6933824lft.57.1688408161007; Mon, 03 Jul 2023 11:16:01 -0700 (PDT) Received: from [192.168.1.101] (abyj26.neoplus.adsl.tpnet.pl. [83.9.29.26]) by smtp.gmail.com with ESMTPSA id a6-20020a056512390600b004f1383d57ecsm4633034lfu.202.2023.07.03.11.15.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jul 2023 11:16:00 -0700 (PDT) From: Konrad Dybcio Date: Mon, 03 Jul 2023 20:15:54 +0200 Subject: [PATCH v3 1/4] dt-bindings: regulator: Describe Qualcomm REFGEN regulator MIME-Version: 1.0 Message-Id: <20230628-topic-refgen-v3-1-9fbf0e605d23@linaro.org> References: <20230628-topic-refgen-v3-0-9fbf0e605d23@linaro.org> In-Reply-To: <20230628-topic-refgen-v3-0-9fbf0e605d23@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=1688408157; l=2256; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=Dw17w0X3yguWSuWVzgIdOAGrOkzUUOLcbRD0QrQwKtw=; b=IrxxxLa3w8rmQOS7sMn5V5HbFSk5R9ykL6JtPxJ819bCV6NnhQmyAH3pqbHYHtDjq1f2N+JDO C5CF8L8DzhUAIQoKCAdT9zJTQOevM+mIRm2Jch7pEq4yNq2V2nyoMMR 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?1770424577988781740?= X-GMAIL-MSGID: =?utf-8?q?1770424577988781740?= 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 Mon Jul 3 18:15:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 115461 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp714477vqx; Mon, 3 Jul 2023 11:33:28 -0700 (PDT) X-Google-Smtp-Source: APBJJlHcpbSPfvxWNSkCv5DLJgWwyvHIt26oJohcS9gGl7cGIJENA05fqUh2RHBPZ8Uav6JXc1F6 X-Received: by 2002:a92:c608:0:b0:345:a3d0:f0d4 with SMTP id p8-20020a92c608000000b00345a3d0f0d4mr10353535ilm.3.1688409208652; Mon, 03 Jul 2023 11:33:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688409208; cv=none; d=google.com; s=arc-20160816; b=NgY/R2JOpR6WPEu4qD6Gg4lU9Y1SHx/xu/SDK6SlNEewv/T6PV68q0sVPtuPDZUTAb 8Ftu7hs+2xVnlaHTi/fMuBGFjcsfx1KYB0AKtYOJW7ZtQ+Tr1br8F2VwJwBt5Z7iLN5N kx1KJ2FL+4pVPiSgu74OryEZRwzxun7izjVVbicmqcArSTeRi5cWkGTDzTfVKjk3BmjU H6M7NG0xYEJiQBc6vK22/2Cfakm0s09+/KdUhwbw/CNY6pBxPbUOlJGcikQ55ue210cm S3JmJOq9RS+8UVMxF6P/rBGFFRjrkyNECuHBBTC16RmCpDg26Mo6vYtnTqSy1VDjLxGD QCZQ== 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=yppVVJZsVALQlxVkrk6bRQIocnUZEUf5eYssW3dPax0=; fh=qvdqMbXAE/qcPdFiL/QUg6KLKapmCEtGXJzQKn2xN9U=; b=c+PSd4XajEblNGwSnOi/+ejVEnTeBySppBrJw2hU7ViA/lJt0N2mJsegVoon2zUUYF d4AzJEDqAXYDHdh5QyngJJZSMIzsDAiS4MJO4buVgVEJIKd9OrFGqFOZJjBPFloc2m7l MyeiPbZlLLZtGgVUFFx4D7pHU5sN2PUGybN+6rCcMBZVvz55HaUrWXqDFYF8rbZY6OZy qfE6vRQ+F7YdjLwQ1xDLInvOKu6ZdXAayfQtu13XsbfoEEIBIyuvkR0dvfMiRqrDjC5c +apGNpw6m83Y8BAHgYLtdbJvSNV7cP7Y3iMOyF+gY4/fVW/0tOBWvmx21sDweYtvSDVK Elig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PZv50YTx; 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 20-20020a630f54000000b00551bb2b99besi18195163pgp.85.2023.07.03.11.33.14; Mon, 03 Jul 2023 11:33:28 -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=PZv50YTx; 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 S231159AbjGCSQK (ORCPT + 99 others); Mon, 3 Jul 2023 14:16:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230472AbjGCSQF (ORCPT ); Mon, 3 Jul 2023 14:16:05 -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 6ACF5E5F for ; Mon, 3 Jul 2023 11:16:04 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-4f95bf5c493so7122594e87.3 for ; Mon, 03 Jul 2023 11:16:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688408163; x=1691000163; 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=yppVVJZsVALQlxVkrk6bRQIocnUZEUf5eYssW3dPax0=; b=PZv50YTxGjUL+H8+y3K2oF7zo66LmTqSJu6hiAKLFiYHUK/rL8dgCegUsRvZSU6aZb 7qPQYy1VJHO+iUZbH3AhD2efLKXlY3TW0iwQplS9vcHTJnHvW+Z8R64jCiA5F61vz9G1 WhmEqa0kSXyY8hUjHPmZ77CKRVrnuw5YgdvgfrUeh1yhlDZmKedhCpAaN1hrZTu+Pz8p KEfS88zX7NkBBNjaAbtesgpC1SS/lbLrH+P5wY/Y2yfj521/HO6XjKRExquhBZCM6Ccl Hicz3L0FY4NDGHKt4H1fM7Wk0OGiS1cDuZIrqCkVPh3+ON72N9g0vqXIKteKPJGbZ3lp 419w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688408163; x=1691000163; 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=yppVVJZsVALQlxVkrk6bRQIocnUZEUf5eYssW3dPax0=; b=dk7wP2L5uFn2kMC1c40FWdO8iSBI9WShFX1yMaDKf11ml/SLJou8U4eMWh9sM/Nz1C O3QdaScMpCC0nBAIkBkX90fTBrVNfBATQ0MIwbWWAY1YdqfuDgPCFQuhD8n22yX1Or47 bRTvR2Nnj9maI4JKi5iCW/aJu0byuDi1BHWAdPVTkRfyDFeaQ2HYYih1iX91cGlYTF47 o2GgjESvMfOc4cneoLs/RPK9yulRgeiKsYK8feRjr+N4C9UVVQOZS/R5nEC+aaLPmpVJ eViRajGZeCizfuvoyANSBT9LuKa+AFbpUhOIvqOPfRu7UFxlpKldySLrUA7WDNgxit/Z G+OQ== X-Gm-Message-State: ABy/qLZk3K59wnboeesLTLpRjx/uTTf/Nt5vKnDVHbv6vEvu2wK7LcRE a2nQnU0/xcnQYumZgQCy1cXJBg== X-Received: by 2002:a05:6512:5c4:b0:4fb:8965:7882 with SMTP id o4-20020a05651205c400b004fb89657882mr6183156lfo.35.1688408162717; Mon, 03 Jul 2023 11:16:02 -0700 (PDT) Received: from [192.168.1.101] (abyj26.neoplus.adsl.tpnet.pl. [83.9.29.26]) by smtp.gmail.com with ESMTPSA id a6-20020a056512390600b004f1383d57ecsm4633034lfu.202.2023.07.03.11.16.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jul 2023 11:16:02 -0700 (PDT) From: Konrad Dybcio Date: Mon, 03 Jul 2023 20:15:55 +0200 Subject: [PATCH v3 2/4] regulator: Introduce Qualcomm REFGEN regulator driver MIME-Version: 1.0 Message-Id: <20230628-topic-refgen-v3-2-9fbf0e605d23@linaro.org> References: <20230628-topic-refgen-v3-0-9fbf0e605d23@linaro.org> In-Reply-To: <20230628-topic-refgen-v3-0-9fbf0e605d23@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=1688408157; l=6762; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=pjLeGl5c7AIRN3onIFXcWrE2ZGIUzY+F26Ci1naF9rY=; b=zyzA+EFWkLUHUvbbwQvhdFMSA9gTAsia8dHBonOdb/FkF5+cpeQWP/+rvMtK/O/Rwchn9ojGB RZnwKZYj4I9D0L95uHNsaybSP8e+Ji6wBDU4NWE0b6GCoi+t9PlS/hP 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?1770425374069506046?= X-GMAIL-MSGID: =?utf-8?q?1770425374069506046?= 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 | 11 +++ drivers/regulator/Makefile | 1 + drivers/regulator/qcom-refgen-regulator.c | 154 ++++++++++++++++++++++++++++++ 3 files changed, 166 insertions(+) diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig index 823f8e6e4801..18a05b09406f 100644 --- a/drivers/regulator/Kconfig +++ b/drivers/regulator/Kconfig @@ -989,6 +989,17 @@ 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 HAS_IOMEM + 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 15e0d614ff66..4f4589877e81 100644 --- a/drivers/regulator/Makefile +++ b/drivers/regulator/Makefile @@ -108,6 +108,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..656fe330d38f --- /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 = &(const 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 = &(const 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 Mon Jul 3 18:15:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 115460 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp714037vqx; Mon, 3 Jul 2023 11:32:36 -0700 (PDT) X-Google-Smtp-Source: APBJJlGXJkISrMApa5PeilKjmOMv0FrLFMzRAdD7hmP/ahtWyfHkh7RuOAqQ+sy3IDS4c6lMpgLX X-Received: by 2002:a05:6a00:399a:b0:681:9fe0:b543 with SMTP id fi26-20020a056a00399a00b006819fe0b543mr13160330pfb.2.1688409155963; Mon, 03 Jul 2023 11:32:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688409155; cv=none; d=google.com; s=arc-20160816; b=uGeGECYT3+jq/oAsEphVO6jNVGBo9Y7/u68lAGURanQxWNjw7LHZxgh/KMlxzLDi6M JGYE/ieRcc3rUaaTyLgvu3lOLQ/YcVnVXPnNyhgckJD4KnzJraOt7xL7DUxiaoRD49Ds ktE16CdTwWjS+xzZmW4Kcoe3+yQKVaMhNt9hdsa9VUJ2Zy0wE8Jntdmz1PytYxxZUT7l n1smCnfe2h6+7HX/MO3oGygnBOoBa1imPXIJYrbXzoWKdfk1WQ2WWpwenCIYN87iGPu2 xvGSLW0USlZH7li4tWt1JE1ZAFvn1NHC9macsyEu4WrYxrFplQWmLavsZ8S9JY7XUcGZ Ri9g== 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=ugQuBcc22Dch2kk3t6fW9LRERKCxEBvSaZhr/vbkG92xZFu7g1Vt545m0OWt4KAh3W vQDLHQGig20OI727prAp+3d1TbgW7itFgF23o2sQ8E9HOL+iMtz14Lyyek/Il7yopNxT 5Eb+H8gG8V7q83anx8utfXi4jN1QBVNKMNIUu+XCKqWSiCLRtPPHYR+VfgYxWtXP5EMq sQGGCwpdx0bZ9SnNDt3WCABfnLg6/X5EuvDO7d2oMcXBsx3TWgIBk1r9MQldhnd/Iqai c6RPhwAm8UJauaaXv/8shsdfLb86WXGD/RlP/Cyw1NzMRnI1mqy2sfthOcCivkTS54dS pkKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DyUggfEI; 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-20020a056a000d4400b006815bf78628si10053040pfv.356.2023.07.03.11.32.21; Mon, 03 Jul 2023 11:32:35 -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=DyUggfEI; 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 S230043AbjGCSQM (ORCPT + 99 others); Mon, 3 Jul 2023 14:16:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231139AbjGCSQI (ORCPT ); Mon, 3 Jul 2023 14:16:08 -0400 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43794E69 for ; Mon, 3 Jul 2023 11:16:06 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-4f9fdb0ef35so7606668e87.0 for ; Mon, 03 Jul 2023 11:16:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688408164; x=1691000164; 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=DyUggfEIdkP+zEhWECWn3vTa6gXyOFU9JIQ7hglnUTo1f7fQ6ekt+EV8pgkAYM+Jqf kRzL3Brc9MwA3lln/K4xWNuIBlLrkexczZhd4mDKkAia9xe1A0tjxADUmYDSBPqW6d1h E7DfxqSpDMkQArzT4/AgXRfTkfg6yNSjRXgwf5fRlrOQrX5dxkTriCF+VBzWjYO9rSv4 X0SFrTGjs6zw3vDh99ytBEL/MoD5M6TMlizOm7DUR031HFbqBPK+g9gxKZVEqnMPCoZP vIJahMZv/da1p+w0+idh6HtVbiJ6uKZhmGLaZGrBChoJW0HSNJdmF+VNGJUDXewvyvZL RqSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688408164; x=1691000164; 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=Rw3pomLIVEgEx5Lwtiic+CHP8ZNWQhXn/Itsq6r2gQfsziXJzlhw8Xcp4BAifDozAH EtG/JxN+VOGXbcPdj9LvB8XKT7X2H5fjVnekAtaX0DnkfgK7Ekz0yKaZkBs9Z5Tok9dl b9hTwPgl4uMIFf1+TXyfdk0hijEHw38m0e/4YsBkV2rRHBImmti6RkHIYZYRGAdmV1v1 ihJYgoXAqRguukYd0gyXHoBT1ZaE2ibxIUOWnCp9iVknYGZ/D5iKBUaEeC9F96sUsBWO k6rYfUeYlgdX1U0huATPHDE17DTTL5jfcCxzjPMzXNOaESWupzVP2q074fx/UlWtngLQ 4A0Q== X-Gm-Message-State: ABy/qLaFSyTha1OWKLO1uSpQ7V/aflndTBBALZ+FzKtb2mRzE3Wl618p yHLDtD4jE4UkweTAjURnOn8DRQ== X-Received: by 2002:a19:7418:0:b0:4f9:5d2a:e0f6 with SMTP id v24-20020a197418000000b004f95d2ae0f6mr6907671lfe.14.1688408164399; Mon, 03 Jul 2023 11:16:04 -0700 (PDT) Received: from [192.168.1.101] (abyj26.neoplus.adsl.tpnet.pl. [83.9.29.26]) by smtp.gmail.com with ESMTPSA id a6-20020a056512390600b004f1383d57ecsm4633034lfu.202.2023.07.03.11.16.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jul 2023 11:16:04 -0700 (PDT) From: Konrad Dybcio Date: Mon, 03 Jul 2023 20:15:56 +0200 Subject: [PATCH v3 3/4] dt-bindings: display/msm: dsi-controller-main: Allow refgen-supply MIME-Version: 1.0 Message-Id: <20230628-topic-refgen-v3-3-9fbf0e605d23@linaro.org> References: <20230628-topic-refgen-v3-0-9fbf0e605d23@linaro.org> In-Reply-To: <20230628-topic-refgen-v3-0-9fbf0e605d23@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=1688408157; l=960; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=UEARP/nzfff11sHWpuDiJ7VAKYi5TYY87h31tjxPZWc=; b=2TMqshCBAOBb1jGz8NS6X0REmrqcs64ytZcs8i+mMynKuIQDOWTOhDG/OmtTBPmumuHXIAZkK nMkhkBhtndwBN90jKKlwxo8uAZAwxLRYbbcbgtS0ZfB+daC1S74bqu3 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?1770425319154982584?= X-GMAIL-MSGID: =?utf-8?q?1770425319154982584?= 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 Mon Jul 3 18:15:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 115465 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp715063vqx; Mon, 3 Jul 2023 11:34:32 -0700 (PDT) X-Google-Smtp-Source: APBJJlHZpBBqNY3U3NBbvglHQzcTpxSo9iroQZaZOmlaCfs4R/6MOA186wMHY/lbd8Te+2eWdnpU X-Received: by 2002:a92:3607:0:b0:345:e438:7381 with SMTP id d7-20020a923607000000b00345e4387381mr10200811ila.2.1688409272298; Mon, 03 Jul 2023 11:34:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688409272; cv=none; d=google.com; s=arc-20160816; b=etxEKCwD7/tyFTmcxwoNO3o4G1f05mcVN2xTN3WxXAbIr5iRBr9qvWuD4VLlwYH/gQ 1Kmsl5AhBXxBHI4c+G88o/Qg1hOCbKPCsKIBJ5sktSi4tVT9fnEs7fLsDWXTR9uYSvdT 8rGCKEpMab/sBBOWH3H1XW7snevnMl1trf1Z8Gy/6i3Dx4uwPrA6oftALpUKSC5ZwShK 4FJpAjWabt0qk0lQk1KLrUrMH7VUWMQWbZ3wkTRQSqS1X7JuJMzra7a9W42+X4uz7aWl G11Hh56bJBuAewZCNG5WqC+KTPVPWKDGyiWg1ElH2kQCxJIF8vT27XqOyGHtwGBhyE5r XWYw== 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=i80KMzvvtLadb0SKI7XfQv4YgOHJRfkDqZDa3Yx7h9H0VbpXdOwMPUpifbAttjqykb vDD5hkgsp1UDv+E+kQBTw6StKPuM1ofIod83JjYPknlf2p88QcTRi9ujGVydT8GprPD/ 4vw9Gd5VNksavqa78R2d6rbgHXMvuiwltjn+DXVUePK/W9RxADkUlrnGwP56k5WMf0CO e89BD/MpQ80gZD5xNmlhar/UwFLumh8FrAonBKtVvN6hJv7aJJ1TiSEEXsNzZEEWUjZr mLzSqo+PvZF3jRpRunlyrXEWaHh+KgaC040a1zAMuDOe06dARty/YoyHGXeFA+L7dkPR 2stg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=M3MZVSSv; 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 29-20020a17090a1a5d00b0025be125bda9si18639388pjl.38.2023.07.03.11.34.17; Mon, 03 Jul 2023 11:34:32 -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=M3MZVSSv; 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 S231194AbjGCSQQ (ORCPT + 99 others); Mon, 3 Jul 2023 14:16:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231161AbjGCSQK (ORCPT ); Mon, 3 Jul 2023 14:16:10 -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 1BAFFE6D for ; Mon, 3 Jul 2023 11:16:08 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2b6a16254a4so70824031fa.0 for ; Mon, 03 Jul 2023 11:16:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688408166; x=1691000166; 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=M3MZVSSvTVZWcSpRhaGpO/4ZkPSOJadnFRhiAWsh68RYeasKrMbEh/oT0RYk3GLYFo k4jwahArOJYgAvQtne7W5fHuj3trxl49qv26FrFAJPDMKnjMa4Hwf1KfrF9RA7dSb306 CJxseFXY8lFhRYqn+UhQewllXgn+Ya667F39GD+h//21/3/m9D+GK4CmpZZMtlq3ifTB xu/JJOFXym4Bl3Iy/vnGUSrBd0nM8RWNEGhKDr5xS6CpaOrQTL/r//7ljBrUlwnnkICc rrtEWp8QlX/wSerFxkpNnk1VKPfJVb2Ac/79UNgYBOFvt8bQOCu7wizgPkbl0ydDXUeK 6/8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688408166; x=1691000166; 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=NghdD8EGNxpMMc0fUsq/D7rc2cnP6gY2hoszvGb26vstjK3lwYJWV/xcE4FwG+sayN vtOgzWUNjq1pL/+pv63dooXtYHddNliKAi/Iu4t2k157DaT6rq0bJ2BJkL/dqWU65Yco Jc97Pg+odmyzE1konjfiY46LQ6AhLUzDKOwOQravSD4CBxuasoKS6MOg4bckvTbstMRc PkzY97UIJTS+0FWSzuuxPvfjswkytWzBnX6vKNNdUghYskH0JtdTXUsESt5bD4F7fThP APLP1fdhbj5vZsnqmRgwV4zgXcBuP/UpmTAOnQOINopBIoNeCs/u0Znh2XybPj4C2O5V R8+A== X-Gm-Message-State: ABy/qLYn70dHPpM52VgFnUQAmFJ1kGgS4yZUvSwMOkReVJeZ5XLYlIJo zJHFU79j5Q1JM3hSdD6Qz5b0wg== X-Received: by 2002:a05:6512:360a:b0:4f7:55e4:4665 with SMTP id f10-20020a056512360a00b004f755e44665mr6488178lfs.56.1688408166353; Mon, 03 Jul 2023 11:16:06 -0700 (PDT) Received: from [192.168.1.101] (abyj26.neoplus.adsl.tpnet.pl. [83.9.29.26]) by smtp.gmail.com with ESMTPSA id a6-20020a056512390600b004f1383d57ecsm4633034lfu.202.2023.07.03.11.16.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jul 2023 11:16:06 -0700 (PDT) From: Konrad Dybcio Date: Mon, 03 Jul 2023 20:15:57 +0200 Subject: [PATCH v3 4/4] drm/msm/dsi: Hook up refgen regulator MIME-Version: 1.0 Message-Id: <20230628-topic-refgen-v3-4-9fbf0e605d23@linaro.org> References: <20230628-topic-refgen-v3-0-9fbf0e605d23@linaro.org> In-Reply-To: <20230628-topic-refgen-v3-0-9fbf0e605d23@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=1688408157; l=1019; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=bdVFkIHME+ksW97iOZJH0yeZoPTsVUfCpblAjJVbJjI=; b=76+Fxu9Mkj2j91rvxqGFAjIS4lnVHjZtvgXD8BN606qTh2MlXXDVLXeY449B7FkmiVfjfKJUE 3PeNBebhJ/3A+sotF6ET4cY+H5e2VvFD/K9b8XQzRdZcHcZMxrMZwBW 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?1770425440940245199?= X-GMAIL-MSGID: =?utf-8?q?1770425440940245199?= 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 = {