diff mbox

[V3,06/12] ARM: shmobile: r7s72100: add scif nodes to dtsi

Message ID 1394208048-32495-7-git-send-email-wsa@the-dreams.de (mailing list archive)
State Superseded
Headers show

Commit Message

Wolfram Sang March 7, 2014, 4 p.m. UTC
From: Wolfram Sang <wsa@sang-engineering.com>

Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
---
 arch/arm/boot/dts/r7s72100.dtsi | 104 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 104 insertions(+)

Comments

Laurent Pinchart March 7, 2014, 4:13 p.m. UTC | #1
Hi Wolfram,

Thank you for the patch.

On Friday 07 March 2014 17:00:42 Wolfram Sang wrote:
> From: Wolfram Sang <wsa@sang-engineering.com>
> 
> Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
> ---
>  arch/arm/boot/dts/r7s72100.dtsi | 104 +++++++++++++++++++++++++++++++++++++
>  1 file changed, 104 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/r7s72100.dtsi
> b/arch/arm/boot/dts/r7s72100.dtsi index 6af5c28c670e..d49afe30c1d7 100644
> --- a/arch/arm/boot/dts/r7s72100.dtsi
> +++ b/arch/arm/boot/dts/r7s72100.dtsi
> @@ -23,6 +23,14 @@
>  		i2c1 = &i2c1;
>  		i2c2 = &i2c2;
>  		i2c3 = &i2c3;
> +		serial0 = &scif0;
> +		serial1 = &scif1;
> +		serial2 = &scif2;
> +		serial3 = &scif3;
> +		serial4 = &scif4;
> +		serial5 = &scif5;
> +		serial6 = &scif6;
> +		serial7 = &scif7;

As port usages is board specific, shouldn't this be moved to the board .dts 
file, with only serial0 = &scif2 ?

