高通smb358的dtsi充电参数说明

本文详细介绍了高通smb358电池充电器的参数设置,特别是如何在dtsi中写入相关数据,涉及I2C通信方式。同时提及了充电电流、电压和温度等关键参数。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

高通smb358的充电参数说明,主要所dtsi数据写入。


主要就是通过I2C通讯

其他参数充电电流,电压,温度

Summit smb358 battery charger

SMB358 is a single-cell battery charger. It can charge the battery and power the system via the USB/AC adapter input.
The smb358 interface is via I2C bus.
Required Properties:
- compatible Must be "qcom,smb358-charger".
- reg The device 7-bit I2C address.
- interrupt-parent parent of interrupt.
- interrupts This indicates the IRQ number of the GPIO connected to the STAT pin.
- qcom,irq-gpio GPIO which receives interrupts from STAT output.
- qcom,bms-psy-name This is a string and it points to the bms power supply name.
- qcom,float-voltage-mv Float Voltage in mV - the maximum voltage up to which the battery is charged. Supported range 3500mV to 4500mV
Optional Properties:
- qcom,fastchg-current-max-ma Fast Charging current in mA. Supported range is from 200mA to 2000mA.
- qcom,chg-valid-gpio GPIO which indicates the charger presence. This GPIO is connected to the SYSOK pin.
- qcom,chg-autonomous-mode This is a bool property and it indicates that the charger is configured for autonomous ope
### 高通音频 DTSI 文件配置教程 #### 1. 基本结构概述 DTSI(Device Tree Source Include)文件用于描述硬件平台的具体细节,特别是对于SoC上的外设。在高通平台上,`audio.dtsi`文件主要用于定义音频子系统的各个组件及其连接关系。 ```c /sound { compatible = "qcom,msm8996"; /* 定义 I2S 接口 */ i2s-controller@xxxxxxx { compatible = "qcom,qmp-i2s"; reg = <0 xxxxxxx>; clocks = <&gcc GCC_QMPI2S_CLK>; clock-names = "core"; port { #address-cells = <1>; #size-cells = <0>; i2s-endpoint: endpoint { remote-endpoint = <&codec_i2s_endpoint>; }; }; }; codec: sound-codec { compatible = "vendor,audio-codec"; // 替换为实际的编解码器型号 port { #address-cells = <1>; #size-cells = <0>; codec_i2s_endpoint: endpoint { remote-endpoint = <&i2s-endpoint>; }; }; }; }; ``` 此部分代码展示了如何声明一个I2S控制器节点以及与其相连的声音编解码器节点[^1]。 #### 2. 路由映射表 为了实现不同音频路径之间的灵活切换,在DTSI中还可以定义路由映射表。这通常涉及到具体的寄存器地址和位域操作,以便于控制信号流的方向。 ```c static const struct snd_soc_dapm_route audio_map[] = { {"AIF1 Playback", NULL, "I2S TX"}, {"I2S RX", NULL, "Speaker"}, {"Headphone Jack", NULL, "HPOL"}, {"Headphone Jack", NULL, "HPOR"} }; ``` 上述例子说明了从数字音频接口到模拟输出端口的数据传输路径[^4]。 #### 3. 属性设置 除了基本的拓扑结构之外,还需要针对特定功能模块设定相应的参数。比如调整缓冲区大小、采样率转换模式等: ```c sound { ... status = "okay"; qcom,snd-card-name = "QCOM SoC Sound Card"; qcom,i2s-format = <SNDRV_PCM_FMTBIT_S16_LE>; // 设置PCM格式 qcom,mclk-frequencies = <12288000>, <11289600>; // 主时钟频率选项 dapm_widgets = < SND_SOC_DAPM_MIC("Mic Jack", NULL), SND_SOC_DAPM_HP("Headphone Jack", NULL) >; } ``` 这些属性能够帮助优化性能并满足不同的应用场景需求[^2]。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值