Accessing MPPs on Dragonboard 410c with Linaro Linux

I am working to integrate the mraa library for use on a DragonBoard running Linaro Linux. I want to be sure that I can access and set MPP_2, MPP_3, and MPP_4 as outputs. I can access MPP_4 via the mraa api just fine. With MPP_2 and _3, I get a NULL gpio context when I call mraa_gpio_init().

I assume this is due to a conflict in the linux device tree but I am feeling challenged to understand what changes might be necessary in the device tree to accomplish what I want. I know that MPP_2 and _3 are for WiFi and BT LEDs. I have examined and/or modified apq8016-sbc-soc-pins.dtsi, apq8016_sbc_pmic_pins.dtsi, and apq8016-sbc.dtsi. Some changes introduced kernel build errors which I reversed but otherwise, no changes in the behavior described above.

I am attempting to verify that we can access these IOs for a new board design that will use these same GPIO/MPPs BEFORE we commit to the schematic and routing.

I fully admit to being a linux/unix neophyte. Any guidance will be greatly appreciated.

There should be no issues for you to access MPP2 and 3, if you make sure that the kernel isn’t using them.

The easiest way I believe for you to verify this is to ensure the gpio-leds driver doesn’t request them. To do this you can add

status = “disabled”;

Right below to the compatible = “gpio-leds” in apq8016-sbc.dtsi.

Regards,
Bjorn

Thank you. I tried that but the GPIO behavior did not change. The mraa library returns a null context pointer for the specific GPIOs when I invoke the init function.

I appreciate the suggestion nonetheless.

 Rob