Forums - Using PMIC PM650l GPIOs as PWM or LPG

1 post / 0 new
Using PMIC PM650l GPIOs as PWM or LPG
clavin.rali
Join Date: 18 Jan 21
Posts: 4
Posted: Mon, 2021-03-29 05:41

An IR LED is connected  to GPIO_6 of the PMIC pm6150l as in the refernce schematics and the device tree node is

irled {

                irled_pwm: irled_pwm_default {
                        pins = "gpio6";
                        function = "func1";
                        qcom,drive-strength = <2>;
                        power-source = <0>;
                        bias-disable;
                        output-low;
                };
        };
 
By default this IR led is used by the qcom,camera-ir-led driver and the corresponding device tree is shown below,
 
ir_led: camera-ir-led@0 { 
               cell-index = <0>;
               reg = <0x00>;
               compatible = "qcom,camera-ir-led";
               pwms = <&pm6150l_pwm_1  0 0>;
               enable-active-high;
               pinctrl-names = "default", "cam_default", "cam_suspend";
               pinctrl-0 = <&irled_pwm>;
               pinctrl-1 = <&cam_sensor_ir_cut_on>;
               pinctrl-2 = <&cam_sensor_ir_cut_off>;
               gpios = <&tlmm 73 0>,
                       <&tlmm 74 0>;
               qcom,gpio-ir-p = <0>;
               qcom,gpio-ir-m =  <1>;
               qcom,gpio-req-tbl-num = <0 1>;
               qcom,gpio-req-tbl-flags = <0 0>;
               qcom,gpio-req-tbl-label = "IR_CUT_FILTER_P",
                               "IR_CUT_FILTER_M";
               gpio-no-mux = <0>;
               status = "ok";
       };
 
This driver uses pwm which most probably controls the IR LED but I don't want to use qcom,camera-ir-led driver instead I want to configure GPIO_6 of pm6150l as pwm or lpg so as to control the IR led through sysfs. 
 
The technical overview document (80-PL631-500) says that "LPG can be used for HR LED, GPIO, RGB LED, and Haptics"I want to know how to configure the pwm/lpg out to the pmic gpio.
 

 

  • Up0
  • Down0

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.