Skip to content

Commit fcbee4d

Browse files
hormsgregkh
authored andcommitted
serial: sh-sci: Add device tree support for r8a7779
According to the platform data for the legacy-C initialisation of sh-sci for the r8a7779 SoC and my own testing the SCIx_SH4_SCIF_REGTYPE bit of scscr needs to be set. Signed-off-by: Simon Horman <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent c439c33 commit fcbee4d

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

Documentation/devicetree/bindings/serial/renesas,sci-serial.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Required properties:
1212
- "renesas,scifa-r8a7791" for R8A7791 (R-Car M2) SCIFA compatible UART.
1313
- "renesas,scifb-r8a7791" for R8A7791 (R-Car M2) SCIFB compatible UART.
1414
- "renesas,hscif-r8a7791" for R8A7791 (R-Car M2) HSCIF compatible UART.
15+
- "renesas,scif-r8a7779" for R8A7779 (R-Car H1) SCIF compatible UART.
1516
- "renesas,scif" for generic SCIF compatible UART.
1617
- "renesas,scifa" for generic SCIFA compatible UART.
1718
- "renesas,scifb" for generic SCIFB compatible UART.

drivers/tty/serial/sh-sci.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2419,6 +2419,7 @@ static int sci_remove(struct platform_device *dev)
24192419
struct sci_port_info {
24202420
unsigned int type;
24212421
unsigned int regtype;
2422+
unsigned int scscr_extra;
24222423
};
24232424

24242425
static const struct of_device_id of_sci_match[] = {
@@ -2428,6 +2429,13 @@ static const struct of_device_id of_sci_match[] = {
24282429
.type = PORT_SCIF,
24292430
.regtype = SCIx_SH4_SCIF_REGTYPE,
24302431
},
2432+
}, {
2433+
.compatible = "renesas,scif-r8a7779",
2434+
.data = (void *)&(const struct sci_port_info) {
2435+
.type = PORT_SCIF,
2436+
.regtype = SCIx_SH4_SCIF_REGTYPE,
2437+
.scscr_extra = SCSCR_CKE1,
2438+
},
24312439
}, {
24322440
.compatible = "renesas,scifa",
24332441
.data = &(const struct sci_port_info) {
@@ -2488,7 +2496,7 @@ sci_parse_dt(struct platform_device *pdev, unsigned int *dev_id)
24882496
p->flags = UPF_IOREMAP | UPF_BOOT_AUTOCONF;
24892497
p->type = info->type;
24902498
p->regtype = info->regtype;
2491-
p->scscr = SCSCR_RE | SCSCR_TE;
2499+
p->scscr = SCSCR_RE | SCSCR_TE | info->scscr_extra;
24922500

24932501
return p;
24942502
}

0 commit comments

Comments
 (0)