Skip to contentSkip to conversation

ARM: BCM5301X: Enable UART0 for SmartRG SR-400AC

PATCH New Florian Fainelli 4 participants 11 messages Jun 23, 2015 – Jul 8, 2015 Device tree bindings

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: BCM5301X: Enable UART0 for SmartRG SR-400AC

Enable the use of UART0 by overriding its default status property.

---
 arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts +4 -0
index d6a033b97c70..64a5e8ab65e0 100644
@@ -118,3 +118,7 @@
 		};
 	};
 };
+
+&uart0 {
+	status = "okay";
+};
Signature · 1 line
2.1.0
#2 lore raw

PATCH 1/1 ARM: BCM5301X: Enable UART0 for SmartRG SR-400AC

In reply to Florian Fainelli
Quoted 1 line · Florian Fainelli

Enable the use of UART0 by overriding its default status property.

Give me 2-3 days to look at this, please.

#3 lore raw

PATCH 1/1 ARM: BCM5301X: Enable UART0 for SmartRG SR-400AC

In reply to Florian Fainelli
Quoted 12 lines · Florian Fainelli

Enable the use of UART0 by overriding its default status property.

---
 arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts +0 -0
index d6a033b97c70..64a5e8ab65e0 100644

arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts line 124

Quoted 7 lines
arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts +4 -0
@@ -118,3 +118,7 @@
                };
        };
 };
+
+&uart0 {
+       status = "okay";
+};

We have many more changes like this in OpenWrt, I just didn't upstream them because of current chipcommonA state.

It was added before we got "brcm,bus-axi" and I believe Hauke wanted move it to the "correct" place at some point. Since UART is part of ChipCommon device and ChipCommon is part of "brcm,bus-axi",.I guess we should add UARTs as a ChipCommon device subnodes. We already have

chipcommon: chipcommon at 0 {
        reg = <0x00000000 0x1000>;

        gpio-controller;
        #gpio-cells = <2>;
};

, is it possible to move UARTs there?

I'm not sure if this UART cleanup should block your change. I guess it depends on the way it'll finally look like.

I'm also wondering: is there any preference between overwriting status with something like
&uart0 { };
and

chipcommonA {
    uart0: serial at 0300 { };
};

? I don't know DT that well, just asking.

Signature · 1 line
Rafa?
#4 lore raw

PATCH 1/1 ARM: BCM5301X: Enable UART0 for SmartRG SR-400AC

Le 06/27/15 15:08, Rafa? Mi?ecki a ?crit :

Quoted 34 lines · Florian Fainelli
Quoted 12 lines

Enable the use of UART0 by overriding its default status property.

---
 arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts +0 -0
index d6a033b97c70..64a5e8ab65e0 100644

arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts line 124

Quoted 7 lines
arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts +4 -0
@@ -118,3 +118,7 @@
                };
        };
 };
+
+&uart0 {
+       status = "okay";
+};

We have many more changes like this in OpenWrt, I just didn't upstream them because of current chipcommonA state.

It was added before we got "brcm,bus-axi" and I believe Hauke wanted move it to the "correct" place at some point. Since UART is part of ChipCommon device and ChipCommon is part of "brcm,bus-axi",.I guess we should add UARTs as a ChipCommon device subnodes. We already have

chipcommon: chipcommon at 0 {
        reg = <0x00000000 0x1000>;

        gpio-controller;
        #gpio-cells = <2>;
};
Quoted 4 lines

, is it possible to move UARTs there?

I'm not sure if this UART cleanup should block your change. I guess it depends on the way it'll finally look like.

I do not think it will, see below:

Quoted 9 lines

I'm also wondering: is there any preference between overwriting status with something like
&uart0 { };
and

chipcommonA {
    uart0: serial at 0300 { };
};

? I don't know DT that well, just asking.

An alias can be located pretty much anywhere in the DTS as long as the name is unique, which is why I took this approach, because I do not have to do something like this and need to know the full depth of the tree:

foo0 {
	bar0 {
		baz0 {
			status = "okay";
		};
	};
};

This is both more compact, and more robust to re-parenting the UART0 node in case you ever wanted to do it in the future.

I will happily fix the other DTSes to use that convention if we agree this is the route to take.

Thanks!
--
Florian

#5 lore raw

