Hi,
我m an Embedded Systems Engineer developing BSP for one of my company self-designed board where we use a Dialog DA9063-3FHK1 PMIC.
在实现PMIC稳压器监控的Linux支持时,我发现了不同的版本
of the DA9063 PMIC exist. They don't have the same register map.
As I can't figure out what register map my PMIC version belongs to, I'm posting here in order to know
how to find out the exact register map that is implemented in the DA9063-3FHK1 version.
Best regards,
PinkPR
设备:
你好
The best way to check the register values is to use the DA9063 GUI, this will allow you to check each register and its function. The -3FHK1 code describes the package, the 3F is the Variant number (OTP) and the HK1 is the physical package details.
3F变体在由82变量所取代的过程中,然而这种变体仍然经历被释放的过程。我建议将来使用82个变体。
亲切的问候,
Elliott Dexter
点击这里for the Link to the DA9063 GUI.
嗨艾略特,thanks for answering.
From what I understand, the DA9063 GUI is made to be used with the DA9063 Eval board.
我没有这个eval板,加上我无法在互联网上找到DA9063 GUI。
我m actually not trying to find what's inside the OTP, but I'd just like to check if the register addresses on my PMIC version are compliant with what's written in the Linux source files.
我d especially like to check for the ADC part. There is no ADC feature implementated for DA9063 in the Linux Kernel, and that's what I'm working on.
PinkPR
你好PinkPR,
DA9063 GUI
The GUI itself can be used without a Performance or Eval board, this will allow a user to check and edit OTP register settings but will not allow the user to check the OTP with the PMIC.
点击这里for the DA9063 Support Page. The GUI is called PowerCommander
芯片ID和变体
There are two register maps in the DA9063 driver. The AD tables and the BB tables, the BB tables are used for the DA9063 driver.
The chip ID and variant register values are used to detect the chip type. These registers are:
#define DA9063_REG_CHIP_ID 0x181
#define DA9063_REG_CHIP_VARIANT 0x182
ADC映射
Under
https://support.dialog-seminile.com/pmic-audio/device/da9063?qt-pmic_device=1#qt-pmic_device.
文件>飞思卡尔BSP>
有DA9063 Android集成。这些包含DA9063的HWMON驱动程序的示例,该示例集成到Freescale / NXP Android版本中。
最新版本,DA9063 I.MX 6 LOLLIPOP ANDROID L5.1.1 2.1.0 BSPhas a ZIP file, which is theDA9063 I.MX 6 LOLLIPOP ANDROID L5.1.1 2.1.0 BSP。zip, this contains a hwmon example for DA9063.
亲切的问候,
Elliott Dexter
嗨艾略特,
您是否知道为什么在HWMON驱动程序中未实施内部监管机构监控?这正是我正在寻找的功能。
我ll try to add this feature on top of the base driver you provided.
PinkPR
嗨皮埃尔奥利维尔,
在过去,超过/欠电压中断处理程序太专用于通用Linux驱动程序,并且内核维护者不支持其添加。Android实现中的示例显示了如何在对话框Pebix参考平台上实现android版本以用于监视,但据信任何实现都包含平台特定组件。
亲切的问候,
Elliott Dexter
嗨艾略特,
感谢您的回答。我仍然无法找到如何在内部调节器上执行ADC手动转换。
I literally followed the"Monitoring Output Voltages --> Manual Measurement of Regulator Output Voltages"part (part 6.4, page 13) of theAN-PM-024 DA9063 Voltage Monitoring文件,它似乎并没有工作。
Plus I noticed some differences between this document content and the Datasheet content.
例如,文档告诉设置
MON_A8_IDX = 0
to select BUCKCORE1 monitoring. But according to the datasheet, you should setMON_A8_IDX = 1
。So what's true, and what's not ?
PinkPR
And by the way, what are the differences between the 3F and 82 versions ?
嗨皮埃尔奥利维尔,
Datasheet and Application note:
DA9063数据表指出克克隆1的寄存器值为1,并且AN-PM-024大部分状态为BACKCORE1的寄存器值为1。然而,AN-PM-024,表12中的一个表中存在拼写,表12,它状态为0H,这也应该是1待正确且与其他表保持一致。谢谢您指出这一点,我们将更新文档。
Variant 3F and 82:
变型3F和变型82非常相似;某些调节器电压,电流限制和启动插槽有一些微小的变化。对次要寄存器还有一些更改,但没有任何内容可以显着改变其操作或目的。客户和客户要求建议的更改。
ADC
当你说你跟随文件时,它根本不起作用,你的意思是什么?
亲切的问候,
Elliott Dexter
我m actually trying to get an ADC-measured voltage value for each of the regulators.
1. I reset the ADC by writing in the ADC_MAN register the value ADC_MUX (8, 9, or 10 according to what group the measured regulator belongs to).
2.我在mon_reg_5或mon_reg_6中写下与稳压器相关的索引。
3. I write the ADC_MAN bit (1 << 4) in the ADC_MAN register.
4.我等待要在Event_A寄存器中设置的e_adc_rdy bit(1 << 3)进行准备的值。
5. I get ADC_RES_H and ADC_RES_L and merge them in order to rebuild the conversion result.
The problem is, for every regulator that belongs to group A8 or A10, that I get a ADC_RES_H and ADC_RES_L full of high bits (OxFF).
In the case of A9, I get different values depending on the regulator, but they aren't logical at all.
For example, I have (in reality) LDO1 voltage > LDO2 voltage. But my ADC conversion tells the contrary.
那些不合逻辑的行为让我认为我的算法有一个大问题,它可能来自我所拥有的数据表/应用笔记中的错误信息。
这就是为什么我来找你并要求帮助:-)
PinkPR
嗨皮埃尔奥利维尔,
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:
Register Breakdown:
I used the GUI with a standard I2C interface for read and write commands, I did not use any of its other functions or alter any other register value. I also tested all three ADC channels with different regulators and didnt have any issues.
亲切的问候,
Elliott Dexter
你好Pierre-Olivier,
A potential reason why you might be getting ADC_RES_H and ADC_RES_L registers full of high bits (OxFF), is that the regulator you are trying to measure is not enabled. I re-tried the manual measurements with the regulator dis-enabled and got the same result as you, but when I enabled the regulator, the ADC measured the correct output voltage of the regulator.
亲切的问候,
Elliott Dexter
Hi Elliott
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.
I was actually using the
Regmap_write.
Linux内核的功能。此功能验证您尝试编写的寄存器实际存在。我不知道为什么,但是the DA9063 Linux Driver register ranges was NOT including MON_REG_5 and MON_REG_6。
我刚将寄存器范围扩展到mon_reg_6,一切都在工作。
我ll maybe submit a patch to the Linux Driver once everything will be clean.
非常感谢您拨出的时间帮助我:-)
PinkPR
你好Pierre-Olivier,
No problem, happy to help..
亲切的问候,
Elliott Dexter
Hi Pierre-Oliver,
I have spoken with the Driver applications team about your last question, response below:
"Since Linux mainline v3.16-rc1 the DA9063 Linux device driver has used the standard Linux regmap framework to access the PMIC’s registers.
Regmap是寄存器I / O的常见方法,通常由Linux内核中的设备驱动程序使用以执行这些标准访问操作。但是,与其他操作系统I / O方法相比,Regmap不同。部分差异是由于使用寄存器访问权限表,该表可以使用该regmap用于创建芯片模型。
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 hold注册 - > {可读,可写的,易失性}映射和静态定义的文件Drivers / MFD / DA9063-I2C.C。因此,Linux内核regmap核心I / O功能可以根据编码到这些表的权限来限制任何PMIC寄存器访问。
Care should be taken.在Linux设备驱动程序中添加新功能时,它将使用Linux核心regmap函数访问寄存器:应相应地更新相关的Regmap访问表。如果向已启用现有的Regmap的设备驱动程序添加新组件,则在制定寄存器的访问权限条目时,应仔细考虑每个新寄存器中的每个位。使用Regmap的原因不仅仅是为了实施寄存器访问限制;暂停和恢复操作的性能改进,默认值和简化也是Regmap设计的一部分。“
亲切的问候,
Elliott Dexter