Skip to contentSkip to conversation

spacemit: introduce P1 PMIC support

PATCH Applied Alex Elder 6 participants 20 messages Aug 25, 2025 – Oct 14, 2025

Subsystems (6)
lore
Share & tools
lore

Alex Elder

author
#0 lore raw

v13 cover spacemit: introduce P1 PMIC support

The SpacemiT P1 is an I2C-controlled PMIC that implements 6 buck converters and 12 LDOs. It contains a load switch, ADC channels, GPIOs, a real-time clock, and a watchdog timer.

This series introduces a multifunction driver for the P1 PMIC as well as drivers for its regulators and RTC.

In this version I updated Troy Mitchell's e-mail address, and modified the definition of the MFD_SPACEMIT_P1 config option so it enables I2C_K1, to allow it to be usable. The series is now based on net-next rather than linux-v6.17-rc1.

-Alex

This series is available here:
https://github.com/riscstar/linux/tree/outgoing/pmic-v13

Between version 12 and version 13:
- Rebased onto August 25 linux-next
- Updated Troy Mitchell's e-mail address in patch 1
- Add Troy Mitchell's Acked-by in patch 1
- In patch 2, have MFD_SPACEMIT_P1 select I2C_K1 and depend on ARCH_SPACEMIT as suggested (privately) by Yixun Lan

Here is version 12 of this series:
https://lore.kernel.org/lkml/[email protected]/

Between version 11 and version 12:
- Simple rebase

Here is version 11 of this series:
https://lore.kernel.org/lkml/[email protected]/

Between version 10 and version 11:
- Abandon trying to implement a simple_mfd_data->max_register field
- Fix a missing dependency pointed out by the kernel test robot

Here is version 10 of this series:
https://lore.kernel.org/lkml/[email protected]/

Between version 9 and version 10:
- The #address-cells and #size-cells for the i2c8 DTS node were moved into its primary definition in "k1.dtsi".
- The interrupts property for the i2c8 DTS node was moved below its clock-related properties.
- The status property in the pmic@41 DTS node was dropped.
- The function that provides the regmap_config structure to use was reworked a bit.
- A new function was added to free the regmap_config structure after it's no longer needed.

Here is version 9 of this series:
https://lore.kernel.org/lkml/[email protected]/

Between version 8 and version 9:
- The max_config value is always used if it is provided with the simple_mfd_data structure.
- The regmap_config structure used is allocated dynamically if necessary; otherwise regmap_config_8r_8v is used.
- A small duplicated comment is removed

Here is version 8 of this series:
https://lore.kernel.org/lkml/[email protected]/

More complete history is available at that link.

Alex Elder (7):
dt-bindings: mfd: add support the SpacemiT P1 PMIC
mfd: simple-mfd-i2c: add SpacemiT P1 support
regulator: spacemit: support SpacemiT P1 regulators
rtc: spacemit: support the SpacemiT P1 RTC
riscv: dts: spacemit: enable the i2c8 adapter
riscv: dts: spacemit: define fixed regulators
riscv: dts: spacemit: define regulator constraints

 .../devicetree/bindings/mfd/spacemit,p1.yaml  |  86 +++++++++
 .../boot/dts/spacemit/k1-bananapi-f3.dts      | 135 ++++++++++++++
 arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi  |   7 +
 arch/riscv/boot/dts/spacemit/k1.dtsi          |  13 ++
 drivers/mfd/Kconfig                           |  13 ++
 drivers/mfd/simple-mfd-i2c.c                  |  17 ++
 drivers/regulator/Kconfig                     |  13 ++
 drivers/regulator/Makefile                    |   1 +
 drivers/regulator/spacemit-p1.c               | 157 ++++++++++++++++
 drivers/rtc/Kconfig                           |  10 ++
 drivers/rtc/Makefile                          |   1 +
 drivers/rtc/rtc-spacemit-p1.c                 | 167 ++++++++++++++++++
 12 files changed, 620 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/spacemit,p1.yaml
 create mode 100644 drivers/regulator/spacemit-p1.c
 create mode 100644 drivers/rtc/rtc-spacemit-p1.c

base-commit: 6c68f4c0a147c025ae0b25fab688c7c47964a02f

Signature · 1 line
2.48.1
author
#1 lore raw

PATCH v13 1/7 dt-bindings: mfd: add support the SpacemiT P1 PMIC

