ARM: dts: at91: add serial MFD sub-node for usart
Subsystems (4)
PATCH 1/1 ARM: dts: at91: add serial MFD sub-node for usart
The "atmel,at91sam9260-usart" driver is a MFD driver, so it needs sub-nodes to match the registered platform device. For this reason, we add a serial subnode to all the "atmel,at91sam9260-usart" serial compatible nods. This will also remove the boot warning:
"atmel_usart_serial: Failed to locate of_node [id: -2]"
--- arch/arm/boot/dts/at91-sam9x60ek.dts | 3 +++ arch/arm/boot/dts/at91rm9200.dtsi | 15 ++++++++++++ arch/arm/boot/dts/at91sam9261.dtsi | 12 ++++++++++ arch/arm/boot/dts/at91sam9261ek.dts | 3 +++ arch/arm/boot/dts/at91sam9263.dtsi | 12 ++++++++++ arch/arm/boot/dts/at91sam9g45.dtsi | 15 ++++++++++++ arch/arm/boot/dts/at91sam9n12.dtsi | 15 ++++++++++++ arch/arm/boot/dts/at91sam9rl.dtsi | 15 ++++++++++++ arch/arm/boot/dts/at91sam9x5.dtsi | 18 ++++++++++++++ arch/arm/boot/dts/at91sam9x5_usart3.dtsi | 3 +++ arch/arm/boot/dts/sam9x60.dtsi | 3 +++ arch/arm/boot/dts/sama5d2.dtsi | 30 ++++++++++++++++++++++++ arch/arm/boot/dts/sama5d3.dtsi | 18 ++++++++++++++ arch/arm/boot/dts/sama5d3_uart.dtsi | 6 +++++ arch/arm/boot/dts/sama5d4.dtsi | 30 ++++++++++++++++++++++++ 15 files changed, 198 insertions(+)
arch/arm/boot/dts/at91-sam9x60ek.dts +3 -0
@@ -280,6 +280,9 @@ AT91_XDMAC_DT_PERID(10))>, atmel,use-dma-rx; atmel,use-dma-tx; status = "okay"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; };
arch/arm/boot/dts/at91rm9200.dtsi +15 -0
@@ -602,6 +602,9 @@ dbgu: serial@fffff200 { clocks = <&pmc PMC_TYPE_CORE PMC_MCK>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart0: serial@fffc0000 {
@@ -615,6 +618,9 @@ usart0: serial@fffc0000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 6>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart1: serial@fffc4000 {
@@ -628,6 +634,9 @@ usart1: serial@fffc4000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 7>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart2: serial@fffc8000 {
@@ -641,6 +650,9 @@ usart2: serial@fffc8000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 8>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart3: serial@fffcc000 {
@@ -654,6 +666,9 @@ usart3: serial@fffcc000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 9>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usb1: gadget@fffb0000 {
arch/arm/boot/dts/at91sam9261.dtsi +12 -0
@@ -187,6 +187,9 @@ usart0: serial@fffb0000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 6>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart1: serial@fffb4000 {
@@ -200,6 +203,9 @@ usart1: serial@fffb4000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 7>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart2: serial@fffb8000{
@@ -213,6 +219,9 @@ usart2: serial@fffb8000{ clocks = <&pmc PMC_TYPE_PERIPHERAL 8>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; ssc0: ssc@fffbc000 {
@@ -307,6 +316,9 @@ dbgu: serial@fffff200 { clocks = <&pmc PMC_TYPE_CORE PMC_MCK>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; pinctrl@fffff400 {
arch/arm/boot/dts/at91sam9261ek.dts +3 -0
@@ -176,6 +176,9 @@ tsc2046@2 { dbgu: serial@fffff200 { status = "okay"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; watchdog@fffffd40 {
arch/arm/boot/dts/at91sam9263.dtsi +12 -0
@@ -546,6 +546,9 @@ dbgu: serial@ffffee00 { clocks = <&pmc PMC_TYPE_CORE PMC_MCK>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart0: serial@fff8c000 {
@@ -559,6 +562,9 @@ usart0: serial@fff8c000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 7>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart1: serial@fff90000 {
@@ -572,6 +578,9 @@ usart1: serial@fff90000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 8>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart2: serial@fff94000 {
@@ -585,6 +594,9 @@ usart2: serial@fff94000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 9>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; ssc0: ssc@fff98000 {
arch/arm/boot/dts/at91sam9g45.dtsi +15 -0
@@ -682,6 +682,9 @@ dbgu: serial@ffffee00 { clocks = <&pmc PMC_TYPE_CORE PMC_MCK>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart0: serial@fff8c000 {
@@ -695,6 +698,9 @@ usart0: serial@fff8c000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 7>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart1: serial@fff90000 {
@@ -708,6 +714,9 @@ usart1: serial@fff90000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 8>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart2: serial@fff94000 {
@@ -721,6 +730,9 @@ usart2: serial@fff94000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 9>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart3: serial@fff98000 {
@@ -734,6 +746,9 @@ usart3: serial@fff98000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 10>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; macb0: ethernet@fffbc000 {
arch/arm/boot/dts/at91sam9n12.dtsi +15 -0
@@ -599,6 +599,9 @@ dbgu: serial@fffff200 { clocks = <&pmc PMC_TYPE_CORE PMC_MCK>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; ssc0: ssc@f0010000 {
@@ -624,6 +627,9 @@ usart0: serial@f801c000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 5>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart1: serial@f8020000 {
@@ -635,6 +641,9 @@ usart1: serial@f8020000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 6>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart2: serial@f8024000 {
@@ -646,6 +655,9 @@ usart2: serial@f8024000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 7>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart3: serial@f8028000 {
@@ -657,6 +669,9 @@ usart3: serial@f8028000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 8>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; i2c0: i2c@f8010000 {
arch/arm/boot/dts/at91sam9rl.dtsi +15 -0
@@ -183,6 +183,9 @@ usart0: serial@fffb0000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 6>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart1: serial@fffb4000 {
@@ -196,6 +199,9 @@ usart1: serial@fffb4000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 7>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart2: serial@fffb8000 {
@@ -209,6 +215,9 @@ usart2: serial@fffb8000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 8>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart3: serial@fffbc000 {
@@ -222,6 +231,9 @@ usart3: serial@fffbc000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 9>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; ssc0: ssc@fffc0000 {
@@ -353,6 +365,9 @@ dbgu: serial@fffff200 { clocks = <&pmc PMC_TYPE_CORE PMC_MCK>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; pinctrl@fffff400 {
arch/arm/boot/dts/at91sam9x5.dtsi +18 -0
@@ -683,6 +683,9 @@ dbgu: serial@fffff200 { clocks = <&pmc PMC_TYPE_CORE PMC_MCK>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart0: serial@f801c000 {
@@ -697,6 +700,9 @@ usart0: serial@f801c000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 5>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart1: serial@f8020000 {
@@ -711,6 +717,9 @@ usart1: serial@f8020000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 6>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart2: serial@f8024000 {
@@ -725,6 +734,9 @@ usart2: serial@f8024000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 7>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; i2c0: i2c@f8010000 {
@@ -781,6 +793,9 @@ uart0: serial@f8040000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 15>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; uart1: serial@f8044000 {
@@ -792,6 +807,9 @@ uart1: serial@f8044000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 16>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; adc0: adc@f804c000 {
arch/arm/boot/dts/at91sam9x5_usart3.dtsi +3 -0
@@ -53,6 +53,9 @@ usart3: serial@f8028000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 8>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; }; };
arch/arm/boot/dts/sam9x60.dtsi +3 -0
@@ -598,6 +598,9 @@ AT91_XDMAC_DT_PERID(28))>, clocks = <&pmc PMC_TYPE_PERIPHERAL 47>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; pinctrl: pinctrl@fffff400 {
arch/arm/boot/dts/sama5d2.dtsi +30 -0
@@ -444,6 +444,9 @@ AT91_XDMAC_DT_PERID(35))>, clocks = <&pmc PMC_TYPE_PERIPHERAL 24>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; uart1: serial@f8020000 {
@@ -460,6 +463,9 @@ AT91_XDMAC_DT_PERID(37))>, clocks = <&pmc PMC_TYPE_PERIPHERAL 25>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; uart2: serial@f8024000 {
@@ -476,6 +482,9 @@ AT91_XDMAC_DT_PERID(39))>, clocks = <&pmc PMC_TYPE_PERIPHERAL 26>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; i2c0: i2c@f8028000 {
@@ -536,6 +545,9 @@ AT91_XDMAC_DT_PER_IF(1) | dma-names = "tx", "rx"; atmel,fifo-size = <32>; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; spi2: spi@400 {
@@ -606,6 +618,9 @@ AT91_XDMAC_DT_PER_IF(1) | dma-names = "tx", "rx"; atmel,fifo-size = <32>; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; spi3: spi@400 {
@@ -771,6 +786,9 @@ AT91_XDMAC_DT_PERID(41))>, clocks = <&pmc PMC_TYPE_PERIPHERAL 27>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; uart4: serial@fc00c000 {
@@ -787,6 +805,9 @@ AT91_XDMAC_DT_PERID(43))>, clocks = <&pmc PMC_TYPE_PERIPHERAL 28>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; flx2: flexcom@fc010000 {
@@ -815,6 +836,9 @@ AT91_XDMAC_DT_PER_IF(1) | dma-names = "tx", "rx"; atmel,fifo-size = <32>; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; spi4: spi@400 {
@@ -885,6 +909,9 @@ AT91_XDMAC_DT_PER_IF(1) | dma-names = "tx", "rx"; atmel,fifo-size = <32>; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; spi5: spi@400 {
@@ -956,6 +983,9 @@ AT91_XDMAC_DT_PER_IF(1) | dma-names = "tx", "rx"; atmel,fifo-size = <32>; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; spi6: spi@400 {
arch/arm/boot/dts/sama5d3.dtsi +18 -0
@@ -203,6 +203,9 @@ usart0: serial@f001c000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 12>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart1: serial@f0020000 {
@@ -217,6 +220,9 @@ usart1: serial@f0020000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 13>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; uart0: serial@f0024000 {
@@ -228,6 +234,9 @@ uart0: serial@f0024000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 16>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; pwm0: pwm@f002c000 {
@@ -389,6 +398,9 @@ usart2: serial@f8020000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 14>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart3: serial@f8024000 {
@@ -403,6 +415,9 @@ usart3: serial@f8024000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 15>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; sha@f8034000 {
@@ -497,6 +512,9 @@ dbgu: serial@ffffee00 { clocks = <&pmc PMC_TYPE_PERIPHERAL 2>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; aic: interrupt-controller@fffff000 {
arch/arm/boot/dts/sama5d3_uart.dtsi +6 -0
@@ -45,6 +45,9 @@ uart0: serial@f0024000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 16>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; uart1: serial@f8028000 {
@@ -56,6 +59,9 @@ uart1: serial@f8028000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 17>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; }; };
arch/arm/boot/dts/sama5d4.dtsi +30 -0
@@ -284,6 +284,9 @@ uart0: serial@f8004000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 27>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; ssc0: ssc@f8008000 {
@@ -443,6 +446,9 @@ usart0: serial@f802c000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 6>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart1: serial@f8030000 {
@@ -461,6 +467,9 @@ usart1: serial@f8030000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 7>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; mmc1: mmc@fc000000 {
@@ -496,6 +505,9 @@ uart1: serial@fc004000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 28>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart2: serial@fc008000 {
@@ -514,6 +526,9 @@ usart2: serial@fc008000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 29>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart3: serial@fc00c000 {
@@ -532,6 +547,9 @@ usart3: serial@fc00c000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 30>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart4: serial@fc010000 {
@@ -550,6 +568,9 @@ usart4: serial@fc010000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 31>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; ssc1: ssc@fc014000 {
@@ -568,6 +589,9 @@ ssc1: ssc@fc014000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 49>; clock-names = "pclk"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; spi1: spi@fc018000 {
@@ -588,6 +612,9 @@ spi1: spi@fc018000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 38>; clock-names = "spi_clk"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; spi2: spi@fc01c000 {
@@ -794,6 +821,9 @@ dbgu: serial@fc069000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 45>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; };
Signature · 1 line
2.25.1
Nicolas Ferre
maintainerQuoted 5 lines · Codrin Ciubotariu
The "atmel,at91sam9260-usart" driver is a MFD driver, so it needs sub-nodes to match the registered platform device. For this reason, we add a serial subnode to all the "atmel,at91sam9260-usart" serial compatible nods. This will also remove the boot warning:
"atmel_usart_serial: Failed to locateof_node[id: -2]"
I don't remember this warning was raised previously even if the MFD driver was added a while ago (Sept. 2018).
I would say it's due to 466a62d7642f ("mfd: core: Make a best effort attempt to match devices with the correct of_nodes") which was added on mid August and corrected with 22380b65dc70 ("mfd: mfd-core: Ensure disabled devices are ignored without error") but maybe not covering our case.
So, well, I don't know what's the best option to this change. Moreover, I would say that all other USART related properties go into the child not if there is a need for one.
Lee, I suspect that we're not the only ones experiencing this ugly warning during the boot log: can you point us out how to deal with it for our existing atmel_serial.c users?
Best regards,
Nicolas
Quoted 740 lines
Signed-off-by Codrin Ciubotariu <[email protected]>--- arch/arm/boot/dts/at91-sam9x60ek.dts | 3 +++ arch/arm/boot/dts/at91rm9200.dtsi | 15 ++++++++++++ arch/arm/boot/dts/at91sam9261.dtsi | 12 ++++++++++ arch/arm/boot/dts/at91sam9261ek.dts | 3 +++ arch/arm/boot/dts/at91sam9263.dtsi | 12 ++++++++++ arch/arm/boot/dts/at91sam9g45.dtsi | 15 ++++++++++++ arch/arm/boot/dts/at91sam9n12.dtsi | 15 ++++++++++++ arch/arm/boot/dts/at91sam9rl.dtsi | 15 ++++++++++++ arch/arm/boot/dts/at91sam9x5.dtsi | 18 ++++++++++++++ arch/arm/boot/dts/at91sam9x5_usart3.dtsi | 3 +++ arch/arm/boot/dts/sam9x60.dtsi | 3 +++ arch/arm/boot/dts/sama5d2.dtsi | 30 ++++++++++++++++++++++++ arch/arm/boot/dts/sama5d3.dtsi | 18 ++++++++++++++ arch/arm/boot/dts/sama5d3_uart.dtsi | 6 +++++ arch/arm/boot/dts/sama5d4.dtsi | 30 ++++++++++++++++++++++++ 15 files changed, 198 insertions(+)arch/arm/boot/dts/at91-sam9x60ek.dts +3
-0@@ -280,6 +280,9 @@ AT91_XDMAC_DT_PERID(10))>, atmel,use-dma-rx; atmel,use-dma-tx; status = "okay"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; };arch/arm/boot/dts/at91rm9200.dtsi +15
-0@@ -602,6 +602,9 @@ dbgu: serial@fffff200 { clocks = <&pmc PMC_TYPE_CORE PMC_MCK>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart0: serial@fffc0000 {@@ -615,6 +618,9 @@ usart0: serial@fffc0000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 6>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart1: serial@fffc4000 {@@ -628,6 +634,9 @@ usart1: serial@fffc4000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 7>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart2: serial@fffc8000 {@@ -641,6 +650,9 @@ usart2: serial@fffc8000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 8>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart3: serial@fffcc000 {@@ -654,6 +666,9 @@ usart3: serial@fffcc000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 9>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usb1: gadget@fffb0000 {arch/arm/boot/dts/at91sam9261.dtsi +12
-0@@ -187,6 +187,9 @@ usart0: serial@fffb0000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 6>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart1: serial@fffb4000 {@@ -200,6 +203,9 @@ usart1: serial@fffb4000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 7>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart2: serial@fffb8000{@@ -213,6 +219,9 @@ usart2: serial@fffb8000{ clocks = <&pmc PMC_TYPE_PERIPHERAL 8>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; ssc0: ssc@fffbc000 {@@ -307,6 +316,9 @@ dbgu: serial@fffff200 { clocks = <&pmc PMC_TYPE_CORE PMC_MCK>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; pinctrl@fffff400 {arch/arm/boot/dts/at91sam9261ek.dts +3
-0@@ -176,6 +176,9 @@ tsc2046@2 { dbgu: serial@fffff200 { status = "okay"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; watchdog@fffffd40 {arch/arm/boot/dts/at91sam9263.dtsi +12
-0@@ -546,6 +546,9 @@ dbgu: serial@ffffee00 { clocks = <&pmc PMC_TYPE_CORE PMC_MCK>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart0: serial@fff8c000 {@@ -559,6 +562,9 @@ usart0: serial@fff8c000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 7>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart1: serial@fff90000 {@@ -572,6 +578,9 @@ usart1: serial@fff90000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 8>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart2: serial@fff94000 {@@ -585,6 +594,9 @@ usart2: serial@fff94000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 9>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; ssc0: ssc@fff98000 {arch/arm/boot/dts/at91sam9g45.dtsi +15
-0@@ -682,6 +682,9 @@ dbgu: serial@ffffee00 { clocks = <&pmc PMC_TYPE_CORE PMC_MCK>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart0: serial@fff8c000 {@@ -695,6 +698,9 @@ usart0: serial@fff8c000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 7>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart1: serial@fff90000 {@@ -708,6 +714,9 @@ usart1: serial@fff90000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 8>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart2: serial@fff94000 {@@ -721,6 +730,9 @@ usart2: serial@fff94000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 9>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart3: serial@fff98000 {@@ -734,6 +746,9 @@ usart3: serial@fff98000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 10>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; macb0: ethernet@fffbc000 {arch/arm/boot/dts/at91sam9n12.dtsi +15
-0@@ -599,6 +599,9 @@ dbgu: serial@fffff200 { clocks = <&pmc PMC_TYPE_CORE PMC_MCK>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; ssc0: ssc@f0010000 {@@ -624,6 +627,9 @@ usart0: serial@f801c000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 5>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart1: serial@f8020000 {@@ -635,6 +641,9 @@ usart1: serial@f8020000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 6>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart2: serial@f8024000 {@@ -646,6 +655,9 @@ usart2: serial@f8024000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 7>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart3: serial@f8028000 {@@ -657,6 +669,9 @@ usart3: serial@f8028000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 8>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; i2c0: i2c@f8010000 {arch/arm/boot/dts/at91sam9rl.dtsi +15
-0@@ -183,6 +183,9 @@ usart0: serial@fffb0000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 6>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart1: serial@fffb4000 {@@ -196,6 +199,9 @@ usart1: serial@fffb4000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 7>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart2: serial@fffb8000 {@@ -209,6 +215,9 @@ usart2: serial@fffb8000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 8>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart3: serial@fffbc000 {@@ -222,6 +231,9 @@ usart3: serial@fffbc000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 9>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; ssc0: ssc@fffc0000 {@@ -353,6 +365,9 @@ dbgu: serial@fffff200 { clocks = <&pmc PMC_TYPE_CORE PMC_MCK>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; pinctrl@fffff400 {arch/arm/boot/dts/at91sam9x5.dtsi +18
-0@@ -683,6 +683,9 @@ dbgu: serial@fffff200 { clocks = <&pmc PMC_TYPE_CORE PMC_MCK>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart0: serial@f801c000 {@@ -697,6 +700,9 @@ usart0: serial@f801c000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 5>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart1: serial@f8020000 {@@ -711,6 +717,9 @@ usart1: serial@f8020000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 6>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart2: serial@f8024000 {@@ -725,6 +734,9 @@ usart2: serial@f8024000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 7>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; i2c0: i2c@f8010000 {@@ -781,6 +793,9 @@ uart0: serial@f8040000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 15>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; uart1: serial@f8044000 {@@ -792,6 +807,9 @@ uart1: serial@f8044000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 16>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; adc0: adc@f804c000 {arch/arm/boot/dts/at91sam9x5_usart3.dtsi +3
-0@@ -53,6 +53,9 @@ usart3: serial@f8028000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 8>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; }; };arch/arm/boot/dts/sam9x60.dtsi +3
-0@@ -598,6 +598,9 @@ AT91_XDMAC_DT_PERID(28))>, clocks = <&pmc PMC_TYPE_PERIPHERAL 47>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; pinctrl: pinctrl@fffff400 {arch/arm/boot/dts/sama5d2.dtsi +30
-0@@ -444,6 +444,9 @@ AT91_XDMAC_DT_PERID(35))>, clocks = <&pmc PMC_TYPE_PERIPHERAL 24>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; uart1: serial@f8020000 {@@ -460,6 +463,9 @@ AT91_XDMAC_DT_PERID(37))>, clocks = <&pmc PMC_TYPE_PERIPHERAL 25>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; uart2: serial@f8024000 {@@ -476,6 +482,9 @@ AT91_XDMAC_DT_PERID(39))>, clocks = <&pmc PMC_TYPE_PERIPHERAL 26>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; i2c0: i2c@f8028000 {@@ -536,6 +545,9 @@ AT91_XDMAC_DT_PER_IF(1) | dma-names = "tx", "rx"; atmel,fifo-size = <32>; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; spi2: spi@400 {@@ -606,6 +618,9 @@ AT91_XDMAC_DT_PER_IF(1) | dma-names = "tx", "rx"; atmel,fifo-size = <32>; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; spi3: spi@400 {@@ -771,6 +786,9 @@ AT91_XDMAC_DT_PERID(41))>, clocks = <&pmc PMC_TYPE_PERIPHERAL 27>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; uart4: serial@fc00c000 {@@ -787,6 +805,9 @@ AT91_XDMAC_DT_PERID(43))>, clocks = <&pmc PMC_TYPE_PERIPHERAL 28>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; flx2: flexcom@fc010000 {@@ -815,6 +836,9 @@ AT91_XDMAC_DT_PER_IF(1) | dma-names = "tx", "rx"; atmel,fifo-size = <32>; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; spi4: spi@400 {@@ -885,6 +909,9 @@ AT91_XDMAC_DT_PER_IF(1) | dma-names = "tx", "rx"; atmel,fifo-size = <32>; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; spi5: spi@400 {@@ -956,6 +983,9 @@ AT91_XDMAC_DT_PER_IF(1) | dma-names = "tx", "rx"; atmel,fifo-size = <32>; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; spi6: spi@400 {arch/arm/boot/dts/sama5d3.dtsi +18
-0@@ -203,6 +203,9 @@ usart0: serial@f001c000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 12>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart1: serial@f0020000 {@@ -217,6 +220,9 @@ usart1: serial@f0020000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 13>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; uart0: serial@f0024000 {@@ -228,6 +234,9 @@ uart0: serial@f0024000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 16>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; pwm0: pwm@f002c000 {@@ -389,6 +398,9 @@ usart2: serial@f8020000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 14>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart3: serial@f8024000 {@@ -403,6 +415,9 @@ usart3: serial@f8024000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 15>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; sha@f8034000 {@@ -497,6 +512,9 @@ dbgu: serial@ffffee00 { clocks = <&pmc PMC_TYPE_PERIPHERAL 2>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; aic: interrupt-controller@fffff000 {arch/arm/boot/dts/sama5d3_uart.dtsi +6
-0@@ -45,6 +45,9 @@ uart0: serial@f0024000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 16>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; uart1: serial@f8028000 {@@ -56,6 +59,9 @@ uart1: serial@f8028000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 17>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; }; };arch/arm/boot/dts/sama5d4.dtsi +30
-0@@ -284,6 +284,9 @@ uart0: serial@f8004000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 27>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; ssc0: ssc@f8008000 {@@ -443,6 +446,9 @@ usart0: serial@f802c000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 6>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart1: serial@f8030000 {@@ -461,6 +467,9 @@ usart1: serial@f8030000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 7>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; mmc1: mmc@fc000000 {@@ -496,6 +505,9 @@ uart1: serial@fc004000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 28>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart2: serial@fc008000 {@@ -514,6 +526,9 @@ usart2: serial@fc008000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 29>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart3: serial@fc00c000 {@@ -532,6 +547,9 @@ usart3: serial@fc00c000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 30>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart4: serial@fc010000 {@@ -550,6 +568,9 @@ usart4: serial@fc010000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 31>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; ssc1: ssc@fc014000 {@@ -568,6 +589,9 @@ ssc1: ssc@fc014000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 49>; clock-names = "pclk"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; spi1: spi@fc018000 {@@ -588,6 +612,9 @@ spi1: spi@fc018000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 38>; clock-names = "spi_clk"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; spi2: spi@fc01c000 {@@ -794,6 +821,9 @@ dbgu: serial@fc069000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 45>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; };
Signature · 1 line
Nicolas Ferre
Quoted 8 lines · Nicolas Ferre
Quoted 6 lines · Codrin Ciubotariu
The "atmel,at91sam9260-usart" driver is a MFD driver, so it needs sub-nodes
to match the registered platform device. For this reason, we add a serial subnode to all the "atmel,at91sam9260-usart" serial compatible nods. This will also remove the boot warning:
"atmel_usart_serial: Failed to locateof_node[id: -2]"
Quoted 8 lines
I don't remember this warning was raised previously even if the MFD driver was added a while ago (Sept. 2018).
I would say it's due to
466a62d7642f("mfd: core: Make a best effort attempt to match devices with the correctof_nodes") which was added on mid August and corrected with22380b65dc70("mfd: mfd-core: Ensure disabled devices are ignored without error") but maybe not covering our case.
Well, it's not covering our enabled devices.
Quoted 8 lines
So, well, I don't know what's the best option to this change. Moreover, I would say that all other USART related properties go into the child not if there is a need for one.
Lee, I suspect that we're not the only ones experiencing this ugly warning during the boot log: can you point us out how to deal with it for our existing
atmel_serial.cusers?
My understading is that platform devices registered by MFD should have a correspondig DT node. The parrent properties are also available for the other usart device (usart-spi), so I think we should keep them in the parrent.
Best regards,
Codrin
Quoted 25 lines · On Fri, 30 Oct 2020, [email protected] wrote:
Quoted 8 lines · Nicolas Ferre
Quoted 6 lines · Codrin Ciubotariu
The "atmel,at91sam9260-usart" driver is a MFD driver, so it needs sub-nodes
to match the registered platform device. For this reason, we add a serial subnode to all the "atmel,at91sam9260-usart" serial compatible nods. This will also remove the boot warning:
"atmel_usart_serial: Failed to locateof_node[id: -2]"Quoted 8 lines
I don't remember this warning was raised previously even if the MFD driver was added a while ago (Sept. 2018).
I would say it's due to
466a62d7642f("mfd: core: Make a best effort attempt to match devices with the correctof_nodes") which was added on mid August and corrected with22380b65dc70("mfd: mfd-core: Ensure disabled devices are ignored without error") but maybe not covering our case.Well, it's not covering our enabled devices.
Quoted 5 lines
So, well, I don't know what's the best option to this change. Moreover, I would say that all other USART related properties go into the child not if there is a need for one.
Quoted 8 lines
Quoted 3 lines
Lee, I suspect that we're not the only ones experiencing this ugly warning during the boot log: can you point us out how to deal with it for our existing
atmel_serial.cusers?My understading is that platform devices registered by MFD should have a correspondig DT node. The parrent properties are also available for the other usart device (usart-spi), so I think we should keep them in the parrent.
Device Tree and MFD are unrelated. MFDs don't even exist - they are a figment of a Linux Kernel Engineer's imagination - we made them up!
The DT should describe the hardware and nothing else. If we wish to mess with devices for our own gain i.e. organise them into different subsystems, we have to do that in software. That's what MFD is for.
Signature · 4 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
Quoted 36 lines · Lee Jones
Quoted 25 lines · On Fri, 30 Oct 2020, [email protected] wrote:
Quoted 8 lines · Nicolas Ferre
Quoted 6 lines · Codrin Ciubotariu
The "atmel,at91sam9260-usart" driver is a MFD driver, so it needs sub-nodes
to match the registered platform device. For this reason, we add a serial subnode to all the "atmel,at91sam9260-usart" serial compatible nods. This will also remove the boot warning:
"atmel_usart_serial: Failed to locateof_node[id: -2]"Quoted 8 lines
I don't remember this warning was raised previously even if the MFD driver was added a while ago (Sept. 2018).
I would say it's due to
466a62d7642f("mfd: core: Make a best effort attempt to match devices with the correctof_nodes") which was added on mid August and corrected with22380b65dc70("mfd: mfd-core: Ensure disabled devices are ignored without error") but maybe not covering our case.Well, it's not covering our enabled devices.
Quoted 5 lines
So, well, I don't know what's the best option to this change. Moreover, I would say that all other USART related properties go into the child not if there is a need for one.
Quoted 8 lines
Quoted 3 lines
Lee, I suspect that we're not the only ones experiencing this ugly warning during the boot log: can you point us out how to deal with it for our existing
atmel_serial.cusers?My understading is that platform devices registered by MFD should have a correspondig DT node. The parrent properties are also available for the other usart device (usart-spi), so I think we should keep them in the parrent.
Quoted 6 lines
Device Tree and MFD are unrelated. MFDs don't even exist - they are a figment of a Linux Kernel Engineer's imagination - we made them up!
The DT should describe the hardware and nothing else. If we wish to mess with devices for our own gain i.e. organise them into different subsystems, we have to do that in software. That's what MFD is for.
You are right, I mixed up things. We are using the MFD here to describe a hardware USART IP that can also function as an SPI, but not at the same time. The decision of whether the IP works as a normal USART or an SPI is DT configurable, at this moment. It is doing more than just describing the HW, but I don't know how to describe it otherwise.
Best regards,
Codrin
Quoted 15 lines · Nicolas Ferre
Quoted 5 lines · Codrin Ciubotariu
The "atmel,at91sam9260-usart" driver is a MFD driver, so it needs sub-nodes to match the registered platform device. For this reason, we add a serial subnode to all the "atmel,at91sam9260-usart" serial compatible nods. This will also remove the boot warning:
"atmel_usart_serial: Failed to locateof_node[id: -2]"I don't remember this warning was raised previously even if the MFD driver was added a while ago (Sept. 2018).
I would say it's due to
466a62d7642f("mfd: core: Make a best effort attempt to match devices with the correctof_nodes") which was added on mid August and corrected with22380b65dc70("mfd: mfd-core: Ensure disabled devices are ignored without error") but maybe not covering our case.
Quoted 7 lines
So, well, I don't know what's the best option to this change. Moreover, I would say that all other USART related properties go into the child not if there is a need for one.
Lee, I suspect that we're not the only ones experiencing this ugly warning during the boot log: can you point us out how to deal with it for our existing
atmel_serial.cusers?
You should not be instantiating drivers through Device Tree which are not described there. If the correct representation of the H/W already exists in Device Tree i.e. no SPI and UART IP really exists, use the MFD core API to register them utilising the platform API instead.
This should do it:
drivers/mfd/at91-usart.c +0 -2
@@ -17,12 +17,10 @@static const struct mfd_cell at91_usart_spi_subdev = { .name ="at91_usart_spi" , - .of_compatible ="microchip,at91sam9g45-usart-spi" , };static const struct mfd_cell at91_usart_serial_subdev = { .name ="atmel_usart_serial" , - .of_compatible ="atmel,at91rm9200-usart-serial" , };static int at91_usart_mode_probe (struct platform_device *pdev)
Quoted 676 lines
Quoted 674 lines
Signed-off-by Codrin Ciubotariu <[email protected]>--- arch/arm/boot/dts/at91-sam9x60ek.dts | 3 +++ arch/arm/boot/dts/at91rm9200.dtsi | 15 ++++++++++++ arch/arm/boot/dts/at91sam9261.dtsi | 12 ++++++++++ arch/arm/boot/dts/at91sam9261ek.dts | 3 +++ arch/arm/boot/dts/at91sam9263.dtsi | 12 ++++++++++ arch/arm/boot/dts/at91sam9g45.dtsi | 15 ++++++++++++ arch/arm/boot/dts/at91sam9n12.dtsi | 15 ++++++++++++ arch/arm/boot/dts/at91sam9rl.dtsi | 15 ++++++++++++ arch/arm/boot/dts/at91sam9x5.dtsi | 18 ++++++++++++++ arch/arm/boot/dts/at91sam9x5_usart3.dtsi | 3 +++ arch/arm/boot/dts/sam9x60.dtsi | 3 +++ arch/arm/boot/dts/sama5d2.dtsi | 30 ++++++++++++++++++++++++ arch/arm/boot/dts/sama5d3.dtsi | 18 ++++++++++++++ arch/arm/boot/dts/sama5d3_uart.dtsi | 6 +++++ arch/arm/boot/dts/sama5d4.dtsi | 30 ++++++++++++++++++++++++ 15 files changed, 198 insertions(+)arch/arm/boot/dts/at91-sam9x60ek.dts +3
-0@@ -280,6 +280,9 @@ AT91_XDMAC_DT_PERID(10))>, atmel,use-dma-rx; atmel,use-dma-tx; status = "okay"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; };arch/arm/boot/dts/at91rm9200.dtsi +15
-0@@ -602,6 +602,9 @@ dbgu: serial@fffff200 { clocks = <&pmc PMC_TYPE_CORE PMC_MCK>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart0: serial@fffc0000 {@@ -615,6 +618,9 @@ usart0: serial@fffc0000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 6>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart1: serial@fffc4000 {@@ -628,6 +634,9 @@ usart1: serial@fffc4000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 7>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart2: serial@fffc8000 {@@ -641,6 +650,9 @@ usart2: serial@fffc8000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 8>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart3: serial@fffcc000 {@@ -654,6 +666,9 @@ usart3: serial@fffcc000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 9>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usb1: gadget@fffb0000 {arch/arm/boot/dts/at91sam9261.dtsi +12
-0@@ -187,6 +187,9 @@ usart0: serial@fffb0000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 6>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart1: serial@fffb4000 {@@ -200,6 +203,9 @@ usart1: serial@fffb4000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 7>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart2: serial@fffb8000{@@ -213,6 +219,9 @@ usart2: serial@fffb8000{ clocks = <&pmc PMC_TYPE_PERIPHERAL 8>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; ssc0: ssc@fffbc000 {@@ -307,6 +316,9 @@ dbgu: serial@fffff200 { clocks = <&pmc PMC_TYPE_CORE PMC_MCK>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; pinctrl@fffff400 {arch/arm/boot/dts/at91sam9261ek.dts +3
-0@@ -176,6 +176,9 @@ tsc2046@2 { dbgu: serial@fffff200 { status = "okay"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; watchdog@fffffd40 {arch/arm/boot/dts/at91sam9263.dtsi +12
-0@@ -546,6 +546,9 @@ dbgu: serial@ffffee00 { clocks = <&pmc PMC_TYPE_CORE PMC_MCK>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart0: serial@fff8c000 {@@ -559,6 +562,9 @@ usart0: serial@fff8c000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 7>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart1: serial@fff90000 {@@ -572,6 +578,9 @@ usart1: serial@fff90000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 8>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart2: serial@fff94000 {@@ -585,6 +594,9 @@ usart2: serial@fff94000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 9>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; ssc0: ssc@fff98000 {arch/arm/boot/dts/at91sam9g45.dtsi +15
-0@@ -682,6 +682,9 @@ dbgu: serial@ffffee00 { clocks = <&pmc PMC_TYPE_CORE PMC_MCK>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart0: serial@fff8c000 {@@ -695,6 +698,9 @@ usart0: serial@fff8c000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 7>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart1: serial@fff90000 {@@ -708,6 +714,9 @@ usart1: serial@fff90000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 8>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart2: serial@fff94000 {@@ -721,6 +730,9 @@ usart2: serial@fff94000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 9>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart3: serial@fff98000 {@@ -734,6 +746,9 @@ usart3: serial@fff98000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 10>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; macb0: ethernet@fffbc000 {arch/arm/boot/dts/at91sam9n12.dtsi +15
-0@@ -599,6 +599,9 @@ dbgu: serial@fffff200 { clocks = <&pmc PMC_TYPE_CORE PMC_MCK>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; ssc0: ssc@f0010000 {@@ -624,6 +627,9 @@ usart0: serial@f801c000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 5>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart1: serial@f8020000 {@@ -635,6 +641,9 @@ usart1: serial@f8020000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 6>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart2: serial@f8024000 {@@ -646,6 +655,9 @@ usart2: serial@f8024000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 7>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart3: serial@f8028000 {@@ -657,6 +669,9 @@ usart3: serial@f8028000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 8>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; i2c0: i2c@f8010000 {arch/arm/boot/dts/at91sam9rl.dtsi +15
-0@@ -183,6 +183,9 @@ usart0: serial@fffb0000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 6>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart1: serial@fffb4000 {@@ -196,6 +199,9 @@ usart1: serial@fffb4000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 7>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart2: serial@fffb8000 {@@ -209,6 +215,9 @@ usart2: serial@fffb8000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 8>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart3: serial@fffbc000 {@@ -222,6 +231,9 @@ usart3: serial@fffbc000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 9>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; ssc0: ssc@fffc0000 {@@ -353,6 +365,9 @@ dbgu: serial@fffff200 { clocks = <&pmc PMC_TYPE_CORE PMC_MCK>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; pinctrl@fffff400 {arch/arm/boot/dts/at91sam9x5.dtsi +18
-0@@ -683,6 +683,9 @@ dbgu: serial@fffff200 { clocks = <&pmc PMC_TYPE_CORE PMC_MCK>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart0: serial@f801c000 {@@ -697,6 +700,9 @@ usart0: serial@f801c000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 5>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart1: serial@f8020000 {@@ -711,6 +717,9 @@ usart1: serial@f8020000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 6>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart2: serial@f8024000 {@@ -725,6 +734,9 @@ usart2: serial@f8024000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 7>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; i2c0: i2c@f8010000 {@@ -781,6 +793,9 @@ uart0: serial@f8040000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 15>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; uart1: serial@f8044000 {@@ -792,6 +807,9 @@ uart1: serial@f8044000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 16>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; adc0: adc@f804c000 {arch/arm/boot/dts/at91sam9x5_usart3.dtsi +3
-0@@ -53,6 +53,9 @@ usart3: serial@f8028000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 8>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; }; };arch/arm/boot/dts/sam9x60.dtsi +3
-0@@ -598,6 +598,9 @@ AT91_XDMAC_DT_PERID(28))>, clocks = <&pmc PMC_TYPE_PERIPHERAL 47>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; pinctrl: pinctrl@fffff400 {arch/arm/boot/dts/sama5d2.dtsi +30
-0@@ -444,6 +444,9 @@ AT91_XDMAC_DT_PERID(35))>, clocks = <&pmc PMC_TYPE_PERIPHERAL 24>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; uart1: serial@f8020000 {@@ -460,6 +463,9 @@ AT91_XDMAC_DT_PERID(37))>, clocks = <&pmc PMC_TYPE_PERIPHERAL 25>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; uart2: serial@f8024000 {@@ -476,6 +482,9 @@ AT91_XDMAC_DT_PERID(39))>, clocks = <&pmc PMC_TYPE_PERIPHERAL 26>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; i2c0: i2c@f8028000 {@@ -536,6 +545,9 @@ AT91_XDMAC_DT_PER_IF(1) | dma-names = "tx", "rx"; atmel,fifo-size = <32>; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; spi2: spi@400 {@@ -606,6 +618,9 @@ AT91_XDMAC_DT_PER_IF(1) | dma-names = "tx", "rx"; atmel,fifo-size = <32>; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; spi3: spi@400 {@@ -771,6 +786,9 @@ AT91_XDMAC_DT_PERID(41))>, clocks = <&pmc PMC_TYPE_PERIPHERAL 27>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; uart4: serial@fc00c000 {@@ -787,6 +805,9 @@ AT91_XDMAC_DT_PERID(43))>, clocks = <&pmc PMC_TYPE_PERIPHERAL 28>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; flx2: flexcom@fc010000 {@@ -815,6 +836,9 @@ AT91_XDMAC_DT_PER_IF(1) | dma-names = "tx", "rx"; atmel,fifo-size = <32>; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; spi4: spi@400 {@@ -885,6 +909,9 @@ AT91_XDMAC_DT_PER_IF(1) | dma-names = "tx", "rx"; atmel,fifo-size = <32>; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; spi5: spi@400 {@@ -956,6 +983,9 @@ AT91_XDMAC_DT_PER_IF(1) | dma-names = "tx", "rx"; atmel,fifo-size = <32>; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; spi6: spi@400 {arch/arm/boot/dts/sama5d3.dtsi +18
-0@@ -203,6 +203,9 @@ usart0: serial@f001c000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 12>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart1: serial@f0020000 {@@ -217,6 +220,9 @@ usart1: serial@f0020000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 13>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; uart0: serial@f0024000 {@@ -228,6 +234,9 @@ uart0: serial@f0024000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 16>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; pwm0: pwm@f002c000 {@@ -389,6 +398,9 @@ usart2: serial@f8020000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 14>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart3: serial@f8024000 {@@ -403,6 +415,9 @@ usart3: serial@f8024000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 15>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; sha@f8034000 {@@ -497,6 +512,9 @@ dbgu: serial@ffffee00 { clocks = <&pmc PMC_TYPE_PERIPHERAL 2>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; aic: interrupt-controller@fffff000 {arch/arm/boot/dts/sama5d3_uart.dtsi +6
-0@@ -45,6 +45,9 @@ uart0: serial@f0024000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 16>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; uart1: serial@f8028000 {@@ -56,6 +59,9 @@ uart1: serial@f8028000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 17>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; }; };arch/arm/boot/dts/sama5d4.dtsi +30
-0@@ -284,6 +284,9 @@ uart0: serial@f8004000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 27>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; ssc0: ssc@f8008000 {@@ -443,6 +446,9 @@ usart0: serial@f802c000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 6>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart1: serial@f8030000 {@@ -461,6 +467,9 @@ usart1: serial@f8030000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 7>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; mmc1: mmc@fc000000 {@@ -496,6 +505,9 @@ uart1: serial@fc004000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 28>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart2: serial@fc008000 {@@ -514,6 +526,9 @@ usart2: serial@fc008000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 29>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart3: serial@fc00c000 {@@ -532,6 +547,9 @@ usart3: serial@fc00c000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 30>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; usart4: serial@fc010000 {@@ -550,6 +568,9 @@ usart4: serial@fc010000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 31>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; ssc1: ssc@fc014000 {@@ -568,6 +589,9 @@ ssc1: ssc@fc014000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 49>; clock-names = "pclk"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; spi1: spi@fc018000 {@@ -588,6 +612,9 @@ spi1: spi@fc018000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 38>; clock-names = "spi_clk"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; }; spi2: spi@fc01c000 {@@ -794,6 +821,9 @@ dbgu: serial@fc069000 { clocks = <&pmc PMC_TYPE_PERIPHERAL 45>; clock-names = "usart"; status = "disabled"; + serial { + compatible = "atmel,at91rm9200-usart-serial"; + }; };
Signature · 4 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
Quoted 39 lines · Lee Jones
Quoted 15 lines · Nicolas Ferre
Quoted 5 lines · Codrin Ciubotariu
The "atmel,at91sam9260-usart" driver is a MFD driver, so it needs sub-nodes to match the registered platform device. For this reason, we add a serial subnode to all the "atmel,at91sam9260-usart" serial compatible nods. This will also remove the boot warning:
"atmel_usart_serial: Failed to locateof_node[id: -2]"I don't remember this warning was raised previously even if the MFD driver was added a while ago (Sept. 2018).
I would say it's due to
466a62d7642f("mfd: core: Make a best effort attempt to match devices with the correctof_nodes") which was added on mid August and corrected with22380b65dc70("mfd: mfd-core: Ensure disabled devices are ignored without error") but maybe not covering our case.Quoted 7 lines
So, well, I don't know what's the best option to this change. Moreover, I would say that all other USART related properties go into the child not if there is a need for one.
Lee, I suspect that we're not the only ones experiencing this ugly warning during the boot log: can you point us out how to deal with it for our existing
atmel_serial.cusers?You should not be instantiating drivers through Device Tree which are not described there. If the correct representation of the H/W already exists in Device Tree i.e. no SPI and UART IP really exists, use the MFD core API to register them utilising the platform API instead.
This should do it:
drivers/mfd/at91-usart.c +0
-0@@ -17,12 +17,10 @@static const struct mfd_cell at91_usart_spi_subdev = {
drivers/mfd/at91-usart.c line 26
Quoted 10 lines
drivers/mfd/at91-usart.c +0
-2.name = "at91_usart_spi", - .of_compatible = "microchip,at91sam9g45-usart-spi", };static const struct mfd_cell at91_usart_serial_subdev = { .name ="atmel_usart_serial" , - .of_compatible ="atmel,at91rm9200-usart-serial" , };static int at91_usart_mode_probe (struct platform_device *pdev)
[snip]
Hi Lee, thank you for looking through our usart driver and for sharing your thoughts. Removing the usage of compatible string means that for similar serial/SPI IPs we would need to create new platform drivers. This is not ideal, but it's a solution. What I proposed is more flexible, but, as you pointed out, I am not sure it correctly describes the HW, because the decision of whether to use this IP as a serial or a SPI is a configurable one.
Thanks and best regards,
Codrin
Quoted 49 lines · On Mon, 02 Nov 2020, [email protected] wrote:
Quoted 48 lines · Lee Jones
Quoted 15 lines · Nicolas Ferre
Quoted 5 lines · Codrin Ciubotariu
The "atmel,at91sam9260-usart" driver is a MFD driver, so it needs sub-nodes to match the registered platform device. For this reason, we add a serial subnode to all the "atmel,at91sam9260-usart" serial compatible nods. This will also remove the boot warning:
"atmel_usart_serial: Failed to locateof_node[id: -2]"I don't remember this warning was raised previously even if the MFD driver was added a while ago (Sept. 2018).
I would say it's due to
466a62d7642f("mfd: core: Make a best effort attempt to match devices with the correctof_nodes") which was added on mid August and corrected with22380b65dc70("mfd: mfd-core: Ensure disabled devices are ignored without error") but maybe not covering our case.Quoted 7 lines
So, well, I don't know what's the best option to this change. Moreover, I would say that all other USART related properties go into the child not if there is a need for one.
Lee, I suspect that we're not the only ones experiencing this ugly warning during the boot log: can you point us out how to deal with it for our existing
atmel_serial.cusers?You should not be instantiating drivers through Device Tree which are not described there. If the correct representation of the H/W already exists in Device Tree i.e. no SPI and UART IP really exists, use the MFD core API to register them utilising the platform API instead.
This should do it:
drivers/mfd/at91-usart.c +0
-2@@ -17,12 +17,10 @@static const struct mfd_cell at91_usart_spi_subdev = { .name ="at91_usart_spi" , - .of_compatible ="microchip,at91sam9g45-usart-spi" , };static const struct mfd_cell at91_usart_serial_subdev = { .name ="atmel_usart_serial" , - .of_compatible ="atmel,at91rm9200-usart-serial" , };
Quoted 7 lines
drivers/mfd/at91-usart.c line 26
Quoted 1 line
drivers/mfd/at91-usart.c +0
-0static int at91_usart_mode_probe (struct platform_device *pdev)[snip]
Hi Lee, thank you for looking through our usart driver and for sharing your thoughts. Removing the usage of compatible string means that for similar serial/SPI IPs we would need to create new platform drivers.
Why would you need to do that?
Quoted 7 lines
This is not ideal, but it's a solution. What I proposed is more flexible, but, as you pointed out, I am not sure it correctly describes the HW, because the decision of whether to use this IP as a serial or a SPI is a configurable one.
Thanks and best regards,
Codrin
Signature · 4 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
Quoted 57 lines · Lee Jones
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
Quoted 53 lines · On Mon, 02 Nov 2020, [email protected] wrote:
Quoted 49 lines · Lee Jones
Quoted 15 lines · Nicolas Ferre
Quoted 5 lines · Codrin Ciubotariu
The "atmel,at91sam9260-usart" driver is a MFD driver, so it needs sub-nodes to match the registered platform device. For this reason, we add a serial subnode to all the "atmel,at91sam9260-usart" serial compatible nods. This will also remove the boot warning:
"atmel_usart_serial: Failed to locateof_node[id: -2]"I don't remember this warning was raised previously even if the MFD driver was added a while ago (Sept. 2018).
I would say it's due to
466a62d7642f("mfd: core: Make a best effort attempt to match devices with the correctof_nodes") which was added on mid August and corrected with22380b65dc70("mfd: mfd-core: Ensure disabled devices are ignored without error") but maybe not covering our case.Quoted 7 lines
So, well, I don't know what's the best option to this change. Moreover, I would say that all other USART related properties go into the child not if there is a need for one.
Lee, I suspect that we're not the only ones experiencing this ugly warning during the boot log: can you point us out how to deal with it for our existing
atmel_serial.cusers?You should not be instantiating drivers through Device Tree which are not described there. If the correct representation of the H/W already exists in Device Tree i.e. no SPI and UART IP really exists, use the MFD core API to register them utilising the platform API instead.
This should do it:
drivers/mfd/at91-usart.c +0
-2@@ -17,12 +17,10 @@static const struct mfd_cell at91_usart_spi_subdev = { .name ="at91_usart_spi" , - .of_compatible ="microchip,at91sam9g45-usart-spi" , };static const struct mfd_cell at91_usart_serial_subdev = { .name ="atmel_usart_serial" , - .of_compatible ="atmel,at91rm9200-usart-serial" , };static int at91_usart_mode_probe (struct platform_device *pdev)[snip]
Quoted 5 lines
Quoted 3 lines
Hi Lee, thank you for looking through our usart driver and for sharing your thoughts. Removing the usage of compatible string means that for similar serial/SPI IPs we would need to create new platform drivers.
Why would you need to do that?
In the case we will have to support another similar IP, but with a different set of features. Not a new platform driver from scratch, but at least a new struct platform_driver for each variant.
Quoted 15 lines
Quoted 8 lines
This is not ideal, but it's a solution. What I proposed is more flexible, but, as you pointed out, I am not sure it correctly describes the HW, because the decision of whether to use this IP as a serial or a SPI is a configurable one.
Thanks and best regards,
Codrin--
Lee Jones [李琼斯]
Senior Technical Lead - Developer ServicesLinaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
Quoted 62 lines · On 02.11.2020 14:55, [email protected] wrote:
Quoted 61 lines · Lee Jones
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
Quoted 56 lines · On Mon, 02 Nov 2020, [email protected] wrote:
Quoted 39 lines · Lee Jones
Quoted 15 lines · Nicolas Ferre
Quoted 5 lines · Codrin Ciubotariu
The "atmel,at91sam9260-usart" driver is a MFD driver, so it needs sub-nodes to match the registered platform device. For this reason, we add a serial subnode to all the "atmel,at91sam9260-usart" serial compatible nods. This will also remove the boot warning:
"atmel_usart_serial: Failed to locateof_node[id: -2]"I don't remember this warning was raised previously even if the MFD driver was added a while ago (Sept. 2018).
I would say it's due to
466a62d7642f("mfd: core: Make a best effort attempt to match devices with the correctof_nodes") which was added on mid August and corrected with22380b65dc70("mfd: mfd-core: Ensure disabled devices are ignored without error") but maybe not covering our case.Quoted 7 lines
So, well, I don't know what's the best option to this change. Moreover, I would say that all other USART related properties go into the child not if there is a need for one.
Lee, I suspect that we're not the only ones experiencing this ugly warning during the boot log: can you point us out how to deal with it for our existing
atmel_serial.cusers?You should not be instantiating drivers through Device Tree which are not described there. If the correct representation of the H/W already exists in Device Tree i.e. no SPI and UART IP really exists, use the MFD core API to register them utilising the platform API instead.
This should do it:
drivers/mfd/at91-usart.c +0
-0@@ -17,12 +17,10 @@static const struct mfd_cell at91_usart_spi_subdev = {drivers/mfd/at91-usart.c line 26
Quoted 10 lines
drivers/mfd/at91-usart.c +0
-2.name = "at91_usart_spi", - .of_compatible = "microchip,at91sam9g45-usart-spi", };static const struct mfd_cell at91_usart_serial_subdev = { .name ="atmel_usart_serial" , - .of_compatible ="atmel,at91rm9200-usart-serial" , };static int at91_usart_mode_probe (struct platform_device *pdev)[snip]
Hi Lee, thank you for looking through our usart driver and for sharing your thoughts. Removing the usage of compatible string means that for similar serial/SPI IPs we would need to create new platform drivers.
Quoted 5 lines
Quoted 1 line
Why would you need to do that?
In the case we will have to support another similar IP, but with a different set of features. Not a new platform driver from scratch, but at least a new struct
platform_driverfor each variant.
I guess we could use struct mfd_cell.platform_data to select the features for the serial/SPI. This platform data can be per compatible of our MFD driver. I will send a patch with the changes you suggested. Thank you!
Best regards,
Codrin
Quoted 17 lines
Quoted 16 lines
Quoted 9 lines
This is not ideal, but it's a solution. What I proposed is more flexible, but, as you pointed out, I am not sure it correctly describes the HW, because the decision of whether to use this IP as a serial or a SPI is a configurable one.
Thanks and best regards,
Codrin--
Lee Jones [李琼斯]
Senior Technical Lead - Developer ServicesLinaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
Quoted 65 lines · On Mon, 02 Nov 2020, [email protected] wrote:
Quoted 64 lines · On 02.11.2020 14:55, [email protected] wrote:
Quoted 62 lines · Lee Jones
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
Quoted 49 lines · On Mon, 02 Nov 2020, [email protected] wrote:
Quoted 48 lines · Lee Jones
Quoted 15 lines · Nicolas Ferre
Quoted 5 lines · Codrin Ciubotariu
The "atmel,at91sam9260-usart" driver is a MFD driver, so it needs sub-nodes to match the registered platform device. For this reason, we add a serial subnode to all the "atmel,at91sam9260-usart" serial compatible nods. This will also remove the boot warning:
"atmel_usart_serial: Failed to locateof_node[id: -2]"I don't remember this warning was raised previously even if the MFD driver was added a while ago (Sept. 2018).
I would say it's due to
466a62d7642f("mfd: core: Make a best effort attempt to match devices with the correctof_nodes") which was added on mid August and corrected with22380b65dc70("mfd: mfd-core: Ensure disabled devices are ignored without error") but maybe not covering our case.Quoted 7 lines
So, well, I don't know what's the best option to this change. Moreover, I would say that all other USART related properties go into the child not if there is a need for one.
Lee, I suspect that we're not the only ones experiencing this ugly warning during the boot log: can you point us out how to deal with it for our existing
atmel_serial.cusers?You should not be instantiating drivers through Device Tree which are not described there. If the correct representation of the H/W already exists in Device Tree i.e. no SPI and UART IP really exists, use the MFD core API to register them utilising the platform API instead.
This should do it:
drivers/mfd/at91-usart.c +0
-2@@ -17,12 +17,10 @@static const struct mfd_cell at91_usart_spi_subdev = { .name ="at91_usart_spi" , - .of_compatible ="microchip,at91sam9g45-usart-spi" , };static const struct mfd_cell at91_usart_serial_subdev = { .name ="atmel_usart_serial" , - .of_compatible ="atmel,at91rm9200-usart-serial" , };Quoted 7 lines
drivers/mfd/at91-usart.c line 26
Quoted 1 line
drivers/mfd/at91-usart.c +0
-0static int at91_usart_mode_probe (struct platform_device *pdev)[snip]
Hi Lee, thank you for looking through our usart driver and for sharing your thoughts. Removing the usage of compatible string means that for similar serial/SPI IPs we would need to create new platform drivers.
Why would you need to do that?
Quoted 7 lines
Quoted 3 lines
In the case we will have to support another similar IP, but with a different set of features. Not a new platform driver from scratch, but at least a new struct
platform_driverfor each variant.I guess we could use struct mfd_cell.platform_data to select the features for the serial/SPI. This platform data can be per compatible of our MFD driver. I will send a patch with the changes you suggested.
Yes, that is what platform data is for.
Quoted 1 line
Thank you!
NP.
Signature · 4 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog