Skip to content

RFC ARM: Kirkwood: Synology DT files

Ben Peddell linux-arm-kernel linux-devicetree 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest0 of 2 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 2 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH RFC RFT 0/2] ARM: Kirkwood: Synology DT files
Quoted 8 lines · Andrew Lunn
Quoted 7 lines · Ben Peddell
Quoted 5 lines · Andrew Lunn

Request for Testing:

This patch adds support for around 30 different boards. Most .dts files support a couple of different models. I don't have any of this hardware. None of this is tested.

Quoted 6 lines
Quoted 1 line

Tested by Ben Peddell <[email protected]> (specifically kirkwood-ds210.dts on DS211j)

Hi Ben

Thanks for testing. I will fix the gpo and send a v2 sometime. I should also check if there are any more gpo's i have as gpio's.

There are only a few pins that are GPOs - from
marvell,kirkwood-pinctrl.txt, they are
1, 2, 3, 5, 7, 10, 18, 19 and 33.

Quoted 12 lines
Quoted 11 lines

To get running on the stock bootloader, I needed to extend the initramfs to fill the entire rd.gz flash partition, configure the kernel to use the dtb appended to it, configure it to ignore the information passed to it by the bootloader, and add the following nodes to the dts:

/chosen {
	linux,initrd-start = <0x800040>;
	linux,initrd-end   = <0x940000>;
};
Quoted 5 lines

Do you know why these initrd properties are needed? There is only one other board in mainline that requires this. I also wonder what implications this has. u-boot has the capability of reading the initrd from disc to RAM and passing its location to the kernel. By hard coding these values, are we blocking that?

The stock Marvell bootloader is a little broken as it passes the kernel the _source_ address of the initrd rather than the _load_ address. Thus the bootloader passes the address 0xf8280040 rather than the address 0x00800040.

It appears the initrd address in the devicetree structure (which is filled in from what is passed by the bootloader when CONFIG_ARM_ATAG_DTB_COMPAT is set) is processed _after_ the address in the initrd= kernel parameter is processed.

Rather than putting the initrd address into the DTS, it would probably be better to have the person compiling the kernel configure it with e.g.:

CONFIG_CMDLINE="initrd=0x00800040,0x0013FFC0 earlyprintk panic=5" CONFIG_CMDLINE_EXTEND=y
CONFIG_ARM_APPENDED_DTB=y
CONFIG_ARM_ATAG_DTB_COMPAT=n