sh-sci: add R8A7743/5 support
Subsystems (2)
PATCH 1/1 sh-sci: add R8A7743/5 support
Renesas RZ/G SoC also have the SCIF, SCIFA, SCIFB, and HSCIF ports. Document RZ/G1[ME] (also known as R8A774[35]) SoC bindings along with the RZ/G family bindings. The driver itself also needs to recognize the latter binding for the SCIF ports, so teach it...
---
This patch is against the 'tty-next' branch of GregKH's 'tty.git' repo.
Documentation/devicetree/bindings/serial/renesas,sci-serial.txt | 12 ++++++++++ drivers/tty/serial/sh-sci.c | 3 ++ 2 files changed, 15 insertions(+)
Documentation/devicetree/bindings/serial/renesas,sci-serial.txt +12 -0
@@ -9,6 +9,14 @@ Required properties: - "renesas,scifb-r8a73a4" for R8A73A4 (R-Mobile APE6) SCIFB compatible UART. - "renesas,scifa-r8a7740" for R8A7740 (R-Mobile A1) SCIFA compatible UART. - "renesas,scifb-r8a7740" for R8A7740 (R-Mobile A1) SCIFB compatible UART. + - "renesas,scif-r8a7743" for R8A7743 (RZ/G1M) SCIF compatible UART. + - "renesas,scifa-r8a7743" for R8A7743 (RZ/G1M) SCIFA compatible UART. + - "renesas,scifb-r8a7743" for R8A7743 (RZ/G1M) SCIFB compatible UART. + - "renesas,hscif-r8a7743" for R8A7743 (RZ/G1M) HSCIF compatible UART. + - "renesas,scif-r8a7745" for R8A7745 (RZ/G1E) SCIF compatible UART. + - "renesas,scifa-r8a7745" for R8A7745 (RZ/G1E) SCIFA compatible UART. + - "renesas,scifb-r8a7745" for R8A7745 (RZ/G1E) SCIFB compatible UART. + - "renesas,hscif-r8a7745" for R8A7745 (RZ/G1E) HSCIF compatible UART. - "renesas,scif-r8a7778" for R8A7778 (R-Car M1) SCIF compatible UART. - "renesas,scif-r8a7779" for R8A7779 (R-Car H1) SCIF compatible UART. - "renesas,scif-r8a7790" for R8A7790 (R-Car H2) SCIF compatible UART.
@@ -38,11 +46,15 @@ Required properties: - "renesas,rcar-gen1-scif" for R-Car Gen1 SCIF compatible UART, - "renesas,rcar-gen2-scif" for R-Car Gen2 SCIF compatible UART, - "renesas,rcar-gen3-scif" for R-Car Gen3 SCIF compatible UART, + - "renesas,rzg-scif" for RZ/G SCIF compatible UART. - "renesas,rcar-gen2-scifa" for R-Car Gen2 SCIFA compatible UART, + - "renesas,rzg-scifa" for RZ/G SCIFA compatible UART. - "renesas,rcar-gen2-scifb" for R-Car Gen2 SCIFB compatible UART, + - "renesas,rzg-scifb" for RZ/G SCIFB compatible UART. - "renesas,rcar-gen1-hscif" for R-Car Gen1 HSCIF compatible UART, - "renesas,rcar-gen2-hscif" for R-Car Gen2 HSCIF compatible UART, - "renesas,rcar-gen3-hscif" for R-Car Gen3 HSCIF compatible UART, + - "renesas,rzg-hscif" for RZ/G HSCIF compatible UART. - "renesas,scif" for generic SCIF compatible UART. - "renesas,scifa" for generic SCIFA compatible UART. - "renesas,scifb" for generic SCIFB compatible UART.
drivers/tty/serial/sh-sci.c +3 -0
@@ -2950,6 +2950,9 @@ static const struct of_device_id of_sci_ }, { .compatible = "renesas,rcar-gen3-scif", .data = SCI_OF_DATA(PORT_SCIF, SCIx_SH4_SCIF_BRG_REGTYPE), + }, { + .compatible = "renesas,rzg-scif", + .data = SCI_OF_DATA(PORT_SCIF, SCIx_SH4_SCIF_BRG_REGTYPE), }, /* Generic types */ {
Quoted 6 lines · Sergei Shtylyov
Renesas RZ/G SoC also have the SCIF, SCIFA, SCIFB, and HSCIF ports. Document RZ/G1[ME] (also known as R8A774[35]) SoC bindings along with the RZ/G family bindings. The driver itself also needs to recognize the latter binding for the SCIF ports, so teach it...
Signed-off-by Sergei Shtylyov <[email protected]>
Hi Sergei,
Quoted 23 lines · Sergei Shtylyov
Renesas RZ/G SoC also have the SCIF, SCIFA, SCIFB, and HSCIF ports. Document RZ/G1[ME] (also known as R8A774[35]) SoC bindings along with the RZ/G family bindings. The driver itself also needs to recognize the latter binding for the SCIF ports, so teach it...
Signed-off-by Sergei Shtylyov <[email protected]>---
This patch is against the 'tty-next' branch of GregKH's 'tty.git' repo.Documentation/devicetree/bindings/serial/renesas,sci-serial.txt | 12 ++++++++++ drivers/tty/serial/sh-sci.c | 3 ++ 2 files changed, 15 insertions(+)Index:
tty/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
===================================================================Documentation/devicetree/bindings/serial/renesas,sci-serial.txt +1
-0@@ -9,6 +9,14 @@ Required properties: - "renesas,scifb-r8a73a4" for R8A73A4 (R-Mobile APE6) SCIFB compatible UART. - "renesas,scifa-r8a7740" for R8A7740 (R-Mobile A1) SCIFA compatible UART. - "renesas,scifb-r8a7740" for R8A7740 (R-Mobile A1) SCIFB compatible UART. + - "renesas,scif-r8a7743" for R8A7743 (RZ/G1M) SCIF compatible UART.
Documentation/devicetree/bindings/serial/renesas,sci-serial.txt Required properties: · line 22
Quoted 10 lines
Documentation/devicetree/bindings/serial/renesas,sci-serial.txt +7
-0+ - "renesas,scifa-r8a7743" for R8A7743 (RZ/G1M) SCIFA compatible UART. + - "renesas,scifb-r8a7743" for R8A7743 (RZ/G1M) SCIFB compatible UART. + - "renesas,hscif-r8a7743" for R8A7743 (RZ/G1M) HSCIF compatible UART. + - "renesas,scif-r8a7745" for R8A7745 (RZ/G1E) SCIF compatible UART. + - "renesas,scifa-r8a7745" for R8A7745 (RZ/G1E) SCIFA compatible UART. + - "renesas,scifb-r8a7745" for R8A7745 (RZ/G1E) SCIFB compatible UART. + - "renesas,hscif-r8a7745" for R8A7745 (RZ/G1E) HSCIF compatible UART. - "renesas,scif-r8a7778" for R8A7778 (R-Car M1) SCIF compatible UART. - "renesas,scif-r8a7779" for R8A7779 (R-Car H1) SCIF compatible UART. - "renesas,scif-r8a7790" for R8A7790 (R-Car H2) SCIF compatible UART.
For the part above:
Quoted 21 lines
Documentation/devicetree/bindings/serial/renesas,sci-serial.txt +4
-0@@ -38,11 +46,15 @@ Required properties: - "renesas,rcar-gen1-scif" for R-Car Gen1 SCIF compatible UART, - "renesas,rcar-gen2-scif" for R-Car Gen2 SCIF compatible UART, - "renesas,rcar-gen3-scif" for R-Car Gen3 SCIF compatible UART, + - "renesas,rzg-scif" for RZ/G SCIF compatible UART. - "renesas,rcar-gen2-scifa" for R-Car Gen2 SCIFA compatible UART, + - "renesas,rzg-scifa" for RZ/G SCIFA compatible UART. - "renesas,rcar-gen2-scifb" for R-Car Gen2 SCIFB compatible UART, + - "renesas,rzg-scifb" for RZ/G SCIFB compatible UART. - "renesas,rcar-gen1-hscif" for R-Car Gen1 HSCIF compatible UART, - "renesas,rcar-gen2-hscif" for R-Car Gen2 HSCIF compatible UART, - "renesas,rcar-gen3-hscif" for R-Car Gen3 HSCIF compatible UART, + - "renesas,rzg-hscif" for RZ/G HSCIF compatible UART. - "renesas,scif" for generic SCIF compatible UART. - "renesas,scifa" for generic SCIFA compatible UART. - "renesas,scifb" for generic SCIFB compatible UART.Index:
tty/drivers/tty/serial/sh-sci.c
===================================================================
drivers/tty/serial/sh-sci.c static const struct of_device_id of_sci_ · line 2958
Quoted 9 lines
drivers/tty/serial/sh-sci.c +3
-0@@ -2950,6 +2950,9 @@ static const struct of_device_id of_sci_ }, { .compatible = "renesas,rcar-gen3-scif", .data = SCI_OF_DATA(PORT_SCIF, SCIx_SH4_SCIF_BRG_REGTYPE), + }, { + .compatible = "renesas,rzg-scif", + .data = SCI_OF_DATA(PORT_SCIF, SCIx_SH4_SCIF_BRG_REGTYPE), }, /* Generic types */ {
However, I wouldn't bother adding RZ/G family-specific DT bindings, as RZ/G is a derivative of R-Car Gen2.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Quoted 6 lines · Geert Uytterhoeven
Quoted 6 lines
Renesas RZ/G SoC also have the SCIF, SCIFA, SCIFB, and HSCIF ports. Document RZ/G1[ME] (also known as R8A774[35]) SoC bindings along with the RZ/G family bindings. The driver itself also needs to recognize the latter binding for the SCIF ports, so teach it...
Signed-off-by Sergei Shtylyov <[email protected]>
[...]
Quoted 8 lines
Quoted 8 lines
===================================================================
drivers/tty/serial/sh-sci.c +1
-0@@ -2950,6 +2950,9 @@ static const struct of_device_id of_sci_ }, { .compatible = "renesas,rcar-gen3-scif", .data = SCI_OF_DATA(PORT_SCIF, SCIx_SH4_SCIF_BRG_REGTYPE), + }, {
Quoted 8 lines
drivers/tty/serial/sh-sci.c static const struct of_device_id of_sci_ · line 2958
Quoted 5 lines
drivers/tty/serial/sh-sci.c +2
-0+ .compatible = "renesas,rzg-scif", + .data = SCI_OF_DATA(PORT_SCIF, SCIx_SH4_SCIF_BRG_REGTYPE), },/* Generic types */ {However, I wouldn't bother adding RZ/G family-specific DT bindings, as RZ/G is a derivative of R-Car Gen2.
Then we shouldn't have added gen2/3 bindings too since they resolve to the
same register mapping as gen1. :-)
Quoted 3 lines
Gr{oetje,eeting}s,
Geert
MBR, Sergei
Quoted 26 lines · On Friday 30 Sep 2016 10:38:48 Geert Uytterhoeven wrote:
Quoted 25 lines · Sergei Shtylyov
Renesas RZ/G SoC also have the SCIF, SCIFA, SCIFB, and HSCIF ports. Document RZ/G1[ME] (also known as R8A774[35]) SoC bindings along with the RZ/G family bindings. The driver itself also needs to recognize the latter binding for the SCIF ports, so teach it...
Signed-off-by Sergei Shtylyov <[email protected]>---
This patch is against the 'tty-next' branch of GregKH's 'tty.git' repo.Documentation/devicetree/bindings/serial/renesas,sci-serial.txt | 12 ++++++++++ drivers/tty/serial/sh-sci.c | 3 ++ 2 files changed, 15 insertions(+)Index:
tty/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
===================================================================
---tty.orig/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt+++tty/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt>(quoted diff) +0
-0@@ -9,6 +9,14 @@ Required properties: - "renesas,scifb-r8a73a4" for R8A73A4 (R-Mobile APE6) SCIFB compatible UART. - "renesas,scifa-r8a7740" for R8A7740 (R-Mobile A1) SCIFA compatible UART. - "renesas,scifb-r8a7740" for R8A7740 (R-Mobile A1) SCIFB compatible UART.>
Quoted 8 lines
Documentation/devicetree/bindings/serial/renesas,sci-serial.txt Required properties: · line 19
Quoted 8 lines
Documentation/devicetree/bindings/serial/renesas,sci-serial.txt +8
-0+ - "renesas,scif-r8a7743" for R8A7743 (RZ/G1M) SCIF compatible UART. + - "renesas,scifa-r8a7743" for R8A7743 (RZ/G1M) SCIFA compatible UART. + - "renesas,scifb-r8a7743" for R8A7743 (RZ/G1M) SCIFB compatible UART. + - "renesas,hscif-r8a7743" for R8A7743 (RZ/G1M) HSCIF compatible UART. + - "renesas,scif-r8a7745" for R8A7745 (RZ/G1E) SCIF compatible UART. + - "renesas,scifa-r8a7745" for R8A7745 (RZ/G1E) SCIFA compatible UART. + - "renesas,scifb-r8a7745" for R8A7745 (RZ/G1E) SCIFB compatible UART. + - "renesas,hscif-r8a7745" for R8A7745 (RZ/G1E) HSCIF compatible UART.
Are we *really* going to add four compat string for each RZ/G* SoC ? We're reaching the limit of sanity...
Quoted 33 lines
Quoted 3 lines
Documentation/devicetree/bindings/serial/renesas,sci-serial.txt +0
-0- "renesas,scif-r8a7778" for R8A7778 (R-Car M1) SCIF compatible UART. - "renesas,scif-r8a7779" for R8A7779 (R-Car H1) SCIF compatible UART.- "renesas,scif-r8a7790" for R8A7790 (R-Car H2) SCIF compatible UART.
For the part above:
Quoted 26 lines
Documentation/devicetree/bindings/serial/renesas,sci-serial.txt +4
-0@@ -38,11 +46,15 @@ Required properties: - "renesas,rcar-gen1-scif" for R-Car Gen1 SCIF compatible UART, - "renesas,rcar-gen2-scif" for R-Car Gen2 SCIF compatible UART, - "renesas,rcar-gen3-scif" for R-Car Gen3 SCIF compatible UART, + - "renesas,rzg-scif" for RZ/G SCIF compatible UART. - "renesas,rcar-gen2-scifa" for R-Car Gen2 SCIFA compatible UART, + - "renesas,rzg-scifa" for RZ/G SCIFA compatible UART. - "renesas,rcar-gen2-scifb" for R-Car Gen2 SCIFB compatible UART, + - "renesas,rzg-scifb" for RZ/G SCIFB compatible UART. - "renesas,rcar-gen1-hscif" for R-Car Gen1 HSCIF compatible UART, - "renesas,rcar-gen2-hscif" for R-Car Gen2 HSCIF compatible UART, - "renesas,rcar-gen3-hscif" for R-Car Gen3 HSCIF compatible UART, + - "renesas,rzg-hscif" for RZ/G HSCIF compatible UART. - "renesas,scif" for generic SCIF compatible UART. - "renesas,scifa" for generic SCIFA compatible UART. - "renesas,scifb" for generic SCIFB compatible UART.Index:
tty/drivers/tty/serial/sh-sci.c
===================================================================drivers/tty/serial/sh-sci.c +0
-0@@ -2950,6 +2950,9 @@ static const struct of_device_id of_sci_ }, { .compatible = "renesas,rcar-gen3-scif", .data = SCI_OF_DATA(PORT_SCIF, SCIx_SH4_SCIF_BRG_REGTYPE),
Quoted 9 lines
Quoted 6 lines
drivers/tty/serial/sh-sci.c +3
-0+ }, { + .compatible = "renesas,rzg-scif", + .data = SCI_OF_DATA(PORT_SCIF, SCIx_SH4_SCIF_BRG_REGTYPE), },/* Generic types */ {However, I wouldn't bother adding RZ/G family-specific DT bindings, as RZ/G is a derivative of R-Car Gen2.
I agree, we need to stop the compat string proliferation madness.
Signature · 3 lines
Regards, Laurent Pinchart
Hi Laurent,
Quoted 30 lines · Laurent Pinchart
Quoted 29 lines · On Friday 30 Sep 2016 10:38:48 Geert Uytterhoeven wrote:
Quoted 28 lines · Sergei Shtylyov
Renesas RZ/G SoC also have the SCIF, SCIFA, SCIFB, and HSCIF ports. Document RZ/G1[ME] (also known as R8A774[35]) SoC bindings along with the RZ/G family bindings. The driver itself also needs to recognize the latter binding for the SCIF ports, so teach it...
Signed-off-by Sergei Shtylyov <[email protected]>---
This patch is against the 'tty-next' branch of GregKH's 'tty.git' repo.Documentation/devicetree/bindings/serial/renesas,sci-serial.txt | 12 ++++++++++ drivers/tty/serial/sh-sci.c | 3 ++ 2 files changed, 15 insertions(+)Index:
tty/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
===================================================================
---tty.orig/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt+++tty/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt>(quoted diff) +3
-0@@ -9,6 +9,14 @@ Required properties: - "renesas,scifb-r8a73a4" for R8A73A4 (R-Mobile APE6) SCIFB compatible UART. - "renesas,scifa-r8a7740" for R8A7740 (R-Mobile A1) SCIFA compatible UART. - "renesas,scifb-r8a7740" for R8A7740 (R-Mobile A1) SCIFB compatible UART.> + - "renesas,scif-r8a7743" for R8A7743 (RZ/G1M) SCIF compatible UART. + - "renesas,scifa-r8a7743" for R8A7743 (RZ/G1M) SCIFA compatible UART. + - "renesas,scifb-r8a7743" for R8A7743 (RZ/G1M) SCIFB compatible UART.
Quoted 8 lines
Quoted 5 lines
Documentation/devicetree/bindings/serial/renesas,sci-serial.txt Required properties: · line 19
Quoted 5 lines
Documentation/devicetree/bindings/serial/renesas,sci-serial.txt +5
-0+ - "renesas,hscif-r8a7743" for R8A7743 (RZ/G1M) HSCIF compatible UART. + - "renesas,scif-r8a7745" for R8A7745 (RZ/G1E) SCIF compatible UART. + - "renesas,scifa-r8a7745" for R8A7745 (RZ/G1E) SCIFA compatible UART. + - "renesas,scifb-r8a7745" for R8A7745 (RZ/G1E) SCIFB compatible UART. + - "renesas,hscif-r8a7745" for R8A7745 (RZ/G1E) HSCIF compatible UART.Are we *really* going to add four compat string for each RZ/G* SoC ? We're reaching the limit of sanity...
Soon we can use soc_device_match(), if we ever need to handle r8a7743 or r8a7745 quirks?
Declaring it is compatible with renesas,rcar-gen2-scif is still good/needed for the BRG (Baud Rate Generator for External Clock), which is not present on e.g. RZ/A1H.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Quoted 59 lines · On Wednesday 05 Oct 2016 12:03:24 Geert Uytterhoeven wrote:
Hi Laurent,
On Wed, Oct 5, 2016 at 11:55 AM, Laurent Pinchart
Quoted 45 lines · <[email protected]> wrote:
Quoted 44 lines · On Friday 30 Sep 2016 10:38:48 Geert Uytterhoeven wrote:
Quoted 43 lines · Sergei Shtylyov
Renesas RZ/G SoC also have the SCIF, SCIFA, SCIFB, and HSCIF ports. Document RZ/G1[ME] (also known as R8A774[35]) SoC bindings along with the RZ/G family bindings. The driver itself also needs to recognize the latter binding for the SCIF ports, so teach it...
Signed-off-by Sergei Shtylyov <[email protected]>---
This patch is against the 'tty-next' branch of GregKH's 'tty.git' repo.Documentation/devicetree/bindings/serial/renesas,sci-serial.txt | 12 ++++++++++ drivers/tty/serial/sh-sci.c | 3 ++ 2 files changed, 15 insertions(+)Index:
tty/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
===================================================================
---
tty.orig/Documentation/devicetree/bindings/serial/renesas,sci-serial.tx t
+++tty/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt>(quoted diff) +1
-0@@ -9,6 +9,14 @@ Required properties: - "renesas,scifb-r8a73a4" for R8A73A4 (R-Mobile APE6) SCIFB compatible UART. - "renesas,scifa-r8a7740" for R8A7740 (R-Mobile A1) SCIFA compatible UART. - "renesas,scifb-r8a7740" for R8A7740 (R-Mobile A1) SCIFB compatible UART.> + - "renesas,scif-r8a7743" for R8A7743 (RZ/G1M) SCIF compatibleUART.
+ - "renesas,scifa-r8a7743" for R8A7743 (RZ/G1M) SCIFA compatible
UART.
+ - "renesas,scifb-r8a7743" for R8A7743 (RZ/G1M) SCIFB compatible
UART.
+ - "renesas,hscif-r8a7743" for R8A7743 (RZ/G1M) HSCIF compatible
UART.
+ - "renesas,scif-r8a7745" for R8A7745 (RZ/G1E) SCIF compatible
UART.
+ - "renesas,scifa-r8a7745" for R8A7745 (RZ/G1E) SCIFA compatibleQuoted 8 lines
Quoted 5 lines
Quoted 5 lines
UART.
+ - "renesas,scifb-r8a7745" for R8A7745 (RZ/G1E) SCIFB compatible
UART.
+ - "renesas,hscif-r8a7745" for R8A7745 (RZ/G1E) HSCIF compatible
UART.Are we *really* going to add four compat string for each RZ/G* SoC ? We're reaching the limit of sanity...
Quoted 2 lines
Soon we can use
soc_device_match(), if we ever need to handle r8a7743 or r8a7745 quirks?
We could, but I believe usage of soc_device_match() should be kept minimal, otherwise we could remove all compat strings but one and handle all differences in the driver with soc_device_match(). That's a topic I'd like to discuss face to face in Berlin. The recent new compatible strings show we have a problem, and we need to agree on how to address it.
Quoted 3 lines
Declaring it is compatible with renesas,rcar-gen2-scif is still good/needed for the BRG (Baud Rate Generator for External Clock), which is not present on e.g. RZ/A1H.
Given that the RZ/G1[ME] SCIFs seem to be compatible with the Gen2 SCIFs using the renesas,rcar-gen2-scif compat string seems fine to me.
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 30 lines · Laurent Pinchart
Quoted 29 lines · On Friday 30 Sep 2016 10:38:48 Geert Uytterhoeven wrote:
Quoted 28 lines · Sergei Shtylyov
Renesas RZ/G SoC also have the SCIF, SCIFA, SCIFB, and HSCIF ports. Document RZ/G1[ME] (also known as R8A774[35]) SoC bindings along with the RZ/G family bindings. The driver itself also needs to recognize the latter binding for the SCIF ports, so teach it...
Signed-off-by Sergei Shtylyov <[email protected]>---
This patch is against the 'tty-next' branch of GregKH's 'tty.git' repo.Documentation/devicetree/bindings/serial/renesas,sci-serial.txt | 12 ++++++++++ drivers/tty/serial/sh-sci.c | 3 ++ 2 files changed, 15 insertions(+)Index:
tty/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
===================================================================
---tty.orig/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt+++tty/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt>(quoted diff) +3
-0@@ -9,6 +9,14 @@ Required properties: - "renesas,scifb-r8a73a4" for R8A73A4 (R-Mobile APE6) SCIFB compatible UART. - "renesas,scifa-r8a7740" for R8A7740 (R-Mobile A1) SCIFA compatible UART. - "renesas,scifb-r8a7740" for R8A7740 (R-Mobile A1) SCIFB compatible UART.> + - "renesas,scif-r8a7743" for R8A7743 (RZ/G1M) SCIF compatible UART. + - "renesas,scifa-r8a7743" for R8A7743 (RZ/G1M) SCIFA compatible UART. + - "renesas,scifb-r8a7743" for R8A7743 (RZ/G1M) SCIFB compatible UART.
Quoted 8 lines
Quoted 5 lines
Documentation/devicetree/bindings/serial/renesas,sci-serial.txt Required properties: · line 19
Quoted 5 lines
Documentation/devicetree/bindings/serial/renesas,sci-serial.txt +5
-0+ - "renesas,hscif-r8a7743" for R8A7743 (RZ/G1M) HSCIF compatible UART. + - "renesas,scif-r8a7745" for R8A7745 (RZ/G1E) SCIF compatible UART. + - "renesas,scifa-r8a7745" for R8A7745 (RZ/G1E) SCIFA compatible UART. + - "renesas,scifb-r8a7745" for R8A7745 (RZ/G1E) SCIFB compatible UART. + - "renesas,hscif-r8a7745" for R8A7745 (RZ/G1E) HSCIF compatible UART.Are we *really* going to add four compat string for each RZ/G* SoC ? We're reaching the limit of sanity...
Is it really 4 distinct UARTs on a chip? DT can't fix that insanity.
Rob
Quoted 57 lines · On Wednesday 05 Oct 2016 08:28:05 Rob Herring wrote:
On Wed, Oct 5, 2016 at 4:55 AM, Laurent Pinchart
Quoted 45 lines · <[email protected]> wrote:
Quoted 44 lines · On Friday 30 Sep 2016 10:38:48 Geert Uytterhoeven wrote:
Quoted 43 lines · Sergei Shtylyov
Renesas RZ/G SoC also have the SCIF, SCIFA, SCIFB, and HSCIF ports. Document RZ/G1[ME] (also known as R8A774[35]) SoC bindings along with the RZ/G family bindings. The driver itself also needs to recognize the latter binding for the SCIF ports, so teach it...
Signed-off-by Sergei Shtylyov <[email protected]>---
This patch is against the 'tty-next' branch of GregKH's 'tty.git' repo.Documentation/devicetree/bindings/serial/renesas,sci-serial.txt | 12 ++++++++++ drivers/tty/serial/sh-sci.c | 3 ++ 2 files changed, 15 insertions(+)Index:
tty/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
===================================================================
---
tty.orig/Documentation/devicetree/bindings/serial/renesas,sci-serial.tx t
+++tty/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt>(quoted diff) +1
-0@@ -9,6 +9,14 @@ Required properties: - "renesas,scifb-r8a73a4" for R8A73A4 (R-Mobile APE6) SCIFB compatible UART. - "renesas,scifa-r8a7740" for R8A7740 (R-Mobile A1) SCIFA compatible UART. - "renesas,scifb-r8a7740" for R8A7740 (R-Mobile A1) SCIFB compatible UART.> + - "renesas,scif-r8a7743" for R8A7743 (RZ/G1M) SCIF compatibleUART.
+ - "renesas,scifa-r8a7743" for R8A7743 (RZ/G1M) SCIFA compatible
UART.
+ - "renesas,scifb-r8a7743" for R8A7743 (RZ/G1M) SCIFB compatible
UART.
+ - "renesas,hscif-r8a7743" for R8A7743 (RZ/G1M) HSCIF compatible
UART.
+ - "renesas,scif-r8a7745" for R8A7745 (RZ/G1E) SCIF compatible
UART.
+ - "renesas,scifa-r8a7745" for R8A7745 (RZ/G1E) SCIFA compatibleQuoted 8 lines
Quoted 5 lines
Quoted 5 lines
UART.
+ - "renesas,scifb-r8a7745" for R8A7745 (RZ/G1E) SCIFB compatible
UART.
+ - "renesas,hscif-r8a7745" for R8A7745 (RZ/G1E) HSCIF compatible
UART.Are we *really* going to add four compat string for each RZ/G* SoC ? We're reaching the limit of sanity...
Quoted 1 line
Is it really 4 distinct UARTs on a chip? DT can't fix that insanity.
It's really 4 different UART types on a chip, yes. We have actually 5 different UART types, named SCI, SCIF, SCIFA, SCIFB and HSCIF. Only the last 4 are used on R-Car SoCs.
There are 34 compatible strings defined, one per UART + SoC combination, plus a set of more generic ones. So far, the driver handles the r7s72100 compatible string separately as the UART on that chip is quite peculiar, but for all other SoCs we only need to match against
- the five generic renesas,(h)sci(f|fa|fb)? types
- the per-family renesas,rcar-gen[123]-scif types for the SCIF only
This means that there's a high level of compatibility between UARTs instances in different SoCs (we might need a few more per-family compatible strings to tell models apart that could present have family-dependent features currently not supported in the driver, but I believe my argument still remains largely true). However, due to the combination of the "DT is an ABI" and "IPs that appear identical in the datasheet could actually have differences that we haven't found yet" dogmas, the proliferation of per-SoC compatible strings is getting out of hands.
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 4 lines
There are 34 compatible strings defined, one per UART + SoC combination, plus a set of more generic ones. So far, the driver handles the r7s72100 compatible string separately as the UART on that chip is quite peculiar, but for all other SoCs we only need to match against
Just FYI...
There are 2 different types of UARTS (SCI) on r7s72100: SCIF and SCI
Getting the "SCI" ones to work takes some 'tweaking' of some registers in the interrupt controller that are outside of the scope of the SCI driver. Basically, the power on reset values for some IRQ signaling is wrong but can be adjusted with a register. At the moment, I've been fixing that in u-boot.
So in reality, a "renesas,sci-r7s72100" is probably needed too if you want to throw that one on the pile....
Chris
Hi Chris,
Quoted 8 lines · On Wednesday 05 Oct 2016 13:50:18 Chris Brandt wrote:
Quoted 4 lines
There are 34 compatible strings defined, one per UART + SoC combination, plus a set of more generic ones. So far, the driver handles the r7s72100 compatible string separately as the UART on that chip is quite peculiar, but for all other SoCs we only need to match against
Just FYI...
There are 2 different types of UARTS (SCI) on r7s72100: SCIF and SCI
Quoted 8 lines
Getting the "SCI" ones to work takes some 'tweaking' of some registers in the interrupt controller that are outside of the scope of the SCI driver. Basically, the power on reset values for some IRQ signaling is wrong but can be adjusted with a register. At the moment, I've been fixing that in u-boot.
So in reality, a "renesas,sci-r7s72100" is probably needed too if you want to throw that one on the pile....
I'm totally fine adding compatible strings when it makes sense, what bothers me is a pile of compat strings to describe IP cores that are identical :-)
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 6 lines · Laurent Pinchart
Quoted 1 line · On Wednesday 05 Oct 2016 08:28:05 Rob Herring wrote:
Is it really 4 distinct UARTs on a chip? DT can't fix that insanity.
It's really 4 different UART types on a chip, yes. We have actually 5 different UART types, named SCI, SCIF, SCIFA, SCIFB and HSCIF. Only the last 4 are used on R-Car SoCs.
And even that is a simplification ;-)
AFAIU, evolution seems to have been
SCI --> SCIF ---> SCIF + BRG ---> HSCIF
|
+---> SCIFA ---> SCIFBNow, that's a simplication, too ;-) There are many intermediate variants with slightly different features and register bits,esp. on SuperH. They're all handled by the same sh-sci.c driver.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds