AnsweredAssumed Answered

dts parameter "voltage-ranges" usage in Linux

Question asked by ko-hey on Aug 7, 2018
Latest reply on Aug 16, 2018 by igorpadykov

Hi all

 

I have a question about dts parameter of "voltage-ranges" is necessary or not.

I got a following error when I don't set a dts usdhc parameter of "voltage-ranges".

 

[    1.677059] /soc/aips-bus@02100000/usdhc@02198000: voltage-ranges unspecified

 

Q1.

According to the kernel code, it seems that it does not refer in particular.

Also there is no example adding "voltage-ranges" even if you look at the descriptions in the imx-based device tree.

 

----------------------------------------------------------------------------------

/drivers/mmc/core/mmc.c

int mmc_of_parse_voltage(struct device_node *np, u32 *mask)

              {

                            const u32 *voltage_ranges;

                            int num_ranges, i;

 

                            voltage_ranges = of_get_property(np, "voltage-ranges", &num_ranges);

                            num_ranges = num_ranges / sizeof(*voltage_ranges) / 2;

                            if (!voltage_ranges || !num_ranges) {

                                          pr_info("%s: voltage-ranges unspecified\n", np->full_name);

                                          return -EINVAL;

                            }

----------------------------------------------------------------------------------

 

 

Do I need to set a parameter of "voltage-ranges" ?

 

 

Q2.

If Q1 is yes, which case do I need to set ?

 

 

 

 

Add info:

Here is a dts sample settings.

 

ex)

&usdhc3 {

              pinctrl-names = "default";

              pinctrl-0 = <&pinctrl_usdhc3>;

              non-removable;

              no-1-8-v;

              voltage-ranges = <3200 3400>; // <-

              keep-power-in-suspend;

              status = "okay";

};

 

 

Ko-hey

 

Outcomes