Skip to contentSkip to conversation

ARM: dts: sun7i: add pinctrl for missing uart mux options

PATCH Superseded Mans Rullgard 3 participants 9 messages Feb 16, 2019 – Feb 20, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: dts: sun7i: add pinctrl for missing uart mux options

This adds pinctrl settings for various missing uart options.

---
 arch/arm/boot/dts/sun7i-a20.dtsi | 45 ++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)
arch/arm/boot/dts/sun7i-a20.dtsi +45 -0
index af5b067a5f83..2295ff5adf48 100644
@@ -944,6 +944,31 @@
 				function = "uart0";
 			};
 
+			uart0_pf_pins: uart0-pf-pins {
+				pins = "PF2", "PF4";
+				function = "uart0";
+			};
+
+			uart1_pa_pins: uart1-pa-pins {
+				pins = "PA10", "PA11";
+				function = "uart1";
+			};
+
+			uart1_cts_rts_pa_pins: uart1-cts-rts-pa-pins {
+				pins = "PA12", "PIA13";
+				function = "uart2";
+			};
+
+			uart2_pa_pins: uart2-pa-pins {
+				pins = "PIA2", "PIA3";
+				function = "uart2";
+			};
+
+			uart2_cts_rts_pa_pins: uart2-cts-rts-pa-pins {
+				pins = "PA0", "PIA1";
+				function = "uart2";
+			};
+
 			uart2_pi_pins: uart2-pi-pins {
 				pins = "PI18", "PI19";
 				function = "uart2";
@@ -969,6 +994,11 @@
 				function = "uart3";
 			};
 
+			uart3_cts_rts_ph_pins: uart3-cts-rts-ph-pins {
+				pins = "PH2", "PH3";
+				function = "uart3";
+			};
+
 			uart4_pg_pins: uart4-pg-pins {
 				pins = "PG10", "PG11";
 				function = "uart4";
@@ -979,16 +1009,31 @@
 				function = "uart4";
 			};
 
+			uart5_ph_pins: uart5-ph-pins {
+				pins = "PH6", "PH7";
+				function = "uart5";
+			};
+
 			uart5_pi_pins: uart5-pi-pins {
 				pins = "PI10", "PI11";
 				function = "uart5";
 			};
 
+			uart6_pa_pins: uart6-pa-pins {
+				pins = "PA12", "PA13";
+				function = "uart6";
+			};
+
 			uart6_pi_pins: uart6-pi-pins {
 				pins = "PI12", "PI13";
 				function = "uart6";
 			};
 
+			uart7_pa_pins: uart7-pa-pins {
+				pins = "PA14", "PA15";
+				function = "uart7";
+			};
+
 			uart7_pi_pins: uart7-pi-pins {
 				pins = "PI20", "PI21";
 				function = "uart7";
Signature · 1 line
2.20.1
#1 lore raw
Quoted 13 lines · Mans Rullgard

This adds pinctrl settings for various missing uart options.

---
 arch/arm/boot/dts/sun7i-a20.dtsi | 45 ++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)
arch/arm/boot/dts/sun7i-a20.dtsi +0 -0
index af5b067a5f83..2295ff5adf48 100644

arch/arm/boot/dts/sun7i-a20.dtsi line 950

Quoted 7 lines
arch/arm/boot/dts/sun7i-a20.dtsi +4 -0
@@ -944,6 +944,31 @@
                                function = "uart0";
                        };
 
+                       uart0_pf_pins: uart0-pf-pins {
+                               pins = "PF2", "PF4";
+                               function = "uart0";
+                       };

We've had the policy of not adding pinctrl nodes that aren't used in-tree, to avoid bloating up the blob size. However DTC 1.4.7 introduced the new /omit-if-no-ref/ directive, which would make the compiler discard marked nodes if they aren't referenced.

So please add this to all the new nodes. It seems to work regardless whether you add it before or after the label, though having it after the label seems to make vim syntax highlighting happier.

Regards
ChenYu

#2 lore raw
Quoted 27 lines · Chen-Yu Tsai
Quoted 13 lines · Mans Rullgard

This adds pinctrl settings for various missing uart options.

---
 arch/arm/boot/dts/sun7i-a20.dtsi | 45 ++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)
arch/arm/boot/dts/sun7i-a20.dtsi +0 -0
index af5b067a5f83..2295ff5adf48 100644

arch/arm/boot/dts/sun7i-a20.dtsi line 950

Quoted 7 lines
arch/arm/boot/dts/sun7i-a20.dtsi +4 -0
@@ -944,6 +944,31 @@
                                function = "uart0";
                        };
 
+                       uart0_pf_pins: uart0-pf-pins {
+                               pins = "PF2", "PF4";
+                               function = "uart0";
+                       };

We've had the policy of not adding pinctrl nodes that aren't used in-tree, to avoid bloating up the blob size. However DTC 1.4.7 introduced the new /omit-if-no-ref/ directive, which would make the compiler discard marked nodes if they aren't referenced.

