DA9063 versions and register maps

15 posts / 0 new
最后一篇文章
pinkpr
离线
最后一次见到:2 years 4 months ago
已加入:2017-11-14 08:34
DA9063 versions and register maps

你好,

我是一名嵌入式系统工程师,为我公司自行设计的一块板开发BSP,在那里我们使用对话DA9063-3FHK1 PMIC。雷电竞下载app

While implementing Linux support for PMIC regulators monitoring, I found out that different versions
在DA9063 PMIC中存在。它们没有相同的寄存器映射。

因为我不知道我的PMIC版本属于哪个寄存器映射,所以我在这里发帖是为了知道
how to find out the exact register map that is implemented in the DA9063-3FHK1 version.

Best regards,

平克普尔

Device:
ED_Dialog
离线
最后一次见到:1天22小时前
工作人员
已加入:2017-09-18 11:54

Hello

检查寄存器值的最佳方法是使用DA9063 GUI,这将允许您检查每个寄存器及其功能。-3FHK1代码描述包,3F是变体号(OTP),HK1是物理包详细信息。

The 3F Variant is in the process of being replaced by the 82 Variant, this Variant however is still going through the process of being released. I would recommend using the 82 variant in the future.

Kind Regards,

艾略特·德克斯特

Clickhere对于DA9063 GUI的链接。

pinkpr
离线
最后一次见到:2 years 4 months ago
已加入:2017-11-14 08:34
嗨,艾略特,谢谢你的帮助

嗨,艾略特,谢谢你的回答。

据我所知,DA9063图形用户界面是用来与DA9063评估板。
I don't have this eval board, plus I can't find the DA9063 GUI on the internet.

实际上,我并不想找到OTP中的内容,但我只想检查PMIC版本上的寄存器地址是否与Linux源文件中编写的内容一致。
我特别想检查一下ADC部分。Linux内核中没有为DA9063实现ADC特性,这就是我正在研究的。

平克普尔

ED_Dialog
离线
最后一次见到:1天22小时前
工作人员
已加入:2017-09-18 11:54

你好PinkPR,

DA9063 GUI

GUI本身可以在没有性能或评估板的情况下使用,这将允许用户检查和编辑OTP寄存器设置,但不允许用户使用PMIC检查OTP。

Clickhere对于DA9063支持页。GUI称为PowerCommander

Chip ID and Variant

DA9063驱动程序中有两个寄存器映射。AD表和BB表,BB表用于DA9063驱动程序。

The chip ID and variant register values are used to detect the chip type. These registers are:

#define DA9063_REG_CHIP_ID 0x181

#定义DA9063\U REG\U芯片\U变型0x182

ADC Mapping

低于

https://support.dialog-semiconductor.com/pmic-audio/device/da9063?qt-pmic_device=1#qt-pmic_device

Documents > Freescale BSP >

There are DA9063 Android integrations. These contain examples for the HWMON driver for the DA9063 as integrated into the Freescale/NXP Android releases.

The latest release,DA9063 i.MX 6 Lollipop Android L5.1.1 2.1.0 BSP有一个ZIP文件,这是DA9063 i.MX 6 Lollipop Android L5.1.1 2.1.0 BSP.zip,其中包含DA9063的hwmon示例。

Kind Regards,
艾略特·德克斯特

pinkpr
离线
最后一次见到:2 years 4 months ago
已加入:2017-11-14 08:34
你好,艾略特,

你好,艾略特,

Do you know why internal regulators monitoring is not implemented in the hwmon driver ? That's precisely the feature I'm looking for.
我将尝试在您提供的基本驱动程序的基础上添加此功能。

平克普尔

ED_Dialog
离线
最后一次见到:1天22小时前
工作人员
已加入:2017-09-18 11:54

Hi Pierre-Olivier,

在过去,下/电压中断处理程序were too specific to be included in the general Linux driver and the kernel maintainers would not support their addition. The example in the Android implementation shows how the Android version needs to implemented for monitoring on the Dialog PEBIX reference platform, but it is believed any implementation will contain platform specific components.

Kind Regards,
艾略特·德克斯特

pinkpr
离线
最后一次见到:2 years 4 months ago
已加入:2017-11-14 08:34
你好,艾略特,

你好,艾略特,

Thanks for your answer. I still can't find how to perform ADC manual conversions on internal regulators.

我真的跟着“监控输出电压-->手动测量调节器输出电压”第13页第6.4部分AN-PM-024 DA9063电压监测document, and it doesn't seem to work at all.
另外,我注意到这个文档内容和数据表内容之间存在一些差异。

For example, the document tells to setMON_A8_IDX = 0选择BUCKCORE1监控。但根据数据表,你应该MON_A8_IDX = 1.

So what's true, and what's not ?

平克普尔

pinkpr
离线
最后一次见到:2 years 4 months ago
已加入:2017-11-14 08:34
And by the way, what are the

And by the way, what are the differences between the 3F and 82 versions ?

ED_Dialog
离线
最后一次见到:1天22小时前
工作人员
已加入:2017-09-18 11:54

Hi Pierre-Olivier,

数据表和应用说明:

The DA9063 datasheet states a register value of 1 for BUCKCORE 1 and AN-PM-024 mostly states a register value of 1 for BUCKCORE1. However there is a typo in one of the tables in AN-PM-024, table 12, it states 0h, and this should also be a 1 to be correct and consistent with the other table. Thank you for pointing this out, we will update the document.

变型3F和82:

Variant 3F and Variant 82 are very similar; there are a few minor changes to certain regulators voltages, current limits and start-up slots. There are also a few changes to minor registers but nothing that significantly changes its operation or purpose. The changes were recommended by customers and customer requirements.

ADC

When you said that you followed the document and it didn’t work at all, what did you mean?

Kind Regards,
艾略特·德克斯特

pinkpr
离线
最后一次见到:2 years 4 months ago
已加入:2017-11-14 08:34
I'm actually trying to get an

我实际上是想得到每个调节器的ADC测量电压值。

1我通过在ADC\ MAN寄存器中写入值ADC\ MUX(根据测量的调节器所属的组,8、9或10)来重置ADC。
2. I write the index related to the regulator in MON_REG_5 or MON_REG_6.
三。我在ADC\ MAN寄存器中写入ADC\ MAN位(1<<4)。
4. I wait for the value to be ready by waiting for the E_ADC_RDY bit (1 << 3) to be set in the EVENT_A register.
5我得到ADC\u RES\H和ADC\u RES\L并合并它们以重建转换结果。

问题是,对于每一个属于A8或A10组的调节器,我得到一个ADC\u RES\H和一个ADC\u RES\L充满高位(OxFF)。
在A9的例子中,我根据调节器得到不同的值,但它们根本不符合逻辑。

例如,我有(实际上)LDO1电压>LDO2电压。但我的ADC转换却恰恰相反。

Those illogical behaviors make me think that's there is a BIG problem in my algorithm, and it could come from bad infos from Datasheets / Application notes I have.
That's why I'm coming to you and ask for help :-)

平克普尔

ED_Dialog
离线
最后一次见到:1天22小时前
工作人员
已加入:2017-09-18 11:54

Hi Pierre-Olivier,

I followed the instructions from the applications note and didn’t have any of the issues. I will list my steps, starting from variant 3F; I will use LD05 set to 2.8 V as an example:

  1. Set ADC_MUX to the required channel. For LDO 5, ADC_MUX is set with 0x1001.
  2. 将Mon\u A9\u IDX设置为所需索引。对于LDO5,MON\u A9\u IDX设置为索引6。
  3. The Manual conversion will now need to be triggered. For the Manual conversion to be ADC_MAN = 1, this register will reset back to 0 when the conversion is finished.
  4. The results of this operation should now be in ADC_RES_H and ADC_RES_L, the results I get from this operation is 2.8 V

