九鼎创展论坛中文版English
登录 | 立即注册 设为首页收藏本站 切换到宽版
查看: 13074|回复: 14

X3399 7.1源码如何适配10.1的屏幕

[复制链接]
发表于 2018-8-21 16:15:49 | 显示全部楼层 |阅读模式
本帖最后由 james.zheng 于 2018-8-21 16:18 编辑

1.X3399 6.0的源码适配
通过修改对应路径下的x3399_marshmallow\kernel\arch\arm64\boot\dts\rockchip  x3399-development-board.dts这个文件

&rk_screen {
        assigned-clocks = <&cru PLL_VPLL>;
        assigned-clock-rates = <245000000>;
        /* #include "lcd-mipi-7inch-wy070ml.dtsi" */
          #include "lcd-edp-ltl101dl03.dtsi"   //这个是10.1的屏
        /* #include "lcd-edp-lp079qx1.dtsi" */
};

//修改触摸10.1的屏
&i2c1 {
        status = "okay";

        /*gsl3680@40 {
        compatible = "tchip,gsl3680";
        reg = <0x40>;
        touch-gpio = <&gpio1 20 IRQ_TYPE_EDGE_RISING>;
        reset-gpio = <&gpio1 9 GPIO_ACTIVE_LOW>;
        max-x = <1024>;
        max-y = <600>;
    };   
    */

    gt9xx: gt9xx@14 {
                compatible = "goodix,gt9xx";     //这个是10.1的屏
                reg = <0x14>;
                touch-gpio = <&gpio1 20 IRQ_TYPE_EDGE_RISING>;
                reset-gpio = <&gpio1 9 GPIO_ACTIVE_LOW>;
                max-x = <2560>;
                max-y = <1600>;
                tp-size = <101>;
        };


        /*
        gsl3673: gsl3673@40 {
                compatible = "GSL,GSL3673";
                reg = <0x40>;
                screen_max_x = <1536>;
                screen_max_y = <2048>;
                irq_gpio_number = <&gpio1 20 IRQ_TYPE_LEVEL_LOW>;
                rst_gpio_number = <&gpio1 9 GPIO_ACTIVE_HIGH>;
        };
        */
};

//查看对应的6.1的源码有这三个文件
C:\Users\mamengyu\Desktop\X3399

而7.0的源码中没有此文件,请帮忙确认下7.0的源码如何适配10.1屏

X3399.png
回复

使用道具 举报

发表于 2018-8-21 16:31:41 | 显示全部楼层
本帖最后由 lxz 于 2018-9-12 15:48 编辑

