diff mbox series

ARM: dts: microchip: sam9x7: Add missing usart-mode property

Message ID 20240930202639.37606-1-jihed.chaibi.dev@gmail.com (mailing list archive)
State New
Headers show
Series ARM: dts: microchip: sam9x7: Add missing usart-mode property | expand

Commit Message

Jihed Chaibi Sept. 30, 2024, 8:26 p.m. UTC
Add the atmel,usart-mode property to UART nodes in Microchip SAM9X75
boards' device trees (boards which inherit sam9x7.dtsi). This ensures
compliance with the atmel at91-usart.yaml schema and resolves errors
that occur during DT validation, such as:

arch/arm/boot/dts/microchip/at91-sam9x75_curiosity.dtb: serial@200:
serial@200' does not match '^spi(@.*|-([0-9]|[1-9][0-9]+))?$'
from schema: http://devicetree.org/schemas/serial/atmel,at91-usart.yaml#

arch/arm/boot/dts/microchip/at91-sam9x75_curiosity.dtb:
serial@200: atmel,use-dma-rx: False schema does not allow True
from schema: http://devicetree.org/schemas/serial/atmel,at91-usart.yaml#

arch/arm/boot/dts/microchip/at91-sam9x75_curiosity.dtb:
serial@200: atmel,fifo-size: False schema does not allow 16
from schema: http://devicetree.org/schemas/serial/atmel,at91-usart.yaml#


By adding "atmel,usart-mode = <AT91_USART_MODE_SERIAL>" to UART nodes
0 up until 12, these errors are resolved, ensuring proper DTB validation.

This issue has been tested on the sam9x75 (sam9x75eb & sam9x75_curiosity)
boards, both of which inherit the sam9x7.dtsi file.

Signed-off-by: Jihed Chaibi <jihed.chaibi.dev@gmail.com>
---
 arch/arm/boot/dts/microchip/sam9x7.dtsi | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Comments

Krzysztof Kozlowski Oct. 1, 2024, 11:44 a.m. UTC | #1
On 30/09/2024 22:26, Jihed Chaibi wrote:
> Add the atmel,usart-mode property to UART nodes in Microchip SAM9X75
> boards' device trees (boards which inherit sam9x7.dtsi). This ensures
> compliance with the atmel at91-usart.yaml schema and resolves errors
> that occur during DT validation, such as:

That's redundant statement.

> 
> arch/arm/boot/dts/microchip/at91-sam9x75_curiosity.dtb: serial@200:
> serial@200' does not match '^spi(@.*|-([0-9]|[1-9][0-9]+))?$'
> from schema: http://devicetree.org/schemas/serial/atmel,at91-usart.yaml#
> 
> arch/arm/boot/dts/microchip/at91-sam9x75_curiosity.dtb:
> serial@200: atmel,use-dma-rx: False schema does not allow True
> from schema: http://devicetree.org/schemas/serial/atmel,at91-usart.yaml#
> 
> arch/arm/boot/dts/microchip/at91-sam9x75_curiosity.dtb:
> serial@200: atmel,fifo-size: False schema does not allow 16
> from schema: http://devicetree.org/schemas/serial/atmel,at91-usart.yaml#

And why is this a property of SoC? Does not look right, at least nothing
here explains this.

Trim the commit msg to relevant logs and statements. You do not have to
explain everyone what dtbs_check is.

> 
> 
> By adding "atmel,usart-mode = <AT91_USART_MODE_SERIAL>" to UART nodes
> 0 up until 12, these errors are resolved, ensuring proper DTB validation.

But in the same time you entirely skipped relevant information: why is
this a correct fix for the issue.

> 
> This issue has been tested on the sam9x75 (sam9x75eb & sam9x75_curiosity)
> boards, both of which inherit the sam9x7.dtsi file.
> 
> Signed-off-by: Jihed Chaibi <jihed.chaibi.dev@gmail.com>

I think you work on some really old Linux kernel, judging by CC list.

Please rebase on latest next or mainline kernel.

Best regards,
Krzysztof
Jihed Chaibi Oct. 9, 2024, 11:12 a.m. UTC | #2
Hi Krzysztof, thanks for the feedback,

I reached out to the developers who initiated the DT support for the
new sam9x7 devices, he explained to me the general workflow, turns out
the dts files aren't yet in linux-next.