PATCH 1/1 ARM: BCM5301X: Enable UART0 for SmartRG SR-400AC

Quoted 37 lines · Florian Fainelli

Le 06/27/15 15:08, Rafa? Mi?ecki a ?crit :

Quoted 36 lines · Florian Fainelli
Quoted 12 lines

Enable the use of UART0 by overriding its default status property.

---
 arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts +0 -0
index d6a033b97c70..64a5e8ab65e0 100644

arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts line 124

Quoted 7 lines
arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts +4 -0
@@ -118,3 +118,7 @@
                };
        };
 };
+
+&uart0 {
+       status = "okay";
+};

We have many more changes like this in OpenWrt, I just didn't upstream them because of current chipcommonA state.

It was added before we got "brcm,bus-axi" and I believe Hauke wanted move it to the "correct" place at some point. Since UART is part of ChipCommon device and ChipCommon is part of "brcm,bus-axi",.I guess we should add UARTs as a ChipCommon device subnodes. We already have

chipcommon: chipcommon at 0 {
        reg = <0x00000000 0x1000>;

        gpio-controller;
        #gpio-cells = <2>;
};

, is it possible to move UARTs there?

Quoted 4 lines
Quoted 2 lines

I'm not sure if this UART cleanup should block your change. I guess it depends on the way it'll finally look like.

I do not think it will, see below:

You answered about using &uart0 instead a whole path and it sounds OK.

What about moving this whole chipcommonA node into "chipcommon: chipcommon at 0"? Hauke did you try that?

Signature · 1 line
Rafa?
#6 lore raw

PATCH 1/1 ARM: BCM5301X: Enable UART0 for SmartRG SR-400AC

In reply to Florian Fainelli
Quoted 36 lines · Florian Fainelli

Le 06/27/15 15:08, Rafa? Mi?ecki a ?crit :

Quoted 35 lines · Florian Fainelli
Quoted 12 lines

Enable the use of UART0 by overriding its default status property.

---
 arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts +0 -0
index d6a033b97c70..64a5e8ab65e0 100644

arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts line 124

Quoted 7 lines
arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts +4 -0
@@ -118,3 +118,7 @@
                };
        };
 };
+
+&uart0 {
+       status = "okay";
+};

We have many more changes like this in OpenWrt, I just didn't upstream them because of current chipcommonA state.

It was added before we got "brcm,bus-axi" and I believe Hauke wanted move it to the "correct" place at some point. Since UART is part of ChipCommon device and ChipCommon is part of "brcm,bus-axi",.I guess we should add UARTs as a ChipCommon device subnodes. We already have

chipcommon: chipcommon at 0 {
        reg = <0x00000000 0x1000>;

        gpio-controller;
        #gpio-cells = <2>;
};

, is it possible to move UARTs there?

I added it at the beginning of the port so I have serial, even without adding support for bcma. I haven't look at that part later, but it should go into the chipcommon part. Thats for the patches.

Quoted 28 lines
Quoted 3 lines

I'm not sure if this UART cleanup should block your change. I guess it depends on the way it'll finally look like.

I do not think it will, see below:

Quoted 9 lines

I'm also wondering: is there any preference between overwriting status with something like
&uart0 { };
and

chipcommonA {
    uart0: serial at 0300 { };
};

? I don't know DT that well, just asking.

An alias can be located pretty much anywhere in the DTS as long as the name is unique, which is why I took this approach, because I do not have to do something like this and need to know the full depth of the tree:

foo0 {
	bar0 {
		baz0 {
			status = "okay";
		};
	};
};
Quoted 5 lines

This is both more compact, and more robust to re-parenting the UART0 node in case you ever wanted to do it in the future.

I will happily fix the other DTSes to use that convention if we agree this is the route to take.

I haven't used that earlier because I did not know of this feature. I think Rafa? already did or is currently doing this steps.

Hauke

#7 lore raw

PATCH 1/1 ARM: BCM5301X: Enable UART0 on tested devices

In reply to Florian Fainelli

There are two possible UARTs so we have (both of) them disabled by default. Override uart0 status on devices that were verified to use it.

---
 arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts  | 4 ++++
 arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts       | 4 ++++
 arch/arm/boot/dts/bcm4708-netgear-r6250.dts        | 4 ++++
 arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts      | 4 ++++
 arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts | 4 ++++
 5 files changed, 20 insertions(+)
arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts +4 -0
index 24f0ab5..42dcdfb 100644
@@ -135,3 +135,7 @@
 		};
 	};
 };
+
+&uart0 {
+	status = "okay";
+};
arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts +4 -0
index f039393..f18e80e 100644
@@ -55,3 +55,7 @@
 		};
 	};
 };
+
+&uart0 {
+	status = "okay";
+};
arch/arm/boot/dts/bcm4708-netgear-r6250.dts +4 -0
index 326ce8f..50324b3 100644
@@ -92,3 +92,7 @@
 		};
 	};
 };
+
+&uart0 {
+	status = "okay";
+};
arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts +4 -0
index d6a033b..64a5e8a 100644
@@ -118,3 +118,7 @@
 		};
 	};
 };
+
+&uart0 {
+	status = "okay";
+};
arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts +4 -0
index bb0cb0b..38f0c00 100644
@@ -122,3 +122,7 @@
 		};
 	};
 };
+
+&uart0 {
+	status = "okay";
+};
Signature · 1 line
1.8.4.5
#8 lore raw

PATCH 1/1 ARM: BCM5301X: Enable UART0 on tested devices

Quoted 4 lines · Rafa? Mi?ecki

There are two possible UARTs so we have (both of) them disabled by default. Override uart0 status on devices that were verified to use it.

Quoted 8 lines
---
 arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts  | 4 ++++
 arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts       | 4 ++++
 arch/arm/boot/dts/bcm4708-netgear-r6250.dts        | 4 ++++
 arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts      | 4 ++++
 arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts | 4 ++++
 5 files changed, 20 insertions(+)
#9 lore raw

PATCH v2 1/1 ARM: BCM5301X: Enable UART0 on tested devices

In reply to Rafał Miłecki

There are two possible UARTs so we have (both of) them disabled by default. Override uart0 status on devices that were verified to use it. In case of Netgear R6250 also drop an old (and invalid) overwrite. It doesn't have uart1 connected.

---
V2: Drop old overwrite on R6250

---
 arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts  |  4 ++++
 arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts       |  4 ++++
 arch/arm/boot/dts/bcm4708-netgear-r6250.dts        | 14 ++++----------
 arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts      |  4 ++++
 arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts |  4 ++++
 5 files changed, 20 insertions(+), 10 deletions(-)
arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts +4 -0
index 24f0ab5..42dcdfb 100644
@@ -135,3 +135,7 @@
 		};
 	};
 };
+
+&uart0 {
+	status = "okay";
+};
arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts +4 -0
index f039393..f18e80e 100644
@@ -55,3 +55,7 @@
 		};
 	};
 };
+
+&uart0 {
+	status = "okay";
+};
arch/arm/boot/dts/bcm4708-netgear-r6250.dts +4 -10
index 326ce8f..64b8d10 100644
@@ -24,16 +24,6 @@
 		reg = <0x00000000 0x08000000>;
 	};
 
-	chipcommonA {
-		uart0: serial at 0300 {
-			status = "okay";
-		};
-
-		uart1: serial at 0400 {
-			status = "okay";
-		};
-	};
-
 	leds {
 		compatible = "gpio-leds";
 
@@ -92,3 +82,7 @@
 		};
 	};
 };
+
+&uart0 {
+	status = "okay";
+};
arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts +4 -0
index d6a033b..64a5e8a 100644
@@ -118,3 +118,7 @@
 		};
 	};
 };
+
+&uart0 {
+	status = "okay";
+};
arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts +4 -0
index bb0cb0b..38f0c00 100644
@@ -122,3 +122,7 @@
 		};
 	};
 };
+
+&uart0 {
+	status = "okay";
+};
Signature · 1 line
1.8.4.5
author Applied
#10 lore raw

PATCH v2 1/1 ARM: BCM5301X: Enable UART0 on tested devices

Quoted 7 lines · Rafa? Mi?ecki

There are two possible UARTs so we have (both of) them disabled by default. Override uart0 status on devices that were verified to use it. In case of Netgear R6250 also drop an old (and invalid) overwrite. It doesn't have uart1 connected.

Applied to devicetree/next, thanks!

Signature · 1 line
Florian