devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] Add Spreadtrum Shark64 SoC support
@ 2014-09-29 11:48 zhang.lyra-Re5JQEeQqe8AvxtiuMwx3w
  2014-09-29 11:48 ` [PATCH 1/6] Documentation: DT: Add bindings for Spreadtrum serial zhang.lyra
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: zhang.lyra-Re5JQEeQqe8AvxtiuMwx3w @ 2014-09-29 11:48 UTC (permalink / raw)
  To: catalin.marinas-5wv7dgnIgG8,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
	ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg, jslaby-AlSwsSmVLrQ,
	galak-sgV2jX0FEOL9JmXXK+q4OQ, broonie-QSEj5FYQhm4dnm+yROfE0A,
	mark.rutland-5wv7dgnIgG8, m-karicheri2-l0cyMroinI0,
	pawel.moll-5wv7dgnIgG8, artagnon-Re5JQEeQqe8AvxtiuMwx3w,
	rrichter-YGCgFSpz5w/QT0dZR+AlfA, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	will.deacon-5wv7dgnIgG8, orsonzhai-Re5JQEeQqe8AvxtiuMwx3w,
	geng.ren-lxIno14LUO0EEoCn2XhGlw,
	zhizhou.zhang-lxIno14LUO0EEoCn2XhGlw
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, chunyan.zhang

From: "chunyan.zhang" <chunyan.zhang-lxIno14LUO0EEoCn2XhGlw@public.gmane.org>

Spreadtrum is a rapid growing chip vendor providing smart phone total solutions. 
Shark64 is nominated as a SoC infrastructure that supports 4G/3G/2G standards based on ARMv8 multiple core architecture.

This patchset adds shark64 supports in arm64 device tree and implements the basic earlycon serial driver.

chunyan.zhang (6):
  Documentation: DT: Add bindings for Spreadtrum serial
  arm64: Add DTS support for Spreadtrum's Shark64 SoC
  arm64: dts/Makefile: Add support for Spreadtrum's Shark64 SoC.
  arm64: Add support for Spreadtrum's Shark64 SoC in Kconfig and defconfig
  tty/serial: add Spreadtrum's serial earlycon
  Documentation: Add entry for Spreadtrum's Shark64 SoC

 Documentation/devicetree/bindings/arm/sprd.txt     |    6 ++
 .../devicetree/bindings/serial/of-serial.txt       |    1 +
 arch/arm64/Kconfig                                 |    5 +
 arch/arm64/boot/dts/Makefile                       |    1 +
 arch/arm64/boot/dts/sprd_shark64.dts               |  110 ++++++++++++++++++++
 arch/arm64/configs/defconfig                       |    1 +
 drivers/tty/serial/Kconfig                         |   12 +++
 drivers/tty/serial/Makefile                        |    1 +
 drivers/tty/serial/serial_sprd_early.c             |   64 ++++++++++++
 9 files changed, 201 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/sprd.txt
 create mode 100644 arch/arm64/boot/dts/sprd_shark64.dts
 create mode 100644 drivers/tty/serial/serial_sprd_early.c

-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 1/6] Documentation: DT: Add bindings for Spreadtrum serial
  2014-09-29 11:48 [PATCH 0/6] Add Spreadtrum Shark64 SoC support zhang.lyra-Re5JQEeQqe8AvxtiuMwx3w
@ 2014-09-29 11:48 ` zhang.lyra
  2014-09-29 11:48 ` [PATCH 2/6] arm64: Add DTS support for Spreadtrum's Shark64 SoC zhang.lyra
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: zhang.lyra @ 2014-09-29 11:48 UTC (permalink / raw)
  To: catalin.marinas, gregkh, ijc+devicetree, jslaby, galak, broonie,
	mark.rutland, m-karicheri2, pawel.moll, artagnon, rrichter,
	robh+dt, will.deacon, orsonzhai, geng.ren, zhizhou.zhang
  Cc: devicetree, linux-arm-kernel, linux-kernel, chunyan.zhang

From: "chunyan.zhang" <chunyan.zhang@spreadtrum.com>

Adds the device-tree documentation for Spreadtrum's serial.

Signed-off-by: chunyan.zhang <chunyan.zhang@spreadtrum.com>
---
 .../devicetree/bindings/serial/of-serial.txt       |    1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/serial/of-serial.txt b/Documentation/devicetree/bindings/serial/of-serial.txt
index 7705477..a0bb1d1 100644
--- a/Documentation/devicetree/bindings/serial/of-serial.txt
+++ b/Documentation/devicetree/bindings/serial/of-serial.txt
@@ -14,6 +14,7 @@ Required properties:
 	- "altr,16550-FIFO32"
 	- "altr,16550-FIFO64"
 	- "altr,16550-FIFO128"
+	- "sprd,serial"
 	- "serial" if the port type is unknown.
 - reg : offset and length of the register set for the device.
 - interrupts : should contain uart interrupt.
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 2/6] arm64: Add DTS support for Spreadtrum's Shark64 SoC
  2014-09-29 11:48 [PATCH 0/6] Add Spreadtrum Shark64 SoC support zhang.lyra-Re5JQEeQqe8AvxtiuMwx3w
  2014-09-29 11:48 ` [PATCH 1/6] Documentation: DT: Add bindings for Spreadtrum serial zhang.lyra
