[Letux-kernel] [PATCH 00/20] A bunch of JZ4730 fixups for letux-kernel

Lubomir Rintel lkundrak at v3.sk
Tue Nov 17 21:57:53 CET 2020


Hello Nikolaus,

Chained to this message are JZ4730-related patches I've made against the
Letux kernel.

I essentially needed a Device Tree that would be good enough for U-Boot
bringup and your branches provided very helpful. I'm sharing the changes
I've had to make.

I've given booting the kernel a shot and it fixed some oversights in the CGU
driver as well. It seems to lock up while calculating the bogomips due to not
timer tick; I haven't looked further into it yet. Dmesg near the end of this
message in case anyone's curious.

Most of the patches fix up issues in earlier commits and are intended to be
squashed into them. The commit to fix up is indicated in the subject line.

The first 14 patches apply against letux/jz4730-v4 (as of d94118cd960a7).
Starting with fixes to the CGU driver:

  [PATCH 01/20] fixup! Introduced JZ4730 watchdog timer support.
                Add the missing JZ4730_CLK_EXT_128 define.
  [PATCH 02/20] Revert "CLK: jz4730 CGU: FIXME: there is a clock label...
  [PATCH 03/20] fixup! Added missing, fixed JZ4730 DT file.
                Add more input clocks for the CGU:
  [PATCH 04/20] fixup! Add clock driver for the JZ4730.
                The parent mux is already called "mclk" -- use a different...
  [PATCH 05/20] fixup! Add clock driver for the JZ4730.
                Fix the clock type for the PCLK divisor.
  [PATCH 06/20] fixup! Add clock driver for the JZ4730.
                The UHC mux is already called "uhc" -- use a different...
  [PATCH 07/20] fixup! Add clock driver for the JZ4730.
                This fixes the WDT clock:
  [PATCH 08/20] fixup! Add clock driver for the JZ4730
                Define a SPI clock.

Then come the DT fixes, still applicable against letux/jz4730-v4:

  [PATCH 09/20] fixup! Added missing, fixed JZ4730 DT file.
                Make the UART compatible with ingenic,jz4780-uart.
  [PATCH 10/20] fixup! Added missing, fixed JZ4730 DT file.
                TCU on jz4730 is not a mfd.
  [PATCH 11/20] fixup! Added missing, fixed JZ4730 DT file.
                Fix the watchdog node name.
  [PATCH 12/20] fixup! Added missing, fixed JZ4730 DT file.
                Remove an unused header. Copy & paste issue I guess.
  [PATCH 13/20] MIPS: DTS: ingenic/jz4730: Add EMC node
                Add a node for the EMC node, with a subnode for the NAND...
  [PATCH 14/20] MIPS: DTS: ingenic/jz4730: Add Ethernet node
                Add a node for the ethernet MAC, with a subnode for the...

Patches that apply against letux/dt-mipsbook400 (as of 05be4206321d3) follow.
They generally improve (hopefully the DT). The last one is sort of bogus;
only included for reference if anyone wonders for any reason why what I'm
submitting to U-Boot differs here.

  [PATCH 15/20] fixup! Mipsbook400: add includes for bindings
                According to the specification [1], /chosen/stdout-path is...
  [PATCH 16/20] fixup! Fixed Letux 400 MMC, backlight pinctrl usage.
                The vmmc-supply property should be a phandle of the...
  [PATCH 17/20] fixup! Added more JZ4730 device definitions.
                Fix the NAND controller pinctrl and enable the device.
  [PATCH 18/20] MIPS: DTS: ingenic/mipsbook_400: Add the NAND memory node
                ...along with the partition map.
  [PATCH 19/20] MIPS: DTS: ingenic/mipsbook_400: Hook on the Ethernet
                Add a PHY node, use the MAC function on appropriate pins...
  [PATCH 20/20] [remove me] MIPS: DTS: ingenic/mipsbook_400: Add the...
                This is a kludge to make U-Boot use the WDT for system...

And here's the dmesg:

  [    0.000000] Linux version 5.10.0-rc4+ (lkundrak at demiurge.local) (mips64-linux-gnu-gcc (GCC) 10.2.1 20200826 (Red Hat Cross 10.2.1-3), GNU ld version 2.35.1-1.fc33) #99 PREEMPT Tue Nov 17 0
  [    0.000000] CPU0 revision is: 02d0024f (Ingenic XBurst)
  [    0.000000] MIPS: machine is letux400,minipc
  [    0.000000] earlycon: jz4740_uart0 at MMIO32 0x10030000 (options '115200n8')
  [    0.000000] printk: bootconsole [jz4740_uart0] enabled
  [    0.000000] printk: debug: ignoring loglevel setting.
  [    0.000000] User-defined physical RAM map overwrite
  [    0.000000] Initrd not found or empty - disabling initrd
  [    0.000000] cma: Reserved 32 MiB at 0x00800000
  [    0.000000] Primary instruction cache 16kB, VIVT, 4-way, linesize 32 bytes.
  [    0.000000] Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes
  [    0.000000] Zone ranges:
  [    0.000000]   Normal   [mem 0x0000000000000000-0x000000001fffffff]
  [    0.000000] Movable zone start for each node
  [    0.000000] Early memory node ranges
  [    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
  [    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
  [    0.000000] On node 0 totalpages: 32768
  [    0.000000]   Normal zone: 256 pages used for memmap
  [    0.000000]   Normal zone: 0 pages reserved
  [    0.000000]   Normal zone: 32768 pages, LIFO batch:7
  [    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
  [    0.000000] pcpu-alloc: [0] 0
  [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32512
  [    0.000000] Kernel command line: mem=128M earlycon=jz4740_uart,mmio32,0x10030000,115200n8 console=ttyS0,115200n8 irqpoll ignore_loglevel
  [    0.000000] Misrouted IRQ fixup and polling support enabled
  [    0.000000] This may significantly impact system performance
  [    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
  [    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
  [    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
  [    0.000000] Memory: 90684K/131072K available (3568K kernel code, 218K rwdata, 1196K rodata, 1284K init, 145K bss, 7620K reserved, 32768K cma-reserved)
  [    0.000000] rcu: Preemptible hierarchical RCU implementation.
  [    0.000000]  Trampoline variant of Tasks RCU enabled.
  [    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
  [    0.000000] NR_IRQS: 256
  [    0.000000] random: get_random_bytes called from start_kernel+0x63c/0x864 with crng_init=0
  [    0.000000] timer_probe: no matching timers found
  [    0.000000] sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 21474836475000000ns

And in case git is more convenient than e-mail, here are my branches:

  git pull git://git.kernel.org/pub/scm/linux/kernel/git/lkundrak/linux.git lr/letux/jz4730-v4
  git pull git://git.kernel.org/pub/scm/linux/kernel/git/lkundrak/linux.git lr/letux/dt-mipsbook400

Take care
Lubo



More information about the Letux-kernel mailing list