2020-09-29 14:17:22

by Zhen Lei

[permalink] [raw]
Subject: [PATCH v5 00/17] add support for Hisilicon SD5203 SoC

v4 --> v5:
1. Drop the descriptions of the common properties, such as "reg".
2. Add "additionalProperties: false" or "additionalProperties: type: object"
for each new yaml file.
3. Group three Hi6220 domain controller into one yaml file, see Patch 15
4. Remove the prefix "hisilicon," of each yaml file, all of them are under
hisilicon directory, no need to duplicated it.
5. move four controllers into syscon.yaml, because they have no specific
properties, see Patch 1-2.
6. Add the name of the board which based on sd5203, see Patch 5 and 8.
7. Add Patch 9, all controller should contain "syscon" compatible string.
8. Add property "ranges" and update the example, see Patch 16.
9. Romove the labels in all examples.
10. other trival fixes are not mentioned.

Please review Patch 1-9 first, other patches are not urgent and each of them
is independent.


v3 --> v4:
1. remove unexpected "\ No newline at end of file" of each new file.
2. discard the subdirectory "hi3620" and "hipxx", all files in the two
directories are moved to the parent directory.
3. add two spaces for the below cases:
- items:
- const: hisilicon,sysctrl. //add two spaces
4. only list the compatible of boards in hisilicon.yaml, that is:
1) a compatible of one board
2) a compatible of one board + a compatible of one SoC
5. other trival fixes are not mentioned.


v2 --> v3:
1. Convert hisilicon.txt to hisilicon.yaml. Because there are many kinds
of Hisilicon controllers in it, so split each of them into a separate
file first. Then I convert all of them to DT schema format, and also
convert the other files in directory "../bindings/arm/hisilicon/".
2. Add Patch 1: remove a unused compatible name in hip01-ca9x2.dts
This error is detected by hisilicon.yaml.

The merge window of 5.10 is narrow now, so please review Patch 1-7 first.


v1 --> v2:
1. add binding for SD5203 SoC, Patch 1
2. select DW_APB_ICTL instead of HISILICON_SD5203_VIC in Patch 2.
Meanwhile, change the compatible of interrupt-controller to "snps,dw-apb-ictl" in Patch 4.
3. Fix the errors detected by dtbs_check. For example: add "reg" for cpu node, use lowercase a-f
to describe address, add "baudclk" for "snps,dw-apb-uart".

v1:
Add SD5203 SoC config option and devicetree file, also enable its debug UART.


Kefeng Wang (3):
ARM: hisi: add support for SD5203 SoC
ARM: debug: add UART early console support for SD5203
ARM: dts: add SD5203 dts

Zhen Lei (14):
dt-bindings: mfd: syscon: add some compatible strings for Hisilicon
dt-bindings: arm: hisilicon: delete the descriptions of HiP05/HiP06
controllers
dt-bindings: arm: hisilicon: split the dt-bindings of each controller
into a separate file
dt-bindings: arm: hisilicon: convert Hisilicon board/soc bindings to
json-schema
dt-bindings: arm: hisilicon: add binding for SD5203 SoC
ARM: dts: hisilicon: fix ststem controller compatible node
dt-bindings: arm: hisilicon: convert system controller bindings to
json-schema
dt-bindings: arm: hisilicon: convert hisilicon,cpuctrl bindings to
json-schema
dt-bindings: arm: hisilicon: convert hisilicon,pctrl bindings to
json-schema
dt-bindings: arm: hisilicon: convert hisilicon,hip04-fabric bindings
to json-schema
dt-bindings: arm: hisilicon: convert hisilicon,hip04-bootwrapper
bindings to json-schema
dt-bindings: arm: hisilicon: convert Hi6220 domain controller bindings
to json-schema
dt-bindings: arm: hisilicon: convert hisilicon,hi3798cv200-perictrl
bindings to json-schema
dt-bindings: arm: hisilicon: convert LPC controller bindings to
json-schema

.../bindings/arm/hisilicon/controller/cpuctrl.yaml | 29 ++
.../hisilicon/controller/hi3798cv200-perictrl.yaml | 64 +++++
.../hisilicon/controller/hi6220-domain-ctrl.yaml | 64 +++++
.../hisilicon/controller/hip04-bootwrapper.yaml | 34 +++
.../arm/hisilicon/controller/hip04-fabric.yaml | 27 ++
.../bindings/arm/hisilicon/controller/pctrl.yaml | 34 +++
.../bindings/arm/hisilicon/controller/sysctrl.yaml | 110 +++++++
.../bindings/arm/hisilicon/hi3519-sysctrl.txt | 14 -
.../arm/hisilicon/hisilicon-low-pin-count.txt | 33 ---
.../bindings/arm/hisilicon/hisilicon.txt | 319 ---------------------
.../bindings/arm/hisilicon/hisilicon.yaml | 67 +++++
.../bindings/arm/hisilicon/low-pin-count.yaml | 61 ++++
Documentation/devicetree/bindings/mfd/syscon.yaml | 5 +-
arch/arm/Kconfig.debug | 11 +-
arch/arm/boot/dts/Makefile | 2 +
arch/arm/boot/dts/hi3620.dtsi | 2 +-
arch/arm/boot/dts/hip04.dtsi | 2 +-
arch/arm/boot/dts/sd5203.dts | 96 +++++++
arch/arm/mach-hisi/Kconfig | 16 +-
19 files changed, 618 insertions(+), 372 deletions(-)
create mode 100644 Documentation/devicetree/bindings/arm/hisilicon/controller/cpuctrl.yaml
create mode 100644 Documentation/devicetree/bindings/arm/hisilicon/controller/hi3798cv200-perictrl.yaml
create mode 100644 Documentation/devicetree/bindings/arm/hisilicon/controller/hi6220-domain-ctrl.yaml
create mode 100644 Documentation/devicetree/bindings/arm/hisilicon/controller/hip04-bootwrapper.yaml
create mode 100644 Documentation/devicetree/bindings/arm/hisilicon/controller/hip04-fabric.yaml
create mode 100644 Documentation/devicetree/bindings/arm/hisilicon/controller/pctrl.yaml
create mode 100644 Documentation/devicetree/bindings/arm/hisilicon/controller/sysctrl.yaml
delete mode 100644 Documentation/devicetree/bindings/arm/hisilicon/hi3519-sysctrl.txt
delete mode 100644 Documentation/devicetree/bindings/arm/hisilicon/hisilicon-low-pin-count.txt
delete mode 100644 Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt
create mode 100644 Documentation/devicetree/bindings/arm/hisilicon/hisilicon.yaml
create mode 100644 Documentation/devicetree/bindings/arm/hisilicon/low-pin-count.yaml
create mode 100644 arch/arm/boot/dts/sd5203.dts

--
1.8.3



2020-09-29 14:17:29

by Zhen Lei

[permalink] [raw]
Subject: [PATCH v5 16/17] dt-bindings: arm: hisilicon: convert hisilicon,hi3798cv200-perictrl bindings to json-schema

Convert the Hisilicon Hi3798CV200 Peripheral Controller binding to DT
schema format using json-schema.

Signed-off-by: Zhen Lei <[email protected]>
---
.../hisilicon/controller/hi3798cv200-perictrl.yaml | 64 ++++++++++++++++++++++
.../controller/hisilicon,hi3798cv200-perictrl.txt | 21 -------
2 files changed, 64 insertions(+), 21 deletions(-)
create mode 100644 Documentation/devicetree/bindings/arm/hisilicon/controller/hi3798cv200-perictrl.yaml
delete mode 100644 Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi3798cv200-perictrl.txt

diff --git a/Documentation/devicetree/bindings/arm/hisilicon/controller/hi3798cv200-perictrl.yaml b/Documentation/devicetree/bindings/arm/hisilicon/controller/hi3798cv200-perictrl.yaml
new file mode 100644
index 000000000000000..cba1937aad9a8d3
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/hisilicon/controller/hi3798cv200-perictrl.yaml
@@ -0,0 +1,64 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/hisilicon/controller/hi3798cv200-perictrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Hisilicon Hi3798CV200 Peripheral Controller
+
+maintainers:
+ - Wei Xu <[email protected]>
+
+description: |
+ The Hi3798CV200 Peripheral Controller controls peripherals, queries
+ their status, and configures some functions of peripherals.
+
+properties:
+ compatible:
+ items:
+ - const: hisilicon,hi3798cv200-perictrl
+ - const: syscon
+ - const: simple-mfd
+
+ reg:
+ maxItems: 1
+
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 1
+
+ ranges: true
+
+required:
+ - compatible
+ - reg
+ - "#address-cells"
+ - "#size-cells"
+ - ranges
+
+additionalProperties:
+ type: object
+
+examples:
+ - |
+ peripheral-controller@8a20000 {
+ compatible = "hisilicon,hi3798cv200-perictrl", "syscon", "simple-mfd";
+ reg = <0x8a20000 0x1000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0x0 0x8a20000 0x1000>;
+
+ phy@850 {
+ compatible = "hisilicon,hi3798cv200-combphy";
+ reg = <0x850 0x8>;
+ #phy-cells = <1>;
+ clocks = <&crg 42>;
+ resets = <&crg 0x188 4>;
+ assigned-clocks = <&crg 42>;
+ assigned-clock-rates = <100000000>;
+ hisilicon,fixed-mode = <4>;
+ };
+ };
+...
diff --git a/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi3798cv200-perictrl.txt b/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi3798cv200-perictrl.txt
deleted file mode 100644
index 0d5282f4670658d..000000000000000
--- a/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi3798cv200-perictrl.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-Hisilicon Hi3798CV200 Peripheral Controller
-
-The Hi3798CV200 Peripheral Controller controls peripherals, queries
-their status, and configures some functions of peripherals.
-
-Required properties:
-- compatible: Should contain "hisilicon,hi3798cv200-perictrl", "syscon"
- and "simple-mfd".
-- reg: Register address and size of Peripheral Controller.
-- #address-cells: Should be 1.
-- #size-cells: Should be 1.
-
-Examples:
-
- perictrl: peripheral-controller@8a20000 {
- compatible = "hisilicon,hi3798cv200-perictrl", "syscon",
- "simple-mfd";
- reg = <0x8a20000 0x1000>;
- #address-cells = <1>;
- #size-cells = <1>;
- };
--
1.8.3


