Skip to content

Commit

Permalink
arm: vita: initial UART console support
Browse files Browse the repository at this point in the history
  • Loading branch information
xerpi committed Jan 7, 2019
1 parent 63f3032 commit d4da7e3
Show file tree
Hide file tree
Showing 6 changed files with 509 additions and 5 deletions.
52 changes: 51 additions & 1 deletion arch/arm/boot/dts/vita.dts
Expand Up @@ -8,6 +8,8 @@

/dts-v1/;

#include <dt-bindings/interrupt-controller/arm-gic.h>

/ {
model = "PlayStation Vita";
compatible = "vita,vita";
Expand All @@ -16,7 +18,13 @@
#size-cells = <1>;

chosen {
bootargs = "keep_bootcon earlyprintk";
bootargs = "earlyprintk console=ttyS0";

stdout-path = "/serial@e2030000:115200";
};

aliases {
serial0 = &uart0;
};

cpus {
Expand Down Expand Up @@ -53,4 +61,46 @@
reg = <0x40200000 0x1FE00000>;
};

gic: interrupt-controller@1a001000 {
compatible = "arm,cortex-a9-gic";
#interrupt-cells = <3>;
#address-cells = <0>;
interrupt-controller;
reg = <0x1a001000 0x1000>,
<0x1a000100 0x1000>;
};

refclk144mhz: refclk144mkhz {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <144000000>;
clock-output-names = "refclk144khz";
};

soc {
#address-cells = <1>;
#size-cells = <1>;
compatible = "simple-bus";
interrupt-parent = <&gic>;
ranges;

uart0: serial@e2030000 {
compatible = "vita,vita-uart";
reg = <0xe2030000 0x10000>;
};

/*global_timer@1a000200 {
compatible = "arm,cortex-a9-global-timer";
reg = <0x1a000200 0x100>;
interrupts = <GIC_PPI 11 (GIC_CPU_MASK_RAW(0xF) | IRQ_TYPE_EDGE_RISING)>;
clocks = <&refclk144mhz>;
};*/

local_timer@1a000600 {
compatible = "arm,cortex-a9-twd-timer";
reg = <0x1a000600 0x100>;
interrupts = <GIC_PPI 13 (GIC_CPU_MASK_RAW(0xF) | IRQ_TYPE_EDGE_RISING)>;
clocks = <&refclk144mhz>;
};
};
};
3 changes: 3 additions & 0 deletions arch/arm/mach-vita/Kconfig
Expand Up @@ -5,6 +5,9 @@ config ARCH_VITA
select CPU_V7
select HAVE_SMP
select TIMER_OF
select HAVE_ARM_ARCH_TIMER
select HAVE_ARM_TWD
select ARM_GLOBAL_TIMER
select COMMON_CLK
select GENERIC_CLOCKEVENTS
select GENERIC_IRQ_MULTI_HANDLER
Expand Down
21 changes: 17 additions & 4 deletions drivers/tty/serial/Kconfig
Expand Up @@ -264,7 +264,7 @@ config SERIAL_SAMSUNG_UARTS
help
Select the number of available UART ports for the Samsung S3C
serial driver

config SERIAL_SAMSUNG_DEBUG
bool "Samsung SoC serial debug"
depends on SERIAL_SAMSUNG && DEBUG_LL
Expand Down Expand Up @@ -620,8 +620,8 @@ config PDC_CONSOLE
depends on PARISC && !SERIAL_MUX && VT
default n
help
Saying Y here will enable the software based PDC console to be
used as the system console. This is useful for machines in
Saying Y here will enable the software based PDC console to be
used as the system console. This is useful for machines in
which the hardware based console has not been written yet. The
following steps must be completed to use the PDC console:

Expand Down Expand Up @@ -816,7 +816,7 @@ config SERIAL_CPM
depends on CPM2 || CPM1
select SERIAL_CORE
help
This driver supports the SCC and SMC serial ports on Motorola
This driver supports the SCC and SMC serial ports on Motorola
embedded PowerPC that contain a CPM1 (8xx) or CPM2 (8xxx)

config SERIAL_CPM_CONSOLE
Expand Down Expand Up @@ -1548,6 +1548,19 @@ config SERIAL_RDA_CONSOLE
Say 'Y' here if you wish to use the RDA8810PL UART as the system
console. Only earlycon is implemented currently.

config SERIAL_VITA_UART
bool "PlayStation Vita UART support"
depends on ARCH_VITA
select SERIAL_CORE
help
This driver supports the PlayStation Vita UART.

config SERIAL_VITA_UART_CONSOLE
bool "PlayStation Vita UART console support"
depends on SERIAL_VITA_UART
select SERIAL_CORE_CONSOLE
select SERIAL_EARLYCON

endmenu

config SERIAL_MCTRL_GPIO
Expand Down
1 change: 1 addition & 0 deletions drivers/tty/serial/Makefile
Expand Up @@ -90,6 +90,7 @@ obj-$(CONFIG_SERIAL_PIC32) += pic32_uart.o
obj-$(CONFIG_SERIAL_MPS2_UART) += mps2-uart.o
obj-$(CONFIG_SERIAL_OWL) += owl-uart.o
obj-$(CONFIG_SERIAL_RDA) += rda-uart.o
obj-$(CONFIG_SERIAL_VITA_UART) += vita-uart.o

# GPIOLIB helpers for modem control lines
obj-$(CONFIG_SERIAL_MCTRL_GPIO) += serial_mctrl_gpio.o
Expand Down

0 comments on commit d4da7e3

Please sign in to comment.