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

Paul Boddie paul at boddie.org.uk
Wed Dec 23 17:18:44 CET 2020


On Wednesday, 23 December 2020 15:56:01 CET H. Nikolaus Schaller wrote:
> Hi all,
> having had an inspiration, I switched my rootfs from Bullseye to Jessie.
> And now I can boot up to a login!
> 
> The boot process is painfully slow, but finally succeeds. Operation on
> command line feels quick.
> 
> First collection of impressions:
> - MMC is working (even w/o DMA)

It looks like I got the address wrong for the DMA and it was staring me in the 
face the whole time. Instead of 0x10020000, the registers are at 0x13020000. 
I've updated the documentation to reflect this.

So, the device tree will need updating as indicated by the accompanying patch. 
Since the erroneous addresses were in the MMC region, it is likely that the 
mistake was having other undesirable effects, but at least any problems from 
now on will be genuine ones!

> - date is counting in 1 second steps, so only the timing info in dmesg is
> wrong (maybe the 1 second timer is ok, but the µs or ns count wrong)

I will still take a look at the OST peripheral. I'm still not sure whether to 
keep making the TCU driver pretend that it has TCU timers, as is done now, or 
whether to support multiple OST timers instead. But the width of the timers 
will need to be configurable.

> - TCP/IP works on loopback
> - some device drivers are not successfully loaded
>   (some of them are part of the default Letux setup and make no sense, e.g.
> g-ether, bluetooth)
> - keyboard /dev/input exists and evtest lists the keys but it reports a
> KEY_FN autorepeat...
> - USB is not working

USB host support should be relatively straightforward to achieve, since 
previous investigations suggested that a generic OHCI driver would work, and 
that is why the device tree is as it is.

The device tree has the USB peripheral disabled in the JZ4730, and we 
introduced a GPIO-gated clock in the Mipsbook device tree to allow the 
external 48MHz clock signal to be fed into the SoC, this then being selected 
to provide the USB peripheral clock.

So, I guess that if we were to "override" the uhc definition in the Mipsbook 
device tree, indicating that the peripheral is enabled (status = "okay"), the 
necessary events might occur to propagate the external 48MHz clock signal into 
the SoC and for the USB peripheral to get that signal. But this may be based 
on a flawed mental model of how this stuff works.

> - Ethernet and WiFi are obviously not working (expected)

Since we have documentation for the Ethernet peripheral now, there is a chance 
of making this work, I guess.

> - I2C only reports timeouts for i2cdetect

I guess another review of the code cannot hurt. It is likely that this not 
working will prevent the RTC from working.

> - LCD is not working (expected)

Also for this.

> - no sound card (expected)

This will take some more investigation as I've never done anything with the 
sound support.

> - there are 3 rtc devices (/dev/rtc, /dev/rtc0, /dev/rtc1) and none is
> working

A review of what we were doing with the CI20 might be required given the 
presence of the PCF8563T, which is accessed using I2C (noted above).

> - only 2 out of the 3 caps/num/scroll lock LEDs are working (wrong gpio
> assigned?)

According to the schematic, Num Lock is GP86 (PC22), Caps Lock is GP27 (PA27), 
both consistent with the device tree. Scroll Lock is not on the schematic, but 
"LANLED" appears at GP9 (PA27) which is given for Scroll Lock in the device 
tree. I think we need to track this down.

> - trackpad not working (AFAIR it is USB)

Might it not be PS/2, accessible via the KBC (keyboard controller) peripheral? 
On the schematic, the mousepad is connected to the PS2_KDATA and PS2_KCLK 
lines.

> Despite all these issues it is IMHO a nice Xmas present to have the Letux
> 400 back to some operation :)

Great news, despite all the failures. ;-)

Merry Christmas!

Paul
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fixed-DMA-controller-addresses.patch
Type: text/x-patch
Size: 880 bytes
Desc: not available
URL: <http://lists.goldelico.com/pipermail/letux-kernel/attachments/20201223/5711a9d1/attachment-0001.bin>


More information about the Letux-kernel mailing list