首页 > 编程知识 正文

RK3399Pro_HDMI驱动笔记

时间:2023-05-05 01:14:31 阅读:217067 作者:4027

The address offset of the HDMI TX is 0xff980000,it contains 16 address section. The offset  of the table of Register Summary must multiple with 4 when software configure it。Like the  Interrupt registers,its base address is 0x0100.If we want to configure it, its real address is 0xff980000+0x0100*4.

https://www.devicetree.org/specifications/

3.2. Root node

The devicetree has a single root node of which all other device nodes are descendants. The full path to the root node is /.

Table 3.1 Root Node Properties Property NameUsageValue TypeDefinition#address-cellsR<u32>Specifies the number of <u32> cells to represent the address in the reg property in children of root.#size-cellsR<u32>Specifies the number of <u32> cells to represent the size in the reg property in children of root.modelR<string>Specifies a string that uniquely identifies the model of the system board. The recommended format is “manufacturer,model-number”.compatibleR<stringlist>

Specifies a list of platform architectures with which this platform is compatible. This property can be used by operating systems in selecting platform specific code. The recommended form of the property value is:

"manufacturer,model"

For example:

compatible = "fsl,mpc8572ds"

Usage legend: R=Required, O=Optional, OR=Optional but Recommended, SD=See Definition Table 3.4 /chosen Node Properties Property NameUsageValue TypeDefinitionbootargsO<string>A string that specifies the boot arguments for the client program. The value could potentially be a null string if no boot arguments are required.stdout-pathO<string>A string that specifies the full path to the node representing the device to be used for boot console output. If the character “:” is present in the value it terminates the path. The value may be an alias. If the stdin-path property is not specified, stdout-path should be assumed to define the input device.stdin-pathO<string>A string that specifies the full path to the node representing the device to be used for boot console input. If the character “:” is present in the value it terminates the path. The value may be an alias.Usage legend: R=Required, O=Optional, OR=Optional but Recommended, SD=See Definition

Example

chosen { bootargs = "root=/dev/nfs rw nfsroot=192.168.1.1 console=ttyS0,115200";};

Older versions of devicetrees may be encountered that contain a deprecated form of the stdout-path property called linux,stdout-path. For compatibility, a client program might want to support linux,stdout-path if a stdout-path property is not present. The meaning and use of the two properties is identical.

Examples

Given a 64-bit Power system with the following physical memory layout:

RAM: starting address 0x0, length 0x80000000 (2 GB)RAM: starting address 0x100000000, length 0x100000000 (4 GB)

Memory nodes could be defined as follows, assuming #address-cells = <2> and #size-cells = <2>.

Example #1

memory@0 { device_type = "memory"; reg = <0x000000000 0x00000000 0x00000000 0x80000000 0x000000001 0x00000000 0x00000001 0x00000000>;};

Example #2

memory@0 { device_type = "memory"; reg = <0x000000000 0x00000000 0x00000000 0x80000000>;};memory@100000000 { device_type = "memory"; reg = <0x000000001 0x00000000 0x00000001 0x00000000>;};

The reg property is used to define the address and size of the two memory ranges. The 2 GB I/O region is skipped. Note that the #address-cells and #size-cells properties of the root node specify a value of 2, which means that two 32-bit cells are required to define the address and length for the reg property of the memory node.

hdmi_rk_fb: hdmi-rk-fb@ff940000 { status = "disabled"; compatible = "rockchip,rk3399-hdmi"; reg = <0x0 0xff940000 0x0 0x20000>; interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>; clocks = <&cru PCLK_HDMI_CTRL>, <&cru HCLK_HDCP>, <&cru SCLK_HDMI_CEC>, <&cru PLL_VPLL>, <&cru SCLK_HDMI_SFR>; clock-names = "pclk_hdmi", "hdcp_clk_hdmi","cec_clk_hdmi", "dclk_hdmi_phy", "sclk_hdmi_sfr"; resets = <&cru SRST_HDMI_CTRL>; reset-names = "hdmi"; pinctrl-names = "default", "gpio"; pinctrl-0 = <&hdmi_i2c_xfer &hdmi_cec>; pinctrl-1 = <&i2c3_gpio>; rockchip,grf = <&grf>; power-domains = <&power RK3399_PD_HDCP>; }; hdmi { hdmi_i2c_xfer: hdmi-i2c-xfer { rockchip,pins = <4 17 RK_FUNC_3 &pcfg_pull_none>,<4 16 RK_FUNC_3 &pcfg_pull_none>;}; hdmi_cec: hdmi-cec { rockchip,pins = <4 23 RK_FUNC_1 &pcfg_pull_none>; }; }; i2c3_gpio: i2c3_gpio { rockchip,pins = <4 17 RK_FUNC_GPIO &pcfg_pull_none>, <4 16 RK_FUNC_GPIO &pcfg_pull_none>; };

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。