[PATCH] tty: xilinx_uartps: Really fix id assignment

Michal Simek michal.simek at xilinx.com
Fri Jul 24 04:43:07 EDT 2020



On 23. 07. 20 11:50, Helmut Grohne wrote:
> Hi Michal,
> 
> On Wed, Jul 22, 2020 at 09:14:40AM +0200, Michal Simek wrote:
>> On 13. 07. 20 14:10, Helmut Grohne wrote:
>>> Can we maybe trim down the matrix somehow? In my context, the need for
>>> swapping the serial aliases arises from a limitation in u-boot-xlnx and
>>> the desire to use one dtb for both linux and u-boot. It requires that
>>> the serial0 alias is the console. Are there other reasons to swap them?
>>> If not, maybe fixing u-boot would be an option?
>>
>> I am not aware about any limitation in u-boot in this space. U-Boot is
>> working with aliases and also with stdout-patch selection.
>> Can you please elaborate more on this?
> 
> I have retested this (with more recent versions than earlier).
> 
> I confirm that u-boot correctly deals with aliases and
> chosen/stdout-path. Using linear aliases and assigning stdout to serial1
> works.
> 
> I also confirm that having ttyPS1 without having ttyPS0 works (only
> tested with this patch applied). I questioned this earlier.

Thanks for confirmation.

> 
> So it seems that the need for reversing these aliases is less strong
> now. If I remember correctly, Jan Kiszka was also using reversed
> aliases, but I don't know why.

ultra96 is using both uarts. Where physical uart0 is connected to
bt/wifi TI chip which requires flow control which needs to be done via
PL (really just wires in PL). Physical uart1 is used for console.
That's why I have decided when I was describing this DT to use aliases
that ttyPS0 will be console and ttyPS1 will be connection to bt/wifi chip.

It is more convenient to have console named as ttyPS0.
I think I have seen that some SoCs are simply not changing orders for
IPs and all the time uart0 is serial0, etc. and it would also make sense.
But I have never start to use it and mostly for historical reason Xilinx
SW didn't handle consoles on ttyPS1 properly that's why console were all
the time pointed by ttyPS0 no matter which serial IP was used.

Thanks,
Michal




More information about the linux-arm-kernel mailing list