linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] Add Spreadtrum Shark64 SoC support
@ 2014-09-29 11:48 zhang.lyra at gmail.com
  2014-09-29 11:48 ` [PATCH 1/6] Documentation: DT: Add bindings for Spreadtrum serial zhang.lyra at gmail.com
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: zhang.lyra at gmail.com @ 2014-09-29 11:48 UTC (permalink / raw)
  To: linux-arm-kernel

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

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

^ 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 at gmail.com
@ 2014-09-29 11:48 ` zhang.lyra at gmail.com
  2014-09-29 11:48 ` [PATCH 2/6] arm64: Add DTS support for Spreadtrum's Shark64 SoC zhang.lyra at gmail.com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: zhang.lyra at gmail.com @ 2014-09-29 11:48 UTC (permalink / raw)
  To: linux-arm-kernel

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 at gmail.com
  2014-09-29 11:48 ` [PATCH 1/6] Documentation: DT: Add bindings for Spreadtrum serial zhang.lyra at gmail.com
@ 2014-09-29 11:48 ` zhang.lyra at gmail.com
  2014-09-29 14:55   ` Andreas Färber
  2014-09-29 11:48 ` [PATCH 3/6] arm64: dts/Makefile: Add " zhang.lyra at gmail.com
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 13+ messages in thread
From: zhang.lyra at gmail.com @ 2014-09-29 11:48 UTC (permalink / raw)
  To: linux-arm-kernel

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 at 0 {
+			device_type = "cpu";
+			compatible = "arm,armv8";
+			reg = <0x0 0x0>;
+			enable-method = "spin-table";
+			cpu-release-addr = <0x0 0x8000fff8>;
+		};
+		cpu at 1 {
+			device_type = "cpu";
+			compatible = "arm,armv8";
+			reg = <0x0 0x1>;
+			enable-method = "spin-table";
+			cpu-release-addr = <0x0 0x8000fff8>;
+		};
+		cpu at 2 {
+			device_type = "cpu";
+			compatible = "arm,armv8";
+			reg = <0x0 0x2>;
+			enable-method = "spin-table";
+			cpu-release-addr = <0x0 0x8000fff8>;
+		};
+		cpu at 3 {
+			device_type = "cpu";
+			compatible = "arm,armv8";
+			reg = <0x0 0x3>;
+			enable-method = "spin-table";
+			cpu-release-addr = <0x0 0x8000fff8>;
+		};
+	};
+
+	memory at 80000000 {
+		device_type = "memory";
+		reg = <0 0x80000000 0 0x20000000>;
+	};
+
+	aliases {
+		serial0 = &uart0;
+		serial1 = &uart1;
+	};
+
+	gic: interrupt-controller at 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 at 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 at 70000000 {
+		compatible = "sprd,serial";
+		reg = <0 0x70000000 0 0x100>;
+		interrupts = <0 2 0xf04>;
+	};
+
+	uart1: uart at 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 at gmail.com
  2014-09-29 11:48 ` [PATCH 1/6] Documentation: DT: Add bindings for Spreadtrum serial zhang.lyra at gmail.com
  2014-09-29 11:48 ` [PATCH 2/6] arm64: Add DTS support for Spreadtrum's Shark64 SoC zhang.lyra at gmail.com
@ 2014-09-29 11:48 ` zhang.lyra at gmail.com
  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 at gmail.com
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 13+ messages in thread
From: zhang.lyra at gmail.com @ 2014-09-29 11:48 UTC (permalink / raw)
  To: linux-arm-kernel

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 at gmail.com
                   ` (2 preceding siblings ...)
  2014-09-29 11:48 ` [PATCH 3/6] arm64: dts/Makefile: Add " zhang.lyra at gmail.com
