From patchwork Tue Feb 11 19:49:14 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "James A. MacInnes" X-Patchwork-Id: 13970643 Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com [209.85.216.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 48BDA2641FA; Tue, 11 Feb 2025 19:49:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739303393; cv=none; b=oN00OeAZ8OtLXBcfT7Pfe7tumtm29AyU6ryF3N32hsFG/aL2FuFU3aZSNRQv2OmAFNrLPI3EAn4vyKg5TBLapgadaBIHubREk5mdxnsjmwY0bMNKkG0rFat9jADRK3T17u4TyMtq3eZfo53ngv//woPmSb2L5kH5PfsPujZORcE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739303393; c=relaxed/simple; bh=mmPSG2J0wFLbRJe/3wTyhzBmBYWMvj3Prn3iKXV5pPI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=irD0JT1WNIDlQntd2PXlEIF2LFsrAxvivp4sFaMWMV/jUUvUjzF6C/gTRL9xHE3o8AblbG4UcLSUCfDuERVLVZEhDkfiR5g/BtwL77OFYj27S0mat8ozYXD2gw0BVZsXqSqEeTrczYdfoyQU7Hk/bBJKvY8YFgCJl5XEhUZmUTU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=URe19GbO; arc=none smtp.client-ip=209.85.216.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="URe19GbO" Received: by mail-pj1-f42.google.com with SMTP id 98e67ed59e1d1-2fa1d9fb990so9544728a91.2; Tue, 11 Feb 2025 11:49:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739303391; x=1739908191; 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=SuFtRlkVwzfsd0hbMOfTOhdeC+NVKWiRoYV+k56NFus=; b=URe19GbOR/l0TztQchLXCA9I+rRyF246wS7Qjxecd0v1/Tfu1LYARTXqSleaYt1eqC OEeXYponvhkQtVr/C0nRXeNHwTDP4aq+q9d+ea+f+uYok9uyRVus0jlPfVuQ4Ps5VkDh V2FZ1trwzvOf7pSdWUV8cCjMH1qQs2dxwB2khoA31XqenMYANPpzRh1M9zzxVQR3uIuI rtwkhnKPejAXoc2HE4aMyZTFfs9r+SQH7PHKzE22fMlm5wEm4yNBFOaaD0XWd/FIgnSP DSoqJAXvynAa+RThC3QU8Lz2ZxIYbjY3K8pUSXmwh9LF9v5e57uXsOBZ5Yj5VkoUCq7G YqbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739303391; x=1739908191; 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=SuFtRlkVwzfsd0hbMOfTOhdeC+NVKWiRoYV+k56NFus=; b=YzONgoIrBBId7btXji/ns1/ukOZntL+GK5hLcMmow6WeiPFwmFhYF/zkTeVMoRC2EB sNzmpzsWzXvGQsCMkpe6YeY7gnTgZc2USxomu8QGGr9bUD8fTKmGFp9s7QM86OsmscrI 2YrY4tzJTBt2ZNVo46UMaoTVWhfTC0Ptb8v4mmibO/x+g4Y5+Lb6ovLUExsHv4gIsOki TX4kzhQ7aeKxw+hAiaRLUdayXHDDfX6pdF4PNZ+DG0kzf26Mxq00yJyHs/RS0wljep5c ufn4wDCTe01pN17PG4FDqVFTAn+IkXU9QpSQLCx2+vS27RQhbMJ+hYAt+Ny+hoUHTzNm ZoIA== X-Forwarded-Encrypted: i=1; AJvYcCUVpiqo/BozQ3X1AdHUqYXMWV4tiEz47MIg2WLI2rVEgAOIs2kmMB8jRzMoeA/rbr/FPY/t75uuPQQF@vger.kernel.org X-Gm-Message-State: AOJu0Yy+C+u1c/bp2rsLn96Xul3VkS5bwSdSf+Gm/2juSjtdR+luf+iv h5pqcIByivWER2Mnn0SGVbbOl+Qei/pczhycqzDSpuY49fgxE+BsRGtZfyF4 X-Gm-Gg: ASbGnctI26YK2EZyvKfDQpIw+sZD5a94QhSXQRqXIKd/RJUIPmOw2FhWacS5rGCwnGE 0AIyfOj4XbH0gqPfnwH5/2Zvf0GvzM7kfX6fnTfh7LHkdH8BQehQTSuiYK62umJ8Pskry612dwA zSx9nTANPzdrOkRTlCCoF2fL2ZRWrJjPVjzKkmmd86l82ZZgi9QBI1JdR0Y9mT4OPSVwMyX+Ubr tQiAdQtM1VYIDSfBVTQQsxCTICiQhEwkg5G3n8fhmO0shLkdb5OMrktjTB9qx5aMtrgj7IFZ3aT XEbQ6zrK6Cxdj030JiZUJeov6OLwk8YFA+HW8w== X-Google-Smtp-Source: AGHT+IFi/gupW0gRt3BlxdcXao4XArg2Mfg/mTJVjvpk1+IGif2vaf/Fi+m7ypL9uHg744O/bjjJVw== X-Received: by 2002:a17:90b:2743:b0:2fa:17dd:6afa with SMTP id 98e67ed59e1d1-2fbf5c0f614mr621150a91.17.1739303391298; Tue, 11 Feb 2025 11:49:51 -0800 (PST) Received: from localhost.localdomain ([66.119.214.127]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21f3687e68bsm99815035ad.169.2025.02.11.11.49.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2025 11:49:50 -0800 (PST) From: "James A. MacInnes" To: linux-arm-msm@vger.kernel.org Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, andersson@kernel.org, konradybcio@kernel.org, quic_wcheng@quicinc.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, "James A. MacInnes" Subject: [PATCH 1/3] regulator: qcom_usb_vbus: Update DTS binding for PMI8998 support Date: Tue, 11 Feb 2025 11:49:14 -0800 Message-ID: <20250211194918.2517593-2-james.a.macinnes@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250211194918.2517593-1-james.a.macinnes@gmail.com> References: <20250211194918.2517593-1-james.a.macinnes@gmail.com> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Update the binding in Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml to include the compatible string "qcom,pmi8998-vbus-reg". This change adds PMI8998 support to the Qualcomm USB VBUS regulator bindings. With this patch, device trees that describe a PMI8998 USB VBUS regulator using the "qcom,pmi8998-vbus-reg" compatible string will now validate correctly. This is required to support hardware based on PMI8998, which has different current limit tables and other regulator-specific configurations. Tested: The next patch contains the driver and has been tested with Lantronix SOM. Signed-off-by: James A. MacInnes --- .../devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml index fcefc722ee2a..6092560e9048 100644 --- a/Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml @@ -22,6 +22,7 @@ properties: oneOf: - enum: - qcom,pm8150b-vbus-reg + - qcom,pmi8998-vbus-reg - items: - enum: - qcom,pm4125-vbus-reg From patchwork Tue Feb 11 19:49:15 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "James A. MacInnes" X-Patchwork-Id: 13970644 Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E2C4226462F; Tue, 11 Feb 2025 19:49:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739303396; cv=none; b=i7fBYRttW6CfPVZoh0sprxErv2TyGrya0NdvRW5PzPq7Ab9A4OFr78ega5MVKic4BKqHx+0lofy2wNMoonDTU9dnQ2XHH0NReL8QGREVfHW/WimFg8sQAgQrUE2EzXqKR7QzmFXhAk0xgTYxM3hc8Wq3KxYoIsMxcl66qQpZKnM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739303396; c=relaxed/simple; bh=AdacFwxw8gCcFmJP49qm7Ryyc5F5/zv0U/QYhsmE8Cg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AhH/ueC+GnwObRlKfjmi+wPHZQJEQMrggTH1+XqKaO3kHfXCVqajG1rGJZIDtm5xwt25o2dKw96kpSX5REAIfGWnvNHW7si+XIiAx0p6aBorAncBn9pCkIZ75nGS5HmttNDS3HOABUYzbHsxSXALdV+jmvTZrmZIclEIY7V+6N0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=WR2rrlUT; arc=none smtp.client-ip=209.85.214.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WR2rrlUT" Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-21f2339dcfdso1680485ad.1; Tue, 11 Feb 2025 11:49:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739303394; x=1739908194; 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=m33azoSAmxnYqUN7kdaWmQ74O6kiFs5HwyKhfWMOt38=; b=WR2rrlUTdHJ3WX1EffErGiAgjzWQwDlbIOH69XPza1zv1CLAurN9qQ5GEhdRpkC4Fz 8p8nBsQNAytVuyn+qtnjwnVunpbTTyYqlblntU3CRhlYDVTrdHQXwy0eN+nFjm6sQ16K 1X2ziyGG1sipF2SnKK06IZS0Rgg+80f1VPm081cXPl6+S2T38Qi/SUvsQcpxEUwzDbQP dzLzJWaTlk5Y5aPMcs5B64gJgFIrRAFyjqzwi6+JOs0ElrI9POBmkdn4vKewYvH2EGgD 84tDfnX2UGh9wv5UED07joMtQpXrG40vgbU2tzm2ZNnmn3CDtES3QvFb8DwC8j0zGn7W nnsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739303394; x=1739908194; 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=m33azoSAmxnYqUN7kdaWmQ74O6kiFs5HwyKhfWMOt38=; b=dHWZj85RZtz1MQ58mqPvtXVwa65d+jZ8QY79GMcnNgVDsXXsncoGVxh0B84+iZ0wt4 kKYJu95+GrnFjO8pTfEcajBsfSzmWzpyxDBOpi4LWy813KdVdCaDG/NFR/MpalvuwHGH DbWCsAlgK7RendjmfmoY8A1mO8JPYaNtQLCWmV+gxQA5uutm4uZQVfPuNxa+KVnzCvDG OUZSFFXO/atbEsgu8xCgouhhtlb5Fsy/uOlB95ZBg56YKo7uOz7OQx35OcXWRghWbqE4 0SEMnV+QQROOhemuBvp7lGT6DAMu2DqDcXaW8bjQCdDsjyruys2oJE3Yxsd1g6jHddKS di/A== X-Forwarded-Encrypted: i=1; AJvYcCVHHd/FZ3lJJrtq+n5tR0GRha09HTaKq9jlVYzbL5blt/kfalRgONMbGzRYy0XJkS8V2Qbce2aPa5c4@vger.kernel.org X-Gm-Message-State: AOJu0YyZnF691rqTZaXZ6B+7Gw8uMi4eV9rpOQIThNQX34GVRSgl2qWj Rp7UX0LzBzkllns7HyzQVb7KkRr5mnP2jDxxrYAWnOzdLVmMmQOoLqrPI0JO X-Gm-Gg: ASbGncvRm6GCSLu9ZWAok7ZsCgx31/EzsCDOiYeZNF/8RvL0ItgMLGhPaWctiHxenqk f6ilyRmYagPjxuia7qP2I5WvPYLvpWea5/q1v++YyKDS26CJhWuH10mWe31yIEt3Hbit0zPDRGo 34dJYLvFXae0dnQ6fEcueWCpSOx6qFvR3aibCwFPWejfngNhJZSnMMiMVpwqSGGXR4BYKHc3oiB OrIiwizs/v8trAkj14yfKwlTM7ersZA/Ex+DySfGm083EC0lGK6fGO+9W36LrIXrYxGvcEdVmMG 11mgqqKWWrcVkP+GgpMSFcDndZJsNISVcdyKUA== X-Google-Smtp-Source: AGHT+IHgUt7/1e5Y1Rm5wxmA+YxwTLPy4SYjE4gmuRFLSsYG8r1UsEqOOC1KvqzVlJm/8PLQVSbLMw== X-Received: by 2002:a17:903:1a24:b0:215:8847:4377 with SMTP id d9443c01a7336-220bc2197ccmr4877365ad.15.1739303394028; Tue, 11 Feb 2025 11:49:54 -0800 (PST) Received: from localhost.localdomain ([66.119.214.127]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21f3687e68bsm99815035ad.169.2025.02.11.11.49.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2025 11:49:53 -0800 (PST) From: "James A. MacInnes" To: linux-arm-msm@vger.kernel.org Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, andersson@kernel.org, konradybcio@kernel.org, quic_wcheng@quicinc.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, "James A. MacInnes" Subject: [PATCH 2/3] regulator: qcom_usb_vbus: Add support for PMI8998 VBUS Date: Tue, 11 Feb 2025 11:49:15 -0800 Message-ID: <20250211194918.2517593-3-james.a.macinnes@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250211194918.2517593-1-james.a.macinnes@gmail.com> References: <20250211194918.2517593-1-james.a.macinnes@gmail.com> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 This patch extends the Qualcomm USB VBUS regulator driver to support PMI8998 PMIC alongside the existing support for PM8150B. Key changes: - Added current limit tables specific to PMI8998. - Dynamically configure the VBUS regulator based on the PMIC type. - Updated debug messages to reflect successful initialization for supported PMICs. - Changed registration log message These changes ensure proper VBUS current limit configuration and compatibility across multiple Qualcomm PMICs. Signed-off-by: James A. MacInnes --- drivers/regulator/qcom_usb_vbus-regulator.c | 33 +++++++++++++++++---- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/drivers/regulator/qcom_usb_vbus-regulator.c b/drivers/regulator/qcom_usb_vbus-regulator.c index cd94ed67621f..bfcb77698ba2 100644 --- a/drivers/regulator/qcom_usb_vbus-regulator.c +++ b/drivers/regulator/qcom_usb_vbus-regulator.c @@ -20,10 +20,15 @@ #define OTG_CFG 0x53 #define OTG_EN_SRC_CFG BIT(1) -static const unsigned int curr_table[] = { +static const unsigned int curr_table_pm8150b[] = { 500000, 1000000, 1500000, 2000000, 2500000, 3000000, }; +static const unsigned int curr_table_pmi8998[] = { + 250000, 500000, 750000, 1000000, + 1250000, 1500000, 1750000, 2000000, +}; + static const struct regulator_ops qcom_usb_vbus_reg_ops = { .enable = regulator_enable_regmap, .disable = regulator_disable_regmap, @@ -37,8 +42,8 @@ static struct regulator_desc qcom_usb_vbus_rdesc = { .ops = &qcom_usb_vbus_reg_ops, .owner = THIS_MODULE, .type = REGULATOR_VOLTAGE, - .curr_table = curr_table, - .n_current_limits = ARRAY_SIZE(curr_table), + .curr_table = NULL, + .n_current_limits = 0, }; static int qcom_usb_vbus_regulator_probe(struct platform_device *pdev) @@ -50,6 +55,7 @@ static int qcom_usb_vbus_regulator_probe(struct platform_device *pdev) struct regulator_init_data *init_data; int ret; u32 base; + const char *pmic_type; ret = of_property_read_u32(dev->of_node, "reg", &base); if (ret < 0) { @@ -68,6 +74,19 @@ static int qcom_usb_vbus_regulator_probe(struct platform_device *pdev) if (!init_data) return -ENOMEM; + // Determine PMIC type + pmic_type = of_device_get_match_data(dev); + if (pmic_type && strcmp(pmic_type, "pmi8998") == 0) { + qcom_usb_vbus_rdesc.curr_table = curr_table_pmi8998; + qcom_usb_vbus_rdesc.n_current_limits = + ARRAY_SIZE(curr_table_pmi8998); + } else if (pmic_type && strcmp(pmic_type, "pm8150b") == 0) { + qcom_usb_vbus_rdesc.curr_table = curr_table_pm8150b; + qcom_usb_vbus_rdesc.n_current_limits = + ARRAY_SIZE(curr_table_pm8150b); + } else { + return -ENODEV; + } qcom_usb_vbus_rdesc.enable_reg = base + CMD_OTG; qcom_usb_vbus_rdesc.enable_mask = OTG_EN; qcom_usb_vbus_rdesc.csel_reg = base + OTG_CURRENT_LIMIT_CFG; @@ -80,18 +99,22 @@ static int qcom_usb_vbus_regulator_probe(struct platform_device *pdev) rdev = devm_regulator_register(dev, &qcom_usb_vbus_rdesc, &config); if (IS_ERR(rdev)) { ret = PTR_ERR(rdev); - dev_err(dev, "not able to register vbus reg %d\n", ret); + dev_err(dev, "Failed to register vbus reg %d\n", ret); return ret; } /* Disable HW logic for VBUS enable */ regmap_update_bits(regmap, base + OTG_CFG, OTG_EN_SRC_CFG, 0); + dev_info(dev, "Registered QCOM %s VBUS regulator\n", + pmic_type); + return 0; } static const struct of_device_id qcom_usb_vbus_regulator_match[] = { - { .compatible = "qcom,pm8150b-vbus-reg" }, + { .compatible = "qcom,pm8150b-vbus-reg", .data = "pm8150b" }, + { .compatible = "qcom,pmi8998-vbus-reg", .data = "pmi8998" }, { } }; MODULE_DEVICE_TABLE(of, qcom_usb_vbus_regulator_match); From patchwork Tue Feb 11 19:49:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "James A. MacInnes" X-Patchwork-Id: 13970645 Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CDE70264F87; Tue, 11 Feb 2025 19:49:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739303399; cv=none; b=ofBPSvKV2bsjzeNfm2UJEw1yJrVC4AP6FBqJnBL4XRrPp7PwhfO/6hpO51w65h0YyY83z4z6Cd6shznwShKPVscVs5gslfFZY4sbJTffhOBsb2msCrt6ynzK6kCrrvpmE8jOdMkJ64AMBl02lVZDs4BOySG2OIBrIHOXAI2pIAA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739303399; c=relaxed/simple; bh=cq8tFrVCb1aNykoTeBLp4jJCOLuNEBV67VUCnzQLCbQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dXSCJXTBMUnSe2sbYkZpLN/ksZsP16rZ91qm6O+m6eH3on+rHZ8rj9zYzFIiNw8RIdzQ9vT7z0b1nBCF02snLNWA6RHf3ZlPA9xEfBnmr2+MtVaXuR/FS8VNGVzdISsSRhDiZeIRJpnkI18QpILSmnhrcJGGVHeObtb4MFvXP7I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=lPjFL57Y; arc=none smtp.client-ip=209.85.214.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lPjFL57Y" Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-21f7f03d7c0so63522975ad.3; Tue, 11 Feb 2025 11:49:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739303397; x=1739908197; 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=xRc9q2rCM8c4Zf10NeRDZN6MvWjsDikBmRDUWkMpqhU=; b=lPjFL57YtvwZijFNyuPN5a4wOkH3eSeAS78Tdl4vfx+QpLFwWLEeSXdoHZUweCDjo8 tWOY9mPw0ON6MvHlJtoZNFuy0USBhoiXcW3NEVXFTKYK6193sd0J6IseGoGS6MQd/BF4 2z0M47jVwhE8Den8T7vmZY9zv+ZY67nm731J5popqdWZubrkNsZiPkSG1vK7NIPQqAi0 gMDH2lpgtCKYZE3O8ciPujhNSpgl3bPJUNP8ti8iSRPAmyEFbBA7nM+prPXJTLc1lpyb QRp/ijfGHtSj4KK1swQmF52CYEze9fj+fyoFKpLjDsxDWawHe7vjkTarjAPjS9C8uuH1 +dyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739303397; x=1739908197; 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=xRc9q2rCM8c4Zf10NeRDZN6MvWjsDikBmRDUWkMpqhU=; b=kzEovHA4GJr9wzwAHK+qNNa+bKB4VaBkegTSPd9KhJw+dLUAaA5FonagbIoJ4vyYbU WrO6uV6VWmX8FHSEpgoX+X/BhyYbAtLJ03xSF01XnRsiO81My/IkVixjACszOtEI3M3p h2dLctMyTHCIBblZ6vAdecOmX87OayJOR0FoF5DfDBpSuk7yq2YrzRCG0v/2g6U1ABHS ic1JhmCBib97o48T25LJoHuWLWSkNi6+kqOs+vPFhaYjnUl21t/FB1Ka8RRotfvy4ez2 eMPg+fkFTp6caR9WdZ7Bgw3PZJONEwFTrDAPT1ciElix+x72uNqehADW47qIRUvUWL0m OsSw== X-Forwarded-Encrypted: i=1; AJvYcCWcof1RKOAlxZ+ocYvvZ6WElkoqIz4F4zEN7M2B2HdsnRd2czQElFDydTJvFJoCH6c6ip6fKjvPeFHs@vger.kernel.org X-Gm-Message-State: AOJu0Yy5NsE+LTK2abhQQGOVSYzNvBr7Cqvq1LWJy/+phzEVofEDmcee z0j7lRL5YvfoJr7JQAf5hgToX6oqeNsaSTZE5OrkVVTkfg1IHgq32d6U0S6b X-Gm-Gg: ASbGnct9nIjotW5NTlRphJV85RqSRF7RVnaJF8EerWy7tdjN+kUpeFopN6sc8alCgRs xH2Iqtpk++gdLePszThz9eLrufNvnGhjx5ESGvCm9MCTkykhyEiAjJ8QGXn5FWUBf0bakhauuKn y02BsC0VolFDWoqBmYxbVcEOHBlMC3MYyZ2kX3GujPtakoY++uRP5AMXjJKYxm+owXDtCPAgCm5 /1c0/eWuTA7B4EL1zx+e7GEaMf46DfhapuYir6LU0SlOA3yav4/1zzZWRdxQeYvPOcYFAISJAGZ 7X/rYH03uFHoMZBaMg3dkGFWzepUhYILoET5ZQ== X-Google-Smtp-Source: AGHT+IHBwvlBBi8gnYLx7KCMhmXG0U45LgQeEdQaeXpvcGWhEhZ4zSSjtYqi8+nWo1Mff2MyaLCvXg== X-Received: by 2002:a17:902:ea02:b0:21f:135e:76bf with SMTP id d9443c01a7336-220bbb210abmr9098075ad.12.1739303396896; Tue, 11 Feb 2025 11:49:56 -0800 (PST) Received: from localhost.localdomain ([66.119.214.127]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21f3687e68bsm99815035ad.169.2025.02.11.11.49.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2025 11:49:56 -0800 (PST) From: "James A. MacInnes" To: linux-arm-msm@vger.kernel.org Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, andersson@kernel.org, konradybcio@kernel.org, quic_wcheng@quicinc.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, "James A. MacInnes" Subject: [PATCH 3/3] arm64: boot: dts: pmi8998.dtsi: Add VBUS regulator Date: Tue, 11 Feb 2025 11:49:16 -0800 Message-ID: <20250211194918.2517593-4-james.a.macinnes@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250211194918.2517593-1-james.a.macinnes@gmail.com> References: <20250211194918.2517593-1-james.a.macinnes@gmail.com> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 This patch adds support for the USB Type-C VBUS regulator to the PMI8998 PMIC device tree. Key changes: - Defined the `usb-vbus-regulator` node for VBUS handling, enabling control over USB power delivery. This addition enable USB Type-C VBUS support on sdm845 platforms. Signed-off-by: James A. MacInnes --- arch/arm64/boot/dts/qcom/pmi8998.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/pmi8998.dtsi b/arch/arm64/boot/dts/qcom/pmi8998.dtsi index cd3f0790fd42..8cb1d851b5a3 100644 --- a/arch/arm64/boot/dts/qcom/pmi8998.dtsi +++ b/arch/arm64/boot/dts/qcom/pmi8998.dtsi @@ -29,6 +29,12 @@ pmi8998_charger: charger@1000 { status = "disabled"; }; + pmi8998_vbus: usb-vbus-regulator@1100 { + compatible = "qcom,pmi8998-vbus-reg"; + status = "disabled"; + reg = <0x1100>; + }; + pmi8998_gpios: gpio@c000 { compatible = "qcom,pmi8998-gpio", "qcom,spmi-gpio"; reg = <0xc000>;