Enable the SpacemiT P1, which is an I2C-controlled PMIC. Initially only the RTC and regulators will be supported.

---
v13: - Update Troy Mitchell's e-mail address in "spacemit,p1.yaml"
- Add Troy Mitchell's Acked-by

 .../devicetree/bindings/mfd/spacemit,p1.yaml  | 86 +++++++++++++++++++
 1 file changed, 86 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/spacemit,p1.yaml
Documentation/devicetree/bindings/mfd/spacemit,p1.yaml new file +86 -0
new file mode 100644
index 0000000000000..c6593ac6ef6ad
@@ -0,0 +1,86 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/spacemit,p1.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: SpacemiT P1 Power Management Integrated Circuit
+
+maintainers:
+  - Troy Mitchell <[email protected]>
+
+description:
+  P1 is an I2C-controlled PMIC produced by SpacemiT.  It implements six
+  constant-on-time buck converters and twelve low-dropout regulators.
+  It also contains a load switch, watchdog timer, real-time clock, eight
+  12-bit ADC channels, and six GPIOs.  Additional details are available
+  in the "Power Stone/P1" section at the following link.
+    https://developer.spacemit.com/documentation
+
+properties:
+  compatible:
+    const: spacemit,p1
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  vin-supply:
+    description: Input supply phandle.
+
+  regulators:
+    type: object
+
+    patternProperties:
+      "^(buck[1-6]|aldo[1-4]|dldo[1-7])$":
+        type: object
+        $ref: /schemas/regulator/regulator.yaml#
+        unevaluatedProperties: false
+
+    unevaluatedProperties: false
+
+required:
+  - compatible
+  - reg
+  - interrupts
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        pmic@41 {
+            compatible = "spacemit,p1";
+            reg = <0x41>;
+            interrupts = <64>;
+
+            regulators {
+                buck1 {
+                    regulator-name = "buck1";
+                    regulator-min-microvolt = <500000>;
+                    regulator-max-microvolt = <3450000>;
+                    regulator-ramp-delay = <5000>;
+                    regulator-always-on;
+                };
+
+                aldo1 {
+                    regulator-name = "aldo1";
+                    regulator-min-microvolt = <500000>;
+                    regulator-max-microvolt = <3400000>;
+                    regulator-boot-on;
+                };
+
+                dldo1 {
+                    regulator-name = "dldo1";
+                    regulator-min-microvolt = <500000>;
+                    regulator-max-microvolt = <3400000>;
+                    regulator-boot-on;
+                };
+            };
+        };
+    };
Signature · 1 line
2.48.1
author
#2 lore raw

PATCH v13 2/7 mfd: simple-mfd-i2c: add SpacemiT P1 support

In reply to Alex Elder

Enable support for the RTC and regulators found in the SpacemiT P1 PMIC. Support is implemented by the simple I2C MFD driver.

The P1 PMIC is normally implemented with the SpacemiT K1 SoC. This PMIC provides 6 buck converters and 12 LDO regulators. It also implements a switch, watchdog timer, real-time clock, and more. Initially its RTC and regulators are supported.

---
v13: - Have MFD_SPACEMIT_P1 depend on ARCH_SPACEMIT and select I2C_K1

 drivers/mfd/Kconfig          | 13 +++++++++++++
 drivers/mfd/simple-mfd-i2c.c | 17 +++++++++++++++++
 2 files changed, 30 insertions(+)
drivers/mfd/Kconfig +13 -0
index a403a3daedd52..e5cdefbea71a1 100644
@@ -1238,6 +1238,19 @@ config MFD_QCOM_RPM
 	  Say M here if you want to include support for the Qualcomm RPM as a
 	  module. This will build a module called "qcom_rpm".
 
+config MFD_SPACEMIT_P1
+	tristate "SpacemiT P1 PMIC"
+	depends on ARCH_SPACEMIT || COMPILE_TEST
+	depends on I2C
+	select I2C_K1
+	select MFD_SIMPLE_MFD_I2C
+	help
+	  This option supports the I2C-based SpacemiT P1 PMIC, which
+	  contains regulators, a power switch, GPIOs, an RTC, and more.
+	  This option is selected when any of the supported sub-devices
+	  is configured.  The basic functionality is implemented by the
+	  simple MFD I2C driver.
+
 config MFD_SPMI_PMIC
 	tristate "Qualcomm SPMI PMICs"
 	depends on ARCH_QCOM || COMPILE_TEST
drivers/mfd/simple-mfd-i2c.c +17 -0
index f7798bd922224..63ac263888606 100644
@@ -93,6 +93,22 @@ static const struct simple_mfd_data maxim_mon_max77705 = {
 	.mfd_cell_size = ARRAY_SIZE(max77705_sensor_cells),
 };
 
+static const struct regmap_config spacemit_p1_regmap_config = {
+	.reg_bits = 8,
+	.val_bits = 8,
+};
+
+static const struct mfd_cell spacemit_p1_cells[] = {
+	{ .name = "spacemit-p1-regulator", },
+	{ .name = "spacemit-p1-rtc", },
+};
+
+static const struct simple_mfd_data spacemit_p1 = {
+	.regmap_config = &spacemit_p1_regmap_config,
+	.mfd_cell = spacemit_p1_cells,
+	.mfd_cell_size = ARRAY_SIZE(spacemit_p1_cells),
+};
+
 static const struct of_device_id simple_mfd_i2c_of_match[] = {
 	{ .compatible = "kontron,sl28cpld" },
 	{ .compatible = "silergy,sy7636a", .data = &silergy_sy7636a},
@@ -101,6 +117,7 @@ static const struct of_device_id simple_mfd_i2c_of_match[] = {
 	{ .compatible = "maxim,max77705-battery", .data = &maxim_mon_max77705},
 	{ .compatible = "fsl,lx2160aqds-fpga" },
 	{ .compatible = "fsl,ls1028aqds-fpga" },
+	{ .compatible = "spacemit,p1", .data = &spacemit_p1, },
 	{}
 };
 MODULE_DEVICE_TABLE(of, simple_mfd_i2c_of_match);
Signature · 1 line
2.48.1
#3 lore raw

Re: [PATCH v13 2/7] mfd: simple-mfd-i2c: add SpacemiT P1 support

kernel test robot noticed the following build warnings:

Hi Alex,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 6c68f4c0a147c025ae0b25fab688c7c47964a02f]