@ 2014-09-29 11:48 ` zhang.lyra at gmail.com
  2014-09-29 11:48 ` [PATCH 5/6] tty/serial: Add Spreadtrum's serial earlycon zhang.lyra at gmail.com
  2014-09-29 11:48 ` [PATCH 6/6] Documentation: Add entry for Spreadtrum's Shark64 SoC zhang.lyra at gmail.com
  5 siblings, 0 replies; 13+ messages in thread
From: zhang.lyra at gmail.com @ 2014-09-29 11:48 UTC (permalink / raw)
  To: linux-arm-kernel

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 at gmail.com
                   ` (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 at gmail.com
@ 2014-09-29 11:48 ` zhang.lyra at gmail.com
  2014-09-29 11:48 ` [PATCH 6/6] Documentation: Add entry for Spreadtrum's Shark64 SoC zhang.lyra at gmail.com
  5 siblings, 0 replies; 13+ messages in thread
From: zhang.lyra at gmail.com @ 2014-09-29 11:48 UTC (permalink / raw)
  To: linux-arm-kernel

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 at gmail.com
                   ` (4 preceding siblings ...)
  2014-09-29 11:48 ` [PATCH 5/6] tty/serial: Add Spreadtrum's serial earlycon zhang.lyra at gmail.com
@ 2014-09-29 11:48 ` zhang.lyra at gmail.com
  5 siblings, 0 replies; 13+ messages in thread
From: zhang.lyra at gmail.com @ 2014-09-29 11:48 UTC (permalink / raw)
  To: linux-arm-kernel

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 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 at gmail.com
@ 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: linux-arm-kernel

Hi,

Am 29.09.2014 um 13:48 schrieb zhang.lyra at 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

* [PATCH 2/6] arm64: Add DTS support for Spreadtrum's Shark64 SoC
  2014-09-29 11:48 ` [PATCH 2/6] arm64: Add DTS support for Spreadtrum's Shark64 SoC zhang.lyra at gmail.com
@ 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: linux-arm-kernel

Hi,

Am 29.09.2014 um 13:48 schrieb zhang.lyra at gmail.com:
> 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";

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 at 0 {
> +			device_type = "cpu";
> +			compatible = "arm,armv8";
> +			reg = <0x0 0x0>;
> +			enable-method = "spin-table";
> +			cpu-release-addr = <0x0 0x8000fff8>;
> +		};
> +		cpu at 1 {
> +			device_type = "cpu";
> +			compatible = "arm,armv8";
> +			reg = <0x0 0x1>;
> +			enable-method = "spin-table";
> +			cpu-release-addr = <0x0 0x8000fff8>;
> +		};
> +		cpu at 2 {
> +			device_type = "cpu";
> +			compatible = "arm,armv8";
> +			reg = <0x0 0x2>;
> +			enable-method = "spin-table";
> +			cpu-release-addr = <0x0 0x8000fff8>;
> +		};
> +		cpu at 3 {
> +			device_type = "cpu";
> +			compatible = "arm,armv8";
> +			reg = <0x0 0x3>;
> +			enable-method = "spin-table";
> +			cpu-release-addr = <0x0 0x8000fff8>;
> +		};
> +	};
> +
> +	memory at 80000000 {
> +		device_type = "memory";
> +		reg = <0 0x80000000 0 0x20000000>;
> +	};
> +
> +	aliases {
> +		serial0 = &uart0;
> +		serial1 = &uart1;
> +	};
> +
> +	gic: interrupt-controller at 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 at 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 at 70000000 {
> +		compatible = "sprd,serial";
> +		reg = <0 0x70000000 0 0x100>;
> +		interrupts = <0 2 0xf04>;
> +	};
> +
> +	uart1: uart at 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

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

* [PATCH 6/6] Documentation: Add entry for Spreadtrum's Shark64 SoC
  2014-09-29 13:59   ` Arnd Bergmann
@ 2014-09-30 10:08     ` Lyra Zhang
  0 siblings, 0 replies; 13+ messages in thread
From: Lyra Zhang @ 2014-09-30 10:08 UTC (permalink / raw)
  To: linux-arm-kernel

Hi, Arnd

[use plain text pattern to send again]

Thank you very much for your review in detail so carefully. I'll
address these changes which you mentioned in this patch set in V2, but
the days from tomorrow to 10.7 are Chinese holidays, I'm going to send
PATCHv2 a few days later.

I'm also sorry that make you confused about my name, I'll solve this
problem in the next submit.

Thanks,
Chunyan

2014-09-29 21:59 GMT+08:00 Arnd Bergmann <arnd@arndb.de>:
> On Monday 29 September 2014 20:04:53 zhang.lyra at gmail.com wrote:
>> 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>
>
> One more thing: The email addresses look wrong, please use the form in
> which you normally write the names, such as
>
> Signed-off-by: Zhang Chunyan <chunyan.zhang@spreadtrum.com>
>
> You can set the user name that git will add using the
> 'git config --global user.name ...'.
>
> Also, I notice that the email from which the patch is sent does not
> match the last 'Signed-off-by' line. If Chunyan and Lyra are both
> your names, better pick one that you use for both the email and the
> signoff. If you are Lyra and are posting a patch from Chunyan, please
> add your own line below hers, like
>
> Signed-off-by: Zhang Chunyan <chunyan.zhang@spreadtrum.com>
> Signed-off-by: Zhang Lyra <zhang.lyra@gmail.com>
>
> so that you include everybody who was involved in sending the
> patch, but have your own list last.
>
>         Arnd

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

