DeviceTree Overlay schlägt fehl

Gast #6109758
Lesenswert?

Hallo zusammen

Folgendes Problem.
Ich möchte hier ein DeviceTree Overlay erstellen.
Kompilieren und laden klappt schonmal. Jedoch gibts dann Fehlermeldungen 
und der Kernel kann nicht starten.

System: Tinkerboard-s rk3288 Chip Kernel 4.4.199

Hier der ursprüngliche, unveränderte DeviceTree:
1
 dsi@ff960000 {
2
                reg = <0x0 0xff960000 0x0 0x4000>;
3
                interrupts = <0x0 0x13 0x4>;
4
                compatible = "rockchip,rk3288-mipi-dsi", "snps,dw-mipi-dsi";
5
                clock-names = "ref", "pclk";
6
                reset-names = "apb";
7
                clocks = <0x7 0x7e 0x7 0x164>;
8
                power-domains = <0x72 0x9>;
9
                resets = <0x7 0x73>;
10
                status = "okay";
11
                #address-cells = <0x1>;
12
                phandle = <0xe9>;
13
                #size-cells = <0x0>;
14
                rockchip,grf = <0x47>;
15

16
                ports {
17
                        #address-cells = <0x1>;
18
                        #size-cells = <0x0>;
19

20
                        port {
21
                                #address-cells = <0x1>;
22
                                phandle = <0xea>;
23
                                #size-cells = <0x0>;
24

25
                                endpoint@0 {
26
                                        reg = <0x0>;
27
                                        remote-endpoint = <0x89>;
28
                                        phandle = <0x81>;
29
                                };
30

31
                                endpoint@1 {
32
                                        reg = <0x1>;
33
                                        remote-endpoint = <0x8a>;
34
                                        phandle = <0x86>;
35
                                };
36
                        };
37
                };
38

39
                mipi-panel {
40
                        reg = <0x0>;
41
                        compatible = "asus,tc358762";
42
                        status = "okay";
43
                        phandle = <0xeb>;
44
                };
45
        };
46

47
dsi@ff964000 {
48
                reg = <0x0 0xff964000 0x0 0x4000>;
49
                interrupts = <0x0 0x14 0x4>;
50
                compatible = "rockchip,rk3288-mipi-dsi", "snps,dw-mipi-dsi";
51
                clock-names = "ref", "pclk";
52
                reset-names = "apb";
53
                clocks = <0x7 0x7e 0x7 0x165>;
54
                power-domains = <0x72 0x9>;
55
                resets = <0x7 0x74>;
56
                status = "disabled";
57
                #address-cells = <0x1>;
58
                phandle = <0xec>;
59
                #size-cells = <0x0>;
60
                rockchip,grf = <0x47>;
61

62
                ports {
63
                        #address-cells = <0x1>;
64
                        #size-cells = <0x0>;
65

66
                        port {
67
                                #address-cells = <0x1>;
68
                                phandle = <0xed>;
69
                                #size-cells = <0x0>;
70

71
                                endpoint@0 {
72
                                        reg = <0x0>;
73
                                        remote-endpoint = <0x8b>;
74
                                        phandle = <0x83>;
75
 };
76

77
                                endpoint@1 {
78
                                        reg = <0x1>;
79
                                        remote-endpoint = <0x8c>;
80
                                        phandle = <0x88>;
81
                                };
82
                        };
83
                };
84
        };
85

86

87
....
88

89
 aliases {
90
                i2c0 = "/i2c@ff650000";
91
                i2c1 = "/i2c@ff140000";
92
                i2c2 = "/i2c@ff660000";
93
                i2c3 = "/i2c@ff150000";
94
                i2c4 = "/i2c@ff160000";
95
                i2c5 = "/i2c@ff170000";
96
                dsi0 = "/dsi@ff960000";
97
                dsi1 = "/dsi@ff964000";
98
                spi0 = "/spi@ff110000";
99
                spi1 = "/spi@ff120000";
100
                spi2 = "/spi@ff130000";
101
                mshc0 = "/dwmmc@ff0f0000";
102
                mshc1 = "/dwmmc@ff0c0000";
103
                mshc2 = "/dwmmc@ff0d0000";
104
                mshc3 = "/dwmmc@ff0e0000";
105
                serial0 = "/serial@ff180000";
106
                serial1 = "/serial@ff190000";
107
                serial2 = "/serial@ff690000";
108
                serial3 = "/serial@ff1b0000";
109
                serial4 = "/serial@ff1c0000";
110
                testcase-alias = "/testcase-data";
111
                ethernet0 = "/ethernet@ff290000";
112
        };

Nun möchte ich an dsi0 ein anderes Panel hängen. Dazu habe ich folgendes 
versucht:

1
/dts-v1/;
2
/plugin/;
3

4
/ {
5
    compatible = "rockchip,rk3288-miniarm", "rockchip,rk3288";
6

7
    fragment@0 {
8
        target = <&dsi0> ;
9
        __overlay__ {
10
            status = "okay";
11
            dsi_panel:panel 
12
            {
13
                compatible = "simple-panel-dsi";
14
                reg = <0> ;
15
                //backlight = < & backlight > ;
16
                //dsi,flags = <(MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST)>;
17
                //dsi,format = <MIPI_DSI_FMT_RGB888>;
18
                //bus-format = <MEDIA_BUS_FMT_RGB666_1X18>;
19
                dsi,lanes = <2> ;
20
                status = "okay";
21
                panel-init-sequence = [
22
                    05 20 01 29
23
                    05 96 01 11
24
                ];
25
                panel-exit-sequence = [
26
                    05 05 01 28
27
                    05 78 01 10
28
                ];
29
                disp_timings: display-timings 
30
                {
31
                    native-mode = <&timing0> ;
32
                    timing0:timing0 
33
                    {
34
                        clock-frequency = <64000000> ;
35
                        hactive = <768> ;
36
                        vactive = <1024> ;
37
                        hsync-len = <5> ; //20, 50
38
                        hback-porch = <25> ; //50, 56
39
                        hfront-porch = <150> ; //50, 30
40
                        vsync-len = <1> ;
41
                        vback-porch = <15> ;
42
                        vfront-porch = <100> ;
43
                        hsync-active = <0> ;
44
                        vsync-active = <0> ;
45
                        de-active = <0> ;
46
                        pixelclk-active = <0> ;
47
                    };
48
                };
49
            };
50
        };

Leider erzeugt dieses Overlay beim Laden folgenden Fehlermeldungen:
1
[    0.000000] L2C: failed to init: -19
2
[    0.000000] rockchip_clk_register_branches: unknown clock type 9
3
[    1.506512] vcc_sd: regulator get failed, ret=-517
4
[    1.506917] vcc_flash: regulator get failed, ret=-517
5
[    2.185904] rk-vcodec ff9a0000.vpu-service: no regulator for vcodec
6
[    2.187620] rk-vcodec ff9a0000.vpu-service: could not find power_model node
7
[    2.188089] rk-vcodec ff9c0000.hevc-service: no regulator for vcodec
8
[    2.189531] rk-vcodec ff9c0000.hevc-service: could not find power_model node
9
[    2.276168] rockchip-spi ff130000.spi: no high_speed pinctrl state
10
[    2.288235] rk_gmac-dwmac ff290000.ethernet: phy regulator is not available yet, deferred probing
11
[    2.300406] Rockchip WiFi SYS interface (V1.00) ...
12
[    2.307694] ff540000.usb supply vusb_d not found, using dummy regulator
13
[    2.315123] ff540000.usb supply vusb_a not found, using dummy regulator
14
[    2.436886] ff580000.usb supply vusb_d not found, using dummy regulator
15
[    2.444329] ff580000.usb supply vusb_a not found, using dummy regulator
16
[    2.451950] dwc2 ff580000.usb: dwc2_core_reset() HANG! Soft Reset GRSTCTL=80000001
17
[    2.571761] dwc2 ff580000.usb: dwc2_wait_for_mode: Couldn't set device mode
18
[    2.849156] tinker-mcu: send_cmds: send command failed, ret = -6
19
[    2.855855] tinker-mcu: tinker_mcu_probe: init_cmd_check failed, -6
20
[    2.872950] rockchip-sy-mipi-dphy ff770000.syscon:mipi-phy-rx0: invalid resource
21
[    2.885551] rk_tsadcv2_temp_to_code: Invalid conversion table: code=4095, temperature=2147483647
22
[    2.911600] rockchip_cpuclk_pre_rate_change: Invalid rate : 500000000 for cpuclk
23
[    2.993716] ff960000.dsi.0 supply power not found, using dummy regulator
24
[    3.001247] dw-mipi-dsi ff960000.dsi: device mode is unsupported
25
[    3.007974] panel-simple-dsi: probe of ff960000.dsi.0 failed with error -22
26
[    3.015736] ------------[ cut here ]------------
27
[    3.020867] WARNING: CPU: 0 PID: 1 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x78/0x88()
28
[    3.029247] sysfs: cannot create duplicate filename '/devices/platform/ff960000.dsi/ff960000.dsi.0'
29
[    3.039257] Modules linked in:
30
[    3.042640] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.4.199-rockchip #37
31
[    3.050238] Hardware name: Rockchip (Device Tree)
32
[    3.055453] [<c011126c>] (unwind_backtrace) from [<c010cb54>] (show_stack+0x20/0x24)
33
[    3.064033] [<c010cb54>] (show_stack) from [<c06298fc>] (dump_stack+0x90/0xa4)
34
[    3.072035] [<c06298fc>] (dump_stack) from [<c01207f4>] (warn_slowpath_common+0x94/0xc4)
35
[    3.080995] [<c01207f4>] (warn_slowpath_common) from [<c0120864>] (warn_slowpath_fmt+0x40/0x48)
36
[    3.090628] [<c0120864>] (warn_slowpath_fmt) from [<c02df158>] (sysfs_warn_dup+0x78/0x88)
37
[    3.099685] [<c02df158>] (sysfs_warn_dup) from [<c02df250>] (sysfs_create_dir_ns+0x94/0xa0)
38
[    3.108935] [<c02df250>] (sysfs_create_dir_ns) from [<c062c328>] (kobject_add_internal+0xa4/0x2d4)
39
[    3.118856] [<c062c328>] (kobject_add_internal) from [<c062c5ac>] (kobject_add+0x54/0x9c)
40
[    3.127914] [<c062c5ac>] (kobject_add) from [<c0758744>] (device_add+0x100/0x5b0)
41
[    3.136203] [<c0758744>] (device_add) from [<c0726cb0>] (mipi_dsi_host_register+0x100/0x1dc)
42
[    3.145550] [<c0726cb0>] (mipi_dsi_host_register) from [<c0a331dc>] (dw_mipi_dsi_probe+0x80/0xc8)
43
[    3.155376] [<c0a331dc>] (dw_mipi_dsi_probe) from [<c075d740>] (platform_drv_probe+0x60/0xbc)
44
[    3.164817] [<c075d740>] (platform_drv_probe) from [<c075b938>] (driver_probe_device+0x1f4/0x2e8)
45
[    3.174644] [<c075b938>] (driver_probe_device) from [<c075bac0>] (__driver_attach+0x94/0x98)
46
[    3.183987] [<c075bac0>] (__driver_attach) from [<c0759a08>] (bus_for_each_dev+0x5c/0xac)
47
[    3.193044] [<c0759a08>] (bus_for_each_dev) from [<c075b1d0>] (driver_attach+0x2c/0x30)
48
[    3.201908] [<c075b1d0>] (driver_attach) from [<c075adc4>] (bus_add_driver+0x19c/0x220)
49
[    3.210771] [<c075adc4>] (bus_add_driver) from [<c075c514>] (driver_register+0x88/0x104)
50
[    3.219729] [<c075c514>] (driver_register) from [<c075d688>] (__platform_driver_register+0x50/0x58)
51
[    3.229747] [<c075d688>] (__platform_driver_register) from [<c124bd3c>] (dw_mipi_dsi_driver_init+0x1c/0x20)
52
[    3.240535] [<c124bd3c>] (dw_mipi_dsi_driver_init) from [<c0101b0c>] (do_one_initcall+0xa0/0x1f0)
53
[    3.250362] [<c0101b0c>] (do_one_initcall) from [<c1200fbc>] (kernel_init_freeable+0x1e8/0x28c)
54
[    3.259997] [<c1200fbc>] (kernel_init_freeable) from [<c0d3eb98>] (kernel_init+0x18/0x118)
55
[    3.269152] [<c0d3eb98>] (kernel_init) from [<c0108110>] (ret_from_fork+0x14/0x24)
56
[    3.277578] ---[ end trace 8535bac3d55643c8 ]---
57
[    3.282712] kobject_add_internal failed for ff960000.dsi.0 with -EEXIST, don't try to register things with the same name in the same directory.
58
[    3.296969] dw-mipi-dsi ff960000.dsi: failed to add DSI device /dsi@ff960000/mipi-panel: -17
59
[    3.308501] rockchip-drm display-subsystem: failed to bind ff960000.dsi (ops 0xc0ec512c): -517
60
[    3.756271] usb 3-1: config 1 has an invalid interface number: 255 but max is 6
61
[    3.764558] usb 3-1: config 1 has no interface number 6
62
[    3.882013] tinker-ft5406: tinker_ft5406_probe: wait connected timeout
63
[    3.889355] [board_info] create Board_info_proc_file sucessed!
64
[    3.895958] project_id_2:0x0, project_id_1:0x0, project_id_0:0x0
65
[    3.902782] ram_id_2:0x0, ram_id_1:0x1, ram_id_0:0x0
66
[    3.908443] pcb_id_2:0x0, pcb_id_1:0x1, pcb_id_0:0x0
67
[    6.079881] rk_gmac-dwmac ff290000.ethernet: cannot get clock clk_mac_speed
68
[    6.199189] ff960000.dsi.0 supply power not found, using dummy regulator
69
[    6.210087] dw-mipi-dsi ff960000.dsi: device mode is unsupported
70
[    6.216907] panel-simple-dsi: probe of ff960000.dsi.0 failed with error -22
71
[    6.224765] ------------[ cut here ]------------
72
[    6.229957] WARNING: CPU: 1 PID: 102 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x78/0x88()
73
[    6.238598] sysfs: cannot create duplicate filename '/devices/platform/ff960000.dsi/ff960000.dsi.0'
74
[    6.248675] Modules linked in:
75
[    6.252113] CPU: 1 PID: 102 Comm: kworker/u8:1 Tainted: G        W       4.4.199-rockchip #37
76
[    6.261588] Hardware name: Rockchip (Device Tree)
77
[    6.266828] Workqueue: deferwq deferred_probe_work_func
78
[    6.272654] [<c011126c>] (unwind_backtrace) from [<c010cb54>] (show_stack+0x20/0x24)
79
[    6.281279] [<c010cb54>] (show_stack) from [<c06298fc>] (dump_stack+0x90/0xa4)
80
[    6.289326] [<c06298fc>] (dump_stack) from [<c01207f4>] (warn_slowpath_common+0x94/0xc4)
81
[    6.298332] [<c01207f4>] (warn_slowpath_common) from [<c0120864>] (warn_slowpath_fmt+0x40/0x48)
82
[    6.308014] [<c0120864>] (warn_slowpath_fmt) from [<c02df158>] (sysfs_warn_dup+0x78/0x88)
83
[    6.317119] [<c02df158>] (sysfs_warn_dup) from [<c02df250>] (sysfs_create_dir_ns+0x94/0xa0)
84
[    6.326401] [<c02df250>] (sysfs_create_dir_ns) from [<c062c328>] (kobject_add_internal+0xa4/0x2d4)
85
[    6.336315] [<c062c328>] (kobject_add_internal) from [<c062c5ac>] (kobject_add+0x54/0x9c)
86
[    6.345364] [<c062c5ac>] (kobject_add) from [<c0758744>] (device_add+0x100/0x5b0)
87
[    6.353646] [<c0758744>] (device_add) from [<c0726cb0>] (mipi_dsi_host_register+0x100/0x1dc)
88
[    6.362985] [<c0726cb0>] (mipi_dsi_host_register) from [<c0a331dc>] (dw_mipi_dsi_probe+0x80/0xc8)
89
[    6.372802] [<c0a331dc>] (dw_mipi_dsi_probe) from [<c075d740>] (platform_drv_probe+0x60/0xbc)
90
[    6.382236] [<c075d740>] (platform_drv_probe) from [<c075b938>] (driver_probe_device+0x1f4/0x2e8)
91
[    6.392055] [<c075b938>] (driver_probe_device) from [<c075bb7c>] (__device_attach_driver+0xb8/0xc4)
92
[    6.402065] [<c075bb7c>] (__device_attach_driver) from [<c0759ad8>] (bus_for_each_drv+0x54/0xa4)
93
[    6.411786] [<c0759ad8>] (bus_for_each_drv) from [<c075b668>] (__device_attach+0x9c/0x124)
94
[    6.420929] [<c075b668>] (__device_attach) from [<c075bbe4>] (device_initial_probe+0x1c/0x20)
95
[    6.430357] [<c075bbe4>] (device_initial_probe) from [<c075ab00>] (bus_probe_device+0x94/0x9c)
96
[    6.439883] [<c075ab00>] (bus_probe_device) from [<c075af6c>] (deferred_probe_work_func+0x74/0xa0)
97
[    6.449794] [<c075af6c>] (deferred_probe_work_func) from [<c0139d00>] (process_one_work+0x1f8/0x508)
98
[    6.459895] [<c0139d00>] (process_one_work) from [<c013ad64>] (worker_thread+0x68/0x558)
99
[    6.468845] [<c013ad64>] (worker_thread) from [<c01403f0>] (kthread+0x118/0x120)
100
[    6.477027] [<c01403f0>] (kthread) from [<c0108110>] (ret_from_fork+0x14/0x24)

Nun fällt mir besonders diese hier auf:
1
[    3.001247] dw-mipi-dsi ff960000.dsi: device mode is unsupported
2
[    3.007974] panel-simple-dsi: probe of ff960000.dsi.0 failed with error -22


Kann es nun sein, dass nur aufgrund des unsupporteten Modus das ganze 
hängt?

Bin über jegliche Vorschläge dankbar. Denn aktuell komme ich nicht mehr 
weiter.

Grüsse
Holger
#6110116
Lesenswert?

So, ich konnte nun die Fehlermeldung beheben indem ich den Mode 
entsprechend definiert habe:
1
dsi,flags = <7>;
2
dsi,format = <0>;

Nachgeschaut hab ich die Werte hier:
https://elixir.bootlin.com/linux/latest/source/include/drm/drm_mipi_dsi.h#L113


Nun erhalte ich die vorigen Fehlermeldungen nicht mehr.
Die erwähnte Meldung
1
sysfs: cannot create duplicate filename '/devices/platform/ff960000.dsi/ff960000.dsi.0'
2
.....
3
[    3.267737] kobject_add_internal failed for ff960000.dsi.0 with -EEXIST, don't try to register things with the same name in the same directory.
4
[    3.281974] dw-mipi-dsi ff960000.dsi: failed to add DSI device /dsi@ff960000/mipi-panel: -17

bleibt jedoch bestehen.
Muss ich hier am DeviceTreeOverlay etwas ändern?

Danke
#6110157
Lesenswert?

So.. Bin nun wieder etwas weiter.

Ich musste anstelle des alias (dsi0) den Pfad verwenden. Und das 
plugin entfernen.

Gleichzeitig musste ich noch den alten mipi-panel eintrag disablen.

So siehst nun aus:
1
/dts-v1/;
2
/ {
3
    compatible = "rockchip,rk3288-miniarm", "rockchip,rk3288";
4

5
    fragment@0 {
6
                target-path = "/dsi@ff960000/mipi-panel";
7
                __overlay__{
8
                        status = "disabled";
9
                };
10

11
        };
12

13
        fragment@1 {
14
        target-path = "/dsi@ff960000" ;
15
        __overlay__ {
16
            status = "okay";
17
            dsi_panel:panel 
18
            {
19
                compatible = "simple-panel-dsi";
20
                reg = <0> ;
21
                //backlight = < & backlight > ;
22
                dsi,flags = <0x7>;
23
                dsi,format = <0x0>;
24
                //bus-format = <MEDIA_BUS_FMT_RGB666_1X18>;
25
                dsi,lanes = <2> ;
26
                status = "okay";
27
                panel-init-sequence = [
28
                    05 20 01 29
29
                    05 96 01 11
30
                ];
31
                panel-exit-sequence = [
32
                    05 05 01 28
33
                    05 78 01 10
34
                ];
35
                disp_timings: display-timings 
36
                {
37
                    native-mode = <&timing0> ;
38
                    timing0:timing0 
39
                    {
40
                        clock-frequency = <64000000> ;
41
                        hactive = <768> ;
42
                        vactive = <1024> ;
43
                        hsync-len = <5> ; //20, 50
44
                        hback-porch = <25> ; //50, 56
45
                        hfront-porch = <150> ; //50, 30
46
                        vsync-len = <1> ;
47
                        vback-porch = <15> ;
48
                        vfront-porch = <100> ;
49
                        hsync-active = <0> ;
50
                        vsync-active = <0> ;
51
                        de-active = <0> ;
52
                        pixelclk-active = <0> ;
53
                    };
54
                };
55
            };
56
        };

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren