From nobody Sun Feb 8 09:32:52 2026 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1C4088C11; Fri, 16 Aug 2024 00:18:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723767524; cv=none; b=ZzPBN5rOxnmYIWJEMPasZNMvzMuiqNeTJKJam00qDs3i6F4ZpRyipvDgtBlwQLxvp4B2//IzQGcf1VjlhVEoQggmEdIfv0E246d9DwV8gRTY9sdfEdceuXk4MokmbuLenPj9JLWvBe4gfDrnysGB2odON/YLViijaq5fKKxh60w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723767524; c=relaxed/simple; bh=1K1mM/fDKVg9r17+5olckVhXJre9Iv08+gafKdiuMOM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=IIxLVaGZft+VW8ObtgfzDXiXzEpt4xph8HRt/pkuSz6HUe7hxwS/h5s7YUitf/Bfd12q3/rDccXahbj2Fo7iISqpuoyRzzalY+k2wdu5rYqpDPDmhXWqMbnx+JkKDIFDXK8SajCAVRkYeAljCWH5xwwYJ8nUy+G8tIBNInJUw1Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 71BED169E; Thu, 15 Aug 2024 17:19:08 -0700 (PDT) Received: from localhost.localdomain (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 99C613F6A8; Thu, 15 Aug 2024 17:18:40 -0700 (PDT) From: Andre Przywara To: Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Liam Girdwood , Mark Brown Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev, Chris Morgan , John Watts , Ryan Walklin , Philippe Simons Subject: [PATCH v3 1/3] dt-bindings: mfd: x-powers,axp152: add boost regulator Date: Fri, 16 Aug 2024 01:18:22 +0100 Message-Id: <20240816001824.6028-2-andre.przywara@arm.com> X-Mailer: git-send-email 2.39.4 In-Reply-To: <20240816001824.6028-1-andre.przywara@arm.com> References: <20240816001824.6028-1-andre.przywara@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The X-Powers AXP717 contains a boost regulator, that it meant to provide the 5V USB VBUS voltage when the devices operates on battery. Add the name "boost" to the regexp describing the allowed node names, to allow the regulator to be described in the devicetree. Signed-off-by: Andre Przywara Acked-by: Krzysztof Kozlowski Acked-by: Lee Jones Reviewed-by: Chen-Yu Tsai --- Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml b/D= ocumentation/devicetree/bindings/mfd/x-powers,axp152.yaml index b8e8db0d58e9c..14ab367fc8871 100644 --- a/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml +++ b/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml @@ -274,7 +274,7 @@ properties: Defines the work frequency of DC-DC in kHz. =20 patternProperties: - "^(([a-f])?ldo[0-9]|dcdc[0-7a-e]|ldo(_|-)io(0|1)|(dc1)?sw|rtc(_|-)ld= o|cpusldo|drivevbus|dc5ldo)$": + "^(([a-f])?ldo[0-9]|dcdc[0-7a-e]|ldo(_|-)io(0|1)|(dc1)?sw|rtc(_|-)ld= o|cpusldo|drivevbus|dc5ldo|boost)$": $ref: /schemas/regulator/regulator.yaml# type: object unevaluatedProperties: false --=20 2.39.4 From nobody Sun Feb 8 09:32:52 2026 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1E8F32B2CC; Fri, 16 Aug 2024 00:18:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723767526; cv=none; b=XLyOEobe0C1dyvO7q2wuMy3EodGRWxnL4MqhYHcSbCwnC3RXbAKSwkiVf/MK4uAu2PVOLHZfOSxlL9KqyGyD/4hxmFbAcBOWDskMsgs40hfvl0OnjbJeAuSu9FRpL/hk3x6WoU8ukyP4db+4VzMKMFIR8Kd6eCN8sd9xPN3kGjo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723767526; c=relaxed/simple; bh=BtSkgtgYxYi3tCt26YMCMhnhtlsJLtRd+gmk5O5hj2w=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=QJUJWM8WC+YmdDUxle9mcnVpt9mYJJw+jzL5Y2iFdPKd0FgtHXv3m25V5HxzuEWg3/D8elkcpsNS2qGNhaWZ5LdB3kMXMvt46YUHhXdqGZFdw4dWwXTTJpaW2g4kNIyvVFw6qWHymjeKgPdWqKRS1a0dROGevB4iSJ7X6SQROoA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8EDB316F3; Thu, 15 Aug 2024 17:19:10 -0700 (PDT) Received: from localhost.localdomain (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B61E13F6A8; Thu, 15 Aug 2024 17:18:42 -0700 (PDT) From: Andre Przywara To: Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Liam Girdwood , Mark Brown Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev, Chris Morgan , John Watts , Ryan Walklin , Philippe Simons Subject: [PATCH v3 2/3] mfd: axp20x: AXP717: Add support for boost regulator Date: Fri, 16 Aug 2024 01:18:23 +0100 Message-Id: <20240816001824.6028-3-andre.przywara@arm.com> X-Mailer: git-send-email 2.39.4 In-Reply-To: <20240816001824.6028-1-andre.przywara@arm.com> References: <20240816001824.6028-1-andre.przywara@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The AXP717 also contains a boost regulator, to provide the 5V USB VBUS rail when running on battery. Add the registers to the MFD description to be able to use them from the regulator driver. Signed-off-by: Andre Przywara Reviewed-by: John Watts Acked-by: Lee Jones Reviewed-by: Chen-Yu Tsai --- drivers/mfd/axp20x.c | 2 ++ include/linux/mfd/axp20x.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c index dacd3c96c9f57..16950c3206d7f 100644 --- a/drivers/mfd/axp20x.c +++ b/drivers/mfd/axp20x.c @@ -209,6 +209,8 @@ static const struct regmap_access_table axp313a_volatil= e_table =3D { }; =20 static const struct regmap_range axp717_writeable_ranges[] =3D { + regmap_reg_range(AXP717_MODULE_EN_CONTROL_2, AXP717_MODULE_EN_CONTROL_2), + regmap_reg_range(AXP717_BOOST_CONTROL, AXP717_BOOST_CONTROL), regmap_reg_range(AXP717_IRQ0_EN, AXP717_IRQ4_EN), regmap_reg_range(AXP717_IRQ0_STATE, AXP717_IRQ4_STATE), regmap_reg_range(AXP717_DCDC_OUTPUT_CONTROL, AXP717_CPUSLDO_CONTROL), diff --git a/include/linux/mfd/axp20x.h b/include/linux/mfd/axp20x.h index 8c0a33a2e9ce2..3758f986491c8 100644 --- a/include/linux/mfd/axp20x.h +++ b/include/linux/mfd/axp20x.h @@ -115,6 +115,8 @@ enum axp20x_variants { #define AXP313A_IRQ_STATE 0x21 =20 #define AXP717_ON_INDICATE 0x00 +#define AXP717_MODULE_EN_CONTROL_2 0x19 +#define AXP717_BOOST_CONTROL 0x1e #define AXP717_IRQ0_EN 0x40 #define AXP717_IRQ1_EN 0x41 #define AXP717_IRQ2_EN 0x42 --=20 2.39.4 From nobody Sun Feb 8 09:32:52 2026 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3329961674; Fri, 16 Aug 2024 00:18:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723767529; cv=none; b=CeDMv6rNcWrVhXggb+9FZpPA18z9+EnxMN2/zd5QqgcdCToYOZm0nRx7fERFqdAYLdArRHhbSMZrqZAO+8i+TIs/zc6kibfiKfepVMkoUphZtvluFcHDuUJpD+GlADqgAwM1BdxeqHe5qA/8WtzGr3cnWQSgcKHVY2ybc7FWFWE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723767529; c=relaxed/simple; bh=ovPVZ2QPwdoK7axLGodGEydS+uuPS2fQoqWFPxlv8dE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=AV5RRLAB9/MI6oPm5XSqK6dkyS8FXNBJYORTIFUqdDx1lF0r0XlN0MUIRviR0qqaygBsnWpDKmln7UXr2gUCfqioKMD06Ps1cCyH11CWr5VD5ACsEUUzsFHtadKnmMxlDwFK1HPDrgV53Jq2WfBwoWdMgmYokSq6IJfMsD/2IDA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A990C14BF; Thu, 15 Aug 2024 17:19:12 -0700 (PDT) Received: from localhost.localdomain (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D24623F6A8; Thu, 15 Aug 2024 17:18:44 -0700 (PDT) From: Andre Przywara To: Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Liam Girdwood , Mark Brown Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev, Chris Morgan , John Watts , Ryan Walklin , Philippe Simons Subject: [PATCH v3 3/3] regulator: axp20x: AXP717: Add boost regulator Date: Fri, 16 Aug 2024 01:18:24 +0100 Message-Id: <20240816001824.6028-4-andre.przywara@arm.com> X-Mailer: git-send-email 2.39.4 In-Reply-To: <20240816001824.6028-1-andre.przywara@arm.com> References: <20240816001824.6028-1-andre.przywara@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The AXP717 also contains an adjustable boost regulator, to provide the 5V USB VBUS rail when running on battery. Add the regulator description that states the voltage range this regulator can cover. Signed-off-by: Andre Przywara Reviewed-by: John Watts Reviewed-by: Chen-Yu Tsai --- drivers/regulator/axp20x-regulator.c | 4 ++++ include/linux/mfd/axp20x.h | 1 + 2 files changed, 5 insertions(+) diff --git a/drivers/regulator/axp20x-regulator.c b/drivers/regulator/axp20= x-regulator.c index f3c447ecdc3bf..a8e91d9d028b8 100644 --- a/drivers/regulator/axp20x-regulator.c +++ b/drivers/regulator/axp20x-regulator.c @@ -143,6 +143,7 @@ #define AXP717_DCDC3_NUM_VOLTAGES 103 #define AXP717_DCDC_V_OUT_MASK GENMASK(6, 0) #define AXP717_LDO_V_OUT_MASK GENMASK(4, 0) +#define AXP717_BOOST_V_OUT_MASK GENMASK(7, 4) =20 #define AXP803_PWR_OUT_DCDC1_MASK BIT_MASK(0) #define AXP803_PWR_OUT_DCDC2_MASK BIT_MASK(1) @@ -834,6 +835,9 @@ static const struct regulator_desc axp717_regulators[] = =3D { AXP_DESC(AXP717, CPUSLDO, "cpusldo", "vin1", 500, 1400, 50, AXP717_CPUSLDO_CONTROL, AXP717_LDO_V_OUT_MASK, AXP717_LDO1_OUTPUT_CONTROL, BIT(4)), + AXP_DESC(AXP717, BOOST, "boost", "vin1", 4550, 5510, 64, + AXP717_BOOST_CONTROL, AXP717_BOOST_V_OUT_MASK, + AXP717_MODULE_EN_CONTROL_2, BIT(4)), }; =20 /* DCDC ranges shared with AXP813 */ diff --git a/include/linux/mfd/axp20x.h b/include/linux/mfd/axp20x.h index 3758f986491c8..e0cd66bd3b6d9 100644 --- a/include/linux/mfd/axp20x.h +++ b/include/linux/mfd/axp20x.h @@ -486,6 +486,7 @@ enum { AXP717_CLDO3, AXP717_CLDO4, AXP717_CPUSLDO, + AXP717_BOOST, AXP717_REG_ID_MAX, }; =20 --=20 2.39.4