Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mfd: simple-mfd-i2c: Add SpacemiT P1 support

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.

Signed-off-by: Alex Elder <elder@riscstar.com>
Link: https://lore.kernel.org/r/20250825172057.163883-3-elder@riscstar.com
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Alex Elder and committed by
Lee Jones
6fc5d415 8566de1c

+30
+13
drivers/mfd/Kconfig
··· 1254 1254 Say M here if you want to include support for the Qualcomm RPM as a 1255 1255 module. This will build a module called "qcom_rpm". 1256 1256 1257 + config MFD_SPACEMIT_P1 1258 + tristate "SpacemiT P1 PMIC" 1259 + depends on ARCH_SPACEMIT || COMPILE_TEST 1260 + depends on I2C 1261 + select I2C_K1 1262 + select MFD_SIMPLE_MFD_I2C 1263 + help 1264 + This option supports the I2C-based SpacemiT P1 PMIC, which 1265 + contains regulators, a power switch, GPIOs, an RTC, and more. 1266 + This option is selected when any of the supported sub-devices 1267 + is configured. The basic functionality is implemented by the 1268 + simple MFD I2C driver. 1269 + 1257 1270 config MFD_SPMI_PMIC 1258 1271 tristate "Qualcomm SPMI PMICs" 1259 1272 depends on ARCH_QCOM || COMPILE_TEST
+17
drivers/mfd/simple-mfd-i2c.c
··· 93 93 .mfd_cell_size = ARRAY_SIZE(max77705_sensor_cells), 94 94 }; 95 95 96 + static const struct regmap_config spacemit_p1_regmap_config = { 97 + .reg_bits = 8, 98 + .val_bits = 8, 99 + }; 100 + 101 + static const struct mfd_cell spacemit_p1_cells[] = { 102 + { .name = "spacemit-p1-regulator", }, 103 + { .name = "spacemit-p1-rtc", }, 104 + }; 105 + 106 + static const struct simple_mfd_data spacemit_p1 = { 107 + .regmap_config = &spacemit_p1_regmap_config, 108 + .mfd_cell = spacemit_p1_cells, 109 + .mfd_cell_size = ARRAY_SIZE(spacemit_p1_cells), 110 + }; 111 + 96 112 static const struct of_device_id simple_mfd_i2c_of_match[] = { 97 113 { .compatible = "kontron,sl28cpld" }, 98 114 { .compatible = "silergy,sy7636a", .data = &silergy_sy7636a}, ··· 117 101 { .compatible = "maxim,max77705-battery", .data = &maxim_mon_max77705}, 118 102 { .compatible = "fsl,lx2160aqds-fpga" }, 119 103 { .compatible = "fsl,ls1028aqds-fpga" }, 104 + { .compatible = "spacemit,p1", .data = &spacemit_p1, }, 120 105 {} 121 106 }; 122 107 MODULE_DEVICE_TABLE(of, simple_mfd_i2c_of_match);