linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] ARM: dts: phyBOARD-WEGA-AM335x updates
@ 2017-01-05 14:50 Teresa Remmet
  2017-01-05 14:50 ` [PATCH 1/6] ARM: dts: am335x-phycore-som: Update NAND partition table Teresa Remmet
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: Teresa Remmet @ 2017-01-05 14:50 UTC (permalink / raw)
  To: linux-arm-kernel

Set of small patches to update the device tree of the
phyCORE-AM335x SOM and phyBOARD-WEGA-AM335x.

Teresa Remmet (6):
  ARM: dts: am335x-phycore-som: Update NAND partition table
  ARM: dts: am335x-phycore-som: Update compatible string for spi nor
  ARM: dts: am335x-phycore-som: Add i2c temp sensor
  ARM: dts: am335x-wega: Set USB0 mode to otg
  ARM: dts: am335x-phycore-som: Update ethernet phy node
  ARM: dts: am335x-wega: Update ethernet phy node

 arch/arm/boot/dts/am335x-phycore-som.dtsi | 30 +++++++++++++++++++-----------
 arch/arm/boot/dts/am335x-wega.dtsi        |  9 +++++++--
 2 files changed, 26 insertions(+), 13 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/6] ARM: dts: am335x-phycore-som: Update NAND partition table
  2017-01-05 14:50 [PATCH 0/6] ARM: dts: phyBOARD-WEGA-AM335x updates Teresa Remmet
@ 2017-01-05 14:50 ` Teresa Remmet
  2017-01-05 15:36   ` Tony Lindgren
  2017-01-05 14:50 ` [PATCH 2/6] ARM: dts: am335x-phycore-som: Update compatible string for spi nor Teresa Remmet
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 17+ messages in thread
From: Teresa Remmet @ 2017-01-05 14:50 UTC (permalink / raw)
  To: linux-arm-kernel

To improve NAND safety we updated the partition layout.
Added barebox backup partition and removed kernel and oftree
partition. They are kept in ubi now.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
---
 arch/arm/boot/dts/am335x-phycore-som.dtsi | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/arch/arm/boot/dts/am335x-phycore-som.dtsi b/arch/arm/boot/dts/am335x-phycore-som.dtsi
index 75e24ad..ef3fe5a 100644
--- a/arch/arm/boot/dts/am335x-phycore-som.dtsi
+++ b/arch/arm/boot/dts/am335x-phycore-som.dtsi
@@ -222,21 +222,19 @@
 			label = "barebox";
 			reg = <0x80000 0x80000>;
 		};
+
 		partition at 5 {
-			label = "bareboxenv";
-			reg = <0x100000 0x40000>;
+			label = "barebox_backup";
+			reg = <0x100000 0x80000>;
 		};
