GPIO 25 pin functionality query

Hello All,
I’m seeing Voltage issue with GPIO_25 when controlled from DTS. I have defined GPIO 25 as DSI platform reset pin in apq8016-sbc.dtsi as below.

&mdss_dsi0 {
_ qcom,dsi-pref-prim-pan = <&dsi_rm67120_720p_video>;_
_ pinctrl-names = “mdss_default”, “mdss_sleep”;_
_ pinctrl-0 = <&mdss_dsi_active &mdss_te_active>;_
_ pinctrl-1 = <&mdss_dsi_suspend &mdss_te_suspend>;_

_ qcom,platform-reset-gpio = <&msm_gpio 25 1>;_

Voltage level is 19-21mV as long as display is on, and goes to 0V when display is in low power mode.

For DSI devices, I have set reboot sequence as high for 120ms, low for 20ms, and high for 20ms. Its not reflecting in scope.

If I set the GPIO 25 value by creating node in /sys/class/gpio through export 927 > export, I see 1.8v on meter.

One more thing is If I dont have “qcom,panel-supply-entries”, voltage of GPIO 25 is always zero.

Does anybody know why GPIO 25 control from DTS is not working?Why do I see 21mV if I have display on, Does it have relation with “qcom,panel-supply-entries” structure?

Appreciate your quick response.

Thanks,
Krishna.

Hi @svkrishna

Just looking at the “voltage” you are describing, it sound to me like the GPIO is ‘trying’ to drive high, but something is holding it low. Have you tried disconnecting the circuitry connected to the GPIO and testing just the GPIO on it’s own?

Full Disclosure: I am an employee of Qualcomm Canada, any opinions I may have expressed in this or any other post may not reflect the opinions of my employer.

hi @ljking

Yes, I measured the voltage on LS connector pin 30(GPIO 25 ) and LS connector ping 40 being ground, with out any connection on LS connector

I read your original post more carefully this time. You are using Android, not Linux.

Yes it has a lot to do with the qcom,panel-supply-entries. In order to save power the supplies to the panel are turned off when the display is not active. In fact until the display becomes active the supplies are never turned on. The device tree entries for the supplies are required so that the system knows which supplies need to be turned on for your display.

For correct construction of the panel entry, take a look at the examples for other DSI displays in dtsi files such as:
msm8916-mtp.dtsi
msm8916-qrd.dtsi
msm8916-qrd-skuh.dtsi
msm8916-qrd-skuhf.dts
msm8916-qrd-skuic.dtsi
msm8916-qrd-skuid.dtsi
msm8916-qrd-skui.dtsi
msm8916-qrd-skut1.dtsi

One thing I noticed different is all of the examples have:

qcom,platform-reset-gpio = <&msm_gpio 25 0>;

whereas you have:

qcom,platform-reset-gpio = <&msm_gpio 25 1>;

Full Disclosure: I am an employee of Qualcomm Canada, any opinions I may have expressed in this or any other post may not reflect the opinions of my employer.

@ljking,
I followed QC DSI porting guide, I have added panel entry in msm8916-qrd.dtsi as per doc, my panel does not get enumerated(confirmed through kernel logs). only DSI-HDMI panel in apq8016-sbc.dtsi gets enumerated. How do my panel gets enumerated?
one thing I tried is to replace the panel entry in apq8016-sbc.dtsi, my panel get enumerated, but I got this GPIO voltage issue.

my Panel GPIO pin active low, hence I has to keep 1 instead on 0 in PIN configuration.

Hmm… based on your message the DSI to HDMI device is always being enumerated. The APQ8016E chip on your DragonBoard 410c only has one MIPI-DSI port. This port can be routed to the MIPI-DSI to HDMI bridge chip, or it can be routed to the High Speed expansion connector. Since the HDMI bridge is being enumerated, I suspect that the MIPI-DSI is being routed to the HDMI bridge.

Take a look at page 26 of the 410c Schematic you will see that there is a DIP switch on the back of the board that can force the MIPI-DSI to be routed to the HDMI bridge, this switch must be in the OFF position. You will also see that the Hot Plug Detect signal from the HDMI connector also forces the DSI data to be routed to the HDMI bridge, hence you must disconnect everything from the HDMI connector. Finally you will also see that GPIO_32 (DSI_SW_SEL_APQ) can also force selection of the HDMI bridge.

Can you look at the state of the DSI_SW_SEL signal and ensure that your panel is being selected.

Full Disclosure: I am an employee of Qualcomm Canada, any opinions I may have expressed in this or any other post may not reflect the opinions of my employer.

Thanks @ljking I will try and update.

Hi @ljking,
I tried disabling S4 DP switch, did not connect HDMI, GPIO pin32 is made high in DTS(not sure its reflects), I’m not able to probe GPIO 32.

To enumerate the device, I have overwritten adv7533(DSI_HDMI) with my panel entry, however I dont see change GPIO pin 25 value as high, through I made it active low, in
qcom,platform-reset-gpio = <&msm_gpio 25 1>;

Voltage is at 80mv

&mdss_dsi0 {
qcom,dsi-pref-prim-pan = <&dsi_rm67120_720p>;
pinctrl-names = “mdss_default”, “mdss_sleep”;
pinctrl-0 = <&mdss_dsi_active &mdss_te_active>;
pinctrl-1 = <&mdss_dsi_suspend &mdss_te_suspend>;

    qcom,platform-reset-gpio = <&msm_gpio 25 1>;

qcom,panel-supply-entries {
#address-cells = <1>;
#size-cells = <0>;

                   qcom,panel-supply-entry@0 {
                           reg = <0>;
                           qcom,supply-name = "vdd";
                           qcom,supply-min-voltage = <3300000>;
                           qcom,supply-max-voltage = <3300000>;
                           qcom,supply-enable-load = <100000>;
                           qcom,supply-disable-load = <100>;
                   };

                   qcom,panel-supply-entry@1 {
                           reg = <1>;
                           qcom,supply-name = "vddio";
                           qcom,supply-min-voltage = <1800000>;
                           qcom,supply-max-voltage = <1800000>;
                           qcom,supply-enable-load = <100000>;
                           qcom,supply-disable-load = <100>;
                   };

What could be the reason?

Hello Krishna,

please refer document of https://developer.qualcomm.com/download/db410c/dsi-display-porting-guide-linux-android.pdf
under section 2.4 Set up DSI panel-related GPIO pin.

one difference observed that change pin state like below.
qcom,platform-reset-gpio = <&msm_gpio 25 1>; to qcom,platform-reset-gpio = <&msm_gpio 25 0>;

because gpio state reset state would be zero at the moment of DSI running in Lower power mode. please give a try.

Thanks,
Ramesh

@ramesh-bura
I followed it, Document is not clear , I have to find out lot of other things out of the document, I dont see reset GPIO pin behaving as expected.

Below is the recommended values in XMl file by the doc. If I follow them , I get the dtsi with the below values,
qcom,platform-reset-gpio = <&msm_gpio 25 1>;
qcom,platform-enable-gpio = <&msm_gpio 32 1>;

"“msm8xxx”

< ResetGPIO>
< PinSource>“msmgpio”< /PinSource>
< PinId>25< /PinId>
< PinStrength>3< /PinStrength>
< PinDirection>1< /PinDirection>
< PinPull>0< /PinPull>
< PinState>1< /PinState>
< /ResetGPIO>
< EnableGPIO>
< PinSource>“msmgpio”< /PinSource>
< PinId>32< /PinId>
< PinStrength>3< /PinStrength>
< PinDirection>1< /PinDirection>
< PinPull>0< /PinPull>
< PinState>1< /PinState>"

Above modified values are copied in msm8916-cdp.dtsi, document does not say it, but README.txt in tools folder says it.

Document also say to modify entry in msm8xxx-qrd.dtsi, there is no panel entry I have to add them.

After following with the info, Platform shits down after booting, IF i disable GPIO 32 entry in msm8916-cdp.dtsi, which I got from XML, Its fine. But GPIO 25 pin voltage is not proper.

Thanks,
Krishna.

I’ve never measured the voltages on those pins, so I can’t comment on that. But I would recommend at least trying to set
qcom,platform-reset-gpio = <&msm_gpio 25 0>;. Yes, the pin is active low, but as far as I can tell, the driver handles that behavior. Reset pin timing is handled in this line of the .dtsi file:
qcom,mdss-dsi-reset-sequence = <1 20>, <0 2>, <1 10>; //on 20ms, off 2ms, on 10ms
As you can see, the active low behavior in that chip is encoded in that array. I guess you can scope it and see what it’s actually doing under either setting.