[Letux-kernel] JZ4730 kernel support

H. Nikolaus Schaller hns at goldelico.com
Tue Oct 15 09:57:05 CEST 2019


Hi Paul,

> Am 14.10.2019 um 22:30 schrieb Paul Boddie <paul at boddie.org.uk>:
> 
> Replying again with some progress details...
> 
> On Friday 11. October 2019 13.55.29 H. Nikolaus Schaller wrote:
>> Hi Paul,
>> it is a while that you have provided a provisional JZ4730
>> implementation for the kernel and since then I have tried
>> to keep pace with upstream changes as good as possible.
>> 
>> Now we are at v5.4-rc2 and there have been more changes
>> from upstream which are not exactly compatible. Mainly
>> something in pinmux, framebuffer and there is a new JZ4760
>> if I remember correctly.
> 
> I notice that the X1000 and X1500 are mentioned, which are fairly interesting 
> and relatively recent products. (I wonder if this is Werner's doing...)
> 
> [...]
> 
>> So could you please take care of doing a review and
>> provide a patch set (on top of the existing patch sets)
>> to fix it like you think it should be right?
>> 
>> The relevant branches are:
>> http://git.goldelico.com/?p=letux-kernel.git;a=shortlog;h=refs/heads/letux/jz4730
> 
> I have started with this one. Since my machine is evidently not capable of 
> downloading and unpacking the entire history, I did the following to begin 
> with:
> 
> git clone --depth 1 --branch letux/jz4730 \
>                    git://git.goldelico.com/letux-kernel.git
> 
> Some notes...
> 
> drivers/clk/ingenic/jz4730-cgu.c
> 
> Here the jz4730_clock functions may all be superfluous now and can probably be 
> removed. There were some clock definitions that may have been wrong 
> (JZ4730_CLK_DMA, JZ4730_CLK_MMC) because they were using the wrong register.
> 
> drivers/i2c/busses/i2c-jz4730.c
> 
> This remains similar to the JZ4780 version, and there probably aren't any 
> significant updates due. The JZ4780 version sort of works, given problems with 
> the hardware design.
> 
> drivers/pinctrl/pinctrl-ingenic.c
> 
> Here, the compilation alerted me to something of a mistake I must have made. 
> The pin function configuration was not using the right function to set the 
> two-bits-per-pin function selectors. Also, the register interval was 0x100 
> instead of 0x30, which is a key difference with the JZ4730 compared to all the 
> other products.
> 
> drivers/pwm/pwm-jz4730.c
> 
> I have added device tree details to this.
> 
> Until I can persuade Git to work correctly, I'll attach the fairly trivial 
> patch to this message.

Thanks! I have applied it and it compiles with the letux_defconfig. So I will
include it in the next -rc build.

One tiny note: would be good if there is a signed-off, which is a requirement
for upstreaming.

I have also scanned the source tree for '#if 0' and there is one in
arch/mips/jz4740/time.c

> I have successfully compiled the modified kernel 
> although I have not tested it,

Well, I should definitively find time to set up a testing environment...
Now as I have achieved a breakthrough with OMAP-PVR/SGX, I hope I can
reprioritize some things.

> and I'll attach the configuration for 
> reference, too.
> 
> Paul<patch-48beba89.diff><config.txt>

BR and thanks,
Nikolaus



More information about the Letux-kernel mailing list