+
 		partition at 6 {
-			label = "oftree";
-			reg = <0x140000 0x40000>;
+			label = "bareboxenv";
+			reg = <0x180000 0x40000>;
 		};
 		partition at 7 {
-			label = "kernel";
-			reg = <0x180000 0x800000>;
-		};
-		partition at 8 {
 			label = "root";
-			reg = <0x980000 0x0>;
+			reg = <0x1C0000 0x0>;
 		};
 	};
 };
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 2/6] ARM: dts: am335x-phycore-som: Update compatible string for spi nor
  2017-01-05 14:50 [PATCH 0/6] ARM: dts: phyBOARD-WEGA-AM335x updates Teresa Remmet
  2017-01-05 14:50 ` [PATCH 1/6] ARM: dts: am335x-phycore-som: Update NAND partition table Teresa Remmet
@ 2017-01-05 14:50 ` Teresa Remmet
  2017-01-05 14:50 ` [PATCH 3/6] ARM: dts: am335x-phycore-som: Add i2c temp sensor Teresa Remmet
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 17+ messages in thread
From: Teresa Remmet @ 2017-01-05 14:50 UTC (permalink / raw)
  To: linux-arm-kernel

As we may have different SPI NOR flashes with 8MB populated on
phyCORE-AM335x SOM, set the "jedec,spi-nor" SPI Flash compatible string.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
---
 arch/arm/boot/dts/am335x-phycore-som.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/am335x-phycore-som.dtsi b/arch/arm/boot/dts/am335x-phycore-som.dtsi
index ef3fe5a..8060ce5 100644
--- a/arch/arm/boot/dts/am335x-phycore-som.dtsi
+++ b/arch/arm/boot/dts/am335x-phycore-som.dtsi
@@ -339,7 +339,7 @@
 	status = "okay";
 
 	serial_flash: m25p80 at 0 {
-		compatible = "m25p80";
+		compatible = "jedec,spi-nor";
 		spi-max-frequency = <48000000>;
 		reg = <0x0>;
 		m25p,fast-read;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 3/6] ARM: dts: am335x-phycore-som: Add i2c temp sensor
  2017-01-05 14:50 [PATCH 0/6] ARM: dts: phyBOARD-WEGA-AM335x updates Teresa Remmet
  2017-01-05 14:50 ` [PATCH 1/6] ARM: dts: am335x-phycore-som: Update NAND partition table Teresa Remmet
  2017-01-05 14:50 ` [PATCH 2/6] ARM: dts: am335x-phycore-som: Update compatible string for spi nor Teresa Remmet
@ 2017-01-05 14:50 ` Teresa Remmet
  2017-01-05 14:50 ` [PATCH 4/6] ARM: dts: am335x-wega: Set USB0 mode to otg Teresa Remmet
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 17+ messages in thread
From: Teresa Remmet @ 2017-01-05 14:50 UTC (permalink / raw)
  To: linux-arm-kernel

Include the i2c temperature sensor which is optionaly mounted
on the phyCORE-AM335x-R2 module.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
---
 arch/arm/boot/dts/am335x-phycore-som.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/boot/dts/am335x-phycore-som.dtsi b/arch/arm/boot/dts/am335x-phycore-som.dtsi
index 8060ce5..08d1134 100644
--- a/arch/arm/boot/dts/am335x-phycore-som.dtsi
+++ b/arch/arm/boot/dts/am335x-phycore-som.dtsi
@@ -120,6 +120,12 @@
 		reg = <0x2d>;
 	};
 
+	i2c_tmp102: temp at 4b {
+		compatible = "ti,tmp102";
+		reg = <0x4b>;
+		status = "disabled";
+	};
+
 	i2c_eeprom: eeprom at 52 {
 		compatible = "atmel,24c32";
 		pagesize = <32>;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 4/6] ARM: dts: am335x-wega: Set USB0 mode to otg
  2017-01-05 14:50 [PATCH 0/6] ARM: dts: phyBOARD-WEGA-AM335x updates Teresa Remmet
                   ` (2 preceding siblings ...)
  2017-01-05 14:50 ` [PATCH 3/6] ARM: dts: am335x-phycore-som: Add i2c temp sensor Teresa Remmet
@ 2017-01-05 14:50 ` Teresa Remmet
  2017-01-05 14:50 ` [PATCH 5/6] ARM: dts: am335x-phycore-som: Update ethernet phy node Teresa Remmet
  2017-01-05 14:50 ` [PATCH 6/6] ARM: dts: am335x-wega: " Teresa Remmet
  5 siblings, 0 replies; 17+ messages in thread
From: Teresa Remmet @ 2017-01-05 14:50 UTC (permalink / raw)
  To: linux-arm-kernel

Set USB0 to otg mode (default) and not fix to peripheral.
As it can be used in host mode also.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
---
 arch/arm/boot/dts/am335x-wega.dtsi | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/boot/dts/am335x-wega.dtsi b/arch/arm/boot/dts/am335x-wega.dtsi
index 02c6736..e97fd6d 100644
--- a/arch/arm/boot/dts/am335x-wega.dtsi
+++ b/arch/arm/boot/dts/am335x-wega.dtsi
@@ -206,7 +206,6 @@
 };
 
 &usb0 {
-	dr_mode = "peripheral";
 	status = "okay";
 };
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 5/6] ARM: dts: am335x-phycore-som: Update ethernet phy node
  2017-01-05 14:50 [PATCH 0/6] ARM: dts: phyBOARD-WEGA-AM335x updates Teresa Remmet
                   ` (3 preceding siblings ...)
  2017-01-05 14:50 ` [PATCH 4/6] ARM: dts: am335x-wega: Set USB0 mode to otg Teresa Remmet
@ 2017-01-05 14:50 ` Teresa Remmet
  2017-01-05 14:50 ` [PATCH 6/6] ARM: dts: am335x-wega: " Teresa Remmet
  5 siblings, 0 replies; 17+ messages in thread
From: Teresa Remmet @ 2017-01-05 14:50 UTC (permalink / raw)
  To: linux-arm-kernel

Update ethernet phy0 node to use phy-handle now.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
---
 arch/arm/boot/dts/am335x-phycore-som.dtsi | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/am335x-phycore-som.dtsi b/arch/arm/boot/dts/am335x-phycore-som.dtsi
index 08d1134..de91275 100644
--- a/arch/arm/boot/dts/am335x-phycore-som.dtsi
+++ b/arch/arm/boot/dts/am335x-phycore-som.dtsi
@@ -78,7 +78,7 @@
 };
 
 &cpsw_emac0 {
-	phy_id = <&davinci_mdio>, <0>;
+	phy-handle = <&phy0>;
 	phy-mode = "rmii";
 	dual_emac_res_vlan = <1>;
 };
@@ -87,6 +87,10 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&mdio_pins>;
 	status = "okay";
+
+	phy0: ethernet-phy at 0 {
+		reg = <0>;
+	};
 };
 
 &mac {
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 6/6] ARM: dts: am335x-wega: Update ethernet phy node
  2017-01-05 14:50 [PATCH 0/6] ARM: dts: phyBOARD-WEGA-AM335x updates Teresa Remmet
                   ` (4 preceding siblings ...)
  2017-01-05 14:50 ` [PATCH 5/6] ARM: dts: am335x-phycore-som: Update ethernet phy node Teresa Remmet
@ 2017-01-05 14:50 ` Teresa Remmet
  5 siblings, 0 replies; 17+ messages in thread
From: Teresa Remmet @ 2017-01-05 14:50 UTC (permalink / raw)
  To: linux-arm-kernel

Update ethernet phy1 node to use phy-handle now.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
---
 arch/arm/boot/dts/am335x-wega.dtsi | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/am335x-wega.dtsi b/arch/arm/boot/dts/am335x-wega.dtsi
index e97fd6d..8ce5417 100644
--- a/arch/arm/boot/dts/am335x-wega.dtsi
+++ b/arch/arm/boot/dts/am335x-wega.dtsi
@@ -119,11 +119,17 @@
 };
 
 &cpsw_emac1 {
-	phy_id = <&davinci_mdio>, <1>;
+	phy-handle = <&phy1>;
 	phy-mode = "mii";
 	dual_emac_res_vlan = <2>;
 };
 
+&davinci_mdio {
+	phy1: ethernet-phy at 1 {
+		reg = <1>;
+	};
+};
+
 &mac {
 	slaves = <2>;
 	pinctrl-names = "default";
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 1/6] ARM: dts: am335x-phycore-som: Update NAND partition table
  2017-01-05 14:50 ` [PATCH 1/6] ARM: dts: am335x-phycore-som: Update NAND partition table Teresa Remmet
@ 2017-01-05 15:36   ` Tony Lindgren
  2017-01-05 17:18     ` Tony Lindgren
  0 siblings, 1 reply; 17+ messages in thread
From: Tony Lindgren @ 2017-01-05 15:36 UTC (permalink / raw)
  To: linux-arm-kernel

* Teresa Remmet <t.remmet@phytec.de> [170105 06:57]:
> To improve NAND safety we updated the partition layout.
> Added barebox backup partition and removed kernel and oftree
> partition. They are kept in ubi now.

What about the users with earlier partition tables?

Please read about "flag day" changes, typically they are not
acceptable.

Regards,

Tony

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/6] ARM: dts: am335x-phycore-som: Update NAND partition table
  2017-01-05 15:36   ` Tony Lindgren
@ 2017-01-05 17:18     ` Tony Lindgren
  2017-01-05 17:56       ` Brian Norris
  0 siblings, 1 reply; 17+ messages in thread
From: Tony Lindgren @ 2017-01-05 17:18 UTC (permalink / raw)
  To: linux-arm-kernel

* Tony Lindgren <tony@atomide.com> [170105 07:37]:
> * Teresa Remmet <t.remmet@phytec.de> [170105 06:57]:
> > To improve NAND safety we updated the partition layout.
> > Added barebox backup partition and removed kernel and oftree
> > partition. They are kept in ubi now.
> 
> What about the users with earlier partition tables?
> 
> Please read about "flag day" changes, typically they are not
> acceptable.

Adding Brian and Adam to Cc. Can you guys come up with some
solution on this?

I'm suggesting we leave the kernel nodes empty and let u-boot
populate them, so maybe you guys can discuss this on the related
lists.

The rest of the series looks fine to me so applying it into
omap-for-v4.11/dt.

Cheers,

Tony

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/6] ARM: dts: am335x-phycore-som: Update NAND partition table
  2017-01-05 17:18     ` Tony Lindgren
@ 2017-01-05 17:56       ` Brian Norris
  2017-01-06  9:27         ` Teresa Remmet
  2017-01-06 17:39         ` Ladislav Michl
  0 siblings, 2 replies; 17+ messages in thread
From: Brian Norris @ 2017-01-05 17:56 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Jan 05, 2017 at 09:18:45AM -0800, Tony Lindgren wrote:
> * Tony Lindgren <tony@atomide.com> [170105 07:37]:
> > * Teresa Remmet <t.remmet@phytec.de> [170105 06:57]:
> > > To improve NAND safety we updated the partition layout.
> > > Added barebox backup partition and removed kernel and oftree
> > > partition. They are kept in ubi now.
> > 
> > What about the users with earlier partition tables?
> > 
> > Please read about "flag day" changes, typically they are not
> > acceptable.
> 
> Adding Brian and Adam to Cc. Can you guys come up with some
> solution on this?

I don't have much context for this thread, and no I don't plan to solve
your problems for you. But I can provide tips!

> I'm suggesting we leave the kernel nodes empty and let u-boot
> populate them, so maybe you guys can discuss this on the related
> lists.

That's an option. I've worked with platforms that did something like
this, and that's really one of the only ways you can handle putting
partition information in the device tree. You're really hamstringing
yourself when you put all the partition information in the device tree.
And it's just dumb once that gets codified in the kernel source tree.

The best solution would be to try to migrate away from static device
tree representations of partition info entirely. UBI volumes are best
where possible. If not, then some other kind of on-flash data structures
(along the lines of a GPT) with a corresponding MTD partition parser is
an OK alternative. Unfortunately, there isn't any good standard format
for this on MTD, so it's typically all custom -- and so people use the
easiest approach: device tree. And it's even more difficult with NAND,
which has reliability problems, especially with static data (e.g., read
disturb).

Anyway, the parser solution is helpful only if one can properly fix the
"flag day" first. And it requires a little bit more work to be generally
useful; I posted some work for this over a year ago, but bikeshedding
brought it down.

> The rest of the series looks fine to me so applying it into
> omap-for-v4.11/dt.

Brian

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/6] ARM: dts: am335x-phycore-som: Update NAND partition table
  2017-01-05 17:56       ` Brian Norris
@ 2017-01-06  9:27         ` Teresa Remmet
  2017-01-06 16:02           ` Tony Lindgren
  2017-01-06 17:39         ` Ladislav Michl
  1 sibling, 1 reply; 17+ messages in thread
From: Teresa Remmet @ 2017-01-06  9:27 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Brian,

Am Donnerstag, den 05.01.2017, 09:56 -0800 schrieb Brian Norris:
> On Thu, Jan 05, 2017 at 09:18:45AM -0800, Tony Lindgren wrote:
> > 
> > * Tony Lindgren <tony@atomide.com> [170105 07:37]:
> > > 
> > > * Teresa Remmet <t.remmet@phytec.de> [170105 06:57]:
> > > > 
> > > > To improve NAND safety we updated the partition layout.
> > > > Added barebox backup partition and removed kernel and oftree
> > > > partition. They are kept in ubi now.
> > > What about the users with earlier partition tables?
> > > 
> > > Please read about "flag day" changes, typically they are not
> > > acceptable.
> > Adding Brian and Adam to Cc. Can you guys come up with some
> > solution on this?
> I don't have much context for this thread, and no I don't plan to
> solve
> your problems for you. But I can provide tips!
> 
> > 
> > I'm suggesting we leave the kernel nodes empty and let u-boot
> > populate them, so maybe you guys can discuss this on the related
> > lists.
> That's an option. I've worked with platforms that did something like
> this, and that's really one of the only ways you can handle putting
> partition information in the device tree. You're really hamstringing
> yourself when you put all the partition information in the device
> tree.
> And it's just dumb once that gets codified in the kernel source tree.
> 

In our case the bootloader does pass the partition table to the kernel.
So it gets overwritten anyway. This was just more for backup,?
if someone uses a different bootloader. But I'm fine with removing the
nand partition table completely from the kernel device tree.
Same with the SPI nor partition table.

I will send patches for this.

Regards,
Teresa

> The best solution would be to try to migrate away from static device
> tree representations of partition info entirely. UBI volumes are best
> where possible. If not, then some other kind of on-flash data
> structures
> (along the lines of a GPT) with a corresponding MTD partition parser
> is
> an OK alternative. Unfortunately, there isn't any good standard
> format
> for this on MTD, so it's typically all custom -- and so people use
> the
> easiest approach: device tree. And it's even more difficult with
> NAND,
> which has reliability problems, especially with static data (e.g.,
> read
> disturb).
> 
> Anyway, the parser solution is helpful only if one can properly fix
> the
> "flag day" first. And it requires a little bit more work to be
> generally
> useful; I posted some work for this over a year ago, but bikeshedding
> brought it down.
> 
> > 
> > The rest of the series looks fine to me so applying it into
> > omap-for-v4.11/dt.
> Brian
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/6] ARM: dts: am335x-phycore-som: Update NAND partition table
  2017-01-06  9:27         ` Teresa Remmet
@ 2017-01-06 16:02           ` Tony Lindgren
  2017-01-06 16:05             ` Adam Ford
  0 siblings, 1 reply; 17+ messages in thread
From: Tony Lindgren @ 2017-01-06 16:02 UTC (permalink / raw)
  To: linux-arm-kernel

* Teresa Remmet <t.remmet@phytec.de> [170106 01:28]:
> Hello Brian,
> 
> Am Donnerstag, den 05.01.2017, 09:56 -0800 schrieb Brian Norris:
> > On Thu, Jan 05, 2017 at 09:18:45AM -0800, Tony Lindgren wrote:
> > > 
> > > * Tony Lindgren <tony@atomide.com> [170105 07:37]:
> > > > 
> > > > * Teresa Remmet <t.remmet@phytec.de> [170105 06:57]:
> > > > > 
> > > > > To improve NAND safety we updated the partition layout.
> > > > > Added barebox backup partition and removed kernel and oftree
> > > > > partition. They are kept in ubi now.
> > > > What about the users with earlier partition tables?
> > > > 
> > > > Please read about "flag day" changes, typically they are not
> > > > acceptable.
> > > Adding Brian and Adam to Cc. Can you guys come up with some
> > > solution on this?
> > I don't have much context for this thread, and no I don't plan to
> > solve
> > your problems for you. But I can provide tips!
> > 
> > > 
> > > I'm suggesting we leave the kernel nodes empty and let u-boot
> > > populate them, so maybe you guys can discuss this on the related
> > > lists.
> > That's an option. I've worked with platforms that did something like
> > this, and that's really one of the only ways you can handle putting
> > partition information in the device tree. You're really hamstringing
> > yourself when you put all the partition information in the device
> > tree.
> > And it's just dumb once that gets codified in the kernel source tree.
> > 
> 
> In our case the bootloader does pass the partition table to the kernel.
> So it gets overwritten anyway. This was just more for backup,?
> if someone uses a different bootloader. But I'm fine with removing the
> nand partition table completely from the kernel device tree.
> Same with the SPI nor partition table.
> 
> I will send patches for this.

OK thanks! Also thank you Brian for your comments.

Regards,

Tony

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/6] ARM: dts: am335x-phycore-som: Update NAND partition table
  2017-01-06 16:02           ` Tony Lindgren
@ 2017-01-06 16:05             ` Adam Ford
  2017-01-06 16:14               ` Tony Lindgren
  0 siblings, 1 reply; 17+ messages in thread
From: Adam Ford @ 2017-01-06 16:05 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jan 6, 2017 at 10:02 AM, Tony Lindgren <tony@atomide.com> wrote:
> * Teresa Remmet <t.remmet@phytec.de> [170106 01:28]:
>> Hello Brian,
>>
>> Am Donnerstag, den 05.01.2017, 09:56 -0800 schrieb Brian Norris:
>> > On Thu, Jan 05, 2017 at 09:18:45AM -0800, Tony Lindgren wrote:
>> > >
>> > > * Tony Lindgren <tony@atomide.com> [170105 07:37]:
>> > > >
>> > > > * Teresa Remmet <t.remmet@phytec.de> [170105 06:57]:
>> > > > >
>> > > > > To improve NAND safety we updated the partition layout.
>> > > > > Added barebox backup partition and removed kernel and oftree
>> > > > > partition. They are kept in ubi now.
>> > > > What about the users with earlier partition tables?
>> > > >
>> > > > Please read about "flag day" changes, typically they are not
>> > > > acceptable.
>> > > Adding Brian and Adam to Cc. Can you guys come up with some
>> > > solution on this?
>> > I don't have much context for this thread, and no I don't plan to
>> > solve
>> > your problems for you. But I can provide tips!
>> >
>> > >
>> > > I'm suggesting we leave the kernel nodes empty and let u-boot
>> > > populate them, so maybe you guys can discuss this on the related
>> > > lists.
>> > That's an option. I've worked with platforms that did something like
>> > this, and that's really one of the only ways you can handle putting
>> > partition information in the device tree. You're really hamstringing
>> > yourself when you put all the partition information in the device
>> > tree.
>> > And it's just dumb once that gets codified in the kernel source tree.
>> >
>>
>> In our case the bootloader does pass the partition table to the kernel.
>> So it gets overwritten anyway. This was just more for backup,
>> if someone uses a different bootloader. But I'm fine with removing the
>> nand partition table completely from the kernel device tree.
>> Same with the SPI nor partition table.
>>
>> I will send patches for this.
>
> OK thanks! Also thank you Brian for your comments.
>

Tony - I tested leaving the partition info as-is with the updates from
the bootloader and it works.  Would you prefer that I match Brian and
remove the partition table completely, or should I just leave my board
alone?

I am good either way.

> Regards,
>
> Tony

adam

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/6] ARM: dts: am335x-phycore-som: Update NAND partition table
  2017-01-06 16:05             ` Adam Ford
