Skip to contentSkip to conversation

ARM: dts: Convert Linkstation Mini to Device Tree

PATCH Superseded Benjamin Cama 4 participants 8 messages Jul 14, 2015 – Aug 6, 2015

Subsystems (5)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ARM: dts: Convert Linkstation Mini to Device Tree

The name of the file better reflects the manufacturer's device name (LS-WSGL) than the original (lsmini), which exists in a kirkwood version too.

---
Alexey, Thomas,

I need your approval to change the license, as Jason and Andrew suggested using dual licensing. Do you agree with it?

The changes since the first version are:
* the license change;
* the more precise attribution to Alexey;
* gpio keys are now named, even if I find them not to be the good ones; at least they fit with the old numbers and the recently submitted LS-WSXL scheme;
* added "earlyprintk" to the command-line

I did not rename the leds to be like LS-WSXL, as they are a bit different. I also did not take time to look at the NOR flash layout to separate uboot from the config (that must be all there is in these 256KB).

Hope the patch is OK like that. Sorry for the long delay, I spent quite some time on the IRQ0 fix, and did not have so much of it lately?

 arch/arm/boot/dts/Makefile           |   3 +-
 arch/arm/boot/dts/orion5x-lswsgl.dts | 276 ++++++++++++++++++++++++++++++++++
 arch/arm/mach-orion5x/Kconfig        |   6 +-
 arch/arm/mach-orion5x/lsmini-setup.c | 280 -----------------------------------
 4 files changed, 281 insertions(+), 284 deletions(-)
 create mode 100644 arch/arm/boot/dts/orion5x-lswsgl.dts
 delete mode 100644 arch/arm/mach-orion5x/lsmini-setup.c
arch/arm/boot/dts/Makefile +2 -1
index 992736b..bd5ad2f 100644
@@ -441,7 +441,8 @@ dtb-$(CONFIG_ARCH_ORION5X) += \
 	orion5x-lacie-d2-network.dtb \
 	orion5x-lacie-ethernet-disk-mini-v2.dtb \
 	orion5x-maxtor-shared-storage-2.dtb \
-	orion5x-rd88f5182-nas.dtb
+	orion5x-rd88f5182-nas.dtb \
+	orion5x-lswsgl.dtb
 dtb-$(CONFIG_ARCH_PRIMA2) += \
 	prima2-evb.dtb
 dtb-$(CONFIG_ARCH_QCOM) += \
arch/arm/boot/dts/orion5x-lswsgl.dts new file +276 -0

276 lines not on this page · raw message

arch/arm/mach-orion5x/Kconfig +3 -3
index 2412efb..08d2be2 100644
@@ -78,11 +78,11 @@ config MACH_LINKSTATION_LSCHL
 	  Buffalo Linkstation Live v3 (LS-CHL) platform.
 
 config MACH_LINKSTATION_MINI
-	bool "Buffalo Linkstation Mini"
-	select I2C_BOARDINFO
+	bool "Buffalo Linkstation Mini (Flattened Device Tree)"
+	select ARCH_ORION5X_DT
 	help
 	  Say 'Y' here if you want your kernel to support the
-	  Buffalo Linkstation Mini platform.
+	  Buffalo Linkstation Mini (LS-WSGL) platform.
 
 config MACH_LINKSTATION_LS_HGL
 	bool "Buffalo Linkstation LS-HGL"
arch/arm/mach-orion5x/lsmini-setup.c deleted +0 -280

280 lines not on this page · raw message

Signature · 1 line
2.1.4
maintainer
#1 lore raw

PATCH v2 1/1 ARM: dts: Convert Linkstation Mini to Device Tree

Quoted 40 lines · Benjamin Cama

The name of the file better reflects the manufacturer's device name (LS-WSGL) than the original (lsmini), which exists in a kirkwood version too.

---
Alexey, Thomas,

I need your approval to change the license, as Jason and Andrew suggested using dual licensing. Do you agree with it?

The changes since the first version are:
* the license change;
* the more precise attribution to Alexey;
* gpio keys are now named, even if I find them not to be the good ones; at least they fit with the old numbers and the recently submitted LS-WSXL scheme;
* added "earlyprintk" to the command-line

I did not rename the leds to be like LS-WSXL, as they are a bit different. I also did not take time to look at the NOR flash layout to separate uboot from the config (that must be all there is in these 256KB).

