[PATCH] ARM: dts: at91: sam9x60: fix the SOC detection

Alexandre Belloni alexandre.belloni at bootlin.com
Wed Jul 12 13:04:47 PDT 2023


On 12/07/2023 20:42:00+0100, Conor Dooley wrote:
> > There can be only one dbgu on a SoC and it has the chipid register. It
> > has always been wrong to have a dbgu compatible on the flexcom uart as
> > they are not dbgu.
> 
> Ahh, thanks for the explanation. Sounds like stuff that might be obvious
> to those working on arm stuff all the time, but not all of those CCed on
> the patch ;)

Well, this is not really arm specific, rather microchip specific ;)

> The correct thing to do would seem to be updating the dt-binding to
> something that permits what is listed below, or just removing the second
> compatible, to leave "microchip,sam9x60-usart" in isolation, since that
> is permitted also.
> 
> > Anyway, my advice has always been that you must not do chipid detection
> > on at91 because there is no point in doing it because you need to have
> > a correct dts to be able to find the dbgu chipid register so you either
> > you already know what you are running on or you are going to read bogus
> > registers anyway.
> 
> I won't claim to have an opinion on any of that, but sounds like you'd
> be better off just reading the board/SoC level compatibles to figure out
> what you are running on...
> 

Yeah, exactly my point!

