本帖最后由 lkkme 于 2022-12-1 13:09 编辑
大佬们求助,我的M401A,2+16g,用的5.9的内核,dtb和解码的dts如附件所示。
我修改了dts,
serial@24000 {
compatible = "amlogic,meson-gx-uart";
reg = <0x00 0x24000 0x00 0x18>;
interrupts = <0x00 0x1a 0x01>;
clocks = <0x19 0x02 0x1c 0x19>;
clock-names = "xtal\0pclk\0baud";
status = "okay";
fifosize = <0x80>;
pinctrl-names = "default";
pinctrl-0 = <0x30 0x31>;
uart-has-rtscts;
phandle = <0x126>;
bluetooth {
compatible = "realtek,rtl8761btv";
};
};
重新编译后,下电重启后dmesg如下:
root@arm-64:~# dmesg|grep tty
[ 0.000000] Kernel command line: root=LABEL=ROOT_EMMC rootflags=data=writeback rw console=ttyAML0,115200n8 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0
[ 0.000556] printk: console [tty0] enabled
[ 1.842041] ff803000.serial: ttyAML0 at MMIO 0xff803000 (irq = 14, base_baud = 1500000) is a meson_uart
[ 2.909273] printk: console [ttyAML0] enabled
[ 2.914290] ffd24000.serial: ttyAML1 at MMIO 0xffd24000 (irq = 22, base_baud = 1500000) is a meson_uart
[ 2.923021] serial serial0: tty port ttyAML1 registered
[ 5.547912] systemd[1]: Created slice system-serial\x2dgetty.slice.
[ 6.451309] systemd[1]: Found device /dev/ttyS2.
[ 6.523436] systemd[1]: Found device /dev/ttyAML0.
root@arm-64:~# dmesg|grep serial
[ 1.842041] ff803000.serial: ttyAML0 at MMIO 0xff803000 (irq = 14, base_baud = 1500000) is a meson_uart
[ 2.914290] ffd24000.serial: ttyAML1 at MMIO 0xffd24000 (irq = 22, base_baud = 1500000) is a meson_uart
[ 2.923021] serial serial0: tty port ttyAML1 registered
[ 3.026630] meson-g12a-pinctrl ff634400.bus:pinctrl@40: pin GPIOC_0 already requested by ffd24000.serial; cannot claim for ffe05000.sd
[ 5.547912] systemd[1]: Created slice system-serial\x2dgetty.slice.
识别到了蓝牙的串口,但是系统里ls /dev/ttyAML*找不到此设备,只能看到ttyAML0
感觉是不是还是pinctl-0写的有问题,试了<0x55 0x56>,dmesg会报错 |