Hope the patch is OK like that. Sorry for the long delay, I spent quite some time on the IRQ0 fix, and did not have so much of it lately???

 arch/arm/boot/dts/Makefile           |   3 +-
 arch/arm/boot/dts/orion5x-lswsgl.dts | 276 ++++++++++++++++++++++++++++++++++
 arch/arm/mach-orion5x/Kconfig        |   6 +-
 arch/arm/mach-orion5x/lsmini-setup.c | 280 -----------------------------------
 4 files changed, 281 insertions(+), 284 deletions(-)
 create mode 100644 arch/arm/boot/dts/orion5x-lswsgl.dts
 delete mode 100644 arch/arm/mach-orion5x/lsmini-setup.c
arch/arm/boot/dts/Makefile +0 -0
index 992736b..bd5ad2f 100644

arch/arm/boot/dts/Makefile dtb-$(CONFIG_ARCH_ORION5X) += \ · line 445

Quoted 6 lines
arch/arm/boot/dts/Makefile +2 -1
@@ -441,7 +441,8 @@ dtb-$(CONFIG_ARCH_ORION5X) += \
 	orion5x-lacie-d2-network.dtb \
 	orion5x-lacie-ethernet-disk-mini-v2.dtb \
 	orion5x-maxtor-shared-storage-2.dtb \
-	orion5x-rd88f5182-nas.dtb
+	orion5x-rd88f5182-nas.dtb \
+	orion5x-lswsgl.dtb

Hi Benjamin

Please keep these in alphabetical order.

Other than that:

Thanks
Andrew

#2 lore raw

PATCH v2 1/1 ARM: dts: Convert Linkstation Mini to Device Tree

Hi Benjamin,

Quoted 50 lines · Andrew Lunn
Quoted 40 lines · Benjamin Cama

The name of the file better reflects the manufacturer's device name (LS-WSGL) than the original (lsmini), which exists in a kirkwood version too.

---
Alexey, Thomas,

I need your approval to change the license, as Jason and Andrew suggested using dual licensing. Do you agree with it?

The changes since the first version are:
* the license change;
* the more precise attribution to Alexey;
* gpio keys are now named, even if I find them not to be the good ones; at least they fit with the old numbers and the recently submitted LS-WSXL scheme;
* added "earlyprintk" to the command-line

I did not rename the leds to be like LS-WSXL, as they are a bit different. I also did not take time to look at the NOR flash layout to separate uboot from the config (that must be all there is in these 256KB).

Hope the patch is OK like that. Sorry for the long delay, I spent quite some time on the IRQ0 fix, and did not have so much of it lately???

 arch/arm/boot/dts/Makefile           |   3 +-
 arch/arm/boot/dts/orion5x-lswsgl.dts | 276 ++++++++++++++++++++++++++++++++++
 arch/arm/mach-orion5x/Kconfig        |   6 +-
 arch/arm/mach-orion5x/lsmini-setup.c | 280 -----------------------------------
 4 files changed, 281 insertions(+), 284 deletions(-)
 create mode 100644 arch/arm/boot/dts/orion5x-lswsgl.dts
 delete mode 100644 arch/arm/mach-orion5x/lsmini-setup.c
arch/arm/boot/dts/Makefile +0 -0
index 992736b..bd5ad2f 100644

arch/arm/boot/dts/Makefile dtb-$(CONFIG_ARCH_ORION5X) += \ · line 445

Quoted 6 lines
arch/arm/boot/dts/Makefile +2 -1
@@ -441,7 +441,8 @@ dtb-$(CONFIG_ARCH_ORION5X) += \
 	orion5x-lacie-d2-network.dtb \
 	orion5x-lacie-ethernet-disk-mini-v2.dtb \
 	orion5x-maxtor-shared-storage-2.dtb \
-	orion5x-rd88f5182-nas.dtb
+	orion5x-rd88f5182-nas.dtb \
+	orion5x-lswsgl.dtb

Hi Benjamin

Quoted 5 lines

Please keep these in alphabetical order.

Other than that:

With the Acked-by from Andrew Lunn I am ready to apply your patch. However for the device tree I need the acked-by from Thomas Petazzoni but I am sure he will give it as he already agreed for the armada-*.dts* files.

I am not sure we need the formal acked-by from Alexey because the dts is not based on a dts written by him.

When you will send the v3 with the alphabetical order fixed and the acked-by from Thomas Petazzoni I will apply it on the mvebu branches.

In this v3, could you also remove the reference to lsmini-setup.o in arch/arm/mach-orion5x/Makefile ?

Thanks,

Gregory

Signature · 4 lines
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#3 lore raw

PATCH v2 1/1 ARM: dts: Convert Linkstation Mini to Device Tree

Hi Gr?gory,

Le samedi 25 juillet 2015 ? 16:01 +0200, Gregory CLEMENT a ?crit :

Quoted 55 lines · Andrew Lunn
Quoted 54 lines · Benjamin Cama
Quoted 40 lines

The name of the file better reflects the manufacturer's device name (LS-WSGL) than the original (lsmini), which exists in a kirkwood version too.

---
Alexey, Thomas,

I need your approval to change the license, as Jason and Andrew suggested using dual licensing. Do you agree with it?

The changes since the first version are:
* the license change;
* the more precise attribution to Alexey;
* gpio keys are now named, even if I find them not to be the good ones; at least they fit with the old numbers and the recently submitted LS-WSXL scheme;
* added "earlyprintk" to the command-line

I did not rename the leds to be like LS-WSXL, as they are a bit different. I also did not take time to look at the NOR flash layout to separate uboot from the config (that must be all there is in these 256KB).

Hope the patch is OK like that. Sorry for the long delay, I spent quite some time on the IRQ0 fix, and did not have so much of it lately???

 arch/arm/boot/dts/Makefile           |   3 +-
 arch/arm/boot/dts/orion5x-lswsgl.dts | 276 ++++++++++++++++++++++++++++++++++
 arch/arm/mach-orion5x/Kconfig        |   6 +-
 arch/arm/mach-orion5x/lsmini-setup.c | 280 -----------------------------------
 4 files changed, 281 insertions(+), 284 deletions(-)
 create mode 100644 arch/arm/boot/dts/orion5x-lswsgl.dts
 delete mode 100644 arch/arm/mach-orion5x/lsmini-setup.c
arch/arm/boot/dts/Makefile +0 -0
index 992736b..bd5ad2f 100644

arch/arm/boot/dts/Makefile dtb-$(CONFIG_ARCH_ORION5X) += \ · line 445

Quoted 6 lines
arch/arm/boot/dts/Makefile +2 -1
@@ -441,7 +441,8 @@ dtb-$(CONFIG_ARCH_ORION5X) += \
 > > > 	> > > orion5x-lacie-d2-network.dtb \
 > > > 	> > > orion5x-lacie-ethernet-disk-mini-v2.dtb \
 > > > 	> > > orion5x-maxtor-shared-storage-2.dtb \
-> > > 	> > > orion5x-rd88f5182-nas.dtb
+> > > 	> > > orion5x-rd88f5182-nas.dtb \
+> > > 	> > > orion5x-lswsgl.dtb

Hi Benjamin

Please keep these in alphabetical order.

Other than that:

Quoted 8 lines
Quoted 1 line

With the Acked-by from Andrew Lunn I am ready to apply your patch. However for the device tree I need the acked-by from Thomas Petazzoni but I am sure he will give it as he already agreed for the armada-*.dts* files.

I am not sure we need the formal acked-by from Alexey because the dts is not based on a dts written by him.

It's just that I took all the devices definition from his .c; to me, it counts as derived work, but IANAL.

Quoted 2 lines

When you will send the v3 with the alphabetical order fixed and the acked-by from Thomas Petazzoni I will apply it on the mvebu branches.

Thanks.

Quoted 2 lines

In this v3, could you also remove the reference to lsmini-setup.o in arch/arm/mach-orion5x/Makefile ?

Yes, I spotted that lately.

Still, I am struggling with some more mistakes: the kernel boot with everything included, but for some reason it cannot boot with an initrd. At first, I got an ?INITRD: [?] overlaps in-use memory region - disabling initrd? that disappeared when removing the memory node from the dts. But I cannot reproduce it since, and now I sometimes get told that the initrd is corrupt, sometimes it isn't taken into account? my way of tweaking my configs and not being strict enough in keeping them around leads to a nightmare tracking this problem.

