Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    A133 board.dts中触摸IC中twi配置i2c地址的问题

    其它全志芯片讨论区
    2
    8
    368
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      ceoifung LV 4 last edited by

      A133芯片移植触摸驱动芯片,有个twi配置

      ctp {
      	compatible = "allwinner,gt9xxnew_ts";
      	reg = <0x5d>;
      	device_type = "ctp";
      	status = "okay";
      	ctp_name = "gt9xxnew_ts";
      	ctp_twi_id = <0x1>;
      	ctp_twi_addr = <0x40>;
      	ctp_screen_max_x = <720>;
      	ctp_screen_max_y = <1280>;
      	ctp_revert_x_flag = <0>;
      	ctp_revert_y_flag = <0>;
      
      	ctp_exchange_x_y_flag = <0x0>;
      	ctp_int_port = <&pio PH 19 6 0xffffffff 0xffffffff 0>;
      	ctp_wakeup = <&pio PD 22 1 0xffffffff 0xffffffff 1>; 
      	ctp-supply;
      	ctp_power_ldo_vol = <3300>;
      };
      

      里面的reg和ctp_twi_addr是代表什么意思呀,我的触摸驱动IC的i2c地址应该填在reg还是ctp_twi_addr呀

      C 1 Reply Last reply Reply Quote Share 0
      • C
        chengwei_peng LV 6 @ceoifung last edited by

        @ceoifung 在 A133 board.dts中触摸IC中twi配置i2c地址的问题 中说:

        ctp_twi_addr

        ctp_twi_addr,reg好像是没有用的,具体可以看看驱动。

        C 1 Reply Last reply Reply Quote Share 0
        • C
          ceoifung LV 4 @chengwei_peng last edited by

          @chengwei_peng 我看到A133默认支持了FTX5x系列驱动的支持,我的驱动芯片属于atm_mxt_ts的,移植的时候,也是在这里配置是吧,只不过是一些ctp的配置没有我删减掉就好了是吗

          C 1 Reply Last reply Reply Quote Share 0
          • C
            chengwei_peng LV 6 @ceoifung last edited by

            @ceoifung 是的,只需要修改一下名字,用哪个I2C,I2C设备的地址是多少,哪些IO

            C 1 Reply Last reply Reply Quote Share 0
            • C
              ceoifung LV 4 @chengwei_peng last edited by

              @chengwei_peng 触摸驱动需要在设备树上面注册reset-gpios,查看了一下Linux设备树的reset-gpios的参数,有三个,我看一般的写法是

              reset-gpios = <&pioD 22 GPIO_ACTIVE_LOW>;
              

              但是我看了pin-ctrl.dtsi,并没有&pioD这样的写法,都是&pio PD 22这样的写法,如果我要设置PD22为reset引脚,我这样写可以吗

              reset-gpios = <&pio PD 22 GPIO_ACTIVE_LOW>;
              
              C 1 Reply Last reply Reply Quote Share 0
              • C
                chengwei_peng LV 6 @ceoifung last edited by

                @ceoifung 你的内核版本是多少?

                C 1 Reply Last reply Reply Quote Share 0
                • C
                  ceoifung LV 4 @chengwei_peng last edited by

                  @chengwei_peng kernel 4.9

                  C 1 Reply Last reply Reply Quote Share 0
                  • C
                    chengwei_peng LV 6 @ceoifung last edited by

                    @ceoifung 参考这样的配置:ctp_wakeup = <&pio PD 22 1 0xffffffff 0xffffffff 1>;

                    1 Reply Last reply Reply Quote Share 0
                    • 1 / 1
                    • First post
                      Last post

                    Copyright © 2022 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

                    行为准则 | 用户协议 | 隐私权政策