Modify

Opened 5 years ago

Last modified 2 years ago

#13590 new defect

can't enable rt5350 uartf

Reported by: zfsdk@… Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: Cc:

Description

If i enable RT5350 uartf as follow:

modify dts:

palmbus@10000000 {

sysc@0 {

ralink,pinmux = "spi", "uartlite", "jtag", "mdio", "sdram", "rgmii";
ralink,gpiomux = "i2c";
ralink,uartmux = "gpio uartf"; <-- from 'gpio' to 'gpio uartf'
ralink,wdtmux = <1>;

};

...
uart@500 {

compatible = "ralink,rt5350-uart", "ralink,rt2880-uart", "ns16550a";
reg = <0x500 0x100>;
interrupt-parent = <&intc>;
interrupts = <5>;
reg-shift = <2>;
status = "okay";

};
...

when boot kernel panic:

...........
[ 7.470000] msgmni has been set to 51
[ 7.480000] io scheduler noop registered
[ 7.480000] io scheduler deadline registered (default)
[ 7.500000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[ 7.510000] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20) is a 16550A
[ 7.530000] console [ttyS0] enabled, bootconsole disabled
[ 7.530000] console [ttyS0] enabled, bootconsole disabled
[ 7.550000] 10000500.uart: ttyS1 at MMIO 0x10000500 (irq = 13) is a 16550A
[ 7.560000] CPU 0 Unable to handle kernel paging request at virtual address 00000018, epc == 80148a6c, ra == 80147dc0
[ 7.560000] Oops#1:
[ 7.560000] Cpu 0
[ 7.560000] $ 0 : 00000000 00000000 00000018 00000000
[ 7.560000] $ 4 : 80607b9c 80260350 00000000 00000000
[ 7.560000] $ 8 : 00000041 28203030 20717269 3331203d
[ 7.560000] $12 : 00000000 00000001 00000000 00000001
[ 7.560000] $16 : 80607b9c 81880898 80290684 00000001
[ 7.560000] $20 : 81821b58 8025b49c 818808f0 80290000
[ 7.560000] $24 : 00000001 80148a4c
[ 7.560000] $28 : 81820000 81821b38 00000001 80147dc0
[ 7.560000] Hi : 00000000
[ 7.560000] Lo : cf14e000
[ 7.560000] epc : 80148a6c au_serial_out+0x20/0x2c
[ 7.560000] Not tainted
[ 7.560000] ra : 80147dc0 uart_add_one_port+0x260/0x380
[ 7.560000] Status: 11008402 KERNEL EXL
[ 7.560000] Cause : 0080000c
[ 7.560000] BadVA : 00000018
[ 7.560000] PrId : 0001964c (MIPS 24KEc)
[ 7.560000] Modules linked in:
[ 7.560000] Process swapper (pid: 1, threadinfo=81820000, task=8181c000, tls=00000000)
[ 7.560000] Stack : 81562980 8184d400 8025b49c 802411d8 00000001 81821b58 0000000d 8025bab4

4f494d4d 31783020 30303030 00303035 81001674 81000a94 81887758 80118e18
80290000 80290684 818808f0 800907e8 00000001 80607b9c 81880898 80290000
802411d8 0000000d 80607b9c 81821c08 80290000 80290000 80607ab8 80290000
000000e4 8029720c 00000000 8014a6b8 00000100 80179f74 00000000 00000200
...

[ 7.560000] Call Trace:
[ 7.560000] [<80148a6c>] au_serial_out+0x20/0x2c
[ 7.560000] [<80147dc0>] uart_add_one_port+0x260/0x380
[ 7.560000] [<8014a6b8>] serial8250_register_8250_port+0x288/0x2d0
[ 7.560000] [<8014cb34>] of_platform_serial_probe+0x2f0/0x360
[ 7.560000] [<80153344>] driver_probe_device+0xbc/0x1fc
[ 7.560000] [<80153564>] driver_attach+0x7c/0xb4
[ 7.560000] [<801517a0>] bus_for_each_dev+0x98/0xa8
[ 7.560000] [<80152988>] bus_add_driver+0x118/0x254
[ 7.560000] [<8015398c>] driver_register+0xbc/0x16c
[ 7.560000] [<8000bcf4>] do_one_initcall+0xf4/0x1bc
[ 7.560000] [<80297a5c>] kernel_init_freeable+0x150/0x220
[ 7.560000] [<80008bec>] kernel_init+0x10/0x10c
[ 7.560000] [<80004878>] ret_from_kernel_thread+0x14/0x1c
[ 7.560000]
[ 7.560000]
Code: 00431004 8c830004 00621021 <ac460000> 03e00008 00000000 8c820004 8c420028 03e00008
[ 8.000000] ---[ end trace 0b4f04039452a0e5 ]---
[ 8.010000] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[ 8.010000]

Attachments (0)

Change History (11)

comment:2 Changed 5 years ago by zfsdk@…

can't open uartf , ttyS1

comment:3 follow-up: Changed 5 years ago by zhanghuigreat@…

In file 8250.c, function serial8250_port_size, modity the size 0x1000 to 0x100.

static unsigned int serial8250_port_size(struct uart_8250_port *pt)
{

if (pt->port.iotype == UPIO_AU)

return 0x1000;

if (is_omap1_8250(pt))

return 0x16 << pt->port.regshift;

return 8 << pt->port.regshift;

}

comment:4 Changed 5 years ago by anonymous

thank you!

comment:5 Changed 5 years ago by gapleehit@…

I have the same problem, where is the 8250.c.

comment:6 in reply to: ↑ 3 Changed 5 years ago by anonymous

Replying to zhanghuigreat@…:
I have found the file. Can you explain some more details.

In file 8250.c, function serial8250_port_size, modity the size 0x1000 to 0x100.

static unsigned int serial8250_port_size(struct uart_8250_port *pt)
{

if (pt->port.iotype == UPIO_AU)

return 0x1000;

if (is_omap1_8250(pt))

return 0x16 << pt->port.regshift;

return 8 << pt->port.regshift;

}

comment:7 follow-up: Changed 5 years ago by JiapnegLi <gapleehit@…>

Try to modify the 8250_core.c. Only got this, and the openwrt is trapped.

Starting kernel ...

[    0.000000] Linux version 3.10.3 (lich@lich-pc) (gcc version 4.6.4 (OpenWrt/Linaro GCC 4.6-2012.12 r37551) ) #29 Sun Jul 28 02:58:51 CST 2013
[    0.000000] SoC Type: Ralink RT5350 id:1 rev:3
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 0001964c (MIPS 24KEc)
[    0.000000] MIPS: machine is HILINK HLK-RM04
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] User-defined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x01ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x01ffffff]
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2 mem=32M
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Writing ErrCtl register=0000c710
[    0.000000] Readback ErrCtl register=0000c710
[    0.000000] Memory: 29420k/32768k available (2104k kernel code, 3348k reserved, 525k data, 184k init, 0k highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:128
[    0.000000] CPU Clock: 360MHz
[    0.000000] systick: runing - mult: 214748, shift: 32
[    0.000000] Calibrating delay loop... 479.23 BogoMIPS (lpj=2396160)
[    0.060000] pid_max: default: 32768 minimum: 301
[    0.060000] Mount-cache hash table entries: 512
[    0.070000] NET: Registered protocol family 16
[    0.090000] bio: create slab <bio-0> at 0
[    0.100000] rt2880_gpio 10000600.gpio: registering 24 gpios
[    0.100000] rt2880_gpio 10000600.gpio: registering 24 irq handlers
[    0.110000] Switching to clocksource systick
[    0.120000] NET: Registered protocol family 2
[    0.120000] TCP established hash table entries: 512 (order: 0, 4096 bytes)
[    0.140000] TCP bind hash table entries: 512 (order: -1, 2048 bytes)
[    0.140000] TCP: Hash tables configured (established 512 bind 512)
[    0.160000] TCP: reno registered
[    0.160000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.180000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.190000] NET: Registered protocol family 1
[    0.200000] rt-timer 10000100.timer: maximum frequncy is 7324Hz
[    0.240000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.260000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.280000] msgmni has been set to 57
[    0.290000] io scheduler noop registered
[    0.300000] io scheduler deadline registered (default)
[    0.310000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.330000] 10000500.uart: ttyS0 at MMIO 0x10000500 (irq = 13) is a 16550A
[    0.340000] console [ttyS0] enabled, bootconsole disabled

comment:8 in reply to: ↑ 7 ; follow-up: Changed 4 years ago by anonymous

Replying to JiapnegLi <gapleehit@…>:

Set your bootconsole to ttyS0 in "yourboardfile".dts.
You need "uartlite" to be ttyS0.
So you have to position "uartlite" before "uart" to get it enumerated as ttyS0 in "yourboardfile".dts.

comment:9 in reply to: ↑ 8 Changed 4 years ago by gapleehit@…

Replying to anonymous:
Thank you.
You are right. "uartlite" node need to be positioned before "uart" node.
But the test result shows
Only change the node of the "boardfile.dts" seems not enough, because of that
the rt5350.dtsi file(the include file) fixes the position of "uart" and "uartlite".
So it is a good idea to change the "uart" and "uartlite" node position of rt5350.dtsi

Thanks again.

comment:10 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

comment:11 Changed 2 years ago by freekepange

Hey this worked for me
why this isnot fixed in current release Barrier Breaker
I think not fixed in even Chaos Calmer

this is even case for MT7620
and same solution worked

Thanks For posting this comment

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.