I now learned that I need CONFIG_ARM_ATAG_DTB_COMPAT to get the bootloader command-line and initrd address, but sometimes it mess with my setup. I have very weird behavior regarding console output (sometimes working, sometimes only with earlyprintk) and options around dtb/ATAGS. I am trying to sort this out.

BTW, during orion5x conversion to DT (for boards that support it), tag_fixup_mem32 was lost. It should not be needed as arch/arm/boot/compressed/atags_to_fdt.c:atags_to_fdt ditches zero-sized memory banks, and mines don't have anything above PAGE_MASK, but maybe it happens on some strange boards. I noticed it while looking at my overlapping memory regions bug.

--
benjamin

#4 lore raw

PATCH v2 1/1 ARM: dts: Convert Linkstation Mini to Device Tree

Hi Benjamin,

Quoted 64 lines · Benjamin Cama

Hi Gr?gory,

Le samedi 25 juillet 2015 ? 16:01 +0200, Gregory CLEMENT a ?crit :

Quoted 61 lines · Andrew Lunn
Quoted 50 lines · Benjamin Cama
Quoted 40 lines

The name of the file better reflects the manufacturer's device name (LS-WSGL) than the original (lsmini), which exists in a kirkwood version too.

---
Alexey, Thomas,

I need your approval to change the license, as Jason and Andrew suggested using dual licensing. Do you agree with it?

The changes since the first version are:
* the license change;
* the more precise attribution to Alexey;
* gpio keys are now named, even if I find them not to be the good ones; at least they fit with the old numbers and the recently submitted LS-WSXL scheme;
* added "earlyprintk" to the command-line

I did not rename the leds to be like LS-WSXL, as they are a bit different. I also did not take time to look at the NOR flash layout to separate uboot from the config (that must be all there is in these 256KB).

Hope the patch is OK like that. Sorry for the long delay, I spent quite some time on the IRQ0 fix, and did not have so much of it lately???

 arch/arm/boot/dts/Makefile           |   3 +-
 arch/arm/boot/dts/orion5x-lswsgl.dts | 276 ++++++++++++++++++++++++++++++++++
 arch/arm/mach-orion5x/Kconfig        |   6 +-
 arch/arm/mach-orion5x/lsmini-setup.c | 280 -----------------------------------
 4 files changed, 281 insertions(+), 284 deletions(-)
 create mode 100644 arch/arm/boot/dts/orion5x-lswsgl.dts
 delete mode 100644 arch/arm/mach-orion5x/lsmini-setup.c
arch/arm/boot/dts/Makefile +0 -0
index 992736b..bd5ad2f 100644

arch/arm/boot/dts/Makefile dtb-$(CONFIG_ARCH_ORION5X) += \ · line 445

Quoted 6 lines
arch/arm/boot/dts/Makefile +2 -1
@@ -441,7 +441,8 @@ dtb-$(CONFIG_ARCH_ORION5X) += \
 > > > 	> > > orion5x-lacie-d2-network.dtb \
 > > > 	> > > orion5x-lacie-ethernet-disk-mini-v2.dtb \
 > > > 	> > > orion5x-maxtor-shared-storage-2.dtb \
-> > > 	> > > orion5x-rd88f5182-nas.dtb
+> > > 	> > > orion5x-rd88f5182-nas.dtb \
+> > > 	> > > orion5x-lswsgl.dtb

Hi Benjamin

Quoted 5 lines

Please keep these in alphabetical order.

Other than that:

With the Acked-by from Andrew Lunn I am ready to apply your patch. However for the device tree I need the acked-by from Thomas Petazzoni but I am sure he will give it as he already agreed for the armada-*.dts* files.

Quoted 5 lines
Quoted 2 lines

I am not sure we need the formal acked-by from Alexey because the dts is not based on a dts written by him.

It's just that I took all the devices definition from his .c; to me, it counts as derived work, but IANAL.

For me it is still the decription of the hardware not an derivated work. Andrew what is your opinion on it?

But if we consider it as a derivated work then we need Alexey acked-by soon, or going back to GPL only license.

Quoted 20 lines
Quoted 3 lines

When you will send the v3 with the alphabetical order fixed and the acked-by from Thomas Petazzoni I will apply it on the mvebu branches.

Thanks.

Quoted 2 lines

In this v3, could you also remove the reference to lsmini-setup.o in arch/arm/mach-orion5x/Makefile ?

