spacemit: P1 PMIC support on Banana pi F3 testing

Anand Moon linux.amoon at gmail.com
Fri Jul 25 02:49:18 PDT 2025


Hi Alex,

On Fri, 25 Jul 2025 at 07:26, Alex Elder <elder at riscstar.com> wrote:
>
> On 7/24/25 4:56 AM, Anand Moon wrote:
> > Hi Alex,
> >
> > Thank you for your work on the P1 PMIC patch for Spacemit K1 SoC - Banana Pi F3.
> >
> > I've been testing your patch series for the Banana Pi F3 [0] to enable SD card
> > and eMMC functionality,
> >
> > [0] https://patchew.org/linux/20250710175107.1280221-1-elder@riscstar.com/
> >
> > While debugging, I cross-referenced the patch with the BPI-F3-V3 board
> > schematic [1]
> > and noticed several discrepancies in the power configuration:
> >
> > [1] https://drive.google.com/file/d/19iLJ5xnCB_oK8VeQjkPGjzAn39WYyylv/view
> >
> > Incorrect Voltage Ranges: The minimum and maximum voltage values for
> > multiple regulators
> > (including BUCKs, ALDOs, and DLDOs) In the patch, do not match the
> > specifications in
> > the schematic's power tree.
>
> I really appreciate you checking this.
>
> The values I used were derived from the vendor code that I
> started with.  I was assured that this baseline worked on
> the Banana Pi BPI-F3.
>
I am just following examples from SoC like Rockchip and Samsung.

> For the record, I *do* have a functioning SD card and eMMC.
> I'm not sure just now what you are using differs from what
> I am using.
>
> I would like to understand and reconcile the differences you
> point out but I'm not able to do that at this time; maybe
> next week.

You are using the default  ranges  0.5~3.4V at 3.5A.
But in the schematic's power tree, components such as P1 (U1401) and K1 (Uxxx)
specify precise voltage ranges, for example:
0.9 V ± 1%
1.8 V ± 1%
3.3 V ± 1%

These same voltage values must be accurately reflected in the device tree node
definitions to ensure that all regulators supply the correct voltage
levels to downstream
components. Labels are used to map each regulator to its corresponding
internal node
in the device tree. Using appropriate and consistent names allows
these regulators to be
easily tracked. This mapping helps in validating configurations using
the regulator_summary,
which displays the active regulator states.

For example
$ sudo cat /sys/kernel/debug/regulator/regulator_summary
 regulator                      use open bypass  opmode voltage
current     min     max
---------------------------------------------------------------------------------------
 regulator-dummy                  6    5      0 unknown     0mV
0mA     0mV     0mV
    12500000.phy-vbus-boost       2
0mA     0mV     0mV
    12500000.phy-vbus             2
0mA     0mV     0mV
    12100000.phy-vbus-boost       2
0mA     0mV     0mV
    12100000.phy-vbus             2
0mA     0mV     0mV
    12130000.phy-vbus             1
0mA     0mV     0mV
 vdd_ldo1                         1    0      0 unknown  1000mV
0mA  1000mV  1000mV
 vdd_ldo2                         1    0      0 unknown  1800mV
0mA  1800mV  1800mV
 vddq_mmc0                        0    0      0 unknown  1800mV
0mA  1800mV  1800mV
 vdd_adc                          1    1      0 unknown  1800mV
0mA  1800mV  1800mV

>
> You say the names don't match.  From what I can tell, your
> names are like "d1d0" (D one D zero) rather than "dldo"
> (D L D O), and what I see in the document you link to uses
> all letters.  If I'm misunderstanding, please explain.
>
I might have used an incorrect name due to a typo earlier.
Based on the schematic, the correct regulator names are BUCK1, ALDO1, and DLDO1.
you can use it accordingly.

> Thanks.
>
>                                         -Alex
Thanks
-Anand



More information about the linux-riscv mailing list