@ 2014-09-29 11:48 ` zhang.lyra
       [not found]   ` <1411991314-6636-3-git-send-email-zhang.lyra-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2014-09-29 11:48 ` [PATCH 3/6] arm64: dts/Makefile: Add " zhang.lyra
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 13+ messages in thread
From: zhang.lyra @ 2014-09-29 11:48 UTC (permalink / raw)
  To: catalin.marinas, gregkh, ijc+devicetree, jslaby, galak, broonie,
	mark.rutland, m-karicheri2, pawel.moll, artagnon, rrichter,
	robh+dt, will.deacon, orsonzhai, geng.ren, zhizhou.zhang
  Cc: devicetree, linux-arm-kernel, linux-kernel, chunyan.zhang

From: "zhizhou.zhang" <zhizhou.zhang@spreadtrum.com>

Adds the device tree support for Spreadtrum Shark64 SoC based on ARMv8 architecture.

Signed-off-by: zhizhou.zhang <zhizhou.zhang@spreadtrum.com>
Signed-off-by: chunyan.zhang <chunyan.zhang@spreadtrum.com>
---
 arch/arm64/boot/dts/sprd_shark64.dts |  110 ++++++++++++++++++++++++++++++++++
 1 file changed, 110 insertions(+)
 create mode 100644 arch/arm64/boot/dts/sprd_shark64.dts

diff --git a/arch/arm64/boot/dts/sprd_shark64.dts b/arch/arm64/boot/dts/sprd_shark64.dts
new file mode 100644
index 0000000..537cd6d
--- /dev/null
+++ b/arch/arm64/boot/dts/sprd_shark64.dts
@@ -0,0 +1,110 @@
+/*
+ * dts file for Spreadtrum(sprd) Shark64 SOC
+ *
+ * Copyright (C) 2014,  Spreadtrum Communications Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ */
+
+/dts-v1/;
+
+/memreserve/ 0x80000000 0x00010000;
+
+/ {
+	model = "shark64 Board";
+	compatible = "sprd,shark64";
+	interrupt-parent = <&gic>;
+	#address-cells = <2>;
+	#size-cells = <2>;
+
+	chosen {
+		bootargs = "earlycon=serial_sprd,0x70000000";
+      };
+
+	cpus {
+		#address-cells = <2>;
+		#size-cells = <0>;
+
+		cpu@0 {
+			device_type = "cpu";
+			compatible = "arm,armv8";
+			reg = <0x0 0x0>;
+			enable-method = "spin-table";
+			cpu-release-addr = <0x0 0x8000fff8>;
+		};
+		cpu@1 {
+			device_type = "cpu";
+			compatible = "arm,armv8";
+			reg = <0x0 0x1>;
+			enable-method = "spin-table";
+			cpu-release-addr = <0x0 0x8000fff8>;
+		};
+		cpu@2 {
+			device_type = "cpu";
+			compatible = "arm,armv8";
+			reg = <0x0 0x2>;
+			enable-method = "spin-table";
+			cpu-release-addr = <0x0 0x8000fff8>;
+		};
+		cpu@3 {
+			device_type = "cpu";
+			compatible = "arm,armv8";
+			reg = <0x0 0x3>;
+			enable-method = "spin-table";
+			cpu-release-addr = <0x0 0x8000fff8>;
+		};
+	};
+
+	memory@80000000 {
+		device_type = "memory";
+		reg = <0 0x80000000 0 0x20000000>;
+	};
+
+	aliases {
+		serial0 = &uart0;
+		serial1 = &uart1;
+	};
+
+	gic: interrupt-controller@12001000 {
+		compatible = "arm,cortex-a15-gic", "arm,cortex-a9-gic";
+		#interrupt-cells = <3>;
+		#address-cells = <0>;
+		interrupt-controller;
+		reg = <0 0x12001000 0 0x1000>,
+		      <0 0x12002000 0 0x1000>;
+	};
+
+	intc:interrupt-controller@71400000 {
+		compatible = "sprd,intc";
+		#interrupt-cells = <0>;
+		interrupt-controller;
+		reg =	<0 0x71400000 0 0x1000>,
+			<0 0x71500000 0 0x1000>,
+			<0 0x71600000 0 0x1000>,
+			<0 0x71700000 0 0x1000>;
+	};
+
+	timer {
+		compatible = "arm,armv8-timer";
+		interrupts = <1 13 0xff01>,
+			     <1 14 0xff01>,
+			     <1 11 0xff01>,
+			     <1 10 0xff01>;
+		clock-frequency = <26000000>;
+	};
+
+	uart0: uart@70000000 {
+		compatible = "sprd,serial";
+		reg = <0 0x70000000 0 0x100>;
+		interrupts = <0 2 0xf04>;
+	};
+
+	uart1: uart@70100000 {
+		compatible = "sprd,serial";
+		reg = <0 0x70100000 0 0x100>;
+		interrupts = <0 3 0xf04>;
+	};
+};
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 3/6] arm64: dts/Makefile: Add support for Spreadtrum's Shark64 SoC.
  2014-09-29 11:48 [PATCH 0/6] Add Spreadtrum Shark64 SoC support zhang.lyra-Re5JQEeQqe8AvxtiuMwx3w
  2014-09-29 11:48 ` [PATCH 1/6] Documentation: DT: Add bindings for Spreadtrum serial zhang.lyra
  2014-09-29 11:48 ` [PATCH 2/6] arm64: Add DTS support for Spreadtrum's Shark64 SoC zhang.lyra
@ 2014-09-29 11:48 ` zhang.lyra
  2014-09-29 14:46   ` Andreas Färber
  2014-09-29 11:48 ` [PATCH 4/6] arm64: Add support for Spreadtrum's Shark64 SoC in Kconfig and defconfig zhang.lyra
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 13+ messages in thread
From: zhang.lyra @ 2014-09-29 11:48 UTC (permalink / raw)
  To: catalin.marinas, gregkh, ijc+devicetree, jslaby, galak, broonie,
	mark.rutland, m-karicheri2, pawel.moll, artagnon, rrichter,
	robh+dt, will.deacon, orsonzhai, geng.ren, zhizhou.zhang
  Cc: devicetree, linux-arm-kernel, linux-kernel, chunyan.zhang

