From patchwork Thu Dec 5 16:51:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13895822 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0DBF9E77170 for ; Thu, 5 Dec 2024 17:05:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To: In-Reply-To:References:Message-Id:Content-Transfer-Encoding:Content-Type: Subject:Date:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=6sLpS2YJwvojP2Rq1CdHzqmGzIPERE+0rD2KZt8p0Vc=; b=SozfVBaJGoYm2bf6AHrbRZwVpF HdFlCc7Htsh3lc+A9xOxh1hxXAlXuC9v13DhelympqXhzfW6pDnT6UGLE0FeIJWphmbVSWlyK3u+E jy81X2GEwujHZz5hXbRzxJlhVq40xGKu0P4m2GA9rLAB5PxOktNA1Joe1T4poo30EdXd9IuqhtHR8 jPKVejON7qCOmnt2hrfalUgnHOBb+c7PAc9aKfJegQ/7N5F8edoDX2HtcHxahdj+OYo+POb6h9+/A WzBzO/yYnIVlsvBZZ5tO+BAD8PMO0AydAxDWjQsl76YBR+z5a1cKsylWWoLpKTf4wtyKHqIQX8sJb vtWfY+mg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tJFHo-0000000Gs8U-1ufB; Thu, 05 Dec 2024 17:05:08 +0000 Received: from mail-db8eur05on2060a.outbound.protection.outlook.com ([2a01:111:f403:2614::60a] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tJF4f-0000000GpMB-1ALJ for linux-arm-kernel@lists.infradead.org; Thu, 05 Dec 2024 16:51:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=gHY4mPNFdNC5sn6KzXlE1xbbSEmRH3G2kG5KDcRffWR3BVSo0ASvswLui26WJLF9bUKxsLDwneI6Ko7OUr2ipdew1LmMHORNTz55jyPq0HLbdElA3YniZB3YL5czvPqb8v4/ih7tP+DUQAl6ZAwugNsgCtw0E83XqKXCxY1dbrc8lilGOB0/5eV65c2o13JFDsN6S/K4c1bF+AzoTahMyPX8XofetC6rVK7D/ILSJ2kimdbyl1rWg0drbgwDRV2/VFpA3HlQlgrc2Kxux6SDJK+MLOVN5Rx5htHEqpzXW8EoYWfYjV5Dfj0Htwg/FHMJAZwheOCSTuktNI9uI+HnMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6sLpS2YJwvojP2Rq1CdHzqmGzIPERE+0rD2KZt8p0Vc=; b=kLnVYrn62Hru0da+xUZNSqPGjuOdm6XGW8xIAo8OwBe9DVhuQovn6pCHFQdyNKMAR+vxoa3iZXTebEdA6bDGfy/BVuVn+n7/TtKk0gvSXLb46DjkQuWuwu4JQtqJ2rnszFz87WFbH/E+RkflgCnRO3NdVG+DrchFIkxahuBv9/Hx/BkeyrmmyvZed897snKZUDgTFzT6vRV0cQvS9sjlRoG8m5btB/VhYCp7jzOZJoHyUoFdXiQLaaAJLo8aNmOQY5GLltp/JBqXs7sbg1ib/o3H5oHQV9oIG4c7iX7z//gFvKKaapeP7jO5rIRjEzgetNOkZJDAW1mvpEJfz+n9/Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6sLpS2YJwvojP2Rq1CdHzqmGzIPERE+0rD2KZt8p0Vc=; b=VrGtP9+cM00tHMrwtb7t7ZbO6BhBsbTiBZl/LRMna2SnSo87T4Cg/+jXGJ1BCVxiRFsBTKee5bTgnaYiC6pdSfcoDmxCt2FictsZggzA0qxVL947XmQHAphLLV5/i+Zv3Z40L3Mj6bOJzQQZ6Z8sPadnV4j7uepAqmokAC/hU4tXvmUgeNQdXXLhMHE3UziooQb0vCs6EjTwAdzMUII/fSVt8vht1wav3wRanL2zFKAkqt8HScd2QbdwMHveN9EACalqAh4GjQaezoi8TPJhkLMS1GdqM3G0JOwS9lVW8LELRn/XO/81vXHrFCKvwcMcVz6ZRST2zkmqM3D1f8GbNw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DB9PR04MB9626.eurprd04.prod.outlook.com (2603:10a6:10:309::18) by AS8PR04MB7511.eurprd04.prod.outlook.com (2603:10a6:20b:23f::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.13; Thu, 5 Dec 2024 16:51:29 +0000 Received: from DB9PR04MB9626.eurprd04.prod.outlook.com ([fe80::e81:b393:ebc5:bc3d]) by DB9PR04MB9626.eurprd04.prod.outlook.com ([fe80::e81:b393:ebc5:bc3d%4]) with mapi id 15.20.8230.010; Thu, 5 Dec 2024 16:51:29 +0000 From: Frank Li Date: Thu, 05 Dec 2024 11:51:09 -0500 Subject: [PATCH 1/5] regulator: pca9450: add enable_value for all bucks Message-Id: <20241205-pca9450-v1-1-aab448b74e78@nxp.com> References: <20241205-pca9450-v1-0-aab448b74e78@nxp.com> In-Reply-To: <20241205-pca9450-v1-0-aab448b74e78@nxp.com> To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Robin Gong , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, imx@lists.linux.dev, joy.zou@nxp.com, linux-arm-kernel@lists.infradead.org, Frank Li X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1733417480; l=4660; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=w0wr4uNLDwl95zI6sHN+f9rDrooK+8cDnt8wPRzm9bc=; b=qdUn7TI9xxJdccSA3p+UtGamFXi39sMiW/XoATXHbl09sXZPD7lSCGomd95FiS9uqApO5qX6F dNTTCMcAn0vDRkFHwsv2/ZvXeyxPos2Ea0jhk32Z8Hq+Qiw+qHjBVAy X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BYAPR02CA0029.namprd02.prod.outlook.com (2603:10b6:a02:ee::42) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9PR04MB9626:EE_|AS8PR04MB7511:EE_ X-MS-Office365-Filtering-Correlation-Id: 887a29e3-8a75-4820-1a9e-08dd154d109a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014|7416014|52116014|38350700014|921020; X-Microsoft-Antispam-Message-Info: =?utf-8?q?jf4S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Q8uGOh3FwV7wRi9?= =?utf-8?q?+tJ2X6hi+l+hbEshn9j1tABZRu2f7hkMgQILwX9zPpqnytTi6RSebyIeLdEpiXYki?= =?utf-8?q?yh5NRRd9viCewuvvIUqodGlJ5+vj9VwcP2ep2FT7BXYkVjN6vIMyu5z/EBm9oCKxx?= =?utf-8?q?o1UQqYDITulceiz5HEEYFh6GUurJgPRLnOwWJvmalDsNrIKF3RqIJP9ixBxQ7JxD5?= =?utf-8?q?lRPZHk4jt1C1SsLNn235dv4eF59PB3UbHZ+TlLbtbq4x41uA8oBJHHBVM9AhdXYAh?= =?utf-8?q?O5DPU2iJqvAsTb2UIpo4L76HjP8SeCsnsE91bHZNn2gklAIDqHV2MSHWK+pD5GLjq?= =?utf-8?q?FJ7WRjN9LXzfNJTuI8xWCTCh+KXG6NsURIi3sWA2ccRPPM7TH7nL+v0GsuLvQa1S6?= =?utf-8?q?E8P1szu1SNDT2blbWcsPXduNws6PifnYZ1s7sdQAwAoMgQxpIZGiEhBf+XbnZiEaf?= =?utf-8?q?VAQtXosgfdSIP1oUWq6at6m1Ov8lmoJZ2a3Wzkb/3V5W7sRDwrVOap8=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB9PR04MB9626.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014)(7416014)(52116014)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?VXSvimFMBS990Ol2MxJqzDF7ZOjZ?= =?utf-8?q?ZAza2JWOr23NPYIkwqaa7jeO8r9fd4SthlQQ6snXgHXn+KQY/DPpD6CyRJovliqDH?= =?utf-8?q?5Sr8U99lk23x+JNwT5SJMNaaLQPNj6/9rD//4y0lNgvGlLeQf1zxuHiFfWnSDVgdQ?= =?utf-8?q?oN09mr/5hx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ad8nYIgbW5BLd/ldooyaQm0dS0w1Db9GSNoYfbMEVYAbWqjfOomig?= =?utf-8?q?OwhL27dNnGI6LLUI3aULLYNmr+OJtX9WlQy52CJsgiJNfndFnX3ocDjzfnTjPr/4O?= =?utf-8?q?M1oCxJC6VAKeyGgnoWS9SHJ011LQQyiLiW1oLmpzYC89uVJUcNb0GDCOwFuvndAe8?= =?utf-8?q?yO2b0R3/rOOIdHTHzF9goVItfluaqyh2U7h00Rudpn387ZhvRYNZBXMKCRGwdNcik?= =?utf-8?q?ISKUUUBYjaaCiOkPx95PU4v8HIeogtaWuZmmNkHiw2EYaF47cKVKRaW22BVVua6RY?= =?utf-8?q?Ej++HSpPE4vL2lXFgP1uzOBBkw9Ddw3+xQ0L/qx1J9tYt5JNKCK03njeUmlWylVuk?= =?utf-8?q?sIFWh1cFuZPOU59riLUpYIG4/B/vkrDrY2Fm09dIIE8VHAFIZFXYELibtmljYqDQS?= =?utf-8?q?nCdCACRTN3kWG6lLcwc0cfUlfPPKtr+jrUVppYW9NsK/RHbRGqrcyGFVACG6UmKTU?= =?utf-8?q?r8GTnlz+3xG7?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 887a29e3-8a75-4820-1a9e-08dd154d109a X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Dec 2024 16:51:29.5233 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: VCvNJOHlRwi42a9aDNULj+riWjtAEOi80JCv/qmggsbasVsDtWYSdusXYwKh9CinSGgX3CO8bv1HvMs6s4+R9w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7511 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241205_085133_474929_1115B6CB X-CRM114-Status: GOOD ( 12.81 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Robin Gong Set 'enable_value' in the regulator descriptor for different bucks to manage their enable modes: - 00b: OFF - 01b: ON when PMIC_ON_REQ = H - 10b: ON when PMIC_ON_REQ = H && PMIC_STBY_REQ = L - 11b: Always ON Ensure appropriate behavior based on the intended design. For example: - Buck2, designed for vddarm, should be set to '10b' (ON when PMIC_STBY_REQ = L) since it can be off when `PMIC_STBY_REQ = H` after the kernel enters suspend. - Other bucks remain '01b' (ON when PMIC_ON_REQ = H), matching the default setting. This avoids the need to re-enable them during kernel boot as they are already enabled after PMIC initialization. Signed-off-by: Robin Gong Signed-off-by: Frank Li --- drivers/regulator/pca9450-regulator.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/regulator/pca9450-regulator.c b/drivers/regulator/pca9450-regulator.c index 9714afe347dcc..caeeed433165c 100644 --- a/drivers/regulator/pca9450-regulator.c +++ b/drivers/regulator/pca9450-regulator.c @@ -247,6 +247,7 @@ static const struct pca9450_regulator_desc pca9450a_regulators[] = { .ramp_mask = BUCK1_RAMP_MASK, .ramp_delay_table = pca9450_dvs_buck_ramp_table, .n_ramp_values = ARRAY_SIZE(pca9450_dvs_buck_ramp_table), + .enable_val = BUCK_ENMODE_ONREQ, .owner = THIS_MODULE, .of_parse_cb = pca9450_set_dvs_levels, }, @@ -272,6 +273,7 @@ static const struct pca9450_regulator_desc pca9450a_regulators[] = { .vsel_mask = BUCK2OUT_DVS0_MASK, .enable_reg = PCA9450_REG_BUCK2CTRL, .enable_mask = BUCK2_ENMODE_MASK, + .enable_val = BUCK_ENMODE_ONREQ_STBYREQ, .ramp_reg = PCA9450_REG_BUCK2CTRL, .ramp_mask = BUCK2_RAMP_MASK, .ramp_delay_table = pca9450_dvs_buck_ramp_table, @@ -301,6 +303,7 @@ static const struct pca9450_regulator_desc pca9450a_regulators[] = { .vsel_mask = BUCK3OUT_DVS0_MASK, .enable_reg = PCA9450_REG_BUCK3CTRL, .enable_mask = BUCK3_ENMODE_MASK, + .enable_val = BUCK_ENMODE_ONREQ, .ramp_reg = PCA9450_REG_BUCK3CTRL, .ramp_mask = BUCK3_RAMP_MASK, .ramp_delay_table = pca9450_dvs_buck_ramp_table, @@ -330,6 +333,7 @@ static const struct pca9450_regulator_desc pca9450a_regulators[] = { .vsel_mask = BUCK4OUT_MASK, .enable_reg = PCA9450_REG_BUCK4CTRL, .enable_mask = BUCK4_ENMODE_MASK, + .enable_val = BUCK_ENMODE_ONREQ, .owner = THIS_MODULE, }, }, @@ -348,6 +352,7 @@ static const struct pca9450_regulator_desc pca9450a_regulators[] = { .vsel_mask = BUCK5OUT_MASK, .enable_reg = PCA9450_REG_BUCK5CTRL, .enable_mask = BUCK5_ENMODE_MASK, + .enable_val = BUCK_ENMODE_ONREQ, .owner = THIS_MODULE, }, }, @@ -366,6 +371,7 @@ static const struct pca9450_regulator_desc pca9450a_regulators[] = { .vsel_mask = BUCK6OUT_MASK, .enable_reg = PCA9450_REG_BUCK6CTRL, .enable_mask = BUCK6_ENMODE_MASK, + .enable_val = BUCK_ENMODE_ONREQ, .owner = THIS_MODULE, }, }, @@ -481,6 +487,7 @@ static const struct pca9450_regulator_desc pca9450bc_regulators[] = { .vsel_mask = BUCK1OUT_DVS0_MASK, .enable_reg = PCA9450_REG_BUCK1CTRL, .enable_mask = BUCK1_ENMODE_MASK, + .enable_val = BUCK_ENMODE_ONREQ, .ramp_reg = PCA9450_REG_BUCK1CTRL, .ramp_mask = BUCK1_RAMP_MASK, .ramp_delay_table = pca9450_dvs_buck_ramp_table, @@ -510,6 +517,7 @@ static const struct pca9450_regulator_desc pca9450bc_regulators[] = { .vsel_mask = BUCK2OUT_DVS0_MASK, .enable_reg = PCA9450_REG_BUCK2CTRL, .enable_mask = BUCK2_ENMODE_MASK, + .enable_val = BUCK_ENMODE_ONREQ_STBYREQ, .ramp_reg = PCA9450_REG_BUCK2CTRL, .ramp_mask = BUCK2_RAMP_MASK, .ramp_delay_table = pca9450_dvs_buck_ramp_table, @@ -539,6 +547,7 @@ static const struct pca9450_regulator_desc pca9450bc_regulators[] = { .vsel_mask = BUCK4OUT_MASK, .enable_reg = PCA9450_REG_BUCK4CTRL, .enable_mask = BUCK4_ENMODE_MASK, + .enable_val = BUCK_ENMODE_ONREQ, .owner = THIS_MODULE, }, }, @@ -557,6 +566,7 @@ static const struct pca9450_regulator_desc pca9450bc_regulators[] = { .vsel_mask = BUCK5OUT_MASK, .enable_reg = PCA9450_REG_BUCK5CTRL, .enable_mask = BUCK5_ENMODE_MASK, + .enable_val = BUCK_ENMODE_ONREQ, .owner = THIS_MODULE, }, }, @@ -575,6 +585,7 @@ static const struct pca9450_regulator_desc pca9450bc_regulators[] = { .vsel_mask = BUCK6OUT_MASK, .enable_reg = PCA9450_REG_BUCK6CTRL, .enable_mask = BUCK6_ENMODE_MASK, + .enable_val = BUCK_ENMODE_ONREQ, .owner = THIS_MODULE, }, }, From patchwork Thu Dec 5 16:51:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13895823 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 050B9E77170 for ; Thu, 5 Dec 2024 17:06:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To: In-Reply-To:References:Message-Id:Content-Transfer-Encoding:Content-Type: Subject:Date:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=yLDBtNfni/M0yr6E6A9udqNvO4y+WKxsbN6N+QmozXQ=; b=N5t23rNNZV9l89L6tfMJzQmT/6 JHr5Qqh7wtK4+sVwxEKzzLjrCzp3BfPFxYi4KSodmDk1ghcrJCoXHHY4Kw4ElvJf3QfmuZhpynwKK Mky2MeGA5uWCNSWjCq2ZBJ+Bgr8qsUvfo1QIc2M961lHuRN62EDt6UNii6nQjgQNLHsgak974evII YcSnlylrNiJq6jyPTBtP9QlLbkr9ihHcjVLZYYXknaMX+Aj1y2bxjirLoaocR0kq5+P0CNECd9ViX DLpuEJJTo2JSTUoO0aiOZFVw+s2lLihUg78Su/RDnETyk3bIvCoCNna1zp/BbXHfV6s6GslSf0Mon pe9+AV8Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tJFIo-0000000GsIh-0PnZ; Thu, 05 Dec 2024 17:06:10 +0000 Received: from mail-db8eur05on2061f.outbound.protection.outlook.com ([2a01:111:f403:2614::61f] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tJF4j-0000000GpNC-0SkI for linux-arm-kernel@lists.infradead.org; Thu, 05 Dec 2024 16:51:38 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=euZUYETpnlbVgx1Y/ZiNbk5O6UqVw0ChMtXX4xBNusWgLPxsd+iYAH3sa6+vHnhvMAD0wVlUv70FbNCjuHc+oX1ZUHp1yxxucFAdddgTKSPlZvULWAB5JSMWfmOazv1yTDxRPH908qVN/YTFvSAIfd+SXQSQTxzZZele+x2UHV4DjwsIJ4GMaMXOKmCeQBHVxNXtUHepjKFaZywXa6z5BDHbx5Hr+wy0OLogu2Noz6UwVYGAGq7Z8B37JdCjBwCLK/FSzKc/eWpQtKPH7pb55ambjcHZ0XRuaaJdCmz/ejODzK8cA3NFrXHGRxfIEuDkm9IfJCPRW5rThwDuilmUbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=yLDBtNfni/M0yr6E6A9udqNvO4y+WKxsbN6N+QmozXQ=; b=Rq5+DQ+Bs3e8/yEGLDMFgOE8fkCu+bnXwy0UEemwLNoDgYBkRpScjL5DL8eFIEG5QfsdIMfLiX97Ytlws/yUXv/o0ju7h0ITc4TA0joq+JhNjsvn3p2PlSjlNGoyYsXSyXgTqqZ6wcqzZu+Kl1aUrW/+BOymyCGkMQ/z1CvrwbcL4sx9grnt9f5KOL7uUquCAgAc9YYl+EYdB5Ej5vurMEl8uWF+NSpbj2blxdd3sQApI7CnHNeCKhJq8g6wINlVjZo1dMPeSNTIaeAGg/31RYr5xdCRUQIlFGKcvhO+jhPhuT9DnOGlz5Hl7ogiN3sZpbkPkp+Ob8blQ1s43uXkGw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yLDBtNfni/M0yr6E6A9udqNvO4y+WKxsbN6N+QmozXQ=; b=c33WNS/KfisrULUGfVAvZeFW0GbE6Uhql+OUdrhu5OzKPJkwYsqC9RI9nVb3imWD58idRpjtCwHMJ1uJMuTXuXYOHvf78f1A1W2HWESWL48tnuhuRXpes28SZ4RjN1ClPXBOSxLkY/JDRFrvBSsFthTpDyO6CF+LZWFE8Dveh92TpFdbsT5IV4+TpxncqlfApCDxJUA44RwypLgjSnrT3alLEuu7br5K1NXBZl8CpoUxatxh7THFKQTLlVda/42lIr7eCgRYH1Pbl3i7ioY7uP4/v5P471VaLC5Av9+eEvFGcIrM/kjVF6G7d50RV8twA2Uka8fqi2+VdtDkOaXKrA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DB9PR04MB9626.eurprd04.prod.outlook.com (2603:10a6:10:309::18) by AS8PR04MB7511.eurprd04.prod.outlook.com (2603:10a6:20b:23f::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.13; Thu, 5 Dec 2024 16:51:34 +0000 Received: from DB9PR04MB9626.eurprd04.prod.outlook.com ([fe80::e81:b393:ebc5:bc3d]) by DB9PR04MB9626.eurprd04.prod.outlook.com ([fe80::e81:b393:ebc5:bc3d%4]) with mapi id 15.20.8230.010; Thu, 5 Dec 2024 16:51:34 +0000 From: Frank Li Date: Thu, 05 Dec 2024 11:51:10 -0500 Subject: [PATCH 2/5] regulator: pca9450: Use dev_err_probe() to simplify code Message-Id: <20241205-pca9450-v1-2-aab448b74e78@nxp.com> References: <20241205-pca9450-v1-0-aab448b74e78@nxp.com> In-Reply-To: <20241205-pca9450-v1-0-aab448b74e78@nxp.com> To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Robin Gong , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, imx@lists.linux.dev, joy.zou@nxp.com, linux-arm-kernel@lists.infradead.org, Frank Li X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1733417480; l=5056; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=a+/tdvfNrna1Hxq1r+zVZqlrUGxbeu/wyD9Dmoa9nNQ=; b=SYZYkK/PEqkwMefZC7ZooIhhLiJ/UCY8lzC4yOl4E83iuDh923XrnTWkcwNCeTGLkAShsBAta IGSacrTzwH5D5LKTDq2HfaIRE/0vAfbCkanfgs+DT4z7IisWh0BTZQt X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BYAPR02CA0029.namprd02.prod.outlook.com (2603:10b6:a02:ee::42) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9PR04MB9626:EE_|AS8PR04MB7511:EE_ X-MS-Office365-Filtering-Correlation-Id: e59cf302-1fd8-4f24-6375-08dd154d1344 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014|7416014|52116014|38350700014|921020; X-Microsoft-Antispam-Message-Info: =?utf-8?q?v4p8FK39Z20nAV3uD1Qtw29BkG2S2Qe?= =?utf-8?q?3CnVbBodTE0GUQPg1U+9c/19RC5mOMOC2TCWBIuIgMmPadltOpsyiHjj6FAEd0LvQ?= =?utf-8?q?PJ8Filom4gVREmBgLYkxP8j9rOkLnibm6ZV3UavHnCv2R7gINLUXa5ky3afPKHgDW?= =?utf-8?q?sTcqMPmYdZRczlxVNLEE94w8Erk88Fs2ZMkNXW4yGjwaTHAXsP7GMHnxTpxTDqHLC?= =?utf-8?q?5mXkoJaM+pRfWyAfiSOPS+cR0gOvX6ffSoP3+xQ/o6Z20HMKl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qwjIaAM4xE5T80P?= =?utf-8?q?R/w8gOdVusuVBt2zng+aaWtv8bULV6en6p57WsqzzOPbn0mz/dUAbAO+D7qOBcwLm?= =?utf-8?q?k78OCrvdVlkYyaN++m7WVMBLHUs+DNRPR10uVKDAR4E0SQrtll50sHOqkXYlupP1Y?= =?utf-8?q?yWSMl/K7F9c2h8NW4hpcTwrW5UVCIlk0SPcH8Vh8pUOx4ux00lkq878scqmYQh9W4?= =?utf-8?q?4HRG8l9tkPbSgGCH8igKx2XeBK4gsn4RrPGw7i+Tq7jEDoz+AerXSo8=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB9PR04MB9626.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014)(7416014)(52116014)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?Fx2kfAINsT7jdJ3fz9ovb6WP1VGA?= =?utf-8?q?h6sU9nsy3szm4b78BKtA3zFTORVm/0YZT7HcWnxybdUcqJyA2suoJRjCtpEaLxpxE?= =?utf-8?q?LYudjjifTIwa6Z1TLz1+s26lh4imB1RtM4cpp94TGnKDK+4+BZ/eoCWKukB0bPojt?= =?utf-8?q?3WuCVQc7QIapi3ykMNDcnUSJ+zCxkZLAX0cX2hoWX/9Z4zI75kUUGSSdqyF7Ft9ET?= =?utf-8?q?u9M0JW8Ms3Xlz20yJe0lfkU9OAEucg6hHAkOVdIuB+mCDXWnfwt2FkPHhSGtykLyM?= =?utf-8?q?jUMXvVbSCUYn0LO4sA1JCg8Z5kU9HREOm6u0g3ORLgVGZy0smcJsU6VEYnn+PtkW7?= =?utf-8?q?QKlegZSwGalweBLKk1JhAJa7CSkC9J2tU5Gg4jx1/vHuJ8ZrajzMlS2xz0qxbrR9E?= =?utf-8?q?Jdxp+tc8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/6xRf5rV6LMnI4UiPFs2nHaTGscxBjMpB+XFFOhwH9VW1hEnlzfhPcwcpL?= =?utf-8?q?vwaPmirejaHT0wY9OjvNekyMk0OexEln3ut3Ykji/cn02OyJOZhTROOa1eMhHU0nd?= =?utf-8?q?oQdbrvMI6mdvlTNIH3CL6nBVMjKTJLhq3l1bLkAqXEYxsCoAHR3qshE6p+Xshhacc?= =?utf-8?q?TvRHOmMMmChe2qMkwLpaMOy6bxNvVdyfr56hyFsHGYq7SX5SgxEFQ544KuSp+yfXt?= =?utf-8?q?ZVB7q8aTeQDZ?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e59cf302-1fd8-4f24-6375-08dd154d1344 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Dec 2024 16:51:33.9525 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Phmuumb5fWrRD0RqXTm4P2Jqp/Lt7lf33XkOhW7btMTgVcAll681YXW83Ox4BYD2Pc290A7hF3Bm9fE/4tQROg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7511 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241205_085137_303557_4BC48242 X-CRM114-Status: GOOD ( 14.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use dev_err_probe() to simplify code. Signed-off-by: Frank Li --- drivers/regulator/pca9450-regulator.c | 73 +++++++++++++---------------------- 1 file changed, 27 insertions(+), 46 deletions(-) diff --git a/drivers/regulator/pca9450-regulator.c b/drivers/regulator/pca9450-regulator.c index caeeed433165c..0b1f099fdd5ee 100644 --- a/drivers/regulator/pca9450-regulator.c +++ b/drivers/regulator/pca9450-regulator.c @@ -932,25 +932,20 @@ static int pca9450_i2c_probe(struct i2c_client *i2c) pca9450->regmap = devm_regmap_init_i2c(i2c, &pca9450_regmap_config); - if (IS_ERR(pca9450->regmap)) { - dev_err(&i2c->dev, "regmap initialization failed\n"); - return PTR_ERR(pca9450->regmap); - } + if (IS_ERR(pca9450->regmap)) + return dev_err_probe(&i2c->dev, PTR_ERR(pca9450->regmap), + "regmap initialization failed\n"); ret = regmap_read(pca9450->regmap, PCA9450_REG_DEV_ID, &device_id); - if (ret) { - dev_err(&i2c->dev, "Read device id error\n"); - return ret; - } + if (ret) + return dev_err_probe(&i2c->dev, ret, "Read device id error\n"); /* Check your board and dts for match the right pmic */ if (((device_id >> 4) != 0x1 && type == PCA9450_TYPE_PCA9450A) || ((device_id >> 4) != 0x3 && type == PCA9450_TYPE_PCA9450BC) || - ((device_id >> 4) != 0x9 && type == PCA9450_TYPE_PCA9451A)) { - dev_err(&i2c->dev, "Device id(%x) mismatched\n", - device_id >> 4); - return -EINVAL; - } + ((device_id >> 4) != 0x9 && type == PCA9450_TYPE_PCA9451A)) + return dev_err_probe(&i2c->dev, -EINVAL, + "Device id(%x) mismatched\n", device_id >> 4); for (i = 0; i < pca9450->rcnt; i++) { const struct regulator_desc *desc; @@ -964,13 +959,9 @@ static int pca9450_i2c_probe(struct i2c_client *i2c) config.dev = pca9450->dev; rdev = devm_regulator_register(pca9450->dev, desc, &config); - if (IS_ERR(rdev)) { - ret = PTR_ERR(rdev); - dev_err(pca9450->dev, - "Failed to register regulator(%s): %d\n", - desc->name, ret); - return ret; - } + if (IS_ERR(rdev)) + return dev_err_probe(pca9450->dev, PTR_ERR(rdev), + "Failed to register regulator(%s)\n", desc->name); } if (pca9450->irq) { @@ -978,29 +969,24 @@ static int pca9450_i2c_probe(struct i2c_client *i2c) pca9450_irq_handler, (IRQF_TRIGGER_FALLING | IRQF_ONESHOT), "pca9450-irq", pca9450); - if (ret != 0) { - dev_err(pca9450->dev, "Failed to request IRQ: %d\n", - pca9450->irq); - return ret; - } + if (ret != 0) + return dev_err_probe(pca9450->dev, ret, "Failed to request IRQ: %d\n", + pca9450->irq); + /* Unmask all interrupt except PWRON/WDOG/RSVD */ ret = regmap_update_bits(pca9450->regmap, PCA9450_REG_INT1_MSK, IRQ_VR_FLT1 | IRQ_VR_FLT2 | IRQ_LOWVSYS | IRQ_THERM_105 | IRQ_THERM_125, IRQ_PWRON | IRQ_WDOGB | IRQ_RSVD); - if (ret) { - dev_err(&i2c->dev, "Unmask irq error\n"); - return ret; - } + if (ret) + return dev_err_probe(&i2c->dev, ret, "Unmask irq error\n"); } /* Clear PRESET_EN bit in BUCK123_DVS to use DVS registers */ ret = regmap_clear_bits(pca9450->regmap, PCA9450_REG_BUCK123_DVS, BUCK123_PRESET_EN); - if (ret) { - dev_err(&i2c->dev, "Failed to clear PRESET_EN bit: %d\n", ret); - return ret; - } + if (ret) + return dev_err_probe(&i2c->dev, ret, "Failed to clear PRESET_EN bit\n"); if (of_property_read_bool(i2c->dev.of_node, "nxp,wdog_b-warm-reset")) reset_ctrl = WDOG_B_CFG_WARM; @@ -1010,20 +996,16 @@ static int pca9450_i2c_probe(struct i2c_client *i2c) /* Set reset behavior on assertion of WDOG_B signal */ ret = regmap_update_bits(pca9450->regmap, PCA9450_REG_RESET_CTRL, WDOG_B_CFG_MASK, reset_ctrl); - if (ret) { - dev_err(&i2c->dev, "Failed to set WDOG_B reset behavior\n"); - return ret; - } + if (ret) + return dev_err_probe(&i2c->dev, ret, "Failed to set WDOG_B reset behavior\n"); if (of_property_read_bool(i2c->dev.of_node, "nxp,i2c-lt-enable")) { /* Enable I2C Level Translator */ ret = regmap_update_bits(pca9450->regmap, PCA9450_REG_CONFIG2, I2C_LT_MASK, I2C_LT_ON_STANDBY_RUN); - if (ret) { - dev_err(&i2c->dev, - "Failed to enable I2C level translator\n"); - return ret; - } + if (ret) + return dev_err_probe(&i2c->dev, ret, + "Failed to enable I2C level translator\n"); } /* @@ -1033,10 +1015,9 @@ static int pca9450_i2c_probe(struct i2c_client *i2c) */ pca9450->sd_vsel_gpio = gpiod_get_optional(pca9450->dev, "sd-vsel", GPIOD_OUT_HIGH); - if (IS_ERR(pca9450->sd_vsel_gpio)) { - dev_err(&i2c->dev, "Failed to get SD_VSEL GPIO\n"); - return PTR_ERR(pca9450->sd_vsel_gpio); - } + if (IS_ERR(pca9450->sd_vsel_gpio)) + return dev_err_probe(&i2c->dev, PTR_ERR(pca9450->sd_vsel_gpio), + "Failed to get SD_VSEL GPIO\n"); dev_info(&i2c->dev, "%s probed.\n", type == PCA9450_TYPE_PCA9450A ? "pca9450a" : From patchwork Thu Dec 5 16:51:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13895824 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 86081E77178 for ; Thu, 5 Dec 2024 17:07:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To: In-Reply-To:References:Message-Id:Content-Transfer-Encoding:Content-Type: Subject:Date:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=8Qv+G0aN0fxo+eJyWD7tRd65AwEwgzuXjj7y0WGiV5Y=; b=tcR/5fLxH7dfSVmIqw51B+eWy3 LNlKNTJDy7qYxJfjN1PUoulfnhlsvzdB49pu7s/4g+Iz+O9lz618YOd9WYtGeRhVGMbW6WP2iw+3k SQDuSFaDmgP29YSw6ctkDQ1uRDMDoq+JBAkN3RmDd4LLL2p6y2lNR4BVsQg5yHUvrNRnU1bXJQFCg xNcbOWw6GvHUo2kmwpm8P8H7iQ+dNBJ3y7ZQP+VFToqVfleUmtr323fHKXvRSUtq2ImtEhbOUtMSZ Hj2v+OYycC8yS+MMBhbWx8pPJ2tkIWWUoOGbW9x5v/HU04X0osxhCige04Rbwyw+VN/vGSLeWTUss SMN3wZ3g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tJFJm-0000000GsWG-3qGU; Thu, 05 Dec 2024 17:07:10 +0000 Received: from mail-am6eur05on20616.outbound.protection.outlook.com ([2a01:111:f403:2612::616] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tJF4o-0000000GpOk-1TIM for linux-arm-kernel@lists.infradead.org; Thu, 05 Dec 2024 16:51:43 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=KMW/Gi3HGt2DG2+6f9AwD3lrOMBGqkE13dWNvHSiydExkj7RGZieojhasZJKQ9ksgip7PcjF0Riq+szplw8SY+PYNaJcDJLu4mrBFmHbBIIgFxje9Au9chKY/XEH5PZWIRc96rhlO6FV1JlUbgKBp2/UynidvPc4x8UVGXsNATjSCq9OvYNF5PQecNugJZg1Uq8cW/mEpAIkx07Zr8S2dUbOzfA9IfV45sdkCGvOIOno83TgSMQN95K7uMgivuibetxdeBlErY8tfTaT+djuqDCs+Iri0sWqgTcXRNPoimaiHI9jQB1IIb/WQ4yhSidxyTXzOR4sK/8NIEmvvbnZ+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8Qv+G0aN0fxo+eJyWD7tRd65AwEwgzuXjj7y0WGiV5Y=; b=xwgSpt/v8D01cKdsRD2GPj7j+Hvjx6utX9kkXHc53LKJA8fsCMQEXI4jbjsLs0W9OQSV0jfLTNlGC1em6pHWmoXIioWbbyz7x5/bfrC/NnrsALtSSoE7sHctokmHEthHkXGd1pLdY5gbf9b/LR+xfg5avYjLv532XBgX/8g8/aNIxbJ7b0a82pdO1DQL3+5yL3bHRH7xxjZc4VuHiZrH4Y4R4eZHs6jXu80kOQR7gg4crPNTLtb+XS8G5g4o1SOexAPiqERPW5oRCx7XcSmaJ0ApjKH2dk5flkdQCkBBVuqXdn+onsRwRj4mv9VPIVZtAkf2oNVDXjAfSoFD4vRHvQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8Qv+G0aN0fxo+eJyWD7tRd65AwEwgzuXjj7y0WGiV5Y=; b=RlX5q8e8kue9QpWdfDmTjFCx58Z9sMs0L+hpuJHpH80k9BgqPTkv3UvJqPEgjJohcE2R6ICU6H6eK58eS1gg+jfGZvBwhkbo7qGjs5dc/OQyMYXGTTmkbbP28EePuZW0y9hp7tAX8buYcaNWBJTE/ZHSscZRNBgQngZGI5KojWUAzdSDn0EhVMpjOIDHWighAxhDjx3SBMT+CS4TUe5oXKPJJc7DUj8AWgXYbaG8unVgUgXbCW+LSDNN+4UdAirLLbKoR/IOTi2ZffFsHFHauRjZK60gcXD+oewQD7RShErOzOSso0fQYwQeQfbxj0c+YnSjJX4S5xS/++LM/DFG1w== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DB9PR04MB9626.eurprd04.prod.outlook.com (2603:10a6:10:309::18) by DBAPR04MB7446.eurprd04.prod.outlook.com (2603:10a6:10:1aa::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.12; Thu, 5 Dec 2024 16:51:38 +0000 Received: from DB9PR04MB9626.eurprd04.prod.outlook.com ([fe80::e81:b393:ebc5:bc3d]) by DB9PR04MB9626.eurprd04.prod.outlook.com ([fe80::e81:b393:ebc5:bc3d%4]) with mapi id 15.20.8230.010; Thu, 5 Dec 2024 16:51:38 +0000 From: Frank Li Date: Thu, 05 Dec 2024 11:51:11 -0500 Subject: [PATCH 3/5] regulator: dt-bindings: pca9450: Add pca9452 support Message-Id: <20241205-pca9450-v1-3-aab448b74e78@nxp.com> References: <20241205-pca9450-v1-0-aab448b74e78@nxp.com> In-Reply-To: <20241205-pca9450-v1-0-aab448b74e78@nxp.com> To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Robin Gong , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, imx@lists.linux.dev, joy.zou@nxp.com, linux-arm-kernel@lists.infradead.org, Frank Li X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1733417480; l=813; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=bEhg17FlqwWgEaGk85QiltrgdH1mfNZULFNEUwHv3ts=; b=gjUBT5yuu7VBCxchE1FH/tqzkGT6gmeQYB2uZl1u5WM0k4fP6aeMnxpqamwa61cA21FNVkF+L tAvtg8yQmb5AwkwKwRoEdeE8F+2Qefc4SibvWhedHVP0uCo5Q4NC06q X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BYAPR02CA0029.namprd02.prod.outlook.com (2603:10b6:a02:ee::42) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9PR04MB9626:EE_|DBAPR04MB7446:EE_ X-MS-Office365-Filtering-Correlation-Id: 220b1491-337c-4267-d898-08dd154d15e7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|52116014|7416014|1800799024|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?B4TTSpWvU8NWt64OysV8toGwGy93hDO?= =?utf-8?q?3Dc5PR4OvWUPLJb5lzExd3uxDpewfBmug+bKmyK6fB3aV2OgAKPb8o8Ga1FgeNBqc?= =?utf-8?q?mLwdgMxiZpl1Hdr6K4uaJjGIkBhv+1+a1U8VY+HMdFjum1tKSiuR3pyEDR7HQYIa+?= =?utf-8?q?uSsgL/dZ7IKaooebmckoOoQjH+K+8dL5EAcqxFpAW2cI1YqOhW39sc5Bl3L4YZ0+y?= =?utf-8?q?5A1jB7lDYP6QFWMe9KCe33hRVOcfacsR7YZHKElNaU6MEtw0af+g+OlCQtADu+IEo?= =?utf-8?q?vqisKtnctxGsk2vBL/yrV7TnB+jhcKHcqFlvJ1NcPrEAkWy9eVx20bNEKuFp+Q8R8?= =?utf-8?q?eh2JboMURVvYwNtdHLbeKILu34aHHSB/YLmuautbNJc+bkO1ziL18FVyJMM/ZWMUy?= =?utf-8?q?4UTFb6KG8x+g8gPxSm7j51uOPYlKRbeDgU0dOPV+7PVt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0rid65jbf9p?= =?utf-8?q?Th2c6A59fERe58tIha0QqamhcR4GWn8qVYXDde0pOy7K90YYq55u2mQ=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB9PR04MB9626.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(52116014)(7416014)(1800799024)(366016)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?fvAPNJZjmrGTKLC11TI8HsflU+1i?= =?utf-8?q?Q6cVM3TpdH/nAhGuzhVZKFuBM4LtRaiRsHbjPlChfX5WdxNTyD2XI6pHK0xDWELD2?= =?utf-8?q?uIO6GY4pEXp3SVwIe4EV7ixoJDlPio8XitN/eN9KXlOy4Jv30b7vwiOMuvE4HHJIb?= =?utf-8?q?IWw7SfbvR/y1v/vYds8+CJBLAzr9Nrzru+icHBTyWfWIZJXbNmMbIWS90yEPNsNTA?= =?utf-8?q?bGQFrWRYbJxYrCZ0fXMqsH7PP//cJKy3Yh9djufTcEFE94YXBcwQXINebXpuA5OGu?= =?utf-8?q?rLXvB7ZW2DJfTYEw3dNN5vyIYCm761yRpE+2uuVeTZKAl/6jGzEQYl9Yhi6038zq1?= =?utf-8?q?DyeKBMfeISOICgO/VSPHD8y3HIWBJ8lW/RdmjSqyjiZnetiBNqFnxV2JPvLtpegDY?= =?utf-8?q?zShwf5Qh9azKBuCDs7eLgliEOmvcRaAlvL/FISldvENtm7sO1b049tStroADS98FL?= =?utf-8?q?djA+fzwiRcg0e+aLDyQIcgCwyt0qAWKIwwiC78Wd98zyieCt11RhpUI7NnB3t+tl3?= =?utf-8?q?LWKQdjhjDF6f9v6GqzqPnfKLHvx5VManCzTFN7JLUgIH9wanLCmfsF3GW6cq0CqMq?= =?utf-8?q?YSRlrGpSJ7p3AgEMxwR5xoBzU5NOAgF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1YVNeRSZU1Z1pnynghG92jKhBDDnAnWX+X?= =?utf-8?q?EvX8W0KqcSmg?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 220b1491-337c-4267-d898-08dd154d15e7 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Dec 2024 16:51:38.3759 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: N1bfj9wFK2BcXfoxUpj9OIzKOPoLom/yCOn0OBQ8f7sonKhfoQreMrzLH2s7gLODAeVfWRYsumZRZ/y6k8p4/Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR04MB7446 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241205_085142_407987_6F7422AB X-CRM114-Status: UNSURE ( 8.80 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Joy Zou Add compatible string 'nxp,pca9452'. pca9452 add 'ldo3' compared with pca9451a. Signed-off-by: Joy Zou Signed-off-by: Frank Li Acked-by: Conor Dooley --- Documentation/devicetree/bindings/regulator/nxp,pca9450-regulator.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/regulator/nxp,pca9450-regulator.yaml b/Documentation/devicetree/bindings/regulator/nxp,pca9450-regulator.yaml index f8057bba747a5..68709a7dc43f1 100644 --- a/Documentation/devicetree/bindings/regulator/nxp,pca9450-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/nxp,pca9450-regulator.yaml @@ -29,6 +29,7 @@ properties: - nxp,pca9450b - nxp,pca9450c - nxp,pca9451a + - nxp,pca9452 reg: maxItems: 1 From patchwork Thu Dec 5 16:51:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13895825 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D81AFE77170 for ; Thu, 5 Dec 2024 17:08:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To: In-Reply-To:References:Message-Id:Content-Transfer-Encoding:Content-Type: Subject:Date:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=9iOsC7M6f/+sDyrSnuCZDi4tzufpgAqP+k9gXU0kg3g=; b=YhYRPUDIk3OULnQ3tPM+SIgVV+ +ffwwLYDYUJRpDvjDRvvPOZy+Pn1RjcThQ5RgsH/O/zBjIXiO11uS6/R3ZLCz/vzw7fTaYGwtPXoJ +k7XOO8ABBEa7x8Tw4rOjtOlb1/WrCVtmZsLV7dEfC4oYoctZvjDfbTfMrE962O09Jj+ygpX5eA8C JwsAe0slwNmOF0LHe2aLI4xiyg+KPRcjGFeXup3rxMdYHW4dcsjngSF/1WYW0z0kI1pEEnaJhY+jA rHIhzi2xhMkpT1rnP8ai7bx9ZW+MrajySKd5mz2GaBfZOvGhe87D2eMN35GZiRY/lue2FhckUCxaz uOO5EgVA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tJFKm-0000000Gsfg-2Jbp; Thu, 05 Dec 2024 17:08:12 +0000 Received: from mail-am6eur05on20602.outbound.protection.outlook.com ([2a01:111:f403:2612::602] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tJF4t-0000000GpQi-3NKJ for linux-arm-kernel@lists.infradead.org; Thu, 05 Dec 2024 16:51:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Pey/FepVroH0o30gxNagJ4BMrh2slsCQKoaNPOrfcgwi6kBPXlPTFVwv/j7zTPS/+y57xQyhAYrIPyVB2KEzfEdZC/98acf67gSKuZAjT21Ilawi3ymI1QgUIOodqfkzcxtcl1WvYBXC1xGQAFmBHhCqi7tAKaYuE2RG9VPaVsn+k1377/Fr+ilSxymr1idB4rkZGiRWGeUNu/c/mlTldwCsBYwtovLpvySRB6fam8Ci0pClO4KZYyxH0z9O532g5sGVM4LMHvgwSBu+IiLS/nP16b+8WRDBTZruscfHImAWuLBZtkBopi/MjVo6Q9PdKgTxSW9WD3Zm6cObH9KJhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=9iOsC7M6f/+sDyrSnuCZDi4tzufpgAqP+k9gXU0kg3g=; b=mojQsTgLttfRqBELrpXGUWDl4hIIhDx1lZ40SY4GtvYiQ7lB1vnLwCNXnNM6sUNRMYfoaqs/9FNObYScEoBtGNDsZJPDhODSS807a8yWGruVMus/PBPnLCSPhtgzQJDos655lN/qxrw3raN7Xhd/fBr1UKv1KpKnntxQ+fiukm7nohJz+nzwscPmXYG4LhA5I9TM5FZVTZsvRL3oVfeRLcitdg8PLvlZHh6MDV1U05H6W5eBdxQTlEjEoW/Xi+Hsb6odGaE1TaF97jx7zsB8FtbmyzjdjiO4y7eA3IXtgP41qGK51nKQ+gdW0WUs3+7L9u3B6XPSh92Cc/tmvoSuqQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9iOsC7M6f/+sDyrSnuCZDi4tzufpgAqP+k9gXU0kg3g=; b=JFXqK96sDADyltipA4j/g70ZWHrI1/gM59Tv7wbdwbvNN4PAPth3QuScfiu/vffe/dyaGTaQ7bbkBXv2m7tGGzn3hmKYGcRL3O9x/w91VnhBDxcOVEASnKpzMMguYOBbUD6DOdVF02zluXcMGxBlhEtDVkzulyb+rKqAU9tcVAkhwfm189I1YYcxt8s/1Zcy1FrrkIrZ3GZ9d3diy7tepaviWNHUHbrEHXamJ1N7KFuoSjs7aQuD6+2SlP+5qH3pu/Vm+blSp6cfGRrPrm+DmrZ3TGtCrjzWgzzhw8mmyKMQbFfjdzL5iZMPrTnsho5uEmrgwoLJBmnGV17lPoo5kQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DB9PR04MB9626.eurprd04.prod.outlook.com (2603:10a6:10:309::18) by DBAPR04MB7446.eurprd04.prod.outlook.com (2603:10a6:10:1aa::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.12; Thu, 5 Dec 2024 16:51:44 +0000 Received: from DB9PR04MB9626.eurprd04.prod.outlook.com ([fe80::e81:b393:ebc5:bc3d]) by DB9PR04MB9626.eurprd04.prod.outlook.com ([fe80::e81:b393:ebc5:bc3d%4]) with mapi id 15.20.8230.010; Thu, 5 Dec 2024 16:51:43 +0000 From: Frank Li Date: Thu, 05 Dec 2024 11:51:12 -0500 Subject: [PATCH 4/5] regulator: pca9450: Add PMIC pca9452 support Message-Id: <20241205-pca9450-v1-4-aab448b74e78@nxp.com> References: <20241205-pca9450-v1-0-aab448b74e78@nxp.com> In-Reply-To: <20241205-pca9450-v1-0-aab448b74e78@nxp.com> To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Robin Gong , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, imx@lists.linux.dev, joy.zou@nxp.com, linux-arm-kernel@lists.infradead.org, Frank Li X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1733417480; l=3178; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=YhFm3p5cBgT6Des25s41MlZZ8qNGl5iYh7kvogdCttY=; b=8oYM0LYk8ORGCJI5h+oKgyIGzWgqX6Eu41kI3ln2PepM11O9RPorP2B6SmZb8CuqDvA/bunzO z+qlisrKLDoCUS5ZROrR55fvI7F8KdX8vBE7ahrC1IBYrcCFLFyShpd X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BYAPR02CA0029.namprd02.prod.outlook.com (2603:10b6:a02:ee::42) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9PR04MB9626:EE_|DBAPR04MB7446:EE_ X-MS-Office365-Filtering-Correlation-Id: 85d9e0d1-b387-4c24-5fb8-08dd154d18cc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|52116014|7416014|1800799024|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?X4KEtf87CDqBf0MvvuK/os1j9GnpChd?= =?utf-8?q?WpZtoX/so2n0oDHnlrIuyCCoBhXeT00+etQSmmTZmsWd2+HuoC+3OtCGCnOoBfM29?= =?utf-8?q?8UqaxwjPHwsm3+49zv1ynWx2CdPwNphVjSeyMJwNeUquKa+/LPWyDXL5Lko9ZksV0?= =?utf-8?q?eXhQerI9z5uzHjm8or+ZG+cwGjNaJGF0xAQkTEZ/B5gzsBvv7i1ZvAvYtcmkNIyxr?= =?utf-8?q?rlze1K9lPV5DxdXGmF/0tnMPupBznkONCtyKLVuMpO565GzzoDc2TbQNQEJ/D9EGn?= =?utf-8?q?BRQ4U3ZdC9o1xrU4EAOilH1i65gDURxBQBiGglunzYZLAU4weLQM4WqbynqMNc3c4?= =?utf-8?q?7xSRVBaBm25rlOQXvLTuprCxF3AbzCXh7TLHHoksr5AaQt+PQivhNK0UNacLqNzJ3?= =?utf-8?q?2eI4ITY25QbZFtQ/oNnp0Yqg6OCdz44s15f5pDWtLMI+TygViTRDDKhnKBEqTaYlU?= =?utf-8?q?up4FeTY/8x2QbJkEmIv3BmgDq5FVxjQYTWnRurm0hYID0ZLP7KRDrfgceyYwpYICZ?= =?utf-8?q?YK2L5Eo6w95VR7+hZ0IicLySlf3Vmwu0lrqpn9OXZ4F4dqHSTss4Exefo5TSnZ5W5?= =?utf-8?q?V8wAox6owbaZ7B93e/Ni/XQCVVVZTkVkmG3/j5goz+7oL/M5VSCBnf10pm8GCjjHY?= =?utf-8?q?tY2L3pX2B87M60SnF2YGH/2ykH8xm1138edAIpfMv1xXmUtxmSP0UMPSzua9I+MuB?= =?utf-8?q?Filt1yluYa6tLiSlx33FvaQ2kIxyc4QDaJ8+CX761GggWAOQopexmq1kfKjmCEMC9?= =?utf-8?q?TyhmuskREFLJslkljn76At7Pg0x6TugtGHsV9yC4rKNf89fvxTyb/ZTCArWnsv5v9?= =?utf-8?q?F565F0zn7juItPvM1jPhTLFP78qK8BVDqNWpsnMWL3XFlg+9ED7SmE/6j1MXDdsbl?= =?utf-8?q?1gJk4htgNoCMDFLkcXIeb1wOnEcxgGSu/5y51s25dOOmtBijJMhbF6tPPja01tH2C?= =?utf-8?q?nDs8Jl/gdMd4YmKFb46mW3DEmJJ2O/ErN9VS/VJJVZzZaRMKdh6lZiM50QCBgfkIX?= =?utf-8?q?FW8MNdn/aNVO3Alcu97X8MzljrHfAZrhdve4JqQkef5ek/mGQRyVLKmCFyXkSeOSD?= =?utf-8?q?vC3TCWZQIp3o3KJ/3JQ38rjtaw0EaWTF5ysbkgVokAkOrQH+QYKWG9zHyRzO3znXj?= =?utf-8?q?ehrIs4OqmAAqfwWI/Qv+d1LKbVPE3NhyjpTOa4V8QAEi9XYEXfPObhSsxAdxvjqkh?= =?utf-8?q?3KJbT+kea0Epg3DsdsP3+jA7Szvc8vg2N8wSFEjYzB/PKnCH3LrfmEj8x44XM9pFW?= =?utf-8?q?QY1mEZgji99/7sVTXjP92bDB96nQ0UaJChl/LpWbqYgwFzid2HIa6q/9lCOHRDrMf?= =?utf-8?q?XhOQINqGxmK8odYPpnyqdxFj71SGfqdoUvBoTIuqTBCLMM68OQqhEk4=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB9PR04MB9626.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(52116014)(7416014)(1800799024)(366016)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?5KX6MljCZWFPNCtabUAOC3CGgiLe?= =?utf-8?q?ELDI+vIT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Up+nqJH/fj6vtYrRZvZoUPftJPclJGcykYCMYWKfKmX0uB?= =?utf-8?q?kxf+OkXeViwhzRZjJSgVy3sc4iKitAEYHT6Di7crr/11ZX9Fb1Jsr1IK0uJvwXaUp?= =?utf-8?q?9cXtYmIpZrBvfF3GkkizJqMHssk4V9ieNetHSk37E5uGVayhq+KITnEraYGr/+C+k?= =?utf-8?q?C2x7xNWU/b5Y6b7r7F0KmHcWzd2+F7rUESDsdk1Fh68GfRqw7lSt5wYy8Fmjus974?= =?utf-8?q?sP6rwxoa8PK3HTTD2JNL27pkP0nSDmCQYFLT/SwQ3envxJ51Oeij3OXJotRC7REWW?= =?utf-8?q?TxcRGm2kdiaUTiGujZv/6HSAAj6UDy/+hmAqvvSyjQm8pElGdIUWjV3qJsmcB2PWc?= =?utf-8?q?R9yvxH2I/NcEcYfH6biT6YZ/1QWsC0BOIQf6452t1zLJpovLcWoBjnuwHw6UPPwXy?= =?utf-8?q?VNOqnRhopEvwG8C3Rf8ScrvKIIHhcrj0TDVffK5WLNt9z3XdcL4V25pa6/k111RND?= =?utf-8?q?MZbfDuFh9962DVzqokN2WWjusmzMyVUdSV6mJG7QdKKSL2z7QVQIVYiELANbNlGz1?= =?utf-8?q?DRcdD8n8P6rqDXCAcCFCHKmWE3O8RMxHuhXUne5Af5ZIS3HGWE19lfIYMc7+mEboi?= =?utf-8?q?4O42atOBqdso?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 85d9e0d1-b387-4c24-5fb8-08dd154d18cc X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Dec 2024 16:51:43.2223 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: zcwiqlSE7AZLSb5hvFX2wVcq4/aTbxeGPt0Knbqp1Exl/YIp7BPMhZlaJe5p4iP2QDqvjY2Egj3+XsdF8wvtqw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR04MB7446 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241205_085147_854515_962A1AD5 X-CRM114-Status: GOOD ( 15.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Joy Zou Add the PMIC pca9452 support, which add ldo3 compared with pca9451a. Signed-off-by: Joy Zou Signed-off-by: Frank Li --- drivers/regulator/pca9450-regulator.c | 29 ++++++++++++++++++++++++++++- include/linux/regulator/pca9450.h | 1 + 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/drivers/regulator/pca9450-regulator.c b/drivers/regulator/pca9450-regulator.c index 0b1f099fdd5ee..faa6b79c27d75 100644 --- a/drivers/regulator/pca9450-regulator.c +++ b/drivers/regulator/pca9450-regulator.c @@ -815,6 +815,24 @@ static const struct pca9450_regulator_desc pca9451a_regulators[] = { .owner = THIS_MODULE, }, }, + { + .desc = { + .name = "ldo3", + .of_match = of_match_ptr("LDO3"), + .regulators_node = of_match_ptr("regulators"), + .id = PCA9450_LDO3, + .ops = &pca9450_ldo_regulator_ops, + .type = REGULATOR_VOLTAGE, + .n_voltages = PCA9450_LDO3_VOLTAGE_NUM, + .linear_ranges = pca9450_ldo34_volts, + .n_linear_ranges = ARRAY_SIZE(pca9450_ldo34_volts), + .vsel_reg = PCA9450_REG_LDO3CTRL, + .vsel_mask = LDO3OUT_MASK, + .enable_reg = PCA9450_REG_LDO3CTRL, + .enable_mask = LDO3_EN_MASK, + .owner = THIS_MODULE, + }, + }, { .desc = { .name = "ldo4", @@ -916,6 +934,7 @@ static int pca9450_i2c_probe(struct i2c_client *i2c) pca9450->rcnt = ARRAY_SIZE(pca9450bc_regulators); break; case PCA9450_TYPE_PCA9451A: + case PCA9450_TYPE_PCA9452: regulator_desc = pca9451a_regulators; pca9450->rcnt = ARRAY_SIZE(pca9451a_regulators); break; @@ -943,7 +962,8 @@ static int pca9450_i2c_probe(struct i2c_client *i2c) /* Check your board and dts for match the right pmic */ if (((device_id >> 4) != 0x1 && type == PCA9450_TYPE_PCA9450A) || ((device_id >> 4) != 0x3 && type == PCA9450_TYPE_PCA9450BC) || - ((device_id >> 4) != 0x9 && type == PCA9450_TYPE_PCA9451A)) + ((device_id >> 4) != 0x9 && type == PCA9450_TYPE_PCA9451A) || + ((device_id >> 4) != 0x9 && type == PCA9450_TYPE_PCA9452)) return dev_err_probe(&i2c->dev, -EINVAL, "Device id(%x) mismatched\n", device_id >> 4); @@ -955,6 +975,9 @@ static int pca9450_i2c_probe(struct i2c_client *i2c) r = ®ulator_desc[i]; desc = &r->desc; + if (type == PCA9450_TYPE_PCA9451A && !strcmp(desc->name, "ldo3")) + continue; + config.regmap = pca9450->regmap; config.dev = pca9450->dev; @@ -1043,6 +1066,10 @@ static const struct of_device_id pca9450_of_match[] = { .compatible = "nxp,pca9451a", .data = (void *)PCA9450_TYPE_PCA9451A, }, + { + .compatible = "nxp,pca9452", + .data = (void *)PCA9450_TYPE_PCA9452, + }, { } }; MODULE_DEVICE_TABLE(of, pca9450_of_match); diff --git a/include/linux/regulator/pca9450.h b/include/linux/regulator/pca9450.h index 243633c8dceb3..b427b5873de1a 100644 --- a/include/linux/regulator/pca9450.h +++ b/include/linux/regulator/pca9450.h @@ -10,6 +10,7 @@ enum pca9450_chip_type { PCA9450_TYPE_PCA9450A = 0, PCA9450_TYPE_PCA9450BC, PCA9450_TYPE_PCA9451A, + PCA9450_TYPE_PCA9452, PCA9450_TYPE_AMOUNT, }; From patchwork Thu Dec 5 16:51:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13895826 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 57D1EE77178 for ; Thu, 5 Dec 2024 17:09:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To: In-Reply-To:References:Message-Id:Content-Transfer-Encoding:Content-Type: Subject:Date:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Oy0HT+FTy7m40dkT7/0R42A2NWHtIKcoyDetvr0QoP4=; b=0gcLHjas3pidLKfV3PDVNPtDP7 tV9zAJQjEApsO/i7EkYTeHbwEGMCfd6oRsG/s4AQV/kn/EszbcvPCJCouO5n7lzosCCaLn4QExPsu 4LKlVEK19W2B61QK2U8ujNnCoRH6raEy4kxKptNL0cQ+2KCQX9OOAsE6FZV1quP8PYEyfuUN9NIPW Cs2l8z6VEvRih7hQhwwx1AHTqb3FkCYF+pCdELTnTf6YupsYQQCuG+cQx/0T1Yk2gNPWqedVKWBhn PCaoMWBCeLAiMZ62rEGTn6FyySQNzySxvw0ISBBvKZZwcdRZimdG2UnEJeFm374Yd2HMB2oh2WB43 055Mb4Yw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tJFLm-0000000GsnN-0qs5; Thu, 05 Dec 2024 17:09:14 +0000 Received: from mail-am6eur05on20602.outbound.protection.outlook.com ([2a01:111:f403:2612::602] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tJF4v-0000000GpQi-0n5F for linux-arm-kernel@lists.infradead.org; Thu, 05 Dec 2024 16:51:50 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=gB8xNoytgnCJcEJc2OyYYKvmtPLuV/1OqP/RBtetemAhHUzlNiBYdJiJ+iqKOoQMCtiECTF2SupKfIy4zUyzJZUeLl61Z7lFXar7KTGJJ+/AQyO6jHt+K+yf20wuCYDmufgqb4iEuuU3yTBIqw8Z0TXj75cA9NU06S5g9/EpJhUQzvMhq2k1FZveMmKa5kbpT3jzeC+L+NyR5KKfPHs1IZEXzFP/lvlY+lZlbSQC6kbljmIih+D5BCB21tyjNVHuxNW++FMktexs/Qe56RvCyWuTuFQART+Q79DSV6YQWOXttDb3TtDMjBWmgV5RbSRMRXzWsDREvSg7ljCJndgGIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Oy0HT+FTy7m40dkT7/0R42A2NWHtIKcoyDetvr0QoP4=; b=Ue3sEXGDlb1nP7ZtO4KfCmqU4qBwKXwSVwuOnU9hJcZ5w8bnFNa/IRxJHEeKkKSqEzPO3VX6KAgI0jWk2Gdk4uLkF2PrF++6vtrZgykBEQo3jYB6BHhNbjzy0/JTPwNYFMWefw5pTsc1kgMdD+u0lvPvkeaH/9ZOK2F1k7cLnmq13OArNI0uWmuA5WCirX/kbliKrR3IXwENS2YMVMHqPZZAKwI+MPrdI1AlqN7AyN1S5+PjU4q/uAELgpjPvLAkV/vtfPQrRydUeh7Hxoq7YqGF9tzSPFMjV4R3bmxMg/hKgCdGOP/KDO962PfJ18tMvlSjBM17Gu1F1H8YroEUAQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Oy0HT+FTy7m40dkT7/0R42A2NWHtIKcoyDetvr0QoP4=; b=BDCxse5bnkXizwlsaffaoKritnP4SdG2n9YGcrxadDWXGVEKs98C28djetJRZPdbOYJSXV1va58jm45bpoq13gRLUnMCjkxC3OGB5+qxvgjvXK7aZQHQEp8xbtf4GaNb7wKRqkhmQVP3xNX8p2EmLPq9DYV+fgPMtypfGr0Ts6dME1E4TPZhfaHl5cmD4v2FJeBOVBUQ2N9A5XjLeAnWSodJFuq0oI/Wze+z0QpnnRedS3Fh8xjjH2ArSD8iP1IEW9dFiMhBaXQmODakcMI9f5l9RjBqhK9LIswd/y6m4o2h9gHsqRsxn8v+z1wfu2Xq2qQvCLyh5YqDTThSgKLAPg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DB9PR04MB9626.eurprd04.prod.outlook.com (2603:10a6:10:309::18) by DBAPR04MB7446.eurprd04.prod.outlook.com (2603:10a6:10:1aa::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.12; Thu, 5 Dec 2024 16:51:47 +0000 Received: from DB9PR04MB9626.eurprd04.prod.outlook.com ([fe80::e81:b393:ebc5:bc3d]) by DB9PR04MB9626.eurprd04.prod.outlook.com ([fe80::e81:b393:ebc5:bc3d%4]) with mapi id 15.20.8230.010; Thu, 5 Dec 2024 16:51:47 +0000 From: Frank Li Date: Thu, 05 Dec 2024 11:51:13 -0500 Subject: [PATCH 5/5] arm64: dts: imx93: add pca9452 support Message-Id: <20241205-pca9450-v1-5-aab448b74e78@nxp.com> References: <20241205-pca9450-v1-0-aab448b74e78@nxp.com> In-Reply-To: <20241205-pca9450-v1-0-aab448b74e78@nxp.com> To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Robin Gong , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, imx@lists.linux.dev, joy.zou@nxp.com, linux-arm-kernel@lists.infradead.org, Frank Li X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1733417480; l=2719; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=ByZmZVMFQefEgEbYLBGLsWjBEQTR+hvttxmsOxhU1a8=; b=6o3DE36F1ZRWFqj5Ixp7eqKhrNzHnu5dazVfAJSFPDbPPz2V2YRKRSsHPS5oFcHLK8IOc36vm eKExD5fL48HB9Vn2POYlNGs+fNREdWkF8eUasBgtYMKX8RLxafOcu6a X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BYAPR02CA0029.namprd02.prod.outlook.com (2603:10b6:a02:ee::42) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9PR04MB9626:EE_|DBAPR04MB7446:EE_ X-MS-Office365-Filtering-Correlation-Id: d131d831-caab-495e-5e23-08dd154d1b71 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|52116014|7416014|1800799024|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?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W8JTZ1LS3DpnmrVfATvZHYc3RBN/CZ/UbTt52E71JLjORbaT?= =?utf-8?q?yljgo8phIw/pEvHrstdzjXmkuji3krGShz6+Nu6ADEBkXu6qIBblVKt96pWXw6b0p?= =?utf-8?q?nqbqp/0eD3FlbudhQT5YbzuBPZKiTe6K/meXCUbKbClQP9tOHVMDK/5PO4WfH3xT9?= =?utf-8?q?if/gMoNf8ckLZweyDxCDF8awLQO9oXwuB/opmsmlj3H7wFpCVlhkEFiwA0+ZedT/N?= =?utf-8?q?6rnp93Z5bNilq6Fz8pus8k0dkUXTHeBCgksyaAm9caVgHtLL20BzGEL7CVSY6Kbf/?= =?utf-8?q?vndjppIGWgz7Wga1zkd5ojD6sMaUG7mdKbaYMj485/28OM9mJ+ovEwAXU/oMM2NTC?= =?utf-8?q?rr/Hg/NdOoR4IagmpRe1P2X93K/Uz7Hhs5zF4TXgVTOa8CjIsbv4CRCFQDFQI4QPU?= =?utf-8?q?67NUlpRuMwnnwWc6NSMKlYDPc/bBPeIlIv4y47b1+APOwRribrg7n0bj9Njd/TPDv?= =?utf-8?q?QYiiaziamb0G7QeoRvE7UHrA5NRUXSWlDmoXsBdSPtaS41rqeudnBNs=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB9PR04MB9626.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(52116014)(7416014)(1800799024)(366016)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?6cnF3YOKdQHD34MZ1yUxbHmSXTEE?= =?utf-8?q?l07h4ZSZ6YjR8EUZyVocfXSF2tWqdJYyw26tYcYR1nIzW6c6cO5RSjfZcZ4pbS8Fl?= =?utf-8?q?b2oo3enBY3pk6lNsj6Kmqfj+W04agG6EyivzwqB7n+VZ+EE3oLxF3UCNGS96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?= =?utf-8?q?Zmpw4ZSSSPX7HvPOuvsIflv6bzOZUFtBTNkUEAMFipEGdsZ1QLngrboFqlup+qomM?= =?utf-8?q?OwHX+YETHg1GI3sdos5ZJXPD7TVf2UDUYYV2EMvdnOwyAkWhKQgQRfICfMtpBdAms?= =?utf-8?q?jrr9NIUhvHibWz/3CqI9SuT04pYJ0B+bkUdn6ogk0SzGgBmF1rjIEqxwidBhEplLU?= =?utf-8?q?rC6k16ycGoUMoW7VTR+J7/m2i4Sqx5zF3TuZM/kJICM+3Ha8QH9nHF/i/2tTJsSHK?= =?utf-8?q?e8WJ3w7poYRZpElMQRD4Lc1XEXuEjE9uq4MdZiCUWJ/kgaPz5357YVlXaK+re4m0T?= =?utf-8?q?GtuJm7EfW55WoYcaErq0lijSfV3Wc2Q2PWHkV4/TS+qImDDEWuomrx/H+BnIdyf2/?= =?utf-8?q?GYSTG3/pii30yQa9gMMa05MY0633QmZ2ZQYtHQTVUjKg4vJCkrDR1ytHc4dD0y+YA?= =?utf-8?q?GIk1eOrxTwewkIWnR83X7/nd3OmwnIXXgC+3nVYkT8n710wrYmmpJVyDtOIO+c0Ew?= =?utf-8?q?l9ucAJPD52FH?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d131d831-caab-495e-5e23-08dd154d1b71 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Dec 2024 16:51:47.6701 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: dwwxBZDaSDu8wQG0+EqcRjkuSJZqpGy2xZM1OJnb1pxR/5dWb9grRkIgEYqWpohOsew+rGcKcK91ebg8rhPlQQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR04MB7446 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241205_085149_238249_4F163C8C X-CRM114-Status: UNSURE ( 9.27 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Joy Zou Support pca9452 on imx93-14x14-evk. Signed-off-by: Joy Zou Signed-off-by: Frank Li --- arch/arm64/boot/dts/freescale/imx93-14x14-evk.dts | 83 +++++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx93-14x14-evk.dts b/arch/arm64/boot/dts/freescale/imx93-14x14-evk.dts index 236a44c1782ae..348abb9ceae19 100644 --- a/arch/arm64/boot/dts/freescale/imx93-14x14-evk.dts +++ b/arch/arm64/boot/dts/freescale/imx93-14x14-evk.dts @@ -219,6 +219,89 @@ pcal6524: gpio@22 { interrupt-parent = <&gpio3>; interrupts = <27 IRQ_TYPE_LEVEL_LOW>; }; + + pmic@25 { + compatible = "nxp,pca9452"; + reg = <0x25>; + interrupt-parent = <&pcal6524>; + interrupts = <11 IRQ_TYPE_EDGE_FALLING>; + + regulators { + buck1: BUCK1 { + regulator-name = "BUCK1"; + regulator-min-microvolt = <610000>; + regulator-max-microvolt = <950000>; + regulator-boot-on; + regulator-always-on; + regulator-ramp-delay = <3125>; + }; + + buck2: BUCK2 { + regulator-name = "BUCK2"; + regulator-min-microvolt = <600000>; + regulator-max-microvolt = <670000>; + regulator-boot-on; + regulator-always-on; + regulator-ramp-delay = <3125>; + }; + + buck4: BUCK4{ + regulator-name = "BUCK4"; + regulator-min-microvolt = <1620000>; + regulator-max-microvolt = <3400000>; + regulator-boot-on; + regulator-always-on; + }; + + buck5: BUCK5{ + regulator-name = "BUCK5"; + regulator-min-microvolt = <1620000>; + regulator-max-microvolt = <3400000>; + regulator-boot-on; + regulator-always-on; + }; + + buck6: BUCK6 { + regulator-name = "BUCK6"; + regulator-min-microvolt = <1060000>; + regulator-max-microvolt = <1140000>; + regulator-boot-on; + regulator-always-on; + }; + + ldo1: LDO1 { + regulator-name = "LDO1"; + regulator-min-microvolt = <1620000>; + regulator-max-microvolt = <1980000>; + regulator-boot-on; + regulator-always-on; + }; + + ldo3: LDO3 { + regulator-name = "LDO3"; + regulator-min-microvolt = <1710000>; + regulator-max-microvolt = <1890000>; + regulator-boot-on; + regulator-always-on; + }; + + ldo4: LDO4 { + regulator-name = "LDO4"; + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <840000>; + regulator-boot-on; + regulator-always-on; + }; + + ldo5: LDO5 { + regulator-name = "LDO5"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + regulator-always-on; + }; + }; + }; }; &lpi2c3 {