* [PATCH 6/6] Documentation: Add entry for Spreadtrum's Shark64 SoC
  2014-09-29 12:04 ` [PATCH 6/6] Documentation: Add entry for Spreadtrum's Shark64 SoC zhang.lyra at gmail.com
  2014-09-29 13:30   ` Arnd Bergmann
@ 2014-09-29 13:59   ` Arnd Bergmann
  2014-09-30 10:08     ` Lyra Zhang
  1 sibling, 1 reply; 13+ messages in thread
From: Arnd Bergmann @ 2014-09-29 13:59 UTC (permalink / raw)
  To: linux-arm-kernel

On Monday 29 September 2014 20:04:53 zhang.lyra at gmail.com wrote:
> 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>

One more thing: The email addresses look wrong, please use the form in
which you normally write the names, such as

Signed-off-by: Zhang Chunyan <chunyan.zhang@spreadtrum.com>

You can set the user name that git will add using the
'git config --global user.name ...'.

Also, I notice that the email from which the patch is sent does not
match the last 'Signed-off-by' line. If Chunyan and Lyra are both
your names, better pick one that you use for both the email and the
signoff. If you are Lyra and are posting a patch from Chunyan, please
add your own line below hers, like

Signed-off-by: Zhang Chunyan <chunyan.zhang@spreadtrum.com>
Signed-off-by: Zhang Lyra <zhang.lyra@gmail.com>

so that you include everybody who was involved in sending the
patch, but have your own list last.

	Arnd

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

* [PATCH 6/6] Documentation: Add entry for Spreadtrum's Shark64 SoC
  2014-09-29 12:04 ` [PATCH 6/6] Documentation: Add entry for Spreadtrum's Shark64 SoC zhang.lyra at gmail.com
@ 2014-09-29 13:30   ` Arnd Bergmann
  2014-09-29 13:59   ` Arnd Bergmann
  1 sibling, 0 replies; 13+ messages in thread
From: Arnd Bergmann @ 2014-09-29 13:30 UTC (permalink / raw)
  To: linux-arm-kernel

On Monday 29 September 2014 20:04:53 zhang.lyra at gmail.com wrote:
> 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";
> 

Is Shark a board or an SOC? The subject line of the patch and the contents
seem to disagree here.

It's generally better to have the exact SoC product numbers in here, e.g.
"sprd,sc1234", in case we have to apply fixups based on the SoC. You should
also have a board specific string in addition to the SoC-specific one.

	Arnd

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

* [PATCH 6/6] Documentation: Add entry for Spreadtrum's Shark64 SoC
  2014-09-29 12:04 [PATCH 0/6] Add Spreadtrum Shark64 SoC support zhang.lyra at gmail.com
@ 2014-09-29 12:04 ` zhang.lyra at gmail.com
  2014-09-29 13:30   ` Arnd Bergmann
  2014-09-29 13:59   ` Arnd Bergmann
  0 siblings, 2 replies; 13+ messages in thread
From: zhang.lyra at gmail.com @ 2014-09-29 12:04 UTC (permalink / raw)
  To: linux-arm-kernel

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

end of thread, other threads:[~2014-09-30 10: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 at gmail.com
2014-09-29 11:48 ` [PATCH 1/6] Documentation: DT: Add bindings for Spreadtrum serial zhang.lyra at gmail.com
2014-09-29 11:48 ` [PATCH 2/6] arm64: Add DTS support for Spreadtrum's Shark64 SoC zhang.lyra at gmail.com
2014-09-29 14:55   ` Andreas Färber
2014-09-29 11:48 ` [PATCH 3/6] arm64: dts/Makefile: Add " zhang.lyra at gmail.com
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 at gmail.com
2014-09-29 11:48 ` [PATCH 5/6] tty/serial: Add Spreadtrum's serial earlycon zhang.lyra at gmail.com
2014-09-29 11:48 ` [PATCH 6/6] Documentation: Add entry for Spreadtrum's Shark64 SoC zhang.lyra at gmail.com
2014-09-29 12:04 [PATCH 0/6] Add Spreadtrum Shark64 SoC support zhang.lyra at gmail.com
2014-09-29 12:04 ` [PATCH 6/6] Documentation: Add entry for Spreadtrum's Shark64 SoC zhang.lyra at gmail.com
2014-09-29 13:30   ` Arnd Bergmann
2014-09-29 13:59   ` Arnd Bergmann
2014-09-30 10:08     ` Lyra Zhang

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).