arm64,hi6220: Enable Hisilicon Hi6220 SoC
Subsystems (6)
PATCH v5 4/6 Documentation: DT: PL011: hi6220: add compatible string for Hisilicon designed UART
In reply to Bintian WangHisilicon does some performance enhancements based on PL011(e.g. larger FIFO length), so add one compatible string "hisilicon,hi6220-uart" for future optimisations or workarounds works.
--- Documentation/devicetree/bindings/serial/pl011.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/serial/pl011.txt +3 -1
@@ -1,7 +1,9 @@ * ARM AMBA Primecell PL011 serial UART Required properties: -- compatible: must be "arm,primecell", "arm,pl011" +- compatible: should contain one of the following sequences: + * "arm,pl011", "arm,primecell" + * "hisilicon,hi6220-pl011", "arm,pl011", "arm,primecell" - reg: exactly one register range with length 0x1000 - interrupts: exactly one interrupt specifier
Signature · 1 line
1.7.9.5
v5 cover arm64,hi6220: Enable Hisilicon Hi6220 SoC
Hi6220 is one mobile solution of Hisilicon, this patchset contains initial support for Hi6220 SoC and HiKey development board, which supports octal ARM Cortex A53 cores. Initial support is minimal and includes just the arch configuration, clock driver, device tree configuration.
PSCI is enabled in device tree and there is no problem to boot all the octal cores, and the CPU hotplug is also working now, you can download and compile the latest firmware based on the following link to run this patch set:
https://github.com/96boards/documentation/wiki/UEFI
Changes v5:
* Rebase to kernel 4.1-rc2
* Add compatible string "hisilicon,hi6220-pl011" for Hisilicon designed UART
* clk-hi6220.c: use __initdata for non-const arrays based on the commit 692d8328e8c039f9497eb862c6cf835de922c061
Changes v4:
* Rebase to kernel 4.1-rc1
* Delete "arm,cortex-a15-gic" from the gic node in dts
Changes v3:
* Verified the CPU hotplug based on the new released firmware
* Redefined the compatible strings of four system controllers in dts
* Setting COMMON_CLK_HI6220 to a bool symbol
* Keep CONFGI_ARCH_HISI sorted alphabetically
Changes v2:
* Split the DT bindings documents into earlier patches
* Change SMP enable method from spin-table to PSCI in device tree
* Remove "clock-frequency" from armv8-timer device node in device tree
* Add more description about Hisilicon designed system controllers in DT bindings document
* Enable high speed clock on UART1 mux
* Other changes based on the discussion in the mailing list:
https://lkml.org/lkml/2015/2/5/147
Bintian Wang (6):
arm64: Enable Hisilicon ARMv8 SoC family in Kconfig and defconfig
arm64: hi6220: Document devicetree bindings for Hisilicon hi6220 SoC
clk: hi6220: Document devicetree bindings for hi6220 clock
Documentation: DT: PL011: hi6220: add compatible string for Hisilicon
designed UART
clk: hi6220: Clock driver support for Hisilicon hi6220 SoC
arm64: dts: Add dts files for Hisilicon Hi6220 SoC
.../bindings/arm/hisilicon/hisilicon.txt | 87 ++++++ .../devicetree/bindings/clock/hi6220-clock.txt | 34 +++ Documentation/devicetree/bindings/serial/pl011.txt | 4 +- arch/arm64/Kconfig | 5 + arch/arm64/boot/dts/Makefile | 1 + arch/arm64/boot/dts/hisilicon/Makefile | 5 + arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 31 +++ arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 172 ++++++++++++ arch/arm64/configs/defconfig | 1 + drivers/clk/Kconfig | 2 + drivers/clk/Makefile | 4 +- drivers/clk/hisilicon/Kconfig | 6 + drivers/clk/hisilicon/Makefile | 3 +- drivers/clk/hisilicon/clk-hi6220.c | 292 ++++++++++++++++++++ drivers/clk/hisilicon/clk.c | 29 ++ drivers/clk/hisilicon/clk.h | 17 ++ drivers/clk/hisilicon/clkdivider-hi6220.c | 273 ++++++++++++++++++ include/dt-bindings/clock/hi6220-clock.h | 173 ++++++++++++ 18 files changed, 1134 insertions(+), 5 deletions(-) create mode 100644 Documentation/devicetree/bindings/clock/hi6220-clock.txt create mode 100644 arch/arm64/boot/dts/hisilicon/Makefile create mode 100644 arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts create mode 100644 arch/arm64/boot/dts/hisilicon/hi6220.dtsi create mode 100644 drivers/clk/hisilicon/Kconfig create mode 100644 drivers/clk/hisilicon/clk-hi6220.c create mode 100644 drivers/clk/hisilicon/clkdivider-hi6220.c create mode 100644 include/dt-bindings/clock/hi6220-clock.h
Signature · 1 line
1.7.9.5
PATCH v5 1/6 arm64: Enable Hisilicon ARMv8 SoC family in Kconfig and defconfig
This patch introduces ARCH_HISI to enable Hisilicon SoC family in Kconfig and defconfig.
--- arch/arm64/Kconfig | 5 +++++ arch/arm64/configs/defconfig | 1 + 2 files changed, 6 insertions(+)
arch/arm64/Kconfig +5 -0
@@ -181,6 +181,11 @@ config ARCH_FSL_LS2085A help This enables support for Freescale LS2085A SOC. +config ARCH_HISI + bool "Hisilicon SoC Family" + help + This enables support for Hisilicon ARMv8 SoC family + config ARCH_MEDIATEK bool "Mediatek MT65xx & MT81xx ARMv8 SoC" select ARM_GIC
arch/arm64/configs/defconfig +1 -0
@@ -33,6 +33,7 @@ CONFIG_MODULE_UNLOAD=y # CONFIG_IOSCHED_DEADLINE is not set CONFIG_ARCH_EXYNOS7=y CONFIG_ARCH_FSL_LS2085A=y +CONFIG_ARCH_HISI=y CONFIG_ARCH_MEDIATEK=y CONFIG_ARCH_SEATTLE=y CONFIG_ARCH_TEGRA=y
Signature · 1 line
1.7.9.5
PATCH v5 5/6 clk: hi6220: Clock driver support for Hisilicon hi6220 SoC
In reply to Bintian WangAdd clock drivers for hi6220 SoC, this driver controls the SoC registers to supply different clocks to different IPs in the SoC.
We add one divider clock for hi6220 because the divider in hi6220 also has a mask bit but it doesnot obey the rule defined by flag "CLK_DIVIDER_HIWORD_MASK", we can not get index of the mask bit by left shift fixed bits (e.g. 16 bits), so we add this divider clock to handle it.
--- drivers/clk/Kconfig | 2 + drivers/clk/Makefile | 4 +- drivers/clk/hisilicon/Kconfig | 6 + drivers/clk/hisilicon/Makefile | 3 +- drivers/clk/hisilicon/clk-hi6220.c | 292 +++++++++++++++++++++++++++++ drivers/clk/hisilicon/clk.c | 29 +++ drivers/clk/hisilicon/clk.h | 17 ++ drivers/clk/hisilicon/clkdivider-hi6220.c | 273 +++++++++++++++++++++++++++ include/dt-bindings/clock/hi6220-clock.h | 173 +++++++++++++++++ 9 files changed, 795 insertions(+), 4 deletions(-) create mode 100644 drivers/clk/hisilicon/Kconfig create mode 100644 drivers/clk/hisilicon/clk-hi6220.c create mode 100644 drivers/clk/hisilicon/clkdivider-hi6220.c create mode 100644 include/dt-bindings/clock/hi6220-clock.h
drivers/clk/Kconfig +2 -0
@@ -152,6 +152,8 @@ config COMMON_CLK_CDCE706 source "drivers/clk/qcom/Kconfig" +source "drivers/clk/hisilicon/Kconfig" + endmenu source "drivers/clk/bcm/Kconfig"
drivers/clk/Makefile +1 -3
@@ -47,9 +47,7 @@ obj-$(CONFIG_COMMON_CLK_PWM) += clk-pwm.o obj-$(CONFIG_COMMON_CLK_AT91) += at91/ obj-$(CONFIG_ARCH_BCM_MOBILE) += bcm/ obj-$(CONFIG_ARCH_BERLIN) += berlin/ -obj-$(CONFIG_ARCH_HI3xxx) += hisilicon/ -obj-$(CONFIG_ARCH_HIP04) += hisilicon/ -obj-$(CONFIG_ARCH_HIX5HD2) += hisilicon/ +obj-$(CONFIG_ARCH_HISI) += hisilicon/ obj-$(CONFIG_COMMON_CLK_KEYSTONE) += keystone/ ifeq ($(CONFIG_COMMON_CLK), y) obj-$(CONFIG_ARCH_MMP) += mmp/
drivers/clk/hisilicon/Kconfig new file +6 -0
@@ -0,0 +1,6 @@ +config COMMON_CLK_HI6220 + bool "Hi6220 Clock Driver" + depends on OF && ARCH_HISI + default y + help + Build the Hisilicon Hi6220 clock driver based on the common clock framework.
drivers/clk/hisilicon/Makefile +2 -1
@@ -2,8 +2,9 @@ # Hisilicon Clock specific Makefile # -obj-y += clk.o clkgate-separated.o +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_HI6220) += clk-hi6220.o
drivers/clk/hisilicon/clk-hi6220.c new file +292 -0
292 lines not on this page · raw message
drivers/clk/hisilicon/clk.c +29 -0
@@ -232,3 +232,32 @@ void __init hisi_clk_register_gate_sep(struct hisi_gate_clock *clks, data->clk_data.clks[clks[i].id] = clk; } } + +void __init hi6220_clk_register_divider (struct hi6220_divider_clock *clks, +int nums,struct hisi_clock_data *data) +{ +struct clk *clk; +void __iomem *base = data->base; +int i; + +for (i =0 ; i < nums; i++) { + clk =hi6220_register_clkdiv (NULL , clks[i].name, + clks[i].parent_name, + clks[i].flags, + base + clks[i].offset, + clks[i].shift, + clks[i].width, + clks[i].mask_bit, + &hisi_clk_lock); +if (IS_ERR (clk)) { +pr_err ("%s: failed to register clock %s\n" , + __func__, clks[i].name); +continue ; + } + +if (clks[i].alias) +clk_register_clkdev (clk, clks[i].alias,NULL ); + + data->clk_data.clks[clks[i].id] = clk; + } +}
drivers/clk/hisilicon/clk.h +17 -0
@@ -79,6 +79,18 @@ struct hisi_divider_clock {const char *alias; }; +struct hi6220_divider_clock { +unsigned int id; +const char *name; +const char *parent_name; +unsigned long flags; +unsigned long offset; +u8 shift; +u8 width; +u32 mask_bit; +const char *alias; +}; +struct hisi_gate_clock {unsigned int id;const char *name;
@@ -94,6 +106,9 @@ struct clk *hisi_register_clkgate_sep(struct device *, const char *, const char *, unsigned long, void __iomem *, u8, u8, spinlock_t *); +struct clk *hi6220_register_clkdiv (struct device *dev,const char *name, +const char *parent_name,unsigned long flags,void __iomem *reg, +u8 shift,u8 width,u32 mask_bit,spinlock_t *lock);struct hisi_clock_data __init *hisi_clk_init (struct device_node *,int ); void __init hisi_clk_register_fixed_rate(struct hisi_fixed_rate_clock *,
@@ -108,4 +123,6 @@ void __init hisi_clk_register_gate(struct hisi_gate_clock *, int, struct hisi_clock_data *);void __init hisi_clk_register_gate_sep (struct hisi_gate_clock *,int ,struct hisi_clock_data *); +void __init hi6220_clk_register_divider (struct hi6220_divider_clock *, +int ,struct hisi_clock_data *);#endif /* __HISI_CLK_H */
drivers/clk/hisilicon/clkdivider-hi6220.c new file +273 -0
273 lines not on this page · raw message
include/dt-bindings/clock/hi6220-clock.h new file +173 -0
173 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v5 3/6 clk: hi6220: Document devicetree bindings for hi6220 clock
In reply to Bintian WangDocument DT files bindings for Hisilicon hi6220 clock.
--- .../devicetree/bindings/clock/hi6220-clock.txt | 34 ++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/hi6220-clock.txt
Documentation/devicetree/bindings/clock/hi6220-clock.txt new file +34 -0
@@ -0,0 +1,34 @@ +* Hisilicon Hi6220 Clock Controller + +Clock control registers reside in different Hi6220 system controllers, +please refer the following document to know more about the binding rules +for these system controllers: + +Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt + +Required Properties: + +- compatible: the compatible should be one of the following strings to + indicate the clock controller functionality. + + - "hisilicon,hi6220-aoctrl" + - "hisilicon,hi6220-sysctrl" + - "hisilicon,hi6220-mediactrl" + - "hisilicon,hi6220-pmctrl" + +- reg: physical base address of the controller and length of memory mapped + region. + +- #clock-cells: should be 1. + +For example: + sys_ctrl: sys_ctrl { + compatible = "hisilicon,hi6220-sysctrl", "syscon"; + reg = <0x0 0xf7030000 0x0 0x2000>; + #clock-cells = <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/hi6220-clock.h>.
Signature · 1 line
1.7.9.5
PATCH v5 2/6 arm64: hi6220: Document devicetree bindings for Hisilicon hi6220 SoC
In reply to Bintian WangThis patch adds documentation for the devicetree bindings used by the DT files of Hisilicon hi6220 SoC mobile platform.
--- .../bindings/arm/hisilicon/hisilicon.txt | 87 ++++++++++++++++++++ 1 file changed, 87 insertions(+)
Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt +87 -0
@@ -1,5 +1,8 @@ Hisilicon Platforms Device Tree Bindings ---------------------------------------------------- +Hi6220 SoC +Required root node properties: + - compatible = "hisilicon,hi6220"; Hi4511 Board Required root node properties:
@@ -13,6 +16,9 @@ HiP01 ca9x2 Board Required root node properties: - compatible = "hisilicon,hip01-ca9x2"; +HiKey Board +Required root node properties: + - compatible = "hisilicon,hi6220-hikey", "hisilicon,hi6220"; Hisilicon system controller
@@ -41,6 +47,87 @@ Example: }; ----------------------------------------------------------------------- +Hisilicon Hi6220 system controller + +Required properties: +- compatible : "hisilicon,hi6220-sysctrl" +- reg : Register address and size +- #clock-cells: should be set to 1, many clock registers are defined + under this controller and this property must be present. + +Hisilicon designs this controller as one of the system controllers, +its main functions are the same as Hisilicon system controller, but +the register offset of some core modules are different. + +Example: + /*for Hi6220*/ + sys_ctrl: sys_ctrl { + compatible = "hisilicon,hi6220-sysctrl", "syscon"; + reg = <0x0 0xf7030000 0x0 0x2000>; + #clock-cells = <1>; + }; + + +Hisilicon Hi6220 Power Always ON domain controller + +Required properties: +- compatible : "hisilicon,hi6220-aoctrl" +- reg : Register address and size +- #clock-cells: should be set to 1, many clock registers are defined + under this controller and this property must be present. + +Hisilicon designs this system controller to control the power always +on domain for mobile platform. + +Example: + /*for Hi6220*/ + ao_ctrl: ao_ctrl { + compatible = "hisilicon,hi6220-aoctrl", "syscon"; + reg = <0x0 0xf7800000 0x0 0x2000>; + #clock-cells = <1>; + }; + + +Hisilicon Hi6220 Media domain controller + +Required properties: +- compatible : "hisilicon,hi6220-mediactrl" +- reg : Register address and size +- #clock-cells: should be set to 1, many clock registers are defined + under this controller and this property must be present. + +Hisilicon designs this system controller to control the multimedia +domain(e.g. codec, G3D ...) for mobile platform. + +Example: + /*for Hi6220*/ + media_ctrl: media_ctrl { + compatible = "hisilicon,hi6220-mediactrl", "syscon"; + reg = <0x0 0xf4410000 0x0 0x1000>; + #clock-cells = <1>; + }; + + +Hisilicon Hi6220 Power Management domain controller + +Required properties: +- compatible : "hisilicon,hi6220-pmctrl" +- reg : Register address and size +- #clock-cells: should be set to 1, some clock registers are define + under this controller and this property must be present. + +Hisilicon designs this system controller to control the power management +domain for mobile platform. + +Example: + /*for Hi6220*/ + pm_ctrl: pm_ctrl { + compatible = "hisilicon,hi6220-pmctrl", "syscon"; + reg = <0x0 0xf7032000 0x0 0x1000>; + #clock-cells = <1>; + }; + +----------------------------------------------------------------------- Hisilicon HiP01 system controller Required properties:
Signature · 1 line
1.7.9.5
PATCH v5 6/6 arm64: dts: Add dts files for Hisilicon Hi6220 SoC
In reply to Bintian WangAdd initial dtsi file to support Hisilicon Hi6220 SoC with support of Octal core CPUs in two clusters and each cluster has quard Cortex-A53.
Also add dts file to support HiKey development board which based on Hi6220 SoC.
--- arch/arm64/boot/dts/Makefile | 1 + arch/arm64/boot/dts/hisilicon/Makefile | 5 + arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 31 +++++ arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 172 ++++++++++++++++++++++++ 4 files changed, 209 insertions(+) create mode 100644 arch/arm64/boot/dts/hisilicon/Makefile create mode 100644 arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts create mode 100644 arch/arm64/boot/dts/hisilicon/hi6220.dtsi
arch/arm64/boot/dts/Makefile +1 -0
@@ -4,6 +4,7 @@ dts-dirs += arm dts-dirs += cavium dts-dirs += exynos dts-dirs += freescale +dts-dirs += hisilicon dts-dirs += mediatek dts-dirs += qcom dts-dirs += sprd
arch/arm64/boot/dts/hisilicon/Makefile new file +5 -0
@@ -0,0 +1,5 @@ +dtb-$(CONFIG_ARCH_HISI) += hi6220-hikey.dtb + +always := $(dtb-y) +subdir-y := $(dts-dirs) +clean-files := *.dtb
arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts new file +31 -0
@@ -0,0 +1,31 @@ +/* + * dts file for Hisilicon HiKey Development Board + * + * Copyright (C) 2015, Hisilicon Ltd. + * + */ + +/dts-v1/; + +/*Reserved 1MB memory for MCU*/ +/memreserve/ 0x05e00000 0x00100000; + +#include "hi6220.dtsi" + +/ { + model = "HiKey Development Board"; + compatible = "hisilicon,hi6220-hikey", "hisilicon,hi6220"; + + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + memory at 0 { + device_type = "memory"; + reg = <0x0 0x0 0x0 0x40000000>; + }; +};
arch/arm64/boot/dts/hisilicon/hi6220.dtsi new file +172 -0
172 lines not on this page · raw message
Signature · 1 line
1.7.9.5
Hello Mike,
Could you help to review the patch set especially the clock drivers? if there is no problem, please help ack the clock parts :)
Thanks,
Bintian
Quoted 76 lines · Bintian Wang
Hi6220 is one mobile solution of Hisilicon, this patchset contains initial support for Hi6220 SoC and HiKey development board, which supports octal ARM Cortex A53 cores. Initial support is minimal and includes just the arch configuration, clock driver, device tree configuration.
PSCI is enabled in device tree and there is no problem to boot all the octal cores, and the CPU hotplug is also working now, you can download and compile the latest firmware based on the following link to run this patch set:
https://github.com/96boards/documentation/wiki/UEFIChanges v5:
* Rebase to kernel 4.1-rc2
* Add compatible string "hisilicon,hi6220-pl011" for Hisilicon designed UART
*clk-hi6220.c: use__initdatafor non-const arrays based on the commit692d8328e8c039f9497eb862c6cf835de922c061Changes v4:
* Rebase to kernel 4.1-rc1
* Delete "arm,cortex-a15-gic" from the gic node in dtsChanges v3:
* Verified the CPU hotplug based on the new released firmware
* Redefined the compatible strings of four system controllers in dts
* SettingCOMMON_CLK_HI6220to a bool symbol
* KeepCONFGI_ARCH_HISIsorted alphabeticallyChanges v2:
* Split the DT bindings documents into earlier patches
* Change SMP enable method from spin-table to PSCI in device tree
* Remove "clock-frequency" from armv8-timer device node in device tree
* Add more description about Hisilicon designed system controllers in DT bindings document
* Enable high speed clock on UART1 mux
* Other changes based on the discussion in the mailing list:https://lkml.org/lkml/2015/2/5/147Bintian Wang (6):
arm64: Enable Hisilicon ARMv8 SoC family inKconfigand defconfig
arm64: hi6220: Document devicetree bindings for Hisilicon hi6220 SoC
clk: hi6220: Document devicetree bindings for hi6220 clock
Documentation: DT: PL011: hi6220: add compatible string for Hisilicon
designed UART
clk: hi6220: Clock driver support for Hisilicon hi6220 SoC
arm64: dts: Add dts files for Hisilicon Hi6220 SoC.../bindings/arm/hisilicon/hisilicon.txt | 87 ++++++ .../devicetree/bindings/clock/hi6220-clock.txt | 34 +++ Documentation/devicetree/bindings/serial/pl011.txt | 4 +- arch/arm64/Kconfig | 5 + arch/arm64/boot/dts/Makefile | 1 + arch/arm64/boot/dts/hisilicon/Makefile | 5 + arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 31 +++ arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 172 ++++++++++++ arch/arm64/configs/defconfig | 1 + drivers/clk/Kconfig | 2 + drivers/clk/Makefile | 4 +- drivers/clk/hisilicon/Kconfig | 6 + drivers/clk/hisilicon/Makefile | 3 +- drivers/clk/hisilicon/clk-hi6220.c | 292 ++++++++++++++++++++ drivers/clk/hisilicon/clk.c | 29 ++ drivers/clk/hisilicon/clk.h | 17 ++ drivers/clk/hisilicon/clkdivider-hi6220.c | 273 ++++++++++++++++++ include/dt-bindings/clock/hi6220-clock.h | 173 ++++++++++++ 18 files changed, 1134 insertions(+), 5 deletions(-)create mode 100644
Documentation/devicetree/bindings/clock/hi6220-clock.txtcreate mode 100644arch/arm64/boot/dts/hisilicon/Makefilecreate mode 100644arch/arm64/boot/dts/hisilicon/hi6220-hikey.dtscreate mode 100644arch/arm64/boot/dts/hisilicon/hi6220.dtsicreate mode 100644drivers/clk/hisilicon/Kconfig
create mode 100644drivers/clk/hisilicon/clk-hi6220.c
create mode 100644drivers/clk/hisilicon/clkdivider-hi6220.ccreate mode 100644include/dt-bindings/clock/hi6220-clock.h
Quoted 11 lines · Bintian Wang
Hi6220 is one mobile solution of Hisilicon, this patchset contains initial support for Hi6220 SoC and HiKey development board, which supports octal ARM Cortex A53 cores. Initial support is minimal and includes just the arch configuration, clock driver, device tree configuration.
PSCI is enabled in device tree and there is no problem to boot all the octal cores, and the CPU hotplug is also working now, you can download and compile the latest firmware based on the following link to run this patch set:
https://github.com/96boards/documentation/wiki/UEFI
Do you have any tips for booting this using the HiSi bootloader? It seems that I need to add the magic hisi,boardid property for dtbTool to work. Could you share what that magic value is? and maybe add it to the wiki someplace?
Thanks,
Kevin
Hello Kevin,
2015-05-08 4:30 GMT+08:00 Kevin Hilman <[email protected]>:
Quoted 14 lines
Quoted 11 lines · Bintian Wang
Hi6220 is one mobile solution of Hisilicon, this patchset contains initial support for Hi6220 SoC and HiKey development board, which supports octal ARM Cortex A53 cores. Initial support is minimal and includes just the arch configuration, clock driver, device tree configuration.
PSCI is enabled in device tree and there is no problem to boot all the octal cores, and the CPU hotplug is also working now, you can download and compile the latest firmware based on the following link to run this patch set:
https://github.com/96boards/documentation/wiki/UEFI
Quoted 3 lines
Do you have any tips for booting this using the HiSi bootloader? It seems that I need to add the magic hisi,boardid property for dtbTool to work. Could you share what that magic value is?
Yes, you need it.
Hisilicon has many different development boards and those boards have some different hardware configuration, so we need different device tree files for them.
the original hisi,boardid is used to distinguish different boards and used by the
bootloader to judge which device tree to use at boot-up.
Quoted 1 line
and maybe add it to the wiki someplace?
Maybe add to section "Known Issues" in "https://github.com/96boards/documentation/wiki/UEFI" is a good choice, I will update this section later.
Thanks,
Bintian
Quoted 9 lines
Thanks,
Kevin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Signature · 5 lines
Best Regards, Bintian =========================== Don't be nervous, just be happy!
Quoted 28 lines · Brent Wang
Hello Kevin,
2015-05-08 4:30 GMT+08:00 Kevin Hilman <[email protected]>:
Quoted 14 lines
Quoted 11 lines · Bintian Wang
Hi6220 is one mobile solution of Hisilicon, this patchset contains initial support for Hi6220 SoC and HiKey development board, which supports octal ARM Cortex A53 cores. Initial support is minimal and includes just the arch configuration, clock driver, device tree configuration.
PSCI is enabled in device tree and there is no problem to boot all the octal cores, and the CPU hotplug is also working now, you can download and compile the latest firmware based on the following link to run this patch set:
https://github.com/96boards/documentation/wiki/UEFIQuoted 3 lines
Do you have any tips for booting this using the HiSi bootloader? It seems that I need to add the magic hisi,boardid property for dtbTool to work. Could you share what that magic value is?
Yes, you need it.
Hisilicon has many different development boards and those boards have some different hardware configuration, so we need different device tree files for them.
the original hisi,boardid is used to distinguish different boards and used by the
bootloader to judge which device tree to use at boot-up.
Quoted 4 lines
Quoted 1 line
and maybe add it to the wiki someplace?
Maybe add to section "Known Issues" in "https://github.com/96boards/documentation/wiki/UEFI" is a good choice, I will update this section later.
You updated the wiki, but you didn't specify what the value should be for this to work with the old bootloader.
Can you please give the value of that property?
Also, have you tested this series with the old bootloader as well?
Kevin
hi Kevin,
Quoted 34 lines · Kevin Hilman
Quoted 28 lines · Brent Wang
Hello Kevin,
2015-05-08 4:30 GMT+08:00 Kevin Hilman <[email protected]>:
Quoted 14 lines
Quoted 11 lines · Bintian Wang
Hi6220 is one mobile solution of Hisilicon, this patchset contains initial support for Hi6220 SoC and HiKey development board, which supports octal ARM Cortex A53 cores. Initial support is minimal and includes just the arch configuration, clock driver, device tree configuration.
PSCI is enabled in device tree and there is no problem to boot all the octal cores, and the CPU hotplug is also working now, you can download and compile the latest firmware based on the following link to run this patch set:
https://github.com/96boards/documentation/wiki/UEFIQuoted 3 lines
Do you have any tips for booting this using the HiSi bootloader? It seems that I need to add the magic hisi,boardid property for dtbTool to work. Could you share what that magic value is?
Yes, you need it.
Hisilicon has many different development boards and those boards have some different hardware configuration, so we need different device tree files for them.
the original hisi,boardid is used to distinguish different boards and used by the
bootloader to judge which device tree to use at boot-up.Quoted 4 lines
Quoted 1 line
and maybe add it to the wiki someplace?
Maybe add to section "Known Issues" in "https://github.com/96boards/documentation/wiki/UEFI" is a good choice, I will update this section later.
Quoted 6 lines
You updated the wiki, but you didn't specify what the value should be for this to work with the old bootloader.
Can you please give the value of that property?
Also, have you tested this series with the old bootloader as well?
Below are my testing result w/t Bintian's patches and Hisilicon old bootloader:
- Need add property "hisi,boardid" into dts;
- Need change cpu enable-method from "psci" to "spin-table";
- The bootloader has not initialized register *cntfrq_el0* so will introduce the failure during init arch timer.
For init cntfrq_el0, we need fix this issue in Hisilicon's old bootloader, rather than directly add "clock-frequency" for arch timer's node in DTS. i will try to commit one patch for fix this issue for Hisilicon's old bootloader.
So i think upper issues mainly are introduced by Hisilicon's old bootloader but not come from Bintian's patches. How about u think for this?
Below is my local diff which is used to compatible w/t Hisilicon's old bootloader; Just for your reference.
Thanks,
Leo Yan
---8<---
arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts +1 -0
@@ -14,6 +14,7 @@ / { model = "HiKey Development Board"; + hisi,boardid = <0 0 4 3>; compatible = "hisilicon,hi6220-hikey", "hisilicon,hi6220"; aliases {
arch/arm64/boot/dts/hisilicon/hi6220.dtsi +17 -13
@@ -13,11 +13,6 @@ #address-cells = <2>; #size-cells = <2>; - psci { - compatible = "arm,psci-0.2"; - method = "smc"; - }; - cpus { #address-cells = <2>; #size-cells = <0>;
@@ -57,56 +52,64 @@ compatible = "arm,cortex-a53", "arm,armv8"; device_type = "cpu"; reg = <0x0 0x0>; - enable-method = "psci"; + enable-method = "spin-table"; + cpu-release-addr = <0x0 0x740fff8>; }; cpu1: cpu at 1 { compatible = "arm,cortex-a53", "arm,armv8"; device_type = "cpu"; reg = <0x0 0x1>; - enable-method = "psci"; + enable-method = "spin-table"; + cpu-release-addr = <0x0 0x740fff8>; }; cpu2: cpu at 2 { compatible = "arm,cortex-a53", "arm,armv8"; device_type = "cpu"; reg = <0x0 0x2>; - enable-method = "psci"; + enable-method = "spin-table"; + cpu-release-addr = <0x0 0x740fff8>; }; cpu3: cpu at 3 { compatible = "arm,cortex-a53", "arm,armv8"; device_type = "cpu"; reg = <0x0 0x3>; - enable-method = "psci"; + enable-method = "spin-table"; + cpu-release-addr = <0x0 0x740fff8>; }; cpu4: cpu at 100 { compatible = "arm,cortex-a53", "arm,armv8"; device_type = "cpu"; reg = <0x0 0x100>; - enable-method = "psci"; + enable-method = "spin-table"; + cpu-release-addr = <0x0 0x740fff8>; }; cpu5: cpu at 101 { compatible = "arm,cortex-a53", "arm,armv8"; device_type = "cpu"; reg = <0x0 0x101>; - enable-method = "psci"; + enable-method = "spin-table"; + cpu-release-addr = <0x0 0x740fff8>; }; cpu6: cpu at 102 { compatible = "arm,cortex-a53", "arm,armv8"; device_type = "cpu"; reg = <0x0 0x102>; - enable-method = "psci"; + enable-method = "spin-table"; + cpu-release-addr = <0x0 0x740fff8>; }; cpu7: cpu at 103 { compatible = "arm,cortex-a53", "arm,armv8"; device_type = "cpu"; reg = <0x0 0x103>; - enable-method = "psci"; + enable-method = "spin-table"; + cpu-release-addr = <0x0 0x740fff8>; }; };
@@ -129,6 +132,7 @@ <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>, <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>, <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>; + clock-frequency = <1200000>; }; soc {
Hello Kevin,
Quoted 41 lines · Leo Yan
hi Kevin,
Quoted 38 lines · Kevin Hilman
Quoted 28 lines · Brent Wang
Hello Kevin,
2015-05-08 4:30 GMT+08:00 Kevin Hilman <[email protected]>:
Quoted 14 lines
Quoted 11 lines · Bintian Wang
Hi6220 is one mobile solution of Hisilicon, this patchset contains initial support for Hi6220 SoC and HiKey development board, which supports octal ARM Cortex A53 cores. Initial support is minimal and includes just the arch configuration, clock driver, device tree configuration.
PSCI is enabled in device tree and there is no problem to boot all the octal cores, and the CPU hotplug is also working now, you can download and compile the latest firmware based on the following link to run this patch set:
https://github.com/96boards/documentation/wiki/UEFIQuoted 3 lines
Do you have any tips for booting this using the HiSi bootloader? It seems that I need to add the magic hisi,boardid property for dtbTool to work. Could you share what that magic value is?
Yes, you need it.
Hisilicon has many different development boards and those boards have some different hardware configuration, so we need different device tree files for them.
the original hisi,boardid is used to distinguish different boards and used by the
bootloader to judge which device tree to use at boot-up.Quoted 4 lines
Quoted 1 line
and maybe add it to the wiki someplace?
Maybe add to section "Known Issues" in "https://github.com/96boards/documentation/wiki/UEFI" is a good choice, I will update this section later.
You updated the wiki, but you didn't specify what the value should be for this to work with the old bootloader.
Can you please give the value of that property?
hisi,boardid = <0 0 4 3>
It is needed by the old hisilicon bootloader.
I also updated the wiki page.
Quoted 129 lines
Quoted 2 lines
Also, have you tested this series with the old bootloader as well?
Below are my testing result w/t Bintian's patches and Hisilicon old bootloader:
- Need add property "hisi,boardid" into dts;
- Need change cpu enable-method from "psci" to "spin-table";
- The bootloader has not initialized register *cntfrq_el0* so will introduce the failure during init arch timer.For init
cntfrq_el0, we need fix this issue in Hisilicon's old bootloader, rather than directly add "clock-frequency" for arch timer's node in DTS. i will try to commit one patch for fix this issue for Hisilicon's old bootloader.So i think upper issues mainly are introduced by Hisilicon's old bootloader but not come from Bintian's patches. How about u think for this?
Below is my local diff which is used to compatible w/t Hisilicon's old bootloader; Just for your reference.
Thanks,
Leo Yan---8<---
arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts +1
-0@@ -14,6 +14,7 @@ / { model = "HiKey Development Board"; + hisi,boardid = <0 0 4 3>; compatible = "hisilicon,hi6220-hikey", "hisilicon,hi6220"; aliases {arch/arm64/boot/dts/hisilicon/hi6220.dtsi +16
-13@@ -13,11 +13,6 @@ #address-cells = <2>; #size-cells = <2>; - psci { - compatible = "arm,psci-0.2"; - method = "smc"; - }; - cpus { #address-cells = <2>; #size-cells = <0>;@@ -57,56 +52,64 @@ compatible = "arm,cortex-a53", "arm,armv8"; device_type = "cpu"; reg = <0x0 0x0>; - enable-method = "psci"; + enable-method = "spin-table"; + cpu-release-addr = <0x0 0x740fff8>; }; cpu1: cpu at 1 { compatible = "arm,cortex-a53", "arm,armv8"; device_type = "cpu"; reg = <0x0 0x1>; - enable-method = "psci"; + enable-method = "spin-table"; + cpu-release-addr = <0x0 0x740fff8>; }; cpu2: cpu at 2 { compatible = "arm,cortex-a53", "arm,armv8"; device_type = "cpu"; reg = <0x0 0x2>; - enable-method = "psci"; + enable-method = "spin-table"; + cpu-release-addr = <0x0 0x740fff8>; }; cpu3: cpu at 3 { compatible = "arm,cortex-a53", "arm,armv8"; device_type = "cpu"; reg = <0x0 0x3>; - enable-method = "psci"; + enable-method = "spin-table"; + cpu-release-addr = <0x0 0x740fff8>; }; cpu4: cpu at 100 { compatible = "arm,cortex-a53", "arm,armv8"; device_type = "cpu"; reg = <0x0 0x100>; - enable-method = "psci"; + enable-method = "spin-table"; + cpu-release-addr = <0x0 0x740fff8>; }; cpu5: cpu at 101 { compatible = "arm,cortex-a53", "arm,armv8"; device_type = "cpu"; reg = <0x0 0x101>; - enable-method = "psci"; + enable-method = "spin-table"; + cpu-release-addr = <0x0 0x740fff8>; }; cpu6: cpu at 102 { compatible = "arm,cortex-a53", "arm,armv8"; device_type = "cpu"; reg = <0x0 0x102>; - enable-method = "psci"; + enable-method = "spin-table"; + cpu-release-addr = <0x0 0x740fff8>; }; cpu7: cpu at 103 { compatible = "arm,cortex-a53", "arm,armv8"; device_type = "cpu"; reg = <0x0 0x103>; - enable-method = "psci"; + enable-method = "spin-table"; + cpu-release-addr = <0x0 0x740fff8>; }; };
arch/arm64/boot/dts/hisilicon/hi6220.dtsi line 138
Quoted 7 lines
arch/arm64/boot/dts/hisilicon/hi6220.dtsi +1
-0@@ -129,6 +132,7 @@ <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>, <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>, <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>; + clock-frequency = <1200000>; }; soc {
Thanks for Leo's replies, Leo is responsible for bootloader development, you can contact him if you have any problem about bootloader.
Thanks,
Bintian
Quoted 3 lines
.
Hello Wei,
Quoted 5 lines
To be more specific here, I expect the patches to be picked up by Wei >Xu and forwarded to arm at kernel.org when he's made sure that everybody including himself is happy with the outcome.
Arnd
Could you help review and do those works based on Arnd's suggestion?
Thanks,
Also thanks to all engineers who help review/test this patch set.
Bintian
Quoted 76 lines · Bintian Wang
Hi6220 is one mobile solution of Hisilicon, this patchset contains initial support for Hi6220 SoC and HiKey development board, which supports octal ARM Cortex A53 cores. Initial support is minimal and includes just the arch configuration, clock driver, device tree configuration.
PSCI is enabled in device tree and there is no problem to boot all the octal cores, and the CPU hotplug is also working now, you can download and compile the latest firmware based on the following link to run this patch set:
https://github.com/96boards/documentation/wiki/UEFIChanges v5:
* Rebase to kernel 4.1-rc2
* Add compatible string "hisilicon,hi6220-pl011" for Hisilicon designed UART
*clk-hi6220.c: use__initdatafor non-const arrays based on the commit692d8328e8c039f9497eb862c6cf835de922c061Changes v4:
* Rebase to kernel 4.1-rc1
* Delete "arm,cortex-a15-gic" from the gic node in dtsChanges v3:
* Verified the CPU hotplug based on the new released firmware
* Redefined the compatible strings of four system controllers in dts
* SettingCOMMON_CLK_HI6220to a bool symbol
* KeepCONFGI_ARCH_HISIsorted alphabeticallyChanges v2:
* Split the DT bindings documents into earlier patches
* Change SMP enable method from spin-table to PSCI in device tree
* Remove "clock-frequency" from armv8-timer device node in device tree
* Add more description about Hisilicon designed system controllers in DT bindings document
* Enable high speed clock on UART1 mux
* Other changes based on the discussion in the mailing list:https://lkml.org/lkml/2015/2/5/147Bintian Wang (6):
arm64: Enable Hisilicon ARMv8 SoC family inKconfigand defconfig
arm64: hi6220: Document devicetree bindings for Hisilicon hi6220 SoC
clk: hi6220: Document devicetree bindings for hi6220 clock
Documentation: DT: PL011: hi6220: add compatible string for Hisilicon
designed UART
clk: hi6220: Clock driver support for Hisilicon hi6220 SoC
arm64: dts: Add dts files for Hisilicon Hi6220 SoC.../bindings/arm/hisilicon/hisilicon.txt | 87 ++++++ .../devicetree/bindings/clock/hi6220-clock.txt | 34 +++ Documentation/devicetree/bindings/serial/pl011.txt | 4 +- arch/arm64/Kconfig | 5 + arch/arm64/boot/dts/Makefile | 1 + arch/arm64/boot/dts/hisilicon/Makefile | 5 + arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 31 +++ arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 172 ++++++++++++ arch/arm64/configs/defconfig | 1 + drivers/clk/Kconfig | 2 + drivers/clk/Makefile | 4 +- drivers/clk/hisilicon/Kconfig | 6 + drivers/clk/hisilicon/Makefile | 3 +- drivers/clk/hisilicon/clk-hi6220.c | 292 ++++++++++++++++++++ drivers/clk/hisilicon/clk.c | 29 ++ drivers/clk/hisilicon/clk.h | 17 ++ drivers/clk/hisilicon/clkdivider-hi6220.c | 273 ++++++++++++++++++ include/dt-bindings/clock/hi6220-clock.h | 173 ++++++++++++ 18 files changed, 1134 insertions(+), 5 deletions(-)create mode 100644
Documentation/devicetree/bindings/clock/hi6220-clock.txtcreate mode 100644arch/arm64/boot/dts/hisilicon/Makefilecreate mode 100644arch/arm64/boot/dts/hisilicon/hi6220-hikey.dtscreate mode 100644arch/arm64/boot/dts/hisilicon/hi6220.dtsicreate mode 100644drivers/clk/hisilicon/Kconfig
create mode 100644drivers/clk/hisilicon/clk-hi6220.c
create mode 100644drivers/clk/hisilicon/clkdivider-hi6220.ccreate mode 100644include/dt-bindings/clock/hi6220-clock.h
Wei Xu
maintainerQuoted 7 lines · Bintian
Hello Wei,
Quoted 5 lines
To be more specific here, I expect the patches to be picked up by Wei >Xu and forwarded to arm at kernel.org when he's made sure that everybody including himself is happy with the outcome.
Arnd
Hi Bintian,
Quoted 1 line
Could you help review and do those works based on Arnd's suggestion?
I will prepare the pull request.
Thanks!
Best Regards,
Wei
Quoted 88 lines
Thanks,
Also thanks to all engineers who help review/test this patch set.
Bintian
Quoted 67 lines · Bintian Wang
Hi6220 is one mobile solution of Hisilicon, this patchset contains initial support for Hi6220 SoC and HiKey development board, which supports octal ARM Cortex A53 cores. Initial support is minimal and includes just the arch configuration, clock driver, device tree configuration.
PSCI is enabled in device tree and there is no problem to boot all the octal cores, and the CPU hotplug is also working now, you can download and compile the latest firmware based on the following link to run this patch set:
https://github.com/96boards/documentation/wiki/UEFIChanges v5:
* Rebase to kernel 4.1-rc2
* Add compatible string "hisilicon,hi6220-pl011" for Hisilicon designed UART
*clk-hi6220.c: use__initdatafor non-const arrays based on the commit692d8328e8c039f9497eb862c6cf835de922c061Changes v4:
* Rebase to kernel 4.1-rc1
* Delete "arm,cortex-a15-gic" from the gic node in dtsChanges v3:
* Verified the CPU hotplug based on the new released firmware
* Redefined the compatible strings of four system controllers in dts
* SettingCOMMON_CLK_HI6220to a bool symbol
* KeepCONFGI_ARCH_HISIsorted alphabeticallyChanges v2:
* Split the DT bindings documents into earlier patches
* Change SMP enable method from spin-table to PSCI in device tree
* Remove "clock-frequency" from armv8-timer device node in device tree
* Add more description about Hisilicon designed system controllers in DT bindings document
* Enable high speed clock on UART1 mux
* Other changes based on the discussion in the mailing list:https://lkml.org/lkml/2015/2/5/147Bintian Wang (6):
arm64: Enable Hisilicon ARMv8 SoC family inKconfigand defconfig
arm64: hi6220: Document devicetree bindings for Hisilicon hi6220 SoC
clk: hi6220: Document devicetree bindings for hi6220 clock
Documentation: DT: PL011: hi6220: add compatible string for Hisilicon
designed UART
clk: hi6220: Clock driver support for Hisilicon hi6220 SoC
arm64: dts: Add dts files for Hisilicon Hi6220 SoC.../bindings/arm/hisilicon/hisilicon.txt | 87 ++++++ .../devicetree/bindings/clock/hi6220-clock.txt | 34 +++ Documentation/devicetree/bindings/serial/pl011.txt | 4 +- arch/arm64/Kconfig | 5 + arch/arm64/boot/dts/Makefile | 1 + arch/arm64/boot/dts/hisilicon/Makefile | 5 + arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 31 +++ arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 172 ++++++++++++ arch/arm64/configs/defconfig | 1 + drivers/clk/Kconfig | 2 + drivers/clk/Makefile | 4 +- drivers/clk/hisilicon/Kconfig | 6 + drivers/clk/hisilicon/Makefile | 3 +- drivers/clk/hisilicon/clk-hi6220.c | 292 ++++++++++++++++++++ drivers/clk/hisilicon/clk.c | 29 ++ drivers/clk/hisilicon/clk.h | 17 ++ drivers/clk/hisilicon/clkdivider-hi6220.c | 273 ++++++++++++++++++ include/dt-bindings/clock/hi6220-clock.h | 173 ++++++++++++ 18 files changed, 1134 insertions(+), 5 deletions(-)Quoted 9 lines
create mode 100644
Documentation/devicetree/bindings/clock/hi6220-clock.txtcreate mode 100644arch/arm64/boot/dts/hisilicon/Makefilecreate mode 100644arch/arm64/boot/dts/hisilicon/hi6220-hikey.dtscreate mode 100644arch/arm64/boot/dts/hisilicon/hi6220.dtsicreate mode 100644drivers/clk/hisilicon/Kconfig
create mode 100644drivers/clk/hisilicon/clk-hi6220.c
create mode 100644drivers/clk/hisilicon/clkdivider-hi6220.ccreate mode 100644include/dt-bindings/clock/hi6220-clock.h.
Quoted 11 lines · Bintian Wang
Hi6220 is one mobile solution of Hisilicon, this patchset contains initial support for Hi6220 SoC and HiKey development board, which supports octal ARM Cortex A53 cores. Initial support is minimal and includes just the arch configuration, clock driver, device tree configuration.
PSCI is enabled in device tree and there is no problem to boot all the octal cores, and the CPU hotplug is also working now, you can download and compile the latest firmware based on the following link to run this patch set:
https://github.com/96boards/documentation/wiki/UEFI
I've now tested this version on top of v4.1-rc5 using the mainline u-boot port[1], and confirm that all 8 cores are booting.
No UEFI required... yay!
Kevin
[1] http://lists.denx.de/pipermail/u-boot/2015-May/214006.html