2020-09-29 14:17:43

by Zhen Lei

[permalink] [raw]
Subject: [PATCH v5 15/17] dt-bindings: arm: hisilicon: convert Hi6220 domain controller bindings to json-schema

Convert the Hisilicon Hi6220 domain controllers binding to DT schema
format using json-schema. All of them are grouped into one yaml file, to
help users understand differences and avoid repeated descriptions.

Signed-off-by: Zhen Lei <[email protected]>
---
.../hisilicon/controller/hi6220-domain-ctrl.yaml | 64 ++++++++++++++++++++++
.../controller/hisilicon,hi6220-aoctrl.txt | 18 ------
.../controller/hisilicon,hi6220-mediactrl.txt | 18 ------
.../controller/hisilicon,hi6220-pmctrl.txt | 18 ------
4 files changed, 64 insertions(+), 54 deletions(-)
create mode 100644 Documentation/devicetree/bindings/arm/hisilicon/controller/hi6220-domain-ctrl.yaml
delete mode 100644 Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi6220-aoctrl.txt
delete mode 100644 Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi6220-mediactrl.txt
delete mode 100644 Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi6220-pmctrl.txt

diff --git a/Documentation/devicetree/bindings/arm/hisilicon/controller/hi6220-domain-ctrl.yaml b/Documentation/devicetree/bindings/arm/hisilicon/controller/hi6220-domain-ctrl.yaml
new file mode 100644
index 000000000000000..32c562720d877c9
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/hisilicon/controller/hi6220-domain-ctrl.yaml
@@ -0,0 +1,64 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/hisilicon/controller/hi6220-domain-ctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Hisilicon Hi6220 domain controller
+
+maintainers:
+ - Wei Xu <[email protected]>
+
+description: |
+ Hisilicon designs some special domain controllers for mobile platform,
+ such as: the power Always On domain controller, the Media domain
+ controller(e.g. codec, G3D ...) and the Power Management domain
+ controller.
+
+ The compatible names of each domain controller are as follows:
+ Power Always ON domain controller --> hisilicon,hi6220-aoctrl
+ Media domain controller --> hisilicon,hi6220-mediactrl
+ Power Management domain controller --> hisilicon,hi6220-pmctrl
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - hisilicon,hi6220-aoctrl
+ - hisilicon,hi6220-mediactrl
+ - hisilicon,hi6220-pmctrl
+ - const: syscon
+
+ reg:
+ maxItems: 1
+
+ '#clock-cells':
+ const: 1
+
+required:
+ - compatible
+ - reg
+ - '#clock-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ ao_ctrl@f7800000 {
+ compatible = "hisilicon,hi6220-aoctrl", "syscon";
+ reg = <0xf7800000 0x2000>;
+ #clock-cells = <1>;
+ };
+
+ media_ctrl@f4410000 {
+ compatible = "hisilicon,hi6220-mediactrl", "syscon";
+ reg = <0xf4410000 0x1000>;
+ #clock-cells = <1>;
+ };
+
+ pm_ctrl@f7032000 {
+ compatible = "hisilicon,hi6220-pmctrl", "syscon";
+ reg = <0xf7032000 0x1000>;
+ #clock-cells = <1>;
+ };
+...
diff --git a/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi6220-aoctrl.txt b/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi6220-aoctrl.txt
deleted file mode 100644
index 5a723c1d45f4a17..000000000000000
--- a/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi6220-aoctrl.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-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@f7800000 {
- compatible = "hisilicon,hi6220-aoctrl", "syscon";
- reg = <0x0 0xf7800000 0x0 0x2000>;
- #clock-cells = <1>;
- };
diff --git a/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi6220-mediactrl.txt b/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi6220-mediactrl.txt
deleted file mode 100644
index dcfdcbcb6455771..000000000000000
--- a/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi6220-mediactrl.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-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@f4410000 {
- compatible = "hisilicon,hi6220-mediactrl", "syscon";
- reg = <0x0 0xf4410000 0x0 0x1000>;
- #clock-cells = <1>;
- };
diff --git a/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi6220-pmctrl.txt b/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi6220-pmctrl.txt
deleted file mode 100644
index 972842f07b5a2ce..000000000000000
--- a/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi6220-pmctrl.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-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@f7032000 {
- compatible = "hisilicon,hi6220-pmctrl", "syscon";
- reg = <0x0 0xf7032000 0x0 0x1000>;
- #clock-cells = <1>;
- };
--
1.8.3


2020-09-29 14:17:46

by Zhen Lei

[permalink] [raw]
Subject: [PATCH v5 06/17] ARM: hisi: add support for SD5203 SoC

From: Kefeng Wang <[email protected]>

Enable support for the Hisilicon SD5203 SoC. The core is ARM926EJ-S.

Signed-off-by: Kefeng Wang <[email protected]>
Signed-off-by: Zhen Lei <[email protected]>
---
arch/arm/mach-hisi/Kconfig | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-hisi/Kconfig b/arch/arm/mach-hisi/Kconfig
index 3b010fe7c0e9b48..2e980f834a6aa1b 100644
--- a/arch/arm/mach-hisi/Kconfig
+++ b/arch/arm/mach-hisi/Kconfig
@@ -1,9 +1,9 @@
# SPDX-License-Identifier: GPL-2.0-only
config ARCH_HISI
bool "Hisilicon SoC Support"
- depends on ARCH_MULTI_V7
+ depends on ARCH_MULTI_V7 || ARCH_MULTI_V5
select ARM_AMBA
- select ARM_GIC
+ select ARM_GIC if ARCH_MULTI_V7
select ARM_TIMER_SP804
select POWER_RESET
select POWER_RESET_HISI
@@ -15,6 +15,7 @@ menu "Hisilicon platform type"

config ARCH_HI3xxx
bool "Hisilicon Hi36xx family"
+ depends on ARCH_MULTI_V7
select CACHE_L2X0
select HAVE_ARM_SCU if SMP
select HAVE_ARM_TWD if SMP
@@ -25,6 +26,7 @@ config ARCH_HI3xxx

config ARCH_HIP01
bool "Hisilicon HIP01 family"
+ depends on ARCH_MULTI_V7
select HAVE_ARM_SCU if SMP
select HAVE_ARM_TWD if SMP
select ARM_GLOBAL_TIMER
@@ -33,6 +35,7 @@ config ARCH_HIP01

config ARCH_HIP04
bool "Hisilicon HiP04 Cortex A15 family"
+ depends on ARCH_MULTI_V7
select ARM_ERRATA_798181 if SMP
select HAVE_ARM_ARCH_TIMER
select MCPM if SMP
@@ -43,6 +46,7 @@ config ARCH_HIP04

config ARCH_HIX5HD2
bool "Hisilicon X5HD2 family"
+ depends on ARCH_MULTI_V7
select CACHE_L2X0
select HAVE_ARM_SCU if SMP
select HAVE_ARM_TWD if SMP
@@ -50,6 +54,14 @@ config ARCH_HIX5HD2
select PINCTRL_SINGLE
help
Support for Hisilicon HIX5HD2 SoC family
+
+config ARCH_SD5203
+ bool "Hisilicon SD5203 family"
+ depends on ARCH_MULTI_V5
+ select DW_APB_ICTL
+ help
+ Support for Hisilicon SD5203 SoC family
+
endmenu

endif
--
1.8.3


2020-09-29 14:18:21

by Zhen Lei

[permalink] [raw]
Subject: [PATCH v5 14/17] dt-bindings: arm: hisilicon: convert hisilicon,hip04-bootwrapper bindings to json-schema

Convert the Hisilicon Bootwrapper boot method binding to DT schema format
using json-schema.

The property boot-method contains two groups of physical address range
information: bootwrapper and relocation. The "uint32-array" type is not
suitable for it, because the field "address" and "size" may occupy one or
two cells respectively. Use "minItems: 1" and "maxItems: 2" to allow it
can be written in "<addr size addr size>" or "<addr size>, <addr size>"
format.

Signed-off-by: Zhen Lei <[email protected]>
---
.../hisilicon/controller/hip04-bootwrapper.yaml | 34 ++++++++++++++++++++++
.../controller/hisilicon,hip04-bootwrapper.txt | 9 ------
2 files changed, 34 insertions(+), 9 deletions(-)
create mode 100644 Documentation/devicetree/bindings/arm/hisilicon/controller/hip04-bootwrapper.yaml
delete mode 100644 Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hip04-bootwrapper.txt

diff --git a/Documentation/devicetree/bindings/arm/hisilicon/controller/hip04-bootwrapper.yaml b/Documentation/devicetree/bindings/arm/hisilicon/controller/hip04-bootwrapper.yaml
new file mode 100644
index 000000000000000..7378159e61df998
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/hisilicon/controller/hip04-bootwrapper.yaml
@@ -0,0 +1,34 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/hisilicon/controller/hip04-bootwrapper.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Bootwrapper boot method
+
+maintainers:
+ - Wei Xu <[email protected]>
+
+description: Bootwrapper boot method (software protocol on SMP)
+
+properties:
+ compatible:
+ items:
+ - const: hisilicon,hip04-bootwrapper
+
+ boot-method:
+ description: |
+ Address and size of boot method.
+ [0]: bootwrapper physical address
+ [1]: bootwrapper size
+ [2]: relocation physical address
+ [3]: relocation size
+ minItems: 1
+ maxItems: 2
+
+required:
+ - compatible
+ - boot-method
+
+additionalProperties: false
+...
diff --git a/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hip04-bootwrapper.txt b/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hip04-bootwrapper.txt
deleted file mode 100644
index b0d53333f4fdae1..000000000000000
--- a/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hip04-bootwrapper.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-Bootwrapper boot method (software protocol on SMP):
-
-Required Properties:
-- compatible: "hisilicon,hip04-bootwrapper";
-- boot-method: Address and size of boot method.
- [0]: bootwrapper physical address
- [1]: bootwrapper size
- [2]: relocation physical address
- [3]: relocation size
--
1.8.3


2020-09-29 14:18:22

by Zhen Lei

[permalink] [raw]
Subject: [PATCH v5 10/17] dt-bindings: arm: hisilicon: convert system controller bindings to json-schema

Convert the Hisilicon system controller and its variants binding to DT
schema format using json-schema. All of them are grouped into one yaml
file, to help users understand differences and avoid repeated
descriptions.

Signed-off-by: Zhen Lei <[email protected]>
---
.../controller/hisilicon,hi6220-sysctrl.txt | 19 ----
.../controller/hisilicon,hip01-sysctrl.txt | 19 ----
.../arm/hisilicon/controller/hisilicon,sysctrl.txt | 25 -----
.../bindings/arm/hisilicon/controller/sysctrl.yaml | 110 +++++++++++++++++++++
.../bindings/arm/hisilicon/hi3519-sysctrl.txt | 14 ---
5 files changed, 110 insertions(+), 77 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi6220-sysctrl.txt
delete mode 100644 Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hip01-sysctrl.txt
delete mode 100644 Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,sysctrl.txt
create mode 100644 Documentation/devicetree/bindings/arm/hisilicon/controller/sysctrl.yaml
delete mode 100644 Documentation/devicetree/bindings/arm/hisilicon/hi3519-sysctrl.txt

diff --git a/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi6220-sysctrl.txt b/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi6220-sysctrl.txt
deleted file mode 100644
index 07e318eda254f52..000000000000000
--- a/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi6220-sysctrl.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-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@f7030000 {
- compatible = "hisilicon,hi6220-sysctrl", "syscon";
- reg = <0x0 0xf7030000 0x0 0x2000>;
- #clock-cells = <1>;
- };
diff --git a/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hip01-sysctrl.txt b/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hip01-sysctrl.txt
deleted file mode 100644
index db2dfdce799db91..000000000000000
--- a/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hip01-sysctrl.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-Hisilicon HiP01 system controller
-
-Required properties:
-- compatible : "hisilicon,hip01-sysctrl"
-- reg : Register address and size
-
-The HiP01 system controller is mostly compatible with hisilicon
-system controller,but it has some specific control registers for
-HIP01 SoC family, such as slave core boot, and also some same
-registers located at different offset.
-
-Example:
-
- /* for hip01-ca9x2 */
- sysctrl: system-controller@10000000 {
- compatible = "hisilicon,hip01-sysctrl", "hisilicon,sysctrl";
- reg = <0x10000000 0x1000>;
- reboot-offset = <0x4>;
- };
diff --git a/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,sysctrl.txt b/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,sysctrl.txt
deleted file mode 100644
index 963f7f1ca7a2f0c..000000000000000
--- a/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,sysctrl.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-Hisilicon system controller
-
-Required properties:
-- compatible : "hisilicon,sysctrl"
-- reg : Register address and size
-
-Optional properties:
-- smp-offset : offset in sysctrl for notifying slave cpu booting
- cpu 1, reg;
- cpu 2, reg + 0x4;
- cpu 3, reg + 0x8;
- If reg value is not zero, cpun exit wfi and go
-- resume-offset : offset in sysctrl for notifying cpu0 when resume
-- reboot-offset : offset in sysctrl for system reboot
-
-Example:
-
- /* for Hi3620 */
- sysctrl: system-controller@fc802000 {
- compatible = "hisilicon,sysctrl";
- reg = <0xfc802000 0x1000>;
- smp-offset = <0x31c>;
- resume-offset = <0x308>;
- reboot-offset = <0x4>;
- };
diff --git a/Documentation/devicetree/bindings/arm/hisilicon/controller/sysctrl.yaml b/Documentation/devicetree/bindings/arm/hisilicon/controller/sysctrl.yaml
new file mode 100644
index 000000000000000..449140f89ddbc3b
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/hisilicon/controller/sysctrl.yaml
@@ -0,0 +1,110 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/hisilicon/controller/sysctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Hisilicon system controller
+
+maintainers:
+ - Wei Xu <[email protected]>
+
+description: |
+ The Hisilicon system controller is used on many Hisilicon boards, it can be
+ used to assist the slave core startup, reboot the system, etc.
+
+ There are some variants of the Hisilicon system controller, such as HiP01,
+ Hi3519, Hi6220 system controller, each of them is mostly compatible with the
+ Hisilicon system controller, but some same registers located at different
+ offset. In addition, the HiP01 system controller has some specific control
+ registers for HIP01 SoC family, such as slave core boot.
+
+ The compatible names of each system controller are as follows:
+ Hisilicon system controller --> hisilicon,sysctrl
+ HiP01 system controller --> hisilicon,hip01-sysctrl
+ Hi6220 system controller --> hisilicon,hi6220-sysctrl
+ Hi3519 system controller --> hisilicon,hi3519-sysctrl
+
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: hisilicon,hi6220-sysctrl
+ then:
+ required:
+ - '#clock-cells'
+
+properties:
+ compatible:
+ oneOf:
+ - items:
+ - enum:
+ - hisilicon,sysctrl
+ - hisilicon,hi6220-sysctrl
+ - hisilicon,hi3519-sysctrl
+ - const: syscon
+ - items:
+ - const: hisilicon,hip01-sysctrl
+ - const: hisilicon,sysctrl
+
+ reg:
+ maxItems: 1
+
+ smp-offset:
+ description: |
+ offset in sysctrl for notifying slave cpu booting
+ cpu 1, reg;
+ cpu 2, reg + 0x4;
+ cpu 3, reg + 0x8;
+ If reg value is not zero, cpun exit wfi and go
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ resume-offset:
+ description: offset in sysctrl for notifying cpu0 when resume
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ reboot-offset:
+ description: offset in sysctrl for system reboot
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ '#clock-cells':
+ const: 1
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ /* Hisilicon system controller */
+ system-controller@fc802000 {
+ compatible = "hisilicon,sysctrl", "syscon";
+ reg = <0xfc802000 0x1000>;
+ smp-offset = <0x31c>;
+ resume-offset = <0x308>;
+ reboot-offset = <0x4>;
+ };
+
+ /* HiP01 system controller */
+ system-controller@10000000 {
+ compatible = "hisilicon,hip01-sysctrl", "hisilicon,sysctrl";
+ reg = <0x10000000 0x1000>;
+ reboot-offset = <0x4>;
+ };
+
+ /* Hi6220 system controller */
+ system-controller@f7030000 {
+ compatible = "hisilicon,hi6220-sysctrl", "syscon";
+ reg = <0xf7030000 0x2000>;
+ #clock-cells = <1>;
+ };
+
+ /* Hi3519 system controller */
+ system-controller@12010000 {
+ compatible = "hisilicon,hi3519-sysctrl", "syscon";
+ reg = <0x12010000 0x1000>;
+ };
+...
diff --git a/Documentation/devicetree/bindings/arm/hisilicon/hi3519-sysctrl.txt b/Documentation/devicetree/bindings/arm/hisilicon/hi3519-sysctrl.txt
deleted file mode 100644
index 8defacc44dd5b9e..000000000000000
--- a/Documentation/devicetree/bindings/arm/hisilicon/hi3519-sysctrl.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-* Hisilicon Hi3519 System Controller Block
-
-This bindings use the following binding:
-Documentation/devicetree/bindings/mfd/syscon.yaml
-
-Required properties:
-- compatible: "hisilicon,hi3519-sysctrl".
-- reg: the register region of this block
-
-Examples:
-sysctrl: system-controller@12010000 {
- compatible = "hisilicon,hi3519-sysctrl", "syscon";
- reg = <0x12010000 0x1000>;
-};
--
1.8.3


