我有nanopi2火。我想使用GT911触摸屏,我把这个goodix header file改成这样:(230-233行)

// STEP_2(REQUIRED): Customize your I/O ports & I/O operations
#define GTP_RST_PORT    16 //16 //S5PV210_GPJ3(6)
#define GTP_INT_PORT    17  //17 //S5PV210_GPH1(3)

这是关于gt9xx tp驱动程序说它连接到I2C0的s5p4418-nanopi2-common.dtsi(第466-473行)
goodix_ts@5d {
                compatible = "goodix,gt9xx";
                reg = <0x5d>;
                interrupt-parent = <&gpio_c>;
                interrupts = <16 IRQ_TYPE_EDGE_FALLING>;
                goodix,irq-gpio = <&gpio_c 16 0>;
};

这是nanopi2的defconfig:
# CONFIG_INPUT_MOUSE is not set
CONFIG_INPUT_TOUCHSCREEN=y
CONFIG_TOUCHSCREEN_EDT_FT5X06=y
CONFIG_TOUCHSCREEN_FE_PANELS=y
CONFIG_TOUCHSCREEN_1WIRE=y
CONFIG_TOUCHSCREEN_GT9XX=y
CONFIG_TOUCHSCREEN_IT7260=y
CONFIG_TOUCHSCREEN_HIMAX=y
CONFIG_TOUCHSCREEN_ST1572=y

因此,我认为goodix是默认启用的。
当我交叉编译内核时,内核在更改gt9xx.h文件并复制zImage和DTB文件(as tutorials)之后,将SD与run the Linux一起运行,没有任何更改。
我测试了i2c,结果如下:
i2cdetect -y 0
       0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:             -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- UU
30: -- -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- 5d -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- -- --

我认为我的设备连接到i2c是正确的,但是触摸不起作用。此外,此命令不返回任何内容:
dmesg | grep goodix

这是dmesg日志:
[    2.764000] ehci-exynos: EHCI EXYNOS driver
[    2.769000] exynos-ehci c0030000.ehci: EHCI Host Controller​
[    2.775000] exynos-ehci c0030000.ehci: new USB bus registered, assigned bus number 2​
[    2.783000] exynos-ehci c0030000.ehci: irq 66, io mem 0xc0030000​
[    2.795000] exynos-ehci c0030000.ehci: USB 2.0 started, EHCI 1.00​
[    2.801000] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002​
[    2.808000] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1​
[    2.815000] usb usb2: Product: EHCI Host Controller​
[    2.820000] usb usb2: Manufacturer: Linux 4.4.49-s5p4418 ehci_hcd​
[    2.826000] usb usb2: SerialNumber: c0030000.ehci​
[    2.832000] hub 2-0:1.0: USB hub found​
[    2.836000] hub 2-0:1.0: 3 ports detected​
[    2.841000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver​
[    2.847000] ohci-exynos: OHCI EXYNOS driver​
[    2.851000] exynos-ohci c0020000.ohci: USB Host Controller​
[    2.857000] exynos-ohci c0020000.ohci: new USB bus registered, assigned bus number 3​
[    2.865000] exynos-ohci c0020000.ohci: irq 66, io mem 0xc0020000​
[    2.926000] usb usb3: New USB device found, idVendor=1d6b, idProduct=0001​
[    2.933000] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1​
[    2.940000] usb usb3: Product: USB Host Controller​
[    2.945000] usb usb3: Manufacturer: Linux 4.4.49-s5p4418 ohci_hcd​
[    2.951000] usb usb3: SerialNumber: c0020000.ohci​
[    2.956000] hub 3-0:1.0: USB hub found​
[    2.960000] hub 3-0:1.0: 3 ports detected​
[    2.965000] usbcore: registered new interface driver uas​
[    2.971000] usbcore: registered new interface driver usb-storage​
[    2.977000] usbcore: registered new interface driver usbserial​
[    2.983000] usbcore: registered new interface driver usbserial_generic​
[    2.990000] usbserial: USB Serial support registered for generic​
[    2.997000] mousedev: PS/2 mouse device common for all mice​
[    3.013000] input: EP0790M09 as /devices/platform/c0000000.soc/c00a6000.i2c/i2c-2/2-0038/input/input0​
[    3.023000] <<-GTP-INFO->> GTP driver installing​
[    3.034000] himax_ts 2-0048: Unable to get DevId​
[    3.039000] touchscreen-1wire        initialized​
[    3.044000] backlight-1wire  initialized​
[    3.050000] onewire: REQ 0x60: i2c read error -11​
[    3.056000] input: fa_ts_input as /devices/virtual/input/input1​
[    3.063000] ts-if    initialized​
[    3.066000] nx-rtc c0010c00.rtc: [RTC] day=2009.09.01 time=00:00:00​
[    3.073000] nx-rtc c0010c00.rtc: rtc core: registered nx as rtc0​
[    3.079000] i2c /dev entries driver​
[    3.084000] nx-v4l2 nx-v4l2: nx_v4l2_probe success​
[    3.090000] nx-vpu c0080000.video-codec: encoder registered as /dev/video14​
[    3.097000] nx-vpu c0080000.video-codec: decoder registered as /dev/video15​
[    3.113000] device-mapper: uevent: version 1.0.3​
[    3.118000] device-mapper: ioctl: 4.34.0-ioctl (2015-10-28) initialised: [email protected]​
[    3.127000] Bluetooth: HCI UART driver ver 2.3​
[    3.131000] Bluetooth: HCI UART protocol H4 registered​
[    3.136000] Bluetooth: HCI UART protocol BCM registered​
[    3.142000] voltage supply : vdd_arm_spu​
[    3.146000] DVFS: ASV[0] IDS(10mA,  7) Ro(110, 82)​
[    3.151000] ASV  0 =  1400000khz,  1200000 uV​
[    3.155000] ASV  1 =  1300000khz,  1160000 uV​
[    3.159000] ASV  2 =  1200000khz,  1120000 uV​
[    3.164000] ASV  3 =  1100000khz,  1080000 uV​
[    3.168000] ASV  4 =  1000000khz,  1080000 uV​
[    3.172000] ASV  5 =   900000khz,  1040000 uV​
[    3.177000] ASV  6 =   800000khz,  1040000 uV​
[    3.181000] ASV  7 =   700000khz,  1000000 uV​
[    3.186000] ASV  8 =   600000khz,  1000000 uV​
[    3.190000] ASV  9 =   500000khz,   960000 uV​
[    3.194000] ASV 10 =   400000khz,   960000 uV​
[    3.199000] c00bb000.dynamic-freq supply vdd_arm_dummy not found, using dummy regulator​
[    3.207000] DVFS: regulator vdd_arm_dummy​
[    3.211000] DVFS: cpu DVFS with PLL.1 [tables=11]​
[    3.217000] Synopsys Designware Multimedia Card Interface Driver​
[    3.224000] dwmmc_nexell c0062000.dw_mmc: fifo-depth property not found, using value of FIFOTH register as default​
[    3.234000] dwmmc_nexell c0062000.dw_mmc: IDMAC supports 32-bit address mode.​
[    3.242000] dwmmc_nexell c0062000.dw_mmc: Using internal DMA controller.​
[    3.249000] dwmmc_nexell c0062000.dw_mmc: Version ID is 250a​
[    3.254000] dwmmc_nexell c0062000.dw_mmc: DW MMC controller at irq 59,32 bit host data width,16 deep fifo​
[    3.264000] dwmmc_nexell c0062000.dw_mmc: No vmmc regulator found​
[    3.270000] dwmmc_nexell c0062000.dw_mmc: No vqmmc regulator found​
[    3.276000] dwmmc_nexell c0062000.dw_mmc: Got CD GPIO​
[    3.304000] mmc0: run _mmc_detect_change()​
[    3.308000] dwmmc_nexell c0062000.dw_mmc: 1 slots initialized​
[    3.314000] usbcore: registered new interface driver usbhid​
[    3.320000] usbhid: USB HID core driver​
[    3.324000] ashmem: initialized​
[    3.329000] nexell-adc c0053000.adc: CHs 8, 200000(1000000 ~ 130208) sample rate, scale=166(bit 6)​
[    3.342000] nexell-pcm nexell-pcm: snd pcm: register sound platform 'nexell-pcm'​
[    3.351000] nexell-i2s c0055000.i2s: snd i2s: ch 0, master, iis mode, 48000(47999)hz, 32 FBITs,​
[    3.360000] nexell-i2s c0055000.i2s: MCLK=12287880hz, RFS=256​
[    3.367000] nexell-spdif-tx c0059000.spdiftx: spdif-tx: 48000(47999)Hz, MCLK=12287880hz​
[    3.378000] nx-simple-card sound: snd-null-voice <-> c0055000.i2s mapping ok​
[    3.386000] nx-simple-card sound: dit-hifi <-> c0059000.spdiftx mapping ok​
[    3.394000] u32 classifier​
[    3.397000]     Actions configured​
[    3.400000] Netfilter messages via NETLINK v0.30.​
[    3.403000] mmc_host mmc0: Bus speed (slot 0) = 50000000Hz (slot req 50000000Hz, actual 50000000HZ div = 0)​
[    3.403000] mmc0: new high speed SDHC card at address aaaa​
[    3.405000] mmcblk0: mmc0:aaaa SC16G 14.8 GiB​
[    3.420000]  mmcblk0: p1 p2​
[    3.428000] nf_conntrack version 0.5.0 (15731 buckets, 62924 max)​
[    3.435000] ctnetlink v0.93: registering with nfnetlink.​
[    3.441000] xt_time: kernel timezone is -0000​
[    3.446000] ip_tables: (C) 2000-2006 Netfilter Core Team​
[    3.451000] arp_tables: (C) 2002 David S. Miller​
[    3.456000] Initializing XFRM netlink socket​
[    3.461000] NET: Registered protocol family 10​
[    3.469000] mip6: Mobile IPv6​
[    3.472000] ip6_tables: (C) 2000-2006 Netfilter Core Team​
[    3.478000] NET: Registered protocol family 17​
[    3.482000] NET: Registered protocol family 15​
[    3.487000] Bluetooth: RFCOMM TTY layer initialized​
[    3.492000] Bluetooth: RFCOMM socket layer initialized​
[    3.497000] Bluetooth: RFCOMM ver 1.11​
[    3.501000] Bluetooth: BNEP (Ethernet Emulation) ver 1.3​
[    3.506000] Bluetooth: BNEP filters: protocol multicast​
[    3.511000] Bluetooth: BNEP socket layer initialized​
[    3.516000] Bluetooth: HIDP (Human Interface Emulation) ver 1.2​
[    3.522000] Bluetooth: HIDP socket layer initialized​
[    3.528000] Key type dns_resolver registered​
[    3.532000] ThumbEE CPU extension supported.​
[    3.536000] Registering SWP/SWPB emulation handler​
[    3.543000] Loading compiled-in X.509 certificates​
[    3.550000] ntc-thermistor thermal: Thermistor type: b57330v2103 successfully probed.​
[    3.559000] input: gpio_keys as /devices/platform/gpio_keys/input/input2​
[    3.566000] nx-rtc c0010c00.rtc: setting system clock to 2009-09-01 00:00:00 UTC (1251763200)​
[    3.580000] axp22_rtcldo: disabling​
[    3.590000] axp22_dc5ldo: disabling​
[    3.600000] dhd_module_init in​
[    3.603000] dhd_wlan_init: START.......​
[    3.608000] failed to get device node of bcmdhd​
[    3.613000] dhd_wlan_init: failed to initiate GPIO, ret=-19​
[    3.618000] dhd_module_init: failed in dhd_wlan_init.​
[    3.623000] ALSA device list:​
[    3.626000]   #0: nanopi2-audio​
[    3.735000] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)​
[    3.752000] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered​
[    4.137000] systemd[1]: System time before build time, advancing clock.​
[    4.243000] systemd[1]: systemd 229 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN)​
[    4.262000] systemd[1]: Detected architecture arm.​
[    4.286000] systemd[1]: Set hostname to <NanoPi2-Fire>.​
[    4.536000] systemd[1]: Reached target Encrypted Volumes.​
[    4.549000] systemd[1]: Started Forward Password Requests to Wall Directory Watch.​
[    4.565000] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.​
[    4.579000] systemd[1]: Listening on Journal Audit Socket.​
[    4.592000] systemd[1]: Listening on udev Control Socket.​
[    4.603000] systemd[1]: Listening on Journal Socket.​
[    4.614000] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.​
[    4.631000] systemd[1]: Reached target Paths.​
[    4.641000] systemd[1]: Created slice System Slice.​
[    4.653000] systemd[1]: Created slice system-serial\x2dgetty.slice.​
[    4.671000] systemd[1]: Starting Set console keymap...​
[    4.686000] systemd[1]: Mounting Debug File System...​
[    4.714000] systemd[1]: Starting Load Kernel Modules...​
[    4.728000] systemd[1]: Listening on udev Kernel Socket.​
[    4.745000] systemd[1]: Starting Create list of required static device nodes for the current kernel...​
[    4.766000] systemd[1]: Created slice User and Session Slice.​
[    4.780000] systemd[1]: Reached target Slices.​
[    4.795000] systemd[1]: Mounting POSIX Message Queue File System...​
[    4.809000] systemd[1]: Listening on Journal Socket (/dev/log).​
[    4.826000] systemd[1]: Starting Journal Service...​
[    4.836000] systemd[1]: Reached target Remote File Systems (Pre).​
[    4.849000] systemd[1]: Reached target Remote File Systems.​
[    4.878000] systemd[1]: Starting Remount Root and Kernel File Systems...​
[    4.909000] systemd[1]: Mounted Debug File System.​
[    4.922000] systemd[1]: Mounted POSIX Message Queue File System.​
[    4.937000] systemd[1]: Started Set console keymap.​
[    4.949000] systemd[1]: systemd-modules-load.service: Main process exited, code=exited, status=1/FAILURE​
[    4.960000] systemd[1]: Failed to start Load Kernel Modules.​
[    4.981000] systemd[1]: systemd-modules-load.service: Unit entered failed state.​
[    4.988000] systemd[1]: systemd-modules-load.service: Failed with result 'exit-code'.​
[    4.997000] systemd[1]: Started Create list of required static device nodes for the current kernel.​
[    5.018000] systemd[1]: Started Remount Root and Kernel File Systems.​
[    5.032000] systemd[1]: Started Journal Service.​
[    5.458000] systemd-journald[390]: Received request to flush runtime journal from PID 1​
[    5.580000] Adding 2097148k swap on /swapfile.  Priority:-1 extents:18 across:3842044k SS​
[    7.755000] cfg80211: World regulatory domain updated:​
[    7.755000] cfg80211:  DFS Master region: unset​
[    7.755000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)​
[    7.755000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)​
[    7.755000] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)​
[    7.755000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)​
[    7.755000] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)​
[    7.755000] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)​
[    7.755000] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)​
[    7.755000] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)​
[    7.756000] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)​
[    7.932000] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready​
[    8.313000] random: nonblocking pool is initialized​
[   12.942000] nexell-dwmac c0060000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx​
[   13.627000] NOHZ: local_softirq_pending 08​
[   14.015000] NOHZ: local_softirq_pending 08​
[   15.971000] NOHZ: local_softirq_pending 08​
[   18.637000] NOHZ: local_softirq_pending 08​
[   23.648000] NOHZ: local_softirq_pending 08​
[   28.630000] NOHZ: local_softirq_pending 08​
[   28.641000] NOHZ: local_softirq_pending 08​
[   28.658000] NOHZ: local_softirq_pending 08​
[   33.668000] NOHZ: local_softirq_pending 08​
[   36.292000] NOHZ: local_softirq_pending 08​
[  314.806000] nf_conntrack: automatic helper assignment is deprecated and it will be removed soon. Use the iptables CT target to attach helpers instead.​

最佳答案

您是否在内核中启用了goodix_ts驱动程序?在你的dmesg中似乎没有这种驱动程序的踪迹(也| grep goodix要么没有工作,要么你发送了错误的输出)。。。无论如何,检查drivers/input/touchscreen/gt9xx.c是否已编译。

关于linux - 未从Arm设备加载Goodix驱动程序,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/53790232/

10-11 20:18