evankrall
Posts: 10
Joined: Tue Mar 23, 2021 3:21 am

Re: Rpi 4 with DRM and 7inch panel using kms driver

Wed Aug 25, 2021 3:57 am

As I mentioned in my other thread, I'm trying to get the original iPad's screen working with the Pi via the sn65dsi83.

This screen wants an LVDS clock of 97-103MHz, 100.03MHz typical; I've got .clock = 100030 in my mode definition in panel-simple.c (have also tried 100000).

I'm noticing that the ti-sn65dsi83 driver is setting the clock range registers a little funny:
  • CSR 0x0A has value 0x89, corresponding to 100 – 112.5 MHz ≤ LVDS_CLK < 137.5 MHz, which I would expect to be 011 – 87.5 MHz ≤ LVDS_CLK < 112.5 MHz
  • CSR 0x0B has value 0x28, corresponding to DSI_CLK_DIVIDER of 00101 (divide by 6)
  • CSR 0x12 has value 0x64, corresponding to a DSI clock of 500MHz (or more - the driver clamps the value.)
I think I sorta get what's going on based on the previous discussion in this thread about clock speeds and looking at vc4_dsi.c, but would like to confirm: vc4_dsi_encoder_mode_fixup is turning my 100mhz clock into a 125MHz clock, because I've only got 2 lanes. vc4_dsi will either let me have a 125mhz or 83.333mhz LVDS clock, but not 100 unless I had 4 lanes. Is my understanding correct?

(It also seems like I could get 111.11MHz if I patched the sn65 driver to support MIPI_DSI_FMT_RGB666_PACKED, but since that's also out of spec for my display, it's probably not worth the effort for me.)

I neglected to pull DA2(N/P) and DA3(N/P) out to test pads on my board, so it's gonna be fun trying to bodge in 2 extra lanes.

aBUGSworstnightmare
Posts: 3610
Joined: Tue Jun 30, 2015 1:35 pm

Re: Rpi 4 with DRM and 7inch panel using kms driver

Wed Aug 25, 2021 6:13 am

Yes, the MAREK (upstream) driver is using an adjusted mode which can cause out-of-spec timings.

You can test the milo246 driver as well; also working fine up to 3-lane DSI. Seeif that makes a difference.

4-lane DSI is working on none of them yet for unknown reasons (but investigated by 6by9), so don't spend any effort in trying atm.

Max DSI clock for SN65DSI8x is 500MHz -> the driver does what it's supposed to do. Check the spec for CHx_DSI_CLK_RANGE (CSR 0x12 and 0x13).

evankrall
Posts: 10
Joined: Tue Mar 23, 2021 3:21 am

Re: Rpi 4 with DRM and 7inch panel using kms driver

Thu Aug 26, 2021 5:45 am

What's the best git branch to use for the milo246 driver?

aBUGSworstnightmare
Posts: 3610
Joined: Tue Jun 30, 2015 1:35 pm

Re: Rpi 4 with DRM and 7inch panel using kms driver

Thu Aug 26, 2021 6:00 am

evankrall wrote:
Thu Aug 26, 2021 5:45 am
What's the best git branch to use for the milo246 driver?
Don't know if it's on git; you may want to use the driver from here viewtopic.php?f=44&t=305690&start=125#p1861683 and replace the one in 6by9's MAREK branch with it.

Then you need to apply the changes from here viewtopic.php?f=44&t=305690&start=150#p1861845 and the overlay from here viewtopic.php?f=44&t=305690&start=150#p1861821

aBUGSworstnightmare
Posts: 3610
Joined: Tue Jun 30, 2015 1:35 pm

Re: Rpi 4 with DRM and 7inch panel using kms driver

Fri Sep 24, 2021 1:14 pm

I have a HW which supports dual DSI input (using DSI85) and I'm trying now to get both DSI running.

My overlay works up to the point for the second backlight, but when I add the second panel and ports for the bridge chip my display (only one is connected to ChannelA atm, driven by DSI1 output) goes black.
Overlay seems to get applied correctly, so what's wrong with it? Any idea?

Code: Select all

/*
 * vc4-kms-dsi-sn65dsi8x-lw01-overlay.dts
 */

/dts-v1/;
/plugin/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>

/ {
	compatible = "brcm,bcm2835";

	/* PCA9538 GPIO expander, address 0x73 */
	fragment@0 {
		target = <&i2c0>;
		__overlay__ {
			#address-cells = <1>;
			#size-cells = <0>;
			status = "okay";

			pca: pca@73 {
				compatible = "nxp,pca9538";
				reg = <0x73>;
				gpio-controller;
				#gpio-cells = <2>;
				gpio-line-names = "UNUSED",
				  "BLEN_1",
				  "AUX1_2",
				  "AUX1-1",
				  "AUX2_2",
				  "AUX2_1",
				  "BLEN_2",
				  "EN_PCA";
				status = "okay";
				
				unused: unused {
					gpio-hog;
					gpios = <0 GPIO_ACTIVE_HIGH>;
					output-low;
				};		
						
				blen1: blen1 {
					gpio-hog;
					gpios = <1 GPIO_ACTIVE_HIGH>;
				};			

				aux12: aux12 {
					gpio-hog;
					gpios = <2 GPIO_ACTIVE_HIGH>;
				};
				
				aux11: aux11 {
					gpio-hog;
					gpios = <3 GPIO_ACTIVE_HIGH>;
				};

				aux22: aux22 {
					gpio-hog;
					gpios = <4 GPIO_ACTIVE_HIGH>;
				};
				
				aux21: aux21 {
					gpio-hog;
					gpios = <5 GPIO_ACTIVE_HIGH>;
				};
				
				
				blen2: blen2 {
					gpio-hog;
					gpios = <6 GPIO_ACTIVE_HIGH>;
				};	
			};
		};
	};

	/* PCA9632 LED driver, address 0x62 */
	fragment@1 {
		target = <&i2c0>;
		__overlay__ {
			#address-cells = <1>;
			#size-cells = <0>;
			status = "okay";

			pca9632: pca9632@62 {
				compatible = "nxp,pca9632";
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0x62>;
				
				/*	PCA9632 defaults to open-drain output
					pull-ups were added, hence PWM needs to
					be inverted */
				nxp,inverted-out;

				bl1: bl1@0 {
					reg = <0>;
					function = LED_FUNCTION_BACKLIGHT;
					color = <LED_COLOR_ID_WHITE>;
					linux,default-trigger = "backlight";
					label = "bl1";
				};
				bl2: bl2@1 {
					reg = <1>;
					function = LED_FUNCTION_BACKLIGHT;
					color = <LED_COLOR_ID_WHITE>;
					linux,default-trigger = "backlight";
					label = "bl2";
				};
				unused2: unused2@2 {
					reg = <2>;
					linux,default-trigger = "none";
				};
				unused3: unused3@3 {
					reg = <3>;
					linux,default-trigger = "none";
				};
			};
		};
	};

	fragment@4 {
		target-path = "/";
		__overlay__ {
			/* Panel1 backlight through PCA9632 channel0 */
			backlight_lvds_a: backlight1 {
				compatible = "led-backlight";
				leds = <&bl1>;
				
				/*brightness-levels = <0 1 2 3 4 5 6 7
									8 9 10 11 12 13 14 15 
									16 32 64 80	96 112 128 144 
									160 176 192 208 216 224 232 240
									248 255>;*/
				brightness-levels = <0 16 32 48 64 80 96 112 
									128 144 160 176 192 208 224 240>;
				default-brightness-level = <11>;
				
				/* enable through PCA9538 IO1 */
				/* Backlight enable - BLEN1 */
				enable-gpios  = <&pca 1 0>;
			};

			/* Panel0 backlight through PCA9632 channel6 */			
			backlight_lvds_b: backlight0 {
				compatible = "led-backlight";
				leds = <&bl2>;
				
				brightness-levels = <0 16 32 48 64 80 96 112 
									128 144 160 176 192 208 224 240>;
				default-brightness-level = <11>;
				
				/* enable through PCA9538 IO6 */
				/* Backlight enable - BLEN2 */
				enable-gpios  = <&pca 6 0>;
			};

			panel_disp1: panel_disp1@1 {
				reg = <1>;
				compatible = "chunghwa,claa070wp03xglvds", "simple-panel";
				backlight1 = <&backlight_lvds_a>;

				port {
					panel_in_lvds_a: endpoint {
						remote-endpoint = <&bridge_out_a>;
					};
				};
			};
			
			panel_disp0: panel_disp1@0 {
				reg = <0>;
				compatible = "chunghwa,claa070wp03xglvds", "simple-panel";
				backlight0 = <&backlight_lvds_b>;

				port {
					panel_in_lvds_b: endpoint {
						remote-endpoint = <&bridge_out_b>;
					};
				};
			};
		};
	};
	
	fragment@5 {
		target = <&i2c0>;
		__overlay__ {
			#gpio-cells = <2>;
			#address-cells = <1>;
			#size-cells = <0>;
			status = "okay";
			
			bridge@2c {
				compatible = "ti,sn65dsi83";
				reg = <0x2c>;
				enable-gpios  = <&pca 7 0>;

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

					port@0 {
						reg = <0>;
						bridge_in_a: endpoint {
							remote-endpoint = <&dsi_out_port_1>;
							data-lanes = <0 1 2>;
						};
					};
					
					port@1 {
						reg = <1>;
						bridge_in_b: endpoint {
							remote-endpoint = <&dsi_out_port_0>;
							data-lanes = <0 1>;
						};
					};

					port@2 {
						reg = <2>;
						bridge_out_a: endpoint {
							remote-endpoint = <&panel_in_lvds_a>;
						};
					};
					
					port@3 {
						reg = <3>;
						bridge_out_b: endpoint {
							remote-endpoint = <&panel_in_lvds_b>;
						};
					};
				};
			};
		};
	};

	fragment@6 {
		target = <&dsi1>;
		__overlay__ {
			#address-cells = <1>;
			#size-cells = <0>;
			status = "okay";
			port {
				dsi_out_port_1: endpoint {
					remote-endpoint = <&bridge_in_a>;
					data-lanes = <0 1 2>;
				};
			};
		};
	};	
	
	fragment@7 {
		target = <&dsi0>;
		__overlay__ {
			#address-cells = <1>;
			#size-cells = <0>;
			status = "okay";
			port {
				dsi_out_port_0: endpoint {
					remote-endpoint = <&bridge_in_b>;
					data-lanes = <0 1>;
				};
			};
		};
	};
	
	fragment@10 {
		target = <&aux11>;
		__overlay__ {
			output-low;
		};
	};

	fragment@11 {
		target = <&aux11>;
		__dormant__ {
			output-high;
		};
	};
	
	fragment@12 {
		target = <&aux12>;
		__overlay__ {
			output-low;
		};
	};

	fragment@13 {
		target = <&aux12>;
		__dormant__ {
			output-high;
		};
	};
	
	fragment@14 {
		target = <&aux21>;
		__overlay__ {
			output-low;
		};
	};

	fragment@15 {
		target = <&aux21>;
		__dormant__ {
			output-high;
		};
	};
	
	fragment@16 {
		target = <&aux22>;
		__overlay__ {
			output-low;
		};
	};

	fragment@17 {
		target = <&aux22>;
		__dormant__ {
			output-high;
		};
	};
	
	fragment@18 {
		target = <&blen1>;
		__overlay__ {
			output-low;
		};
	};

	fragment@19 {
		target = <&blen1>;
		__dormant__ {
			output-high;
		};
	};
	
			
	__overrides__ {
		aux11_low = <0>,"+10-11";
		aux11_high = <0>,"-10+11";
		aux12_low = <0>,"+12-13";
		aux12_high = <0>,"-12+13";
		aux21_low = <0>,"+14-15";
		aux21_high = <0>,"-14+15";
		aux22_low = <0>,"+16-17";
		aux22_high = <0>,"-16+17";
		blen1_low = <0>,"+18-19";
		blen1_high = <0>,"-18+19";		
	};	
};
here's some debug output:

Code: Select all

pi@raspberrypi:~ $ sudo nano /boot/config.txt
...
debug_sym: vc_mem_copy: Unable to open '/dev/fb0': No such file or directory(2)

debug_sym: vc_mem_copy: Unable to open '/dev/fb0': No such file or directory(2)

debug_sym: vc_mem_copy: Unable to open '/dev/fb0': No such file or directory(2)

