LDO11(PIN35) on LS connector not working

I have tried to use PIN35 on LS connector as i needed 1.8 voltage source,but PIN35 showing 0 volts.
I have configured the hi3660-hikey960.dts for LDO11 and done corresponding changes in hi6421v530-regulator.c but no luck.
I am using 4.4 kernel version and below is the code have added in dts and regulator file.
pmic: pmic@fff34000 {
compatible = “hisilicon,hi6421v530-pmic”;
reg = <0x0 0xfff34000 0x0 0x1000>;
interrupt-controller;
#interrupt-cells = <2>;

            regulators {
             ldo11: LDO11 { /* Low Speed Connector */
                            regulator-compatible = "hi6421v530_ldo11";
                            regulator-name = "LDO11";        
                            regulator-min-microvolt = <1750000>;
                            regulator-max-microvolt = <3300000>;
                            regulator-enable-ramp-delay = <240>;
                    };
            }

If any body found the solution for this kindly let me know.

@leo-yan Please help on this issue,badly i need to use this pin for Phone off case.

I could use LDO11 after changing hi3660-hikey960.dts and hi6421v530-regulator.c as below.

For /arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts,
ldo11: LDO11 {
regulator-compatible = “hi6421v530_ldo11”;
regulator-name = “LDO11”;
regulator-min-microvolt = <1750000>;
regulator-max-microvolt = <3300000>;
regulator-enable-ramp-delay = <120>;
};

For /drivers/regulator/hi6421v530-regulator.c,
@@ -58,6 +58,7 @@ enum hi6421v530_regulator_id {
HI6421V530_LDO10,

  • HI6421V530_LDO11,
    @@ -104,6 +105,7 @@ static struct of_regulator_match hi6421v530_regulator_match[] = {
    HI6421V530_REGULATOR_OF_MATCH(hi6421v530_ldo8, LDO8),*/
    HI6421V530_REGULATOR_OF_MATCH(hi6421v530_ldo9, LDO9),
    HI6421V530_REGULATOR_OF_MATCH(hi6421v530_ldo10, LDO10),
  • HI6421V530_REGULATOR_OF_MATCH(hi6421v530_ldo11, LDO11),

@@ -347,6 +349,8 @@ static struct hi6421v530_regulator_info
40000, 0x1, 8000),
HI6421V530_LDO(LDO10, ldo_10_voltages, 0x06d, 0x7, 0x06c, 0x2,
40000, 0x1, 8000),

  • HI6421V530_LDO(LDO11, ldo_9_11_12_13_14_voltages, 0x06f, 0x7, 0x06e, 0x2,
  •      40000, 0x1, 8000),

@alanlissl i have also followed the same step it was not worked,can you pls share regulator.c and dts file
So i will compare with mine to know still any difference.
Note: i hope you used pin35 on LS to check this LDO11

Of course, I used pin35 on LS for LDO11.

Where did you enable and use the LDO11? I used it for my MIPI-DSI panel’s power supply and therefore I changed “/arch/arm64/boot/dts/hisilicon/hi3660-drm.dtsi” as below.
reg = <1>;
panel-width-mm = <94>;
panel-height-mm = <151>;

  •   		vdd-supply = <&ldo3>;
    
  •   		vdd-supply = <&ldo11>;

@alanlissl I have enabled ldo11 in i2c0 as below.

i2c0: i2c@ffd71000 {
compatible = “snps,designware-i2c”;
reg = <0x0 0xffd71000 0x0 0x1000>;
vdd-supply = <&ldo11>;
interrupts = <0 118 4>;
#address-cells = <1>;
#size-cells = <0>;
clock-frequency = <400000>;
clocks = <&crg_ctrl HI3660_CLK_GATE_I2C0>;
resets = <&iomcu_rst HI3660_RST_I2C0>;
pinctrl-names = “default”;
pinctrl-0 = <&i2c0_pmx_func &i2c0_cfg_func>;
status = “ok”;

and do you have drivers/mfd/hi6421v530-pmic.c this file in this path?
Is this file really required?right now its not in my kernel build.

and also please share the link for kernel download and please mention branch

No drivers/mfd/hi6421v530-pmic.c in my kernel

In MIPI-DSI panel driver (e.g. Panel-hikey960-nte300nts.c), it will call “devm_regulator_get” → “regulator_set_voltage” → “regulator_enable”. Do you have similar APIs in your I2C0 device? I am afraid that you just declared LDO11 in DTSI but did not use it in your I2C0’s driver. Please check it.

@alanlissl Actually my intended thing is to make that PIN35 working irrespective of any driver.
can i add ldo11 under panel config like how you done?if yes anything extra need to be done for that? anyway already i have enabled LDO11 macros in regulator and mfd files.

@alanlissl @rvmanjumce thanks for you guys discussion. Just reminding one thing for you guys, please note if you two are using the same booting images? AFAIK, we have tried to port many stuffs into UEFI+ARM-TF, but it still may miss some configurations from Hisilicon boot images.

If so, it’s good to report back related issues and we can follow for this. Thanks.

@leo-yan,
Is it expected to work straight away if everything is fine?or is it it required to invoke devm_regulator_get this LDO11(pin35) from any driver side ?.
If you think it may be issue i will report this issue in https://bugs.96boards.org.

@rvmanjumce you are welcome to file bug if you confirm it doesn’t work; when you file the bug could you describe which boot images/kernel version/Android or other releasing you are using?

BTW, do you notice regulator has one property “regulator-always-on”? I am not familiar with regulator DT binding, but I remember there have property to force LDO to be enabled by default and don’t need bind with other consumer device. If I am wrong please correct as needed. Thanks.

Hi Leo-yan,

With kernel 4.9 version its working fine after set regulator-always-on,Thanks for the information.
But still issue observed with kernel 4.4 even after set to regulator-always-on and logged this issue in https://bugs.96boards.org.

Where exactly did you make the “regulator-always-on” change?
I’m facing the same issue with the 4.9 version of the kernel.

Hi @rubberduck203, I think the code is like below:

diff --git a/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts b/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts
index c7dfbd1..eb0fad7 100644
--- a/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts
+++ b/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts
@@ -271,6 +271,7 @@
                        };
 
                        ldo11: LDO11 { /* Low Speed Connector */
+                               regulator-always-on;
                                regulator-name = "VOUT11_1V8_2V95";
                                regulator-min-microvolt = <1750000>;
                                regulator-max-microvolt = <3300000>;

Thanks! Worked like a charm!

Does this apply to the HiKey 960 as well ?

I’m running into something similar in that I read 1.2v roughly on the 1.8v pin. It could be that I’m measuring some kind of random current leakage instead of actual rail voltage of that pin. Any recommendations ?

@billeee : this applies ONLY to the hikey 960.

@doitright sorry, I misread and got the pins and files confused. I’ll try that later on today. Thanks

Good news everyone!
This patch has made its way upstream.

https://android.googlesource.com/kernel/hikey-linaro/+/e005c7894bcc8c2094a978d0e8ac1ec2fef2b789^!/#F0