hexdump命令查看Android设备里的设备树的值:
设备树dts文件中:
qcom,model = "kalama-qrd-snd-card";
qcom,msm-mi2s-master = <1>, <1>, <1>, <0>, <1>, <1>, <1>;
qcom,tdm-max-slots = <8>;
qcom,upd_lpass_reg_addr = <0x00000418 0x33B0300>;
qcom,upd_ear_pa_reg_addr = <0x300A>;
查看/proc/device-tree中设备树节点属性的值:
$ adb root
$ adb shell cat /proc/device-tree/soc/spf_core_platform/sound/qcom,model
kalama-qrd-snd-card
$ adb shell cat /proc/device-tree/soc/spf_core_platform/sound/qcom,model | hexdump -C
00000000 6b 61 6c 61 6d 61 2d 71 72 64 2d 73 6e 64 2d 63 |kalama-qrd-snd-c|
00000010 61 72 64 00 |ard.|
00000014
$ adb shell cat /proc/device-tree/soc/spf_core_platform/sound/qcom,model | hexdump -c
0000000 k a l a m a - q r d - s n d - c
0000010 a r d \0
0000014
$ adb shell cat /proc/device-tree/soc/spf_core_platform/sound/qcom,msm-mi2s-master | hexdump -vC
00000000 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00 00 |................|
00000010 00 00 00 01 00 00 00 01 00 00 00 01 |............|
0000001c
$ adb shell cat /proc/device-tree/soc/spf_core_platform/sound/qcom,tdm-max-slots | hexdump -vC
00000000 00 00 00 08 |....|
00000004
$ adb shell cat /proc/device-tree/soc/spf_core_platform/sound/qcom,upd_ear_pa_reg_addr | hexdump -vC
00000000 00 00 30 0a |..0.|
00000004
$ adb shell cat /proc/device-tree/soc/spf_core_platform/sound/qcom,upd_lpass_reg_addr | hexdump -vC
00000000 00 00 04 18 03 3b 03 00 |.....;..|
00000008