ARM: BCM5301X: Enable UART0 for SmartRG SR-400AC
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
@@ -118,3 +118,7 @@ }; }; }; + +&uart0 { + status = "okay"; +};
Signature · 1 line
2.1.0
PATCH 1/1 ARM: BCM5301X: Enable UART0 for SmartRG SR-400AC
Quoted 3 lines · Florian Fainelli
Enable the use of UART0 by overriding its default status property.
Signed-off-by Florian Fainelli <[email protected]>
Thanks Florian! I've tested this patch atop next-20150624 on the smartrg-sr400ac, and confirmed UART0 is working properly.
Cheers,
Tyler
PATCH 1/1 ARM: BCM5301X: Enable UART0 for SmartRG SR-400AC
In reply to Florian FainelliQuoted 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.
PATCH 1/1 ARM: BCM5301X: Enable UART0 for SmartRG SR-400AC
In reply to Florian FainelliQuoted 12 lines · Florian Fainelli
Enable the use of UART0 by overriding its default status property.
Signed-off-by Florian Fainelli <[email protected]>--- arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts | 4 ++++ 1 file changed, 4 insertions(+)arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts +0
-0
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?
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.
Signed-off-by Florian Fainelli <[email protected]>--- arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts | 4 ++++ 1 file changed, 4 insertions(+)arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts +0
-0arch/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 { };
andchipcommonA { 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
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.
Signed-off-by Florian Fainelli <[email protected]>--- arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts | 4 ++++ 1 file changed, 4 insertions(+)arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts +0
-0arch/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?
PATCH 1/1 ARM: BCM5301X: Enable UART0 for SmartRG SR-400AC
In reply to Florian FainelliQuoted 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.
Signed-off-by Florian Fainelli <[email protected]>--- arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts | 4 ++++ 1 file changed, 4 insertions(+)arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts +0
-0arch/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 { };
andchipcommonA { 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
PATCH 1/1 ARM: BCM5301X: Enable UART0 on tested devices
In reply to Florian FainelliThere 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
@@ -135,3 +135,7 @@ }; }; }; + +&uart0 { + status = "okay"; +};
arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts +4 -0
@@ -55,3 +55,7 @@ }; }; }; + +&uart0 { + status = "okay"; +};
arch/arm/boot/dts/bcm4708-netgear-r6250.dts +4 -0
@@ -92,3 +92,7 @@ }; }; }; + +&uart0 { + status = "okay"; +};
arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts +4 -0
@@ -118,3 +118,7 @@ }; }; }; + +&uart0 { + status = "okay"; +};
arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts +4 -0
@@ -122,3 +122,7 @@ }; }; }; + +&uart0 { + status = "okay"; +};
Signature · 1 line
1.8.4.5
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.
Signed-off-by Rafa? Mi?ecki <[email protected]>
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(+)
PATCH v2 1/1 ARM: BCM5301X: Enable UART0 on tested devices
In reply to Rafał MiłeckiThere 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
@@ -135,3 +135,7 @@ }; }; }; + +&uart0 { + status = "okay"; +};
arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts +4 -0
@@ -55,3 +55,7 @@ }; }; }; + +&uart0 { + status = "okay"; +};
arch/arm/boot/dts/bcm4708-netgear-r6250.dts +4 -10
@@ -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
@@ -118,3 +118,7 @@ }; }; }; + +&uart0 { + status = "okay"; +};
arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts +4 -0
@@ -122,3 +122,7 @@ }; }; }; + +&uart0 { + status = "okay"; +};
Signature · 1 line
1.8.4.5
Florian Fainelli
AppliedPATCH 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.
Signed-off-by Rafa? Mi?ecki <[email protected]>Acked-by Hauke Mehrtens <[email protected]>
Applied to devicetree/next, thanks!
Signature · 1 line
Florian