Yes, I spotted that lately.

Still, I am struggling with some more mistakes: the kernel boot with everything included, but for some reason it cannot boot with an initrd. At first, I got an ?INITRD: [?] overlaps in-use memory region - disabling initrd? that disappeared when removing the memory node from the dts. But I cannot reproduce it since, and now I sometimes get told that the initrd is corrupt, sometimes it isn't taken into account? my way of tweaking my configs and not being strict enough in keeping them around leads to a nightmare tracking this problem.

Quoted 5 lines

I now learned that I need CONFIG_ARM_ATAG_DTB_COMPAT to get the bootloader command-line and initrd address, but sometimes it mess with my setup. I have very weird behavior regarding console output (sometimes working, sometimes only with earlyprintk) and options around dtb/ATAGS. I am trying to sort this out.

I think we had similar issue on the Mirabox when we use the uImage. How do you build the uImage, the value of LOADADRR is sensible.

Quoted 7 lines

BTW, during orion5x conversion to DT (for boards that support it), tag_fixup_mem32 was lost. It should not be needed as arch/arm/boot/compressed/atags_to_fdt.c:atags_to_fdt ditches zero-sized memory banks, and mines don't have anything above PAGE_MASK, but maybe it happens on some strange boards. I noticed it while looking at my overlapping memory regions bug.

Well I would be tempt by saying that if nobody complains about it, then there is no problem :)

I also wants to warn you that usually we don't take any new code after the -rc6 which should be release this week-end. After this then the code will be a candidate for the 4.4 kernel.

Thanks,

Gregory

Signature · 4 lines
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
maintainer
#5 lore raw

PATCH v2 1/1 ARM: dts: Convert Linkstation Mini to Device Tree

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

I am not sure we need the formal acked-by from Alexey because the dts is not based on a dts written by him.

It's just that I took all the devices definition from his .c; to me, it counts as derived work, but IANAL.

For me it is still the decription of the hardware not an derivated work. Andrew what is your opinion on it?

Also, IANAL, but GPL "TERMS AND CONDITIONS" part 0 says:

The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language.

DT is a language, so i think we are on shaky ground if we did not consider the possibility it is a derived work.

Andrew

#6 lore raw

PATCH v2 1/1 ARM: dts: Convert Linkstation Mini to Device Tree

In reply to Gregory CLEMENT
Quoted 7 lines · Gregory CLEMENT
Quoted 7 lines
Quoted 6 lines

With the Acked-by from Andrew Lunn I am ready to apply your patch. However for the device tree I need the acked-by from Thomas Petazzoni but I am sure he will give it as he already agreed for the armada-*.dts* files.

I am not sure we need the formal acked-by from Alexey because the dts is not based on a dts written by him.

Quoted 9 lines
Quoted 2 lines

It's just that I took all the devices definition from his .c; to me, it counts as derived work, but IANAL.

For me it is still the decription of the hardware not an derivated work. Andrew what is your opinion on it?

But if we consider it as a derivated work then we need Alexey acked-by soon, or going back to GPL only license.

Since the patch touches files I had a part creating, the patch itself is clearly a derivative work. Therefore, without further ado...

Thanks,

-Alexey

#7 lore raw

PATCH v2 1/1 ARM: dts: Convert Linkstation Mini to Device Tree

Hi Alexey,

Quoted 16 lines · Alexey Kopytko
Quoted 13 lines · Gregory CLEMENT
Quoted 9 lines
Quoted 6 lines

With the Acked-by from Andrew Lunn I am ready to apply your patch. However for the device tree I need the acked-by from Thomas Petazzoni but I am sure he will give it as he already agreed for the armada-*.dts* files.

I am not sure we need the formal acked-by from Alexey because the dts is not based on a dts written by him.

It's just that I took all the devices definition from his .c; to me, it counts as derived work, but IANAL.

For me it is still the decription of the hardware not an derivated work. Andrew what is your opinion on it?

Quoted 8 lines
Quoted 3 lines

But if we consider it as a derivated work then we need Alexey acked-by soon, or going back to GPL only license.

Since the patch touches files I had a part creating, the patch itself is clearly a derivative work. Therefore, without further ado...

Thanks for your acked-by it will allow us to move forward,

Gregory

Signature · 4 lines
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com