寄存器细分:

  1. 寄存器034h=09,这将用0x1001设置ADC\U MUX。
  2. Register 11Eh = 60, this will set MON_A9_IDX with index 6.
  3. 寄存器034h=19,这将触发手动测量。
  4. ADC寄存器将包含10位结果的上8位;寄存器38将读取8F,即10001111。
  5. The ADC_RES_L Register will contain the 2 LSB (Least significant bits), Register 37 will read 0.
  6. Merge both ADC_RES_H and ADC_RES_L, this will give 1000111100, convert to decimal to get 572, and times by 4.883 mV.

我使用带有标准I2C接口的GUI来执行读写命令,我没有使用它的任何其他函数或更改任何其他寄存器值。我还用不同的调节器测试了所有三个ADC通道,没有任何问题。

Kind Regards,

艾略特·德克斯特

ED_Dialog
离线
最后一次见到:1天22小时前
工作人员
已加入:2017-09-18 11:54

你好,皮埃尔奥利维尔,

一个潜在的原因,为什么您可能会得到ADC\u RES\H和ADC\u RES\L寄存器充满高位(OxFF),是您试图测量的调节器没有启用。我重新尝试了手动测量与调节器dis启用,并得到了与您相同的结果,但当我启用了调节器,ADC测量了正确的输出电压的调节器。

Kind Regards,

艾略特·德克斯特

pinkpr
离线
最后一次见到:2 years 4 months ago
已加入:2017-11-14 08:34
你好,艾略特

你好,艾略特

I finally found out what was the problem.
I probed the I2C lines with an oscilloscope and found out that no write action we done on MON_REG_5 and MON_REG_6.
我实际上是在用regmap_writefunction of the Linux Kernel. This function verifies that the register you try to write in actually exists.
I don't know why, butDA9063 Linux驱动程序寄存器范围不包括MON\u REG\u 5和MON\u REG\u 6.
I just extended the register range to MON_REG_6 and everything worked.

我可能会提交一个补丁到Linux驱动程序,一旦一切都将是干净的。

Thank you very much for the time you allocated to help me :-)

平克普尔

ED_Dialog
离线
最后一次见到:1天22小时前
工作人员
已加入:2017-09-18 11:54
你好,皮埃尔奥利维尔,

你好,皮埃尔奥利维尔,

没问题,很乐意帮忙。。

Kind Regards,

艾略特·德克斯特

ED_Dialog
离线
最后一次见到:1天22小时前
工作人员
已加入:2017-09-18 11:54
Hi Pierre-Oliver,

Hi Pierre-Oliver,

我已经与驱动程序应用程序团队讨论了您的最后一个问题,回答如下雷竞技安卓下载:

“自从Linux主线v3.16-rc1以来,DA9063 Linux设备驱动程序使用标准的Linux regmap框架来访问PMIC的寄存器。

Regmap is a common approach for register I/O and is typically used by device drivers within the Linux kernel to perform these standard access operations. However, regmap is different compared to other operating system I/O methods. Part of the differences is due to the use of register access permission tables which regmap uses to create a chip model.

DA9063设备驱动程序定义寄存器访问permissions to list all possible I2C accesses to the DA9063 PMIC registers based upon pre-defined tables built into the device driver. These tables holdregister -> {readable, writable, volatile}映射和是在文件中静态定义的drivers/mfd/da9063-i2c.c.The Linux kernel regmap core I/O functions can therefore restrict any PMIC register accesses according to the permissions coded into these tables.

Care should be taken.When adding new functionality in Linux device drivers which will use the Linux core regmap functions to access registers: the relevant regmap access tables should be updated accordingly. If adding a new component to an existing regmap enabled device driver, each bit in every new register to be accessed should be carefully considered when formulating the register's access permission entry. The reasons for using regmap are not just to enforce register access restrictions; performance improvements, default values and simplifications to suspend and resume operations are also part of the regmap design."

Kind regards,

艾略特·德克斯特