[v1,5/5] arm64: dts: meson: a1: change uart compatible string

Message ID 20230704135936.14697-6-ddrokosov@sberdevices.ru
State New
Headers
Series tty: serial: meson: support ttyS devname |

Commit Message

Dmitry Rokosov July 4, 2023, 1:59 p.m. UTC
  In the current implementation, the meson-a1 configuration incorporates a
unique compatibility tag "amlogic,meson-a1-uart' within the meson-uart
driver due to its usage of the new console device name "ttyS".
Consequently, the previous compatibility tag designated for the
'amlogic,meson-gx-uart' configuration has become obsolete and is no
longer relevant to the current setup.

Signed-off-by: Dmitry Rokosov <ddrokosov@sberdevices.ru>
---
 arch/arm64/boot/dts/amlogic/meson-a1.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Conor Dooley July 4, 2023, 5:02 p.m. UTC | #1
On Tue, Jul 04, 2023 at 04:59:36PM +0300, Dmitry Rokosov wrote:
> In the current implementation, the meson-a1 configuration incorporates a
> unique compatibility tag "amlogic,meson-a1-uart' within the meson-uart
> driver due to its usage of the new console device name "ttyS".
> Consequently, the previous compatibility tag designated for the
> 'amlogic,meson-gx-uart' configuration has become obsolete and is no
> longer relevant to the current setup.

I don't really see why you would remove the gx-uart to be honest, and
not use it as a fallback. Neil's platform though, so his call :)

