From nobody Tue Feb 10 20:05:57 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 588DBC6FD1D for ; Fri, 17 Mar 2023 09:39:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229648AbjCQJjY (ORCPT ); Fri, 17 Mar 2023 05:39:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231248AbjCQJjQ (ORCPT ); Fri, 17 Mar 2023 05:39:16 -0400 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17689265AF for ; Fri, 17 Mar 2023 02:39:15 -0700 (PDT) Received: by mail-wr1-x434.google.com with SMTP id j2so3830300wrh.9 for ; Fri, 17 Mar 2023 02:39:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=devialet.com; s=google; t=1679045953; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=kU889Qh9rHAQWYG1+vFuFluII986uJTI+qL6sjqYuPc=; b=PKH3F3FlA4R3WQAku266/iZ2sC9jZ3RAuu0anE29HTuFfalLN8Jk/qgKDZI8glh8ub SBfM2T4m1v7SDMvucQM9fdDcwigYxMlRn2Ml8iavtqzLc4m4E5sEiqKUgY76RG2l/9NF iIpkOaFMWHYaEl6i3lc9wJHdm8FcEQ9Ep6jC0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679045953; h=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=kU889Qh9rHAQWYG1+vFuFluII986uJTI+qL6sjqYuPc=; b=ET9I7w7mwvibNpknG5M3vHQac7Cskz4LOivbnNzS8vTDhU8qD165vYsjxGdHr+3RKt guY7j/RlALCfUD388jcp1RMvgbT1QcO1UN71/UtV2yI9BC5bMGBXEGv0OoE65aIv6Xh7 NrVj+7HKoJex8TkHkM5ow9NTabT1W03SFPeePXdbThL0m6g6+R7fjm17kmyOJDduEPSp BcuAjYumiz8FcQNBym7eTTqY+t7hwVdEJskAyTyiJmq6H5dzrPQQeazVJf1W9XkMLQYI HnoMWfpD+D3I9yIs5ylQ5jifRjmEz7jS7lNlXbatu8/CkV9t3pAHBCgMlZGFGMgmSX30 927A== X-Gm-Message-State: AO0yUKXB2zhXOTv5Au/r9Vua6bJD7To8arTxMvD4VCrO4Q7MfuuvDnGt dgJf7NDXFz5REet6n7m2z5U7QEvcTC4InP3uZLNKq6WRDGWhaBBkEjxcdFv7kpr6QPE7v3PFRVl PaLI9lVmOF6Ed3GNzvg== X-Google-Smtp-Source: AK7set+t6k3z5VsJP70zYRlyJDtyl9C0cC4pyWUKawV7wdvlzLMJp03aZH/KQDoO7KmU1c56A6GJXQ== X-Received: by 2002:a5d:55cb:0:b0:2d1:21a1:742d with SMTP id i11-20020a5d55cb000000b002d121a1742dmr3890263wrw.6.1679045953599; Fri, 17 Mar 2023 02:39:13 -0700 (PDT) Received: from nicolas-laptop.devialet.com (static-css-csd-151233.business.bouyguestelecom.com. [176.162.151.233]) by smtp.gmail.com with ESMTPSA id e8-20020adffd08000000b002c592535839sm1530823wrr.17.2023.03.17.02.39.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Mar 2023 02:39:13 -0700 (PDT) From: Nicolas Heemeryck To: Liam Girdwood , Mark Brown Cc: linux-kernel@vger.kernel.org, Nicolas Heemeryck Subject: [PATCH 1/2] regulator: pca9450: Add LOADSW regulator Date: Fri, 17 Mar 2023 10:39:10 +0100 Message-Id: <20230317093911.1254530-2-nicolas.heemeryck@devialet.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230317093911.1254530-1-nicolas.heemeryck@devialet.com> References: <20230317093911.1254530-1-nicolas.heemeryck@devialet.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Make the load switch present in the PCA9450 accessible and configurable from the devicetree. Note that the SWIn for the load switch is connected to BUCK4. Signed-off-by: Nicolas Heemeryck --- drivers/regulator/pca9450-regulator.c | 32 +++++++++++++++++++++++++++ include/linux/regulator/pca9450.h | 4 ++++ 2 files changed, 36 insertions(+) diff --git a/drivers/regulator/pca9450-regulator.c b/drivers/regulator/pca9= 450-regulator.c index c6351fac9f4d..ccb61fc73a59 100644 --- a/drivers/regulator/pca9450-regulator.c +++ b/drivers/regulator/pca9450-regulator.c @@ -99,6 +99,12 @@ static const struct regulator_ops pca9450_ldo_regulator_= ops =3D { .get_voltage_sel =3D regulator_get_voltage_sel_regmap, }; =20 +static const struct regulator_ops pca9450_loadsw_regulator_ops =3D { + .enable =3D regulator_enable_regmap, + .disable =3D regulator_disable_regmap, + .is_enabled =3D regulator_is_enabled_regmap, +}; + /* * BUCK1/2/3 * 0.60 to 2.1875V (12.5mV step) @@ -452,6 +458,19 @@ static const struct pca9450_regulator_desc pca9450a_re= gulators[] =3D { .owner =3D THIS_MODULE, }, }, + { + .desc =3D { + .name =3D "loadsw", + .of_match =3D of_match_ptr("LOADSW"), + .regulators_node =3D of_match_ptr("regulators"), + .id =3D PCA9450_LOADSW, + .ops =3D &pca9450_loadsw_regulator_ops, + .type =3D REGULATOR_VOLTAGE, + .enable_reg =3D PCA9450_REG_LOADSW_CTRL, + .enable_mask =3D LOADSW_CTRL_EN_MASK, + .owner =3D THIS_MODULE, + }, + }, }; =20 /* @@ -661,6 +680,19 @@ static const struct pca9450_regulator_desc pca9450bc_r= egulators[] =3D { .owner =3D THIS_MODULE, }, }, + { + .desc =3D { + .name =3D "loadsw", + .of_match =3D of_match_ptr("LOADSW"), + .regulators_node =3D of_match_ptr("regulators"), + .id =3D PCA9450_LOADSW, + .ops =3D &pca9450_loadsw_regulator_ops, + .type =3D REGULATOR_VOLTAGE, + .enable_reg =3D PCA9450_REG_LOADSW_CTRL, + .enable_mask =3D LOADSW_CTRL_EN_MASK, + .owner =3D THIS_MODULE, + }, + }, }; =20 static irqreturn_t pca9450_irq_handler(int irq, void *data) diff --git a/include/linux/regulator/pca9450.h b/include/linux/regulator/pc= a9450.h index 3c01c2bf84f5..4e922d6010cb 100644 --- a/include/linux/regulator/pca9450.h +++ b/include/linux/regulator/pca9450.h @@ -24,6 +24,7 @@ enum { PCA9450_LDO3, PCA9450_LDO4, PCA9450_LDO5, + PCA9450_LOADSW, PCA9450_REGULATOR_CNT, }; =20 @@ -209,6 +210,9 @@ enum { #define LDO5H_EN_MASK 0xC0 #define LDO5HOUT_MASK 0x0F =20 +/* PCA9450_REG_LOADSW_CTRL bits */ +#define LOADSW_CTRL_EN_MASK 0x03 + /* PCA9450_REG_IRQ bits */ #define IRQ_PWRON 0x80 #define IRQ_WDOGB 0x40 --=20 2.34.1 --=20 - Confidential - From nobody Tue Feb 10 20:05:57 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BFD63C6FD1D for ; Fri, 17 Mar 2023 09:39:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231420AbjCQJj2 (ORCPT ); Fri, 17 Mar 2023 05:39:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231289AbjCQJjR (ORCPT ); Fri, 17 Mar 2023 05:39:17 -0400 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C10026CFD for ; Fri, 17 Mar 2023 02:39:15 -0700 (PDT) Received: by mail-wr1-x435.google.com with SMTP id p4so3827189wre.11 for ; Fri, 17 Mar 2023 02:39:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=devialet.com; s=google; t=1679045954; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=f65fKEpaJqyUwxXm+2vVNOROxBQI4YZ3iwac9jAGXik=; b=NBjutXHRYhGs4yncXA2Mz3GN3rTOnP4ccUT+UC8p9A2/M9W9SltGnY2TCP0wgJH/85 ynZWkq/jqHjfpRBcnNvua+0J6UoN7qHBlPNqNVu42Sz1Lh1YYcr4n8wZimlO41w62hbG xnVokWGXzflt44ziHDb60+iGA3Is5W43KwdFI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679045954; h=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=f65fKEpaJqyUwxXm+2vVNOROxBQI4YZ3iwac9jAGXik=; b=oiiYFMMc+Pp+kBVt1H26aDmIiCUkVflNjNrMmvtEocaBT1AlgkN9GeV+YsbUtTSZ/6 OTyRMUQJyBRN9l2XG+sdNfJcCpOBq9/pzz1L3G59DZL7g3RUnjfm8ap0RSaKsuxHtqPJ pgw7KuskGcoav9dK/U0m3ApZQeAT1C0ONlqeR+yDycv+nE1eLC6MIHiiuzPsWnEZbk1X nKX3mQ9ax1sNcBpDiPIbxl7HPkStWKOetcWEWt5w/ASNYo/9/rj18sWv9IgcMr7eVKVf V/LB26fJukElB+VaeQJa9cxD7LFhkjF22xt/8f3z0OCrSAmGs7uC7rO1FCtjR+Ct/VBn qzRw== X-Gm-Message-State: AO0yUKWYjD/tpwNLRjK7fvT1Paao1CcHXhvF6M0LtJyH9MCnBp1Hjbzc bmBrJI5EFoByqFD/FyYMbSW3nR+PpnuPdQVjRZ4D6t3A+jdTEnF9oeDamu2ch4w4s7R9s8Uxf6F TESWcKpwDwHXE0pX3Iw== X-Google-Smtp-Source: AK7set/iRb/u//fySyWaWubjeyTeZKJQjHl+WIsUn08tQDSEP8zBTlOAHNVosAPfcreOyj4pvWwCjw== X-Received: by 2002:a5d:55cb:0:b0:2d1:21a1:742d with SMTP id i11-20020a5d55cb000000b002d121a1742dmr3890276wrw.6.1679045953916; Fri, 17 Mar 2023 02:39:13 -0700 (PDT) Received: from nicolas-laptop.devialet.com (static-css-csd-151233.business.bouyguestelecom.com. [176.162.151.233]) by smtp.gmail.com with ESMTPSA id e8-20020adffd08000000b002c592535839sm1530823wrr.17.2023.03.17.02.39.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Mar 2023 02:39:13 -0700 (PDT) From: Nicolas Heemeryck To: Liam Girdwood , Mark Brown Cc: linux-kernel@vger.kernel.org, Nicolas Heemeryck Subject: [PATCH 2/2] bindings: regulator: pca9450: Add LOADSW regulator Date: Fri, 17 Mar 2023 10:39:11 +0100 Message-Id: <20230317093911.1254530-3-nicolas.heemeryck@devialet.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230317093911.1254530-1-nicolas.heemeryck@devialet.com> References: <20230317093911.1254530-1-nicolas.heemeryck@devialet.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add the binding documentation for the load switch regulator. Signed-off-by: Nicolas Heemeryck --- .../bindings/regulator/nxp,pca9450-regulator.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Documentation/devicetree/bindings/regulator/nxp,pca9450-regula= tor.yaml b/Documentation/devicetree/bindings/regulator/nxp,pca9450-regulato= r.yaml index 835b53302db8..064d57256aff 100644 --- a/Documentation/devicetree/bindings/regulator/nxp,pca9450-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/nxp,pca9450-regulator.yaml @@ -20,6 +20,7 @@ description: | #The valid names for PCA9450 regulator nodes are: #BUCK1, BUCK2, BUCK3, BUCK4, BUCK5, BUCK6, #LDO1, LDO2, LDO3, LDO4, LDO5 +#LOADSW #Note: Buck3 removed on PCA9450B and connect with Buck1 on PCA9450C. =20 properties: @@ -74,6 +75,14 @@ properties: =20 unevaluatedProperties: false =20 + "LOADSW": + type: object + $ref: regulator.yaml# + description: + Properties for LOAD SWITCH regulator. + + unevaluatedProperties: false + additionalProperties: false =20 sd-vsel-gpios: @@ -190,6 +199,11 @@ examples: regulator-boot-on; regulator-always-on; }; + loadsw: LOADSW { + regulator-name =3D "LOADSW"; + regulator-boot-on; + regulator-always-on; + }; }; }; }; --=20 2.34.1 --=20 - Confidential -