url:    https://github.com/intel-lab-lkp/linux/commits/Alex-Elder/dt-bindings-mfd-add-support-the-SpacemiT-P1-PMIC/20250826-012424
base:   6c68f4c0a147c025ae0b25fab688c7c47964a02f
patch link:    https://lore.kernel.org/r/20250825172057.163883-3-elder%40riscstar.com
patch subject: [PATCH v13 2/7] mfd: simple-mfd-i2c: add SpacemiT P1 support
config: x86_64-kismet-CONFIG_I2C_K1-CONFIG_MFD_SPACEMIT_P1-0-0 (https://download.01.org/0day-ci/archive/20250829/[email protected]/config)
reproduce: (https://download.01.org/0day-ci/archive/20250829/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

kismet warnings: (new ones prefixed by >>)

>> kismet: WARNING: unmet direct dependencies detected for I2C_K1 when selected by MFD_SPACEMIT_P1

WARNING: unmet direct dependencies detected for I2C_K1
Depends on [n]: I2C [=y] && HAS_IOMEM [=y] && (ARCH_SPACEMIT || COMPILE_TEST [=y]) && OF [=n] Selected by [y]:
- MFD_SPACEMIT_P1 [=y] && HAS_IOMEM [=y] && (ARCH_SPACEMIT || COMPILE_TEST [=y]) && I2C [=y]

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
author
#4 lore raw

PATCH v13 3/7 regulator: spacemit: support SpacemiT P1 regulators

In reply to Alex Elder

Add support for the regulators found in the SpacemiT P1 PMIC. This PMIC provides 6 buck converters and 12 LDO regulators.

The PMIC is implemented as a multi-function device. These regulators are probed based on this driver being named in a MFD cell in the simple MFD I2C driver.

---
 drivers/regulator/Kconfig       |  13 +++
 drivers/regulator/Makefile      |   1 +
 drivers/regulator/spacemit-p1.c | 157 ++++++++++++++++++++++++++++++++
 3 files changed, 171 insertions(+)
 create mode 100644 drivers/regulator/spacemit-p1.c
drivers/regulator/Kconfig +13 -0
index 223a500370d09..92a0720823f04 100644
@@ -1423,6 +1423,19 @@ config REGULATOR_SLG51000
 	  The SLG51000 is seven compact and customizable low dropout
 	  regulators.
 
+config REGULATOR_SPACEMIT_P1
+	tristate "SpacemiT P1 regulators"
+	depends on ARCH_SPACEMIT || COMPILE_TEST
+	depends on I2C
+	select MFD_SPACEMIT_P1
+	default ARCH_SPACEMIT
+	help
+	  Enable support for regulators implemented by the SpacemiT P1
+	  power controller.  The P1 implements 6 high-efficiency buck
+	  converters and 12 programmable LDO regulators.  To compile this
+	  driver as a module, choose M here.  The module will be called
+	  "spacemit-pmic".
+
 config REGULATOR_STM32_BOOSTER
 	tristate "STMicroelectronics STM32 BOOSTER"
 	depends on ARCH_STM32 || COMPILE_TEST
drivers/regulator/Makefile +1 -0
index 54e67e1c0c676..44c750f200421 100644
@@ -165,6 +165,7 @@ obj-$(CONFIG_REGULATOR_S5M8767) += s5m8767.o
 obj-$(CONFIG_REGULATOR_SC2731) += sc2731-regulator.o
 obj-$(CONFIG_REGULATOR_SKY81452) += sky81452-regulator.o
 obj-$(CONFIG_REGULATOR_SLG51000) += slg51000-regulator.o
+obj-$(CONFIG_REGULATOR_SPACEMIT_P1) += spacemit-p1.o
 obj-$(CONFIG_REGULATOR_STM32_BOOSTER) += stm32-booster.o
 obj-$(CONFIG_REGULATOR_STM32_VREFBUF) += stm32-vrefbuf.o
 obj-$(CONFIG_REGULATOR_STM32_PWR) += stm32-pwr.o
drivers/regulator/spacemit-p1.c new file +157 -0

157 lines not on this page · raw message

Signature · 1 line
2.48.1
author
#5 lore raw

PATCH v13 4/7 rtc: spacemit: support the SpacemiT P1 RTC

In reply to Alex Elder

Add support for the RTC found in the SpacemiT P1 PMIC. Initially only setting and reading the time are supported.

The PMIC is implemented as a multi-function device. This RTC is probed based on this driver being named in a MFD cell in the simple MFD I2C driver.

---
 drivers/rtc/Kconfig           |  10 ++
 drivers/rtc/Makefile          |   1 +
 drivers/rtc/rtc-spacemit-p1.c | 167 ++++++++++++++++++++++++++++++++++
 3 files changed, 178 insertions(+)
 create mode 100644 drivers/rtc/rtc-spacemit-p1.c
drivers/rtc/Kconfig +10 -0
index 64f6e9756aff4..31d355b103d43 100644
@@ -406,6 +406,16 @@ config RTC_DRV_MAX77686
 	  This driver can also be built as a module. If so, the module
 	  will be called rtc-max77686.
 
+config RTC_DRV_SPACEMIT_P1
+	tristate "SpacemiT P1 RTC"
+	depends on ARCH_SPACEMIT || COMPILE_TEST
+	select MFD_SPACEMIT_P1
+	default ARCH_SPACEMIT
+	help
+	  Enable support for the RTC function in the SpacemiT P1 PMIC.
+	  This driver can also be built as a module, which will be called
+	  "spacemit-p1-rtc".
+
 config RTC_DRV_NCT3018Y
 	tristate "Nuvoton NCT3018Y"
 	depends on OF
drivers/rtc/Makefile +1 -0
index 789bddfea99d8..f41fdb4fabae9 100644
@@ -171,6 +171,7 @@ obj-$(CONFIG_RTC_DRV_SD2405AL)	+= rtc-sd2405al.o
 obj-$(CONFIG_RTC_DRV_SD3078)	+= rtc-sd3078.o
 obj-$(CONFIG_RTC_DRV_SH)	+= rtc-sh.o
 obj-$(CONFIG_RTC_DRV_SNVS)	+= rtc-snvs.o
+obj-$(CONFIG_RTC_DRV_SPACEMIT_P1)	+= rtc-spacemit-p1.o
 obj-$(CONFIG_RTC_DRV_SPEAR)	+= rtc-spear.o
 obj-$(CONFIG_RTC_DRV_STARFIRE)	+= rtc-starfire.o
 obj-$(CONFIG_RTC_DRV_STK17TA8)	+= rtc-stk17ta8.o
drivers/rtc/rtc-spacemit-p1.c new file +167 -0

167 lines not on this page · raw message

Signature · 1 line
2.48.1
maintainer Applied
#6 lore raw

Re: (subset) [PATCH v13 4/7] rtc: spacemit: support the SpacemiT P1 RTC

Quoted 8 lines · Alex Elder

Add support for the RTC found in the SpacemiT P1 PMIC. Initially only setting and reading the time are supported.

The PMIC is implemented as a multi-function device. This RTC is probed based on this driver being named in a MFD cell in the simple MFD I2C driver.

[...]

Applied, thanks!

[4/7] rtc: spacemit: support the SpacemiT P1 RTC

      https://git.kernel.org/abelloni/c/c96433f4806f

Best regards,

Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
author
#7 lore raw

PATCH v13 5/7 riscv: dts: spacemit: enable the i2c8 adapter

In reply to Alex Elder

Define properties for the I2C adapter that provides access to the SpacemiT P1 PMIC. Enable this adapter on the Banana Pi BPI-F3.

---
 arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 12 ++++++++++++
 arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi    |  7 +++++++
 arch/riscv/boot/dts/spacemit/k1.dtsi            | 13 +++++++++++++
 3 files changed, 32 insertions(+)
arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts +12 -0
index fe22c747c5012..ae9409fe398b2 100644
@@ -40,6 +40,18 @@ &emmc {
 	status = "okay";
 };
 
+&i2c8 {
+	pinctrl-0 = <&i2c8_cfg>;
+	pinctrl-names = "default";
+	status = "okay";
+
+	pmic@41 {
+		compatible = "spacemit,p1";
+		reg = <0x41>;
+		interrupts = <64>;
+	};
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_2_cfg>;
arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi +7 -0
index 3810557374228..96d7a46d4bf77 100644
@@ -11,6 +11,13 @@
 #define K1_GPIO(x)	(x / 32) (x % 32)
 
 &pinctrl {
+	i2c8_cfg: i2c8-cfg {
+		i2c8-0-pins {
+			pinmux = <K1_PADCONF(93, 0)>,	/* PWR_SCL */
+				 <K1_PADCONF(94, 0)>;	/* PWR_SDA */
+		};
+	};
+
 	uart0_2_cfg: uart0-2-cfg {
 		uart0-2-pins {
 			pinmux = <K1_PADCONF(68, 2)>,
arch/riscv/boot/dts/spacemit/k1.dtsi +13 -0
index 6c68b2e54675e..cd9b91c3358e4 100644
@@ -459,6 +459,19 @@ pwm7: pwm@d401bc00 {
 			status = "disabled";
 		};
 
+		i2c8: i2c@d401d800 {
+			compatible = "spacemit,k1-i2c";
+			reg = <0x0 0xd401d800 0x0 0x38>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			clocks = <&syscon_apbc CLK_TWSI8>,
+				 <&syscon_apbc CLK_TWSI8_BUS>;
+			clock-names = "func", "bus";
+			clock-frequency = <400000>;
+			interrupts = <19>;
+			status = "disabled";
+		};
+
 		pinctrl: pinctrl@d401e000 {
 			compatible = "spacemit,k1-pinctrl";
 			reg = <0x0 0xd401e000 0x0 0x400>;
Signature · 1 line
2.48.1
author
#8 lore raw

PATCH v13 6/7 riscv: dts: spacemit: define fixed regulators

In reply to Alex Elder

Define the DC power input and the 4v power as fixed supplies in the Banana Pi BPI-F3.

---
 .../boot/dts/spacemit/k1-bananapi-f3.dts      | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts +19 -0
index ae9409fe398b2..a11a60b9f369b 100644
@@ -28,6 +28,25 @@ led1 {
 			default-state = "on";
 		};
 	};
+
+	reg_dc_in: dc-in-12v {
+		compatible = "regulator-fixed";
+		regulator-name = "dc_in_12v";
+		regulator-min-microvolt = <12000000>;
+		regulator-max-microvolt = <12000000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
+
+	reg_vcc_4v: vcc-4v {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc_4v";
+		regulator-min-microvolt = <4000000>;
+		regulator-max-microvolt = <4000000>;
+		regulator-boot-on;
+		regulator-always-on;
+		vin-supply = <&reg_dc_in>;
+	};
 };
 
 &emmc {
Signature · 1 line
2.48.1
author
#9 lore raw

PATCH v13 7/7 riscv: dts: spacemit: define regulator constraints

In reply to Alex Elder

Define basic constraints for the regulators in the SpacemiT P1 PMIC, as implemented in the Banana Pi BPI-F3.

---
 .../boot/dts/spacemit/k1-bananapi-f3.dts      | 104 ++++++++++++++++++
 1 file changed, 104 insertions(+)
arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts +104 -0
index a11a60b9f369b..a9a2596a94e89 100644
@@ -68,6 +68,110 @@ pmic@41 {
 		compatible = "spacemit,p1";
 		reg = <0x41>;
 		interrupts = <64>;
+		vin-supply = <&reg_vcc_4v>;
+
+		regulators {
+			buck1 {
+				regulator-min-microvolt = <500000>;
+				regulator-max-microvolt = <3450000>;
+				regulator-ramp-delay = <5000>;
+				regulator-always-on;
+			};
+
+			buck2 {
+				regulator-min-microvolt = <500000>;
+				regulator-max-microvolt = <3450000>;
+				regulator-ramp-delay = <5000>;
+				regulator-always-on;
+			};
+
+			buck3 {
+				regulator-min-microvolt = <500000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-ramp-delay = <5000>;
+				regulator-always-on;
+			};
+
+			buck4 {
+				regulator-min-microvolt = <500000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-ramp-delay = <5000>;
+				regulator-always-on;
+			};
+
+			buck5 {
+				regulator-min-microvolt = <500000>;
+				regulator-max-microvolt = <3450000>;
+				regulator-ramp-delay = <5000>;
+				regulator-always-on;
+			};
+
+			buck6 {
+				regulator-min-microvolt = <500000>;
+				regulator-max-microvolt = <3450000>;
+				regulator-ramp-delay = <5000>;
+				regulator-always-on;
+			};
+
+			aldo1 {
+				regulator-min-microvolt = <500000>;
+				regulator-max-microvolt = <3400000>;
+				regulator-boot-on;
+			};
+
+			aldo2 {
+				regulator-min-microvolt = <500000>;
+				regulator-max-microvolt = <3400000>;
+			};
+
+			aldo3 {
+				regulator-min-microvolt = <500000>;
+				regulator-max-microvolt = <3400000>;
+			};
+
+			aldo4 {
+				regulator-min-microvolt = <500000>;
+				regulator-max-microvolt = <3400000>;
+			};
+
+			dldo1 {
+				regulator-min-microvolt = <500000>;
+				regulator-max-microvolt = <3400000>;
+				regulator-boot-on;
+			};
+
+			dldo2 {
+				regulator-min-microvolt = <500000>;
+				regulator-max-microvolt = <3400000>;
+			};
+
+			dldo3 {
+				regulator-min-microvolt = <500000>;
+				regulator-max-microvolt = <3400000>;
+			};
+
+			dldo4 {
+				regulator-min-microvolt = <500000>;
+				regulator-max-microvolt = <3400000>;
+				regulator-always-on;
+			};
+
+			dldo5 {
+				regulator-min-microvolt = <500000>;
+				regulator-max-microvolt = <3400000>;
+			};
+
+			dldo6 {
+				regulator-min-microvolt = <500000>;
+				regulator-max-microvolt = <3400000>;
+				regulator-always-on;
+			};
+
+			dldo7 {
+				regulator-min-microvolt = <500000>;
+				regulator-max-microvolt = <3400000>;
+			};
+		};
 	};
 };
 
Signature · 1 line
2.48.1
maintainer Applied
#10 lore raw

Re: (subset) [PATCH v13 0/7] spacemit: introduce P1 PMIC support

In reply to Alex Elder
Quoted 8 lines · Alex Elder

The SpacemiT P1 is an I2C-controlled PMIC that implements 6 buck converters and 12 LDOs. It contains a load switch, ADC channels, GPIOs, a real-time clock, and a watchdog timer.

This series introduces a multifunction driver for the P1 PMIC as well as drivers for its regulators and RTC.

[...]

Applied, thanks!

[1/7] dt-bindings: mfd: add support the SpacemiT P1 PMIC

      commit: baac6755d3e8ddf47eee2be3ca72fe14ebae2143
[2/7] mfd: simple-mfd-i2c: add SpacemiT P1 support
      commit: 49833495c85f26d070e70148fd9607c6fbf927fd

--
Lee Jones [李琼斯]

author
#11 lore raw

Re: (subset) [PATCH v13 0/7] spacemit: introduce P1 PMIC support

Quoted 12 lines · Lee Jones
Quoted 8 lines · Alex Elder

The SpacemiT P1 is an I2C-controlled PMIC that implements 6 buck converters and 12 LDOs. It contains a load switch, ADC channels, GPIOs, a real-time clock, and a watchdog timer.

This series introduces a multifunction driver for the P1 PMIC as well as drivers for its regulators and RTC.

[...]

Applied, thanks!

Quoted 8 lines

[1/7] dt-bindings: mfd: add support the SpacemiT P1 PMIC

       commit: baac6755d3e8ddf47eee2be3ca72fe14ebae2143
[2/7] mfd: simple-mfd-i2c: add SpacemiT P1 support
       commit: 49833495c85f26d070e70148fd9607c6fbf927fd

--
Lee Jones [李琼斯]

Yixun Lan plans to merge patches 5-7 of this series.

That leaves patch 3, which enables regulator support, and patch 4, which adds RTC support.

How should these two patches be merged? Mark has reviewed the regulator patch 3 and Alexandre has acked the RTC patch 4.

Thank you.

-Alex

maintainer
#12 lore raw

Re: (subset) [PATCH v13 0/7] spacemit: introduce P1 PMIC support

Quoted 5 lines · Alex Elder

That leaves patch 3, which enables regulator support, and patch 4, which adds RTC support.

How should these two patches be merged? Mark has reviewed the regulator patch 3 and Alexandre has acked the RTC patch 4.

We'd both have been expecting them to go via MFD.

maintainer
#13 lore raw

Re: (subset) [PATCH v13 0/7] spacemit: introduce P1 PMIC support

Quoted 9 lines · Mark Brown
Quoted 5 lines · Alex Elder

That leaves patch 3, which enables regulator support, and patch 4, which adds RTC support.

How should these two patches be merged? Mark has reviewed the regulator patch 3 and Alexandre has acked the RTC patch 4.

We'd both have been expecting them to go via MFD.

Why? I don't see any dependencies between them (usually a shared MFD header-file). If there are no deps, it should be taken through its own repo, no?

Signature · 1 line
Lee Jones [李琼斯]
maintainer
#14 lore raw

Re: (subset) [PATCH v13 0/7] spacemit: introduce P1 PMIC support

Quoted 11 lines · Lee Jones
Quoted 6 lines · Mark Brown
Quoted 2 lines · Alex Elder

How should these two patches be merged? Mark has reviewed the regulator patch 3 and Alexandre has acked the RTC patch 4.

We'd both have been expecting them to go via MFD.

Why? I don't see any dependencies between them (usually a shared MFD header-file). If there are no deps, it should be taken through its own repo, no?

I used to just apply things but at some point Linus complained about cases where the MFD ended up not getting merged (missing the merge window or whatever) so I've been treating them like they had an actual dependency.

maintainer
#15 lore raw

Re: (subset) [PATCH v13 0/7] spacemit: introduce P1 PMIC support

Quoted 9 lines · Mark Brown
Quoted 7 lines · Lee Jones
Quoted 6 lines · Mark Brown
Quoted 2 lines · Alex Elder

How should these two patches be merged? Mark has reviewed the regulator patch 3 and Alexandre has acked the RTC patch 4.

We'd both have been expecting them to go via MFD.

Quoted 8 lines
Quoted 3 lines

Why? I don't see any dependencies between them (usually a shared MFD header-file). If there are no deps, it should be taken through its own repo, no?

I used to just apply things but at some point Linus complained about cases where the MFD ended up not getting merged (missing the merge window or whatever) so I've been treating them like they had an actual dependency.

Not sure I've seen any of that from Linus, but I don't doubt you. The MFD part has been merged now, so it's save to go ahead and apply the Regulator part.

Signature · 1 line
Lee Jones [李琼斯]
#16 lore raw

Re: (subset) [PATCH v13 0/7] spacemit: introduce P1 PMIC support

Hi Mark, Jones,

Quoted 15 lines · Lee Jones
Quoted 13 lines · Mark Brown
Quoted 11 lines · Lee Jones
Quoted 6 lines · Mark Brown
Quoted 2 lines · Alex Elder

How should these two patches be merged? Mark has reviewed the regulator patch 3 and Alexandre has acked the RTC patch 4.

We'd both have been expecting them to go via MFD.

Why? I don't see any dependencies between them (usually a shared MFD header-file). If there are no deps, it should be taken through its own repo, no?

Quoted 9 lines
Quoted 4 lines

I used to just apply things but at some point Linus complained about cases where the MFD ended up not getting merged (missing the merge window or whatever) so I've been treating them like they had an actual dependency.

Not sure I've seen any of that from Linus, but I don't doubt you. The MFD part has been merged now, so it's save to go ahead and apply the Regulator part.

Forgive me to chim in..

To be honest, I don't really mind which tree the patch to go through..

But since the patch 3 has no build time dependency on previous two, so it should be fair to take via pmu/regulator tree, I've done a check locally which imply this..

What do you think, Mark?

Signature · 1 line
Yixun Lan (dlan)
#17 lore raw

Re: (subset) [PATCH v13 0/7] spacemit: introduce P1 PMIC support

In reply to Alex Elder

Hi Alex,

Quoted 18 lines · Alex Elder
Quoted 17 lines · Lee Jones
Quoted 8 lines · Alex Elder

The SpacemiT P1 is an I2C-controlled PMIC that implements 6 buck converters and 12 LDOs. It contains a load switch, ADC channels, GPIOs, a real-time clock, and a watchdog timer.

This series introduces a multifunction driver for the P1 PMIC as well as drivers for its regulators and RTC.

[...]

Applied, thanks!

[1/7] dt-bindings: mfd: add support the SpacemiT P1 PMIC

       commit: baac6755d3e8ddf47eee2be3ca72fe14ebae2143
[2/7] mfd: simple-mfd-i2c: add SpacemiT P1 support
       commit: 49833495c85f26d070e70148fd9607c6fbf927fd
Quoted 6 lines
Quoted 3 lines

--
Lee Jones [李琼斯]

Yixun Lan plans to merge patches 5-7 of this series.

DT patches usually go as the last one, in this case, they effectively depened on patch 3 which adds the regulator support

As Mark suggest it go via MFD, that leaves Jones to handle, It's close to the release of rc6, I'd hope it isn't too late..

Quoted 9 lines

That leaves patch 3, which enables regulator support, and patch 4, which adds RTC support.

How should these two patches be merged? Mark has reviewed the regulator patch 3 and Alexandre has acked the RTC patch 4.

Thank you.

-Alex

Signature · 1 line
Yixun Lan (dlan)
maintainer
#18 lore raw

Re: (subset) [PATCH v13 0/7] spacemit: introduce P1 PMIC support

In reply to Alex Elder
Quoted 8 lines · Alex Elder

The SpacemiT P1 is an I2C-controlled PMIC that implements 6 buck converters and 12 LDOs. It contains a load switch, ADC channels, GPIOs, a real-time clock, and a watchdog timer.

This series introduces a multifunction driver for the P1 PMIC as well as drivers for its regulators and RTC.

[...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next

Thanks!

[3/7] regulator: spacemit: support SpacemiT P1 regulators

      commit: 8b84d712ad849172f6bbcad57534b284d942b0b5

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark

Applied
#19 lore raw

Re: (subset) [PATCH v13 0/7] spacemit: introduce P1 PMIC support

In reply to Alex Elder
Quoted 8 lines · Alex Elder

The SpacemiT P1 is an I2C-controlled PMIC that implements 6 buck converters and 12 LDOs. It contains a load switch, ADC channels, GPIOs, a real-time clock, and a watchdog timer.

This series introduces a multifunction driver for the P1 PMIC as well as drivers for its regulators and RTC.

[...]

Applied, thanks!

[5/7] riscv: dts: spacemit: enable the i2c8 adapter

      https://github.com/spacemit-com/linux/commit/3e8d7309e6260b1d066e733bf3e2e1b6a0d3f82b
[6/7] riscv: dts: spacemit: define fixed regulators
      https://github.com/spacemit-com/linux/commit/1df07a40453fd652132051419140950d47941fe9
[7/7] riscv: dts: spacemit: define regulator constraints
      https://github.com/spacemit-com/linux/commit/09a412d397484e76588707d85ccc37f71e491091

Best regards,

Signature · 1 line
Yixun Lan