leak ldo9

This commit is contained in:
zeroway
2016-11-03 14:22:33 +00:00
parent 40aca996c7
commit 63ce8f0596
4 changed files with 64 additions and 27 deletions

View File

@ -1,6 +1,32 @@
# Regulator Usage
## 硬件连接和设备树配置
## ACT8846驱动
框架图如下
![BLOCK DIAGRAM](./dcdc_ldo.png)
由图可知
REG[1, 4]对应DCDC[1, 4]
REG[5, 13]对应LDO[1, 9]
驱动代码中的voltage map可以参考手册的table 5
600, 625, 650, 675, 700, 725, 750, 775,
800, 825, 850, 875, 900, 925, 950, 975,
1000, 1025, 1050, 1075, 1100, 1125, 1150,
1175, 1200, 1250, 1300, 1350, 1400, 1450,
1500, 1550, 1600, 1650, 1700, 1750, 1800,
1850, 1900, 1950, 2000, 2050, 2100, 2150,
2200, 2250, 2300, 2350, 2400, 2500, 2600,
2700, 2800, 2900, 3000, 3100, 3200,
3300, 3400, 3500, 3600, 3700, 3800, 3900,
![Table5](./table5.png)
## 触摸屏硬件连接和设备树配置
以下图所示的一个TP模块连接方式来说明
@ -49,7 +75,11 @@ ldo4_reg:regulator@7 {
## 测试方法
在shell下输入下面的命令测试
- 加载PMU驱动
insmod act8846.ko
- 不断开关regulator7的电压
```shell
while true
@ -61,28 +91,12 @@ sleep 5
done
```
## ACT8846驱动
- 查看regulator7开关状态
框架图如下
![BLOCK DIAGRAM](./dcdc_ldo.png)
由图可知
REG[1, 4]对应DCDC[1, 4]
REG[5, 13]对应LDO[1, 9]
驱动代码中的voltage map可以参考手册的table 5
600, 625, 650, 675, 700, 725, 750, 775,
800, 825, 850, 875, 900, 925, 950, 975,
1000, 1025, 1050, 1075, 1100, 1125, 1150,
1175, 1200, 1250, 1300, 1350, 1400, 1450,
1500, 1550, 1600, 1650, 1700, 1750, 1800,
1850, 1900, 1950, 2000, 2050, 2100, 2150,
2200, 2250, 2300, 2350, 2400, 2500, 2600,
2700, 2800, 2900, 3000, 3100, 3200,
3300, 3400, 3500, 3600, 3700, 3800, 3900,
![Table5](./table5.png)
```shell
while true
do
cat /sys/class/regulator/regulator.8/state
sleep 2
done
```

View File

@ -127,6 +127,7 @@ static struct of_regulator_match act8846_reg_matches[] = {
{ .name = "act_ldo6" } ,
{ .name = "act_ldo7" } ,
{ .name = "act_ldo8" } ,
{ .name = "act_ldo9" } ,
};
static struct act8846_board *act8846_parse_dt(struct act8846 *chip)

View File

@ -87,6 +87,8 @@ act8846@5a {
regulator-name = "act_ldo2";
regulator-min-microvolt = <0xf4240>;
regulator-max-microvolt = <0xf4240>;
linux,phandle = <0x10d>;
phandle = <0x10d>;
};
regulator@6 {
@ -95,6 +97,8 @@ act8846@5a {
regulator-name = "act_ldo3";
regulator-min-microvolt = <0x325aa0>;
regulator-max-microvolt = <0x325aa0>;
linux,phandle = <0x10e>;
phandle = <0x10e>;
};
regulator@7 {
@ -115,6 +119,8 @@ act8846@5a {
regulator-name = "act_ldo5";
regulator-min-microvolt = <0x325aa0>;
regulator-max-microvolt = <0x325aa0>;
linux,phandle = <0x10f>;
phandle = <0x10f>;
};
regulator@9 {
@ -126,6 +132,8 @@ act8846@5a {
regulator-min-microvolt = <0xf4240>;
regulator-max-microvolt = <0xf4240>;
regulator-initial-state = <0x3>;
linux,phandle = <0x110>;
phandle = <0x110>;
regulator-state-mem {
regulator-state-enabled;
@ -139,6 +147,8 @@ act8846@5a {
regulator-min-microvolt = <0x1b7740>;
regulator-max-microvolt = <0x1b7740>;
regulator-initial-state = <0x3>;
linux,phandle = <0x111>;
phandle = <0x111>;
regulator-state-mem {
regulator-state-enabled;
@ -153,6 +163,18 @@ act8846@5a {
regulator-name = "act_ldo8";
regulator-min-microvolt = <0x1b7740>;
regulator-max-microvolt = <0x1b7740>;
linux,phandle = <0x112>;
phandle = <0x112>;
};
regulator@12 {
reg = <0xc>;
regulator-compatible = "act_ldo9";
regulator-always-on;
regulator-boot-on;
regulator-name = "act_ldo9";
regulator-min-microvolt = <0x1b7740>;
regulator-max-microvolt = <0x1b7740>;
};
};
};

View File

@ -3,7 +3,7 @@
#define REGISTER_NUMBERS 0xF5
#define ACT8846_BUCK1_SET_VOL_BASE 0x10
#define ACT8846_NUM_REGULATORS 12
#define ACT8846_NUM_REGULATORS 13
#define ACT8846_DCDC1 0
#define ACT8846_LDO1 4