From: "zhizhou.zhang" <zhizhou.zhang@spreadtrum.com>

Adds build support for Spreadtrum's Shark64 SoC in arm64 dts Makefile.

Signed-off-by: zhizhou.zhang <zhizhou.zhang@spreadtrum.com>
Signed-off-by: chunyan.zhang <chunyan.zhang@spreadtrum.com>
---
 arch/arm64/boot/dts/Makefile |    1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/Makefile b/arch/arm64/boot/dts/Makefile
index c52bdb0..7fdb9df 100644
--- a/arch/arm64/boot/dts/Makefile
+++ b/arch/arm64/boot/dts/Makefile
@@ -1,5 +1,6 @@
 dtb-$(CONFIG_ARCH_VEXPRESS) += rtsm_ve-aemv8a.dtb foundation-v8.dtb
 dtb-$(CONFIG_ARCH_XGENE) += apm-mustang.dtb
+dtb-$(CONFIG_ARCH_SHARK64) += sprd_shark64.dtb
 
 targets += dtbs
 targets += $(dtb-y)
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 4/6] arm64: Add support for Spreadtrum's Shark64 SoC in Kconfig and defconfig
  2014-09-29 11:48 [PATCH 0/6] Add Spreadtrum Shark64 SoC support zhang.lyra-Re5JQEeQqe8AvxtiuMwx3w
                   ` (2 preceding siblings ...)
  2014-09-29 11:48 ` [PATCH 3/6] arm64: dts/Makefile: Add " zhang.lyra