7.1的系统显示框架发生了变化,现在使用的drm。没有使用你上面提到的那种dtsi文件方式,官方默认代码已经支持10.1寸屏幕了,请查看git提交记录。请参考以下的配置文件:支持edp的x3399-development-board.dts文件。
  1. /*
  2. * Copyright (c) 2016 Fuzhou Rockchip Electronics Co., Ltd
  3. *
  4. * This file is dual-licensed: you can use it either under the terms
  5. * of the GPL or the X11 license, at your option. Note that this dual
  6. * licensing only applies to this file, and not this project as a
  7. * whole.
  8. *
  9. *  a) This file is free software; you can redistribute it and/or
  10. *     modify it under the terms of the GNU General Public License as
  11. *     published by the Free Software Foundation; either version 2 of the
  12. *     License, or (at your option) any later version.
  13. *
  14. *     This file is distributed in the hope that it will be useful,
  15. *     but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17. *     GNU General Public License for more details.
  18. *
  19. * Or, alternatively,
  20. *
  21. *  b) Permission is hereby granted, free of charge, to any person
  22. *     obtaining a copy of this software and associated documentation
  23. *     files (the "Software"), to deal in the Software without
  24. *     restriction, including without limitation the rights to use,
  25. *     copy, modify, merge, publish, distribute, sublicense, and/or
  26. *     sell copies of the Software, and to permit persons to whom the
  27. *     Software is furnished to do so, subject to the following
  28. *     conditions:
  29. *
  30. *     The above copyright notice and this permission notice shall be
  31. *     included in all copies or substantial portions of the Software.
  32. *
  33. *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  34. *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  35. *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  36. *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  37. *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  38. *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  39. *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  40. *     OTHER DEALINGS IN THE SOFTWARE.
  41. */

  42. /dts-v1/;

  43. #include <dt-bindings/input/input.h>
  44. #include "x3399-baseboard.dtsi"
  45. #include "rk3399-android.dtsi"
  46. #include "rk3399-vop-clk-set.dtsi"

  47. / {
  48.         model = "9tripod RK3399 Development Board";
  49.         compatible = "rockchip,android", "9tripod,x3399-development-board", "rockchip,rk3399";

  50.         edp_panel: edp-panel {
  51.                 compatible = "samsung,ltl101dl03", "panel-simple";
  52.                 backlight = <&backlight>;
  53.                 power-supply = <&vcc3v3_s0>;
  54.                 enable-gpios = <&gpio4 30 GPIO_ACTIVE_HIGH>;

  55.                 ports {
  56.                         panel_in_edp: endpoint {
  57.                                 remote-endpoint = <&edp_out_panel>;
  58.                         };
  59.                 };
  60.         };


  61.         test-power {
  62.                 status = "okay";
  63.         };

  64.         rt5651 {
  65.                 status = "okay";
  66.         };
  67. };

  68. &backlight {
  69.         status = "okay";
  70. };


  71. &edp {
  72.         status = "okay";

  73.         ports {
  74.                 edp_out: port@1 {
  75.                         reg = <1>;
  76.                         #address-cells = <1>;
  77.                         #size-cells = <0>;

  78.                         edp_out_panel: endpoint@0 {
  79.                                 reg = <0>;
  80.                                 remote-endpoint = <&panel_in_edp>;
  81.                         };
  82.                 };
  83.         };
  84. };



  85. &edp_in_vopl {
  86.         status = "disabled";
  87. };



  88. &route_edp {
  89.         status = "okay";
  90. };

  91. /*
  92. &mipi_dsi {
  93.         status = "okay";
  94.         panel {
  95.                 compatible ="simple-panel-dsi";
  96.                 reg = <0>;
  97.                 backlight = <&backlight>;
  98.                 enable-gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>;
  99.                 dsi,flags = <(MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
  100.                                 MIPI_DSI_MODE_VIDEO_SYNC_PULSE)>;
  101.                 dsi,format = <MIPI_DSI_FMT_RGB888>;
  102.                 dsi,lanes = <4>;
  103.                 status = "okay";

  104.                 display-timings {
  105.                         native-mode = <&timing0>;
  106.                         timing0: timing0 {
  107.                                 clock-frequency = <70000000>;
  108.                                 hactive = <1024>;
  109.                                 vactive = <600>;
  110.                                 hback-porch = <80>;
  111.                                 hfront-porch = <80>;
  112.                                 vback-porch = <20>;
  113.                                 vfront-porch = <12>;
  114.                                 hsync-len = <2>;
  115.                                 vsync-len = <3>;
  116.                                 hsync-active = <0>;
  117.                                 vsync-active = <0>;
  118.                                 de-active = <0>;
  119.                                 pixelclk-active = <0>;
  120.                         };
  121.                 };
  122.         };
  123. };

  124. &mipi_in_vopl {
  125.         status = "disabled";
  126. };

  127. &route_mipi {
  128.         status = "okay";
  129. };
  130. */
  131. &cdn_dp {
  132.         status = "okay";
  133.         extcon = <&fusb0>;
  134.         phys = <&tcphy0_dp>;
  135. };

  136. &dp_in_vopb {
  137.         status = "okay";
  138. };

  139. &hdmi {
  140.         status = "okay";
  141. };

  142. &hdmi_in_vopb {
  143.         status = "disabled";
  144. };

  145. &hdmi_sound {
  146.         status = "okay";
  147. };

  148. &i2s2 {
  149.         status = "okay";
  150. };

  151. &i2c1 {
  152.         status = "okay";

  153.         gt9xx: gt9xx@14 {
  154.                 compatible = "goodix,gt9xx";
  155.                 reg = <0x14>;
  156.                 touch-gpio = <&gpio1 20 IRQ_TYPE_EDGE_RISING>;
  157.                 reset-gpio = <&gpio1 9 GPIO_ACTIVE_LOW>;
  158.                 max-x = <2560>;
  159.                 max-y = <1600>;
  160.                 tp-size = <101>;
  161.         };

  162. /*
  163.         gslx680@40 {
  164.         compatible = "9tripod,gslx680";
  165.         reg = <0x40>;
  166.         touch-gpio = <&gpio1 20 IRQ_TYPE_EDGE_RISING>;
  167.         reset-gpio = <&gpio1 9 GPIO_ACTIVE_LOW>;
  168.         max-x = <1024>;
  169.         max-y = <600>; */
  170.     };
  171. };

  172. &pwm3 {
  173.         status = "okay";
  174.         interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH 0>;
  175.         compatible = "rockchip,remotectl-pwm";
  176.         remote_pwm_id = <3>;
  177.         handle_cpu_id = <0>;

  178.         ir_key0 {
  179.                 rockchip,usercode = <0xff40>;
  180.                 rockchip,key_table =
  181.                         <0xb2        KEY_POWER>,
  182.                         <0xe5        KEY_HOME>,
  183.                         <0xbd        KEY_BACK>,
  184.                         <0xba        KEY_MENU>,
  185.                         <0xf4        KEY_UP>,
  186.                         <0xf1        KEY_DOWN>,
  187.                         <0xef        KEY_LEFT>,
  188.                         <0xee        KEY_RIGHT>,
  189.                         <0xf2        KEY_ENTER>,
  190.                         <0xf0        KEY_REPLY>,
  191.                         <0xea        KEY_VOLUMEUP>,
  192.                         <0xe3        KEY_VOLUMEDOWN>,
  193.                         <0xbc        KEY_MUTE>,
  194.                         <0xfe        KEY_1>,
  195.                         <0xfd        KEY_2>,
  196.                         <0xfc        KEY_3>,
  197.                         <0xfb        KEY_4>,
  198.                         <0xfa        KEY_5>,
  199.                         <0xf9        KEY_6>,
  200.                         <0xf8        KEY_7>,
  201.                         <0xf7        KEY_8>,
  202.                         <0xb6        KEY_9>,
  203.                         <0xff        KEY_0>,
  204.                         <0xed        KEY_BACKSPACE>,

  205.                         <0xaf        KEY_POWER>,
  206.                         <0x8b        KEY_VOLUMEUP>,
  207.                         <0xb9        KEY_VOLUMEDOWN>;
  208.         };
  209. };

  210. &vopb {
  211.         assigned-clocks = <&cru DCLK_VOP0_DIV>;
  212.         assigned-clock-parents = <&cru PLL_CPLL>;
  213. };

  214. &vopl {
  215.         assigned-clocks = <&cru DCLK_VOP1_DIV>;
  216.         assigned-clock-parents = <&cru PLL_VPLL>;
  217. };

  218. &isp0 {
  219.         status = "okay";
  220. };

  221. &isp1 {
  222.         status = "okay";
  223. };

  224. &isp0_mmu {
  225.         status = "okay";
  226. };

  227. &isp1_mmu {
  228.         status = "okay";
  229. };

  230. &pinctrl {
  231.         lcd-panel {
  232.                 lcd_panel_reset: lcd-panel-reset {
  233.                         rockchip,pins = <4 30 RK_FUNC_GPIO &pcfg_pull_up>;
  234.                 };
  235.         };
  236. };
