cancel
Showing results for 
Search instead for 
Did you mean: 

Raspberry Pi DSI with STM32MP157F

alchitry
Associate

I'm trying to get a Raspberry Pi DSI display working with a custom board using a STM32MP157F.

From the wiki I have the following.

&dsi {
	status = "okay";

	ports {
		port@0 {
			reg = <0>;
			dsi_in: endpoint {
				remote-endpoint = <&ltdc_ep0_out>;
			};
		};

		port@1 {
			reg = <1>;
			dsi_out: endpoint {
				remote-endpoint = <&bridge_in>;
			};
		};
	};

	bridge@0 {
		compatible = "toshiba,tc358762";
		reg = <0>;
		vddc-supply = <&reg_rpi>;
		status = "okay";

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

			port@0 {
				reg = <0>;
				bridge_in: endpoint {
					remote-endpoint = <&dsi_out>;
				};
			};
			port@1 {
				reg = <1>;
				bridge_out: endpoint {
					remote-endpoint = <&panel_in>;
				};
			};
		};
	};
};

/ {
	panel-rgb {
		/* Unknown; use a reasonably similar one */
		compatible = "powertip,ph800480t013-idf02";
		power-supply = <&reg_rpi>;
		status = "okay";

		port {
			panel_in: endpoint {
				remote-endpoint = <&bridge_out>;
			};
		};
	};
};

&i2c6 {
	reg_rpi: regulator@45 {
		compatible = "raspberrypi,7inch-touchscreen-panel-regulator";
		reg = <0x45>;
		vin-supply = <&v3v3>;
		status = "okay";
	};
};

&ltdc {
	default-on;
	status = "okay";

	port {
		ltdc_ep0_out: endpoint {
			remote-endpoint = <&dsi_in>;
		};
	};
};

In another file I have

	i2c6_pins_b: i2c6-1 {
		pins {
			pinmux = <STM32_PINMUX('Z', 2, AF2)>, /* I2C6_SCL */
				 <STM32_PINMUX('Z', 3, AF2)>; /* I2C6_SDA */
			bias-disable;
			drive-open-drain;
			slew-rate = <0>;
		};
	};

	i2c6_sleep_pins_b: i2c6-sleep-1 {
		pins {
			pinmux = <STM32_PINMUX('Z', 2, ANALOG)>, /* I2C6_SCL */
				 <STM32_PINMUX('Z', 3, ANALOG)>; /* I2C6_SDA */
		};
	};

and

&i2c6 {
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&i2c6_pins_b>;
	pinctrl-1 = <&i2c6_sleep_pins_b>;
	i2c-scl-rising-time-ns = <100>;
	i2c-scl-falling-time-ns = <7>;
	status = "okay";
};

 

I'm not seeing any action on the I2C lines so I'm not surprised the display isn't working.

The rest of my tree is basically from the stm32mp157f-dk2 which has includes that define the clock and power for i2c6 (double checked that).

Is there something more I need to do to enable it?

After boot I can see the following.

# dmesg | grep -i -e "drm" -e "ltdc" -e "dsi" -e "display" -e "panel"
[    0.127696] /soc/display-controller@5a001000: Fixed dependency cycle(s) with /soc/dsi@5a000000
[    0.128529] /soc/dsi@5a000000: Fixed dependency cycle(s) with /soc/dsi@5a000000/bridge@0
[    0.128581] /soc/dsi@5a000000: Fixed dependency cycle(s) with /soc/display-controller@5a001000
[    0.128657] /soc/dsi@5a000000/bridge@0: Fixed dependency cycle(s) with /soc/dsi@5a000000
[    0.139112] /soc/display-controller@5a001000: Fixed dependency cycle(s) with /soc/dsi@5a000000
[    0.152623] /soc/display-controller@5a001000: Fixed dependency cycle(s) with /soc/dsi@5a000000
[    0.152854] /soc/dsi@5a000000: Fixed dependency cycle(s) with /soc/dsi@5a000000/bridge@0
[    0.152903] /soc/dsi@5a000000: Fixed dependency cycle(s) with /soc/display-controller@5a001000
[    0.153381] /soc/dsi@5a000000/bridge@0: Fixed dependency cycle(s) with /soc/dsi@5a000000
[    0.156238] /soc/dsi@5a000000/bridge@0: Fixed dependency cycle(s) with /panel-rgb
[    0.156703] /panel-rgb: Fixed dependency cycle(s) with /soc/dsi@5a000000/bridge@0
[    4.206731] /panel-rgb: Fixed dependency cycle(s) with /soc/dsi@5a000000/bridge@0
[    4.220535] /soc/dsi@5a000000: Fixed dependency cycle(s) with /soc/dsi@5a000000/bridge@0
[    4.228565] /soc/dsi@5a000000/bridge@0: Fixed dependency cycle(s) with /panel-rgb
[    4.236008] /soc/dsi@5a000000/bridge@0: Fixed dependency cycle(s) with /soc/dsi@5a000000
[   10.012903] systemd[1]: Starting Load Kernel Module drm...
[   14.557772] platform 5a001000.display-controller: deferred probe pending
[   14.565563] platform panel-rgb: deferred probe pending
[   15.672916] [drm] Initialized etnaviv 1.4.0 20151214 for etnaviv on minor 0

I don't know why the probe is just pending?

I don't see a power supply named "reg_rpi" like I'd expect in /sys/class/regulator

 

1 ACCEPTED SOLUTION

Accepted Solutions
OlivierK
ST Employee

Hello @alchitry 

 

 

I have little experience in connecting Rpi display with STM32MP157, however you may try several things if not done yet.

 

- You mentioned that the I2C shows no activity on the lines. Have you tried to enable the driver i2c-dev and use i2c-tools to check that the I2C is functional .

https://wiki.st.com/stm32mpu/wiki/I2C_i2c-tools

 

Also a Wiki article related to Rpi display and DT config.

https://wiki.st.com/stm32mpu/wiki/Display_panels_hardware_components#Raspberry_Pi_7-22_Touch_-28MIPI-C2-AE_DSI-29

 

Regards,

Olivier

 


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

1 REPLY 1
OlivierK
ST Employee

Hello @alchitry 

 

 

I have little experience in connecting Rpi display with STM32MP157, however you may try several things if not done yet.

 

- You mentioned that the I2C shows no activity on the lines. Have you tried to enable the driver i2c-dev and use i2c-tools to check that the I2C is functional .

https://wiki.st.com/stm32mpu/wiki/I2C_i2c-tools

 

Also a Wiki article related to Rpi display and DT config.

https://wiki.st.com/stm32mpu/wiki/Display_panels_hardware_components#Raspberry_Pi_7-22_Touch_-28MIPI-C2-AE_DSI-29

 

Regards,

Olivier

 


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.