@ 2017-01-06 16:14               ` Tony Lindgren
  2017-01-06 18:20                 ` Brian Norris
  0 siblings, 1 reply; 17+ messages in thread
From: Tony Lindgren @ 2017-01-06 16:14 UTC (permalink / raw)
  To: linux-arm-kernel

* Adam Ford <aford173@gmail.com> [170106 08:06]:
> On Fri, Jan 6, 2017 at 10:02 AM, Tony Lindgren <tony@atomide.com> wrote:
> > * Teresa Remmet <t.remmet@phytec.de> [170106 01:28]:
> >> Hello Brian,
> >>
> >> Am Donnerstag, den 05.01.2017, 09:56 -0800 schrieb Brian Norris:
> >> > On Thu, Jan 05, 2017 at 09:18:45AM -0800, Tony Lindgren wrote:
> >> > >
> >> > > * Tony Lindgren <tony@atomide.com> [170105 07:37]:
> >> > > >
> >> > > > * Teresa Remmet <t.remmet@phytec.de> [170105 06:57]:
> >> > > > >
> >> > > > > To improve NAND safety we updated the partition layout.
> >> > > > > Added barebox backup partition and removed kernel and oftree
> >> > > > > partition. They are kept in ubi now.
> >> > > > What about the users with earlier partition tables?
> >> > > >
> >> > > > Please read about "flag day" changes, typically they are not
> >> > > > acceptable.
> >> > > Adding Brian and Adam to Cc. Can you guys come up with some
> >> > > solution on this?
> >> > I don't have much context for this thread, and no I don't plan to
> >> > solve
> >> > your problems for you. But I can provide tips!
> >> >
> >> > >
> >> > > I'm suggesting we leave the kernel nodes empty and let u-boot
> >> > > populate them, so maybe you guys can discuss this on the related
> >> > > lists.
> >> > That's an option. I've worked with platforms that did something like
> >> > this, and that's really one of the only ways you can handle putting
> >> > partition information in the device tree. You're really hamstringing
> >> > yourself when you put all the partition information in the device
> >> > tree.
> >> > And it's just dumb once that gets codified in the kernel source tree.
> >> >
> >>
> >> In our case the bootloader does pass the partition table to the kernel.
> >> So it gets overwritten anyway. This was just more for backup,
> >> if someone uses a different bootloader. But I'm fine with removing the
> >> nand partition table completely from the kernel device tree.
> >> Same with the SPI nor partition table.
> >>
> >> I will send patches for this.
> >
> > OK thanks! Also thank you Brian for your comments.
> >
> 
> Tony - I tested leaving the partition info as-is with the updates from
> the bootloader and it works.  Would you prefer that I match Brian and
> remove the partition table completely, or should I just leave my board
> alone?
> 
> I am good either way.

OK. How about let's remove the partitions from kernel for v4.11 as
clean-up then for cases where the bootloader might change them?

Regards,

Tony

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/6] ARM: dts: am335x-phycore-som: Update NAND partition table
  2017-01-05 17:56       ` Brian Norris
  2017-01-06  9:27         ` Teresa Remmet