2020-09-29 14:18:29

by Zhen Lei

[permalink] [raw]
Subject: [PATCH v5 08/17] ARM: dts: add SD5203 dts

From: Kefeng Wang <[email protected]>

Add sd5203.dts for Hisilicon SD5203 SoC platform.

Signed-off-by: Kefeng Wang <[email protected]>
Signed-off-by: Zhen Lei <[email protected]>
---
arch/arm/boot/dts/Makefile | 2 +
arch/arm/boot/dts/sd5203.dts | 96 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 98 insertions(+)
create mode 100644 arch/arm/boot/dts/sd5203.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 4572db3fa5ae302..1d1262df5c55907 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -357,6 +357,8 @@ dtb-$(CONFIG_ARCH_MPS2) += \
mps2-an399.dtb
dtb-$(CONFIG_ARCH_MOXART) += \
moxart-uc7112lx.dtb
+dtb-$(CONFIG_ARCH_SD5203) += \
+ sd5203.dtb
dtb-$(CONFIG_SOC_IMX1) += \
imx1-ads.dtb \
imx1-apf9328.dtb
diff --git a/arch/arm/boot/dts/sd5203.dts b/arch/arm/boot/dts/sd5203.dts
new file mode 100644
index 000000000000000..3cc9a23910be62e
--- /dev/null
+++ b/arch/arm/boot/dts/sd5203.dts
@@ -0,0 +1,96 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (c) 2020 Hisilicon Limited.
+ *
+ * DTS file for Hisilicon SD5203 Board
+ */
+
+/dts-v1/;
+
+/ {
+ model = "Hisilicon SD5203";
+ compatible = "H836ASDJ", "hisilicon,sd5203";
+ interrupt-parent = <&vic>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ chosen {
+ bootargs="console=ttyS0,9600 earlycon=uart8250,mmio32,0x1600d000";
+ };
+
+ aliases {
+ serial0 = &uart0;
+ };
+
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cpu0 {
+ device_type = "cpu";
+ compatible = "arm,arm926ej-s";
+ reg = <0x0>;
+ };
+ };
+
+ memory@30000000 {
+ device_type = "memory";
+ reg = <0x30000000 0x8000000>;
+ };
+
+ soc {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "simple-bus";
+ ranges;
+
+ vic: interrupt-controller@10130000 {
+ compatible = "snps,dw-apb-ictl";
+ reg = <0x10130000 0x1000>;
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+
+ refclk125mhz: refclk125mhz {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <125000000>;
+ };
+
+ timer0: timer@16002000 {
+ compatible = "arm,sp804", "arm,primecell";
+ reg = <0x16002000 0x1000>;
+ interrupts = <4>;
+ clocks = <&refclk125mhz>;
+ clock-names = "apb_pclk";
+ };
+
+ timer1: timer@16003000 {
+ compatible = "arm,sp804", "arm,primecell";
+ reg = <0x16003000 0x1000>;
+ interrupts = <5>;
+ clocks = <&refclk125mhz>;
+ clock-names = "apb_pclk";
+ };
+
+ uart0: serial@1600d000 {
+ compatible = "snps,dw-apb-uart";
+ reg = <0x1600d000 0x1000>;
+ bus_id = "uart0";
+ clocks = <&refclk125mhz>;
+ clock-names = "baudclk", "apb_pclk";
+ reg-shift = <2>;
+ interrupts = <17>;
+ };
+
+ uart1: serial@1600c000 {
+ compatible = "snps,dw-apb-uart";
+ reg = <0x1600c000 0x1000>;
+ clocks = <&refclk125mhz>;
+ clock-names = "baudclk", "apb_pclk";
+ reg-shift = <2>;
+ interrupts = <16>;
+ status = "disabled";
+ };
+ };
+};
--
1.8.3


2020-09-29 14:18:45

by Zhen Lei

[permalink] [raw]
Subject: [PATCH v5 09/17] ARM: dts: hisilicon: fix ststem controller compatible node

The DT binding for Hisilicon system controllers requires to have a
"syscon" compatible string.

Signed-off-by: Zhen Lei <[email protected]>
---
arch/arm/boot/dts/hi3620.dtsi | 2 +-
arch/arm/boot/dts/hip04.dtsi | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/hi3620.dtsi b/arch/arm/boot/dts/hi3620.dtsi
index 355175b25fd6220..f683440ee5694b4 100644
--- a/arch/arm/boot/dts/hi3620.dtsi
+++ b/arch/arm/boot/dts/hi3620.dtsi
@@ -89,7 +89,7 @@
};

sysctrl: system-controller@802000 {
- compatible = "hisilicon,sysctrl";
+ compatible = "hisilicon,sysctrl", "syscon";
#address-cells = <1>;
#size-cells = <1>;
ranges = <0 0x802000 0x1000>;
diff --git a/arch/arm/boot/dts/hip04.dtsi b/arch/arm/boot/dts/hip04.dtsi
index f5871b1d1ec452c..555bc6b6720fc94 100644
--- a/arch/arm/boot/dts/hip04.dtsi
+++ b/arch/arm/boot/dts/hip04.dtsi
@@ -213,7 +213,7 @@
};

sysctrl: sysctrl {
- compatible = "hisilicon,sysctrl";
+ compatible = "hisilicon,sysctrl", "syscon";
reg = <0x3e00000 0x00100000>;
};

--
1.8.3


2020-09-29 14:19:06

by Zhen Lei

[permalink] [raw]
Subject: [PATCH v5 05/17] dt-bindings: arm: hisilicon: add binding for SD5203 SoC

Add devicetree binding for Hisilicon SD5203 SoC.

Signed-off-by: Zhen Lei <[email protected]>
---
Documentation/devicetree/bindings/arm/hisilicon/hisilicon.yaml | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.yaml b/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.yaml
index 6d17309c7c84308..43b8ce2227aaae9 100644
--- a/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.yaml
+++ b/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.yaml
@@ -59,4 +59,9 @@ properties:
- description: HiP07 D05 Board
items:
- const: hisilicon,hip07-d05
+
+ - description: SD5203 based boards
+ items:
+ - const: H836ASDJ
+ - const: hisilicon,sd5203
...
--
1.8.3


2020-09-29 14:19:49

by Zhen Lei

[permalink] [raw]
Subject: [PATCH v5 01/17] dt-bindings: mfd: syscon: add some compatible strings for Hisilicon

Add some compatible strings for Hisilicon controllers:
hisilicon,hi6220-sramctrl --> Hi6220 SRAM controller
hisilicon,pcie-sas-subctrl --> HiP05/HiP06 PCIe-SAS subsystem controller
hisilicon,peri-subctrl --> HiP05/HiP06 PERI subsystem controller
hisilicon,dsa-subctrl --> HiP05/HiP06 DSA subsystem controller

Signed-off-by: Zhen Lei <[email protected]>
---
Documentation/devicetree/bindings/mfd/syscon.yaml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml b/Documentation/devicetree/bindings/mfd/syscon.yaml
index 049ec2ffc7f97e4..fc2e85004d363bf 100644
--- a/Documentation/devicetree/bindings/mfd/syscon.yaml
+++ b/Documentation/devicetree/bindings/mfd/syscon.yaml
@@ -40,7 +40,10 @@ properties:
- allwinner,sun50i-a64-system-controller
- microchip,sparx5-cpu-syscon
- mstar,msc313-pmsleep
-
+ - hisilicon,hi6220-sramctrl
+ - hisilicon,pcie-sas-subctrl
+ - hisilicon,peri-subctrl
+ - hisilicon,dsa-subctrl
- const: syscon

- contains:
--
1.8.3


2020-09-29 14:20:22

by Zhen Lei

[permalink] [raw]
Subject: [PATCH v5 02/17] dt-bindings: arm: hisilicon: delete the descriptions of HiP05/HiP06 controllers

The compatible strings of Hi6220 SRAM controller, HiP05/HiP06 PCIe-SAS
subsystem controller, HiP05/HiP06 PERI subsystem controller and
HiP05/HiP06 DSA subsystem controller is in syscon.yaml now.

Signed-off-by: Zhen Lei <[email protected]>
---
.../bindings/arm/hisilicon/hisilicon.txt | 68 ----------------------
1 file changed, 68 deletions(-)

