diff mbox series

[v3,4/7] dt-bindings: atmel-usart: remove wildcard

Message ID 1578997397-23165-5-git-send-email-claudiu.beznea@microchip.com (mailing list archive)
State Superseded
Headers show
Series add device tree for SAM9X60 SoC and SAM9X60-EK board | expand

Commit Message

Claudiu Beznea Jan. 14, 2020, 10:23 a.m. UTC
Remove chip whildcard and introduce the list of compatibles instead.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
---
 Documentation/devicetree/bindings/mfd/atmel-usart.txt | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Comments

Alexandre Belloni Jan. 14, 2020, 10:42 a.m. UTC | #1
On 14/01/2020 12:23:14+0200, Claudiu Beznea wrote:
> Remove chip whildcard and introduce the list of compatibles instead.
> 
> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
> ---
>  Documentation/devicetree/bindings/mfd/atmel-usart.txt | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/mfd/atmel-usart.txt b/Documentation/devicetree/bindings/mfd/atmel-usart.txt
> index 699fd3c9ace8..778e8310606a 100644
> --- a/Documentation/devicetree/bindings/mfd/atmel-usart.txt
> +++ b/Documentation/devicetree/bindings/mfd/atmel-usart.txt
> @@ -1,10 +1,9 @@
>  * Atmel Universal Synchronous Asynchronous Receiver/Transmitter (USART)
>  
>  Required properties for USART:
> -- compatible: Should be "atmel,<chip>-usart" or "atmel,<chip>-dbgu"
> -  The compatible <chip> indicated will be the first SoC to support an
> -  additional mode or an USART new feature.
> -  For the dbgu UART, use "atmel,<chip>-dbgu", "atmel,<chip>-usart"
> +- compatible: Should be one of the following:
> +	- "atmel,at91rm9200-dbgu", "atmel,at91rm9200-usart"
> +	- "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"

All the uarts are not dbgus, so this need to be:

 - "atmel,at91rm9200-usart"
 - "atmel,at91sam9260-usart"
 - "atmel,at91rm9200-dbgu", "atmel,at91rm9200-usart"
 - "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"

Also, you need to update drivers/soc/atmel/soc.c

>  - reg: Should contain registers location and length
>  - interrupts: Should contain interrupt
>  - clock-names: tuple listing input clock names.
> -- 
> 2.7.4
>
Claudiu Beznea Jan. 14, 2020, 11:10 a.m. UTC | #2
On 14.01.2020 12:42, Alexandre Belloni wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> On 14/01/2020 12:23:14+0200, Claudiu Beznea wrote:
>> Remove chip whildcard and introduce the list of compatibles instead.
>>
>> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
>> ---
>>  Documentation/devicetree/bindings/mfd/atmel-usart.txt | 7 +++----
>>  1 file changed, 3 insertions(+), 4 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/mfd/atmel-usart.txt b/Documentation/devicetree/bindings/mfd/atmel-usart.txt
>> index 699fd3c9ace8..778e8310606a 100644
>> --- a/Documentation/devicetree/bindings/mfd/atmel-usart.txt
>> +++ b/Documentation/devicetree/bindings/mfd/atmel-usart.txt
>> @@ -1,10 +1,9 @@
>>  * Atmel Universal Synchronous Asynchronous Receiver/Transmitter (USART)
>>
>>  Required properties for USART:
>> -- compatible: Should be "atmel,<chip>-usart" or "atmel,<chip>-dbgu"
>> -  The compatible <chip> indicated will be the first SoC to support an
>> -  additional mode or an USART new feature.
>> -  For the dbgu UART, use "atmel,<chip>-dbgu", "atmel,<chip>-usart"
>> +- compatible: Should be one of the following:
>> +     - "atmel,at91rm9200-dbgu", "atmel,at91rm9200-usart"
>> +     - "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"
> 
> All the uarts are not dbgus, so this need to be:
> 
>  - "atmel,at91rm9200-usart"
>  - "atmel,at91sam9260-usart"
>  - "atmel,at91rm9200-dbgu", "atmel,at91rm9200-usart"
>  - "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"

Ok!

> 
> Also, you need to update drivers/soc/atmel/soc.c

OK. Did you refer to CIDR, EXID registers? They are at the same offsets as
for the old products. So we can rely on old compatible for them. Is this OK?

Thank you,
Claudiu Beznea

> 
>>  - reg: Should contain registers location and length
>>  - interrupts: Should contain interrupt
>>  - clock-names: tuple listing input clock names.
>> --
>> 2.7.4
>>
> 
> --
> Alexandre Belloni, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
>
Alexandre Belloni Jan. 14, 2020, 11:17 a.m. UTC | #3
On 14/01/2020 11:10:14+0000, Claudiu.Beznea@microchip.com wrote:
> 
> 
> On 14.01.2020 12:42, Alexandre Belloni wrote:
> > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> > 
> > On 14/01/2020 12:23:14+0200, Claudiu Beznea wrote:
> >> Remove chip whildcard and introduce the list of compatibles instead.
> >>
> >> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
> >> ---
> >>  Documentation/devicetree/bindings/mfd/atmel-usart.txt | 7 +++----
> >>  1 file changed, 3 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/Documentation/devicetree/bindings/mfd/atmel-usart.txt b/Documentation/devicetree/bindings/mfd/atmel-usart.txt
> >> index 699fd3c9ace8..778e8310606a 100644
> >> --- a/Documentation/devicetree/bindings/mfd/atmel-usart.txt
> >> +++ b/Documentation/devicetree/bindings/mfd/atmel-usart.txt
> >> @@ -1,10 +1,9 @@
> >>  * Atmel Universal Synchronous Asynchronous Receiver/Transmitter (USART)
> >>
> >>  Required properties for USART:
> >> -- compatible: Should be "atmel,<chip>-usart" or "atmel,<chip>-dbgu"
> >> -  The compatible <chip> indicated will be the first SoC to support an
> >> -  additional mode or an USART new feature.
> >> -  For the dbgu UART, use "atmel,<chip>-dbgu", "atmel,<chip>-usart"
> >> +- compatible: Should be one of the following:
> >> +     - "atmel,at91rm9200-dbgu", "atmel,at91rm9200-usart"
> >> +     - "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"
> > 
> > All the uarts are not dbgus, so this need to be:
> > 
> >  - "atmel,at91rm9200-usart"
> >  - "atmel,at91sam9260-usart"
> >  - "atmel,at91rm9200-dbgu", "atmel,at91rm9200-usart"
> >  - "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"
> 
> Ok!
> 
> > 
> > Also, you need to update drivers/soc/atmel/soc.c
> 
> OK. Did you refer to CIDR, EXID registers? They are at the same offsets as
> for the old products. So we can rely on old compatible for them. Is this OK?
> 

