britus Posted October 12, 2020 Share Posted October 12, 2020 Hi everybody! I have been working for days to ensure that the MIPI-DSI output works with the Raspberry PI compatible display panel (Product OSOYOO which has a Toshiba TC358762 DSI/DP bridge chip and a I2C backlight controller as Focal FT5406). The following overlay works perfectly with the Radxa kernel 4.4.153 and unfortunately not with the Armbian kernel: Linux rockpi-4c 5.8.13-rockchip64. So far so good. Now if you look at the DTS source files of the two kernels, they have a similar structure but are very different in content. I wonder why you now get the idea to reinvent the wheel. The Radxa kernel contains everything that is needed. What is particularly annoying is the great idea of calling the names differently in DTS. For example in the Armbian mainline 5.8.13 the DSI resource is called 'mipi_dsi' and in Radxa it is simply called 'dsi'. Such a huge dilemma for a 'no kernel DTS guru'. The challenge now is to pick out every single resource for the DSI and the GPU with their dependencies and to mentally get the 'link' from the Radxa and Armbian versions. Unfortunately, that's beyond my capabilities:) OoO (: ..... The next part is the touchscreen driver 'edt, edt-ft5406'. In the mainline 'rockpi-4c 5.8.13-rockchip64' this requires an IRQ. A fallback to polling mode was not considered! It's easy to do as follows (also @ https://github.com/britus/osoyoo-dsi-display-panel): Quote struct edt_ft5x06_ts_data { .... .... ... u8 irq_capability_enabled; } ... ... /* -- * Fallback function if IRQ is unsupported at the SBC. Polling rate round a about 60 fps */ static void edt_ft5x06_worker_proc(struct work_struct *work) { struct edt_ft5x06_ts_data *tsdata = container_of(work, struct edt_ft5x06_ts_data, worker); while(1) { edt_ft5x06_ts_isr(0, tsdata); msleep_interruptible(17); } } ... ... ... static int edt_ft5x06_ts_probe(struct i2c_client *client, const struct i2c_device_id *id) { .... .... .... /* assume that driver will work with IRQ */ tsdata->irq_capability_enabled = 1; /* probe IRQ capability ... */ error = devm_request_threaded_irq(&client->dev, client->irq, NULL, edt_ft5x06_ts_isr, irq_flags, client->name, tsdata); if (error) { dev_err(&client->dev, "Unable to request touchscreen IRQ. Fallback to worker task with 60fps\n"); /* don't stop here: fallback to worker task - init at end of probe... * return error;*/ tsdata->irq_capability_enabled = 0; } /* At end of probe initiate polling with worker task */ ... /* fallback to scheduled task which polls the controller */ if (!tsdata->irq_capability_enabled) { dev_info(&client->dev, "Note: EDT_FT5x06 touchscreen driver using worker task instead of IRQ!\n"); INIT_WORK(&tsdata->worker, edt_ft5x06_worker_proc); schedule_work(&tsdata->worker); } ___________________________________________. - The boot loader reports: Applying kernel provided DT overlay rockchip-osoyoo-panel.dtbo failed on fdt_overlay_apply(): FDT_ERR_NOTFOUND The original MIPI-DSI overlay, that work on 4.4.x Radxa Kernel /dts-v1/; /plugin/; / { model = "ROCK PI 4C"; compatible = "rockchip,rockpi","rockchip,rk3399"; /* ------------------------------------------------------------------------------ * OSOYOO display using the Focal FT5406 capacitive touch panel controller. * The backlight controller is at I2C address 0x45 * The capacitive touch panel controller is at I2C address 0x38 * Both controller connted to i2c1 port * https://datasheetspdf.com/datasheet/FT5406.html * Note: * The driver 'rockpi_ft5406' must be changed like my fix for the Tinkerboard-S * in the Kernel 4.4.136 * ------------------------------------------------------------------------------ */ fragment@0 { target = <&i2c1>; __overlay__ { rockpi_mcu: rockpi_mcu@45 { compatible ="rockpi_mcu"; status = "okay"; }; rockpi_ft5406: rockpi_ft5406@38 { compatible ="rockpi_ft5406"; status = "okay"; }; }; }; /* ------------------------------------------------------------------------------ * MIPI DSI entry must be enabled for dual channel ? * ------------------------------------------------------------------------------ */ fragment@1 { target = <&dsi>; __overlay__ { status = "ok"; }; }; /* ------------------------------------------------------------------------------ * OSOYOO display using Toshiba TC358762 display * interface bridge chip: * https://www.alldatasheetde.com/datasheet-pdf/pdf/470149/TOSHIBA/TC358762.html * ------------------------------------------------------------------------------ */ fragment@2 { target = <&dsi1>; __overlay__ { rockchip,dual-channel = <&dsi>; status = "okay"; #address-cells = <1>; #size-cells = <0>; panel: panel@0 { compatible ="rockpi,tc358762"; reg = <0>; status = "okay"; }; }; }; /* ------------------------------------------------------------------------------ * Routing * -> no routing defined, therefore disabled * ------------------------------------------------------------------------------ */ fragment@3 { target = <&route_dsi>; __overlay__ { status = "disabled"; }; }; /* ------------------------------------------------------------------------------ * Routing * -> connected to dsi1_in_vopl * ------------------------------------------------------------------------------ */ fragment@4 { target = <&route_dsi1>; __overlay__ { status = "okay"; }; }; /* ------------------------------------------------------------------------------ * VOPB entry * -> NOT connected * ------------------------------------------------------------------------------ */ fragment@5 { target = <&dsi1_in_vopb>; __overlay__ { status = "disabled"; }; }; /* ------------------------------------------------------------------------------ * VOPL entry * -> connected to route_dsi1 * ------------------------------------------------------------------------------ */ fragment@6 { target = <&dsi1_in_vopl>; __overlay__ { status = "okay"; }; }; }; Link to comment Share on other sites More sharing options...
cu6apum Posted November 19, 2020 Share Posted November 19, 2020 I will second this (albeit with another display). Have put a LOT of effort to make it work with 4.4.179 on a nanopc-T4 board, now I'm failing to pull it alive on rk3399-SOM breakout board. Getting crazy!!! Either the panel is dead, or the board hangs on boot. All I did before is put an init script for the panel in a pretty standard piece of DTS taken from orangepi folder. Now - overlays?! How do I?! Please please assist. How to convert previous format to the current. Can post the source. Thank you! Link to comment Share on other sites More sharing options...
Recommended Posts