Pm8916 mpp analog configuration


#1

hi,

i had configured mpp3 as analog output, mpp4 as analog input in apq8016-sbc-pmic-pins.dtsi

i am not able to set the mpp3 value as high, please suggest?
how to read the status values/measure the analog values from mpp4?

gpiochip2: GPIOs 504-507, parent: platform/200f000.spmi:pm8916@0:mpps@a000, 200f000.spmi:pm8916@0:mpps@a000:
mpp1 : out analog vin-2 0 high
mpp2 : out digital vin-0 0 low
mpp3 : out analog vin-0 0 low
mpp4 : in analog vin-0 0 low


pinctrl-names = “default”;
pinctrl-0 = <&pm8916_mpp_analog_out &pm8916_mpp_analog_in>;

pm8916_mpp_analog_in: pm8916_mpp4 {
pinconf {
pins = “mpp4”;
function = “analog”;
qcom,amux-route = <PMIC_MPP_AMUX_ROUTE_CH5>;
};
};

pm8916_mpp_analog_out: pm8916_mpp_analog {
pinconf {
pins = “mpp3”;
function = “analog”;
qcom,analog-level = <PMIC_MPP_AOUT_LVL_1V25>;
output-high;
};
};

regards,
vinaysimha


#2

What ‘high’ means in analog context?

Could you attach all changes, which node selects this pinconfs?


#3

the changes done in dts are already shown as by default settings in pinctrl-0
&pm8916_mpps {

    pinctrl-names = "default";
    pinctrl-0 = <&pm8916_mpp_analog_out &pm8916_mpp_analog_in>;

    pm8916_mpp_analog_in: pm8916_mpp4 {
            pinconf {
                    pins = "mpp4"; //sink
                    function = "analog";
                    qcom,amux-route = <PMIC_MPP_AMUX_ROUTE_CH5>;
            };
    };

    pm8916_mpp_analog_out: pm8916_mpp_analog {
            pinconf {
                    pins = "mpp3";
                    function = "analog";
                    qcom,analog-level = <PMIC_MPP_AOUT_LVL_1V25>;
                    output-high;
            };
    };

};

from the cat /sys/kernel/debug/gpio
mpp3 : out analog vin-0 0 low

it shows lows, it means the 1.25V is not yet enabled? once it becomes high it should give 1.25V.

if we make mpp as analog input , how to measure how much voltage is coming to mpp analog input in kernel/sysfs?

please suggest