diff --git a/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt b/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt
index a97f643e7d1c760..54f423d87a80a6a 100644
--- a/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt
+++ b/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt
@@ -186,24 +186,6 @@ Example:
#clock-cells = <1>;
};

-
-Hisilicon Hi6220 SRAM controller
-
-Required properties:
-- compatible : "hisilicon,hi6220-sramctrl", "syscon"
-- reg : Register address and size
-
-Hisilicon's SoCs use sram for multiple purpose; on Hi6220 there have several
-SRAM banks for power management, modem, security, etc. Further, use "syscon"
-managing the common sram which can be shared by multiple modules.
-
-Example:
- /*for Hi6220*/
- sram: sram@fff80000 {
- compatible = "hisilicon,hi6220-sramctrl", "syscon";
- reg = <0x0 0xfff80000 0x0 0x12000>;
- };
-
-----------------------------------------------------------------------
Hisilicon HiP01 system controller

@@ -226,56 +208,6 @@ Example:
};

-----------------------------------------------------------------------
-Hisilicon HiP05/HiP06 PCIe-SAS sub system controller
-
-Required properties:
-- compatible : "hisilicon,pcie-sas-subctrl", "syscon";
-- reg : Register address and size
-
-The PCIe-SAS sub system controller is shared by PCIe and SAS controllers in
-HiP05 or HiP06 Soc to implement some basic configurations.
-
-Example:
- /* for HiP05 PCIe-SAS sub system */
- pcie_sas: system_controller@b0000000 {
- compatible = "hisilicon,pcie-sas-subctrl", "syscon";
- reg = <0xb0000000 0x10000>;
- };
-
-Hisilicon HiP05/HiP06 PERI sub system controller
-
-Required properties:
-- compatible : "hisilicon,peri-subctrl", "syscon";
-- reg : Register address and size
-
-The PERI sub system controller is shared by peripheral controllers in
-HiP05 or HiP06 Soc to implement some basic configurations. The peripheral
-controllers include mdio, ddr, iic, uart, timer and so on.
-
-Example:
- /* for HiP05 sub peri system */
- peri_c_subctrl: syscon@80000000 {
- compatible = "hisilicon,peri-subctrl", "syscon";
- reg = <0x0 0x80000000 0x0 0x10000>;
- };
-
-Hisilicon HiP05/HiP06 DSA sub system controller
-
-Required properties:
-- compatible : "hisilicon,dsa-subctrl", "syscon";
-- reg : Register address and size
-
-The DSA sub system controller is shared by peripheral controllers in
-HiP05 or HiP06 Soc to implement some basic configurations.
-
-Example:
- /* for HiP05 dsa sub system */
- pcie_sas: system_controller@a0000000 {
- compatible = "hisilicon,dsa-subctrl", "syscon";
- reg = <0xa0000000 0x10000>;
- };
-
------------------------------------------------------------------------
Hisilicon CPU controller

Required properties:
--
1.8.3


2020-09-29 14:20:56

by Zhen Lei

[permalink] [raw]
Subject: [PATCH v5 11/17] dt-bindings: arm: hisilicon: convert hisilicon,cpuctrl bindings to json-schema

Convert the Hisilicon CPU controller binding to DT schema format using
json-schema.

Signed-off-by: Zhen Lei <[email protected]>
---
.../bindings/arm/hisilicon/controller/cpuctrl.yaml | 29 ++++++++++++++++++++++
.../arm/hisilicon/controller/hisilicon,cpuctrl.txt | 8 ------
2 files changed, 29 insertions(+), 8 deletions(-)
create mode 100644 Documentation/devicetree/bindings/arm/hisilicon/controller/cpuctrl.yaml
delete mode 100644 Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,cpuctrl.txt

diff --git a/Documentation/devicetree/bindings/arm/hisilicon/controller/cpuctrl.yaml b/Documentation/devicetree/bindings/arm/hisilicon/controller/cpuctrl.yaml
new file mode 100644
index 000000000000000..f6a314db3a59416
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/hisilicon/controller/cpuctrl.yaml
@@ -0,0 +1,29 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/hisilicon/controller/cpuctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Hisilicon CPU controller
+
+maintainers:
+ - Wei Xu <[email protected]>
+
+description: |
+ The clock registers and power registers of secondary cores are defined
+ in CPU controller, especially in HIX5HD2 SoC.
+
+properties:
+ compatible:
+ items:
+ - const: hisilicon,cpuctrl
+
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+...
diff --git a/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,cpuctrl.txt b/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,cpuctrl.txt
deleted file mode 100644
index ceffac537671668..000000000000000
--- a/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,cpuctrl.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-Hisilicon CPU controller
-
-Required properties:
-- compatible : "hisilicon,cpuctrl"
-- reg : Register address and size
-
-The clock registers and power registers of secondary cores are defined
-in CPU controller, especially in HIX5HD2 SoC.
--
1.8.3


2020-09-29 14:21:18

by Zhen Lei

[permalink] [raw]
Subject: [PATCH v5 07/17] ARM: debug: add UART early console support for SD5203

From: Kefeng Wang <[email protected]>

Add support of early console for SD5203.

Signed-off-by: Kefeng Wang <[email protected]>
Signed-off-by: Zhen Lei <[email protected]>
---
arch/arm/Kconfig.debug | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 80000a66a4e3549..d27a7764c3bfb46 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -1086,6 +1086,14 @@ choice
on SA-11x0 UART ports. The kernel will check for the first
enabled UART in a sequence 3-1-2.

+ config DEBUG_SD5203_UART
+ bool "Hisilicon SD5203 Debug UART"
+ depends on ARCH_SD5203
+ select DEBUG_UART_8250
+ help
+ Say Y here if you want kernel low-level debugging support
+ on SD5203 UART.
+
config DEBUG_SOCFPGA_UART0
depends on ARCH_SOCFPGA
bool "Use SOCFPGA UART0 for low-level debug"
@@ -1639,6 +1647,7 @@ config DEBUG_UART_PHYS
default 0x11006000 if DEBUG_MT6589_UART0
default 0x11009000 if DEBUG_MT8135_UART3
default 0x16000000 if DEBUG_INTEGRATOR
+ default 0x1600d000 if DEBUG_SD5203_UART
default 0x18000300 if DEBUG_BCM_5301X
default 0x18000400 if DEBUG_BCM_HR2
default 0x18010000 if DEBUG_SIRFATLAS7_UART0
@@ -1841,7 +1850,7 @@ config DEBUG_UART_VIRT
default 0xfec60000 if DEBUG_SIRFPRIMA2_UART1
default 0xfec90000 if DEBUG_RK32_UART2
default 0xfed0c000 if DEBUG_DAVINCI_DA8XX_UART1
- default 0xfed0d000 if DEBUG_DAVINCI_DA8XX_UART2
+ default 0xfed0d000 if DEBUG_DAVINCI_DA8XX_UART2 || DEBUG_SD5203_UART
default 0xfed60000 if DEBUG_RK29_UART0
default 0xfed64000 if DEBUG_RK29_UART1 || DEBUG_RK3X_UART2
default 0xfed68000 if DEBUG_RK29_UART2 || DEBUG_RK3X_UART3
--
1.8.3


2020-09-29 20:26:26

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v5 01/17] dt-bindings: mfd: syscon: add some compatible strings for Hisilicon

On Tue, 29 Sep 2020 22:14:38 +0800, Zhen Lei wrote:
> Add some compatible strings for Hisilicon controllers:
> hisilicon,hi6220-sramctrl --> Hi6220 SRAM controller
> hisilicon,pcie-sas-subctrl --> HiP05/HiP06 PCIe-SAS subsystem controller
> hisilicon,peri-subctrl --> HiP05/HiP06 PERI subsystem controller
> hisilicon,dsa-subctrl --> HiP05/HiP06 DSA subsystem controller
>
> Signed-off-by: Zhen Lei <[email protected]>
> ---
> Documentation/devicetree/bindings/mfd/syscon.yaml | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>

Applied, thanks!

2020-09-29 20:28:44

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v5 02/17] dt-bindings: arm: hisilicon: delete the descriptions of HiP05/HiP06 controllers

On Tue, 29 Sep 2020 22:14:39 +0800, Zhen Lei wrote:
> The compatible strings of Hi6220 SRAM controller, HiP05/HiP06 PCIe-SAS
> subsystem controller, HiP05/HiP06 PERI subsystem controller and
> HiP05/HiP06 DSA subsystem controller is in syscon.yaml now.
>
> Signed-off-by: Zhen Lei <[email protected]>
> ---
> .../bindings/arm/hisilicon/hisilicon.txt | 68 ----------------------
> 1 file changed, 68 deletions(-)
>

Applied, thanks!

2020-09-29 20:31:12

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v5 05/17] dt-bindings: arm: hisilicon: add binding for SD5203 SoC

On Tue, 29 Sep 2020 22:14:42 +0800, Zhen Lei wrote:
> Add devicetree binding for Hisilicon SD5203 SoC.
>
> Signed-off-by: Zhen Lei <[email protected]>
> ---
> Documentation/devicetree/bindings/arm/hisilicon/hisilicon.yaml | 5 +++++
> 1 file changed, 5 insertions(+)
>