@ 2014-09-29 11:48 ` zhang.lyra
  2014-09-29 11:48 ` [PATCH 5/6] tty/serial: Add Spreadtrum's serial earlycon zhang.lyra
  2014-09-29 11:48 ` [PATCH 6/6] Documentation: Add entry for Spreadtrum's Shark64 SoC zhang.lyra
  5 siblings, 0 replies; 13+ messages in thread
From: zhang.lyra @ 2014-09-29 11:48 UTC (permalink / raw)
  To: catalin.marinas, gregkh, ijc+devicetree, jslaby, galak, broonie,
	mark.rutland, m-karicheri2, pawel.moll, artagnon, rrichter,
	robh+dt, will.deacon, orsonzhai, geng.ren, zhizhou.zhang
  Cc: devicetree, linux-arm-kernel, linux-kernel, chunyan.zhang

From: "zhizhou.zhang" <zhizhou.zhang@spreadtrum.com>

Adds support for Spreadtrum's Shark64 SoC in the arm64 Kconfig
and defconfig files.

Signed-off-by: zhizhou.zhang <zhizhou.zhang@spreadtrum.com>
Signed-off-by: chunyan.zhang <chunyan.zhang@spreadtrum.com>
---
 arch/arm64/Kconfig           |    5 +++++
 arch/arm64/configs/defconfig |    1 +
 2 files changed, 6 insertions(+)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index fd4e81a..c8f36ad 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -149,6 +149,11 @@ config ARCH_XGENE
 	help
 	  This enables support for AppliedMicro X-Gene SOC Family
 
+config ARCH_SHARK64
+	bool "Spreadtrum 64-bit SOC (ARMv8 platform)"
+	help
+	Support for 64 bits Spreadtrum based systems.
+
 endmenu
 
 menu "Bus support"
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index d92ef3c..86bb5e9 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -34,6 +34,7 @@ CONFIG_MODULE_UNLOAD=y
 # CONFIG_IOSCHED_DEADLINE is not set
 CONFIG_ARCH_VEXPRESS=y
 CONFIG_ARCH_XGENE=y
+CONFIG_ARCH_SHARK64=y
 CONFIG_SMP=y
 CONFIG_PREEMPT=y
 CONFIG_KSM=y
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 5/6] tty/serial: Add Spreadtrum's serial earlycon
  2014-09-29 11:48 [PATCH 0/6] Add Spreadtrum Shark64 SoC support zhang.lyra-Re5JQEeQqe8AvxtiuMwx3w
                   ` (3 preceding siblings ...)
  2014-09-29 11:48 ` [PATCH 4/6] arm64: Add support for Spreadtrum's Shark64 SoC in Kconfig and defconfig zhang.lyra
@ 2014-09-29 11:48 ` zhang.lyra
  2014-09-29 11:48 ` [PATCH 6/6] Documentation: Add entry for Spreadtrum's Shark64 SoC zhang.lyra
  5 siblings, 0 replies; 13+ messages in thread
From: zhang.lyra @ 2014-09-29 11:48 UTC (permalink / raw)
  To: catalin.marinas, gregkh, ijc+devicetree, jslaby, galak, broonie,
	mark.rutland, m-karicheri2, pawel.moll, artagnon, rrichter,
	robh+dt, will.deacon, orsonzhai, geng.ren, zhizhou.zhang
  Cc: devicetree, linux-arm-kernel, linux-kernel, chunyan.zhang

From: "chunyan.zhang" <chunyan.zhang@spreadtrum.com>

Adds earlycon support for the Spreadtrum's serial.

Signed-off-by: chunyan.zhang <chunyan.zhang@spreadtrum.com>
---
 drivers/tty/serial/Kconfig             |   12 ++++++
 drivers/tty/serial/Makefile            |    1 +
 drivers/tty/serial/serial_sprd_early.c |   64 ++++++++++++++++++++++++++++++++
 3 files changed, 77 insertions(+)
 create mode 100644 drivers/tty/serial/serial_sprd_early.c

diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
index 26cec64..ede16e6 100644
--- a/drivers/tty/serial/Kconfig
+++ b/drivers/tty/serial/Kconfig
@@ -85,6 +85,18 @@ config SERIAL_EARLYCON_ARM_SEMIHOST
 	  with "earlycon=smh" on the kernel command line. The console is
 	  enabled when early_param is processed.
 
+config SERIAL_EARLYCON_SPRD
+	bool "Early console using SPRD serial"
+	depends on ARM64
+	select SERIAL_CORE
+	select SERIAL_CORE_CONSOLE
+	select SERIAL_EARLYCON
+	help
+	  Support for early debug console using SPRD serial. This enables
+	  the console before standard serial driver is probed. This is enabled
+	  with "earlycon=serial_sprd" on the kernel command line. The console is
+	  enabled when early_param is processed.
+
 config SERIAL_SB1250_DUART
 	tristate "BCM1xxx on-chip DUART serial support"
 	depends on SIBYTE_SB1xxx_SOC=y
diff --git a/drivers/tty/serial/Makefile b/drivers/tty/serial/Makefile
index 0080cc3..3ea9edc 100644
--- a/drivers/tty/serial/Makefile
+++ b/drivers/tty/serial/Makefile
@@ -7,6 +7,7 @@ obj-$(CONFIG_SERIAL_21285) += 21285.o
 
 obj-$(CONFIG_SERIAL_EARLYCON) += earlycon.o
 obj-$(CONFIG_SERIAL_EARLYCON_ARM_SEMIHOST) += earlycon-arm-semihost.o
+obj-$(CONFIG_SERIAL_EARLYCON_SPRD) += serial_sprd_early.o
 
 # These Sparc drivers have to appear before others such as 8250
 # which share ttySx minor node space.  Otherwise console device
diff --git a/drivers/tty/serial/serial_sprd_early.c b/drivers/tty/serial/serial_sprd_early.c
new file mode 100644
index 0000000..059e109
--- /dev/null
+++ b/drivers/tty/serial/serial_sprd_early.c
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2012 Spreadtrum Communications Inc.
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include <linux/kernel.h>
+#include <linux/console.h>
+#include <linux/init.h>
+#include <linux/serial_core.h>
+#include <linux/of.h>
+
+/*offset*/
+#define ARM_UART_TXD	0x0000
+#define ARM_UART_RXD	0x0004
+#define ARM_UART_STS0	0x0008
+#define ARM_UART_STS1	0x000C
+#define ARM_UART_IEN	0x0010
+#define ARM_UART_ICLR	0x0014
+#define ARM_UART_CTL0	0x0018
+#define ARM_UART_CTL1	0x001C
+#define ARM_UART_CTL2	0x0020
+#define ARM_UART_CLKD0	0x0024
+#define ARM_UART_CLKD1	0x0028
+#define ARM_UART_STS2	0x002C
+
+/*line status */
+#define UART_LSR_TX_OVER	(0x1<<15)
+
+static void serial_sprd_putc(struct uart_port *port, int c)
+{
+	while (!(readl(port->membase + ARM_UART_STS0) & UART_LSR_TX_OVER))
+		;
+	writeb(c, port->membase + ARM_UART_TXD);
+}
+
+static void serial_sprd_early_write(struct console *con, const char *s,
+				    unsigned n)
+{
+	struct earlycon_device *dev = con->data;
+
+	uart_console_write(&dev->port, s, n, serial_sprd_putc);
+}
+
+static int __init serial_sprd_early_console_setup(
+				struct earlycon_device *device,
+				const char *opt)
+{
+	if (!device->port.membase)
+		return -ENODEV;
+
+	device->con->write = serial_sprd_early_write;
+	return 0;
+}
+EARLYCON_DECLARE(serial_sprd, serial_sprd_early_console_setup);
+OF_EARLYCON_DECLARE(serial_sprd, "sprd,serial",
+		    serial_sprd_early_console_setup);
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 6/6] Documentation: Add entry for Spreadtrum's Shark64 SoC
  2014-09-29 11:48 [PATCH 0/6] Add Spreadtrum Shark64 SoC support zhang.lyra-Re5JQEeQqe8AvxtiuMwx3w
                   ` (4 preceding siblings ...)
  2014-09-29 11:48 ` [PATCH 5/6] tty/serial: Add Spreadtrum's serial earlycon zhang.lyra
@ 2014-09-29 11:48 ` zhang.lyra
  5 siblings, 0 replies; 13+ messages in thread
From: zhang.lyra @ 2014-09-29 11:48 UTC (permalink / raw)
  To: catalin.marinas, gregkh, ijc+devicetree, jslaby, galak, broonie,
	mark.rutland, m-karicheri2, pawel.moll, artagnon, rrichter,
	robh+dt, will.deacon, orsonzhai, geng.ren, zhizhou.zhang
  Cc: devicetree, linux-arm-kernel, linux-kernel, chunyan.zhang

From: "chunyan.zhang" <chunyan.zhang@spreadtrum.com>

Adds a devicetree binding documentation for Spreadtrum's Shark64 SoC.

Signed-off-by: chunyan.zhang <chunyan.zhang@spreadtrum.com>
---
 Documentation/devicetree/bindings/arm/sprd.txt |    6 ++++++
 1 file changed, 6 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/sprd.txt

diff --git a/Documentation/devicetree/bindings/arm/sprd.txt b/Documentation/devicetree/bindings/arm/sprd.txt
new file mode 100644
index 0000000..b6dc143
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/sprd.txt
@@ -0,0 +1,6 @@
+Spreadtrum Platforms Device Tree Bindings
+----------------------------------------------------
+
+Shark64 Board
+Required root node properties:
+        - compatible = "sprd,shark64";
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 1/6] Documentation: DT: Add bindings for Spreadtrum serial
  2014-09-29 12:04 [PATCH 0/6] Add Spreadtrum Shark64 SoC support zhang.lyra-Re5JQEeQqe8AvxtiuMwx3w
@ 2014-09-29 12:04 ` zhang.lyra
  2014-09-29 13:39   ` Arnd Bergmann
       [not found]   ` <1411992293-7729-2-git-send-email-zhang.lyra-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 2 replies; 13+ messages in thread
From: zhang.lyra @ 2014-09-29 12:04 UTC (permalink / raw)
  To: catalin.marinas, gregkh, ijc+devicetree, jslaby, galak, broonie,
	mark.rutland, m-karicheri2, pawel.moll, artagnon, rrichter,
	robh+dt, will.deacon, orsonzhai, geng.ren, zhizhou.zhang
  Cc: devicetree, linux-arm-kernel, linux-kernel, chunyan.zhang

From: "chunyan.zhang" <chunyan.zhang@spreadtrum.com>

Adds the device-tree documentation for Spreadtrum's serial.

Signed-off-by: chunyan.zhang <chunyan.zhang@spreadtrum.com>
---
 .../devicetree/bindings/serial/of-serial.txt       |    1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/serial/of-serial.txt b/Documentation/devicetree/bindings/serial/of-serial.txt
index 7705477..a0bb1d1 100644
--- a/Documentation/devicetree/bindings/serial/of-serial.txt
+++ b/Documentation/devicetree/bindings/serial/of-serial.txt
@@ -14,6 +14,7 @@ Required properties:
 	- "altr,16550-FIFO32"
 	- "altr,16550-FIFO64"
 	- "altr,16550-FIFO128"
+	- "sprd,serial"
 	- "serial" if the port type is unknown.
 - reg : offset and length of the register set for the device.
 - interrupts : should contain uart interrupt.
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH 1/6] Documentation: DT: Add bindings for Spreadtrum serial
  2014-09-29 12:04 ` [PATCH 1/6] Documentation: DT: Add bindings for Spreadtrum serial zhang.lyra
@ 2014-09-29 13:39   ` Arnd Bergmann
       [not found]   ` <1411992293-7729-2-git-send-email-zhang.lyra-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  1 sibling, 0 replies; 13+ messages in thread
From: Arnd Bergmann @ 2014-09-29 13:39 UTC (permalink / raw)
  To: zhang.lyra
  Cc: catalin.marinas, gregkh, ijc+devicetree, jslaby, galak, broonie,
	mark.rutland, m-karicheri2, pawel.moll, artagnon, rrichter,
	robh+dt, will.deacon, orsonzhai, geng.ren, zhizhou.zhang,
	devicetree, linux-arm-kernel, linux-kernel, chunyan.zhang

On Monday 29 September 2014 20:04:48 zhang.lyra@gmail.com wrote:
> diff --git a/Documentation/devicetree/bindings/serial/of-serial.txt b/Documentation/devicetree/bindings/serial/of-serial.txt
> index 7705477..a0bb1d1 100644
> --- a/Documentation/devicetree/bindings/serial/of-serial.txt
> +++ b/Documentation/devicetree/bindings/serial/of-serial.txt
> @@ -14,6 +14,7 @@ Required properties:
>         - "altr,16550-FIFO32"
>         - "altr,16550-FIFO64"
>         - "altr,16550-FIFO128"
> +       - "sprd,serial"
>         - "serial" if the port type is unknown.
>  - reg : offset and length of the register set for the device.
>  - interrupts : should contain uart interrupt.
> 

This file is really only for 8250 compatible UART implementations, please
add a new file with a proper binding for your serial port. It would be
nice if you could rename this file to 8250.txt to avoid confusing the
next person.

Please also add the "sprd" prefix to
Documentation/devicetree/bindings/vendor-prefixes.txt

	Arnd

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 3/6] arm64: dts/Makefile: Add support for Spreadtrum's Shark64 SoC.
  2014-09-29 11:48 ` [PATCH 3/6] arm64: dts/Makefile: Add " zhang.lyra
@ 2014-09-29 14:46   ` Andreas Färber
  0 siblings, 0 replies; 13+ messages in thread
From: Andreas Färber @ 2014-09-29 14:46 UTC (permalink / raw)
  To: zhang.lyra
  Cc: catalin.marinas, gregkh, ijc+devicetree, jslaby, galak, broonie,
	mark.rutland, m-karicheri2, pawel.moll, artagnon, rrichter,
	robh+dt, will.deacon, orsonzhai, geng.ren, zhizhou.zhang,
	devicetree, linux-kernel, linux-arm-kernel

Hi,

Am 29.09.2014 um 13:48 schrieb zhang.lyra@gmail.com:
> From: "zhizhou.zhang" <zhizhou.zhang@spreadtrum.com>
> 
> Adds build support for Spreadtrum's Shark64 SoC in arm64 dts Makefile.
> 
> Signed-off-by: zhizhou.zhang <zhizhou.zhang@spreadtrum.com>
> Signed-off-by: chunyan.zhang <chunyan.zhang@spreadtrum.com>
> ---
>  arch/arm64/boot/dts/Makefile |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm64/boot/dts/Makefile b/arch/arm64/boot/dts/Makefile
> index c52bdb0..7fdb9df 100644
> --- a/arch/arm64/boot/dts/Makefile
> +++ b/arch/arm64/boot/dts/Makefile
> @@ -1,5 +1,6 @@
>  dtb-$(CONFIG_ARCH_VEXPRESS) += rtsm_ve-aemv8a.dtb foundation-v8.dtb
>  dtb-$(CONFIG_ARCH_XGENE) += apm-mustang.dtb
> +dtb-$(CONFIG_ARCH_SHARK64) += sprd_shark64.dtb
>  
>  targets += dtbs
>  targets += $(dtb-y)

This patch seems so trivial that you could just squash it into 2/6
(adding the .dts file).

Also, it looks to me as if the ordering is alphabetical, so SHARK should
probably go somewhere before VEXPRESS, not after XGENE.

Regards,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/6] arm64: Add DTS support for Spreadtrum's Shark64 SoC
       [not found]   ` <1411991314-6636-3-git-send-email-zhang.lyra-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2014-09-29 14:55     ` Andreas Färber
  0 siblings, 0 replies; 13+ messages in thread
From: Andreas Färber @ 2014-09-29 14:55 UTC (permalink / raw)
  To: zhang.lyra-Re5JQEeQqe8AvxtiuMwx3w
  Cc: catalin.marinas-5wv7dgnIgG8,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
	ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg, jslaby-AlSwsSmVLrQ,
	galak-sgV2jX0FEOL9JmXXK+q4OQ, broonie-QSEj5FYQhm4dnm+yROfE0A,
	mark.rutland-5wv7dgnIgG8, m-karicheri2-l0cyMroinI0,
	pawel.moll-5wv7dgnIgG8, artagnon-Re5JQEeQqe8AvxtiuMwx3w,
	rrichter-YGCgFSpz5w/QT0dZR+AlfA, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	will.deacon-5wv7dgnIgG8, orsonzhai-Re5JQEeQqe8AvxtiuMwx3w,
	geng.ren-lxIno14LUO0EEoCn2XhGlw,
	zhizhou.zhang-lxIno14LUO0EEoCn2XhGlw,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Hi,

