diff mbox series

[v2,1/4] ARM: dts: sun8i: r40: add /omit-if-no-ref/ to pinmux nodes for UARTs 0&3

Message ID 20210322105538.3475183-2-i.uvarov@cognitivepilot.com (mailing list archive)
State New, archived
Headers show
Series add devicetree for Forlinx FETA40i-C & OKA40i-C | expand

Commit Message

Ivan Uvarov March 22, 2021, 10:55 a.m. UTC
This patch adds the /omit-if-no-ref/ keyword to the pio nodes for
UART0 and UART3 pins of the R40 SoC, which would reduce the fdt size on
boards which do not use these UARTs.

Signed-off-by: Ivan Uvarov <i.uvarov@cognitivepilot.com>

 1 file changed, 3 insertions(+)

Comments

Andre Przywara March 22, 2021, 4:18 p.m. UTC | #1
On Mon, 22 Mar 2021 13:55:35 +0300
Ivan Uvarov <i.uvarov@cognitivepilot.com> wrote:

Hi,

> This patch adds the /omit-if-no-ref/ keyword to the pio nodes for
> UART0 and UART3 pins of the R40 SoC, which would reduce the fdt size on
> boards which do not use these UARTs.

But what boards are those? It seems like all boards use uart3-pg and
the two existing boards use UART0.

I think the idea is to use omit-if-no-ref on some rarely used nodes, so
if there is only a single user, for instance. Your next patch is a good
example.

So I don't think this patch here is needed at all.

Cheers,
Andre

> 
> Signed-off-by: Ivan Uvarov <i.uvarov@cognitivepilot.com>
> 
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/sun8i-r40.dtsi b/arch/arm/boot/dts/sun8i-r40.dtsi
> index d5ad3b9efd..0b257a0779 100644
> --- a/arch/arm/boot/dts/sun8i-r40.dtsi
> +++ b/arch/arm/boot/dts/sun8i-r40.dtsi
> @@ -631,16 +631,19 @@ spi1_cs1_pi_pin: spi1-cs1-pi-pin {
>  				function = "spi1";
>  			};
>  
> +			/omit-if-no-ref/
>  			uart0_pb_pins: uart0-pb-pins {
>  				pins = "PB22", "PB23";
>  				function = "uart0";
>  			};
>  
> +			/omit-if-no-ref/
>  			uart3_pg_pins: uart3-pg-pins {
>  				pins = "PG6", "PG7";
>  				function = "uart3";
>  			};
>  
> +			/omit-if-no-ref/
>  			uart3_rts_cts_pg_pins: uart3-rts-cts-pg-pins {
>  				pins = "PG8", "PG9";
>  				function = "uart3";
Ivan Uvarov March 23, 2021, 9:59 a.m. UTC | #2
On Mon, 22 Mar 2021 16:18:04 +0000
Andre Przywara <andre.przywara@arm.com> wrote:

> On Mon, 22 Mar 2021 13:55:35 +0300
> Ivan Uvarov <i.uvarov@cognitivepilot.com> wrote:
> 
> Hi,
>   
> > This patch adds the /omit-if-no-ref/ keyword to the pio nodes for
> > UART0 and UART3 pins of the R40 SoC, which would reduce the fdt
> > size on boards which do not use these UARTs.    
> 
> But what boards are those? It seems like all boards use uart3-pg and
> the two existing boards use UART0.
> 
> I think the idea is to use omit-if-no-ref on some rarely used nodes,
> so if there is only a single user, for instance. Your next patch is a
> good example.
> 
> So I don't think this patch here is needed at all.
> 
> Cheers,
> Andre
>   

This is a valid complaint, and the patch indeed is not strictly
necessary. At the same time, the keyword certainly doesn't hurt, and
it would be a good base for future R40 boards. 

As to what boards I'm referring to, there's at least the carrier board
for the FETA40i which our company is privately developing, the support
for which we probably won't upstream as it's highly unlikely it'll ever
get into the hands of anyone who would appreciate such support.

I must also mention that I only added this patch to the series due to
explicit encouragement from Maxime in his last response to v1 of the patch:

On Fri, 19 Mar 2021 14:24:48 +0100 
Maxime Ripard <maxime@cerno.tech> wrote:
> On Tue, Mar 16, 2021 at 06:48:58PM +0300, Ivan Uvarov wrote:  
> > Also, would it be a good idea to add /omit-if-no-ref/ to the uart3
> > pins as well while I'm here?   
>
> To all the nodes honestly. If you want to make a preliminary patch doing
> this, go ahead :)  

Since there's two differing viewpoints on the subject, this definitely
deserves more discussion.

--
Regards,
Ivan Uvarov
Maxime Ripard March 25, 2021, 2:12 p.m. UTC | #3
On Mon, Mar 22, 2021 at 04:18:04PM +0000, Andre Przywara wrote:
> On Mon, 22 Mar 2021 13:55:35 +0300
> Ivan Uvarov <i.uvarov@cognitivepilot.com> wrote:
> 
> Hi,
> 
> > This patch adds the /omit-if-no-ref/ keyword to the pio nodes for
> > UART0 and UART3 pins of the R40 SoC, which would reduce the fdt size on
> > boards which do not use these UARTs.
> 
> But what boards are those? It seems like all boards use uart3-pg and
> the two existing boards use UART0.
> 
> I think the idea is to use omit-if-no-ref on some rarely used nodes, so
> if there is only a single user, for instance. Your next patch is a good
> example.

There's no real cost associated to it though, so it's just easier to
flag all the nodes and let the compiler figure out if it should evict
them or not.

Maxime
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/sun8i-r40.dtsi b/arch/arm/boot/dts/sun8i-r40.dtsi
index d5ad3b9efd..0b257a0779 100644
--- a/arch/arm/boot/dts/sun8i-r40.dtsi
+++ b/arch/arm/boot/dts/sun8i-r40.dtsi
@@ -631,16 +631,19 @@  spi1_cs1_pi_pin: spi1-cs1-pi-pin {
 				function = "spi1";
 			};
 
+			/omit-if-no-ref/
 			uart0_pb_pins: uart0-pb-pins {
 				pins = "PB22", "PB23";
 				function = "uart0";
 			};
 
+			/omit-if-no-ref/
 			uart3_pg_pins: uart3-pg-pins {
 				pins = "PG6", "PG7";
 				function = "uart3";
 			};
 
+			/omit-if-no-ref/
 			uart3_rts_cts_pg_pins: uart3-rts-cts-pg-pins {
 				pins = "PG8", "PG9";
 				function = "uart3";