@ 2017-01-06 17:39         ` Ladislav Michl
  1 sibling, 0 replies; 17+ messages in thread
From: Ladislav Michl @ 2017-01-06 17:39 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Jan 05, 2017 at 09:56:20AM -0800, Brian Norris wrote:
[snip]
> The best solution would be to try to migrate away from static device
> tree representations of partition info entirely. UBI volumes are best
> where possible. If not, then some other kind of on-flash data structures
> (along the lines of a GPT) with a corresponding MTD partition parser is
> an OK alternative. Unfortunately, there isn't any good standard format
> for this on MTD, so it's typically all custom -- and so people use the
> easiest approach: device tree. And it's even more difficult with NAND,
> which has reliability problems, especially with static data (e.g., read
> disturb).

Just as a side note, there is some work in this area:
https://www.mail-archive.com/u-boot at lists.denx.de/msg232759.html

> Anyway, the parser solution is helpful only if one can properly fix the
> "flag day" first. And it requires a little bit more work to be generally
> useful; I posted some work for this over a year ago, but bikeshedding
> brought it down.

Best regards,
	ladis

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/6] ARM: dts: am335x-phycore-som: Update NAND partition table
  2017-01-06 16:14               ` Tony Lindgren
@ 2017-01-06 18:20                 ` Brian Norris
  2017-01-06 18:43                   ` Tony Lindgren
  0 siblings, 1 reply; 17+ messages in thread
From: Brian Norris @ 2017-01-06 18:20 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jan 06, 2017 at 08:14:22AM -0800, Tony Lindgren wrote:
> * Adam Ford <aford173@gmail.com> [170106 08:06]:
> > On Fri, Jan 6, 2017 at 10:02 AM, Tony Lindgren <tony@atomide.com> wrote:
> > > * Teresa Remmet <t.remmet@phytec.de> [170106 01:28]:
> > >> Am Donnerstag, den 05.01.2017, 09:56 -0800 schrieb Brian Norris:
> > >> > On Thu, Jan 05, 2017 at 09:18:45AM -0800, Tony Lindgren wrote:
> > >> > > I'm suggesting we leave the kernel nodes empty and let u-boot
> > >> > > populate them, so maybe you guys can discuss this on the related
> > >> > > lists.
> > >> > That's an option. I've worked with platforms that did something like
> > >> > this, and that's really one of the only ways you can handle putting
> > >> > partition information in the device tree. You're really hamstringing
> > >> > yourself when you put all the partition information in the device
> > >> > tree.
> > >> > And it's just dumb once that gets codified in the kernel source tree.
> > >> >
> > >>
> > >> In our case the bootloader does pass the partition table to the kernel.
> > >> So it gets overwritten anyway. This was just more for backup,
> > >> if someone uses a different bootloader. But I'm fine with removing the
> > >> nand partition table completely from the kernel device tree.
> > >> Same with the SPI nor partition table.

Ah, well if these are essentially just a backup, then why do they need
changed at all? To be more precise about my "dumb" statement: it seems
unwise to assume that all systems using a particular board will have the
same partition layout. So *relying* on the in-kernel DTS(I) files to
have a universal partition layout would likely cause problems.

I don't have much problem with keeping a sample layout there as a
backup, if you find it useful. But it seems like it will be hard to
argue that you can ever change it in the future.

Anyway, the ofpart mechanism is there, and it's fine to use it, but it's
up to you to understand the implications and manage the backwards
compatibility problems :)

> > >> I will send patches for this.
> > >
> > > OK thanks! Also thank you Brian for your comments.
> > >
> > 
> > Tony - I tested leaving the partition info as-is with the updates from
> > the bootloader and it works.  Would you prefer that I match Brian and
> > remove the partition table completely, or should I just leave my board
> > alone?
> > 
> > I am good either way.
> 
> OK. How about let's remove the partitions from kernel for v4.11 as
> clean-up then for cases where the bootloader might change them?

I don't have much stake in this but...if there were any systems using
the backup layout (i.e., the in-kernel partition layout), wouldn't that
break them? Is there a problem with just leaving them alone?

Brian

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/6] ARM: dts: am335x-phycore-som: Update NAND partition table
  2017-01-06 18:20                 ` Brian Norris
@ 2017-01-06 18:43                   ` Tony Lindgren
  0 siblings, 0 replies; 17+ messages in thread
From: Tony Lindgren @ 2017-01-06 18:43 UTC (permalink / raw)
  To: linux-arm-kernel

* Brian Norris <briannorris@chromium.org> [170106 10:21]:
> On Fri, Jan 06, 2017 at 08:14:22AM -0800, Tony Lindgren wrote:
> > * Adam Ford <aford173@gmail.com> [170106 08:06]:
> > > On Fri, Jan 6, 2017 at 10:02 AM, Tony Lindgren <tony@atomide.com> wrote:
> > > > * Teresa Remmet <t.remmet@phytec.de> [170106 01:28]:
> > > >> Am Donnerstag, den 05.01.2017, 09:56 -0800 schrieb Brian Norris:
> > > >> > On Thu, Jan 05, 2017 at 09:18:45AM -0800, Tony Lindgren wrote:
> > > >> > > I'm suggesting we leave the kernel nodes empty and let u-boot
> > > >> > > populate them, so maybe you guys can discuss this on the related
> > > >> > > lists.
> > > >> > That's an option. I've worked with platforms that did something like
> > > >> > this, and that's really one of the only ways you can handle putting
> > > >> > partition information in the device tree. You're really hamstringing
> > > >> > yourself when you put all the partition information in the device
> > > >> > tree.
> > > >> > And it's just dumb once that gets codified in the kernel source tree.
> > > >> >
> > > >>
> > > >> In our case the bootloader does pass the partition table to the kernel.
> > > >> So it gets overwritten anyway. This was just more for backup,
> > > >> if someone uses a different bootloader. But I'm fine with removing the
> > > >> nand partition table completely from the kernel device tree.
> > > >> Same with the SPI nor partition table.
> 
> Ah, well if these are essentially just a backup, then why do they need
> changed at all? To be more precise about my "dumb" statement: it seems
> unwise to assume that all systems using a particular board will have the
> same partition layout. So *relying* on the in-kernel DTS(I) files to
> have a universal partition layout would likely cause problems.
> 
> I don't have much problem with keeping a sample layout there as a
> backup, if you find it useful. But it seems like it will be hard to
> argue that you can ever change it in the future.
> 
> Anyway, the ofpart mechanism is there, and it's fine to use it, but it's
> up to you to understand the implications and manage the backwards
> compatibility problems :)
> 
> > > >> I will send patches for this.
> > > >
> > > > OK thanks! Also thank you Brian for your comments.
> > > >
> > > 
> > > Tony - I tested leaving the partition info as-is with the updates from
> > > the bootloader and it works.  Would you prefer that I match Brian and
> > > remove the partition table completely, or should I just leave my board
> > > alone?
> > > 
> > > I am good either way.
> > 
> > OK. How about let's remove the partitions from kernel for v4.11 as
> > clean-up then for cases where the bootloader might change them?
> 
> I don't have much stake in this but...if there were any systems using
> the backup layout (i.e., the in-kernel partition layout), wouldn't that
> break them? Is there a problem with just leaving them alone?

Yeah I guess it depends on the device and it's bootloader versions.

Regards,

Tony

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2017-01-06 18:43 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-05 14:50 [PATCH 0/6] ARM: dts: phyBOARD-WEGA-AM335x updates Teresa Remmet
2017-01-05 14:50 ` [PATCH 1/6] ARM: dts: am335x-phycore-som: Update NAND partition table Teresa Remmet
2017-01-05 15:36   ` Tony Lindgren
2017-01-05 17:18     ` Tony Lindgren
2017-01-05 17:56       ` Brian Norris
2017-01-06  9:27         ` Teresa Remmet
2017-01-06 16:02           ` Tony Lindgren
2017-01-06 16:05             ` Adam Ford
2017-01-06 16:14               ` Tony Lindgren
2017-01-06 18:20                 ` Brian Norris
2017-01-06 18:43                   ` Tony Lindgren
2017-01-06 17:39         ` Ladislav Michl
2017-01-05 14:50 ` [PATCH 2/6] ARM: dts: am335x-phycore-som: Update compatible string for spi nor Teresa Remmet
2017-01-05 14:50 ` [PATCH 3/6] ARM: dts: am335x-phycore-som: Add i2c temp sensor Teresa Remmet
2017-01-05 14:50 ` [PATCH 4/6] ARM: dts: am335x-wega: Set USB0 mode to otg Teresa Remmet
2017-01-05 14:50 ` [PATCH 5/6] ARM: dts: am335x-phycore-som: Update ethernet phy node Teresa Remmet
2017-01-05 14:50 ` [PATCH 6/6] ARM: dts: am335x-wega: " Teresa Remmet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).