复制代码



回复 支持 反对

使用道具 举报

 楼主| 发表于 2018-8-21 16:37:59 | 显示全部楼层
git 提交记录太多,能否提供具体的commit id,方便查看修改,感谢~
回复 支持 反对

使用道具 举报

发表于 2018-8-21 16:52:45 | 显示全部楼层
id为67f4e348267480927c5fed5aa5ecb067891b55d9
回复 支持 反对

使用道具 举报

 楼主| 发表于 2018-8-21 17:56:30 | 显示全部楼层
目前按照你的解释,烧录7.0的镜像,屏幕有背光,但点不亮。6.0的之前没有修改屏幕适配和此现象一样,适配后就可以正常使用,请问贵司这边自己有烧录7.0的镜像,看是否10.1的屏幕可以正常使用了?
谢谢~
回复 支持 反对

使用道具 举报

 楼主| 发表于 2018-8-21 18:05:06 | 显示全部楼层
git show 找不到见你发我的commit id
X3399-1.png
回复 支持 反对

使用道具 举报

发表于 2018-8-23 11:34:59 | 显示全部楼层
请参考我们修改的补丁链接: https://pan.baidu.com/s/1EN1bWQqYY91pxlp2OggSKA 密码: 28wb
回复 支持 反对

使用道具 举报

发表于 2018-8-23 14:08:02 | 显示全部楼层

没有找到这个ID ,你找到了么
回复 支持 反对

使用道具 举报

发表于 2018-8-27 09:46:00 | 显示全部楼层
lxz 发表于 2018-8-23 11:34
请参考我们修改的补丁链接: https://pan.baidu.com/s/1EN1bWQqYY91pxlp2OggSKA 密码: 28wb

网盘上周用安卓7,1的源码编译,打上您在论坛里给的10.1.patch补丁发现屏幕只有背光,没有画面显示。我按照补丁里面给的信息依次查看了4个修改过的文件,发现都已经被修改成功。请问这是什么情况呢,是不是这个补丁有问题呢
回复 支持 反对

使用道具 举报

发表于 2018-8-27 17:29:34 | 显示全部楼层
楼主成功了吗,我打上之后只有背光,您这边怎么弄得
回复 支持 反对

使用道具 举报

发表于 2018-8-29 18:13:04 | 显示全部楼层
和楼主的问题一致,补丁没有解决问题
回复 支持 反对

使用道具 举报

 楼主| 发表于 2018-9-4 16:44:38 | 显示全部楼层
按照patch,不能解决此问题,请贵司帮忙再次check下,谢谢
回复 支持 反对

使用道具 举报

发表于 2018-9-12 14:47:58 | 显示全部楼层
X3399 7.1源码如何适配10.1的屏幕   这个问题有没有大神解决了
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|小黑屋|深圳市九鼎创展科技官方论坛 ( 粤ICP备11028681号-2  

GMT+8, 2024-3-29 15:05 , Processed in 0.024515 second(s), 20 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表