Am 29.09.2014 um 13:48 schrieb zhang.lyra-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org:
> From: "zhizhou.zhang" <zhizhou.zhang-lxIno14LUO0EEoCn2XhGlw@public.gmane.org>
> 
> Adds the device tree support for Spreadtrum Shark64 SoC based on ARMv8 architecture.
> 
> Signed-off-by: zhizhou.zhang <zhizhou.zhang-lxIno14LUO0EEoCn2XhGlw@public.gmane.org>
> Signed-off-by: chunyan.zhang <chunyan.zhang-lxIno14LUO0EEoCn2XhGlw@public.gmane.org>
> ---
>  arch/arm64/boot/dts/sprd_shark64.dts |  110 ++++++++++++++++++++++++++++++++++
>  1 file changed, 110 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/sprd_shark64.dts
> 
> diff --git a/arch/arm64/boot/dts/sprd_shark64.dts b/arch/arm64/boot/dts/sprd_shark64.dts
> new file mode 100644
> index 0000000..537cd6d
> --- /dev/null
> +++ b/arch/arm64/boot/dts/sprd_shark64.dts
> @@ -0,0 +1,110 @@
> +/*
> + * dts file for Spreadtrum(sprd) Shark64 SOC
> + *
> + * Copyright (C) 2014,  Spreadtrum Communications Inc.
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation; either version 2 of
> + * the License, or (at your option) any later version.
> + */
> +
> +/dts-v1/;
> +
> +/memreserve/ 0x80000000 0x00010000;
> +
> +/ {
> +	model = "shark64 Board";

The commit message says SoC but here it says Board. Usually the SoC goes
into a .dtsi file that can then be reused for multiple boards (.dts).
Even if you only have one board for now, this distinction makes sense.

You can use status = "disabled"; to prepare nodes in the .dtsi and then
override the ones used via status = "okay"; in the .dts file. UARTs are
a typical example where you will see this pattern used.

> +	compatible = "sprd,shark64";
> +	interrupt-parent = <&gic>;
> +	#address-cells = <2>;
> +	#size-cells = <2>;
> +
> +	chosen {
> +		bootargs = "earlycon=serial_sprd,0x70000000";
> +      };

Some spaces snuck into this line. ;)

Cheers,
Andreas

> +
> +	cpus {
> +		#address-cells = <2>;
> +		#size-cells = <0>;
> +
> +		cpu@0 {
> +			device_type = "cpu";
> +			compatible = "arm,armv8";
> +			reg = <0x0 0x0>;
> +			enable-method = "spin-table";
> +			cpu-release-addr = <0x0 0x8000fff8>;
> +		};
> +		cpu@1 {
> +			device_type = "cpu";
> +			compatible = "arm,armv8";
> +			reg = <0x0 0x1>;
> +			enable-method = "spin-table";
> +			cpu-release-addr = <0x0 0x8000fff8>;
> +		};
> +		cpu@2 {
> +			device_type = "cpu";
> +			compatible = "arm,armv8";
> +			reg = <0x0 0x2>;
> +			enable-method = "spin-table";
> +			cpu-release-addr = <0x0 0x8000fff8>;
> +		};
> +		cpu@3 {
> +			device_type = "cpu";
> +			compatible = "arm,armv8";
> +			reg = <0x0 0x3>;
> +			enable-method = "spin-table";
> +			cpu-release-addr = <0x0 0x8000fff8>;
> +		};
> +	};
> +
> +	memory@80000000 {
> +		device_type = "memory";
> +		reg = <0 0x80000000 0 0x20000000>;
> +	};
> +
> +	aliases {
> +		serial0 = &uart0;
> +		serial1 = &uart1;
> +	};
> +
> +	gic: interrupt-controller@12001000 {
> +		compatible = "arm,cortex-a15-gic", "arm,cortex-a9-gic";
> +		#interrupt-cells = <3>;
> +		#address-cells = <0>;
> +		interrupt-controller;
> +		reg = <0 0x12001000 0 0x1000>,
> +		      <0 0x12002000 0 0x1000>;
> +	};
> +
> +	intc:interrupt-controller@71400000 {
> +		compatible = "sprd,intc";
> +		#interrupt-cells = <0>;
> +		interrupt-controller;
> +		reg =	<0 0x71400000 0 0x1000>,
> +			<0 0x71500000 0 0x1000>,
> +			<0 0x71600000 0 0x1000>,
> +			<0 0x71700000 0 0x1000>;
> +	};
> +
> +	timer {
> +		compatible = "arm,armv8-timer";
> +		interrupts = <1 13 0xff01>,
> +			     <1 14 0xff01>,
> +			     <1 11 0xff01>,
> +			     <1 10 0xff01>;
> +		clock-frequency = <26000000>;
> +	};
> +
> +	uart0: uart@70000000 {
> +		compatible = "sprd,serial";
> +		reg = <0 0x70000000 0 0x100>;
> +		interrupts = <0 2 0xf04>;
> +	};
> +
> +	uart1: uart@70100000 {
> +		compatible = "sprd,serial";
> +		reg = <0 0x70100000 0 0x100>;
> +		interrupts = <0 3 0xf04>;
> +	};
> +};

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 1/6] Documentation: DT: Add bindings for Spreadtrum serial
       [not found]   ` <1411992293-7729-2-git-send-email-zhang.lyra-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2014-10-01 11:21     ` Mark Rutland
  2014-10-02 15:08       ` Orson Zhai
  0 siblings, 1 reply; 13+ messages in thread
From: Mark Rutland @ 2014-10-01 11:21 UTC (permalink / raw)
  To: zhang.lyra-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
  Cc: Catalin Marinas,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
	ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org,
	jslaby-AlSwsSmVLrQ@public.gmane.org,
	galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	broonie-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
	m-karicheri2-l0cyMroinI0@public.gmane.org, Pawel Moll,
	artagnon-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	rrichter-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, Will Deacon,
	orsonzhai-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	geng.ren-lxIno14LUO0EEoCn2XhGlw@public.gmane.org,
	zhizhou.zhang-lxIno14LUO0EEoCn2XhGlw@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" <linux-kern>

On Mon, Sep 29, 2014 at 01:04:48PM +0100, zhang.lyra-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:
> From: "chunyan.zhang" <chunyan.zhang-lxIno14LUO0EEoCn2XhGlw@public.gmane.org>
> 
> Adds the device-tree documentation for Spreadtrum's serial.
> 
> Signed-off-by: chunyan.zhang <chunyan.zhang-lxIno14LUO0EEoCn2XhGlw@public.gmane.org>
> ---
>  .../devicetree/bindings/serial/of-serial.txt       |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/serial/of-serial.txt b/Documentation/devicetree/bindings/serial/of-serial.txt
> index 7705477..a0bb1d1 100644
> --- a/Documentation/devicetree/bindings/serial/of-serial.txt
> +++ b/Documentation/devicetree/bindings/serial/of-serial.txt
> @@ -14,6 +14,7 @@ Required properties:
>  	- "altr,16550-FIFO32"
>  	- "altr,16550-FIFO64"
>  	- "altr,16550-FIFO128"
> +	- "sprd,serial"

Is there not a more specific name? I'd imagine you might build a
different uart in future.

I didn't spot "sprd" in vendor-prefixes.txt in mainline. Is there a
patch adding that?

Mark.

>  	- "serial" if the port type is unknown.
>  - reg : offset and length of the register set for the device.
>  - interrupts : should contain uart interrupt.
> -- 
> 1.7.9.5
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 1/6] Documentation: DT: Add bindings for Spreadtrum serial
  2014-10-01 11:21     ` Mark Rutland
