• 周六. 5月 3rd, 2025

RK3399 — MIPI RX D-PHY DTS 配置

关键词:rockchip,rk3288-mipi-dphy; rockchip,rk3326-mipi-dphy; rockchip,rk3399-mipi-dphy; 

RK3399 — MIPI RX D-PHY DTS 配置

1、必须设置的属性值:

- compatible: 可以设置成以下值:
	"rockchip,rk3288-mipi-dphy"
	"rockchip,rk3326-mipi-dphy"
	"rockchip,rk3399-mipi-dphy"
- clocks : mipi的clock,与clock-names 一一对应。
- clock-names: 设置clock的名称

2、可选属性值:

- reg: 寄存器的偏移以及长度。
- rockchip,grf: 该属性只有 MIPI TX1RX1 D-PHY才会使用。

3、port 节点:

第一个endpoint是配置sensor与mipi-dphy的连接。
- endpoint:
	- remote-endpoint: 配置sensor与MIPI CSI-2 video bus 的连接
	- data-lanes : 配置哪些物理lane 与mipi csi连接.

第二个endpoint用于配置mipi与isp的连接。
- endpoint:
	- remote-endpoint:  配置isp的连接。

4、以rk3399为例:

grf: syscon@ff770000 {
	compatible = "rockchip,rk3288-grf", "syscon", "simple-mfd";

...

	mipi_dphy_rx0: mipi-dphy-rx0 {
		compatible = "rockchip,rk3399-mipi-dphy";
		clocks = <&cru SCLK_MIPIDPHY_REF>,
			<&cru SCLK_DPHY_RX0_CFG>,
			<&cru PCLK_VIO_GRF>;
		clock-names = "dphy-ref", "dphy-cfg", "grf";
		power-domains = <&power RK3399_PD_VIO>;

		ports {
			#address-cells = <1>;
			#size-cells = <0>;

			port@0 {
				reg = <0>;
				#address-cells = <1>;
				#size-cells = <0>;

				mipi_in_wcam: endpoint@0 {
					reg = <0>;
					remote-endpoint = <&wcam_out>;
					data-lanes = <1 2>;
				};
				mipi_in_ucam: endpoint@1 {
					reg = <1>;
					remote-endpoint = <&ucam_out>;
					data-lanes = <1>;
				};
			};

			port@1 {
				reg = <1>;

				dphy_rx0_out: endpoint {
					remote-endpoint = <&isp0_mipi_in>;
				};
			};
		};
	};
};

发表评论

您的电子邮箱地址不会被公开。