Applied, thanks!

2020-09-29 20:31:22

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v5 10/17] dt-bindings: arm: hisilicon: convert system controller bindings to json-schema

On Tue, 29 Sep 2020 22:14:47 +0800, Zhen Lei wrote:
> Convert the Hisilicon system controller and its variants binding to DT
> schema format using json-schema. All of them are grouped into one yaml
> file, to help users understand differences and avoid repeated
> descriptions.
>
> Signed-off-by: Zhen Lei <[email protected]>
> ---
> .../controller/hisilicon,hi6220-sysctrl.txt | 19 ----
> .../controller/hisilicon,hip01-sysctrl.txt | 19 ----
> .../arm/hisilicon/controller/hisilicon,sysctrl.txt | 25 -----
> .../bindings/arm/hisilicon/controller/sysctrl.yaml | 110 +++++++++++++++++++++
> .../bindings/arm/hisilicon/hi3519-sysctrl.txt | 14 ---
> 5 files changed, 110 insertions(+), 77 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi6220-sysctrl.txt
> delete mode 100644 Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hip01-sysctrl.txt
> delete mode 100644 Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,sysctrl.txt
> create mode 100644 Documentation/devicetree/bindings/arm/hisilicon/controller/sysctrl.yaml
> delete mode 100644 Documentation/devicetree/bindings/arm/hisilicon/hi3519-sysctrl.txt
>

Applied, thanks!

2020-09-29 20:31:39

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v5 11/17] dt-bindings: arm: hisilicon: convert hisilicon, cpuctrl bindings to json-schema

On Tue, 29 Sep 2020 22:14:48 +0800, Zhen Lei wrote:
> Convert the Hisilicon CPU controller binding to DT schema format using
> json-schema.
>
> Signed-off-by: Zhen Lei <[email protected]>
> ---
> .../bindings/arm/hisilicon/controller/cpuctrl.yaml | 29 ++++++++++++++++++++++
> .../arm/hisilicon/controller/hisilicon,cpuctrl.txt | 8 ------
> 2 files changed, 29 insertions(+), 8 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/arm/hisilicon/controller/cpuctrl.yaml
> delete mode 100644 Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,cpuctrl.txt
>

Applied, thanks!

2020-09-29 20:32:27

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v5 16/17] dt-bindings: arm: hisilicon: convert hisilicon, hi3798cv200-perictrl bindings to json-schema

On Tue, 29 Sep 2020 22:14:53 +0800, Zhen Lei wrote:
> Convert the Hisilicon Hi3798CV200 Peripheral Controller binding to DT
> schema format using json-schema.
>
> Signed-off-by: Zhen Lei <[email protected]>
> ---
> .../hisilicon/controller/hi3798cv200-perictrl.yaml | 64 ++++++++++++++++++++++
> .../controller/hisilicon,hi3798cv200-perictrl.txt | 21 -------
> 2 files changed, 64 insertions(+), 21 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/arm/hisilicon/controller/hi3798cv200-perictrl.yaml
> delete mode 100644 Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi3798cv200-perictrl.txt
>

Applied, thanks!

2020-09-29 20:34:24

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v5 14/17] dt-bindings: arm: hisilicon: convert hisilicon, hip04-bootwrapper bindings to json-schema

On Tue, 29 Sep 2020 22:14:51 +0800, Zhen Lei wrote:
> Convert the Hisilicon Bootwrapper boot method binding to DT schema format
> using json-schema.
>
> The property boot-method contains two groups of physical address range
> information: bootwrapper and relocation. The "uint32-array" type is not
> suitable for it, because the field "address" and "size" may occupy one or
> two cells respectively. Use "minItems: 1" and "maxItems: 2" to allow it
> can be written in "<addr size addr size>" or "<addr size>, <addr size>"
> format.
>
> Signed-off-by: Zhen Lei <[email protected]>
> ---
> .../hisilicon/controller/hip04-bootwrapper.yaml | 34 ++++++++++++++++++++++
> .../controller/hisilicon,hip04-bootwrapper.txt | 9 ------
> 2 files changed, 34 insertions(+), 9 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/arm/hisilicon/controller/hip04-bootwrapper.yaml
> delete mode 100644 Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hip04-bootwrapper.txt
>

Applied, thanks!

2020-09-30 01:41:22

by Zhen Lei

[permalink] [raw]
Subject: Re: [PATCH v5 15/17] dt-bindings: arm: hisilicon: convert Hi6220 domain controller bindings to json-schema

Hi, Rob:
I'm so glad to see you applied my patches in this morning. However, this patch
is not applied and without any comment. Did you miss it?


On 2020/9/29 22:14, Zhen Lei wrote:
> Convert the Hisilicon Hi6220 domain controllers binding to DT schema
> format using json-schema. All of them are grouped into one yaml file, to
> help users understand differences and avoid repeated descriptions.
>
> Signed-off-by: Zhen Lei <[email protected]>
> ---
> .../hisilicon/controller/hi6220-domain-ctrl.yaml | 64 ++++++++++++++++++++++
> .../controller/hisilicon,hi6220-aoctrl.txt | 18 ------
> .../controller/hisilicon,hi6220-mediactrl.txt | 18 ------
> .../controller/hisilicon,hi6220-pmctrl.txt | 18 ------
> 4 files changed, 64 insertions(+), 54 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/arm/hisilicon/controller/hi6220-domain-ctrl.yaml
> delete mode 100644 Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi6220-aoctrl.txt
> delete mode 100644 Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi6220-mediactrl.txt
> delete mode 100644 Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi6220-pmctrl.txt
>
> diff --git a/Documentation/devicetree/bindings/arm/hisilicon/controller/hi6220-domain-ctrl.yaml b/Documentation/devicetree/bindings/arm/hisilicon/controller/hi6220-domain-ctrl.yaml
> new file mode 100644
> index 000000000000000..32c562720d877c9
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/arm/hisilicon/controller/hi6220-domain-ctrl.yaml
> @@ -0,0 +1,64 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/arm/hisilicon/controller/hi6220-domain-ctrl.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Hisilicon Hi6220 domain controller
> +
> +maintainers:
> + - Wei Xu <[email protected]>
> +
> +description: |
> + Hisilicon designs some special domain controllers for mobile platform,
> + such as: the power Always On domain controller, the Media domain
> + controller(e.g. codec, G3D ...) and the Power Management domain
> + controller.
> +
> + The compatible names of each domain controller are as follows:
> + Power Always ON domain controller --> hisilicon,hi6220-aoctrl
> + Media domain controller --> hisilicon,hi6220-mediactrl
> + Power Management domain controller --> hisilicon,hi6220-pmctrl
> +
> +properties:
> + compatible:
> + items:
> + - enum:
> + - hisilicon,hi6220-aoctrl
> + - hisilicon,hi6220-mediactrl
> + - hisilicon,hi6220-pmctrl
> + - const: syscon
> +
> + reg:
> + maxItems: 1
> +
> + '#clock-cells':
> + const: 1
> +
> +required:
> + - compatible
> + - reg
> + - '#clock-cells'
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + ao_ctrl@f7800000 {
> + compatible = "hisilicon,hi6220-aoctrl", "syscon";
> + reg = <0xf7800000 0x2000>;
> + #clock-cells = <1>;
> + };
> +
> + media_ctrl@f4410000 {
> + compatible = "hisilicon,hi6220-mediactrl", "syscon";
> + reg = <0xf4410000 0x1000>;
> + #clock-cells = <1>;
> + };
> +
> + pm_ctrl@f7032000 {
> + compatible = "hisilicon,hi6220-pmctrl", "syscon";
> + reg = <0xf7032000 0x1000>;
> + #clock-cells = <1>;
> + };
> +...
> diff --git a/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi6220-aoctrl.txt b/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi6220-aoctrl.txt
> deleted file mode 100644
> index 5a723c1d45f4a17..000000000000000
> --- a/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi6220-aoctrl.txt
> +++ /dev/null
> @@ -1,18 +0,0 @@
> -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@f7800000 {
> - compatible = "hisilicon,hi6220-aoctrl", "syscon";
> - reg = <0x0 0xf7800000 0x0 0x2000>;
> - #clock-cells = <1>;
> - };
> diff --git a/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi6220-mediactrl.txt b/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi6220-mediactrl.txt
> deleted file mode 100644
> index dcfdcbcb6455771..000000000000000
> --- a/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi6220-mediactrl.txt
> +++ /dev/null
> @@ -1,18 +0,0 @@
> -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@f4410000 {
> - compatible = "hisilicon,hi6220-mediactrl", "syscon";
> - reg = <0x0 0xf4410000 0x0 0x1000>;
> - #clock-cells = <1>;
> - };
> diff --git a/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi6220-pmctrl.txt b/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi6220-pmctrl.txt
> deleted file mode 100644
> index 972842f07b5a2ce..000000000000000
> --- a/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi6220-pmctrl.txt
> +++ /dev/null
> @@ -1,18 +0,0 @@
> -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@f7032000 {
> - compatible = "hisilicon,hi6220-pmctrl", "syscon";
> - reg = <0x0 0xf7032000 0x0 0x1000>;
> - #clock-cells = <1>;
> - };
>

2020-09-30 02:54:03

by Zhen Lei

[permalink] [raw]
Subject: Re: [PATCH v5 15/17] dt-bindings: arm: hisilicon: convert Hi6220 domain controller bindings to json-schema



On 2020/9/30 9:38, Leizhen (ThunderTown) wrote:
> Hi, Rob:
> I'm so glad to see you applied my patches in this morning. However, this patch
> is not applied and without any comment. Did you miss it?

Oh, I got it, missed the property "#reset-cells". What a shame! I will post the new one.

>
>
> On 2020/9/29 22:14, Zhen Lei wrote:
>> Convert the Hisilicon Hi6220 domain controllers binding to DT schema
>> format using json-schema. All of them are grouped into one yaml file, to
>> help users understand differences and avoid repeated descriptions.
>>
>> Signed-off-by: Zhen Lei <[email protected]>
>> ---
>> .../hisilicon/controller/hi6220-domain-ctrl.yaml | 64 ++++++++++++++++++++++
>> .../controller/hisilicon,hi6220-aoctrl.txt | 18 ------
>> .../controller/hisilicon,hi6220-mediactrl.txt | 18 ------
>> .../controller/hisilicon,hi6220-pmctrl.txt | 18 ------
>> 4 files changed, 64 insertions(+), 54 deletions(-)
>> create mode 100644 Documentation/devicetree/bindings/arm/hisilicon/controller/hi6220-domain-ctrl.yaml
>> delete mode 100644 Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi6220-aoctrl.txt
>> delete mode 100644 Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi6220-mediactrl.txt
>> delete mode 100644 Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi6220-pmctrl.txt
>>
>> diff --git a/Documentation/devicetree/bindings/arm/hisilicon/controller/hi6220-domain-ctrl.yaml b/Documentation/devicetree/bindings/arm/hisilicon/controller/hi6220-domain-ctrl.yaml
>> new file mode 100644
>> index 000000000000000..32c562720d877c9
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/arm/hisilicon/controller/hi6220-domain-ctrl.yaml
>> @@ -0,0 +1,64 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/arm/hisilicon/controller/hi6220-domain-ctrl.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Hisilicon Hi6220 domain controller
>> +
>> +maintainers:
>> + - Wei Xu <[email protected]>
>> +
>> +description: |
>> + Hisilicon designs some special domain controllers for mobile platform,
>> + such as: the power Always On domain controller, the Media domain
>> + controller(e.g. codec, G3D ...) and the Power Management domain
>> + controller.
>> +
>> + The compatible names of each domain controller are as follows:
>> + Power Always ON domain controller --> hisilicon,hi6220-aoctrl
>> + Media domain controller --> hisilicon,hi6220-mediactrl
>> + Power Management domain controller --> hisilicon,hi6220-pmctrl
>> +
>> +properties:
>> + compatible:
>> + items:
>> + - enum:
>> + - hisilicon,hi6220-aoctrl
>> + - hisilicon,hi6220-mediactrl
>> + - hisilicon,hi6220-pmctrl
>> + - const: syscon
>> +
>> + reg:
>> + maxItems: 1
>> +
>> + '#clock-cells':
>> + const: 1
>> +
>> +required:
>> + - compatible
>> + - reg
>> + - '#clock-cells'
>> +
>> +additionalProperties: false
>> +
>> +examples:
>> + - |
>> + ao_ctrl@f7800000 {
>> + compatible = "hisilicon,hi6220-aoctrl", "syscon";
>> + reg = <0xf7800000 0x2000>;
>> + #clock-cells = <1>;
>> + };
>> +
>> + media_ctrl@f4410000 {
>> + compatible = "hisilicon,hi6220-mediactrl", "syscon";
>> + reg = <0xf4410000 0x1000>;
>> + #clock-cells = <1>;
>> + };
>> +
>> + pm_ctrl@f7032000 {
>> + compatible = "hisilicon,hi6220-pmctrl", "syscon";
>> + reg = <0xf7032000 0x1000>;
>> + #clock-cells = <1>;
>> + };
>> +...
>> diff --git a/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi6220-aoctrl.txt b/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi6220-aoctrl.txt
>> deleted file mode 100644
>> index 5a723c1d45f4a17..000000000000000
>> --- a/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi6220-aoctrl.txt
>> +++ /dev/null
>> @@ -1,18 +0,0 @@
>> -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@f7800000 {
>> - compatible = "hisilicon,hi6220-aoctrl", "syscon";
>> - reg = <0x0 0xf7800000 0x0 0x2000>;
>> - #clock-cells = <1>;
>> - };
>> diff --git a/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi6220-mediactrl.txt b/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi6220-mediactrl.txt
>> deleted file mode 100644
>> index dcfdcbcb6455771..000000000000000
>> --- a/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi6220-mediactrl.txt
>> +++ /dev/null
>> @@ -1,18 +0,0 @@
>> -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@f4410000 {
>> - compatible = "hisilicon,hi6220-mediactrl", "syscon";
>> - reg = <0x0 0xf4410000 0x0 0x1000>;
>> - #clock-cells = <1>;
>> - };
>> diff --git a/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi6220-pmctrl.txt b/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi6220-pmctrl.txt
>> deleted file mode 100644
>> index 972842f07b5a2ce..000000000000000
>> --- a/Documentation/devicetree/bindings/arm/hisilicon/controller/hisilicon,hi6220-pmctrl.txt
>> +++ /dev/null
>> @@ -1,18 +0,0 @@
>> -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@f7032000 {
>> - compatible = "hisilicon,hi6220-pmctrl", "syscon";
>> - reg = <0x0 0xf7032000 0x0 0x1000>;
>> - #clock-cells = <1>;
>> - };
>>
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> [email protected]
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
> .
>

2020-09-30 03:06:59

by Wei Xu

[permalink] [raw]
Subject: Re: [PATCH v5 06/17] ARM: hisi: add support for SD5203 SoC

Hi Zhen Lei,

On 2020/9/29 22:14, Zhen Lei wrote:
> From: Kefeng Wang <[email protected]>
>
> Enable support for the Hisilicon SD5203 SoC. The core is ARM926EJ-S.
>
> Signed-off-by: Kefeng Wang <[email protected]>
> Signed-off-by: Zhen Lei <[email protected]>

Thanks!
Applied to the hisilicon arm32 SoC tree.

Best Regards,
Wei

> ---
> arch/arm/mach-hisi/Kconfig | 16 ++++++++++++++--
> 1 file changed, 14 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-hisi/Kconfig b/arch/arm/mach-hisi/Kconfig
> index 3b010fe7c0e9b48..2e980f834a6aa1b 100644
> --- a/arch/arm/mach-hisi/Kconfig
> +++ b/arch/arm/mach-hisi/Kconfig
> @@ -1,9 +1,9 @@
> # SPDX-License-Identifier: GPL-2.0-only
> config ARCH_HISI
> bool "Hisilicon SoC Support"
> - depends on ARCH_MULTI_V7
> + depends on ARCH_MULTI_V7 || ARCH_MULTI_V5
> select ARM_AMBA
> - select ARM_GIC
> + select ARM_GIC if ARCH_MULTI_V7
> select ARM_TIMER_SP804
> select POWER_RESET
> select POWER_RESET_HISI
> @@ -15,6 +15,7 @@ menu "Hisilicon platform type"
>
> config ARCH_HI3xxx
> bool "Hisilicon Hi36xx family"
> + depends on ARCH_MULTI_V7
> select CACHE_L2X0
> select HAVE_ARM_SCU if SMP
> select HAVE_ARM_TWD if SMP
> @@ -25,6 +26,7 @@ config ARCH_HI3xxx
>
> config ARCH_HIP01
> bool "Hisilicon HIP01 family"
> + depends on ARCH_MULTI_V7
> select HAVE_ARM_SCU if SMP
> select HAVE_ARM_TWD if SMP
> select ARM_GLOBAL_TIMER
> @@ -33,6 +35,7 @@ config ARCH_HIP01
>
> config ARCH_HIP04
> bool "Hisilicon HiP04 Cortex A15 family"
> + depends on ARCH_MULTI_V7
> select ARM_ERRATA_798181 if SMP
> select HAVE_ARM_ARCH_TIMER
> select MCPM if SMP
> @@ -43,6 +46,7 @@ config ARCH_HIP04
>
> config ARCH_HIX5HD2
> bool "Hisilicon X5HD2 family"
> + depends on ARCH_MULTI_V7
> select CACHE_L2X0
> select HAVE_ARM_SCU if SMP
> select HAVE_ARM_TWD if SMP
> @@ -50,6 +54,14 @@ config ARCH_HIX5HD2
> select PINCTRL_SINGLE
> help
> Support for Hisilicon HIX5HD2 SoC family
> +
> +config ARCH_SD5203
> + bool "Hisilicon SD5203 family"
> + depends on ARCH_MULTI_V5
> + select DW_APB_ICTL
> + help
> + Support for Hisilicon SD5203 SoC family
> +
> endmenu
>
> endif
>