Then, what is the point of adding microchip,sam9x60-dbgu ?
Claudiu Beznea Jan. 14, 2020, 2:58 p.m. UTC | #4
On 14.01.2020 13:17, Alexandre Belloni wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> On 14/01/2020 11:10:14+0000, Claudiu.Beznea@microchip.com wrote:
>>
>>
>> On 14.01.2020 12:42, Alexandre Belloni wrote:
>>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>>>
>>> On 14/01/2020 12:23:14+0200, Claudiu Beznea wrote:
>>>> Remove chip whildcard and introduce the list of compatibles instead.
>>>>
>>>> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
>>>> ---
>>>>  Documentation/devicetree/bindings/mfd/atmel-usart.txt | 7 +++----
>>>>  1 file changed, 3 insertions(+), 4 deletions(-)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/mfd/atmel-usart.txt b/Documentation/devicetree/bindings/mfd/atmel-usart.txt
>>>> index 699fd3c9ace8..778e8310606a 100644
>>>> --- a/Documentation/devicetree/bindings/mfd/atmel-usart.txt
>>>> +++ b/Documentation/devicetree/bindings/mfd/atmel-usart.txt
>>>> @@ -1,10 +1,9 @@
>>>>  * Atmel Universal Synchronous Asynchronous Receiver/Transmitter (USART)
>>>>
>>>>  Required properties for USART:
>>>> -- compatible: Should be "atmel,<chip>-usart" or "atmel,<chip>-dbgu"
>>>> -  The compatible <chip> indicated will be the first SoC to support an
>>>> -  additional mode or an USART new feature.
>>>> -  For the dbgu UART, use "atmel,<chip>-dbgu", "atmel,<chip>-usart"
>>>> +- compatible: Should be one of the following:
>>>> +     - "atmel,at91rm9200-dbgu", "atmel,at91rm9200-usart"
>>>> +     - "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"
>>>
>>> All the uarts are not dbgus, so this need to be:
>>>
>>>  - "atmel,at91rm9200-usart"
>>>  - "atmel,at91sam9260-usart"
>>>  - "atmel,at91rm9200-dbgu", "atmel,at91rm9200-usart"
>>>  - "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"
>>
>> Ok!
>>
>>>
>>> Also, you need to update drivers/soc/atmel/soc.c
>>
>> OK. Did you refer to CIDR, EXID registers? They are at the same offsets as
>> for the old products. So we can rely on old compatible for them. Is this OK?
>>
> 
> Then, what is the point of adding microchip,sam9x60-dbgu ?

Different meaning for CIDR register bits. Version is kept on bits 4 to 0
but not documented in public datasheet, so version displayed by
drivers/soc/atmel/soc.c should work.

Thank you,
Claudiu Beznea

> 
> 
> --
> Alexandre Belloni, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
>
Alexandre Belloni Jan. 14, 2020, 3:03 p.m. UTC | #5
On 14/01/2020 14:58:23+0000, Claudiu.Beznea@microchip.com wrote:
> > Then, what is the point of adding microchip,sam9x60-dbgu ?
> 
> Different meaning for CIDR register bits. Version is kept on bits 4 to 0
> but not documented in public datasheet, so version displayed by
> drivers/soc/atmel/soc.c should work.

But at91_get_cidr_exid_from_dbgu will not find the node unless you use
two fallbacks.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/mfd/atmel-usart.txt b/Documentation/devicetree/bindings/mfd/atmel-usart.txt
index 699fd3c9ace8..778e8310606a 100644
--- a/Documentation/devicetree/bindings/mfd/atmel-usart.txt
+++ b/Documentation/devicetree/bindings/mfd/atmel-usart.txt
@@ -1,10 +1,9 @@ 
 * Atmel Universal Synchronous Asynchronous Receiver/Transmitter (USART)
 
 Required properties for USART:
-- compatible: Should be "atmel,<chip>-usart" or "atmel,<chip>-dbgu"
-  The compatible <chip> indicated will be the first SoC to support an
-  additional mode or an USART new feature.
-  For the dbgu UART, use "atmel,<chip>-dbgu", "atmel,<chip>-usart"
+- compatible: Should be one of the following:
+	- "atmel,at91rm9200-dbgu", "atmel,at91rm9200-usart"
+	- "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"
 - reg: Should contain registers location and length
 - interrupts: Should contain interrupt
 - clock-names: tuple listing input clock names.