diff options
author | Paul Burton <paul.burton@imgtec.com> | 2016-08-26 10:17:35 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2016-10-04 19:31:20 -0400 |
commit | c11e3b48dbc367e38dfaea6e8a61d3b39f476685 (patch) | |
tree | 206ec739e07875e5cb77a71fe2fed8b9a7cbcba9 /arch/mips/boot | |
parent | b6d5e47e67292542a41c3fe367bacb364eb4e601 (diff) |
MIPS: SEAD3: Probe UARTs using DT
Probe the UARTs on SEAD3 boards using device tree rather than platform
code, in order to reduce the amount of the latter. This requires that
CONFIG_SERIAL_OF_PLATFORM be enabled, so enable it in sead3_defconfig.
The SEAD3 DT shim code is extended to read bootloader environment
variables to determine the appropriate UART & mode for kernel console
output & set the stdout-path property of the chosen node accordingly.
In contrast to the old platform code, which appears to have only ever
set "console=ttyS0,38400n8r" with the code in console_config never
having an effect, this will honor the "yamontty" environment variable to
select between the 2 UARTs on the board and then check the "modetty0" or
"modetty1" variable as appropriate to determine the UART configuration.
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: linux-mips@linux-mips.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/14048/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/boot')
-rw-r--r-- | arch/mips/boot/dts/mti/sead3.dts | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/arch/mips/boot/dts/mti/sead3.dts b/arch/mips/boot/dts/mti/sead3.dts index 051b3a9e5a9e..3f681c530082 100644 --- a/arch/mips/boot/dts/mti/sead3.dts +++ b/arch/mips/boot/dts/mti/sead3.dts | |||
@@ -12,6 +12,15 @@ | |||
12 | compatible = "mti,sead-3"; | 12 | compatible = "mti,sead-3"; |
13 | interrupt-parent = <&gic>; | 13 | interrupt-parent = <&gic>; |
14 | 14 | ||
15 | chosen { | ||
16 | stdout-path = "uart1:115200"; | ||
17 | }; | ||
18 | |||
19 | aliases { | ||
20 | uart0 = &uart0; | ||
21 | uart1 = &uart1; | ||
22 | }; | ||
23 | |||
15 | cpus { | 24 | cpus { |
16 | cpu@0 { | 25 | cpu@0 { |
17 | compatible = "mti,mips14KEc", "mti,mips14Kc"; | 26 | compatible = "mti,mips14KEc", "mti,mips14Kc"; |
@@ -50,4 +59,32 @@ | |||
50 | interrupts = <GIC_LOCAL 1 IRQ_TYPE_NONE>; | 59 | interrupts = <GIC_LOCAL 1 IRQ_TYPE_NONE>; |
51 | }; | 60 | }; |
52 | }; | 61 | }; |
62 | |||
63 | /* UART connected to FTDI & miniUSB socket */ | ||
64 | uart0: uart@1f000900 { | ||
65 | compatible = "ns16550a"; | ||
66 | reg = <0x1f000900 0x20>; | ||
67 | reg-io-width = <4>; | ||
68 | reg-shift = <2>; | ||
69 | |||
70 | clock-frequency = <14745600>; | ||
71 | |||
72 | interrupts = <3>; /* GIC 3 or CPU 4 */ | ||
73 | |||
74 | no-loopback-test; | ||
75 | }; | ||
76 | |||
77 | /* UART connected to RS232 socket */ | ||
78 | uart1: uart@1f000800 { | ||
79 | compatible = "ns16550a"; | ||
80 | reg = <0x1f000800 0x20>; | ||
81 | reg-io-width = <4>; | ||
82 | reg-shift = <2>; | ||
83 | |||
84 | clock-frequency = <14745600>; | ||
85 | |||
86 | interrupts = <2>; /* GIC 2 or CPU 4 */ | ||
87 | |||
88 | no-loopback-test; | ||
89 | }; | ||
53 | }; | 90 | }; |