>  		spi0 = &spi0;
>  		spi1 = &spi1;
>  		spi2 = &spi2;
> @@ -200,6 +208,102 @@
>  		status = "disabled";
>  	};
> 
> +	scif0: serial@e8007000 {
> +		compatible = "renesas,scif-r7s72100", "renesas,scif";
> +		reg = <0xe8007000 64>;
> +		interrupts = <0 190 IRQ_TYPE_LEVEL_HIGH>,
> +			     <0 191 IRQ_TYPE_LEVEL_HIGH>,
> +			     <0 192 IRQ_TYPE_LEVEL_HIGH>,
> +			     <0 189 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&mstp4_clks R7S72100_CLK_SCIF0>;
> +		clock-names = "sci_ick";
> +		status = "disabled";
> +	};
> +
> +	scif1: serial@e8007800 {
> +		compatible = "renesas,scif-r7s72100", "renesas,scif";
> +		reg = <0xe8007800 64>;
> +		interrupts = <0 194 IRQ_TYPE_LEVEL_HIGH>,
> +			     <0 195 IRQ_TYPE_LEVEL_HIGH>,
> +			     <0 196 IRQ_TYPE_LEVEL_HIGH>,
> +			     <0 193 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&mstp4_clks R7S72100_CLK_SCIF1>;
> +		clock-names = "sci_ick";
> +		status = "disabled";
> +	};
> +
> +	scif2: serial@e8008000 {
> +		compatible = "renesas,scif-r7s72100", "renesas,scif";
> +		reg = <0xe8008000 64>;
> +		interrupts = <0 198 IRQ_TYPE_LEVEL_HIGH>,
> +			     <0 199 IRQ_TYPE_LEVEL_HIGH>,
> +			     <0 200 IRQ_TYPE_LEVEL_HIGH>,
> +			     <0 197 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&mstp4_clks R7S72100_CLK_SCIF2>;
> +		clock-names = "sci_ick";
> +		status = "disabled";
> +	};
> +
> +	scif3: serial@e8008800 {
> +		compatible = "renesas,scif-r7s72100", "renesas,scif";
> +		reg = <0xe8008800 64>;
> +		interrupts = <0 202 IRQ_TYPE_LEVEL_HIGH>,
> +			     <0 203 IRQ_TYPE_LEVEL_HIGH>,
> +			     <0 204 IRQ_TYPE_LEVEL_HIGH>,
> +			     <0 201 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&mstp4_clks R7S72100_CLK_SCIF3>;
> +		clock-names = "sci_ick";
> +		status = "disabled";
> +	};
> +
> +	scif4: serial@e8009000 {
> +		compatible = "renesas,scif-r7s72100", "renesas,scif";
> +		reg = <0xe8009000 64>;
> +		interrupts = <0 206 IRQ_TYPE_LEVEL_HIGH>,
> +			     <0 207 IRQ_TYPE_LEVEL_HIGH>,
> +			     <0 208 IRQ_TYPE_LEVEL_HIGH>,
> +			     <0 205 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&mstp4_clks R7S72100_CLK_SCIF4>;
> +		clock-names = "sci_ick";
> +		status = "disabled";
> +	};
> +
> +	scif5: serial@e8009800 {
> +		compatible = "renesas,scif-r7s72100", "renesas,scif";
> +		reg = <0xe8009800 64>;
> +		interrupts = <0 210 IRQ_TYPE_LEVEL_HIGH>,
> +			     <0 211 IRQ_TYPE_LEVEL_HIGH>,
> +			     <0 212 IRQ_TYPE_LEVEL_HIGH>,
> +			     <0 209 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&mstp4_clks R7S72100_CLK_SCIF5>;
> +		clock-names = "sci_ick";
> +		status = "disabled";
> +	};
> +
> +	scif6: serial@e800a000 {
> +		compatible = "renesas,scif-r7s72100", "renesas,scif";
> +		reg = <0xe800a000 64>;
> +		interrupts = <0 214 IRQ_TYPE_LEVEL_HIGH>,
> +			     <0 215 IRQ_TYPE_LEVEL_HIGH>,
> +			     <0 216 IRQ_TYPE_LEVEL_HIGH>,
> +			     <0 213 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&mstp4_clks R7S72100_CLK_SCIF6>;
> +		clock-names = "sci_ick";
> +		status = "disabled";
> +	};
> +
> +	scif7: serial@e800a800 {
> +		compatible = "renesas,scif-r7s72100", "renesas,scif";
> +		reg = <0xe800a800 64>;
> +		interrupts = <0 218 IRQ_TYPE_LEVEL_HIGH>,
> +			     <0 219 IRQ_TYPE_LEVEL_HIGH>,
> +			     <0 220 IRQ_TYPE_LEVEL_HIGH>,
> +			     <0 217 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&mstp4_clks R7S72100_CLK_SCIF7>;
> +		clock-names = "sci_ick";
> +		status = "disabled";
> +	};
> +
>  	spi0: spi@e800c800 {
>  		compatible = "renesas,rspi-r7s72100", "renesas,rspi-rz";
>  		reg = <0xe800c800 0x24>;
Wolfram Sang March 7, 2014, 4:25 p.m. UTC | #2
> > diff --git a/arch/arm/boot/dts/r7s72100.dtsi
> > b/arch/arm/boot/dts/r7s72100.dtsi index 6af5c28c670e..d49afe30c1d7 100644
> > --- a/arch/arm/boot/dts/r7s72100.dtsi
> > +++ b/arch/arm/boot/dts/r7s72100.dtsi
> > @@ -23,6 +23,14 @@
> >  		i2c1 = &i2c1;
> >  		i2c2 = &i2c2;
> >  		i2c3 = &i2c3;
> > +		serial0 = &scif0;
> > +		serial1 = &scif1;
> > +		serial2 = &scif2;
> > +		serial3 = &scif3;
> > +		serial4 = &scif4;
> > +		serial5 = &scif5;
> > +		serial6 = &scif6;
> > +		serial7 = &scif7;
> 
> As port usages is board specific, shouldn't this be moved to the board .dts 
> file, with only serial0 = &scif2 ?

Nope, the intention of these aliases is to have a consistent numbering
of SCIF cores, similar to platform.dev_id.
Laurent Pinchart March 7, 2014, 4:37 p.m. UTC | #3
Hi Wolfram,

On Friday 07 March 2014 17:25:10 Wolfram Sang wrote:
> > > diff --git a/arch/arm/boot/dts/r7s72100.dtsi
> > > b/arch/arm/boot/dts/r7s72100.dtsi index 6af5c28c670e..d49afe30c1d7
> > > 100644
> > > --- a/arch/arm/boot/dts/r7s72100.dtsi
> > > +++ b/arch/arm/boot/dts/r7s72100.dtsi
> > > @@ -23,6 +23,14 @@
> > >  		i2c1 = &i2c1;
> > >  		i2c2 = &i2c2;
> > >  		i2c3 = &i2c3;
> > > +		serial0 = &scif0;
> > > +		serial1 = &scif1;
> > > +		serial2 = &scif2;
> > > +		serial3 = &scif3;
> > > +		serial4 = &scif4;
> > > +		serial5 = &scif5;
> > > +		serial6 = &scif6;
> > > +		serial7 = &scif7;
> > 
> > As port usages is board specific, shouldn't this be moved to the board
> > .dts file, with only serial0 = &scif2 ?
> 
> Nope, the intention of these aliases is to have a consistent numbering
> of SCIF cores, similar to platform.dev_id.

But do we want that ? Isn't it better from a user point of view to have ttySC0 
regardless of whether scif2 or scif3 is used when the board has a single 
serial port only ?
Wolfram Sang March 7, 2014, 4:44 p.m. UTC | #4
> > > As port usages is board specific, shouldn't this be moved to the board
> > > .dts file, with only serial0 = &scif2 ?
> > 
> > Nope, the intention of these aliases is to have a consistent numbering
> > of SCIF cores, similar to platform.dev_id.
> 
> But do we want that ? Isn't it better from a user point of view to have ttySC0 
> regardless of whether scif2 or scif3 is used when the board has a single 
> serial port only ?

Some prefer this, some that. The current standard pattern is what I implemented.
I think consistency makes sense for my series. If you like to prefer another
pattern, please start a discussion at the devicetree list.
Wolfram Sang March 7, 2014, 4:48 p.m. UTC | #5
> When you say standard pattern, do you mean the practice followed by most .dts 
> in mainline, or is there an actual document that recommends this pattern ?

I mean the first. There might be the latter, don't know.
Laurent Pinchart March 7, 2014, 4:48 p.m. UTC | #6
Hi Wolfram,

On Friday 07 March 2014 17:44:27 Wolfram Sang wrote:
> > > > As port usages is board specific, shouldn't this be moved to the board
> > > > .dts file, with only serial0 = &scif2 ?
> > > 
> > > Nope, the intention of these aliases is to have a consistent numbering
> > > of SCIF cores, similar to platform.dev_id.
> > 
> > But do we want that ? Isn't it better from a user point of view to have
> > ttySC0 regardless of whether scif2 or scif3 is used when the board has a
> > single serial port only ?
> 
> Some prefer this, some that. The current standard pattern is what I
> implemented. I think consistency makes sense for my series. If you like to
> prefer another pattern, please start a discussion at the devicetree list.

When you say standard pattern, do you mean the practice followed by most .dts 
in mainline, or is there an actual document that recommends this pattern ?
diff mbox

Patch

diff --git a/arch/arm/boot/dts/r7s72100.dtsi b/arch/arm/boot/dts/r7s72100.dtsi
index 6af5c28c670e..d49afe30c1d7 100644
--- a/arch/arm/boot/dts/r7s72100.dtsi
+++ b/arch/arm/boot/dts/r7s72100.dtsi
@@ -23,6 +23,14 @@ 
 		i2c1 = &i2c1;
 		i2c2 = &i2c2;
 		i2c3 = &i2c3;
+		serial0 = &scif0;
+		serial1 = &scif1;
+		serial2 = &scif2;
+		serial3 = &scif3;
+		serial4 = &scif4;
+		serial5 = &scif5;
+		serial6 = &scif6;
+		serial7 = &scif7;
 		spi0 = &spi0;
 		spi1 = &spi1;
 		spi2 = &spi2;
@@ -200,6 +208,102 @@ 
 		status = "disabled";
 	};
 
