Hello everybody,
I designed a motherboard with Raspberry Pi CM4 module and an SN65DSI83 to DSI-LVDS bridge converter. I powered up the electronic board and checked that CM4 verified that it sees the SN65DSI83 with address 0x2c on the I2C0 bus at GPIO44/GPIO45 pins (i2cdetect -y 0). So, the electronic components seem to be ok.
Now, I need to prepare the software part on the CM4 and for 64bit OS. So, I read the other threads:
viewtopic.php?t=305690&hilit=Lvds
viewtopic.php?t=366642
The first step is to recompile the kernel and then I read the documentation:
https://www.raspberrypi.com/documentati ... ernel.html
so I followed these steps:At this point, I have to enable the SN65DSI83 module in kernel and I chose these parameter (.config):Note: the other parameters, PWM and EGALAX, are useful for my specific application.
To avoid making mistakes with module dependencies I used:menuconfig prepares the .config file with the modules of interest in "y".
Now I use:Many hours later, reboot.
I create the vc4-kms-dsi-ti-sn65dsi83-10inch-overlay.dts file for my board, which is below:So I compile the dts file in dtbo file:I have a warning but I don't think it's a problem:I copy the dtbo file to /boot/overlays directory.
Now, I edit the /boot/firmware/config.txt and add:Now, the issue is that when I boot up and check with dmesg, I don't see any SN65DSI83 messages.
I noticed that the kernel use a incorrect modules directory, if I write:But the new modules is in 6.6.28-v8+ directory. In fact If I use:I'm doing something wrong, please, could you help me?
Thank you
Regards,
Donatello
I designed a motherboard with Raspberry Pi CM4 module and an SN65DSI83 to DSI-LVDS bridge converter. I powered up the electronic board and checked that CM4 verified that it sees the SN65DSI83 with address 0x2c on the I2C0 bus at GPIO44/GPIO45 pins (i2cdetect -y 0). So, the electronic components seem to be ok.
Now, I need to prepare the software part on the CM4 and for 64bit OS. So, I read the other threads:
viewtopic.php?t=305690&hilit=Lvds
viewtopic.php?t=366642
The first step is to recompile the kernel and then I read the documentation:
https://www.raspberrypi.com/documentati ... ernel.html
so I followed these steps:
Code:
git clone --depth=1 https://github.com/raspberrypi/linuxcd linuxKERNEL=kernel8make bcm2711_defconfig
Code:
CONFIG_BACKLIGHT_PWM=yCONFIG_PWM=yCONFIG_DRM_PANEL_LVDS=yCONFIG_DRM_TI_SN65DSI83=yTOUCHSCREEN_EGALAX=y
To avoid making mistakes with module dependencies I used:
Code:
make menuconfig
Now I use:
Code:
make -j4 Image.gz modules dtbssudo make modules_installsudo cp arch/arm64/boot/dts/broadcom/*.dtb /boot/firmware/sudo cp arch/arm64/boot/dts/overlays/*.dtb* /boot/firmware/overlays/sudo cp arch/arm64/boot/dts/overlays/README /boot/firmware/overlays/sudo cp arch/arm64/boot/Image.gz /boot/firmware/$KERNEL.img
I create the vc4-kms-dsi-ti-sn65dsi83-10inch-overlay.dts file for my board, which is below:
Code:
/* * vc4-kms-dsi-ti-sn65dsi83-somepanel-overlay.dts *//dts-v1/;/plugin/;/ { compatible = "brcm,bcm2835"; /* PWM0 function */ fragment@0 { target = <&gpio>; __overlay__ { pwm_pins: pwm_pins { brcm,pins = <12>; brcm,function = <4>; brcm,pull = <0>; }; }; }; fragment@1 { target = <&pwm>; frag1: __overlay__ { pinctrl-names = "default"; pinctrl-0 = <&pwm_pins>; assigned-clock-rates = <100000000>; status = "okay"; }; }; fragment@2 { target-path = "/"; __overlay__ { //#gpio-cells = <2>; /* Panel backlight through PWM0 on GPIO 12 */ backlight_lvds: backlight { compatible = "pwm-backlight"; pwms = <&pwm 0 5000000 0>; /* Period of 5000000ns means 200Hz */ brightness-levels = <0 1000>; num-interpolated-steps = <1000>; default-brightness-level = <800>; enable-gpios = <&gpio 22 0>; /*Backlight enabled*/ }; panel: panel { compatible = "panel-lvds"; backlight = <&backlight_lvds>; /* Physical dimensions of active area */ width-mm = <193>; height-mm = <344>; data-mapping = "vesa-24"; panel-timing { clock-frequency = <76000000>;hactive = <1366>;hfront-porch = <194>;hsync-len = <48>;hback-porch = <48>;vactive = <768>;vfront-porch = <38>;vsync-len = <6>;vback-porch = <8>; }; port { panel_in_lvds: endpoint { remote-endpoint = <&bridge_out>; }; }; }; }; }; fragment@3 { target = <&i2c0>; __overlay__ { #gpio-cells = <2>; #address-cells = <1>; #size-cells = <0>; status = "okay"; bridge@2c { compatible = "ti,sn65dsi83"; reg = <0x2c>; enable-gpios = <&gpio 22 0>; ports { #address-cells = <1>; #size-cells = <0>; port@0 { reg = <0>; bridge_in: endpoint { remote-endpoint = <&dsi_out_port>; data-lanes = <0 1 2 3>; }; }; port@2 { reg = <2>; bridge_out: endpoint { remote-endpoint = <&panel_in_lvds>; }; }; }; }; }; }; fragment@4 { target = <&dsi1>; __overlay__ { #address-cells = <1>; #size-cells = <0>; status = "okay"; port { dsi_out_port: endpoint { remote-endpoint = <&bridge_in>; data-lanes = <0 1 2 3>; }; }; }; }; fragment@5 { target = <&i2c0if>; __overlay__ { status = "okay"; }; }; fragment@6 { target = <&i2c0mux>; __overlay__ { status = "okay"; }; };};
Code:
dtc -@ -I dts -O dtb vc4-kms-dsi-ti-sn65dsi83-10inch-overlay.dts -o vc4-kms-dsi-ti-sn65dsi83-10inch-overlay.dtbo
Code:
vc4-kms-dsi-ti-sn65dsi83-10inch-overlay.dts:131.21-141.11: Warning (avoid_unnecessary_addr_size): /fragment@4/__overlay__: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property
Now, I edit the /boot/firmware/config.txt and add:
Code:
dtparam=i2c_arm=ondtoverlay=i2c0,pins_44_45=1dtoverlay=vc4-kms-v3ddtoverlay=vc4-kms-dsi-ti-sn65dsi83-10inch-overlay
I noticed that the kernel use a incorrect modules directory, if I write:
Code:
uname -aLinux raspberrypi 6.6.28+rpt-rpi-v8
Code:
grep -r "dsi83" /lib/modulesgrep: /lib/modules/6.6.28-v8+/modules.builtin.modinfo: binary file matchesgrep: /lib/modules/6.6.28-v8+/modules.builtin.bin: binary file matches/lib/modules/6.6.28-v8+/modules.builtin:kernel/drivers/gpu/drm/bridge/ti-sn65dsi83.ko
Thank you
Regards,
Donatello
Statistics: Posted by DonatelloX — Sun Apr 28, 2024 10:56 am