Quoted 3 lines

So please add this to all the new nodes. It seems to work regardless whether you add it before or after the label, though having it after the label seems to make vim syntax highlighting happier.

It also works (both for dtc and vim) if we put it on the previous line, so something like:

/omit-if-no-ref/
uart0_pf_pins: uart0-pf-pins {
};

And it does have the advantage of keeping the same line width, which could get pretty long on some nodes.

Maxime

Signature · 3 lines
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw
Quoted 35 lines · Maxime Ripard
Quoted 27 lines · Chen-Yu Tsai
Quoted 13 lines · Mans Rullgard

This adds pinctrl settings for various missing uart options.

---
 arch/arm/boot/dts/sun7i-a20.dtsi | 45 ++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)
arch/arm/boot/dts/sun7i-a20.dtsi +0 -0
index af5b067a5f83..2295ff5adf48 100644

arch/arm/boot/dts/sun7i-a20.dtsi line 950

Quoted 7 lines
arch/arm/boot/dts/sun7i-a20.dtsi +4 -0
@@ -944,6 +944,31 @@
                                function = "uart0";
                        };
 
+                       uart0_pf_pins: uart0-pf-pins {
+                               pins = "PF2", "PF4";
+                               function = "uart0";
+                       };

We've had the policy of not adding pinctrl nodes that aren't used in-tree, to avoid bloating up the blob size. However DTC 1.4.7 introduced the new /omit-if-no-ref/ directive, which would make the compiler discard marked nodes if they aren't referenced.

Quoted 3 lines

So please add this to all the new nodes. It seems to work regardless whether you add it before or after the label, though having it after the label seems to make vim syntax highlighting happier.

It also works (both for dtc and vim) if we put it on the previous line, so something like:

Quoted 6 lines

/omit-if-no-ref/
uart0_pf_pins: uart0-pf-pins {
};

And it does have the advantage of keeping the same line width, which could get pretty long on some nodes.

Thanks, I'd missed that directive. It always seems needlessly annoying to make everybody working on a new board to add those nodes separately.

Signature · 1 line
Måns Rullgård
#4 lore raw
In reply to Maxime Ripard
Quoted 28 lines · Maxime Ripard
Quoted 27 lines · Chen-Yu Tsai
Quoted 13 lines · Mans Rullgard

This adds pinctrl settings for various missing uart options.

---
 arch/arm/boot/dts/sun7i-a20.dtsi | 45 ++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)
arch/arm/boot/dts/sun7i-a20.dtsi +0 -0
index af5b067a5f83..2295ff5adf48 100644

arch/arm/boot/dts/sun7i-a20.dtsi line 950

Quoted 7 lines
arch/arm/boot/dts/sun7i-a20.dtsi +4 -0
@@ -944,6 +944,31 @@
                                function = "uart0";
                        };
 
+                       uart0_pf_pins: uart0-pf-pins {
+                               pins = "PF2", "PF4";
+                               function = "uart0";
+                       };

We've had the policy of not adding pinctrl nodes that aren't used in-tree, to avoid bloating up the blob size. However DTC 1.4.7 introduced the new /omit-if-no-ref/ directive, which would make the compiler discard marked nodes if they aren't referenced.

Quoted 3 lines
Quoted 3 lines

So please add this to all the new nodes. It seems to work regardless whether you add it before or after the label, though having it after the label seems to make vim syntax highlighting happier.

Should we also add this to existing nodes?

BTW, I really do need all those uart pin options.

Signature · 1 line
Måns Rullgård
#5 lore raw

Hi,

Quoted 30 lines · Måns Rullgård
Quoted 28 lines · Maxime Ripard
Quoted 27 lines · Chen-Yu Tsai
Quoted 13 lines · Mans Rullgard

This adds pinctrl settings for various missing uart options.

---
 arch/arm/boot/dts/sun7i-a20.dtsi | 45 ++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)
arch/arm/boot/dts/sun7i-a20.dtsi +0 -0
index af5b067a5f83..2295ff5adf48 100644

arch/arm/boot/dts/sun7i-a20.dtsi line 950

Quoted 7 lines
arch/arm/boot/dts/sun7i-a20.dtsi +4 -0
@@ -944,6 +944,31 @@
                                function = "uart0";
                        };
 
+                       uart0_pf_pins: uart0-pf-pins {
+                               pins = "PF2", "PF4";
+                               function = "uart0";
+                       };

We've had the policy of not adding pinctrl nodes that aren't used in-tree, to avoid bloating up the blob size. However DTC 1.4.7 introduced the new /omit-if-no-ref/ directive, which would make the compiler discard marked nodes if they aren't referenced.

Quoted 5 lines
Quoted 3 lines
Quoted 3 lines

So please add this to all the new nodes. It seems to work regardless whether you add it before or after the label, though having it after the label seems to make vim syntax highlighting happier.

Should we also add this to existing nodes?

If you want to send an additional patch, then yes sure :)

Maxime

Signature · 3 lines
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#6 lore raw
In reply to Måns Rullgård
Quoted 31 lines · Måns Rullgård
Quoted 28 lines · Maxime Ripard
Quoted 27 lines · Chen-Yu Tsai
Quoted 13 lines · Mans Rullgard

This adds pinctrl settings for various missing uart options.

---
 arch/arm/boot/dts/sun7i-a20.dtsi | 45 ++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)
arch/arm/boot/dts/sun7i-a20.dtsi +0 -0
index af5b067a5f83..2295ff5adf48 100644

arch/arm/boot/dts/sun7i-a20.dtsi line 950

Quoted 7 lines
arch/arm/boot/dts/sun7i-a20.dtsi +4 -0
@@ -944,6 +944,31 @@
                                function = "uart0";
                        };
 
+                       uart0_pf_pins: uart0-pf-pins {
+                               pins = "PF2", "PF4";
+                               function = "uart0";
+                       };

We've had the policy of not adding pinctrl nodes that aren't used in-tree, to avoid bloating up the blob size. However DTC 1.4.7 introduced the new /omit-if-no-ref/ directive, which would make the compiler discard marked nodes if they aren't referenced.

Quoted 7 lines
Quoted 3 lines
Quoted 3 lines

So please add this to all the new nodes. It seems to work regardless whether you add it before or after the label, though having it after the label seems to make vim syntax highlighting happier.

Should we also add this to existing nodes?

BTW, I really do need all those uart pin options.

Note that /omit-if-no-ref/ does not work with dtc -@, as in the node will be removed if no references to it are found within the same file. It will not result in a symbol being created.

I have a patch for that but haven't sent it out yet.

ChenYu

#7 lore raw

PATCH v2 1/1 ARM: dts: sun7i: add pinctrl for missing uart mux options

In reply to Mans Rullgard

This adds pinctrl settings for various missing uart options.

---
Changed in v2:
- add /omit-if-no-ref/ tags to new nodes

---
 arch/arm/boot/dts/sun7i-a20.dtsi | 54 ++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)
arch/arm/boot/dts/sun7i-a20.dtsi +54 -0
index af5b067a5f83..76d0c961f01e 100644
@@ -944,6 +944,36 @@
 				function = "uart0";
 			};
 
+			/omit-if-no-ref/
+			uart0_pf_pins: uart0-pf-pins {
+				pins = "PF2", "PF4";
+				function = "uart0";
+			};
+
+			/omit-if-no-ref/
+			uart1_pa_pins: uart1-pa-pins {
+				pins = "PA10", "PA11";
+				function = "uart1";
+			};
+
+			/omit-if-no-ref/
+			uart1_cts_rts_pa_pins: uart1-cts-rts-pa-pins {
+				pins = "PA12", "PIA13";
+				function = "uart2";
+			};
+
+			/omit-if-no-ref/
+			uart2_pa_pins: uart2-pa-pins {
+				pins = "PIA2", "PIA3";
+				function = "uart2";
+			};
+
+			/omit-if-no-ref/
+			uart2_cts_rts_pa_pins: uart2-cts-rts-pa-pins {
+				pins = "PA0", "PIA1";
+				function = "uart2";
+			};
+
 			uart2_pi_pins: uart2-pi-pins {
 				pins = "PI18", "PI19";
 				function = "uart2";
@@ -969,6 +999,12 @@
 				function = "uart3";
 			};
 
+			/omit-if-no-ref/
+			uart3_cts_rts_ph_pins: uart3-cts-rts-ph-pins {
+				pins = "PH2", "PH3";
+				function = "uart3";
+			};
+
 			uart4_pg_pins: uart4-pg-pins {
 				pins = "PG10", "PG11";
 				function = "uart4";
@@ -979,16 +1015,34 @@
 				function = "uart4";
 			};
 
+			/omit-if-no-ref/
+			uart5_ph_pins: uart5-ph-pins {
+				pins = "PH6", "PH7";
+				function = "uart5";
+			};
+
 			uart5_pi_pins: uart5-pi-pins {
 				pins = "PI10", "PI11";
 				function = "uart5";
 			};
 
+			/omit-if-no-ref/
+			uart6_pa_pins: uart6-pa-pins {
+				pins = "PA12", "PA13";
+				function = "uart6";
+			};
+
 			uart6_pi_pins: uart6-pi-pins {
 				pins = "PI12", "PI13";
 				function = "uart6";
 			};
 
+			/omit-if-no-ref/
+			uart7_pa_pins: uart7-pa-pins {
+				pins = "PA14", "PA15";
+				function = "uart7";
+			};
+
 			uart7_pi_pins: uart7-pi-pins {
 				pins = "PI20", "PI21";
 				function = "uart7";
Signature · 1 line
2.20.1
#8 lore raw
Quoted 3 lines · Mans Rullgard

This adds pinctrl settings for various missing uart options.

Applied, thanks!
Maxime

Signature · 3 lines
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com