HI,everyone.
I want to add ch934.c to source code /driver/tty/serial,and I add the followed txt into the kernel file:$kernel_src\drivers\tty\serial\Konfig
config SERIAL_CH9434
tristate “SERIAL_CH9434 serial support”
depends on SPI
select SERIAL_CORE
help
This selects support for ch9434 serial ports.
Add the follow define into the $kernel_src\drivers\tty\serial\Makefile for compile the driver.
obj-$(CONFIG_SERIAL_CH943X) += ch9434.o
I also run the make menuconfig and select the ch9434 serial support at the driver/tty/serial and save the config. But when I make -j5 Image and make -j5 modules,I don’t get ch9434.ko。Did I do something wrong? What can I do to get ch9434.ko。
Hi,Kevin
I modified it according to the supplier’s guidance. And,I also added CONFIG_SERIAL_CH943X=y in kernel_src/kernel/kernel-5.10/arch/arm64/configs/tegra_defconfig. Also, sudo make tegra_defconfig in kernel_src/kernel/kernel-5.10
Hi,Kevin
Now CH934.ko is loaded to the system, but when I restart the device after updating the Image, the system fails to boot and this error message appears in the log message.
Hi,Kevin
When I loaded CH934.KO, the error message in the figure appeared through dmesg, I used GPIO06(PCC.03) as the interrupt, is the error message because of GPIO06(PCC.03)? Thank you
Hi,KevinFFF
I have modified the GPIO interrupt and can also use it. Now I have encountered a new problem, and there is an error in the process of data transmission from spi to CH9434. I want to know if /drivers/spi/ spi-tegra114. c needs to be modified, and how should it be modified? And, SPI0.0 is not found under /dev. Thank you. ch9434.c.txt (43.1 KB)
Hi,Kevin
By adding print information to source/drivers/spi/spi.c, it is found that __spi_validate_bits_per_word() appears on line 3593 in function __spi_validate(). -EINVAL(-22), bits_per_word(239) > 32. This error occurs when I execute echo “123” > ttyWCH0.
It is expected since you use ch943x_spi driver instead.
It seems you could probe the ch9434 driver successfully since you get the new /dev/ttyWCH* node.
Sorry that I’m not familiar with how this driver works.
I would suggest you asking the help from your vendor.