arm64: dts: NS2: Add all of the UARTs
PATCH 1/2 arm64: dts: NS2: Add all of the UARTs
Add all of the UARTs present on NS2 and enable them in the SVK device tree file. Also, do some magic to make sure that uart3 is discovered as ttyS0 (as that is the console UART).
--- arch/arm64/boot/dts/broadcom/ns2-svk.dts | 16 ++++++++++++++++ arch/arm64/boot/dts/broadcom/ns2.dtsi | 30 ++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+)
arch/arm64/boot/dts/broadcom/ns2-svk.dts +16 -0
@@ -40,10 +40,14 @@ aliases { serial0 = &uart3; + serial1 = &uart0; + serial2 = &uart1; + serial3 = &uart2; }; chosen { stdout-path = "serial0:115200n8"; + bootargs = "earlycon=uart8250,mmio32,0x66130000"; }; memory {
@@ -68,6 +72,18 @@ status = "ok"; }; +&uart0 { + status = "ok"; +}; + +&uart1 { + status = "ok"; +}; + +&uart2 { + status = "ok"; +}; + &uart3 { status = "ok"; };
arch/arm64/boot/dts/broadcom/ns2.dtsi +30 -0
@@ -357,6 +357,36 @@ status = "disabled"; }; + uart0: serial at 66100000 { + compatible = "snps,dw-apb-uart"; + reg = <0x66100000 0x100>; + interrupts = <GIC_SPI 390 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&iprocslow>; + reg-shift = <2>; + reg-io-width = <4>; + status = "disabled"; + }; + + uart1: serial at 66110000 { + compatible = "snps,dw-apb-uart"; + reg = <0x66110000 0x100>; + interrupts = <GIC_SPI 391 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&iprocslow>; + reg-shift = <2>; + reg-io-width = <4>; + status = "disabled"; + }; + + uart2: serial at 66120000 { + compatible = "snps,dw-apb-uart"; + reg = <0x66120000 0x100>; + interrupts = <GIC_SPI 392 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&iprocslow>; + reg-shift = <2>; + reg-io-width = <4>; + status = "disabled"; + }; + uart3: serial at 66130000 { compatible = "snps,dw-apb-uart"; reg = <0x66130000 0x100>;
Signature · 1 line
1.9.1
PATCH 2/2 arm64: dts: NS2: Add CCI-400 PMU support
Add support to the Northstar 2 Device tree file for the ARM CCI-400 PMU.
--- arch/arm64/boot/dts/broadcom/ns2.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
arch/arm64/boot/dts/broadcom/ns2.dtsi +20 -0
@@ -279,6 +279,26 @@ IRQ_TYPE_LEVEL_HIGH)>; }; + cci at 65590000 { + compatible = "arm,cci-400"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0x65590000 0x1000>; + ranges = <0 0x65590000 0x10000>; + + pmu at 9000 { + compatible = "arm,cci-400-pmu,r1", + "arm,cci-400-pmu"; + reg = <0x9000 0x4000>; + interrupts = <GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 347 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 348 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 349 IRQ_TYPE_LEVEL_HIGH>; + }; + }; + timer0: timer at 66030000 { compatible = "arm,sp804", "arm,primecell"; reg = <0x66030000 0x1000>;
Signature · 1 line
1.9.1
Re: [PATCH 2/2] arm64: dts: NS2: Add CCI-400 PMU support
Quoted 3 lines · Jon Mason
Add support to the Northstar 2 Device tree file for the ARM CCI-400 PMU.
Signed-off-by Jon Mason <[email protected]>
Also applied to devicetree-arm64/next, thanks Jon!
Signature · 1 line
Florian
Quoted 16 lines · Jon Mason
Add all of the UARTs present on NS2 and enable them in the SVK device tree file. Also, do some magic to make sure that uart3 is discovered as ttyS0 (as that is the console UART).
Signed-off-by Jon Mason <[email protected]>--- arch/arm64/boot/dts/broadcom/ns2-svk.dts | 16 ++++++++++++++++ arch/arm64/boot/dts/broadcom/ns2.dtsi | 30 ++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+)arch/arm64/boot/dts/broadcom/ns2-svk.dts +0
-0@@ -40,10 +40,14 @@
arch/arm64/boot/dts/broadcom/ns2-svk.dts line 50
Quoted 10 lines
arch/arm64/boot/dts/broadcom/ns2-svk.dts +4
-0aliases { serial0 = &uart3; + serial1 = &uart0; + serial2 = &uart1; + serial3 = &uart2; }; chosen { stdout-path = "serial0:115200n8"; + bootargs = "earlycon=uart8250,mmio32,0x66130000";
Hi Jon,
I submit a patch[1], with it, we can use earlycon without option to enable early console for "snps,dw-apb-uart", could you help me to test it, thanks.
BRs,
Kefeng
Quoted 64 lines
arch/arm64/boot/dts/broadcom/ns2-svk.dts +12
-0}; memory {@@ -68,6 +72,18 @@ status = "ok"; }; +&uart0 { + status = "ok"; +}; + +&uart1 { + status = "ok"; +}; + +&uart2 { + status = "ok"; +}; + &uart3 { status = "ok"; };arch/arm64/boot/dts/broadcom/ns2.dtsi +30
-0@@ -357,6 +357,36 @@ status = "disabled"; }; + uart0: serial at 66100000 { + compatible = "snps,dw-apb-uart"; + reg = <0x66100000 0x100>; + interrupts = <GIC_SPI 390 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&iprocslow>; + reg-shift = <2>; + reg-io-width = <4>; + status = "disabled"; + }; + + uart1: serial at 66110000 { + compatible = "snps,dw-apb-uart"; + reg = <0x66110000 0x100>; + interrupts = <GIC_SPI 391 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&iprocslow>; + reg-shift = <2>; + reg-io-width = <4>; + status = "disabled"; + }; + + uart2: serial at 66120000 { + compatible = "snps,dw-apb-uart"; + reg = <0x66120000 0x100>; + interrupts = <GIC_SPI 392 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&iprocslow>; + reg-shift = <2>; + reg-io-width = <4>; + status = "disabled"; + }; + uart3: serial at 66130000 { compatible = "snps,dw-apb-uart"; reg = <0x66130000 0x100>;
Quoted 34 lines · Kefeng Wang
Quoted 8 lines · Jon Mason
Add all of the UARTs present on NS2 and enable them in the SVK device tree file. Also, do some magic to make sure that uart3 is discovered as ttyS0 (as that is the console UART).
Signed-off-by Jon Mason <[email protected]>--- arch/arm64/boot/dts/broadcom/ns2-svk.dts | 16 ++++++++++++++++ arch/arm64/boot/dts/broadcom/ns2.dtsi | 30++++++++++++++++++++++++++++++
Review
Quoted 3 lines
2 files changed, 46 insertions(+)(quoted diff) +0
-0
b/arch/arm64/boot/dts/broadcom/ns2-svk.dtsQuoted 5 lines
index 7cd3640..b062a44 100644
arch/arm64/boot/dts/broadcom/ns2-svk.dts +0
-0@@ -40,10 +40,14 @@arch/arm64/boot/dts/broadcom/ns2-svk.dts line 50
Quoted 10 lines
arch/arm64/boot/dts/broadcom/ns2-svk.dts +4
-0aliases { serial0 = &uart3; + serial1 = &uart0; + serial2 = &uart1; + serial3 = &uart2; }; chosen { stdout-path = "serial0:115200n8"; + bootargs = "earlycon=uart8250,mmio32,0x66130000";Hi Jon,
Quoted 4 lines
I submit a patch[1], with it, we can use earlycon without option to enable early console
for "snps,dw-apb-uart", could you help me to test it, thanks.
Adding your change and removing the line above does not cause earlycon to work for me. Is there any additional changes necessary for this to work?
Thanks,
Jon
Quoted 74 lines
BRs,
Kefeng[1] https://lkml.org/lkml/2016/5/11/34
Review
Quoted 23 lines
arch/arm64/boot/dts/broadcom/ns2-svk.dts +12
-0}; memory {@@ -68,6 +72,18 @@ status = "ok"; }; +&uart0 { + status = "ok"; +}; + +&uart1 { + status = "ok"; +}; + +&uart2 { + status = "ok"; +}; + &uart3 { status = "ok"; };(quoted diff) +0
-0
b/arch/arm64/boot/dts/broadcom/ns2.dtsiQuoted 41 lines
index 788ed8f..c77a9e8 100644
arch/arm64/boot/dts/broadcom/ns2.dtsi +30
-0@@ -357,6 +357,36 @@ status = "disabled"; }; + uart0: serial@66100000 { + compatible = "snps,dw-apb-uart"; + reg = <0x66100000 0x100>; + interrupts = <GIC_SPI 390 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&iprocslow>; + reg-shift = <2>; + reg-io-width = <4>; + status = "disabled"; + }; + + uart1: serial@66110000 { + compatible = "snps,dw-apb-uart"; + reg = <0x66110000 0x100>; + interrupts = <GIC_SPI 391 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&iprocslow>; + reg-shift = <2>; + reg-io-width = <4>; + status = "disabled"; + }; + + uart2: serial@66120000 { + compatible = "snps,dw-apb-uart"; + reg = <0x66120000 0x100>; + interrupts = <GIC_SPI 392 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&iprocslow>; + reg-shift = <2>; + reg-io-width = <4>; + status = "disabled"; + }; + uart3: serial@66130000 { compatible = "snps,dw-apb-uart"; reg = <0x66130000 0x100>;
Hi Kefeng,
Quoted 42 lines · Jon Mason
On Thu, May 12, 2016 at 2:16 AM, Kefeng Wang <[email protected] <mailto:[email protected]>> wrote:
On 2016/5/12 6:56, Jon Mason wrote: > Add all of the UARTs present on NS2 and enable them in the SVK device > tree file. Also, do some magic to make sure that uart3 is discovered as > ttyS0 (as that is the console UART). > > Signed-off-by: Jon Mason <jonmason at broadcom.com <mailto:[email protected]>> > --- > arch/arm64/boot/dts/broadcom/ns2-svk.dts | 16 ++++++++++++++++ > arch/arm64/boot/dts/broadcom/ns2.dtsi | 30 ++++++++++++++++++++++++++++++ > 2 files changed, 46 insertions(+) > > diff --git a/arch/arm64/boot/dts/broadcom/ns2-svk.dts b/arch/arm64/boot/dts/broadcom/ns2-svk.dts > index 7cd3640..b062a44 100644 > --- a/arch/arm64/boot/dts/broadcom/ns2-svk.dts > +++ b/arch/arm64/boot/dts/broadcom/ns2-svk.dts > @@ -40,10 +40,14 @@ > > aliases { > serial0 = &uart3; > + serial1 = &uart0; > + serial2 = &uart1; > + serial3 = &uart2; > }; > > chosen { > stdout-path = "serial0:115200n8"; > + bootargs = "earlycon=uart8250,mmio32,0x66130000"; Hi Jon, I submit a patch[1], with it, we can use earlycon without option to enable early console for "snps,dw-apb-uart", could you help me to test it, thanks.
Quoted 6 lines
Adding your change and removing the line above does not cause earlycon to work for me. Is there any additional changes necessary for this to work?
Thanks,
Jon
"OF_EARLYCON_DECLARE" doesn't seem to have a way to deal with DT properties? In the case of UART for NS2, it needs mmio32, configured with DT property "reg-io-width" set to 4. I don't think "OF_EARLYCON_DECLARE" is parsing that, which is likely the reason why it doesn't work for devices that required mmio32.
Thanks,
Ray
Quoted 45 lines · Ray Jui
Hi Kefeng,
Quoted 42 lines · Jon Mason
On Thu, May 12, 2016 at 2:16 AM, Kefeng Wang <[email protected] <mailto:[email protected]>> wrote:
On 2016/5/12 6:56, Jon Mason wrote: > Add all of the UARTs present on NS2 and enable them in the SVK device > tree file. Also, do some magic to make sure that uart3 is discovered as > ttyS0 (as that is the console UART). > > Signed-off-by: Jon Mason <jonmason at broadcom.com <mailto:[email protected]>> > --- > arch/arm64/boot/dts/broadcom/ns2-svk.dts | 16 ++++++++++++++++ > arch/arm64/boot/dts/broadcom/ns2.dtsi | 30 ++++++++++++++++++++++++++++++ > 2 files changed, 46 insertions(+) > > diff --git a/arch/arm64/boot/dts/broadcom/ns2-svk.dts b/arch/arm64/boot/dts/broadcom/ns2-svk.dts > index 7cd3640..b062a44 100644 > --- a/arch/arm64/boot/dts/broadcom/ns2-svk.dts > +++ b/arch/arm64/boot/dts/broadcom/ns2-svk.dts > @@ -40,10 +40,14 @@ > > aliases { > serial0 = &uart3; > + serial1 = &uart0; > + serial2 = &uart1; > + serial3 = &uart2; > }; > > chosen { > stdout-path = "serial0:115200n8"; > + bootargs = "earlycon=uart8250,mmio32,0x66130000"; Hi Jon, I submit a patch[1], with it, we can use earlycon without option to enable early console for "snps,dw-apb-uart", could you help me to test it, thanks.
Quoted 9 lines
Quoted 6 lines
Adding your change and removing the line above does not cause earlycon to work for me. Is there any additional changes necessary for this to work?
Thanks,
Jon"
OF_EARLYCON_DECLARE" doesn't seem to have a way to deal with DT properties? In the case of UART for NS2, it needs mmio32, configured with DT property "reg-io-width" set to 4. I don't think "OF_EARLYCON_DECLARE" is parsing that, which is likely the reason why it doesn't work for devices that required mmio32.
It should work, I test this in Hisi D02 board, it uses same uart and same configuration.
early_init_dt_scan_chosen_serial()
for (match = __earlycon_table; match < __earlycon_table_end; match++)
......
of_setup_earlycon() val = of_get_flat_dt_prop(node, "reg-io-width", NULL); // will obtain the reg-io-width and set iotype=mmio32 err = match->setup(&early_console_dev, options); // call early_serial8250_setup
Could you check it again, thanks,
Kefeng
Quoted 6 lines
Thanks,
Ray
.
Quoted 40 lines · Jon Mason
On Thu, May 12, 2016 at 2:16 AM, Kefeng Wang <wangkefeng.wang at huawei.com <mailto:[email protected]>> wrote:
On 2016/5/12 6:56, Jon Mason wrote: > Add all of the UARTs present on NS2 and enable them in the SVK device > tree file. Also, do some magic to make sure that uart3 is discovered as > ttyS0 (as that is the console UART). > > Signed-off-by: Jon Mason <jonmason at broadcom.com <mailto:[email protected]>> > --- > arch/arm64/boot/dts/broadcom/ns2-svk.dts | 16 ++++++++++++++++ > arch/arm64/boot/dts/broadcom/ns2.dtsi | 30 ++++++++++++++++++++++++++++++ > 2 files changed, 46 insertions(+) > > diff --git a/arch/arm64/boot/dts/broadcom/ns2-svk.dts b/arch/arm64/boot/dts/broadcom/ns2-svk.dts > index 7cd3640..b062a44 100644 > --- a/arch/arm64/boot/dts/broadcom/ns2-svk.dts > +++ b/arch/arm64/boot/dts/broadcom/ns2-svk.dts > @@ -40,10 +40,14 @@ > > aliases { > serial0 = &uart3; > + serial1 = &uart0; > + serial2 = &uart1; > + serial3 = &uart2; > }; > > chosen { > stdout-path = "serial0:115200n8"; > + bootargs = "earlycon=uart8250,mmio32,0x66130000"; Hi Jon, I submit a patch[1], with it, we can use earlycon without option to enable early console for "snps,dw-apb-uart", could you help me to test it, thanks.
Quoted 1 line
Adding your change and removing the line above does not cause earlycon to work for me. Is there any additional changes necessary for this to work?
With my patch, the bootargs still need contain earlycon, but no need uart8250,mmio32,0x66130000;
chosen {
stdout-path = "serial0:115200n8";
bootargs = "earlycon";
}Hope it would work.
BRs,
Kefeng
Quoted 78 lines
Thanks,
JonBRs, Kefeng [1] https://lkml.org/lkml/2016/5/11/34 > }; > > memory { > @@ -68,6 +72,18 @@ > status = "ok"; > }; > > +&uart0 { > + status = "ok"; > +}; > + > +&uart1 { > + status = "ok"; > +}; > + > +&uart2 { > + status = "ok"; > +}; > + > &uart3 { > status = "ok"; > }; > diff --git a/arch/arm64/boot/dts/broadcom/ns2.dtsi b/arch/arm64/boot/dts/broadcom/ns2.dtsi > index 788ed8f..c77a9e8 100644 > --- a/arch/arm64/boot/dts/broadcom/ns2.dtsi > +++ b/arch/arm64/boot/dts/broadcom/ns2.dtsi > @@ -357,6 +357,36 @@ > status = "disabled"; > }; > > + uart0: serial at 66100000 { > + compatible = "snps,dw-apb-uart"; > + reg = <0x66100000 0x100>; > + interrupts = <GIC_SPI 390 IRQ_TYPE_LEVEL_HIGH>; > + clocks = <&iprocslow>; > + reg-shift = <2>; > + reg-io-width = <4>; > + status = "disabled"; > + }; > + > + uart1: serial at 66110000 { > + compatible = "snps,dw-apb-uart"; > + reg = <0x66110000 0x100>; > + interrupts = <GIC_SPI 391 IRQ_TYPE_LEVEL_HIGH>; > + clocks = <&iprocslow>; > + reg-shift = <2>; > + reg-io-width = <4>; > + status = "disabled"; > + }; > + > + uart2: serial at 66120000 { > + compatible = "snps,dw-apb-uart"; > + reg = <0x66120000 0x100>; > + interrupts = <GIC_SPI 392 IRQ_TYPE_LEVEL_HIGH>; > + clocks = <&iprocslow>; > + reg-shift = <2>; > + reg-io-width = <4>; > + status = "disabled"; > + }; > + > uart3: serial at 66130000 { > compatible = "snps,dw-apb-uart"; > reg = <0x66130000 0x100>; >
Quoted 55 lines · Kefeng Wang
Quoted 3 lines · Jon Mason
On Thu, May 12, 2016 at 2:16 AM, Kefeng Wang <[email protected]
Quoted 5 lines · <mailto:[email protected]>> wrote:
On 2016/5/12 6:56, Jon Mason wrote:
> Add all of the UARTs present on NS2 and enable them in the SVKdevice
Quoted 1 line
Quoted 1 line
tree file. Also, do some magic to make sure that uart3 is
discovered as
Quoted 3 lines
Quoted 3 lines
ttyS0 (as that is the console UART).
Signed-off-by Jon Mason <[email protected] <mailto:Quoted 3 lines
Quoted 3 lines
--- arch/arm64/boot/dts/broadcom/ns2-svk.dts | 16 ++++++++++++++++ arch/arm64/boot/dts/broadcom/ns2.dtsi | 30++++++++++++++++++++++++++++++
Quoted 3 lines
Review
Quoted 3 lines
2 files changed, 46 insertions(+)(quoted diff) +0
-0
b/arch/arm64/boot/dts/broadcom/ns2-svk.dtsQuoted 12 lines
Quoted 12 lines
index 7cd3640..b062a44 100644
arch/arm64/boot/dts/broadcom/ns2-svk.dts +3
-0@@ -40,10 +40,14 @@ aliases { serial0 = &uart3; + serial1 = &uart0; + serial2 = &uart1; + serial3 = &uart2; };Quoted 7 lines
arch/arm64/boot/dts/broadcom/ns2-svk.dts line 50
Quoted 3 lines
arch/arm64/boot/dts/broadcom/ns2-svk.dts +1
-0chosen { stdout-path = "serial0:115200n8"; + bootargs = "earlycon=uart8250,mmio32,0x66130000";Hi Jon,
I submit a patch[1], with it, we can use earlycon without option to
enable early console
Quoted 4 lines
for "snps,dw-apb-uart", could you help me to test it, thanks.
Adding your change and removing the line above does not cause earlycon
to work for me. Is there any additional changes necessary for this to work? With my patch, the bootargs still need contain earlycon, but no need uart8250,mmio32,0x66130000;
Quoted 7 lines
chosen { stdout-path = "serial0:115200n8"; bootargs = "earlycon"; }Hope it would work.
I can confirm that with your change and the change to the bootargs you describe above, it works as desired. Was your change already accepted?
Thanks,
Jon
Quoted 88 lines
BRs,
KefengQuoted 27 lines
Thanks,
JonBRs, Kefeng [1] https://lkml.org/lkml/2016/5/11/34 > }; > > memory { > @@ -68,6 +72,18 @@ > status = "ok"; > }; > > +&uart0 { > + status = "ok"; > +}; > + > +&uart1 { > + status = "ok"; > +}; > +Quoted 8 lines
> +&uart2 { > + status = "ok"; > +}; > + > &uart3 { > status = "ok"; > }; > diff --git a/arch/arm64/boot/dts/broadcom/ns2.dtsi
b/arch/arm64/boot/dts/broadcom/ns2.dtsiQuoted 11 lines
arch/arm64/boot/dts/broadcom/ns2.dtsi line 363
Quoted 11 lines
index 788ed8f..c77a9e8 100644
arch/arm64/boot/dts/broadcom/ns2.dtsi +4
-0@@ -357,6 +357,36 @@ status = "disabled"; }; + uart0: serial@66100000 { + compatible = "snps,dw-apb-uart"; + reg = <0x66100000 0x100>; + interrupts = <GIC_SPI 390
IRQ_TYPE_LEVEL_HIGH>;Quoted 10 lines
arch/arm64/boot/dts/broadcom/ns2.dtsi
Quoted 10 lines
arch/arm64/boot/dts/broadcom/ns2.dtsi +10
-0+ clocks = <&iprocslow>; + reg-shift = <2>; + reg-io-width = <4>; + status = "disabled"; + }; + + uart1: serial@66110000 { + compatible = "snps,dw-apb-uart"; + reg = <0x66110000 0x100>; + interrupts = <GIC_SPI 391
IRQ_TYPE_LEVEL_HIGH>;Quoted 10 lines
arch/arm64/boot/dts/broadcom/ns2.dtsi
Quoted 10 lines
arch/arm64/boot/dts/broadcom/ns2.dtsi +10
-0+ clocks = <&iprocslow>; + reg-shift = <2>; + reg-io-width = <4>; + status = "disabled"; + }; + + uart2: serial@66120000 { + compatible = "snps,dw-apb-uart"; + reg = <0x66120000 0x100>; + interrupts = <GIC_SPI 392
IRQ_TYPE_LEVEL_HIGH>;Quoted 12 lines
Quoted 10 lines
arch/arm64/boot/dts/broadcom/ns2.dtsi +6
-0+ clocks = <&iprocslow>; + reg-shift = <2>; + reg-io-width = <4>; + status = "disabled"; + }; + uart3: serial@66130000 { compatible = "snps,dw-apb-uart"; reg = <0x66130000 0x100>;
Quoted 58 lines · Jon Mason
On Thu, May 12, 2016 at 10:09 PM, Kefeng Wang <wangkefeng.wang at huawei.com <mailto:[email protected]>> wrote:
On 2016/5/12 22:46, Jon Mason wrote: > > > On Thu, May 12, 2016 at 2:16 AM, Kefeng Wang <wangkefeng.wang at huawei.com <mailto:[email protected]> <mailto:wangkefeng.wang at huawei.com <mailto:[email protected]>>> wrote: > > > > On 2016/5/12 6:56, Jon Mason wrote: > > Add all of the UARTs present on NS2 and enable them in the SVK device > > tree file. Also, do some magic to make sure that uart3 is discovered as > > ttyS0 (as that is the console UART). > > > > Signed-off-by: Jon Mason <jonmason at broadcom.com <mailto:[email protected]> <mailto:jonmason at broadcom.com <mailto:[email protected]>>> > > --- > > arch/arm64/boot/dts/broadcom/ns2-svk.dts | 16 ++++++++++++++++ > > arch/arm64/boot/dts/broadcom/ns2.dtsi | 30 ++++++++++++++++++++++++++++++ > > 2 files changed, 46 insertions(+) > > > > diff --git a/arch/arm64/boot/dts/broadcom/ns2-svk.dts b/arch/arm64/boot/dts/broadcom/ns2-svk.dts > > index 7cd3640..b062a44 100644 > > --- a/arch/arm64/boot/dts/broadcom/ns2-svk.dts > > +++ b/arch/arm64/boot/dts/broadcom/ns2-svk.dts > > @@ -40,10 +40,14 @@ > > > > aliases { > > serial0 = &uart3; > > + serial1 = &uart0; > > + serial2 = &uart1; > > + serial3 = &uart2; > > }; > > > > chosen { > > stdout-path = "serial0:115200n8"; > > + bootargs = "earlycon=uart8250,mmio32,0x66130000"; > > Hi Jon, > > I submit a patch[1], with it, we can use earlycon without option to enable early console > for "snps,dw-apb-uart", could you help me to test it, thanks. > > > Adding your change and removing the line above does not cause earlycon to work for me. Is there any additional changes necessary for this to work? With my patch, the bootargs still need contain earlycon, but no need uart8250,mmio32,0x66130000; chosen { stdout-path = "serial0:115200n8"; bootargs = "earlycon"; } Hope it would work.
Quoted 2 lines
I can confirm that with your change and the change to the bootargs you describe above, it works as desired. Was your change already accepted?
Great, thanks a lot. it is still being reviewing for now and waiting for response for now.
BRs,
Kefeng
Quoted 88 lines
Thanks,
JonBRs, Kefeng > > Thanks, > Jon > > > > BRs, > Kefeng > > > [1] https://lkml.org/lkml/2016/5/11/34 > > > }; > > > > memory { > > @@ -68,6 +72,18 @@ > > status = "ok"; > > }; > > > > +&uart0 { > > + status = "ok"; > > +}; > > + > > +&uart1 { > > + status = "ok"; > > +}; > > + > > +&uart2 { > > + status = "ok"; > > +}; > > + > > &uart3 { > > status = "ok"; > > }; > > diff --git a/arch/arm64/boot/dts/broadcom/ns2.dtsi b/arch/arm64/boot/dts/broadcom/ns2.dtsi > > index 788ed8f..c77a9e8 100644 > > --- a/arch/arm64/boot/dts/broadcom/ns2.dtsi > > +++ b/arch/arm64/boot/dts/broadcom/ns2.dtsi > > @@ -357,6 +357,36 @@ > > status = "disabled"; > > }; > > > > + uart0: serial at 66100000 { > > + compatible = "snps,dw-apb-uart"; > > + reg = <0x66100000 0x100>; > > + interrupts = <GIC_SPI 390 IRQ_TYPE_LEVEL_HIGH>; > > + clocks = <&iprocslow>; > > + reg-shift = <2>; > > + reg-io-width = <4>; > > + status = "disabled"; > > + }; > > + > > + uart1: serial at 66110000 { > > + compatible = "snps,dw-apb-uart"; > > + reg = <0x66110000 0x100>; > > + interrupts = <GIC_SPI 391 IRQ_TYPE_LEVEL_HIGH>; > > + clocks = <&iprocslow>; > > + reg-shift = <2>; > > + reg-io-width = <4>; > > + status = "disabled"; > > + }; > > + > > + uart2: serial at 66120000 { > > + compatible = "snps,dw-apb-uart"; > > + reg = <0x66120000 0x100>; > > + interrupts = <GIC_SPI 392 IRQ_TYPE_LEVEL_HIGH>; > > + clocks = <&iprocslow>; > > + reg-shift = <2>; > > + reg-io-width = <4>; > > + status = "disabled"; > > + }; > > + > > uart3: serial at 66130000 { > > compatible = "snps,dw-apb-uart"; > > reg = <0x66130000 0x100>; > > > >
Quoted 4 lines · Kefeng Wang
Quoted 2 lines
I can confirm that with your change and the change to the bootargs you describe above, it works as desired. Was your change already accepted?
Great, thanks a lot. it is still being reviewing for now and waiting for response for now.
Then I would be inclined to take Jon's patch as-is, and follow up with an additional patch to the NS2 DTS once yours lands in.
Signature · 1 line
Florian
Quoted 9 lines · Florian Fainelli
Quoted 4 lines · Kefeng Wang
Quoted 2 lines
I can confirm that with your change and the change to the bootargs you describe above, it works as desired. Was your change already accepted?
Great, thanks a lot. it is still being reviewing for now and waiting for response for now.
Then I would be inclined to take Jon's patch as-is, and follow up with an additional patch to the NS2 DTS once yours lands in.
Sure, please.
Kefeng
Florian Fainelli
AppliedQuoted 5 lines · Jon Mason
Add all of the UARTs present on NS2 and enable them in the SVK device tree file. Also, do some magic to make sure that uart3 is discovered as ttyS0 (as that is the console UART).
Signed-off-by Jon Mason <[email protected]>
Applied to devicetree-arm64/next, thanks Jon!
Signature · 1 line
Florian