@ 2014-10-02 15:08       ` Orson Zhai
  0 siblings, 0 replies; 13+ messages in thread
From: Orson Zhai @ 2014-10-02 15:08 UTC (permalink / raw)
  To: Mark Rutland, zhang.lyra-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
  Cc: Catalin Marinas,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
	ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org,
	jslaby-AlSwsSmVLrQ@public.gmane.org,
	galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	broonie-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
	m-karicheri2-l0cyMroinI0@public.gmane.org, Pawel Moll,
	artagnon-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	rrichter-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, Will Deacon,
	geng.ren-lxIno14LUO0EEoCn2XhGlw@public.gmane.org,
	zhizhou.zhang-lxIno14LUO0EEoCn2XhGlw@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	"chunyan.zhang" <chunyan>


On 2014年10月01日 19:21, Mark Rutland wrote:
>> diff --git a/Documentation/devicetree/bindings/serial/of-serial.txt b/Documentation/devicetree/bindings/serial/of-serial.txt
>> >index 7705477..a0bb1d1 100644
>> >--- a/Documentation/devicetree/bindings/serial/of-serial.txt
>> >+++ b/Documentation/devicetree/bindings/serial/of-serial.txt
>> >@@ -14,6 +14,7 @@ Required properties:
>> >  	- "altr,16550-FIFO32"
>> >  	- "altr,16550-FIFO64"
>> >  	- "altr,16550-FIFO128"
>> >+	- "sprd,serial"
> Is there not a more specific name? I'd imagine you might build a
> different uart in future.
AFAIK, sprd's uart is re-used the same ip core in ARM 32bit chip.
so it is neither 16550 or pl011 compatible.
>
> I didn't spot "sprd" in vendor-prefixes.txt in mainline. Is there a
> patch adding that?
sorry for missing it. we'll add it at patch V2.
thanks for reviewing! :)
>
> Mark.
>

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2014-10-02 15:08 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-29 11:48 [PATCH 0/6] Add Spreadtrum Shark64 SoC support zhang.lyra-Re5JQEeQqe8AvxtiuMwx3w
2014-09-29 11:48 ` [PATCH 1/6] Documentation: DT: Add bindings for Spreadtrum serial zhang.lyra
2014-09-29 11:48 ` [PATCH 2/6] arm64: Add DTS support for Spreadtrum's Shark64 SoC zhang.lyra
     [not found]   ` <1411991314-6636-3-git-send-email-zhang.lyra-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-09-29 14:55     ` Andreas Färber
2014-09-29 11:48 ` [PATCH 3/6] arm64: dts/Makefile: Add " zhang.lyra
2014-09-29 14:46   ` Andreas Färber
2014-09-29 11:48 ` [PATCH 4/6] arm64: Add support for Spreadtrum's Shark64 SoC in Kconfig and defconfig zhang.lyra
2014-09-29 11:48 ` [PATCH 5/6] tty/serial: Add Spreadtrum's serial earlycon zhang.lyra
2014-09-29 11:48 ` [PATCH 6/6] Documentation: Add entry for Spreadtrum's Shark64 SoC zhang.lyra
  -- strict thread matches above, loose matches on Subject: below --
2014-09-29 12:04 [PATCH 0/6] Add Spreadtrum Shark64 SoC support zhang.lyra-Re5JQEeQqe8AvxtiuMwx3w
2014-09-29 12:04 ` [PATCH 1/6] Documentation: DT: Add bindings for Spreadtrum serial zhang.lyra
2014-09-29 13:39   ` Arnd Bergmann
     [not found]   ` <1411992293-7729-2-git-send-email-zhang.lyra-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-10-01 11:21     ` Mark Rutland
2014-10-02 15:08       ` Orson Zhai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).