2020-09-30 03:08:09

by Wei Xu

[permalink] [raw]
Subject: Re: [PATCH v5 07/17] ARM: debug: add UART early console support for SD5203

Hi Zhen Lei,

On 2020/9/29 22:14, Zhen Lei wrote:
> From: Kefeng Wang <[email protected]>
>
> Add support of early console for SD5203.
>
> Signed-off-by: Kefeng Wang <[email protected]>
> Signed-off-by: Zhen Lei <[email protected]>

Thanks!
Applied to the hisilicon arm32 SoC tree.

Best Regards,
Wei

> ---
> arch/arm/Kconfig.debug | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
> index 80000a66a4e3549..d27a7764c3bfb46 100644
> --- a/arch/arm/Kconfig.debug
> +++ b/arch/arm/Kconfig.debug
> @@ -1086,6 +1086,14 @@ choice
> on SA-11x0 UART ports. The kernel will check for the first
> enabled UART in a sequence 3-1-2.
>
> + config DEBUG_SD5203_UART
> + bool "Hisilicon SD5203 Debug UART"
> + depends on ARCH_SD5203
> + select DEBUG_UART_8250
> + help
> + Say Y here if you want kernel low-level debugging support
> + on SD5203 UART.
> +
> config DEBUG_SOCFPGA_UART0
> depends on ARCH_SOCFPGA
> bool "Use SOCFPGA UART0 for low-level debug"
> @@ -1639,6 +1647,7 @@ config DEBUG_UART_PHYS
> default 0x11006000 if DEBUG_MT6589_UART0
> default 0x11009000 if DEBUG_MT8135_UART3
> default 0x16000000 if DEBUG_INTEGRATOR
> + default 0x1600d000 if DEBUG_SD5203_UART
> default 0x18000300 if DEBUG_BCM_5301X
> default 0x18000400 if DEBUG_BCM_HR2
> default 0x18010000 if DEBUG_SIRFATLAS7_UART0
> @@ -1841,7 +1850,7 @@ config DEBUG_UART_VIRT
> default 0xfec60000 if DEBUG_SIRFPRIMA2_UART1
> default 0xfec90000 if DEBUG_RK32_UART2
> default 0xfed0c000 if DEBUG_DAVINCI_DA8XX_UART1
> - default 0xfed0d000 if DEBUG_DAVINCI_DA8XX_UART2
> + default 0xfed0d000 if DEBUG_DAVINCI_DA8XX_UART2 || DEBUG_SD5203_UART
> default 0xfed60000 if DEBUG_RK29_UART0
> default 0xfed64000 if DEBUG_RK29_UART1 || DEBUG_RK3X_UART2
> default 0xfed68000 if DEBUG_RK29_UART2 || DEBUG_RK3X_UART3
>

2020-09-30 03:09:31

by Wei Xu

[permalink] [raw]
Subject: Re: [PATCH v5 08/17] ARM: dts: add SD5203 dts

Hi Zhen Lei,

On 2020/9/29 22:14, Zhen Lei wrote:
> From: Kefeng Wang <[email protected]>
>
> Add sd5203.dts for Hisilicon SD5203 SoC platform.
>
> Signed-off-by: Kefeng Wang <[email protected]>
> Signed-off-by: Zhen Lei <[email protected]>

Thanks!
Applied to the hisilicon arm32 dt tree.

Best Regards,
Wei

> ---
> arch/arm/boot/dts/Makefile | 2 +
> arch/arm/boot/dts/sd5203.dts | 96 ++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 98 insertions(+)
> create mode 100644 arch/arm/boot/dts/sd5203.dts
>
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index 4572db3fa5ae302..1d1262df5c55907 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -357,6 +357,8 @@ dtb-$(CONFIG_ARCH_MPS2) += \
> mps2-an399.dtb
> dtb-$(CONFIG_ARCH_MOXART) += \
> moxart-uc7112lx.dtb
> +dtb-$(CONFIG_ARCH_SD5203) += \
> + sd5203.dtb
> dtb-$(CONFIG_SOC_IMX1) += \
> imx1-ads.dtb \
> imx1-apf9328.dtb
> diff --git a/arch/arm/boot/dts/sd5203.dts b/arch/arm/boot/dts/sd5203.dts
> new file mode 100644
> index 000000000000000..3cc9a23910be62e
> --- /dev/null
> +++ b/arch/arm/boot/dts/sd5203.dts
> @@ -0,0 +1,96 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Copyright (c) 2020 Hisilicon Limited.
> + *
> + * DTS file for Hisilicon SD5203 Board
> + */
> +
> +/dts-v1/;
> +
> +/ {
> + model = "Hisilicon SD5203";
> + compatible = "H836ASDJ", "hisilicon,sd5203";
> + interrupt-parent = <&vic>;
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + chosen {
> + bootargs="console=ttyS0,9600 earlycon=uart8250,mmio32,0x1600d000";
> + };
> +
> + aliases {
> + serial0 = &uart0;
> + };
> +
> + cpus {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + cpu0 {
> + device_type = "cpu";
> + compatible = "arm,arm926ej-s";
> + reg = <0x0>;
> + };
> + };
> +
> + memory@30000000 {
> + device_type = "memory";
> + reg = <0x30000000 0x8000000>;
> + };
> +
> + soc {
> + #address-cells = <1>;
> + #size-cells = <1>;
> + compatible = "simple-bus";
> + ranges;
> +
> + vic: interrupt-controller@10130000 {
> + compatible = "snps,dw-apb-ictl";
> + reg = <0x10130000 0x1000>;
> + interrupt-controller;
> + #interrupt-cells = <1>;
> + };
> +
> + refclk125mhz: refclk125mhz {
> + compatible = "fixed-clock";
> + #clock-cells = <0>;
> + clock-frequency = <125000000>;
> + };
> +
> + timer0: timer@16002000 {
> + compatible = "arm,sp804", "arm,primecell";
> + reg = <0x16002000 0x1000>;
> + interrupts = <4>;
> + clocks = <&refclk125mhz>;
> + clock-names = "apb_pclk";
> + };
> +
> + timer1: timer@16003000 {
> + compatible = "arm,sp804", "arm,primecell";
> + reg = <0x16003000 0x1000>;
> + interrupts = <5>;
> + clocks = <&refclk125mhz>;
> + clock-names = "apb_pclk";
> + };
> +
> + uart0: serial@1600d000 {
> + compatible = "snps,dw-apb-uart";
> + reg = <0x1600d000 0x1000>;
> + bus_id = "uart0";
> + clocks = <&refclk125mhz>;
> + clock-names = "baudclk", "apb_pclk";
> + reg-shift = <2>;
> + interrupts = <17>;
> + };
> +
> + uart1: serial@1600c000 {
> + compatible = "snps,dw-apb-uart";
> + reg = <0x1600c000 0x1000>;
> + clocks = <&refclk125mhz>;
> + clock-names = "baudclk", "apb_pclk";
> + reg-shift = <2>;
> + interrupts = <16>;
> + status = "disabled";
> + };
> + };
> +};
>

2020-09-30 03:10:09

by Wei Xu

[permalink] [raw]
Subject: Re: [PATCH v5 09/17] ARM: dts: hisilicon: fix ststem controller compatible node

Hi Zhen Lei,

On 2020/9/29 22:14, Zhen Lei wrote:
> The DT binding for Hisilicon system controllers requires to have a
> "syscon" compatible string.
>
> Signed-off-by: Zhen Lei <[email protected]>

Thanks!
Applied to the hisilicon arm32 dt tree.

Best Regards,
Wei

> ---
> arch/arm/boot/dts/hi3620.dtsi | 2 +-
> arch/arm/boot/dts/hip04.dtsi | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/boot/dts/hi3620.dtsi b/arch/arm/boot/dts/hi3620.dtsi
> index 355175b25fd6220..f683440ee5694b4 100644
> --- a/arch/arm/boot/dts/hi3620.dtsi
> +++ b/arch/arm/boot/dts/hi3620.dtsi
> @@ -89,7 +89,7 @@
> };
>
> sysctrl: system-controller@802000 {
> - compatible = "hisilicon,sysctrl";
> + compatible = "hisilicon,sysctrl", "syscon";
> #address-cells = <1>;
> #size-cells = <1>;
> ranges = <0 0x802000 0x1000>;
> diff --git a/arch/arm/boot/dts/hip04.dtsi b/arch/arm/boot/dts/hip04.dtsi
> index f5871b1d1ec452c..555bc6b6720fc94 100644
> --- a/arch/arm/boot/dts/hip04.dtsi
> +++ b/arch/arm/boot/dts/hip04.dtsi
> @@ -213,7 +213,7 @@
> };
>
> sysctrl: sysctrl {
> - compatible = "hisilicon,sysctrl";
> + compatible = "hisilicon,sysctrl", "syscon";
> reg = <0x3e00000 0x00100000>;
> };
>
>