Dear all,
We run YOCTO Linux on MX6DL_SABRE-SDP board.
BSP: fsl-yocto-3.10.17_1.0.0
We want to change the output voltage of PMIC.
We understand the voltage of PMIC can be changed through I2C.
However, we cannot find a sample cord.
Would you teach a source code name and the place we have to refer to?
Best Reagrds,
Yuuki
Solved! Go to Solution.
/sys/devices/platform/imx-i2c.1/i2c-1/1-0008/pfuze100-regulator/regulator/
root@freescale /sys/devices/platform/imx-i2c.1/i2c-1/1-0008/pfuze100-regulator/regulator$ ls
regulator.10 regulator.13 regulator.16 regulator.19 regulator.22 regulator.9
regulator.11 regulator.14 regulator.17 regulator.20 regulator.23
regulator.12 regulator.15 regulator.18 regulator.21 regulator.24
root@freescale /sys/devices/platform/imx-i2c.1/i2c-1/1-0008/pfuze100-regulator/regulator/regulator.12$ ls
device suspend_disk_microvolts
max_microvolts suspend_disk_state
microvolts suspend_mem_microvolts
min_microvolts suspend_mem_state
name suspend_standby_microvolts
num_users suspend_standby_state
power type
state uevent
subsystem
root@freescale /sys/devices/platform/imx-i2c.1/i2c-1/1-0008/pfuze100-regulator/regulator/regulator.12$ cat microvolts
3300000
root@freescale /sys/devices/platform/imx-i2c.1/i2c-1/1-0008/pfuze100-regulator/regulator/regulator.12$ echo 2600000 > microvolts
root@freescale /sys/devices/platform/imx-i2c.1/i2c-1/1-0008/pfuze100-regulator/regulator/regulator.12$ cat microvolts
2600000
you can use see the voltage on the boar is changed.
HaohuaQIN what did you modify in the kernel to get permissions to modify the regulator microvolts?
We are using i.MX Linux kernel 3.14.52:
root@h5:/sys/bus/i2c/devices/1-0008/regulator/regulator.12 # cat name
SW3A
root@h5:/sys/bus/i2c/devices/1-0008/regulator/regulator.12 # cat microvolts
1225000
echo 1200000 > microvolts
/system/bin/sh: can't create microvolts: Permission denied
I found the following defines:
CONFIG_REGULATOR_VIRTUAL_CONSUMER=y
CONFIG_REGULATOR_USERSPACE_CONSUMER=y
Hi Yuuki
voltage can be set with linux regulator apis (like regulator_set_voltage),
plese refer to sect.23.3.1 Regulator APIs, and PFUZE100 regulator driver
in sect.23.4.2 Source Code Structure attached Linux Manual.
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------