From patchwork Wed Jun 28 16:29:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 113973 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp9064821vqr; Wed, 28 Jun 2023 09:49:18 -0700 (PDT) X-Google-Smtp-Source: APBJJlEd+pymCKzTn0891bL4KPSBmCJJlfw3FSFjz6S0gh2PkwfC7NY2tzpgZyHho4d2mPr1+F4q X-Received: by 2002:a17:90a:5a0b:b0:25c:1ad3:a4a1 with SMTP id b11-20020a17090a5a0b00b0025c1ad3a4a1mr345281pjd.1.1687970958604; Wed, 28 Jun 2023 09:49:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687970958; cv=none; d=google.com; s=arc-20160816; b=GWyzRFWgwN5GhOBXTpzfYuD+4GEHTYguyL6RYnJzrOXYEaHGoTqEjsFbbLBlUx70df 8u229WwZ6h4QEZnVz8iU1p6Xod0ZEj1RzvCHBHSGN+5ymuPSH8O9ybCNUGMXTZNqxa3B utQpuBvCDncg0ZO6x4KGjG6XztgeQX4JfpJOy9IP+/0hBUN4f7N3KpeSsrAEw2WFBTCw STiPd8xKINa/lVUuQAS+DmjaS57f4hHJZv8n/M2jK587lIkVayOGJSWGfI18HTYatTUL /rIO9g1zxemyUF2C5/AMn8Ps89iRMAhUrUTfpQOLYKoz0l3HYwOJiXPn9liasVDlrXVl D33w== 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=k9KnMtZLR40pDXGElESmmZUvDm4CZ/ghYZ4Hvek4pbQ=; fh=qvdqMbXAE/qcPdFiL/QUg6KLKapmCEtGXJzQKn2xN9U=; b=J4gDUbjm++kl+QNy88CzgOhiTBOKX5baWKrdk+UUr/AeEQnm017t1dGNVrEt1qsGg+ cuZm4y75pLLYXJ5kL6H71YNekmBQM7Iy7JfL9y6n4qW42M9x3+cmxVCwDewsVTEb5E+v FZEHvJnxd/6wYaRwneA4z0Qf1Ih9t8cnHyUTmIJli3MbnhTH+n4WEkQYBCWKYCpOwC+j Zw+BNLwemm9nMNwxoVUbbFYftGKSAuMy6oGMsEZD3kb4X4vWC3FkcnfNtzmi5HZbCPA6 AzU7l9U7GumEboBziuWCW/ro8s6605oqH2wCCuk4t1oJa5E396ceHpS5T5lHcUQYFDX2 CUYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="m1/0vpJU"; 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 w10-20020a17090a8a0a00b0024e29c5c06dsi9670849pjn.12.2023.06.28.09.49.04; Wed, 28 Jun 2023 09:49:17 -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="m1/0vpJU"; 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 S230519AbjF1QaM (ORCPT + 99 others); Wed, 28 Jun 2023 12:30:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232236AbjF1Q3w (ORCPT ); Wed, 28 Jun 2023 12:29:52 -0400 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A53DD2D71 for ; Wed, 28 Jun 2023 09:29:50 -0700 (PDT) Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-4f9fdb0ef35so6708440e87.0 for ; Wed, 28 Jun 2023 09:29:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687969789; x=1690561789; 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=k9KnMtZLR40pDXGElESmmZUvDm4CZ/ghYZ4Hvek4pbQ=; b=m1/0vpJU7e/vmira8hvb7shwcPdAr25+sj5szdqtuv4qnL85+sOOo/xfk7nVR4wSbF 8cK9NOV8cxuLtUEDAnyiO+S4B0oPjEvOBGvy6r7HmD40YUyFOvf57zr/6ZZr5vKBFWo7 SdTrH7sqljfa9vtyGc9Oa+zOD9UPUKOAhP4xIBk+e4GxAzZCPw3XRDsPt8JufSTJ8N+2 ibbABJN6DcwG3X1McvSxXbbJknNaMyAuM4W+XL8TL2bP78Fe9B25xRScrpWCvGqr96V9 zjpxFkw4nFFWuvUlf/p2tZkmFFApu2xqbsyQeLJZcrVoMs3ejMNDWRv9cO4BjxgNCm68 LQ7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687969789; x=1690561789; 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=k9KnMtZLR40pDXGElESmmZUvDm4CZ/ghYZ4Hvek4pbQ=; b=A79EMv5Ob7M8wLIyHFsSys9iy9x3l6SInbv9O6DmPbfIpUZBtSEuAZwMNuv6crbtPC QfDjxilw1LpfOGbIO90MldsgSbweJ2lCxY1ebS08otNcguOcEX68RBUO3hnryDMwSMLP iRla6XyA2d1S49jhl1keErE8MZGzPNTr3My10bo2c1TOdlMPTueCkTqKNq6h+CLlBsVs 7nIIFV/p5adr3b1gBerB6JvaZskwhi1mJ6SoOGKnLoMzBgldxz58YE/ihZvdcykBPyba VAqJzvmT3/w2yIiP4DjgliYKmK7qJ53FBDpS11Fmxl54s2Gt7ElhC0g5VNcaLdKDtfxz 4+Qw== X-Gm-Message-State: AC+VfDyMRZN9h5LY0yY2CfNdIKtyCgWedGfDNAaB4NRhuYZft+DHeNNF 7mf36F+ED6z1KJOXbbYED9h2uw== X-Received: by 2002:ac2:4f07:0:b0:4f9:6528:fb15 with SMTP id k7-20020ac24f07000000b004f96528fb15mr14393398lfr.12.1687969788869; Wed, 28 Jun 2023 09:29:48 -0700 (PDT) Received: from [192.168.1.101] (abyk82.neoplus.adsl.tpnet.pl. [83.9.30.82]) by smtp.gmail.com with ESMTPSA id v28-20020a056512049c00b004faeedbb29dsm1678783lfq.64.2023.06.28.09.29.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jun 2023 09:29:48 -0700 (PDT) From: Konrad Dybcio Date: Wed, 28 Jun 2023 18:29:45 +0200 Subject: [PATCH 1/4] dt-bindings: regulator: Describe Qualcomm REFGEN regulator MIME-Version: 1.0 Message-Id: <20230628-topic-refgen-v1-1-126e59573eeb@linaro.org> References: <20230628-topic-refgen-v1-0-126e59573eeb@linaro.org> In-Reply-To: <20230628-topic-refgen-v1-0-126e59573eeb@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=1687969785; l=2253; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=E6OpwKaLxLMqeufp2J5Sb8wXLqiG8TBOqY/1j2yTMwM=; b=Fl3PQ2gQQ2JC6dxfvdudrWKD2Y7+XzJSj9IfqR6O8URn9dgYJuKM7wqNx30GKtD2rIIg/tfEy qr+tcyV4xcrAYut9JAKjPW+iBve7g+7t66P2/sjfsFVzrZkhOqZAd+H 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,URIBL_BLOCKED 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?1769965834968649126?= X-GMAIL-MSGID: =?utf-8?q?1769965834968649126?= 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 --- .../regulator/qcom,sdm845-refgen-regulator.yaml | 56 ++++++++++++++++++++++ 1 file changed, 56 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..19d3eb9db98f --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/qcom,sdm845-refgen-regulator.yaml @@ -0,0 +1,56 @@ +# 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 renegator) 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: true + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - | + regulator@162f000 { + compatible = "qcom,sm8250-refgen-regulator"; + reg = <0 0x0162f000 0 0x84>; + }; +... From patchwork Wed Jun 28 16:29:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 113972 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp9063382vqr; Wed, 28 Jun 2023 09:46:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7F2B0/IeAtiA1rbZMVqYa1qwBEkgfLQX5uuVSQRU6xbRMBincd4tCnRLrCGfyoSc2a4EjX X-Received: by 2002:a17:906:c1:b0:98e:46f:3eab with SMTP id 1-20020a17090600c100b0098e046f3eabmr11558873eji.6.1687970813252; Wed, 28 Jun 2023 09:46:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687970813; cv=none; d=google.com; s=arc-20160816; b=TiVTNw6O7QvboNhsChVJAJzf42QoOCPAICO3cuPy0nU97V6an+t9UxLuHAf7Anwug1 kWB5ixWxgs/3/VhycZY/6sO1D2sWSs0l3mfQSv5hHMMaQeLRNT6xr4wAbTymdcwk9qs5 UJE48scb2MMFiJcYY4LT8fjf+ydFmhAidMInSvdhJpBevLSVmhokuZe5dSBJ2LBF5SA9 q7JO0HysCJ+mG85YFn7VVYTNhTWvGZPTfhKEfaxUgaehRFsSMBYhygjq3Oouj9I1HRXo TzlgvjXmQOr0VAFS5512PLIzFecsBT2mFMHfu90vCtv2X1PQWYh6xLDqQvwULgz2G5Rn HqRQ== 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=3O7/8dc5GSHiu5z4ltCF1O6EcsodTXplnyycC64HxP8=; fh=qvdqMbXAE/qcPdFiL/QUg6KLKapmCEtGXJzQKn2xN9U=; b=MU16PRzZ3WjWwpb5DJQymkdxrRjPO34RjzavrBuWQHOFFFZX39bwJ+singnhGoI8yw h2fZCBCKZ4aBW4EbdS7q5rPhl/A95EqwNG2dG7oMcFdjPXkZox9kjl+Adh83sRCkz+Xt 5UGKaCHWWUkcZOqdlFT8oEEHH44FUd8Pl0mSh0Aead4id8T9/uvVII/F94xHf1787Yh0 lx8D9kZYign/La+2KLWm+x1MRafbRbMP/gtuWQCgbwflK1hP7L+X/h/fV81PYVp0qVuL OACNJCZwfbX527pyAO8ZcRKseqWlphQoH94/Up/m7ZsZUgwHZ1Kg9pYRYgG+mzc74YuF bxMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sc7OSEXA; 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 ca4-20020a170906a3c400b009887c7b0206si5593107ejb.632.2023.06.28.09.46.17; Wed, 28 Jun 2023 09:46:53 -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=sc7OSEXA; 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 S232072AbjF1QaZ (ORCPT + 99 others); Wed, 28 Jun 2023 12:30:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232248AbjF1Q3y (ORCPT ); Wed, 28 Jun 2023 12:29:54 -0400 Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A44C22D78 for ; Wed, 28 Jun 2023 09:29:52 -0700 (PDT) Received: by mail-lj1-x234.google.com with SMTP id 38308e7fff4ca-2b699a2fe86so67814321fa.3 for ; Wed, 28 Jun 2023 09:29:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687969791; x=1690561791; 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=3O7/8dc5GSHiu5z4ltCF1O6EcsodTXplnyycC64HxP8=; b=sc7OSEXAmym4AYx+twt7Awti6LbhsI/Tf7SayEzAimJ37RTgR1C+ZvoK5uRqP17Bk+ 6tYC26hJoMwOkRHUddIyXEaYQX+fUzGf8w8efx7xFHwye/PXXZkOBktMWkJ3NKIndTo1 y041bAS200dAttLn9ORND4RzJWkXrPXu/LCHGso2bukyDVgLqyBf/kxLBGYSKcPQwA/s M+UtH55xtE5bcwdvOlHBbumf/rzI0fHyhDXlka3cUtLrLTht5inpM4p0UfkhofDte4eu JKtAFbYDB2aoYfCuvszi7kc+KTmlMBSW2RN9U2E7/hEDuKIL7M5v9jDBGamjmUz+c2OF bh8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687969791; x=1690561791; 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=3O7/8dc5GSHiu5z4ltCF1O6EcsodTXplnyycC64HxP8=; b=YT0bqO5r+AXlKptkJZCaQ4v9mlC6NNf/Z7MvEAMnt4NUNioX14ZZ39i5SL33V7NQSU adRy+BTAK6fU7kcIvCudz7S3TnqEkm8Kw0zZv8Q7Qw0tzIqk4Dd7LRJ4PyT8aD4by9cN IEycYZUidzlDyIucG8qPx5mfQkeCwOiuZxKdqUkfSSPYPFDx2HXdS13p2SsZTKayB+l7 tYiklCWbUCSyvxUrwLlqARAvkogM4N7m0DsUVJf/cR+KKVr/qnukkMKlbGZ9X0o8yWiE bPCZ+fHG73p6FQanl0I2oXRMxnwyRxrK5VD6adbLkNlKzjzuuZ5zihsajQfj50hsQ2kC hv1Q== X-Gm-Message-State: AC+VfDwmGjNak2hqJF3gFibYE2cB5EmO//59hSfqr9qC6Fi8c1YcphLP 1YONsx7dGZY73H7pujVshqWTVA== X-Received: by 2002:a05:6512:224f:b0:4fb:7b4c:d38c with SMTP id i15-20020a056512224f00b004fb7b4cd38cmr6687850lfu.60.1687969790950; Wed, 28 Jun 2023 09:29:50 -0700 (PDT) Received: from [192.168.1.101] (abyk82.neoplus.adsl.tpnet.pl. [83.9.30.82]) by smtp.gmail.com with ESMTPSA id v28-20020a056512049c00b004faeedbb29dsm1678783lfq.64.2023.06.28.09.29.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jun 2023 09:29:50 -0700 (PDT) From: Konrad Dybcio Date: Wed, 28 Jun 2023 18:29:46 +0200 Subject: [PATCH 2/4] regulator: Introduce Qualcomm REFGEN regulator driver MIME-Version: 1.0 Message-Id: <20230628-topic-refgen-v1-2-126e59573eeb@linaro.org> References: <20230628-topic-refgen-v1-0-126e59573eeb@linaro.org> In-Reply-To: <20230628-topic-refgen-v1-0-126e59573eeb@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=1687969785; l=7718; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=cLuCOydeuQxZpxQ1jarab69rCq1J+CL/0LN9pVBus9k=; b=z5Dv3I0gno4CqdlcpHcPFnKPKgajDU/Cm6GfWD4HwWQEu7jM2JBafkwMhhhLcdIqbLKnlIadh OFbUyw4EO7oCwfSVA179BDOQMJxmnzJzKj8957lrmXV4CEsnJowBbMe 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,URIBL_BLOCKED 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?1769965683651434178?= X-GMAIL-MSGID: =?utf-8?q?1769965683651434178?= 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. This driver is based on the driver available in the downstream msm-5.4 kernel. It's been cleaned up and partly remade to match upstream standards. Signed-off-by: Konrad Dybcio --- drivers/regulator/Kconfig | 10 ++ drivers/regulator/Makefile | 1 + drivers/regulator/qcom-refgen-regulator.c | 187 ++++++++++++++++++++++++++++++ 3 files changed, 198 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..854ab91f649c --- /dev/null +++ b/drivers/regulator/qcom-refgen-regulator.c @@ -0,0 +1,187 @@ +// 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 + +#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 0x6 + #define REFGEN_BG_CTRL_DISABLE 0x4 + +#define REFGEN_REG_PWRDWN_CTRL5 0x80 +#define REFGEN_PWRDWN_CTRL5_MASK BIT(0) + #define REFGEN_PWRDWN_CTRL5_ENABLE 0x1 + #define REFGEN_PWRDWN_CTRL5_DISABLE 0x0 + +struct qcom_refgen { + struct regulator_desc rdesc; + struct regulator_dev *rdev; + void __iomem *base; +}; + +static int qcom_sdm845_refgen_enable(struct regulator_dev *rdev) +{ + struct qcom_refgen *vreg = rdev_get_drvdata(rdev); + + regmap_update_bits(vreg->base, REFGEN_REG_BG_CTRL, + REFGEN_BG_CTRL_MASK, REFGEN_BG_CTRL_ENABLE); + regmap_write(vreg->base, REFGEN_REG_BIAS_EN, REFGEN_BIAS_EN_ENABLE); + + return 0; +} + +static int qcom_sdm845_refgen_disable(struct regulator_dev *rdev) +{ + struct qcom_refgen *vreg = rdev_get_drvdata(rdev); + + regmap_write(vreg->base, REFGEN_REG_BIAS_EN, REFGEN_BIAS_EN_DISABLE); + regmap_update_bits(vreg->base, REFGEN_REG_BG_CTRL, + REFGEN_BG_CTRL_MASK, REFGEN_BG_CTRL_DISABLE); + + return 0; +} + +static int qcom_sdm845_refgen_is_enabled(struct regulator_dev *rdev) +{ + struct qcom_refgen *vreg = rdev_get_drvdata(rdev); + u32 val; + + regmap_read(vreg->base, REFGEN_REG_BG_CTRL, &val); + if (FIELD_GET(REFGEN_BG_CTRL_MASK, val) != REFGEN_BG_CTRL_ENABLE) + return 0; + + regmap_read(vreg->base, REFGEN_REG_BIAS_EN, &val); + if (FIELD_GET(REFGEN_BIAS_EN_MASK, val) != REFGEN_BIAS_EN_ENABLE) + return 0; + + return 1; +} + +static const struct regulator_ops sdm845_refgen_ops = { + .enable = qcom_sdm845_refgen_enable, + .disable = qcom_sdm845_refgen_disable, + .is_enabled = qcom_sdm845_refgen_is_enabled, +}; + +static int qcom_sm8250_refgen_enable(struct regulator_dev *rdev) +{ + struct qcom_refgen *vreg = rdev_get_drvdata(rdev); + + regmap_update_bits(vreg->base, REFGEN_REG_PWRDWN_CTRL5, + REFGEN_PWRDWN_CTRL5_MASK, REFGEN_PWRDWN_CTRL5_ENABLE); + + return 0; +} + +static int qcom_sm8250_refgen_disable(struct regulator_dev *rdev) +{ + struct qcom_refgen *vreg = rdev_get_drvdata(rdev); + + regmap_update_bits(vreg->base, REFGEN_REG_PWRDWN_CTRL5, + REFGEN_PWRDWN_CTRL5_MASK, REFGEN_PWRDWN_CTRL5_DISABLE); + + return 0; +} + +static int qcom_sm8250_refgen_is_enabled(struct regulator_dev *rdev) +{ + struct qcom_refgen *vreg = rdev_get_drvdata(rdev); + u32 val; + + regmap_read(vreg->base, REFGEN_REG_PWRDWN_CTRL5, &val); + + return FIELD_GET(REFGEN_PWRDWN_CTRL5_MASK, val) == REFGEN_PWRDWN_CTRL5_ENABLE; +} + +static const struct regulator_ops sm8250_refgen_ops = { + .enable = qcom_sm8250_refgen_enable, + .disable = qcom_sm8250_refgen_disable, + .is_enabled = qcom_sm8250_refgen_is_enabled, +}; + +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 = {}; + struct device *dev = &pdev->dev; + struct regulator_desc *rdesc; + struct qcom_refgen *vreg; + void __iomem *base; + + vreg = devm_kzalloc(dev, sizeof(*vreg), GFP_KERNEL); + if (!vreg) + return -ENOMEM; + + vreg->rdesc.ops = of_device_get_match_data(dev); + if (!vreg->rdesc.ops) + return -ENODATA; + + base = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(base)) + return PTR_ERR(base); + + vreg->base = devm_regmap_init_mmio(dev, base, &qcom_refgen_regmap_config); + if (IS_ERR(vreg->base)) + return PTR_ERR(vreg->base); + + init_data = of_get_regulator_init_data(dev, dev->of_node, &vreg->rdesc); + if (!init_data) + return -ENOMEM; + + rdesc = &vreg->rdesc; + + rdesc->name = "refgen"; + rdesc->owner = THIS_MODULE; + rdesc->type = REGULATOR_VOLTAGE; + rdesc->enable_time = 5; /* us */ + + config.dev = dev; + config.init_data = init_data; + config.driver_data = vreg; + config.of_node = dev->of_node; + + vreg->rdev = devm_regulator_register(dev, rdesc, &config); + if (IS_ERR(vreg->rdev)) + return PTR_ERR(vreg->rdev); + + return 0; +} + +static const struct of_device_id qcom_refgen_match_table[] = { + { .compatible = "qcom,sdm845-refgen-regulator", .data = &sdm845_refgen_ops }, + { .compatible = "qcom,sm8250-refgen-regulator", .data = &sm8250_refgen_ops }, + { } +}; + +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 Wed Jun 28 16:29:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 113971 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp9063381vqr; Wed, 28 Jun 2023 09:46:53 -0700 (PDT) X-Google-Smtp-Source: APBJJlHqePv8JppSvgToqYtRjFAIHJF0hrPJ3iCreAWxPpgNZhTdbY5m47+k4g+p3y04T4hAB6sx X-Received: by 2002:a17:906:64d5:b0:982:9a08:60 with SMTP id p21-20020a17090664d500b009829a080060mr219846ejn.3.1687970813244; Wed, 28 Jun 2023 09:46:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687970813; cv=none; d=google.com; s=arc-20160816; b=o6U/DSK64kQpp7pZVw4opl4YbSy7yLssUm4ZRpactn2lfj6rEQ04Sq0H031oM+wfVU ZRZGyLDZa9lpR8zgrTCuoa7x9kRdGUE9JxbY9B8e/Pe82Su7pHjXq+jboOTkxBoY1gNi sOccQ/Du+IpuVKQ/W126XAVrNnTgBGVFMnsft9C5YfS1rz75o0UE/Sv/Ibvnzf2V94cG Y19cZD0o5m2BpvNsk8iHAVxrikdMMkKPHB2PM8kTu5uTa5ovPDPLBdYuKBLjpoSsKH2P tjK5rZBoqP9pRMWYki1cBbReCbbINTFW2nHpAxtmksvX3NdUnirRnaYgQ2efjk8nkwPT 1jrg== 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=9eMvEkJ/XegETFODHiz62mk7KCxYtx3hl5+l1ieaHBA=; fh=qvdqMbXAE/qcPdFiL/QUg6KLKapmCEtGXJzQKn2xN9U=; b=WPtDE0xCQzaz34H6YmBYLwAhov9HwvXCWxI0kZyfo4Xjb0d0eluqJV+U742dMT10Np ZDzsyCRdFicr93rr7hjfphvXz2HnPesiUrpKhZ9b6DoMcl0mRbcrYFOlHTrU3FEiDjoM pTyggGY//kKcu0ofewzh1dMrhM0T2TULWZBC0jDGzdiy8spL5UZ4Zw0dtp4/K8di8BJe EoUwUSSL1O0Nt62YcnHxiNxb+qOGNsgLJsOnC7ob2TlEal05JS98v5Zc2HgaZsgqPsEv 4jPxErLaXO6LMe6XCMVlqrq6IRQJq/r6Mosufwt5+W2EjpP3FNXfxGS7IQ5annUcXMSG FxuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="M2eG9b/r"; 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 z23-20020a1709064e1700b009829cb69a02si5888043eju.1034.2023.06.28.09.46.17; Wed, 28 Jun 2023 09:46:53 -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="M2eG9b/r"; 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 S232236AbjF1Qal (ORCPT + 99 others); Wed, 28 Jun 2023 12:30:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232262AbjF1Q3z (ORCPT ); Wed, 28 Jun 2023 12:29:55 -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 94DD02690 for ; Wed, 28 Jun 2023 09:29:54 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-4f766777605so8457343e87.1 for ; Wed, 28 Jun 2023 09:29:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687969793; x=1690561793; 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=9eMvEkJ/XegETFODHiz62mk7KCxYtx3hl5+l1ieaHBA=; b=M2eG9b/rwLJbJ+ZYensGn99Z3sahqkhwgsICE+uWcaeCOhsMZixj0R91WrZhWHqvcT n077rgit6FDUr5nM+sZR6cA1yP9+24oT3o4DzuvO5+NGFm2ZSHsfTWKQSmmq2ClZweEH KU0lHXDJObPPbiBqKhxzrEB2ZPPFI8it67dn8IqsxVpiJmTQKFanRhkpwsx3UmQuQV6P FN0/+23yrw/BmMu+s+bAodxLNjgUYIK6dwYMMOG3TsEfZ5zhdfnvcisUm26xEq+oBd6v SElLQ5rIRNneoicmeE1ikfUOSowdZa11gUYoCWgqZo6j/h6BHzPhG0Fh1tzyJAUjIspc lUWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687969793; x=1690561793; 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=9eMvEkJ/XegETFODHiz62mk7KCxYtx3hl5+l1ieaHBA=; b=YoUrEgkrAD2IzoqD0VVrTy/9eUF3fLnhksa9JiHSZqEC2d9XcZ0fkMNl5E9ZiE1RsI khCQ5us23zhyu835TO/Wxz45mlExd3AVJhdS1Py/Ykr4QTJvSF2TiSa668ecZfkamCg8 acsYvYM+WQyhwKQVLun0eKpvEW1eMgsJlgefSII5e9En5RUjhiU/v8SYj28FT59H8W+b pNYad7W2N62sVKM8Ptpgz5V9hXV9bkNxIGq/DfoxqjBwI1bjRlbw2FbJFbMTGEqK6BBo AebS07FU3Lfw1ZYm/uH2fABj1lDYYTSj9OFWs8xhHhmBNdFEYMbmO82qyQeqwillfQAd MAbw== X-Gm-Message-State: AC+VfDzFTQSfXnaoP/Kewpnr8Y6HK+ztfo0GlSP5kbrKFzCFGxwg4WIB Uael9ZGA35fBIdzm9KUvCJtzgw== X-Received: by 2002:a05:6512:2024:b0:4f9:dac6:2f41 with SMTP id s4-20020a056512202400b004f9dac62f41mr6940702lfs.2.1687969792904; Wed, 28 Jun 2023 09:29:52 -0700 (PDT) Received: from [192.168.1.101] (abyk82.neoplus.adsl.tpnet.pl. [83.9.30.82]) by smtp.gmail.com with ESMTPSA id v28-20020a056512049c00b004faeedbb29dsm1678783lfq.64.2023.06.28.09.29.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jun 2023 09:29:52 -0700 (PDT) From: Konrad Dybcio Date: Wed, 28 Jun 2023 18:29:47 +0200 Subject: [PATCH 3/4] dt-bindings: display/msm: dsi-controller-main: Allow refgen-supply MIME-Version: 1.0 Message-Id: <20230628-topic-refgen-v1-3-126e59573eeb@linaro.org> References: <20230628-topic-refgen-v1-0-126e59573eeb@linaro.org> In-Reply-To: <20230628-topic-refgen-v1-0-126e59573eeb@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=1687969785; l=919; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=PSg1b4zAMPXvW/Hco4OyLK9NQz9E7zBcyA/3he+DDzs=; b=+OPEQNKdq4VxxdpETYujbLytJ4CfZJo5uT5nocAXxJ+Eyh9ZqgvBwYThV/7U27B/FHOT38/Me IiuUpQ7aMsjCNHKV40ETBzW3EwM7J1JB/Vf8qqxL5H0O4LwU2c1qKah 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,URIBL_BLOCKED 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?1769965683234977462?= X-GMAIL-MSGID: =?utf-8?q?1769965683234977462?= DSI host needs REFGEN to be enabled (if it's present on a given platform). Allow consuming it. Signed-off-by: Konrad Dybcio Acked-by: Rob Herring --- .../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 Wed Jun 28 16:29:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 113970 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp9061937vqr; Wed, 28 Jun 2023 09:44:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5L2J3Xl8s/7yDe3R3lBfoKu3hXG20zp5kBbfyBuirENk/3a8NosADo7Sq4PioZMvDL5cJz X-Received: by 2002:a05:6402:35c3:b0:51d:9a92:24f0 with SMTP id z3-20020a05640235c300b0051d9a9224f0mr8231419edc.4.1687970661050; Wed, 28 Jun 2023 09:44:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687970661; cv=none; d=google.com; s=arc-20160816; b=r1Rk/0S3gL0u7h+sogv5GKDbeaUdT/D+GkPbExsPIoJvVXYdQr59hzU913UW5Hv4+J u/kmhTEBpsbS0Hmpu5o/ZeYSTrM9Wws3kfQvU+4E6QtGYjoxYLgJvN6jPzAWvzS6ZL4a U6UVmlxugybrfPdp4a4xVofQiV49J+BCVW/toGG0yBwb84rpZUoc8sWGrjh1kqRzWWj1 F8bdyuDqzhAKpCGrpMn4WnXJejwRN11AWEGmMrnxJuGcLfLAECnivciDwfhpKsnfuZ32 sOoI4An2br6ykwIS7RAWvhB9fcH2jNMsAisJuY5vDN9kNHhT2qjb4HyLY/Kp85VNqXGl KCtw== 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=FShNDmAfH4+ylYf91xm3NpS5lb1a9e1uV34FyKn+YoeJK8tLR5OD5oM0tqSZ9IrotQ lNBvzMRUnlhmtCqzisfveNdmWQt/+Kjaylm68Kz7X/Q6ieWwDjeJAmFTw6ypR8bzqZIw s8Yzoe5JsKEhgF8QXsHVhEB+p1f8aHjnv4Zclgmu9nGz6CQG8StKGBL0oTgSRC1woPKC h5uEnbuJy6KHJQyHMKt9Z/kLtPNIuAkXbIHo6TjKrH63DETZOdSyX8O52eQdA+DV9R7n I+nqSUBdQWaTl04fpwzBoNiS37c/akAFxKPDo14qLxJtnJg5oEQH7hximgqNte21Fe7J 2Riw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DQZ8bQM6; 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 a24-20020aa7cf18000000b0051d9b4a95b8si3435807edy.262.2023.06.28.09.43.44; Wed, 28 Jun 2023 09:44:21 -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=DQZ8bQM6; 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 S230373AbjF1QbC (ORCPT + 99 others); Wed, 28 Jun 2023 12:31:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232276AbjF1Q35 (ORCPT ); Wed, 28 Jun 2023 12:29:57 -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 8020D26AB for ; Wed, 28 Jun 2023 09:29:56 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-4fb7dc16ff0so4170067e87.2 for ; Wed, 28 Jun 2023 09:29:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687969795; x=1690561795; 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=DQZ8bQM6OK1Jdf9uCG5L3p0W5NUTxn2k5hoJpqJ89L7veP52vetsvHAr9/3u2T02s3 FwN4eefSkPJdvODiqNbplGuLRIWZ9Ug+o+/AbFNmiw3XMd8YQpmooiF/N1hUHh6vhSbk +ZrenMM5DtHlclnuBwZWPPEv3Ol5pFBCNQrhnDE8PhJzrMoTF3hwMBgVtWxIpX2LQ8Bh J8uqKwhu4k/HYE5Y5Jcu11vJbOynqrOf5likeOo+7J2v3/gC2Fd1cRt5h/ihwA/b/FZz zFCTB1P8rWz7AkjVdLLpogD/SCEe4jP4gZDSyaMdjoEdjth37IpwKnetCTIOvTGKKC7J ohjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687969795; x=1690561795; 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=NqdaHJ2eCp1ArudWpFeZcpaLf/iBJgk5LrkTBnD8p9vUEziwIOcogFfzGBxcnPdgTg OW8UT6FFp34o0y69esA+xPhHUQoUPtIltphoH1731roWozhJgLIoVf0RxOsTeY07PERb ++tHLSF8bOfGHHSbSZkeIyT4uxSxIIzkSlc5Dql4vbtbLiqQm4RS62FxbPx2IIU6I4oz YY5ZnuX2q5g0+VvleGqg3II+YaGmsd7HBE5cs98N2rU67hhO5hArBP+45eLuB2nxh4MT X4NQ78tQTPsuH4htDiHaAlLBlt8rE/FaWBVkKO+/7KIg32EOcgTYOZktIijzDE+HG4uk 3Iww== X-Gm-Message-State: AC+VfDyc2QhYfRDnnhziDykW12n7ZDwVfBiSXrk3Jws/DW7CBkOEAWSx AIRou+buomQdaYeWYZF4U5B9RA== X-Received: by 2002:a05:6512:3d26:b0:4fb:89c1:c209 with SMTP id d38-20020a0565123d2600b004fb89c1c209mr4023314lfv.62.1687969794861; Wed, 28 Jun 2023 09:29:54 -0700 (PDT) Received: from [192.168.1.101] (abyk82.neoplus.adsl.tpnet.pl. [83.9.30.82]) by smtp.gmail.com with ESMTPSA id v28-20020a056512049c00b004faeedbb29dsm1678783lfq.64.2023.06.28.09.29.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jun 2023 09:29:54 -0700 (PDT) From: Konrad Dybcio Date: Wed, 28 Jun 2023 18:29:48 +0200 Subject: [PATCH 4/4] drm/msm/dsi: Hook up refgen regulator MIME-Version: 1.0 Message-Id: <20230628-topic-refgen-v1-4-126e59573eeb@linaro.org> References: <20230628-topic-refgen-v1-0-126e59573eeb@linaro.org> In-Reply-To: <20230628-topic-refgen-v1-0-126e59573eeb@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=1687969785; l=1019; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=bdVFkIHME+ksW97iOZJH0yeZoPTsVUfCpblAjJVbJjI=; b=k+jAhj46mh/Oof9GvJUQpt/J2u2Kf9BOt4qC0dCu0ivMbU0GBjjqGdhsVkkJrQVyrqAml8JoS YHTy+kjdBZUDW1wpX+4zBYjHF71ydli6DvpRMxSVeEkmb7N7RPRelKx 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,URIBL_BLOCKED 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?1769965523927062255?= X-GMAIL-MSGID: =?utf-8?q?1769965523927062255?= 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 = {