005685.262: arasan: arasan_emmc_open
006124.596: brfs: File read: /mfs/sd/config.txt
006125.647: brfs: File read: 2364 bytes
006199.643: brfs: File read: /mfs/sd/config.txt
006200.645: gpioman: gpioman_get_pin_num: pin LEDS_PWR_OK not defined
006221.096: gpioman: gpioman_get_pin_num: pin FLASH_0_ENABLE not defined
006221.111: gpioman: gpioman_get_pin_num: pin FLASH_0_INDICATOR not defined
006221.142: gpioman: gpioman_get_pin_num: pin FLASH_0_ENABLE not defined
006221.159: gpioman: gpioman_get_pin_num: pin FLASH_0_INDICATOR not defined
006675.290: gpioman: gpioman_get_pin_num: pin LEDS_PWR_OK not defined
006676.571: *** Restart logging
006676.592: brfs: File read: 2364 bytes
006686.432: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
006689.863: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
006689.877: HDMI0: hdmi_pixel_encoding: 300000000
006689.891: HDMI1: hdmi_pixel_encoding: 300000000
006690.373: gpioman: gpioman_get_pin_num: pin CAMERA_0_I2C_PORT not defined
006694.651: dtb_file 'bcm2711-rpi-cm4.dtb'
006694.661: Trying Device Tree file 'bcm2711-rpi-cm4.dtb'
006707.215: brfs: File read: /mfs/sd/bcm2711-rpi-cm4.dtb
006707.232: Loading 'bcm2711-rpi-cm4.dtb' to 0x100 size 0xc2e4
006717.078: dtdebug: delete_node(/__local_fixups__)
006720.065: brfs: File read: 49892 bytes
006732.725: dtdebug: using platform 'bcm2711'
006734.410: brfs: File read: /mfs/sd/overlays/overlay_map.dtb
006735.164: dtdebug: overlay map loaded
006736.515: dtdebug: /aliases:i2c_vc=i2c0
006741.358: dtdebug: /__symbols__:i2c_vc=i2c0
006744.789: dtdebug: /__overrides__:i2c_vc=i2c0
006751.812: dtdebug: /__overrides__:i2c_vc_baudrate=i2c0_baudrate
006753.135: dtdebug: /aliases:i2c=i2c1
006758.081: dtdebug: /__symbols__:i2c=i2c1
006761.539: dtdebug: /__overrides__:i2c=i2c1
006762.869: dtdebug: /aliases:i2c_arm=i2c1
006767.827: dtdebug: /__symbols__:i2c_arm=i2c1
006771.289: dtdebug: /__overrides__:i2c_arm=i2c1
006778.251: dtdebug: /__overrides__:i2c_baudrate=i2c1_baudrate
006785.326: dtdebug: /__overrides__:i2c_arm_baudrate=i2c1_baudrate
006795.433: dtparam: uart0_clkrate=48000000
006798.260: dtdebug: /__overrides__ has no uart0_clkrate property
006798.269: Unknown dtparam 'uart0_clkrate' - ignored
006798.287: brfs: File read: 1559 bytes
006802.422: brfs: File read: /mfs/sd/config.txt
006802.526: dtparam: audio=off
006805.255: dtdebug: found override audio
006805.280: dtdebug:   override audio: string target 'status'
006812.189: dtparam: ant2=true
006814.963: dtdebug: found override ant2
006814.989: dtdebug:   override ant2: boolean target output-high
006821.727: dtdebug:   override ant2: boolean target output-low
006828.522: dtdebug:   override ant2: boolean target output-high
006835.372: dtdebug:   override ant2: boolean target output-low
006842.496: brfs: File read: 2364 bytes
006847.976: dtdebug: Opened overlay file 'overlays/dwc2.dtbo'
006849.480: brfs: File read: /mfs/sd/overlays/dwc2.dtbo
006855.286: Loaded overlay 'dwc2'
006855.298: dtparam: dr_mode=host
006855.345: dtdebug: found override dr_mode
006855.370: dtdebug:   override dr_mode: string target 'dr_mode'
006863.741: dtdebug: merge_fragment(/soc/usb@7e980000,/fragment@0/__overlay__)
006863.756: dtdebug:   +prop(compatible)
006864.229: dtdebug:   +prop(dr_mode)
006864.977: dtdebug:   +prop(g-np-tx-fifo-size)
006865.735: dtdebug:   +prop(g-rx-fifo-size)
006866.504: dtdebug:   +prop(g-tx-fifo-size)
006867.270: dtdebug:   +prop(status)
006867.769: dtdebug: merge_fragment() end
006868.161: dtdebug: mapped overlay 'vc4-kms-v3d' to 'vc4-kms-v3d-pi4'
006868.180: brfs: File read: 801 bytes
006881.272: dtdebug: Opened overlay file 'overlays/vc4-kms-v3d-pi4.dtbo'
006882.949: brfs: File read: /mfs/sd/overlays/vc4-kms-v3d-pi4.dtbo
006945.597: Loaded overlay 'vc4-kms-v3d'
006970.381: dtdebug: fragment 17 disabled
006970.433: dtdebug: fragment 18 disabled
006973.293: dtdebug: fragment 21 disabled
006973.346: dtdebug: fragment 22 disabled
006975.359: dtdebug: merge_fragment(/reserved-memory/linux,cma,/fragment@0/__overlay__)
006975.377: dtdebug:   +prop(size)
006976.131: dtdebug: merge_fragment() end
006985.475: dtdebug: merge_fragment(/soc/i2c@7ef04500,/fragment@1/__overlay__)
006985.493: dtdebug:   +prop(status)
006985.878: dtdebug: merge_fragment() end
006995.200: dtdebug: merge_fragment(/soc/i2c@7ef09500,/fragment@2/__overlay__)
006995.216: dtdebug:   +prop(status)
006995.593: dtdebug: merge_fragment() end
007004.896: dtdebug: merge_fragment(/soc/hdmi@7ef00700,/fragment@3/__overlay__)
007004.913: dtdebug:   +prop(status)
007005.322: dtdebug: merge_fragment() end
007014.624: dtdebug: merge_fragment(/soc/hdmi@7ef05700,/fragment@4/__overlay__)
007014.641: dtdebug:   +prop(status)
007015.041: dtdebug: merge_fragment() end
007022.681: dtdebug: merge_fragment(/soc/hvs@7e400000,/fragment@5/__overlay__)
007022.699: dtdebug:   +prop(status)
007023.183: dtdebug: merge_fragment() end
007032.030: dtdebug: merge_fragment(/soc/pixelvalve@7e206000,/fragment@6/__overlay__)
007032.045: dtdebug:   +prop(status)
007032.460: dtdebug: merge_fragment() end
007041.264: dtdebug: merge_fragment(/soc/pixelvalve@7e207000,/fragment@7/__overlay__)
007041.280: dtdebug:   +prop(status)
007041.692: dtdebug: merge_fragment() end
007050.567: dtdebug: merge_fragment(/soc/pixelvalve@7e20a000,/fragment@8/__overlay__)
007050.582: dtdebug:   +prop(status)
007050.994: dtdebug: merge_fragment() end
007060.038: dtdebug: merge_fragment(/soc/pixelvalve@7ec12000,/fragment@9/__overlay__)
007060.053: dtdebug:   +prop(status)
007060.456: dtdebug: merge_fragment() end
007069.477: dtdebug: merge_fragment(/soc/pixelvalve@7e216000,/fragment@10/__overlay__)
007069.492: dtdebug:   +prop(status)
007069.904: dtdebug: merge_fragment() end
007082.172: dtdebug: merge_fragment(/v3dbus/v3d@7ec04000,/fragment@11/__overlay__)
007082.189: dtdebug:   +prop(status)
007082.432: dtdebug: merge_fragment() end
007092.906: dtdebug: merge_fragment(/gpu,/fragment@12/__overlay__)
007092.922: dtdebug:   +prop(status)
007093.239: dtdebug: merge_fragment() end
007094.338: dtdebug: merge_fragment(/soc/txp@7e004000,/fragment@13/__overlay__)
007094.355: dtdebug:   +prop(status)
007095.079: dtdebug: merge_fragment() end
007105.401: dtdebug: merge_fragment(/soc/fb,/fragment@14/__overlay__)
007105.419: dtdebug:   +prop(status)
007105.743: dtdebug: merge_fragment() end
007115.803: dtdebug: merge_fragment(/soc/firmwarekms@7e600000,/fragment@15/__overlay__)
007115.820: dtdebug:   +prop(status)
007116.177: dtdebug: merge_fragment() end
007125.411: dtdebug: merge_fragment(/soc/vec@7ec13000,/fragment@16/__overlay__)
007125.428: dtdebug:   +prop(status)
007125.829: dtdebug: merge_fragment() end
007125.880: dtdebug: fragment 17 disabled
007125.932: dtdebug: fragment 18 disabled
007135.871: dtdebug: merge_fragment(/soc/mailbox@7e00b840/bcm2835_audio,/fragment@19/__overlay__)
007135.890: dtdebug:   +prop(brcm,disable-hdmi)
007136.526: dtdebug: merge_fragment() end
007145.884: dtdebug: merge_fragment(/soc/clock@7ef00000,/fragment@20/__overlay__)
007145.900: dtdebug:   +prop(status)
007146.303: dtdebug: merge_fragment() end
007146.355: dtdebug: fragment 21 disabled
007146.405: dtdebug: fragment 22 disabled
007155.886: dtdebug: merge_fragment(/soc/interrupt-controller@7ef00100,/fragment@23/__overlay__)
007155.902: dtdebug:   +prop(status)
007156.306: dtdebug: merge_fragment() end
007156.715: brfs: File read: 3831 bytes
007165.399: dtdebug: Opened overlay file 'overlays/i2c0.dtbo'
007167.052: brfs: File read: /mfs/sd/overlays/i2c0.dtbo
007179.943: Loaded overlay 'i2c0'
007179.954: dtparam: pins_44_45=true
007180.133: dtdebug: found override pins_44_45
007181.454: dtdebug: fragment 1 disabled
007181.508: dtdebug: fragment 2 disabled
007182.080: dtdebug: fragment 4 disabled
007182.133: dtdebug: fragment 5 disabled
007189.570: dtdebug: merge_fragment(/soc/i2c@7e205000,/fragment@0/__overlay__)
007189.587: dtdebug:   +prop(status)
007190.123: dtdebug:   +prop(pinctrl-names)
007190.684: dtdebug:   +prop(pinctrl-0)
007191.263: dtdebug: merge_fragment() end
007191.317: dtdebug: fragment 1 disabled
007191.370: dtdebug: fragment 2 disabled
007197.390: dtdebug: merge_fragment(/soc/gpio@7e200000/i2c0,/fragment@3/__overlay__)
007197.406: dtdebug:   +prop(brcm,pins)
007197.950: dtdebug:   +prop(brcm,function)
007198.503: dtdebug: merge_fragment() end
007198.554: dtdebug: fragment 4 disabled
007198.607: dtdebug: fragment 5 disabled
007205.730: dtdebug: merge_fragment(/soc/i2c0mux,/fragment@6/__overlay__)
007205.748: dtdebug:   +prop(status)
007206.261: dtdebug: merge_fragment() end
007206.480: dtdebug: merge_fragment(/aliases,/fragment@7/__overlay__)
007206.498: dtdebug:   +prop(i2c0)
007207.308: dtdebug: merge_fragment() end
007213.986: dtdebug: merge_fragment(/__symbols__,/fragment@8/__overlay__)
007214.004: dtdebug:   +prop(i2c0)
007214.514: dtdebug: merge_fragment() end
007214.898: brfs: File read: 1785 bytes
007231.724: dtdebug: Opened overlay file 'overlays/vc4-kms-dsi-ti-sn65dsi83-lw01.dtbo'
007232.827: brfs: File read: /mfs/sd/overlays/vc4-kms-dsi-ti-sn65dsi83-lw01.dtbo
007256.501: Loaded overlay 'vc4-kms-dsi-ti-sn65dsi83-lw01'
007256.513: dtparam: blen1_high=1
007257.054: dtdebug: found override blen1_high
007258.193: dtparam: aux11_high=1
007258.713: dtdebug: found override aux11_high
007259.600: dtparam: aux12_high=1
007260.124: dtdebug: found override aux12_high
007274.172: dtdebug: fragment 10 disabled
007274.994: dtdebug: merge_fragment(/fragment@0/__overlay__/pca@73/aux11,/fragment@11/__overlay__)
007275.009: dtdebug:   +prop(output-high)
007275.140: dtdebug: merge_fragment() end
007275.580: dtdebug: fragment 12 disabled
007276.375: dtdebug: merge_fragment(/fragment@0/__overlay__/pca@73/aux12,/fragment@13/__overlay__)
007276.392: dtdebug:   +prop(output-high)
007276.527: dtdebug: merge_fragment() end
007277.830: dtdebug: merge_fragment(/fragment@0/__overlay__/pca@73/aux21,/fragment@14/__overlay__)
007277.848: dtdebug:   +prop(output-low)
007277.966: dtdebug: merge_fragment() end
007278.443: dtdebug: fragment 15 disabled
007279.351: dtdebug: merge_fragment(/fragment@0/__overlay__/pca@73/aux22,/fragment@16/__overlay__)
007279.369: dtdebug:   +prop(output-low)
007279.490: dtdebug: merge_fragment() end
007279.997: dtdebug: fragment 17 disabled
007280.047: dtdebug: fragment 18 disabled
007280.940: dtdebug: merge_fragment(/fragment@0/__overlay__/pca@73/blen1,/fragment@19/__overlay__)
007280.956: dtdebug:   +prop(output-high)
007281.087: dtdebug: merge_fragment() end
007288.693: dtdebug: merge_fragment(/soc/i2c@7e205000,/fragment@0/__overlay__)
007288.709: dtdebug:   +prop(#address-cells)
007289.261: dtdebug:   +prop(#size-cells)
007289.788: dtdebug:   +prop(status)
007293.033: dtdebug: merge_fragment(/soc/i2c@7e205000/pca@73,/fragment@0/__overlay__/pca@73)
007293.050: dtdebug:   +prop(compatible)
007293.550: dtdebug:   +prop(reg)
007294.075: dtdebug:   +prop(gpio-controller)
007294.612: dtdebug:   +prop(#gpio-cells)
007295.154: dtdebug:   +prop(gpio-line-names)
007295.701: dtdebug:   +prop(status)
007296.240: dtdebug:   +prop(phandle)
007299.509: dtdebug: merge_fragment(/soc/i2c@7e205000/pca@73/unused,/fragment@0/__overlay__/pca@73/unused)
007299.524: dtdebug:   +prop(gpio-hog)
007300.097: dtdebug:   +prop(gpios)
007300.646: dtdebug:   +prop(output-low)
007301.225: dtdebug:   +prop(phandle)
007301.756: dtdebug: merge_fragment() end
007304.527: dtdebug: merge_fragment(/soc/i2c@7e205000/pca@73/blen1,/fragment@0/__overlay__/pca@73/blen1)
007304.544: dtdebug:   +prop(output-high)
007305.119: dtdebug:   +prop(gpio-hog)
007305.691: dtdebug:   +prop(gpios)
007306.245: dtdebug:   +prop(phandle)
007306.777: dtdebug: merge_fragment() end
007309.583: dtdebug: merge_fragment(/soc/i2c@7e205000/pca@73/aux12,/fragment@0/__overlay__/pca@73/aux12)
007309.601: dtdebug:   +prop(output-high)
007310.182: dtdebug:   +prop(gpio-hog)
007310.756: dtdebug:   +prop(gpios)
007311.310: dtdebug:   +prop(phandle)
007311.843: dtdebug: merge_fragment() end
007314.668: dtdebug: merge_fragment(/soc/i2c@7e205000/pca@73/aux11,/fragment@0/__overlay__/pca@73/aux11)
007314.686: dtdebug:   +prop(output-high)
007315.263: dtdebug:   +prop(gpio-hog)
007315.839: dtdebug:   +prop(gpios)
007316.404: dtdebug:   +prop(phandle)
007316.940: dtdebug: merge_fragment() end
007319.793: dtdebug: merge_fragment(/soc/i2c@7e205000/pca@73/aux22,/fragment@0/__overlay__/pca@73/aux22)
007319.810: dtdebug:   +prop(output-low)
007320.390: dtdebug:   +prop(gpio-hog)
007320.968: dtdebug:   +prop(gpios)
007321.526: dtdebug:   +prop(phandle)
007322.059: dtdebug: merge_fragment() end
007324.938: dtdebug: merge_fragment(/soc/i2c@7e205000/pca@73/aux21,/fragment@0/__overlay__/pca@73/aux21)
007324.953: dtdebug:   +prop(output-low)
007325.531: dtdebug:   +prop(gpio-hog)
007326.109: dtdebug:   +prop(gpios)
007326.666: dtdebug:   +prop(phandle)
007327.203: dtdebug: merge_fragment() end
007330.114: dtdebug: merge_fragment(/soc/i2c@7e205000/pca@73/blen2,/fragment@0/__overlay__/pca@73/blen2)
007330.132: dtdebug:   +prop(gpio-hog)
007330.715: dtdebug:   +prop(gpios)
007331.272: dtdebug:   +prop(phandle)
007331.804: dtdebug: merge_fragment() end
007331.821: dtdebug: merge_fragment() end
007331.884: dtdebug: merge_fragment() end
007338.871: dtdebug: merge_fragment(/soc/i2c@7e205000,/fragment@1/__overlay__)
007338.887: dtdebug:   +prop(#address-cells)
007339.415: dtdebug:   +prop(#size-cells)
007339.944: dtdebug:   +prop(status)
007343.411: dtdebug: merge_fragment(/soc/i2c@7e205000/pca9632@62,/fragment@1/__overlay__/pca9632@62)
007343.430: dtdebug:   +prop(compatible)
007343.943: dtdebug:   +prop(#address-cells)
007344.458: dtdebug:   +prop(#size-cells)
007344.977: dtdebug:   +prop(reg)
007345.519: dtdebug:   +prop(nxp,inverted-out)
007346.304: dtdebug:   +prop(phandle)
007349.694: dtdebug: merge_fragment(/soc/i2c@7e205000/pca9632@62/bl1@0,/fragment@1/__overlay__/pca9632@62/bl1@0)
007349.709: dtdebug:   +prop(reg)
007350.247: dtdebug:   +prop(function)
007350.799: dtdebug:   +prop(color)
007351.579: dtdebug:   +prop(linux,default-trigger)
007352.195: dtdebug:   +prop(label)
007352.813: dtdebug:   +prop(phandle)
007353.360: dtdebug: merge_fragment() end
007356.245: dtdebug: merge_fragment(/soc/i2c@7e205000/pca9632@62/bl2@1,/fragment@1/__overlay__/pca9632@62/bl2@1)
007356.259: dtdebug:   +prop(reg)
007356.793: dtdebug:   +prop(function)
007357.346: dtdebug:   +prop(color)
007358.129: dtdebug:   +prop(linux,default-trigger)
007358.748: dtdebug:   +prop(label)
007359.368: dtdebug:   +prop(phandle)
007359.919: dtdebug: merge_fragment() end
007362.836: dtdebug: merge_fragment(/soc/i2c@7e205000/pca9632@62/unused2@2,/fragment@1/__overlay__/pca9632@62/unused2@2)
007362.852: dtdebug:   +prop(reg)
007363.391: dtdebug:   +prop(linux,default-trigger)
007364.009: dtdebug:   +prop(phandle)
007364.551: dtdebug: merge_fragment() end
007367.505: dtdebug: merge_fragment(/soc/i2c@7e205000/pca9632@62/unused3@3,/fragment@1/__overlay__/pca9632@62/unused3@3)
007367.520: dtdebug:   +prop(reg)
007368.060: dtdebug:   +prop(linux,default-trigger)
007368.679: dtdebug:   +prop(phandle)
007369.222: dtdebug: merge_fragment() end
007369.239: dtdebug: merge_fragment() end
007369.287: dtdebug: merge_fragment() end
007369.564: dtdebug: merge_fragment(/,/fragment@4/__overlay__)
007376.593: dtdebug: merge_fragment(/backlight1,/fragment@4/__overlay__/backlight1)
007376.609: dtdebug:   +prop(compatible)
007377.380: dtdebug:   +prop(leds)
007378.169: dtdebug:   +prop(brightness-levels)
007379.210: dtdebug:   +prop(default-brightness-level)
007380.257: dtdebug:   +prop(enable-gpios)
007381.308: dtdebug:   +prop(phandle)
007382.120: dtdebug: merge_fragment() end
007389.169: dtdebug: merge_fragment(/backlight0,/fragment@4/__overlay__/backlight0)
007389.183: dtdebug:   +prop(compatible)
007389.969: dtdebug:   +prop(leds)
007390.762: dtdebug:   +prop(brightness-levels)
007391.807: dtdebug:   +prop(default-brightness-level)
007392.856: dtdebug:   +prop(enable-gpios)
007393.912: dtdebug:   +prop(phandle)
007394.726: dtdebug: merge_fragment() end
007401.820: dtdebug: merge_fragment(/panel_disp1@1,/fragment@4/__overlay__/panel_disp1@1)
007401.837: dtdebug:   +prop(reg)
007402.638: dtdebug:   +prop(compatible)
007403.418: dtdebug:   +prop(backlight1)
007404.467: dtdebug:   +prop(phandle)
007406.305: dtdebug: merge_fragment(/panel_disp1@1/port,/fragment@4/__overlay__/panel_disp1@1/port)
007407.354: dtdebug: merge_fragment(/panel_disp1@1/port/endpoint,/fragment@4/__overlay__/panel_disp1@1/port/endpoint)
007407.369: dtdebug:   +prop(remote-endpoint)
007408.418: dtdebug:   +prop(phandle)
007409.221: dtdebug: merge_fragment() end
007409.238: dtdebug: merge_fragment() end
007409.255: dtdebug: merge_fragment() end
007416.456: dtdebug: merge_fragment(/panel_disp1@0,/fragment@4/__overlay__/panel_disp1@0)
007416.473: dtdebug:   +prop(reg)
007417.282: dtdebug:   +prop(compatible)
007418.065: dtdebug:   +prop(backlight0)
007419.119: dtdebug:   +prop(phandle)
007420.992: dtdebug: merge_fragment(/panel_disp1@0/port,/fragment@4/__overlay__/panel_disp1@0/port)
007422.071: dtdebug: merge_fragment(/panel_disp1@0/port/endpoint,/fragment@4/__overlay__/panel_disp1@0/port/endpoint)
007422.086: dtdebug:   +prop(remote-endpoint)
007423.140: dtdebug:   +prop(phandle)
007423.945: dtdebug: merge_fragment() end
007423.962: dtdebug: merge_fragment() end
007423.980: dtdebug: merge_fragment() end
007424.008: dtdebug: merge_fragment() end
007431.350: dtdebug: merge_fragment(/soc/i2c@7e205000,/fragment@5/__overlay__)
007431.369: dtdebug:   +prop(#gpio-cells)
007431.969: dtdebug:   +prop(#address-cells)
007432.501: dtdebug:   +prop(#size-cells)
007433.041: dtdebug:   +prop(status)
007436.876: dtdebug: merge_fragment(/soc/i2c@7e205000/bridge@2c,/fragment@5/__overlay__/bridge@2c)
007436.893: dtdebug:   +prop(compatible)
007437.414: dtdebug:   +prop(reg)
007437.960: dtdebug:   +prop(enable-gpios)
007441.840: dtdebug: merge_fragment(/soc/i2c@7e205000/bridge@2c/ports,/fragment@5/__overlay__/bridge@2c/ports)
007441.854: dtdebug:   +prop(#address-cells)
007442.375: dtdebug:   +prop(#size-cells)
007445.991: dtdebug: merge_fragment(/soc/i2c@7e205000/bridge@2c/ports/port@0,/fragment@5/__overlay__/bridge@2c/ports/port@0)
007446.008: dtdebug:   +prop(reg)
007449.669: dtdebug: merge_fragment(/soc/i2c@7e205000/bridge@2c/ports/port@0/endpoint,/fragment@5/__overlay__/bridge@2c/ports/port@0/endpoint)
007449.685: dtdebug:   +prop(remote-endpoint)
007450.481: dtdebug:   +prop(data-lanes)
007451.082: dtdebug:   +prop(phandle)
007451.631: dtdebug: merge_fragment() end
007451.646: dtdebug: merge_fragment() end
007454.809: dtdebug: merge_fragment(/soc/i2c@7e205000/bridge@2c/ports/port@1,/fragment@5/__overlay__/bridge@2c/ports/port@1)
007454.826: dtdebug:   +prop(reg)
007458.493: dtdebug: merge_fragment(/soc/i2c@7e205000/bridge@2c/ports/port@1/endpoint,/fragment@5/__overlay__/bridge@2c/ports/port@1/endpoint)
007458.513: dtdebug:   +prop(remote-endpoint)
007459.306: dtdebug:   +prop(data-lanes)
007459.910: dtdebug:   +prop(phandle)
007460.458: dtdebug: merge_fragment() end
007460.475: dtdebug: merge_fragment() end
007463.680: dtdebug: merge_fragment(/soc/i2c@7e205000/bridge@2c/ports/port@2,/fragment@5/__overlay__/bridge@2c/ports/port@2)
007463.698: dtdebug:   +prop(reg)
007467.394: dtdebug: merge_fragment(/soc/i2c@7e205000/bridge@2c/ports/port@2/endpoint,/fragment@5/__overlay__/bridge@2c/ports/port@2/endpoint)
007467.412: dtdebug:   +prop(remote-endpoint)
007468.206: dtdebug:   +prop(phandle)
007468.754: dtdebug: merge_fragment() end
007468.768: dtdebug: merge_fragment() end
007472.031: dtdebug: merge_fragment(/soc/i2c@7e205000/bridge@2c/ports/port@3,/fragment@5/__overlay__/bridge@2c/ports/port@3)
007472.046: dtdebug:   +prop(reg)
007475.759: dtdebug: merge_fragment(/soc/i2c@7e205000/bridge@2c/ports/port@3/endpoint,/fragment@5/__overlay__/bridge@2c/ports/port@3/endpoint)
007475.778: dtdebug:   +prop(remote-endpoint)
007476.574: dtdebug:   +prop(phandle)
007477.121: dtdebug: merge_fragment() end
007477.137: dtdebug: merge_fragment() end
007477.157: dtdebug: merge_fragment() end
007477.218: dtdebug: merge_fragment() end
007477.283: dtdebug: merge_fragment() end
007485.898: dtdebug: merge_fragment(/soc/dsi@7e700000,/fragment@6/__overlay__)
007485.914: dtdebug:   +prop(#address-cells)
007486.395: dtdebug:   +prop(#size-cells)
007486.872: dtdebug:   +prop(status)
007490.894: dtdebug: merge_fragment(/soc/dsi@7e700000/port,/fragment@6/__overlay__/port)
007494.426: dtdebug: merge_fragment(/soc/dsi@7e700000/port/endpoint,/fragment@6/__overlay__/port/endpoint)
007494.445: dtdebug:   +prop(remote-endpoint)
007495.184: dtdebug:   +prop(data-lanes)
007495.730: dtdebug:   +prop(phandle)
007496.223: dtdebug: merge_fragment() end
007496.240: dtdebug: merge_fragment() end
007496.260: dtdebug: merge_fragment() end
007504.456: dtdebug: merge_fragment(/soc/dsi@7e209000,/fragment@7/__overlay__)
007504.471: dtdebug:   +prop(#address-cells)
007504.974: dtdebug:   +prop(#size-cells)
007505.476: dtdebug:   +prop(status)
007509.450: dtdebug: merge_fragment(/soc/dsi@7e209000/port,/fragment@7/__overlay__/port)
007512.928: dtdebug: merge_fragment(/soc/dsi@7e209000/port/endpoint,/fragment@7/__overlay__/port/endpoint)
007512.947: dtdebug:   +prop(remote-endpoint)
007513.709: dtdebug:   +prop(data-lanes)
007514.280: dtdebug:   +prop(phandle)
007514.798: dtdebug: merge_fragment() end
007514.814: dtdebug: merge_fragment() end
007514.833: dtdebug: merge_fragment() end
007514.897: dtdebug: fragment 10 disabled
007514.947: dtdebug: fragment 11 disabled
007514.999: dtdebug: fragment 12 disabled
007515.049: dtdebug: fragment 13 disabled
007515.101: dtdebug: fragment 14 disabled
007515.151: dtdebug: fragment 15 disabled
007515.203: dtdebug: fragment 16 disabled
007515.252: dtdebug: fragment 17 disabled
007515.304: dtdebug: fragment 18 disabled
007515.354: dtdebug: fragment 19 disabled
007525.107: brfs: File read: 7757 bytes
007529.792: brfs: File read: /mfs/sd/cmdline.txt
007529.837: Read command line from file 'cmdline.txt':
007529.851: 'console=tty1 root=PARTUUID=33586970-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles'
007536.965: dtparam: uart1=off
007539.962: dtdebug: found override uart1
007539.988: dtdebug:   override uart1: string target 'status'
008510.479: dtparam: arm_freq=2000000000
008513.489: dtdebug: found override arm_freq
008513.516: dtparam: core_freq=500000000
008516.562: dtdebug: /__overrides__ has no core_freq property
008516.573: Unknown dtparam 'core_freq' - ignored
008528.912: dtdebug: delete_node(/hat)
008533.019: brfs: File read: 143 bytes
009133.756: brfs: File read: /mfs/sd/kernel7l.img
009133.778: Loading 'kernel7l.img' to 0x8000 size 0x675d28
009133.803: Device tree loaded to 0x2eff2c00 (size 0xd331)
009145.875: gpioman: gpioman_get_pin_num: pin SDCARD_CONTROL_POWER not defined
011772.904: vchiq_core: vchiq_init_state: slot_zero = 0xded00000, is_master = 1
pi@raspberrypi:~ $ 


6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11813
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Rpi 4 with DRM and 7inch panel using kms driver

Fri Sep 24, 2021 2:40 pm

The sn65dsi83 driver only currently supports the dsi83 and dsi84.
https://elixir.bootlin.com/linux/latest ... si83.c#L17

Code: Select all

 * - SN65DSI85
 *   = 2x Single-link or 1x Dual-link DSI ~ 2x Single-link or 1x Dual-link LVDS
 *   - Unsupported
 *     (should be easy to add by someone who has the HW)
Nothing probes the port@1 which is only used in the dsi85 configuration. https://elixir.bootlin.com/linux/latest ... i83.c#L572

DRM will not complete the bind until all components are ready, so if you've enabled dsi0 but the other end won't bind, then it'll never complete.

Also the driver assumes that if both port@2 and port@3 are configured, then it's a dual link LVDS (because it doesn't support the DSI85 that does dual single link displays).
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

aBUGSworstnightmare
Posts: 3610
Joined: Tue Jun 30, 2015 1:35 pm

Re: Rpi 4 with DRM and 7inch panel using kms driver

Fri Sep 24, 2021 4:03 pm

6by9 wrote:
Fri Sep 24, 2021 2:40 pm
The sn65dsi83 driver only currently supports the dsi83 and dsi84.
https://elixir.bootlin.com/linux/latest ... si83.c#L17

Code: Select all

 * - SN65DSI85
 *   = 2x Single-link or 1x Dual-link DSI ~ 2x Single-link or 1x Dual-link LVDS
 *   - Unsupported
 *     (should be easy to add by someone who has the HW)
Nothing probes the port@1 which is only used in the dsi85 configuration. https://elixir.bootlin.com/linux/latest ... i83.c#L572

DRM will not complete the bind until all components are ready, so if you've enabled dsi0 but the other end won't bind, then it'll never complete.

Also the driver assumes that if both port@2 and port@3 are configured, then it's a dual link LVDS (because it doesn't support the DSI85 that does dual single link displays).
I'm working on driver modification to support DSI85 as well, but it's work in progress... And seems still some way to go.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11813
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Rpi 4 with DRM and 7inch panel using kms driver

Fri Sep 24, 2021 4:51 pm

aBUGSworstnightmare wrote:
Fri Sep 24, 2021 4:03 pm
I'm working on driver modification to support DSI85 as well, but it's work in progress... And seems still some way to go.
You're going to have some work to do to determine whether it is running in dual "DSI to single link LVDS", or dual DSI to dual link LVDS. Possibly just ignore the latter or now and assume that a compatible of "ti,sn65dsi85" means effectively 2 bridges.

For that mode you pretty much need to duplicate everything in sn65dsi83_parse_dt. 2 calls to of_graph_get_endpoint_by_regs for port 0 & 1. 2 calls to drm_of_find_panel_or_bridge for ports 2 & 3 to find the panel/bridges. 2 calls to devm_drm_panel_bridge_add to add the bridge for each instance.
Whilst not too involved, structuring it nicely could be tricky. struct sn65dsi83 needs to be split into those bits which are common (eg dev, regmap, enable_gpio), and those that apply to the instance (host_node, dsi, panel_bridge, dsi_lanes).

I wonder what the DSI85 requires in terms of initialisation between the two instances.
The datasheet says
When the SN65DSI85 is reset while VCC is high, the EN pin must be held low for at least 10 ms before being
asserted high as described in Table 7-5 to be sure that the device is properly reset. The DSI CLK lane MUST be
in HS and the DSI data lanes MUST be driven to LP11 while the device is in reset before the EN pin is asserted
per the timing described in Table 7-5
But is that DSI A, DSI B, or both? You could have either display powered down but the other active. It all depends on how the internal clocking of the chip works - which interface is the I2C core clocked from? Use in dual converter mode may not be possible with DRM.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11813
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Rpi 4 with DRM and 7inch panel using kms driver

Fri Sep 24, 2021 5:27 pm

More datasheet reading, page 23
When configured for two single DSI channels, the SN65DSI85 requires that the LVDS output clocks for both
video data streams be the same.
That's a further restriction that ought to be validated by the driver, but it looks like currently you're trying to use two claa070wp03xglvds displays, so you should be OK.
Looking at your overlay, running one link as three lanes and one as two seems a little quirky, but in theory would work.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

aBUGSworstnightmare
Posts: 3610
Joined: Tue Jun 30, 2015 1:35 pm

Re: Rpi 4 with DRM and 7inch panel using kms driver

Sat Sep 25, 2021 5:33 am

6by9 wrote:
Fri Sep 24, 2021 5:27 pm
More datasheet reading, page 23
When configured for two single DSI channels, the SN65DSI85 requires that the LVDS output clocks for both
video data streams be the same.
That's a further restriction that ought to be validated by the driver, but it looks like currently you're trying to use two claa070wp03xglvds displays, so you should be OK.
Looking at your overlay, running one link as three lanes and one as two seems a little quirky, but in theory would work.
I'm aware of that, limiting the use for dual stream to two identical displays. Yes, there are such use cases and one would only need one bridge.
Nevertheless, need to think about if it's realy worth the effort of expanding the driver to support it. When using two bridges that limitation is gone and it's then possible to also take full advantage of the 4-lane DSI1.

Main target for the new hardware revision was to get rid of the jump wires to GPIO40. As I had some DSI85 around I simply added the second connector/traces.

I also need to make further tests with the PCA9632; dimmimg works fine on the Nexus 7in, but causes audible noise/display flicker on another module. The later is specified for a PWM frequency upt to 20kHz, so will have to investigate the root cause (and see of changing the driver to group dimming - instead of individual dimming) - changes something (other carrier frequencies).
Will have a look at PCA9685 again how that one performs.

Thanks again for yoir kind support and your hints!

Btw: do you have a later branch than 5.10.44 to work on/test the driver with? 10.44 does not allow for display rotation i.e. (as mentioned earlier in the thread).

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11813
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Rpi 4 with DRM and 7inch panel using kms driver

Sat Sep 25, 2021 9:44 am

aBUGSworstnightmare wrote:
Sat Sep 25, 2021 5:33 am
Btw: do you have a later branch than 5.10.44 to work on/test the driver with? 10.44 does not allow for display rotation i.e. (as mentioned earlier in the thread).
Not that will work with SN65DSI8x as the approach is apparently invalid.

The Pi 7" panel is now working fairly happily with touch on rpi-5.10.y.
Next job is to convert it from being an encoder to a bridge (you still keep the encoder as it is exposed to userspace, but it does almost nothing), and we still have to split the bridge chain at the DSI bridge (Exynos does the same thing, so it's a failing of the framework that the driver has to mess around so much). With the current configuration you won't get the mode_valid and mode_fixup calls.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

aBUGSworstnightmare
Posts: 3610
Joined: Tue Jun 30, 2015 1:35 pm

Re: Rpi 4 with DRM and 7inch panel using kms driver

Sun Sep 26, 2021 4:44 pm

Any hint what port3 will have to look like for dual channel LVDS config?
Can't get it to work..
Or will I need a second port for the panel as well?

Code: Select all

...
			panel_disp1: panel_disp1@1 {
..
				port {
					panel_in_lvds_a: endpoint {
						remote-endpoint = <&bridge_out_a>;
					};
				};
			};
		};
	};
	
	fragment@5 {
		target = <&i2c0>;
		__overlay__ {
			#gpio-cells = <2>;
			#address-cells = <1>;
			#size-cells = <0>;
			status = "okay";
			
			bridge@2c {
				compatible = "ti,sn65dsi84";
				reg = <0x2c>;
				enable-gpios  = <&pca 7 0>;

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

					port@0 {
						reg = <0>;
						bridge_in_a: endpoint {
							remote-endpoint = <&dsi_out_port_1>;
							data-lanes = <0 1>;
						};
					};

					port@2 {
						reg = <2>;
						bridge_out_a: endpoint {
							remote-endpoint = <&panel_in_lvds_a>;
						};
					};
					
					/*port@3 {
						reg = <3>;
						bridge_out_b: endpoint {
							remote-endpoint = <&panel_in_lvds_a>;
						};
					};*/
					
					...

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11813
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Rpi 4 with DRM and 7inch panel using kms driver

Wed Sep 29, 2021 9:23 am

(Sorry, thought I'd hit submit on this, but hadn't)
Refer to the binding - https://github.com/raspberrypi/linux/bl ... dsi83.yaml

Code: Select all

     port@0:
        $ref: /schemas/graph.yaml#/properties/port
        description: Video port for MIPI DSI Channel-A input
...
      port@1:
        $ref: /schemas/graph.yaml#/properties/port
        description: Video port for MIPI DSI Channel-B input
...
      port@2:
        $ref: /schemas/graph.yaml#/properties/port
        description: Video port for LVDS Channel-A output (panel or bridge).

      port@3:
        $ref: /schemas/graph.yaml#/properties/port
        description: Video port for LVDS Channel-B output (panel or bridge).
If you're referring to effectively a DSI84 single DSI in to dual link LVDS out, then I believe your panel will need 2 ports as well.

For DSI85 two by single DSI in to 2 single link LVDS out, you'll need all 4 ports defined, ports 0 & 1 connecting to dsi0 and dsi1 (in one order or another), and ports 2 & 3 connecting to 2 panels.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

aBUGSworstnightmare
Posts: 3610
Joined: Tue Jun 30, 2015 1:35 pm

Re: Rpi 4 with DRM and 7inch panel using kms driver

Wed Sep 29, 2021 11:15 am

6by9 wrote:
Wed Sep 29, 2021 9:23 am
(Sorry, thought I'd hit submit on this, but hadn't)
Refer to the binding - https://github.com/raspberrypi/linux/bl ... dsi83.yaml
..
If you're referring to effectively a DSI84 single DSI in to dual link LVDS out, then I believe your panel will need 2 ports as well.

For DSI85 two by single DSI in to 2 single link LVDS out, you'll need all 4 ports defined, ports 0 & 1 connecting to dsi0 and dsi1 (in one order or another), and ports 2 & 3 connecting to 2 panels.
usage of the ports is clear to me (port0/1 are DSI inputs with port0 = DSIA input), and port 2/3 are the outputs.
For a single channel panel the definition looks like below, with the panel endpoint 'panel_in_lvds_a' connected to the bridge channel A output 'bridge_out_a'.

Code: Select all

..
			panel_disp1: panel_disp1@1 {
				reg = <1>;
				compatible = "chunghwa,claa070wp03xglvds", "simple-panel";
				backlight1 = <&backlight_lvds_a>;

				port {
					panel_in_lvds_a: endpoint {
						remote-endpoint = <&bridge_out_a>;
					};
				};
			};
			
			..
					port@0 {
						reg = <0>;
						bridge_in_a: endpoint {
							remote-endpoint = <&dsi_out_port_1>;
							data-lanes = <0 1>;
						};
					};

					port@2 {
						reg = <2>;
						bridge_out_a: endpoint {
							remote-endpoint = <&panel_in_lvds_a>;
						};
					};
As port 3 also requires the endpoints I'm struggling how to assign them as the panel 'panel_disp1' only has one endpoint.

Code: Select all

port@3 {
						reg = <3>;
						bridge_out_b: endpoint {
							remote-endpoint = <&WHAT TO PUT HERE>;
						};
					};

aBUGSworstnightmare
Posts: 3610
Joined: Tue Jun 30, 2015 1:35 pm

Re: Rpi 4 with DRM and 7inch panel using kms driver

Wed Sep 29, 2021 11:19 am

Any idea what causes this failure? When booting the display connected to bridge channelA shows some lines from the kernel log, then both displays go black.

Connecting via VNC I was see LVDS-1 (channelA = DSI1 panel) and DSI-1 (channel B = DSI0 panel) placed on top of each other. Trying to align them side-by-side causes the xrandr-error pictured.

System freezes after some minutes; instant reboot is not possible as there seems to be some deadlock condition now.
PSX_20210929_124851.jpg
PSX_20210929_124851.jpg (68.74 KiB) Viewed 831 times

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11813
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Rpi 4 with DRM and 7inch panel using kms driver

Wed Sep 29, 2021 12:52 pm

aBUGSworstnightmare wrote:
Wed Sep 29, 2021 11:15 am
As port 3 also requires the endpoints I'm struggling how to assign them as the panel 'panel_disp1' only has one endpoint.

Code: Select all

port@3 {
						reg = <3>;
						bridge_out_b: endpoint {
							remote-endpoint = <&WHAT TO PUT HERE>;
						};
					};
You need to include a dual-lvds-even-pixels entry in one port, and dual-lvds-odd-pixels in the other to tell the DSI84/5 which channel is which. That is checked in drm_of_lvds_get_port_pixels_type and drm_of_lvds_get_dual_link_pixel_order.

A search brings up https://lore.kernel.org/lkml/1565867073 ... nesas.com/
That series includes https://patchwork.kernel.org/project/li ... nesas.com/ and https://patchwork.kernel.org/project/li ... nesas.com/ which provide the DT for a dual link panel on an RCar platform.
They use compatible of "panel-lvds" with a panel timing in DT (I thought that wasn't allowed!), and it looks like panel-lvds.c just ignores the second port. It's needed for the bindings to all work, but not functionally for the panel driver.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11813
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Rpi 4 with DRM and 7inch panel using kms driver

Wed Sep 29, 2021 12:55 pm

aBUGSworstnightmare wrote:
Wed Sep 29, 2021 11:19 am
Any idea what causes this failure? When booting the display connected to bridge channelA shows some lines from the kernel log, then both displays go black.

Connecting via VNC I was see LVDS-1 (channelA = DSI1 panel) and DSI-1 (channel B = DSI0 panel) placed on top of each other. Trying to align them side-by-side causes the xrandr-error pictured.

System freezes after some minutes; instant reboot is not possible as there seems to be some deadlock condition now.
Use xrandr from the command line and see what it reports (if anything).

Code: Select all

xrandr --output LVDS-1 --mode <mode_name> --output DSI-1 --right-of LVDS-1
Why have you got one display as DSI-1 and one as LVDS-1? Something sounds squiffy there in the mappings as both should be LVDS-x.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

aBUGSworstnightmare
Posts: 3610
Joined: Tue Jun 30, 2015 1:35 pm

Re: Rpi 4 with DRM and 7inch panel using kms driver

Wed Sep 29, 2021 1:11 pm

6by9 wrote:
Wed Sep 29, 2021 12:52 pm
...
You need to include a dual-lvds-even-pixels entry in one port, and dual-lvds-odd-pixels in the other to tell the DSI84/5 which channel is which. That is checked in drm_of_lvds_get_port_pixels_type and drm_of_lvds_get_dual_link_pixel_order.

A search brings up https://lore.kernel.org/lkml/1565867073 ... nesas.com/
That series includes https://patchwork.kernel.org/project/li ... nesas.com/ and https://patchwork.kernel.org/project/li ... nesas.com/ which provide the DT for a dual link panel on an RCar platform.
They use compatible of "panel-lvds" with a panel timing in DT (I thought that wasn't allowed!), and it looks like panel-lvds.c just ignores the second port. It's needed for the bindings to all work, but not functionally for the panel driver.
Thanks for the pointer!
Using the dt-params (dual-lvds-odd-pixels/dual-lvds-even-pixels) makes prefect sense for a dual channel LVDS module. Was scratching my head where to heck they'll come from (to make the driver work as is). So that's what I expected to see in regards of the endpoints.

Code: Select all

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

			port@0 {
				reg = <0>;
				dual-lvds-odd-pixels;
				panel_in0: endpoint {
					remote-endpoint = <&lvds0_out>;
				};
			};

			port@1 {
				reg = <1>;
				dual-lvds-even-pixels;
				panel_in1: endpoint {
					remote-endpoint = <&lvds1_out>;
				};
			};
		};

But now .. when going one step beyond that concept .. for two single channel LVDS modules there is no odd/even pixels dt-param.
Any idea what will happen in case of using the above approach with a single channel LVDS module, omitting the dt-params?
Or do you think it will be easier/more clear when adding a second panel to the device tree? Do you know of such an example?

Anyhow, will try the concept and see what happens. My bridge is configured/working in dual independent LVDS so hopefully something happens at all (on either or both channels).

aBUGSworstnightmare
Posts: 3610
Joined: Tue Jun 30, 2015 1:35 pm

Re: Rpi 4 with DRM and 7inch panel using kms driver

Wed Sep 29, 2021 1:17 pm

6by9 wrote:
Wed Sep 29, 2021 12:55 pm
aBUGSworstnightmare wrote:
Wed Sep 29, 2021 11:19 am
Any idea what causes this failure? When booting the display connected to bridge channelA shows some lines from the kernel log, then both displays go black.

Connecting via VNC I was see LVDS-1 (channelA = DSI1 panel) and DSI-1 (channel B = DSI0 panel) placed on top of each other. Trying to align them side-by-side causes the xrandr-error pictured.

System freezes after some minutes; instant reboot is not possible as there seems to be some deadlock condition now.
Use xrandr from the command line and see what it reports (if anything).

Code: Select all

xrandr --output LVDS-1 --mode <mode_name> --output DSI-1 --right-of LVDS-1
Why have you got one display as DSI-1 and one as LVDS-1? Something sounds squiffy there in the mappings as both should be LVDS-x.
hmm.. big cheating is ongoing for getting the second DSI channel started as I have a fragment for DSI0 in my bridge device tree which starts a dumb MIPI panel with a compatible string in panel-simple.c. Strange thing is that I had it - at least - somehow running when using a portrait mode timing. As that one was exceeding the width of the landscape display (LVDS-1 on DSI1) the module on DSI1 remained active.

EDIT: think that error was related to some issue with the mode for the 'MIPI' panel. Fixed that and now my 'cheating overlay' seems to apply cleanly but the bridge is unhappy with cheating -> no display.
2021-09-29-170103_1600x1280_scrot.jpg
2021-09-29-170103_1600x1280_scrot.jpg (75.42 KiB) Viewed 768 times
Still work in progress...

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11813
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Rpi 4 with DRM and 7inch panel using kms driver

Wed Sep 29, 2021 4:40 pm

Regarding DT, you've got 3 configurations, and can largely split them based on compatible string

Code: Select all

bridge {
  compatible = "ti,sn65dsi83";
  port@0 {
    bridge_in_a: endpoint {
      remote-endpoint = <&dsi1>;
    };
  };
  port@2 {
    bridge_out_a: endpoint {
      remote-endpoint = <&panel_in>;
    };
  };
};

panel-lvds {
  compatible = "panel-lvds";
  width-mm = <476>;
  height-mm = <268>;
  data-mapping = "vesa-24";
  panel-timing {
	clock-frequency = <148500000>;
	hactive = <1920>;
	vactive = <1080>;
	hsync-len = <44>;
	hfront-porch = <88>;
	hback-porch = <148>;
	vfront-porch = <4>;
	vback-porch = <36>;
	vsync-len = <5>;
  };
  ports {
	#address-cells = <1>;
	#size-cells = <0>;
	port@0 {
		reg = <0>;
		panel_in: endpoint {
			remote-endpoint = <&bridge_out_a>;
		};
	};
  };
};

Code: Select all

 bridge {
  compatible = "ti,sn65dsi84";
  port@0 {
    bridge_in_a: endpoint {
      remote-endpoint = <&dsi1>;
    };
  };
  port@2 {
    bridge_out_a: endpoint {
      remote-endpoint = <&panel_in_a>;
    };
  };
  port@3 {
    bridge_out_b: endpoint {
      remote-endpoint = <&panel_in_b>;
    };
  };
};

panel-lvds {
  compatible = "panel-lvds";
  width-mm = <476>;
  height-mm = <268>;
  data-mapping = "vesa-24";
  panel-timing {
	clock-frequency = <148500000>;
	hactive = <1920>;
	vactive = <1080>;
	hsync-len = <44>;
	hfront-porch = <88>;
	hback-porch = <148>;
	vfront-porch = <4>;
	vback-porch = <36>;
	vsync-len = <5>;
  };
  ports {
	#address-cells = <1>;
	#size-cells = <0>;
	port@0 {
		reg = <0>;
		dual-lvds-odd-pixels;
		panel_in_a: endpoint {
			remote-endpoint = <&bridge_out_a>;
		};
	};
	port@1 {
		reg = <1>;
		dual-lvds-even-pixels;
		panel_in_b: endpoint {
			remote-endpoint = <&bridge_out_b>;
		};
	};
  };
};

Code: Select all

 bridge {
  compatible = "ti,sn65dsi85";
  port@0 {
    bridge_in_a: endpoint {
      remote-endpoint = <&dsi1>;
    };
  };
  port@1 {
    bridge_in_b: endpoint {
      remote-endpoint = <&dsi0>;
    };
  };
  port@2 {
    bridge_out_a: endpoint {
      remote-endpoint = <&panel_in_1>;
    };
  };
  port@3 {
    bridge_out_b: endpoint {
      remote-endpoint = <&panel_in_2>;
    };
  };
};

panel-lvds1 {
  compatible = "panel-lvds";
  width-mm = <476>;
  height-mm = <268>;
  data-mapping = "vesa-24";
  panel-timing {
	clock-frequency = <148500000>;
	hactive = <1920>;
	vactive = <1080>;
	hsync-len = <44>;
	hfront-porch = <88>;
	hback-porch = <148>;
	vfront-porch = <4>;
	vback-porch = <36>;
	vsync-len = <5>;
  };
  ports {
	#address-cells = <1>;
	#size-cells = <0>;
	port@0 {
		reg = <0>;
		panel_in_1: endpoint {
			remote-endpoint = <&bridge_out_a>;
		};
	};
  };
};
panel-lvds2 {
  compatible = "panel-lvds";
  width-mm = <476>;
  height-mm = <268>;
  data-mapping = "vesa-24";
  panel-timing {
	clock-frequency = <148500000>;
	hactive = <1920>;
	vactive = <1080>;
	hsync-len = <44>;
	hfront-porch = <88>;
	hback-porch = <148>;
	vfront-porch = <4>;
	vback-porch = <36>;
	vsync-len = <5>;
  };
  ports {
	#address-cells = <1>;
	#size-cells = <0>;
	port@0 {
		reg = <0>;
		panel_in_2: endpoint {
			remote-endpoint = <&bridge_out_b>;
		};
	};
  };
};
To support DSI85, the bridge driver has to be able to create two DRM bridge devices.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11813
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Rpi 4 with DRM and 7inch panel using kms driver

Wed Sep 29, 2021 5:23 pm

And thinking about it, checking for drm_of_lvds_get_dual_link_pixel_order will allow you to detect

Code: Select all

bridge {
  compatible = "ti,sn65dsi85";
  port@0 {
    bridge_in_a: endpoint {
      remote-endpoint = <&dsi1>;
    };
  };
  port@1 {
    bridge_in_b: endpoint {
      remote-endpoint = <&dsi0>;
    };
  };
  port@2 {
    bridge_out_a: endpoint {
      remote-endpoint = <&panel_in_a>;
    };
  };
  port@3 {
    bridge_out_b: endpoint {
      remote-endpoint = <&panel_in_b>;
    };
  };
};

panel-lvds1 {
  compatible = "panel-lvds";
  width-mm = <476>;
  height-mm = <268>;
  data-mapping = "vesa-24";
  panel-timing {
	clock-frequency = <148500000>;
	hactive = <1920>;
	vactive = <1080>;
	hsync-len = <44>;
	hfront-porch = <88>;
	hback-porch = <148>;
	vfront-porch = <4>;
	vback-porch = <36>;
	vsync-len = <5>;
  };
 ports {
	#address-cells = <1>;
	#size-cells = <0>;
	port@0 {
		reg = <0>;
		dual-lvds-odd-pixels;
		panel_in_a: endpoint {
			remote-endpoint = <&bridge_out_a>;
		};
	};
	port@1 {
		reg = <1>;
		dual-lvds-even-pixels;
		panel_in_b: endpoint {
			remote-endpoint = <&bridge_out_b>;
		};
	};
  };
for the dual (bonded) DSI to dual link LVDS option.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11813
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Rpi 4 with DRM and 7inch panel using kms driver

Fri Oct 01, 2021 12:45 pm

6by9 wrote:
Sat Sep 25, 2021 9:44 am
aBUGSworstnightmare wrote:
Sat Sep 25, 2021 5:33 am
Btw: do you have a later branch than 5.10.44 to work on/test the driver with? 10.44 does not allow for display rotation i.e. (as mentioned earlier in the thread).
Not that will work with SN65DSI8x as the approach is apparently invalid.

The Pi 7" panel is now working fairly happily with touch on rpi-5.10.y.
Next job is to convert it from being an encoder to a bridge (you still keep the encoder as it is exposed to userspace, but it does almost nothing), and we still have to split the bridge chain at the DSI bridge (Exynos does the same thing, so it's a failing of the framework that the driver has to mess around so much). With the current configuration you won't get the mode_valid and mode_fixup calls.
Done and seems to be working reasonably with the 7" panel. I'll give it a quick whirl with your SN65DSI83 board, but I had failed to get that working before (dodgy connections I think).
https://github.com/6by9/linux/tree/rpi-5.10.y-dsi-7inch is the base branch, and https://github.com/6by9/linux/tree/rpi- ... si8x-marek has the SN65DSI83 driver on top.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

aBUGSworstnightmare
Posts: 3610
Joined: Tue Jun 30, 2015 1:35 pm

Re: Rpi 4 with DRM and 7inch panel using kms driver

Fri Oct 01, 2021 12:53 pm

I'm stucked! Any idea what can cause me to loose access to my bridge device?

Code: Select all

pi@raspberrypi:~ $ dmesg | grep err
[    0.000000] Linux version 5.10.44-v7l+ (pi@raspberrypi) (gcc (Raspbian 8.3.0-6+rpi1) 8.3.0, GNU ld (GNU Binutils for Raspbian) 2.31.1) #1 SMP Tue Jul 6 08:14:17 CEST 2021
[    0.000000] OF: fdt: Machine model: Raspberry Pi Compute Module 4 Rev 1.0
[    0.000000] irq_brcmstb_l2: registered L2 intc (/soc/interrupt-controller@7ef00100, parent irq: 25)
[    0.100907] raspberrypi-firmware soc:firmware: Attached to firmware from 2021-05-27T14:03:06, variant start_x
[    0.110920] raspberrypi-firmware soc:firmware: Firmware hash is 7d9a298cda813f747b51fe17e1e417e7bf5ca94d
[    1.904564] sdhci: Copyright(c) Pierre Ossman
[    1.905440] mmc-bcm2835 fe300000.mmcnr: could not get clk, deferring probe
[    2.932818] systemd[1]: Set hostname to <raspberrypi>.
[    6.317075] hdmi-audio-codec hdmi-audio-codec.5.auto: ASoC: error at snd_soc_component_set_jack on hdmi-audio-codec.5.auto: -95
[    6.472011] hdmi-audio-codec hdmi-audio-codec.4.auto: ASoC: error at snd_soc_component_set_jack on hdmi-audio-codec.4.auto: -95
[    6.632290] hdmi-audio-codec hdmi-audio-codec.7.auto: ASoC: error at snd_soc_component_set_jack on hdmi-audio-codec.7.auto: -95
[    6.707401] hdmi-audio-codec hdmi-audio-codec.6.auto: ASoC: error at snd_soc_component_set_jack on hdmi-audio-codec.6.auto: -95
[    6.917490] hdmi-audio-codec hdmi-audio-codec.9.auto: ASoC: error at snd_soc_component_set_jack on hdmi-audio-codec.9.auto: -95
[    7.048751] hdmi-audio-codec hdmi-audio-codec.8.auto: ASoC: error at snd_soc_component_set_jack on hdmi-audio-codec.8.auto: -95
[    7.051035] vc4-drm: probe of gpu failed with error -16
pi@raspberrypi:~ $ dmesg | grep dsi
[    6.781688] vc4-drm gpu: bound fe209000.dsi (ops vc4_dsi_ops [vc4])
[    6.782952] vc4_dsi fe700000.dsi: bridge attach failed: -16
[    6.785060] vc4-drm gpu: failed to bind fe700000.dsi (ops vc4_dsi_ops [vc4]): -16
pi@raspberrypi:~ $ ls /sys/bus/i2c/drivers
dummy  leds-pca963x  pca953x  sn65dsi85  stmpe-i2c
pi@raspberrypi:~ $ sudo i2cdetect -y 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          03 -- -- -- -- -- -- -- -- 0c -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- UU -- -- 2f 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- UU -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- UU -- -- -- --                         
pi@raspberrypi:~ $ i2cdump -f -y 0 0x2c
No size specified (using byte-data access)
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
10: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
20: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
30: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
40: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
50: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
60: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
70: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
80: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
90: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
a0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
b0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
c0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
d0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
e0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
f0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
pi@raspberrypi:~ $ sudo vcdbg log msg
debug_sym: vc_mem_copy: Unable to open '/dev/fb0': No such file or directory(2)

debug_sym: vc_mem_copy: Unable to open '/dev/fb0': No such file or directory(2)

debug_sym: vc_mem_copy: Unable to open '/dev/fb0': No such file or directory(2)
...
CONTINOUS FOR A WHILE
...
debug_sym: vc_mem_copy: Unable to open '/dev/fb0': No such file or directory(2)

debug_sym: vc_mem_copy: Unable to open '/dev/fb0': No such file or directory(2)

debug_sym: vc_mem_copy: Unable to open '/dev/fb0': No such file or directory(2)

005684.672: arasan: arasan_emmc_open
006123.508: brfs: File read: /mfs/sd/config.txt
006124.598: brfs: File read: 2478 bytes
006198.887: brfs: File read: /mfs/sd/config.txt
006199.921: gpioman: gpioman_get_pin_num: pin LEDS_PWR_OK not defined
006220.374: gpioman: gpioman_get_pin_num: pin FLASH_0_ENABLE not defined
006220.390: gpioman: gpioman_get_pin_num: pin FLASH_0_INDICATOR not defined
006220.421: gpioman: gpioman_get_pin_num: pin FLASH_0_ENABLE not defined
006220.438: gpioman: gpioman_get_pin_num: pin FLASH_0_INDICATOR not defined
006708.940: gpioman: gpioman_get_pin_num: pin LEDS_PWR_OK not defined
006710.234: *** Restart logging
006710.255: brfs: File read: 2478 bytes
006720.318: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
006723.753: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
006723.767: HDMI0: hdmi_pixel_encoding: 300000000
006723.781: HDMI1: hdmi_pixel_encoding: 300000000
006724.256: gpioman: gpioman_get_pin_num: pin CAMERA_0_I2C_PORT not defined
006728.534: dtb_file 'bcm2711-rpi-cm4.dtb'
006728.544: Trying Device Tree file 'bcm2711-rpi-cm4.dtb'
006740.616: brfs: File read: /mfs/sd/bcm2711-rpi-cm4.dtb
006740.633: Loading 'bcm2711-rpi-cm4.dtb' to 0x100 size 0xc2e4
006750.378: dtdebug: delete_node(/__local_fixups__)
006753.362: brfs: File read: 49892 bytes
006766.219: dtdebug: using platform 'bcm2711'
006767.783: brfs: File read: /mfs/sd/overlays/overlay_map.dtb
006768.537: dtdebug: overlay map loaded
006769.896: dtdebug: /aliases:i2c_vc=i2c0
006774.801: dtdebug: /__symbols__:i2c_vc=i2c0
006778.185: dtdebug: /__overrides__:i2c_vc=i2c0
006785.106: dtdebug: /__overrides__:i2c_vc_baudrate=i2c0_baudrate
006786.430: dtdebug: /aliases:i2c=i2c1
006791.380: dtdebug: /__symbols__:i2c=i2c1
006794.842: dtdebug: /__overrides__:i2c=i2c1
006796.173: dtdebug: /aliases:i2c_arm=i2c1
006801.137: dtdebug: /__symbols__:i2c_arm=i2c1
006804.605: dtdebug: /__overrides__:i2c_arm=i2c1
006811.679: dtdebug: /__overrides__:i2c_baudrate=i2c1_baudrate
006818.652: dtdebug: /__overrides__:i2c_arm_baudrate=i2c1_baudrate
006828.755: dtparam: uart0_clkrate=48000000
006831.595: dtdebug: /__overrides__ has no uart0_clkrate property
006831.604: Unknown dtparam 'uart0_clkrate' - ignored
006831.622: brfs: File read: 1559 bytes
006835.546: brfs: File read: /mfs/sd/config.txt
006835.649: dtparam: audio=off
006838.377: dtdebug: found override audio
006838.402: dtdebug:   override audio: string target 'status'
006845.300: dtparam: ant2=true
006848.117: dtdebug: found override ant2
006848.142: dtdebug:   override ant2: boolean target output-high
006854.983: dtdebug:   override ant2: boolean target output-low
006861.781: dtdebug:   override ant2: boolean target output-high
006868.704: dtdebug:   override ant2: boolean target output-low
006875.837: brfs: File read: 2478 bytes
006881.139: dtdebug: Opened overlay file 'overlays/dwc2.dtbo'
006882.677: brfs: File read: /mfs/sd/overlays/dwc2.dtbo
006888.559: Loaded overlay 'dwc2'
006888.571: dtparam: dr_mode=host
006888.618: dtdebug: found override dr_mode
006888.643: dtdebug:   override dr_mode: string target 'dr_mode'
006897.154: dtdebug: merge_fragment(/soc/usb@7e980000,/fragment@0/__overlay__)
006897.169: dtdebug:   +prop(compatible)
006897.645: dtdebug:   +prop(dr_mode)
006898.393: dtdebug:   +prop(g-np-tx-fifo-size)
006899.152: dtdebug:   +prop(g-rx-fifo-size)
006899.913: dtdebug:   +prop(g-tx-fifo-size)
006900.688: dtdebug:   +prop(status)
006901.187: dtdebug: merge_fragment() end
006901.579: dtdebug: mapped overlay 'vc4-kms-v3d' to 'vc4-kms-v3d-pi4'
006901.598: brfs: File read: 801 bytes
006914.813: dtdebug: Opened overlay file 'overlays/vc4-kms-v3d-pi4.dtbo'
006916.874: brfs: File read: /mfs/sd/overlays/vc4-kms-v3d-pi4.dtbo
006979.284: Loaded overlay 'vc4-kms-v3d'
007003.845: dtdebug: fragment 17 disabled
007003.897: dtdebug: fragment 18 disabled
007006.712: dtdebug: fragment 21 disabled
007006.765: dtdebug: fragment 22 disabled
007008.778: dtdebug: merge_fragment(/reserved-memory/linux,cma,/fragment@0/__overlay__)
007008.796: dtdebug:   +prop(size)
007009.561: dtdebug: merge_fragment() end
007018.762: dtdebug: merge_fragment(/soc/i2c@7ef04500,/fragment@1/__overlay__)
007018.779: dtdebug:   +prop(status)
007019.167: dtdebug: merge_fragment() end
007028.480: dtdebug: merge_fragment(/soc/i2c@7ef09500,/fragment@2/__overlay__)
007028.496: dtdebug:   +prop(status)
007028.869: dtdebug: merge_fragment() end
007038.178: dtdebug: merge_fragment(/soc/hdmi@7ef00700,/fragment@3/__overlay__)
007038.197: dtdebug:   +prop(status)
007038.608: dtdebug: merge_fragment() end
007047.902: dtdebug: merge_fragment(/soc/hdmi@7ef05700,/fragment@4/__overlay__)
007047.920: dtdebug:   +prop(status)
007048.317: dtdebug: merge_fragment() end
007055.856: dtdebug: merge_fragment(/soc/hvs@7e400000,/fragment@5/__overlay__)
007055.874: dtdebug:   +prop(status)
007056.361: dtdebug: merge_fragment() end
007065.098: dtdebug: merge_fragment(/soc/pixelvalve@7e206000,/fragment@6/__overlay__)
007065.113: dtdebug:   +prop(status)
007065.526: dtdebug: merge_fragment() end
007074.338: dtdebug: merge_fragment(/soc/pixelvalve@7e207000,/fragment@7/__overlay__)
007074.354: dtdebug:   +prop(status)
007074.768: dtdebug: merge_fragment() end
007083.636: dtdebug: merge_fragment(/soc/pixelvalve@7e20a000,/fragment@8/__overlay__)
007083.651: dtdebug:   +prop(status)
007084.060: dtdebug: merge_fragment() end
007093.110: dtdebug: merge_fragment(/soc/pixelvalve@7ec12000,/fragment@9/__overlay__)
007093.126: dtdebug:   +prop(status)
007093.530: dtdebug: merge_fragment() end
007102.550: dtdebug: merge_fragment(/soc/pixelvalve@7e216000,/fragment@10/__overlay__)
007102.566: dtdebug:   +prop(status)
007102.968: dtdebug: merge_fragment() end
007115.242: dtdebug: merge_fragment(/v3dbus/v3d@7ec04000,/fragment@11/__overlay__)
007115.259: dtdebug:   +prop(status)
007115.507: dtdebug: merge_fragment() end
007125.971: dtdebug: merge_fragment(/gpu,/fragment@12/__overlay__)
007125.987: dtdebug:   +prop(status)
007126.300: dtdebug: merge_fragment() end
007127.399: dtdebug: merge_fragment(/soc/txp@7e004000,/fragment@13/__overlay__)
007127.417: dtdebug:   +prop(status)
007128.137: dtdebug: merge_fragment() end
007138.471: dtdebug: merge_fragment(/soc/fb,/fragment@14/__overlay__)
007138.489: dtdebug:   +prop(status)
007138.815: dtdebug: merge_fragment() end
007148.865: dtdebug: merge_fragment(/soc/firmwarekms@7e600000,/fragment@15/__overlay__)
007148.882: dtdebug:   +prop(status)
007149.244: dtdebug: merge_fragment() end
007158.482: dtdebug: merge_fragment(/soc/vec@7ec13000,/fragment@16/__overlay__)
007158.499: dtdebug:   +prop(status)
007158.901: dtdebug: merge_fragment() end
007158.952: dtdebug: fragment 17 disabled
007159.006: dtdebug: fragment 18 disabled
007168.936: dtdebug: merge_fragment(/soc/mailbox@7e00b840/bcm2835_audio,/fragment@19/__overlay__)
007168.954: dtdebug:   +prop(brcm,disable-hdmi)
007169.599: dtdebug: merge_fragment() end
007178.961: dtdebug: merge_fragment(/soc/clock@7ef00000,/fragment@20/__overlay__)
007178.979: dtdebug:   +prop(status)
007179.382: dtdebug: merge_fragment() end
007179.435: dtdebug: fragment 21 disabled
007179.484: dtdebug: fragment 22 disabled
007188.959: dtdebug: merge_fragment(/soc/interrupt-controller@7ef00100,/fragment@23/__overlay__)
007188.983: dtdebug:   +prop(status)
007189.387: dtdebug: merge_fragment() end
007189.797: brfs: File read: 3831 bytes
007198.356: dtdebug: Opened overlay file 'overlays/i2c0.dtbo'
007199.912: brfs: File read: /mfs/sd/overlays/i2c0.dtbo
007212.974: Loaded overlay 'i2c0'
007212.986: dtparam: pins_44_45=true
007213.165: dtdebug: found override pins_44_45
007214.520: dtdebug: fragment 1 disabled
007214.574: dtdebug: fragment 2 disabled
007215.154: dtdebug: fragment 4 disabled
007215.207: dtdebug: fragment 5 disabled
007222.642: dtdebug: merge_fragment(/soc/i2c@7e205000,/fragment@0/__overlay__)
007222.660: dtdebug:   +prop(status)
007223.193: dtdebug:   +prop(pinctrl-names)
007223.753: dtdebug:   +prop(pinctrl-0)
007224.331: dtdebug: merge_fragment() end
007224.386: dtdebug: fragment 1 disabled
007224.439: dtdebug: fragment 2 disabled
007230.487: dtdebug: merge_fragment(/soc/gpio@7e200000/i2c0,/fragment@3/__overlay__)
007230.503: dtdebug:   +prop(brcm,pins)
007231.051: dtdebug:   +prop(brcm,function)
007231.604: dtdebug: merge_fragment() end
007231.655: dtdebug: fragment 4 disabled
007231.708: dtdebug: fragment 5 disabled
007238.721: dtdebug: merge_fragment(/soc/i2c0mux,/fragment@6/__overlay__)
007238.738: dtdebug:   +prop(status)
007239.252: dtdebug: merge_fragment() end
007239.475: dtdebug: merge_fragment(/aliases,/fragment@7/__overlay__)
007239.492: dtdebug:   +prop(i2c0)
007240.302: dtdebug: merge_fragment() end
007246.971: dtdebug: merge_fragment(/__symbols__,/fragment@8/__overlay__)
007246.988: dtdebug:   +prop(i2c0)
007247.494: dtdebug: merge_fragment() end
007247.878: brfs: File read: 1785 bytes
007265.330: dtdebug: Opened overlay file 'overlays/vc4-kms-dsi-ti-sn65dsi85-lw01.dtbo'
007266.425: brfs: File read: /mfs/sd/overlays/vc4-kms-dsi-ti-sn65dsi85-lw01.dtbo
007290.158: Loaded overlay 'vc4-kms-dsi-ti-sn65dsi85-lw01'
007290.170: dtparam: blen1_high=1
007290.701: dtdebug: found override blen1_high
007291.830: dtparam: aux11_high=1
007292.339: dtdebug: found override aux11_high
007293.215: dtparam: aux21_high=1
007293.733: dtdebug: found override aux21_high
007307.948: dtdebug: fragment 10 disabled
007308.778: dtdebug: merge_fragment(/fragment@0/__overlay__/pca@73/aux11,/fragment@11/__overlay__)
007308.793: dtdebug:   +prop(output-high)
007308.923: dtdebug: merge_fragment() end
007310.107: dtdebug: merge_fragment(/fragment@0/__overlay__/pca@73/aux12,/fragment@12/__overlay__)
007310.122: dtdebug:   +prop(output-low)
007310.243: dtdebug: merge_fragment() end
007310.698: dtdebug: fragment 13 disabled
007310.749: dtdebug: fragment 14 disabled
007311.655: dtdebug: merge_fragment(/fragment@0/__overlay__/pca@73/aux21,/fragment@15/__overlay__)
007311.673: dtdebug:   +prop(output-high)
007311.802: dtdebug: merge_fragment() end
007313.140: dtdebug: merge_fragment(/fragment@0/__overlay__/pca@73/aux22,/fragment@16/__overlay__)
007313.158: dtdebug:   +prop(output-low)
007313.277: dtdebug: merge_fragment() end
007313.776: dtdebug: fragment 17 disabled
007313.825: dtdebug: fragment 18 disabled
007314.726: dtdebug: merge_fragment(/fragment@0/__overlay__/pca@73/blen1,/fragment@19/__overlay__)
007314.742: dtdebug:   +prop(output-high)
007314.873: dtdebug: merge_fragment() end
007322.478: dtdebug: merge_fragment(/soc/i2c@7e205000,/fragment@0/__overlay__)
007322.494: dtdebug:   +prop(#address-cells)
007323.047: dtdebug:   +prop(#size-cells)
007323.564: dtdebug:   +prop(status)
007326.838: dtdebug: merge_fragment(/soc/i2c@7e205000/pca@73,/fragment@0/__overlay__/pca@73)
007326.855: dtdebug:   +prop(compatible)
007327.355: dtdebug:   +prop(reg)
007327.880: dtdebug:   +prop(gpio-controller)
007328.417: dtdebug:   +prop(#gpio-cells)
007328.959: dtdebug:   +prop(gpio-line-names)
007329.519: dtdebug:   +prop(status)
007330.058: dtdebug:   +prop(phandle)
007333.369: dtdebug: merge_fragment(/soc/i2c@7e205000/pca@73/unused,/fragment@0/__overlay__/pca@73/unused)
007333.384: dtdebug:   +prop(gpio-hog)
007333.954: dtdebug:   +prop(gpios)
007334.504: dtdebug:   +prop(output-low)
007335.082: dtdebug:   +prop(phandle)
007335.613: dtdebug: merge_fragment() end
007338.418: dtdebug: merge_fragment(/soc/i2c@7e205000/pca@73/blen1,/fragment@0/__overlay__/pca@73/blen1)
007338.435: dtdebug:   +prop(output-high)
007339.011: dtdebug:   +prop(gpio-hog)
007339.584: dtdebug:   +prop(gpios)
007340.137: dtdebug:   +prop(phandle)
007340.669: dtdebug: merge_fragment() end
007343.501: dtdebug: merge_fragment(/soc/i2c@7e205000/pca@73/aux12,/fragment@0/__overlay__/pca@73/aux12)
007343.518: dtdebug:   +prop(output-low)
007344.095: dtdebug:   +prop(gpio-hog)
007344.671: dtdebug:   +prop(gpios)
007345.227: dtdebug:   +prop(phandle)
007345.758: dtdebug: merge_fragment() end
007348.617: dtdebug: merge_fragment(/soc/i2c@7e205000/pca@73/aux11,/fragment@0/__overlay__/pca@73/aux11)
007348.632: dtdebug:   +prop(output-high)
007349.216: dtdebug:   +prop(gpio-hog)
007349.794: dtdebug:   +prop(gpios)
007350.360: dtdebug:   +prop(phandle)
007350.892: dtdebug: merge_fragment() end
007353.787: dtdebug: merge_fragment(/soc/i2c@7e205000/pca@73/aux22,/fragment@0/__overlay__/pca@73/aux22)
007353.802: dtdebug:   +prop(output-low)
007354.380: dtdebug:   +prop(gpio-hog)
007354.957: dtdebug:   +prop(gpios)
007355.512: dtdebug:   +prop(phandle)
007356.048: dtdebug: merge_fragment() end
007358.960: dtdebug: merge_fragment(/soc/i2c@7e205000/pca@73/aux21,/fragment@0/__overlay__/pca@73/aux21)
007358.979: dtdebug:   +prop(output-high)
007359.558: dtdebug:   +prop(gpio-hog)
007360.136: dtdebug:   +prop(gpios)
007360.693: dtdebug:   +prop(phandle)
007361.230: dtdebug: merge_fragment() end
007364.169: dtdebug: merge_fragment(/soc/i2c@7e205000/pca@73/blen2,/fragment@0/__overlay__/pca@73/blen2)
007364.186: dtdebug:   +prop(gpio-hog)
007364.765: dtdebug:   +prop(gpios)
007365.322: dtdebug:   +prop(phandle)
007365.855: dtdebug: merge_fragment() end
007365.872: dtdebug: merge_fragment() end
007365.934: dtdebug: merge_fragment() end
007372.926: dtdebug: merge_fragment(/soc/i2c@7e205000,/fragment@1/__overlay__)
007372.942: dtdebug:   +prop(#address-cells)
007373.476: dtdebug:   +prop(#size-cells)
007374.004: dtdebug:   +prop(status)
007377.472: dtdebug: merge_fragment(/soc/i2c@7e205000/pca9632@62,/fragment@1/__overlay__/pca9632@62)
007377.490: dtdebug:   +prop(compatible)
007378.003: dtdebug:   +prop(#address-cells)
007378.519: dtdebug:   +prop(#size-cells)
007379.039: dtdebug:   +prop(reg)
007379.581: dtdebug:   +prop(nxp,inverted-out)
007380.366: dtdebug:   +prop(phandle)
007383.748: dtdebug: merge_fragment(/soc/i2c@7e205000/pca9632@62/bl1@0,/fragment@1/__overlay__/pca9632@62/bl1@0)
007383.763: dtdebug:   +prop(reg)
007384.295: dtdebug:   +prop(function)
007384.846: dtdebug:   +prop(color)
007385.627: dtdebug:   +prop(linux,default-trigger)
007386.243: dtdebug:   +prop(label)
007386.861: dtdebug:   +prop(phandle)
007387.408: dtdebug: merge_fragment() end
007390.301: dtdebug: merge_fragment(/soc/i2c@7e205000/pca9632@62/bl2@1,/fragment@1/__overlay__/pca9632@62/bl2@1)
007390.316: dtdebug:   +prop(reg)
007390.854: dtdebug:   +prop(function)
007391.407: dtdebug:   +prop(color)
007392.190: dtdebug:   +prop(linux,default-trigger)
007392.808: dtdebug:   +prop(label)
007393.428: dtdebug:   +prop(phandle)
007393.977: dtdebug: merge_fragment() end
007396.897: dtdebug: merge_fragment(/soc/i2c@7e205000/pca9632@62/unused2@2,/fragment@1/__overlay__/pca9632@62/unused2@2)
007396.913: dtdebug:   +prop(reg)
007397.452: dtdebug:   +prop(linux,default-trigger)
007398.069: dtdebug:   +prop(phandle)
007398.611: dtdebug: merge_fragment() end
007401.606: dtdebug: merge_fragment(/soc/i2c@7e205000/pca9632@62/unused3@3,/fragment@1/__overlay__/pca9632@62/unused3@3)
007401.620: dtdebug:   +prop(reg)
007402.160: dtdebug:   +prop(linux,default-trigger)
007402.778: dtdebug:   +prop(phandle)
007403.321: dtdebug: merge_fragment() end
007403.338: dtdebug: merge_fragment() end
007403.387: dtdebug: merge_fragment() end
007403.661: dtdebug: merge_fragment(/,/fragment@4/__overlay__)
007410.690: dtdebug: merge_fragment(/backlight1,/fragment@4/__overlay__/backlight1)
007410.706: dtdebug:   +prop(compatible)
007411.479: dtdebug:   +prop(leds)
007412.268: dtdebug:   +prop(brightness-levels)
007413.309: dtdebug:   +prop(default-brightness-level)
007414.355: dtdebug:   +prop(enable-gpios)
007415.411: dtdebug:   +prop(phandle)
007416.224: dtdebug: merge_fragment() end
007423.279: dtdebug: merge_fragment(/backlight2,/fragment@4/__overlay__/backlight2)
007423.294: dtdebug:   +prop(compatible)
007424.068: dtdebug:   +prop(leds)
007424.861: dtdebug:   +prop(brightness-levels)
007425.906: dtdebug:   +prop(default-brightness-level)
007426.955: dtdebug:   +prop(enable-gpios)
007428.011: dtdebug:   +prop(phandle)
007428.825: dtdebug: merge_fragment() end
007436.032: dtdebug: merge_fragment(/panel-lvds1,/fragment@4/__overlay__/panel-lvds1)
007436.049: dtdebug:   +prop(compatible)
007437.845: dtdebug: merge_fragment(/panel-lvds1/ports,/fragment@4/__overlay__/panel-lvds1/ports)
007437.863: dtdebug:   +prop(#address-cells)
007438.640: dtdebug:   +prop(#size-cells)
007440.453: dtdebug: merge_fragment(/panel-lvds1/ports/port@0,/fragment@4/__overlay__/panel-lvds1/ports/port@0)
007440.471: dtdebug:   +prop(reg)
007441.271: dtdebug:   +prop(dual-lvds-odd-pixels)
007443.373: dtdebug: merge_fragment(/panel-lvds1/ports/port@0/endpoint,/fragment@4/__overlay__/panel-lvds1/ports/port@0/endpoint)
007443.392: dtdebug:   +prop(remote-endpoint)
007444.440: dtdebug:   +prop(phandle)
007445.243: dtdebug: merge_fragment() end
007445.258: dtdebug: merge_fragment() end
007446.357: dtdebug: merge_fragment(/panel-lvds1/ports/port@1,/fragment@4/__overlay__/panel-lvds1/ports/port@1)
007446.373: dtdebug:   +prop(reg)
007447.176: dtdebug:   +prop(dual-lvds-even-pixels)
007449.303: dtdebug: merge_fragment(/panel-lvds1/ports/port@1/endpoint,/fragment@4/__overlay__/panel-lvds1/ports/port@1/endpoint)
007449.322: dtdebug:   +prop(remote-endpoint)
007450.388: dtdebug:   +prop(phandle)
007451.195: dtdebug: merge_fragment() end
007451.211: dtdebug: merge_fragment() end
007451.233: dtdebug: merge_fragment() end
007451.270: dtdebug: merge_fragment() end
007451.314: dtdebug: merge_fragment() end
007458.679: dtdebug: merge_fragment(/soc/i2c@7e205000,/fragment@5/__overlay__)
007458.697: dtdebug:   +prop(#gpio-cells)
007459.292: dtdebug:   +prop(#address-cells)
007459.825: dtdebug:   +prop(#size-cells)
007460.366: dtdebug:   +prop(status)
007464.188: dtdebug: merge_fragment(/soc/i2c@7e205000/bridge@2c,/fragment@5/__overlay__/bridge@2c)
007464.206: dtdebug:   +prop(compatible)
007464.727: dtdebug:   +prop(reg)
007465.273: dtdebug:   +prop(enable-gpios)
007469.153: dtdebug: merge_fragment(/soc/i2c@7e205000/bridge@2c/ports,/fragment@5/__overlay__/bridge@2c/ports)
007469.168: dtdebug:   +prop(#address-cells)
007469.694: dtdebug:   +prop(#size-cells)
007473.345: dtdebug: merge_fragment(/soc/i2c@7e205000/bridge@2c/ports/port@0,/fragment@5/__overlay__/bridge@2c/ports/port@0)
007473.363: dtdebug:   +prop(reg)
007477.006: dtdebug: merge_fragment(/soc/i2c@7e205000/bridge@2c/ports/port@0/endpoint,/fragment@5/__overlay__/bridge@2c/ports/port@0/endpoint)
007477.021: dtdebug:   +prop(remote-endpoint)
007477.812: dtdebug:   +prop(data-lanes)
007478.415: dtdebug:   +prop(phandle)
007478.964: dtdebug: merge_fragment() end
007478.980: dtdebug: merge_fragment() end
007482.132: dtdebug: merge_fragment(/soc/i2c@7e205000/bridge@2c/ports/port@1,/fragment@5/__overlay__/bridge@2c/ports/port@1)
007482.149: dtdebug:   +prop(reg)
007485.809: dtdebug: merge_fragment(/soc/i2c@7e205000/bridge@2c/ports/port@1/endpoint,/fragment@5/__overlay__/bridge@2c/ports/port@1/endpoint)
007485.828: dtdebug:   +prop(remote-endpoint)
007486.623: dtdebug:   +prop(data-lanes)
007487.225: dtdebug:   +prop(phandle)
007487.774: dtdebug: merge_fragment() end
007487.791: dtdebug: merge_fragment() end
007490.999: dtdebug: merge_fragment(/soc/i2c@7e205000/bridge@2c/ports/port@2,/fragment@5/__overlay__/bridge@2c/ports/port@2)
007491.018: dtdebug:   +prop(reg)
007494.704: dtdebug: merge_fragment(/soc/i2c@7e205000/bridge@2c/ports/port@2/endpoint,/fragment@5/__overlay__/bridge@2c/ports/port@2/endpoint)
007494.721: dtdebug:   +prop(remote-endpoint)
007495.515: dtdebug:   +prop(phandle)
007496.063: dtdebug: merge_fragment() end
007496.078: dtdebug: merge_fragment() end
007499.320: dtdebug: merge_fragment(/soc/i2c@7e205000/bridge@2c/ports/port@3,/fragment@5/__overlay__/bridge@2c/ports/port@3)
007499.335: dtdebug:   +prop(reg)
007503.041: dtdebug: merge_fragment(/soc/i2c@7e205000/bridge@2c/ports/port@3/endpoint,/fragment@5/__overlay__/bridge@2c/ports/port@3/endpoint)
007503.060: dtdebug:   +prop(remote-endpoint)
007503.858: dtdebug:   +prop(phandle)
007504.406: dtdebug: merge_fragment() end
007504.422: dtdebug: merge_fragment() end
007504.442: dtdebug: merge_fragment() end
007504.503: dtdebug: merge_fragment() end
007504.568: dtdebug: merge_fragment() end
007513.227: dtdebug: merge_fragment(/soc/dsi@7e700000,/fragment@6/__overlay__)
007513.243: dtdebug:   +prop(#address-cells)
007513.728: dtdebug:   +prop(#size-cells)
007514.206: dtdebug:   +prop(status)
007518.218: dtdebug: merge_fragment(/soc/dsi@7e700000/port,/fragment@6/__overlay__/port)
007521.738: dtdebug: merge_fragment(/soc/dsi@7e700000/port/endpoint,/fragment@6/__overlay__/port/endpoint)
007521.756: dtdebug:   +prop(remote-endpoint)
007522.497: dtdebug:   +prop(data-lanes)
007523.043: dtdebug:   +prop(phandle)
007523.536: dtdebug: merge_fragment() end
007523.553: dtdebug: merge_fragment() end
007523.573: dtdebug: merge_fragment() end
007531.897: dtdebug: merge_fragment(/soc/dsi@7e209000,/fragment@7/__overlay__)
007531.913: dtdebug:   +prop(#address-cells)
007532.420: dtdebug:   +prop(#size-cells)
007532.923: dtdebug:   +prop(status)
007536.889: dtdebug: merge_fragment(/soc/dsi@7e209000/port,/fragment@7/__overlay__/port)
007540.345: dtdebug: merge_fragment(/soc/dsi@7e209000/port/endpoint,/fragment@7/__overlay__/port/endpoint)
007540.363: dtdebug:   +prop(remote-endpoint)
007541.127: dtdebug:   +prop(data-lanes)
007541.698: dtdebug:   +prop(phandle)
007542.215: dtdebug: merge_fragment() end
007542.232: dtdebug: merge_fragment() end
007542.250: dtdebug: merge_fragment() end
007542.314: dtdebug: fragment 10 disabled
007542.364: dtdebug: fragment 11 disabled
007542.416: dtdebug: fragment 12 disabled
007542.466: dtdebug: fragment 13 disabled
007542.518: dtdebug: fragment 14 disabled
007542.568: dtdebug: fragment 15 disabled
007542.620: dtdebug: fragment 16 disabled
007542.670: dtdebug: fragment 17 disabled
007542.721: dtdebug: fragment 18 disabled
007542.772: dtdebug: fragment 19 disabled
007552.514: brfs: File read: 7558 bytes
007557.382: brfs: File read: /mfs/sd/cmdline.txt
007557.427: Read command line from file 'cmdline.txt':
007557.441: 'console=tty1 root=PARTUUID=33586970-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles'
007564.517: dtparam: uart1=off
007567.505: dtdebug: found override uart1
007567.531: dtdebug:   override uart1: string target 'status'
008538.000: dtparam: arm_freq=2000000000
008541.004: dtdebug: found override arm_freq
008541.031: dtparam: core_freq=500000000
008544.071: dtdebug: /__overrides__ has no core_freq property
008544.082: Unknown dtparam 'core_freq' - ignored
008556.359: dtdebug: delete_node(/hat)
008560.401: brfs: File read: 143 bytes
009162.274: brfs: File read: /mfs/sd/kernel7l.img
009162.295: Loading 'kernel7l.img' to 0x8000 size 0x675d28
009162.319: Device tree loaded to 0x2eff2c00 (size 0xd306)
009174.410: gpioman: gpioman_get_pin_num: pin SDCARD_CONTROL_POWER not defined
011792.440: vchiq_core: vchiq_init_state: slot_zero = 0xded00000, is_master = 1
pi@raspberrypi:~ $ 

Find my overlay and the driver from the attachment. Driver is a new one for DSI85 only as this allows me to make modifications, still being able to use a working set of driver/overlay when things go wrong.

Any support/idea what to look for is welcome! Also have no idea why the bridge device at address 0x2c is no longer accessible.
Attachments
DSI85drv_overlay.zip
(8.28 KiB) Downloaded 13 times
Last edited by aBUGSworstnightmare on Fri Oct 01, 2021 1:28 pm, edited 1 time in total.

aBUGSworstnightmare
Posts: 3610
Joined: Tue Jun 30, 2015 1:35 pm

Re: Rpi 4 with DRM and 7inch panel using kms driver

Fri Oct 01, 2021 12:55 pm

6by9 wrote:
Fri Oct 01, 2021 12:45 pm
6by9 wrote:
Sat Sep 25, 2021 9:44 am
aBUGSworstnightmare wrote:
Sat Sep 25, 2021 5:33 am
Btw: do you have a later branch than 5.10.44 to work on/test the driver with? 10.44 does not allow for display rotation i.e. (as mentioned earlier in the thread).
Not that will work with SN65DSI8x as the approach is apparently invalid.

The Pi 7" panel is now working fairly happily with touch on rpi-5.10.y.
Next job is to convert it from being an encoder to a bridge (you still keep the encoder as it is exposed to userspace, but it does almost nothing), and we still have to split the bridge chain at the DSI bridge (Exynos does the same thing, so it's a failing of the framework that the driver has to mess around so much). With the current configuration you won't get the mode_valid and mode_fixup calls.
Done and seems to be working reasonably with the 7" panel. I'll give it a quick whirl with your SN65DSI83 board, but I had failed to get that working before (dodgy connections I think).
https://github.com/6by9/linux/tree/rpi-5.10.y-dsi-7inch is the base branch, and https://github.com/6by9/linux/tree/rpi- ... si8x-marek has the SN65DSI83 driver on top.
Will grab that version and give it a try. let me have a picture how you've connected your board.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11813
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Rpi 4 with DRM and 7inch panel using kms driver

Fri Oct 01, 2021 1:38 pm

aBUGSworstnightmare wrote:
Fri Oct 01, 2021 12:55 pm
Will grab that version and give it a try. let me have a picture how you've connected your board.
I must save the defconfig with BACKLIGHT_PWM enabled.

I'm hooking on to the analyser at present, so the actual display connection is less important.
It's complaining that it can't see any valid image frames, but no obvious reason for it as there are H & V sync messages and RGB data embedded. The same is true on 3 or 4 lanes.
I have another panel that is working over 4 lanes, and it's happy with that, so I'll compare the register setup of the two.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Return to “Interfacing (DSI, CSI, I2C, etc.)”