+	scif0: serial@e8007000 {
+		compatible = "renesas,scif-r7s72100", "renesas,scif";
+		reg = <0xe8007000 64>;
+		interrupts = <0 190 IRQ_TYPE_LEVEL_HIGH>,
+			     <0 191 IRQ_TYPE_LEVEL_HIGH>,
+			     <0 192 IRQ_TYPE_LEVEL_HIGH>,
+			     <0 189 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp4_clks R7S72100_CLK_SCIF0>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
+	scif1: serial@e8007800 {
+		compatible = "renesas,scif-r7s72100", "renesas,scif";
+		reg = <0xe8007800 64>;
+		interrupts = <0 194 IRQ_TYPE_LEVEL_HIGH>,
+			     <0 195 IRQ_TYPE_LEVEL_HIGH>,
+			     <0 196 IRQ_TYPE_LEVEL_HIGH>,
+			     <0 193 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp4_clks R7S72100_CLK_SCIF1>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
+	scif2: serial@e8008000 {
+		compatible = "renesas,scif-r7s72100", "renesas,scif";
+		reg = <0xe8008000 64>;
+		interrupts = <0 198 IRQ_TYPE_LEVEL_HIGH>,
+			     <0 199 IRQ_TYPE_LEVEL_HIGH>,
+			     <0 200 IRQ_TYPE_LEVEL_HIGH>,
+			     <0 197 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp4_clks R7S72100_CLK_SCIF2>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
+	scif3: serial@e8008800 {
+		compatible = "renesas,scif-r7s72100", "renesas,scif";
+		reg = <0xe8008800 64>;
+		interrupts = <0 202 IRQ_TYPE_LEVEL_HIGH>,
+			     <0 203 IRQ_TYPE_LEVEL_HIGH>,
+			     <0 204 IRQ_TYPE_LEVEL_HIGH>,
+			     <0 201 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp4_clks R7S72100_CLK_SCIF3>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
+	scif4: serial@e8009000 {
+		compatible = "renesas,scif-r7s72100", "renesas,scif";
+		reg = <0xe8009000 64>;
+		interrupts = <0 206 IRQ_TYPE_LEVEL_HIGH>,
+			     <0 207 IRQ_TYPE_LEVEL_HIGH>,
+			     <0 208 IRQ_TYPE_LEVEL_HIGH>,
+			     <0 205 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp4_clks R7S72100_CLK_SCIF4>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
+	scif5: serial@e8009800 {
+		compatible = "renesas,scif-r7s72100", "renesas,scif";
+		reg = <0xe8009800 64>;
+		interrupts = <0 210 IRQ_TYPE_LEVEL_HIGH>,
+			     <0 211 IRQ_TYPE_LEVEL_HIGH>,
+			     <0 212 IRQ_TYPE_LEVEL_HIGH>,
+			     <0 209 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp4_clks R7S72100_CLK_SCIF5>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
+	scif6: serial@e800a000 {
+		compatible = "renesas,scif-r7s72100", "renesas,scif";
+		reg = <0xe800a000 64>;
+		interrupts = <0 214 IRQ_TYPE_LEVEL_HIGH>,
+			     <0 215 IRQ_TYPE_LEVEL_HIGH>,
+			     <0 216 IRQ_TYPE_LEVEL_HIGH>,
+			     <0 213 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp4_clks R7S72100_CLK_SCIF6>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
+	scif7: serial@e800a800 {
+		compatible = "renesas,scif-r7s72100", "renesas,scif";
+		reg = <0xe800a800 64>;
+		interrupts = <0 218 IRQ_TYPE_LEVEL_HIGH>,
+			     <0 219 IRQ_TYPE_LEVEL_HIGH>,
+			     <0 220 IRQ_TYPE_LEVEL_HIGH>,
+			     <0 217 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp4_clks R7S72100_CLK_SCIF7>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
 	spi0: spi@e800c800 {
 		compatible = "renesas,rspi-r7s72100", "renesas,rspi-rz";
 		reg = <0xe800c800 0x24>;