BOARD-ID

说明文档目录:kernel/msm4.14/Documentation/devicetree/bindings/arm/msm/board-id.txt 翻译如下

传统格式

The qcom,board-id entry specifies the MSM platform and subtype revision.
It can optionally be an array of these to indicate multiple hardware that use
the same device tree.  It is expected that the bootloader will use this
information at boot-up to decide which device tree to use when given multiple
device trees, some of which may not be compatible with the actual hardware.  It
is the bootloader's responsibility to pass the correct device tree to the kernel.

高通的board-id条目指定了MSM平台和其子类型的版本。
他能够可选择地(optionally)成为一个以上类型的组合,用于识别出共用设备树文件的不同的硬件。bootloader(引导装载程序)在给定多个设备树文件时用board id的信息来决定使用哪个设备树文件来启动。(其他的设备树文件跟实际的硬件并不匹配)BOOTLOADER负责将正确的设备树文件传递给内核。

Legacy format:
It is expected that the qcom,board-id entry be at the top level of the device
tree structure.  The format of the entry is:
qcom,board-id = <platform_id, subtype_id> [, <p2, s2> ...]

传统格式:
高通的board-id条目需要放在设备树文件的最开头部分(见下图),格式如下
在这里插入图片描述

qcom,board-id = <platform_id, subtype_id> [, <p2, s2> …]
举例:qcom,board-id = <0x00010b, 0xA>

where platform_id and subtype_id are the numeric values for the platform and
subtype of the current hardware.
The "subtype_id" cell is a 32-bit integer whose bit values are defined as follows:
    bits 31-20 = Reserved bits
    bits 19-16 = Boot Device Type.
		 MSM:
		     0: default (eMMC)
		     2: EMMC_SDC1
		     4: BOOT_UFS
		 MDM:
		     0: default (NAND)
		     3: EMMC_SDC1
    bits 15-8  = DDR Size. For devices with DDR Size as 512MB the value is 0x1, default value as 0x0
    bits 7-0   = Platform Subtype

当board id中的platform_id 和 subtype_id 与 当前的硬件上的 平台类型和子类型一致时,
subtype_id是一个32位的整形数,它的位定义如下

31-2019-1615-87-0
保留位启动设备类型DDR内存尺寸:0x0 为默认值,0x1为512MB平台子类型(Platform Subtype)
In the event that a given device tree is applicable to all hardware versions
matching a given Platform Type / Subtype ID, the major/minior platform version
fields in the board_id property shall both be specified as 0xff.

如果给定的设备树适用于所有硬件版本,匹配给定的平台类型/子类型ID,即主/次平台版本
board_id属性中的字段都应该指定为0xff。

最新的格式

Modern format:
The cell layout of the qcom,board-id property is as follows:
   qcom,board-id = <board_id, reserved>
where board_id is a 32-bit integer whose bit values are defined as follows:
    bits 31-24 = Platform Subtype ID
    bits 23-16 = Platform Version (Major)
    bits 15-8  = Platform Version (Minor)
    bits  7-0  = Platform Type ID

and the 'reserved' cell is a 32-bit integer whose bit values are defined as follows:
    bits 31-13 = Reserved Bits
    bits 12-11 = Panel Detection. 00 - limit to HD, 01 - limit to 720p,
		 10 - limit to qHD, 11 - limit to FWVGA
    bits 10-8  = DDR Size. For devices with DDR Size as 512MB the value is 0x1,
		 default value as 0x0
    bits 7-0   = Platform Subtype

最新的格式:
qcom,board-id属性的单元格布局如下:

qcom,board-id = <board_id, reserved>

board_id是一个32位的整型数,它的位定义如下:

31-2423-1615-87-0
平台子类型ID(Platform Subtype ID)平台版本(Platform Version (Major))平台版本(Platform Version (Minor))平台类型ID(Platform Type ID)

‘reserved’ 单元也是一个32位的整型数,它的各个位定义如下:

31-1312-1110-87-0
保留位屏幕检测:00 HD, 01 720P, 10 qHD, 11 FWVGADDR内存尺寸:0x0 为默认值,0x1为512MB平台子类型(Platform Subtype)
In the event that a given device tree is applicable to all hardware versions
matching a given Platform Type / Subtype ID, the major/minior platform version
fields in the board_id property shall both be specified as 0xff.

如果给定的设备树适用于所有硬件版本,匹配给定的平台类型/子类型ID,即主/次平台版本
board_id属性中的字段都应该指定为0xff。
Example:
qcom,board-id = <15 0>;
qcom,board-id = <0x01040708, 0>;
qcom,board-id = <0x01ffff08, 0>;
qcom,board-id = <8, 0x100>;

MSM-ID

文档说明目录:kernel/msm4.14/Documentation/devicetree/bindings/arm/msm/msm-id.txt

The qcom,msm-id entry specifies the MSM chipset, platform, hardware revision
and optional manufactured foundry.  It can optionally be an array of these to
indicate multiple hardware that use the same device tree.  It is expected that
the bootloader will use this information at boot-up to decide which device tree
to use when given multiple device trees, some of which may not be compatible
with the actual hardware.  It is the bootloader's responsibility to pass the
correct device tree to the kernel.

qcom, MSM -id条目指定MSM芯片组,平台,硬件版本和制造厂商。它能够可选择地(optionally)成为一个以上类型的组合,用于识别出共用设备树文件的不同的硬件。bootloader(引导装载程序)在给定多个设备树文件时用board id的信息来决定使用哪个设备树文件来启动。(其他的设备树文件跟实际的硬件并不匹配)BOOTLOADER负责将正确的设备树文件传递给内核。

Format:
It is expected that the qcom,msm-id entry be at the top level of the device
tree structure.  The format can take one of the two forms below:
 qcom,msm-id = <chipset_foundry_id, platform_id, rev_id> [, <c2, p2, r2> ...]
   qcom,msm-id = <chipset_foundry_id, rev_id> [, <c2, r2> ...]

If the second format is used one must also define the board-id.

高通的msm-id条目需要放在设备树文件的最开头部分(见下图),格式有如下两种
qcom,msm-id = <chipset_foundry_id, platform_id, rev_id> [, <c2, p2, r2> …]
qcom,msm-id = <chipset_foundry_id, rev_id> [, <c2, r2> …]
第二种格式在使用的过程中,需要同时定义board-id.

The "chipset_foundry_id" consists of three fields as below:
   bits 0-15  = The unique MSM chipset id.  
   bits 16-23 = The optional foundry id. If bootloader doesn't find a device
		tree which has exact matching foundry-id with hardware it
		chooses the device tree with foundry-id = 0.
   bits 24-31 = Reserved.

chipset_foundry_id单元中包含如下三部分的信息:

31-2423-1615-0
保留位厂商ID,如果BOOTLOADER不能够精确匹配硬件厂商ID,那BootLoader会选择厂商ID为0的设备树唯一的芯片ID

Example:
qcom,msm-id = <0x1007e 15 0>;

qcom,board-id= <15 2>;
qcom,msm-id = <0x1007e 0>;

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