没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
msm8953.dtsi
msm8953-pmi8950.dtsi
msm8953-pm.dtsi
#include "skeleton64.dtsi"
#include <dt-bindings/clock/msm-clocks-8953.h>
#include <dt-bindings/regulator/qcom,rpm-smd-
regulator.h>
#include <dt-bindings/gpio/gpio.h>
msm8953-mtp.dtsi
#include "msm8953-pinctrl.dtsi"
#include "msm8953-audio-mtp.dtsi"
#include <dt-bindings/msm/pm.h>
PMI8950.dtsi
主
要
功
能
是
&soc
(
挂
在
到
soc
上),
对
mdss_dsi0
配
置
电
,
dsi_panel_pwr_supply
和
usb3
配
置
voltage
比
如
:
msm8953-pmi8950.dtsi
中
:
&usb3 {
vbus_dwc3-supply = <&smbcharger_charger_otg>;
};
&usb
挂
在
./msm8953.dtsi:
usb3: ssusb@7000000{
compatible = "qcom,dwc-usb3-msm";
reg = <0x07000000 0xfc000>,
<0x0007e000 0x400>;
reg-names = "core_base",
"ahb2phy_base";
#address-cells = <1>;
#size-cells = <1>;
ranges;
interrupts = <0 136 0>, <0 220 0>, <0 134 0>;
interrupt-names = "hs_phy_irq", "ss_phy_irq", "pwr_event_irq";
USB3_GDSC-supply = <&gdsc_usb30>;
vbus_dwc3-supply = <&smbcharger_charger_otg>;
qcom,vbus_set_by_cclogic;
qcom,usb-dbm = <&dbm_1p5>;
qcom,msm-bus,name = "usb3";
qcom,msm-bus,num-cases = <2>;
qcom,msm-bus,num-paths = <1>;
qcom,msm-bus,vectors-KBps =
./msm-pmi8950.dtsi:
smbcharger_charger_otg: qcom,smbcharger-boost-otg {
regulator-name = "smbcharger_charger_otg";
};
最
终
在
dts
反
汇
编
得
到
:
/{
ssusb@7000000 {
compatible = "qcom,dwc-usb3-msm";
reg = <0x7000000 0xfc000 0x7e000 0x400>;
reg-names = "core_base", "ahb2phy_base";
#address-cells = <0x1>;
#size-cells = <0x1>;
ranges;
interrupts = <0x0 0x88 0x0 0x0 0xdc 0x0 0x0 0x86 0x0>;
interrupt-names = "hs_phy_irq", "ss_phy_irq", "pwr_event_irq";
USB3_GDSC-supply = <0x12e>;
vbus_dwc3-supply = <0x12f>;
qcom,vbus_set_by_cclogic;
qcom,usb-dbm = <0x130>;
qcom,msm-bus,name = "usb3";
qcom,msm-bus,num-cases = <0x2>;
qcom,msm-bus,num-paths = <0x1>;
qcom,msm-bus,vectors-KBps = <0x3d 0x200 0x0 0x0 0x3d 0x200 0x3a980 0xc3500>;
qcom,dwc-usb3-msm-tx-fifo-size = <0x5328>;
clocks = <0x37 0xb3b4e2cb 0x37 0xf7f4b314 0x37 0xa800b65a 0x37 0xd0b65c92 0x37 0xfad488ce 0x37 0xccb7e26f>;
clock-names = "core_clk", "iface_clk", "utmi_clk", "sleep_clk", "xo", "cfg_ahb_clk";
qcom,usbin-vadc = <0x131>;
...
省
略
......
}
其
中
:
vbus_dwc3-supply = <0x12f>;
这
个
0x12f
哪
里
来
?
其
实
这
个
0x12f
是
句
柄
,
它
是
关
联
:
linux,phandle
和
phandle
的
句
柄
的
!
在在
dts
反
汇
编
得
到
:
在
/
节
点
,
子
节
点
qcom,qpnp-smbcharger {
下:
qcom,smbcharger-boost-otg {
regulator-name = "smbcharger_charger_otg";
linux,phandle = <0x12f>;
phandle = <0x12f>;
};
其
中
:
regulator-name
是
A string used as a descriptive namefor the boost regulator
msm8953-pm.dtsi
主
要
功
能
是
电
源
管
理
,
rpm
,
cpu
集
群
器
配
置
,
cpu
时
钟
等等
msm8953-mtp.dtsi
主
要
功
能
:
1.spi
和
I2c
控
制
器
的
配
置
(
控
制
器地址
时
钟
)
2.gpio_keys
(
音
量
上下
键
,
电
源
键
)
3.camera_snapshot
(
快
拍
)
4.wled
(
背
光
)
5.flash_led
(
闪
光
灯
配
置
)
6.LCD
显
示
器
mdss_dsi0
和
mdss_dsi1
配
置
、
dsi_panel_pwr_supply
供
电
配
置
7.sdhc_1
和
sdhc_2
(
EMMC
和
SDcard
相
关
SD
卡
初
始
化
,
检
测
、
时
钟
,
emmc
读
写
速
率
,
配
置
)
8.pm8953_typec
(
usb-typec
接
口
检
测
)
9.pmi8950_fg
(
电
量
计
)
10.mtp_batterydata
(
电
池
曲
线
)
主
要
包
含
#include "batterydata-itech-3000mah.dtsi"
等
电
池
曲
线
。
11.&pmi8950_charger
类
型
:
如
:
"typec"
12.&pm8953_gpios
寄存
器
配
置
msm8953-mtp.dtsi
主
要
功
能
:
1.spi
和
I2c
控
制
器
的
配
置
(
控
制
器地址
时
钟
)
gpio_keys
(
音
量
上下
键
,
电
源
键
)
I2c
控
制
器
的
配
置
3.camera_snapshot
(
快
拍
)
4.wled
(
背
光
)
5.flash_led
(
闪
光
灯
配
置
)
6.LCD
显
示
器
mdss_dsi0
和
mdss_dsi1
配
置
、
dsi_panel_pwr_supply
供
电
配
置
7.sdhc_1
和
sdhc_2
(
EMMC
和
SDcard
相
关
SD
卡
初
始
化
,
检
测
、
时
钟
,
emmc
读
写
速
率
,
配
置
)
8.pm8953_typec
(
usb-typec
接
口
检
测
)
9.pmi8950_fg
(
电
量
计
)
10.mtp_batterydata
(
电
池
曲
线
)
11.&pmi8950_charger
类
型
:
如
:
"typec"
12.&pm8953_gpios
寄存
器
配
置
&spi_3
是
挂
在
/soc
节
点
下
的
(),
msm8953.dtsi
/{
aliases {
/* smdtty devices */
smd1 = &smdtty_apps_fm;
smd2 = &smdtty_apps_riva_bt_acl;
smd3 = &smdtty_apps_riva_bt_cmd;
smd4 = &smdtty_mbalbridge;
smd5 = &smdtty_apps_riva_ant_cmd;
smd6 = &smdtty_apps_riva_ant_data;
smd7 = &smdtty_data1;
smd8 = &smdtty_data4;
smd11 = &smdtty_data11;
smd21 = &smdtty_data21;
smd36 = &smdtty_loopback;
sdhc1 = &sdhc_1; /* SDC1 eMMC slot */
sdhc2 = &sdhc_2; /* SDC2 for SD card */
i2c2 = &i2c_2;
i2c3 = &i2c_3;
i2c5 = &i2c_5;
spi3 = &spi_3;
};
soc: soc { };
};
}
&soc{
spi_3: spi@78b7000 { /* BLSP1 QUP3 */
compatible = "qcom,spi-qup-v2";
#address-cells = <1>;
#size-cells = <0>;
reg-names = "spi_physical", "spi_bam_physical";
reg = <0x78b7000 0x600>,
<0x7884000 0x1f000>;
interrupt-names = "spi_irq", "spi_bam_irq";
interrupts = <0 97 0>, <0 238 0>;
spi-max-frequency = <19200000>;
pinctrl-names = "spi_default", "spi_sleep";
pinctrl-0 = <&spi3_default &spi3_cs0_active>;
pinctrl-1 = <&spi3_sleep &spi3_cs0_sleep>;
clocks = <&clock_gcc clk_gcc_blsp1_ahb_clk>,
<&clock_gcc clk_gcc_blsp1_qup3_spi_apps_clk>;
clock-names = "iface_clk", "core_clk";
qcom,infinite-mode = <0>;
qcom,use-bam;
qcom,use-pinctrl;
qcom,ver-reg-exists;
qcom,bam-consumer-pipe-index = <8>;
qcom,bam-producer-pipe-index = <9>;
qcom,master-id = <86>;
};
}
在
反
汇
编
dts
中
得
到
:
/
根
节
点
下
{
aliases {
smd1 = "/soc/qcom,smdtty/qcom,smdtty-apps-fm";
smd2 = "/soc/qcom,smdtty/smdtty-apps-riva-bt-acl";
smd3 = "/soc/qcom,smdtty/qcom,smdtty-apps-riva-bt-cmd";
smd4 = "/soc/qcom,smdtty/qcom,smdtty-mbalbridge";
smd5 = "/soc/qcom,smdtty/smdtty-apps-riva-ant-cmd";
smd6 = "/soc/qcom,smdtty/smdtty-apps-riva-ant-data";
smd7 = "/soc/qcom,smdtty/qcom,smdtty-data1";
smd8 = "/soc/qcom,smdtty/qcom,smdtty-data4";
smd11 = "/soc/qcom,smdtty/qcom,smdtty-data11";
smd21 = "/soc/qcom,smdtty/qcom,smdtty-data21";
smd36 = "/soc/qcom,smdtty/smdtty-loopback";
sdhc1 = "/soc/sdhci@7824900";
sdhc2 = "/soc/sdhci@7864900";
i2c2 = "/soc/i2c@78b6000";
i2c3 = "/soc/i2c@78b7000";
i2c5 = "/soc/i2c@7af5000";
spi3 = "/soc/spi@78b7000";
i2c8 = "/soc/i2c@7AF8000";
spi6 = "/soc/spi@07af6000";
spi1 = "/soc/spi@78b5000";
};
}
其
中
pi3 = "/soc/spi@78b7000";
是
怎
么
来
呢
?
其
实就
是
源
码
中
,
首
先
挂
在
/
根
节
点
下,
soc
节
点
,
找
到
&spi_3
的
label
,
翻
译
为
:
/soc/spi@78b7000"
这
个
节
点
在
我
们
kernel
调试
SPI
通
信中
叶
经
常
会
遇
到
这
样
节
点
,
/soc/spi@78b7000
。
spi_3: spi@78b700
节
点
中
:(
其
他
相
关
属
性
这
里
就
不
讲
,
在
我
们
课
程
里
面
进
行详
细
进
行
介
绍
)
pinctrl-names = "spi_default", "spi_sleep";
pinctrl-0 = <&spi3_default &spi3_cs0_active>;
pinctrl-1 = <&spi3_sleep &spi3_cs0_sleep>;
clocks = <&clock_gcc clk_gcc_blsp1_ahb_clk>,
<&clock_gcc clk_gcc_blsp1_qup3_spi_apps_clk>;
节
点
是
如
何
调
用
?
&spi3_default
是
在
msm8953-pinctrl.dtsi
引
用
spi3 {
spi3_default: spi3_default {
/* active state */
mux {
/* MOSI, MISO, CLK */
pins = "gpio9", "gpio11";
function = "blsp_spi3";
};
config {
pins = "gpio9", "gpio11";
drive-strength = <12>; /* 12 MA */
bias-disable = <0>; /* No PULL */
};
};
省
略
......
}
所
以
在
spi@78b700
节
点
中
pinctrl-0 = <&spi3_default &spi3_cs0_active>;
在
反
编
译
得
到
如
下:
spi@78b7000 {
compatible = "qcom,spi-qup-v2";
#address-cells = <0x1>;
#size-cells = <0x0>;
reg-names = "spi_physical", "spi_bam_physical";
reg = <0x78b7000 0x600 0x7884000 0x1f000>;
interrupt-names = "spi_irq", "spi_bam_irq";
interrupts = <0x0 0x61 0x0 0x0 0xee 0x0>;
spi-max-frequency = <0xf42400>;
pinctrl-names = "spi_default", "spi_sleep";
pinctrl-0 = <0xce 0xcf>;
pinctrl-1 = <0xd0 0xd1>;
clocks = <0x37 0x8caa5b4f 0x37 0xfb978880>;
clock-names = "iface_clk", "core_clk";
qcom,infinite-mode = <0x0>;
其
中
pinctrl-0 = <0xce 0xcf>;
pinctrl-1 = <0xd0 0xd1>;
在
反
编
译
中
得
到
:
spi3 {
spi3_default {
linux,phandle = <0xce>;
phandle = <0xce>;
mux {
pins = "gpio9", "gpio11";
function = "blsp_spi3";
};
config {
pins = "gpio9", "gpio11";
drive-strength = <0xc>;
bias-disable = <0x0>;
};
};
spi3_sleep {
linux,phandle = <0xd0>;
phandle = <0xd0>;
mux {
pins = "gpio9", "gpio11";
function = "gpio";
};
config {
pins = "gpio9", "gpio11";
drive-strength = <0x2>;
bias-pull-down;
};
};
&i2c_5
是
挂
在
msm8953.dtsi
中
aliases {
/* smdtty devices */
i2c2 = &i2c_2;
i2c3 = &i2c_3;
i2c5 = &i2c_5;
spi3 = &spi_3;
};
i2c_5: i2c@7af5000 { /* BLSP2 QUP1 */
compatible = "qcom,i2c-msm-v2";
#address-cells = <1>;
#size-cells = <0>;
reg-names = "qup_phys_addr";
reg = <0x7af5000 0x600>;
interrupt-names = "qup_irq";
interrupts = <0 299 0>;
qcom,clk-freq-out = <400000>;
qcom,clk-freq-in = <19200000>;
clock-names = "iface_clk", "core_clk";
clocks = <&clock_gcc clk_gcc_blsp2_ahb_clk>,
<&clock_gcc clk_gcc_blsp2_qup1_i2c_apps_clk>;
pinctrl-names = "i2c_active", "i2c_sleep";
pinctrl-0 = <&i2c_5_active>;
pinctrl-1 = <&i2c_5_sleep>;
qcom,noise-rjct-scl = <0>;
qcom,noise-rjct-sda = <0>;
qcom,master-id = <84>;
dmas = <&dma_blsp2 4 64 0x20000020 0x20>,
<&dma_blsp2 5 32 0x20000020 0x20>;
dma-names = "tx", "rx";
status = "disabled";
};
其
中
:
pinctrl-names = "i2c_active", "i2c_sleep";
pinctrl-0 = <&i2c_5_active>;
pinctrl-1 = <&i2c_5_sleep>;
是
在
./msm8953-pinctrl.dtsi
i2c_5 {
i2c_5_active: i2c_5_active {
/* active state */
mux {
pins = "gpio18", "gpio19";
function = "blsp_i2c5";
};
config {
pins = "gpio18", "gpio19";
drive-strength = <4>;
bias-pull-up;
};
};
i2c_5_sleep: i2c_5_sleep {
/* suspended state */
mux {
pins = "gpio18", "gpio19";
function = "blsp_i2c5";
};
config {
pins = "gpio18", "gpio19";
drive-strength = <4>;
bias-pull-up;
};
};
};
该
节
点
在
反
编
译
中
:
i2c@7af5000 {
compatible = "qcom,i2c-msm-v2";
#address-cells = <0x1>;
#size-cells = <0x0>;
reg-names = "qup_phys_addr";
reg = <0x7af5000 0x600>;
interrupt-names = "qup_irq";
interrupts = <0x0 0x12b 0x0>;
qcom,clk-freq-out = <0x186a0>;
qcom,clk-freq-in = <0x124f800>;
clock-names = "iface_clk", "core_clk";
clocks = <0x37 0x8f283c1d 0x37 0x9ace11dd>;
pinctrl-names = "i2c_active", "i2c_sleep";
pinctrl-0 = <0xef>;
pinctrl-1 = <0xf0>;
qcom,noise-rjct-scl = <0x0>;
qcom,noise-rjct-sda = <0x0>;
qcom,master-id = <0x54>;
dmas = <0xf1 0x4 0x40 0x20000020 0x20 0xf1 0x5 0x20 0x20000020 0x20>;
dma-names = "tx", "rx";
tps65185x@68 {
compatible = "ti,tps65185x";
reg = <0x68>;
vcc_i2c-supply = <0xd3>;
pinctrl-names = "pmx_tps65185x_active", "pmx_tps65185x_sleep";
pinctrl-0 = <0xf2>;
pinctrl-1 = <0xf3>;
};
反
编
译
文
件
找
到
:
i2c_5 {
i2c_5_active {
linux,phandle = <0xef>;
phandle = <0xef>;
mux {
pins = "gpio18", "gpio19";
function = "blsp_i2c5";
};
config {
pins = "gpio18", "gpio19";
drive-strength = <0x4>;
bias-pull-up;
};
};
i2c_5_sleep {
linux,phandle = <0xf0>;
phandle = <0xf0>;
mux {
pins = "gpio18", "gpio19";
function = "blsp_i2c5";
};
config {
pins = "gpio18", "gpio19";
drive-strength = <0x4>;
bias-pull-up;
};
};
};
其
中
i2c_5_active {
linux,phandle = <0xef>;
phandle = <0xef>;
是
在
反
编
译
文
与
原
始
dtsi
文
件
进
行
关
联
了
。
在
/SOC/gpio_key
节
点
:
是
在
msm8953-mtp
。
dtsi
中
:
&soc {
gpio_keys {
compatible = "gpio-keys";
input-name = "gpio-keys";
pinctrl-names = "tlmm_gpio_key_active","tlmm_gpio_key_suspend";
pinctrl-0 = <&gpio_key_active>;
pinctrl-1 = <&gpio_key_suspend>;
camera_focus {
label = "camera_focus";
gpios = <&tlmm 87 0x1>;
linux,input-type = <1>;
linux,code = <0x210>;
debounce-interval = <15>;
};
camera_snapshot {
label = "camera_snapshot";
gpios = <&tlmm 86 0x1>;
linux,input-type = <1>;
linux,code = <0x2fe>;
debounce-interval = <15>;
};
vol_up {
label = "volume_up";
gpios = <&tlmm 85 0x1>;
linux,input-type = <1>;
linux,code = <115>;
debounce-interval = <15>;
};
};
其
中
:
pinctrl-names = "tlmm_gpio_key_active","tlmm_gpio_key_suspend";
是
pin
的
名
字
(
字
符
串
而
已
,
并
没
有
实
际
作
用
)
pinctrl-0 = <&gpio_key_active>;
pinctrl-1 = <&gpio_key_suspend>;
而
&gpio_key_active
和
&gpio_key_suspend
是
在
tlmm_gpio_key {
gpio_key_active: gpio_key_active {
mux {
pins = "gpio85";
function = "gpio";
};
config {
pins = "gpio85";
drive-strength = <2>;
bias-pull-up;
};
};
gpio_key_suspend: gpio_key_suspend {
mux {
pins = "gpio85";
function = "gpio";
};
config {
pins = "gpio85";
drive-strength = <2>;
bias-pull-up;
};
};
};
其
中
:
在
反
编
译
中
得
到
:
gpio_keys {
compatible = "gpio-keys";
input-name = "gpio-keys";
pinctrl-names = "tlmm_gpio_key_active", "tlmm_gpio_key_suspend";
pinctrl-0 = <0x1b6>;
pinctrl-1 = <0x1b7>;
vol_up {
label = "volume_up";
gpios = <0xbe 0x55 0x1>;
linux,input-type = <0x1>;
linux,code = <0x73>;
debounce-interval = <0xf>;
};
};
而
:
其
中
的
pinctrl-0 = <0x1b6>;
pinctrl-1 = <0x1b7>;
是
关
联
到
反
编
译
:
tlmm_gpio_key {
gpio_key_active {
linux,phandle = <0x1b6>;
phandle = <0x1b6>;
mux {
pins = "gpio85";
function = "gpio";
};
config {
pins = "gpio85";
drive-strength = <0x2>;
bias-pull-up;
};
};
2.
对
应
音
量
上
键
:
msm8953.dtsi
文
件中
:
vol_up {
label = "volume_up";
gpios = <&tlmm 85 0x1>;
linux,input-type = <1>;
linux,code = <115>;
debounce-interval = <15>;
};
其
中
:
gpios = <&tlmm 85 0x1>;
&tlmm
是
挂
在
msm8953-pinctrl.dtsi
中
:
tlmm: pinctrl@1000000 {
compatible = "qcom,msm8953-pinctrl";
reg = <0x1000000 0x300000>;
interrupts = <0 208 0>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
在
反
编
译
中
:
pinctrl@1000000 {
compatible = "qcom,msm8953-pinctrl";
reg = <0x1000000 0x300000>;
interrupts = <0x0 0xd0 0x0>;
gpio-controller;
#gpio-cells = <0x2>;
interrupt-controller;
#interrupt-cells = <0x2>;
linux,phandle = <0xbe>;
phandle = <0xbe>;
而
gpios = <&tlmm 85 0x1>;
在
反
编
译
中
是
:
vol_up {
label = "volume_up";
gpios = <0xbe 0x55 0x1>;//
原
始
dtsi
文
件
对
应
gpios = <&tlmm 85 0x1>;
linux,input-type = <0x1>;
linux,code = <0x73>;
debounce-interval = <0xf>;
};
&soc {
gpio_keys {
compatible = "gpio-keys";
input-name = "gpio-keys";
pinctrl-names = "tlmm_gpio_key_active","tlmm_gpio_key_suspend";
pinctrl-0 = <&gpio_key_active>;
pinctrl-1 = <&gpio_key_suspend>;
camera_focus {
label = "camera_focus";
gpios = <&tlmm 87 0x1>;
linux,input-type = <1>;
linux,code = <0x210>;
debounce-interval = <15>;
};
camera_snapshot {
label = "camera_snapshot";
gpios = <&tlmm 86 0x1>;
linux,input-type = <1>;
linux,code = <0x2fe>;
debounce-interval = <15>;
};
该
dtsi
文
件
实
在
./msm8953-mtp.dtsi
中
。
而
/soc/camera_focus
节
点
中
的
gpios = <&tlmm 87 0x1>;
在
反
编
译
中
是
:
gpios = <0xbe 0x57 0x1>;//
原
始
dtsi
文
件
对
应
gpios = <&tlmm 87 0x1>;
&wled
节
点
在
msm8953-mtp.dtsi
文
件中
&wled {
qcom,cons-sync-write-delay-us = <1000>;
};
而
wled
是
在
msm-pmi8953.dtsi
中
:
wled: qcom,leds@d800 {
compatible = "qcom,qpnp-wled";
reg = <0xd800 0x100>,
<0xd900 0x100>,
<0xdc00 0x100>,
<0xde00 0x100>;
reg-names = "qpnp-wled-ctrl-base",
"qpnp-wled-sink-base",
"qpnp-wled-ibb-base",
"qpnp-wled-lab-base";
interrupts = <0x3 0xd8 0x2>;
interrupt-names = "sc-irq";
status = "okay";
linux,name = "wled";
linux,default-trigger = "bkl-trigger";
qcom,fdbk-output = "auto";
qcom,vref-mv = <350>;
qcom,switch-freq-khz = <800>;
qcom,ovp-mv = <29500>;
qcom,ilim-ma = <980>;
qcom,boost-duty-ns = <26>;
qcom,mod-freq-khz = <9600>;
qcom,dim-mode = "hybrid";
qcom,dim-method = "linear";
qcom,hyb-thres = <625>;
qcom,sync-dly-us = <800>;
qcom,fs-curr-ua = <20000>;
qcom,led-strings-list = [00 01];
/*qcom,en-ext-pfet-sc-pro;*/
};
在
反
编
译
中
:
qcom,leds@d800 {
compatible = "qcom,qpnp-wled";
reg = <0xd800 0x100 0xd900 0x100 0xdc00 0x100 0xde00 0x100>;
reg-names = "qpnp-wled-ctrl-base", "qpnp-wled-sink-base", "qpnp-wled-ibb-base", "qpnp-wled-lab-
base";
interrupts = <0x3 0xd8 0x2>;
interrupt-names = "sc-irq";
status = "okay";
linux,name = "wled";
linux,default-trigger = "bkl-trigger";
qcom,fdbk-output = "auto";
qcom,vref-mv = <0x15e>;
qcom,switch-freq-khz = <0x320>;
qcom,ovp-mv = <0x733c>;
qcom,ilim-ma = <0x3d4>;
qcom,boost-duty-ns = <0x1a>;
qcom,mod-freq-khz = <0x2580>;
qcom,dim-mode = "hybrid";
qcom,dim-method = "linear";
qcom,hyb-thres = <0x271>;
qcom,sync-dly-us = <0x320>;
qcom,fs-curr-ua = <0x4e20>;
qcom,led-strings-list = [00 01 02];
qcom,cons-sync-write-delay-us = <0x3e8>;
};
&mdss_mdp
是
在
/soc/mdss_mdp
在
./msm8953-mdss.dtsi
文
件中
:
&soc {
mdss_mdp: qcom,mdss_mdp@1a00000 {
compatible = "qcom,mdss_mdp";
reg = <0x01a00000 0x90000>,
<0x01ab0000 0x1040>;
reg-names = "mdp_phys", "vbif_phys";
interrupts = <0 72 0>;
vdd-supply = <&gdsc_mdss>;
/* Bus Scale Settings */
qcom,msm-bus,name = "mdss_mdp";
qcom,msm-bus,num-cases = <3>;
qcom,msm-bus,num-paths = <1>;
qcom,msm-bus,vectors-KBps =
<22 512 0 0>,
<22 512 0 6400000>,
<22 512 0 6400000>;
/* Fudge factors */
qcom,mdss-ab-factor = <1 1>; /* 1 time */
qcom,mdss-ib-factor = <1 1>; /* 1 time */
qcom,mdss-clk-factor = <105 100>; /* 1.05 times */
qcom,max-mixer-width = <2048>;
qcom,max-pipe-width = <2048>;
/* VBIF QoS remapper settings*/
qcom,mdss-vbif-qos-rt-setting = <1 2 2 2>;
qcom,mdss-vbif-qos-nrt-setting = <1 1 1 1>;
省
略
}
其
中
:
vdd-supply = <&gdsc_mdss>
是
在
:
./msm-gdsc-8916.dtsi: gdsc_mdss: qcom,gdsc@184d078 {
;
在
反
编
译
中
:
qcom,mdss_mdp@1a00000 {
compatible = "qcom,mdss_mdp";
reg = <0x1a00000 0x90000 0x1ab0000 0x1040>;
reg-names = "mdp_phys", "vbif_phys";
interrupts = <0x0 0x48 0x0>;
vdd-supply = <0x182>;
qcom,msm-bus,name = "mdss_mdp";
qcom,msm-bus,num-cases = <0x3>;
qcom,msm-bus,num-paths = <0x1>;
qcom,msm-bus,vectors-KBps = <0x16 0x200 0x0 0x0 0x16 0x200 0x0 0x61a800 0x16
0x200 0x0 0x61a800>;
qcom,mdss-ab-factor = <0x1 0x1>;
qcom,mdss-ib-factor = <0x1 0x1>;
qcom,mdss-clk-factor = <0x69 0x64>;
qcom,max-mixer-width = <0x800>;
qcom,max-pipe-width = <0x800>;
qcom,mdss-vbif-qos-rt-setting = <0x1 0x2 0x2 0x2>;
qcom,mdss-vbif-qos-nrt-setting = <0x1 0x1 0x1 0x1>;
qcom,mdss-has-panic-ctrl;
qcom,mdss-per-pipe-panic-luts = <0xf 0xffff 0xfffc 0xff00>;
qcom,mdss-mdp-reg-offset = <0x1000>;
qcom,max-bandwidth-low-kbps = <0x33e140>;
qcom,max-bandwidth-high-kbps = <0x33e140>;
qcom,max-bandwidth-per-pipe-kbps = <0x231860>;
省
略
....
linux,phandle = <0x1a3>;
phandle = <0x1a3>;
}
通过
linux,phandle = <0x1a3>;
找
到
反
编
译
qcom,gdsc@184d078 {
compatible = "qcom,gdsc";
regulator-name = "gdsc_mdss";
reg = <0x184d078 0x4>;
status = "okay";
clock-names = "core_clk", "bus_clk";
clocks = <0x37 0x22f3521f 0x37 0x668f51de>;
proxy-supply = <0x182>;
qcom,proxy-consumer-enable;
linux,phandle = <0x182>;
phandle = <0x182>;
};
&sdhc1
是
挂
在
./msm8953.dtsi: sdhc_1: sdhci@7824900
挂
在
/msm8953.dtsi: sdhc1 = &sdhc_1; /* SDC1 eMMC slot */
具
体
:
/{
aliases {
省
略
...
sdhc1 = &sdhc_1; /* SDC1 eMMC slot */
sdhc2 = &sdhc_2; /* SDC2 for SD card */
省
略
...
};
}
对
&sdhc1
进
一
步
解
析
:
&sdhc1
节
点
是
在
msm8953-mtp.dtsi
文
件中
:
&sdhc_1 {
/* device core power supply */
vdd-supply = <&pm8953_l8>;
qcom,vdd-voltage-level = <2900000 2900000>;
qcom,vdd-current-level = <200 570000>;
/* device communication power supply */
vdd-io-supply = <&pm8953_l5>;
qcom,vdd-io-always-on;
qcom,vdd-io-lpm-sup;
qcom,vdd-io-voltage-level = <1800000 1800000>;
qcom,vdd-io-current-level = <200 325000>;
pinctrl-names = "active", "sleep";
pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on &sdc1_rclk_on>;
pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off &sdc1_rclk_off>;
qcom,clk-rates = <400000 20000000 25000000 50000000 100000000 192000000
384000000>;
qcom,nonremovable;
qcom,bus-speed-mode = "HS400_1p8v", "HS200_1p8v", "DDR_1p8v";
status = "ok";
};
其
中
:
/* device core power supply */
vdd-supply = <&pm8953_l8>;
属
性
的
&pm8953_l8
是
在
./msm8953-regulator.dtsi
中
:
rpm-regulator-ldoa8 {
status = "okay";
pm8953_l8: regulator-l8 {
regulator-min-microvolt = <2900000>;
regulator-max-microvolt = <2900000>;
qcom,init-voltage = <2900000>;
status = "okay";
};
};
通过
反
编
译
得
到
的
文
件
:
sdhci@7824900 {
compatible = "qcom,sdhci-msm";
reg = <0x7824900 0x500 0x7824000 0x800 0x7824e00 0x200>;
reg-names = "hc_mem", "core_mem", "cmdq_mem";
interrupts = <0x0 0x7b 0x0 0x0 0x8a 0x0>;
interrupt-names = "hc_irq", "pwr_irq";
sdhc-msm-crypto = <0x10a>;
qcom,bus-width = <0x8>;
qcom,devfreq,freq-table = <0x2faf080 0xbebc200>;
qcom,pm-qos-irq-type = "affine_irq";
qcom,pm-qos-irq-latency = <0x2 0xd5>;
qcom,pm-qos-cpu-groups = <0xf 0xf0>;
qcom,pm-qos-cmdq-latency-us = <0x2 0xd5 0x2 0xd5>;
qcom,pm-qos-legacy-latency-us = <0x2 0xd5 0x2 0xd5>;
qcom,msm-bus,name = "sdhc1";
qcom,msm-bus,num-cases = <0x9>;
qcom,msm-bus,num-paths = <0x1>;
qcom,msm-bus,vectors-KBps = <0x4e 0x200 0x0 0x0 0x4e 0x200 0x416 0xc80 0x4e
0x200 0xcc3e 0x27100 0x4e 0x200 0xff50 0x30d40 0x4e 0x200 0x1fe9e 0x61a80 0x4e
0x200 0x1fe9e 0x61a80 0x4e 0x200 0x3fd3e 0xc3500 0x4e 0x200 0x3fd3e 0xc3500
0x4e 0x200 0x146cc2 0x3e8000>;
qcom,bus-bw-vectors-bps = <0x0 0x61a80 0x1312d00 0x17d7840 0x2faf080
0x5f5e100 0xbebc200 0x17d78400 0xffffffff>;
clocks = <0x37 0x691e0caa 0x37 0x9ad6fb96 0x37 0xfd5680a>;
clock-names = "iface_clk", "core_clk", "ice_core_clk";
qcom,ice-clk-rates = <0x1017df80 0x9896800>;
qcom,large-address-bus;
status = "ok";
vdd-supply = <0x10b>;
qcom,vdd-voltage-level = <0x2c4020 0x2c4020>;
qcom,vdd-current-level = <0xc8 0x8b290>;
vdd-io-supply = <0xd3>;
qcom,vdd-io-always-on;
qcom,vdd-io-lpm-sup;
qcom,vdd-io-voltage-level = <0x1b7740 0x1b7740>;
qcom,vdd-io-current-level = <0xc8 0x4f588>;
pinctrl-names = "active", "sleep";
pinctrl-0 = <0x10c 0x10d 0x10e 0x10f>;
pinctrl-1 = <0x110 0x111 0x112 0x113>;
qcom,clk-rates = <0x61a80 0x1312d00 0x17d7840 0x2faf080 0x5f5e100 0xb71b000
0x16e36000>;
qcom,nonremovable;
qcom,bus-speed-mode = "HS400_1p8v", "HS200_1p8v", "DDR_1p8v";
};
通过
vdd-supply =<0x10b>
中
的
0x10b
找
到
反
编
译
文
件
的
:
linux,phandle = <0x10b>;
或
者
旧
版
本
的
phandle = <0x10b>;
找
到
节
点
regulator-l8
的
(
注
意
这
个
关
联
方
法
)
。
regulator-l8 {
compatible = "qcom,rpm-smd-regulator";
regulator-name = "pm8953_l8";
qcom,set = <0x3>;
status = "okay";
regulator-min-microvolt = <0x2c4020>;
regulator-max-microvolt = <0x2c4020>;
qcom,init-voltage = <0x2c4020>;
linux,phandle = <0x10b>;
phandle = <0x10b>;
};
};
(
2
)
对
于
pinctrl-names = "active", "sleep";
pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on &sdc1_rclk_on>;
pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off &sdc1_rclk_off>;
部
分
在
反
编
译
中
同
样
的
方
法
可
以
找
到
pinctrl-names = "active", "sleep";
pinctrl-0 = <0x10c 0x10d 0x10e 0x10f>;
pinctrl-1 = <0x110 0x111 0x112 0x113>;
那
么
里
面
对
应
的
pinctrl
的
句
柄是
在
反
编
译
中
:
sdc1_clk_on {
linux,phandle = <0x10c>;
phandle = <0x10c>;
config {
pins = "sdc1_clk";
bias-disable;
drive-strength = <0x10>;
};
};
sdc1_cmd_on {
linux,phandle = <0x10d>;
phandle = <0x10d>;
config {
pins = "sdc1_cmd";
bias-pull-up;
drive-strength = <0xa>;
};
};
sdc1_cmd_off {
linux,phandle = <0x111>;
phandle = <0x111>;
config {
pins = "sdc1_cmd";
num-grp-pins = <0x1>;
bias-pull-up;
drive-strength = <0x2>;
};
};
省
略
...
这
样
解
释
就
狠
清
楚
了
。
其
它
详
细
属
性
解
析
,
在
后
续
课
程
中
进
行详
细
讲解
,
欢
迎
关
注
。
各
位
同
学
还
不
能
理
解
吗
?
那
就
说
不
过
去
了
。
&sdhc_2
主
要
是
给
SD
卡
使
用
,
主
要
挂
在
./msm8953.dtsi: sdhc_2: sdhci@7864900
挂
在
./msm8953.dtsi: sdhc2 = &sdhc_2; /* SDC2 for SD card *
/{
aliases {
省
略
...
sdhc1 = &sdhc_1; /* SDC1 eMMC slot */
sdhc2 = &sdhc_2; /* SDC2 for SD card */
省
略
...
};
}
&sdhc_2
在
./msm8953.dtsi
中
:
sdhc_2: sdhci@7864900 {
compatible = "qcom,sdhci-msm";
reg = <0x7864900 0x500>, <0x7864000 0x800>;
reg-names = "hc_mem", "core_mem";
interrupts = <0 125 0>, <0 221 0>;
interrupt-names = "hc_irq", "pwr_irq";
qcom,bus-width = <4>;
qcom,pm-qos-irq-type = "affine_irq";
qcom,pm-qos-irq-latency = <2 213>;
qcom,pm-qos-cpu-groups = <0x0f 0xf0>;
qcom,pm-qos-legacy-latency-us = <2 213>, <2 213>;
qcom,devfreq,freq-table = <50000000 200000000>;
qcom,msm-bus,name = "sdhc2";
qcom,msm-bus,num-cases = <8>;
qcom,msm-bus,num-paths = <1>;
qcom,msm-bus,vectors-KBps = <81 512 0 0>, /* No vote */
<81 512 1046 3200>, /* 400 KB/s*/
<81 512 52286 160000>, /* 20 MB/s */
<81 512 65360 200000>, /* 25 MB/s */
<81 512 130718 400000>, /* 50 MB/s */
<81 512 261438 800000>, /* 100 MB/s */
<81 512 261438 800000>, /* 200 MB/s */
<81 512 1338562 4096000>; /* Max. bandwidth */
qcom,bus-bw-vectors-bps = <0 400000 20000000 25000000 50000000
100000000 200000000 4294967295>;
clocks = <&clock_gcc clk_gcc_sdcc2_ahb_clk>,
<&clock_gcc clk_gcc_sdcc2_apps_clk>;
clock-names = "iface_clk", "core_clk";
qcom,large-address-bus;
status = "disabled";
};
主
要讲解
status = "disabled";
是
关
闭
了
,
但
是
我
们
反
编
译
出
来
的
sdhci@7864900 {
compatible = "qcom,sdhci-msm";
reg = <0x7864900 0x500 0x7864000 0x800>;
reg-names = "hc_mem", "core_mem";
interrupts = <0x0 0x1 0x2>;
interrupt-names = "hc_irq", "pwr_irq", "status_irq";
qcom,bus-width = <0x4>;
qcom,pm-qos-irq-type = "affine_irq";
qcom,pm-qos-irq-latency = <0x2 0xd5>;
qcom,pm-qos-cpu-groups = <0xf 0xf0>;
qcom,pm-qos-legacy-latency-us = <0x2 0xd5 0x2 0xd5>;
qcom,devfreq,freq-table = <0x2faf080 0xbebc200>;
qcom,msm-bus,name = "sdhc2";
qcom,msm-bus,num-cases = <0x8>;
qcom,msm-bus,num-paths = <0x1>;
qcom,msm-bus,vectors-KBps = <0x51 0x200 0x0 0x0 0x51 0x200 0x416 0xc80 0x51 0x200
0xcc3e 0x27100 0x51 0x200 0xff50 0x30d40 0x51 0x200 0x1fe9e 0x61a80 0x51 0x200
0x3fd3e 0xc3500 0x51 0x200 0x3fd3e 0xc3500 0x51 0x200 0x146cc2 0x3e8000>;
qcom,bus-bw-vectors-bps = <0x0 0x61a80 0x1312d00 0x17d7840 0x2faf080 0x5f5e100
0xbebc200 0xffffffff>;
clocks = <0x37 0x23d5727f 0x37 0x861b20ac>;
clock-names = "iface_clk", "core_clk";
qcom,large-address-bus;
status = "ok";
vdd-supply = <0x6a>;
qcom,vdd-voltage-level = <0x2d0370 0x2d0370>;
qcom,vdd-current-level = <0x3a98 0xc3500>;
vdd-io-supply = <0x6b>;
qcom,vdd-io-voltage-level = <0x1b7740 0x2d0370>;
qcom,vdd-io-current-level = <0xc8 0x55f0>;
pinctrl-names = "active", "sleep";
pinctrl-0 = <0x114 0x115 0x116 0x117>;
pinctrl-1 = <0x118 0x119 0x11a>;
#address-cells = <0x0>;
interrupt-parent = <0x11b>;
#interrupt-cells = <0x1>;
interrupt-map-mask = <0xffffffff>;
interrupt-map = <0x0 0x1 0x0 0x7d 0x0 0x1 0x1 0x0 0xdd 0x0 0x2 0xbe 0x85 0x0>;
qcom,clk-rates = <0x61a80 0x1312d00 0x17d7840 0x2faf080 0x5f5e100 0xbebc200>;
qcom,bus-speed-mode = "SDR12", "SDR25", "SDR50", "DDR50", "SDR104";
linux,phandle = <0x11b>;
phandle = <0x11b>;
};
是
status = "ok";
被
打
开
的
,
为什么
?
原
因
是
在
&sdhc_2 {
/* device core power supply */
vdd-supply = <&pm8953_l11>;
qcom,vdd-voltage-level = <2950000 2950000>;
qcom,vdd-current-level = <15000 800000>;
/* device communication power supply */
vdd-io-supply = <&pm8953_l12>;
qcom,vdd-io-voltage-level = <1800000 2950000>;
qcom,vdd-io-current-level = <200 22000>;
pinctrl-names = "active", "sleep";
pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>;
pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off>;
#address-cells = <0>;
interrupt-parent = <&sdhc_2>;
interrupts = <0 1 2>;
#interrupt-cells = <1>;
interrupt-map-mask = <0xffffffff>;
interrupt-map = <0 &intc 0 125 0
1 &intc 0 221 0
2 &tlmm 133 0>;
interrupt-names = "hc_irq", "pwr_irq", "status_irq";
cd-gpios = <&tlmm 133 0x1>;
qcom,clk-rates = <400000 20000000 25000000 50000000 100000000
200000000>;
qcom,bus-speed-mode = "SDR12", "SDR25", "SDR50", "DDR50", "SDR104";
status = "ok";
在
这
个
地
方
打
开
的
!
所
反
编
译
出
来时是
打
开
ok
的
。
其
它
相
关
属
性
详
细
讲解
都
在
设
备
树
课
程
进
行详
细
分
析
,
看
完将
零
死
角
玩
转
设
备
树
。
};
&pm8953_typec
是
挂
在
:
/qcom,spmi@200f000 /qcom,pm8953@0
下
的
而
&pm8953_typec
在
msm8953-mtp.dtsi
中
:
&pm8953_typec {
ss-mux-supply = <&pm8953_l13>;
qcom,ssmux-gpio = <&tlmm 139 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&typec_ssmux_config>;
};
该
节
点
&pm8953_typec
追
加到
是
在
./msm-pm8953.dtsi
文
件
:
pm8953_typec: qcom,pm8953_typec@bf00 {
compatible = "qcom,qpnp-typec";
reg = <0xbf00 0x100>;
interrupts = <0x0 0xbf 0x0>,
<0x0 0xbf 0x1>,
<0x0 0xbf 0x2>,
<0x0 0xbf 0x3>,
<0x0 0xbf 0x4>,
<0x0 0xbf 0x6>,
<0x0 0xbf 0x7>;
interrupt-names = "vrd-change",
"ufp-detect",
"ufp-detach",
"dfp-detect",
"dfp-detach",
"vbus-err",
"vconn-oc";
};
反
编
译
得
到
:
/soc/
qcom,spmi@200f000/{
省
略
其
它
节
点
....
qcom,pm8953_typec@bf00 {
compatible = "qcom,qpnp-typec";
reg = <0xbf00 0x100>;
interrupts = <0x0 0xbf 0x0 0x0 0xbf 0x1 0x0 0xbf 0x2 0x0 0xbf 0x3 0x0 0xbf 0x4 0x0 0xbf
0x6 0x0 0xbf 0x7>;
interrupt-names = "vrd-change", "ufp-detect", "ufp-detach", "dfp-detect", "dfp-detach",
"vbus-err", "vconn-oc";
qcom,ccswitch-gpio = <0xbe 0x56 0x1>;
pinctrl-names = "default";
pinctrl-0 = <0x11d>;
};
};
省
略
其
它
节
点
....
}
其
中
:
pinctrl-0 = <0x11d>;
关
联
到
typec_ssmux_config{
linux,phandle = <0x11d>;
phandle = <0x11d>;
mux {
pins = "gpio86";
function = "gpio";
};
config {
pins = "gpio86";
drive-strength = <0x2>;
bias-pull-down;
};
};
(
2
)
ss-mux-supply = <&pm8953_l13>;./msm8953-regulator.dtsi
文
件中
:
./msm8953-regulator.dtsi:
pm8953_l13: regulator-l13
rpm-regulator-ldoa13 {
compatible = "qcom,rpm-smd-regulator-resource";
qcom,resource-name = "ldoa";
qcom,resource-id = <0xd>;
qcom,regulator-type = <0x0>;
qcom,hpm-min-load = <0x1388>;
status = "okay";
regulator-l13 {
compatible = "qcom,rpm-smd-regulator";
regulator-name = "pm8953_l13";
qcom,set = <0x3>;
status = "okay";
regulator-min-microvolt = <0x2faf08>;
regulator-max-microvolt = <0x2faf08>;
qcom,init-voltage = <0x2faf08>;
linux,phandle = <0xf8>;
phandle = <0xf8>;
};
};
&pmi8950_fg
在
msm8953-mtp.dtsi
中
:
&pmi8950_fg {
qcom,battery-data = <&mtp_batterydata>;
};
而
&mtp_batterydata
是
在
./msm8953-mtp.dtsi:
/{
mtp_batterydata: qcom,battery-data {
qcom,batt-id-range-pct = <15>;
#include "batterydata-itech-3000mah.dtsi"
#include "batterydata-ascent-3450mAh.dtsi"//
电
池
曲
线
};
};
反
编
译
:
qcom,battery-data {
qcom,batt-id-range-pct = <0xf>;
linux,phandle = <0x121>;
phandle = <0x121>;
qcom,CLYT33001_3300mAh_10k {
qcom,max-voltage-uv = <0x432380>;
qcom,nom-batt-capacity-mah = <0xce4>;
qcom,batt-id-kohm = <0xa>;
qcom,battery-beta = <0xd6b>;
qcom,battery-type = "CLYT33001_3300mAh_10k";
qcom,chg-rslow-comp-c1 = <0x468e77>;
qcom,chg-rslow-comp-c2 = <0x994ab2>;
qcom,chg-rs-to-rslow = <0xe62e0>;
qcom,chg-rslow-comp-thr = <0xc4>;
qcom,checksum = <0x31b1>;
qcom,gui-version = "PMI8950GUI - 2.0.0.16";
qcom,fg-profile-data = <0xe183ca7c 0x7810d77 0x6383a46f 0x1a893e94
0x3282cf99 0xddbc83c9 0x570fed83 0xd87cfc80 0xd8765783 0x9662a980
0x478d5482 0x7899b5bc 0x76c9530e 0x4d0da058 0x147077fd 0x983e593d
0xaf310000 0x5a443f29 0x63d0000 0x0 0x0 0x236b1c6a 0x3e632e81
0x166e4462 0x5b6a4080 0x7d6cf460 0xe57f0e8e 0x15b460f5 0x5da0710c
0x2800ff36 0xf0113003 0xc>;
};
qcom,CLYT33001_3300mAh_20k {
qcom,max-voltage-uv = <0x432380>;
qcom,nom-batt-capacity-mah = <0xd48>;
qcom,batt-id-kohm = <0x14>;
qcom,battery-beta = <0xd6b>;
qcom,battery-type = "CLYT33001_3300mAh_20k";
qcom,chg-rslow-comp-c1 = <0x2f621f>;
qcom,chg-rslow-comp-c2 = <0x3cab20>;
省
略
.......
}
&pmi8950_fg
是
追
加到
在
./msm-pmi8950.dtsi:
pmi8950_fg: qcom,fg
具
体
如
下:
pmi8950_fg: qcom,fg {
spmi-dev-container;
compatible = "qcom,qpnp-fg";
#address-cells = <1>;
#size-cells = <1>;
qcom,resume-soc = <95>;
status = "okay";
qcom,bcl-lm-threshold-ma = <127>;
qcom,bcl-mh-threshold-ma = <405>;
qcom,fg-iterm-ma = <150>;
qcom,fg-chg-iterm-ma = <100>;
qcom,pmic-revid = <&pmi8950_revid>;
qcom,fg-cutoff-voltage-mv = <3500>;
qcom,cycle-counter-en;
qcom,capacity-learning-on;
qcom,ext-sense-type;
qcom,fg-soc@4000 {
status = "okay";
reg = <0x4000 0x100>;
interrupts = <0x2 0x40 0x0>,
<0x2 0x40 0x1>,
<0x2 0x40 0x2>,
<0x2 0x40 0x3>,
<0x2 0x40 0x4>,
<0x2 0x40 0x5>,
<0x2 0x40 0x6>;
interrupt-names = "high-soc",
"low-soc",
"full-soc",
"empty-soc",
"delta-soc",
"first-est-done",
"update-soc";
};
其
它
省
略
.....
}
反
编
译
得
到
:
qcom,fg {
spmi-dev-container;
compatible = "qcom,qpnp-fg";
#address-cells = <0x1>;
#size-cells = <0x1>;
qcom,resume-soc = <0x62>;
status = "okay";
qcom,bcl-lm-threshold-ma = <0x7f>;
qcom,bcl-mh-threshold-ma = <0x195>;
qcom,fg-iterm-ma = <0x1c2>;
qcom,fg-chg-iterm-ma = <0xc8>;
qcom,pmic-revid = <0x120>;
qcom,fg-cutoff-voltage-mv = <0xc80>;
qcom,cycle-counter-en;
qcom,capacity-learning-on;
qcom,ext-sense-type;
qcom,battery-data = <0x121>;//
注
释
start
关
联
qcom,battery-data {
qcom,batt-id-range-pct = <0xf>;
linux,phandle = <0x121>;
phandle = <0x121>;
}
注
释
end//
qcom,fg-cc-cv-threshold-mv = <0x1126>;
qcom,hold-soc-while-full;
qcom,warm-bat-decidegc = <0x1c2>;
qcom,hot-bat-decidegc = <0x226>;
qcom,cool-bat-decidegc = <0x64>;
qcom,cold-bat-decidegc = <0x0>;
qcom,vbat-estimate-diff-mv = <0x64>;
qcom,irq-volt-empty-mv = <0xc1c>;
qcom,cold-hot-jeita-hysteresis = <0x28 0x28>;
qcom,fg-soc@4000 {
status = "okay";
reg = <0x4000 0x100>;
interrupts = <0x2 0x40 0x0 0x2 0x40 0x1 0x2 0x40 0x2 0x2 0x40 0x3 0x2 0x40
0x4 0x2 0x40 0x5 0x2 0x40 0x6>;
interrupt-names = "high-soc", "low-soc", "full-soc", "empty-soc", "delta-soc",
"first-est-done", "update-soc";
};
&pmi8950_charger
是
在
文
件
./msm8953-mtp.dtsi
中
,
该
节
点
是
挂
在
./msm-pmi8950.dtsi:
pmi8950_charger: qcom,qpnp-smbcharger {
spmi-dev-container;
compatible = "qcom,qpnp-smbcharger";
#address-cells = <1>;
#size-cells = <1>;
qcom,iterm-ma = <100>;
qcom,float-voltage-mv = <4400>;
qcom,resume-delta-mv = <200>;
qcom,chg-inhibit-fg;
qcom,rparasitic-uohm = <100000>;
qcom,bms-psy-name = "bms";
qcom,thermal-mitigation = <2500 700 600 0>;
qcom,parallel-usb-min-current-ma = <500>;
qcom,parallel-usb-9v-min-current-ma = <500>;
qcom,parallel-allowed-lowering-ma = <500>;
qcom,pmic-revid = <&pmi8950_revid>;
qcom,force-aicl-rerun;
qcom,aicl-rerun-period-s = <180>;
qcom,autoadjust-vfloat;
qcom,fastchg-current-ma = <4000>;
qcom,chgr@1000 {
reg = <0x1000 0x100>;
interrupts = <0x2 0x10 0x0>,
<0x2 0x10 0x1>,
<0x2 0x10 0x2>,
<0x2 0x10 0x3>,
<0x2 0x10 0x4>,
<0x2 0x10 0x5>,
<0x2 0x10 0x6>,
<0x2 0x10 0x7>;
interrupt-names = "chg-error",
"chg-inhibit",
"chg-prechg-sft",
"chg-complete-chg-sft",
"chg-p2f-thr",
"chg-rechg-thr",
"chg-taper-thr",
"chg-tcc-thr";
};
在
反
编
译
中
:
qcom,qpnp-smbcharger {
spmi-dev-container;
compatible = "qcom,qpnp-smbcharger";
#address-cells = <0x1>;
#size-cells = <0x1>;
qcom,iterm-ma = <0x64>;
qcom,float-voltage-mv = <0x1130>;
qcom,resume-delta-mv = <0xc8>;
qcom,chg-inhibit-fg;
qcom,rparasitic-uohm = <0x186a0>;
qcom,bms-psy-name = "bms";
qcom,thermal-mitigation = <0x9c4 0x2bc 0x258 0x0>;
qcom,parallel-usb-min-current-ma = <0x258>;
qcom,parallel-usb-9v-min-current-ma = <0x258>;
qcom,parallel-allowed-lowering-ma = <0x1f4>;
qcom,pmic-revid = <0x120>;
qcom,force-aicl-rerun;
qcom,aicl-rerun-period-s = <0xb4>;
qcom,autoadjust-vfloat;
qcom,fastchg-current-ma = <0xb54>;
qcom,battery-data = <0x121>;//
注
释
start
关
联
qcom,battery-data {
qcom,batt-id-range-pct = <0xf>;
linux,phandle = <0x121>;
phandle = <0x121>;
}
注
释
end//
qcom,fastchg-current-comp = <0x4b0>;
qcom,float-voltage-comp = <0x10>;
qcom,smbchg-default-dcp-icl-ma = <0x7d0>;
qcom,jeita-temp-hard-limit = <0x1>;
qcom,skip-usb-suspend-for-fake-battery;
qcom,hvdcp3-supported;
qcom,chgr@1000 {
reg = <0x1000 0x100>;
interrupts = <0x2 0x10 0x0 0x2 0x10 0x1 0x2 0x10 0x2 0x2 0x10 0x3 0x2 0x10 0x4
0x2 0x10 0x5 0x2 0x10 0x6 0x2 0x10 0x7>;
interrupt-names = "chg-error", "chg-inhibit", "chg-prechg-sft", "chg-complete-chg-sft",
"chg-p2f-thr", "chg-rechg-thr", "chg-taper-thr", "chg-tcc-thr";
};
&mp8953_gpio
节
点
是
在
./msm8953-mtp.dtsi
&pm8953_gpios {
/* GPIO 2 (NFC_CLK_REQ) */
gpio@c100 {
qcom,mode = <0>;
qcom,output-type = <0>;
qcom,pull = <0>;
qcom,vin-sel = <2>;
qcom,out-strength = <3>;
qcom,src-sel = <0>;
qcom,master-en = <1>;
status = "okay";
};
};
而
&pm8953_gpios
是
追
加到
./msm-pm8953.dtsi
文
件中
:
pm8953_gpios: gpios {
spmi-dev-container;
compatible = "qcom,qpnp-pin";
gpio-controller;
#gpio-cells = <2>;
#address-cells = <1>;
#size-cells = <1>;
label = "pm8953-gpio";
gpio@c000 {
reg = <0xc000 0x100>;
qcom,pin-num = <1>;
status = "disabled";
};
gpio@c100 {
reg = <0xc100 0x100>;
qcom,pin-num = <2>;
status = "disabled";
};
gpio@c200 {
reg = <0xc200 0x100>;
qcom,pin-num = <3>;
status = "disabled";
};
gpio@c300 {
reg = <0xc300 0x100>;
qcom,pin-num = <4>;
status = "disabled";
};
反
编
译
出
来
得
到
:
/soc/qcom,spmi@200f000/
gpios {
spmi-dev-container;
compatible = "qcom,qpnp-pin";
gpio-controller;
#gpio-cells = <0x2>;
#address-cells = <0x1>;
#size-cells = <0x1>;
label = "pm8953-gpio";
linux,phandle = <0xe2>;
phandle = <0xe2>;
gpio@c000 {
reg = <0xc000 0x100>;
qcom,pin-num = <0x1>;
status = "ok";
qcom,mode = <0x1>;
qcom,pull = <0x5>;
qcom,vin-sel = <0x0>;
qcom,src-sel = <0x2>;
qcom,master-en = <0x1>;
qcom,out-strength = <0x2>;
};
gpio@c100 {
reg = <0xc100 0x100>;
qcom,pin-num = <0x2>;
status = "okay";
qcom,mode = <0x0>;
qcom,output-type = <0x0>;
qcom,pull = <0x0>;
qcom,vin-sel = <0x2>;
qcom,out-strength = <0x3>;
qcom,src-sel = <0x0>;
qcom,master-en = <0x1>;
};
gpio@c200 {
reg = <0xc200 0x100>;
qcom,pin-num = <0x3>;
status = "disabled";
};
1.&soc
挂
在
soc
上
2.qcom,spm@b1d2000
3.qcom,lpm-levels
4.qcom,mpm@601d4
5.qcom,rpm-log@29fc00
6.qcom,rpm-master-
stats@60150
7.qcom,cpu-sleep-status
msm8953-mtp.dts
入
口
#include "msm8953.dtsi"
#include "msm8953-mtp.dtsi"
msm8953-pinctrl.dtsi
该
文
件主
要
是
对
所
有
的
msm8953
的
GPIO
进
行
配
置
。
注
意
:
是
msm8953
处
理
器
的
gpio
,
而
不
是
PMI8952
的
GPIO
,
至
于
它
们
管
脚
配
置
区
别
,
后
续
会
讲
。
&soc {
tlmm: pinctrl@1000000
msm8953-pinctrl.dtsi
Text
aiku嵌入式视频教程:零死角玩转高通平台设备树
QQ:1653687969
aiku嵌入式视频教程
资源评论
u影动
- 粉丝: 448
- 资源: 11
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功