Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1400440

Re: [PATCH 1/2] arm64: dts: NS2: Add all of the UARTs

From Kefeng Wang <wangkefeng.wang@huawei.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/2] arm64: dts: NS2: Add all of the UARTs
Date 2016-05-13 03:20 +0200
Message-ID <ry9VL-13t-5@gated-at.bofh.it> (permalink)
References <rxLgJ-Yk-5@gated-at.bofh.it> <rxS8x-8pY-13@gated-at.bofh.it> <ry27Y-1jB-21@gated-at.bofh.it> <ry27Y-1jB-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



On 2016/5/13 0:52, Ray Jui wrote:
> Hi Kefeng,
> 
> On 5/12/2016 7:46 AM, Jon Mason wrote:
>>
>>
>> On Thu, May 12, 2016 at 2:16 AM, Kefeng Wang <wangkefeng.wang@huawei.com
>> <mailto:wangkefeng.wang@huawei.com>> 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@broadcom.com <mailto:jonmason@broadcom.com>>
>>     > ---
>>     >  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?
>>
>> 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


> Thanks,
> 
> Ray
> 
> .
> 

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/2] arm64: dts: NS2: Add all of the UARTs Jon Mason <jon.mason@broadcom.com> - 2016-05-12 01:00 +0200
  [PATCH 2/2] arm64: dts: NS2: Add CCI-400 PMU support Jon Mason <jon.mason@broadcom.com> - 2016-05-12 01:00 +0200
    Re: [PATCH 2/2] arm64: dts: NS2: Add CCI-400 PMU support Florian Fainelli <f.fainelli@gmail.com> - 2016-05-20 20:50 +0200
  Re: [PATCH 1/2] arm64: dts: NS2: Add all of the UARTs Kefeng Wang <wangkefeng.wang@huawei.com> - 2016-05-12 08:20 +0200
    Re: [PATCH 1/2] arm64: dts: NS2: Add all of the UARTs Ray Jui <ray.jui@broadcom.com> - 2016-05-12 19:00 +0200
      Re: [PATCH 1/2] arm64: dts: NS2: Add all of the UARTs Kefeng Wang <wangkefeng.wang@huawei.com> - 2016-05-13 03:20 +0200
    Re: [PATCH 1/2] arm64: dts: NS2: Add all of the UARTs Kefeng Wang <wangkefeng.wang@huawei.com> - 2016-05-13 04:20 +0200
      Re: [PATCH 1/2] arm64: dts: NS2: Add all of the UARTs Kefeng Wang <wangkefeng.wang@huawei.com> - 2016-05-16 04:10 +0200
        Re: [PATCH 1/2] arm64: dts: NS2: Add all of the UARTs Florian Fainelli <f.fainelli@gmail.com> - 2016-05-17 22:00 +0200
          Re: [PATCH 1/2] arm64: dts: NS2: Add all of the UARTs Kefeng Wang <wangkefeng.wang@huawei.com> - 2016-05-18 08:00 +0200
  Re: [PATCH 1/2] arm64: dts: NS2: Add all of the UARTs Florian Fainelli <f.fainelli@gmail.com> - 2016-05-20 20:50 +0200

csiph-web