Introduce Nuvoton ma35d1 SoC
Subsystems (7)
v9 cover Introduce Nuvoton ma35d1 SoC
From: Jacky Huang <[email protected]>
This patchset adds initial support for the Nuvoton ma35d1 SoC, including initial device tree, clock driver, reset driver, and serial driver.
This patchset cover letter is based from the initial support for Nuvoton ma35d1 to keep tracking the version history.
This patchset had been applied to Linux kernel 6.3.0-12728-g348551ddaf31-dirty and tested on the Nuvoton ma35d1 SOM evaluation board.
(ma35d1 information: https://www.nuvoton.com/products/microprocessors/arm-cortex-a35-mpus/)
MA35D1 porting on linux-5.10.y can be found at: https://github.com/OpenNuvoton/MPU-Family
v9:
- Combine MAINTAINERS patch into patch 5 'dt-bindings: arm: Add initial bindings for Nuvoton platform'
- Modify clock driver
- Use the helper function for 64-bit division
- Fixed minor issues
- Modify reset driver
- Refine coding style and add required header files
- Add spin_lock protection
- Add error return handling to the serial driver probe function
v8:
- Remove '0005-dt-bindings-mfd-syscon-Add-nuvoton-ma35d1-sys-compat.patch' as it was applied.
- Modify MAINTAINERS NUVOTON MA35 and NPCM path settings
- Remove 'syscon' from dtsi 'sys' node and modify the corresponding yaml
- Modify clock driver
- Remove the header file and move definitions into .c files.
- Use parent_data instead of parent name.
- Modify serial driver
- Modify reset driver
- Modify reset register/offset lookup table to be indexed by reset id
- Combined reset and reboot structure
v7:
- Fixed dts system-management node and compatible driver
- move 'nuvoton,npcm-gcr.yaml' from 'binding/arm/nuvoton' to 'binding/soc/nuvoton'
- In ma35d1.dtsi, create the soc node for ma35d1 SoC
- Modify the issues found in serial driver
- Modify the issues found in clock driver
- Modify the IDs of reset driver to be contiguous numbers and use lookup table to find register offset and bit position.
- Modify MAINTAINERS NUVOTON NPCM path as npcm directory name to nuvoton
v6:
- Combine nuvoton,ma35d1-clk.yaml and nuvoton,ma35d1-clk.h into one patch
- Combine nuvoton,ma35d1-reset.yaml and nuvoton,ma35d1-reset.h into one patch
- rename Documentation/devicetree/bindings/arm/npcm directory as nuvoton
- Remove patch for adding include/linux/mfd/ma35d1-sys.h as it's not required
- Update dtsi & dts files and move board-specific nodes to dts
- Modify reset driver
- Modify serial driver, fix coding style issues
- Modify clock driver, rewrite the PLL calculation functions
v5:
- Add ARCH_NUVOTON to arm64 Kconfig
- Add ARCH_NUVOTON to defconfig
- Add the clock driver
- Add the reset driver
- Add the serial driver
- Add us to the maintainer
v4:
- patch 4/5 is a resend
- Fixed dt_binding_check errors of nuvoton,ma35d1-clk.yaml
- Modify ma35d1.dtsi
1. Add a node hxt_24m
2. Fixed the base address of gic node
3. Add clocks and clock-names to clock node
- Fixed borad binding mistakes of nuvoton.yaml
v3:
- added patch 4/5 and 5/5
- introduce CONFIG_ARCH_NUVOTON option
- add initial bindings for Nuvoton Platform boards
- fixed coding style problem of nuvoton,ma35d1-clk.h
- added CAPLL to clock-controller node
- modify the chosen node of ma35d1-evb.dts
- modify clock yaml "clk-pll-mode" to "nuvoton,clk-pll-mode"
v2:
- fixed dt_binding_check failed of nuvoton,ma35d1-clk.yaml
Jacky Huang (10):
arm64: Kconfig.platforms: Add config for Nuvoton MA35 platform
arm64: defconfig: Add support for Nuvoton MA35 family SoCs
dt-bindings: clock: nuvoton: add binding for ma35d1 clock controller
dt-bindings: reset: nuvoton: Document ma35d1 reset control
dt-bindings: arm: Add initial bindings for Nuvoton platform
dt-bindings: serial: Document ma35d1 uart controller
arm64: dts: nuvoton: Add initial ma35d1 device tree
clk: nuvoton: Add clock driver for ma35d1 clock controller
reset: Add Nuvoton ma35d1 reset driver support
tty: serial: Add Nuvoton ma35d1 serial driver support
.../bindings/arm/nuvoton/nuvoton,ma35d1.yaml | 30 +
.../npcm.yaml => nuvoton/nuvoton,npcm.yaml} | 2 +-
.../bindings/clock/nuvoton,ma35d1-clk.yaml | 63 ++
.../bindings/reset/nuvoton,ma35d1-reset.yaml | 45 +
.../serial/nuvoton,ma35d1-serial.yaml | 48 +
.../nuvoton/nuvoton,npcm-gcr.yaml} | 2 +-
MAINTAINERS | 13 +-
arch/arm64/Kconfig.platforms | 9 +
arch/arm64/boot/dts/nuvoton/Makefile | 2 +
.../boot/dts/nuvoton/ma35d1-iot-512m.dts | 56 ++
.../boot/dts/nuvoton/ma35d1-som-256m.dts | 56 ++
arch/arm64/boot/dts/nuvoton/ma35d1.dtsi | 232 +++++
arch/arm64/configs/defconfig | 1 +
drivers/clk/Makefile | 1 +
drivers/clk/nuvoton/Kconfig | 19 +
drivers/clk/nuvoton/Makefile | 4 +
drivers/clk/nuvoton/clk-ma35d1-divider.c | 140 +++
drivers/clk/nuvoton/clk-ma35d1-pll.c | 365 +++++++
drivers/clk/nuvoton/clk-ma35d1.c | 948 ++++++++++++++++++
drivers/reset/Kconfig | 6 +
drivers/reset/Makefile | 1 +
drivers/reset/reset-ma35d1.c | 234 +++++
drivers/tty/serial/Kconfig | 18 +
drivers/tty/serial/Makefile | 1 +
drivers/tty/serial/ma35d1_serial.c | 796 +++++++++++++++
.../dt-bindings/clock/nuvoton,ma35d1-clk.h | 253 +++++
.../dt-bindings/reset/nuvoton,ma35d1-reset.h | 108 ++
27 files changed, 3450 insertions(+), 3 deletions(-)
create mode 100644 Documentation/devicetree/bindings/arm/nuvoton/nuvoton,ma35d1.yaml
rename Documentation/devicetree/bindings/arm/{npcm/npcm.yaml => nuvoton/nuvoton,npcm.yaml} (93%)
create mode 100644 Documentation/devicetree/bindings/clock/nuvoton,ma35d1-clk.yaml
create mode 100644 Documentation/devicetree/bindings/reset/nuvoton,ma35d1-reset.yaml
create mode 100644 Documentation/devicetree/bindings/serial/nuvoton,ma35d1-serial.yaml
rename Documentation/devicetree/bindings/{arm/npcm/nuvoton,gcr.yaml => soc/nuvoton/nuvoton,npcm-gcr.yaml} (93%)
create mode 100644 arch/arm64/boot/dts/nuvoton/ma35d1-iot-512m.dts
create mode 100644 arch/arm64/boot/dts/nuvoton/ma35d1-som-256m.dts
create mode 100644 arch/arm64/boot/dts/nuvoton/ma35d1.dtsi
create mode 100644 drivers/clk/nuvoton/Kconfig
create mode 100644 drivers/clk/nuvoton/Makefile
create mode 100644 drivers/clk/nuvoton/clk-ma35d1-divider.c
create mode 100644 drivers/clk/nuvoton/clk-ma35d1-pll.c
create mode 100644 drivers/clk/nuvoton/clk-ma35d1.c
create mode 100644 drivers/reset/reset-ma35d1.c
create mode 100644 drivers/tty/serial/ma35d1_serial.c
create mode 100644 include/dt-bindings/clock/nuvoton,ma35d1-clk.h
create mode 100644 include/dt-bindings/reset/nuvoton,ma35d1-reset.hSignature · 1 line
2.34.1
PATCH v9 1/10 arm64: Kconfig.platforms: Add config for Nuvoton MA35 platform
From: Jacky Huang <[email protected]>
Add ARCH_NUVOTON configuration option for Nuvoton MA35 family SoCs.
--- arch/arm64/Kconfig.platforms | 9 +++++++++ 1 file changed, 9 insertions(+)
arch/arm64/Kconfig.platforms +9 -0
@@ -236,6 +236,15 @@ config ARCH_NPCM General support for NPCM8xx BMC (Arbel). Nuvoton NPCM8xx BMC based on the Cortex A35. +config ARCH_NUVOTON + bool "Nuvoton MA35 Platforms" + select GPIOLIB + select PINCTRL + select RESET_CONTROLLER + help + This enables support for the ARMv8 based Nuvoton SoCs such + as MA35D1. + config ARCH_QCOM bool "Qualcomm Platforms" select GPIOLIB
Signature · 1 line
2.34.1
Re: [PATCH v9 01/10] arm64: Kconfig.platforms: Add config for Nuvoton MA35 platform
Quoted 5 lines · Jacky Huang
From: Jacky Huang <[email protected]>
Add
ARCH_NUVOTONconfiguration option for Nuvoton MA35 family SoCs.Signed-off-by Jacky Huang <[email protected]>
Best regards,
Krzysztof
Re: [PATCH v9 01/10] arm64: Kconfig.platforms: Add config for Nuvoton MA35 platform
In reply to Jacky HuangQuoted 14 lines · Jacky Huang
From: Jacky Huang <[email protected]>
Add
ARCH_NUVOTONconfiguration option for Nuvoton MA35 family SoCs.Signed-off-by Jacky Huang <[email protected]>--- arch/arm64/Kconfig.platforms | 9 +++++++++ 1 file changed, 9 insertions(+)arch/arm64/Kconfig.platforms +0
-0
arch/arm64/Kconfig.platforms config ARCH_NPCM · line 239
Quoted 4 lines
arch/arm64/Kconfig.platforms +1
-0@@ -236,6 +236,15 @@ config ARCH_NPCM General support for NPCM8xx BMC (Arbel). Nuvoton NPCM8xx BMC based on the Cortex A35. +config ARCH_NUVOTON
Either this should be ARCH_MA35 or you should integrate it with NPCM. ARCH_NUVOTON means all Nuvoton platforms.
Best regards,
Krzysztof
Re: [PATCH v9 01/10] arm64: Kconfig.platforms: Add config for Nuvoton MA35 platform
Quoted 18 lines · Krzysztof Kozlowski
Quoted 17 lines · Jacky Huang
From: Jacky Huang <[email protected]>
Add
ARCH_NUVOTONconfiguration option for Nuvoton MA35 family SoCs.Signed-off-by Jacky Huang <[email protected]>--- arch/arm64/Kconfig.platforms | 9 +++++++++ 1 file changed, 9 insertions(+)arch/arm64/Kconfig.platforms +0
-0@@ -236,6 +236,15 @@ config ARCH_NPCM General support for NPCM8xx BMC (Arbel). Nuvoton NPCM8xx BMC based on the Cortex A35.
Quoted 4 lines
arch/arm64/Kconfig.platforms config ARCH_NPCM · line 239
Quoted 1 line
arch/arm64/Kconfig.platforms +1
-0+config ARCH_NUVOTONEither this should be
ARCH_MA35or you should integrate it with NPCM.ARCH_NUVOTONmeans all Nuvoton platforms.
I'd go with two separate Kconfig options here (ARCH_MA35 and ARCH_NPCM) for arm64, but keep the shared arch/arm64/boot/dts/nuvoton directory, I think that fits most closely what we do on other targets, and there is apparently very little sharing of IP blocks between npcm and ma35, if any.
Arnd
Re: [PATCH v9 01/10] arm64: Kconfig.platforms: Add config for Nuvoton MA35 platform
Quoted 22 lines · Arnd Bergmann
Quoted 18 lines · Krzysztof Kozlowski
Quoted 17 lines · Jacky Huang
From: Jacky Huang <[email protected]>
Add
ARCH_NUVOTONconfiguration option for Nuvoton MA35 family SoCs.Signed-off-by Jacky Huang <[email protected]>--- arch/arm64/Kconfig.platforms | 9 +++++++++ 1 file changed, 9 insertions(+)arch/arm64/Kconfig.platforms +0
-0@@ -236,6 +236,15 @@ config ARCH_NPCM General support for NPCM8xx BMC (Arbel). Nuvoton NPCM8xx BMC based on the Cortex A35.Quoted 3 lines
arch/arm64/Kconfig.platforms config ARCH_NPCM · line 239
Quoted 1 line
arch/arm64/Kconfig.platforms +1
-0+config ARCH_NUVOTONEither this should be
ARCH_MA35or you should integrate it with NPCM.ARCH_NUVOTONmeans all Nuvoton platforms.
Quoted 7 lines
I'd go with two separate
Kconfigoptions here (ARCH_MA35andARCH_NPCM) for arm64, but keep the sharedarch/arm64/boot/dts/nuvotondirectory, I think that fits most closely what we do on other targets, and there is apparently very little sharing of IP blocks between npcm and ma35, if any.Arnd
Dear Arnd and Krzysztof,
Thank you for your suggestion, it really helped me. We are also considering whether to use ARCH_MA35. As NPCM and MA35 are designed for different application areas, it is unlikely that they would be used simultaneously. Therefore, it would be more reasonable to separate them into ARCH_NPCM and ARCH_MA35. In the next version, v10, we will change all instances of ARCH_NUVOTON in this patchset to ARCH_MA35 and keep shared directory changed.
Best Regards,
Jacky Huang
PATCH v9 2/10 arm64: defconfig: Add support for Nuvoton MA35 family SoCs
In reply to Jacky HuangFrom: Jacky Huang <[email protected]>
This adds support for the Nuvoton MA35 family SoCs which are based on the Cortex-A35 Armv8-A 64-bit architecture.
--- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm64/configs/defconfig +1 -0
@@ -53,6 +53,7 @@ CONFIG_ARCH_LAYERSCAPE=y CONFIG_ARCH_MXC=y CONFIG_ARCH_S32=y CONFIG_ARCH_NPCM=y +CONFIG_ARCH_NUVOTON=y CONFIG_ARCH_QCOM=y CONFIG_ARCH_RENESAS=y CONFIG_ARCH_ROCKCHIP=y
Signature · 1 line
2.34.1
Re: [PATCH v9 02/10] arm64: defconfig: Add support for Nuvoton MA35 family SoCs
Quoted 7 lines · Jacky Huang
From: Jacky Huang <[email protected]>
This adds support for the Nuvoton MA35 family SoCs which are based on the Cortex-A35 Armv8-A 64-bit architecture.
Signed-off-by Jacky Huang <[email protected]>---
Best regards,
Krzysztof
PATCH v9 3/10 dt-bindings: clock: nuvoton: add binding for ma35d1 clock controller
In reply to Jacky HuangFrom: Jacky Huang <[email protected]>
Add the dt-bindings header for Nuvoton ma35d1, that gets shared between the clock controller and clock references in the dts. Add documentation to describe nuvoton ma35d1 clock driver.
--- .../bindings/clock/nuvoton,ma35d1-clk.yaml | 63 +++++ .../dt-bindings/clock/nuvoton,ma35d1-clk.h | 253 ++++++++++++++++++ 2 files changed, 316 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/nuvoton,ma35d1-clk.yaml create mode 100644 include/dt-bindings/clock/nuvoton,ma35d1-clk.h
Documentation/devicetree/bindings/clock/nuvoton,ma35d1-clk.yaml new file +63 -0
@@ -0,0 +1,63 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/nuvoton,ma35d1-clk.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Nuvoton MA35D1 Clock Controller Module + +maintainers: + - Chi-Fang Li <[email protected]> + - Jacky Huang <[email protected]> + +description: | + The MA35D1 clock controller generates clocks for the whole chip, + including system clocks and all peripheral clocks. + + See also: + include/dt-bindings/clock/ma35d1-clk.h + +properties: + compatible: + items: + - const: nuvoton,ma35d1-clk + + reg: + maxItems: 1 + + "#clock-cells": + const: 1 + + clocks: + maxItems: 1 + + nuvoton,pll-mode: + description: + A list of PLL operation mode corresponding to CAPLL, DDRPLL, APLL, + EPLL, and VPLL in sequential. + maxItems: 5 + items: + enum: + - integer + - fractional + - spread-spectrum + $ref: /schemas/types.yaml#/definitions/non-unique-string-array + +required: + - compatible + - reg + - "#clock-cells" + - clocks + +additionalProperties: false + +examples: + - | + + clock-controller@40460200 { + compatible = "nuvoton,ma35d1-clk"; + reg = <0x40460200 0x100>; + #clock-cells = <1>; + clocks = <&clk_hxt>; + }; +...
include/dt-bindings/clock/nuvoton,ma35d1-clk.h new file +253 -0
253 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH v9 4/10 dt-bindings: reset: nuvoton: Document ma35d1 reset control
In reply to Jacky HuangFrom: Jacky Huang <[email protected]>
Add the dt-bindings header for Nuvoton ma35d1, that gets shared between the reset controller and reset references in the dts. Add documentation to describe nuvoton ma35d1 reset driver.
--- .../bindings/reset/nuvoton,ma35d1-reset.yaml | 45 ++++++++ .../dt-bindings/reset/nuvoton,ma35d1-reset.h | 108 ++++++++++++++++++ 2 files changed, 153 insertions(+) create mode 100644 Documentation/devicetree/bindings/reset/nuvoton,ma35d1-reset.yaml create mode 100644 include/dt-bindings/reset/nuvoton,ma35d1-reset.h
Documentation/devicetree/bindings/reset/nuvoton,ma35d1-reset.yaml new file +45 -0
@@ -0,0 +1,45 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/reset/nuvoton,ma35d1-reset.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Nuvoton MA35D1 Reset Controller + +maintainers: + - Chi-Fang Li <[email protected]> + - Jacky Huang <[email protected]> + +description: + The system reset controller can be used to reset various peripheral + controllers in MA35D1 SoC. + +properties: + compatible: + items: + - const: nuvoton,ma35d1-reset + + reg: + maxItems: 1 + + '#reset-cells': + const: 1 + +required: + - compatible + - reg + - '#reset-cells' + +additionalProperties: false + +examples: + # system reset controller node: + - | + + system-management@40460000 { + compatible = "nuvoton,ma35d1-reset"; + reg = <0x40460000 0x200>; + #reset-cells = <1>; + }; +... +
include/dt-bindings/reset/nuvoton,ma35d1-reset.h new file +108 -0
108 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH v9 5/10 dt-bindings: arm: Add initial bindings for Nuvoton platform
In reply to Jacky HuangFrom: Jacky Huang <[email protected]>
Modify Nuvoton NPCM and MA35 platform board bindings
- Move 'nuvoton,npcm-gcr.yaml' from 'bindings/arm/npcm' to 'bindings/soc/nuvoton'.
- Rename the 'bindings/arm/npcm' directory to 'bindings/arm/nuvoton'.
- Add bindings for ARMv8-based Nuvoton SoCs and platform boards, and include the initial bindings for ma35d1 series development boards.
Modify MAINTAINERS
- Remove the line for 'bindings/arm/npcm/' under ARM/NUVOTON NPCM, as it has been renamed.
- Add ARM/NUVOTON MA35 for Nuvoton MA35 series SoCs maintainer and files.
---
.../bindings/arm/nuvoton/nuvoton,ma35d1.yaml | 30 +++++++++++++++++++
.../npcm.yaml => nuvoton/nuvoton,npcm.yaml} | 2 +-
.../nuvoton/nuvoton,npcm-gcr.yaml} | 2 +-
MAINTAINERS | 13 +++++++-
4 files changed, 44 insertions(+), 3 deletions(-)
create mode 100644 Documentation/devicetree/bindings/arm/nuvoton/nuvoton,ma35d1.yaml
rename Documentation/devicetree/bindings/arm/{npcm/npcm.yaml => nuvoton/nuvoton,npcm.yaml} (93%)
rename Documentation/devicetree/bindings/{arm/npcm/nuvoton,gcr.yaml => soc/nuvoton/nuvoton,npcm-gcr.yaml} (93%)Documentation/devicetree/bindings/arm/nuvoton/nuvoton,ma35d1.yaml new file +30 -0
@@ -0,0 +1,30 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/arm/nuvoton/nuvoton,ma35d1.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Nuvoton MA35 series SoC based platforms + +maintainers: + - Jacky Huang <[email protected]> + +description: | + Boards with an ARMv8 based Nuvoton MA35 series SoC shall have + the following properties. + +properties: + $nodename: + const: '/' + compatible: + oneOf: + + - description: MA35D1 based boards + items: + - enum: + - nuvoton,ma35d1-iot + - nuvoton,ma35d1-som + - const: nuvoton,ma35d1 + +additionalProperties: true +...
Documentation/devicetree/bindings/arm/nuvoton/nuvoton,npcm.yaml renamed from Documentation/devicetree/bindings/arm/npcm/npcm.yaml +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause %YAML 1.2 --- -$id: http://devicetree.org/schemas/arm/npcm/npcm.yaml# +$id: http://devicetree.org/schemas/arm/nuvoton/nuvoton,npcm.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: NPCM Platforms
Documentation/devicetree/bindings/soc/nuvoton/nuvoton,npcm-gcr.yaml renamed from Documentation/devicetree/bindings/arm/npcm/nuvoton,gcr.yaml +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause %YAML 1.2 --- -$id: http://devicetree.org/schemas/arm/npcm/nuvoton,gcr.yaml# +$id: http://devicetree.org/schemas/soc/nuvoton/nuvoton,npcm-gcr.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Global Control Registers block in Nuvoton SoCs
MAINTAINERS +12 -1
@@ -2509,6 +2509,18 @@ F: drivers/rtc/rtc-ab8500.c F: drivers/rtc/rtc-pl031.c F: drivers/soc/ux500/ +ARM/NUVOTON MA35 ARCHITECTURE +M: Jacky Huang <[email protected]> +M: Shan-Chun Hung <[email protected]> +L: [email protected] (moderated for non-subscribers) +S: Supported +F: Documentation/devicetree/bindings/*/*/*ma35* +F: Documentation/devicetree/bindings/*/*ma35* +F: arch/arm64/boot/dts/nuvoton/*ma35* +F: drivers/*/*/*ma35* +F: drivers/*/*ma35* +K: ma35d1 + ARM/NUVOTON NPCM ARCHITECTURE M: Avi Fishman <[email protected]> M: Tomer Maimon <[email protected]>
@@ -2520,7 +2532,6 @@ L: [email protected] (moderated for non-subscribers) S: Supported F: Documentation/devicetree/bindings/*/*/*npcm* F: Documentation/devicetree/bindings/*/*npcm* -F: Documentation/devicetree/bindings/arm/npcm/* F: Documentation/devicetree/bindings/rtc/nuvoton,nct3018y.yaml F: arch/arm/boot/dts/nuvoton-npcm* F: arch/arm/mach-npcm/
Signature · 1 line
2.34.1
Re: [PATCH v9 05/10] dt-bindings: arm: Add initial bindings for Nuvoton platform
Quoted 9 lines · Jacky Huang
From: Jacky Huang <[email protected]>
Modify Nuvoton NPCM and MA35 platform board bindings
- Move 'nuvoton,npcm-gcr.yaml' from 'bindings/arm/npcm' to 'bindings/soc/nuvoton'.
- Rename the 'bindings/arm/npcm' directory to 'bindings/arm/nuvoton'.
- Add bindings for ARMv8-based Nuvoton SoCs and platform boards, and include the initial bindings for ma35d1 series development boards.
Quoted 8 lines
Modify
MAINTAINERS
- Remove the line for 'bindings/arm/npcm/' under ARM/NUVOTON NPCM, as it has been renamed.
- Add ARM/NUVOTON MA35 for Nuvoton MA35 series SoCs maintainer and files.Signed-off-by Jacky Huang <[email protected]>Reviewed-by Rob Herring <[email protected]>---
Best regards,
Krzysztof
PATCH v9 6/10 dt-bindings: serial: Document ma35d1 uart controller
In reply to Jacky HuangFrom: Jacky Huang <[email protected]>
Add documentation that describes the nuvoton ma35d1 UART driver bindings.
--- .../serial/nuvoton,ma35d1-serial.yaml | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 Documentation/devicetree/bindings/serial/nuvoton,ma35d1-serial.yaml
Documentation/devicetree/bindings/serial/nuvoton,ma35d1-serial.yaml new file +48 -0
@@ -0,0 +1,48 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/serial/nuvoton,ma35d1-serial.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Nuvoton MA35D1 Universal Asynchronous Receiver/Transmitter (UART) + +maintainers: + - Min-Jen Chen <[email protected]> + - Jacky Huang <[email protected]> + +allOf: + - $ref: serial.yaml + +properties: + compatible: + const: nuvoton,ma35d1-uart + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + - clocks + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/clock/nuvoton,ma35d1-clk.h> + + serial@40700000 { + compatible = "nuvoton,ma35d1-uart"; + reg = <0x40700000 0x100>; + interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk UART0_GATE>; + }; +...
Signature · 1 line
2.34.1
PATCH v9 7/10 arm64: dts: nuvoton: Add initial ma35d1 device tree
In reply to Jacky HuangFrom: Jacky Huang <[email protected]>
Add initial device tree support for Nuvoton ma35d1 SoC, including cpu, clock, reset, and serial controllers.
Add reference boards som-256m and iot-512m.
--- arch/arm64/boot/dts/nuvoton/Makefile | 2 + .../boot/dts/nuvoton/ma35d1-iot-512m.dts | 56 +++++ .../boot/dts/nuvoton/ma35d1-som-256m.dts | 56 +++++ arch/arm64/boot/dts/nuvoton/ma35d1.dtsi | 232 ++++++++++++++++++ 4 files changed, 346 insertions(+) create mode 100644 arch/arm64/boot/dts/nuvoton/ma35d1-iot-512m.dts create mode 100644 arch/arm64/boot/dts/nuvoton/ma35d1-som-256m.dts create mode 100644 arch/arm64/boot/dts/nuvoton/ma35d1.dtsi
arch/arm64/boot/dts/nuvoton/Makefile +2 -0
@@ -1,2 +1,4 @@ # SPDX-License-Identifier: GPL-2.0 dtb-$(CONFIG_ARCH_NPCM) += nuvoton-npcm845-evb.dtb +dtb-$(CONFIG_ARCH_NUVOTON) += ma35d1-iot-512m.dtb +dtb-$(CONFIG_ARCH_NUVOTON) += ma35d1-som-256m.dtb
arch/arm64/boot/dts/nuvoton/ma35d1-iot-512m.dts new file +56 -0
56 lines not on this page · raw message
arch/arm64/boot/dts/nuvoton/ma35d1-som-256m.dts new file +56 -0
56 lines not on this page · raw message
arch/arm64/boot/dts/nuvoton/ma35d1.dtsi new file +232 -0
232 lines not on this page · raw message
Signature · 7 lines
2.34.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH v9 07/10] arm64: dts: nuvoton: Add initial ma35d1 device tree
Quoted 7 lines · Jacky Huang
From: Jacky Huang <[email protected]>
Add initial device tree support for Nuvoton ma35d1 SoC, including cpu, clock, reset, and serial controllers.
Add reference boards som-256m and iot-512m.Signed-off-by Jacky Huang <[email protected]>
Quoted 10 lines
--- arch/arm64/boot/dts/nuvoton/Makefile | 2 + .../boot/dts/nuvoton/ma35d1-iot-512m.dts | 56 +++++ .../boot/dts/nuvoton/ma35d1-som-256m.dts | 56 +++++ arch/arm64/boot/dts/nuvoton/ma35d1.dtsi | 232 ++++++++++++++++++ 4 files changed, 346 insertions(+) create mode 100644 arch/arm64/boot/dts/nuvoton/ma35d1-iot-512m.dts create mode 100644 arch/arm64/boot/dts/nuvoton/ma35d1-som-256m.dts create mode 100644 arch/arm64/boot/dts/nuvoton/ma35d1.dtsi
Best regards,
Krzysztof
PATCH v9 8/10 clk: nuvoton: Add clock driver for ma35d1 clock controller
In reply to Jacky HuangFrom: Jacky Huang <[email protected]>
The clock controller generates clocks for the whole chip, including system clocks and all peripheral clocks. This driver support ma35d1 clock gating, divider, and individual PLL configuration.
There are 6 PLLs in ma35d1 SoC:
- CA-PLL for the two Cortex-A35 CPU clock
- SYS-PLL for system bus, which comes from the companion MCU and cannot be programmed by clock controller.
- DDR-PLL for DDR
- EPLL for GMAC and GFX, Display, and VDEC IPs.
- VPLL for video output pixel clock
- APLL for SDHC, I2S audio, and other IPs.
CA-PLL has only one operation mode.
DDR-PLL, EPLL, VPLL, and APLL are advanced PLLs which have 3 operation modes: integer mode, fraction mode, and spread specturm mode.
--- drivers/clk/Makefile | 1 + drivers/clk/nuvoton/Kconfig | 19 + drivers/clk/nuvoton/Makefile | 4 + drivers/clk/nuvoton/clk-ma35d1-divider.c | 140 ++++ drivers/clk/nuvoton/clk-ma35d1-pll.c | 365 +++++++++ drivers/clk/nuvoton/clk-ma35d1.c | 948 +++++++++++++++++++++++ 6 files changed, 1477 insertions(+) create mode 100644 drivers/clk/nuvoton/Kconfig create mode 100644 drivers/clk/nuvoton/Makefile create mode 100644 drivers/clk/nuvoton/clk-ma35d1-divider.c create mode 100644 drivers/clk/nuvoton/clk-ma35d1-pll.c create mode 100644 drivers/clk/nuvoton/clk-ma35d1.c
drivers/clk/Makefile +1 -0
@@ -106,6 +106,7 @@ endif obj-y += mstar/ obj-y += mvebu/ obj-$(CONFIG_ARCH_MXS) += mxs/ +obj-$(CONFIG_ARCH_NUVOTON) += nuvoton/ obj-$(CONFIG_COMMON_CLK_NXP) += nxp/ obj-$(CONFIG_COMMON_CLK_PISTACHIO) += pistachio/ obj-$(CONFIG_COMMON_CLK_PXA) += pxa/
drivers/clk/nuvoton/Kconfig new file +19 -0
@@ -0,0 +1,19 @@ +# SPDX-License-Identifier: GPL-2.0 +# common clock support for Nuvoton SoC family. + +config COMMON_CLK_NUVOTON + bool "Nuvoton clock controller common support" + depends on ARCH_NUVOTON || COMPILE_TEST + default y + help + Say y here to enable common clock controller for Nuvoton platforms. + +if COMMON_CLK_NUVOTON + +config CLK_MA35D1 + bool "Nuvoton MA35D1 clock controller support" + default y + help + Build the clock controller driver for MA35D1 SoC. + +endif
drivers/clk/nuvoton/Makefile new file +4 -0
@@ -0,0 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0-only +obj-$(CONFIG_ARCH_NUVOTON) += clk-ma35d1.o +obj-$(CONFIG_ARCH_NUVOTON) += clk-ma35d1-divider.o +obj-$(CONFIG_ARCH_NUVOTON) += clk-ma35d1-pll.o
drivers/clk/nuvoton/clk-ma35d1-divider.c new file +140 -0
140 lines not on this page · raw message
drivers/clk/nuvoton/clk-ma35d1-pll.c new file +365 -0
365 lines not on this page · raw message
drivers/clk/nuvoton/clk-ma35d1.c new file +948 -0
948 lines not on this page · raw message
Signature · 7 lines
2.34.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH v9 08/10] clk: nuvoton: Add clock driver for ma35d1 clock controller
Quoted 18 lines · Jacky Huang
From: Jacky Huang <[email protected]>
The clock controller generates clocks for the whole chip, including system clocks and all peripheral clocks. This driver support ma35d1 clock gating, divider, and individual PLL configuration.
There are 6 PLLs in ma35d1 SoC:
- CA-PLL for the two Cortex-A35 CPU clock
- SYS-PLL for system bus, which comes from the companion MCU and cannot be programmed by clock controller.
- DDR-PLL for DDR
- EPLL for GMAC and GFX, Display, and VDEC IPs.
- VPLL for video output pixel clock
- APLL for SDHC, I2S audio, and other IPs.
CA-PLL has only one operation mode.
DDR-PLL, EPLL, VPLL, and APLL are advanced PLLs which have 3 operation modes: integer mode, fraction mode, and spread specturm mode.
Quoted 8 lines
Signed-off-by Jacky Huang <[email protected]>--- drivers/clk/Makefile | 1 + drivers/clk/nuvoton/Kconfig | 19 + drivers/clk/nuvoton/Makefile | 4 + drivers/clk/nuvoton/clk-ma35d1-divider.c | 140 ++++ drivers/clk/nuvoton/clk-ma35d1-pll.c | 365 +++++++++ drivers/clk/nuvoton/clk-ma35d1.c | 948 +++++++++++++++++++++++
Best regards,
Krzysztof
PATCH v9 9/10 reset: Add Nuvoton ma35d1 reset driver support
In reply to Jacky HuangFrom: Jacky Huang <[email protected]>
This driver supports individual IP reset for ma35d1. The reset control registers is a subset of system control registers.
--- drivers/reset/Kconfig | 6 + drivers/reset/Makefile | 1 + drivers/reset/reset-ma35d1.c | 234 +++++++++++++++++++++++++++++++++++ 3 files changed, 241 insertions(+) create mode 100644 drivers/reset/reset-ma35d1.c
drivers/reset/Kconfig +6 -0
@@ -143,6 +143,12 @@ config RESET_NPCM This enables the reset controller driver for Nuvoton NPCM BMC SoCs. +config RESET_NUVOTON_MA35D1 + bool "Nuvton MA35D1 Reset Driver" + default ARCH_NUVOTON || COMPILE_TEST + help + This enables the reset controller driver for Nuvoton MA35D1 SoC. + config RESET_OXNAS bool
drivers/reset/Makefile +1 -0
@@ -21,6 +21,7 @@ obj-$(CONFIG_RESET_MCHP_SPARX5) += reset-microchip-sparx5.o obj-$(CONFIG_RESET_MESON) += reset-meson.o obj-$(CONFIG_RESET_MESON_AUDIO_ARB) += reset-meson-audio-arb.o obj-$(CONFIG_RESET_NPCM) += reset-npcm.o +obj-$(CONFIG_RESET_NUVOTON_MA35D1) += reset-ma35d1.o obj-$(CONFIG_RESET_OXNAS) += reset-oxnas.o obj-$(CONFIG_RESET_PISTACHIO) += reset-pistachio.o obj-$(CONFIG_RESET_POLARFIRE_SOC) += reset-mpfs.o
drivers/reset/reset-ma35d1.c new file +234 -0
234 lines not on this page · raw message
Signature · 7 lines
2.34.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH v9 10/10 tty: serial: Add Nuvoton ma35d1 serial driver support
In reply to Jacky HuangFrom: Jacky Huang <[email protected]>
This adds UART and console driver for Nuvoton ma35d1 Soc. It supports full-duplex communication, FIFO control, and hardware flow control.
--- drivers/tty/serial/Kconfig | 18 + drivers/tty/serial/Makefile | 1 + drivers/tty/serial/ma35d1_serial.c | 796 +++++++++++++++++++++++++++++ 3 files changed, 815 insertions(+) create mode 100644 drivers/tty/serial/ma35d1_serial.c
drivers/tty/serial/Kconfig +18 -0
@@ -1555,6 +1555,24 @@ config SERIAL_SUNPLUS_CONSOLE you can alter that using a kernel command line option such as "console=ttySUPx". +config SERIAL_NUVOTON_MA35D1 + tristate "Nuvoton MA35D1 family UART support" + depends on ARCH_NUVOTON || COMPILE_TEST + select SERIAL_CORE + help + This driver supports Nuvoton MA35D1 family UART ports. If you would + like to use them, you must answer Y or M to this option. Note that + for use as console, it must be included in kernel and not as a + module + +config SERIAL_NUVOTON_MA35D1_CONSOLE + bool "Console on a Nuvotn MA35D1 family UART port" + depends on SERIAL_NUVOTON_MA35D1=y + select SERIAL_CORE_CONSOLE + help + Select this options if you'd like to use the UART port0 of the + Nuvoton MA35D1 family as a console. + endmenu config SERIAL_MCTRL_GPIO
drivers/tty/serial/Makefile +1 -0
@@ -93,3 +93,4 @@ obj-$(CONFIG_SERIAL_MCTRL_GPIO) += serial_mctrl_gpio.o obj-$(CONFIG_SERIAL_KGDB_NMI) += kgdb_nmi.o obj-$(CONFIG_KGDB_SERIAL_CONSOLE) += kgdboc.o +obj-$(CONFIG_SERIAL_NUVOTON_MA35D1) += ma35d1_serial.o
drivers/tty/serial/ma35d1_serial.c new file +796 -0
796 lines not on this page · raw message
Signature · 7 lines
2.34.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel