From patchwork Wed Oct 18 12:30:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dzmitry Sankouski X-Patchwork-Id: 154856 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp4753817vqb; Wed, 18 Oct 2023 05:31:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE/Y1/4Rt1SAUTv2c51EsIJh0r4pteWoDlk1/3jPpJq+rmEM5uSSd1CKp+d0RYQB+RXF1+1 X-Received: by 2002:a05:6a21:a5a0:b0:17a:e03f:38b7 with SMTP id gd32-20020a056a21a5a000b0017ae03f38b7mr5387221pzc.6.1697632272458; Wed, 18 Oct 2023 05:31:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697632272; cv=none; d=google.com; s=arc-20160816; b=tr1Xf6q5qY8wzYoy88sEXCk5Fvelqt5vP4kXxplLFqVLcpDakEj057cChnNeGa2PwB fb3hdJwgX2kFcSgh9q81h0DwC8JWSiTaxtXMSPFga7kedJHAFF5Kvj1OOgFeg2et2QSQ bFFn+w63Axzz9dAIdi/gWs5zNdkk/Q8Hddymss2wWqVmt38dTuZd5KvW6RA/TyxQaeLe tybU+GYPxNKbNnbiENL6f11lIFuATbq8/hYOdBlUR05YKSZvD6SNF6ZKD5a9nY/Itgau oJI0o8ev+wNp0eVlz+ry8aGKZR6TvTkS/xh+bvRjnRzFAK+wGPwSJvqX9chj4zZ3TP5Q 0/1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=hh0PaWeJhjip73nWeEJkqyL1aarHHe29wL5yfGX2sZg=; fh=q6zfOX1gmmasHvH6AMZB1ijD+1/3WSJ0fPM/Os/ZcA8=; b=sPjEajNc+rIQDCSxcNzYq1KhLQGbquq5lycEz31zGDc4eAPJxq/RcNATJ5KLJJtFx/ VVfAO9zD5WXzJT8zpFkLNycEgm+aP4W+KN/h/5/X5etenR1tZsUdhnYfSqWXKWBbIu/d jOryHCgvKbhtXW+gnlbb3W/ECY7X24nDyuDBCYst+YWAGbgcf+N7/McPWcnPwO99z61Q HWs1eZAl+Bkr0jABhNSvpRfHypUD+4FCT8O8ruzDiWyeKNwUPjI6/oCe/6D+eVwyvkme UlF+aldvu4a8rC6qpL6eimygEXHSxSyY7eu3lVhQy576UsltQGCUUX3pOiNFek2FimmE hzlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=nrN5sCd9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id i185-20020a6387c2000000b005acd0dd0da0si1979153pge.70.2023.10.18.05.31.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 05:31:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=nrN5sCd9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id ED45481C0C8A; Wed, 18 Oct 2023 05:31:03 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229957AbjJRMat (ORCPT + 23 others); Wed, 18 Oct 2023 08:30:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231608AbjJRMao (ORCPT ); Wed, 18 Oct 2023 08:30:44 -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 721B5A3 for ; Wed, 18 Oct 2023 05:30:42 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-5079f9ec8d9so5632787e87.0 for ; Wed, 18 Oct 2023 05:30:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697632240; x=1698237040; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hh0PaWeJhjip73nWeEJkqyL1aarHHe29wL5yfGX2sZg=; b=nrN5sCd9blvWho2Zh7jIZyxwZau6StAA3DM6Y8YGVL4w45W/M7hO2UaF/uJoCszaRm VsUQQHLeh0A3SlGlUohbxgjIU2j/Pd3xoBiKbfD6PwufQXn8ttaKjZeAY+wMyXOETIw+ dXMC+boZeilakbZViF6rpVLWwOeMuwrM61rcAWVTNWq+i8Og2OZ7xsickJdeqzEIOQxg cshSAl+F6rVG6kskl2UBYnPMR8I5VcgbazW37XgD7V4lVskOwX1Tqke1Mxn2AiDnzn+X FadT8mEQJvtakhdxut6sZhZDtxRtAeMFSFr/o4lQvxIaR25xZ14C0erwDIgPJtdV+8r8 Qkog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697632240; x=1698237040; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hh0PaWeJhjip73nWeEJkqyL1aarHHe29wL5yfGX2sZg=; b=k4+KHpiFEhaeZpJzrC7rCQw82zWRJengcEcFNU71GIh4K7gfx+M4xRH/x7ZD3vKrsq fmA3Ccg2xCZKq7LMBSjfMk6aOMxaA2Aj9S0PlS0kllASJWxb29SfMlflXpq5KUBiHHYG nwD3U61xroM0iF9d+s4IjOmEFmu5haTaWpSprHm1raLA7UzMVf69kj8brfZDlyE6uMPR 866Ylhvh5upgQJQ+cOmSIUTWahDy6pebmvPVNFxlGTGyfdhIOQXedNozRdhLCzkOLEuK 7Jdeb5T8UqET9YAMF86PGgRVxARnY7zP51P+kGxzp/4zkLskLU2eN2y1E6M+UaOoSqMR u/BA== X-Gm-Message-State: AOJu0YwJm6bUht2uiiP/Bu1ziBVbXyv6lAYOtHxFOuYn6CkvfjlXbhYl PBmP/+MfYhFbnB9WQkSXHA3K+TLcab4= X-Received: by 2002:a05:6512:b96:b0:504:879c:34ac with SMTP id b22-20020a0565120b9600b00504879c34acmr1893482lfv.31.1697632240245; Wed, 18 Oct 2023 05:30:40 -0700 (PDT) Received: from debian.localdomain (mm-47-218-122-178.mgts.dynamic.pppoe.byfly.by. [178.122.218.47]) by smtp.googlemail.com with ESMTPSA id t8-20020ac243a8000000b005009b4d5c14sm679565lfl.265.2023.10.18.05.30.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 05:30:40 -0700 (PDT) From: Dzmitry Sankouski To: linux-kernel@vger.kernel.org Cc: Dzmitry Sankouski Subject: [PATCH 1/6] dt-bindings: regulator: add Samsung s2dos05 pmic Date: Wed, 18 Oct 2023 15:30:28 +0300 Message-Id: <20231018123033.301005-2-dsankouski@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231018123033.301005-1-dsankouski@gmail.com> References: <20231018123033.301005-1-dsankouski@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SORBS_WEB, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 18 Oct 2023 05:31:04 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780096457924079629 X-GMAIL-MSGID: 1780096457924079629 Add binding for the s2dos05 pmic found in the Samsung S9. Signed-off-by: Dzmitry Sankouski --- .../bindings/regulator/samsung,s2dos05.yaml | 89 +++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/samsung,s2dos05.yaml diff --git a/Documentation/devicetree/bindings/regulator/samsung,s2dos05.yaml b/Documentation/devicetree/bindings/regulator/samsung,s2dos05.yaml new file mode 100644 index 000000000000..b53d9f5a7d38 --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/samsung,s2dos05.yaml @@ -0,0 +1,89 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/samsung,s2dos05.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Samsung s2dos05 regulator + +maintainers: + - Dzmitry Sankouski + +description: | + The S2DOS05 is a companion power management IC for the smart phones. + Has 4 LDO and 1 BUCK regulators, and has capability to measure + current and power. Can detect short circuit on outputs. + +properties: + compatible: + const: samsung,s2dos05pmic + reg: + maxItems: 1 + + regulators: + type: object + description: List of regulators and its properties + + patternProperties: + "^s2dos05-buck1|s2dos05-ldo[1-4]$": + type: object + $ref: "regulator.yaml#" + unevaluatedProperties: false + + additionalProperties: false + +required: + - compatible + - reg + - regulators + +additionalProperties: false + +examples: + - | + regulator@60 { + compatible = "samsung,s2dos05pmic"; + reg = <0x60>; + pinctrl-names = "default"; + pinctrl-0 = <&s2dos05_irq>; + s2dos05,s2dos05_int = <&tlmm 0x31 0x0>; + + regulators { + s2dos05_ldo1: s2dos05-ldo1 { + regulator-name = "s2dos05-ldo1"; + regulator-min-microvolt = <0x16e360>; + regulator-max-microvolt = <0x1e8480>; + regulator-active-discharge = <0x1>; + }; + + s2dos05_ldo2: s2dos05-ldo2 { + regulator-name = "s2dos05-ldo2"; + regulator-min-microvolt = <0x1b7740>; + regulator-max-microvolt = <0x1b7740>; + regulator-active-discharge = <0x1>; + regulator-boot-on; + }; + + s2dos05_ldo3: s2dos05-ldo3 { + regulator-name = "s2dos05-ldo3"; + regulator-min-microvolt = <0x2dc6c0>; + regulator-max-microvolt = <0x2dc6c0>; + regulator-active-discharge = <0x1>; + regulator-boot-on; + }; + + s2dos05_ldo4: s2dos05-ldo4 { + regulator-name = "s2dos05-ldo4"; + regulator-min-microvolt = <0x2932e0>; + regulator-max-microvolt = <0x399a18>; + regulator-active-discharge = <0x1>; + }; + + s2dos05_buck1: s2dos05-buck1 { + regulator-name = "s2dos05-buck1"; + regulator-min-microvolt = <0xcf850>; + regulator-max-microvolt = <0x200b20>; + regulator-active-discharge = <0x1>; + }; + }; + }; From patchwork Wed Oct 18 12:30:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dzmitry Sankouski X-Patchwork-Id: 154861 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp4754295vqb; Wed, 18 Oct 2023 05:31:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFBFZoK/Dx0yKt62wMcl+V/eEt1zY0X5c7PZ85KqeRxsEWpWV+Xib7YbJ8vSfPiGpH0if3U X-Received: by 2002:a17:90b:3eca:b0:263:730b:f568 with SMTP id rm10-20020a17090b3eca00b00263730bf568mr5322054pjb.3.1697632314498; Wed, 18 Oct 2023 05:31:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697632314; cv=none; d=google.com; s=arc-20160816; b=HyMEpsdSqC+hFGl4cu1rtmDlEB1U2SKC+UlPdnFDbq1GsNmRrzyGdSRhp09khJial4 lWvF/qcAJj/yHcw1OofrUxo1bA05cqVngCA1ElIvylkL4Ya9yiQ6p1oh0Cu5wehIN2RB Q48GRIJ5KtW3VM4mHGkJSd1N7bPYagIhzBh+fLa+piNpSOu6WZIB6E/ntAqilMFxAOWB G7u4N310Got0hSBXaScqA3mudVPGcTTZw4tRg+mwj9htoqRkG1asiz7gRWYeKzM3DuSa nzVNhrrXXa5uQG6eN875A/4n0hpAE3Y2TsHvI8zeXV5jQcP2llIAhQiezLiyUcfRIlMF 9m2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=XEUVAsPtwnmLvhw1Y51lsQbwAkx/EjllgFx3Z+rz+RI=; fh=q6zfOX1gmmasHvH6AMZB1ijD+1/3WSJ0fPM/Os/ZcA8=; b=LZAKGStWtrGpwPImwqpIrpw5Ql0UEWY8WjeLdofWvxmNZSXcB/VFT53W3336NOnYtK T6yRZ7iZBg6Y5L2hbX2ZLknieLZWMBR2jlxu9sxPElZkOpXN6ubvw14AD2mq2M1HKZfe lkglYOA+ldA57WbRfQBq1HJv/FAyKmdnKu406yOQZmW3UTT4i3ktFaHkuLpmIlJLo/VA 6M5Ls+Ax6XzSNiRRRreaBz1n8IJaz5ixNRlKEQl6H9JyRERtUp2CHXk3ziEDgNR8jf5T S7NMcLbp8W/dg1F16gSv1IA5GdtwW0swmzTr/+ZfPbndRi+j79pX1a1lRqfpHsmxuaHw 75ZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=CU5LBsS8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id l64-20020a638843000000b00578f7063adasi2076435pgd.33.2023.10.18.05.31.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 05:31:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=CU5LBsS8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id DC55B802A375; Wed, 18 Oct 2023 05:31:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231755AbjJRMa6 (ORCPT + 23 others); Wed, 18 Oct 2023 08:30:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231747AbjJRMas (ORCPT ); Wed, 18 Oct 2023 08:30:48 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BEDD898 for ; Wed, 18 Oct 2023 05:30:43 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-507962561adso8038675e87.0 for ; Wed, 18 Oct 2023 05:30:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697632241; x=1698237041; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XEUVAsPtwnmLvhw1Y51lsQbwAkx/EjllgFx3Z+rz+RI=; b=CU5LBsS8mbzbGCf3rVRlQDsOMjiTTutQ9EjAbquLPNzgMgUdZI90Pjok3nkCDg0qWE AwkYlblmOTQiGhZIMlNgZ9lg1iBMh/+V/ATxW+WQxDqq+JRIddkgyalj3WAEpjK9iUbO WZRhJEJeLENYgXQM/aKYBsuWccUGaB9PoZJWimR8um+QnSiUI2aF6zUeLsCiCnI9sCPt 2rTNVwKvGuXcanyLLFwFXNpxTJLdNppg1ll6ccWvsfakqodQKTAZXgXEYVoKhKGd4DnS a/gJnh9AlJIITOaNyiMzVOiAt+EW3jqiQSrALR7p8B5KLau3vrQIJFy+05Wtvvs+ZltV dBOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697632241; x=1698237041; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XEUVAsPtwnmLvhw1Y51lsQbwAkx/EjllgFx3Z+rz+RI=; b=ubWaUX5LvZ08vWJ0U1PV+ibmJU8UqmgVPdrGQl+75yRwOHsX4YRd5AKyc4/gH8jBTY RBQ2cXnmZf18TypkvxDOzRHxDDT2FesJ7MtgRJjwEDbDqX1cCDh17Lqz8dvBPixTcHyA v8HKjRxDTd0yGp0+lHPK7iQ5V2feCbNjsfGS5fcMknLQVx3PHI2fQeTTPal7TW6sKUoT r9MYhiTG167Zog7THu2zhPh4fdn3IUXV+LCtK337RWegCtm6qvkZjaCD28qcV2U1NJf3 tJaDJmC7GGc65NaUOoDv+iCj9sPE26dqqywqYAfP0vXUcJPMSX8uib7kvIb1bGoGyZa/ 6ZUQ== X-Gm-Message-State: AOJu0YwavVrkXNgRxuVGofXU2ubRjxSKoYmS5nRTQt+P/P/OTLcQvjbE mtLdmFZFkta0zdGyGyvX6nQeKvmqwFs= X-Received: by 2002:ac2:4c4b:0:b0:500:cb2b:8678 with SMTP id o11-20020ac24c4b000000b00500cb2b8678mr5006824lfk.40.1697632241271; Wed, 18 Oct 2023 05:30:41 -0700 (PDT) Received: from debian.localdomain (mm-47-218-122-178.mgts.dynamic.pppoe.byfly.by. [178.122.218.47]) by smtp.googlemail.com with ESMTPSA id t8-20020ac243a8000000b005009b4d5c14sm679565lfl.265.2023.10.18.05.30.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 05:30:40 -0700 (PDT) From: Dzmitry Sankouski To: linux-kernel@vger.kernel.org Cc: Dzmitry Sankouski Subject: [PATCH 2/6] regulator: s2dos05: add Samsung s2dos05 driver Date: Wed, 18 Oct 2023 15:30:29 +0300 Message-Id: <20231018123033.301005-3-dsankouski@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231018123033.301005-1-dsankouski@gmail.com> References: <20231018123033.301005-1-dsankouski@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SORBS_WEB, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 18 Oct 2023 05:31:49 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780096502032506136 X-GMAIL-MSGID: 1780096502032506136 Add driver for s2dos05 regulator. The s2dos05 is a companion power management IC for the smart phones, and provides LDOs[1~4] and BUCKs[1]. Signed-off-by: Dzmitry Sankouski --- drivers/regulator/Kconfig | 8 + drivers/regulator/Makefile | 1 + drivers/regulator/s2dos05.c | 601 ++++++++++++++++++++++++++++++ include/linux/regulator/s2dos05.h | 173 +++++++++ 4 files changed, 783 insertions(+) create mode 100644 drivers/regulator/s2dos05.c create mode 100644 include/linux/regulator/s2dos05.h diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig index 823f8e6e4801..ec18439edc6a 100644 --- a/drivers/regulator/Kconfig +++ b/drivers/regulator/Kconfig @@ -1232,6 +1232,14 @@ config REGULATOR_RTQ6752 synchronous boost converters for PAVDD, and one synchronous NAVDD buck-boost. This device is suitable for automotive TFT-LCD panel. +config REGULATOR_S2DOS05 + tristate "SLSI S2DOS05 regulator" + depends on I2C + help + This driver provides support for the voltage regulators of the S2DOS05. + The S2DOS05 is a companion power management IC for the smart phones. + The S2DOS05 handles LDO and BUCK control + config REGULATOR_S2MPA01 tristate "Samsung S2MPA01 voltage regulator" depends on MFD_SEC_CORE || COMPILE_TEST diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile index 15e0d614ff66..b59f729b7af7 100644 --- a/drivers/regulator/Makefile +++ b/drivers/regulator/Makefile @@ -145,6 +145,7 @@ obj-$(CONFIG_REGULATOR_RT6245) += rt6245-regulator.o obj-$(CONFIG_REGULATOR_RTMV20) += rtmv20-regulator.o obj-$(CONFIG_REGULATOR_RTQ2134) += rtq2134-regulator.o obj-$(CONFIG_REGULATOR_RTQ6752) += rtq6752-regulator.o +obj-$(CONFIG_REGULATOR_S2DOS05) += s2dos05.o obj-$(CONFIG_REGULATOR_S2MPA01) += s2mpa01.o obj-$(CONFIG_REGULATOR_S2MPS11) += s2mps11.o obj-$(CONFIG_REGULATOR_S5M8767) += s5m8767.o diff --git a/drivers/regulator/s2dos05.c b/drivers/regulator/s2dos05.c new file mode 100644 index 000000000000..01b8b9834289 --- /dev/null +++ b/drivers/regulator/s2dos05.c @@ -0,0 +1,601 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * s2dos05.c - Regulator driver for the Samsung s2dos05 + * + * Copyright (C) 2016 Samsung Electronics + * Copyright (C) 2023 Dzmitry Sankouski + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +struct s2dos05_data { + struct s2dos05_dev *iodev; + int num_regulators; + struct regulator_dev *rdev[S2DOS05_REGULATOR_MAX]; + int opmode[S2DOS05_REGULATOR_MAX]; +}; + +int s2dos05_read_reg(struct i2c_client *i2c, u8 reg, u8 *dest) +{ + struct s2dos05_dev *s2dos05 = i2c_get_clientdata(i2c); + int ret; + + mutex_lock(&s2dos05->i2c_lock); + ret = i2c_smbus_read_byte_data(i2c, reg); + mutex_unlock(&s2dos05->i2c_lock); + if (ret < 0) { + pr_info("%s:%s reg(0x%x), ret(%d)\n", + MFD_DEV_NAME, __func__, reg, ret); + return ret; + } + + ret &= 0xff; + *dest = ret; + return 0; +} +EXPORT_SYMBOL_GPL(s2dos05_read_reg); + +int s2dos05_write_reg(struct i2c_client *i2c, u8 reg, u8 value) +{ + struct s2dos05_dev *s2dos05 = i2c_get_clientdata(i2c); + int ret; + + mutex_lock(&s2dos05->i2c_lock); + ret = i2c_smbus_write_byte_data(i2c, reg, value); + mutex_unlock(&s2dos05->i2c_lock); + if (ret < 0) + pr_info("%s:%s reg(0x%x), ret(%d)\n", + MFD_DEV_NAME, __func__, reg, ret); + + return ret; +} + +int s2dos05_update_reg(struct i2c_client *i2c, u8 reg, u8 val, u8 mask) +{ + struct s2dos05_dev *s2dos05 = i2c_get_clientdata(i2c); + int ret; + u8 old_val, new_val; + + mutex_lock(&s2dos05->i2c_lock); + ret = i2c_smbus_read_byte_data(i2c, reg); + if (ret >= 0) { + old_val = ret & 0xff; + new_val = (val & mask) | (old_val & (~mask)); + ret = i2c_smbus_write_byte_data(i2c, reg, new_val); + } + mutex_unlock(&s2dos05->i2c_lock); + return ret; +} + +int s2dos05_bulk_read(struct i2c_client *i2c, u8 reg, int count, u8 *buf) +{ + struct s2dos05_dev *s2dos05 = i2c_get_clientdata(i2c); + int ret; + + mutex_lock(&s2dos05->i2c_lock); + ret = i2c_smbus_read_i2c_block_data(i2c, reg, count, buf); + mutex_unlock(&s2dos05->i2c_lock); + if (ret < 0) + return ret; + + return 0; +} + +int s2dos05_read_word(struct i2c_client *i2c, u8 reg) +{ + struct s2dos05_dev *s2dos05 = i2c_get_clientdata(i2c); + int ret; + + mutex_lock(&s2dos05->i2c_lock); + ret = i2c_smbus_read_word_data(i2c, reg); + mutex_unlock(&s2dos05->i2c_lock); + if (ret < 0) + return ret; + + return ret; +} + +int s2dos05_bulk_write(struct i2c_client *i2c, u8 reg, int count, u8 *buf) +{ + struct s2dos05_dev *s2dos05 = i2c_get_clientdata(i2c); + int ret; + + mutex_lock(&s2dos05->i2c_lock); + ret = i2c_smbus_write_i2c_block_data(i2c, reg, count, buf); + mutex_unlock(&s2dos05->i2c_lock); + if (ret < 0) + return ret; + + return 0; +} + +#ifdef CONFIG_DEBUG_FS +static int s2dos05_regdump_show(struct seq_file *s, void *unused) +{ + struct s2dos05_dev *s2dos05_dev = s->private; + u8 i, val = 0; + + for (i = S2DOS05_REG_STAT; i <= S2DOS05_REG_IRQ; i++) { + s2dos05_read_reg(s2dos05_dev->i2c, i, &val); + seq_printf(s, "0x%x: 0x%x\n", i, val); + } + + return 0; +} + +static int s2dos05_regdump_open(struct inode *inode, struct file *file) +{ + return single_open(file, s2dos05_regdump_show, inode->i_private); +} + +static const struct file_operations s2dos05_regdump_operations = { + .open = s2dos05_regdump_open, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; + +static void s2dos05_debugfs_init(struct s2dos05_dev *s2dos05) +{ + debugfs_create_file("s2dos05_regdump", 0440, + NULL, s2dos05, &s2dos05_regdump_operations); +} +#endif + +static int s2m_enable(struct regulator_dev *rdev) +{ + struct s2dos05_data *info = rdev_get_drvdata(rdev); + struct i2c_client *i2c = info->iodev->i2c; + + return s2dos05_update_reg(i2c, rdev->desc->enable_reg, + info->opmode[rdev_get_id(rdev)], + rdev->desc->enable_mask); +} + +static int s2m_disable_regmap(struct regulator_dev *rdev) +{ + struct s2dos05_data *info = rdev_get_drvdata(rdev); + struct i2c_client *i2c = info->iodev->i2c; + u8 val; + + if (rdev->desc->enable_is_inverted) + val = rdev->desc->enable_mask; + else + val = 0; + + return s2dos05_update_reg(i2c, rdev->desc->enable_reg, + val, rdev->desc->enable_mask); +} + +static int s2m_is_enabled_regmap(struct regulator_dev *rdev) +{ + struct s2dos05_data *info = rdev_get_drvdata(rdev); + struct i2c_client *i2c = info->iodev->i2c; + int ret; + u8 val; + + ret = s2dos05_read_reg(i2c, rdev->desc->enable_reg, &val); + if (ret < 0) + return ret; + + if (rdev->desc->enable_is_inverted) + return (val & rdev->desc->enable_mask) == 0; + else + return (val & rdev->desc->enable_mask) != 0; +} + +static int s2m_get_voltage_sel_regmap(struct regulator_dev *rdev) +{ + struct s2dos05_data *info = rdev_get_drvdata(rdev); + struct i2c_client *i2c = info->iodev->i2c; + int ret; + u8 val; + + ret = s2dos05_read_reg(i2c, rdev->desc->vsel_reg, &val); + if (ret < 0) + return ret; + + val &= rdev->desc->vsel_mask; + + return val; +} + +static int s2m_set_voltage_sel_regmap(struct regulator_dev *rdev, + unsigned int sel) +{ + struct s2dos05_data *info = rdev_get_drvdata(rdev); + struct i2c_client *i2c = info->iodev->i2c; + int ret; + + ret = s2dos05_update_reg(i2c, rdev->desc->vsel_reg, + sel, rdev->desc->vsel_mask); + if (ret < 0) + goto out; + + if (rdev->desc->apply_bit) + ret = s2dos05_update_reg(i2c, rdev->desc->apply_reg, + rdev->desc->apply_bit, + rdev->desc->apply_bit); + return ret; +out: + pr_warn("%s: failed to set voltage_sel_regmap\n", rdev->desc->name); + return ret; +} + +static int s2m_set_voltage_sel_regmap_buck(struct regulator_dev *rdev, + unsigned int sel) +{ + struct s2dos05_data *info = rdev_get_drvdata(rdev); + struct i2c_client *i2c = info->iodev->i2c; + int ret; + + ret = s2dos05_write_reg(i2c, rdev->desc->vsel_reg, sel); + if (ret < 0) + goto out; + + if (rdev->desc->apply_bit) + ret = s2dos05_update_reg(i2c, rdev->desc->apply_reg, + rdev->desc->apply_bit, + rdev->desc->apply_bit); + return ret; +out: + pr_warn("%s: failed to set voltage_sel_regmap\n", rdev->desc->name); + return ret; +} + +static int s2m_set_voltage_time_sel(struct regulator_dev *rdev, + unsigned int old_selector, + unsigned int new_selector) +{ + int old_volt, new_volt; + + /* sanity check */ + if (!rdev->desc->ops->list_voltage) + return -EINVAL; + + old_volt = rdev->desc->ops->list_voltage(rdev, old_selector); + new_volt = rdev->desc->ops->list_voltage(rdev, new_selector); + + if (old_selector < new_selector) + return DIV_ROUND_UP(new_volt - old_volt, S2DOS05_RAMP_DELAY); + + return 0; +} + +static int s2m_set_active_discharge(struct regulator_dev *rdev, + bool enable) +{ + struct s2dos05_data *info = rdev_get_drvdata(rdev); + struct i2c_client *i2c = info->iodev->i2c; + int ret; + u8 val; + + if (enable) + val = rdev->desc->active_discharge_on; + else + val = rdev->desc->active_discharge_off; + + ret = s2dos05_update_reg(i2c, rdev->desc->active_discharge_reg, + val, rdev->desc->active_discharge_mask); + return ret; +} + +static const struct regulator_ops s2dos05_ldo_ops = { + .list_voltage = regulator_list_voltage_linear, + .map_voltage = regulator_map_voltage_linear, + .is_enabled = s2m_is_enabled_regmap, + .enable = s2m_enable, + .disable = s2m_disable_regmap, + .get_voltage_sel = s2m_get_voltage_sel_regmap, + .set_voltage_sel = s2m_set_voltage_sel_regmap, + .set_voltage_time_sel = s2m_set_voltage_time_sel, + .set_active_discharge = s2m_set_active_discharge, +}; + +static const struct regulator_ops s2dos05_buck_ops = { + .list_voltage = regulator_list_voltage_linear, + .map_voltage = regulator_map_voltage_linear, + .is_enabled = s2m_is_enabled_regmap, + .enable = s2m_enable, + .disable = s2m_disable_regmap, + .get_voltage_sel = s2m_get_voltage_sel_regmap, + .set_voltage_sel = s2m_set_voltage_sel_regmap_buck, + .set_voltage_time_sel = s2m_set_voltage_time_sel, + .set_active_discharge = s2m_set_active_discharge, +}; + +#define _BUCK(macro) S2DOS05_BUCK##macro +#define _buck_ops(num) s2dos05_buck_ops##num + +#define _LDO(macro) S2DOS05_LDO##macro +#define _REG(ctrl) S2DOS05_REG##ctrl +#define _ldo_ops(num) s2dos05_ldo_ops##num +#define _MASK(macro) S2DOS05_ENABLE_MASK##macro +#define _TIME(macro) S2DOS05_ENABLE_TIME##macro + +#define BUCK_DESC(_name, _id, _ops, m, s, v, e, em, t, a) { \ + .name = _name, \ + .id = _id, \ + .ops = _ops, \ + .type = REGULATOR_VOLTAGE, \ + .owner = THIS_MODULE, \ + .min_uV = m, \ + .uV_step = s, \ + .n_voltages = S2DOS05_BUCK_N_VOLTAGES, \ + .vsel_reg = v, \ + .vsel_mask = S2DOS05_BUCK_VSEL_MASK, \ + .enable_reg = e, \ + .enable_mask = em, \ + .enable_time = t, \ + .active_discharge_off = 0, \ + .active_discharge_on = S2DOS05_BUCK_FD_MASK, \ + .active_discharge_reg = a, \ + .active_discharge_mask = S2DOS05_BUCK_FD_MASK \ +} + +#define LDO_DESC(_name, _id, _ops, m, s, v, e, em, t, a) { \ + .name = _name, \ + .id = _id, \ + .ops = _ops, \ + .type = REGULATOR_VOLTAGE, \ + .owner = THIS_MODULE, \ + .min_uV = m, \ + .uV_step = s, \ + .n_voltages = S2DOS05_LDO_N_VOLTAGES, \ + .vsel_reg = v, \ + .vsel_mask = S2DOS05_LDO_VSEL_MASK, \ + .enable_reg = e, \ + .enable_mask = em, \ + .enable_time = t, \ + .active_discharge_off = 0, \ + .active_discharge_on = S2DOS05_LDO_FD_MASK, \ + .active_discharge_reg = a, \ + .active_discharge_mask = S2DOS05_LDO_FD_MASK \ +} + +static struct regulator_desc regulators[S2DOS05_REGULATOR_MAX] = { + /* name, id, ops, min_uv, uV_step, vsel_reg, enable_reg */ + LDO_DESC("s2dos05-ldo1", _LDO(1), &_ldo_ops(), _LDO(_MIN1), + _LDO(_STEP1), _REG(_LDO1_CFG), + _REG(_EN), _MASK(_L1), _TIME(_LDO), _REG(_LDO1_CFG)), + LDO_DESC("s2dos05-ldo2", _LDO(2), &_ldo_ops(), _LDO(_MIN1), + _LDO(_STEP1), _REG(_LDO2_CFG), + _REG(_EN), _MASK(_L2), _TIME(_LDO), _REG(_LDO2_CFG)), + LDO_DESC("s2dos05-ldo3", _LDO(3), &_ldo_ops(), _LDO(_MIN2), + _LDO(_STEP1), _REG(_LDO3_CFG), + _REG(_EN), _MASK(_L3), _TIME(_LDO), _REG(_LDO3_CFG)), + LDO_DESC("s2dos05-ldo4", _LDO(4), &_ldo_ops(), _LDO(_MIN2), + _LDO(_STEP1), _REG(_LDO4_CFG), + _REG(_EN), _MASK(_L4), _TIME(_LDO), _REG(_LDO4_CFG)), + BUCK_DESC("s2dos05-buck1", _BUCK(1), &_buck_ops(), _BUCK(_MIN1), + _BUCK(_STEP1), _REG(_BUCK_VOUT), + _REG(_EN), _MASK(_B1), _TIME(_BUCK), _REG(_BUCK_CFG)), +}; + +#ifdef CONFIG_OF +static int s2dos05_pmic_dt_parse_pdata(struct device *dev, + struct s2dos05_platform_data *pdata) +{ + struct device_node *pmic_np, *regulators_np, *reg_np; + struct s2dos05_regulator_data *rdata; + unsigned int i; + + pmic_np = dev->of_node; + if (!pmic_np) { + dev_err(dev, "could not find pmic sub-node\n"); + return -ENODEV; + } + + pdata->dp_irq = of_get_named_gpio(pmic_np, "s2dos05,s2dos05_int", 0); + if (pdata->dp_irq < 0) + pr_err("%s error reading s2dos05_irq = %d\n", + __func__, pdata->dp_irq); + + pdata->wakeup = of_property_read_bool(pmic_np, "s2dos05,wakeup"); + + regulators_np = of_find_node_by_name(pmic_np, "regulators"); + if (!regulators_np) { + dev_err(dev, "could not find regulators sub-node\n"); + return -EINVAL; + } + + /* count the number of regulators to be supported in pmic */ + pdata->num_regulators = 0; + for_each_child_of_node(regulators_np, reg_np) { + pdata->num_regulators++; + } + + rdata = devm_kzalloc(dev, sizeof(*rdata) * + pdata->num_regulators, GFP_KERNEL); + if (!rdata) + return -ENOMEM; + + pdata->regulators = rdata; + for_each_child_of_node(regulators_np, reg_np) { + for (i = 0; i < ARRAY_SIZE(regulators); i++) + if (!of_node_cmp(reg_np->name, + regulators[i].name)) + break; + + if (i == ARRAY_SIZE(regulators)) { + dev_warn(dev, + "don't know how to configure regulator %s\n", + reg_np->name); + continue; + } + + rdata->id = i; + rdata->initdata = of_get_regulator_init_data( + dev, reg_np, + ®ulators[i]); + rdata->reg_node = reg_np; + rdata++; + } + of_node_put(regulators_np); + + return 0; +} +#else +static int s2dos05_pmic_dt_parse_pdata(struct s2dos05_dev *iodev, + struct s2dos05_platform_data *pdata) +{ + return 0; +} +#endif /* CONFIG_OF */ + +static int s2dos05_pmic_probe(struct i2c_client *i2c) +{ + struct s2dos05_dev *iodev; + struct device *dev = &i2c->dev; + struct s2dos05_platform_data *pdata = i2c->dev.platform_data; + struct regulator_config config = { }; + struct s2dos05_data *s2dos05; + int i; + int ret = 0; + + pr_info("%s:%s\n", MFD_DEV_NAME, __func__); + + iodev = kzalloc(sizeof(struct s2dos05_dev), GFP_KERNEL); + if (!iodev) + return -ENOMEM; + + if (i2c->dev.of_node) { + pdata = devm_kzalloc(&i2c->dev, + sizeof(struct s2dos05_platform_data), GFP_KERNEL); + if (!pdata) { + ret = -ENOMEM; + goto err_pdata; + } + ret = s2dos05_pmic_dt_parse_pdata(&i2c->dev, pdata); + if (ret < 0) { + dev_err(&i2c->dev, "Failed to get device of_node\n"); + goto err_dt; + } + + i2c->dev.platform_data = pdata; + } else + pdata = i2c->dev.platform_data; + + iodev->dev = &i2c->dev; + iodev->i2c = i2c; + + if (pdata) { + iodev->pdata = pdata; + iodev->wakeup = pdata->wakeup; + } else { + ret = -EINVAL; + goto err_dt; + } + mutex_init(&iodev->i2c_lock); + i2c_set_clientdata(i2c, iodev); + + s2dos05 = devm_kzalloc(&i2c->dev, sizeof(struct s2dos05_data), + GFP_KERNEL); + if (!s2dos05) { + ret = -EINVAL; + goto err_data; + } + + s2dos05->iodev = iodev; + s2dos05->num_regulators = pdata->num_regulators; + + for (i = 0; i < pdata->num_regulators; i++) { + int id = pdata->regulators[i].id; + + config.dev = &i2c->dev; + config.init_data = pdata->regulators[i].initdata; + config.driver_data = s2dos05; + config.of_node = pdata->regulators[i].reg_node; + s2dos05->opmode[id] = regulators[id].enable_mask; + s2dos05->rdev[i] = regulator_register(dev, ®ulators[id], &config); + if (IS_ERR(s2dos05->rdev[i])) { + ret = PTR_ERR(s2dos05->rdev[i]); + dev_err(&i2c->dev, "regulator init failed for %d\n", + id); + s2dos05->rdev[i] = NULL; + goto err_rdata; + } + } + +#ifdef CONFIG_DEBUG_FS + s2dos05_debugfs_init(iodev); +#endif + + return ret; + +err_rdata: + pr_info("[%s:%d] err:\n", __FILE__, __LINE__); + for (i = 0; i < s2dos05->num_regulators; i++) + if (s2dos05->rdev[i]) + regulator_unregister(s2dos05->rdev[i]); +err_data: + mutex_destroy(&iodev->i2c_lock); + devm_kfree(&i2c->dev, (void *)s2dos05); +err_dt: + devm_kfree(&i2c->dev, (void *)pdata); +err_pdata: + kfree(iodev); + + return ret; +} + +static void s2dos05_pmic_remove(struct i2c_client *i2c) +{ + struct s2dos05_data *s2dos05 = i2c_get_clientdata(i2c); + int i; + + for (i = 0; i < s2dos05->num_regulators; i++) + if (s2dos05->rdev[i]) + regulator_unregister(s2dos05->rdev[i]); +} + +#if defined(CONFIG_OF) +static const struct of_device_id s2dos05_i2c_dt_ids[] = { + { .compatible = "samsung,s2dos05" }, + { }, +}; +MODULE_DEVICE_TABLE(of, s2dos05_i2c_dt_ids); +#endif /* CONFIG_OF */ + +#if defined(CONFIG_OF) +static const struct i2c_device_id s2dos05_pmic_id[] = { + {"s2dos05", 0}, + {}, +}; +MODULE_DEVICE_TABLE(i2c, s2dos05_pmic_id); +#endif /* CONFIG_OF */ + +static struct i2c_driver s2dos05_i2c_driver = { + .driver = { + .name = "s2dos05", +#if defined(CONFIG_OF) + .of_match_table = s2dos05_i2c_dt_ids, +#endif /* CONFIG_OF */ + .suppress_bind_attrs = true, + }, + .probe = s2dos05_pmic_probe, + .remove = s2dos05_pmic_remove, + .id_table = s2dos05_pmic_id, +}; +module_i2c_driver(s2dos05_i2c_driver); + +MODULE_DESCRIPTION("SAMSUNG s2dos05 Regulator Driver"); +MODULE_LICENSE("GPL"); diff --git a/include/linux/regulator/s2dos05.h b/include/linux/regulator/s2dos05.h new file mode 100644 index 000000000000..e33e86257589 --- /dev/null +++ b/include/linux/regulator/s2dos05.h @@ -0,0 +1,173 @@ +/* SPDX-License-Identifier: GPL-2.0+ + * s2dos05.h + * + * Copyright (c) 2016 Samsung Electronics Co., Ltd + * http://www.samsung.com + * + */ + +#ifndef __LINUX_MFD_S2DOS05_H +#define __LINUX_MFD_S2DOS05_H +#include +#include + +#define MFD_DEV_NAME "s2dos05" + +/** + * sec_regulator_data - regulator data + * @id: regulator id + * @initdata: regulator init data (constraints, supplies, ...) + */ + +struct s2dos05_dev { + struct device *dev; + struct i2c_client *i2c; /* 0xB2; PMIC, Flash LED */ + struct mutex i2c_lock; + + int type; + u8 rev_num; /* pmic Rev */ + bool wakeup; + int dp_irq; + int adc_mode; + int adc_sync_mode; + u8 adc_en_val; + + struct s2dos05_platform_data *pdata; +}; + +struct s2dos05_regulator_data { + int id; + struct regulator_init_data *initdata; + struct device_node *reg_node; +}; + +struct s2dos05_platform_data { + bool wakeup; + int num_regulators; + struct s2dos05_regulator_data *regulators; + int device_type; + int dp_irq; + + /* adc_mode + * 0 : not use + * 1 : current meter + * 2 : power meter + */ + int adc_mode; + /* 1 : sync mode, 2 : async mode */ + int adc_sync_mode; +}; + +struct s2dos05 { + struct regmap *regmap; +}; + +/* S2DOS05 registers */ +/* Slave Addr : 0xC0 */ +enum S2DOS05_reg { + S2DOS05_REG_DEV_ID, + S2DOS05_REG_TOPSYS_STAT, + S2DOS05_REG_STAT, + S2DOS05_REG_EN, + S2DOS05_REG_LDO1_CFG, + S2DOS05_REG_LDO2_CFG, + S2DOS05_REG_LDO3_CFG, + S2DOS05_REG_LDO4_CFG, + S2DOS05_REG_BUCK_CFG, + S2DOS05_REG_BUCK_VOUT, + S2DOS05_REG_IRQ_MASK = 0x0D, + S2DOS05_REG_SSD_TSD = 0x0E, + S2DOS05_REG_OCL = 0x10, + S2DOS05_REG_IRQ = 0x11 +}; + +/* S2DOS05 regulator ids */ +enum S2DOS05_regulators { + S2DOS05_LDO1, + S2DOS05_LDO2, + S2DOS05_LDO3, + S2DOS05_LDO4, + S2DOS05_BUCK1, + S2DOS05_REG_MAX, +}; + +#define S2DOS05_IRQ_PWRMT_MASK (1 << 5) +#define S2DOS05_IRQ_TSD_MASK (1 << 4) +#define S2DOS05_IRQ_SSD_MASK (1 << 3) +#define S2DOS05_IRQ_SCP_MASK (1 << 2) +#define S2DOS05_IRQ_UVLO_MASK (1 << 1) +#define S2DOS05_IRQ_OCD_MASK (1 << 0) + +#define S2DOS05_BUCK_MIN1 506250 +#define S2DOS05_LDO_MIN1 1500000 +#define S2DOS05_LDO_MIN2 2700000 +#define S2DOS05_BUCK_STEP1 6250 +#define S2DOS05_LDO_STEP1 25000 +#define S2DOS05_LDO_VSEL_MASK 0x7F +#define S2DOS05_LDO_FD_MASK 0x80 +#define S2DOS05_BUCK_VSEL_MASK 0xFF +#define S2DOS05_BUCK_FD_MASK 0x08 + +#define S2DOS05_ENABLE_MASK_L1 (1 << 0) +#define S2DOS05_ENABLE_MASK_L2 (1 << 1) +#define S2DOS05_ENABLE_MASK_L3 (1 << 2) +#define S2DOS05_ENABLE_MASK_L4 (1 << 3) +#define S2DOS05_ENABLE_MASK_B1 (1 << 4) + +#define S2DOS05_RAMP_DELAY 12000 + +#define S2DOS05_ENABLE_TIME_LDO 50 +#define S2DOS05_ENABLE_TIME_BUCK 350 + +#define S2DOS05_ENABLE_SHIFT 0x06 +#define S2DOS05_LDO_N_VOLTAGES (S2DOS05_LDO_VSEL_MASK + 1) +#define S2DOS05_BUCK_N_VOLTAGES (S2DOS05_BUCK_VSEL_MASK + 1) + +#define S2DOS05_PMIC_EN_SHIFT 6 +#define S2DOS05_REGULATOR_MAX (S2DOS05_REG_MAX) + +/* ----------power meter ----------*/ +#define S2DOS05_REG_PWRMT_CTRL1 0x0A +#define S2DOS05_REG_PWRMT_CTRL2 0x0B +#define S2DOS05_REG_PWRMT_DATA 0x0C +#define S2DOS05_REG_IRQ_MASK 0x0D + +#define CURRENT_ELVDD 2450 +#define CURRENT_ELVSS 2450 +#define CURRENT_AVDD 612 +#define CURRENT_BUCK 1220 +#define CURRENT_L1 2000 +#define CURRENT_L2 2000 +#define CURRENT_L3 2000 +#define CURRENT_L4 2000 + +#define POWER_ELVDD 24500 +#define POWER_ELVSS 24500 +#define POWER_AVDD 3060 +#define POWER_BUCK 1525 +#define POWER_L1 5000 +#define POWER_L2 5000 +#define POWER_L3 5000 +#define POWER_L4 5000 + +#define ADC_EN_MASK 0x80 +#define ADC_ASYNCRD_MASK 0x80 +#define ADC_PTR_MASK 0x0F +#define ADC_PGEN_MASK 0x30 +#define CURRENT_MODE 0x00 +#define POWER_MODE 0x10 +#define RAWCURRENT_MODE 0x20 +#define SMPNUM_MASK 0x0F + +#define S2DOS05_MAX_ADC_CHANNEL 8 + +void s2dos05_powermeter_init(struct s2dos05_dev *s2dos05); +void s2dos05_powermeter_deinit(struct s2dos05_dev *s2dos05); + +/* S2DOS05 shared i2c API function */ +int s2dos05_read_reg(struct i2c_client *i2c, u8 reg, u8 *dest); +int s2dos05_write_reg(struct i2c_client *i2c, u8 reg, u8 value); +int s2dos05_update_reg(struct i2c_client *i2c, u8 reg, u8 val, u8 mask); + + +#endif /* __LINUX_MFD_S2DOS05_H */ From patchwork Wed Oct 18 12:30:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dzmitry Sankouski X-Patchwork-Id: 154858 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp4753974vqb; Wed, 18 Oct 2023 05:31:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGpqywbVUQnHQn4Jb16qzDLxNd7iY7HeZ+ld7fICGfIWBB3A3goPprS4qHu1jjx8TZoSOzQ X-Received: by 2002:a92:cd4d:0:b0:350:f353:4017 with SMTP id v13-20020a92cd4d000000b00350f3534017mr5161635ilq.0.1697632286014; Wed, 18 Oct 2023 05:31:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697632285; cv=none; d=google.com; s=arc-20160816; b=CIJ/Iq5B3G1qZvtL+hSJK60rcP4zBgibSYyW7MwWns2lShVLab8KWBebbvSWrJ3gba jGiOJcU5r9EBFWyBc4Ioy45R7mvvKMsIq9JRzqC8zyFyEpGrCsFoONjs/vjzNiPEIsAf iRd2LkPwSmJMR969TW5eH23G1PmAfQC3PB+RSS1ot/3vP9/2y+pb69DNvQTCHJRZE4Qg 0OR0jVXHPkhkb011pVHjsDqij2wa8ApKvkvo/MrTRsD4LUK89juCoXzbnvQeOtij7dkG 9sMfaC5QXj5FuGsDF4Bgd2phttqcOlhtPN9gsV/I8LZqCDLxzutEbu0SLOr41Qz8Ga0y veFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=8TztbikkZ51VRIxmNeKA/VvxfbGv/p8LjK23sQPIxK0=; fh=q6zfOX1gmmasHvH6AMZB1ijD+1/3WSJ0fPM/Os/ZcA8=; b=HlgpJRUjUqWtOj+YIOJGOfM0mbDT1EVu6EXUqYyIkKykNiFtI6+/38M0d2IhrNOOIC s7QQLxgzmYHjrILe2zxUpnUpelvXnTdhd97IR8dDzf1D0Ac1AGgsBEEIv2Z0W4c15UoY ZSdByKdpfwtjp3zaqIZdgoK9szL5g8o1kl1rHHV/SPqc6k0/+U/U1R+QtLcPxNNEo+Vz EWYMmKAeFwTZe5jFWwc7hI8uvqrVMMcS39nQcUJur3PClUVFax3U5G82lEaMzTrhRcaR kMOOeugGLGOEW4LeccqURtoJ/7kvEjFns9tvwFoB5x0oOLp6ZGIGcHxniRr5iLMaWTBh DwHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=DJ231Vl9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id z3-20020a633303000000b0059bb496956csi1999498pgz.202.2023.10.18.05.31.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 05:31:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=DJ231Vl9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id A279F802B13A; Wed, 18 Oct 2023 05:31:23 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231852AbjJRMau (ORCPT + 23 others); Wed, 18 Oct 2023 08:30:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231371AbjJRMap (ORCPT ); Wed, 18 Oct 2023 08:30:45 -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 1D2E7A3 for ; Wed, 18 Oct 2023 05:30:44 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-507cd62472dso17664e87.0 for ; Wed, 18 Oct 2023 05:30:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697632242; x=1698237042; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8TztbikkZ51VRIxmNeKA/VvxfbGv/p8LjK23sQPIxK0=; b=DJ231Vl9NBb5hdZ9ngy94zsGQVSo0v/I30X9GekmxR3+pPNU2qqm5rwUHxvN88wpln VPE0216pJDfWi0tpA9fotc0Ih6JYWWL/f7HkAAjtTLJJXsoEI1f6mY4Ay90ttgw8pMZp ZIPqzv5MvcvwI6BpWkxLr9wHz4PUkdJQNzGthiKH54nD6fCEC9Lnqw7/9iscAUvMrJDk pwY1V577LakUoLfkGAoa0miohczj1N5BLMtEmfAQZ6u4mdr5f+dQZXT2GC0n7PixJPd1 0L5O5lFdUi0bgtEXQSe5/7MD6TRHzAfgAwdTTq0FUhu81vAyycUZWPzK7Vf/7AcqZCzS SOfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697632242; x=1698237042; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8TztbikkZ51VRIxmNeKA/VvxfbGv/p8LjK23sQPIxK0=; b=rkjda/GxPWNYsh3KhuKJSsfBuAVfFYfMaxRfMoPvQyYlDnKLLZJzJRzbgIa29JbRzh +ZENXX+y7WdweXobO9a8l0r2jJCvyiv7D1bkYNZp1dEw0i+gPIanFhUmhlyCc5BYGDJB RgV1GqdlZRc/jKuh0gkeRWYjSvmD4oXTJkAOCXKgQJa6i8edz8gdb2nrz5IB651IPGsE eAqFAbtGf4GrF6WmnOKagjr8IcdmHDlPiW3DPshIOzpVhJSeOaw4ykq86vtcXq8BgSJF q8NYNBY3ga4ZBu2I1Mr7ZiQiYRqVUaCLHfNVyskbt5x6zP0sxqUVB557XxKn5uoGTzej tDIw== X-Gm-Message-State: AOJu0Yw3MJ5wHXPr2iyzNeTWTVpV/ihI0QR83aLHOPsI34tvp2odovac 37CB0JHtrzjHI+VT2yW2pmlSK0VUa1g= X-Received: by 2002:a19:f604:0:b0:507:cc09:59ab with SMTP id x4-20020a19f604000000b00507cc0959abmr251253lfe.9.1697632241943; Wed, 18 Oct 2023 05:30:41 -0700 (PDT) Received: from debian.localdomain (mm-47-218-122-178.mgts.dynamic.pppoe.byfly.by. [178.122.218.47]) by smtp.googlemail.com with ESMTPSA id t8-20020ac243a8000000b005009b4d5c14sm679565lfl.265.2023.10.18.05.30.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 05:30:41 -0700 (PDT) From: Dzmitry Sankouski To: linux-kernel@vger.kernel.org Cc: Dzmitry Sankouski Subject: [PATCH 3/6] arm64: dts: qcom: starqltechn: remove wifi Date: Wed, 18 Oct 2023 15:30:30 +0300 Message-Id: <20231018123033.301005-4-dsankouski@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231018123033.301005-1-dsankouski@gmail.com> References: <20231018123033.301005-1-dsankouski@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SORBS_WEB, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Wed, 18 Oct 2023 05:31:23 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780096471820568083 X-GMAIL-MSGID: 1780096471820568083 Starqltechn has broadcom chip for wifi, so sdm845 wifi part can be disabled. Signed-off-by: Dzmitry Sankouski --- arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts index 7c2457948a32..e9fa230d11ec 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +++ b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts @@ -413,14 +413,6 @@ &usb_1_qmpphy { status = "okay"; }; -&wifi { - vdd-0.8-cx-mx-supply = <&vreg_l5a_0p8>; - vdd-1.8-xo-supply = <&vreg_l7a_1p8>; - vdd-1.3-rfa-supply = <&vreg_l17a_1p3>; - vdd-3.3-ch0-supply = <&vreg_l25a_3p3>; - status = "okay"; -}; - &tlmm { gpio-reserved-ranges = <0 4>, <27 4>, <81 4>, <85 4>; From patchwork Wed Oct 18 12:30:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dzmitry Sankouski X-Patchwork-Id: 154860 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp4754269vqb; Wed, 18 Oct 2023 05:31:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEUb/uE5lmVfm+I9wQ+BgzcFlCQIYb3o3e7sHxWbRZBYPzpZwN/VzAphu9Xr2U2I0XPNj58 X-Received: by 2002:a05:6a20:c182:b0:15d:6fd3:8e74 with SMTP id bg2-20020a056a20c18200b0015d6fd38e74mr5663943pzb.3.1697632312199; Wed, 18 Oct 2023 05:31:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697632312; cv=none; d=google.com; s=arc-20160816; b=qEd5awc3zq7jkwJJydfyncXSzoY/DGlW+2luutReMN/YNrrDBDS7b5RD01e2eayUZA gIEgepRdtuoO9yKHk8YmAmbBbVGKOJeLbXGCI/o7Q9xFBNBZ8sAUPP72fZEboPAqkuk3 11TaJl+alJoMx1s6YZrR0wmm5Ukfi1MEMJJMiWGhFOk6EqDhyx7tB6VzlQi6H7OW6JAW fKaXn2Nz2xk0Ikm7n2aYNkckJt3Y0Llh1RoM5EWJajudJNg7KpDrrEBB6yxFIACBpb/u B/bFrYxBLEtX5jtZmJ/2BseEwOnTXiJDXdMAbvXratS57k9adbbZ+D0qvKLxrKeK026O j96Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=SWeWILwI2zdMvCBwfFkirad+pmRadXyMO1XC1U7cSPY=; fh=q6zfOX1gmmasHvH6AMZB1ijD+1/3WSJ0fPM/Os/ZcA8=; b=NBrW4Rp9+hdudEfaRSz+jiu53Lv5A5cnFYR1eJQSJ7pmPVdsp2cS5dNFjLUyjc+ALm kkKawsHlhKXV7cjE2AJ7PTlO1BfkbfAcBD8kK5BcYvyIKeBShsg/NmoNnu1gCap0DRrU rV4O6k7CJL5e0GAki3QRtqM/Tfj3c4fupvIqTFYklBDiEDtEk7K6NZVi2LP7iLfhfkGF nvR3lq6gC+1HLHo7zph1bimbIcZZplyOntxUi6VhZAWywhjSC2SDHpDK4w3/GyFZO+/C KAiKLaS3mmwGbgvhUotjqSdejmMKB8oDHshKwStQEA1YOQyhIivFnVtTZE0DVYFxCHa5 o/aA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Zrvkc+A9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id cb19-20020a056a02071300b005acfc455384si2466390pgb.339.2023.10.18.05.31.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 05:31:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Zrvkc+A9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 5CD5A8116E69; Wed, 18 Oct 2023 05:31:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344066AbjJRMax (ORCPT + 23 others); Wed, 18 Oct 2023 08:30:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231751AbjJRMas (ORCPT ); Wed, 18 Oct 2023 08:30:48 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C155112 for ; Wed, 18 Oct 2023 05:30:45 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-507a98517f3so4691692e87.0 for ; Wed, 18 Oct 2023 05:30:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697632243; x=1698237043; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SWeWILwI2zdMvCBwfFkirad+pmRadXyMO1XC1U7cSPY=; b=Zrvkc+A9lSYjYxZjIKGuJPydgEtBJzLatvJVnYpKy070XUHS7uKRmQY4uw1sNBw4XP YGfT/RzZmMMejV0r6hG2DxN6+6yYvbtPfqIevtn7GbM0VMDns2764Is98ZIZz3CYlZwf V7dXAquALwTILU9luYDWqI0KhdWGEL9hv4EieQNcwpGG47kl6MpCl2Tge5BKhkslngSH XGooav6AyxD/AFFBOPTzRzqzErWQwu5uwjD5FTFVdQOuuPhhaX8td5LJoIFP+vIa6tkx 47/ejzASPxXJpeMnO1lDTyvPz+YUERXEasdpTndHQQcxAoeaKTD2464U2EPpbcvo0JYK L3OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697632243; x=1698237043; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SWeWILwI2zdMvCBwfFkirad+pmRadXyMO1XC1U7cSPY=; b=Co3MzMdhB6t3kIz3NVc6r01Z5IEWob38Y5i5xyTJwXEOh/X6E87VXiiffQQzAon8I/ g+kaz1pvLHttHiYoHBrx1EfXX392Q5jpJ+pSYJ1KcP4gxRZ+7NLxSSRgOLDpPbm9J523 7hsSpbbFFxFScC0c17XZ8zL/H0PuxdAbW3ogtQ4hbZJ9xbo8HB3aX681ablV83GYvYiW UKEeTuvgPX9Hd2V0SGeAIdDoeF8vz5MzISPg6cVerBqj5nH742ZB2BYHcMnL85RTE6hw stLWD+KHSorQu3XQCpBYXmRlwcGZ3ATQGC60pZ+6QIP+fZboXPGX3NpL36h4G1vXGqLO 8dmw== X-Gm-Message-State: AOJu0YzIH2YworlFBr3tqS8LZGqyWqt78yUdSI1Aen5q8qGT4G6ejACt lQh0rZ+pPl7brPs4KvW//K5K/frir14= X-Received: by 2002:a05:6512:3ba9:b0:507:9701:2700 with SMTP id g41-20020a0565123ba900b0050797012700mr4496087lfv.20.1697632242984; Wed, 18 Oct 2023 05:30:42 -0700 (PDT) Received: from debian.localdomain (mm-47-218-122-178.mgts.dynamic.pppoe.byfly.by. [178.122.218.47]) by smtp.googlemail.com with ESMTPSA id t8-20020ac243a8000000b005009b4d5c14sm679565lfl.265.2023.10.18.05.30.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 05:30:42 -0700 (PDT) From: Dzmitry Sankouski To: linux-kernel@vger.kernel.org Cc: Dzmitry Sankouski Subject: [PATCH 4/6] arm64: dts: qcom: starqltechn: enable more features Date: Wed, 18 Oct 2023 15:30:31 +0300 Message-Id: <20231018123033.301005-5-dsankouski@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231018123033.301005-1-dsankouski@gmail.com> References: <20231018123033.301005-1-dsankouski@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SORBS_WEB, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 18 Oct 2023 05:31:49 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780096499290317777 X-GMAIL-MSGID: 1780096499290317777 - enable usb 2.0 - enable debug uart (uart9) - enable touchscreen - enable ipa so that we can bring up mobile data Signed-off-by: Dzmitry Sankouski --- .../dts/qcom/sdm845-samsung-starqltechn.dts | 189 +++++++++++++++++- 1 file changed, 187 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts index e9fa230d11ec..3bc9ae5f6213 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +++ b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts @@ -11,11 +11,17 @@ #include #include "sdm845.dtsi" +/delete-node/ &rmtfs_mem; + / { chassis-type = "handset"; model = "Samsung Galaxy S9 SM-G9600"; compatible = "samsung,starqltechn", "qcom,sdm845"; + aliases { + serial0 = &uart9; + }; + chosen { #address-cells = <2>; #size-cells = <2>; @@ -63,6 +69,96 @@ memory@a1300000 { ftrace-size = <0x40000>; pmsg-size = <0x40000>; }; + + /* The rmtfs_mem needs to be guarded due to "XPU limitations" + * it is otherwise possible for an allocation adjacent to the + * rmtfs_mem region to trigger an XPU violation, causing a crash. + */ + rmtfs_lower_guard: memory@fde00000 { + no-map; + reg = <0 0xfde00000 0 0x1000>; + }; + + rmtfs_mem: rmtfs-mem@fde01000 { + compatible = "qcom,rmtfs-mem"; + reg = <0 0xfde01000 0 0x200000>; + no-map; + + qcom,client-id = <1>; + qcom,vmid = <15>; + }; + + rmtfs_upper_guard: rmtfs-upper-guard@fe001000 { + no-map; + reg = <0 0xfe001000 0 0x1000>; + }; + + /* + * It seems like reserving the old rmtfs_mem region is also needed to prevent + * random crashes which are most likely modem related, more testing needed. + */ + removed_region: removed-region@88f00000 { + no-map; + reg = <0 0x88f00000 0 0x1c00000>; + }; + }; + + i2c@21 { + compatible = "i2c-gpio"; + sda-gpios = <&tlmm 127 0x0>; + scl-gpios = <&tlmm 128 0x0>; + #i2c-gpio,delay-us = <0x2>; + #address-cells = <0x1>; + #size-cells = <0x0>; + pinctrl-names = "default"; + pinctrl-0 = <&i2c21_sda &i2c21_scl>; + + regulator@60 { + compatible = "samsung,s2dos05"; + reg = <0x60>; + pinctrl-names = "default"; + pinctrl-0 = <&s2dos05_irq>; + s2dos05,s2dos05_int = <&tlmm 0x31 0x0>; + + regulators { + s2dos05_ldo1: s2dos05-ldo1 { + regulator-name = "s2dos05-ldo1"; + regulator-min-microvolt = <0x16e360>; + regulator-max-microvolt = <0x1e8480>; + regulator-active-discharge = <0x1>; + }; + + s2dos05_ldo2: s2dos05-ldo2 { + regulator-name = "s2dos05-ldo2"; + regulator-min-microvolt = <0x1b7740>; + regulator-max-microvolt = <0x1b7740>; + regulator-active-discharge = <0x1>; + regulator-boot-on; + }; + + s2dos05_ldo3: s2dos05-ldo3 { + regulator-name = "s2dos05-ldo3"; + regulator-min-microvolt = <0x2dc6c0>; + regulator-max-microvolt = <0x2dc6c0>; + regulator-active-discharge = <0x1>; + regulator-boot-on; + }; + + s2dos05_ldo4: s2dos05-ldo4 { + regulator-name = "s2dos05-ldo4"; + regulator-min-microvolt = <0x2932e0>; + regulator-max-microvolt = <0x399a18>; + regulator-active-discharge = <0x1>; + }; + + s2dos05_buck1: s2dos05-buck1 { + regulator-name = "s2dos05-buck1"; + regulator-min-microvolt = <0xcf850>; + regulator-max-microvolt = <0x200b20>; + regulator-active-discharge = <0x1>; + }; + }; + }; }; }; @@ -130,8 +226,6 @@ vdda_pll_cc_ebi23: vdda_sp_sensor: vdda_ufs1_core: vdda_ufs2_core: - vdda_usb1_ss_core: - vdda_usb2_ss_core: vreg_l1a_0p875: ldo1 { regulator-min-microvolt = <880000>; regulator-max-microvolt = <880000>; @@ -152,6 +246,7 @@ vreg_l3a_1p0: ldo3 { regulator-initial-mode = ; }; + vdda_usb1_ss_core: vdd_wcss_cx: vdd_wcss_mx: vdda_wcss_pll: @@ -360,6 +455,10 @@ &qupv3_id_1 { status = "okay"; }; +&gpi_dma1 { + status = "okay"; +}; + &uart9 { status = "okay"; }; @@ -386,13 +485,50 @@ &sdhc_2 { status = "okay"; }; +&i2c11 { + status = "okay"; + clock-frequency = <400000>; + + touchscreen@48 { + compatible = "samsung,s6sy761"; + reg = <0x48>; + interrupt-parent = <&tlmm>; + interrupts = <120 0x0>; + vdd-supply = <&s2dos05_ldo2>; + avdd-supply = <&s2dos05_ldo3>; + + pinctrl-names = "default"; + pinctrl-0 = <&touch_irq>; + }; +}; + +/* Modem/wifi*/ +&mss_pil { + status = "okay"; + firmware-name = "qcom/sdm845/starqltechn/mba.mbn", "qcom/sdm845/starqltechn/modem.mbn"; +}; + +&ipa { + qcom,gsi-loader = "self"; + memory-region = <&ipa_fw_mem>; + firmware-name = "qcom/sdm845/starqltechn/ipa_fws.mbn"; + status = "okay"; +}; + &usb_1 { status = "okay"; + /* + * disable USB3 clock requirement as the device only supports + * USB2. + */ + qcom,select-utmi-as-pipe-clk; }; &usb_1_dwc3 { /* Until we have Type C hooked up we'll force this as peripheral. */ dr_mode = "peripheral"; + + maximum-speed = "high-speed"; }; &usb_1_hsphy { @@ -444,4 +580,53 @@ sd_card_det_n_state: sd-card-det-n-state { function = "gpio"; bias-pull-up; }; + + s2dos05_irq: s2dos05_irq { + pinmux { + pins = "gpio49"; + drive-strength = <0x2>; + bias-disable; + }; + }; + + gpio_i2c21_default: gpio-i2c21-default { + pinmux { + pins = "gpio127", "gpio128"; + function = "gpio"; + }; + + i2c21_sda: i2c_sda { + pins = "gpio127"; + drive-strength = <0x2>; + bias-disable; + }; + + i2c21_scl: i2c_scl { + pins = "gpio128"; + drive-strength = <0x2>; + bias-disable; + }; + }; + + touch_irq: touch-irq { + pins = "gpio120"; + function = "gpio"; + bias-disable; + input-enable; + }; +}; + +&qup_uart9_tx { + drive-strength = <0x2>; + bias-pull-up; +}; + +&qup_uart9_rx { + drive-strength = <0x2>; + bias-pull-up; +}; + +&qup_i2c11_default { + drive-strength = <2>; + bias-disable; }; From patchwork Wed Oct 18 12:30:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dzmitry Sankouski X-Patchwork-Id: 154857 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp4753948vqb; Wed, 18 Oct 2023 05:31:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG9kiXhDWeNM4E6KHpWaTgwNYpkKLopytsLFZDI9oWf+sMG/R+KG8MGxDMxKaQwFF8ZYQrl X-Received: by 2002:a05:6a20:9741:b0:163:ab09:196d with SMTP id hs1-20020a056a20974100b00163ab09196dmr4712881pzc.1.1697632284368; Wed, 18 Oct 2023 05:31:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697632284; cv=none; d=google.com; s=arc-20160816; b=zW95p9thv5dZbNGRANwo5nCim2R5RVhl4Uljv/XdqSHH7+k/BowJN20Scyx5Un7bjm EhcUAb2JAbVDhQNOKP5UCbtICNrNd3kiewu9V1rIt2v8jztON3zDo0Vx6GEe18mtxk3f auamk13oKewTSwwspekHhXrVKxE0zo6CE/v5/0mqr6lP9NVJ9V4nFTolxlJuoyka0Vdb e6T2W5lc4qctTsBOSLPox3mnBZiKl22vWcon1kSLy6n+ha0ovqNhibBPhTvkuxnWqjF7 f3aJxBAqqx6dG2nEt0a5D8P1QMHMxImy/xzJERqEFNYddCi3mOcVSPajj+/k+tP2KBE0 f1Lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=8c5bvQ+WgWpXL9DZXQiIiVsfEO/Jpl8XzhFUIIC/Hqw=; fh=q6zfOX1gmmasHvH6AMZB1ijD+1/3WSJ0fPM/Os/ZcA8=; b=jm2cjgyNoMWjk8Fz54oSmtCjdq6rK4zK3wzzOjOCi12a3qHnWSp/iaaQPMB6w+j8v7 0Y3WdCWKwGfACn/CzgGu4HfRDICAwUqefCMr22xTH9ZKBYps8j/JKYcA3Wl6FNp1gUQN HsrZNzIUECJ8thtMyYKcpqwAB3Y5sKL27jFAc1cQEvNLM11+usfHqQdGT/QjcJdikxSV lcq7WKWYeWFceK0CRG1lCnyc+9zZcRhlqxKEe28F+eXcPKjm/hsIZo9HkwWSX53hlrBI AlqrsyTp2V6a2PmqFz2OcndxhDYobSZEyVIGBtqQeDkLuJT9JPRjqz5p7vK7A6czH129 03FA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gGPFZGjk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id c7-20020a170903234700b001b9e9edea43si4174917plh.552.2023.10.18.05.31.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 05:31:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gGPFZGjk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id DE6D880BC531; Wed, 18 Oct 2023 05:31:21 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344530AbjJRMbD (ORCPT + 23 others); Wed, 18 Oct 2023 08:31:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231765AbjJRMas (ORCPT ); Wed, 18 Oct 2023 08:30:48 -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 67D4E116 for ; Wed, 18 Oct 2023 05:30:46 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-507a3b8b113so5507608e87.0 for ; Wed, 18 Oct 2023 05:30:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697632244; x=1698237044; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8c5bvQ+WgWpXL9DZXQiIiVsfEO/Jpl8XzhFUIIC/Hqw=; b=gGPFZGjkncXz+t+FNHBq7lpcFCGBZBcv9h5bBYhV9Bs8H4pah/8a6UBKKs/4saQa91 6LLr64RA8Oj185okAbK2/5rEVDJbQwjF/bEbWj5mAYpSLT0dEx5y2tEO2N2fRXiDYuuf Libh6XEOkyDiRVNDlt/I3b1HADQLuBXYuh3bEbzaEy4t0ntIpaDtGSFb+jdUQW91Gk8M W0SdniVskGInYn+R0fylcYF6+91M114xP3MO2VgMrBkmKTXPmaWYFZ/pTVU2C7UREd0e mBTlWgO+YwPREcTxpbC75TuQARtbBux+B8ZLCjjJQUQgC+wvXW4KD3h4VNj79LfSCFlI glwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697632244; x=1698237044; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8c5bvQ+WgWpXL9DZXQiIiVsfEO/Jpl8XzhFUIIC/Hqw=; b=CMX+HOYNbTVWOgzKPjf1xVlXo2vZ5GxDtq28YS8j+ChDVdfPUvLqNtAnYy80YTQ+r2 SO9t3859JLcGVNM8CcfyOrg9n1+G29q1iDOw44GI0tshpVjmeqRxXouubi6k5gsl6FjK d0rnYHG7MI+oNoBxiBCtocz6ZnQ2hTDeEOrYh6WX4wltWquihEXiBtiDARsoVtOTFt8y KUC4bfqi/VFhn8idSVEL+JWZNKsONUgv/dQRNqKadctKq9eNWoLzhIMhWAAYElkGsbBF 2y5haAlXWZqYZPIICXijQRhv8WR8Y3SMhR+HW2dgUEpATG5Q3KhBr8W352sm28oQGerj mD+A== X-Gm-Message-State: AOJu0YwRDswaJBs1kPj7pzmqS0iZsdjukhMGLjpokl330yqjgSNvqsBZ 3Ovf72vVabO/yKdT/s1zJxHe9mijJ6Y= X-Received: by 2002:ac2:4c4b:0:b0:503:446:c7b0 with SMTP id o11-20020ac24c4b000000b005030446c7b0mr4653413lfk.32.1697632244000; Wed, 18 Oct 2023 05:30:44 -0700 (PDT) Received: from debian.localdomain (mm-47-218-122-178.mgts.dynamic.pppoe.byfly.by. [178.122.218.47]) by smtp.googlemail.com with ESMTPSA id t8-20020ac243a8000000b005009b4d5c14sm679565lfl.265.2023.10.18.05.30.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 05:30:43 -0700 (PDT) From: Dzmitry Sankouski To: linux-kernel@vger.kernel.org Cc: Dzmitry Sankouski Subject: [PATCH 5/6] arm64: dts: qcom: starqltechn: disable crypto Date: Wed, 18 Oct 2023 15:30:32 +0300 Message-Id: <20231018123033.301005-6-dsankouski@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231018123033.301005-1-dsankouski@gmail.com> References: <20231018123033.301005-1-dsankouski@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SORBS_WEB, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 18 Oct 2023 05:31:21 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780096470415272455 X-GMAIL-MSGID: 1780096470415272455 Disable the crypto block due to it causing an SError in qce_start() on the starqltechn, which happens upon every boot when cryptomanager tests are enabled. Same problem is on Lenovo C630, see commit 382e3e0eb6a8 ("arm64: dts: qcom: c630: disable crypto due to serror") Signed-off-by: Dzmitry Sankouski Link: https://lore.kernel.org/r/20211105035235.2392-1-steev@kali.org --- arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts index 3bc9ae5f6213..58b765b4c41d 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +++ b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts @@ -502,6 +502,11 @@ touchscreen@48 { }; }; +&crypto { + /* FIXME: qce_start triggers an SError */ + status = "disable"; +}; + /* Modem/wifi*/ &mss_pil { status = "okay"; From patchwork Wed Oct 18 12:30:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dzmitry Sankouski X-Patchwork-Id: 154859 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp4754062vqb; Wed, 18 Oct 2023 05:31:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG+RFjm7MvLW24u+EAunZUalVPkOYDF+/DT70teE18pXG5xriBroJBa8cr2JoZZHK/+guL1 X-Received: by 2002:a17:90b:4a0b:b0:27d:4d4d:3b19 with SMTP id kk11-20020a17090b4a0b00b0027d4d4d3b19mr5459161pjb.0.1697632294191; Wed, 18 Oct 2023 05:31:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697632294; cv=none; d=google.com; s=arc-20160816; b=fpUoapYkpKu5R67mUzpBlJK994jp3qidc+PrTEcEYxmNLMnX91eWe88HVvN6Ts4s1c fcu72MUZ0NSE/pb7eq+muNkzeww8qtrr3n0SZLCCldM8NGnmsJuQZ3mPBlHPsx3RuGRJ qR4yDgCHpAvjgjcMUoXfHxPdHUnDa9+Tk+GWPJRwNXXU6oadFN9+WDAxIq3ukt6Q+33O HosWO7+u/ugweVPIiFfBaVvGr/tR9+nfHH5Jg8JVQTMcKZjRDElO2U73sM11mo/qFm4d KLPA1WWPtGXs/aSY4mxg/AGesW4Iw7OJZDsQe+o2j2fBN+DNRfgl3GBo4L16Tp86yxni hHYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5HCfwsrI9J7fSS6nZ06wNpwGLOX6X1eNRVhzdArLyyA=; fh=q6zfOX1gmmasHvH6AMZB1ijD+1/3WSJ0fPM/Os/ZcA8=; b=cwCSKSyN5sd3y6bGYVZFcDRJjZmuQ3KGADu+oo/OmK4wcj0t7lKZoz8jcNqrgCuxV/ 89zLA0ajrqy8kzGIlBtNJ07qagjfrVqoEwRXQDxo1acPz9xq/rqCowIaLtb8jNRh3r1J obzTUGLRqHCWwe3ykxzLkwauFsbbdkqoQe0WZcFbEf9FEjUILC4FezleSgbrgGwPrWsL vSI2ga63VwfphS0PnkpvfFuIGgrz35CGZy94otyBIahgKfx/Jj6yS5xo6sgfLe509yGD hkTWsKMrHg5vVp3jhPP6JHRf9RC/hxJfV+meO1NW337S9OZBnmY5Pfb1jMvVoPBXdXG1 4NvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=P5Ulvp4h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id j4-20020a17090a588400b0026d01e90c10si1328071pji.65.2023.10.18.05.31.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 05:31:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=P5Ulvp4h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 48C6B817C1D2; Wed, 18 Oct 2023 05:31:32 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344567AbjJRMbI (ORCPT + 23 others); Wed, 18 Oct 2023 08:31:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231786AbjJRMas (ORCPT ); Wed, 18 Oct 2023 08:30:48 -0400 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0610CA3 for ; Wed, 18 Oct 2023 05:30:47 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-507bd64814fso2565186e87.1 for ; Wed, 18 Oct 2023 05:30:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697632245; x=1698237045; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5HCfwsrI9J7fSS6nZ06wNpwGLOX6X1eNRVhzdArLyyA=; b=P5Ulvp4hqj8CsUG8dji0Vv5g1a2xsF9M8mti/TB8QyMWWJZOKBMZnRwmJFekp4Qxk1 xvJDCORQL0qqn3VL8FxokeIeKyDys4UxQDZSbvVqVePc6LDNt9DFVFSVzTFpWxxctjIS YJMOR3PLeX05MizXZcQoP5rA5JyE8LUesdiS3TaP0ZxoCyY3TRNMitJ9QsHL01EO8xZu fj94Zr8xvqoCgeqZWlSTXhsGcWTJrjj0tSty1wcoibQqhXmiplk+JVb+k5OHszu7NliG qMTIwGHV/BAbX4LAwIMxRLdvcx5m3zmW6ZHtHpEdrghOzyScUaW4vsDyuWOTx+RN0N3+ 5riw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697632245; x=1698237045; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5HCfwsrI9J7fSS6nZ06wNpwGLOX6X1eNRVhzdArLyyA=; b=FMRfTBY6kwnAcEalODAjLhAmC1X9IyFiQ4E3tchqeZ8qtrEFaabnbgPXk1bf/xOcS5 dKHQCtMeQtdP747f6W8CTyVuKGRfESuh4Qxhrodvgu9kPEWY3svYowc+kZBGuZfFxahu /woaBjP5FbnYj620pLHJGQKyk5Rmf+Aw3DZOlLr0/ZCcYI04GCmYcx7S6hFTEZdHgz0G qpOaoTG+wIsAQovyhr17q8hcQ2Xang+7birkSMhs2g8Lg/CkpeDcn0EUl//6SFg1yV9m YcR9OoROjRBGs0ef64TlOP9KfQAVtPhtHMVXdQ35c7xEvZNrRydZ/rsTppkJIow6o+F0 YPxg== X-Gm-Message-State: AOJu0Yxxl2mee9wfrAZq5jqDTNFSeCtasD3EKipFozPz8/fZfSV5fD+3 beRmccZNuVA8kba55Zx34lmVgivJ6Zk= X-Received: by 2002:a05:6512:4015:b0:503:38f2:6e1 with SMTP id br21-20020a056512401500b0050338f206e1mr4574357lfb.5.1697632244677; Wed, 18 Oct 2023 05:30:44 -0700 (PDT) Received: from debian.localdomain (mm-47-218-122-178.mgts.dynamic.pppoe.byfly.by. [178.122.218.47]) by smtp.googlemail.com with ESMTPSA id t8-20020ac243a8000000b005009b4d5c14sm679565lfl.265.2023.10.18.05.30.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 05:30:44 -0700 (PDT) From: Dzmitry Sankouski To: linux-kernel@vger.kernel.org Cc: Dzmitry Sankouski Subject: [PATCH 6/6] arm64: dts: qcom: starqltechn: add supply to framebuffer Date: Wed, 18 Oct 2023 15:30:33 +0300 Message-Id: <20231018123033.301005-7-dsankouski@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231018123033.301005-1-dsankouski@gmail.com> References: <20231018123033.301005-1-dsankouski@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SORBS_WEB, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 18 Oct 2023 05:31:32 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780096480461380495 X-GMAIL-MSGID: 1780096480461380495 This prevents framebuffer from shutting down. Signed-off-by: Dzmitry Sankouski --- arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts index 58b765b4c41d..f6e3004fc445 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +++ b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts @@ -33,6 +33,9 @@ framebuffer: framebuffer@9d400000 { height = <2960>; stride = <(1440 * 4)>; format = "a8r8g8b8"; + vci-supply = <&s2dos05_ldo4>; + vddr-supply = <&s2dos05_buck1>; + vdd3-supply = <&s2dos05_ldo1>; }; };