> I think you work on some really old Linux kernel, judging by CC list.

Indeed, I used get_maintainer on an old kernel, my bad. Will update
the CC list & the patch once the new DT files make it into linux-next.

Best regards,
Jihèd



On Tue, Oct 1, 2024 at 1:44 PM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 30/09/2024 22:26, Jihed Chaibi wrote:
> > Add the atmel,usart-mode property to UART nodes in Microchip SAM9X75
> > boards' device trees (boards which inherit sam9x7.dtsi). This ensures
> > compliance with the atmel at91-usart.yaml schema and resolves errors
> > that occur during DT validation, such as:
>
> That's redundant statement.
>
> >
> > arch/arm/boot/dts/microchip/at91-sam9x75_curiosity.dtb: serial@200:
> > serial@200' does not match '^spi(@.*|-([0-9]|[1-9][0-9]+))?$'
> > from schema: http://devicetree.org/schemas/serial/atmel,at91-usart.yaml#
> >
> > arch/arm/boot/dts/microchip/at91-sam9x75_curiosity.dtb:
> > serial@200: atmel,use-dma-rx: False schema does not allow True
> > from schema: http://devicetree.org/schemas/serial/atmel,at91-usart.yaml#
> >
> > arch/arm/boot/dts/microchip/at91-sam9x75_curiosity.dtb:
> > serial@200: atmel,fifo-size: False schema does not allow 16
> > from schema: http://devicetree.org/schemas/serial/atmel,at91-usart.yaml#
>
> And why is this a property of SoC? Does not look right, at least nothing
> here explains this.
>
> Trim the commit msg to relevant logs and statements. You do not have to
> explain everyone what dtbs_check is.
>
> >
> >
> > By adding "atmel,usart-mode = <AT91_USART_MODE_SERIAL>" to UART nodes
> > 0 up until 12, these errors are resolved, ensuring proper DTB validation.
>
> But in the same time you entirely skipped relevant information: why is
> this a correct fix for the issue.
>
> >
> > This issue has been tested on the sam9x75 (sam9x75eb & sam9x75_curiosity)
> > boards, both of which inherit the sam9x7.dtsi file.
> >
> > Signed-off-by: Jihed Chaibi <jihed.chaibi.dev@gmail.com>
>
> I think you work on some really old Linux kernel, judging by CC list.
>
> Please rebase on latest next or mainline kernel.
>
> Best regards,
> Krzysztof
>
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/microchip/sam9x7.dtsi b/arch/arm/boot/dts/microchip/sam9x7.dtsi
index 29950159bb94..d3f7238eda85 100644
--- a/arch/arm/boot/dts/microchip/sam9x7.dtsi
+++ b/arch/arm/boot/dts/microchip/sam9x7.dtsi
@@ -166,6 +166,7 @@  flx4: flexcom@f0000000 {
 			uart4: serial@200 {
 				compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart";
 				reg = <0x200 0x200>;
+				atmel,usart-mode = <AT91_USART_MODE_SERIAL>;
 				interrupts = <13 IRQ_TYPE_LEVEL_HIGH 7>;
 				dmas = <&dma0
 					(AT91_XDMAC_DT_MEM_IF(0) |
@@ -234,6 +235,7 @@  flx5: flexcom@f0004000 {
 			uart5: serial@200 {
 				compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart";
 				reg = <0x200 0x200>;
+				atmel,usart-mode = <AT91_USART_MODE_SERIAL>;
 				interrupts = <14 IRQ_TYPE_LEVEL_HIGH 7>;
 				dmas = <&dma0
 					(AT91_XDMAC_DT_MEM_IF(0) |
@@ -375,6 +377,7 @@  flx11: flexcom@f0020000 {
 			uart11: serial@200 {
 				compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart";
 				reg = <0x200 0x200>;
+				atmel,usart-mode = <AT91_USART_MODE_SERIAL>;
 				interrupts = <32 IRQ_TYPE_LEVEL_HIGH 7>;
 				dmas = <&dma0
 					(AT91_XDMAC_DT_MEM_IF(0) |
@@ -424,6 +427,7 @@  flx12: flexcom@f0024000 {
 			uart12: serial@200 {
 				compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart";
 				reg = <0x200 0x200>;
+				atmel,usart-mode = <AT91_USART_MODE_SERIAL>;
 				interrupts = <33 IRQ_TYPE_LEVEL_HIGH 7>;
 				dmas = <&dma0
 					(AT91_XDMAC_DT_MEM_IF(0) |
@@ -595,6 +599,7 @@  flx6: flexcom@f8010000 {
 			uart6: serial@200 {
 				compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart";
 				reg = <0x200 0x200>;
+				atmel,usart-mode = <AT91_USART_MODE_SERIAL>;
 				interrupts = <9 IRQ_TYPE_LEVEL_HIGH 7>;
 				dmas = <&dma0
 					(AT91_XDMAC_DT_MEM_IF(0) |
@@ -644,6 +649,7 @@  flx7: flexcom@f8014000 {
 			uart7: serial@200 {
 				compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart";
 				reg = <0x200 0x200>;
+				atmel,usart-mode = <AT91_USART_MODE_SERIAL>;
 				interrupts = <10 IRQ_TYPE_LEVEL_HIGH 7>;
 				dmas = <&dma0
 					(AT91_XDMAC_DT_MEM_IF(0) |
@@ -693,6 +699,7 @@  flx8: flexcom@f8018000 {
 			uart8: serial@200 {
 				compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart";
 				reg = <0x200 0x200>;
+				atmel,usart-mode = <AT91_USART_MODE_SERIAL>;
 				interrupts = <11 IRQ_TYPE_LEVEL_HIGH 7>;
 				dmas = <&dma0
 					(AT91_XDMAC_DT_MEM_IF(0) |
@@ -742,6 +749,7 @@  flx0: flexcom@f801c000 {
 			uart0: serial@200 {
 				compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart";
 				reg = <0x200 0x200>;
+				atmel,usart-mode = <AT91_USART_MODE_SERIAL>;
 				interrupts = <5 IRQ_TYPE_LEVEL_HIGH 7>;
 				dmas = <&dma0
 					(AT91_XDMAC_DT_MEM_IF(0) |
@@ -810,6 +818,7 @@  flx1: flexcom@f8020000 {
 			uart1: serial@200 {
 				compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart";
 				reg = <0x200 0x200>;
+				atmel,usart-mode = <AT91_USART_MODE_SERIAL>;
 				interrupts = <6 IRQ_TYPE_LEVEL_HIGH 7>;
 				dmas = <&dma0
 					(AT91_XDMAC_DT_MEM_IF(0) |
@@ -878,6 +887,7 @@  flx2: flexcom@f8024000 {
 			uart2: serial@200 {
 				compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart";
 				reg = <0x200 0x200>;
+				atmel,usart-mode = <AT91_USART_MODE_SERIAL>;
 				interrupts = <7 IRQ_TYPE_LEVEL_HIGH 7>;
 				dmas = <&dma0
 					(AT91_XDMAC_DT_MEM_IF(0) |
@@ -946,6 +956,7 @@  flx3: flexcom@f8028000 {
 			uart3: serial@200 {
 				compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart";
 				reg = <0x200 0x200>;
+				atmel,usart-mode = <AT91_USART_MODE_SERIAL>;
 				interrupts = <8 IRQ_TYPE_LEVEL_HIGH 7>;
 				dmas = <&dma0
 					(AT91_XDMAC_DT_MEM_IF(0) |
@@ -1067,6 +1078,7 @@  flx9: flexcom@f8040000 {
 			uart9: serial@200 {
 				compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart";
 				reg = <0x200 0x200>;
+				atmel,usart-mode = <AT91_USART_MODE_SERIAL>;
 				interrupts = <15 IRQ_TYPE_LEVEL_HIGH 7>;
 				dmas = <&dma0
 					(AT91_XDMAC_DT_MEM_IF(0) |
@@ -1116,6 +1128,7 @@  flx10: flexcom@f8044000 {
 			uart10: serial@200 {
 				compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart";
 				reg = <0x200 0x200>;
+				atmel,usart-mode = <AT91_USART_MODE_SERIAL>;
 				interrupts = <16 IRQ_TYPE_LEVEL_HIGH 7>;
 				dmas = <&dma0
 					(AT91_XDMAC_DT_MEM_IF(0) |