All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] add basic SoC support for HiSilicon Hi3516CV300
@ 2016-10-17 12:07 ` Pan Wen
  0 siblings, 0 replies; 68+ messages in thread
From: Pan Wen @ 2016-10-17 12:07 UTC (permalink / raw)
  To: mturquette, sboyd, robh+dt, mark.rutland, linux, xuwei5
  Cc: linux-clk, devicetree, linux-kernel, linux-arm-kernel,
	howell.yang, xuejiancheng, jalen.hsu, lvkuanliang, suwenping,
	raojun, kevin.lixu, wenpan

Hi3516CV300 is a SoC designed for HD IP camera. It has an integrated ISP and
H.265 video compression encoder. This patch set is mainly used to add basic SoC
support for Hi3516CV300. It includes crg driver and basic dts files.

Pan Wen (3):
  arm: hisi: add ARCH_MULTI_V5 support
  clk: hisilicon: add CRG driver for Hi3516CV300 SoC
  dts: hisi: add dts files for Hi3516CV300 demo board

 .../devicetree/bindings/clock/hisi-crg.txt         |  50 +++
 arch/arm/boot/dts/Makefile                         |   1 +
 arch/arm/boot/dts/hi3516cv300-demb.dts             | 148 ++++++++
 arch/arm/boot/dts/hi3516cv300.dtsi                 | 397 +++++++++++++++++++++
 arch/arm/mach-hisi/Kconfig                         |  10 +-
 drivers/clk/hisilicon/Kconfig                      |   8 +
 drivers/clk/hisilicon/Makefile                     |   1 +
 drivers/clk/hisilicon/crg-hi3516cv300.c            | 330 +++++++++++++++++
 drivers/clk/hisilicon/crg.h                        |  34 ++
 include/dt-bindings/clock/hi3516cv300-clock.h      |  48 +++
 10 files changed, 1021 insertions(+), 6 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/clock/hisi-crg.txt
 create mode 100644 arch/arm/boot/dts/hi3516cv300-demb.dts
 create mode 100644 arch/arm/boot/dts/hi3516cv300.dtsi
 create mode 100644 drivers/clk/hisilicon/crg-hi3516cv300.c
 create mode 100644 drivers/clk/hisilicon/crg.h
 create mode 100644 include/dt-bindings/clock/hi3516cv300-clock.h

-- 
2.9.3

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

* [PATCH 0/3] add basic SoC support for HiSilicon Hi3516CV300
@ 2016-10-17 12:07 ` Pan Wen
  0 siblings, 0 replies; 68+ messages in thread
From: Pan Wen @ 2016-10-17 12:07 UTC (permalink / raw)
  To: mturquette-rdvid1DuHRBWk0Htik3J/w, sboyd-sgV2jX0FEOL9JmXXK+q4OQ,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A, mark.rutland-5wv7dgnIgG8,
	linux-I+IVW8TIWO2tmTQ+vhA3Yw, xuwei5-C8/M+/jPZTeaMJb+Lgu22Q
  Cc: linux-clk-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	howell.yang-C8/M+/jPZTeaMJb+Lgu22Q,
	xuejiancheng-C8/M+/jPZTeaMJb+Lgu22Q,
	jalen.hsu-C8/M+/jPZTeaMJb+Lgu22Q,
	lvkuanliang-C8/M+/jPZTeaMJb+Lgu22Q,
	suwenping-C8/M+/jPZTeaMJb+Lgu22Q, raojun-C8/M+/jPZTeaMJb+Lgu22Q,
	kevin.lixu-C8/M+/jPZTeaMJb+Lgu22Q, wenpan-C8/M+/jPZTeaMJb+Lgu22Q

Hi3516CV300 is a SoC designed for HD IP camera. It has an integrated ISP and
H.265 video compression encoder. This patch set is mainly used to add basic SoC
support for Hi3516CV300. It includes crg driver and basic dts files.

Pan Wen (3):
  arm: hisi: add ARCH_MULTI_V5 support
  clk: hisilicon: add CRG driver for Hi3516CV300 SoC
  dts: hisi: add dts files for Hi3516CV300 demo board

 .../devicetree/bindings/clock/hisi-crg.txt         |  50 +++
 arch/arm/boot/dts/Makefile                         |   1 +
 arch/arm/boot/dts/hi3516cv300-demb.dts             | 148 ++++++++
 arch/arm/boot/dts/hi3516cv300.dtsi                 | 397 +++++++++++++++++++++
 arch/arm/mach-hisi/Kconfig                         |  10 +-
 drivers/clk/hisilicon/Kconfig                      |   8 +
 drivers/clk/hisilicon/Makefile                     |   1 +
 drivers/clk/hisilicon/crg-hi3516cv300.c            | 330 +++++++++++++++++
 drivers/clk/hisilicon/crg.h                        |  34 ++
 include/dt-bindings/clock/hi3516cv300-clock.h      |  48 +++
 10 files changed, 1021 insertions(+), 6 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/clock/hisi-crg.txt
 create mode 100644 arch/arm/boot/dts/hi3516cv300-demb.dts
 create mode 100644 arch/arm/boot/dts/hi3516cv300.dtsi
 create mode 100644 drivers/clk/hisilicon/crg-hi3516cv300.c
 create mode 100644 drivers/clk/hisilicon/crg.h
 create mode 100644 include/dt-bindings/clock/hi3516cv300-clock.h

-- 
2.9.3

--
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] 68+ messages in thread

* [PATCH 0/3] add basic SoC support for HiSilicon Hi3516CV300
@ 2016-10-17 12:07 ` Pan Wen
  0 siblings, 0 replies; 68+ messages in thread
From: Pan Wen @ 2016-10-17 12:07 UTC (permalink / raw)
  To: linux-arm-kernel

Hi3516CV300 is a SoC designed for HD IP camera. It has an integrated ISP and
H.265 video compression encoder. This patch set is mainly used to add basic SoC
support for Hi3516CV300. It includes crg driver and basic dts files.

Pan Wen (3):
  arm: hisi: add ARCH_MULTI_V5 support
  clk: hisilicon: add CRG driver for Hi3516CV300 SoC
  dts: hisi: add dts files for Hi3516CV300 demo board

 .../devicetree/bindings/clock/hisi-crg.txt         |  50 +++
 arch/arm/boot/dts/Makefile                         |   1 +
 arch/arm/boot/dts/hi3516cv300-demb.dts             | 148 ++++++++
 arch/arm/boot/dts/hi3516cv300.dtsi                 | 397 +++++++++++++++++++++
 arch/arm/mach-hisi/Kconfig                         |  10 +-
 drivers/clk/hisilicon/Kconfig                      |   8 +
 drivers/clk/hisilicon/Makefile                     |   1 +
 drivers/clk/hisilicon/crg-hi3516cv300.c            | 330 +++++++++++++++++
 drivers/clk/hisilicon/crg.h                        |  34 ++
 include/dt-bindings/clock/hi3516cv300-clock.h      |  48 +++
 10 files changed, 1021 insertions(+), 6 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/clock/hisi-crg.txt
 create mode 100644 arch/arm/boot/dts/hi3516cv300-demb.dts
 create mode 100644 arch/arm/boot/dts/hi3516cv300.dtsi
 create mode 100644 drivers/clk/hisilicon/crg-hi3516cv300.c
 create mode 100644 drivers/clk/hisilicon/crg.h
 create mode 100644 include/dt-bindings/clock/hi3516cv300-clock.h

-- 
2.9.3

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

* [PATCH 1/3] arm: hisi: add ARCH_MULTI_V5 support
  2016-10-17 12:07 ` Pan Wen
  (?)
@ 2016-10-17 12:07   ` Pan Wen
  -1 siblings, 0 replies; 68+ messages in thread
From: Pan Wen @ 2016-10-17 12:07 UTC (permalink / raw)
  To: mturquette, sboyd, robh+dt, mark.rutland, linux, xuwei5
  Cc: linux-clk, devicetree, linux-kernel, linux-arm-kernel,
	howell.yang, xuejiancheng, jalen.hsu, lvkuanliang, suwenping,
	raojun, kevin.lixu, wenpan

Add support for some HiSilicon SoCs which depend on ARCH_MULTI_V5.

Signed-off-by: Pan Wen <wenpan@hisilicon.com>
---
 arch/arm/mach-hisi/Kconfig | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-hisi/Kconfig b/arch/arm/mach-hisi/Kconfig
index a3b091a..03d8379 100644
--- a/arch/arm/mach-hisi/Kconfig
+++ b/arch/arm/mach-hisi/Kconfig
@@ -1,12 +1,14 @@
 config ARCH_HISI
 	bool "Hisilicon SoC Support"
-	depends on ARCH_MULTI_V7
 	select ARM_AMBA
-	select ARM_GIC
+	select ARM_GIC if ARCH_MULTI_V7
+	select ARM_VIC if ARCH_MULTI_V5
 	select ARM_TIMER_SP804
 	select POWER_RESET
 	select POWER_RESET_HISI
 	select POWER_SUPPLY
+	select PINCTRL
+	select PINCTRL_SINGLE
 
 if ARCH_HISI
 
@@ -18,8 +20,6 @@ config ARCH_HI3xxx
 	select CACHE_L2X0
 	select HAVE_ARM_SCU if SMP
 	select HAVE_ARM_TWD if SMP
-	select PINCTRL
-	select PINCTRL_SINGLE
 	help
 	  Support for Hisilicon Hi36xx SoC family
 
@@ -48,8 +48,6 @@ config ARCH_HIX5HD2
 	select CACHE_L2X0
 	select HAVE_ARM_SCU if SMP
 	select HAVE_ARM_TWD if SMP
-	select PINCTRL
-	select PINCTRL_SINGLE
 	help
 	  Support for Hisilicon HIX5HD2 SoC family
 endmenu
-- 
2.9.3

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

* [PATCH 1/3] arm: hisi: add ARCH_MULTI_V5 support
@ 2016-10-17 12:07   ` Pan Wen
  0 siblings, 0 replies; 68+ messages in thread
From: Pan Wen @ 2016-10-17 12:07 UTC (permalink / raw)
  To: mturquette, sboyd, robh+dt, mark.rutland, linux, xuwei5
  Cc: linux-clk, devicetree, linux-kernel, linux-arm-kernel,
	howell.yang, xuejiancheng, jalen.hsu, lvkuanliang, suwenping,
	raojun, kevin.lixu, wenpan

Add support for some HiSilicon SoCs which depend on ARCH_MULTI_V5.

Signed-off-by: Pan Wen <wenpan@hisilicon.com>
---
 arch/arm/mach-hisi/Kconfig | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-hisi/Kconfig b/arch/arm/mach-hisi/Kconfig
index a3b091a..03d8379 100644
--- a/arch/arm/mach-hisi/Kconfig
+++ b/arch/arm/mach-hisi/Kconfig
@@ -1,12 +1,14 @@
 config ARCH_HISI
 	bool "Hisilicon SoC Support"
-	depends on ARCH_MULTI_V7
 	select ARM_AMBA
-	select ARM_GIC
+	select ARM_GIC if ARCH_MULTI_V7
+	select ARM_VIC if ARCH_MULTI_V5
 	select ARM_TIMER_SP804
 	select POWER_RESET
 	select POWER_RESET_HISI
 	select POWER_SUPPLY
+	select PINCTRL
+	select PINCTRL_SINGLE
 
 if ARCH_HISI
 
@@ -18,8 +20,6 @@ config ARCH_HI3xxx
 	select CACHE_L2X0
 	select HAVE_ARM_SCU if SMP
 	select HAVE_ARM_TWD if SMP
-	select PINCTRL
-	select PINCTRL_SINGLE
 	help
 	  Support for Hisilicon Hi36xx SoC family
 
@@ -48,8 +48,6 @@ config ARCH_HIX5HD2
 	select CACHE_L2X0
 	select HAVE_ARM_SCU if SMP
 	select HAVE_ARM_TWD if SMP
-	select PINCTRL
-	select PINCTRL_SINGLE
 	help
 	  Support for Hisilicon HIX5HD2 SoC family
 endmenu
-- 
2.9.3


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

* [PATCH 1/3] arm: hisi: add ARCH_MULTI_V5 support
@ 2016-10-17 12:07   ` Pan Wen
  0 siblings, 0 replies; 68+ messages in thread
From: Pan Wen @ 2016-10-17 12:07 UTC (permalink / raw)
  To: linux-arm-kernel

Add support for some HiSilicon SoCs which depend on ARCH_MULTI_V5.

Signed-off-by: Pan Wen <wenpan@hisilicon.com>
---
 arch/arm/mach-hisi/Kconfig | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-hisi/Kconfig b/arch/arm/mach-hisi/Kconfig
index a3b091a..03d8379 100644
--- a/arch/arm/mach-hisi/Kconfig
+++ b/arch/arm/mach-hisi/Kconfig
@@ -1,12 +1,14 @@
 config ARCH_HISI
 	bool "Hisilicon SoC Support"
-	depends on ARCH_MULTI_V7
 	select ARM_AMBA
-	select ARM_GIC
+	select ARM_GIC if ARCH_MULTI_V7
+	select ARM_VIC if ARCH_MULTI_V5
 	select ARM_TIMER_SP804
 	select POWER_RESET
 	select POWER_RESET_HISI
 	select POWER_SUPPLY
+	select PINCTRL
+	select PINCTRL_SINGLE
 
 if ARCH_HISI
 
@@ -18,8 +20,6 @@ config ARCH_HI3xxx
 	select CACHE_L2X0
 	select HAVE_ARM_SCU if SMP
 	select HAVE_ARM_TWD if SMP
-	select PINCTRL
-	select PINCTRL_SINGLE
 	help
 	  Support for Hisilicon Hi36xx SoC family
 
@@ -48,8 +48,6 @@ config ARCH_HIX5HD2
 	select CACHE_L2X0
 	select HAVE_ARM_SCU if SMP
 	select HAVE_ARM_TWD if SMP
-	select PINCTRL
-	select PINCTRL_SINGLE
 	help
 	  Support for Hisilicon HIX5HD2 SoC family
 endmenu
-- 
2.9.3

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

* [PATCH 2/3] clk: hisilicon: add CRG driver for Hi3516CV300 SoC
  2016-10-17 12:07 ` Pan Wen
  (?)
@ 2016-10-17 12:07   ` Pan Wen
  -1 siblings, 0 replies; 68+ messages in thread
From: Pan Wen @ 2016-10-17 12:07 UTC (permalink / raw)
  To: mturquette, sboyd, robh+dt, mark.rutland, linux, xuwei5
  Cc: linux-clk, devicetree, linux-kernel, linux-arm-kernel,
	howell.yang, xuejiancheng, jalen.hsu, lvkuanliang, suwenping,
	raojun, kevin.lixu, wenpan

Add CRG driver for Hi3516CV300 SoC. CRG(Clock and Reset
Generator) module generates clock and reset signals used
by other module blocks on SoC.

Signed-off-by: Pan Wen <wenpan@hisilicon.com>
---
 .../devicetree/bindings/clock/hisi-crg.txt         |  50 ++++
 drivers/clk/hisilicon/Kconfig                      |   8 +
 drivers/clk/hisilicon/Makefile                     |   1 +
 drivers/clk/hisilicon/crg-hi3516cv300.c            | 330 +++++++++++++++++++++
 drivers/clk/hisilicon/crg.h                        |  34 +++
 include/dt-bindings/clock/hi3516cv300-clock.h      |  48 +++
 6 files changed, 471 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/hisi-crg.txt
 create mode 100644 drivers/clk/hisilicon/crg-hi3516cv300.c
 create mode 100644 drivers/clk/hisilicon/crg.h
 create mode 100644 include/dt-bindings/clock/hi3516cv300-clock.h

diff --git a/Documentation/devicetree/bindings/clock/hisi-crg.txt b/Documentation/devicetree/bindings/clock/hisi-crg.txt
new file mode 100644
index 0000000..cc60b3d
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/hisi-crg.txt
@@ -0,0 +1,50 @@
+* HiSilicon Clock and Reset Generator(CRG)
+
+The CRG module provides clock and reset signals to various
+modules within the SoC.
+
+This binding uses the following bindings:
+    Documentation/devicetree/bindings/clock/clock-bindings.txt
+    Documentation/devicetree/bindings/reset/reset.txt
+
+Required Properties:
+
+- compatible: should be one of the following.
+  - "hisilicon,hi3516cv300-crg"
+  - "hisilicon,hi3516cv300-sysctrl"
+  - "hisilicon,hi3519-crg"
+  - "hisilicon,hi3798cv200-crg"
+  - "hisilicon,hi3798cv200-sysctrl"
+
+- reg: physical base address of the controller and length of memory mapped
+  region.
+
+- #clock-cells: should be 1.
+
+Each clock is assigned an identifier and client nodes use this identifier
+to specify the clock which they consume.
+
+All these identifier could be found in <dt-bindings/clock/hi3519-clock.h>.
+
+- #reset-cells: should be 2.
+
+A reset signal can be controlled by writing a bit register in the CRG module.
+The reset specifier consists of two cells. The first cell represents the
+register offset relative to the base address. The second cell represents the
+bit index in the register.
+
+Example: CRG nodes
+CRG: clock-reset-controller@12010000 {
+	compatible = "hisilicon,hi3519-crg";
+	reg = <0x12010000 0x10000>;
+	#clock-cells = <1>;
+	#reset-cells = <2>;
+};
+
+Example: consumer nodes
+i2c0: i2c@12110000 {
+	compatible = "hisilicon,hi3519-i2c";
+	reg = <0x12110000 0x1000>;
+	clocks = <&CRG HI3519_I2C0_RST>;
+	resets = <&CRG 0xe4 0>;
+};
diff --git a/drivers/clk/hisilicon/Kconfig b/drivers/clk/hisilicon/Kconfig
index 3f537a0..5ceb42f 100644
--- a/drivers/clk/hisilicon/Kconfig
+++ b/drivers/clk/hisilicon/Kconfig
@@ -1,3 +1,11 @@
+config COMMON_CLK_HI3516CV300
+	tristate "HI3516CV300 Clock Driver"
+	depends on ARCH_HISI || COMPILE_TEST
+	select RESET_HISI
+	default ARCH_HISI
+	help
+	  Build the clock driver for hi3516cv300.
+
 config COMMON_CLK_HI3519
 	tristate "Hi3519 Clock Driver"
 	depends on ARCH_HISI || COMPILE_TEST
diff --git a/drivers/clk/hisilicon/Makefile b/drivers/clk/hisilicon/Makefile
index e169ec7..6c5c34d 100644
--- a/drivers/clk/hisilicon/Makefile
+++ b/drivers/clk/hisilicon/Makefile
@@ -7,6 +7,7 @@ obj-y	+= clk.o clkgate-separated.o clkdivider-hi6220.o
 obj-$(CONFIG_ARCH_HI3xxx)	+= clk-hi3620.o
 obj-$(CONFIG_ARCH_HIP04)	+= clk-hip04.o
 obj-$(CONFIG_ARCH_HIX5HD2)	+= clk-hix5hd2.o
+obj-$(CONFIG_COMMON_CLK_HI3516CV300)	+= crg-hi3516cv300.o
 obj-$(CONFIG_COMMON_CLK_HI3519)	+= clk-hi3519.o
 obj-$(CONFIG_COMMON_CLK_HI6220)	+= clk-hi6220.o
 obj-$(CONFIG_RESET_HISI)	+= reset.o
diff --git a/drivers/clk/hisilicon/crg-hi3516cv300.c b/drivers/clk/hisilicon/crg-hi3516cv300.c
new file mode 100644
index 0000000..2007123
--- /dev/null
+++ b/drivers/clk/hisilicon/crg-hi3516cv300.c
@@ -0,0 +1,330 @@
+/*
+ * Hi3516CV300 Clock and Reset Generator Driver
+ *
+ * Copyright (c) 2016 HiSilicon Technologies Co., Ltd.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <dt-bindings/clock/hi3516cv300-clock.h>
+#include <linux/clk-provider.h>
+#include <linux/module.h>
+#include <linux/of_device.h>
+#include <linux/platform_device.h>
+#include "clk.h"
+#include "crg.h"
+#include "reset.h"
+
+/* hi3516CV300 core CRG */
+#define HI3516CV300_INNER_CLK_OFFSET	64
+#define HI3516CV300_FIXED_3M		65
+#define HI3516CV300_FIXED_6M		66
+#define HI3516CV300_FIXED_24M		67
+#define HI3516CV300_FIXED_49P5		68
+#define HI3516CV300_FIXED_50M		69
+#define HI3516CV300_FIXED_83P3M		70
+#define HI3516CV300_FIXED_99M		71
+#define HI3516CV300_FIXED_100M		72
+#define HI3516CV300_FIXED_148P5M	73
+#define HI3516CV300_FIXED_198M		74
+#define HI3516CV300_FIXED_297M		75
+#define HI3516CV300_UART_MUX		76
+#define HI3516CV300_FMC_MUX		77
+#define HI3516CV300_MMC0_MUX		78
+#define HI3516CV300_MMC1_MUX		79
+#define HI3516CV300_MMC2_MUX		80
+#define HI3516CV300_MMC3_MUX		81
+#define HI3516CV300_PWM_MUX		82
+#define HI3516CV300_CRG_NR_CLKS		128
+
+static const struct hisi_fixed_rate_clock hi3516cv300_fixed_rate_clks[] = {
+	{ HI3516CV300_FIXED_3M, "3m", NULL, 0, 3000000, },
+	{ HI3516CV300_FIXED_6M, "6m", NULL, 0, 6000000, },
+	{ HI3516CV300_FIXED_24M, "24m", NULL, 0, 24000000, },
+	{ HI3516CV300_FIXED_49P5, "49.5m", NULL, 0, 49500000, },
+	{ HI3516CV300_FIXED_50M, "50m", NULL, 0, 50000000, },
+	{ HI3516CV300_FIXED_83P3M, "83.3m", NULL, 0, 83300000, },
+	{ HI3516CV300_FIXED_99M, "99m", NULL, 0, 99000000, },
+	{ HI3516CV300_FIXED_100M, "100m", NULL, 0, 100000000, },
+	{ HI3516CV300_FIXED_148P5M, "148.5m", NULL, 0, 148500000, },
+	{ HI3516CV300_FIXED_198M, "198m", NULL, 0, 198000000, },
+	{ HI3516CV300_FIXED_297M, "297m", NULL, 0, 297000000, },
+	{ HI3516CV300_APB_CLK, "apb", NULL, 0, 50000000, },
+};
+
+static const char *const uart_mux_p[] = {"24m", "6m"};
+static const char *const fmc_mux_p[] = {
+	"24m", "83.3m", "148.5m", "198m", "297m"
+};
+static const char *const mmc_mux_p[] = {"49.5m"};
+static const char *const mmc2_mux_p[] = {"99m", "49.5m"};
+static const char *const pwm_mux_p[] = {"3m", "50m", "24m", "24m"};
+
+static u32 uart_mux_table[] = {0, 1};
+static u32 fmc_mux_table[] = {0, 1, 2, 3, 4};
+static u32 mmc_mux_table[] = {0};
+static u32 mmc2_mux_table[] = {0, 2};
+static u32 pwm_mux_table[] = {0, 1, 2, 3};
+
+static const struct hisi_mux_clock hi3516cv300_mux_clks[] = {
+	{ HI3516CV300_UART_MUX, "uart_mux", uart_mux_p, ARRAY_SIZE(uart_mux_p),
+		CLK_SET_RATE_PARENT, 0xe4, 19, 1, 0, uart_mux_table, },
+	{ HI3516CV300_FMC_MUX, "fmc_mux", fmc_mux_p, ARRAY_SIZE(fmc_mux_p),
+		CLK_SET_RATE_PARENT, 0xc0, 2, 3, 0, fmc_mux_table, },
+	{ HI3516CV300_MMC0_MUX, "mmc0_mux", mmc_mux_p, ARRAY_SIZE(mmc_mux_p),
+		CLK_SET_RATE_PARENT, 0xc4, 4, 2, 0, mmc_mux_table, },
+	{ HI3516CV300_MMC1_MUX, "mmc1_mux", mmc_mux_p, ARRAY_SIZE(mmc_mux_p),
+		CLK_SET_RATE_PARENT, 0xc4, 12, 2, 0, mmc_mux_table, },
+	{ HI3516CV300_MMC2_MUX, "mmc2_mux", mmc2_mux_p, ARRAY_SIZE(mmc2_mux_p),
+		CLK_SET_RATE_PARENT, 0xc4, 20, 2, 0, mmc2_mux_table, },
+	{ HI3516CV300_MMC3_MUX, "mmc3_mux", mmc_mux_p, ARRAY_SIZE(mmc_mux_p),
+		CLK_SET_RATE_PARENT, 0xc8, 4, 2, 0, mmc_mux_table, },
+	{ HI3516CV300_PWM_MUX, "pwm_mux", pwm_mux_p, ARRAY_SIZE(pwm_mux_p),
+		CLK_SET_RATE_PARENT, 0x38, 2, 2, 0, pwm_mux_table, },
+};
+
+static const struct hisi_gate_clock hi3516cv300_gate_clks[] = {
+
+	{ HI3516CV300_UART0_CLK, "clk_uart0", "uart_mux", CLK_SET_RATE_PARENT,
+		0xe4, 15, 0, },
+	{ HI3516CV300_UART1_CLK, "clk_uart1", "uart_mux", CLK_SET_RATE_PARENT,
+		0xe4, 16, 0, },
+	{ HI3516CV300_UART2_CLK, "clk_uart2", "uart_mux", CLK_SET_RATE_PARENT,
+		0xe4, 17, 0, },
+
+	{ HI3516CV300_SPI0_CLK, "clk_spi0", "100m", CLK_SET_RATE_PARENT,
+		0xe4, 13, 0, },
+	{ HI3516CV300_SPI1_CLK, "clk_spi1", "100m", CLK_SET_RATE_PARENT,
+		0xe4, 14, 0, },
+
+	{ HI3516CV300_FMC_CLK, "clk_fmc", "fmc_mux", CLK_SET_RATE_PARENT,
+		0xc0, 1, 0, },
+	{ HI3516CV300_MMC0_CLK, "clk_mmc0", "mmc0_mux", CLK_SET_RATE_PARENT,
+		0xc4, 1, 0, },
+	{ HI3516CV300_MMC1_CLK, "clk_mmc1", "mmc1_mux", CLK_SET_RATE_PARENT,
+		0xc4, 9, 0, },
+	{ HI3516CV300_MMC2_CLK, "clk_mmc2", "mmc2_mux", CLK_SET_RATE_PARENT,
+		0xc4, 17, 0, },
+	{ HI3516CV300_MMC3_CLK, "clk_mmc3", "mmc3_mux", CLK_SET_RATE_PARENT,
+		0xc8, 1, 0, },
+
+	{ HI3516CV300_ETH_CLK, "clk_eth", NULL, 0, 0xec, 1, 0, },
+
+	{ HI3516CV300_DMAC_CLK, "clk_dmac", NULL, 0, 0xd8, 5, 0, },
+	{ HI3516CV300_PWM_CLK, "clk_pwm", "pwm_mux", CLK_SET_RATE_PARENT,
+		0x38, 1, 0, },
+
+	{ HI3516CV300_USB2_BUS_CLK, "clk_usb2_bus", NULL, 0, 0xb8, 0, 0, },
+	{ HI3516CV300_USB2_OHCI48M_CLK, "clk_usb2_ohci48m", NULL, 0,
+		0xb8, 1, 0, },
+	{ HI3516CV300_USB2_OHCI12M_CLK, "clk_usb2_ohci12m", NULL, 0,
+		0xb8, 2, 0, },
+	{ HI3516CV300_USB2_OTG_UTMI_CLK, "clk_usb2_otg_utmi", NULL, 0,
+		0xb8, 3, 0, },
+	{ HI3516CV300_USB2_HST_PHY_CLK, "clk_usb2_hst_phy", NULL, 0,
+		0xb8, 4, 0, },
+	{ HI3516CV300_USB2_UTMI0_CLK, "clk_usb2_utmi0", NULL, 0, 0xb8, 5, 0, },
+	{ HI3516CV300_USB2_PHY_CLK, "clk_usb2_phy", NULL, 0, 0xb8, 7, 0, },
+};
+
+static struct hisi_clock_data *hi3516cv300_clk_register(
+		struct platform_device *pdev)
+{
+	struct hisi_clock_data *clk_data;
+	int ret;
+
+	clk_data = hisi_clk_alloc(pdev, HI3516CV300_CRG_NR_CLKS);
+	if (!clk_data)
+		return ERR_PTR(-ENOMEM);
+
+	ret = hisi_clk_register_fixed_rate(hi3516cv300_fixed_rate_clks,
+			ARRAY_SIZE(hi3516cv300_fixed_rate_clks), clk_data);
+	if (ret)
+		return ERR_PTR(ret);
+
+	ret = hisi_clk_register_mux(hi3516cv300_mux_clks,
+			ARRAY_SIZE(hi3516cv300_mux_clks), clk_data);
+	if (ret)
+		goto unregister_fixed_rate;
+
+	ret = hisi_clk_register_gate(hi3516cv300_gate_clks,
+			ARRAY_SIZE(hi3516cv300_gate_clks), clk_data);
+	if (ret)
+		goto unregister_mux;
+
+	ret = of_clk_add_provider(pdev->dev.of_node,
+			of_clk_src_onecell_get, &clk_data->clk_data);
+	if (ret)
+		goto unregister_gate;
+
+	return clk_data;
+
+unregister_gate:
+	hisi_clk_unregister_gate(hi3516cv300_gate_clks,
+				ARRAY_SIZE(hi3516cv300_gate_clks), clk_data);
+unregister_mux:
+	hisi_clk_unregister_mux(hi3516cv300_mux_clks,
+			ARRAY_SIZE(hi3516cv300_mux_clks), clk_data);
+unregister_fixed_rate:
+	hisi_clk_unregister_fixed_rate(hi3516cv300_fixed_rate_clks,
+			ARRAY_SIZE(hi3516cv300_fixed_rate_clks), clk_data);
+	return ERR_PTR(ret);
+}
+
+static void hi3516cv300_clk_unregister(struct platform_device *pdev)
+{
+	struct hisi_crg_dev *crg = platform_get_drvdata(pdev);
+
+	of_clk_del_provider(pdev->dev.of_node);
+
+	hisi_clk_unregister_gate(hi3516cv300_gate_clks,
+			ARRAY_SIZE(hi3516cv300_gate_clks), crg->clk_data);
+	hisi_clk_unregister_mux(hi3516cv300_mux_clks,
+			ARRAY_SIZE(hi3516cv300_mux_clks), crg->clk_data);
+	hisi_clk_unregister_fixed_rate(hi3516cv300_fixed_rate_clks,
+			ARRAY_SIZE(hi3516cv300_fixed_rate_clks), crg->clk_data);
+}
+
+static const struct hisi_crg_funcs hi3516cv300_crg_funcs = {
+	.register_clks = hi3516cv300_clk_register,
+	.unregister_clks = hi3516cv300_clk_unregister,
+};
+
+/* hi3516CV300 sysctrl CRG */
+#define HI3516CV300_SYSCTRL_NR_CLKS 16
+
+static const char *wdt_mux_p[] __initconst = { "3m", "apb" };
+static u32 wdt_mux_table[] = {0, 1};
+
+static const struct hisi_mux_clock hi3516cv300_sysctrl_mux_clks[] = {
+	{ HI3516CV300_WDT_CLK, "wdt", wdt_mux_p, ARRAY_SIZE(wdt_mux_p),
+		CLK_SET_RATE_PARENT, 0x0, 23, 1, 0, wdt_mux_table, },
+};
+
+static struct hisi_clock_data *hi3516cv300_sysctrl_clk_register(
+		struct platform_device *pdev)
+{
+	struct hisi_clock_data *clk_data;
+	int ret;
+
+	clk_data = hisi_clk_alloc(pdev, HI3516CV300_SYSCTRL_NR_CLKS);
+	if (!clk_data)
+		return ERR_PTR(-ENOMEM);
+
+	ret = hisi_clk_register_mux(hi3516cv300_sysctrl_mux_clks,
+			ARRAY_SIZE(hi3516cv300_sysctrl_mux_clks), clk_data);
+	if (ret)
+		return ERR_PTR(ret);
+
+
+	ret = of_clk_add_provider(pdev->dev.of_node,
+			of_clk_src_onecell_get, &clk_data->clk_data);
+	if (ret)
+		goto unregister_mux;
+
+	return clk_data;
+
+unregister_mux:
+	hisi_clk_unregister_mux(hi3516cv300_sysctrl_mux_clks,
+			ARRAY_SIZE(hi3516cv300_sysctrl_mux_clks), clk_data);
+	return ERR_PTR(ret);
+}
+
+static void hi3516cv300_sysctrl_clk_unregister(struct platform_device *pdev)
+{
+	struct hisi_crg_dev *crg = platform_get_drvdata(pdev);
+
+	of_clk_del_provider(pdev->dev.of_node);
+
+	hisi_clk_unregister_mux(hi3516cv300_sysctrl_mux_clks,
+			ARRAY_SIZE(hi3516cv300_sysctrl_mux_clks),
+			crg->clk_data);
+}
+
+static const struct hisi_crg_funcs hi3516cv300_sysctrl_funcs = {
+	.register_clks = hi3516cv300_sysctrl_clk_register,
+	.unregister_clks = hi3516cv300_sysctrl_clk_unregister,
+};
+
+static const struct of_device_id hi3516cv300_crg_match_table[] = {
+	{
+		.compatible = "hisilicon,hi3516cv300-crg",
+		.data = &hi3516cv300_crg_funcs
+	},
+	{
+		.compatible = "hisilicon,hi3516cv300-sysctrl",
+		.data = &hi3516cv300_sysctrl_funcs
+	},
+	{ }
+};
+MODULE_DEVICE_TABLE(of, hi3516cv300_crg_match_table);
+
+static int hi3516cv300_crg_probe(struct platform_device *pdev)
+{
+	struct hisi_crg_dev *crg;
+
+	crg = devm_kmalloc(&pdev->dev, sizeof(*crg), GFP_KERNEL);
+	if (!crg)
+		return -ENOMEM;
+
+	crg->funcs = of_device_get_match_data(&pdev->dev);
+	if (!crg->funcs)
+		return -ENOENT;
+
+	crg->rstc = hisi_reset_init(pdev);
+	if (!crg->rstc)
+		return -ENOMEM;
+
+	crg->clk_data = crg->funcs->register_clks(pdev);
+	if (IS_ERR(crg->clk_data)) {
+		hisi_reset_exit(crg->rstc);
+		return PTR_ERR(crg->clk_data);
+	}
+
+	platform_set_drvdata(pdev, crg);
+	return 0;
+}
+
+static int hi3516cv300_crg_remove(struct platform_device *pdev)
+{
+	struct hisi_crg_dev *crg = platform_get_drvdata(pdev);
+
+	hisi_reset_exit(crg->rstc);
+	crg->funcs->unregister_clks(pdev);
+	return 0;
+}
+
+static struct platform_driver hi3516cv300_crg_driver = {
+	.probe          = hi3516cv300_crg_probe,
+	.remove		= hi3516cv300_crg_remove,
+	.driver         = {
+		.name   = "hi3516cv300-crg",
+		.of_match_table = hi3516cv300_crg_match_table,
+	},
+};
+
+static int __init hi3516cv300_crg_init(void)
+{
+	return platform_driver_register(&hi3516cv300_crg_driver);
+}
+core_initcall(hi3516cv300_crg_init);
+
+static void __exit hi3516cv300_crg_exit(void)
+{
+	platform_driver_unregister(&hi3516cv300_crg_driver);
+}
+module_exit(hi3516cv300_crg_exit);
+
+MODULE_LICENSE("GPL v2");
+MODULE_DESCRIPTION("HiSilicon Hi3516CV300 CRG Driver");
diff --git a/drivers/clk/hisilicon/crg.h b/drivers/clk/hisilicon/crg.h
new file mode 100644
index 0000000..e073971
--- /dev/null
+++ b/drivers/clk/hisilicon/crg.h
@@ -0,0 +1,34 @@
+/*
+ * HiSilicon Clock and Reset Driver Header
+ *
+ * Copyright (c) 2016 HiSilicon Limited.
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+#ifndef __HISI_CRG_H
+#define __HISI_CRG_H
+
+struct hisi_clock_data;
+struct hisi_reset_controller;
+
+struct hisi_crg_funcs {
+	struct hisi_clock_data*	(*register_clks)(struct platform_device *pdev);
+	void (*unregister_clks)(struct platform_device *pdev);
+};
+
+struct hisi_crg_dev {
+	struct hisi_clock_data *clk_data;
+	struct hisi_reset_controller *rstc;
+	const struct hisi_crg_funcs *funcs;
+};
+
+#endif	/* __HISI_CRG_H */
diff --git a/include/dt-bindings/clock/hi3516cv300-clock.h b/include/dt-bindings/clock/hi3516cv300-clock.h
new file mode 100644
index 0000000..5ba51b8
--- /dev/null
+++ b/include/dt-bindings/clock/hi3516cv300-clock.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2016 HiSilicon Technologies Co., Ltd.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __DTS_HI3516CV300_CLOCK_H
+#define __DTS_HI3516CV300_CLOCK_H
+
+/* hi3516CV300 core CRG */
+#define HI3516CV300_APB_CLK		0
+#define HI3516CV300_UART0_CLK		1
+#define HI3516CV300_UART1_CLK		2
+#define HI3516CV300_UART2_CLK		3
+#define HI3516CV300_SPI0_CLK		4
+#define HI3516CV300_SPI1_CLK		5
+#define HI3516CV300_FMC_CLK		6
+#define HI3516CV300_MMC0_CLK		7
+#define HI3516CV300_MMC1_CLK		8
+#define HI3516CV300_MMC2_CLK		9
+#define HI3516CV300_MMC3_CLK		10
+#define HI3516CV300_ETH_CLK		11
+#define HI3516CV300_ETH_MACIF_CLK	12
+#define HI3516CV300_DMAC_CLK		13
+#define HI3516CV300_PWM_CLK		14
+#define HI3516CV300_USB2_BUS_CLK	15
+#define HI3516CV300_USB2_OHCI48M_CLK	16
+#define HI3516CV300_USB2_OHCI12M_CLK	17
+#define HI3516CV300_USB2_OTG_UTMI_CLK	18
+#define HI3516CV300_USB2_HST_PHY_CLK	19
+#define HI3516CV300_USB2_UTMI0_CLK	20
+#define HI3516CV300_USB2_PHY_CLK	21
+
+/* hi3516CV300 sysctrl CRG */
+#define HI3516CV300_WDT_CLK		1
+
+#endif	/* __DTS_HI3516CV300_CLOCK_H */
-- 
2.9.3

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

* [PATCH 2/3] clk: hisilicon: add CRG driver for Hi3516CV300 SoC
@ 2016-10-17 12:07   ` Pan Wen
  0 siblings, 0 replies; 68+ messages in thread
From: Pan Wen @ 2016-10-17 12:07 UTC (permalink / raw)
  To: mturquette, sboyd, robh+dt, mark.rutland, linux, xuwei5
  Cc: linux-clk, devicetree, linux-kernel, linux-arm-kernel,
	howell.yang, xuejiancheng, jalen.hsu, lvkuanliang, suwenping,
	raojun, kevin.lixu, wenpan

Add CRG driver for Hi3516CV300 SoC. CRG(Clock and Reset
Generator) module generates clock and reset signals used
by other module blocks on SoC.

Signed-off-by: Pan Wen <wenpan@hisilicon.com>
---
 .../devicetree/bindings/clock/hisi-crg.txt         |  50 ++++
 drivers/clk/hisilicon/Kconfig                      |   8 +
 drivers/clk/hisilicon/Makefile                     |   1 +
 drivers/clk/hisilicon/crg-hi3516cv300.c            | 330 +++++++++++++++++++++
 drivers/clk/hisilicon/crg.h                        |  34 +++
 include/dt-bindings/clock/hi3516cv300-clock.h      |  48 +++
 6 files changed, 471 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/hisi-crg.txt
 create mode 100644 drivers/clk/hisilicon/crg-hi3516cv300.c
 create mode 100644 drivers/clk/hisilicon/crg.h
 create mode 100644 include/dt-bindings/clock/hi3516cv300-clock.h

diff --git a/Documentation/devicetree/bindings/clock/hisi-crg.txt b/Documentation/devicetree/bindings/clock/hisi-crg.txt
new file mode 100644
index 0000000..cc60b3d
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/hisi-crg.txt
@@ -0,0 +1,50 @@
+* HiSilicon Clock and Reset Generator(CRG)
+
+The CRG module provides clock and reset signals to various
+modules within the SoC.
+
+This binding uses the following bindings:
+    Documentation/devicetree/bindings/clock/clock-bindings.txt
+    Documentation/devicetree/bindings/reset/reset.txt
+
+Required Properties:
+
+- compatible: should be one of the following.
+  - "hisilicon,hi3516cv300-crg"
+  - "hisilicon,hi3516cv300-sysctrl"
+  - "hisilicon,hi3519-crg"
+  - "hisilicon,hi3798cv200-crg"
+  - "hisilicon,hi3798cv200-sysctrl"
+
+- reg: physical base address of the controller and length of memory mapped
+  region.
+
+- #clock-cells: should be 1.
+
+Each clock is assigned an identifier and client nodes use this identifier
+to specify the clock which they consume.
+
+All these identifier could be found in <dt-bindings/clock/hi3519-clock.h>.
+
+- #reset-cells: should be 2.
+
+A reset signal can be controlled by writing a bit register in the CRG module.
+The reset specifier consists of two cells. The first cell represents the
+register offset relative to the base address. The second cell represents the
+bit index in the register.
+
+Example: CRG nodes
+CRG: clock-reset-controller@12010000 {
+	compatible = "hisilicon,hi3519-crg";
+	reg = <0x12010000 0x10000>;
+	#clock-cells = <1>;
+	#reset-cells = <2>;
+};
+
+Example: consumer nodes
+i2c0: i2c@12110000 {
+	compatible = "hisilicon,hi3519-i2c";
+	reg = <0x12110000 0x1000>;
+	clocks = <&CRG HI3519_I2C0_RST>;
+	resets = <&CRG 0xe4 0>;
+};
diff --git a/drivers/clk/hisilicon/Kconfig b/drivers/clk/hisilicon/Kconfig
index 3f537a0..5ceb42f 100644
--- a/drivers/clk/hisilicon/Kconfig
+++ b/drivers/clk/hisilicon/Kconfig
@@ -1,3 +1,11 @@
+config COMMON_CLK_HI3516CV300
+	tristate "HI3516CV300 Clock Driver"
+	depends on ARCH_HISI || COMPILE_TEST
+	select RESET_HISI
+	default ARCH_HISI
+	help
+	  Build the clock driver for hi3516cv300.
+
 config COMMON_CLK_HI3519
 	tristate "Hi3519 Clock Driver"
 	depends on ARCH_HISI || COMPILE_TEST
diff --git a/drivers/clk/hisilicon/Makefile b/drivers/clk/hisilicon/Makefile
index e169ec7..6c5c34d 100644
--- a/drivers/clk/hisilicon/Makefile
+++ b/drivers/clk/hisilicon/Makefile
@@ -7,6 +7,7 @@ obj-y	+= clk.o clkgate-separated.o clkdivider-hi6220.o
 obj-$(CONFIG_ARCH_HI3xxx)	+= clk-hi3620.o
 obj-$(CONFIG_ARCH_HIP04)	+= clk-hip04.o
 obj-$(CONFIG_ARCH_HIX5HD2)	+= clk-hix5hd2.o
+obj-$(CONFIG_COMMON_CLK_HI3516CV300)	+= crg-hi3516cv300.o
 obj-$(CONFIG_COMMON_CLK_HI3519)	+= clk-hi3519.o
 obj-$(CONFIG_COMMON_CLK_HI6220)	+= clk-hi6220.o
 obj-$(CONFIG_RESET_HISI)	+= reset.o
diff --git a/drivers/clk/hisilicon/crg-hi3516cv300.c b/drivers/clk/hisilicon/crg-hi3516cv300.c
new file mode 100644
index 0000000..2007123
--- /dev/null
+++ b/drivers/clk/hisilicon/crg-hi3516cv300.c
@@ -0,0 +1,330 @@
+/*
+ * Hi3516CV300 Clock and Reset Generator Driver
+ *
+ * Copyright (c) 2016 HiSilicon Technologies Co., Ltd.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <dt-bindings/clock/hi3516cv300-clock.h>
+#include <linux/clk-provider.h>
+#include <linux/module.h>
+#include <linux/of_device.h>
+#include <linux/platform_device.h>
+#include "clk.h"
+#include "crg.h"
+#include "reset.h"
+
+/* hi3516CV300 core CRG */
+#define HI3516CV300_INNER_CLK_OFFSET	64
+#define HI3516CV300_FIXED_3M		65
+#define HI3516CV300_FIXED_6M		66
+#define HI3516CV300_FIXED_24M		67
+#define HI3516CV300_FIXED_49P5		68
+#define HI3516CV300_FIXED_50M		69
+#define HI3516CV300_FIXED_83P3M		70
+#define HI3516CV300_FIXED_99M		71
+#define HI3516CV300_FIXED_100M		72
+#define HI3516CV300_FIXED_148P5M	73
+#define HI3516CV300_FIXED_198M		74
+#define HI3516CV300_FIXED_297M		75
+#define HI3516CV300_UART_MUX		76
+#define HI3516CV300_FMC_MUX		77
+#define HI3516CV300_MMC0_MUX		78
+#define HI3516CV300_MMC1_MUX		79
+#define HI3516CV300_MMC2_MUX		80
+#define HI3516CV300_MMC3_MUX		81
+#define HI3516CV300_PWM_MUX		82
+#define HI3516CV300_CRG_NR_CLKS		128
+
+static const struct hisi_fixed_rate_clock hi3516cv300_fixed_rate_clks[] = {
+	{ HI3516CV300_FIXED_3M, "3m", NULL, 0, 3000000, },
+	{ HI3516CV300_FIXED_6M, "6m", NULL, 0, 6000000, },
+	{ HI3516CV300_FIXED_24M, "24m", NULL, 0, 24000000, },
+	{ HI3516CV300_FIXED_49P5, "49.5m", NULL, 0, 49500000, },
+	{ HI3516CV300_FIXED_50M, "50m", NULL, 0, 50000000, },
+	{ HI3516CV300_FIXED_83P3M, "83.3m", NULL, 0, 83300000, },
+	{ HI3516CV300_FIXED_99M, "99m", NULL, 0, 99000000, },
+	{ HI3516CV300_FIXED_100M, "100m", NULL, 0, 100000000, },
+	{ HI3516CV300_FIXED_148P5M, "148.5m", NULL, 0, 148500000, },
+	{ HI3516CV300_FIXED_198M, "198m", NULL, 0, 198000000, },
+	{ HI3516CV300_FIXED_297M, "297m", NULL, 0, 297000000, },
+	{ HI3516CV300_APB_CLK, "apb", NULL, 0, 50000000, },
+};
+
+static const char *const uart_mux_p[] = {"24m", "6m"};
+static const char *const fmc_mux_p[] = {
+	"24m", "83.3m", "148.5m", "198m", "297m"
+};
+static const char *const mmc_mux_p[] = {"49.5m"};
+static const char *const mmc2_mux_p[] = {"99m", "49.5m"};
+static const char *const pwm_mux_p[] = {"3m", "50m", "24m", "24m"};
+
+static u32 uart_mux_table[] = {0, 1};
+static u32 fmc_mux_table[] = {0, 1, 2, 3, 4};
+static u32 mmc_mux_table[] = {0};
+static u32 mmc2_mux_table[] = {0, 2};
+static u32 pwm_mux_table[] = {0, 1, 2, 3};
+
+static const struct hisi_mux_clock hi3516cv300_mux_clks[] = {
+	{ HI3516CV300_UART_MUX, "uart_mux", uart_mux_p, ARRAY_SIZE(uart_mux_p),
+		CLK_SET_RATE_PARENT, 0xe4, 19, 1, 0, uart_mux_table, },
+	{ HI3516CV300_FMC_MUX, "fmc_mux", fmc_mux_p, ARRAY_SIZE(fmc_mux_p),
+		CLK_SET_RATE_PARENT, 0xc0, 2, 3, 0, fmc_mux_table, },
+	{ HI3516CV300_MMC0_MUX, "mmc0_mux", mmc_mux_p, ARRAY_SIZE(mmc_mux_p),
+		CLK_SET_RATE_PARENT, 0xc4, 4, 2, 0, mmc_mux_table, },
+	{ HI3516CV300_MMC1_MUX, "mmc1_mux", mmc_mux_p, ARRAY_SIZE(mmc_mux_p),
+		CLK_SET_RATE_PARENT, 0xc4, 12, 2, 0, mmc_mux_table, },
+	{ HI3516CV300_MMC2_MUX, "mmc2_mux", mmc2_mux_p, ARRAY_SIZE(mmc2_mux_p),
+		CLK_SET_RATE_PARENT, 0xc4, 20, 2, 0, mmc2_mux_table, },
+	{ HI3516CV300_MMC3_MUX, "mmc3_mux", mmc_mux_p, ARRAY_SIZE(mmc_mux_p),
+		CLK_SET_RATE_PARENT, 0xc8, 4, 2, 0, mmc_mux_table, },
+	{ HI3516CV300_PWM_MUX, "pwm_mux", pwm_mux_p, ARRAY_SIZE(pwm_mux_p),
+		CLK_SET_RATE_PARENT, 0x38, 2, 2, 0, pwm_mux_table, },
+};
+
+static const struct hisi_gate_clock hi3516cv300_gate_clks[] = {
+
+	{ HI3516CV300_UART0_CLK, "clk_uart0", "uart_mux", CLK_SET_RATE_PARENT,
+		0xe4, 15, 0, },
+	{ HI3516CV300_UART1_CLK, "clk_uart1", "uart_mux", CLK_SET_RATE_PARENT,
+		0xe4, 16, 0, },
+	{ HI3516CV300_UART2_CLK, "clk_uart2", "uart_mux", CLK_SET_RATE_PARENT,
+		0xe4, 17, 0, },
+
+	{ HI3516CV300_SPI0_CLK, "clk_spi0", "100m", CLK_SET_RATE_PARENT,
+		0xe4, 13, 0, },
+	{ HI3516CV300_SPI1_CLK, "clk_spi1", "100m", CLK_SET_RATE_PARENT,
+		0xe4, 14, 0, },
+
+	{ HI3516CV300_FMC_CLK, "clk_fmc", "fmc_mux", CLK_SET_RATE_PARENT,
+		0xc0, 1, 0, },
+	{ HI3516CV300_MMC0_CLK, "clk_mmc0", "mmc0_mux", CLK_SET_RATE_PARENT,
+		0xc4, 1, 0, },
+	{ HI3516CV300_MMC1_CLK, "clk_mmc1", "mmc1_mux", CLK_SET_RATE_PARENT,
+		0xc4, 9, 0, },
+	{ HI3516CV300_MMC2_CLK, "clk_mmc2", "mmc2_mux", CLK_SET_RATE_PARENT,
+		0xc4, 17, 0, },
+	{ HI3516CV300_MMC3_CLK, "clk_mmc3", "mmc3_mux", CLK_SET_RATE_PARENT,
+		0xc8, 1, 0, },
+
+	{ HI3516CV300_ETH_CLK, "clk_eth", NULL, 0, 0xec, 1, 0, },
+
+	{ HI3516CV300_DMAC_CLK, "clk_dmac", NULL, 0, 0xd8, 5, 0, },
+	{ HI3516CV300_PWM_CLK, "clk_pwm", "pwm_mux", CLK_SET_RATE_PARENT,
+		0x38, 1, 0, },
+
+	{ HI3516CV300_USB2_BUS_CLK, "clk_usb2_bus", NULL, 0, 0xb8, 0, 0, },
+	{ HI3516CV300_USB2_OHCI48M_CLK, "clk_usb2_ohci48m", NULL, 0,
+		0xb8, 1, 0, },
+	{ HI3516CV300_USB2_OHCI12M_CLK, "clk_usb2_ohci12m", NULL, 0,
+		0xb8, 2, 0, },
+	{ HI3516CV300_USB2_OTG_UTMI_CLK, "clk_usb2_otg_utmi", NULL, 0,
+		0xb8, 3, 0, },
+	{ HI3516CV300_USB2_HST_PHY_CLK, "clk_usb2_hst_phy", NULL, 0,
+		0xb8, 4, 0, },
+	{ HI3516CV300_USB2_UTMI0_CLK, "clk_usb2_utmi0", NULL, 0, 0xb8, 5, 0, },
+	{ HI3516CV300_USB2_PHY_CLK, "clk_usb2_phy", NULL, 0, 0xb8, 7, 0, },
+};
+
+static struct hisi_clock_data *hi3516cv300_clk_register(
+		struct platform_device *pdev)
+{
+	struct hisi_clock_data *clk_data;
+	int ret;
+
+	clk_data = hisi_clk_alloc(pdev, HI3516CV300_CRG_NR_CLKS);
+	if (!clk_data)
+		return ERR_PTR(-ENOMEM);
+
+	ret = hisi_clk_register_fixed_rate(hi3516cv300_fixed_rate_clks,
+			ARRAY_SIZE(hi3516cv300_fixed_rate_clks), clk_data);
+	if (ret)
+		return ERR_PTR(ret);
+
+	ret = hisi_clk_register_mux(hi3516cv300_mux_clks,
+			ARRAY_SIZE(hi3516cv300_mux_clks), clk_data);
+	if (ret)
+		goto unregister_fixed_rate;
+
+	ret = hisi_clk_register_gate(hi3516cv300_gate_clks,
+			ARRAY_SIZE(hi3516cv300_gate_clks), clk_data);
+	if (ret)
+		goto unregister_mux;
+
+	ret = of_clk_add_provider(pdev->dev.of_node,
+			of_clk_src_onecell_get, &clk_data->clk_data);
+	if (ret)
+		goto unregister_gate;
+
+	return clk_data;
+
+unregister_gate:
+	hisi_clk_unregister_gate(hi3516cv300_gate_clks,
+				ARRAY_SIZE(hi3516cv300_gate_clks), clk_data);
+unregister_mux:
+	hisi_clk_unregister_mux(hi3516cv300_mux_clks,
+			ARRAY_SIZE(hi3516cv300_mux_clks), clk_data);
+unregister_fixed_rate:
+	hisi_clk_unregister_fixed_rate(hi3516cv300_fixed_rate_clks,
+			ARRAY_SIZE(hi3516cv300_fixed_rate_clks), clk_data);
+	return ERR_PTR(ret);
+}
+
+static void hi3516cv300_clk_unregister(struct platform_device *pdev)
+{
+	struct hisi_crg_dev *crg = platform_get_drvdata(pdev);
+
+	of_clk_del_provider(pdev->dev.of_node);
+
+	hisi_clk_unregister_gate(hi3516cv300_gate_clks,
+			ARRAY_SIZE(hi3516cv300_gate_clks), crg->clk_data);
+	hisi_clk_unregister_mux(hi3516cv300_mux_clks,
+			ARRAY_SIZE(hi3516cv300_mux_clks), crg->clk_data);
+	hisi_clk_unregister_fixed_rate(hi3516cv300_fixed_rate_clks,
+			ARRAY_SIZE(hi3516cv300_fixed_rate_clks), crg->clk_data);
+}
+
+static const struct hisi_crg_funcs hi3516cv300_crg_funcs = {
+	.register_clks = hi3516cv300_clk_register,
+	.unregister_clks = hi3516cv300_clk_unregister,
+};
+
+/* hi3516CV300 sysctrl CRG */
+#define HI3516CV300_SYSCTRL_NR_CLKS 16
+
+static const char *wdt_mux_p[] __initconst = { "3m", "apb" };
+static u32 wdt_mux_table[] = {0, 1};
+
+static const struct hisi_mux_clock hi3516cv300_sysctrl_mux_clks[] = {
+	{ HI3516CV300_WDT_CLK, "wdt", wdt_mux_p, ARRAY_SIZE(wdt_mux_p),
+		CLK_SET_RATE_PARENT, 0x0, 23, 1, 0, wdt_mux_table, },
+};
+
+static struct hisi_clock_data *hi3516cv300_sysctrl_clk_register(
+		struct platform_device *pdev)
+{
+	struct hisi_clock_data *clk_data;
+	int ret;
+
+	clk_data = hisi_clk_alloc(pdev, HI3516CV300_SYSCTRL_NR_CLKS);
+	if (!clk_data)
+		return ERR_PTR(-ENOMEM);
+
+	ret = hisi_clk_register_mux(hi3516cv300_sysctrl_mux_clks,
+			ARRAY_SIZE(hi3516cv300_sysctrl_mux_clks), clk_data);
+	if (ret)
+		return ERR_PTR(ret);
+
+
+	ret = of_clk_add_provider(pdev->dev.of_node,
+			of_clk_src_onecell_get, &clk_data->clk_data);
+	if (ret)
+		goto unregister_mux;
+
+	return clk_data;
+
+unregister_mux:
+	hisi_clk_unregister_mux(hi3516cv300_sysctrl_mux_clks,
+			ARRAY_SIZE(hi3516cv300_sysctrl_mux_clks), clk_data);
+	return ERR_PTR(ret);
+}
+
+static void hi3516cv300_sysctrl_clk_unregister(struct platform_device *pdev)
+{
+	struct hisi_crg_dev *crg = platform_get_drvdata(pdev);
+
+	of_clk_del_provider(pdev->dev.of_node);
+
+	hisi_clk_unregister_mux(hi3516cv300_sysctrl_mux_clks,
+			ARRAY_SIZE(hi3516cv300_sysctrl_mux_clks),
+			crg->clk_data);
+}
+
+static const struct hisi_crg_funcs hi3516cv300_sysctrl_funcs = {
+	.register_clks = hi3516cv300_sysctrl_clk_register,
+	.unregister_clks = hi3516cv300_sysctrl_clk_unregister,
+};
+
+static const struct of_device_id hi3516cv300_crg_match_table[] = {
+	{
+		.compatible = "hisilicon,hi3516cv300-crg",
+		.data = &hi3516cv300_crg_funcs
+	},
+	{
+		.compatible = "hisilicon,hi3516cv300-sysctrl",
+		.data = &hi3516cv300_sysctrl_funcs
+	},
+	{ }
+};
+MODULE_DEVICE_TABLE(of, hi3516cv300_crg_match_table);
+
+static int hi3516cv300_crg_probe(struct platform_device *pdev)
+{
+	struct hisi_crg_dev *crg;
+
+	crg = devm_kmalloc(&pdev->dev, sizeof(*crg), GFP_KERNEL);
+	if (!crg)
+		return -ENOMEM;
+
+	crg->funcs = of_device_get_match_data(&pdev->dev);
+	if (!crg->funcs)
+		return -ENOENT;
+
+	crg->rstc = hisi_reset_init(pdev);
+	if (!crg->rstc)
+		return -ENOMEM;
+
+	crg->clk_data = crg->funcs->register_clks(pdev);
+	if (IS_ERR(crg->clk_data)) {
+		hisi_reset_exit(crg->rstc);
+		return PTR_ERR(crg->clk_data);
+	}
+
+	platform_set_drvdata(pdev, crg);
+	return 0;
+}
+
+static int hi3516cv300_crg_remove(struct platform_device *pdev)
+{
+	struct hisi_crg_dev *crg = platform_get_drvdata(pdev);
+
+	hisi_reset_exit(crg->rstc);
+	crg->funcs->unregister_clks(pdev);
+	return 0;
+}
+
+static struct platform_driver hi3516cv300_crg_driver = {
+	.probe          = hi3516cv300_crg_probe,
+	.remove		= hi3516cv300_crg_remove,
+	.driver         = {
+		.name   = "hi3516cv300-crg",
+		.of_match_table = hi3516cv300_crg_match_table,
+	},
+};
+
+static int __init hi3516cv300_crg_init(void)
+{
+	return platform_driver_register(&hi3516cv300_crg_driver);
+}
+core_initcall(hi3516cv300_crg_init);
+
+static void __exit hi3516cv300_crg_exit(void)
+{
+	platform_driver_unregister(&hi3516cv300_crg_driver);
+}
+module_exit(hi3516cv300_crg_exit);
+
+MODULE_LICENSE("GPL v2");
+MODULE_DESCRIPTION("HiSilicon Hi3516CV300 CRG Driver");
diff --git a/drivers/clk/hisilicon/crg.h b/drivers/clk/hisilicon/crg.h
new file mode 100644
index 0000000..e073971
--- /dev/null
+++ b/drivers/clk/hisilicon/crg.h
@@ -0,0 +1,34 @@
+/*
+ * HiSilicon Clock and Reset Driver Header
+ *
+ * Copyright (c) 2016 HiSilicon Limited.
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+#ifndef __HISI_CRG_H
+#define __HISI_CRG_H
+
+struct hisi_clock_data;
+struct hisi_reset_controller;
+
+struct hisi_crg_funcs {
+	struct hisi_clock_data*	(*register_clks)(struct platform_device *pdev);
+	void (*unregister_clks)(struct platform_device *pdev);
+};
+
+struct hisi_crg_dev {
+	struct hisi_clock_data *clk_data;
+	struct hisi_reset_controller *rstc;
+	const struct hisi_crg_funcs *funcs;
+};
+
+#endif	/* __HISI_CRG_H */
diff --git a/include/dt-bindings/clock/hi3516cv300-clock.h b/include/dt-bindings/clock/hi3516cv300-clock.h
new file mode 100644
index 0000000..5ba51b8
--- /dev/null
+++ b/include/dt-bindings/clock/hi3516cv300-clock.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2016 HiSilicon Technologies Co., Ltd.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __DTS_HI3516CV300_CLOCK_H
+#define __DTS_HI3516CV300_CLOCK_H
+
+/* hi3516CV300 core CRG */
+#define HI3516CV300_APB_CLK		0
+#define HI3516CV300_UART0_CLK		1
+#define HI3516CV300_UART1_CLK		2
+#define HI3516CV300_UART2_CLK		3
+#define HI3516CV300_SPI0_CLK		4
+#define HI3516CV300_SPI1_CLK		5
+#define HI3516CV300_FMC_CLK		6
+#define HI3516CV300_MMC0_CLK		7
+#define HI3516CV300_MMC1_CLK		8
+#define HI3516CV300_MMC2_CLK		9
+#define HI3516CV300_MMC3_CLK		10
+#define HI3516CV300_ETH_CLK		11
+#define HI3516CV300_ETH_MACIF_CLK	12
+#define HI3516CV300_DMAC_CLK		13
+#define HI3516CV300_PWM_CLK		14
+#define HI3516CV300_USB2_BUS_CLK	15
+#define HI3516CV300_USB2_OHCI48M_CLK	16
+#define HI3516CV300_USB2_OHCI12M_CLK	17
+#define HI3516CV300_USB2_OTG_UTMI_CLK	18
+#define HI3516CV300_USB2_HST_PHY_CLK	19
+#define HI3516CV300_USB2_UTMI0_CLK	20
+#define HI3516CV300_USB2_PHY_CLK	21
+
+/* hi3516CV300 sysctrl CRG */
+#define HI3516CV300_WDT_CLK		1
+
+#endif	/* __DTS_HI3516CV300_CLOCK_H */
-- 
2.9.3


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

* [PATCH 2/3] clk: hisilicon: add CRG driver for Hi3516CV300 SoC
@ 2016-10-17 12:07   ` Pan Wen
  0 siblings, 0 replies; 68+ messages in thread
From: Pan Wen @ 2016-10-17 12:07 UTC (permalink / raw)
  To: linux-arm-kernel

Add CRG driver for Hi3516CV300 SoC. CRG(Clock and Reset
Generator) module generates clock and reset signals used
by other module blocks on SoC.

Signed-off-by: Pan Wen <wenpan@hisilicon.com>
---
 .../devicetree/bindings/clock/hisi-crg.txt         |  50 ++++
 drivers/clk/hisilicon/Kconfig                      |   8 +
 drivers/clk/hisilicon/Makefile                     |   1 +
 drivers/clk/hisilicon/crg-hi3516cv300.c            | 330 +++++++++++++++++++++
 drivers/clk/hisilicon/crg.h                        |  34 +++
 include/dt-bindings/clock/hi3516cv300-clock.h      |  48 +++
 6 files changed, 471 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/hisi-crg.txt
 create mode 100644 drivers/clk/hisilicon/crg-hi3516cv300.c
 create mode 100644 drivers/clk/hisilicon/crg.h
 create mode 100644 include/dt-bindings/clock/hi3516cv300-clock.h

diff --git a/Documentation/devicetree/bindings/clock/hisi-crg.txt b/Documentation/devicetree/bindings/clock/hisi-crg.txt
new file mode 100644
index 0000000..cc60b3d
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/hisi-crg.txt
@@ -0,0 +1,50 @@
+* HiSilicon Clock and Reset Generator(CRG)
+
+The CRG module provides clock and reset signals to various
+modules within the SoC.
+
+This binding uses the following bindings:
+    Documentation/devicetree/bindings/clock/clock-bindings.txt
+    Documentation/devicetree/bindings/reset/reset.txt
+
+Required Properties:
+
+- compatible: should be one of the following.
+  - "hisilicon,hi3516cv300-crg"
+  - "hisilicon,hi3516cv300-sysctrl"
+  - "hisilicon,hi3519-crg"
+  - "hisilicon,hi3798cv200-crg"
+  - "hisilicon,hi3798cv200-sysctrl"
+
+- reg: physical base address of the controller and length of memory mapped
+  region.
+
+- #clock-cells: should be 1.
+
+Each clock is assigned an identifier and client nodes use this identifier
+to specify the clock which they consume.
+
+All these identifier could be found in <dt-bindings/clock/hi3519-clock.h>.
+
+- #reset-cells: should be 2.
+
+A reset signal can be controlled by writing a bit register in the CRG module.
+The reset specifier consists of two cells. The first cell represents the
+register offset relative to the base address. The second cell represents the
+bit index in the register.
+
+Example: CRG nodes
+CRG: clock-reset-controller at 12010000 {
+	compatible = "hisilicon,hi3519-crg";
+	reg = <0x12010000 0x10000>;
+	#clock-cells = <1>;
+	#reset-cells = <2>;
+};
+
+Example: consumer nodes
+i2c0: i2c at 12110000 {
+	compatible = "hisilicon,hi3519-i2c";
+	reg = <0x12110000 0x1000>;
+	clocks = <&CRG HI3519_I2C0_RST>;
+	resets = <&CRG 0xe4 0>;
+};
diff --git a/drivers/clk/hisilicon/Kconfig b/drivers/clk/hisilicon/Kconfig
index 3f537a0..5ceb42f 100644
--- a/drivers/clk/hisilicon/Kconfig
+++ b/drivers/clk/hisilicon/Kconfig
@@ -1,3 +1,11 @@
+config COMMON_CLK_HI3516CV300
+	tristate "HI3516CV300 Clock Driver"
+	depends on ARCH_HISI || COMPILE_TEST
+	select RESET_HISI
+	default ARCH_HISI
+	help
+	  Build the clock driver for hi3516cv300.
+
 config COMMON_CLK_HI3519
 	tristate "Hi3519 Clock Driver"
 	depends on ARCH_HISI || COMPILE_TEST
diff --git a/drivers/clk/hisilicon/Makefile b/drivers/clk/hisilicon/Makefile
index e169ec7..6c5c34d 100644
--- a/drivers/clk/hisilicon/Makefile
+++ b/drivers/clk/hisilicon/Makefile
@@ -7,6 +7,7 @@ obj-y	+= clk.o clkgate-separated.o clkdivider-hi6220.o
 obj-$(CONFIG_ARCH_HI3xxx)	+= clk-hi3620.o
 obj-$(CONFIG_ARCH_HIP04)	+= clk-hip04.o
 obj-$(CONFIG_ARCH_HIX5HD2)	+= clk-hix5hd2.o
+obj-$(CONFIG_COMMON_CLK_HI3516CV300)	+= crg-hi3516cv300.o
 obj-$(CONFIG_COMMON_CLK_HI3519)	+= clk-hi3519.o
 obj-$(CONFIG_COMMON_CLK_HI6220)	+= clk-hi6220.o
 obj-$(CONFIG_RESET_HISI)	+= reset.o
diff --git a/drivers/clk/hisilicon/crg-hi3516cv300.c b/drivers/clk/hisilicon/crg-hi3516cv300.c
new file mode 100644
index 0000000..2007123
--- /dev/null
+++ b/drivers/clk/hisilicon/crg-hi3516cv300.c
@@ -0,0 +1,330 @@
+/*
+ * Hi3516CV300 Clock and Reset Generator Driver
+ *
+ * Copyright (c) 2016 HiSilicon Technologies Co., Ltd.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <dt-bindings/clock/hi3516cv300-clock.h>
+#include <linux/clk-provider.h>
+#include <linux/module.h>
+#include <linux/of_device.h>
+#include <linux/platform_device.h>
+#include "clk.h"
+#include "crg.h"
+#include "reset.h"
+
+/* hi3516CV300 core CRG */
+#define HI3516CV300_INNER_CLK_OFFSET	64
+#define HI3516CV300_FIXED_3M		65
+#define HI3516CV300_FIXED_6M		66
+#define HI3516CV300_FIXED_24M		67
+#define HI3516CV300_FIXED_49P5		68
+#define HI3516CV300_FIXED_50M		69
+#define HI3516CV300_FIXED_83P3M		70
+#define HI3516CV300_FIXED_99M		71
+#define HI3516CV300_FIXED_100M		72
+#define HI3516CV300_FIXED_148P5M	73
+#define HI3516CV300_FIXED_198M		74
+#define HI3516CV300_FIXED_297M		75
+#define HI3516CV300_UART_MUX		76
+#define HI3516CV300_FMC_MUX		77
+#define HI3516CV300_MMC0_MUX		78
+#define HI3516CV300_MMC1_MUX		79
+#define HI3516CV300_MMC2_MUX		80
+#define HI3516CV300_MMC3_MUX		81
+#define HI3516CV300_PWM_MUX		82
+#define HI3516CV300_CRG_NR_CLKS		128
+
+static const struct hisi_fixed_rate_clock hi3516cv300_fixed_rate_clks[] = {
+	{ HI3516CV300_FIXED_3M, "3m", NULL, 0, 3000000, },
+	{ HI3516CV300_FIXED_6M, "6m", NULL, 0, 6000000, },
+	{ HI3516CV300_FIXED_24M, "24m", NULL, 0, 24000000, },
+	{ HI3516CV300_FIXED_49P5, "49.5m", NULL, 0, 49500000, },
+	{ HI3516CV300_FIXED_50M, "50m", NULL, 0, 50000000, },
+	{ HI3516CV300_FIXED_83P3M, "83.3m", NULL, 0, 83300000, },
+	{ HI3516CV300_FIXED_99M, "99m", NULL, 0, 99000000, },
+	{ HI3516CV300_FIXED_100M, "100m", NULL, 0, 100000000, },
+	{ HI3516CV300_FIXED_148P5M, "148.5m", NULL, 0, 148500000, },
+	{ HI3516CV300_FIXED_198M, "198m", NULL, 0, 198000000, },
+	{ HI3516CV300_FIXED_297M, "297m", NULL, 0, 297000000, },
+	{ HI3516CV300_APB_CLK, "apb", NULL, 0, 50000000, },
+};
+
+static const char *const uart_mux_p[] = {"24m", "6m"};
+static const char *const fmc_mux_p[] = {
+	"24m", "83.3m", "148.5m", "198m", "297m"
+};
+static const char *const mmc_mux_p[] = {"49.5m"};
+static const char *const mmc2_mux_p[] = {"99m", "49.5m"};
+static const char *const pwm_mux_p[] = {"3m", "50m", "24m", "24m"};
+
+static u32 uart_mux_table[] = {0, 1};
+static u32 fmc_mux_table[] = {0, 1, 2, 3, 4};
+static u32 mmc_mux_table[] = {0};
+static u32 mmc2_mux_table[] = {0, 2};
+static u32 pwm_mux_table[] = {0, 1, 2, 3};
+
+static const struct hisi_mux_clock hi3516cv300_mux_clks[] = {
+	{ HI3516CV300_UART_MUX, "uart_mux", uart_mux_p, ARRAY_SIZE(uart_mux_p),
+		CLK_SET_RATE_PARENT, 0xe4, 19, 1, 0, uart_mux_table, },
+	{ HI3516CV300_FMC_MUX, "fmc_mux", fmc_mux_p, ARRAY_SIZE(fmc_mux_p),
+		CLK_SET_RATE_PARENT, 0xc0, 2, 3, 0, fmc_mux_table, },
+	{ HI3516CV300_MMC0_MUX, "mmc0_mux", mmc_mux_p, ARRAY_SIZE(mmc_mux_p),
+		CLK_SET_RATE_PARENT, 0xc4, 4, 2, 0, mmc_mux_table, },
+	{ HI3516CV300_MMC1_MUX, "mmc1_mux", mmc_mux_p, ARRAY_SIZE(mmc_mux_p),
+		CLK_SET_RATE_PARENT, 0xc4, 12, 2, 0, mmc_mux_table, },
+	{ HI3516CV300_MMC2_MUX, "mmc2_mux", mmc2_mux_p, ARRAY_SIZE(mmc2_mux_p),
+		CLK_SET_RATE_PARENT, 0xc4, 20, 2, 0, mmc2_mux_table, },
+	{ HI3516CV300_MMC3_MUX, "mmc3_mux", mmc_mux_p, ARRAY_SIZE(mmc_mux_p),
+		CLK_SET_RATE_PARENT, 0xc8, 4, 2, 0, mmc_mux_table, },
+	{ HI3516CV300_PWM_MUX, "pwm_mux", pwm_mux_p, ARRAY_SIZE(pwm_mux_p),
+		CLK_SET_RATE_PARENT, 0x38, 2, 2, 0, pwm_mux_table, },
+};
+
+static const struct hisi_gate_clock hi3516cv300_gate_clks[] = {
+
+	{ HI3516CV300_UART0_CLK, "clk_uart0", "uart_mux", CLK_SET_RATE_PARENT,
+		0xe4, 15, 0, },
+	{ HI3516CV300_UART1_CLK, "clk_uart1", "uart_mux", CLK_SET_RATE_PARENT,
+		0xe4, 16, 0, },
+	{ HI3516CV300_UART2_CLK, "clk_uart2", "uart_mux", CLK_SET_RATE_PARENT,
+		0xe4, 17, 0, },
+
+	{ HI3516CV300_SPI0_CLK, "clk_spi0", "100m", CLK_SET_RATE_PARENT,
+		0xe4, 13, 0, },
+	{ HI3516CV300_SPI1_CLK, "clk_spi1", "100m", CLK_SET_RATE_PARENT,
+		0xe4, 14, 0, },
+
+	{ HI3516CV300_FMC_CLK, "clk_fmc", "fmc_mux", CLK_SET_RATE_PARENT,
+		0xc0, 1, 0, },
+	{ HI3516CV300_MMC0_CLK, "clk_mmc0", "mmc0_mux", CLK_SET_RATE_PARENT,
+		0xc4, 1, 0, },
+	{ HI3516CV300_MMC1_CLK, "clk_mmc1", "mmc1_mux", CLK_SET_RATE_PARENT,
+		0xc4, 9, 0, },
+	{ HI3516CV300_MMC2_CLK, "clk_mmc2", "mmc2_mux", CLK_SET_RATE_PARENT,
+		0xc4, 17, 0, },
+	{ HI3516CV300_MMC3_CLK, "clk_mmc3", "mmc3_mux", CLK_SET_RATE_PARENT,
+		0xc8, 1, 0, },
+
+	{ HI3516CV300_ETH_CLK, "clk_eth", NULL, 0, 0xec, 1, 0, },
+
+	{ HI3516CV300_DMAC_CLK, "clk_dmac", NULL, 0, 0xd8, 5, 0, },
+	{ HI3516CV300_PWM_CLK, "clk_pwm", "pwm_mux", CLK_SET_RATE_PARENT,
+		0x38, 1, 0, },
+
+	{ HI3516CV300_USB2_BUS_CLK, "clk_usb2_bus", NULL, 0, 0xb8, 0, 0, },
+	{ HI3516CV300_USB2_OHCI48M_CLK, "clk_usb2_ohci48m", NULL, 0,
+		0xb8, 1, 0, },
+	{ HI3516CV300_USB2_OHCI12M_CLK, "clk_usb2_ohci12m", NULL, 0,
+		0xb8, 2, 0, },
+	{ HI3516CV300_USB2_OTG_UTMI_CLK, "clk_usb2_otg_utmi", NULL, 0,
+		0xb8, 3, 0, },
+	{ HI3516CV300_USB2_HST_PHY_CLK, "clk_usb2_hst_phy", NULL, 0,
+		0xb8, 4, 0, },
+	{ HI3516CV300_USB2_UTMI0_CLK, "clk_usb2_utmi0", NULL, 0, 0xb8, 5, 0, },
+	{ HI3516CV300_USB2_PHY_CLK, "clk_usb2_phy", NULL, 0, 0xb8, 7, 0, },
+};
+
+static struct hisi_clock_data *hi3516cv300_clk_register(
+		struct platform_device *pdev)
+{
+	struct hisi_clock_data *clk_data;
+	int ret;
+
+	clk_data = hisi_clk_alloc(pdev, HI3516CV300_CRG_NR_CLKS);
+	if (!clk_data)
+		return ERR_PTR(-ENOMEM);
+
+	ret = hisi_clk_register_fixed_rate(hi3516cv300_fixed_rate_clks,
+			ARRAY_SIZE(hi3516cv300_fixed_rate_clks), clk_data);
+	if (ret)
+		return ERR_PTR(ret);
+
+	ret = hisi_clk_register_mux(hi3516cv300_mux_clks,
+			ARRAY_SIZE(hi3516cv300_mux_clks), clk_data);
+	if (ret)
+		goto unregister_fixed_rate;
+
+	ret = hisi_clk_register_gate(hi3516cv300_gate_clks,
+			ARRAY_SIZE(hi3516cv300_gate_clks), clk_data);
+	if (ret)
+		goto unregister_mux;
+
+	ret = of_clk_add_provider(pdev->dev.of_node,
+			of_clk_src_onecell_get, &clk_data->clk_data);
+	if (ret)
+		goto unregister_gate;
+
+	return clk_data;
+
+unregister_gate:
+	hisi_clk_unregister_gate(hi3516cv300_gate_clks,
+				ARRAY_SIZE(hi3516cv300_gate_clks), clk_data);
+unregister_mux:
+	hisi_clk_unregister_mux(hi3516cv300_mux_clks,
+			ARRAY_SIZE(hi3516cv300_mux_clks), clk_data);
+unregister_fixed_rate:
+	hisi_clk_unregister_fixed_rate(hi3516cv300_fixed_rate_clks,
+			ARRAY_SIZE(hi3516cv300_fixed_rate_clks), clk_data);
+	return ERR_PTR(ret);
+}
+
+static void hi3516cv300_clk_unregister(struct platform_device *pdev)
+{
+	struct hisi_crg_dev *crg = platform_get_drvdata(pdev);
+
+	of_clk_del_provider(pdev->dev.of_node);
+
+	hisi_clk_unregister_gate(hi3516cv300_gate_clks,
+			ARRAY_SIZE(hi3516cv300_gate_clks), crg->clk_data);
+	hisi_clk_unregister_mux(hi3516cv300_mux_clks,
+			ARRAY_SIZE(hi3516cv300_mux_clks), crg->clk_data);
+	hisi_clk_unregister_fixed_rate(hi3516cv300_fixed_rate_clks,
+			ARRAY_SIZE(hi3516cv300_fixed_rate_clks), crg->clk_data);
+}
+
+static const struct hisi_crg_funcs hi3516cv300_crg_funcs = {
+	.register_clks = hi3516cv300_clk_register,
+	.unregister_clks = hi3516cv300_clk_unregister,
+};
+
+/* hi3516CV300 sysctrl CRG */
+#define HI3516CV300_SYSCTRL_NR_CLKS 16
+
+static const char *wdt_mux_p[] __initconst = { "3m", "apb" };
+static u32 wdt_mux_table[] = {0, 1};
+
+static const struct hisi_mux_clock hi3516cv300_sysctrl_mux_clks[] = {
+	{ HI3516CV300_WDT_CLK, "wdt", wdt_mux_p, ARRAY_SIZE(wdt_mux_p),
+		CLK_SET_RATE_PARENT, 0x0, 23, 1, 0, wdt_mux_table, },
+};
+
+static struct hisi_clock_data *hi3516cv300_sysctrl_clk_register(
+		struct platform_device *pdev)
+{
+	struct hisi_clock_data *clk_data;
+	int ret;
+
+	clk_data = hisi_clk_alloc(pdev, HI3516CV300_SYSCTRL_NR_CLKS);
+	if (!clk_data)
+		return ERR_PTR(-ENOMEM);
+
+	ret = hisi_clk_register_mux(hi3516cv300_sysctrl_mux_clks,
+			ARRAY_SIZE(hi3516cv300_sysctrl_mux_clks), clk_data);
+	if (ret)
+		return ERR_PTR(ret);
+
+
+	ret = of_clk_add_provider(pdev->dev.of_node,
+			of_clk_src_onecell_get, &clk_data->clk_data);
+	if (ret)
+		goto unregister_mux;
+
+	return clk_data;
+
+unregister_mux:
+	hisi_clk_unregister_mux(hi3516cv300_sysctrl_mux_clks,
+			ARRAY_SIZE(hi3516cv300_sysctrl_mux_clks), clk_data);
+	return ERR_PTR(ret);
+}
+
+static void hi3516cv300_sysctrl_clk_unregister(struct platform_device *pdev)
+{
+	struct hisi_crg_dev *crg = platform_get_drvdata(pdev);
+
+	of_clk_del_provider(pdev->dev.of_node);
+
+	hisi_clk_unregister_mux(hi3516cv300_sysctrl_mux_clks,
+			ARRAY_SIZE(hi3516cv300_sysctrl_mux_clks),
+			crg->clk_data);
+}
+
+static const struct hisi_crg_funcs hi3516cv300_sysctrl_funcs = {
+	.register_clks = hi3516cv300_sysctrl_clk_register,
+	.unregister_clks = hi3516cv300_sysctrl_clk_unregister,
+};
+
+static const struct of_device_id hi3516cv300_crg_match_table[] = {
+	{
+		.compatible = "hisilicon,hi3516cv300-crg",
+		.data = &hi3516cv300_crg_funcs
+	},
+	{
+		.compatible = "hisilicon,hi3516cv300-sysctrl",
+		.data = &hi3516cv300_sysctrl_funcs
+	},
+	{ }
+};
+MODULE_DEVICE_TABLE(of, hi3516cv300_crg_match_table);
+
+static int hi3516cv300_crg_probe(struct platform_device *pdev)
+{
+	struct hisi_crg_dev *crg;
+
+	crg = devm_kmalloc(&pdev->dev, sizeof(*crg), GFP_KERNEL);
+	if (!crg)
+		return -ENOMEM;
+
+	crg->funcs = of_device_get_match_data(&pdev->dev);
+	if (!crg->funcs)
+		return -ENOENT;
+
+	crg->rstc = hisi_reset_init(pdev);
+	if (!crg->rstc)
+		return -ENOMEM;
+
+	crg->clk_data = crg->funcs->register_clks(pdev);
+	if (IS_ERR(crg->clk_data)) {
+		hisi_reset_exit(crg->rstc);
+		return PTR_ERR(crg->clk_data);
+	}
+
+	platform_set_drvdata(pdev, crg);
+	return 0;
+}
+
+static int hi3516cv300_crg_remove(struct platform_device *pdev)
+{
+	struct hisi_crg_dev *crg = platform_get_drvdata(pdev);
+
+	hisi_reset_exit(crg->rstc);
+	crg->funcs->unregister_clks(pdev);
+	return 0;
+}
+
+static struct platform_driver hi3516cv300_crg_driver = {
+	.probe          = hi3516cv300_crg_probe,
+	.remove		= hi3516cv300_crg_remove,
+	.driver         = {
+		.name   = "hi3516cv300-crg",
+		.of_match_table = hi3516cv300_crg_match_table,
+	},
+};
+
+static int __init hi3516cv300_crg_init(void)
+{
+	return platform_driver_register(&hi3516cv300_crg_driver);
+}
+core_initcall(hi3516cv300_crg_init);
+
+static void __exit hi3516cv300_crg_exit(void)
+{
+	platform_driver_unregister(&hi3516cv300_crg_driver);
+}
+module_exit(hi3516cv300_crg_exit);
+
+MODULE_LICENSE("GPL v2");
+MODULE_DESCRIPTION("HiSilicon Hi3516CV300 CRG Driver");
diff --git a/drivers/clk/hisilicon/crg.h b/drivers/clk/hisilicon/crg.h
new file mode 100644
index 0000000..e073971
--- /dev/null
+++ b/drivers/clk/hisilicon/crg.h
@@ -0,0 +1,34 @@
+/*
+ * HiSilicon Clock and Reset Driver Header
+ *
+ * Copyright (c) 2016 HiSilicon Limited.
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+#ifndef __HISI_CRG_H
+#define __HISI_CRG_H
+
+struct hisi_clock_data;
+struct hisi_reset_controller;
+
+struct hisi_crg_funcs {
+	struct hisi_clock_data*	(*register_clks)(struct platform_device *pdev);
+	void (*unregister_clks)(struct platform_device *pdev);
+};
+
+struct hisi_crg_dev {
+	struct hisi_clock_data *clk_data;
+	struct hisi_reset_controller *rstc;
+	const struct hisi_crg_funcs *funcs;
+};
+
+#endif	/* __HISI_CRG_H */
diff --git a/include/dt-bindings/clock/hi3516cv300-clock.h b/include/dt-bindings/clock/hi3516cv300-clock.h
new file mode 100644
index 0000000..5ba51b8
--- /dev/null
+++ b/include/dt-bindings/clock/hi3516cv300-clock.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2016 HiSilicon Technologies Co., Ltd.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __DTS_HI3516CV300_CLOCK_H
+#define __DTS_HI3516CV300_CLOCK_H
+
+/* hi3516CV300 core CRG */
+#define HI3516CV300_APB_CLK		0
+#define HI3516CV300_UART0_CLK		1
+#define HI3516CV300_UART1_CLK		2
+#define HI3516CV300_UART2_CLK		3
+#define HI3516CV300_SPI0_CLK		4
+#define HI3516CV300_SPI1_CLK		5
+#define HI3516CV300_FMC_CLK		6
+#define HI3516CV300_MMC0_CLK		7
+#define HI3516CV300_MMC1_CLK		8
+#define HI3516CV300_MMC2_CLK		9
+#define HI3516CV300_MMC3_CLK		10
+#define HI3516CV300_ETH_CLK		11
+#define HI3516CV300_ETH_MACIF_CLK	12
+#define HI3516CV300_DMAC_CLK		13
+#define HI3516CV300_PWM_CLK		14
+#define HI3516CV300_USB2_BUS_CLK	15
+#define HI3516CV300_USB2_OHCI48M_CLK	16
+#define HI3516CV300_USB2_OHCI12M_CLK	17
+#define HI3516CV300_USB2_OTG_UTMI_CLK	18
+#define HI3516CV300_USB2_HST_PHY_CLK	19
+#define HI3516CV300_USB2_UTMI0_CLK	20
+#define HI3516CV300_USB2_PHY_CLK	21
+
+/* hi3516CV300 sysctrl CRG */
+#define HI3516CV300_WDT_CLK		1
+
+#endif	/* __DTS_HI3516CV300_CLOCK_H */
-- 
2.9.3

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

* [PATCH 3/3] dts: hisi: add dts files for Hi3516CV300 demo board
  2016-10-17 12:07 ` Pan Wen
  (?)
@ 2016-10-17 12:07   ` Pan Wen
  -1 siblings, 0 replies; 68+ messages in thread
From: Pan Wen @ 2016-10-17 12:07 UTC (permalink / raw)
  To: mturquette, sboyd, robh+dt, mark.rutland, linux, xuwei5
  Cc: linux-clk, devicetree, linux-kernel, linux-arm-kernel,
	howell.yang, xuejiancheng, jalen.hsu, lvkuanliang, suwenping,
	raojun, kevin.lixu, wenpan

Add dts files for Hi3516CV300 demo board.

Signed-off-by: Pan Wen <wenpan@hisilicon.com>
---
 arch/arm/boot/dts/Makefile             |   1 +
 arch/arm/boot/dts/hi3516cv300-demb.dts | 148 ++++++++++++
 arch/arm/boot/dts/hi3516cv300.dtsi     | 397 +++++++++++++++++++++++++++++++++
 3 files changed, 546 insertions(+)
 create mode 100644 arch/arm/boot/dts/hi3516cv300-demb.dts
 create mode 100644 arch/arm/boot/dts/hi3516cv300.dtsi

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index befcd26..1f25530 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -171,6 +171,7 @@ dtb-$(CONFIG_ARCH_HIP01) += \
 dtb-$(CONFIG_ARCH_HIP04) += \
 	hip04-d01.dtb
 dtb-$(CONFIG_ARCH_HISI) += \
+	hi3516cv300-demb.dtb \
 	hi3519-demb.dtb
 dtb-$(CONFIG_ARCH_HIX5HD2) += \
 	hisi-x5hd2-dkb.dtb
diff --git a/arch/arm/boot/dts/hi3516cv300-demb.dts b/arch/arm/boot/dts/hi3516cv300-demb.dts
new file mode 100644
index 0000000..6a75cd6
--- /dev/null
+++ b/arch/arm/boot/dts/hi3516cv300-demb.dts
@@ -0,0 +1,148 @@
+/*
+ * Copyright (c) 2016 HiSilicon Technologies Co., Ltd.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+/dts-v1/;
+#include "hi3516cv300.dtsi"
+
+/ {
+	model = "Hisilicon Hi3516CV300 DEMO Board";
+	compatible = "hisilicon,hi3516cv300";
+
+	aliases {
+		serial0 = &uart0;
+		serial1 = &uart1;
+		serial2 = &uart2;
+		i2c0 = &i2c_bus0;
+		i2c1 = &i2c_bus1;
+		spi0 = &spi_bus0;
+		spi1 = &spi_bus1;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	memory {
+		device_type = "memory";
+		reg = <0x80000000 0x10000000>;
+	};
+};
+
+&dual_timer0 {
+	status = "okay";
+};
+
+&watchdog {
+	status = "okay";
+};
+
+&pwm {
+	status = "okay";
+};
+
+&uart0 {
+	status = "okay";
+};
+
+&i2c_bus0 {
+	status = "okay";
+	clock-frequency = <100000>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c0_pmux>;
+};
+
+&i2c_bus1 {
+	status = "okay";
+	clock-frequency = <100000>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c1_pmux>;
+};
+
+&spi_bus0{
+	status = "disabled";
+	num-cs = <1>;
+	cs-gpios = <&gpio_chip0 6 0>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi0_pmux>;
+};
+
+&spi_bus1{
+	status = "okay";
+	num-cs = <2>;
+	cs-gpios = <&gpio_chip5 3 0>, <&gpio_chip5 4 0>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi1_pmux>;
+};
+
+&fmc {
+	spi-nor@0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <160000000>;
+		m25p,fast-read;
+	};
+};
+
+&mdio {
+	phy0: phy@1 {
+		reg = <1>;
+	};
+};
+
+&hisi_femac {
+	mac-address = [00 00 00 00 00 00];
+	phy-mode = "rmii";
+	phy-handle = <&phy0>;
+	hisilicon,phy-reset-delays-us = <10000 10000 150000>;
+};
+
+&dmac {
+	status = "okay";
+};
+
+&pmux {
+	i2c0_pmux: i2c0_pmux {
+		pinctrl-single,pins = <
+			0x2c 0x3
+			0x30 0x3>;
+	};
+
+	i2c1_pmux: i2c1_pmux {
+		pinctrl-single,pins = <
+			0x20 0x1
+			0x24 0x1>;
+	};
+
+	spi0_pmux: spi0_pmux {
+		pinctrl-single,pins = <
+			0x28 0x1
+			0x2c 0x1
+			0x30 0x1
+			0x34 0x1>;
+	};
+
+	spi1_pmux: spi1_pmux {
+		pinctrl-single,pins = <
+			0xc4 0x1
+			0xc8 0x1
+			0xcc 0x1
+			0xd0 0x1
+			0xd4 0x1>;
+	};
+};
diff --git a/arch/arm/boot/dts/hi3516cv300.dtsi b/arch/arm/boot/dts/hi3516cv300.dtsi
new file mode 100644
index 0000000..1da41ab
--- /dev/null
+++ b/arch/arm/boot/dts/hi3516cv300.dtsi
@@ -0,0 +1,397 @@
+/*
+ * Copyright (c) 2016 HiSilicon Technologies Co., Ltd.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "skeleton.dtsi"
+#include <dt-bindings/clock/hi3516cv300-clock.h>
+/ {
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu@0 {
+			device_type = "cpu";
+			compatible = "arm,arm926ej-s";
+			reg = <0>;
+		};
+	};
+
+	vic: interrupt-controller@10040000 {
+		compatible = "arm,pl190-vic";
+		interrupt-controller;
+		#interrupt-cells = <1>;
+		reg = <0x10040000 0x1000>;
+	};
+
+	soc {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "simple-bus";
+		interrupt-parent = <&vic>;
+		ranges;
+
+		clk_3m: clk_3m {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <3000000>;
+		};
+
+		clk_apb: clk_apb {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <50000000>;
+		};
+
+		crg: clock-reset-controller@12010000 {
+			compatible = "hisilicon,hi3516cv300-crg";
+			reg = <0x12010000 0x1000>;
+			#clock-cells = <1>;
+			#reset-cells = <2>;
+		};
+
+		sysctrl: system-controller@12020000 {
+			compatible = "hisilicon,hi3516cv300-sysctrl", "syscon";
+			reg = <0x12020000 0x1000>;
+			#clock-cells = <1>;
+		};
+
+		reboot {
+			compatible = "syscon-reboot";
+			regmap = <&sysctrl>;
+			offset = <0x4>;
+			mask = <0xdeadbeef>;
+		};
+
+		dual_timer0: dual_timer@12000000 {
+			compatible = "arm,sp804", "arm,primecell";
+			reg = <0x12000000 0x1000>;
+			interrupts = <3>;
+			clocks = <&clk_3m>, <&clk_3m>, <&clk_apb>;
+			clock-names = "timer0", "timer1", "apb_pclk";
+			status = "disabled";
+		};
+
+		dual_timer1: dual_timer@12001000 {
+			compatible = "arm,sp804", "arm,primecell";
+			reg = <0x12001000 0x1000>;
+			interrupts = <4>;
+			clocks = <&clk_3m>, <&clk_3m>, <&clk_apb>;
+			clock-names = "timer0", "timer1", "apb_pclk";
+			status = "disabled";
+		};
+
+		watchdog: watchdog@12080000 {
+			compatible = "arm,sp805-wdt", "arm,primecell";
+			arm,primecell-periphid = <0x00141805>;
+			reg = <0x12080000 0x1000>;
+			clocks = <&sysctrl HI3516CV300_WDT_CLK>,
+				<&crg HI3516CV300_APB_CLK>;
+			clock-names = "wdog_clk", "apb_pclk";
+			status = "disabled";
+		};
+
+		pwm: pwm@12130000 {
+			compatible = "hisilicon,hi3516cv300-pwm",
+				"hisilicon,hibvt-pwm";
+			reg = <0x12130000 0x10000>;
+			clocks = <&crg HI3516CV300_PWM_CLK>;
+			resets = <&crg 0x38 0>;
+			#pwm-cells = <2>;
+			status = "disabled";
+		};
+
+		uart0: uart@12100000 {
+			compatible = "arm,pl011", "arm,primecell";
+			reg = <0x12100000 0x1000>;
+			interrupts = <5>;
+			clocks = <&crg HI3516CV300_UART0_CLK>;
+			clock-names = "apb_pclk";
+			status = "disabled";
+		};
+
+		uart1: uart@12101000 {
+			compatible = "arm,pl011", "arm,primecell";
+			reg = <0x12101000 0x1000>;
+			interrupts = <30>;
+			clocks = <&crg HI3516CV300_UART1_CLK>;
+			clock-names = "apb_pclk";
+			status = "disabled";
+		};
+
+		uart2: uart@12102000 {
+			compatible = "arm,pl011", "arm,primecell";
+			reg = <0x12102000 0x1000>;
+			interrupts = <25>;
+			clocks = <&crg HI3516CV300_UART2_CLK>;
+			clock-names = "apb_pclk";
+			status = "disabled";
+		};
+
+		i2c_bus0: i2c@12110000 {
+			compatible = "hisilicon,hi3516cv300-i2c",
+				"hisilicon,hibvt-i2c";
+			reg = <0x12110000 0x1000>;
+			clocks = <&crg HI3516CV300_APB_CLK>;
+			status = "disabled";
+		};
+
+		i2c_bus1: i2c@12112000 {
+			compatible = "hisilicon,hi3516cv300-i2c",
+				"hisilicon,hibvt-i2c";
+			reg = <0x12112000 0x1000>;
+			clocks = <&crg HI3516CV300_APB_CLK>;
+			status = "disabled";
+		};
+
+		spi_bus0: spi@12120000 {
+			compatible = "arm,pl022", "arm,primecell";
+			reg = <0x12120000 0x1000>;
+			interrupts = <6>;
+			clocks = <&crg HI3516CV300_SPI0_CLK>;
+			clock-names = "apb_pclk";
+			dmas = <&dmac 12 1>, <&dmac 13 2>;
+			dma-names = "rx", "tx";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		spi_bus1: spi@12121000 {
+			compatible = "arm,pl022", "arm,primecell";
+			reg = <0x12121000 0x1000>, <0x12030000 0x4>;
+			interrupts = <7>;
+			clocks = <&crg HI3516CV300_SPI1_CLK>;
+			clock-names = "apb_pclk";
+			dmas = <&dmac 14 1>, <&dmac 15 2>;
+			dma-names = "rx", "tx";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		fmc: spi-nor-controller@10000000 {
+			compatible = "hisilicon,fmc-spi-nor";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			reg = <0x10000000 0x1000>, <0x14000000 0x1000000>;
+			reg-names = "control", "memory";
+			clocks = <&crg HI3516CV300_FMC_CLK>;
+			assigned-clocks = <&crg HI3516CV300_FMC_CLK>;
+			assigned-clock-rates = <24000000>;
+		};
+
+		mdio: mdio@10051100 {
+			compatible = "hisilicon,hisi-femac-mdio";
+			reg = <0x10051100 0x10>;
+			clocks = <&crg HI3516CV300_ETH_CLK>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+		};
+
+		hisi_femac: ethernet@10090000 {
+			compatible = "hisilicon,hi3516cv300-femac",
+				"hisilicon,hisi-femac-v2";
+			reg = <0x10050000 0x1000>,<0x10051300 0x200>;
+			interrupts = <12>;
+			clocks = <&crg HI3516CV300_ETH_CLK>;
+			resets = <&crg 0xec 0>, <&crg 0xec 3>;
+			reset-names = "mac","phy";
+		};
+
+		dmac: dma-controller@10030000 {
+			compatible = "arm,pl080", "arm,primecell";
+			reg = <0x10030000 0x1000>;
+			interrupts = <14>;
+			clocks = <&crg HI3516CV300_DMAC_CLK>;
+			clock-names = "apb_pclk";
+			lli-bus-interface-ahb1;
+			lli-bus-interface-ahb2;
+			mem-bus-interface-ahb1;
+			mem-bus-interface-ahb2;
+			memcpy-burst-size = <256>;
+			memcpy-bus-width = <32>;
+			#dma-cells = <2>;
+			status = "disabled";
+		};
+
+		gpio_chip0: gpio@12140000 {
+			compatible = "arm,pl061", "arm,primecell";
+			reg = <0x12140000 0x1000>;
+			interrupts = <31>;
+			clocks = <&crg HI3516CV300_APB_CLK>;
+			clock-names = "apb_pclk";
+			#gpio-cells = <2>;
+			gpio-ranges = <&pmux 0 61 2>,
+				<&pmux 4 11 1>,
+				<&pmux 5 10 1>,
+				<&pmux 6 13 2>;
+
+			status = "disabled";
+		};
+
+		gpio_chip1: gpio@12141000 {
+			compatible = "arm,pl061", "arm,primecell";
+			reg = <0x12141000 0x1000>;
+			interrupts = <31>;
+			clocks = <&crg HI3516CV300_APB_CLK>;
+			clock-names = "apb_pclk";
+			#gpio-cells = <2>;
+			gpio-ranges = <&pmux 0 16 7>,
+				<&pmux 7 0 1>;
+			status = "disabled";
+		};
+
+		gpio_chip2: gpio@12142000 {
+			compatible = "arm,pl061", "arm,primecell";
+			reg = <0x12142000 0x1000>;
+			interrupts = <31>;
+			clocks = <&crg HI3516CV300_APB_CLK>;
+			clock-names = "apb_pclk";
+			#gpio-cells = <2>;
+			gpio-ranges = <&pmux 0 46 1>,
+				<&pmux 1 45 1>,
+				<&pmux 2 44 1>,
+				<&pmux 3 43 1>,
+				<&pmux 4 39 1>,
+				<&pmux 5 38 1>,
+				<&pmux 6 40 1>,
+				<&pmux 7 48 1>;
+			status = "disabled";
+		};
+
+		gpio_chip3: gpio@12143000 {
+			compatible = "arm,pl061", "arm,primecell";
+			reg = <0x12143000 0x1000>;
+			interrupts = <31>;
+			clocks = <&crg HI3516CV300_APB_CLK>;
+			clock-names = "apb_pclk";
+			#gpio-cells = <2>;
+			gpio-ranges = <&pmux 0 37 1>,
+				<&pmux 1 36 1>,
+				<&pmux 2 35 1>,
+				<&pmux 3 34 1>,
+				<&pmux 4 23 2>,
+				<&pmux 6 8 2>;
+			status = "disabled";
+		};
+
+		gpio_chip4: gpio@12144000 {
+			compatible = "arm,pl061", "arm,primecell";
+			reg = <0x12144000 0x1000>;
+			interrupts = <31>;
+			clocks = <&crg HI3516CV300_APB_CLK>;
+			clock-names = "apb_pclk";
+			#gpio-cells = <2>;
+			gpio-ranges = <&pmux 0 27 1>,
+				<&pmux 1 26 1>,
+				<&pmux 2 31 1>,
+				<&pmux 3 30 1>,
+				<&pmux 4 28 2>,
+				<&pmux 6 33 1>,
+				<&pmux 7 32 1>;
+			status = "disabled";
+		};
+
+		gpio_chip5: gpio@12145000 {
+			compatible = "arm,pl061", "arm,primecell";
+			reg = <0x12145000 0x1000>;
+			interrupts = <31>;
+			clocks = <&crg HI3516CV300_APB_CLK>;
+			clock-names = "apb_pclk";
+			#gpio-cells = <2>;
+			gpio-ranges = <&pmux 0 53 1>,
+				<&pmux 1 51 2>,
+				<&pmux 3 50 1>,
+				<&pmux 4 49 1>,
+				<&pmux 5 47 1>,
+				<&pmux 6 40 2>;
+			status = "disabled";
+		};
+
+		gpio_chip6: gpio@12146000 {
+			compatible = "arm,pl061", "arm,primecell";
+			reg = <0x12146000 0x1000>;
+			interrupts = <31>;
+			clocks = <&crg HI3516CV300_APB_CLK>;
+			clock-names = "apb_pclk";
+			#gpio-cells = <2>;
+			gpio-ranges = <&pmux 0 7 1>,
+				<&pmux 1 6 1>,
+				<&pmux 2 4 1>,
+				<&pmux 3 5 1>,
+				<&pmux 4 15 1>,
+				<&pmux 5 1 3>;
+			status = "disabled";
+		};
+
+		gpio_chip7: gpio@12147000 {
+			compatible = "arm,pl061", "arm,primecell";
+			reg = <0x12147000 0x1000>;
+			interrupts = <31>;
+			clocks = <&crg HI3516CV300_APB_CLK>;
+			clock-names = "apb_pclk";
+			#gpio-cells = <2>;
+			gpio-ranges = <&pmux 1 55 6>,
+				<&pmux 7 25 1>;
+			status = "disabled";
+		};
+
+		gpio_chip8: gpio@12148000 {
+			compatible = "arm,pl061", "arm,primecell";
+			reg = <0x12148000 0x1000>;
+			interrupts = <31>;
+			clocks = <&crg HI3516CV300_APB_CLK>;
+			clock-names = "apb_pclk";
+			#gpio-cells = <2>;
+			gpio-ranges = <&pmux 0 63 3>,
+				<&pmux 3 12 1>;
+			status = "disabled";
+		};
+
+		pmux: pinmux@12040000 {
+			compatible = "pinctrl-single";
+			reg = <0x12040000 0x108>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			#gpio-range-cells = <3>;
+			ranges;
+
+			pinctrl-single,register-width = <32>;
+			pinctrl-single,function-mask = <7>;
+			/* pin base, nr pins & gpio function */
+			pinctrl-single,gpio-range = <&range 0 54 0
+				&range 55 6 1 &range 61 5 0>;
+
+			range: gpio-range {
+				#pinctrl-single,gpio-range-cells = <3>;
+			};
+		};
+
+		pconf: pinconf@12040800 {
+			compatible = "pinconf-single";
+			reg = <0x12040800 0x130>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges;
+
+			pinctrl-single,register-width = <32>;
+		};
+	};
+};
-- 
2.9.3

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

* [PATCH 3/3] dts: hisi: add dts files for Hi3516CV300 demo board
@ 2016-10-17 12:07   ` Pan Wen
  0 siblings, 0 replies; 68+ messages in thread
From: Pan Wen @ 2016-10-17 12:07 UTC (permalink / raw)
  To: mturquette, sboyd, robh+dt, mark.rutland, linux, xuwei5
  Cc: linux-clk, devicetree, linux-kernel, linux-arm-kernel,
	howell.yang, xuejiancheng, jalen.hsu, lvkuanliang, suwenping,
	raojun, kevin.lixu, wenpan

Add dts files for Hi3516CV300 demo board.

Signed-off-by: Pan Wen <wenpan@hisilicon.com>
---
 arch/arm/boot/dts/Makefile             |   1 +
 arch/arm/boot/dts/hi3516cv300-demb.dts | 148 ++++++++++++
 arch/arm/boot/dts/hi3516cv300.dtsi     | 397 +++++++++++++++++++++++++++++++++
 3 files changed, 546 insertions(+)
 create mode 100644 arch/arm/boot/dts/hi3516cv300-demb.dts
 create mode 100644 arch/arm/boot/dts/hi3516cv300.dtsi

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index befcd26..1f25530 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -171,6 +171,7 @@ dtb-$(CONFIG_ARCH_HIP01) += \
 dtb-$(CONFIG_ARCH_HIP04) += \
 	hip04-d01.dtb
 dtb-$(CONFIG_ARCH_HISI) += \
+	hi3516cv300-demb.dtb \
 	hi3519-demb.dtb
 dtb-$(CONFIG_ARCH_HIX5HD2) += \
 	hisi-x5hd2-dkb.dtb
diff --git a/arch/arm/boot/dts/hi3516cv300-demb.dts b/arch/arm/boot/dts/hi3516cv300-demb.dts
new file mode 100644
index 0000000..6a75cd6
--- /dev/null
+++ b/arch/arm/boot/dts/hi3516cv300-demb.dts
@@ -0,0 +1,148 @@
+/*
+ * Copyright (c) 2016 HiSilicon Technologies Co., Ltd.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+/dts-v1/;
+#include "hi3516cv300.dtsi"
+
+/ {
+	model = "Hisilicon Hi3516CV300 DEMO Board";
+	compatible = "hisilicon,hi3516cv300";
+
+	aliases {
+		serial0 = &uart0;
+		serial1 = &uart1;
+		serial2 = &uart2;
+		i2c0 = &i2c_bus0;
+		i2c1 = &i2c_bus1;
+		spi0 = &spi_bus0;
+		spi1 = &spi_bus1;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	memory {
+		device_type = "memory";
+		reg = <0x80000000 0x10000000>;
+	};
+};
+
+&dual_timer0 {
+	status = "okay";
+};
+
+&watchdog {
+	status = "okay";
+};
+
+&pwm {
+	status = "okay";
+};
+
+&uart0 {
+	status = "okay";
+};
+
+&i2c_bus0 {
+	status = "okay";
+	clock-frequency = <100000>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c0_pmux>;
+};
+
+&i2c_bus1 {
+	status = "okay";
+	clock-frequency = <100000>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c1_pmux>;
+};
+
+&spi_bus0{
+	status = "disabled";
+	num-cs = <1>;
+	cs-gpios = <&gpio_chip0 6 0>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi0_pmux>;
+};
+
+&spi_bus1{
+	status = "okay";
+	num-cs = <2>;
+	cs-gpios = <&gpio_chip5 3 0>, <&gpio_chip5 4 0>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi1_pmux>;
+};
+
+&fmc {
+	spi-nor@0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <160000000>;
+		m25p,fast-read;
+	};
+};
+
+&mdio {
+	phy0: phy@1 {
+		reg = <1>;
+	};
+};
+
+&hisi_femac {
+	mac-address = [00 00 00 00 00 00];
+	phy-mode = "rmii";
+	phy-handle = <&phy0>;
+	hisilicon,phy-reset-delays-us = <10000 10000 150000>;
+};
+
+&dmac {
+	status = "okay";
+};
+
+&pmux {
+	i2c0_pmux: i2c0_pmux {
+		pinctrl-single,pins = <
+			0x2c 0x3
+			0x30 0x3>;
+	};
+
+	i2c1_pmux: i2c1_pmux {
+		pinctrl-single,pins = <
+			0x20 0x1
+			0x24 0x1>;
+	};
+
+	spi0_pmux: spi0_pmux {
+		pinctrl-single,pins = <
+			0x28 0x1
+			0x2c 0x1
+			0x30 0x1
+			0x34 0x1>;
+	};
+
+	spi1_pmux: spi1_pmux {
+		pinctrl-single,pins = <
+			0xc4 0x1
+			0xc8 0x1
+			0xcc 0x1
+			0xd0 0x1
+			0xd4 0x1>;
+	};
+};
diff --git a/arch/arm/boot/dts/hi3516cv300.dtsi b/arch/arm/boot/dts/hi3516cv300.dtsi
new file mode 100644
index 0000000..1da41ab
--- /dev/null
+++ b/arch/arm/boot/dts/hi3516cv300.dtsi
@@ -0,0 +1,397 @@
+/*
+ * Copyright (c) 2016 HiSilicon Technologies Co., Ltd.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "skeleton.dtsi"
+#include <dt-bindings/clock/hi3516cv300-clock.h>
+/ {
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu@0 {
+			device_type = "cpu";
+			compatible = "arm,arm926ej-s";
+			reg = <0>;
+		};
+	};
+
+	vic: interrupt-controller@10040000 {
+		compatible = "arm,pl190-vic";
+		interrupt-controller;
+		#interrupt-cells = <1>;
+		reg = <0x10040000 0x1000>;
+	};
+
+	soc {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "simple-bus";
+		interrupt-parent = <&vic>;
+		ranges;
+
+		clk_3m: clk_3m {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <3000000>;
+		};
+
+		clk_apb: clk_apb {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <50000000>;
+		};
+
+		crg: clock-reset-controller@12010000 {
+			compatible = "hisilicon,hi3516cv300-crg";
+			reg = <0x12010000 0x1000>;
+			#clock-cells = <1>;
+			#reset-cells = <2>;
+		};
+
+		sysctrl: system-controller@12020000 {
+			compatible = "hisilicon,hi3516cv300-sysctrl", "syscon";
+			reg = <0x12020000 0x1000>;
+			#clock-cells = <1>;
+		};
+
+		reboot {
+			compatible = "syscon-reboot";
+			regmap = <&sysctrl>;
+			offset = <0x4>;
+			mask = <0xdeadbeef>;
+		};
+
+		dual_timer0: dual_timer@12000000 {
+			compatible = "arm,sp804", "arm,primecell";
+			reg = <0x12000000 0x1000>;
+			interrupts = <3>;
+			clocks = <&clk_3m>, <&clk_3m>, <&clk_apb>;
+			clock-names = "timer0", "timer1", "apb_pclk";
+			status = "disabled";
+		};
+
+		dual_timer1: dual_timer@12001000 {
+			compatible = "arm,sp804", "arm,primecell";
+			reg = <0x12001000 0x1000>;
+			interrupts = <4>;
+			clocks = <&clk_3m>, <&clk_3m>, <&clk_apb>;
+			clock-names = "timer0", "timer1", "apb_pclk";
+			status = "disabled";
+		};
+
+		watchdog: watchdog@12080000 {
+			compatible = "arm,sp805-wdt", "arm,primecell";
+			arm,primecell-periphid = <0x00141805>;
+			reg = <0x12080000 0x1000>;
+			clocks = <&sysctrl HI3516CV300_WDT_CLK>,
+				<&crg HI3516CV300_APB_CLK>;
+			clock-names = "wdog_clk", "apb_pclk";
+			status = "disabled";
+		};
+
+		pwm: pwm@12130000 {
+			compatible = "hisilicon,hi3516cv300-pwm",
+				"hisilicon,hibvt-pwm";
+			reg = <0x12130000 0x10000>;
+			clocks = <&crg HI3516CV300_PWM_CLK>;
+			resets = <&crg 0x38 0>;
+			#pwm-cells = <2>;
+			status = "disabled";
+		};
+
+		uart0: uart@12100000 {
+			compatible = "arm,pl011", "arm,primecell";
+			reg = <0x12100000 0x1000>;
+			interrupts = <5>;
+			clocks = <&crg HI3516CV300_UART0_CLK>;
+			clock-names = "apb_pclk";
+			status = "disabled";
+		};
+
+		uart1: uart@12101000 {
+			compatible = "arm,pl011", "arm,primecell";
+			reg = <0x12101000 0x1000>;
+			interrupts = <30>;
+			clocks = <&crg HI3516CV300_UART1_CLK>;
+			clock-names = "apb_pclk";
+			status = "disabled";
+		};
+
+		uart2: uart@12102000 {
+			compatible = "arm,pl011", "arm,primecell";
+			reg = <0x12102000 0x1000>;
+			interrupts = <25>;
+			clocks = <&crg HI3516CV300_UART2_CLK>;
+			clock-names = "apb_pclk";
+			status = "disabled";
+		};
+
+		i2c_bus0: i2c@12110000 {
+			compatible = "hisilicon,hi3516cv300-i2c",
+				"hisilicon,hibvt-i2c";
+			reg = <0x12110000 0x1000>;
+			clocks = <&crg HI3516CV300_APB_CLK>;
+			status = "disabled";
+		};
+
+		i2c_bus1: i2c@12112000 {
+			compatible = "hisilicon,hi3516cv300-i2c",
+				"hisilicon,hibvt-i2c";
+			reg = <0x12112000 0x1000>;
+			clocks = <&crg HI3516CV300_APB_CLK>;
+			status = "disabled";
+		};
+
+		spi_bus0: spi@12120000 {
+			compatible = "arm,pl022", "arm,primecell";
+			reg = <0x12120000 0x1000>;
+			interrupts = <6>;
+			clocks = <&crg HI3516CV300_SPI0_CLK>;
+			clock-names = "apb_pclk";
+			dmas = <&dmac 12 1>, <&dmac 13 2>;
+			dma-names = "rx", "tx";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		spi_bus1: spi@12121000 {
+			compatible = "arm,pl022", "arm,primecell";
+			reg = <0x12121000 0x1000>, <0x12030000 0x4>;
+			interrupts = <7>;
+			clocks = <&crg HI3516CV300_SPI1_CLK>;
+			clock-names = "apb_pclk";
+			dmas = <&dmac 14 1>, <&dmac 15 2>;
+			dma-names = "rx", "tx";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		fmc: spi-nor-controller@10000000 {
+			compatible = "hisilicon,fmc-spi-nor";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			reg = <0x10000000 0x1000>, <0x14000000 0x1000000>;
+			reg-names = "control", "memory";
+			clocks = <&crg HI3516CV300_FMC_CLK>;
+			assigned-clocks = <&crg HI3516CV300_FMC_CLK>;
+			assigned-clock-rates = <24000000>;
+		};
+
+		mdio: mdio@10051100 {
+			compatible = "hisilicon,hisi-femac-mdio";
+			reg = <0x10051100 0x10>;
+			clocks = <&crg HI3516CV300_ETH_CLK>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+		};
+
+		hisi_femac: ethernet@10090000 {
+			compatible = "hisilicon,hi3516cv300-femac",
+				"hisilicon,hisi-femac-v2";
+			reg = <0x10050000 0x1000>,<0x10051300 0x200>;
+			interrupts = <12>;
+			clocks = <&crg HI3516CV300_ETH_CLK>;
+			resets = <&crg 0xec 0>, <&crg 0xec 3>;
+			reset-names = "mac","phy";
+		};
+
+		dmac: dma-controller@10030000 {
+			compatible = "arm,pl080", "arm,primecell";
+			reg = <0x10030000 0x1000>;
+			interrupts = <14>;
+			clocks = <&crg HI3516CV300_DMAC_CLK>;
+			clock-names = "apb_pclk";
+			lli-bus-interface-ahb1;
+			lli-bus-interface-ahb2;
+			mem-bus-interface-ahb1;
+			mem-bus-interface-ahb2;
+			memcpy-burst-size = <256>;
+			memcpy-bus-width = <32>;
+			#dma-cells = <2>;
+			status = "disabled";
+		};
+
+		gpio_chip0: gpio@12140000 {
+			compatible = "arm,pl061", "arm,primecell";
+			reg = <0x12140000 0x1000>;
+			interrupts = <31>;
+			clocks = <&crg HI3516CV300_APB_CLK>;
+			clock-names = "apb_pclk";
+			#gpio-cells = <2>;
+			gpio-ranges = <&pmux 0 61 2>,
+				<&pmux 4 11 1>,
+				<&pmux 5 10 1>,
+				<&pmux 6 13 2>;
+
+			status = "disabled";
+		};
+
+		gpio_chip1: gpio@12141000 {
+			compatible = "arm,pl061", "arm,primecell";
+			reg = <0x12141000 0x1000>;
+			interrupts = <31>;
+			clocks = <&crg HI3516CV300_APB_CLK>;
+			clock-names = "apb_pclk";
+			#gpio-cells = <2>;
+			gpio-ranges = <&pmux 0 16 7>,
+				<&pmux 7 0 1>;
+			status = "disabled";
+		};
+
+		gpio_chip2: gpio@12142000 {
+			compatible = "arm,pl061", "arm,primecell";
+			reg = <0x12142000 0x1000>;
+			interrupts = <31>;
+			clocks = <&crg HI3516CV300_APB_CLK>;
+			clock-names = "apb_pclk";
+			#gpio-cells = <2>;
+			gpio-ranges = <&pmux 0 46 1>,
+				<&pmux 1 45 1>,
+				<&pmux 2 44 1>,
+				<&pmux 3 43 1>,
+				<&pmux 4 39 1>,
+				<&pmux 5 38 1>,
+				<&pmux 6 40 1>,
+				<&pmux 7 48 1>;
+			status = "disabled";
+		};
+
+		gpio_chip3: gpio@12143000 {
+			compatible = "arm,pl061", "arm,primecell";
+			reg = <0x12143000 0x1000>;
+			interrupts = <31>;
+			clocks = <&crg HI3516CV300_APB_CLK>;
+			clock-names = "apb_pclk";
+			#gpio-cells = <2>;
+			gpio-ranges = <&pmux 0 37 1>,
+				<&pmux 1 36 1>,
+				<&pmux 2 35 1>,
+				<&pmux 3 34 1>,
+				<&pmux 4 23 2>,
+				<&pmux 6 8 2>;
+			status = "disabled";
+		};
+
+		gpio_chip4: gpio@12144000 {
+			compatible = "arm,pl061", "arm,primecell";
+			reg = <0x12144000 0x1000>;
+			interrupts = <31>;
+			clocks = <&crg HI3516CV300_APB_CLK>;
+			clock-names = "apb_pclk";
+			#gpio-cells = <2>;
+			gpio-ranges = <&pmux 0 27 1>,
+				<&pmux 1 26 1>,
+				<&pmux 2 31 1>,
+				<&pmux 3 30 1>,
+				<&pmux 4 28 2>,
+				<&pmux 6 33 1>,
+				<&pmux 7 32 1>;
+			status = "disabled";
+		};
+
+		gpio_chip5: gpio@12145000 {
+			compatible = "arm,pl061", "arm,primecell";
+			reg = <0x12145000 0x1000>;
+			interrupts = <31>;
+			clocks = <&crg HI3516CV300_APB_CLK>;
+			clock-names = "apb_pclk";
+			#gpio-cells = <2>;
+			gpio-ranges = <&pmux 0 53 1>,
+				<&pmux 1 51 2>,
+				<&pmux 3 50 1>,
+				<&pmux 4 49 1>,
+				<&pmux 5 47 1>,
+				<&pmux 6 40 2>;
+			status = "disabled";
+		};
+
+		gpio_chip6: gpio@12146000 {
+			compatible = "arm,pl061", "arm,primecell";
+			reg = <0x12146000 0x1000>;
+			interrupts = <31>;
+			clocks = <&crg HI3516CV300_APB_CLK>;
+			clock-names = "apb_pclk";
+			#gpio-cells = <2>;
+			gpio-ranges = <&pmux 0 7 1>,
+				<&pmux 1 6 1>,
+				<&pmux 2 4 1>,
+				<&pmux 3 5 1>,
+				<&pmux 4 15 1>,
+				<&pmux 5 1 3>;
+			status = "disabled";
+		};
+
+		gpio_chip7: gpio@12147000 {
+			compatible = "arm,pl061", "arm,primecell";
+			reg = <0x12147000 0x1000>;
+			interrupts = <31>;
+			clocks = <&crg HI3516CV300_APB_CLK>;
+			clock-names = "apb_pclk";
+			#gpio-cells = <2>;
+			gpio-ranges = <&pmux 1 55 6>,
+				<&pmux 7 25 1>;
+			status = "disabled";
+		};
+
+		gpio_chip8: gpio@12148000 {
+			compatible = "arm,pl061", "arm,primecell";
+			reg = <0x12148000 0x1000>;
+			interrupts = <31>;
+			clocks = <&crg HI3516CV300_APB_CLK>;
+			clock-names = "apb_pclk";
+			#gpio-cells = <2>;
+			gpio-ranges = <&pmux 0 63 3>,
+				<&pmux 3 12 1>;
+			status = "disabled";
+		};
+
+		pmux: pinmux@12040000 {
+			compatible = "pinctrl-single";
+			reg = <0x12040000 0x108>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			#gpio-range-cells = <3>;
+			ranges;
+
+			pinctrl-single,register-width = <32>;
+			pinctrl-single,function-mask = <7>;
+			/* pin base, nr pins & gpio function */
+			pinctrl-single,gpio-range = <&range 0 54 0
+				&range 55 6 1 &range 61 5 0>;
+
+			range: gpio-range {
+				#pinctrl-single,gpio-range-cells = <3>;
+			};
+		};
+
+		pconf: pinconf@12040800 {
+			compatible = "pinconf-single";
+			reg = <0x12040800 0x130>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges;
+
+			pinctrl-single,register-width = <32>;
+		};
+	};
+};
-- 
2.9.3


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

* [PATCH 3/3] dts: hisi: add dts files for Hi3516CV300 demo board
@ 2016-10-17 12:07   ` Pan Wen
  0 siblings, 0 replies; 68+ messages in thread
From: Pan Wen @ 2016-10-17 12:07 UTC (permalink / raw)
  To: linux-arm-kernel

Add dts files for Hi3516CV300 demo board.

Signed-off-by: Pan Wen <wenpan@hisilicon.com>
---
 arch/arm/boot/dts/Makefile             |   1 +
 arch/arm/boot/dts/hi3516cv300-demb.dts | 148 ++++++++++++
 arch/arm/boot/dts/hi3516cv300.dtsi     | 397 +++++++++++++++++++++++++++++++++
 3 files changed, 546 insertions(+)
 create mode 100644 arch/arm/boot/dts/hi3516cv300-demb.dts
 create mode 100644 arch/arm/boot/dts/hi3516cv300.dtsi

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index befcd26..1f25530 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -171,6 +171,7 @@ dtb-$(CONFIG_ARCH_HIP01) += \
 dtb-$(CONFIG_ARCH_HIP04) += \
 	hip04-d01.dtb
 dtb-$(CONFIG_ARCH_HISI) += \
+	hi3516cv300-demb.dtb \
 	hi3519-demb.dtb
 dtb-$(CONFIG_ARCH_HIX5HD2) += \
 	hisi-x5hd2-dkb.dtb
diff --git a/arch/arm/boot/dts/hi3516cv300-demb.dts b/arch/arm/boot/dts/hi3516cv300-demb.dts
new file mode 100644
index 0000000..6a75cd6
--- /dev/null
+++ b/arch/arm/boot/dts/hi3516cv300-demb.dts
@@ -0,0 +1,148 @@
+/*
+ * Copyright (c) 2016 HiSilicon Technologies Co., Ltd.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+/dts-v1/;
+#include "hi3516cv300.dtsi"
+
+/ {
+	model = "Hisilicon Hi3516CV300 DEMO Board";
+	compatible = "hisilicon,hi3516cv300";
+
+	aliases {
+		serial0 = &uart0;
+		serial1 = &uart1;
+		serial2 = &uart2;
+		i2c0 = &i2c_bus0;
+		i2c1 = &i2c_bus1;
+		spi0 = &spi_bus0;
+		spi1 = &spi_bus1;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	memory {
+		device_type = "memory";
+		reg = <0x80000000 0x10000000>;
+	};
+};
+
+&dual_timer0 {
+	status = "okay";
+};
+
+&watchdog {
+	status = "okay";
+};
+
+&pwm {
+	status = "okay";
+};
+
+&uart0 {
+	status = "okay";
+};
+
+&i2c_bus0 {
+	status = "okay";
+	clock-frequency = <100000>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c0_pmux>;
+};
+
+&i2c_bus1 {
+	status = "okay";
+	clock-frequency = <100000>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c1_pmux>;
+};
+
+&spi_bus0{
+	status = "disabled";
+	num-cs = <1>;
+	cs-gpios = <&gpio_chip0 6 0>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi0_pmux>;
+};
+
+&spi_bus1{
+	status = "okay";
+	num-cs = <2>;
+	cs-gpios = <&gpio_chip5 3 0>, <&gpio_chip5 4 0>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi1_pmux>;
+};
+
+&fmc {
+	spi-nor at 0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <160000000>;
+		m25p,fast-read;
+	};
+};
+
+&mdio {
+	phy0: phy at 1 {
+		reg = <1>;
+	};
+};
+
+&hisi_femac {
+	mac-address = [00 00 00 00 00 00];
+	phy-mode = "rmii";
+	phy-handle = <&phy0>;
+	hisilicon,phy-reset-delays-us = <10000 10000 150000>;
+};
+
+&dmac {
+	status = "okay";
+};
+
+&pmux {
+	i2c0_pmux: i2c0_pmux {
+		pinctrl-single,pins = <
+			0x2c 0x3
+			0x30 0x3>;
+	};
+
+	i2c1_pmux: i2c1_pmux {
+		pinctrl-single,pins = <
+			0x20 0x1
+			0x24 0x1>;
+	};
+
+	spi0_pmux: spi0_pmux {
+		pinctrl-single,pins = <
+			0x28 0x1
+			0x2c 0x1
+			0x30 0x1
+			0x34 0x1>;
+	};
+
+	spi1_pmux: spi1_pmux {
+		pinctrl-single,pins = <
+			0xc4 0x1
+			0xc8 0x1
+			0xcc 0x1
+			0xd0 0x1
+			0xd4 0x1>;
+	};
+};
diff --git a/arch/arm/boot/dts/hi3516cv300.dtsi b/arch/arm/boot/dts/hi3516cv300.dtsi
new file mode 100644
index 0000000..1da41ab
--- /dev/null
+++ b/arch/arm/boot/dts/hi3516cv300.dtsi
@@ -0,0 +1,397 @@
+/*
+ * Copyright (c) 2016 HiSilicon Technologies Co., Ltd.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "skeleton.dtsi"
+#include <dt-bindings/clock/hi3516cv300-clock.h>
+/ {
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu at 0 {
+			device_type = "cpu";
+			compatible = "arm,arm926ej-s";
+			reg = <0>;
+		};
+	};
+
+	vic: interrupt-controller at 10040000 {
+		compatible = "arm,pl190-vic";
+		interrupt-controller;
+		#interrupt-cells = <1>;
+		reg = <0x10040000 0x1000>;
+	};
+
+	soc {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "simple-bus";
+		interrupt-parent = <&vic>;
+		ranges;
+
+		clk_3m: clk_3m {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <3000000>;
+		};
+
+		clk_apb: clk_apb {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <50000000>;
+		};
+
+		crg: clock-reset-controller at 12010000 {
+			compatible = "hisilicon,hi3516cv300-crg";
+			reg = <0x12010000 0x1000>;
+			#clock-cells = <1>;
+			#reset-cells = <2>;
+		};
+
+		sysctrl: system-controller at 12020000 {
+			compatible = "hisilicon,hi3516cv300-sysctrl", "syscon";
+			reg = <0x12020000 0x1000>;
+			#clock-cells = <1>;
+		};
+
+		reboot {
+			compatible = "syscon-reboot";
+			regmap = <&sysctrl>;
+			offset = <0x4>;
+			mask = <0xdeadbeef>;
+		};
+
+		dual_timer0: dual_timer at 12000000 {
+			compatible = "arm,sp804", "arm,primecell";
+			reg = <0x12000000 0x1000>;
+			interrupts = <3>;
+			clocks = <&clk_3m>, <&clk_3m>, <&clk_apb>;
+			clock-names = "timer0", "timer1", "apb_pclk";
+			status = "disabled";
+		};
+
+		dual_timer1: dual_timer at 12001000 {
+			compatible = "arm,sp804", "arm,primecell";
+			reg = <0x12001000 0x1000>;
+			interrupts = <4>;
+			clocks = <&clk_3m>, <&clk_3m>, <&clk_apb>;
+			clock-names = "timer0", "timer1", "apb_pclk";
+			status = "disabled";
+		};
+
+		watchdog: watchdog at 12080000 {
+			compatible = "arm,sp805-wdt", "arm,primecell";
+			arm,primecell-periphid = <0x00141805>;
+			reg = <0x12080000 0x1000>;
+			clocks = <&sysctrl HI3516CV300_WDT_CLK>,
+				<&crg HI3516CV300_APB_CLK>;
+			clock-names = "wdog_clk", "apb_pclk";
+			status = "disabled";
+		};
+
+		pwm: pwm at 12130000 {
+			compatible = "hisilicon,hi3516cv300-pwm",
+				"hisilicon,hibvt-pwm";
+			reg = <0x12130000 0x10000>;
+			clocks = <&crg HI3516CV300_PWM_CLK>;
+			resets = <&crg 0x38 0>;
+			#pwm-cells = <2>;
+			status = "disabled";
+		};
+
+		uart0: uart at 12100000 {
+			compatible = "arm,pl011", "arm,primecell";
+			reg = <0x12100000 0x1000>;
+			interrupts = <5>;
+			clocks = <&crg HI3516CV300_UART0_CLK>;
+			clock-names = "apb_pclk";
+			status = "disabled";
+		};
+
+		uart1: uart at 12101000 {
+			compatible = "arm,pl011", "arm,primecell";
+			reg = <0x12101000 0x1000>;
+			interrupts = <30>;
+			clocks = <&crg HI3516CV300_UART1_CLK>;
+			clock-names = "apb_pclk";
+			status = "disabled";
+		};
+
+		uart2: uart at 12102000 {
+			compatible = "arm,pl011", "arm,primecell";
+			reg = <0x12102000 0x1000>;
+			interrupts = <25>;
+			clocks = <&crg HI3516CV300_UART2_CLK>;
+			clock-names = "apb_pclk";
+			status = "disabled";
+		};
+
+		i2c_bus0: i2c at 12110000 {
+			compatible = "hisilicon,hi3516cv300-i2c",
+				"hisilicon,hibvt-i2c";
+			reg = <0x12110000 0x1000>;
+			clocks = <&crg HI3516CV300_APB_CLK>;
+			status = "disabled";
+		};
+
+		i2c_bus1: i2c at 12112000 {
+			compatible = "hisilicon,hi3516cv300-i2c",
+				"hisilicon,hibvt-i2c";
+			reg = <0x12112000 0x1000>;
+			clocks = <&crg HI3516CV300_APB_CLK>;
+			status = "disabled";
+		};
+
+		spi_bus0: spi at 12120000 {
+			compatible = "arm,pl022", "arm,primecell";
+			reg = <0x12120000 0x1000>;
+			interrupts = <6>;
+			clocks = <&crg HI3516CV300_SPI0_CLK>;
+			clock-names = "apb_pclk";
+			dmas = <&dmac 12 1>, <&dmac 13 2>;
+			dma-names = "rx", "tx";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		spi_bus1: spi at 12121000 {
+			compatible = "arm,pl022", "arm,primecell";
+			reg = <0x12121000 0x1000>, <0x12030000 0x4>;
+			interrupts = <7>;
+			clocks = <&crg HI3516CV300_SPI1_CLK>;
+			clock-names = "apb_pclk";
+			dmas = <&dmac 14 1>, <&dmac 15 2>;
+			dma-names = "rx", "tx";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		fmc: spi-nor-controller at 10000000 {
+			compatible = "hisilicon,fmc-spi-nor";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			reg = <0x10000000 0x1000>, <0x14000000 0x1000000>;
+			reg-names = "control", "memory";
+			clocks = <&crg HI3516CV300_FMC_CLK>;
+			assigned-clocks = <&crg HI3516CV300_FMC_CLK>;
+			assigned-clock-rates = <24000000>;
+		};
+
+		mdio: mdio at 10051100 {
+			compatible = "hisilicon,hisi-femac-mdio";
+			reg = <0x10051100 0x10>;
+			clocks = <&crg HI3516CV300_ETH_CLK>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+		};
+
+		hisi_femac: ethernet at 10090000 {
+			compatible = "hisilicon,hi3516cv300-femac",
+				"hisilicon,hisi-femac-v2";
+			reg = <0x10050000 0x1000>,<0x10051300 0x200>;
+			interrupts = <12>;
+			clocks = <&crg HI3516CV300_ETH_CLK>;
+			resets = <&crg 0xec 0>, <&crg 0xec 3>;
+			reset-names = "mac","phy";
+		};
+
+		dmac: dma-controller at 10030000 {
+			compatible = "arm,pl080", "arm,primecell";
+			reg = <0x10030000 0x1000>;
+			interrupts = <14>;
+			clocks = <&crg HI3516CV300_DMAC_CLK>;
+			clock-names = "apb_pclk";
+			lli-bus-interface-ahb1;
+			lli-bus-interface-ahb2;
+			mem-bus-interface-ahb1;
+			mem-bus-interface-ahb2;
+			memcpy-burst-size = <256>;
+			memcpy-bus-width = <32>;
+			#dma-cells = <2>;
+			status = "disabled";
+		};
+
+		gpio_chip0: gpio at 12140000 {
+			compatible = "arm,pl061", "arm,primecell";
+			reg = <0x12140000 0x1000>;
+			interrupts = <31>;
+			clocks = <&crg HI3516CV300_APB_CLK>;
+			clock-names = "apb_pclk";
+			#gpio-cells = <2>;
+			gpio-ranges = <&pmux 0 61 2>,
+				<&pmux 4 11 1>,
+				<&pmux 5 10 1>,
+				<&pmux 6 13 2>;
+
+			status = "disabled";
+		};
+
+		gpio_chip1: gpio at 12141000 {
+			compatible = "arm,pl061", "arm,primecell";
+			reg = <0x12141000 0x1000>;
+			interrupts = <31>;
+			clocks = <&crg HI3516CV300_APB_CLK>;
+			clock-names = "apb_pclk";
+			#gpio-cells = <2>;
+			gpio-ranges = <&pmux 0 16 7>,
+				<&pmux 7 0 1>;
+			status = "disabled";
+		};
+
+		gpio_chip2: gpio at 12142000 {
+			compatible = "arm,pl061", "arm,primecell";
+			reg = <0x12142000 0x1000>;
+			interrupts = <31>;
+			clocks = <&crg HI3516CV300_APB_CLK>;
+			clock-names = "apb_pclk";
+			#gpio-cells = <2>;
+			gpio-ranges = <&pmux 0 46 1>,
+				<&pmux 1 45 1>,
+				<&pmux 2 44 1>,
+				<&pmux 3 43 1>,
+				<&pmux 4 39 1>,
+				<&pmux 5 38 1>,
+				<&pmux 6 40 1>,
+				<&pmux 7 48 1>;
+			status = "disabled";
+		};
+
+		gpio_chip3: gpio at 12143000 {
+			compatible = "arm,pl061", "arm,primecell";
+			reg = <0x12143000 0x1000>;
+			interrupts = <31>;
+			clocks = <&crg HI3516CV300_APB_CLK>;
+			clock-names = "apb_pclk";
+			#gpio-cells = <2>;
+			gpio-ranges = <&pmux 0 37 1>,
+				<&pmux 1 36 1>,
+				<&pmux 2 35 1>,
+				<&pmux 3 34 1>,
+				<&pmux 4 23 2>,
+				<&pmux 6 8 2>;
+			status = "disabled";
+		};
+
+		gpio_chip4: gpio at 12144000 {
+			compatible = "arm,pl061", "arm,primecell";
+			reg = <0x12144000 0x1000>;
+			interrupts = <31>;
+			clocks = <&crg HI3516CV300_APB_CLK>;
+			clock-names = "apb_pclk";
+			#gpio-cells = <2>;
+			gpio-ranges = <&pmux 0 27 1>,
+				<&pmux 1 26 1>,
+				<&pmux 2 31 1>,
+				<&pmux 3 30 1>,
+				<&pmux 4 28 2>,
+				<&pmux 6 33 1>,
+				<&pmux 7 32 1>;
+			status = "disabled";
+		};
+
+		gpio_chip5: gpio at 12145000 {
+			compatible = "arm,pl061", "arm,primecell";
+			reg = <0x12145000 0x1000>;
+			interrupts = <31>;
+			clocks = <&crg HI3516CV300_APB_CLK>;
+			clock-names = "apb_pclk";
+			#gpio-cells = <2>;
+			gpio-ranges = <&pmux 0 53 1>,
+				<&pmux 1 51 2>,
+				<&pmux 3 50 1>,
+				<&pmux 4 49 1>,
+				<&pmux 5 47 1>,
+				<&pmux 6 40 2>;
+			status = "disabled";
+		};
+
+		gpio_chip6: gpio at 12146000 {
+			compatible = "arm,pl061", "arm,primecell";
+			reg = <0x12146000 0x1000>;
+			interrupts = <31>;
+			clocks = <&crg HI3516CV300_APB_CLK>;
+			clock-names = "apb_pclk";
+			#gpio-cells = <2>;
+			gpio-ranges = <&pmux 0 7 1>,
+				<&pmux 1 6 1>,
+				<&pmux 2 4 1>,
+				<&pmux 3 5 1>,
+				<&pmux 4 15 1>,
+				<&pmux 5 1 3>;
+			status = "disabled";
+		};
+
+		gpio_chip7: gpio at 12147000 {
+			compatible = "arm,pl061", "arm,primecell";
+			reg = <0x12147000 0x1000>;
+			interrupts = <31>;
+			clocks = <&crg HI3516CV300_APB_CLK>;
+			clock-names = "apb_pclk";
+			#gpio-cells = <2>;
+			gpio-ranges = <&pmux 1 55 6>,
+				<&pmux 7 25 1>;
+			status = "disabled";
+		};
+
+		gpio_chip8: gpio at 12148000 {
+			compatible = "arm,pl061", "arm,primecell";
+			reg = <0x12148000 0x1000>;
+			interrupts = <31>;
+			clocks = <&crg HI3516CV300_APB_CLK>;
+			clock-names = "apb_pclk";
+			#gpio-cells = <2>;
+			gpio-ranges = <&pmux 0 63 3>,
+				<&pmux 3 12 1>;
+			status = "disabled";
+		};
+
+		pmux: pinmux at 12040000 {
+			compatible = "pinctrl-single";
+			reg = <0x12040000 0x108>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			#gpio-range-cells = <3>;
+			ranges;
+
+			pinctrl-single,register-width = <32>;
+			pinctrl-single,function-mask = <7>;
+			/* pin base, nr pins & gpio function */
+			pinctrl-single,gpio-range = <&range 0 54 0
+				&range 55 6 1 &range 61 5 0>;
+
+			range: gpio-range {
+				#pinctrl-single,gpio-range-cells = <3>;
+			};
+		};
+
+		pconf: pinconf at 12040800 {
+			compatible = "pinconf-single";
+			reg = <0x12040800 0x130>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges;
+
+			pinctrl-single,register-width = <32>;
+		};
+	};
+};
-- 
2.9.3

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

* Re: [PATCH 1/3] arm: hisi: add ARCH_MULTI_V5 support
@ 2016-10-17 13:48     ` Arnd Bergmann
  0 siblings, 0 replies; 68+ messages in thread
From: Arnd Bergmann @ 2016-10-17 13:48 UTC (permalink / raw)
  To: Pan Wen
  Cc: mturquette, sboyd, robh+dt, mark.rutland, linux, xuwei5,
	linux-clk, devicetree, linux-kernel, linux-arm-kernel,
	howell.yang, xuejiancheng, jalen.hsu, lvkuanliang, suwenping,
	raojun, kevin.lixu, Marty Plummer

On Monday, October 17, 2016 8:07:03 PM CEST Pan Wen wrote:
> Add support for some HiSilicon SoCs which depend on ARCH_MULTI_V5.
> 
> Signed-off-by: Pan Wen <wenpan@hisilicon.com>
> 

Looks ok. I've added Marty Plummer to Cc, he was recently proposing
patches for Hi3520, which I think is closely related to this one.
Please try to work together so the patches don't conflict. It should
be fairly straightforward since you are basically doing the same
change here.

	Arnd

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

* Re: [PATCH 1/3] arm: hisi: add ARCH_MULTI_V5 support
@ 2016-10-17 13:48     ` Arnd Bergmann
  0 siblings, 0 replies; 68+ messages in thread
From: Arnd Bergmann @ 2016-10-17 13:48 UTC (permalink / raw)
  To: Pan Wen
  Cc: mturquette-rdvid1DuHRBWk0Htik3J/w, sboyd-sgV2jX0FEOL9JmXXK+q4OQ,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A, mark.rutland-5wv7dgnIgG8,
	linux-I+IVW8TIWO2tmTQ+vhA3Yw, xuwei5-C8/M+/jPZTeaMJb+Lgu22Q,
	linux-clk-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	howell.yang-C8/M+/jPZTeaMJb+Lgu22Q,
	xuejiancheng-C8/M+/jPZTeaMJb+Lgu22Q,
	jalen.hsu-C8/M+/jPZTeaMJb+Lgu22Q,
	lvkuanliang-C8/M+/jPZTeaMJb+Lgu22Q,
	suwenping-C8/M+/jPZTeaMJb+Lgu22Q, raojun-C8/M+/jPZTeaMJb+Lgu22Q,
	kevin.lixu-C8/M+/jPZTeaMJb+Lgu22Q, Marty Plummer

On Monday, October 17, 2016 8:07:03 PM CEST Pan Wen wrote:
> Add support for some HiSilicon SoCs which depend on ARCH_MULTI_V5.
> 
> Signed-off-by: Pan Wen <wenpan-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>
> 

Looks ok. I've added Marty Plummer to Cc, he was recently proposing
patches for Hi3520, which I think is closely related to this one.
Please try to work together so the patches don't conflict. It should
be fairly straightforward since you are basically doing the same
change here.

	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] 68+ messages in thread

* [PATCH 1/3] arm: hisi: add ARCH_MULTI_V5 support
@ 2016-10-17 13:48     ` Arnd Bergmann
  0 siblings, 0 replies; 68+ messages in thread
From: Arnd Bergmann @ 2016-10-17 13:48 UTC (permalink / raw)
  To: linux-arm-kernel

On Monday, October 17, 2016 8:07:03 PM CEST Pan Wen wrote:
> Add support for some HiSilicon SoCs which depend on ARCH_MULTI_V5.
> 
> Signed-off-by: Pan Wen <wenpan@hisilicon.com>
> 

Looks ok. I've added Marty Plummer to Cc, he was recently proposing
patches for Hi3520, which I think is closely related to this one.
Please try to work together so the patches don't conflict. It should
be fairly straightforward since you are basically doing the same
change here.

	Arnd

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

* Re: [PATCH 2/3] clk: hisilicon: add CRG driver for Hi3516CV300 SoC
  2016-10-17 12:07   ` Pan Wen
@ 2016-10-18 15:58     ` Rob Herring
  -1 siblings, 0 replies; 68+ messages in thread
From: Rob Herring @ 2016-10-18 15:58 UTC (permalink / raw)
  To: Pan Wen
  Cc: mturquette, sboyd, mark.rutland, linux, xuwei5, linux-clk,
	devicetree, linux-kernel, linux-arm-kernel, howell.yang,
	xuejiancheng, jalen.hsu, lvkuanliang, suwenping, raojun,
	kevin.lixu

On Mon, Oct 17, 2016 at 08:07:04PM +0800, Pan Wen wrote:
> Add CRG driver for Hi3516CV300 SoC. CRG(Clock and Reset
> Generator) module generates clock and reset signals used
> by other module blocks on SoC.
> 
> Signed-off-by: Pan Wen <wenpan@hisilicon.com>
> ---
>  .../devicetree/bindings/clock/hisi-crg.txt         |  50 ++++
>  drivers/clk/hisilicon/Kconfig                      |   8 +
>  drivers/clk/hisilicon/Makefile                     |   1 +
>  drivers/clk/hisilicon/crg-hi3516cv300.c            | 330 +++++++++++++++++++++
>  drivers/clk/hisilicon/crg.h                        |  34 +++
>  include/dt-bindings/clock/hi3516cv300-clock.h      |  48 +++
>  6 files changed, 471 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/clock/hisi-crg.txt
>  create mode 100644 drivers/clk/hisilicon/crg-hi3516cv300.c
>  create mode 100644 drivers/clk/hisilicon/crg.h
>  create mode 100644 include/dt-bindings/clock/hi3516cv300-clock.h
> 
> diff --git a/Documentation/devicetree/bindings/clock/hisi-crg.txt b/Documentation/devicetree/bindings/clock/hisi-crg.txt
> new file mode 100644
> index 0000000..cc60b3d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/hisi-crg.txt
> @@ -0,0 +1,50 @@
> +* HiSilicon Clock and Reset Generator(CRG)

Seems kind of generic given there's already various HiSi clock bindings 
documented.

> +
> +The CRG module provides clock and reset signals to various
> +modules within the SoC.
> +
> +This binding uses the following bindings:
> +    Documentation/devicetree/bindings/clock/clock-bindings.txt
> +    Documentation/devicetree/bindings/reset/reset.txt
> +
> +Required Properties:
> +
> +- compatible: should be one of the following.
> +  - "hisilicon,hi3516cv300-crg"
> +  - "hisilicon,hi3516cv300-sysctrl"
> +  - "hisilicon,hi3519-crg"

There is already a binding for this. Please merge them.

> +  - "hisilicon,hi3798cv200-crg"
> +  - "hisilicon,hi3798cv200-sysctrl"
> +
> +- reg: physical base address of the controller and length of memory mapped
> +  region.
> +
> +- #clock-cells: should be 1.
> +
> +Each clock is assigned an identifier and client nodes use this identifier
> +to specify the clock which they consume.
> +
> +All these identifier could be found in <dt-bindings/clock/hi3519-clock.h>.
> +
> +- #reset-cells: should be 2.
> +
> +A reset signal can be controlled by writing a bit register in the CRG module.
> +The reset specifier consists of two cells. The first cell represents the
> +register offset relative to the base address. The second cell represents the
> +bit index in the register.
> +
> +Example: CRG nodes
> +CRG: clock-reset-controller@12010000 {
> +	compatible = "hisilicon,hi3519-crg";
> +	reg = <0x12010000 0x10000>;
> +	#clock-cells = <1>;
> +	#reset-cells = <2>;
> +};
> +
> +Example: consumer nodes
> +i2c0: i2c@12110000 {
> +	compatible = "hisilicon,hi3519-i2c";
> +	reg = <0x12110000 0x1000>;
> +	clocks = <&CRG HI3519_I2C0_RST>;
> +	resets = <&CRG 0xe4 0>;
> +};

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

* [PATCH 2/3] clk: hisilicon: add CRG driver for Hi3516CV300 SoC
@ 2016-10-18 15:58     ` Rob Herring
  0 siblings, 0 replies; 68+ messages in thread
From: Rob Herring @ 2016-10-18 15:58 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Oct 17, 2016 at 08:07:04PM +0800, Pan Wen wrote:
> Add CRG driver for Hi3516CV300 SoC. CRG(Clock and Reset
> Generator) module generates clock and reset signals used
> by other module blocks on SoC.
> 
> Signed-off-by: Pan Wen <wenpan@hisilicon.com>
> ---
>  .../devicetree/bindings/clock/hisi-crg.txt         |  50 ++++
>  drivers/clk/hisilicon/Kconfig                      |   8 +
>  drivers/clk/hisilicon/Makefile                     |   1 +
>  drivers/clk/hisilicon/crg-hi3516cv300.c            | 330 +++++++++++++++++++++
>  drivers/clk/hisilicon/crg.h                        |  34 +++
>  include/dt-bindings/clock/hi3516cv300-clock.h      |  48 +++
>  6 files changed, 471 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/clock/hisi-crg.txt
>  create mode 100644 drivers/clk/hisilicon/crg-hi3516cv300.c
>  create mode 100644 drivers/clk/hisilicon/crg.h
>  create mode 100644 include/dt-bindings/clock/hi3516cv300-clock.h
> 
> diff --git a/Documentation/devicetree/bindings/clock/hisi-crg.txt b/Documentation/devicetree/bindings/clock/hisi-crg.txt
> new file mode 100644
> index 0000000..cc60b3d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/hisi-crg.txt
> @@ -0,0 +1,50 @@
> +* HiSilicon Clock and Reset Generator(CRG)

Seems kind of generic given there's already various HiSi clock bindings 
documented.

> +
> +The CRG module provides clock and reset signals to various
> +modules within the SoC.
> +
> +This binding uses the following bindings:
> +    Documentation/devicetree/bindings/clock/clock-bindings.txt
> +    Documentation/devicetree/bindings/reset/reset.txt
> +
> +Required Properties:
> +
> +- compatible: should be one of the following.
> +  - "hisilicon,hi3516cv300-crg"
> +  - "hisilicon,hi3516cv300-sysctrl"
> +  - "hisilicon,hi3519-crg"

There is already a binding for this. Please merge them.

> +  - "hisilicon,hi3798cv200-crg"
> +  - "hisilicon,hi3798cv200-sysctrl"
> +
> +- reg: physical base address of the controller and length of memory mapped
> +  region.
> +
> +- #clock-cells: should be 1.
> +
> +Each clock is assigned an identifier and client nodes use this identifier
> +to specify the clock which they consume.
> +
> +All these identifier could be found in <dt-bindings/clock/hi3519-clock.h>.
> +
> +- #reset-cells: should be 2.
> +
> +A reset signal can be controlled by writing a bit register in the CRG module.
> +The reset specifier consists of two cells. The first cell represents the
> +register offset relative to the base address. The second cell represents the
> +bit index in the register.
> +
> +Example: CRG nodes
> +CRG: clock-reset-controller at 12010000 {
> +	compatible = "hisilicon,hi3519-crg";
> +	reg = <0x12010000 0x10000>;
> +	#clock-cells = <1>;
> +	#reset-cells = <2>;
> +};
> +
> +Example: consumer nodes
> +i2c0: i2c at 12110000 {
> +	compatible = "hisilicon,hi3519-i2c";
> +	reg = <0x12110000 0x1000>;
> +	clocks = <&CRG HI3519_I2C0_RST>;
> +	resets = <&CRG 0xe4 0>;
> +};

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

* Re: [PATCH 2/3] clk: hisilicon: add CRG driver for Hi3516CV300 SoC
  2016-10-18 15:58     ` Rob Herring
  (?)
@ 2016-10-19  2:38       ` Jiancheng Xue
  -1 siblings, 0 replies; 68+ messages in thread
From: Jiancheng Xue @ 2016-10-19  2:38 UTC (permalink / raw)
  To: Rob Herring, Pan Wen
  Cc: mturquette, sboyd, mark.rutland, linux, xuwei5, linux-clk,
	devicetree, linux-kernel, linux-arm-kernel, howell.yang,
	jalen.hsu, lvkuanliang, suwenping, raojun, kevin.lixu



在 2016/10/18 23:58, Rob Herring 写道:
> On Mon, Oct 17, 2016 at 08:07:04PM +0800, Pan Wen wrote:
>> Add CRG driver for Hi3516CV300 SoC. CRG(Clock and Reset
>> Generator) module generates clock and reset signals used
>> by other module blocks on SoC.
>>
>> Signed-off-by: Pan Wen <wenpan@hisilicon.com>
>> ---
>>  .../devicetree/bindings/clock/hisi-crg.txt         |  50 ++++
>>  drivers/clk/hisilicon/Kconfig                      |   8 +
>>  drivers/clk/hisilicon/Makefile                     |   1 +
>>  drivers/clk/hisilicon/crg-hi3516cv300.c            | 330 +++++++++++++++++++++
>>  drivers/clk/hisilicon/crg.h                        |  34 +++
>>  include/dt-bindings/clock/hi3516cv300-clock.h      |  48 +++
>>  6 files changed, 471 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/clock/hisi-crg.txt
>>  create mode 100644 drivers/clk/hisilicon/crg-hi3516cv300.c
>>  create mode 100644 drivers/clk/hisilicon/crg.h
>>  create mode 100644 include/dt-bindings/clock/hi3516cv300-clock.h
>>
>> diff --git a/Documentation/devicetree/bindings/clock/hisi-crg.txt b/Documentation/devicetree/bindings/clock/hisi-crg.txt
>> new file mode 100644
>> index 0000000..cc60b3d
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/clock/hisi-crg.txt
>> @@ -0,0 +1,50 @@
>> +* HiSilicon Clock and Reset Generator(CRG)
> 
> Seems kind of generic given there's already various HiSi clock bindings 
> documented.
> 
>> +
>> +The CRG module provides clock and reset signals to various
>> +modules within the SoC.
>> +
>> +This binding uses the following bindings:
>> +    Documentation/devicetree/bindings/clock/clock-bindings.txt
>> +    Documentation/devicetree/bindings/reset/reset.txt
>> +
>> +Required Properties:
>> +
>> +- compatible: should be one of the following.
>> +  - "hisilicon,hi3516cv300-crg"
>> +  - "hisilicon,hi3516cv300-sysctrl"
>> +  - "hisilicon,hi3519-crg"
> 
> There is already a binding for this. Please merge them.
> 
Hi Rob,

Pan Wen and I work together. There's really a same file included in the patch
https://lkml.org/lkml/2016/9/18/42 ([PATCH v2] clk: hisilicon: add CRG driver for Hi3798CV200 SoC).
But that patch has not been acked. This binding file will be merged if that
patch is accepted first. Could you give me more comments on that patch or
help me to ack it?  Thank you very much.

Regards,
Jiancheng


>> +  - "hisilicon,hi3798cv200-crg"
>> +  - "hisilicon,hi3798cv200-sysctrl"
>> +
>> +- reg: physical base address of the controller and length of memory mapped
>> +  region.
>> +
>> +- #clock-cells: should be 1.
>> +
>> +Each clock is assigned an identifier and client nodes use this identifier
>> +to specify the clock which they consume.
>> +
>> +All these identifier could be found in <dt-bindings/clock/hi3519-clock.h>.
>> +
>> +- #reset-cells: should be 2.
>> +
>> +A reset signal can be controlled by writing a bit register in the CRG module.
>> +The reset specifier consists of two cells. The first cell represents the
>> +register offset relative to the base address. The second cell represents the
>> +bit index in the register.
>> +
>> +Example: CRG nodes
>> +CRG: clock-reset-controller@12010000 {
>> +	compatible = "hisilicon,hi3519-crg";
>> +	reg = <0x12010000 0x10000>;
>> +	#clock-cells = <1>;
>> +	#reset-cells = <2>;
>> +};
>> +
>> +Example: consumer nodes
>> +i2c0: i2c@12110000 {
>> +	compatible = "hisilicon,hi3519-i2c";
>> +	reg = <0x12110000 0x1000>;
>> +	clocks = <&CRG HI3519_I2C0_RST>;
>> +	resets = <&CRG 0xe4 0>;
>> +};
> 
> .
> 

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

* Re: [PATCH 2/3] clk: hisilicon: add CRG driver for Hi3516CV300 SoC
@ 2016-10-19  2:38       ` Jiancheng Xue
  0 siblings, 0 replies; 68+ messages in thread
From: Jiancheng Xue @ 2016-10-19  2:38 UTC (permalink / raw)
  To: Rob Herring, Pan Wen
  Cc: mturquette-rdvid1DuHRBWk0Htik3J/w, sboyd-sgV2jX0FEOL9JmXXK+q4OQ,
	mark.rutland-5wv7dgnIgG8, linux-I+IVW8TIWO2tmTQ+vhA3Yw,
	xuwei5-C8/M+/jPZTeaMJb+Lgu22Q, linux-clk-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	howell.yang-C8/M+/jPZTeaMJb+Lgu22Q,
	jalen.hsu-C8/M+/jPZTeaMJb+Lgu22Q,
	lvkuanliang-C8/M+/jPZTeaMJb+Lgu22Q,
	suwenping-C8/M+/jPZTeaMJb+Lgu22Q, raojun-C8/M+/jPZTeaMJb+Lgu22Q,
	kevin.lixu-C8/M+/jPZTeaMJb+Lgu22Q



在 2016/10/18 23:58, Rob Herring 写道:
> On Mon, Oct 17, 2016 at 08:07:04PM +0800, Pan Wen wrote:
>> Add CRG driver for Hi3516CV300 SoC. CRG(Clock and Reset
>> Generator) module generates clock and reset signals used
>> by other module blocks on SoC.
>>
>> Signed-off-by: Pan Wen <wenpan-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>
>> ---
>>  .../devicetree/bindings/clock/hisi-crg.txt         |  50 ++++
>>  drivers/clk/hisilicon/Kconfig                      |   8 +
>>  drivers/clk/hisilicon/Makefile                     |   1 +
>>  drivers/clk/hisilicon/crg-hi3516cv300.c            | 330 +++++++++++++++++++++
>>  drivers/clk/hisilicon/crg.h                        |  34 +++
>>  include/dt-bindings/clock/hi3516cv300-clock.h      |  48 +++
>>  6 files changed, 471 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/clock/hisi-crg.txt
>>  create mode 100644 drivers/clk/hisilicon/crg-hi3516cv300.c
>>  create mode 100644 drivers/clk/hisilicon/crg.h
>>  create mode 100644 include/dt-bindings/clock/hi3516cv300-clock.h
>>
>> diff --git a/Documentation/devicetree/bindings/clock/hisi-crg.txt b/Documentation/devicetree/bindings/clock/hisi-crg.txt
>> new file mode 100644
>> index 0000000..cc60b3d
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/clock/hisi-crg.txt
>> @@ -0,0 +1,50 @@
>> +* HiSilicon Clock and Reset Generator(CRG)
> 
> Seems kind of generic given there's already various HiSi clock bindings 
> documented.
> 
>> +
>> +The CRG module provides clock and reset signals to various
>> +modules within the SoC.
>> +
>> +This binding uses the following bindings:
>> +    Documentation/devicetree/bindings/clock/clock-bindings.txt
>> +    Documentation/devicetree/bindings/reset/reset.txt
>> +
>> +Required Properties:
>> +
>> +- compatible: should be one of the following.
>> +  - "hisilicon,hi3516cv300-crg"
>> +  - "hisilicon,hi3516cv300-sysctrl"
>> +  - "hisilicon,hi3519-crg"
> 
> There is already a binding for this. Please merge them.
> 
Hi Rob,

Pan Wen and I work together. There's really a same file included in the patch
https://lkml.org/lkml/2016/9/18/42 ([PATCH v2] clk: hisilicon: add CRG driver for Hi3798CV200 SoC).
But that patch has not been acked. This binding file will be merged if that
patch is accepted first. Could you give me more comments on that patch or
help me to ack it?  Thank you very much.

Regards,
Jiancheng


>> +  - "hisilicon,hi3798cv200-crg"
>> +  - "hisilicon,hi3798cv200-sysctrl"
>> +
>> +- reg: physical base address of the controller and length of memory mapped
>> +  region.
>> +
>> +- #clock-cells: should be 1.
>> +
>> +Each clock is assigned an identifier and client nodes use this identifier
>> +to specify the clock which they consume.
>> +
>> +All these identifier could be found in <dt-bindings/clock/hi3519-clock.h>.
>> +
>> +- #reset-cells: should be 2.
>> +
>> +A reset signal can be controlled by writing a bit register in the CRG module.
>> +The reset specifier consists of two cells. The first cell represents the
>> +register offset relative to the base address. The second cell represents the
>> +bit index in the register.
>> +
>> +Example: CRG nodes
>> +CRG: clock-reset-controller@12010000 {
>> +	compatible = "hisilicon,hi3519-crg";
>> +	reg = <0x12010000 0x10000>;
>> +	#clock-cells = <1>;
>> +	#reset-cells = <2>;
>> +};
>> +
>> +Example: consumer nodes
>> +i2c0: i2c@12110000 {
>> +	compatible = "hisilicon,hi3519-i2c";
>> +	reg = <0x12110000 0x1000>;
>> +	clocks = <&CRG HI3519_I2C0_RST>;
>> +	resets = <&CRG 0xe4 0>;
>> +};
> 
> .
> 

--
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] 68+ messages in thread

* [PATCH 2/3] clk: hisilicon: add CRG driver for Hi3516CV300 SoC
@ 2016-10-19  2:38       ` Jiancheng Xue
  0 siblings, 0 replies; 68+ messages in thread
From: Jiancheng Xue @ 2016-10-19  2:38 UTC (permalink / raw)
  To: linux-arm-kernel



? 2016/10/18 23:58, Rob Herring ??:
> On Mon, Oct 17, 2016 at 08:07:04PM +0800, Pan Wen wrote:
>> Add CRG driver for Hi3516CV300 SoC. CRG(Clock and Reset
>> Generator) module generates clock and reset signals used
>> by other module blocks on SoC.
>>
>> Signed-off-by: Pan Wen <wenpan@hisilicon.com>
>> ---
>>  .../devicetree/bindings/clock/hisi-crg.txt         |  50 ++++
>>  drivers/clk/hisilicon/Kconfig                      |   8 +
>>  drivers/clk/hisilicon/Makefile                     |   1 +
>>  drivers/clk/hisilicon/crg-hi3516cv300.c            | 330 +++++++++++++++++++++
>>  drivers/clk/hisilicon/crg.h                        |  34 +++
>>  include/dt-bindings/clock/hi3516cv300-clock.h      |  48 +++
>>  6 files changed, 471 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/clock/hisi-crg.txt
>>  create mode 100644 drivers/clk/hisilicon/crg-hi3516cv300.c
>>  create mode 100644 drivers/clk/hisilicon/crg.h
>>  create mode 100644 include/dt-bindings/clock/hi3516cv300-clock.h
>>
>> diff --git a/Documentation/devicetree/bindings/clock/hisi-crg.txt b/Documentation/devicetree/bindings/clock/hisi-crg.txt
>> new file mode 100644
>> index 0000000..cc60b3d
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/clock/hisi-crg.txt
>> @@ -0,0 +1,50 @@
>> +* HiSilicon Clock and Reset Generator(CRG)
> 
> Seems kind of generic given there's already various HiSi clock bindings 
> documented.
> 
>> +
>> +The CRG module provides clock and reset signals to various
>> +modules within the SoC.
>> +
>> +This binding uses the following bindings:
>> +    Documentation/devicetree/bindings/clock/clock-bindings.txt
>> +    Documentation/devicetree/bindings/reset/reset.txt
>> +
>> +Required Properties:
>> +
>> +- compatible: should be one of the following.
>> +  - "hisilicon,hi3516cv300-crg"
>> +  - "hisilicon,hi3516cv300-sysctrl"
>> +  - "hisilicon,hi3519-crg"
> 
> There is already a binding for this. Please merge them.
> 
Hi Rob,

Pan Wen and I work together. There's really a same file included in the patch
https://lkml.org/lkml/2016/9/18/42 ([PATCH v2] clk: hisilicon: add CRG driver for Hi3798CV200 SoC).
But that patch has not been acked. This binding file will be merged if that
patch is accepted first. Could you give me more comments on that patch or
help me to ack it?  Thank you very much.

Regards,
Jiancheng


>> +  - "hisilicon,hi3798cv200-crg"
>> +  - "hisilicon,hi3798cv200-sysctrl"
>> +
>> +- reg: physical base address of the controller and length of memory mapped
>> +  region.
>> +
>> +- #clock-cells: should be 1.
>> +
>> +Each clock is assigned an identifier and client nodes use this identifier
>> +to specify the clock which they consume.
>> +
>> +All these identifier could be found in <dt-bindings/clock/hi3519-clock.h>.
>> +
>> +- #reset-cells: should be 2.
>> +
>> +A reset signal can be controlled by writing a bit register in the CRG module.
>> +The reset specifier consists of two cells. The first cell represents the
>> +register offset relative to the base address. The second cell represents the
>> +bit index in the register.
>> +
>> +Example: CRG nodes
>> +CRG: clock-reset-controller at 12010000 {
>> +	compatible = "hisilicon,hi3519-crg";
>> +	reg = <0x12010000 0x10000>;
>> +	#clock-cells = <1>;
>> +	#reset-cells = <2>;
>> +};
>> +
>> +Example: consumer nodes
>> +i2c0: i2c at 12110000 {
>> +	compatible = "hisilicon,hi3519-i2c";
>> +	reg = <0x12110000 0x1000>;
>> +	clocks = <&CRG HI3519_I2C0_RST>;
>> +	resets = <&CRG 0xe4 0>;
>> +};
> 
> .
> 

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

* Re: [PATCH 2/3] clk: hisilicon: add CRG driver for Hi3516CV300 SoC
  2016-10-19  2:38       ` Jiancheng Xue
  (?)
  (?)
@ 2016-10-19  2:45         ` Rob Herring
  -1 siblings, 0 replies; 68+ messages in thread
From: Rob Herring @ 2016-10-19  2:45 UTC (permalink / raw)
  To: Jiancheng Xue
  Cc: Pan Wen, Michael Turquette, Stephen Boyd, Mark Rutland,
	Russell King, Wei Xu, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel, howell.yang, jalen.hsu, lvkuanliang 00222834,
	suwenping, raojun, kevin.lixu

On Tue, Oct 18, 2016 at 9:38 PM, Jiancheng Xue
<xuejiancheng@hisilicon.com> wrote:
>
>
> 在 2016/10/18 23:58, Rob Herring 写道:
>> On Mon, Oct 17, 2016 at 08:07:04PM +0800, Pan Wen wrote:
>>> Add CRG driver for Hi3516CV300 SoC. CRG(Clock and Reset
>>> Generator) module generates clock and reset signals used
>>> by other module blocks on SoC.
>>>
>>> Signed-off-by: Pan Wen <wenpan@hisilicon.com>
>>> ---
>>>  .../devicetree/bindings/clock/hisi-crg.txt         |  50 ++++
>>>  drivers/clk/hisilicon/Kconfig                      |   8 +
>>>  drivers/clk/hisilicon/Makefile                     |   1 +
>>>  drivers/clk/hisilicon/crg-hi3516cv300.c            | 330 +++++++++++++++++++++
>>>  drivers/clk/hisilicon/crg.h                        |  34 +++
>>>  include/dt-bindings/clock/hi3516cv300-clock.h      |  48 +++
>>>  6 files changed, 471 insertions(+)
>>>  create mode 100644 Documentation/devicetree/bindings/clock/hisi-crg.txt
>>>  create mode 100644 drivers/clk/hisilicon/crg-hi3516cv300.c
>>>  create mode 100644 drivers/clk/hisilicon/crg.h
>>>  create mode 100644 include/dt-bindings/clock/hi3516cv300-clock.h
>>>
>>> diff --git a/Documentation/devicetree/bindings/clock/hisi-crg.txt b/Documentation/devicetree/bindings/clock/hisi-crg.txt
>>> new file mode 100644
>>> index 0000000..cc60b3d
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/clock/hisi-crg.txt
>>> @@ -0,0 +1,50 @@
>>> +* HiSilicon Clock and Reset Generator(CRG)
>>
>> Seems kind of generic given there's already various HiSi clock bindings
>> documented.
>>
>>> +
>>> +The CRG module provides clock and reset signals to various
>>> +modules within the SoC.
>>> +
>>> +This binding uses the following bindings:
>>> +    Documentation/devicetree/bindings/clock/clock-bindings.txt
>>> +    Documentation/devicetree/bindings/reset/reset.txt
>>> +
>>> +Required Properties:
>>> +
>>> +- compatible: should be one of the following.
>>> +  - "hisilicon,hi3516cv300-crg"
>>> +  - "hisilicon,hi3516cv300-sysctrl"
>>> +  - "hisilicon,hi3519-crg"
>>
>> There is already a binding for this. Please merge them.
>>
> Hi Rob,
>
> Pan Wen and I work together. There's really a same file included in the patch
> https://lkml.org/lkml/2016/9/18/42 ([PATCH v2] clk: hisilicon: add CRG driver for Hi3798CV200 SoC).
> But that patch has not been acked. This binding file will be merged if that
> patch is accepted first. Could you give me more comments on that patch or
> help me to ack it?  Thank you very much.

If I haven't commented, then likely it was not sent to the DT list.

Rob

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

* Re: [PATCH 2/3] clk: hisilicon: add CRG driver for Hi3516CV300 SoC
@ 2016-10-19  2:45         ` Rob Herring
  0 siblings, 0 replies; 68+ messages in thread
From: Rob Herring @ 2016-10-19  2:45 UTC (permalink / raw)
  To: Jiancheng Xue
  Cc: Pan Wen, Michael Turquette, Stephen Boyd, Mark Rutland,
	Russell King, Wei Xu, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel, howell.yang, jalen.hsu, lvkuanliang 00222834,
	suwenping, raojun, kevin.lixu

On Tue, Oct 18, 2016 at 9:38 PM, Jiancheng Xue
<xuejiancheng@hisilicon.com> wrote:
>
>
> 在 2016/10/18 23:58, Rob Herring 写道:
>> On Mon, Oct 17, 2016 at 08:07:04PM +0800, Pan Wen wrote:
>>> Add CRG driver for Hi3516CV300 SoC. CRG(Clock and Reset
>>> Generator) module generates clock and reset signals used
>>> by other module blocks on SoC.
>>>
>>> Signed-off-by: Pan Wen <wenpan@hisilicon.com>
>>> ---
>>>  .../devicetree/bindings/clock/hisi-crg.txt         |  50 ++++
>>>  drivers/clk/hisilicon/Kconfig                      |   8 +
>>>  drivers/clk/hisilicon/Makefile                     |   1 +
>>>  drivers/clk/hisilicon/crg-hi3516cv300.c            | 330 +++++++++++++++++++++
>>>  drivers/clk/hisilicon/crg.h                        |  34 +++
>>>  include/dt-bindings/clock/hi3516cv300-clock.h      |  48 +++
>>>  6 files changed, 471 insertions(+)
>>>  create mode 100644 Documentation/devicetree/bindings/clock/hisi-crg.txt
>>>  create mode 100644 drivers/clk/hisilicon/crg-hi3516cv300.c
>>>  create mode 100644 drivers/clk/hisilicon/crg.h
>>>  create mode 100644 include/dt-bindings/clock/hi3516cv300-clock.h
>>>
>>> diff --git a/Documentation/devicetree/bindings/clock/hisi-crg.txt b/Documentation/devicetree/bindings/clock/hisi-crg.txt
>>> new file mode 100644
>>> index 0000000..cc60b3d
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/clock/hisi-crg.txt
>>> @@ -0,0 +1,50 @@
>>> +* HiSilicon Clock and Reset Generator(CRG)
>>
>> Seems kind of generic given there's already various HiSi clock bindings
>> documented.
>>
>>> +
>>> +The CRG module provides clock and reset signals to various
>>> +modules within the SoC.
>>> +
>>> +This binding uses the following bindings:
>>> +    Documentation/devicetree/bindings/clock/clock-bindings.txt
>>> +    Documentation/devicetree/bindings/reset/reset.txt
>>> +
>>> +Required Properties:
>>> +
>>> +- compatible: should be one of the following.
>>> +  - "hisilicon,hi3516cv300-crg"
>>> +  - "hisilicon,hi3516cv300-sysctrl"
>>> +  - "hisilicon,hi3519-crg"
>>
>> There is already a binding for this. Please merge them.
>>
> Hi Rob,
>
> Pan Wen and I work together. There's really a same file included in the patch
> https://lkml.org/lkml/2016/9/18/42 ([PATCH v2] clk: hisilicon: add CRG driver for Hi3798CV200 SoC).
> But that patch has not been acked. This binding file will be merged if that
> patch is accepted first. Could you give me more comments on that patch or
> help me to ack it?  Thank you very much.

If I haven't commented, then likely it was not sent to the DT list.

Rob

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

* Re: [PATCH 2/3] clk: hisilicon: add CRG driver for Hi3516CV300 SoC
@ 2016-10-19  2:45         ` Rob Herring
  0 siblings, 0 replies; 68+ messages in thread
From: Rob Herring @ 2016-10-19  2:45 UTC (permalink / raw)
  To: Jiancheng Xue
  Cc: Pan Wen, Michael Turquette, Stephen Boyd, Mark Rutland,
	Russell King, Wei Xu, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel, howell.yang, jalen.hsu, lvkuanliang 00222834,
	suwenping, raojun, kevin.lixu

On Tue, Oct 18, 2016 at 9:38 PM, Jiancheng Xue
<xuejiancheng@hisilicon.com> wrote:
>
>
> =E5=9C=A8 2016/10/18 23:58, Rob Herring =E5=86=99=E9=81=93:
>> On Mon, Oct 17, 2016 at 08:07:04PM +0800, Pan Wen wrote:
>>> Add CRG driver for Hi3516CV300 SoC. CRG(Clock and Reset
>>> Generator) module generates clock and reset signals used
>>> by other module blocks on SoC.
>>>
>>> Signed-off-by: Pan Wen <wenpan@hisilicon.com>
>>> ---
>>>  .../devicetree/bindings/clock/hisi-crg.txt         |  50 ++++
>>>  drivers/clk/hisilicon/Kconfig                      |   8 +
>>>  drivers/clk/hisilicon/Makefile                     |   1 +
>>>  drivers/clk/hisilicon/crg-hi3516cv300.c            | 330 +++++++++++++=
++++++++
>>>  drivers/clk/hisilicon/crg.h                        |  34 +++
>>>  include/dt-bindings/clock/hi3516cv300-clock.h      |  48 +++
>>>  6 files changed, 471 insertions(+)
>>>  create mode 100644 Documentation/devicetree/bindings/clock/hisi-crg.tx=
t
>>>  create mode 100644 drivers/clk/hisilicon/crg-hi3516cv300.c
>>>  create mode 100644 drivers/clk/hisilicon/crg.h
>>>  create mode 100644 include/dt-bindings/clock/hi3516cv300-clock.h
>>>
>>> diff --git a/Documentation/devicetree/bindings/clock/hisi-crg.txt b/Doc=
umentation/devicetree/bindings/clock/hisi-crg.txt
>>> new file mode 100644
>>> index 0000000..cc60b3d
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/clock/hisi-crg.txt
>>> @@ -0,0 +1,50 @@
>>> +* HiSilicon Clock and Reset Generator(CRG)
>>
>> Seems kind of generic given there's already various HiSi clock bindings
>> documented.
>>
>>> +
>>> +The CRG module provides clock and reset signals to various
>>> +modules within the SoC.
>>> +
>>> +This binding uses the following bindings:
>>> +    Documentation/devicetree/bindings/clock/clock-bindings.txt
>>> +    Documentation/devicetree/bindings/reset/reset.txt
>>> +
>>> +Required Properties:
>>> +
>>> +- compatible: should be one of the following.
>>> +  - "hisilicon,hi3516cv300-crg"
>>> +  - "hisilicon,hi3516cv300-sysctrl"
>>> +  - "hisilicon,hi3519-crg"
>>
>> There is already a binding for this. Please merge them.
>>
> Hi Rob,
>
> Pan Wen and I work together. There's really a same file included in the p=
atch
> https://lkml.org/lkml/2016/9/18/42 ([PATCH v2] clk: hisilicon: add CRG dr=
iver for Hi3798CV200 SoC).
> But that patch has not been acked. This binding file will be merged if th=
at
> patch is accepted first. Could you give me more comments on that patch or
> help me to ack it?  Thank you very much.

If I haven't commented, then likely it was not sent to the DT list.

Rob

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

* [PATCH 2/3] clk: hisilicon: add CRG driver for Hi3516CV300 SoC
@ 2016-10-19  2:45         ` Rob Herring
  0 siblings, 0 replies; 68+ messages in thread
From: Rob Herring @ 2016-10-19  2:45 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Oct 18, 2016 at 9:38 PM, Jiancheng Xue
<xuejiancheng@hisilicon.com> wrote:
>
>
> ? 2016/10/18 23:58, Rob Herring ??:
>> On Mon, Oct 17, 2016 at 08:07:04PM +0800, Pan Wen wrote:
>>> Add CRG driver for Hi3516CV300 SoC. CRG(Clock and Reset
>>> Generator) module generates clock and reset signals used
>>> by other module blocks on SoC.
>>>
>>> Signed-off-by: Pan Wen <wenpan@hisilicon.com>
>>> ---
>>>  .../devicetree/bindings/clock/hisi-crg.txt         |  50 ++++
>>>  drivers/clk/hisilicon/Kconfig                      |   8 +
>>>  drivers/clk/hisilicon/Makefile                     |   1 +
>>>  drivers/clk/hisilicon/crg-hi3516cv300.c            | 330 +++++++++++++++++++++
>>>  drivers/clk/hisilicon/crg.h                        |  34 +++
>>>  include/dt-bindings/clock/hi3516cv300-clock.h      |  48 +++
>>>  6 files changed, 471 insertions(+)
>>>  create mode 100644 Documentation/devicetree/bindings/clock/hisi-crg.txt
>>>  create mode 100644 drivers/clk/hisilicon/crg-hi3516cv300.c
>>>  create mode 100644 drivers/clk/hisilicon/crg.h
>>>  create mode 100644 include/dt-bindings/clock/hi3516cv300-clock.h
>>>
>>> diff --git a/Documentation/devicetree/bindings/clock/hisi-crg.txt b/Documentation/devicetree/bindings/clock/hisi-crg.txt
>>> new file mode 100644
>>> index 0000000..cc60b3d
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/clock/hisi-crg.txt
>>> @@ -0,0 +1,50 @@
>>> +* HiSilicon Clock and Reset Generator(CRG)
>>
>> Seems kind of generic given there's already various HiSi clock bindings
>> documented.
>>
>>> +
>>> +The CRG module provides clock and reset signals to various
>>> +modules within the SoC.
>>> +
>>> +This binding uses the following bindings:
>>> +    Documentation/devicetree/bindings/clock/clock-bindings.txt
>>> +    Documentation/devicetree/bindings/reset/reset.txt
>>> +
>>> +Required Properties:
>>> +
>>> +- compatible: should be one of the following.
>>> +  - "hisilicon,hi3516cv300-crg"
>>> +  - "hisilicon,hi3516cv300-sysctrl"
>>> +  - "hisilicon,hi3519-crg"
>>
>> There is already a binding for this. Please merge them.
>>
> Hi Rob,
>
> Pan Wen and I work together. There's really a same file included in the patch
> https://lkml.org/lkml/2016/9/18/42 ([PATCH v2] clk: hisilicon: add CRG driver for Hi3798CV200 SoC).
> But that patch has not been acked. This binding file will be merged if that
> patch is accepted first. Could you give me more comments on that patch or
> help me to ack it?  Thank you very much.

If I haven't commented, then likely it was not sent to the DT list.

Rob

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

* Re: [PATCH 2/3] clk: hisilicon: add CRG driver for Hi3516CV300 SoC
  2016-10-19  2:45         ` Rob Herring
  (?)
  (?)
@ 2016-10-19  3:54           ` Jiancheng Xue
  -1 siblings, 0 replies; 68+ messages in thread
From: Jiancheng Xue @ 2016-10-19  3:54 UTC (permalink / raw)
  To: Rob Herring
  Cc: Pan Wen, Michael Turquette, Stephen Boyd, Mark Rutland,
	Russell King, Wei Xu, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel, howell.yang, jalen.hsu, lvkuanliang 00222834,
	suwenping, raojun, kevin.lixu



在 2016/10/19 10:45, Rob Herring 写道:
> On Tue, Oct 18, 2016 at 9:38 PM, Jiancheng Xue
> <xuejiancheng@hisilicon.com> wrote:
>>
>>
>> 在 2016/10/18 23:58, Rob Herring 写道:
>>> On Mon, Oct 17, 2016 at 08:07:04PM +0800, Pan Wen wrote:
>>>> Add CRG driver for Hi3516CV300 SoC. CRG(Clock and Reset
>>>> Generator) module generates clock and reset signals used
>>>> by other module blocks on SoC.
>>>>
>>>> Signed-off-by: Pan Wen <wenpan@hisilicon.com>
>>>> ---
>>>>  .../devicetree/bindings/clock/hisi-crg.txt         |  50 ++++
>>>>  drivers/clk/hisilicon/Kconfig                      |   8 +
>>>>  drivers/clk/hisilicon/Makefile                     |   1 +
>>>>  drivers/clk/hisilicon/crg-hi3516cv300.c            | 330 +++++++++++++++++++++
>>>>  drivers/clk/hisilicon/crg.h                        |  34 +++
>>>>  include/dt-bindings/clock/hi3516cv300-clock.h      |  48 +++
>>>>  6 files changed, 471 insertions(+)
>>>>  create mode 100644 Documentation/devicetree/bindings/clock/hisi-crg.txt
>>>>  create mode 100644 drivers/clk/hisilicon/crg-hi3516cv300.c
>>>>  create mode 100644 drivers/clk/hisilicon/crg.h
>>>>  create mode 100644 include/dt-bindings/clock/hi3516cv300-clock.h
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/clock/hisi-crg.txt b/Documentation/devicetree/bindings/clock/hisi-crg.txt
>>>> new file mode 100644
>>>> index 0000000..cc60b3d
>>>> --- /dev/null
>>>> +++ b/Documentation/devicetree/bindings/clock/hisi-crg.txt
>>>> @@ -0,0 +1,50 @@
>>>> +* HiSilicon Clock and Reset Generator(CRG)
>>>
>>> Seems kind of generic given there's already various HiSi clock bindings
>>> documented.
>>>
>>>> +
>>>> +The CRG module provides clock and reset signals to various
>>>> +modules within the SoC.
>>>> +
>>>> +This binding uses the following bindings:
>>>> +    Documentation/devicetree/bindings/clock/clock-bindings.txt
>>>> +    Documentation/devicetree/bindings/reset/reset.txt
>>>> +
>>>> +Required Properties:
>>>> +
>>>> +- compatible: should be one of the following.
>>>> +  - "hisilicon,hi3516cv300-crg"
>>>> +  - "hisilicon,hi3516cv300-sysctrl"
>>>> +  - "hisilicon,hi3519-crg"
>>>
>>> There is already a binding for this. Please merge them.
>>>
>> Hi Rob,
>>
>> Pan Wen and I work together. There's really a same file included in the patch
>> https://lkml.org/lkml/2016/9/18/42 ([PATCH v2] clk: hisilicon: add CRG driver for Hi3798CV200 SoC).
>> But that patch has not been acked. This binding file will be merged if that
>> patch is accepted first. Could you give me more comments on that patch or
>> help me to ack it?  Thank you very much.
> 
> If I haven't commented, then likely it was not sent to the DT list.
Hi,

I'm pretty sure that the patch was sent to the DT list devicetree@vger.kernel.org.
You had asked a question about "hi3798cv200-sysctrl" and I replied (https://lkml.org/lkml/2016/10/10/517).
I'm waiting for your new comments. If there's some misunderstatnding, please let me know.

Thanks,
Jiancheng

> 
> Rob
> 
> .
> 

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

* Re: [PATCH 2/3] clk: hisilicon: add CRG driver for Hi3516CV300 SoC
@ 2016-10-19  3:54           ` Jiancheng Xue
  0 siblings, 0 replies; 68+ messages in thread
From: Jiancheng Xue @ 2016-10-19  3:54 UTC (permalink / raw)
  To: Rob Herring
  Cc: Pan Wen, Michael Turquette, Stephen Boyd, Mark Rutland,
	Russell King, Wei Xu, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel, howell.yang, jalen.hsu, lvkuanliang 00222834,
	suwenping, raojun, kevin.lixu



在 2016/10/19 10:45, Rob Herring 写道:
> On Tue, Oct 18, 2016 at 9:38 PM, Jiancheng Xue
> <xuejiancheng@hisilicon.com> wrote:
>>
>>
>> 在 2016/10/18 23:58, Rob Herring 写道:
>>> On Mon, Oct 17, 2016 at 08:07:04PM +0800, Pan Wen wrote:
>>>> Add CRG driver for Hi3516CV300 SoC. CRG(Clock and Reset
>>>> Generator) module generates clock and reset signals used
>>>> by other module blocks on SoC.
>>>>
>>>> Signed-off-by: Pan Wen <wenpan@hisilicon.com>
>>>> ---
>>>>  .../devicetree/bindings/clock/hisi-crg.txt         |  50 ++++
>>>>  drivers/clk/hisilicon/Kconfig                      |   8 +
>>>>  drivers/clk/hisilicon/Makefile                     |   1 +
>>>>  drivers/clk/hisilicon/crg-hi3516cv300.c            | 330 +++++++++++++++++++++
>>>>  drivers/clk/hisilicon/crg.h                        |  34 +++
>>>>  include/dt-bindings/clock/hi3516cv300-clock.h      |  48 +++
>>>>  6 files changed, 471 insertions(+)
>>>>  create mode 100644 Documentation/devicetree/bindings/clock/hisi-crg.txt
>>>>  create mode 100644 drivers/clk/hisilicon/crg-hi3516cv300.c
>>>>  create mode 100644 drivers/clk/hisilicon/crg.h
>>>>  create mode 100644 include/dt-bindings/clock/hi3516cv300-clock.h
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/clock/hisi-crg.txt b/Documentation/devicetree/bindings/clock/hisi-crg.txt
>>>> new file mode 100644
>>>> index 0000000..cc60b3d
>>>> --- /dev/null
>>>> +++ b/Documentation/devicetree/bindings/clock/hisi-crg.txt
>>>> @@ -0,0 +1,50 @@
>>>> +* HiSilicon Clock and Reset Generator(CRG)
>>>
>>> Seems kind of generic given there's already various HiSi clock bindings
>>> documented.
>>>
>>>> +
>>>> +The CRG module provides clock and reset signals to various
>>>> +modules within the SoC.
>>>> +
>>>> +This binding uses the following bindings:
>>>> +    Documentation/devicetree/bindings/clock/clock-bindings.txt
>>>> +    Documentation/devicetree/bindings/reset/reset.txt
>>>> +
>>>> +Required Properties:
>>>> +
>>>> +- compatible: should be one of the following.
>>>> +  - "hisilicon,hi3516cv300-crg"
>>>> +  - "hisilicon,hi3516cv300-sysctrl"
>>>> +  - "hisilicon,hi3519-crg"
>>>
>>> There is already a binding for this. Please merge them.
>>>
>> Hi Rob,
>>
>> Pan Wen and I work together. There's really a same file included in the patch
>> https://lkml.org/lkml/2016/9/18/42 ([PATCH v2] clk: hisilicon: add CRG driver for Hi3798CV200 SoC).
>> But that patch has not been acked. This binding file will be merged if that
>> patch is accepted first. Could you give me more comments on that patch or
>> help me to ack it?  Thank you very much.
> 
> If I haven't commented, then likely it was not sent to the DT list.
Hi,

I'm pretty sure that the patch was sent to the DT list devicetree@vger.kernel.org.
You had asked a question about "hi3798cv200-sysctrl" and I replied (https://lkml.org/lkml/2016/10/10/517).
I'm waiting for your new comments. If there's some misunderstatnding, please let me know.

Thanks,
Jiancheng

> 
> Rob
> 
> .
> 


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

* Re: [PATCH 2/3] clk: hisilicon: add CRG driver for Hi3516CV300 SoC
@ 2016-10-19  3:54           ` Jiancheng Xue
  0 siblings, 0 replies; 68+ messages in thread
From: Jiancheng Xue @ 2016-10-19  3:54 UTC (permalink / raw)
  To: Rob Herring
  Cc: Pan Wen, Michael Turquette, Stephen Boyd, Mark Rutland,
	Russell King, Wei Xu, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel, howell.yang, jalen.hsu, lvkuanliang 00222834,
	suwenping, raojun, kevin.lixu



在 2016/10/19 10:45, Rob Herring 写道:
> On Tue, Oct 18, 2016 at 9:38 PM, Jiancheng Xue
> <xuejiancheng@hisilicon.com> wrote:
>>
>>
>> 在 2016/10/18 23:58, Rob Herring 写道:
>>> On Mon, Oct 17, 2016 at 08:07:04PM +0800, Pan Wen wrote:
>>>> Add CRG driver for Hi3516CV300 SoC. CRG(Clock and Reset
>>>> Generator) module generates clock and reset signals used
>>>> by other module blocks on SoC.
>>>>
>>>> Signed-off-by: Pan Wen <wenpan@hisilicon.com>
>>>> ---
>>>>  .../devicetree/bindings/clock/hisi-crg.txt         |  50 ++++
>>>>  drivers/clk/hisilicon/Kconfig                      |   8 +
>>>>  drivers/clk/hisilicon/Makefile                     |   1 +
>>>>  drivers/clk/hisilicon/crg-hi3516cv300.c            | 330 +++++++++++++++++++++
>>>>  drivers/clk/hisilicon/crg.h                        |  34 +++
>>>>  include/dt-bindings/clock/hi3516cv300-clock.h      |  48 +++
>>>>  6 files changed, 471 insertions(+)
>>>>  create mode 100644 Documentation/devicetree/bindings/clock/hisi-crg.txt
>>>>  create mode 100644 drivers/clk/hisilicon/crg-hi3516cv300.c
>>>>  create mode 100644 drivers/clk/hisilicon/crg.h
>>>>  create mode 100644 include/dt-bindings/clock/hi3516cv300-clock.h
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/clock/hisi-crg.txt b/Documentation/devicetree/bindings/clock/hisi-crg.txt
>>>> new file mode 100644
>>>> index 0000000..cc60b3d
>>>> --- /dev/null
>>>> +++ b/Documentation/devicetree/bindings/clock/hisi-crg.txt
>>>> @@ -0,0 +1,50 @@
>>>> +* HiSilicon Clock and Reset Generator(CRG)
>>>
>>> Seems kind of generic given there's already various HiSi clock bindings
>>> documented.
>>>
>>>> +
>>>> +The CRG module provides clock and reset signals to various
>>>> +modules within the SoC.
>>>> +
>>>> +This binding uses the following bindings:
>>>> +    Documentation/devicetree/bindings/clock/clock-bindings.txt
>>>> +    Documentation/devicetree/bindings/reset/reset.txt
>>>> +
>>>> +Required Properties:
>>>> +
>>>> +- compatible: should be one of the following.
>>>> +  - "hisilicon,hi3516cv300-crg"
>>>> +  - "hisilicon,hi3516cv300-sysctrl"
>>>> +  - "hisilicon,hi3519-crg"
>>>
>>> There is already a binding for this. Please merge them.
>>>
>> Hi Rob,
>>
>> Pan Wen and I work together. There's really a same file included in the patch
>> https://lkml.org/lkml/2016/9/18/42 ([PATCH v2] clk: hisilicon: add CRG driver for Hi3798CV200 SoC).
>> But that patch has not been acked. This binding file will be merged if that
>> patch is accepted first. Could you give me more comments on that patch or
>> help me to ack it?  Thank you very much.
> 
> If I haven't commented, then likely it was not sent to the DT list.
Hi,

I'm pretty sure that the patch was sent to the DT list devicetree@vger.kernel.org.
You had asked a question about "hi3798cv200-sysctrl" and I replied (https://lkml.org/lkml/2016/10/10/517).
I'm waiting for your new comments. If there's some misunderstatnding, please let me know.

Thanks,
Jiancheng

> 
> Rob
> 
> .
> 


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

* [PATCH 2/3] clk: hisilicon: add CRG driver for Hi3516CV300 SoC
@ 2016-10-19  3:54           ` Jiancheng Xue
  0 siblings, 0 replies; 68+ messages in thread
From: Jiancheng Xue @ 2016-10-19  3:54 UTC (permalink / raw)
  To: linux-arm-kernel



? 2016/10/19 10:45, Rob Herring ??:
> On Tue, Oct 18, 2016 at 9:38 PM, Jiancheng Xue
> <xuejiancheng@hisilicon.com> wrote:
>>
>>
>> ? 2016/10/18 23:58, Rob Herring ??:
>>> On Mon, Oct 17, 2016 at 08:07:04PM +0800, Pan Wen wrote:
>>>> Add CRG driver for Hi3516CV300 SoC. CRG(Clock and Reset
>>>> Generator) module generates clock and reset signals used
>>>> by other module blocks on SoC.
>>>>
>>>> Signed-off-by: Pan Wen <wenpan@hisilicon.com>
>>>> ---
>>>>  .../devicetree/bindings/clock/hisi-crg.txt         |  50 ++++
>>>>  drivers/clk/hisilicon/Kconfig                      |   8 +
>>>>  drivers/clk/hisilicon/Makefile                     |   1 +
>>>>  drivers/clk/hisilicon/crg-hi3516cv300.c            | 330 +++++++++++++++++++++
>>>>  drivers/clk/hisilicon/crg.h                        |  34 +++
>>>>  include/dt-bindings/clock/hi3516cv300-clock.h      |  48 +++
>>>>  6 files changed, 471 insertions(+)
>>>>  create mode 100644 Documentation/devicetree/bindings/clock/hisi-crg.txt
>>>>  create mode 100644 drivers/clk/hisilicon/crg-hi3516cv300.c
>>>>  create mode 100644 drivers/clk/hisilicon/crg.h
>>>>  create mode 100644 include/dt-bindings/clock/hi3516cv300-clock.h
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/clock/hisi-crg.txt b/Documentation/devicetree/bindings/clock/hisi-crg.txt
>>>> new file mode 100644
>>>> index 0000000..cc60b3d
>>>> --- /dev/null
>>>> +++ b/Documentation/devicetree/bindings/clock/hisi-crg.txt
>>>> @@ -0,0 +1,50 @@
>>>> +* HiSilicon Clock and Reset Generator(CRG)
>>>
>>> Seems kind of generic given there's already various HiSi clock bindings
>>> documented.
>>>
>>>> +
>>>> +The CRG module provides clock and reset signals to various
>>>> +modules within the SoC.
>>>> +
>>>> +This binding uses the following bindings:
>>>> +    Documentation/devicetree/bindings/clock/clock-bindings.txt
>>>> +    Documentation/devicetree/bindings/reset/reset.txt
>>>> +
>>>> +Required Properties:
>>>> +
>>>> +- compatible: should be one of the following.
>>>> +  - "hisilicon,hi3516cv300-crg"
>>>> +  - "hisilicon,hi3516cv300-sysctrl"
>>>> +  - "hisilicon,hi3519-crg"
>>>
>>> There is already a binding for this. Please merge them.
>>>
>> Hi Rob,
>>
>> Pan Wen and I work together. There's really a same file included in the patch
>> https://lkml.org/lkml/2016/9/18/42 ([PATCH v2] clk: hisilicon: add CRG driver for Hi3798CV200 SoC).
>> But that patch has not been acked. This binding file will be merged if that
>> patch is accepted first. Could you give me more comments on that patch or
>> help me to ack it?  Thank you very much.
> 
> If I haven't commented, then likely it was not sent to the DT list.
Hi,

I'm pretty sure that the patch was sent to the DT list devicetree at vger.kernel.org.
You had asked a question about "hi3798cv200-sysctrl" and I replied (https://lkml.org/lkml/2016/10/10/517).
I'm waiting for your new comments. If there's some misunderstatnding, please let me know.

Thanks,
Jiancheng

> 
> Rob
> 
> .
> 

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

* Re: [PATCH 2/3] clk: hisilicon: add CRG driver for Hi3516CV300 SoC
@ 2016-10-20 17:48             ` Stephen Boyd
  0 siblings, 0 replies; 68+ messages in thread
From: Stephen Boyd @ 2016-10-20 17:48 UTC (permalink / raw)
  To: Jiancheng Xue
  Cc: Rob Herring, Pan Wen, Michael Turquette, Mark Rutland,
	Russell King, Wei Xu, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel, howell.yang, jalen.hsu, lvkuanliang 00222834,
	suwenping, raojun, kevin.lixu

On 10/19, Jiancheng Xue wrote:
> 
> I'm pretty sure that the patch was sent to the DT list devicetree@vger.kernel.org.
> You had asked a question about "hi3798cv200-sysctrl" and I replied (https://lkml.org/lkml/2016/10/10/517).
> I'm waiting for your new comments. If there's some misunderstatnding, please let me know.
> 

Are there two patch series that touch the same clk binding
document?  Can you please combine them and resend them if that's
the case?

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

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

* Re: [PATCH 2/3] clk: hisilicon: add CRG driver for Hi3516CV300 SoC
@ 2016-10-20 17:48             ` Stephen Boyd
  0 siblings, 0 replies; 68+ messages in thread
From: Stephen Boyd @ 2016-10-20 17:48 UTC (permalink / raw)
  To: Jiancheng Xue
  Cc: Rob Herring, Pan Wen, Michael Turquette, Mark Rutland,
	Russell King, Wei Xu, linux-clk,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	howell.yang-C8/M+/jPZTeaMJb+Lgu22Q,
	jalen.hsu-C8/M+/jPZTeaMJb+Lgu22Q, lvkuanliang 00222834,
	suwenping-C8/M+/jPZTeaMJb+Lgu22Q, raojun-C8/M+/jPZTeaMJb+Lgu22Q,
	kevin.lixu-C8/M+/jPZTeaMJb+Lgu22Q

On 10/19, Jiancheng Xue wrote:
> 
> I'm pretty sure that the patch was sent to the DT list devicetree-u79uwXL29TaiAVqoAR/hOA@public.gmane.org
> You had asked a question about "hi3798cv200-sysctrl" and I replied (https://lkml.org/lkml/2016/10/10/517).
> I'm waiting for your new comments. If there's some misunderstatnding, please let me know.
> 

Are there two patch series that touch the same clk binding
document?  Can you please combine them and resend them if that's
the case?

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
--
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] 68+ messages in thread

* Re: [PATCH 2/3] clk: hisilicon: add CRG driver for Hi3516CV300 SoC
@ 2016-10-20 17:48             ` Stephen Boyd
  0 siblings, 0 replies; 68+ messages in thread
From: Stephen Boyd @ 2016-10-20 17:48 UTC (permalink / raw)
  To: Jiancheng Xue
  Cc: Rob Herring, Pan Wen, Michael Turquette, Mark Rutland,
	Russell King, Wei Xu, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel, howell.yang, jalen.hsu, lvkuanliang 00222834,
	suwenping, raojun, kevin.lixu

On 10/19, Jiancheng Xue wrote:
> 
> I'm pretty sure that the patch was sent to the DT list devicetree@vger.kernel.org.
> You had asked a question about "hi3798cv200-sysctrl" and I replied (https://lkml.org/lkml/2016/10/10/517).
> I'm waiting for your new comments. If there's some misunderstatnding, please let me know.
> 

Are there two patch series that touch the same clk binding
document?  Can you please combine them and resend them if that's
the case?

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

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

* [PATCH 2/3] clk: hisilicon: add CRG driver for Hi3516CV300 SoC
@ 2016-10-20 17:48             ` Stephen Boyd
  0 siblings, 0 replies; 68+ messages in thread
From: Stephen Boyd @ 2016-10-20 17:48 UTC (permalink / raw)
  To: linux-arm-kernel

On 10/19, Jiancheng Xue wrote:
> 
> I'm pretty sure that the patch was sent to the DT list devicetree at vger.kernel.org.
> You had asked a question about "hi3798cv200-sysctrl" and I replied (https://lkml.org/lkml/2016/10/10/517).
> I'm waiting for your new comments. If there's some misunderstatnding, please let me know.
> 

Are there two patch series that touch the same clk binding
document?  Can you please combine them and resend them if that's
the case?

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

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

* Re: [PATCH 2/3] clk: hisilicon: add CRG driver for Hi3516CV300 SoC
  2016-10-20 17:48             ` Stephen Boyd
  (?)
  (?)
@ 2016-10-21  1:46               ` Jiancheng Xue
  -1 siblings, 0 replies; 68+ messages in thread
From: Jiancheng Xue @ 2016-10-21  1:46 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Rob Herring, Pan Wen, Michael Turquette, Mark Rutland,
	Russell King, Wei Xu, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel, howell.yang, jalen.hsu, lvkuanliang 00222834,
	suwenping, raojun, kevin.lixu



在 2016/10/21 1:48, Stephen Boyd 写道:
> On 10/19, Jiancheng Xue wrote:
>>
>> I'm pretty sure that the patch was sent to the DT list devicetree@vger.kernel.org.
>> You had asked a question about "hi3798cv200-sysctrl" and I replied (https://lkml.org/lkml/2016/10/10/517).
>> I'm waiting for your new comments. If there's some misunderstatnding, please let me know.
>>
> 
> Are there two patch series that touch the same clk binding
> document?  Can you please combine them and resend them if that's
> the case?
> 

OK. I will resend this patch.

Thanks,
Jiancheng

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

* Re: [PATCH 2/3] clk: hisilicon: add CRG driver for Hi3516CV300 SoC
@ 2016-10-21  1:46               ` Jiancheng Xue
  0 siblings, 0 replies; 68+ messages in thread
From: Jiancheng Xue @ 2016-10-21  1:46 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Rob Herring, Pan Wen, Michael Turquette, Mark Rutland,
	Russell King, Wei Xu, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel, howell.yang, jalen.hsu, lvkuanliang 00222834,
	suwenping, raojun, kevin.lixu



在 2016/10/21 1:48, Stephen Boyd 写道:
> On 10/19, Jiancheng Xue wrote:
>>
>> I'm pretty sure that the patch was sent to the DT list devicetree@vger.kernel.org.
>> You had asked a question about "hi3798cv200-sysctrl" and I replied (https://lkml.org/lkml/2016/10/10/517).
>> I'm waiting for your new comments. If there's some misunderstatnding, please let me know.
>>
> 
> Are there two patch series that touch the same clk binding
> document?  Can you please combine them and resend them if that's
> the case?
> 

OK. I will resend this patch.

Thanks,
Jiancheng



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

* Re: [PATCH 2/3] clk: hisilicon: add CRG driver for Hi3516CV300 SoC
@ 2016-10-21  1:46               ` Jiancheng Xue
  0 siblings, 0 replies; 68+ messages in thread
From: Jiancheng Xue @ 2016-10-21  1:46 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Rob Herring, Pan Wen, Michael Turquette, Mark Rutland,
	Russell King, Wei Xu, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel, howell.yang, jalen.hsu, lvkuanliang 00222834,
	suwenping, raojun, kevin.lixu



在 2016/10/21 1:48, Stephen Boyd 写道:
> On 10/19, Jiancheng Xue wrote:
>>
>> I'm pretty sure that the patch was sent to the DT list devicetree@vger.kernel.org.
>> You had asked a question about "hi3798cv200-sysctrl" and I replied (https://lkml.org/lkml/2016/10/10/517).
>> I'm waiting for your new comments. If there's some misunderstatnding, please let me know.
>>
> 
> Are there two patch series that touch the same clk binding
> document?  Can you please combine them and resend them if that's
> the case?
> 

OK. I will resend this patch.

Thanks,
Jiancheng



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

* [PATCH 2/3] clk: hisilicon: add CRG driver for Hi3516CV300 SoC
@ 2016-10-21  1:46               ` Jiancheng Xue
  0 siblings, 0 replies; 68+ messages in thread
From: Jiancheng Xue @ 2016-10-21  1:46 UTC (permalink / raw)
  To: linux-arm-kernel



? 2016/10/21 1:48, Stephen Boyd ??:
> On 10/19, Jiancheng Xue wrote:
>>
>> I'm pretty sure that the patch was sent to the DT list devicetree at vger.kernel.org.
>> You had asked a question about "hi3798cv200-sysctrl" and I replied (https://lkml.org/lkml/2016/10/10/517).
>> I'm waiting for your new comments. If there's some misunderstatnding, please let me know.
>>
> 
> Are there two patch series that touch the same clk binding
> document?  Can you please combine them and resend them if that's
> the case?
> 

OK. I will resend this patch.

Thanks,
Jiancheng

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

* Re: [PATCH 1/3] arm: hisi: add ARCH_MULTI_V5 support
  2016-10-17 13:48     ` Arnd Bergmann
  (?)
@ 2016-11-16  8:56       ` wenpan
  -1 siblings, 0 replies; 68+ messages in thread
From: wenpan @ 2016-11-16  8:56 UTC (permalink / raw)
  To: Arnd Bergmann, Marty Plummer
  Cc: mturquette, sboyd, robh+dt, mark.rutland, linux, xuwei5,
	linux-clk, devicetree, linux-kernel, linux-arm-kernel,
	howell.yang, xuejiancheng, jalen.hsu, lvkuanliang, suwenping,
	raojun, kevin.lixu, qinxiaojun

Hi Martyo<\f
Does this confict with your patcho<\x1f If noto<\fI hope this could be merged first.  Besides could you tell me the link to your related patch?

Thanks,
Pan

On 2016/10/17 21:48, Arnd Bergmann wrote:
> On Monday, October 17, 2016 8:07:03 PM CEST Pan Wen wrote:
>> Add support for some HiSilicon SoCs which depend on ARCH_MULTI_V5.
>>
>> Signed-off-by: Pan Wen <wenpan@hisilicon.com>
>>
> 
> Looks ok. I've added Marty Plummer to Cc, he was recently proposing
> patches for Hi3520, which I think is closely related to this one.
> Please try to work together so the patches don't conflict. It should
> be fairly straightforward since you are basically doing the same
> change here.
> 
> 	Arnd
> 
> .
> 

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

* Re: [PATCH 1/3] arm: hisi: add ARCH_MULTI_V5 support
@ 2016-11-16  8:56       ` wenpan
  0 siblings, 0 replies; 68+ messages in thread
From: wenpan @ 2016-11-16  8:56 UTC (permalink / raw)
  To: Arnd Bergmann, Marty Plummer
  Cc: mturquette-rdvid1DuHRBWk0Htik3J/w, sboyd-sgV2jX0FEOL9JmXXK+q4OQ,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A, mark.rutland-5wv7dgnIgG8,
	linux-I+IVW8TIWO2tmTQ+vhA3Yw, xuwei5-C8/M+/jPZTeaMJb+Lgu22Q,
	linux-clk-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	howell.yang-C8/M+/jPZTeaMJb+Lgu22Q,
	xuejiancheng-C8/M+/jPZTeaMJb+Lgu22Q,
	jalen.hsu-C8/M+/jPZTeaMJb+Lgu22Q,
	lvkuanliang-C8/M+/jPZTeaMJb+Lgu22Q,
	suwenping-C8/M+/jPZTeaMJb+Lgu22Q, raojun-C8/M+/jPZTeaMJb+Lgu22Q,
	kevin.lixu-C8/M+/jPZTeaMJb+Lgu22Q,
	qinxiaojun-hv44wF8Li93QT0dZR+AlfA

Hi Martyo<\f
Does this confict with your patcho<\x1f If noto<\fI hope this could be merged first.  Besides could you tell me the link to your related patch?

Thanks,
Pan

On 2016/10/17 21:48, Arnd Bergmann wrote:
> On Monday, October 17, 2016 8:07:03 PM CEST Pan Wen wrote:
>> Add support for some HiSilicon SoCs which depend on ARCH_MULTI_V5.
>>
>> Signed-off-by: Pan Wen <wenpan-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>
>>
> 
> Looks ok. I've added Marty Plummer to Cc, he was recently proposing
> patches for Hi3520, which I think is closely related to this one.
> Please try to work together so the patches don't conflict. It should
> be fairly straightforward since you are basically doing the same
> change here.
> 
> 	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] 68+ messages in thread

* [PATCH 1/3] arm: hisi: add ARCH_MULTI_V5 support
@ 2016-11-16  8:56       ` wenpan
  0 siblings, 0 replies; 68+ messages in thread
From: wenpan @ 2016-11-16  8:56 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Martyo<

Does this confict with your patcho<\x1f If noto<
I hope this could be merged first.  Besides could you tell me the link to your related patch?

Thanks,
Pan

On 2016/10/17 21:48, Arnd Bergmann wrote:
> On Monday, October 17, 2016 8:07:03 PM CEST Pan Wen wrote:
>> Add support for some HiSilicon SoCs which depend on ARCH_MULTI_V5.
>>
>> Signed-off-by: Pan Wen <wenpan@hisilicon.com>
>>
> 
> Looks ok. I've added Marty Plummer to Cc, he was recently proposing
> patches for Hi3520, which I think is closely related to this one.
> Please try to work together so the patches don't conflict. It should
> be fairly straightforward since you are basically doing the same
> change here.
> 
> 	Arnd
> 
> .
> 

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

* Re: [PATCH 1/3] arm: hisi: add ARCH_MULTI_V5 support
  2016-11-16  8:56       ` wenpan
  (?)
@ 2016-11-16  9:31         ` Wei Xu
  -1 siblings, 0 replies; 68+ messages in thread
From: Wei Xu @ 2016-11-16  9:31 UTC (permalink / raw)
  To: wenpan, Arnd Bergmann, Marty Plummer
  Cc: mturquette, sboyd, robh+dt, mark.rutland, linux, linux-clk,
	devicetree, linux-kernel, linux-arm-kernel, howell.yang,
	xuejiancheng, jalen.hsu, lvkuanliang, suwenping, raojun,
	kevin.lixu, qinxiaojun

Hi Pan,

On 2016/11/16 8:56, wenpan wrote:
> Hi Marty,
> Does this confict with your patch? If not,I hope this could be merged first.  Besides could you tell me the link to your related patch?

This is the link: https://patchwork.kernel.org/patch/9334743/

BR,
Wei

> 
> Thanks,
> Pan
> 
> On 2016/10/17 21:48, Arnd Bergmann wrote:
>> On Monday, October 17, 2016 8:07:03 PM CEST Pan Wen wrote:
>>> Add support for some HiSilicon SoCs which depend on ARCH_MULTI_V5.
>>>
>>> Signed-off-by: Pan Wen <wenpan@hisilicon.com>
>>>
>>
>> Looks ok. I've added Marty Plummer to Cc, he was recently proposing
>> patches for Hi3520, which I think is closely related to this one.
>> Please try to work together so the patches don't conflict. It should
>> be fairly straightforward since you are basically doing the same
>> change here.
>>
>> 	Arnd
>>
>> .
>>
> 
> 
> .
> 

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

* Re: [PATCH 1/3] arm: hisi: add ARCH_MULTI_V5 support
@ 2016-11-16  9:31         ` Wei Xu
  0 siblings, 0 replies; 68+ messages in thread
From: Wei Xu @ 2016-11-16  9:31 UTC (permalink / raw)
  To: wenpan, Arnd Bergmann, Marty Plummer
  Cc: mturquette, sboyd, robh+dt, mark.rutland, linux, linux-clk,
	devicetree, linux-kernel, linux-arm-kernel, howell.yang,
	xuejiancheng, jalen.hsu, lvkuanliang, suwenping, raojun,
	kevin.lixu, qinxiaojun

Hi Pan,

On 2016/11/16 8:56, wenpan wrote:
> Hi Marty,
> Does this confict with your patch? If not,I hope this could be merged first.  Besides could you tell me the link to your related patch?

This is the link: https://patchwork.kernel.org/patch/9334743/

BR,
Wei

> 
> Thanks,
> Pan
> 
> On 2016/10/17 21:48, Arnd Bergmann wrote:
>> On Monday, October 17, 2016 8:07:03 PM CEST Pan Wen wrote:
>>> Add support for some HiSilicon SoCs which depend on ARCH_MULTI_V5.
>>>
>>> Signed-off-by: Pan Wen <wenpan@hisilicon.com>
>>>
>>
>> Looks ok. I've added Marty Plummer to Cc, he was recently proposing
>> patches for Hi3520, which I think is closely related to this one.
>> Please try to work together so the patches don't conflict. It should
>> be fairly straightforward since you are basically doing the same
>> change here.
>>
>> 	Arnd
>>
>> .
>>
> 
> 
> .
> 


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

* [PATCH 1/3] arm: hisi: add ARCH_MULTI_V5 support
@ 2016-11-16  9:31         ` Wei Xu
  0 siblings, 0 replies; 68+ messages in thread
From: Wei Xu @ 2016-11-16  9:31 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Pan,

On 2016/11/16 8:56, wenpan wrote:
> Hi Marty?
> Does this confict with your patch? If not?I hope this could be merged first.  Besides could you tell me the link to your related patch?

This is the link: https://patchwork.kernel.org/patch/9334743/

BR,
Wei

> 
> Thanks,
> Pan
> 
> On 2016/10/17 21:48, Arnd Bergmann wrote:
>> On Monday, October 17, 2016 8:07:03 PM CEST Pan Wen wrote:
>>> Add support for some HiSilicon SoCs which depend on ARCH_MULTI_V5.
>>>
>>> Signed-off-by: Pan Wen <wenpan@hisilicon.com>
>>>
>>
>> Looks ok. I've added Marty Plummer to Cc, he was recently proposing
>> patches for Hi3520, which I think is closely related to this one.
>> Please try to work together so the patches don't conflict. It should
>> be fairly straightforward since you are basically doing the same
>> change here.
>>
>> 	Arnd
>>
>> .
>>
> 
> 
> .
> 

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

* Re: [PATCH 1/3] arm: hisi: add ARCH_MULTI_V5 support
@ 2016-11-17  3:03           ` Jiancheng Xue
  0 siblings, 0 replies; 68+ messages in thread
From: Jiancheng Xue @ 2016-11-17  3:03 UTC (permalink / raw)
  To: Wei Xu
  Cc: wenpan, Arnd Bergmann, Marty Plummer, mturquette, sboyd, robh+dt,
	mark.rutland, linux, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel, howell.yang, jalen.hsu, lvkuanliang, suwenping,
	raojun, kevin.lixu, qinxiaojun

Hi Wei,

On 2016/11/16 17:31, Wei Xu wrote:
> Hi Pan,
> 
> On 2016/11/16 8:56, wenpan wrote:
>> Hi Marty,
>> Does this confict with your patch? If not,I hope this could be merged first.  Besides could you tell me the link to your related patch?
> 
> This is the link: https://patchwork.kernel.org/patch/9334743/
> 

Thank you for offering this.If I want to give some comments on Marty's patch,
what should I do?

For Marty's patch, I think there's no need to add specific config item ARCH_HIxxxx
for every chipset. Some existing chipsets depend on ARCH_HISI directly like Hi3519
and Hi3798CV200. If some options like ARM_GIC is removed from ARCH_HISI, this kind
of chipsets will must choose other place to select it. I suggest we should keep selecting
ARM_GIC under ARCH_HISI as Pan's patch do.

The code may be like this:

config ARCH_HISI
 	bool "Hisilicon SoC Support"
-	depends on ARCH_MULTI_V7
+	depends on ARCH_MULTI_V5 || ARCH_MULTI_V6 || ARCH_MULTI_V7
 	select ARM_AMBA
-	select ARM_GIC
+	select ARM_GIC if ARCH_MULTI_V7
+	select ARM_VIC if ARCH_MULTI_V5 || depends on ARCH_MULTI_V6
 	select ARM_TIMER_SP804
 	select POWER_RESET
 	select POWER_RESET_HISI
 	select POWER_SUPPLY

What's your opinion?

Best Regards,
Jiancheng

>> On 2016/10/17 21:48, Arnd Bergmann wrote:
>>> On Monday, October 17, 2016 8:07:03 PM CEST Pan Wen wrote:
>>>> Add support for some HiSilicon SoCs which depend on ARCH_MULTI_V5.
>>>>
>>>> Signed-off-by: Pan Wen <wenpan@hisilicon.com>
>>>>
>>>
>>> Looks ok. I've added Marty Plummer to Cc, he was recently proposing
>>> patches for Hi3520, which I think is closely related to this one.
>>> Please try to work together so the patches don't conflict. It should
>>> be fairly straightforward since you are basically doing the same
>>> change here.
>>>

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

* Re: [PATCH 1/3] arm: hisi: add ARCH_MULTI_V5 support
@ 2016-11-17  3:03           ` Jiancheng Xue
  0 siblings, 0 replies; 68+ messages in thread
From: Jiancheng Xue @ 2016-11-17  3:03 UTC (permalink / raw)
  To: Wei Xu
  Cc: wenpan, Arnd Bergmann, Marty Plummer,
	mturquette-rdvid1DuHRBWk0Htik3J/w, sboyd-sgV2jX0FEOL9JmXXK+q4OQ,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A, mark.rutland-5wv7dgnIgG8,
	linux-I+IVW8TIWO2tmTQ+vhA3Yw, linux-clk-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	howell.yang-C8/M+/jPZTeaMJb+Lgu22Q,
	jalen.hsu-C8/M+/jPZTeaMJb+Lgu22Q,
	lvkuanliang-C8/M+/jPZTeaMJb+Lgu22Q,
	suwenping-C8/M+/jPZTeaMJb+Lgu22Q, raojun-C8/M+/jPZTeaMJb+Lgu22Q,
	kevin.lixu-C8/M+/jPZTeaMJb+Lgu22Q,
	qinxiaojun-hv44wF8Li93QT0dZR+AlfA

Hi Wei,

On 2016/11/16 17:31, Wei Xu wrote:
> Hi Pan,
> 
> On 2016/11/16 8:56, wenpan wrote:
>> Hi Marty,
>> Does this confict with your patch? If not,I hope this could be merged first.  Besides could you tell me the link to your related patch?
> 
> This is the link: https://patchwork.kernel.org/patch/9334743/
> 

Thank you for offering this.If I want to give some comments on Marty's patch,
what should I do?

For Marty's patch, I think there's no need to add specific config item ARCH_HIxxxx
for every chipset. Some existing chipsets depend on ARCH_HISI directly like Hi3519
and Hi3798CV200. If some options like ARM_GIC is removed from ARCH_HISI, this kind
of chipsets will must choose other place to select it. I suggest we should keep selecting
ARM_GIC under ARCH_HISI as Pan's patch do.

The code may be like this:

config ARCH_HISI
 	bool "Hisilicon SoC Support"
-	depends on ARCH_MULTI_V7
+	depends on ARCH_MULTI_V5 || ARCH_MULTI_V6 || ARCH_MULTI_V7
 	select ARM_AMBA
-	select ARM_GIC
+	select ARM_GIC if ARCH_MULTI_V7
+	select ARM_VIC if ARCH_MULTI_V5 || depends on ARCH_MULTI_V6
 	select ARM_TIMER_SP804
 	select POWER_RESET
 	select POWER_RESET_HISI
 	select POWER_SUPPLY

What's your opinion?

Best Regards,
Jiancheng

>> On 2016/10/17 21:48, Arnd Bergmann wrote:
>>> On Monday, October 17, 2016 8:07:03 PM CEST Pan Wen wrote:
>>>> Add support for some HiSilicon SoCs which depend on ARCH_MULTI_V5.
>>>>
>>>> Signed-off-by: Pan Wen <wenpan-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>
>>>>
>>>
>>> Looks ok. I've added Marty Plummer to Cc, he was recently proposing
>>> patches for Hi3520, which I think is closely related to this one.
>>> Please try to work together so the patches don't conflict. It should
>>> be fairly straightforward since you are basically doing the same
>>> change here.
>>>


--
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] 68+ messages in thread

* [PATCH 1/3] arm: hisi: add ARCH_MULTI_V5 support
@ 2016-11-17  3:03           ` Jiancheng Xue
  0 siblings, 0 replies; 68+ messages in thread
From: Jiancheng Xue @ 2016-11-17  3:03 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Wei?

On 2016/11/16 17:31, Wei Xu wrote:
> Hi Pan,
> 
> On 2016/11/16 8:56, wenpan wrote:
>> Hi Marty?
>> Does this confict with your patch? If not?I hope this could be merged first.  Besides could you tell me the link to your related patch?
> 
> This is the link: https://patchwork.kernel.org/patch/9334743/
> 

Thank you for offering this.If I want to give some comments on Marty's patch,
what should I do?

For Marty's patch, I think there's no need to add specific config item ARCH_HIxxxx
for every chipset. Some existing chipsets depend on ARCH_HISI directly like Hi3519
and Hi3798CV200. If some options like ARM_GIC is removed from ARCH_HISI, this kind
of chipsets will must choose other place to select it. I suggest we should keep selecting
ARM_GIC under ARCH_HISI as Pan's patch do.

The code may be like this:

config ARCH_HISI
 	bool "Hisilicon SoC Support"
-	depends on ARCH_MULTI_V7
+	depends on ARCH_MULTI_V5 || ARCH_MULTI_V6 || ARCH_MULTI_V7
 	select ARM_AMBA
-	select ARM_GIC
+	select ARM_GIC if ARCH_MULTI_V7
+	select ARM_VIC if ARCH_MULTI_V5 || depends on ARCH_MULTI_V6
 	select ARM_TIMER_SP804
 	select POWER_RESET
 	select POWER_RESET_HISI
 	select POWER_SUPPLY

What's your opinion?

Best Regards,
Jiancheng

>> On 2016/10/17 21:48, Arnd Bergmann wrote:
>>> On Monday, October 17, 2016 8:07:03 PM CEST Pan Wen wrote:
>>>> Add support for some HiSilicon SoCs which depend on ARCH_MULTI_V5.
>>>>
>>>> Signed-off-by: Pan Wen <wenpan@hisilicon.com>
>>>>
>>>
>>> Looks ok. I've added Marty Plummer to Cc, he was recently proposing
>>> patches for Hi3520, which I think is closely related to this one.
>>> Please try to work together so the patches don't conflict. It should
>>> be fairly straightforward since you are basically doing the same
>>> change here.
>>>

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

* Re: [PATCH 1/3] arm: hisi: add ARCH_MULTI_V5 support
  2016-11-17  3:03           ` Jiancheng Xue
  (?)
@ 2016-11-18  6:42             ` Jiancheng Xue
  -1 siblings, 0 replies; 68+ messages in thread
From: Jiancheng Xue @ 2016-11-18  6:42 UTC (permalink / raw)
  To: Marty Plummer
  Cc: Wei Xu, wenpan, Arnd Bergmann, mturquette, sboyd, robh+dt,
	mark.rutland, linux, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel, howell.yang, jalen.hsu, lvkuanliang, suwenping,
	raojun, kevin.lixu, qinxiaojun

Hi Marty,

On 2016/11/17 11:03, Jiancheng Xue wrote:
> Hi Wei,
> 
> On 2016/11/16 17:31, Wei Xu wrote:
>> Hi Pan,
>>
>> On 2016/11/16 8:56, wenpan wrote:
>>> Hi Marty,
>>> Does this confict with your patch? If not,I hope this could be merged first.  Besides could you tell me the link to your related patch?
>>
>> This is the link: https://patchwork.kernel.org/patch/9334743/
>>

Could you give your comments on this patch?
If you have any objections to it, please let us know.

> 
> Thank you for offering this.If I want to give some comments on Marty's patch,
> what should I do?
> 
> For Marty's patch, I think there's no need to add specific config item ARCH_HIxxxx
> for every chipset. Some existing chipsets depend on ARCH_HISI directly like Hi3519
> and Hi3798CV200. If some options like ARM_GIC is removed from ARCH_HISI, this kind
> of chipsets will must choose other place to select it. I suggest we should keep selecting
> ARM_GIC under ARCH_HISI as Pan's patch do.
> 
> The code may be like this:
> 
> config ARCH_HISI
>  	bool "Hisilicon SoC Support"
> -	depends on ARCH_MULTI_V7
> +	depends on ARCH_MULTI_V5 || ARCH_MULTI_V6 || ARCH_MULTI_V7
>  	select ARM_AMBA
> -	select ARM_GIC
> +	select ARM_GIC if ARCH_MULTI_V7
> +	select ARM_VIC if ARCH_MULTI_V5 || depends on ARCH_MULTI_V6
>  	select ARM_TIMER_SP804
>  	select POWER_RESET
>  	select POWER_RESET_HISI
>  	select POWER_SUPPLY
> 

What's your opinion about this?

Best Regards,
Jiancheng

>>> On 2016/10/17 21:48, Arnd Bergmann wrote:
>>>> On Monday, October 17, 2016 8:07:03 PM CEST Pan Wen wrote:
>>>>> Add support for some HiSilicon SoCs which depend on ARCH_MULTI_V5.
>>>>>
>>>>> Signed-off-by: Pan Wen <wenpan@hisilicon.com>
>>>>>
>>>>
>>>> Looks ok. I've added Marty Plummer to Cc, he was recently proposing
>>>> patches for Hi3520, which I think is closely related to this one.
>>>> Please try to work together so the patches don't conflict. It should
>>>> be fairly straightforward since you are basically doing the same
>>>> change here.
>>>>
> 
> 
> 
> .
> 

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

* Re: [PATCH 1/3] arm: hisi: add ARCH_MULTI_V5 support
@ 2016-11-18  6:42             ` Jiancheng Xue
  0 siblings, 0 replies; 68+ messages in thread
From: Jiancheng Xue @ 2016-11-18  6:42 UTC (permalink / raw)
  To: Marty Plummer
  Cc: Wei Xu, wenpan, Arnd Bergmann, mturquette, sboyd, robh+dt,
	mark.rutland, linux, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel, howell.yang, jalen.hsu, lvkuanliang, suwenping,
	raojun, kevin.lixu, qinxiaojun

Hi Marty,

On 2016/11/17 11:03, Jiancheng Xue wrote:
> Hi Wei,
> 
> On 2016/11/16 17:31, Wei Xu wrote:
>> Hi Pan,
>>
>> On 2016/11/16 8:56, wenpan wrote:
>>> Hi Marty,
>>> Does this confict with your patch? If not,I hope this could be merged first.  Besides could you tell me the link to your related patch?
>>
>> This is the link: https://patchwork.kernel.org/patch/9334743/
>>

Could you give your comments on this patch?
If you have any objections to it, please let us know.

> 
> Thank you for offering this.If I want to give some comments on Marty's patch,
> what should I do?
> 
> For Marty's patch, I think there's no need to add specific config item ARCH_HIxxxx
> for every chipset. Some existing chipsets depend on ARCH_HISI directly like Hi3519
> and Hi3798CV200. If some options like ARM_GIC is removed from ARCH_HISI, this kind
> of chipsets will must choose other place to select it. I suggest we should keep selecting
> ARM_GIC under ARCH_HISI as Pan's patch do.
> 
> The code may be like this:
> 
> config ARCH_HISI
>  	bool "Hisilicon SoC Support"
> -	depends on ARCH_MULTI_V7
> +	depends on ARCH_MULTI_V5 || ARCH_MULTI_V6 || ARCH_MULTI_V7
>  	select ARM_AMBA
> -	select ARM_GIC
> +	select ARM_GIC if ARCH_MULTI_V7
> +	select ARM_VIC if ARCH_MULTI_V5 || depends on ARCH_MULTI_V6
>  	select ARM_TIMER_SP804
>  	select POWER_RESET
>  	select POWER_RESET_HISI
>  	select POWER_SUPPLY
> 

What's your opinion about this?

Best Regards,
Jiancheng

>>> On 2016/10/17 21:48, Arnd Bergmann wrote:
>>>> On Monday, October 17, 2016 8:07:03 PM CEST Pan Wen wrote:
>>>>> Add support for some HiSilicon SoCs which depend on ARCH_MULTI_V5.
>>>>>
>>>>> Signed-off-by: Pan Wen <wenpan@hisilicon.com>
>>>>>
>>>>
>>>> Looks ok. I've added Marty Plummer to Cc, he was recently proposing
>>>> patches for Hi3520, which I think is closely related to this one.
>>>> Please try to work together so the patches don't conflict. It should
>>>> be fairly straightforward since you are basically doing the same
>>>> change here.
>>>>
> 
> 
> 
> .
> 


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

* [PATCH 1/3] arm: hisi: add ARCH_MULTI_V5 support
@ 2016-11-18  6:42             ` Jiancheng Xue
  0 siblings, 0 replies; 68+ messages in thread
From: Jiancheng Xue @ 2016-11-18  6:42 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Marty,

On 2016/11/17 11:03, Jiancheng Xue wrote:
> Hi Wei?
> 
> On 2016/11/16 17:31, Wei Xu wrote:
>> Hi Pan,
>>
>> On 2016/11/16 8:56, wenpan wrote:
>>> Hi Marty?
>>> Does this confict with your patch? If not?I hope this could be merged first.  Besides could you tell me the link to your related patch?
>>
>> This is the link: https://patchwork.kernel.org/patch/9334743/
>>

Could you give your comments on this patch?
If you have any objections to it, please let us know.

> 
> Thank you for offering this.If I want to give some comments on Marty's patch,
> what should I do?
> 
> For Marty's patch, I think there's no need to add specific config item ARCH_HIxxxx
> for every chipset. Some existing chipsets depend on ARCH_HISI directly like Hi3519
> and Hi3798CV200. If some options like ARM_GIC is removed from ARCH_HISI, this kind
> of chipsets will must choose other place to select it. I suggest we should keep selecting
> ARM_GIC under ARCH_HISI as Pan's patch do.
> 
> The code may be like this:
> 
> config ARCH_HISI
>  	bool "Hisilicon SoC Support"
> -	depends on ARCH_MULTI_V7
> +	depends on ARCH_MULTI_V5 || ARCH_MULTI_V6 || ARCH_MULTI_V7
>  	select ARM_AMBA
> -	select ARM_GIC
> +	select ARM_GIC if ARCH_MULTI_V7
> +	select ARM_VIC if ARCH_MULTI_V5 || depends on ARCH_MULTI_V6
>  	select ARM_TIMER_SP804
>  	select POWER_RESET
>  	select POWER_RESET_HISI
>  	select POWER_SUPPLY
> 

What's your opinion about this?

Best Regards,
Jiancheng

>>> On 2016/10/17 21:48, Arnd Bergmann wrote:
>>>> On Monday, October 17, 2016 8:07:03 PM CEST Pan Wen wrote:
>>>>> Add support for some HiSilicon SoCs which depend on ARCH_MULTI_V5.
>>>>>
>>>>> Signed-off-by: Pan Wen <wenpan@hisilicon.com>
>>>>>
>>>>
>>>> Looks ok. I've added Marty Plummer to Cc, he was recently proposing
>>>> patches for Hi3520, which I think is closely related to this one.
>>>> Please try to work together so the patches don't conflict. It should
>>>> be fairly straightforward since you are basically doing the same
>>>> change here.
>>>>
> 
> 
> 
> .
> 

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

* Re: [PATCH 1/3] arm: hisi: add ARCH_MULTI_V5 support
  2016-10-17 13:48     ` Arnd Bergmann
@ 2016-12-05  2:03       ` Jiancheng Xue
  -1 siblings, 0 replies; 68+ messages in thread
From: Jiancheng Xue @ 2016-12-05  2:03 UTC (permalink / raw)
  To: Arnd Bergmann, Pan Wen
  Cc: robh+dt, mark.rutland, linux, xuwei5, linux-kernel,
	linux-arm-kernel, howell.yang, jalen.hsu, lvkuanliang, suwenping,
	raojun, kevin.lixu, Marty Plummer

Hi Arnd,

On 2016/10/17 21:48, Arnd Bergmann wrote:
> On Monday, October 17, 2016 8:07:03 PM CEST Pan Wen wrote:
>> Add support for some HiSilicon SoCs which depend on ARCH_MULTI_V5.
>>
>> Signed-off-by: Pan Wen <wenpan@hisilicon.com>
>>
> 
> Looks ok. I've added Marty Plummer to Cc, he was recently proposing
> patches for Hi3520, which I think is closely related to this one.
> Please try to work together so the patches don't conflict. It should
> be fairly straightforward since you are basically doing the same
> change here.
> 
Marty hasn't give any replies about this thread until now. I reviewed
the patch for Hi3520. And I think this patch won't conflict with Hi3520.
Could you help us to ack this patch?

Thanks,
Jiancheng

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

* [PATCH 1/3] arm: hisi: add ARCH_MULTI_V5 support
@ 2016-12-05  2:03       ` Jiancheng Xue
  0 siblings, 0 replies; 68+ messages in thread
From: Jiancheng Xue @ 2016-12-05  2:03 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Arnd,

On 2016/10/17 21:48, Arnd Bergmann wrote:
> On Monday, October 17, 2016 8:07:03 PM CEST Pan Wen wrote:
>> Add support for some HiSilicon SoCs which depend on ARCH_MULTI_V5.
>>
>> Signed-off-by: Pan Wen <wenpan@hisilicon.com>
>>
> 
> Looks ok. I've added Marty Plummer to Cc, he was recently proposing
> patches for Hi3520, which I think is closely related to this one.
> Please try to work together so the patches don't conflict. It should
> be fairly straightforward since you are basically doing the same
> change here.
> 
Marty hasn't give any replies about this thread until now. I reviewed
the patch for Hi3520. And I think this patch won't conflict with Hi3520.
Could you help us to ack this patch?

Thanks,
Jiancheng

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

* Re: [PATCH 1/3] arm: hisi: add ARCH_MULTI_V5 support
  2016-12-05  2:03       ` Jiancheng Xue
@ 2016-12-09 15:07         ` Marty Plummer
  -1 siblings, 0 replies; 68+ messages in thread
From: Marty Plummer @ 2016-12-09 15:07 UTC (permalink / raw)
  To: Jiancheng Xue, Arnd Bergmann, Pan Wen
  Cc: robh+dt, mark.rutland, linux, xuwei5, linux-kernel,
	linux-arm-kernel, howell.yang, jalen.hsu, lvkuanliang, suwenping,
	raojun, kevin.lixu


[-- Attachment #1.1: Type: text/plain, Size: 1290 bytes --]

On 12/04/2016 08:03 PM, Jiancheng Xue wrote:
> Hi Arnd,
> 
> On 2016/10/17 21:48, Arnd Bergmann wrote:
>> On Monday, October 17, 2016 8:07:03 PM CEST Pan Wen wrote:
>>> Add support for some HiSilicon SoCs which depend on ARCH_MULTI_V5.
>>>
>>> Signed-off-by: Pan Wen <wenpan@hisilicon.com>
>>>
>>
>> Looks ok. I've added Marty Plummer to Cc, he was recently proposing
>> patches for Hi3520, which I think is closely related to this one.
>> Please try to work together so the patches don't conflict. It should
>> be fairly straightforward since you are basically doing the same
>> change here.
>>
> Marty hasn't give any replies about this thread until now. I reviewed
> the patch for Hi3520. And I think this patch won't conflict with Hi3520.
> Could you help us to ack this patch?
> 
> Thanks,
> Jiancheng
> 
> 
Hello all

Sorry for my lack of activity, I've just been very busy lately with real
world considerations (well, real world but related to this; I have
another board based on hi3521a I've been tinkering with, trying to get
the manuf. to release gpl source via the sfconfservancy). I've not given
up on the project, however, since devices like this really need updates
in light of the recent botnets targeting devices of this sort as
manpower.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* [PATCH 1/3] arm: hisi: add ARCH_MULTI_V5 support
@ 2016-12-09 15:07         ` Marty Plummer
  0 siblings, 0 replies; 68+ messages in thread
From: Marty Plummer @ 2016-12-09 15:07 UTC (permalink / raw)
  To: linux-arm-kernel

On 12/04/2016 08:03 PM, Jiancheng Xue wrote:
> Hi Arnd,
> 
> On 2016/10/17 21:48, Arnd Bergmann wrote:
>> On Monday, October 17, 2016 8:07:03 PM CEST Pan Wen wrote:
>>> Add support for some HiSilicon SoCs which depend on ARCH_MULTI_V5.
>>>
>>> Signed-off-by: Pan Wen <wenpan@hisilicon.com>
>>>
>>
>> Looks ok. I've added Marty Plummer to Cc, he was recently proposing
>> patches for Hi3520, which I think is closely related to this one.
>> Please try to work together so the patches don't conflict. It should
>> be fairly straightforward since you are basically doing the same
>> change here.
>>
> Marty hasn't give any replies about this thread until now. I reviewed
> the patch for Hi3520. And I think this patch won't conflict with Hi3520.
> Could you help us to ack this patch?
> 
> Thanks,
> Jiancheng
> 
> 
Hello all

Sorry for my lack of activity, I've just been very busy lately with real
world considerations (well, real world but related to this; I have
another board based on hi3521a I've been tinkering with, trying to get
the manuf. to release gpl source via the sfconfservancy). I've not given
up on the project, however, since devices like this really need updates
in light of the recent botnets targeting devices of this sort as
manpower.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20161209/978fa980/attachment.sig>

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

* Re: [PATCH 1/3] arm: hisi: add ARCH_MULTI_V5 support
  2016-12-09 15:07         ` Marty Plummer
@ 2016-12-12  7:11           ` Jiancheng Xue
  -1 siblings, 0 replies; 68+ messages in thread
From: Jiancheng Xue @ 2016-12-12  7:11 UTC (permalink / raw)
  To: Marty Plummer, Arnd Bergmann, Pan Wen
  Cc: robh+dt, mark.rutland, linux, xuwei5, linux-kernel,
	linux-arm-kernel, howell.yang, jalen.hsu, lvkuanliang, suwenping,
	raojun, kevin.lixu



On 2016/12/9 23:07, Marty Plummer wrote:
> On 12/04/2016 08:03 PM, Jiancheng Xue wrote:
>> Hi Arnd,
>>
>> On 2016/10/17 21:48, Arnd Bergmann wrote:
>>> On Monday, October 17, 2016 8:07:03 PM CEST Pan Wen wrote:
>>>> Add support for some HiSilicon SoCs which depend on ARCH_MULTI_V5.
>>>>
>>>> Signed-off-by: Pan Wen <wenpan@hisilicon.com>
>>>>
>>>
>>> Looks ok. I've added Marty Plummer to Cc, he was recently proposing
>>> patches for Hi3520, which I think is closely related to this one.
>>> Please try to work together so the patches don't conflict. It should
>>> be fairly straightforward since you are basically doing the same
>>> change here.
>>>
>> Marty hasn't give any replies about this thread until now. I reviewed
>> the patch for Hi3520. And I think this patch won't conflict with Hi3520.
>> Could you help us to ack this patch?
>>
>> Thanks,
>> Jiancheng
>>
>>
> Hello all
> 
> Sorry for my lack of activity, I've just been very busy lately with real
> world considerations (well, real world but related to this; I have
> another board based on hi3521a I've been tinkering with, trying to get
> the manuf. to release gpl source via the sfconfservancy). I've not given
> up on the project, however, since devices like this really need updates
> in light of the recent botnets targeting devices of this sort as
> manpower.

Do you have any objections to this patch?  If not, I hope this patch can
be merged in 4.10.  Thank you.

Regards,
Jiancheng

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

* [PATCH 1/3] arm: hisi: add ARCH_MULTI_V5 support
@ 2016-12-12  7:11           ` Jiancheng Xue
  0 siblings, 0 replies; 68+ messages in thread
From: Jiancheng Xue @ 2016-12-12  7:11 UTC (permalink / raw)
  To: linux-arm-kernel



On 2016/12/9 23:07, Marty Plummer wrote:
> On 12/04/2016 08:03 PM, Jiancheng Xue wrote:
>> Hi Arnd,
>>
>> On 2016/10/17 21:48, Arnd Bergmann wrote:
>>> On Monday, October 17, 2016 8:07:03 PM CEST Pan Wen wrote:
>>>> Add support for some HiSilicon SoCs which depend on ARCH_MULTI_V5.
>>>>
>>>> Signed-off-by: Pan Wen <wenpan@hisilicon.com>
>>>>
>>>
>>> Looks ok. I've added Marty Plummer to Cc, he was recently proposing
>>> patches for Hi3520, which I think is closely related to this one.
>>> Please try to work together so the patches don't conflict. It should
>>> be fairly straightforward since you are basically doing the same
>>> change here.
>>>
>> Marty hasn't give any replies about this thread until now. I reviewed
>> the patch for Hi3520. And I think this patch won't conflict with Hi3520.
>> Could you help us to ack this patch?
>>
>> Thanks,
>> Jiancheng
>>
>>
> Hello all
> 
> Sorry for my lack of activity, I've just been very busy lately with real
> world considerations (well, real world but related to this; I have
> another board based on hi3521a I've been tinkering with, trying to get
> the manuf. to release gpl source via the sfconfservancy). I've not given
> up on the project, however, since devices like this really need updates
> in light of the recent botnets targeting devices of this sort as
> manpower.

Do you have any objections to this patch?  If not, I hope this patch can
be merged in 4.10.  Thank you.

Regards,
Jiancheng

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

* Re: [PATCH 3/3] dts: hisi: add dts files for Hi3516CV300 demo board
@ 2016-12-12 11:34     ` Jiancheng Xue
  0 siblings, 0 replies; 68+ messages in thread
From: Jiancheng Xue @ 2016-12-12 11:34 UTC (permalink / raw)
  To: Pan Wen, robh+dt, mark.rutland, linux, xuwei5, Arnd Bergmann
  Cc: devicetree, linux-kernel, linux-arm-kernel, howell.yang,
	jalen.hsu, lvkuanliang, suwenping, raojun, kevin.lixu


On 2016/10/17 20:07, Pan Wen wrote:
> Add dts files for Hi3516CV300 demo board.
> 
> Signed-off-by: Pan Wen <wenpan@hisilicon.com>
> ---

Could you help to review this patch, please?

>  arch/arm/boot/dts/Makefile             |   1 +
>  arch/arm/boot/dts/hi3516cv300-demb.dts | 148 ++++++++++++
>  arch/arm/boot/dts/hi3516cv300.dtsi     | 397 +++++++++++++++++++++++++++++++++
>  3 files changed, 546 insertions(+)
>  create mode 100644 arch/arm/boot/dts/hi3516cv300-demb.dts
>  create mode 100644 arch/arm/boot/dts/hi3516cv300.dtsi
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index befcd26..1f25530 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -171,6 +171,7 @@ dtb-$(CONFIG_ARCH_HIP01) += \
>  dtb-$(CONFIG_ARCH_HIP04) += \
>  	hip04-d01.dtb
>  dtb-$(CONFIG_ARCH_HISI) += \
> +	hi3516cv300-demb.dtb \
>  	hi3519-demb.dtb
>  dtb-$(CONFIG_ARCH_HIX5HD2) += \
>  	hisi-x5hd2-dkb.dtb
> diff --git a/arch/arm/boot/dts/hi3516cv300-demb.dts b/arch/arm/boot/dts/hi3516cv300-demb.dts
> new file mode 100644
> index 0000000..6a75cd6
> --- /dev/null
> +++ b/arch/arm/boot/dts/hi3516cv300-demb.dts
> @@ -0,0 +1,148 @@
> +/*
> + * Copyright (c) 2016 HiSilicon Technologies Co., Ltd.
> + *
> + * 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.
> + *
> + * 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.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program.  If not, see <http://www.gnu.org/licenses/>.
> + *
> + */
> +
> +
> +/dts-v1/;
> +#include "hi3516cv300.dtsi"
> +
> +/ {
> +	model = "Hisilicon Hi3516CV300 DEMO Board";
> +	compatible = "hisilicon,hi3516cv300";
> +
> +	aliases {
> +		serial0 = &uart0;
> +		serial1 = &uart1;
> +		serial2 = &uart2;
> +		i2c0 = &i2c_bus0;
> +		i2c1 = &i2c_bus1;
> +		spi0 = &spi_bus0;
> +		spi1 = &spi_bus1;
> +	};
> +
> +	chosen {
> +		stdout-path = "serial0:115200n8";
> +	};
> +
> +	memory {
> +		device_type = "memory";
> +		reg = <0x80000000 0x10000000>;
> +	};
> +};
> +
> +&dual_timer0 {
> +	status = "okay";
> +};
> +
> +&watchdog {
> +	status = "okay";
> +};
> +
> +&pwm {
> +	status = "okay";
> +};
> +
> +&uart0 {
> +	status = "okay";
> +};
> +
> +&i2c_bus0 {
> +	status = "okay";
> +	clock-frequency = <100000>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&i2c0_pmux>;
> +};
> +
> +&i2c_bus1 {
> +	status = "okay";
> +	clock-frequency = <100000>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&i2c1_pmux>;
> +};
> +
> +&spi_bus0{
> +	status = "disabled";
> +	num-cs = <1>;
> +	cs-gpios = <&gpio_chip0 6 0>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&spi0_pmux>;
> +};
> +
> +&spi_bus1{
> +	status = "okay";
> +	num-cs = <2>;
> +	cs-gpios = <&gpio_chip5 3 0>, <&gpio_chip5 4 0>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&spi1_pmux>;
> +};
> +
> +&fmc {
> +	spi-nor@0 {
> +		compatible = "jedec,spi-nor";
> +		reg = <0>;
> +		spi-max-frequency = <160000000>;
> +		m25p,fast-read;
> +	};
> +};
> +
> +&mdio {
> +	phy0: phy@1 {
> +		reg = <1>;
> +	};
> +};
> +
> +&hisi_femac {
> +	mac-address = [00 00 00 00 00 00];
> +	phy-mode = "rmii";
> +	phy-handle = <&phy0>;
> +	hisilicon,phy-reset-delays-us = <10000 10000 150000>;
> +};
> +
> +&dmac {
> +	status = "okay";
> +};
> +
> +&pmux {
> +	i2c0_pmux: i2c0_pmux {
> +		pinctrl-single,pins = <
> +			0x2c 0x3
> +			0x30 0x3>;
> +	};
> +
> +	i2c1_pmux: i2c1_pmux {
> +		pinctrl-single,pins = <
> +			0x20 0x1
> +			0x24 0x1>;
> +	};
> +
> +	spi0_pmux: spi0_pmux {
> +		pinctrl-single,pins = <
> +			0x28 0x1
> +			0x2c 0x1
> +			0x30 0x1
> +			0x34 0x1>;
> +	};
> +
> +	spi1_pmux: spi1_pmux {
> +		pinctrl-single,pins = <
> +			0xc4 0x1
> +			0xc8 0x1
> +			0xcc 0x1
> +			0xd0 0x1
> +			0xd4 0x1>;
> +	};
> +};
> diff --git a/arch/arm/boot/dts/hi3516cv300.dtsi b/arch/arm/boot/dts/hi3516cv300.dtsi
> new file mode 100644
> index 0000000..1da41ab
> --- /dev/null
> +++ b/arch/arm/boot/dts/hi3516cv300.dtsi
> @@ -0,0 +1,397 @@
> +/*
> + * Copyright (c) 2016 HiSilicon Technologies Co., Ltd.
> + *
> + * 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.
> + *
> + * 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.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program.  If not, see <http://www.gnu.org/licenses/>.
> + *
> + */
> +
> +#include "skeleton.dtsi"
> +#include <dt-bindings/clock/hi3516cv300-clock.h>
> +/ {
> +	#address-cells = <1>;
> +	#size-cells = <1>;
> +
> +	cpus {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		cpu@0 {
> +			device_type = "cpu";
> +			compatible = "arm,arm926ej-s";
> +			reg = <0>;
> +		};
> +	};
> +
> +	vic: interrupt-controller@10040000 {
> +		compatible = "arm,pl190-vic";
> +		interrupt-controller;
> +		#interrupt-cells = <1>;
> +		reg = <0x10040000 0x1000>;
> +	};
> +
> +	soc {
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		compatible = "simple-bus";
> +		interrupt-parent = <&vic>;
> +		ranges;
> +
> +		clk_3m: clk_3m {
> +			compatible = "fixed-clock";
> +			#clock-cells = <0>;
> +			clock-frequency = <3000000>;
> +		};
> +
> +		clk_apb: clk_apb {
> +			compatible = "fixed-clock";
> +			#clock-cells = <0>;
> +			clock-frequency = <50000000>;
> +		};
> +
> +		crg: clock-reset-controller@12010000 {
> +			compatible = "hisilicon,hi3516cv300-crg";
> +			reg = <0x12010000 0x1000>;
> +			#clock-cells = <1>;
> +			#reset-cells = <2>;
> +		};
> +
> +		sysctrl: system-controller@12020000 {
> +			compatible = "hisilicon,hi3516cv300-sysctrl", "syscon";
> +			reg = <0x12020000 0x1000>;
> +			#clock-cells = <1>;
> +		};
> +
> +		reboot {
> +			compatible = "syscon-reboot";
> +			regmap = <&sysctrl>;
> +			offset = <0x4>;
> +			mask = <0xdeadbeef>;
> +		};
> +
> +		dual_timer0: dual_timer@12000000 {
> +			compatible = "arm,sp804", "arm,primecell";
> +			reg = <0x12000000 0x1000>;
> +			interrupts = <3>;
> +			clocks = <&clk_3m>, <&clk_3m>, <&clk_apb>;
> +			clock-names = "timer0", "timer1", "apb_pclk";
> +			status = "disabled";
> +		};
> +
> +		dual_timer1: dual_timer@12001000 {
> +			compatible = "arm,sp804", "arm,primecell";
> +			reg = <0x12001000 0x1000>;
> +			interrupts = <4>;
> +			clocks = <&clk_3m>, <&clk_3m>, <&clk_apb>;
> +			clock-names = "timer0", "timer1", "apb_pclk";
> +			status = "disabled";
> +		};
> +
> +		watchdog: watchdog@12080000 {
> +			compatible = "arm,sp805-wdt", "arm,primecell";
> +			arm,primecell-periphid = <0x00141805>;
> +			reg = <0x12080000 0x1000>;
> +			clocks = <&sysctrl HI3516CV300_WDT_CLK>,
> +				<&crg HI3516CV300_APB_CLK>;
> +			clock-names = "wdog_clk", "apb_pclk";
> +			status = "disabled";
> +		};
> +
> +		pwm: pwm@12130000 {
> +			compatible = "hisilicon,hi3516cv300-pwm",
> +				"hisilicon,hibvt-pwm";
> +			reg = <0x12130000 0x10000>;
> +			clocks = <&crg HI3516CV300_PWM_CLK>;
> +			resets = <&crg 0x38 0>;
> +			#pwm-cells = <2>;
> +			status = "disabled";
> +		};
> +
> +		uart0: uart@12100000 {
> +			compatible = "arm,pl011", "arm,primecell";
> +			reg = <0x12100000 0x1000>;
> +			interrupts = <5>;
> +			clocks = <&crg HI3516CV300_UART0_CLK>;
> +			clock-names = "apb_pclk";
> +			status = "disabled";
> +		};
> +
> +		uart1: uart@12101000 {
> +			compatible = "arm,pl011", "arm,primecell";
> +			reg = <0x12101000 0x1000>;
> +			interrupts = <30>;
> +			clocks = <&crg HI3516CV300_UART1_CLK>;
> +			clock-names = "apb_pclk";
> +			status = "disabled";
> +		};
> +
> +		uart2: uart@12102000 {
> +			compatible = "arm,pl011", "arm,primecell";
> +			reg = <0x12102000 0x1000>;
> +			interrupts = <25>;
> +			clocks = <&crg HI3516CV300_UART2_CLK>;
> +			clock-names = "apb_pclk";
> +			status = "disabled";
> +		};
> +
> +		i2c_bus0: i2c@12110000 {
> +			compatible = "hisilicon,hi3516cv300-i2c",
> +				"hisilicon,hibvt-i2c";
> +			reg = <0x12110000 0x1000>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			status = "disabled";
> +		};
> +
> +		i2c_bus1: i2c@12112000 {
> +			compatible = "hisilicon,hi3516cv300-i2c",
> +				"hisilicon,hibvt-i2c";
> +			reg = <0x12112000 0x1000>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			status = "disabled";
> +		};
> +
> +		spi_bus0: spi@12120000 {
> +			compatible = "arm,pl022", "arm,primecell";
> +			reg = <0x12120000 0x1000>;
> +			interrupts = <6>;
> +			clocks = <&crg HI3516CV300_SPI0_CLK>;
> +			clock-names = "apb_pclk";
> +			dmas = <&dmac 12 1>, <&dmac 13 2>;
> +			dma-names = "rx", "tx";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			status = "disabled";
> +		};
> +
> +		spi_bus1: spi@12121000 {
> +			compatible = "arm,pl022", "arm,primecell";
> +			reg = <0x12121000 0x1000>, <0x12030000 0x4>;
> +			interrupts = <7>;
> +			clocks = <&crg HI3516CV300_SPI1_CLK>;
> +			clock-names = "apb_pclk";
> +			dmas = <&dmac 14 1>, <&dmac 15 2>;
> +			dma-names = "rx", "tx";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			status = "disabled";
> +		};
> +
> +		fmc: spi-nor-controller@10000000 {
> +			compatible = "hisilicon,fmc-spi-nor";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			reg = <0x10000000 0x1000>, <0x14000000 0x1000000>;
> +			reg-names = "control", "memory";
> +			clocks = <&crg HI3516CV300_FMC_CLK>;
> +			assigned-clocks = <&crg HI3516CV300_FMC_CLK>;
> +			assigned-clock-rates = <24000000>;
> +		};
> +
> +		mdio: mdio@10051100 {
> +			compatible = "hisilicon,hisi-femac-mdio";
> +			reg = <0x10051100 0x10>;
> +			clocks = <&crg HI3516CV300_ETH_CLK>;
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +		};
> +
> +		hisi_femac: ethernet@10090000 {
> +			compatible = "hisilicon,hi3516cv300-femac",
> +				"hisilicon,hisi-femac-v2";
> +			reg = <0x10050000 0x1000>,<0x10051300 0x200>;
> +			interrupts = <12>;
> +			clocks = <&crg HI3516CV300_ETH_CLK>;
> +			resets = <&crg 0xec 0>, <&crg 0xec 3>;
> +			reset-names = "mac","phy";
> +		};
> +
> +		dmac: dma-controller@10030000 {
> +			compatible = "arm,pl080", "arm,primecell";
> +			reg = <0x10030000 0x1000>;
> +			interrupts = <14>;
> +			clocks = <&crg HI3516CV300_DMAC_CLK>;
> +			clock-names = "apb_pclk";
> +			lli-bus-interface-ahb1;
> +			lli-bus-interface-ahb2;
> +			mem-bus-interface-ahb1;
> +			mem-bus-interface-ahb2;
> +			memcpy-burst-size = <256>;
> +			memcpy-bus-width = <32>;
> +			#dma-cells = <2>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip0: gpio@12140000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12140000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 61 2>,
> +				<&pmux 4 11 1>,
> +				<&pmux 5 10 1>,
> +				<&pmux 6 13 2>;
> +
> +			status = "disabled";
> +		};
> +
> +		gpio_chip1: gpio@12141000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12141000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 16 7>,
> +				<&pmux 7 0 1>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip2: gpio@12142000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12142000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 46 1>,
> +				<&pmux 1 45 1>,
> +				<&pmux 2 44 1>,
> +				<&pmux 3 43 1>,
> +				<&pmux 4 39 1>,
> +				<&pmux 5 38 1>,
> +				<&pmux 6 40 1>,
> +				<&pmux 7 48 1>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip3: gpio@12143000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12143000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 37 1>,
> +				<&pmux 1 36 1>,
> +				<&pmux 2 35 1>,
> +				<&pmux 3 34 1>,
> +				<&pmux 4 23 2>,
> +				<&pmux 6 8 2>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip4: gpio@12144000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12144000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 27 1>,
> +				<&pmux 1 26 1>,
> +				<&pmux 2 31 1>,
> +				<&pmux 3 30 1>,
> +				<&pmux 4 28 2>,
> +				<&pmux 6 33 1>,
> +				<&pmux 7 32 1>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip5: gpio@12145000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12145000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 53 1>,
> +				<&pmux 1 51 2>,
> +				<&pmux 3 50 1>,
> +				<&pmux 4 49 1>,
> +				<&pmux 5 47 1>,
> +				<&pmux 6 40 2>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip6: gpio@12146000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12146000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 7 1>,
> +				<&pmux 1 6 1>,
> +				<&pmux 2 4 1>,
> +				<&pmux 3 5 1>,
> +				<&pmux 4 15 1>,
> +				<&pmux 5 1 3>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip7: gpio@12147000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12147000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 1 55 6>,
> +				<&pmux 7 25 1>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip8: gpio@12148000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12148000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 63 3>,
> +				<&pmux 3 12 1>;
> +			status = "disabled";
> +		};
> +
> +		pmux: pinmux@12040000 {
> +			compatible = "pinctrl-single";
> +			reg = <0x12040000 0x108>;
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +			#gpio-range-cells = <3>;
> +			ranges;
> +
> +			pinctrl-single,register-width = <32>;
> +			pinctrl-single,function-mask = <7>;
> +			/* pin base, nr pins & gpio function */
> +			pinctrl-single,gpio-range = <&range 0 54 0
> +				&range 55 6 1 &range 61 5 0>;
> +
> +			range: gpio-range {
> +				#pinctrl-single,gpio-range-cells = <3>;
> +			};
> +		};
> +
> +		pconf: pinconf@12040800 {
> +			compatible = "pinconf-single";
> +			reg = <0x12040800 0x130>;
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +			ranges;
> +
> +			pinctrl-single,register-width = <32>;
> +		};
> +	};
> +};
> 

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

* Re: [PATCH 3/3] dts: hisi: add dts files for Hi3516CV300 demo board
@ 2016-12-12 11:34     ` Jiancheng Xue
  0 siblings, 0 replies; 68+ messages in thread
From: Jiancheng Xue @ 2016-12-12 11:34 UTC (permalink / raw)
  To: Pan Wen, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	mark.rutland-5wv7dgnIgG8, linux-I+IVW8TIWO2tmTQ+vhA3Yw,
	xuwei5-C8/M+/jPZTeaMJb+Lgu22Q, Arnd Bergmann
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	howell.yang-C8/M+/jPZTeaMJb+Lgu22Q,
	jalen.hsu-C8/M+/jPZTeaMJb+Lgu22Q,
	lvkuanliang-C8/M+/jPZTeaMJb+Lgu22Q,
	suwenping-C8/M+/jPZTeaMJb+Lgu22Q, raojun-C8/M+/jPZTeaMJb+Lgu22Q,
	kevin.lixu-C8/M+/jPZTeaMJb+Lgu22Q


On 2016/10/17 20:07, Pan Wen wrote:
> Add dts files for Hi3516CV300 demo board.
> 
> Signed-off-by: Pan Wen <wenpan-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>
> ---

Could you help to review this patch, please?

>  arch/arm/boot/dts/Makefile             |   1 +
>  arch/arm/boot/dts/hi3516cv300-demb.dts | 148 ++++++++++++
>  arch/arm/boot/dts/hi3516cv300.dtsi     | 397 +++++++++++++++++++++++++++++++++
>  3 files changed, 546 insertions(+)
>  create mode 100644 arch/arm/boot/dts/hi3516cv300-demb.dts
>  create mode 100644 arch/arm/boot/dts/hi3516cv300.dtsi
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index befcd26..1f25530 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -171,6 +171,7 @@ dtb-$(CONFIG_ARCH_HIP01) += \
>  dtb-$(CONFIG_ARCH_HIP04) += \
>  	hip04-d01.dtb
>  dtb-$(CONFIG_ARCH_HISI) += \
> +	hi3516cv300-demb.dtb \
>  	hi3519-demb.dtb
>  dtb-$(CONFIG_ARCH_HIX5HD2) += \
>  	hisi-x5hd2-dkb.dtb
> diff --git a/arch/arm/boot/dts/hi3516cv300-demb.dts b/arch/arm/boot/dts/hi3516cv300-demb.dts
> new file mode 100644
> index 0000000..6a75cd6
> --- /dev/null
> +++ b/arch/arm/boot/dts/hi3516cv300-demb.dts
> @@ -0,0 +1,148 @@
> +/*
> + * Copyright (c) 2016 HiSilicon Technologies Co., Ltd.
> + *
> + * 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.
> + *
> + * 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.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program.  If not, see <http://www.gnu.org/licenses/>.
> + *
> + */
> +
> +
> +/dts-v1/;
> +#include "hi3516cv300.dtsi"
> +
> +/ {
> +	model = "Hisilicon Hi3516CV300 DEMO Board";
> +	compatible = "hisilicon,hi3516cv300";
> +
> +	aliases {
> +		serial0 = &uart0;
> +		serial1 = &uart1;
> +		serial2 = &uart2;
> +		i2c0 = &i2c_bus0;
> +		i2c1 = &i2c_bus1;
> +		spi0 = &spi_bus0;
> +		spi1 = &spi_bus1;
> +	};
> +
> +	chosen {
> +		stdout-path = "serial0:115200n8";
> +	};
> +
> +	memory {
> +		device_type = "memory";
> +		reg = <0x80000000 0x10000000>;
> +	};
> +};
> +
> +&dual_timer0 {
> +	status = "okay";
> +};
> +
> +&watchdog {
> +	status = "okay";
> +};
> +
> +&pwm {
> +	status = "okay";
> +};
> +
> +&uart0 {
> +	status = "okay";
> +};
> +
> +&i2c_bus0 {
> +	status = "okay";
> +	clock-frequency = <100000>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&i2c0_pmux>;
> +};
> +
> +&i2c_bus1 {
> +	status = "okay";
> +	clock-frequency = <100000>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&i2c1_pmux>;
> +};
> +
> +&spi_bus0{
> +	status = "disabled";
> +	num-cs = <1>;
> +	cs-gpios = <&gpio_chip0 6 0>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&spi0_pmux>;
> +};
> +
> +&spi_bus1{
> +	status = "okay";
> +	num-cs = <2>;
> +	cs-gpios = <&gpio_chip5 3 0>, <&gpio_chip5 4 0>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&spi1_pmux>;
> +};
> +
> +&fmc {
> +	spi-nor@0 {
> +		compatible = "jedec,spi-nor";
> +		reg = <0>;
> +		spi-max-frequency = <160000000>;
> +		m25p,fast-read;
> +	};
> +};
> +
> +&mdio {
> +	phy0: phy@1 {
> +		reg = <1>;
> +	};
> +};
> +
> +&hisi_femac {
> +	mac-address = [00 00 00 00 00 00];
> +	phy-mode = "rmii";
> +	phy-handle = <&phy0>;
> +	hisilicon,phy-reset-delays-us = <10000 10000 150000>;
> +};
> +
> +&dmac {
> +	status = "okay";
> +};
> +
> +&pmux {
> +	i2c0_pmux: i2c0_pmux {
> +		pinctrl-single,pins = <
> +			0x2c 0x3
> +			0x30 0x3>;
> +	};
> +
> +	i2c1_pmux: i2c1_pmux {
> +		pinctrl-single,pins = <
> +			0x20 0x1
> +			0x24 0x1>;
> +	};
> +
> +	spi0_pmux: spi0_pmux {
> +		pinctrl-single,pins = <
> +			0x28 0x1
> +			0x2c 0x1
> +			0x30 0x1
> +			0x34 0x1>;
> +	};
> +
> +	spi1_pmux: spi1_pmux {
> +		pinctrl-single,pins = <
> +			0xc4 0x1
> +			0xc8 0x1
> +			0xcc 0x1
> +			0xd0 0x1
> +			0xd4 0x1>;
> +	};
> +};
> diff --git a/arch/arm/boot/dts/hi3516cv300.dtsi b/arch/arm/boot/dts/hi3516cv300.dtsi
> new file mode 100644
> index 0000000..1da41ab
> --- /dev/null
> +++ b/arch/arm/boot/dts/hi3516cv300.dtsi
> @@ -0,0 +1,397 @@
> +/*
> + * Copyright (c) 2016 HiSilicon Technologies Co., Ltd.
> + *
> + * 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.
> + *
> + * 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.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program.  If not, see <http://www.gnu.org/licenses/>.
> + *
> + */
> +
> +#include "skeleton.dtsi"
> +#include <dt-bindings/clock/hi3516cv300-clock.h>
> +/ {
> +	#address-cells = <1>;
> +	#size-cells = <1>;
> +
> +	cpus {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		cpu@0 {
> +			device_type = "cpu";
> +			compatible = "arm,arm926ej-s";
> +			reg = <0>;
> +		};
> +	};
> +
> +	vic: interrupt-controller@10040000 {
> +		compatible = "arm,pl190-vic";
> +		interrupt-controller;
> +		#interrupt-cells = <1>;
> +		reg = <0x10040000 0x1000>;
> +	};
> +
> +	soc {
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		compatible = "simple-bus";
> +		interrupt-parent = <&vic>;
> +		ranges;
> +
> +		clk_3m: clk_3m {
> +			compatible = "fixed-clock";
> +			#clock-cells = <0>;
> +			clock-frequency = <3000000>;
> +		};
> +
> +		clk_apb: clk_apb {
> +			compatible = "fixed-clock";
> +			#clock-cells = <0>;
> +			clock-frequency = <50000000>;
> +		};
> +
> +		crg: clock-reset-controller@12010000 {
> +			compatible = "hisilicon,hi3516cv300-crg";
> +			reg = <0x12010000 0x1000>;
> +			#clock-cells = <1>;
> +			#reset-cells = <2>;
> +		};
> +
> +		sysctrl: system-controller@12020000 {
> +			compatible = "hisilicon,hi3516cv300-sysctrl", "syscon";
> +			reg = <0x12020000 0x1000>;
> +			#clock-cells = <1>;
> +		};
> +
> +		reboot {
> +			compatible = "syscon-reboot";
> +			regmap = <&sysctrl>;
> +			offset = <0x4>;
> +			mask = <0xdeadbeef>;
> +		};
> +
> +		dual_timer0: dual_timer@12000000 {
> +			compatible = "arm,sp804", "arm,primecell";
> +			reg = <0x12000000 0x1000>;
> +			interrupts = <3>;
> +			clocks = <&clk_3m>, <&clk_3m>, <&clk_apb>;
> +			clock-names = "timer0", "timer1", "apb_pclk";
> +			status = "disabled";
> +		};
> +
> +		dual_timer1: dual_timer@12001000 {
> +			compatible = "arm,sp804", "arm,primecell";
> +			reg = <0x12001000 0x1000>;
> +			interrupts = <4>;
> +			clocks = <&clk_3m>, <&clk_3m>, <&clk_apb>;
> +			clock-names = "timer0", "timer1", "apb_pclk";
> +			status = "disabled";
> +		};
> +
> +		watchdog: watchdog@12080000 {
> +			compatible = "arm,sp805-wdt", "arm,primecell";
> +			arm,primecell-periphid = <0x00141805>;
> +			reg = <0x12080000 0x1000>;
> +			clocks = <&sysctrl HI3516CV300_WDT_CLK>,
> +				<&crg HI3516CV300_APB_CLK>;
> +			clock-names = "wdog_clk", "apb_pclk";
> +			status = "disabled";
> +		};
> +
> +		pwm: pwm@12130000 {
> +			compatible = "hisilicon,hi3516cv300-pwm",
> +				"hisilicon,hibvt-pwm";
> +			reg = <0x12130000 0x10000>;
> +			clocks = <&crg HI3516CV300_PWM_CLK>;
> +			resets = <&crg 0x38 0>;
> +			#pwm-cells = <2>;
> +			status = "disabled";
> +		};
> +
> +		uart0: uart@12100000 {
> +			compatible = "arm,pl011", "arm,primecell";
> +			reg = <0x12100000 0x1000>;
> +			interrupts = <5>;
> +			clocks = <&crg HI3516CV300_UART0_CLK>;
> +			clock-names = "apb_pclk";
> +			status = "disabled";
> +		};
> +
> +		uart1: uart@12101000 {
> +			compatible = "arm,pl011", "arm,primecell";
> +			reg = <0x12101000 0x1000>;
> +			interrupts = <30>;
> +			clocks = <&crg HI3516CV300_UART1_CLK>;
> +			clock-names = "apb_pclk";
> +			status = "disabled";
> +		};
> +
> +		uart2: uart@12102000 {
> +			compatible = "arm,pl011", "arm,primecell";
> +			reg = <0x12102000 0x1000>;
> +			interrupts = <25>;
> +			clocks = <&crg HI3516CV300_UART2_CLK>;
> +			clock-names = "apb_pclk";
> +			status = "disabled";
> +		};
> +
> +		i2c_bus0: i2c@12110000 {
> +			compatible = "hisilicon,hi3516cv300-i2c",
> +				"hisilicon,hibvt-i2c";
> +			reg = <0x12110000 0x1000>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			status = "disabled";
> +		};
> +
> +		i2c_bus1: i2c@12112000 {
> +			compatible = "hisilicon,hi3516cv300-i2c",
> +				"hisilicon,hibvt-i2c";
> +			reg = <0x12112000 0x1000>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			status = "disabled";
> +		};
> +
> +		spi_bus0: spi@12120000 {
> +			compatible = "arm,pl022", "arm,primecell";
> +			reg = <0x12120000 0x1000>;
> +			interrupts = <6>;
> +			clocks = <&crg HI3516CV300_SPI0_CLK>;
> +			clock-names = "apb_pclk";
> +			dmas = <&dmac 12 1>, <&dmac 13 2>;
> +			dma-names = "rx", "tx";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			status = "disabled";
> +		};
> +
> +		spi_bus1: spi@12121000 {
> +			compatible = "arm,pl022", "arm,primecell";
> +			reg = <0x12121000 0x1000>, <0x12030000 0x4>;
> +			interrupts = <7>;
> +			clocks = <&crg HI3516CV300_SPI1_CLK>;
> +			clock-names = "apb_pclk";
> +			dmas = <&dmac 14 1>, <&dmac 15 2>;
> +			dma-names = "rx", "tx";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			status = "disabled";
> +		};
> +
> +		fmc: spi-nor-controller@10000000 {
> +			compatible = "hisilicon,fmc-spi-nor";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			reg = <0x10000000 0x1000>, <0x14000000 0x1000000>;
> +			reg-names = "control", "memory";
> +			clocks = <&crg HI3516CV300_FMC_CLK>;
> +			assigned-clocks = <&crg HI3516CV300_FMC_CLK>;
> +			assigned-clock-rates = <24000000>;
> +		};
> +
> +		mdio: mdio@10051100 {
> +			compatible = "hisilicon,hisi-femac-mdio";
> +			reg = <0x10051100 0x10>;
> +			clocks = <&crg HI3516CV300_ETH_CLK>;
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +		};
> +
> +		hisi_femac: ethernet@10090000 {
> +			compatible = "hisilicon,hi3516cv300-femac",
> +				"hisilicon,hisi-femac-v2";
> +			reg = <0x10050000 0x1000>,<0x10051300 0x200>;
> +			interrupts = <12>;
> +			clocks = <&crg HI3516CV300_ETH_CLK>;
> +			resets = <&crg 0xec 0>, <&crg 0xec 3>;
> +			reset-names = "mac","phy";
> +		};
> +
> +		dmac: dma-controller@10030000 {
> +			compatible = "arm,pl080", "arm,primecell";
> +			reg = <0x10030000 0x1000>;
> +			interrupts = <14>;
> +			clocks = <&crg HI3516CV300_DMAC_CLK>;
> +			clock-names = "apb_pclk";
> +			lli-bus-interface-ahb1;
> +			lli-bus-interface-ahb2;
> +			mem-bus-interface-ahb1;
> +			mem-bus-interface-ahb2;
> +			memcpy-burst-size = <256>;
> +			memcpy-bus-width = <32>;
> +			#dma-cells = <2>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip0: gpio@12140000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12140000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 61 2>,
> +				<&pmux 4 11 1>,
> +				<&pmux 5 10 1>,
> +				<&pmux 6 13 2>;
> +
> +			status = "disabled";
> +		};
> +
> +		gpio_chip1: gpio@12141000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12141000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 16 7>,
> +				<&pmux 7 0 1>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip2: gpio@12142000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12142000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 46 1>,
> +				<&pmux 1 45 1>,
> +				<&pmux 2 44 1>,
> +				<&pmux 3 43 1>,
> +				<&pmux 4 39 1>,
> +				<&pmux 5 38 1>,
> +				<&pmux 6 40 1>,
> +				<&pmux 7 48 1>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip3: gpio@12143000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12143000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 37 1>,
> +				<&pmux 1 36 1>,
> +				<&pmux 2 35 1>,
> +				<&pmux 3 34 1>,
> +				<&pmux 4 23 2>,
> +				<&pmux 6 8 2>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip4: gpio@12144000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12144000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 27 1>,
> +				<&pmux 1 26 1>,
> +				<&pmux 2 31 1>,
> +				<&pmux 3 30 1>,
> +				<&pmux 4 28 2>,
> +				<&pmux 6 33 1>,
> +				<&pmux 7 32 1>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip5: gpio@12145000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12145000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 53 1>,
> +				<&pmux 1 51 2>,
> +				<&pmux 3 50 1>,
> +				<&pmux 4 49 1>,
> +				<&pmux 5 47 1>,
> +				<&pmux 6 40 2>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip6: gpio@12146000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12146000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 7 1>,
> +				<&pmux 1 6 1>,
> +				<&pmux 2 4 1>,
> +				<&pmux 3 5 1>,
> +				<&pmux 4 15 1>,
> +				<&pmux 5 1 3>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip7: gpio@12147000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12147000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 1 55 6>,
> +				<&pmux 7 25 1>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip8: gpio@12148000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12148000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 63 3>,
> +				<&pmux 3 12 1>;
> +			status = "disabled";
> +		};
> +
> +		pmux: pinmux@12040000 {
> +			compatible = "pinctrl-single";
> +			reg = <0x12040000 0x108>;
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +			#gpio-range-cells = <3>;
> +			ranges;
> +
> +			pinctrl-single,register-width = <32>;
> +			pinctrl-single,function-mask = <7>;
> +			/* pin base, nr pins & gpio function */
> +			pinctrl-single,gpio-range = <&range 0 54 0
> +				&range 55 6 1 &range 61 5 0>;
> +
> +			range: gpio-range {
> +				#pinctrl-single,gpio-range-cells = <3>;
> +			};
> +		};
> +
> +		pconf: pinconf@12040800 {
> +			compatible = "pinconf-single";
> +			reg = <0x12040800 0x130>;
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +			ranges;
> +
> +			pinctrl-single,register-width = <32>;
> +		};
> +	};
> +};
> 

--
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] 68+ messages in thread

* [PATCH 3/3] dts: hisi: add dts files for Hi3516CV300 demo board
@ 2016-12-12 11:34     ` Jiancheng Xue
  0 siblings, 0 replies; 68+ messages in thread
From: Jiancheng Xue @ 2016-12-12 11:34 UTC (permalink / raw)
  To: linux-arm-kernel


On 2016/10/17 20:07, Pan Wen wrote:
> Add dts files for Hi3516CV300 demo board.
> 
> Signed-off-by: Pan Wen <wenpan@hisilicon.com>
> ---

Could you help to review this patch, please?

>  arch/arm/boot/dts/Makefile             |   1 +
>  arch/arm/boot/dts/hi3516cv300-demb.dts | 148 ++++++++++++
>  arch/arm/boot/dts/hi3516cv300.dtsi     | 397 +++++++++++++++++++++++++++++++++
>  3 files changed, 546 insertions(+)
>  create mode 100644 arch/arm/boot/dts/hi3516cv300-demb.dts
>  create mode 100644 arch/arm/boot/dts/hi3516cv300.dtsi
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index befcd26..1f25530 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -171,6 +171,7 @@ dtb-$(CONFIG_ARCH_HIP01) += \
>  dtb-$(CONFIG_ARCH_HIP04) += \
>  	hip04-d01.dtb
>  dtb-$(CONFIG_ARCH_HISI) += \
> +	hi3516cv300-demb.dtb \
>  	hi3519-demb.dtb
>  dtb-$(CONFIG_ARCH_HIX5HD2) += \
>  	hisi-x5hd2-dkb.dtb
> diff --git a/arch/arm/boot/dts/hi3516cv300-demb.dts b/arch/arm/boot/dts/hi3516cv300-demb.dts
> new file mode 100644
> index 0000000..6a75cd6
> --- /dev/null
> +++ b/arch/arm/boot/dts/hi3516cv300-demb.dts
> @@ -0,0 +1,148 @@
> +/*
> + * Copyright (c) 2016 HiSilicon Technologies Co., Ltd.
> + *
> + * 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.
> + *
> + * 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.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program.  If not, see <http://www.gnu.org/licenses/>.
> + *
> + */
> +
> +
> +/dts-v1/;
> +#include "hi3516cv300.dtsi"
> +
> +/ {
> +	model = "Hisilicon Hi3516CV300 DEMO Board";
> +	compatible = "hisilicon,hi3516cv300";
> +
> +	aliases {
> +		serial0 = &uart0;
> +		serial1 = &uart1;
> +		serial2 = &uart2;
> +		i2c0 = &i2c_bus0;
> +		i2c1 = &i2c_bus1;
> +		spi0 = &spi_bus0;
> +		spi1 = &spi_bus1;
> +	};
> +
> +	chosen {
> +		stdout-path = "serial0:115200n8";
> +	};
> +
> +	memory {
> +		device_type = "memory";
> +		reg = <0x80000000 0x10000000>;
> +	};
> +};
> +
> +&dual_timer0 {
> +	status = "okay";
> +};
> +
> +&watchdog {
> +	status = "okay";
> +};
> +
> +&pwm {
> +	status = "okay";
> +};
> +
> +&uart0 {
> +	status = "okay";
> +};
> +
> +&i2c_bus0 {
> +	status = "okay";
> +	clock-frequency = <100000>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&i2c0_pmux>;
> +};
> +
> +&i2c_bus1 {
> +	status = "okay";
> +	clock-frequency = <100000>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&i2c1_pmux>;
> +};
> +
> +&spi_bus0{
> +	status = "disabled";
> +	num-cs = <1>;
> +	cs-gpios = <&gpio_chip0 6 0>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&spi0_pmux>;
> +};
> +
> +&spi_bus1{
> +	status = "okay";
> +	num-cs = <2>;
> +	cs-gpios = <&gpio_chip5 3 0>, <&gpio_chip5 4 0>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&spi1_pmux>;
> +};
> +
> +&fmc {
> +	spi-nor at 0 {
> +		compatible = "jedec,spi-nor";
> +		reg = <0>;
> +		spi-max-frequency = <160000000>;
> +		m25p,fast-read;
> +	};
> +};
> +
> +&mdio {
> +	phy0: phy at 1 {
> +		reg = <1>;
> +	};
> +};
> +
> +&hisi_femac {
> +	mac-address = [00 00 00 00 00 00];
> +	phy-mode = "rmii";
> +	phy-handle = <&phy0>;
> +	hisilicon,phy-reset-delays-us = <10000 10000 150000>;
> +};
> +
> +&dmac {
> +	status = "okay";
> +};
> +
> +&pmux {
> +	i2c0_pmux: i2c0_pmux {
> +		pinctrl-single,pins = <
> +			0x2c 0x3
> +			0x30 0x3>;
> +	};
> +
> +	i2c1_pmux: i2c1_pmux {
> +		pinctrl-single,pins = <
> +			0x20 0x1
> +			0x24 0x1>;
> +	};
> +
> +	spi0_pmux: spi0_pmux {
> +		pinctrl-single,pins = <
> +			0x28 0x1
> +			0x2c 0x1
> +			0x30 0x1
> +			0x34 0x1>;
> +	};
> +
> +	spi1_pmux: spi1_pmux {
> +		pinctrl-single,pins = <
> +			0xc4 0x1
> +			0xc8 0x1
> +			0xcc 0x1
> +			0xd0 0x1
> +			0xd4 0x1>;
> +	};
> +};
> diff --git a/arch/arm/boot/dts/hi3516cv300.dtsi b/arch/arm/boot/dts/hi3516cv300.dtsi
> new file mode 100644
> index 0000000..1da41ab
> --- /dev/null
> +++ b/arch/arm/boot/dts/hi3516cv300.dtsi
> @@ -0,0 +1,397 @@
> +/*
> + * Copyright (c) 2016 HiSilicon Technologies Co., Ltd.
> + *
> + * 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.
> + *
> + * 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.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program.  If not, see <http://www.gnu.org/licenses/>.
> + *
> + */
> +
> +#include "skeleton.dtsi"
> +#include <dt-bindings/clock/hi3516cv300-clock.h>
> +/ {
> +	#address-cells = <1>;
> +	#size-cells = <1>;
> +
> +	cpus {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		cpu at 0 {
> +			device_type = "cpu";
> +			compatible = "arm,arm926ej-s";
> +			reg = <0>;
> +		};
> +	};
> +
> +	vic: interrupt-controller at 10040000 {
> +		compatible = "arm,pl190-vic";
> +		interrupt-controller;
> +		#interrupt-cells = <1>;
> +		reg = <0x10040000 0x1000>;
> +	};
> +
> +	soc {
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		compatible = "simple-bus";
> +		interrupt-parent = <&vic>;
> +		ranges;
> +
> +		clk_3m: clk_3m {
> +			compatible = "fixed-clock";
> +			#clock-cells = <0>;
> +			clock-frequency = <3000000>;
> +		};
> +
> +		clk_apb: clk_apb {
> +			compatible = "fixed-clock";
> +			#clock-cells = <0>;
> +			clock-frequency = <50000000>;
> +		};
> +
> +		crg: clock-reset-controller at 12010000 {
> +			compatible = "hisilicon,hi3516cv300-crg";
> +			reg = <0x12010000 0x1000>;
> +			#clock-cells = <1>;
> +			#reset-cells = <2>;
> +		};
> +
> +		sysctrl: system-controller at 12020000 {
> +			compatible = "hisilicon,hi3516cv300-sysctrl", "syscon";
> +			reg = <0x12020000 0x1000>;
> +			#clock-cells = <1>;
> +		};
> +
> +		reboot {
> +			compatible = "syscon-reboot";
> +			regmap = <&sysctrl>;
> +			offset = <0x4>;
> +			mask = <0xdeadbeef>;
> +		};
> +
> +		dual_timer0: dual_timer at 12000000 {
> +			compatible = "arm,sp804", "arm,primecell";
> +			reg = <0x12000000 0x1000>;
> +			interrupts = <3>;
> +			clocks = <&clk_3m>, <&clk_3m>, <&clk_apb>;
> +			clock-names = "timer0", "timer1", "apb_pclk";
> +			status = "disabled";
> +		};
> +
> +		dual_timer1: dual_timer at 12001000 {
> +			compatible = "arm,sp804", "arm,primecell";
> +			reg = <0x12001000 0x1000>;
> +			interrupts = <4>;
> +			clocks = <&clk_3m>, <&clk_3m>, <&clk_apb>;
> +			clock-names = "timer0", "timer1", "apb_pclk";
> +			status = "disabled";
> +		};
> +
> +		watchdog: watchdog at 12080000 {
> +			compatible = "arm,sp805-wdt", "arm,primecell";
> +			arm,primecell-periphid = <0x00141805>;
> +			reg = <0x12080000 0x1000>;
> +			clocks = <&sysctrl HI3516CV300_WDT_CLK>,
> +				<&crg HI3516CV300_APB_CLK>;
> +			clock-names = "wdog_clk", "apb_pclk";
> +			status = "disabled";
> +		};
> +
> +		pwm: pwm at 12130000 {
> +			compatible = "hisilicon,hi3516cv300-pwm",
> +				"hisilicon,hibvt-pwm";
> +			reg = <0x12130000 0x10000>;
> +			clocks = <&crg HI3516CV300_PWM_CLK>;
> +			resets = <&crg 0x38 0>;
> +			#pwm-cells = <2>;
> +			status = "disabled";
> +		};
> +
> +		uart0: uart at 12100000 {
> +			compatible = "arm,pl011", "arm,primecell";
> +			reg = <0x12100000 0x1000>;
> +			interrupts = <5>;
> +			clocks = <&crg HI3516CV300_UART0_CLK>;
> +			clock-names = "apb_pclk";
> +			status = "disabled";
> +		};
> +
> +		uart1: uart at 12101000 {
> +			compatible = "arm,pl011", "arm,primecell";
> +			reg = <0x12101000 0x1000>;
> +			interrupts = <30>;
> +			clocks = <&crg HI3516CV300_UART1_CLK>;
> +			clock-names = "apb_pclk";
> +			status = "disabled";
> +		};
> +
> +		uart2: uart at 12102000 {
> +			compatible = "arm,pl011", "arm,primecell";
> +			reg = <0x12102000 0x1000>;
> +			interrupts = <25>;
> +			clocks = <&crg HI3516CV300_UART2_CLK>;
> +			clock-names = "apb_pclk";
> +			status = "disabled";
> +		};
> +
> +		i2c_bus0: i2c at 12110000 {
> +			compatible = "hisilicon,hi3516cv300-i2c",
> +				"hisilicon,hibvt-i2c";
> +			reg = <0x12110000 0x1000>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			status = "disabled";
> +		};
> +
> +		i2c_bus1: i2c at 12112000 {
> +			compatible = "hisilicon,hi3516cv300-i2c",
> +				"hisilicon,hibvt-i2c";
> +			reg = <0x12112000 0x1000>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			status = "disabled";
> +		};
> +
> +		spi_bus0: spi at 12120000 {
> +			compatible = "arm,pl022", "arm,primecell";
> +			reg = <0x12120000 0x1000>;
> +			interrupts = <6>;
> +			clocks = <&crg HI3516CV300_SPI0_CLK>;
> +			clock-names = "apb_pclk";
> +			dmas = <&dmac 12 1>, <&dmac 13 2>;
> +			dma-names = "rx", "tx";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			status = "disabled";
> +		};
> +
> +		spi_bus1: spi at 12121000 {
> +			compatible = "arm,pl022", "arm,primecell";
> +			reg = <0x12121000 0x1000>, <0x12030000 0x4>;
> +			interrupts = <7>;
> +			clocks = <&crg HI3516CV300_SPI1_CLK>;
> +			clock-names = "apb_pclk";
> +			dmas = <&dmac 14 1>, <&dmac 15 2>;
> +			dma-names = "rx", "tx";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			status = "disabled";
> +		};
> +
> +		fmc: spi-nor-controller at 10000000 {
> +			compatible = "hisilicon,fmc-spi-nor";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			reg = <0x10000000 0x1000>, <0x14000000 0x1000000>;
> +			reg-names = "control", "memory";
> +			clocks = <&crg HI3516CV300_FMC_CLK>;
> +			assigned-clocks = <&crg HI3516CV300_FMC_CLK>;
> +			assigned-clock-rates = <24000000>;
> +		};
> +
> +		mdio: mdio at 10051100 {
> +			compatible = "hisilicon,hisi-femac-mdio";
> +			reg = <0x10051100 0x10>;
> +			clocks = <&crg HI3516CV300_ETH_CLK>;
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +		};
> +
> +		hisi_femac: ethernet at 10090000 {
> +			compatible = "hisilicon,hi3516cv300-femac",
> +				"hisilicon,hisi-femac-v2";
> +			reg = <0x10050000 0x1000>,<0x10051300 0x200>;
> +			interrupts = <12>;
> +			clocks = <&crg HI3516CV300_ETH_CLK>;
> +			resets = <&crg 0xec 0>, <&crg 0xec 3>;
> +			reset-names = "mac","phy";
> +		};
> +
> +		dmac: dma-controller at 10030000 {
> +			compatible = "arm,pl080", "arm,primecell";
> +			reg = <0x10030000 0x1000>;
> +			interrupts = <14>;
> +			clocks = <&crg HI3516CV300_DMAC_CLK>;
> +			clock-names = "apb_pclk";
> +			lli-bus-interface-ahb1;
> +			lli-bus-interface-ahb2;
> +			mem-bus-interface-ahb1;
> +			mem-bus-interface-ahb2;
> +			memcpy-burst-size = <256>;
> +			memcpy-bus-width = <32>;
> +			#dma-cells = <2>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip0: gpio at 12140000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12140000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 61 2>,
> +				<&pmux 4 11 1>,
> +				<&pmux 5 10 1>,
> +				<&pmux 6 13 2>;
> +
> +			status = "disabled";
> +		};
> +
> +		gpio_chip1: gpio at 12141000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12141000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 16 7>,
> +				<&pmux 7 0 1>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip2: gpio at 12142000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12142000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 46 1>,
> +				<&pmux 1 45 1>,
> +				<&pmux 2 44 1>,
> +				<&pmux 3 43 1>,
> +				<&pmux 4 39 1>,
> +				<&pmux 5 38 1>,
> +				<&pmux 6 40 1>,
> +				<&pmux 7 48 1>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip3: gpio at 12143000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12143000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 37 1>,
> +				<&pmux 1 36 1>,
> +				<&pmux 2 35 1>,
> +				<&pmux 3 34 1>,
> +				<&pmux 4 23 2>,
> +				<&pmux 6 8 2>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip4: gpio at 12144000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12144000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 27 1>,
> +				<&pmux 1 26 1>,
> +				<&pmux 2 31 1>,
> +				<&pmux 3 30 1>,
> +				<&pmux 4 28 2>,
> +				<&pmux 6 33 1>,
> +				<&pmux 7 32 1>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip5: gpio at 12145000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12145000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 53 1>,
> +				<&pmux 1 51 2>,
> +				<&pmux 3 50 1>,
> +				<&pmux 4 49 1>,
> +				<&pmux 5 47 1>,
> +				<&pmux 6 40 2>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip6: gpio at 12146000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12146000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 7 1>,
> +				<&pmux 1 6 1>,
> +				<&pmux 2 4 1>,
> +				<&pmux 3 5 1>,
> +				<&pmux 4 15 1>,
> +				<&pmux 5 1 3>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip7: gpio at 12147000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12147000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 1 55 6>,
> +				<&pmux 7 25 1>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip8: gpio at 12148000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12148000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 63 3>,
> +				<&pmux 3 12 1>;
> +			status = "disabled";
> +		};
> +
> +		pmux: pinmux at 12040000 {
> +			compatible = "pinctrl-single";
> +			reg = <0x12040000 0x108>;
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +			#gpio-range-cells = <3>;
> +			ranges;
> +
> +			pinctrl-single,register-width = <32>;
> +			pinctrl-single,function-mask = <7>;
> +			/* pin base, nr pins & gpio function */
> +			pinctrl-single,gpio-range = <&range 0 54 0
> +				&range 55 6 1 &range 61 5 0>;
> +
> +			range: gpio-range {
> +				#pinctrl-single,gpio-range-cells = <3>;
> +			};
> +		};
> +
> +		pconf: pinconf at 12040800 {
> +			compatible = "pinconf-single";
> +			reg = <0x12040800 0x130>;
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +			ranges;
> +
> +			pinctrl-single,register-width = <32>;
> +		};
> +	};
> +};
> 

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

* Re: [PATCH 1/3] arm: hisi: add ARCH_MULTI_V5 support
       [not found]           ` <59a9b91c-d7be-cf3a-d461-252cb493d61c@gmail.com>
@ 2017-01-20  1:47               ` Jiancheng Xue
  0 siblings, 0 replies; 68+ messages in thread
From: Jiancheng Xue @ 2017-01-20  1:47 UTC (permalink / raw)
  To: Arnd Bergmann, xuwei5
  Cc: Marty Plummer, yanhaifeng, hermit.wangheming, linux,
	linux-kernel, linux-arm-kernel, wenpan, howell.yang, lvkuanliang,
	suwenping, raojun



On 2016/12/15 4:06, Marty Plummer wrote:
> On 12/12/2016 01:11 AM, Jiancheng Xue wrote:
>>
>>
>> On 2016/12/9 23:07, Marty Plummer wrote:
>>> On 12/04/2016 08:03 PM, Jiancheng Xue wrote:
>>>> Hi Arnd,
>>>>
>>>> On 2016/10/17 21:48, Arnd Bergmann wrote:
>>>>> On Monday, October 17, 2016 8:07:03 PM CEST Pan Wen wrote:
>>>>>> Add support for some HiSilicon SoCs which depend on ARCH_MULTI_V5.
>>>>>>
>>>>>> Signed-off-by: Pan Wen <wenpan@hisilicon.com>
>>>>>>
>>>>>
>>>>> Looks ok. I've added Marty Plummer to Cc, he was recently proposing
>>>>> patches for Hi3520, which I think is closely related to this one.
>>>>> Please try to work together so the patches don't conflict. It should
>>>>> be fairly straightforward since you are basically doing the same
>>>>> change here.
>>>>>
>>>> Marty hasn't give any replies about this thread until now. I reviewed
>>>> the patch for Hi3520. And I think this patch won't conflict with Hi3520.
>>>> Could you help us to ack this patch?
>>>>
>>>> Thanks,
>>>> Jiancheng
>>>>
>>>>
>>> Hello all
>>>
>>> Sorry for my lack of activity, I've just been very busy lately with real
>>> world considerations (well, real world but related to this; I have
>>> another board based on hi3521a I've been tinkering with, trying to get
>>> the manuf. to release gpl source via the sfconfservancy). I've not given
>>> up on the project, however, since devices like this really need updates
>>> in light of the recent botnets targeting devices of this sort as
>>> manpower.
>>
>> Do you have any objections to this patch?  If not, I hope this patch can
>> be merged in 4.10.  Thank you.
>>
>> Regards,
>> Jiancheng
>>
>>
>>
> I have no objections. It looks like it might make my job a bit easier in
> the end. I need to go ahead and rebase my patches anyways and fix up
> earlier concerns raised about them, so go right ahead.
> 
Hi Arnd,

Could this patch be accepted?  Any further comments will be appreciated.

Regards,
Jiancheng

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

* [PATCH 1/3] arm: hisi: add ARCH_MULTI_V5 support
@ 2017-01-20  1:47               ` Jiancheng Xue
  0 siblings, 0 replies; 68+ messages in thread
From: Jiancheng Xue @ 2017-01-20  1:47 UTC (permalink / raw)
  To: linux-arm-kernel



On 2016/12/15 4:06, Marty Plummer wrote:
> On 12/12/2016 01:11 AM, Jiancheng Xue wrote:
>>
>>
>> On 2016/12/9 23:07, Marty Plummer wrote:
>>> On 12/04/2016 08:03 PM, Jiancheng Xue wrote:
>>>> Hi Arnd,
>>>>
>>>> On 2016/10/17 21:48, Arnd Bergmann wrote:
>>>>> On Monday, October 17, 2016 8:07:03 PM CEST Pan Wen wrote:
>>>>>> Add support for some HiSilicon SoCs which depend on ARCH_MULTI_V5.
>>>>>>
>>>>>> Signed-off-by: Pan Wen <wenpan@hisilicon.com>
>>>>>>
>>>>>
>>>>> Looks ok. I've added Marty Plummer to Cc, he was recently proposing
>>>>> patches for Hi3520, which I think is closely related to this one.
>>>>> Please try to work together so the patches don't conflict. It should
>>>>> be fairly straightforward since you are basically doing the same
>>>>> change here.
>>>>>
>>>> Marty hasn't give any replies about this thread until now. I reviewed
>>>> the patch for Hi3520. And I think this patch won't conflict with Hi3520.
>>>> Could you help us to ack this patch?
>>>>
>>>> Thanks,
>>>> Jiancheng
>>>>
>>>>
>>> Hello all
>>>
>>> Sorry for my lack of activity, I've just been very busy lately with real
>>> world considerations (well, real world but related to this; I have
>>> another board based on hi3521a I've been tinkering with, trying to get
>>> the manuf. to release gpl source via the sfconfservancy). I've not given
>>> up on the project, however, since devices like this really need updates
>>> in light of the recent botnets targeting devices of this sort as
>>> manpower.
>>
>> Do you have any objections to this patch?  If not, I hope this patch can
>> be merged in 4.10.  Thank you.
>>
>> Regards,
>> Jiancheng
>>
>>
>>
> I have no objections. It looks like it might make my job a bit easier in
> the end. I need to go ahead and rebase my patches anyways and fix up
> earlier concerns raised about them, so go right ahead.
> 
Hi Arnd,

Could this patch be accepted?  Any further comments will be appreciated.

Regards,
Jiancheng

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

* Re: [PATCH 3/3] dts: hisi: add dts files for Hi3516CV300 demo board
@ 2017-01-20 16:40     ` Wei Xu
  0 siblings, 0 replies; 68+ messages in thread
From: Wei Xu @ 2017-01-20 16:40 UTC (permalink / raw)
  To: Pan Wen, mturquette, sboyd, robh+dt, mark.rutland, linux
  Cc: linux-clk, devicetree, linux-kernel, linux-arm-kernel,
	howell.yang, xuejiancheng, jalen.hsu, lvkuanliang, suwenping,
	raojun, kevin.lixu

Hi Pan Wen,

On 2016/10/17 13:07, Pan Wen wrote:
> Add dts files for Hi3516CV300 demo board.
> 
> Signed-off-by: Pan Wen <wenpan@hisilicon.com>
> ---
>  arch/arm/boot/dts/Makefile             |   1 +
>  arch/arm/boot/dts/hi3516cv300-demb.dts | 148 ++++++++++++
>  arch/arm/boot/dts/hi3516cv300.dtsi     | 397 +++++++++++++++++++++++++++++++++
>  3 files changed, 546 insertions(+)
>  create mode 100644 arch/arm/boot/dts/hi3516cv300-demb.dts
>  create mode 100644 arch/arm/boot/dts/hi3516cv300.dtsi
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index befcd26..1f25530 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -171,6 +171,7 @@ dtb-$(CONFIG_ARCH_HIP01) += \
>  dtb-$(CONFIG_ARCH_HIP04) += \
>  	hip04-d01.dtb
>  dtb-$(CONFIG_ARCH_HISI) += \
> +	hi3516cv300-demb.dtb \
>  	hi3519-demb.dtb
>  dtb-$(CONFIG_ARCH_HIX5HD2) += \
>  	hisi-x5hd2-dkb.dtb
> diff --git a/arch/arm/boot/dts/hi3516cv300-demb.dts b/arch/arm/boot/dts/hi3516cv300-demb.dts
> new file mode 100644
> index 0000000..6a75cd6
> --- /dev/null
> +++ b/arch/arm/boot/dts/hi3516cv300-demb.dts
> @@ -0,0 +1,148 @@
> +/*
> + * Copyright (c) 2016 HiSilicon Technologies Co., Ltd.
> + *
> + * 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.
> + *
> + * 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.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program.  If not, see <http://www.gnu.org/licenses/>.
> + *
> + */
> +
> +
> +/dts-v1/;
> +#include "hi3516cv300.dtsi"
> +
> +/ {
> +	model = "Hisilicon Hi3516CV300 DEMO Board";
> +	compatible = "hisilicon,hi3516cv300";
> +
> +	aliases {
> +		serial0 = &uart0;
> +		serial1 = &uart1;
> +		serial2 = &uart2;
> +		i2c0 = &i2c_bus0;
> +		i2c1 = &i2c_bus1;
> +		spi0 = &spi_bus0;
> +		spi1 = &spi_bus1;
> +	};
> +
> +	chosen {
> +		stdout-path = "serial0:115200n8";
> +	};
> +
> +	memory {
> +		device_type = "memory";
> +		reg = <0x80000000 0x10000000>;
> +	};
> +};
> +
> +&dual_timer0 {
> +	status = "okay";
> +};
> +
> +&watchdog {
> +	status = "okay";
> +};
> +
> +&pwm {
> +	status = "okay";
> +};
> +
> +&uart0 {
> +	status = "okay";
> +};
> +
> +&i2c_bus0 {
> +	status = "okay";
> +	clock-frequency = <100000>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&i2c0_pmux>;
> +};
> +
> +&i2c_bus1 {
> +	status = "okay";
> +	clock-frequency = <100000>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&i2c1_pmux>;
> +};
> +
> +&spi_bus0{
> +	status = "disabled";
> +	num-cs = <1>;
> +	cs-gpios = <&gpio_chip0 6 0>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&spi0_pmux>;
> +};
> +
> +&spi_bus1{
> +	status = "okay";
> +	num-cs = <2>;
> +	cs-gpios = <&gpio_chip5 3 0>, <&gpio_chip5 4 0>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&spi1_pmux>;
> +};
> +
> +&fmc {
> +	spi-nor@0 {
> +		compatible = "jedec,spi-nor";
> +		reg = <0>;
> +		spi-max-frequency = <160000000>;
> +		m25p,fast-read;
> +	};
> +};
> +
> +&mdio {
> +	phy0: phy@1 {
> +		reg = <1>;
> +	};
> +};
> +
> +&hisi_femac {
> +	mac-address = [00 00 00 00 00 00];
> +	phy-mode = "rmii";
> +	phy-handle = <&phy0>;
> +	hisilicon,phy-reset-delays-us = <10000 10000 150000>;
> +};
> +
> +&dmac {
> +	status = "okay";
> +};
> +
> +&pmux {
> +	i2c0_pmux: i2c0_pmux {
> +		pinctrl-single,pins = <
> +			0x2c 0x3
> +			0x30 0x3>;
> +	};
> +
> +	i2c1_pmux: i2c1_pmux {
> +		pinctrl-single,pins = <
> +			0x20 0x1
> +			0x24 0x1>;
> +	};
> +
> +	spi0_pmux: spi0_pmux {
> +		pinctrl-single,pins = <
> +			0x28 0x1
> +			0x2c 0x1
> +			0x30 0x1
> +			0x34 0x1>;
> +	};
> +
> +	spi1_pmux: spi1_pmux {
> +		pinctrl-single,pins = <
> +			0xc4 0x1
> +			0xc8 0x1
> +			0xcc 0x1
> +			0xd0 0x1
> +			0xd4 0x1>;
> +	};
> +};
> diff --git a/arch/arm/boot/dts/hi3516cv300.dtsi b/arch/arm/boot/dts/hi3516cv300.dtsi
> new file mode 100644
> index 0000000..1da41ab
> --- /dev/null
> +++ b/arch/arm/boot/dts/hi3516cv300.dtsi
> @@ -0,0 +1,397 @@
> +/*
> + * Copyright (c) 2016 HiSilicon Technologies Co., Ltd.
> + *
> + * 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.
> + *
> + * 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.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program.  If not, see <http://www.gnu.org/licenses/>.
> + *
> + */
> +
> +#include "skeleton.dtsi"
> +#include <dt-bindings/clock/hi3516cv300-clock.h>
> +/ {
> +	#address-cells = <1>;
> +	#size-cells = <1>;
> +
> +	cpus {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		cpu@0 {
> +			device_type = "cpu";
> +			compatible = "arm,arm926ej-s";
> +			reg = <0>;
> +		};
> +	};
> +
> +	vic: interrupt-controller@10040000 {
> +		compatible = "arm,pl190-vic";
> +		interrupt-controller;
> +		#interrupt-cells = <1>;
> +		reg = <0x10040000 0x1000>;
> +	};
> +
> +	soc {
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		compatible = "simple-bus";
> +		interrupt-parent = <&vic>;
> +		ranges;
> +
> +		clk_3m: clk_3m {
> +			compatible = "fixed-clock";
> +			#clock-cells = <0>;
> +			clock-frequency = <3000000>;
> +		};
> +
> +		clk_apb: clk_apb {
> +			compatible = "fixed-clock";
> +			#clock-cells = <0>;
> +			clock-frequency = <50000000>;
> +		};
> +
> +		crg: clock-reset-controller@12010000 {
> +			compatible = "hisilicon,hi3516cv300-crg";
> +			reg = <0x12010000 0x1000>;
> +			#clock-cells = <1>;
> +			#reset-cells = <2>;
> +		};
> +
> +		sysctrl: system-controller@12020000 {
> +			compatible = "hisilicon,hi3516cv300-sysctrl", "syscon";
> +			reg = <0x12020000 0x1000>;
> +			#clock-cells = <1>;
> +		};
> +
> +		reboot {
> +			compatible = "syscon-reboot";
> +			regmap = <&sysctrl>;
> +			offset = <0x4>;
> +			mask = <0xdeadbeef>;
> +		};
> +
> +		dual_timer0: dual_timer@12000000 {
> +			compatible = "arm,sp804", "arm,primecell";
> +			reg = <0x12000000 0x1000>;
> +			interrupts = <3>;
> +			clocks = <&clk_3m>, <&clk_3m>, <&clk_apb>;
> +			clock-names = "timer0", "timer1", "apb_pclk";
> +			status = "disabled";
> +		};
> +
> +		dual_timer1: dual_timer@12001000 {
> +			compatible = "arm,sp804", "arm,primecell";
> +			reg = <0x12001000 0x1000>;
> +			interrupts = <4>;
> +			clocks = <&clk_3m>, <&clk_3m>, <&clk_apb>;
> +			clock-names = "timer0", "timer1", "apb_pclk";
> +			status = "disabled";
> +		};
> +
> +		watchdog: watchdog@12080000 {
> +			compatible = "arm,sp805-wdt", "arm,primecell";
> +			arm,primecell-periphid = <0x00141805>;
> +			reg = <0x12080000 0x1000>;
> +			clocks = <&sysctrl HI3516CV300_WDT_CLK>,
> +				<&crg HI3516CV300_APB_CLK>;
> +			clock-names = "wdog_clk", "apb_pclk";
> +			status = "disabled";
> +		};
> +
> +		pwm: pwm@12130000 {
> +			compatible = "hisilicon,hi3516cv300-pwm",
> +				"hisilicon,hibvt-pwm";
> +			reg = <0x12130000 0x10000>;
> +			clocks = <&crg HI3516CV300_PWM_CLK>;
> +			resets = <&crg 0x38 0>;
> +			#pwm-cells = <2>;
> +			status = "disabled";
> +		};
> +
> +		uart0: uart@12100000 {
> +			compatible = "arm,pl011", "arm,primecell";
> +			reg = <0x12100000 0x1000>;
> +			interrupts = <5>;
> +			clocks = <&crg HI3516CV300_UART0_CLK>;
> +			clock-names = "apb_pclk";
> +			status = "disabled";
> +		};
> +
> +		uart1: uart@12101000 {
> +			compatible = "arm,pl011", "arm,primecell";
> +			reg = <0x12101000 0x1000>;
> +			interrupts = <30>;
> +			clocks = <&crg HI3516CV300_UART1_CLK>;
> +			clock-names = "apb_pclk";
> +			status = "disabled";
> +		};
> +
> +		uart2: uart@12102000 {
> +			compatible = "arm,pl011", "arm,primecell";
> +			reg = <0x12102000 0x1000>;
> +			interrupts = <25>;
> +			clocks = <&crg HI3516CV300_UART2_CLK>;
> +			clock-names = "apb_pclk";
> +			status = "disabled";
> +		};
> +
> +		i2c_bus0: i2c@12110000 {
> +			compatible = "hisilicon,hi3516cv300-i2c",
> +				"hisilicon,hibvt-i2c";

Since this driver is not in the mainline yet,
is it OK to delete this node firstly?

> +			reg = <0x12110000 0x1000>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			status = "disabled";
> +		};
> +
> +		i2c_bus1: i2c@12112000 {
> +			compatible = "hisilicon,hi3516cv300-i2c",
> +				"hisilicon,hibvt-i2c";

ditto.
Other is fine to me.

Best Regards,
Wei

> +			reg = <0x12112000 0x1000>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			status = "disabled";
> +		};
> +
> +		spi_bus0: spi@12120000 {
> +			compatible = "arm,pl022", "arm,primecell";
> +			reg = <0x12120000 0x1000>;
> +			interrupts = <6>;
> +			clocks = <&crg HI3516CV300_SPI0_CLK>;
> +			clock-names = "apb_pclk";
> +			dmas = <&dmac 12 1>, <&dmac 13 2>;
> +			dma-names = "rx", "tx";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			status = "disabled";
> +		};
> +
> +		spi_bus1: spi@12121000 {
> +			compatible = "arm,pl022", "arm,primecell";
> +			reg = <0x12121000 0x1000>, <0x12030000 0x4>;
> +			interrupts = <7>;
> +			clocks = <&crg HI3516CV300_SPI1_CLK>;
> +			clock-names = "apb_pclk";
> +			dmas = <&dmac 14 1>, <&dmac 15 2>;
> +			dma-names = "rx", "tx";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			status = "disabled";
> +		};
> +
> +		fmc: spi-nor-controller@10000000 {
> +			compatible = "hisilicon,fmc-spi-nor";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			reg = <0x10000000 0x1000>, <0x14000000 0x1000000>;
> +			reg-names = "control", "memory";
> +			clocks = <&crg HI3516CV300_FMC_CLK>;
> +			assigned-clocks = <&crg HI3516CV300_FMC_CLK>;
> +			assigned-clock-rates = <24000000>;
> +		};
> +
> +		mdio: mdio@10051100 {
> +			compatible = "hisilicon,hisi-femac-mdio";
> +			reg = <0x10051100 0x10>;
> +			clocks = <&crg HI3516CV300_ETH_CLK>;
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +		};
> +
> +		hisi_femac: ethernet@10090000 {
> +			compatible = "hisilicon,hi3516cv300-femac",
> +				"hisilicon,hisi-femac-v2";
> +			reg = <0x10050000 0x1000>,<0x10051300 0x200>;
> +			interrupts = <12>;
> +			clocks = <&crg HI3516CV300_ETH_CLK>;
> +			resets = <&crg 0xec 0>, <&crg 0xec 3>;
> +			reset-names = "mac","phy";
> +		};
> +
> +		dmac: dma-controller@10030000 {
> +			compatible = "arm,pl080", "arm,primecell";
> +			reg = <0x10030000 0x1000>;
> +			interrupts = <14>;
> +			clocks = <&crg HI3516CV300_DMAC_CLK>;
> +			clock-names = "apb_pclk";
> +			lli-bus-interface-ahb1;
> +			lli-bus-interface-ahb2;
> +			mem-bus-interface-ahb1;
> +			mem-bus-interface-ahb2;
> +			memcpy-burst-size = <256>;
> +			memcpy-bus-width = <32>;
> +			#dma-cells = <2>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip0: gpio@12140000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12140000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 61 2>,
> +				<&pmux 4 11 1>,
> +				<&pmux 5 10 1>,
> +				<&pmux 6 13 2>;
> +
> +			status = "disabled";
> +		};
> +
> +		gpio_chip1: gpio@12141000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12141000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 16 7>,
> +				<&pmux 7 0 1>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip2: gpio@12142000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12142000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 46 1>,
> +				<&pmux 1 45 1>,
> +				<&pmux 2 44 1>,
> +				<&pmux 3 43 1>,
> +				<&pmux 4 39 1>,
> +				<&pmux 5 38 1>,
> +				<&pmux 6 40 1>,
> +				<&pmux 7 48 1>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip3: gpio@12143000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12143000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 37 1>,
> +				<&pmux 1 36 1>,
> +				<&pmux 2 35 1>,
> +				<&pmux 3 34 1>,
> +				<&pmux 4 23 2>,
> +				<&pmux 6 8 2>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip4: gpio@12144000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12144000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 27 1>,
> +				<&pmux 1 26 1>,
> +				<&pmux 2 31 1>,
> +				<&pmux 3 30 1>,
> +				<&pmux 4 28 2>,
> +				<&pmux 6 33 1>,
> +				<&pmux 7 32 1>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip5: gpio@12145000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12145000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 53 1>,
> +				<&pmux 1 51 2>,
> +				<&pmux 3 50 1>,
> +				<&pmux 4 49 1>,
> +				<&pmux 5 47 1>,
> +				<&pmux 6 40 2>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip6: gpio@12146000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12146000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 7 1>,
> +				<&pmux 1 6 1>,
> +				<&pmux 2 4 1>,
> +				<&pmux 3 5 1>,
> +				<&pmux 4 15 1>,
> +				<&pmux 5 1 3>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip7: gpio@12147000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12147000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 1 55 6>,
> +				<&pmux 7 25 1>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip8: gpio@12148000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12148000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 63 3>,
> +				<&pmux 3 12 1>;
> +			status = "disabled";
> +		};
> +
> +		pmux: pinmux@12040000 {
> +			compatible = "pinctrl-single";
> +			reg = <0x12040000 0x108>;
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +			#gpio-range-cells = <3>;
> +			ranges;
> +
> +			pinctrl-single,register-width = <32>;
> +			pinctrl-single,function-mask = <7>;
> +			/* pin base, nr pins & gpio function */
> +			pinctrl-single,gpio-range = <&range 0 54 0
> +				&range 55 6 1 &range 61 5 0>;
> +
> +			range: gpio-range {
> +				#pinctrl-single,gpio-range-cells = <3>;
> +			};
> +		};
> +
> +		pconf: pinconf@12040800 {
> +			compatible = "pinconf-single";
> +			reg = <0x12040800 0x130>;
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +			ranges;
> +
> +			pinctrl-single,register-width = <32>;
> +		};
> +	};
> +};
> 

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

* Re: [PATCH 3/3] dts: hisi: add dts files for Hi3516CV300 demo board
@ 2017-01-20 16:40     ` Wei Xu
  0 siblings, 0 replies; 68+ messages in thread
From: Wei Xu @ 2017-01-20 16:40 UTC (permalink / raw)
  To: Pan Wen, mturquette-rdvid1DuHRBWk0Htik3J/w,
	sboyd-sgV2jX0FEOL9JmXXK+q4OQ, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	mark.rutland-5wv7dgnIgG8, linux-I+IVW8TIWO2tmTQ+vhA3Yw
  Cc: linux-clk-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	howell.yang-C8/M+/jPZTeaMJb+Lgu22Q,
	xuejiancheng-C8/M+/jPZTeaMJb+Lgu22Q,
	jalen.hsu-C8/M+/jPZTeaMJb+Lgu22Q,
	lvkuanliang-C8/M+/jPZTeaMJb+Lgu22Q,
	suwenping-C8/M+/jPZTeaMJb+Lgu22Q, raojun-C8/M+/jPZTeaMJb+Lgu22Q,
	kevin.lixu-C8/M+/jPZTeaMJb+Lgu22Q

Hi Pan Wen,

On 2016/10/17 13:07, Pan Wen wrote:
> Add dts files for Hi3516CV300 demo board.
> 
> Signed-off-by: Pan Wen <wenpan-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>
> ---
>  arch/arm/boot/dts/Makefile             |   1 +
>  arch/arm/boot/dts/hi3516cv300-demb.dts | 148 ++++++++++++
>  arch/arm/boot/dts/hi3516cv300.dtsi     | 397 +++++++++++++++++++++++++++++++++
>  3 files changed, 546 insertions(+)
>  create mode 100644 arch/arm/boot/dts/hi3516cv300-demb.dts
>  create mode 100644 arch/arm/boot/dts/hi3516cv300.dtsi
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index befcd26..1f25530 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -171,6 +171,7 @@ dtb-$(CONFIG_ARCH_HIP01) += \
>  dtb-$(CONFIG_ARCH_HIP04) += \
>  	hip04-d01.dtb
>  dtb-$(CONFIG_ARCH_HISI) += \
> +	hi3516cv300-demb.dtb \
>  	hi3519-demb.dtb
>  dtb-$(CONFIG_ARCH_HIX5HD2) += \
>  	hisi-x5hd2-dkb.dtb
> diff --git a/arch/arm/boot/dts/hi3516cv300-demb.dts b/arch/arm/boot/dts/hi3516cv300-demb.dts
> new file mode 100644
> index 0000000..6a75cd6
> --- /dev/null
> +++ b/arch/arm/boot/dts/hi3516cv300-demb.dts
> @@ -0,0 +1,148 @@
> +/*
> + * Copyright (c) 2016 HiSilicon Technologies Co., Ltd.
> + *
> + * 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.
> + *
> + * 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.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program.  If not, see <http://www.gnu.org/licenses/>.
> + *
> + */
> +
> +
> +/dts-v1/;
> +#include "hi3516cv300.dtsi"
> +
> +/ {
> +	model = "Hisilicon Hi3516CV300 DEMO Board";
> +	compatible = "hisilicon,hi3516cv300";
> +
> +	aliases {
> +		serial0 = &uart0;
> +		serial1 = &uart1;
> +		serial2 = &uart2;
> +		i2c0 = &i2c_bus0;
> +		i2c1 = &i2c_bus1;
> +		spi0 = &spi_bus0;
> +		spi1 = &spi_bus1;
> +	};
> +
> +	chosen {
> +		stdout-path = "serial0:115200n8";
> +	};
> +
> +	memory {
> +		device_type = "memory";
> +		reg = <0x80000000 0x10000000>;
> +	};
> +};
> +
> +&dual_timer0 {
> +	status = "okay";
> +};
> +
> +&watchdog {
> +	status = "okay";
> +};
> +
> +&pwm {
> +	status = "okay";
> +};
> +
> +&uart0 {
> +	status = "okay";
> +};
> +
> +&i2c_bus0 {
> +	status = "okay";
> +	clock-frequency = <100000>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&i2c0_pmux>;
> +};
> +
> +&i2c_bus1 {
> +	status = "okay";
> +	clock-frequency = <100000>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&i2c1_pmux>;
> +};
> +
> +&spi_bus0{
> +	status = "disabled";
> +	num-cs = <1>;
> +	cs-gpios = <&gpio_chip0 6 0>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&spi0_pmux>;
> +};
> +
> +&spi_bus1{
> +	status = "okay";
> +	num-cs = <2>;
> +	cs-gpios = <&gpio_chip5 3 0>, <&gpio_chip5 4 0>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&spi1_pmux>;
> +};
> +
> +&fmc {
> +	spi-nor@0 {
> +		compatible = "jedec,spi-nor";
> +		reg = <0>;
> +		spi-max-frequency = <160000000>;
> +		m25p,fast-read;
> +	};
> +};
> +
> +&mdio {
> +	phy0: phy@1 {
> +		reg = <1>;
> +	};
> +};
> +
> +&hisi_femac {
> +	mac-address = [00 00 00 00 00 00];
> +	phy-mode = "rmii";
> +	phy-handle = <&phy0>;
> +	hisilicon,phy-reset-delays-us = <10000 10000 150000>;
> +};
> +
> +&dmac {
> +	status = "okay";
> +};
> +
> +&pmux {
> +	i2c0_pmux: i2c0_pmux {
> +		pinctrl-single,pins = <
> +			0x2c 0x3
> +			0x30 0x3>;
> +	};
> +
> +	i2c1_pmux: i2c1_pmux {
> +		pinctrl-single,pins = <
> +			0x20 0x1
> +			0x24 0x1>;
> +	};
> +
> +	spi0_pmux: spi0_pmux {
> +		pinctrl-single,pins = <
> +			0x28 0x1
> +			0x2c 0x1
> +			0x30 0x1
> +			0x34 0x1>;
> +	};
> +
> +	spi1_pmux: spi1_pmux {
> +		pinctrl-single,pins = <
> +			0xc4 0x1
> +			0xc8 0x1
> +			0xcc 0x1
> +			0xd0 0x1
> +			0xd4 0x1>;
> +	};
> +};
> diff --git a/arch/arm/boot/dts/hi3516cv300.dtsi b/arch/arm/boot/dts/hi3516cv300.dtsi
> new file mode 100644
> index 0000000..1da41ab
> --- /dev/null
> +++ b/arch/arm/boot/dts/hi3516cv300.dtsi
> @@ -0,0 +1,397 @@
> +/*
> + * Copyright (c) 2016 HiSilicon Technologies Co., Ltd.
> + *
> + * 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.
> + *
> + * 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.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program.  If not, see <http://www.gnu.org/licenses/>.
> + *
> + */
> +
> +#include "skeleton.dtsi"
> +#include <dt-bindings/clock/hi3516cv300-clock.h>
> +/ {
> +	#address-cells = <1>;
> +	#size-cells = <1>;
> +
> +	cpus {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		cpu@0 {
> +			device_type = "cpu";
> +			compatible = "arm,arm926ej-s";
> +			reg = <0>;
> +		};
> +	};
> +
> +	vic: interrupt-controller@10040000 {
> +		compatible = "arm,pl190-vic";
> +		interrupt-controller;
> +		#interrupt-cells = <1>;
> +		reg = <0x10040000 0x1000>;
> +	};
> +
> +	soc {
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		compatible = "simple-bus";
> +		interrupt-parent = <&vic>;
> +		ranges;
> +
> +		clk_3m: clk_3m {
> +			compatible = "fixed-clock";
> +			#clock-cells = <0>;
> +			clock-frequency = <3000000>;
> +		};
> +
> +		clk_apb: clk_apb {
> +			compatible = "fixed-clock";
> +			#clock-cells = <0>;
> +			clock-frequency = <50000000>;
> +		};
> +
> +		crg: clock-reset-controller@12010000 {
> +			compatible = "hisilicon,hi3516cv300-crg";
> +			reg = <0x12010000 0x1000>;
> +			#clock-cells = <1>;
> +			#reset-cells = <2>;
> +		};
> +
> +		sysctrl: system-controller@12020000 {
> +			compatible = "hisilicon,hi3516cv300-sysctrl", "syscon";
> +			reg = <0x12020000 0x1000>;
> +			#clock-cells = <1>;
> +		};
> +
> +		reboot {
> +			compatible = "syscon-reboot";
> +			regmap = <&sysctrl>;
> +			offset = <0x4>;
> +			mask = <0xdeadbeef>;
> +		};
> +
> +		dual_timer0: dual_timer@12000000 {
> +			compatible = "arm,sp804", "arm,primecell";
> +			reg = <0x12000000 0x1000>;
> +			interrupts = <3>;
> +			clocks = <&clk_3m>, <&clk_3m>, <&clk_apb>;
> +			clock-names = "timer0", "timer1", "apb_pclk";
> +			status = "disabled";
> +		};
> +
> +		dual_timer1: dual_timer@12001000 {
> +			compatible = "arm,sp804", "arm,primecell";
> +			reg = <0x12001000 0x1000>;
> +			interrupts = <4>;
> +			clocks = <&clk_3m>, <&clk_3m>, <&clk_apb>;
> +			clock-names = "timer0", "timer1", "apb_pclk";
> +			status = "disabled";
> +		};
> +
> +		watchdog: watchdog@12080000 {
> +			compatible = "arm,sp805-wdt", "arm,primecell";
> +			arm,primecell-periphid = <0x00141805>;
> +			reg = <0x12080000 0x1000>;
> +			clocks = <&sysctrl HI3516CV300_WDT_CLK>,
> +				<&crg HI3516CV300_APB_CLK>;
> +			clock-names = "wdog_clk", "apb_pclk";
> +			status = "disabled";
> +		};
> +
> +		pwm: pwm@12130000 {
> +			compatible = "hisilicon,hi3516cv300-pwm",
> +				"hisilicon,hibvt-pwm";
> +			reg = <0x12130000 0x10000>;
> +			clocks = <&crg HI3516CV300_PWM_CLK>;
> +			resets = <&crg 0x38 0>;
> +			#pwm-cells = <2>;
> +			status = "disabled";
> +		};
> +
> +		uart0: uart@12100000 {
> +			compatible = "arm,pl011", "arm,primecell";
> +			reg = <0x12100000 0x1000>;
> +			interrupts = <5>;
> +			clocks = <&crg HI3516CV300_UART0_CLK>;
> +			clock-names = "apb_pclk";
> +			status = "disabled";
> +		};
> +
> +		uart1: uart@12101000 {
> +			compatible = "arm,pl011", "arm,primecell";
> +			reg = <0x12101000 0x1000>;
> +			interrupts = <30>;
> +			clocks = <&crg HI3516CV300_UART1_CLK>;
> +			clock-names = "apb_pclk";
> +			status = "disabled";
> +		};
> +
> +		uart2: uart@12102000 {
> +			compatible = "arm,pl011", "arm,primecell";
> +			reg = <0x12102000 0x1000>;
> +			interrupts = <25>;
> +			clocks = <&crg HI3516CV300_UART2_CLK>;
> +			clock-names = "apb_pclk";
> +			status = "disabled";
> +		};
> +
> +		i2c_bus0: i2c@12110000 {
> +			compatible = "hisilicon,hi3516cv300-i2c",
> +				"hisilicon,hibvt-i2c";

Since this driver is not in the mainline yet,
is it OK to delete this node firstly?

> +			reg = <0x12110000 0x1000>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			status = "disabled";
> +		};
> +
> +		i2c_bus1: i2c@12112000 {
> +			compatible = "hisilicon,hi3516cv300-i2c",
> +				"hisilicon,hibvt-i2c";

ditto.
Other is fine to me.

Best Regards,
Wei

> +			reg = <0x12112000 0x1000>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			status = "disabled";
> +		};
> +
> +		spi_bus0: spi@12120000 {
> +			compatible = "arm,pl022", "arm,primecell";
> +			reg = <0x12120000 0x1000>;
> +			interrupts = <6>;
> +			clocks = <&crg HI3516CV300_SPI0_CLK>;
> +			clock-names = "apb_pclk";
> +			dmas = <&dmac 12 1>, <&dmac 13 2>;
> +			dma-names = "rx", "tx";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			status = "disabled";
> +		};
> +
> +		spi_bus1: spi@12121000 {
> +			compatible = "arm,pl022", "arm,primecell";
> +			reg = <0x12121000 0x1000>, <0x12030000 0x4>;
> +			interrupts = <7>;
> +			clocks = <&crg HI3516CV300_SPI1_CLK>;
> +			clock-names = "apb_pclk";
> +			dmas = <&dmac 14 1>, <&dmac 15 2>;
> +			dma-names = "rx", "tx";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			status = "disabled";
> +		};
> +
> +		fmc: spi-nor-controller@10000000 {
> +			compatible = "hisilicon,fmc-spi-nor";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			reg = <0x10000000 0x1000>, <0x14000000 0x1000000>;
> +			reg-names = "control", "memory";
> +			clocks = <&crg HI3516CV300_FMC_CLK>;
> +			assigned-clocks = <&crg HI3516CV300_FMC_CLK>;
> +			assigned-clock-rates = <24000000>;
> +		};
> +
> +		mdio: mdio@10051100 {
> +			compatible = "hisilicon,hisi-femac-mdio";
> +			reg = <0x10051100 0x10>;
> +			clocks = <&crg HI3516CV300_ETH_CLK>;
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +		};
> +
> +		hisi_femac: ethernet@10090000 {
> +			compatible = "hisilicon,hi3516cv300-femac",
> +				"hisilicon,hisi-femac-v2";
> +			reg = <0x10050000 0x1000>,<0x10051300 0x200>;
> +			interrupts = <12>;
> +			clocks = <&crg HI3516CV300_ETH_CLK>;
> +			resets = <&crg 0xec 0>, <&crg 0xec 3>;
> +			reset-names = "mac","phy";
> +		};
> +
> +		dmac: dma-controller@10030000 {
> +			compatible = "arm,pl080", "arm,primecell";
> +			reg = <0x10030000 0x1000>;
> +			interrupts = <14>;
> +			clocks = <&crg HI3516CV300_DMAC_CLK>;
> +			clock-names = "apb_pclk";
> +			lli-bus-interface-ahb1;
> +			lli-bus-interface-ahb2;
> +			mem-bus-interface-ahb1;
> +			mem-bus-interface-ahb2;
> +			memcpy-burst-size = <256>;
> +			memcpy-bus-width = <32>;
> +			#dma-cells = <2>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip0: gpio@12140000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12140000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 61 2>,
> +				<&pmux 4 11 1>,
> +				<&pmux 5 10 1>,
> +				<&pmux 6 13 2>;
> +
> +			status = "disabled";
> +		};
> +
> +		gpio_chip1: gpio@12141000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12141000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 16 7>,
> +				<&pmux 7 0 1>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip2: gpio@12142000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12142000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 46 1>,
> +				<&pmux 1 45 1>,
> +				<&pmux 2 44 1>,
> +				<&pmux 3 43 1>,
> +				<&pmux 4 39 1>,
> +				<&pmux 5 38 1>,
> +				<&pmux 6 40 1>,
> +				<&pmux 7 48 1>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip3: gpio@12143000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12143000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 37 1>,
> +				<&pmux 1 36 1>,
> +				<&pmux 2 35 1>,
> +				<&pmux 3 34 1>,
> +				<&pmux 4 23 2>,
> +				<&pmux 6 8 2>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip4: gpio@12144000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12144000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 27 1>,
> +				<&pmux 1 26 1>,
> +				<&pmux 2 31 1>,
> +				<&pmux 3 30 1>,
> +				<&pmux 4 28 2>,
> +				<&pmux 6 33 1>,
> +				<&pmux 7 32 1>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip5: gpio@12145000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12145000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 53 1>,
> +				<&pmux 1 51 2>,
> +				<&pmux 3 50 1>,
> +				<&pmux 4 49 1>,
> +				<&pmux 5 47 1>,
> +				<&pmux 6 40 2>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip6: gpio@12146000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12146000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 7 1>,
> +				<&pmux 1 6 1>,
> +				<&pmux 2 4 1>,
> +				<&pmux 3 5 1>,
> +				<&pmux 4 15 1>,
> +				<&pmux 5 1 3>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip7: gpio@12147000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12147000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 1 55 6>,
> +				<&pmux 7 25 1>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip8: gpio@12148000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12148000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 63 3>,
> +				<&pmux 3 12 1>;
> +			status = "disabled";
> +		};
> +
> +		pmux: pinmux@12040000 {
> +			compatible = "pinctrl-single";
> +			reg = <0x12040000 0x108>;
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +			#gpio-range-cells = <3>;
> +			ranges;
> +
> +			pinctrl-single,register-width = <32>;
> +			pinctrl-single,function-mask = <7>;
> +			/* pin base, nr pins & gpio function */
> +			pinctrl-single,gpio-range = <&range 0 54 0
> +				&range 55 6 1 &range 61 5 0>;
> +
> +			range: gpio-range {
> +				#pinctrl-single,gpio-range-cells = <3>;
> +			};
> +		};
> +
> +		pconf: pinconf@12040800 {
> +			compatible = "pinconf-single";
> +			reg = <0x12040800 0x130>;
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +			ranges;
> +
> +			pinctrl-single,register-width = <32>;
> +		};
> +	};
> +};
> 

--
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] 68+ messages in thread

* [PATCH 3/3] dts: hisi: add dts files for Hi3516CV300 demo board
@ 2017-01-20 16:40     ` Wei Xu
  0 siblings, 0 replies; 68+ messages in thread
From: Wei Xu @ 2017-01-20 16:40 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Pan Wen,

On 2016/10/17 13:07, Pan Wen wrote:
> Add dts files for Hi3516CV300 demo board.
> 
> Signed-off-by: Pan Wen <wenpan@hisilicon.com>
> ---
>  arch/arm/boot/dts/Makefile             |   1 +
>  arch/arm/boot/dts/hi3516cv300-demb.dts | 148 ++++++++++++
>  arch/arm/boot/dts/hi3516cv300.dtsi     | 397 +++++++++++++++++++++++++++++++++
>  3 files changed, 546 insertions(+)
>  create mode 100644 arch/arm/boot/dts/hi3516cv300-demb.dts
>  create mode 100644 arch/arm/boot/dts/hi3516cv300.dtsi
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index befcd26..1f25530 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -171,6 +171,7 @@ dtb-$(CONFIG_ARCH_HIP01) += \
>  dtb-$(CONFIG_ARCH_HIP04) += \
>  	hip04-d01.dtb
>  dtb-$(CONFIG_ARCH_HISI) += \
> +	hi3516cv300-demb.dtb \
>  	hi3519-demb.dtb
>  dtb-$(CONFIG_ARCH_HIX5HD2) += \
>  	hisi-x5hd2-dkb.dtb
> diff --git a/arch/arm/boot/dts/hi3516cv300-demb.dts b/arch/arm/boot/dts/hi3516cv300-demb.dts
> new file mode 100644
> index 0000000..6a75cd6
> --- /dev/null
> +++ b/arch/arm/boot/dts/hi3516cv300-demb.dts
> @@ -0,0 +1,148 @@
> +/*
> + * Copyright (c) 2016 HiSilicon Technologies Co., Ltd.
> + *
> + * 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.
> + *
> + * 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.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program.  If not, see <http://www.gnu.org/licenses/>.
> + *
> + */
> +
> +
> +/dts-v1/;
> +#include "hi3516cv300.dtsi"
> +
> +/ {
> +	model = "Hisilicon Hi3516CV300 DEMO Board";
> +	compatible = "hisilicon,hi3516cv300";
> +
> +	aliases {
> +		serial0 = &uart0;
> +		serial1 = &uart1;
> +		serial2 = &uart2;
> +		i2c0 = &i2c_bus0;
> +		i2c1 = &i2c_bus1;
> +		spi0 = &spi_bus0;
> +		spi1 = &spi_bus1;
> +	};
> +
> +	chosen {
> +		stdout-path = "serial0:115200n8";
> +	};
> +
> +	memory {
> +		device_type = "memory";
> +		reg = <0x80000000 0x10000000>;
> +	};
> +};
> +
> +&dual_timer0 {
> +	status = "okay";
> +};
> +
> +&watchdog {
> +	status = "okay";
> +};
> +
> +&pwm {
> +	status = "okay";
> +};
> +
> +&uart0 {
> +	status = "okay";
> +};
> +
> +&i2c_bus0 {
> +	status = "okay";
> +	clock-frequency = <100000>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&i2c0_pmux>;
> +};
> +
> +&i2c_bus1 {
> +	status = "okay";
> +	clock-frequency = <100000>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&i2c1_pmux>;
> +};
> +
> +&spi_bus0{
> +	status = "disabled";
> +	num-cs = <1>;
> +	cs-gpios = <&gpio_chip0 6 0>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&spi0_pmux>;
> +};
> +
> +&spi_bus1{
> +	status = "okay";
> +	num-cs = <2>;
> +	cs-gpios = <&gpio_chip5 3 0>, <&gpio_chip5 4 0>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&spi1_pmux>;
> +};
> +
> +&fmc {
> +	spi-nor at 0 {
> +		compatible = "jedec,spi-nor";
> +		reg = <0>;
> +		spi-max-frequency = <160000000>;
> +		m25p,fast-read;
> +	};
> +};
> +
> +&mdio {
> +	phy0: phy at 1 {
> +		reg = <1>;
> +	};
> +};
> +
> +&hisi_femac {
> +	mac-address = [00 00 00 00 00 00];
> +	phy-mode = "rmii";
> +	phy-handle = <&phy0>;
> +	hisilicon,phy-reset-delays-us = <10000 10000 150000>;
> +};
> +
> +&dmac {
> +	status = "okay";
> +};
> +
> +&pmux {
> +	i2c0_pmux: i2c0_pmux {
> +		pinctrl-single,pins = <
> +			0x2c 0x3
> +			0x30 0x3>;
> +	};
> +
> +	i2c1_pmux: i2c1_pmux {
> +		pinctrl-single,pins = <
> +			0x20 0x1
> +			0x24 0x1>;
> +	};
> +
> +	spi0_pmux: spi0_pmux {
> +		pinctrl-single,pins = <
> +			0x28 0x1
> +			0x2c 0x1
> +			0x30 0x1
> +			0x34 0x1>;
> +	};
> +
> +	spi1_pmux: spi1_pmux {
> +		pinctrl-single,pins = <
> +			0xc4 0x1
> +			0xc8 0x1
> +			0xcc 0x1
> +			0xd0 0x1
> +			0xd4 0x1>;
> +	};
> +};
> diff --git a/arch/arm/boot/dts/hi3516cv300.dtsi b/arch/arm/boot/dts/hi3516cv300.dtsi
> new file mode 100644
> index 0000000..1da41ab
> --- /dev/null
> +++ b/arch/arm/boot/dts/hi3516cv300.dtsi
> @@ -0,0 +1,397 @@
> +/*
> + * Copyright (c) 2016 HiSilicon Technologies Co., Ltd.
> + *
> + * 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.
> + *
> + * 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.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program.  If not, see <http://www.gnu.org/licenses/>.
> + *
> + */
> +
> +#include "skeleton.dtsi"
> +#include <dt-bindings/clock/hi3516cv300-clock.h>
> +/ {
> +	#address-cells = <1>;
> +	#size-cells = <1>;
> +
> +	cpus {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		cpu at 0 {
> +			device_type = "cpu";
> +			compatible = "arm,arm926ej-s";
> +			reg = <0>;
> +		};
> +	};
> +
> +	vic: interrupt-controller at 10040000 {
> +		compatible = "arm,pl190-vic";
> +		interrupt-controller;
> +		#interrupt-cells = <1>;
> +		reg = <0x10040000 0x1000>;
> +	};
> +
> +	soc {
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		compatible = "simple-bus";
> +		interrupt-parent = <&vic>;
> +		ranges;
> +
> +		clk_3m: clk_3m {
> +			compatible = "fixed-clock";
> +			#clock-cells = <0>;
> +			clock-frequency = <3000000>;
> +		};
> +
> +		clk_apb: clk_apb {
> +			compatible = "fixed-clock";
> +			#clock-cells = <0>;
> +			clock-frequency = <50000000>;
> +		};
> +
> +		crg: clock-reset-controller at 12010000 {
> +			compatible = "hisilicon,hi3516cv300-crg";
> +			reg = <0x12010000 0x1000>;
> +			#clock-cells = <1>;
> +			#reset-cells = <2>;
> +		};
> +
> +		sysctrl: system-controller at 12020000 {
> +			compatible = "hisilicon,hi3516cv300-sysctrl", "syscon";
> +			reg = <0x12020000 0x1000>;
> +			#clock-cells = <1>;
> +		};
> +
> +		reboot {
> +			compatible = "syscon-reboot";
> +			regmap = <&sysctrl>;
> +			offset = <0x4>;
> +			mask = <0xdeadbeef>;
> +		};
> +
> +		dual_timer0: dual_timer at 12000000 {
> +			compatible = "arm,sp804", "arm,primecell";
> +			reg = <0x12000000 0x1000>;
> +			interrupts = <3>;
> +			clocks = <&clk_3m>, <&clk_3m>, <&clk_apb>;
> +			clock-names = "timer0", "timer1", "apb_pclk";
> +			status = "disabled";
> +		};
> +
> +		dual_timer1: dual_timer at 12001000 {
> +			compatible = "arm,sp804", "arm,primecell";
> +			reg = <0x12001000 0x1000>;
> +			interrupts = <4>;
> +			clocks = <&clk_3m>, <&clk_3m>, <&clk_apb>;
> +			clock-names = "timer0", "timer1", "apb_pclk";
> +			status = "disabled";
> +		};
> +
> +		watchdog: watchdog at 12080000 {
> +			compatible = "arm,sp805-wdt", "arm,primecell";
> +			arm,primecell-periphid = <0x00141805>;
> +			reg = <0x12080000 0x1000>;
> +			clocks = <&sysctrl HI3516CV300_WDT_CLK>,
> +				<&crg HI3516CV300_APB_CLK>;
> +			clock-names = "wdog_clk", "apb_pclk";
> +			status = "disabled";
> +		};
> +
> +		pwm: pwm at 12130000 {
> +			compatible = "hisilicon,hi3516cv300-pwm",
> +				"hisilicon,hibvt-pwm";
> +			reg = <0x12130000 0x10000>;
> +			clocks = <&crg HI3516CV300_PWM_CLK>;
> +			resets = <&crg 0x38 0>;
> +			#pwm-cells = <2>;
> +			status = "disabled";
> +		};
> +
> +		uart0: uart at 12100000 {
> +			compatible = "arm,pl011", "arm,primecell";
> +			reg = <0x12100000 0x1000>;
> +			interrupts = <5>;
> +			clocks = <&crg HI3516CV300_UART0_CLK>;
> +			clock-names = "apb_pclk";
> +			status = "disabled";
> +		};
> +
> +		uart1: uart at 12101000 {
> +			compatible = "arm,pl011", "arm,primecell";
> +			reg = <0x12101000 0x1000>;
> +			interrupts = <30>;
> +			clocks = <&crg HI3516CV300_UART1_CLK>;
> +			clock-names = "apb_pclk";
> +			status = "disabled";
> +		};
> +
> +		uart2: uart at 12102000 {
> +			compatible = "arm,pl011", "arm,primecell";
> +			reg = <0x12102000 0x1000>;
> +			interrupts = <25>;
> +			clocks = <&crg HI3516CV300_UART2_CLK>;
> +			clock-names = "apb_pclk";
> +			status = "disabled";
> +		};
> +
> +		i2c_bus0: i2c at 12110000 {
> +			compatible = "hisilicon,hi3516cv300-i2c",
> +				"hisilicon,hibvt-i2c";

Since this driver is not in the mainline yet,
is it OK to delete this node firstly?

> +			reg = <0x12110000 0x1000>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			status = "disabled";
> +		};
> +
> +		i2c_bus1: i2c at 12112000 {
> +			compatible = "hisilicon,hi3516cv300-i2c",
> +				"hisilicon,hibvt-i2c";

ditto.
Other is fine to me.

Best Regards,
Wei

> +			reg = <0x12112000 0x1000>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			status = "disabled";
> +		};
> +
> +		spi_bus0: spi at 12120000 {
> +			compatible = "arm,pl022", "arm,primecell";
> +			reg = <0x12120000 0x1000>;
> +			interrupts = <6>;
> +			clocks = <&crg HI3516CV300_SPI0_CLK>;
> +			clock-names = "apb_pclk";
> +			dmas = <&dmac 12 1>, <&dmac 13 2>;
> +			dma-names = "rx", "tx";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			status = "disabled";
> +		};
> +
> +		spi_bus1: spi at 12121000 {
> +			compatible = "arm,pl022", "arm,primecell";
> +			reg = <0x12121000 0x1000>, <0x12030000 0x4>;
> +			interrupts = <7>;
> +			clocks = <&crg HI3516CV300_SPI1_CLK>;
> +			clock-names = "apb_pclk";
> +			dmas = <&dmac 14 1>, <&dmac 15 2>;
> +			dma-names = "rx", "tx";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			status = "disabled";
> +		};
> +
> +		fmc: spi-nor-controller at 10000000 {
> +			compatible = "hisilicon,fmc-spi-nor";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			reg = <0x10000000 0x1000>, <0x14000000 0x1000000>;
> +			reg-names = "control", "memory";
> +			clocks = <&crg HI3516CV300_FMC_CLK>;
> +			assigned-clocks = <&crg HI3516CV300_FMC_CLK>;
> +			assigned-clock-rates = <24000000>;
> +		};
> +
> +		mdio: mdio at 10051100 {
> +			compatible = "hisilicon,hisi-femac-mdio";
> +			reg = <0x10051100 0x10>;
> +			clocks = <&crg HI3516CV300_ETH_CLK>;
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +		};
> +
> +		hisi_femac: ethernet at 10090000 {
> +			compatible = "hisilicon,hi3516cv300-femac",
> +				"hisilicon,hisi-femac-v2";
> +			reg = <0x10050000 0x1000>,<0x10051300 0x200>;
> +			interrupts = <12>;
> +			clocks = <&crg HI3516CV300_ETH_CLK>;
> +			resets = <&crg 0xec 0>, <&crg 0xec 3>;
> +			reset-names = "mac","phy";
> +		};
> +
> +		dmac: dma-controller at 10030000 {
> +			compatible = "arm,pl080", "arm,primecell";
> +			reg = <0x10030000 0x1000>;
> +			interrupts = <14>;
> +			clocks = <&crg HI3516CV300_DMAC_CLK>;
> +			clock-names = "apb_pclk";
> +			lli-bus-interface-ahb1;
> +			lli-bus-interface-ahb2;
> +			mem-bus-interface-ahb1;
> +			mem-bus-interface-ahb2;
> +			memcpy-burst-size = <256>;
> +			memcpy-bus-width = <32>;
> +			#dma-cells = <2>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip0: gpio at 12140000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12140000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 61 2>,
> +				<&pmux 4 11 1>,
> +				<&pmux 5 10 1>,
> +				<&pmux 6 13 2>;
> +
> +			status = "disabled";
> +		};
> +
> +		gpio_chip1: gpio at 12141000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12141000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 16 7>,
> +				<&pmux 7 0 1>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip2: gpio at 12142000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12142000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 46 1>,
> +				<&pmux 1 45 1>,
> +				<&pmux 2 44 1>,
> +				<&pmux 3 43 1>,
> +				<&pmux 4 39 1>,
> +				<&pmux 5 38 1>,
> +				<&pmux 6 40 1>,
> +				<&pmux 7 48 1>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip3: gpio at 12143000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12143000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 37 1>,
> +				<&pmux 1 36 1>,
> +				<&pmux 2 35 1>,
> +				<&pmux 3 34 1>,
> +				<&pmux 4 23 2>,
> +				<&pmux 6 8 2>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip4: gpio at 12144000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12144000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 27 1>,
> +				<&pmux 1 26 1>,
> +				<&pmux 2 31 1>,
> +				<&pmux 3 30 1>,
> +				<&pmux 4 28 2>,
> +				<&pmux 6 33 1>,
> +				<&pmux 7 32 1>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip5: gpio at 12145000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12145000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 53 1>,
> +				<&pmux 1 51 2>,
> +				<&pmux 3 50 1>,
> +				<&pmux 4 49 1>,
> +				<&pmux 5 47 1>,
> +				<&pmux 6 40 2>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip6: gpio at 12146000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12146000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 7 1>,
> +				<&pmux 1 6 1>,
> +				<&pmux 2 4 1>,
> +				<&pmux 3 5 1>,
> +				<&pmux 4 15 1>,
> +				<&pmux 5 1 3>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip7: gpio at 12147000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12147000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 1 55 6>,
> +				<&pmux 7 25 1>;
> +			status = "disabled";
> +		};
> +
> +		gpio_chip8: gpio at 12148000 {
> +			compatible = "arm,pl061", "arm,primecell";
> +			reg = <0x12148000 0x1000>;
> +			interrupts = <31>;
> +			clocks = <&crg HI3516CV300_APB_CLK>;
> +			clock-names = "apb_pclk";
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&pmux 0 63 3>,
> +				<&pmux 3 12 1>;
> +			status = "disabled";
> +		};
> +
> +		pmux: pinmux at 12040000 {
> +			compatible = "pinctrl-single";
> +			reg = <0x12040000 0x108>;
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +			#gpio-range-cells = <3>;
> +			ranges;
> +
> +			pinctrl-single,register-width = <32>;
> +			pinctrl-single,function-mask = <7>;
> +			/* pin base, nr pins & gpio function */
> +			pinctrl-single,gpio-range = <&range 0 54 0
> +				&range 55 6 1 &range 61 5 0>;
> +
> +			range: gpio-range {
> +				#pinctrl-single,gpio-range-cells = <3>;
> +			};
> +		};
> +
> +		pconf: pinconf at 12040800 {
> +			compatible = "pinconf-single";
> +			reg = <0x12040800 0x130>;
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +			ranges;
> +
> +			pinctrl-single,register-width = <32>;
> +		};
> +	};
> +};
> 

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

* Re: [PATCH 3/3] dts: hisi: add dts files for Hi3516CV300 demo board
@ 2017-01-22  9:33     ` Kefeng Wang
  0 siblings, 0 replies; 68+ messages in thread
From: Kefeng Wang @ 2017-01-22  9:33 UTC (permalink / raw)
  To: Pan Wen, mturquette, sboyd, robh+dt, mark.rutland, linux, xuwei5
  Cc: linux-clk, devicetree, linux-kernel, linux-arm-kernel,
	howell.yang, xuejiancheng, jalen.hsu, lvkuanliang, suwenping,
	raojun, kevin.lixu



On 2016/10/17 20:07, Pan Wen wrote:
> Add dts files for Hi3516CV300 demo board.
> 
> Signed-off-by: Pan Wen <wenpan@hisilicon.com>
> ---
>  arch/arm/boot/dts/Makefile             |   1 +

[...]

> diff --git a/arch/arm/boot/dts/hi3516cv300.dtsi b/arch/arm/boot/dts/hi3516cv300.dtsi
> new file mode 100644
> index 0000000..1da41ab
> --- /dev/null
> +++ b/arch/arm/boot/dts/hi3516cv300.dtsi
> @@ -0,0 +1,397 @@
> +/*
> + * Copyright (c) 2016 HiSilicon Technologies Co., Ltd.
> + *
> + * 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.
> + *
> + * 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.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program.  If not, see <http://www.gnu.org/licenses/>.
> + *
> + */
> +
> +#include "skeleton.dtsi"

please drop this include due to commit 9c0da3cc61f1233c ("ARM: dts: explicitly mark skeleton.dtsi as deprecated")

Thanks
Kefeng

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

* Re: [PATCH 3/3] dts: hisi: add dts files for Hi3516CV300 demo board
@ 2017-01-22  9:33     ` Kefeng Wang
  0 siblings, 0 replies; 68+ messages in thread
From: Kefeng Wang @ 2017-01-22  9:33 UTC (permalink / raw)
  To: Pan Wen, mturquette-rdvid1DuHRBWk0Htik3J/w,
	sboyd-sgV2jX0FEOL9JmXXK+q4OQ, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	mark.rutland-5wv7dgnIgG8, linux-I+IVW8TIWO2tmTQ+vhA3Yw,
	xuwei5-C8/M+/jPZTeaMJb+Lgu22Q
  Cc: linux-clk-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	howell.yang-C8/M+/jPZTeaMJb+Lgu22Q,
	xuejiancheng-C8/M+/jPZTeaMJb+Lgu22Q,
	jalen.hsu-C8/M+/jPZTeaMJb+Lgu22Q,
	lvkuanliang-C8/M+/jPZTeaMJb+Lgu22Q,
	suwenping-C8/M+/jPZTeaMJb+Lgu22Q, raojun-C8/M+/jPZTeaMJb+Lgu22Q,
	kevin.lixu-C8/M+/jPZTeaMJb+Lgu22Q



On 2016/10/17 20:07, Pan Wen wrote:
> Add dts files for Hi3516CV300 demo board.
> 
> Signed-off-by: Pan Wen <wenpan-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>
> ---
>  arch/arm/boot/dts/Makefile             |   1 +

[...]

> diff --git a/arch/arm/boot/dts/hi3516cv300.dtsi b/arch/arm/boot/dts/hi3516cv300.dtsi
> new file mode 100644
> index 0000000..1da41ab
> --- /dev/null
> +++ b/arch/arm/boot/dts/hi3516cv300.dtsi
> @@ -0,0 +1,397 @@
> +/*
> + * Copyright (c) 2016 HiSilicon Technologies Co., Ltd.
> + *
> + * 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.
> + *
> + * 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.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program.  If not, see <http://www.gnu.org/licenses/>.
> + *
> + */
> +
> +#include "skeleton.dtsi"

please drop this include due to commit 9c0da3cc61f1233c ("ARM: dts: explicitly mark skeleton.dtsi as deprecated")

Thanks
Kefeng



--
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] 68+ messages in thread

* [PATCH 3/3] dts: hisi: add dts files for Hi3516CV300 demo board
@ 2017-01-22  9:33     ` Kefeng Wang
  0 siblings, 0 replies; 68+ messages in thread
From: Kefeng Wang @ 2017-01-22  9:33 UTC (permalink / raw)
  To: linux-arm-kernel



On 2016/10/17 20:07, Pan Wen wrote:
> Add dts files for Hi3516CV300 demo board.
> 
> Signed-off-by: Pan Wen <wenpan@hisilicon.com>
> ---
>  arch/arm/boot/dts/Makefile             |   1 +

[...]

> diff --git a/arch/arm/boot/dts/hi3516cv300.dtsi b/arch/arm/boot/dts/hi3516cv300.dtsi
> new file mode 100644
> index 0000000..1da41ab
> --- /dev/null
> +++ b/arch/arm/boot/dts/hi3516cv300.dtsi
> @@ -0,0 +1,397 @@
> +/*
> + * Copyright (c) 2016 HiSilicon Technologies Co., Ltd.
> + *
> + * 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.
> + *
> + * 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.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program.  If not, see <http://www.gnu.org/licenses/>.
> + *
> + */
> +
> +#include "skeleton.dtsi"

please drop this include due to commit 9c0da3cc61f1233c ("ARM: dts: explicitly mark skeleton.dtsi as deprecated")

Thanks
Kefeng

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

* Re: [PATCH 1/3] arm: hisi: add ARCH_MULTI_V5 support
  2017-01-20  1:47               ` Jiancheng Xue
@ 2017-01-27 16:44                 ` Arnd Bergmann
  -1 siblings, 0 replies; 68+ messages in thread
From: Arnd Bergmann @ 2017-01-27 16:44 UTC (permalink / raw)
  To: Jiancheng Xue
  Cc: Wei Xu, suwenping, Marty Plummer, howell.yang, yanhaifeng,
	Linux Kernel Mailing List, raojun, wenpan, lvkuanliang,
	Russell King - ARM Linux, hermit.wangheming, Linux ARM

On Fri, Jan 20, 2017 at 2:47 AM, Jiancheng Xue
<xuejiancheng@hisilicon.com> wrote:
> On 2016/12/15 4:06, Marty Plummer wrote:

>>>
>> I have no objections. It looks like it might make my job a bit easier in
>> the end. I need to go ahead and rebase my patches anyways and fix up
>> earlier concerns raised about them, so go right ahead.
>>
> Hi Arnd,
>
> Could this patch be accepted?  Any further comments will be appreciated.

Sorry this is going so slowly. The patch is fine, please work with Wei Xu to
have it merged into 4.11. My only concern was whether it conflicted with Marty's
work, but since he has no objections and has not posted a new version of
his patches in a while, there is no problem.

    Arnd

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

* [PATCH 1/3] arm: hisi: add ARCH_MULTI_V5 support
@ 2017-01-27 16:44                 ` Arnd Bergmann
  0 siblings, 0 replies; 68+ messages in thread
From: Arnd Bergmann @ 2017-01-27 16:44 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jan 20, 2017 at 2:47 AM, Jiancheng Xue
<xuejiancheng@hisilicon.com> wrote:
> On 2016/12/15 4:06, Marty Plummer wrote:

>>>
>> I have no objections. It looks like it might make my job a bit easier in
>> the end. I need to go ahead and rebase my patches anyways and fix up
>> earlier concerns raised about them, so go right ahead.
>>
> Hi Arnd,
>
> Could this patch be accepted?  Any further comments will be appreciated.

Sorry this is going so slowly. The patch is fine, please work with Wei Xu to
have it merged into 4.11. My only concern was whether it conflicted with Marty's
work, but since he has no objections and has not posted a new version of
his patches in a while, there is no problem.

    Arnd

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

* Re: [PATCH 1/3] arm: hisi: add ARCH_MULTI_V5 support
  2016-11-18  6:42             ` Jiancheng Xue
  (?)
  (?)
@ 2017-10-11  5:35             ` Hao Zhang
  -1 siblings, 0 replies; 68+ messages in thread
From: Hao Zhang @ 2017-10-11  5:35 UTC (permalink / raw)
  To: Jiancheng Xue
  Cc: Marty Plummer, Wei Xu, wenpan, Arnd Bergmann, mturquette, sboyd,
	robh+dt, mark.rutland, linux, linux-clk, devicetree,
	linux-kernel, linux-arm-kernel, howell.yang, jalen.hsu,
	lvkuanliang, suwenping, raojun, kevin.lixu, qinxiaojun

[-- Attachment #1: Type: text/plain, Size: 2688 bytes --]

Hi all,
Is there any one working on hi3520dv200 or hi3520dv300?

2016年11月18日星期五,Jiancheng Xue <xuejiancheng@hisilicon.com> 写道:

> Hi Marty,
>
> On 2016/11/17 11:03, Jiancheng Xue wrote:
> > Hi Wei,
> >
> > On 2016/11/16 17:31, Wei Xu wrote:
> >> Hi Pan,
> >>
> >> On 2016/11/16 8:56, wenpan wrote:
> >>> Hi Marty,
> >>> Does this confict with your patch? If not,I hope this could be merged
> first.  Besides could you tell me the link to your related patch?
> >>
> >> This is the link: https://patchwork.kernel.org/patch/9334743/
> >>
>
> Could you give your comments on this patch?
> If you have any objections to it, please let us know.
>
> >
> > Thank you for offering this.If I want to give some comments on Marty's
> patch,
> > what should I do?
> >
> > For Marty's patch, I think there's no need to add specific config item
> ARCH_HIxxxx
> > for every chipset. Some existing chipsets depend on ARCH_HISI directly
> like Hi3519
> > and Hi3798CV200. If some options like ARM_GIC is removed from ARCH_HISI,
> this kind
> > of chipsets will must choose other place to select it. I suggest we
> should keep selecting
> > ARM_GIC under ARCH_HISI as Pan's patch do.
> >
> > The code may be like this:
> >
> > config ARCH_HISI
> >       bool "Hisilicon SoC Support"
> > -     depends on ARCH_MULTI_V7
> > +     depends on ARCH_MULTI_V5 || ARCH_MULTI_V6 || ARCH_MULTI_V7
> >       select ARM_AMBA
> > -     select ARM_GIC
> > +     select ARM_GIC if ARCH_MULTI_V7
> > +     select ARM_VIC if ARCH_MULTI_V5 || depends on ARCH_MULTI_V6
> >       select ARM_TIMER_SP804
> >       select POWER_RESET
> >       select POWER_RESET_HISI
> >       select POWER_SUPPLY
> >
>
> What's your opinion about this?
>
> Best Regards,
> Jiancheng
>
> >>> On 2016/10/17 21:48, Arnd Bergmann wrote:
> >>>> On Monday, October 17, 2016 8:07:03 PM CEST Pan Wen wrote:
> >>>>> Add support for some HiSilicon SoCs which depend on ARCH_MULTI_V5.
> >>>>>
> >>>>> Signed-off-by: Pan Wen <wenpan@hisilicon.com <javascript:;>>
> >>>>>
> >>>>
> >>>> Looks ok. I've added Marty Plummer to Cc, he was recently proposing
> >>>> patches for Hi3520, which I think is closely related to this one.
> >>>> Please try to work together so the patches don't conflict. It should
> >>>> be fairly straightforward since you are basically doing the same
> >>>> change here.
> >>>>
> >
> >
> >
> > .
> >
>
> --
> To unsubscribe from this list: send the line "unsubscribe devicetree" in
> the body of a message to majordomo@vger.kernel.org <javascript:;>
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

[-- Attachment #2: Type: text/html, Size: 3738 bytes --]

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

end of thread, other threads:[~2017-10-11  5:35 UTC | newest]

Thread overview: 68+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-17 12:07 [PATCH 0/3] add basic SoC support for HiSilicon Hi3516CV300 Pan Wen
2016-10-17 12:07 ` Pan Wen
2016-10-17 12:07 ` Pan Wen
2016-10-17 12:07 ` [PATCH 1/3] arm: hisi: add ARCH_MULTI_V5 support Pan Wen
2016-10-17 12:07   ` Pan Wen
2016-10-17 12:07   ` Pan Wen
2016-10-17 13:48   ` Arnd Bergmann
2016-10-17 13:48     ` Arnd Bergmann
2016-10-17 13:48     ` Arnd Bergmann
2016-11-16  8:56     ` wenpan
2016-11-16  8:56       ` wenpan
2016-11-16  8:56       ` wenpan
2016-11-16  9:31       ` Wei Xu
2016-11-16  9:31         ` Wei Xu
2016-11-16  9:31         ` Wei Xu
2016-11-17  3:03         ` Jiancheng Xue
2016-11-17  3:03           ` Jiancheng Xue
2016-11-17  3:03           ` Jiancheng Xue
2016-11-18  6:42           ` Jiancheng Xue
2016-11-18  6:42             ` Jiancheng Xue
2016-11-18  6:42             ` Jiancheng Xue
2017-10-11  5:35             ` Hao Zhang
2016-12-05  2:03     ` Jiancheng Xue
2016-12-05  2:03       ` Jiancheng Xue
2016-12-09 15:07       ` Marty Plummer
2016-12-09 15:07         ` Marty Plummer
2016-12-12  7:11         ` Jiancheng Xue
2016-12-12  7:11           ` Jiancheng Xue
     [not found]           ` <59a9b91c-d7be-cf3a-d461-252cb493d61c@gmail.com>
2017-01-20  1:47             ` Jiancheng Xue
2017-01-20  1:47               ` Jiancheng Xue
2017-01-27 16:44               ` Arnd Bergmann
2017-01-27 16:44                 ` Arnd Bergmann
2016-10-17 12:07 ` [PATCH 2/3] clk: hisilicon: add CRG driver for Hi3516CV300 SoC Pan Wen
2016-10-17 12:07   ` Pan Wen
2016-10-17 12:07   ` Pan Wen
2016-10-18 15:58   ` Rob Herring
2016-10-18 15:58     ` Rob Herring
2016-10-19  2:38     ` Jiancheng Xue
2016-10-19  2:38       ` Jiancheng Xue
2016-10-19  2:38       ` Jiancheng Xue
2016-10-19  2:45       ` Rob Herring
2016-10-19  2:45         ` Rob Herring
2016-10-19  2:45         ` Rob Herring
2016-10-19  2:45         ` Rob Herring
2016-10-19  3:54         ` Jiancheng Xue
2016-10-19  3:54           ` Jiancheng Xue
2016-10-19  3:54           ` Jiancheng Xue
2016-10-19  3:54           ` Jiancheng Xue
2016-10-20 17:48           ` Stephen Boyd
2016-10-20 17:48             ` Stephen Boyd
2016-10-20 17:48             ` Stephen Boyd
2016-10-20 17:48             ` Stephen Boyd
2016-10-21  1:46             ` Jiancheng Xue
2016-10-21  1:46               ` Jiancheng Xue
2016-10-21  1:46               ` Jiancheng Xue
2016-10-21  1:46               ` Jiancheng Xue
2016-10-17 12:07 ` [PATCH 3/3] dts: hisi: add dts files for Hi3516CV300 demo board Pan Wen
2016-10-17 12:07   ` Pan Wen
2016-10-17 12:07   ` Pan Wen
2016-12-12 11:34   ` Jiancheng Xue
2016-12-12 11:34     ` Jiancheng Xue
2016-12-12 11:34     ` Jiancheng Xue
2017-01-20 16:40   ` Wei Xu
2017-01-20 16:40     ` Wei Xu
2017-01-20 16:40     ` Wei Xu
2017-01-22  9:33   ` Kefeng Wang
2017-01-22  9:33     ` Kefeng Wang
2017-01-22  9:33     ` Kefeng Wang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.