* [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; 16+ 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] 16+ 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; 16+ 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] 16+ 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; 16+ 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] 16+ messages in thread
[parent not found: <1411991314-6636-3-git-send-email-zhang.lyra-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* 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; 16+ 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] 16+ 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; 16+ 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] 16+ 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; 16+ 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] 16+ 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; 16+ 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] 16+ 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; 16+ 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] 16+ 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; 16+ 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] 16+ messages in thread
* [PATCH 0/6] Add Spreadtrum Shark64 SoC support @ 2014-09-29 12:04 zhang.lyra-Re5JQEeQqe8AvxtiuMwx3w 2014-09-29 12:04 ` [PATCH 2/6] arm64: Add DTS support for Spreadtrum's Shark64 SoC zhang.lyra 0 siblings, 1 reply; 16+ messages in thread From: zhang.lyra-Re5JQEeQqe8AvxtiuMwx3w @ 2014-09-29 12:04 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] 16+ messages in thread
* [PATCH 2/6] arm64: Add DTS support for Spreadtrum's Shark64 SoC 2014-09-29 12:04 [PATCH 0/6] Add Spreadtrum Shark64 SoC support zhang.lyra-Re5JQEeQqe8AvxtiuMwx3w @ 2014-09-29 12:04 ` zhang.lyra [not found] ` <1411992293-7729-3-git-send-email-zhang.lyra-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 0 siblings, 1 reply; 16+ 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: "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] 16+ messages in thread
[parent not found: <1411992293-7729-3-git-send-email-zhang.lyra-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH 2/6] arm64: Add DTS support for Spreadtrum's Shark64 SoC [not found] ` <1411992293-7729-3-git-send-email-zhang.lyra-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2014-09-29 13:47 ` Arnd Bergmann 2014-10-01 11:17 ` Catalin Marinas 2014-10-15 3:17 ` Lyra Zhang 2014-10-01 11:23 ` Mark Rutland 1 sibling, 2 replies; 16+ messages in thread From: Arnd Bergmann @ 2014-09-29 13:47 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-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-kernel-u79uwXL29TY76Z2rM5mHXA, chunyan.zhang On Monday 29 September 2014 20:04:49 zhang.lyra-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote: > + > +/memreserve/ 0x80000000 0x00010000; Maybe add a comment explaining why it is reserved? > + chosen { > + bootargs = "earlycon=serial_sprd,0x70000000"; > + }; Just remove this for now, the command line should really be set by the boot loader, not hardcoded in the dts file. IIRC, the earlycon=... syntax is not recommended on DT based systems, better use the "stdout-path" syntax instead. > + 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>; > + }; New platforms should avoid using "spin-table" method. Please change the boot loader to implement PSCI if you can. > + memory@80000000 { > + device_type = "memory"; > + reg = <0 0x80000000 0 0x20000000>; > + }; > + > + aliases { > + serial0 = &uart0; > + serial1 = &uart1; > + }; These two belong into a board-specific file. I'd suggest renaming this file to sprd_shark64.dtsi (or whatever the SoC is called) and adding a .dts file that includes this and sets the aliases and memory node according to what the particular board has. > + 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>; > + }; This interrupt controller does not have a binding, so please add at least a documentation for the binding as well. The name should probably be more specific that this. Also, explain why you have an interrupt controller that has four memory regions but only one interrupt sink but no interrupt source. I assume this is a nested interrupt controller to which some internal peripherals are connected? > + 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>; > + }; Please rename these to serial@70000000. Like the interrupt controller, it would be good to have a more specific compatible string. You may want to add a status="disabled" property in both these nodes, and override them from the board.dts file for the ports that are actually available. Arnd -- 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] 16+ messages in thread
* Re: [PATCH 2/6] arm64: Add DTS support for Spreadtrum's Shark64 SoC 2014-09-29 13:47 ` Arnd Bergmann @ 2014-10-01 11:17 ` Catalin Marinas 2014-10-15 3:17 ` Lyra Zhang 1 sibling, 0 replies; 16+ messages in thread From: Catalin Marinas @ 2014-10-01 11:17 UTC (permalink / raw) To: Arnd Bergmann Cc: zhang.lyra@gmail.com, gregkh@linuxfoundation.org, ijc+devicetree@hellion.org.uk, jslaby@suse.cz, galak@codeaurora.org, broonie@linaro.org, Mark Rutland, m-karicheri2@ti.com, Pawel Moll, artagnon@gmail.com, rrichter@cavium.com, robh+dt@kernel.org, Will Deacon, orsonzhai@gmail.com, geng.ren@spreadtrum.com, zhizhou.zhang@spreadtrum.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org On Mon, Sep 29, 2014 at 02:47:47PM +0100, Arnd Bergmann wrote: > On Monday 29 September 2014 20:04:49 zhang.lyra@gmail.com wrote: > > + 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>; > > + }; > > New platforms should avoid using "spin-table" method. Please > change the boot loader to implement PSCI if you can. As usual, I strongly recommend PSCI here if the CPU supports EL3. It would solve the cpuidle kernel support as well with the generic cpuidle driver and the PSCI back-end. -- Catalin ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 2/6] arm64: Add DTS support for Spreadtrum's Shark64 SoC 2014-09-29 13:47 ` Arnd Bergmann 2014-10-01 11:17 ` Catalin Marinas @ 2014-10-15 3:17 ` Lyra Zhang 2014-10-20 19:00 ` Arnd Bergmann 1 sibling, 1 reply; 16+ messages in thread From: Lyra Zhang @ 2014-10-15 3:17 UTC (permalink / raw) To: Arnd Bergmann Cc: catalin.marinas-5wv7dgnIgG8, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg, jslaby-AlSwsSmVLrQ, Kumar Gala, Mark Brown, mark.rutland-5wv7dgnIgG8, m-karicheri2-l0cyMroinI0, pawel.moll-5wv7dgnIgG8, Ramkumar Ramachandra, rrichter-YGCgFSpz5w/QT0dZR+AlfA, robh+dt-DgEjT+Ai2ygdnm+yROfE0A, will.deacon-5wv7dgnIgG8, Orson Zhai, geng.ren-lxIno14LUO0EEoCn2XhGlw, zhizhou.zhang, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-kernel-u79uwXL29TY76Z2rM5mHXA, chunyan.zhang Hi, Arnd 2014-09-29 21:47 GMT+08:00 Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>: > On Monday 29 September 2014 20:04:49 zhang.lyra-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote: >> + >> +/memreserve/ 0x80000000 0x00010000; > > Maybe add a comment explaining why it is reserved? > >> + chosen { >> + bootargs = "earlycon=serial_sprd,0x70000000"; >> + }; > > Just remove this for now, the command line should really be set by the > boot loader, not hardcoded in the dts file. > > IIRC, the earlycon=... syntax is not recommended on DT based systems, > better use the "stdout-path" syntax instead. > I have tried to use "stdout-path" instead of "bootargs= "earlycon= ..." like below : / { ... chosen { stdout-path = "/serial@70000000"; }; uart0: serial@70000000 { status="okay"; }; ... }; But then there is nothing output information on serial console.(I have been testing in Fast Model) I saw the below code in init/main.c /* Check for early params. */ static int __init do_early_param(char *param, char *val, const char *unused) { const struct obs_kernel_param *p; for (p = __setup_start; p < __setup_end; p++) { if ((p->early && parameq(param, p->str)) || (strcmp(param, "console") == 0 && strcmp(p->str, "earlycon") == 0) ) { if (p->setup_func(val) != 0) pr_warn("Malformed early option '%s'\n", param); } } /* We accept everything at this stage. */ return 0; } And I saw a patch from Grant Likely, he had a comment in it : "If the devicetree specifies a serial port as a stdout device, then the kernel can use it as the default console if nothing else was selected on the command line. For any serial port that uses the uart_add_one_port() feature, the uart_add_one_port() has all the information needed to automatically enable the console device, which is what this patch does." So, I guess that the reason why I can't see any output information on console after using "stdout-path" instead of "earlycon" is that I haven't a driver of Spreadtrum's serial, and dose not use the uart_add_one_port() feature. I don't know is correct what I guess. Could you give me some suggestions to solve this problem? Thanks, Chunyan -- 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] 16+ messages in thread
* Re: [PATCH 2/6] arm64: Add DTS support for Spreadtrum's Shark64 SoC 2014-10-15 3:17 ` Lyra Zhang @ 2014-10-20 19:00 ` Arnd Bergmann 2014-10-21 1:28 ` Lyra Zhang 0 siblings, 1 reply; 16+ messages in thread From: Arnd Bergmann @ 2014-10-20 19:00 UTC (permalink / raw) To: Lyra Zhang Cc: catalin.marinas, gregkh, ijc+devicetree, jslaby, Kumar Gala, Mark Brown, mark.rutland, m-karicheri2, pawel.moll, Ramkumar Ramachandra, rrichter, robh+dt, will.deacon, Orson Zhai, geng.ren, zhizhou.zhang, devicetree, linux-arm-kernel, linux-kernel, chunyan.zhang On Wednesday 15 October 2014 11:17:07 Lyra Zhang wrote: > Hi, Arnd Hi Lyra, Sorry for the late reply, I've been away travelling and am just now catching up on email. Have you found a solution or do you still need help with this? Arnd > 2014-09-29 21:47 GMT+08:00 Arnd Bergmann <arnd@arndb.de>: > > On Monday 29 September 2014 20:04:49 zhang.lyra@gmail.com wrote: > >> + > >> +/memreserve/ 0x80000000 0x00010000; > > > > Maybe add a comment explaining why it is reserved? > > > >> + chosen { > >> + bootargs = "earlycon=serial_sprd,0x70000000"; > >> + }; > > > > Just remove this for now, the command line should really be set by the > > boot loader, not hardcoded in the dts file. > > > > IIRC, the earlycon=... syntax is not recommended on DT based systems, > > better use the "stdout-path" syntax instead. > > > > I have tried to use "stdout-path" instead of "bootargs= "earlycon= > ..." like below : > > / { > ... > > chosen { > stdout-path = "/serial@70000000"; > }; > > uart0: serial@70000000 { > status="okay"; > }; > ... > }; > > But then there is nothing output information on serial console.(I have > been testing in Fast Model) > > > I saw the below code in init/main.c > > /* Check for early params. */ > static int __init do_early_param(char *param, char *val, const char *unused) > { > const struct obs_kernel_param *p; > > for (p = __setup_start; p < __setup_end; p++) { > if ((p->early && parameq(param, p->str)) || > (strcmp(param, "console") == 0 && > strcmp(p->str, "earlycon") == 0) > ) { > if (p->setup_func(val) != 0) > pr_warn("Malformed early option '%s'\n", param); > } > } > /* We accept everything at this stage. */ > return 0; > } > > And I saw a patch from Grant Likely, he had a comment in it : > "If the devicetree specifies a serial port as a stdout device, then the > kernel can use it as the default console if nothing else was selected on > the command line. For any serial port that uses the uart_add_one_port() > feature, the uart_add_one_port() has all the information needed to > automatically enable the console device, which is what this patch does." > > So, I guess that the reason why I can't see any output information on > console after using "stdout-path" instead of "earlycon" is that I > haven't a driver of Spreadtrum's serial, and dose not use the > uart_add_one_port() feature. > > I don't know is correct what I guess. > > Could you give me some suggestions to solve this problem? > ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 2/6] arm64: Add DTS support for Spreadtrum's Shark64 SoC 2014-10-20 19:00 ` Arnd Bergmann @ 2014-10-21 1:28 ` Lyra Zhang 0 siblings, 0 replies; 16+ messages in thread From: Lyra Zhang @ 2014-10-21 1:28 UTC (permalink / raw) To: Arnd Bergmann Cc: Catalin Marinas, gregkh@linuxfoundation.org, ijc+devicetree@hellion.org.uk, jslaby@suse.cz, Kumar Gala, Mark Brown, Mark Rutland, m-karicheri2@ti.com, Pawel Moll, Ramkumar Ramachandra, rrichter@cavium.com, robh+dt@kernel.org, Will Deacon, Orson Zhai, geng.ren@spreadtrum.com, zhizhou.zhang, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Hi, Arnd This problem have been solved, and was submitted in v2. Thanks for your answer to the question(which Orson asked for me) about this on Freenode. Best regards, Lyra 2014-10-21 3:00 GMT+08:00 Arnd Bergmann <arnd@arndb.de>: > On Wednesday 15 October 2014 11:17:07 Lyra Zhang wrote: >> Hi, Arnd > > Hi Lyra, > > Sorry for the late reply, I've been away travelling and am just > now catching up on email. Have you found a solution or do > you still need help with this? > > Arnd > >> 2014-09-29 21:47 GMT+08:00 Arnd Bergmann <arnd@arndb.de>: >> > On Monday 29 September 2014 20:04:49 zhang.lyra@gmail.com wrote: >> >> + >> >> +/memreserve/ 0x80000000 0x00010000; >> > >> > Maybe add a comment explaining why it is reserved? >> > >> >> + chosen { >> >> + bootargs = "earlycon=serial_sprd,0x70000000"; >> >> + }; >> > >> > Just remove this for now, the command line should really be set by the >> > boot loader, not hardcoded in the dts file. >> > >> > IIRC, the earlycon=... syntax is not recommended on DT based systems, >> > better use the "stdout-path" syntax instead. >> > >> >> I have tried to use "stdout-path" instead of "bootargs= "earlycon= >> ..." like below : >> >> / { >> ... >> >> chosen { >> stdout-path = "/serial@70000000"; >> }; >> >> uart0: serial@70000000 { >> status="okay"; >> }; >> ... >> }; >> >> But then there is nothing output information on serial console.(I have >> been testing in Fast Model) >> >> >> I saw the below code in init/main.c >> >> /* Check for early params. */ >> static int __init do_early_param(char *param, char *val, const char *unused) >> { >> const struct obs_kernel_param *p; >> >> for (p = __setup_start; p < __setup_end; p++) { >> if ((p->early && parameq(param, p->str)) || >> (strcmp(param, "console") == 0 && >> strcmp(p->str, "earlycon") == 0) >> ) { >> if (p->setup_func(val) != 0) >> pr_warn("Malformed early option '%s'\n", param); >> } >> } >> /* We accept everything at this stage. */ >> return 0; >> } >> >> And I saw a patch from Grant Likely, he had a comment in it : >> "If the devicetree specifies a serial port as a stdout device, then the >> kernel can use it as the default console if nothing else was selected on >> the command line. For any serial port that uses the uart_add_one_port() >> feature, the uart_add_one_port() has all the information needed to >> automatically enable the console device, which is what this patch does." >> >> So, I guess that the reason why I can't see any output information on >> console after using "stdout-path" instead of "earlycon" is that I >> haven't a driver of Spreadtrum's serial, and dose not use the >> uart_add_one_port() feature. >> >> I don't know is correct what I guess. >> >> Could you give me some suggestions to solve this problem? >> > ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 2/6] arm64: Add DTS support for Spreadtrum's Shark64 SoC [not found] ` <1411992293-7729-3-git-send-email-zhang.lyra-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2014-09-29 13:47 ` Arnd Bergmann @ 2014-10-01 11:23 ` Mark Rutland 1 sibling, 0 replies; 16+ messages in thread From: Mark Rutland @ 2014-10-01 11:23 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:49PM +0100, zhang.lyra-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote: > 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; What is this protecting? Please add a comment. > + > +/ { > + model = "shark64 Board"; > + compatible = "sprd,shark64"; This feels like it would make more sense as an SoC dtsi to be included by various boards (which can override the model and compatible). > + interrupt-parent = <&gic>; > + #address-cells = <2>; > + #size-cells = <2>; > + > + chosen { > + bootargs = "earlycon=serial_sprd,0x70000000"; Can we not use stdout-path for this? > + }; > + > + cpus { > + #address-cells = <2>; > + #size-cells = <0>; > + > + cpu@0 { > + device_type = "cpu"; > + compatible = "arm,armv8"; Can we have the particular CPU name, please? > + reg = <0x0 0x0>; > + enable-method = "spin-table"; > + cpu-release-addr = <0x0 0x8000fff8>; No PSCI? What are you using for your bootloader/firmware? If you must use spin-table, please give each CPU a unique release address. > + }; > + 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; > + }; Could you move this up above chosen, please? > + > + 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>; No GICH or GICV? Which exception level do your CPUs boot in? I would strongly recommend booting at EL2. That gives the kernel more flexibility to perform fixups (e.g. zeroing CNTVOFF), and requires less work in your bootloader. > + }; > + > + 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>; > + }; This binding doesn't exist in mainline, and isn't added by this series. I'm especially confused by the #interrupt-cells = <0>. What exactly is this, and how do you intend to use it? > + > + timer { > + compatible = "arm,armv8-timer"; > + interrupts = <1 13 0xff01>, > + <1 14 0xff01>, > + <1 11 0xff01>, > + <1 10 0xff01>; > + clock-frequency = <26000000>; Please have your FW or bootloader program CNTFRQ_EL1 on each CPU, and get rid of the clock-frequency property here. > + }; > + > + uart0: uart@70000000 { > + compatible = "sprd,serial"; > + reg = <0 0x70000000 0 0x100>; > + interrupts = <0 2 0xf04>; > + }; No clocks/dmas/etc necessary? Mark. > + > + uart1: uart@70100000 { > + compatible = "sprd,serial"; > + reg = <0 0x70100000 0 0x100>; > + interrupts = <0 3 0xf04>; > + }; > +}; > -- > 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] 16+ messages in thread
end of thread, other threads:[~2014-10-21 1:28 UTC | newest] Thread overview: 16+ 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 2/6] arm64: Add DTS support for Spreadtrum's Shark64 SoC zhang.lyra [not found] ` <1411992293-7729-3-git-send-email-zhang.lyra-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2014-09-29 13:47 ` Arnd Bergmann 2014-10-01 11:17 ` Catalin Marinas 2014-10-15 3:17 ` Lyra Zhang 2014-10-20 19:00 ` Arnd Bergmann 2014-10-21 1:28 ` Lyra Zhang 2014-10-01 11:23 ` Mark Rutland
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).