> Thanks,
> Conor.
> 
> > > > Fixes: 99c808335877 (ARM: dts: at91: sam9x60: Add missing flexcom definitions)
> > > > Signed-off-by: Durai Manickam KR <durai.manickamkr at microchip.com>
> > > > ---
> > > >  arch/arm/boot/dts/microchip/sam9x60.dtsi | 26 ++++++++++++------------
> > > >  1 file changed, 13 insertions(+), 13 deletions(-)
> > > > 
> > > > diff --git a/arch/arm/boot/dts/microchip/sam9x60.dtsi b/arch/arm/boot/dts/microchip/sam9x60.dtsi
> > > > index 8b53997675e7..73d570a17269 100644
> > > > --- a/arch/arm/boot/dts/microchip/sam9x60.dtsi
> > > > +++ b/arch/arm/boot/dts/microchip/sam9x60.dtsi
> > > > @@ -172,7 +172,7 @@ flx4: flexcom at f0000000 {
> > > >  				status = "disabled";
> > > >  
> > > >  				uart4: serial at 200 {
> > > > -					compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
> > > > +					compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart";
> > > >  					reg = <0x200 0x200>;
> > > >  					interrupts = <13 IRQ_TYPE_LEVEL_HIGH 7>;
> > > >  					dmas = <&dma0
> > > > @@ -240,7 +240,7 @@ flx5: flexcom at f0004000 {
> > > >  				status = "disabled";
> > > >  
> > > >  				uart5: serial at 200 {
> > > > -					compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
> > > > +					compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart";
> > > >  					reg = <0x200 0x200>;
> > > >  					atmel,usart-mode = <AT91_USART_MODE_SERIAL>;
> > > >  					interrupts = <14 IRQ_TYPE_LEVEL_HIGH 7>;
> > > > @@ -370,7 +370,7 @@ flx11: flexcom at f0020000 {
> > > >  				status = "disabled";
> > > >  
> > > >  				uart11: serial at 200 {
> > > > -					compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
> > > > +					compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart";
> > > >  					reg = <0x200 0x200>;
> > > >  					interrupts = <32 IRQ_TYPE_LEVEL_HIGH 7>;
> > > >  					dmas = <&dma0
> > > > @@ -419,7 +419,7 @@ flx12: flexcom at f0024000 {
> > > >  				status = "disabled";
> > > >  
> > > >  				uart12: serial at 200 {
> > > > -					compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
> > > > +					compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart";
> > > >  					reg = <0x200 0x200>;
> > > >  					interrupts = <33 IRQ_TYPE_LEVEL_HIGH 7>;
> > > >  					dmas = <&dma0
> > > > @@ -576,7 +576,7 @@ flx6: flexcom at f8010000 {
> > > >  				status = "disabled";
> > > >  
> > > >  				uart6: serial at 200 {
> > > > -					compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
> > > > +					compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart";
> > > >  					reg = <0x200 0x200>;
> > > >  					interrupts = <9 IRQ_TYPE_LEVEL_HIGH 7>;
> > > >  					dmas = <&dma0
> > > > @@ -625,7 +625,7 @@ flx7: flexcom at f8014000 {
> > > >  				status = "disabled";
> > > >  
> > > >  				uart7: serial at 200 {
> > > > -					compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
> > > > +					compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart";
> > > >  					reg = <0x200 0x200>;
> > > >  					interrupts = <10 IRQ_TYPE_LEVEL_HIGH 7>;
> > > >  					dmas = <&dma0
> > > > @@ -674,7 +674,7 @@ flx8: flexcom at f8018000 {
> > > >  				status = "disabled";
> > > >  
> > > >  				uart8: serial at 200 {
> > > > -					compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
> > > > +					compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart";
> > > >  					reg = <0x200 0x200>;
> > > >  					interrupts = <11 IRQ_TYPE_LEVEL_HIGH 7>;
> > > >  					dmas = <&dma0
> > > > @@ -723,7 +723,7 @@ flx0: flexcom at f801c000 {
> > > >  				status = "disabled";
> > > >  
> > > >  				uart0: serial at 200 {
> > > > -					compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
> > > > +					compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart";
> > > >  					reg = <0x200 0x200>;
> > > >  					interrupts = <5 IRQ_TYPE_LEVEL_HIGH 7>;
> > > >  					dmas = <&dma0
> > > > @@ -791,7 +791,7 @@ flx1: flexcom at f8020000 {
> > > >  				status = "disabled";
> > > >  
> > > >  				uart1: serial at 200 {
> > > > -					compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
> > > > +					compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart";
> > > >  					reg = <0x200 0x200>;
> > > >  					interrupts = <6 IRQ_TYPE_LEVEL_HIGH 7>;
> > > >  					dmas = <&dma0
> > > > @@ -859,7 +859,7 @@ flx2: flexcom at f8024000 {
> > > >  				status = "disabled";
> > > >  
> > > >  				uart2: serial at 200 {
> > > > -					compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
> > > > +					compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart";
> > > >  					reg = <0x200 0x200>;
> > > >  					interrupts = <7 IRQ_TYPE_LEVEL_HIGH 7>;
> > > >  					dmas = <&dma0
> > > > @@ -927,7 +927,7 @@ flx3: flexcom at f8028000 {
> > > >  				status = "disabled";
> > > >  
> > > >  				uart3: serial at 200 {
> > > > -					compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
> > > > +					compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart";
> > > >  					reg = <0x200 0x200>;
> > > >  					interrupts = <8 IRQ_TYPE_LEVEL_HIGH 7>;
> > > >  					dmas = <&dma0
> > > > @@ -1050,7 +1050,7 @@ flx9: flexcom at f8040000 {
> > > >  				status = "disabled";
> > > >  
> > > >  				uart9: serial at 200 {
> > > > -					compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
> > > > +					compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart";
> > > >  					reg = <0x200 0x200>;
> > > >  					interrupts = <15 IRQ_TYPE_LEVEL_HIGH 7>;
> > > >  					dmas = <&dma0
> > > > @@ -1099,7 +1099,7 @@ flx10: flexcom at f8044000 {
> > > >  				status = "disabled";
> > > >  
> > > >  				uart10: serial at 200 {
> > > > -					compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
> > > > +					compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart";
> > > >  					reg = <0x200 0x200>;
> > > >  					interrupts = <16 IRQ_TYPE_LEVEL_HIGH 7>;
> > > >  					dmas = <&dma0
> > > > -- 
> > > > 2.25.1
> > > > 
> > 
> > 
> > 
> > -- 
> > Alexandre Belloni, co-owner and COO, Bootlin
> > Embedded Linux and Kernel engineering
> > https://bootlin.com



-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



More information about the linux-arm-kernel mailing list