> 
> Signed-off-by: Dmitry Rokosov <ddrokosov@sberdevices.ru>
> ---
>  arch/arm64/boot/dts/amlogic/meson-a1.dtsi | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/amlogic/meson-a1.dtsi b/arch/arm64/boot/dts/amlogic/meson-a1.dtsi
> index c5567031ba12..6273b9c862b3 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-a1.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/meson-a1.dtsi
> @@ -344,7 +344,7 @@ mux {
>  			};
>  
>  			uart_AO: serial@1c00 {
> -				compatible = "amlogic,meson-gx-uart",
> +				compatible = "amlogic,meson-a1-uart",
>  					     "amlogic,meson-ao-uart";
>  				reg = <0x0 0x1c00 0x0 0x18>;
>  				interrupts = <GIC_SPI 25 IRQ_TYPE_EDGE_RISING>;
> @@ -354,7 +354,7 @@ uart_AO: serial@1c00 {
>  			};
>  
>  			uart_AO_B: serial@2000 {
> -				compatible = "amlogic,meson-gx-uart",
> +				compatible = "amlogic,meson-a1-uart",
>  					     "amlogic,meson-ao-uart";
>  				reg = <0x0 0x2000 0x0 0x18>;
>  				interrupts = <GIC_SPI 26 IRQ_TYPE_EDGE_RISING>;
> -- 
> 2.36.0
>
  
Dmitry Rokosov July 4, 2023, 5:08 p.m. UTC | #2
On Tue, Jul 04, 2023 at 06:02:58PM +0100, Conor Dooley wrote:
> On Tue, Jul 04, 2023 at 04:59:36PM +0300, Dmitry Rokosov wrote:
> > In the current implementation, the meson-a1 configuration incorporates a
> > unique compatibility tag "amlogic,meson-a1-uart' within the meson-uart
> > driver due to its usage of the new console device name "ttyS".
> > Consequently, the previous compatibility tag designated for the
> > 'amlogic,meson-gx-uart' configuration has become obsolete and is no
> > longer relevant to the current setup.
> 
> I don't really see why you would remove the gx-uart to be honest, and
> not use it as a fallback. Neil's platform though, so his call :)
> 

Because of amlogic,meson-gx-uart has legacy devname, we do not want to
use it in the A1.

> > 
> > Signed-off-by: Dmitry Rokosov <ddrokosov@sberdevices.ru>
> > ---
> >  arch/arm64/boot/dts/amlogic/meson-a1.dtsi | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/arch/arm64/boot/dts/amlogic/meson-a1.dtsi b/arch/arm64/boot/dts/amlogic/meson-a1.dtsi
> > index c5567031ba12..6273b9c862b3 100644
> > --- a/arch/arm64/boot/dts/amlogic/meson-a1.dtsi
> > +++ b/arch/arm64/boot/dts/amlogic/meson-a1.dtsi
> > @@ -344,7 +344,7 @@ mux {
> >  			};
> >  
> >  			uart_AO: serial@1c00 {
> > -				compatible = "amlogic,meson-gx-uart",
> > +				compatible = "amlogic,meson-a1-uart",
> >  					     "amlogic,meson-ao-uart";
> >  				reg = <0x0 0x1c00 0x0 0x18>;
> >  				interrupts = <GIC_SPI 25 IRQ_TYPE_EDGE_RISING>;
> > @@ -354,7 +354,7 @@ uart_AO: serial@1c00 {
> >  			};
> >  
> >  			uart_AO_B: serial@2000 {
> > -				compatible = "amlogic,meson-gx-uart",
> > +				compatible = "amlogic,meson-a1-uart",
> >  					     "amlogic,meson-ao-uart";
> >  				reg = <0x0 0x2000 0x0 0x18>;
> >  				interrupts = <GIC_SPI 26 IRQ_TYPE_EDGE_RISING>;
> > -- 
> > 2.36.0
> >
  
Conor Dooley July 4, 2023, 5:10 p.m. UTC | #3
On Tue, Jul 04, 2023 at 08:08:43PM +0300, Dmitry Rokosov wrote:
> On Tue, Jul 04, 2023 at 06:02:58PM +0100, Conor Dooley wrote:
> > On Tue, Jul 04, 2023 at 04:59:36PM +0300, Dmitry Rokosov wrote:
> > > In the current implementation, the meson-a1 configuration incorporates a
> > > unique compatibility tag "amlogic,meson-a1-uart' within the meson-uart
> > > driver due to its usage of the new console device name "ttyS".
> > > Consequently, the previous compatibility tag designated for the
> > > 'amlogic,meson-gx-uart' configuration has become obsolete and is no
> > > longer relevant to the current setup.
> > 
> > I don't really see why you would remove the gx-uart to be honest, and
> > not use it as a fallback. Neil's platform though, so his call :)
> > 
> 
> Because of amlogic,meson-gx-uart has legacy devname, we do not want to
> use it in the A1.

Which I did read in your commit message, fallback being the operative
word here.
  
Dmitry Rokosov July 4, 2023, 5:19 p.m. UTC | #4
On Tue, Jul 04, 2023 at 06:10:46PM +0100, Conor Dooley wrote:
> On Tue, Jul 04, 2023 at 08:08:43PM +0300, Dmitry Rokosov wrote:
> > On Tue, Jul 04, 2023 at 06:02:58PM +0100, Conor Dooley wrote:
> > > On Tue, Jul 04, 2023 at 04:59:36PM +0300, Dmitry Rokosov wrote:
> > > > In the current implementation, the meson-a1 configuration incorporates a
> > > > unique compatibility tag "amlogic,meson-a1-uart' within the meson-uart
> > > > driver due to its usage of the new console device name "ttyS".
> > > > Consequently, the previous compatibility tag designated for the
> > > > 'amlogic,meson-gx-uart' configuration has become obsolete and is no
> > > > longer relevant to the current setup.
> > > 
> > > I don't really see why you would remove the gx-uart to be honest, and
> > > not use it as a fallback. Neil's platform though, so his call :)
> > > 
> > 
> > Because of amlogic,meson-gx-uart has legacy devname, we do not want to
> > use it in the A1.
> 
> Which I did read in your commit message, fallback being the operative
> word here.

Although it is difficult for me to envision a situation where we would
require this fallback, but gx-uart fallback will function from a kernel
perspective (without taking into account bootloader setup or userspace
daemon script). I don't have any objections to stay gx-uart as a
fallback, will do it in the v2.
  
Dmitry Rokosov July 5, 2023, 9:46 a.m. UTC | #5
Conor,

On Tue, Jul 04, 2023 at 08:19:00PM +0300, Dmitry Rokosov wrote:
> On Tue, Jul 04, 2023 at 06:10:46PM +0100, Conor Dooley wrote:
> > On Tue, Jul 04, 2023 at 08:08:43PM +0300, Dmitry Rokosov wrote:
> > > On Tue, Jul 04, 2023 at 06:02:58PM +0100, Conor Dooley wrote:
> > > > On Tue, Jul 04, 2023 at 04:59:36PM +0300, Dmitry Rokosov wrote:
> > > > > In the current implementation, the meson-a1 configuration incorporates a
> > > > > unique compatibility tag "amlogic,meson-a1-uart' within the meson-uart
> > > > > driver due to its usage of the new console device name "ttyS".
> > > > > Consequently, the previous compatibility tag designated for the
> > > > > 'amlogic,meson-gx-uart' configuration has become obsolete and is no
> > > > > longer relevant to the current setup.
> > > > 
> > > > I don't really see why you would remove the gx-uart to be honest, and
> > > > not use it as a fallback. Neil's platform though, so his call :)
> > > > 
> > > 
> > > Because of amlogic,meson-gx-uart has legacy devname, we do not want to
> > > use it in the A1.
> > 
> > Which I did read in your commit message, fallback being the operative
> > word here.
> 
> Although it is difficult for me to envision a situation where we would
> require this fallback, but gx-uart fallback will function from a kernel
> perspective (without taking into account bootloader setup or userspace
> daemon script). I don't have any objections to stay gx-uart as a
> fallback, will do it in the v2.

Unfortunately, it's not possible based on schema rules. During dtbs check
I've got the such error:

arch/arm64/boot/dts/amlogic/meson-a1-ad401.dtb: serial@1c00: compatible: 'oneOf' conditional failed, one must be fixed:
	['amlogic,meson-a1-uart', 'amlogic,meson-ao-uart', 'amlogic,meson-gx-uart'] is too long
	'amlogic,meson-g12a-uart' was expected
	'amlogic,meson-gx-uart' was expected
	'amlogic,meson-ao-uart' was expected
	From schema: Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml

Of course, we can change dt bindings schema, but is it really needed? As
I said before, it's difficult to imagine the situation, when gx-uart
fallback will be helpful.
  

Patch

diff --git a/arch/arm64/boot/dts/amlogic/meson-a1.dtsi b/arch/arm64/boot/dts/amlogic/meson-a1.dtsi
index c5567031ba12..6273b9c862b3 100644
--- a/arch/arm64/boot/dts/amlogic/meson-a1.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-a1.dtsi
@@ -344,7 +344,7 @@  mux {
 			};
 
 			uart_AO: serial@1c00 {
-				compatible = "amlogic,meson-gx-uart",
+				compatible = "amlogic,meson-a1-uart",
 					     "amlogic,meson-ao-uart";
 				reg = <0x0 0x1c00 0x0 0x18>;
 				interrupts = <GIC_SPI 25 IRQ_TYPE_EDGE_RISING>;
@@ -354,7 +354,7 @@  uart_AO: serial@1c00 {
 			};
 
 			uart_AO_B: serial@2000 {
-				compatible = "amlogic,meson-gx-uart",
+				compatible = "amlogic,meson-a1-uart",
 					     "amlogic,meson-ao-uart";
 				reg = <0x0 0x2000 0x0 0x18>;
 				interrupts = <GIC_SPI 26 IRQ_TYPE_EDGE_RISING>;