diff mbox series

[v3,2/3] ARM: dts: microchip: sama7g5: Add flexcom 10 node

Message ID 20240215091524.14732-3-mihai.sain@microchip.com (mailing list archive)
State New, archived
Headers show
Series Add initial support for Microchip SAMA7G54 Curiosity board | expand

Commit Message

Mihai Sain Feb. 15, 2024, 9:15 a.m. UTC
Add flexcom 10 node for usage on the SAMA7G54 Curiosity board.

Signed-off-by: Mihai Sain <mihai.sain@microchip.com>
---
 arch/arm/boot/dts/microchip/sama7g5.dtsi | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

Comments

Conor Dooley Feb. 15, 2024, 5:03 p.m. UTC | #1
On Thu, Feb 15, 2024 at 11:15:23AM +0200, Mihai Sain wrote:
> Add flexcom 10 node for usage on the SAMA7G54 Curiosity board.
> 
> Signed-off-by: Mihai Sain <mihai.sain@microchip.com>
> ---
>  arch/arm/boot/dts/microchip/sama7g5.dtsi | 24 ++++++++++++++++++++++++
>  1 file changed, 24 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/microchip/sama7g5.dtsi b/arch/arm/boot/dts/microchip/sama7g5.dtsi
> index 269e0a3ca269..c030b318985a 100644
> --- a/arch/arm/boot/dts/microchip/sama7g5.dtsi
> +++ b/arch/arm/boot/dts/microchip/sama7g5.dtsi
> @@ -958,6 +958,30 @@ i2c9: i2c@600 {
>  			};
>  		};
>  
> +		flx10: flexcom@e2820000 {
> +			compatible = "atmel,sama5d2-flexcom";

My comment here was ignored:
https://lore.kernel.org/all/20240214-robe-pregnancy-a1b056c9fe14@spud/

> +			reg = <0xe2820000 0x200>;
> +			clocks = <&pmc PMC_TYPE_PERIPHERAL 48>;
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +			ranges = <0x0 0xe2820000 0x800>;
> +			status = "disabled";
> +
> +			i2c10: i2c@600 {
> +				compatible = "microchip,sama7g5-i2c", "microchip,sam9x60-i2c";
> +				reg = <0x600 0x200>;
> +				interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
> +				#address-cells = <1>;
> +				#size-cells = <0>;
> +				clocks = <&pmc PMC_TYPE_PERIPHERAL 48>;
> +				atmel,fifo-size = <32>;
> +				dmas = <&dma0 AT91_XDMAC_DT_PERID(26)>,
> +					<&dma0 AT91_XDMAC_DT_PERID(25)>;
> +				dma-names = "tx", "rx";
> +				status = "disabled";
> +			};
> +		};
> +
>  		flx11: flexcom@e2824000 {
>  			compatible = "atmel,sama5d2-flexcom";
>  			reg = <0xe2824000 0x200>;
> -- 
> 2.43.0
>
Mihai Sain Feb. 16, 2024, 6:58 a.m. UTC | #2
> diff --git a/arch/arm/boot/dts/microchip/sama7g5.dtsi b/arch/arm/boot/dts/microchip/sama7g5.dtsi
> index 269e0a3ca269..c030b318985a 100644
> --- a/arch/arm/boot/dts/microchip/sama7g5.dtsi
> +++ b/arch/arm/boot/dts/microchip/sama7g5.dtsi
> @@ -958,6 +958,30 @@ i2c9: i2c@600 {
>  			};
>  		};
>  
> +		flx10: flexcom@e2820000 {
> +			compatible = "atmel,sama5d2-flexcom";

My comment here was ignored:
https://lore.kernel.org/all/20240214-robe-pregnancy-a1b056c9fe14@spud/

The SAMA7G5 has the same flexcom controller as SAMA5D2 MPU.

https://github.com/torvalds/linux/blob/master/drivers/mfd/atmel-flexcom.c#L83
https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/mfd/atmel-flexcom.txt#L8
Alexandre Belloni Feb. 16, 2024, 7:56 a.m. UTC | #3
On 16/02/2024 06:58:10+0000, Mihai.Sain@microchip.com wrote:
> > diff --git a/arch/arm/boot/dts/microchip/sama7g5.dtsi b/arch/arm/boot/dts/microchip/sama7g5.dtsi
> > index 269e0a3ca269..c030b318985a 100644
> > --- a/arch/arm/boot/dts/microchip/sama7g5.dtsi
> > +++ b/arch/arm/boot/dts/microchip/sama7g5.dtsi
> > @@ -958,6 +958,30 @@ i2c9: i2c@600 {
> >  			};
> >  		};
> >  
> > +		flx10: flexcom@e2820000 {
> > +			compatible = "atmel,sama5d2-flexcom";
> 
> My comment here was ignored:
> https://lore.kernel.org/all/20240214-robe-pregnancy-a1b056c9fe14@spud/
> 
> The SAMA7G5 has the same flexcom controller as SAMA5D2 MPU.
> 

Still, it needs its own compatible plus a fallback to
atmel,sama5d2-flexcom

> https://github.com/torvalds/linux/blob/master/drivers/mfd/atmel-flexcom.c#L83
> https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/mfd/atmel-flexcom.txt#L8
Claudiu Feb. 16, 2024, 8:24 a.m. UTC | #4
On 16.02.2024 09:56, Alexandre Belloni wrote:
> On 16/02/2024 06:58:10+0000, Mihai.Sain@microchip.com wrote:
>>> diff --git a/arch/arm/boot/dts/microchip/sama7g5.dtsi b/arch/arm/boot/dts/microchip/sama7g5.dtsi
>>> index 269e0a3ca269..c030b318985a 100644
>>> --- a/arch/arm/boot/dts/microchip/sama7g5.dtsi
>>> +++ b/arch/arm/boot/dts/microchip/sama7g5.dtsi
>>> @@ -958,6 +958,30 @@ i2c9: i2c@600 {
>>>  			};
>>>  		};
>>>  
>>> +		flx10: flexcom@e2820000 {
>>> +			compatible = "atmel,sama5d2-flexcom";
>>
>> My comment here was ignored:
>> https://lore.kernel.org/all/20240214-robe-pregnancy-a1b056c9fe14@spud/
>>
>> The SAMA7G5 has the same flexcom controller as SAMA5D2 MPU.
>>
> 
> Still, it needs its own compatible plus a fallback to
> atmel,sama5d2-flexcom

I agree with this. Though, flexcom documentation is subject to YAML
conversion (a patch has been re-posted these days [1] and *maybe* it will
be integrated this time). And there are multiple SoC DTs that need to be
updated with their own flexcom compatible (lan966x, sam9x60, sama7g5).

To avoid conflicting with the work at [1] and postponing this series we may
do the update after the [1] is done.

Let me know your thoughts. Either way is fine by me.

Thank you,
Claudiu Beznea

[1]
https://patchwork.kernel.org/project/linux-arm-kernel/patch/20240214-sama5d2-flexcom-yaml-v1-1-5dedd0eba08e@microchip.com/

> 
>> https://github.com/torvalds/linux/blob/master/drivers/mfd/atmel-flexcom.c#L83
>> https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/mfd/atmel-flexcom.txt#L8
>
Conor Dooley Feb. 16, 2024, 9:35 a.m. UTC | #5
On Fri, Feb 16, 2024 at 10:24:13AM +0200, claudiu beznea wrote:
> On 16.02.2024 09:56, Alexandre Belloni wrote:
> > On 16/02/2024 06:58:10+0000, Mihai.Sain@microchip.com wrote:
> >>> diff --git a/arch/arm/boot/dts/microchip/sama7g5.dtsi b/arch/arm/boot/dts/microchip/sama7g5.dtsi
> >>> index 269e0a3ca269..c030b318985a 100644
> >>> --- a/arch/arm/boot/dts/microchip/sama7g5.dtsi
> >>> +++ b/arch/arm/boot/dts/microchip/sama7g5.dtsi
> >>> @@ -958,6 +958,30 @@ i2c9: i2c@600 {
> >>>  			};
> >>>  		};
> >>>  
> >>> +		flx10: flexcom@e2820000 {
> >>> +			compatible = "atmel,sama5d2-flexcom";
> >>
> >> My comment here was ignored:
> >> https://lore.kernel.org/all/20240214-robe-pregnancy-a1b056c9fe14@spud/
> >>
> >> The SAMA7G5 has the same flexcom controller as SAMA5D2 MPU.
> >>
> > 
> > Still, it needs its own compatible plus a fallback to
> > atmel,sama5d2-flexcom
> 
> I agree with this. Though, flexcom documentation is subject to YAML
> conversion (a patch has been re-posted these days [1] and *maybe* it will
> be integrated this time). And there are multiple SoC DTs that need to be
> updated with their own flexcom compatible (lan966x, sam9x60, sama7g5).
> 
> To avoid conflicting with the work at [1] and postponing this series we may
> do the update after the [1] is done.
> 
> Let me know your thoughts. Either way is fine by me.

I'd be inclined to say that if we are gonna take a shortcut here, then
this patch should add a specific compatible so that when the yaml
conversion goes through you'll get a warning about this being
undocumented rather than silence.

A resend on the flexcom patch is required though, the rebase was not
done correctly, so maybe Balakrishnan could "atmel,sama7g5-flexcom"
add with a fallback to "atmel,sama5d2-flexcom" while they're fixing
it up?

Cheers,
Conor.
Claudiu Feb. 19, 2024, 6:45 p.m. UTC | #6
On 16.02.2024 11:35, Conor Dooley wrote:
> On Fri, Feb 16, 2024 at 10:24:13AM +0200, claudiu beznea wrote:
>> On 16.02.2024 09:56, Alexandre Belloni wrote:
>>> On 16/02/2024 06:58:10+0000, Mihai.Sain@microchip.com wrote:
>>>>> diff --git a/arch/arm/boot/dts/microchip/sama7g5.dtsi b/arch/arm/boot/dts/microchip/sama7g5.dtsi
>>>>> index 269e0a3ca269..c030b318985a 100644
>>>>> --- a/arch/arm/boot/dts/microchip/sama7g5.dtsi
>>>>> +++ b/arch/arm/boot/dts/microchip/sama7g5.dtsi
>>>>> @@ -958,6 +958,30 @@ i2c9: i2c@600 {
>>>>>  			};
>>>>>  		};
>>>>>  
>>>>> +		flx10: flexcom@e2820000 {
>>>>> +			compatible = "atmel,sama5d2-flexcom";
>>>>
>>>> My comment here was ignored:
>>>> https://lore.kernel.org/all/20240214-robe-pregnancy-a1b056c9fe14@spud/
>>>>
>>>> The SAMA7G5 has the same flexcom controller as SAMA5D2 MPU.
>>>>
>>>
>>> Still, it needs its own compatible plus a fallback to
>>> atmel,sama5d2-flexcom
>>
>> I agree with this. Though, flexcom documentation is subject to YAML
>> conversion (a patch has been re-posted these days [1] and *maybe* it will
>> be integrated this time). And there are multiple SoC DTs that need to be
>> updated with their own flexcom compatible (lan966x, sam9x60, sama7g5).
>>
>> To avoid conflicting with the work at [1] and postponing this series we may
>> do the update after the [1] is done.
>>
>> Let me know your thoughts. Either way is fine by me.
> 
> I'd be inclined to say that if we are gonna take a shortcut here, then
> this patch should add a specific compatible so that when the yaml
> conversion goes through you'll get a warning about this being
> undocumented rather than silence.

All the flexcom nodes from all flexcom capable SoCs (including SAMA7G5)
have the same compatible introduced by Mihai.

I don't like the idea of updating only the DTSes, either update all DTSes
and documentation or do it as it is already done (with sama5d2 compatible).

> 
> A resend on the flexcom patch is required though, the rebase was not
> done correctly, so maybe Balakrishnan could "atmel,sama7g5-flexcom"
> add with a fallback to "atmel,sama5d2-flexcom" while they're fixing
> it up?

I agree, and DTSes should also be updated along with documentation.

With this we can go forward with this patch and avoid conflicting with work
that is currently in progress for flexcom.

Thank you,
Claudiu Beznea

> 
> Cheers,
> Conor.
Conor Dooley Feb. 20, 2024, 7:25 p.m. UTC | #7
On Mon, Feb 19, 2024 at 08:45:45PM +0200, claudiu beznea wrote:
> 
> 
> On 16.02.2024 11:35, Conor Dooley wrote:
> > On Fri, Feb 16, 2024 at 10:24:13AM +0200, claudiu beznea wrote:
> >> On 16.02.2024 09:56, Alexandre Belloni wrote:
> >>> On 16/02/2024 06:58:10+0000, Mihai.Sain@microchip.com wrote:
> >>>>> diff --git a/arch/arm/boot/dts/microchip/sama7g5.dtsi b/arch/arm/boot/dts/microchip/sama7g5.dtsi
> >>>>> index 269e0a3ca269..c030b318985a 100644
> >>>>> --- a/arch/arm/boot/dts/microchip/sama7g5.dtsi
> >>>>> +++ b/arch/arm/boot/dts/microchip/sama7g5.dtsi
> >>>>> @@ -958,6 +958,30 @@ i2c9: i2c@600 {
> >>>>>  			};
> >>>>>  		};
> >>>>>  
> >>>>> +		flx10: flexcom@e2820000 {
> >>>>> +			compatible = "atmel,sama5d2-flexcom";
> >>>>
> >>>> My comment here was ignored:
> >>>> https://lore.kernel.org/all/20240214-robe-pregnancy-a1b056c9fe14@spud/
> >>>>
> >>>> The SAMA7G5 has the same flexcom controller as SAMA5D2 MPU.
> >>>>
> >>>
> >>> Still, it needs its own compatible plus a fallback to
> >>> atmel,sama5d2-flexcom
> >>
> >> I agree with this. Though, flexcom documentation is subject to YAML
> >> conversion (a patch has been re-posted these days [1] and *maybe* it will
> >> be integrated this time). And there are multiple SoC DTs that need to be
> >> updated with their own flexcom compatible (lan966x, sam9x60, sama7g5).
> >>
> >> To avoid conflicting with the work at [1] and postponing this series we may
> >> do the update after the [1] is done.
> >>
> >> Let me know your thoughts. Either way is fine by me.
> > 
> > I'd be inclined to say that if we are gonna take a shortcut here, then
> > this patch should add a specific compatible so that when the yaml
> > conversion goes through you'll get a warning about this being
> > undocumented rather than silence.
> 
> All the flexcom nodes from all flexcom capable SoCs (including SAMA7G5)
> have the same compatible introduced by Mihai.
> 
> I don't like the idea of updating only the DTSes, either update all DTSes
> and documentation or do it as it is already done (with sama5d2 compatible).
> 
> > 
> > A resend on the flexcom patch is required though, the rebase was not
> > done correctly, so maybe Balakrishnan could "atmel,sama7g5-flexcom"
> > add with a fallback to "atmel,sama5d2-flexcom" while they're fixing
> > it up?
> 
> I agree, and DTSes should also be updated along with documentation.

I'm biased, I'll almost never disagree with updating things to use
soc-specific compatibles...

> With this we can go forward with this patch and avoid conflicting with work
> that is currently in progress for flexcom.

I forgot to actually CC Balakrishnan, but Nicolas fortunately forwarded
it to them. They're added now though to make sure they see this.
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/microchip/sama7g5.dtsi b/arch/arm/boot/dts/microchip/sama7g5.dtsi
index 269e0a3ca269..c030b318985a 100644
--- a/arch/arm/boot/dts/microchip/sama7g5.dtsi
+++ b/arch/arm/boot/dts/microchip/sama7g5.dtsi
@@ -958,6 +958,30 @@  i2c9: i2c@600 {
 			};
 		};
 
+		flx10: flexcom@e2820000 {
+			compatible = "atmel,sama5d2-flexcom";
+			reg = <0xe2820000 0x200>;
+			clocks = <&pmc PMC_TYPE_PERIPHERAL 48>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges = <0x0 0xe2820000 0x800>;
+			status = "disabled";
+
+			i2c10: i2c@600 {
+				compatible = "microchip,sama7g5-i2c", "microchip,sam9x60-i2c";
+				reg = <0x600 0x200>;
+				interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
+				#address-cells = <1>;
+				#size-cells = <0>;
+				clocks = <&pmc PMC_TYPE_PERIPHERAL 48>;
+				atmel,fifo-size = <32>;
+				dmas = <&dma0 AT91_XDMAC_DT_PERID(26)>,
+					<&dma0 AT91_XDMAC_DT_PERID(25)>;
+				dma-names = "tx", "rx";
+				status = "disabled";
+			};
+		};
+
 		flx11: flexcom@e2824000 {
 			compatible = "atmel,sama5d2-flexcom";
 			reg = <0xe2824000 0x200>;