LDO11(PIN35) on LS connector not working

@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

How much power is this pin rated to deliver? I’ve built a mezzanine that works flawlessly on a DB410C, but on Hikey960 the 1.8V line collapses to 0.3V with the mezza attached. When I feed 1.8V externally from a lab supply, the devices on the mezza that need 1.8V start working again and the lab supply shows to draw only 11mA.

In the next version of the mezza PCB I’ll make sure to add a separate 1.8V supply, but it still seems weird that this is neccesary.

According to the spec it should be good for 0.1A but I’m sceptical this was
tested during the design phase for these boards if only because early
software images for both versions of hikey shipped with the 1V8 output
disabled by default.

How accurate is your supply’s reading at low current?

Not sure, it’s a €100 30V run of the mill Chinese lab supply. It reads 11mA. I checked with the supplier of the panel that is actually taking this current a while back. Just found the email and they said 14.2 mA. So I guess they’re right :slight_smile:

Anyway I popped off an unused 2.8V supply off the mezzanine PCB and fitted a 1.8V, ran a tiny wire and I’m up and running. Next version of the PCB I’ll take this into account. Of course if HiSilicon or anybody else can give any advice on how it should or shouldn’t be possible with the onboard 1V8 supply, that would be most welcome.

Is it possible that your device needs an initial high current to start up?

FYI: hardware manual actually claims up to 150 mA and acknowledges that 96boards only requires 100 mA, so they’re specifically claiming to exceed required spec by 50%.