ARM: New SoC support for 6.5
There are two new SoC families this time, and both appear fairly similar: The Nuvoton MA35D1 and the STMicroelectronics STM32MP2 are both dual-core Cortex-A35 based chips for the low-power industrial embedded market, and they mark the first 64-bit product in a widely used family of 32-bit Arm MCUs and SoCs. The way into the kernel is completely different here: The team at ST has a long history of working upstream with their STM32MP1 and other SoCs, and they produced a complete port to arm64 together with the initial announcement. Nuvoton also has multiple SoC product lines with current or previous upstream support, but those are maintained by third parties and are unrelated. The patch series from Nuvoton's Jacky Huang had to go through many revisisions to get to this point and is still missing a few drivers including the serial port for the moment. The branch contains the devicetree files as well as all the code changes, in order to have something that can be tested standalone. -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmScqtkACgkQYKtH/8kJ Uifqyg//XgvZBxb/2GILYcThVgLoo1fYA9tG5M0LERY/aPiUwrCwIl5swGQXK4vK E3UBLsQURer4yEBRq7iB6RGbwa4Opjdy3yTkj6WSgEMPh6e6jGvmm+dJ7HuWeviS 8oeyo3Xar6tIF+A8xlBloHA4J6690FYB40McQzh8sWG5SE+id56S71NGnNW0kQTn wsul9BZcGVoyMYNBi/uXtOVUPy7jF3UBC3HJF9UOT7q77bCLjVc/aHmmnZ3zmbYA 2oX3X5hVJakFba6vnz+rjNlzuAoGXJPDdsKFxBysdsksac/TxqRIQGNe75DZZVgz ESTpt1QqjmCFw32HEzi8Ne22FOpzlBqUxBMznHPenpz1/om2ezs3q7ffuPqKvMaq PANuK++JKJaBChVMzJbn84Sr1fvO4ecGJpKZTFC6t6SqHQNQFJT6rfMHx01Xw2wW LjKfEBCR6zEXN0+FaaujgJ4y/9pH1VHPynrZJG9WEwPUEZb2kJ/2RMXjNpzOWKiB pWYV1oW2TqFKYKhFm/pjkbi6Rq76UwEi8fWWoGMkmeV3KZ/0GFauQhItu6mX3s7W uGnUQyrBzWzUoashYFuNtXKHYdwuWgOmG660BXHkyxwvqV96ICGEJ+97zGIBDj81 F8zLxEjPbsEZqGGSosAyk9oYC6eh7eK2V7xx+CUYLTuKZw13zNo= =zaVi -----END PGP SIGNATURE----- Merge tag 'soc-newsoc-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull new ARM SoC support from Arnd Bergmann: "There are two new SoC families this time, and both appear fairly similar: The Nuvoton MA35D1 and the STMicroelectronics STM32MP2 are both dual-core Cortex-A35 based chips for the low-power industrial embedded market, and they mark the first 64-bit product in a widely used family of 32-bit Arm MCUs and SoCs. The way into the kernel is completely different here: The team at ST has a long history of working upstream with their STM32MP1 and other SoCs, and they produced a complete port to arm64 together with the initial announcement. Nuvoton also has multiple SoC product lines with current or previous upstream support, but those are maintained by third parties and are unrelated. The patch series from Nuvoton's Jacky Huang had to go through many revisisions to get to this point and is still missing a few drivers including the serial port for the moment. The branch contains the devicetree files as well as all the code changes, in order to have something that can be tested standalone" * tag 'soc-newsoc-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (25 commits) clk: nuvoton: Use clk_parent_data instead of string for parent clock clk: nuvoton: Update all constant hex values to lowercase clk: nuvoton: Add clk-ma35d1.h for driver extern functions remoteproc: stm32: use correct format strings on 64-bit MAINTAINERS: add entry for ARM/STM32 ARCHITECTURE arm64: defconfig: enable ARCH_STM32 and STM32 serial driver arm64: dts: st: add stm32mp257f-ev1 board support dt-bindings: stm32: document stm32mp257f-ev1 board arm64: dts: st: introduce stm32mp25 pinctrl files arm64: dts: st: introduce stm32mp25 SoCs family arm64: introduce STM32 family on Armv8 architecture dt-bindings: stm32: add st,stm32mp25-syscfg compatible for syscon pinctrl: stm32: add stm32mp257 pinctrl support dt-bindings: pinctrl: stm32: support for stm32mp257 and additional packages Documentation/process: add soc maintainer handbook reset: RESET_NUVOTON_MA35D1 should depend on ARCH_MA35 reset: Add Nuvoton ma35d1 reset driver support clk: nuvoton: Add clock driver for ma35d1 clock controller arm64: dts: nuvoton: Add initial ma35d1 device tree dt-bindings: serial: Document ma35d1 uart controller ...
This commit is contained in:
commit
a9025a5f16
@ -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 <ychuang3@nuvoton.com>
|
||||
|
||||
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
|
||||
...
|
@ -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
|
@ -15,12 +15,13 @@ properties:
|
||||
oneOf:
|
||||
- items:
|
||||
- enum:
|
||||
- st,stm32mp157-syscfg
|
||||
- st,stm32mp151-pwr-mcu
|
||||
- st,stm32-syscfg
|
||||
- st,stm32-power-config
|
||||
- st,stm32-syscfg
|
||||
- st,stm32-tamp
|
||||
- st,stm32f4-gcan
|
||||
- st,stm32mp151-pwr-mcu
|
||||
- st,stm32mp157-syscfg
|
||||
- st,stm32mp25-syscfg
|
||||
- const: syscon
|
||||
- items:
|
||||
- const: st,stm32-tamp
|
||||
|
@ -161,6 +161,12 @@ properties:
|
||||
- const: phytec,phycore-stm32mp157c-som
|
||||
- const: st,stm32mp157
|
||||
|
||||
- description: ST STM32MP257 based Boards
|
||||
items:
|
||||
- enum:
|
||||
- st,stm32mp257f-ev1
|
||||
- const: st,stm32mp257
|
||||
|
||||
additionalProperties: true
|
||||
|
||||
...
|
||||
|
@ -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 <cfli0@nuvoton.com>
|
||||
- Jacky Huang <ychuang3@nuvoton.com>
|
||||
|
||||
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>;
|
||||
};
|
||||
...
|
@ -27,6 +27,8 @@ properties:
|
||||
- st,stm32mp135-pinctrl
|
||||
- st,stm32mp157-pinctrl
|
||||
- st,stm32mp157-z-pinctrl
|
||||
- st,stm32mp257-pinctrl
|
||||
- st,stm32mp257-z-pinctrl
|
||||
|
||||
'#address-cells':
|
||||
const: 1
|
||||
@ -56,7 +58,7 @@ properties:
|
||||
Indicates the SOC package used.
|
||||
More details in include/dt-bindings/pinctrl/stm32-pinfunc.h
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
enum: [1, 2, 4, 8]
|
||||
enum: [0x1, 0x2, 0x4, 0x8, 0x100, 0x400, 0x800]
|
||||
|
||||
patternProperties:
|
||||
'^gpio@[0-9a-f]*$':
|
||||
|
@ -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 <cfli0@nuvoton.com>
|
||||
- Jacky Huang <ychuang3@nuvoton.com>
|
||||
|
||||
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>;
|
||||
};
|
||||
...
|
||||
|
@ -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 <mjchen@nuvoton.com>
|
||||
- Jacky Huang <ychuang3@nuvoton.com>
|
||||
|
||||
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>;
|
||||
};
|
||||
...
|
@ -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
|
@ -15,5 +15,6 @@ Contents:
|
||||
:numbered:
|
||||
:maxdepth: 2
|
||||
|
||||
maintainer-tip
|
||||
maintainer-netdev
|
||||
maintainer-soc
|
||||
maintainer-tip
|
||||
|
177
Documentation/process/maintainer-soc.rst
Normal file
177
Documentation/process/maintainer-soc.rst
Normal file
@ -0,0 +1,177 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
=============
|
||||
SoC Subsystem
|
||||
=============
|
||||
|
||||
Overview
|
||||
--------
|
||||
|
||||
The SoC subsystem is a place of aggregation for SoC-specific code.
|
||||
The main components of the subsystem are:
|
||||
|
||||
* devicetrees for 32- & 64-bit ARM and RISC-V
|
||||
* 32-bit ARM board files (arch/arm/mach*)
|
||||
* 32- & 64-bit ARM defconfigs
|
||||
* SoC-specific drivers across architectures, in particular for 32- & 64-bit
|
||||
ARM, RISC-V and Loongarch
|
||||
|
||||
These "SoC-specific drivers" do not include clock, GPIO etc drivers that have
|
||||
other top-level maintainers. The drivers/soc/ directory is generally meant
|
||||
for kernel-internal drivers that are used by other drivers to provide SoC-
|
||||
specific functionality like identifying an SoC revision or interfacing with
|
||||
power domains.
|
||||
|
||||
The SoC subsystem also serves as an intermediate location for changes to
|
||||
drivers/bus, drivers/firmware, drivers/reset and drivers/memory. The addition
|
||||
of new platforms, or the removal of existing ones, often go through the SoC
|
||||
tree as a dedicated branch covering multiple subsystems.
|
||||
|
||||
The main SoC tree is housed on git.kernel.org:
|
||||
https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git/
|
||||
|
||||
Clearly this is quite a wide range of topics, which no one person, or even
|
||||
small group of people are capable of maintaining. Instead, the SoC subsystem
|
||||
is comprised of many submaintainers, each taking care of individual platforms
|
||||
and driver subdirectories.
|
||||
In this regard, "platform" usually refers to a series of SoCs from a given
|
||||
vendor, for example, Nvidia's series of Tegra SoCs. Many submaintainers operate
|
||||
on a vendor level, responsible for multiple product lines. For several reasons,
|
||||
including acquisitions/different business units in a company, things vary
|
||||
significantly here. The various submaintainers are documented in the
|
||||
MAINTAINERS file.
|
||||
|
||||
Most of these submaintainers have their own trees where they stage patches,
|
||||
sending pull requests to the main SoC tree. These trees are usually, but not
|
||||
always, listed in MAINTAINERS. The main SoC maintainers can be reached via the
|
||||
alias soc@kernel.org if there is no platform-specific maintainer, or if they
|
||||
are unresponsive.
|
||||
|
||||
What the SoC tree is not, however, is a location for architecture-specific code
|
||||
changes. Each architecture has its own maintainers that are responsible for
|
||||
architectural details, CPU errata and the like.
|
||||
|
||||
Information for (new) Submaintainers
|
||||
------------------------------------
|
||||
|
||||
As new platforms spring up, they often bring with them new submaintainers,
|
||||
many of whom work for the silicon vendor, and may not be familiar with the
|
||||
process.
|
||||
|
||||
Devicetree ABI Stability
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Perhaps one of the most important things to highlight is that dt-bindings
|
||||
document the ABI between the devicetree and the kernel.
|
||||
Please read Documentation/devicetree/bindings/ABI.rst.
|
||||
|
||||
If changes are being made to a devicetree that are incompatible with old
|
||||
kernels, the devicetree patch should not be applied until the driver is, or an
|
||||
appropriate time later. Most importantly, any incompatible changes should be
|
||||
clearly pointed out in the patch description and pull request, along with the
|
||||
expected impact on existing users, such as bootloaders or other operating
|
||||
systems.
|
||||
|
||||
Driver Branch Dependencies
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
A common problem is synchronizing changes between device drivers and devicetree
|
||||
files. Even if a change is compatible in both directions, this may require
|
||||
coordinating how the changes get merged through different maintainer trees.
|
||||
|
||||
Usually the branch that includes a driver change will also include the
|
||||
corresponding change to the devicetree binding description, to ensure they are
|
||||
in fact compatible. This means that the devicetree branch can end up causing
|
||||
warnings in the "make dtbs_check" step. If a devicetree change depends on
|
||||
missing additions to a header file in include/dt-bindings/, it will fail the
|
||||
"make dtbs" step and not get merged.
|
||||
|
||||
There are multiple ways to deal with this:
|
||||
|
||||
* Avoid defining custom macros in include/dt-bindings/ for hardware constants
|
||||
that can be derived from a datasheet -- binding macros in header files should
|
||||
only be used as a last resort if there is no natural way to define a binding
|
||||
|
||||
* Use literal values in the devicetree file in place of macros even when a
|
||||
header is required, and change them to the named representation in a
|
||||
following release
|
||||
|
||||
* Defer the devicetree changes to a release after the binding and driver have
|
||||
already been merged
|
||||
|
||||
* Change the bindings in a shared immutable branch that is used as the base for
|
||||
both the driver change and the devicetree changes
|
||||
|
||||
* Add duplicate defines in the devicetree file guarded by an #ifndef section,
|
||||
removing them in a later release
|
||||
|
||||
Devicetree Naming Convention
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The general naming scheme for devicetree files is as follows. The aspects of a
|
||||
platform that are set at the SoC level, like CPU cores, are contained in a file
|
||||
named $soc.dtsi, for example, jh7100.dtsi. Integration details, that will vary
|
||||
from board to board, are described in $soc-$board.dts. An example of this is
|
||||
jh7100-beaglev-starlight.dts. Often many boards are variations on a theme, and
|
||||
frequently there are intermediate files, such as jh7100-common.dtsi, which sit
|
||||
between the $soc.dtsi and $soc-$board.dts files, containing the descriptions of
|
||||
common hardware.
|
||||
|
||||
Some platforms also have System on Modules, containing an SoC, which are then
|
||||
integrated into several different boards. For these platforms, $soc-$som.dtsi
|
||||
and $soc-$som-$board.dts are typical.
|
||||
|
||||
Directories are usually named after the vendor of the SoC at the time of its
|
||||
inclusion, leading to some historical directory names in the tree.
|
||||
|
||||
Validating Devicetree Files
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
``make dtbs_check`` can be used to validate that devicetree files are compliant
|
||||
with the dt-bindings that describe the ABI. Please read the section
|
||||
"Running checks" of Documentation/devicetree/bindings/writing-schema.rst for
|
||||
more information on the validation of devicetrees.
|
||||
|
||||
For new platforms, or additions to existing ones, ``make dtbs_check`` should not
|
||||
add any new warnings. For RISC-V, as it has the advantage of being a newer
|
||||
architecture, ``make dtbs_check W=1`` is required to not add any new warnings.
|
||||
If in any doubt about a devicetree change, reach out to the devicetree
|
||||
maintainers.
|
||||
|
||||
Branches and Pull Requests
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Just as the main SoC tree has several branches, it is expected that
|
||||
submaintainers will do the same. Driver, defconfig and devicetree changes should
|
||||
all be split into separate branches and appear in separate pull requests to the
|
||||
SoC maintainers. Each branch should be usable by itself and avoid
|
||||
regressions that originate from dependencies on other branches.
|
||||
|
||||
Small sets of patches can also be sent as separate emails to soc@kernel.org,
|
||||
grouped into the same categories.
|
||||
|
||||
If changes do not fit into the normal patterns, there can be additional
|
||||
top-level branches, e.g. for a treewide rework, or the addition of new SoC
|
||||
platforms including dts files and drivers.
|
||||
|
||||
Branches with a lot of changes can benefit from getting split up into separate
|
||||
topics branches, even if they end up getting merged into the same branch of the
|
||||
SoC tree. An example here would be one branch for devicetree warning fixes, one
|
||||
for a rework and one for newly added boards.
|
||||
|
||||
Another common way to split up changes is to send an early pull request with the
|
||||
majority of the changes at some point between rc1 and rc4, following up with one
|
||||
or more smaller pull requests towards the end of the cycle that can add late
|
||||
changes or address problems identified while testing the first set.
|
||||
|
||||
While there is no cut-off time for late pull requests, it helps to only send
|
||||
small branches as time gets closer to the merge window.
|
||||
|
||||
Pull requests for bugfixes for the current release can be sent at any time, but
|
||||
again having multiple smaller branches is better than trying to combine too many
|
||||
patches into one pull request.
|
||||
|
||||
The subject line of a pull request should begin with "[GIT PULL]" and made using
|
||||
a signed tag, rather than a branch. This tag should contain a short description
|
||||
summarising the changes in the pull request. For more detail on sending pull
|
||||
requests, please see Documentation/maintainer/pull-requests.rst.
|
15
MAINTAINERS
15
MAINTAINERS
@ -1627,6 +1627,7 @@ L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||
S: Maintained
|
||||
C: irc://irc.libera.chat/armlinux
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git
|
||||
F: Documentation/process/maintainer-soc.rst
|
||||
F: arch/arm/boot/dts/Makefile
|
||||
F: arch/arm64/boot/dts/Makefile
|
||||
|
||||
@ -2493,6 +2494,18 @@ F: drivers/rtc/rtc-ab8500.c
|
||||
F: drivers/rtc/rtc-pl031.c
|
||||
F: drivers/soc/ux500/
|
||||
|
||||
ARM/NUVOTON MA35 ARCHITECTURE
|
||||
M: Jacky Huang <ychuang3@nuvoton.com>
|
||||
M: Shan-Chun Hung <schung@nuvoton.com>
|
||||
L: linux-arm-kernel@lists.infradead.org (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 <avifishman70@gmail.com>
|
||||
M: Tomer Maimon <tmaimon77@gmail.com>
|
||||
@ -2504,7 +2517,6 @@ L: openbmc@lists.ozlabs.org (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/nuvoton-npcm*
|
||||
F: arch/arm/mach-npcm/
|
||||
@ -2823,6 +2835,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32.git stm32-nex
|
||||
F: arch/arm/boot/dts/st/stm32*
|
||||
F: arch/arm/mach-stm32/
|
||||
F: drivers/clocksource/armv7m_systick.c
|
||||
F: arch/arm64/boot/dts/st/
|
||||
N: stm32
|
||||
N: stm
|
||||
|
||||
|
@ -225,6 +225,14 @@ config ARCH_S32
|
||||
|
||||
endif
|
||||
|
||||
config ARCH_MA35
|
||||
bool "Nuvoton MA35 Architecture"
|
||||
select GPIOLIB
|
||||
select PINCTRL
|
||||
select RESET_CONTROLLER
|
||||
help
|
||||
This enables support for the ARMv8 based Nuvoton MA35 series SoCs.
|
||||
|
||||
config ARCH_NPCM
|
||||
bool "Nuvoton NPCM Architecture"
|
||||
select PINCTRL
|
||||
@ -277,6 +285,20 @@ config ARCH_INTEL_SOCFPGA
|
||||
Stratix 10 (ex. Altera), Stratix10 Software Virtual Platform,
|
||||
Agilex and eASIC N5X.
|
||||
|
||||
config ARCH_STM32
|
||||
bool "STMicroelectronics STM32 SoC Family"
|
||||
select GPIOLIB
|
||||
select PINCTRL
|
||||
select PINCTRL_STM32MP257
|
||||
select ARM_SMC_MBOX
|
||||
select ARM_SCMI_PROTOCOL
|
||||
select COMMON_CLK_SCMI
|
||||
help
|
||||
This enables support for ARMv8 based STMicroelectronics
|
||||
STM32 family, including:
|
||||
- STM32MP25:
|
||||
- STM32MP251, STM32MP253, STM32MP255 and STM32MP257.
|
||||
|
||||
config ARCH_SYNQUACER
|
||||
bool "Socionext SynQuacer SoC Family"
|
||||
select IRQ_FASTEOI_HIERARCHY_HANDLERS
|
||||
|
@ -27,6 +27,7 @@ subdir-y += renesas
|
||||
subdir-y += rockchip
|
||||
subdir-y += socionext
|
||||
subdir-y += sprd
|
||||
subdir-y += st
|
||||
subdir-y += synaptics
|
||||
subdir-y += tesla
|
||||
subdir-y += ti
|
||||
|
@ -1,2 +1,4 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
dtb-$(CONFIG_ARCH_MA35) += ma35d1-iot-512m.dtb
|
||||
dtb-$(CONFIG_ARCH_MA35) += ma35d1-som-256m.dtb
|
||||
dtb-$(CONFIG_ARCH_NPCM) += nuvoton-npcm845-evb.dtb
|
||||
|
56
arch/arm64/boot/dts/nuvoton/ma35d1-iot-512m.dts
Normal file
56
arch/arm64/boot/dts/nuvoton/ma35d1-iot-512m.dts
Normal file
@ -0,0 +1,56 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* Copyright (C) 2023 Nuvoton Technology Corp.
|
||||
* Author: Shan-Chun Hung <schung@nuvoton.com>
|
||||
* Jacky huang <ychuang3@nuvoton.com>
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include "ma35d1.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Nuvoton MA35D1-IoT";
|
||||
compatible = "nuvoton,ma35d1-iot", "nuvoton,ma35d1";
|
||||
|
||||
aliases {
|
||||
serial0 = &uart0;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
mem: memory@80000000 {
|
||||
device_type = "memory";
|
||||
reg = <0x00000000 0x80000000 0 0x20000000>; /* 512M DRAM */
|
||||
};
|
||||
|
||||
clk_hxt: clock-hxt {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <24000000>;
|
||||
clock-output-names = "clk_hxt";
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&clk {
|
||||
assigned-clocks = <&clk CAPLL>,
|
||||
<&clk DDRPLL>,
|
||||
<&clk APLL>,
|
||||
<&clk EPLL>,
|
||||
<&clk VPLL>;
|
||||
assigned-clock-rates = <800000000>,
|
||||
<266000000>,
|
||||
<180000000>,
|
||||
<500000000>,
|
||||
<102000000>;
|
||||
nuvoton,pll-mode = "integer",
|
||||
"fractional",
|
||||
"integer",
|
||||
"integer",
|
||||
"integer";
|
||||
};
|
56
arch/arm64/boot/dts/nuvoton/ma35d1-som-256m.dts
Normal file
56
arch/arm64/boot/dts/nuvoton/ma35d1-som-256m.dts
Normal file
@ -0,0 +1,56 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* Copyright (C) 2023 Nuvoton Technology Corp.
|
||||
* Author: Shan-Chun Hung <schung@nuvoton.com>
|
||||
* Jacky huang <ychuang3@nuvoton.com>
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include "ma35d1.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Nuvoton MA35D1-SOM";
|
||||
compatible = "nuvoton,ma35d1-som", "nuvoton,ma35d1";
|
||||
|
||||
aliases {
|
||||
serial0 = &uart0;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
mem: memory@80000000 {
|
||||
device_type = "memory";
|
||||
reg = <0x00000000 0x80000000 0 0x10000000>; /* 256M DRAM */
|
||||
};
|
||||
|
||||
clk_hxt: clock-hxt {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <24000000>;
|
||||
clock-output-names = "clk_hxt";
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&clk {
|
||||
assigned-clocks = <&clk CAPLL>,
|
||||
<&clk DDRPLL>,
|
||||
<&clk APLL>,
|
||||
<&clk EPLL>,
|
||||
<&clk VPLL>;
|
||||
assigned-clock-rates = <800000000>,
|
||||
<266000000>,
|
||||
<180000000>,
|
||||
<500000000>,
|
||||
<102000000>;
|
||||
nuvoton,pll-mode = "integer",
|
||||
"fractional",
|
||||
"integer",
|
||||
"integer",
|
||||
"integer";
|
||||
};
|
234
arch/arm64/boot/dts/nuvoton/ma35d1.dtsi
Normal file
234
arch/arm64/boot/dts/nuvoton/ma35d1.dtsi
Normal file
@ -0,0 +1,234 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* Copyright (C) 2023 Nuvoton Technology Corp.
|
||||
* Author: Shan-Chun Hung <schung@nuvoton.com>
|
||||
* Jacky huang <ychuang3@nuvoton.com>
|
||||
*/
|
||||
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/clock/nuvoton,ma35d1-clk.h>
|
||||
#include <dt-bindings/reset/nuvoton,ma35d1-reset.h>
|
||||
|
||||
/ {
|
||||
compatible = "nuvoton,ma35d1";
|
||||
interrupt-parent = <&gic>;
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
|
||||
cpus {
|
||||
#address-cells = <2>;
|
||||
#size-cells = <0>;
|
||||
|
||||
cpu0: cpu@0 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a35";
|
||||
reg = <0x0 0x0>;
|
||||
enable-method = "psci";
|
||||
next-level-cache = <&L2_0>;
|
||||
};
|
||||
|
||||
cpu1: cpu@1 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a35";
|
||||
reg = <0x0 0x1>;
|
||||
enable-method = "psci";
|
||||
next-level-cache = <&L2_0>;
|
||||
};
|
||||
|
||||
L2_0: l2-cache {
|
||||
compatible = "cache";
|
||||
cache-level = <2>;
|
||||
cache-unified;
|
||||
cache-size = <0x80000>;
|
||||
};
|
||||
};
|
||||
|
||||
psci {
|
||||
compatible = "arm,psci-0.2";
|
||||
method = "smc";
|
||||
};
|
||||
|
||||
gic: interrupt-controller@50801000 {
|
||||
compatible = "arm,gic-400";
|
||||
reg = <0x0 0x50801000 0 0x1000>, /* GICD */
|
||||
<0x0 0x50802000 0 0x2000>, /* GICC */
|
||||
<0x0 0x50804000 0 0x2000>, /* GICH */
|
||||
<0x0 0x50806000 0 0x2000>; /* GICV */
|
||||
#interrupt-cells = <3>;
|
||||
interrupt-parent = <&gic>;
|
||||
interrupt-controller;
|
||||
interrupts = <GIC_PPI 9 (GIC_CPU_MASK_RAW(0x13) |
|
||||
IRQ_TYPE_LEVEL_HIGH)>;
|
||||
};
|
||||
|
||||
timer {
|
||||
compatible = "arm,armv8-timer";
|
||||
interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) |
|
||||
IRQ_TYPE_LEVEL_LOW)>, /* Physical Secure */
|
||||
<GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) |
|
||||
IRQ_TYPE_LEVEL_LOW)>, /* Physical Non-Secure */
|
||||
<GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) |
|
||||
IRQ_TYPE_LEVEL_LOW)>, /* Virtual */
|
||||
<GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) |
|
||||
IRQ_TYPE_LEVEL_LOW)>; /* Hypervisor */
|
||||
interrupt-parent = <&gic>;
|
||||
};
|
||||
|
||||
soc {
|
||||
compatible = "simple-bus";
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
sys: system-management@40460000 {
|
||||
compatible = "nuvoton,ma35d1-reset";
|
||||
reg = <0x0 0x40460000 0x0 0x200>;
|
||||
#reset-cells = <1>;
|
||||
};
|
||||
|
||||
clk: clock-controller@40460200 {
|
||||
compatible = "nuvoton,ma35d1-clk";
|
||||
reg = <0x00000000 0x40460200 0x0 0x100>;
|
||||
#clock-cells = <1>;
|
||||
clocks = <&clk_hxt>;
|
||||
};
|
||||
|
||||
uart0: serial@40700000 {
|
||||
compatible = "nuvoton,ma35d1-uart";
|
||||
reg = <0x0 0x40700000 0x0 0x100>;
|
||||
interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk UART0_GATE>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
uart1: serial@40710000 {
|
||||
compatible = "nuvoton,ma35d1-uart";
|
||||
reg = <0x0 0x40710000 0x0 0x100>;
|
||||
interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk UART1_GATE>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
uart2: serial@40720000 {
|
||||
compatible = "nuvoton,ma35d1-uart";
|
||||
reg = <0x0 0x40720000 0x0 0x100>;
|
||||
interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk UART2_GATE>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
uart3: serial@40730000 {
|
||||
compatible = "nuvoton,ma35d1-uart";
|
||||
reg = <0x0 0x40730000 0x0 0x100>;
|
||||
interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk UART3_GATE>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
uart4: serial@40740000 {
|
||||
compatible = "nuvoton,ma35d1-uart";
|
||||
reg = <0x0 0x40740000 0x0 0x100>;
|
||||
interrupts = <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk UART4_GATE>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
uart5: serial@40750000 {
|
||||
compatible = "nuvoton,ma35d1-uart";
|
||||
reg = <0x0 0x40750000 0x0 0x100>;
|
||||
interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk UART5_GATE>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
uart6: serial@40760000 {
|
||||
compatible = "nuvoton,ma35d1-uart";
|
||||
reg = <0x0 0x40760000 0x0 0x100>;
|
||||
interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk UART6_GATE>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
uart7: serial@40770000 {
|
||||
compatible = "nuvoton,ma35d1-uart";
|
||||
reg = <0x0 0x40770000 0x0 0x100>;
|
||||
interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk UART7_GATE>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
uart8: serial@40780000 {
|
||||
compatible = "nuvoton,ma35d1-uart";
|
||||
reg = <0x0 0x40780000 0x0 0x100>;
|
||||
interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk UART8_GATE>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
uart9: serial@40790000 {
|
||||
compatible = "nuvoton,ma35d1-uart";
|
||||
reg = <0x0 0x40790000 0x0 0x100>;
|
||||
interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk UART9_GATE>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
uart10: serial@407a0000 {
|
||||
compatible = "nuvoton,ma35d1-uart";
|
||||
reg = <0x0 0x407a0000 0x0 0x100>;
|
||||
interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk UART10_GATE>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
uart11: serial@407b0000 {
|
||||
compatible = "nuvoton,ma35d1-uart";
|
||||
reg = <0x0 0x407b0000 0x0 0x100>;
|
||||
interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk UART11_GATE>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
uart12: serial@407c0000 {
|
||||
compatible = "nuvoton,ma35d1-uart";
|
||||
reg = <0x0 0x407c0000 0x0 0x100>;
|
||||
interrupts = <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk UART12_GATE>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
uart13: serial@407d0000 {
|
||||
compatible = "nuvoton,ma35d1-uart";
|
||||
reg = <0x0 0x407d0000 0x0 0x100>;
|
||||
interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk UART13_GATE>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
uart14: serial@407e0000 {
|
||||
compatible = "nuvoton,ma35d1-uart";
|
||||
reg = <0x0 0x407e0000 0x0 0x100>;
|
||||
interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk UART14_GATE>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
uart15: serial@407f0000 {
|
||||
compatible = "nuvoton,ma35d1-uart";
|
||||
reg = <0x0 0x407f0000 0x0 0x100>;
|
||||
interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk UART15_GATE>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
uart16: serial@40880000 {
|
||||
compatible = "nuvoton,ma35d1-uart";
|
||||
reg = <0x0 0x40880000 0x0 0x100>;
|
||||
interrupts = <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk UART16_GATE>;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
};
|
2
arch/arm64/boot/dts/st/Makefile
Normal file
2
arch/arm64/boot/dts/st/Makefile
Normal file
@ -0,0 +1,2 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
dtb-$(CONFIG_ARCH_STM32) += stm32mp257f-ev1.dtb
|
38
arch/arm64/boot/dts/st/stm32mp25-pinctrl.dtsi
Normal file
38
arch/arm64/boot/dts/st/stm32mp25-pinctrl.dtsi
Normal file
@ -0,0 +1,38 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-3-Clause)
|
||||
/*
|
||||
* Copyright (C) STMicroelectronics 2023 - All Rights Reserved
|
||||
* Author: Alexandre Torgue <alexandre.torgue@foss.st.com> for STMicroelectronics.
|
||||
*/
|
||||
#include <dt-bindings/pinctrl/stm32-pinfunc.h>
|
||||
|
||||
&pinctrl {
|
||||
usart2_pins_a: usart2-0 {
|
||||
pins1 {
|
||||
pinmux = <STM32_PINMUX('A', 4, AF6)>; /* USART2_TX */
|
||||
bias-disable;
|
||||
drive-push-pull;
|
||||
slew-rate = <0>;
|
||||
};
|
||||
pins2 {
|
||||
pinmux = <STM32_PINMUX('A', 8, AF8)>; /* USART2_RX */
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
usart2_idle_pins_a: usart2-idle-0 {
|
||||
pins1 {
|
||||
pinmux = <STM32_PINMUX('A', 4, ANALOG)>; /* USART2_TX */
|
||||
};
|
||||
pins2 {
|
||||
pinmux = <STM32_PINMUX('A', 8, AF8)>; /* USART2_RX */
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
usart2_sleep_pins_a: usart2-sleep-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('A', 4, ANALOG)>, /* USART2_TX */
|
||||
<STM32_PINMUX('A', 8, ANALOG)>; /* USART2_RX */
|
||||
};
|
||||
};
|
||||
};
|
279
arch/arm64/boot/dts/st/stm32mp251.dtsi
Normal file
279
arch/arm64/boot/dts/st/stm32mp251.dtsi
Normal file
@ -0,0 +1,279 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-3-Clause)
|
||||
/*
|
||||
* Copyright (C) STMicroelectronics 2023 - All Rights Reserved
|
||||
* Author: Alexandre Torgue <alexandre.torgue@foss.st.com> for STMicroelectronics.
|
||||
*/
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
|
||||
/ {
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
|
||||
cpus {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
cpu0: cpu@0 {
|
||||
compatible = "arm,cortex-a35";
|
||||
device_type = "cpu";
|
||||
reg = <0>;
|
||||
enable-method = "psci";
|
||||
};
|
||||
};
|
||||
|
||||
arm-pmu {
|
||||
compatible = "arm,cortex-a35-pmu";
|
||||
interrupts = <GIC_SPI 368 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-affinity = <&cpu0>;
|
||||
interrupt-parent = <&intc>;
|
||||
};
|
||||
|
||||
clocks {
|
||||
ck_flexgen_08: ck-flexgen-08 {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <100000000>;
|
||||
};
|
||||
|
||||
ck_flexgen_51: ck-flexgen-51 {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <200000000>;
|
||||
};
|
||||
|
||||
ck_icn_ls_mcu: ck-icn-ls-mcu {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <200000000>;
|
||||
};
|
||||
};
|
||||
|
||||
firmware {
|
||||
optee {
|
||||
compatible = "linaro,optee-tz";
|
||||
method = "smc";
|
||||
};
|
||||
|
||||
scmi {
|
||||
compatible = "linaro,scmi-optee";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
linaro,optee-channel-id = <0>;
|
||||
|
||||
scmi_clk: protocol@14 {
|
||||
reg = <0x14>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
scmi_reset: protocol@16 {
|
||||
reg = <0x16>;
|
||||
#reset-cells = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
intc: interrupt-controller@4ac00000 {
|
||||
compatible = "arm,cortex-a7-gic";
|
||||
#interrupt-cells = <3>;
|
||||
#address-cells = <1>;
|
||||
interrupt-controller;
|
||||
reg = <0x0 0x4ac10000 0x0 0x1000>,
|
||||
<0x0 0x4ac20000 0x0 0x2000>,
|
||||
<0x0 0x4ac40000 0x0 0x2000>,
|
||||
<0x0 0x4ac60000 0x0 0x2000>;
|
||||
};
|
||||
|
||||
psci {
|
||||
compatible = "arm,psci-1.0";
|
||||
method = "smc";
|
||||
};
|
||||
|
||||
timer {
|
||||
compatible = "arm,armv8-timer";
|
||||
interrupt-parent = <&intc>;
|
||||
interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
|
||||
<GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
|
||||
<GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
|
||||
<GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
|
||||
always-on;
|
||||
};
|
||||
|
||||
soc@0 {
|
||||
compatible = "simple-bus";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
interrupt-parent = <&intc>;
|
||||
ranges = <0x0 0x0 0x0 0x80000000>;
|
||||
|
||||
rifsc: rifsc-bus@42080000 {
|
||||
compatible = "simple-bus";
|
||||
reg = <0x42080000 0x1000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges;
|
||||
|
||||
usart2: serial@400e0000 {
|
||||
compatible = "st,stm32h7-uart";
|
||||
reg = <0x400e0000 0x400>;
|
||||
interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&ck_flexgen_08>;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
syscfg: syscon@44230000 {
|
||||
compatible = "st,stm32mp25-syscfg", "syscon";
|
||||
reg = <0x44230000 0x10000>;
|
||||
};
|
||||
|
||||
pinctrl: pinctrl@44240000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "st,stm32mp257-pinctrl";
|
||||
ranges = <0 0x44240000 0xa0400>;
|
||||
pins-are-numbered;
|
||||
|
||||
gpioa: gpio@44240000 {
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
reg = <0x0 0x400>;
|
||||
clocks = <&ck_icn_ls_mcu>;
|
||||
st,bank-name = "GPIOA";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpiob: gpio@44250000 {
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
reg = <0x10000 0x400>;
|
||||
clocks = <&ck_icn_ls_mcu>;
|
||||
st,bank-name = "GPIOB";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpioc: gpio@44260000 {
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
reg = <0x20000 0x400>;
|
||||
clocks = <&ck_icn_ls_mcu>;
|
||||
st,bank-name = "GPIOC";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpiod: gpio@44270000 {
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
reg = <0x30000 0x400>;
|
||||
clocks = <&ck_icn_ls_mcu>;
|
||||
st,bank-name = "GPIOD";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpioe: gpio@44280000 {
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
reg = <0x40000 0x400>;
|
||||
clocks = <&ck_icn_ls_mcu>;
|
||||
st,bank-name = "GPIOE";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpiof: gpio@44290000 {
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
reg = <0x50000 0x400>;
|
||||
clocks = <&ck_icn_ls_mcu>;
|
||||
st,bank-name = "GPIOF";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpiog: gpio@442a0000 {
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
reg = <0x60000 0x400>;
|
||||
clocks = <&ck_icn_ls_mcu>;
|
||||
st,bank-name = "GPIOG";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpioh: gpio@442b0000 {
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
reg = <0x70000 0x400>;
|
||||
clocks = <&ck_icn_ls_mcu>;
|
||||
st,bank-name = "GPIOH";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpioi: gpio@442c0000 {
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
reg = <0x80000 0x400>;
|
||||
clocks = <&ck_icn_ls_mcu>;
|
||||
st,bank-name = "GPIOI";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpioj: gpio@442d0000 {
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
reg = <0x90000 0x400>;
|
||||
clocks = <&ck_icn_ls_mcu>;
|
||||
st,bank-name = "GPIOJ";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpiok: gpio@442e0000 {
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
reg = <0xa0000 0x400>;
|
||||
clocks = <&ck_icn_ls_mcu>;
|
||||
st,bank-name = "GPIOK";
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
pinctrl_z: pinctrl@46200000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "st,stm32mp257-z-pinctrl";
|
||||
ranges = <0 0x46200000 0x400>;
|
||||
pins-are-numbered;
|
||||
|
||||
gpioz: gpio@46200000 {
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
reg = <0 0x400>;
|
||||
clocks = <&ck_icn_ls_mcu>;
|
||||
st,bank-name = "GPIOZ";
|
||||
st,bank-ioport = <11>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
};
|
23
arch/arm64/boot/dts/st/stm32mp253.dtsi
Normal file
23
arch/arm64/boot/dts/st/stm32mp253.dtsi
Normal file
@ -0,0 +1,23 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-3-Clause)
|
||||
/*
|
||||
* Copyright (C) STMicroelectronics 2023 - All Rights Reserved
|
||||
* Author: Alexandre Torgue <alexandre.torgue@foss.st.com> for STMicroelectronics.
|
||||
*/
|
||||
#include "stm32mp251.dtsi"
|
||||
|
||||
/ {
|
||||
cpus {
|
||||
cpu1: cpu@1 {
|
||||
compatible = "arm,cortex-a35";
|
||||
device_type = "cpu";
|
||||
reg = <1>;
|
||||
enable-method = "psci";
|
||||
};
|
||||
};
|
||||
|
||||
arm-pmu {
|
||||
interrupts = <GIC_SPI 368 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 369 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-affinity = <&cpu0>, <&cpu1>;
|
||||
};
|
||||
};
|
9
arch/arm64/boot/dts/st/stm32mp255.dtsi
Normal file
9
arch/arm64/boot/dts/st/stm32mp255.dtsi
Normal file
@ -0,0 +1,9 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-3-Clause)
|
||||
/*
|
||||
* Copyright (C) STMicroelectronics 2023 - All Rights Reserved
|
||||
* Author: Alexandre Torgue <alexandre.torgue@foss.st.com> for STMicroelectronics.
|
||||
*/
|
||||
#include "stm32mp253.dtsi"
|
||||
|
||||
/ {
|
||||
};
|
9
arch/arm64/boot/dts/st/stm32mp257.dtsi
Normal file
9
arch/arm64/boot/dts/st/stm32mp257.dtsi
Normal file
@ -0,0 +1,9 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-3-Clause)
|
||||
/*
|
||||
* Copyright (C) STMicroelectronics 2023 - All Rights Reserved
|
||||
* Author: Alexandre Torgue <alexandre.torgue@foss.st.com> for STMicroelectronics.
|
||||
*/
|
||||
#include "stm32mp255.dtsi"
|
||||
|
||||
/ {
|
||||
};
|
50
arch/arm64/boot/dts/st/stm32mp257f-ev1.dts
Normal file
50
arch/arm64/boot/dts/st/stm32mp257f-ev1.dts
Normal file
@ -0,0 +1,50 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-3-Clause)
|
||||
/*
|
||||
* Copyright (C) STMicroelectronics 2023 - All Rights Reserved
|
||||
* Author: Alexandre Torgue <alexandre.torgue@foss.st.com> for STMicroelectronics.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include "stm32mp257.dtsi"
|
||||
#include "stm32mp25xf.dtsi"
|
||||
#include "stm32mp25-pinctrl.dtsi"
|
||||
#include "stm32mp25xxai-pinctrl.dtsi"
|
||||
|
||||
/ {
|
||||
model = "STMicroelectronics STM32MP257F-EV1 Evaluation Board";
|
||||
compatible = "st,stm32mp257f-ev1", "st,stm32mp257";
|
||||
|
||||
aliases {
|
||||
serial0 = &usart2;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
memory@80000000 {
|
||||
device_type = "memory";
|
||||
reg = <0x0 0x80000000 0x1 0x0>;
|
||||
};
|
||||
|
||||
reserved-memory {
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
fw@80000000 {
|
||||
compatible = "shared-dma-pool";
|
||||
reg = <0x0 0x80000000 0x0 0x4000000>;
|
||||
no-map;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&usart2 {
|
||||
pinctrl-names = "default", "idle", "sleep";
|
||||
pinctrl-0 = <&usart2_pins_a>;
|
||||
pinctrl-1 = <&usart2_idle_pins_a>;
|
||||
pinctrl-2 = <&usart2_sleep_pins_a>;
|
||||
status = "okay";
|
||||
};
|
8
arch/arm64/boot/dts/st/stm32mp25xc.dtsi
Normal file
8
arch/arm64/boot/dts/st/stm32mp25xc.dtsi
Normal file
@ -0,0 +1,8 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-3-Clause)
|
||||
/*
|
||||
* Copyright (C) STMicroelectronics 2023 - All Rights Reserved
|
||||
* Author: Alexandre Torgue <alexandre.torgue@foss.st.com> for STMicroelectronics.
|
||||
*/
|
||||
|
||||
/ {
|
||||
};
|
8
arch/arm64/boot/dts/st/stm32mp25xf.dtsi
Normal file
8
arch/arm64/boot/dts/st/stm32mp25xf.dtsi
Normal file
@ -0,0 +1,8 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-3-Clause)
|
||||
/*
|
||||
* Copyright (C) STMicroelectronics 2023 - All Rights Reserved
|
||||
* Author: Alexandre Torgue <alexandre.torgue@foss.st.com> for STMicroelectronics.
|
||||
*/
|
||||
|
||||
/ {
|
||||
};
|
83
arch/arm64/boot/dts/st/stm32mp25xxai-pinctrl.dtsi
Normal file
83
arch/arm64/boot/dts/st/stm32mp25xxai-pinctrl.dtsi
Normal file
@ -0,0 +1,83 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-3-Clause)
|
||||
/*
|
||||
* Copyright (C) STMicroelectronics 2023 - All Rights Reserved
|
||||
* Author: Alexandre Torgue <alexandre.torgue@foss.st.com> for STMicroelectronics.
|
||||
*/
|
||||
|
||||
&pinctrl {
|
||||
st,package = <STM32MP_PKG_AI>;
|
||||
|
||||
gpioa: gpio@44240000 {
|
||||
status = "okay";
|
||||
ngpios = <16>;
|
||||
gpio-ranges = <&pinctrl 0 0 16>;
|
||||
};
|
||||
|
||||
gpiob: gpio@44250000 {
|
||||
status = "okay";
|
||||
ngpios = <16>;
|
||||
gpio-ranges = <&pinctrl 0 16 16>;
|
||||
};
|
||||
|
||||
gpioc: gpio@44260000 {
|
||||
status = "okay";
|
||||
ngpios = <14>;
|
||||
gpio-ranges = <&pinctrl 0 32 14>;
|
||||
};
|
||||
|
||||
gpiod: gpio@44270000 {
|
||||
status = "okay";
|
||||
ngpios = <16>;
|
||||
gpio-ranges = <&pinctrl 0 48 16>;
|
||||
};
|
||||
|
||||
gpioe: gpio@44280000 {
|
||||
status = "okay";
|
||||
ngpios = <16>;
|
||||
gpio-ranges = <&pinctrl 0 64 16>;
|
||||
};
|
||||
|
||||
gpiof: gpio@44290000 {
|
||||
status = "okay";
|
||||
ngpios = <16>;
|
||||
gpio-ranges = <&pinctrl 0 80 16>;
|
||||
};
|
||||
|
||||
gpiog: gpio@442a0000 {
|
||||
status = "okay";
|
||||
ngpios = <16>;
|
||||
gpio-ranges = <&pinctrl 0 96 16>;
|
||||
};
|
||||
|
||||
gpioh: gpio@442b0000 {
|
||||
status = "okay";
|
||||
ngpios = <12>;
|
||||
gpio-ranges = <&pinctrl 2 114 12>;
|
||||
};
|
||||
|
||||
gpioi: gpio@442c0000 {
|
||||
status = "okay";
|
||||
ngpios = <16>;
|
||||
gpio-ranges = <&pinctrl 0 128 16>;
|
||||
};
|
||||
|
||||
gpioj: gpio@442d0000 {
|
||||
status = "okay";
|
||||
ngpios = <16>;
|
||||
gpio-ranges = <&pinctrl 0 144 16>;
|
||||
};
|
||||
|
||||
gpiok: gpio@442e0000 {
|
||||
status = "okay";
|
||||
ngpios = <8>;
|
||||
gpio-ranges = <&pinctrl 0 160 8>;
|
||||
};
|
||||
};
|
||||
|
||||
&pinctrl_z {
|
||||
gpioz: gpio@46200000 {
|
||||
status = "okay";
|
||||
ngpios = <10>;
|
||||
gpio-ranges = <&pinctrl_z 0 400 10>;
|
||||
};
|
||||
};
|
71
arch/arm64/boot/dts/st/stm32mp25xxak-pinctrl.dtsi
Normal file
71
arch/arm64/boot/dts/st/stm32mp25xxak-pinctrl.dtsi
Normal file
@ -0,0 +1,71 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-3-Clause)
|
||||
/*
|
||||
* Copyright (C) STMicroelectronics 2023 - All Rights Reserved
|
||||
* Author: Alexandre Torgue <alexandre.torgue@foss.st.com> for STMicroelectronics.
|
||||
*/
|
||||
|
||||
&pinctrl {
|
||||
st,package = <STM32MP_PKG_AK>;
|
||||
|
||||
gpioa: gpio@44240000 {
|
||||
status = "okay";
|
||||
ngpios = <16>;
|
||||
gpio-ranges = <&pinctrl 0 0 16>;
|
||||
};
|
||||
|
||||
gpiob: gpio@44250000 {
|
||||
status = "okay";
|
||||
ngpios = <16>;
|
||||
gpio-ranges = <&pinctrl 0 16 16>;
|
||||
};
|
||||
|
||||
gpioc: gpio@44260000 {
|
||||
status = "okay";
|
||||
ngpios = <14>;
|
||||
gpio-ranges = <&pinctrl 0 32 14>;
|
||||
};
|
||||
|
||||
gpiod: gpio@44270000 {
|
||||
status = "okay";
|
||||
ngpios = <16>;
|
||||
gpio-ranges = <&pinctrl 0 48 16>;
|
||||
};
|
||||
|
||||
gpioe: gpio@44280000 {
|
||||
status = "okay";
|
||||
ngpios = <16>;
|
||||
gpio-ranges = <&pinctrl 0 64 16>;
|
||||
};
|
||||
|
||||
gpiof: gpio@44290000 {
|
||||
status = "okay";
|
||||
ngpios = <16>;
|
||||
gpio-ranges = <&pinctrl 0 80 16>;
|
||||
};
|
||||
|
||||
gpiog: gpio@442a0000 {
|
||||
status = "okay";
|
||||
ngpios = <16>;
|
||||
gpio-ranges = <&pinctrl 0 96 16>;
|
||||
};
|
||||
|
||||
gpioh: gpio@442b0000 {
|
||||
status = "okay";
|
||||
ngpios = <12>;
|
||||
gpio-ranges = <&pinctrl 2 114 12>;
|
||||
};
|
||||
|
||||
gpioi: gpio@442c0000 {
|
||||
status = "okay";
|
||||
ngpios = <12>;
|
||||
gpio-ranges = <&pinctrl 0 128 12>;
|
||||
};
|
||||
};
|
||||
|
||||
&pinctrl_z {
|
||||
gpioz: gpio@46200000 {
|
||||
status = "okay";
|
||||
ngpios = <10>;
|
||||
gpio-ranges = <&pinctrl_z 0 400 10>;
|
||||
};
|
||||
};
|
71
arch/arm64/boot/dts/st/stm32mp25xxal-pinctrl.dtsi
Normal file
71
arch/arm64/boot/dts/st/stm32mp25xxal-pinctrl.dtsi
Normal file
@ -0,0 +1,71 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-3-Clause)
|
||||
/*
|
||||
* Copyright (C) STMicroelectronics 2023 - All Rights Reserved
|
||||
* Author: Alexandre Torgue <alexandre.torgue@foss.st.com> for STMicroelectronics.
|
||||
*/
|
||||
|
||||
&pinctrl {
|
||||
st,package = <STM32MP_PKG_AL>;
|
||||
|
||||
gpioa: gpio@44240000 {
|
||||
status = "okay";
|
||||
ngpios = <16>;
|
||||
gpio-ranges = <&pinctrl 0 0 16>;
|
||||
};
|
||||
|
||||
gpiob: gpio@44250000 {
|
||||
status = "okay";
|
||||
ngpios = <16>;
|
||||
gpio-ranges = <&pinctrl 0 16 16>;
|
||||
};
|
||||
|
||||
gpioc: gpio@44260000 {
|
||||
status = "okay";
|
||||
ngpios = <14>;
|
||||
gpio-ranges = <&pinctrl 0 32 14>;
|
||||
};
|
||||
|
||||
gpiod: gpio@44270000 {
|
||||
status = "okay";
|
||||
ngpios = <16>;
|
||||
gpio-ranges = <&pinctrl 0 48 16>;
|
||||
};
|
||||
|
||||
gpioe: gpio@44280000 {
|
||||
status = "okay";
|
||||
ngpios = <16>;
|
||||
gpio-ranges = <&pinctrl 0 64 16>;
|
||||
};
|
||||
|
||||
gpiof: gpio@44290000 {
|
||||
status = "okay";
|
||||
ngpios = <16>;
|
||||
gpio-ranges = <&pinctrl 0 80 16>;
|
||||
};
|
||||
|
||||
gpiog: gpio@442a0000 {
|
||||
status = "okay";
|
||||
ngpios = <16>;
|
||||
gpio-ranges = <&pinctrl 0 96 16>;
|
||||
};
|
||||
|
||||
gpioh: gpio@442b0000 {
|
||||
status = "okay";
|
||||
ngpios = <12>;
|
||||
gpio-ranges = <&pinctrl 2 114 12>;
|
||||
};
|
||||
|
||||
gpioi: gpio@442c0000 {
|
||||
status = "okay";
|
||||
ngpios = <12>;
|
||||
gpio-ranges = <&pinctrl 0 128 12>;
|
||||
};
|
||||
};
|
||||
|
||||
&pinctrl_z {
|
||||
gpioz: gpio@46200000 {
|
||||
status = "okay";
|
||||
ngpios = <10>;
|
||||
gpio-ranges = <&pinctrl_z 0 400 10>;
|
||||
};
|
||||
};
|
@ -52,12 +52,14 @@ CONFIG_ARCH_NXP=y
|
||||
CONFIG_ARCH_LAYERSCAPE=y
|
||||
CONFIG_ARCH_MXC=y
|
||||
CONFIG_ARCH_S32=y
|
||||
CONFIG_ARCH_MA35=y
|
||||
CONFIG_ARCH_NPCM=y
|
||||
CONFIG_ARCH_QCOM=y
|
||||
CONFIG_ARCH_RENESAS=y
|
||||
CONFIG_ARCH_ROCKCHIP=y
|
||||
CONFIG_ARCH_SEATTLE=y
|
||||
CONFIG_ARCH_INTEL_SOCFPGA=y
|
||||
CONFIG_ARCH_STM32=y
|
||||
CONFIG_ARCH_SYNQUACER=y
|
||||
CONFIG_ARCH_TEGRA=y
|
||||
CONFIG_ARCH_TESLA_FSD=y
|
||||
@ -461,6 +463,8 @@ CONFIG_SERIAL_FSL_LPUART=y
|
||||
CONFIG_SERIAL_FSL_LPUART_CONSOLE=y
|
||||
CONFIG_SERIAL_FSL_LINFLEXUART=y
|
||||
CONFIG_SERIAL_FSL_LINFLEXUART_CONSOLE=y
|
||||
CONFIG_SERIAL_STM32=y
|
||||
CONFIG_SERIAL_STM32_CONSOLE=y
|
||||
CONFIG_SERIAL_MVEBU_UART=y
|
||||
CONFIG_SERIAL_OWL=y
|
||||
CONFIG_SERIAL_DEV_BUS=y
|
||||
|
@ -478,6 +478,7 @@ source "drivers/clk/meson/Kconfig"
|
||||
source "drivers/clk/mstar/Kconfig"
|
||||
source "drivers/clk/microchip/Kconfig"
|
||||
source "drivers/clk/mvebu/Kconfig"
|
||||
source "drivers/clk/nuvoton/Kconfig"
|
||||
source "drivers/clk/pistachio/Kconfig"
|
||||
source "drivers/clk/qcom/Kconfig"
|
||||
source "drivers/clk/ralink/Kconfig"
|
||||
|
@ -106,6 +106,7 @@ endif
|
||||
obj-y += mstar/
|
||||
obj-y += mvebu/
|
||||
obj-$(CONFIG_ARCH_MXS) += mxs/
|
||||
obj-$(CONFIG_ARCH_MA35) += nuvoton/
|
||||
obj-$(CONFIG_COMMON_CLK_NXP) += nxp/
|
||||
obj-$(CONFIG_COMMON_CLK_PISTACHIO) += pistachio/
|
||||
obj-$(CONFIG_COMMON_CLK_PXA) += pxa/
|
||||
|
19
drivers/clk/nuvoton/Kconfig
Normal file
19
drivers/clk/nuvoton/Kconfig
Normal file
@ -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_MA35 || 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
|
4
drivers/clk/nuvoton/Makefile
Normal file
4
drivers/clk/nuvoton/Makefile
Normal file
@ -0,0 +1,4 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
obj-$(CONFIG_CLK_MA35D1) += clk-ma35d1.o
|
||||
obj-$(CONFIG_CLK_MA35D1) += clk-ma35d1-divider.o
|
||||
obj-$(CONFIG_CLK_MA35D1) += clk-ma35d1-pll.o
|
132
drivers/clk/nuvoton/clk-ma35d1-divider.c
Normal file
132
drivers/clk/nuvoton/clk-ma35d1-divider.c
Normal file
@ -0,0 +1,132 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (C) 2023 Nuvoton Technology Corp.
|
||||
* Author: Chi-Fang Li <cfli0@nuvoton.com>
|
||||
*/
|
||||
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/spinlock.h>
|
||||
|
||||
#include "clk-ma35d1.h"
|
||||
|
||||
struct ma35d1_adc_clk_div {
|
||||
struct clk_hw hw;
|
||||
void __iomem *reg;
|
||||
u8 shift;
|
||||
u8 width;
|
||||
u32 mask;
|
||||
const struct clk_div_table *table;
|
||||
/* protects concurrent access to clock divider registers */
|
||||
spinlock_t *lock;
|
||||
};
|
||||
|
||||
static inline struct ma35d1_adc_clk_div *to_ma35d1_adc_clk_div(struct clk_hw *_hw)
|
||||
{
|
||||
return container_of(_hw, struct ma35d1_adc_clk_div, hw);
|
||||
}
|
||||
|
||||
static unsigned long ma35d1_clkdiv_recalc_rate(struct clk_hw *hw, unsigned long parent_rate)
|
||||
{
|
||||
unsigned int val;
|
||||
struct ma35d1_adc_clk_div *dclk = to_ma35d1_adc_clk_div(hw);
|
||||
|
||||
val = readl_relaxed(dclk->reg) >> dclk->shift;
|
||||
val &= clk_div_mask(dclk->width);
|
||||
val += 1;
|
||||
return divider_recalc_rate(hw, parent_rate, val, dclk->table,
|
||||
CLK_DIVIDER_ROUND_CLOSEST, dclk->width);
|
||||
}
|
||||
|
||||
static long ma35d1_clkdiv_round_rate(struct clk_hw *hw, unsigned long rate, unsigned long *prate)
|
||||
{
|
||||
struct ma35d1_adc_clk_div *dclk = to_ma35d1_adc_clk_div(hw);
|
||||
|
||||
return divider_round_rate(hw, rate, prate, dclk->table,
|
||||
dclk->width, CLK_DIVIDER_ROUND_CLOSEST);
|
||||
}
|
||||
|
||||
static int ma35d1_clkdiv_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate)
|
||||
{
|
||||
int value;
|
||||
unsigned long flags = 0;
|
||||
u32 data;
|
||||
struct ma35d1_adc_clk_div *dclk = to_ma35d1_adc_clk_div(hw);
|
||||
|
||||
value = divider_get_val(rate, parent_rate, dclk->table,
|
||||
dclk->width, CLK_DIVIDER_ROUND_CLOSEST);
|
||||
|
||||
spin_lock_irqsave(dclk->lock, flags);
|
||||
|
||||
data = readl_relaxed(dclk->reg);
|
||||
data &= ~(clk_div_mask(dclk->width) << dclk->shift);
|
||||
data |= (value - 1) << dclk->shift;
|
||||
data |= dclk->mask;
|
||||
writel_relaxed(data, dclk->reg);
|
||||
|
||||
spin_unlock_irqrestore(dclk->lock, flags);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct clk_ops ma35d1_adc_clkdiv_ops = {
|
||||
.recalc_rate = ma35d1_clkdiv_recalc_rate,
|
||||
.round_rate = ma35d1_clkdiv_round_rate,
|
||||
.set_rate = ma35d1_clkdiv_set_rate,
|
||||
};
|
||||
|
||||
struct clk_hw *ma35d1_reg_adc_clkdiv(struct device *dev, const char *name,
|
||||
struct clk_hw *parent_hw, spinlock_t *lock,
|
||||
unsigned long flags, void __iomem *reg,
|
||||
u8 shift, u8 width, u32 mask_bit)
|
||||
{
|
||||
struct ma35d1_adc_clk_div *div;
|
||||
struct clk_init_data init;
|
||||
struct clk_div_table *table;
|
||||
struct clk_parent_data pdata = { .index = 0 };
|
||||
u32 max_div, min_div;
|
||||
struct clk_hw *hw;
|
||||
int ret;
|
||||
int i;
|
||||
|
||||
div = devm_kzalloc(dev, sizeof(*div), GFP_KERNEL);
|
||||
if (!div)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
max_div = clk_div_mask(width) + 1;
|
||||
min_div = 1;
|
||||
|
||||
table = devm_kcalloc(dev, max_div + 1, sizeof(*table), GFP_KERNEL);
|
||||
if (!table)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
for (i = 0; i < max_div; i++) {
|
||||
table[i].val = min_div + i;
|
||||
table[i].div = 2 * table[i].val;
|
||||
}
|
||||
table[max_div].val = 0;
|
||||
table[max_div].div = 0;
|
||||
|
||||
memset(&init, 0, sizeof(init));
|
||||
init.name = name;
|
||||
init.ops = &ma35d1_adc_clkdiv_ops;
|
||||
init.flags |= flags;
|
||||
pdata.hw = parent_hw;
|
||||
init.parent_data = &pdata;
|
||||
init.num_parents = 1;
|
||||
|
||||
div->reg = reg;
|
||||
div->shift = shift;
|
||||
div->width = width;
|
||||
div->mask = mask_bit ? BIT(mask_bit) : 0;
|
||||
div->lock = lock;
|
||||
div->hw.init = &init;
|
||||
div->table = table;
|
||||
|
||||
hw = &div->hw;
|
||||
ret = devm_clk_hw_register(dev, hw);
|
||||
if (ret)
|
||||
return ERR_PTR(ret);
|
||||
return hw;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ma35d1_reg_adc_clkdiv);
|
360
drivers/clk/nuvoton/clk-ma35d1-pll.c
Normal file
360
drivers/clk/nuvoton/clk-ma35d1-pll.c
Normal file
@ -0,0 +1,360 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (C) 2023 Nuvoton Technology Corp.
|
||||
* Author: Chi-Fang Li <cfli0@nuvoton.com>
|
||||
*/
|
||||
|
||||
#include <linux/bitfield.h>
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/container_of.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/math64.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/units.h>
|
||||
#include <dt-bindings/clock/nuvoton,ma35d1-clk.h>
|
||||
|
||||
#include "clk-ma35d1.h"
|
||||
|
||||
/* PLL frequency limits */
|
||||
#define PLL_FREF_MAX_FREQ (200 * HZ_PER_MHZ)
|
||||
#define PLL_FREF_MIN_FREQ (1 * HZ_PER_MHZ)
|
||||
#define PLL_FREF_M_MAX_FREQ (40 * HZ_PER_MHZ)
|
||||
#define PLL_FREF_M_MIN_FREQ (10 * HZ_PER_MHZ)
|
||||
#define PLL_FCLK_MAX_FREQ (2400 * HZ_PER_MHZ)
|
||||
#define PLL_FCLK_MIN_FREQ (600 * HZ_PER_MHZ)
|
||||
#define PLL_FCLKO_MAX_FREQ (2400 * HZ_PER_MHZ)
|
||||
#define PLL_FCLKO_MIN_FREQ (85700 * HZ_PER_KHZ)
|
||||
#define PLL_SS_RATE 0x77
|
||||
#define PLL_SLOPE 0x58CFA
|
||||
|
||||
#define REG_PLL_CTL0_OFFSET 0x0
|
||||
#define REG_PLL_CTL1_OFFSET 0x4
|
||||
#define REG_PLL_CTL2_OFFSET 0x8
|
||||
|
||||
/* bit fields for REG_CLK_PLL0CTL0, which is SMIC PLL design */
|
||||
#define SPLL0_CTL0_FBDIV GENMASK(7, 0)
|
||||
#define SPLL0_CTL0_INDIV GENMASK(11, 8)
|
||||
#define SPLL0_CTL0_OUTDIV GENMASK(13, 12)
|
||||
#define SPLL0_CTL0_PD BIT(16)
|
||||
#define SPLL0_CTL0_BP BIT(17)
|
||||
|
||||
/* bit fields for REG_CLK_PLLxCTL0 ~ REG_CLK_PLLxCTL2, where x = 2 ~ 5 */
|
||||
#define PLL_CTL0_FBDIV GENMASK(10, 0)
|
||||
#define PLL_CTL0_INDIV GENMASK(17, 12)
|
||||
#define PLL_CTL0_MODE GENMASK(19, 18)
|
||||
#define PLL_CTL0_SSRATE GENMASK(30, 20)
|
||||
#define PLL_CTL1_PD BIT(0)
|
||||
#define PLL_CTL1_BP BIT(1)
|
||||
#define PLL_CTL1_OUTDIV GENMASK(6, 4)
|
||||
#define PLL_CTL1_FRAC GENMASK(31, 24)
|
||||
#define PLL_CTL2_SLOPE GENMASK(23, 0)
|
||||
|
||||
#define INDIV_MIN 1
|
||||
#define INDIV_MAX 63
|
||||
#define FBDIV_MIN 16
|
||||
#define FBDIV_MAX 2047
|
||||
#define FBDIV_FRAC_MIN 1600
|
||||
#define FBDIV_FRAC_MAX 204700
|
||||
#define OUTDIV_MIN 1
|
||||
#define OUTDIV_MAX 7
|
||||
|
||||
#define PLL_MODE_INT 0
|
||||
#define PLL_MODE_FRAC 1
|
||||
#define PLL_MODE_SS 2
|
||||
|
||||
struct ma35d1_clk_pll {
|
||||
struct clk_hw hw;
|
||||
u32 id;
|
||||
u8 mode;
|
||||
void __iomem *ctl0_base;
|
||||
void __iomem *ctl1_base;
|
||||
void __iomem *ctl2_base;
|
||||
};
|
||||
|
||||
static inline struct ma35d1_clk_pll *to_ma35d1_clk_pll(struct clk_hw *_hw)
|
||||
{
|
||||
return container_of(_hw, struct ma35d1_clk_pll, hw);
|
||||
}
|
||||
|
||||
static unsigned long ma35d1_calc_smic_pll_freq(u32 pll0_ctl0,
|
||||
unsigned long parent_rate)
|
||||
{
|
||||
u32 m, n, p, outdiv;
|
||||
u64 pll_freq;
|
||||
|
||||
if (pll0_ctl0 & SPLL0_CTL0_BP)
|
||||
return parent_rate;
|
||||
|
||||
n = FIELD_GET(SPLL0_CTL0_FBDIV, pll0_ctl0);
|
||||
m = FIELD_GET(SPLL0_CTL0_INDIV, pll0_ctl0);
|
||||
p = FIELD_GET(SPLL0_CTL0_OUTDIV, pll0_ctl0);
|
||||
outdiv = 1 << p;
|
||||
pll_freq = (u64)parent_rate * n;
|
||||
div_u64(pll_freq, m * outdiv);
|
||||
return pll_freq;
|
||||
}
|
||||
|
||||
static unsigned long ma35d1_calc_pll_freq(u8 mode, u32 *reg_ctl, unsigned long parent_rate)
|
||||
{
|
||||
unsigned long pll_freq, x;
|
||||
u32 m, n, p;
|
||||
|
||||
if (reg_ctl[1] & PLL_CTL1_BP)
|
||||
return parent_rate;
|
||||
|
||||
n = FIELD_GET(PLL_CTL0_FBDIV, reg_ctl[0]);
|
||||
m = FIELD_GET(PLL_CTL0_INDIV, reg_ctl[0]);
|
||||
p = FIELD_GET(PLL_CTL1_OUTDIV, reg_ctl[1]);
|
||||
|
||||
if (mode == PLL_MODE_INT) {
|
||||
pll_freq = (u64)parent_rate * n;
|
||||
div_u64(pll_freq, m * p);
|
||||
} else {
|
||||
x = FIELD_GET(PLL_CTL1_FRAC, reg_ctl[1]);
|
||||
/* 2 decimal places floating to integer (ex. 1.23 to 123) */
|
||||
n = n * 100 + ((x * 100) / FIELD_MAX(PLL_CTL1_FRAC));
|
||||
pll_freq = div_u64(parent_rate * n, 100 * m * p);
|
||||
}
|
||||
return pll_freq;
|
||||
}
|
||||
|
||||
static int ma35d1_pll_find_closest(struct ma35d1_clk_pll *pll, unsigned long rate,
|
||||
unsigned long parent_rate, u32 *reg_ctl,
|
||||
unsigned long *freq)
|
||||
{
|
||||
unsigned long min_diff = ULONG_MAX;
|
||||
int fbdiv_min, fbdiv_max;
|
||||
int p, m, n;
|
||||
|
||||
*freq = 0;
|
||||
if (rate < PLL_FCLKO_MIN_FREQ || rate > PLL_FCLKO_MAX_FREQ)
|
||||
return -EINVAL;
|
||||
|
||||
if (pll->mode == PLL_MODE_INT) {
|
||||
fbdiv_min = FBDIV_MIN;
|
||||
fbdiv_max = FBDIV_MAX;
|
||||
} else {
|
||||
fbdiv_min = FBDIV_FRAC_MIN;
|
||||
fbdiv_max = FBDIV_FRAC_MAX;
|
||||
}
|
||||
|
||||
for (m = INDIV_MIN; m <= INDIV_MAX; m++) {
|
||||
for (n = fbdiv_min; n <= fbdiv_max; n++) {
|
||||
for (p = OUTDIV_MIN; p <= OUTDIV_MAX; p++) {
|
||||
unsigned long tmp, fout, fclk, diff;
|
||||
|
||||
tmp = div_u64(parent_rate, m);
|
||||
if (tmp < PLL_FREF_M_MIN_FREQ ||
|
||||
tmp > PLL_FREF_M_MAX_FREQ)
|
||||
continue; /* constrain */
|
||||
|
||||
fclk = div_u64(parent_rate * n, m);
|
||||
/* for 2 decimal places */
|
||||
if (pll->mode != PLL_MODE_INT)
|
||||
fclk = div_u64(fclk, 100);
|
||||
|
||||
if (fclk < PLL_FCLK_MIN_FREQ ||
|
||||
fclk > PLL_FCLK_MAX_FREQ)
|
||||
continue; /* constrain */
|
||||
|
||||
fout = div_u64(fclk, p);
|
||||
if (fout < PLL_FCLKO_MIN_FREQ ||
|
||||
fout > PLL_FCLKO_MAX_FREQ)
|
||||
continue; /* constrain */
|
||||
|
||||
diff = abs(rate - fout);
|
||||
if (diff < min_diff) {
|
||||
reg_ctl[0] = FIELD_PREP(PLL_CTL0_INDIV, m) |
|
||||
FIELD_PREP(PLL_CTL0_FBDIV, n);
|
||||
reg_ctl[1] = FIELD_PREP(PLL_CTL1_OUTDIV, p);
|
||||
*freq = fout;
|
||||
min_diff = diff;
|
||||
if (min_diff == 0)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (*freq == 0)
|
||||
return -EINVAL; /* cannot find even one valid setting */
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ma35d1_clk_pll_set_rate(struct clk_hw *hw, unsigned long rate,
|
||||
unsigned long parent_rate)
|
||||
{
|
||||
struct ma35d1_clk_pll *pll = to_ma35d1_clk_pll(hw);
|
||||
u32 reg_ctl[3] = { 0 };
|
||||
unsigned long pll_freq;
|
||||
int ret;
|
||||
|
||||
if (parent_rate < PLL_FREF_MIN_FREQ || parent_rate > PLL_FREF_MAX_FREQ)
|
||||
return -EINVAL;
|
||||
|
||||
ret = ma35d1_pll_find_closest(pll, rate, parent_rate, reg_ctl, &pll_freq);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
|
||||
switch (pll->mode) {
|
||||
case PLL_MODE_INT:
|
||||
reg_ctl[0] |= FIELD_PREP(PLL_CTL0_MODE, PLL_MODE_INT);
|
||||
break;
|
||||
case PLL_MODE_FRAC:
|
||||
reg_ctl[0] |= FIELD_PREP(PLL_CTL0_MODE, PLL_MODE_FRAC);
|
||||
break;
|
||||
case PLL_MODE_SS:
|
||||
reg_ctl[0] |= FIELD_PREP(PLL_CTL0_MODE, PLL_MODE_SS) |
|
||||
FIELD_PREP(PLL_CTL0_SSRATE, PLL_SS_RATE);
|
||||
reg_ctl[2] = FIELD_PREP(PLL_CTL2_SLOPE, PLL_SLOPE);
|
||||
break;
|
||||
}
|
||||
reg_ctl[1] |= PLL_CTL1_PD;
|
||||
|
||||
writel_relaxed(reg_ctl[0], pll->ctl0_base);
|
||||
writel_relaxed(reg_ctl[1], pll->ctl1_base);
|
||||
writel_relaxed(reg_ctl[2], pll->ctl2_base);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static unsigned long ma35d1_clk_pll_recalc_rate(struct clk_hw *hw, unsigned long parent_rate)
|
||||
{
|
||||
struct ma35d1_clk_pll *pll = to_ma35d1_clk_pll(hw);
|
||||
u32 reg_ctl[3];
|
||||
unsigned long pll_freq;
|
||||
|
||||
if (parent_rate < PLL_FREF_MIN_FREQ || parent_rate > PLL_FREF_MAX_FREQ)
|
||||
return 0;
|
||||
|
||||
switch (pll->id) {
|
||||
case CAPLL:
|
||||
reg_ctl[0] = readl_relaxed(pll->ctl0_base);
|
||||
pll_freq = ma35d1_calc_smic_pll_freq(reg_ctl[0], parent_rate);
|
||||
return pll_freq;
|
||||
case DDRPLL:
|
||||
case APLL:
|
||||
case EPLL:
|
||||
case VPLL:
|
||||
reg_ctl[0] = readl_relaxed(pll->ctl0_base);
|
||||
reg_ctl[1] = readl_relaxed(pll->ctl1_base);
|
||||
pll_freq = ma35d1_calc_pll_freq(pll->mode, reg_ctl, parent_rate);
|
||||
return pll_freq;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static long ma35d1_clk_pll_round_rate(struct clk_hw *hw, unsigned long rate,
|
||||
unsigned long *parent_rate)
|
||||
{
|
||||
struct ma35d1_clk_pll *pll = to_ma35d1_clk_pll(hw);
|
||||
u32 reg_ctl[3] = { 0 };
|
||||
unsigned long pll_freq;
|
||||
long ret;
|
||||
|
||||
if (*parent_rate < PLL_FREF_MIN_FREQ || *parent_rate > PLL_FREF_MAX_FREQ)
|
||||
return -EINVAL;
|
||||
|
||||
ret = ma35d1_pll_find_closest(pll, rate, *parent_rate, reg_ctl, &pll_freq);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
switch (pll->id) {
|
||||
case CAPLL:
|
||||
reg_ctl[0] = readl_relaxed(pll->ctl0_base);
|
||||
pll_freq = ma35d1_calc_smic_pll_freq(reg_ctl[0], *parent_rate);
|
||||
return pll_freq;
|
||||
case DDRPLL:
|
||||
case APLL:
|
||||
case EPLL:
|
||||
case VPLL:
|
||||
reg_ctl[0] = readl_relaxed(pll->ctl0_base);
|
||||
reg_ctl[1] = readl_relaxed(pll->ctl1_base);
|
||||
pll_freq = ma35d1_calc_pll_freq(pll->mode, reg_ctl, *parent_rate);
|
||||
return pll_freq;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ma35d1_clk_pll_is_prepared(struct clk_hw *hw)
|
||||
{
|
||||
struct ma35d1_clk_pll *pll = to_ma35d1_clk_pll(hw);
|
||||
u32 val = readl_relaxed(pll->ctl1_base);
|
||||
|
||||
return !(val & PLL_CTL1_PD);
|
||||
}
|
||||
|
||||
static int ma35d1_clk_pll_prepare(struct clk_hw *hw)
|
||||
{
|
||||
struct ma35d1_clk_pll *pll = to_ma35d1_clk_pll(hw);
|
||||
u32 val;
|
||||
|
||||
val = readl_relaxed(pll->ctl1_base);
|
||||
val &= ~PLL_CTL1_PD;
|
||||
writel_relaxed(val, pll->ctl1_base);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ma35d1_clk_pll_unprepare(struct clk_hw *hw)
|
||||
{
|
||||
struct ma35d1_clk_pll *pll = to_ma35d1_clk_pll(hw);
|
||||
u32 val;
|
||||
|
||||
val = readl_relaxed(pll->ctl1_base);
|
||||
val |= PLL_CTL1_PD;
|
||||
writel_relaxed(val, pll->ctl1_base);
|
||||
}
|
||||
|
||||
static const struct clk_ops ma35d1_clk_pll_ops = {
|
||||
.is_prepared = ma35d1_clk_pll_is_prepared,
|
||||
.prepare = ma35d1_clk_pll_prepare,
|
||||
.unprepare = ma35d1_clk_pll_unprepare,
|
||||
.set_rate = ma35d1_clk_pll_set_rate,
|
||||
.recalc_rate = ma35d1_clk_pll_recalc_rate,
|
||||
.round_rate = ma35d1_clk_pll_round_rate,
|
||||
};
|
||||
|
||||
static const struct clk_ops ma35d1_clk_fixed_pll_ops = {
|
||||
.recalc_rate = ma35d1_clk_pll_recalc_rate,
|
||||
.round_rate = ma35d1_clk_pll_round_rate,
|
||||
};
|
||||
|
||||
struct clk_hw *ma35d1_reg_clk_pll(struct device *dev, u32 id, u8 u8mode, const char *name,
|
||||
struct clk_hw *parent_hw, void __iomem *base)
|
||||
{
|
||||
struct clk_parent_data pdata = { .index = 0 };
|
||||
struct clk_init_data init = {};
|
||||
struct ma35d1_clk_pll *pll;
|
||||
struct clk_hw *hw;
|
||||
int ret;
|
||||
|
||||
pll = devm_kzalloc(dev, sizeof(*pll), GFP_KERNEL);
|
||||
if (!pll)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
pll->id = id;
|
||||
pll->mode = u8mode;
|
||||
pll->ctl0_base = base + REG_PLL_CTL0_OFFSET;
|
||||
pll->ctl1_base = base + REG_PLL_CTL1_OFFSET;
|
||||
pll->ctl2_base = base + REG_PLL_CTL2_OFFSET;
|
||||
|
||||
init.name = name;
|
||||
init.flags = 0;
|
||||
pdata.hw = parent_hw;
|
||||
init.parent_data = &pdata;
|
||||
init.num_parents = 1;
|
||||
|
||||
if (id == CAPLL || id == DDRPLL)
|
||||
init.ops = &ma35d1_clk_fixed_pll_ops;
|
||||
else
|
||||
init.ops = &ma35d1_clk_pll_ops;
|
||||
|
||||
pll->hw.init = &init;
|
||||
hw = &pll->hw;
|
||||
|
||||
ret = devm_clk_hw_register(dev, hw);
|
||||
if (ret)
|
||||
return ERR_PTR(ret);
|
||||
return hw;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ma35d1_reg_clk_pll);
|
1059
drivers/clk/nuvoton/clk-ma35d1.c
Normal file
1059
drivers/clk/nuvoton/clk-ma35d1.c
Normal file
File diff suppressed because it is too large
Load Diff
18
drivers/clk/nuvoton/clk-ma35d1.h
Normal file
18
drivers/clk/nuvoton/clk-ma35d1.h
Normal file
@ -0,0 +1,18 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (C) 2023 Nuvoton Technology Corp.
|
||||
* Author: Chi-Fang Li <cfli0@nuvoton.com>
|
||||
*/
|
||||
|
||||
#ifndef __DRV_CLK_NUVOTON_MA35D1_H
|
||||
#define __DRV_CLK_NUVOTON_MA35D1_H
|
||||
|
||||
struct clk_hw *ma35d1_reg_clk_pll(struct device *dev, u32 id, u8 u8mode, const char *name,
|
||||
struct clk_hw *parent_hw, void __iomem *base);
|
||||
|
||||
struct clk_hw *ma35d1_reg_adc_clkdiv(struct device *dev, const char *name,
|
||||
struct clk_hw *parent_hw, spinlock_t *lock,
|
||||
unsigned long flags, void __iomem *reg,
|
||||
u8 shift, u8 width, u32 mask_bit);
|
||||
|
||||
#endif /* __DRV_CLK_NUVOTON_MA35D1_H */
|
@ -51,4 +51,10 @@ config PINCTRL_STM32MP157
|
||||
depends on OF && HAS_IOMEM
|
||||
default MACH_STM32MP157
|
||||
select PINCTRL_STM32
|
||||
|
||||
config PINCTRL_STM32MP257
|
||||
bool "STMicroelectronics STM32MP257 pin control" if COMPILE_TEST && !MACH_STM32MP25
|
||||
depends on OF && HAS_IOMEM
|
||||
default MACH_STM32MP25
|
||||
select PINCTRL_STM32
|
||||
endif
|
||||
|
@ -10,3 +10,4 @@ obj-$(CONFIG_PINCTRL_STM32F769) += pinctrl-stm32f769.o
|
||||
obj-$(CONFIG_PINCTRL_STM32H743) += pinctrl-stm32h743.o
|
||||
obj-$(CONFIG_PINCTRL_STM32MP135) += pinctrl-stm32mp135.o
|
||||
obj-$(CONFIG_PINCTRL_STM32MP157) += pinctrl-stm32mp157.o
|
||||
obj-$(CONFIG_PINCTRL_STM32MP257) += pinctrl-stm32mp257.o
|
||||
|
@ -24,6 +24,9 @@
|
||||
#define STM32MP_PKG_AB BIT(1)
|
||||
#define STM32MP_PKG_AC BIT(2)
|
||||
#define STM32MP_PKG_AD BIT(3)
|
||||
#define STM32MP_PKG_AI BIT(8)
|
||||
#define STM32MP_PKG_AK BIT(10)
|
||||
#define STM32MP_PKG_AL BIT(11)
|
||||
|
||||
struct stm32_desc_function {
|
||||
const char *name;
|
||||
|
2581
drivers/pinctrl/stm32/pinctrl-stm32mp257.c
Normal file
2581
drivers/pinctrl/stm32/pinctrl-stm32mp257.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -313,7 +313,7 @@ config ST_SLIM_REMOTEPROC
|
||||
|
||||
config STM32_RPROC
|
||||
tristate "STM32 remoteproc support"
|
||||
depends on ARCH_STM32
|
||||
depends on ARCH_STM32 || COMPILE_TEST
|
||||
depends on REMOTEPROC
|
||||
select MAILBOX
|
||||
help
|
||||
|
@ -118,10 +118,10 @@ static int stm32_rproc_mem_alloc(struct rproc *rproc,
|
||||
struct device *dev = rproc->dev.parent;
|
||||
void *va;
|
||||
|
||||
dev_dbg(dev, "map memory: %pa+%x\n", &mem->dma, mem->len);
|
||||
dev_dbg(dev, "map memory: %pad+%zx\n", &mem->dma, mem->len);
|
||||
va = ioremap_wc(mem->dma, mem->len);
|
||||
if (IS_ERR_OR_NULL(va)) {
|
||||
dev_err(dev, "Unable to map memory region: %pa+%x\n",
|
||||
dev_err(dev, "Unable to map memory region: %pad+0x%zx\n",
|
||||
&mem->dma, mem->len);
|
||||
return -ENOMEM;
|
||||
}
|
||||
@ -627,7 +627,7 @@ stm32_rproc_get_loaded_rsc_table(struct rproc *rproc, size_t *table_sz)
|
||||
|
||||
ddata->rsc_va = devm_ioremap_wc(dev, rsc_pa, RSC_TBL_SIZE);
|
||||
if (IS_ERR_OR_NULL(ddata->rsc_va)) {
|
||||
dev_err(dev, "Unable to map memory region: %pa+%zx\n",
|
||||
dev_err(dev, "Unable to map memory region: %pa+%x\n",
|
||||
&rsc_pa, RSC_TBL_SIZE);
|
||||
ddata->rsc_va = NULL;
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
@ -143,6 +143,13 @@ config RESET_NPCM
|
||||
This enables the reset controller driver for Nuvoton NPCM
|
||||
BMC SoCs.
|
||||
|
||||
config RESET_NUVOTON_MA35D1
|
||||
bool "Nuvoton MA35D1 Reset Driver"
|
||||
depends on ARCH_MA35 || COMPILE_TEST
|
||||
default ARCH_MA35
|
||||
help
|
||||
This enables the reset controller driver for Nuvoton MA35D1 SoC.
|
||||
|
||||
config RESET_OXNAS
|
||||
bool
|
||||
|
||||
|
@ -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
|
||||
|
235
drivers/reset/reset-ma35d1.c
Normal file
235
drivers/reset/reset-ma35d1.c
Normal file
@ -0,0 +1,235 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (C) 2023 Nuvoton Technology Corp.
|
||||
* Author: Chi-Fang Li <cfli0@nuvoton.com>
|
||||
*/
|
||||
|
||||
#include <linux/bits.h>
|
||||
#include <linux/container_of.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/reboot.h>
|
||||
#include <linux/reset-controller.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <dt-bindings/reset/nuvoton,ma35d1-reset.h>
|
||||
|
||||
struct ma35d1_reset_data {
|
||||
struct reset_controller_dev rcdev;
|
||||
struct notifier_block restart_handler;
|
||||
void __iomem *base;
|
||||
/* protect registers against concurrent read-modify-write */
|
||||
spinlock_t lock;
|
||||
};
|
||||
|
||||
static const struct {
|
||||
u32 reg_ofs;
|
||||
u32 bit;
|
||||
} ma35d1_reset_map[] = {
|
||||
[MA35D1_RESET_CHIP] = {0x20, 0},
|
||||
[MA35D1_RESET_CA35CR0] = {0x20, 1},
|
||||
[MA35D1_RESET_CA35CR1] = {0x20, 2},
|
||||
[MA35D1_RESET_CM4] = {0x20, 3},
|
||||
[MA35D1_RESET_PDMA0] = {0x20, 4},
|
||||
[MA35D1_RESET_PDMA1] = {0x20, 5},
|
||||
[MA35D1_RESET_PDMA2] = {0x20, 6},
|
||||
[MA35D1_RESET_PDMA3] = {0x20, 7},
|
||||
[MA35D1_RESET_DISP] = {0x20, 9},
|
||||
[MA35D1_RESET_VCAP0] = {0x20, 10},
|
||||
[MA35D1_RESET_VCAP1] = {0x20, 11},
|
||||
[MA35D1_RESET_GFX] = {0x20, 12},
|
||||
[MA35D1_RESET_VDEC] = {0x20, 13},
|
||||
[MA35D1_RESET_WHC0] = {0x20, 14},
|
||||
[MA35D1_RESET_WHC1] = {0x20, 15},
|
||||
[MA35D1_RESET_GMAC0] = {0x20, 16},
|
||||
[MA35D1_RESET_GMAC1] = {0x20, 17},
|
||||
[MA35D1_RESET_HWSEM] = {0x20, 18},
|
||||
[MA35D1_RESET_EBI] = {0x20, 19},
|
||||
[MA35D1_RESET_HSUSBH0] = {0x20, 20},
|
||||
[MA35D1_RESET_HSUSBH1] = {0x20, 21},
|
||||
[MA35D1_RESET_HSUSBD] = {0x20, 22},
|
||||
[MA35D1_RESET_USBHL] = {0x20, 23},
|
||||
[MA35D1_RESET_SDH0] = {0x20, 24},
|
||||
[MA35D1_RESET_SDH1] = {0x20, 25},
|
||||
[MA35D1_RESET_NAND] = {0x20, 26},
|
||||
[MA35D1_RESET_GPIO] = {0x20, 27},
|
||||
[MA35D1_RESET_MCTLP] = {0x20, 28},
|
||||
[MA35D1_RESET_MCTLC] = {0x20, 29},
|
||||
[MA35D1_RESET_DDRPUB] = {0x20, 30},
|
||||
[MA35D1_RESET_TMR0] = {0x24, 2},
|
||||
[MA35D1_RESET_TMR1] = {0x24, 3},
|
||||
[MA35D1_RESET_TMR2] = {0x24, 4},
|
||||
[MA35D1_RESET_TMR3] = {0x24, 5},
|
||||
[MA35D1_RESET_I2C0] = {0x24, 8},
|
||||
[MA35D1_RESET_I2C1] = {0x24, 9},
|
||||
[MA35D1_RESET_I2C2] = {0x24, 10},
|
||||
[MA35D1_RESET_I2C3] = {0x24, 11},
|
||||
[MA35D1_RESET_QSPI0] = {0x24, 12},
|
||||
[MA35D1_RESET_SPI0] = {0x24, 13},
|
||||
[MA35D1_RESET_SPI1] = {0x24, 14},
|
||||
[MA35D1_RESET_SPI2] = {0x24, 15},
|
||||
[MA35D1_RESET_UART0] = {0x24, 16},
|
||||
[MA35D1_RESET_UART1] = {0x24, 17},
|
||||
[MA35D1_RESET_UART2] = {0x24, 18},
|
||||
[MA35D1_RESET_UART3] = {0x24, 19},
|
||||
[MA35D1_RESET_UART4] = {0x24, 20},
|
||||
[MA35D1_RESET_UART5] = {0x24, 21},
|
||||
[MA35D1_RESET_UART6] = {0x24, 22},
|
||||
[MA35D1_RESET_UART7] = {0x24, 23},
|
||||
[MA35D1_RESET_CANFD0] = {0x24, 24},
|
||||
[MA35D1_RESET_CANFD1] = {0x24, 25},
|
||||
[MA35D1_RESET_EADC0] = {0x24, 28},
|
||||
[MA35D1_RESET_I2S0] = {0x24, 29},
|
||||
[MA35D1_RESET_SC0] = {0x28, 0},
|
||||
[MA35D1_RESET_SC1] = {0x28, 1},
|
||||
[MA35D1_RESET_QSPI1] = {0x28, 4},
|
||||
[MA35D1_RESET_SPI3] = {0x28, 6},
|
||||
[MA35D1_RESET_EPWM0] = {0x28, 16},
|
||||
[MA35D1_RESET_EPWM1] = {0x28, 17},
|
||||
[MA35D1_RESET_QEI0] = {0x28, 22},
|
||||
[MA35D1_RESET_QEI1] = {0x28, 23},
|
||||
[MA35D1_RESET_ECAP0] = {0x28, 26},
|
||||
[MA35D1_RESET_ECAP1] = {0x28, 27},
|
||||
[MA35D1_RESET_CANFD2] = {0x28, 28},
|
||||
[MA35D1_RESET_ADC0] = {0x28, 31},
|
||||
[MA35D1_RESET_TMR4] = {0x2C, 0},
|
||||
[MA35D1_RESET_TMR5] = {0x2C, 1},
|
||||
[MA35D1_RESET_TMR6] = {0x2C, 2},
|
||||
[MA35D1_RESET_TMR7] = {0x2C, 3},
|
||||
[MA35D1_RESET_TMR8] = {0x2C, 4},
|
||||
[MA35D1_RESET_TMR9] = {0x2C, 5},
|
||||
[MA35D1_RESET_TMR10] = {0x2C, 6},
|
||||
[MA35D1_RESET_TMR11] = {0x2C, 7},
|
||||
[MA35D1_RESET_UART8] = {0x2C, 8},
|
||||
[MA35D1_RESET_UART9] = {0x2C, 9},
|
||||
[MA35D1_RESET_UART10] = {0x2C, 10},
|
||||
[MA35D1_RESET_UART11] = {0x2C, 11},
|
||||
[MA35D1_RESET_UART12] = {0x2C, 12},
|
||||
[MA35D1_RESET_UART13] = {0x2C, 13},
|
||||
[MA35D1_RESET_UART14] = {0x2C, 14},
|
||||
[MA35D1_RESET_UART15] = {0x2C, 15},
|
||||
[MA35D1_RESET_UART16] = {0x2C, 16},
|
||||
[MA35D1_RESET_I2S1] = {0x2C, 17},
|
||||
[MA35D1_RESET_I2C4] = {0x2C, 18},
|
||||
[MA35D1_RESET_I2C5] = {0x2C, 19},
|
||||
[MA35D1_RESET_EPWM2] = {0x2C, 20},
|
||||
[MA35D1_RESET_ECAP2] = {0x2C, 21},
|
||||
[MA35D1_RESET_QEI2] = {0x2C, 22},
|
||||
[MA35D1_RESET_CANFD3] = {0x2C, 23},
|
||||
[MA35D1_RESET_KPI] = {0x2C, 24},
|
||||
[MA35D1_RESET_GIC] = {0x2C, 28},
|
||||
[MA35D1_RESET_SSMCC] = {0x2C, 30},
|
||||
[MA35D1_RESET_SSPCC] = {0x2C, 31}
|
||||
};
|
||||
|
||||
static int ma35d1_restart_handler(struct notifier_block *this, unsigned long mode, void *cmd)
|
||||
{
|
||||
struct ma35d1_reset_data *data =
|
||||
container_of(this, struct ma35d1_reset_data, restart_handler);
|
||||
u32 id = MA35D1_RESET_CHIP;
|
||||
|
||||
writel_relaxed(BIT(ma35d1_reset_map[id].bit),
|
||||
data->base + ma35d1_reset_map[id].reg_ofs);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ma35d1_reset_update(struct reset_controller_dev *rcdev, unsigned long id, bool assert)
|
||||
{
|
||||
struct ma35d1_reset_data *data = container_of(rcdev, struct ma35d1_reset_data, rcdev);
|
||||
unsigned long flags;
|
||||
u32 reg;
|
||||
|
||||
if (WARN_ON_ONCE(id >= ARRAY_SIZE(ma35d1_reset_map)))
|
||||
return -EINVAL;
|
||||
|
||||
spin_lock_irqsave(&data->lock, flags);
|
||||
reg = readl_relaxed(data->base + ma35d1_reset_map[id].reg_ofs);
|
||||
if (assert)
|
||||
reg |= BIT(ma35d1_reset_map[id].bit);
|
||||
else
|
||||
reg &= ~(BIT(ma35d1_reset_map[id].bit));
|
||||
writel_relaxed(reg, data->base + ma35d1_reset_map[id].reg_ofs);
|
||||
spin_unlock_irqrestore(&data->lock, flags);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ma35d1_reset_assert(struct reset_controller_dev *rcdev, unsigned long id)
|
||||
{
|
||||
return ma35d1_reset_update(rcdev, id, true);
|
||||
}
|
||||
|
||||
static int ma35d1_reset_deassert(struct reset_controller_dev *rcdev, unsigned long id)
|
||||
{
|
||||
return ma35d1_reset_update(rcdev, id, false);
|
||||
}
|
||||
|
||||
static int ma35d1_reset_status(struct reset_controller_dev *rcdev, unsigned long id)
|
||||
{
|
||||
struct ma35d1_reset_data *data = container_of(rcdev, struct ma35d1_reset_data, rcdev);
|
||||
u32 reg;
|
||||
|
||||
if (WARN_ON_ONCE(id >= ARRAY_SIZE(ma35d1_reset_map)))
|
||||
return -EINVAL;
|
||||
|
||||
reg = readl_relaxed(data->base + ma35d1_reset_map[id].reg_ofs);
|
||||
return !!(reg & BIT(ma35d1_reset_map[id].bit));
|
||||
}
|
||||
|
||||
static const struct reset_control_ops ma35d1_reset_ops = {
|
||||
.assert = ma35d1_reset_assert,
|
||||
.deassert = ma35d1_reset_deassert,
|
||||
.status = ma35d1_reset_status,
|
||||
};
|
||||
|
||||
static const struct of_device_id ma35d1_reset_dt_ids[] = {
|
||||
{ .compatible = "nuvoton,ma35d1-reset" },
|
||||
{ },
|
||||
};
|
||||
|
||||
static int ma35d1_reset_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct ma35d1_reset_data *reset_data;
|
||||
struct device *dev = &pdev->dev;
|
||||
int err;
|
||||
|
||||
if (!pdev->dev.of_node) {
|
||||
dev_err(&pdev->dev, "Device tree node not found\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
reset_data = devm_kzalloc(dev, sizeof(*reset_data), GFP_KERNEL);
|
||||
if (!reset_data)
|
||||
return -ENOMEM;
|
||||
|
||||
reset_data->base = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(reset_data->base))
|
||||
return PTR_ERR(reset_data->base);
|
||||
|
||||
reset_data->rcdev.owner = THIS_MODULE;
|
||||
reset_data->rcdev.nr_resets = MA35D1_RESET_COUNT;
|
||||
reset_data->rcdev.ops = &ma35d1_reset_ops;
|
||||
reset_data->rcdev.of_node = dev->of_node;
|
||||
reset_data->restart_handler.notifier_call = ma35d1_restart_handler;
|
||||
reset_data->restart_handler.priority = 192;
|
||||
spin_lock_init(&reset_data->lock);
|
||||
|
||||
err = register_restart_handler(&reset_data->restart_handler);
|
||||
if (err)
|
||||
dev_warn(&pdev->dev, "failed to register restart handler\n");
|
||||
|
||||
return devm_reset_controller_register(dev, &reset_data->rcdev);
|
||||
}
|
||||
|
||||
static struct platform_driver ma35d1_reset_driver = {
|
||||
.probe = ma35d1_reset_probe,
|
||||
.driver = {
|
||||
.name = "ma35d1-reset",
|
||||
.of_match_table = ma35d1_reset_dt_ids,
|
||||
},
|
||||
};
|
||||
|
||||
builtin_platform_driver(ma35d1_reset_driver);
|
253
include/dt-bindings/clock/nuvoton,ma35d1-clk.h
Normal file
253
include/dt-bindings/clock/nuvoton,ma35d1-clk.h
Normal file
@ -0,0 +1,253 @@
|
||||
/* SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) */
|
||||
/*
|
||||
* Copyright (C) 2023 Nuvoton Technologies.
|
||||
*/
|
||||
|
||||
#ifndef __DT_BINDINGS_CLOCK_NUVOTON_MA35D1_CLK_H
|
||||
#define __DT_BINDINGS_CLOCK_NUVOTON_MA35D1_CLK_H
|
||||
|
||||
/* external and internal oscillator clocks */
|
||||
#define HXT 0
|
||||
#define HXT_GATE 1
|
||||
#define LXT 2
|
||||
#define LXT_GATE 3
|
||||
#define HIRC 4
|
||||
#define HIRC_GATE 5
|
||||
#define LIRC 6
|
||||
#define LIRC_GATE 7
|
||||
/* PLLs */
|
||||
#define CAPLL 8
|
||||
#define SYSPLL 9
|
||||
#define DDRPLL 10
|
||||
#define APLL 11
|
||||
#define EPLL 12
|
||||
#define VPLL 13
|
||||
/* EPLL divider */
|
||||
#define EPLL_DIV2 14
|
||||
#define EPLL_DIV4 15
|
||||
#define EPLL_DIV8 16
|
||||
/* CPU clock, system clock, AXI, HCLK and PCLK */
|
||||
#define CA35CLK_MUX 17
|
||||
#define AXICLK_DIV2 18
|
||||
#define AXICLK_DIV4 19
|
||||
#define AXICLK_MUX 20
|
||||
#define SYSCLK0_MUX 21
|
||||
#define SYSCLK1_MUX 22
|
||||
#define SYSCLK1_DIV2 23
|
||||
#define HCLK0 24
|
||||
#define HCLK1 25
|
||||
#define HCLK2 26
|
||||
#define PCLK0 27
|
||||
#define PCLK1 28
|
||||
#define PCLK2 29
|
||||
#define HCLK3 30
|
||||
#define PCLK3 31
|
||||
#define PCLK4 32
|
||||
/* AXI and AHB peripheral clocks */
|
||||
#define USBPHY0 33
|
||||
#define USBPHY1 34
|
||||
#define DDR0_GATE 35
|
||||
#define DDR6_GATE 36
|
||||
#define CAN0_MUX 37
|
||||
#define CAN0_DIV 38
|
||||
#define CAN0_GATE 39
|
||||
#define CAN1_MUX 40
|
||||
#define CAN1_DIV 41
|
||||
#define CAN1_GATE 42
|
||||
#define CAN2_MUX 43
|
||||
#define CAN2_DIV 44
|
||||
#define CAN2_GATE 45
|
||||
#define CAN3_MUX 46
|
||||
#define CAN3_DIV 47
|
||||
#define CAN3_GATE 48
|
||||
#define SDH0_MUX 49
|
||||
#define SDH0_GATE 50
|
||||
#define SDH1_MUX 51
|
||||
#define SDH1_GATE 52
|
||||
#define NAND_GATE 53
|
||||
#define USBD_GATE 54
|
||||
#define USBH_GATE 55
|
||||
#define HUSBH0_GATE 56
|
||||
#define HUSBH1_GATE 57
|
||||
#define GFX_MUX 58
|
||||
#define GFX_GATE 59
|
||||
#define VC8K_GATE 60
|
||||
#define DCU_MUX 61
|
||||
#define DCU_GATE 62
|
||||
#define DCUP_DIV 63
|
||||
#define EMAC0_GATE 64
|
||||
#define EMAC1_GATE 65
|
||||
#define CCAP0_MUX 66
|
||||
#define CCAP0_DIV 67
|
||||
#define CCAP0_GATE 68
|
||||
#define CCAP1_MUX 69
|
||||
#define CCAP1_DIV 70
|
||||
#define CCAP1_GATE 71
|
||||
#define PDMA0_GATE 72
|
||||
#define PDMA1_GATE 73
|
||||
#define PDMA2_GATE 74
|
||||
#define PDMA3_GATE 75
|
||||
#define WH0_GATE 76
|
||||
#define WH1_GATE 77
|
||||
#define HWS_GATE 78
|
||||
#define EBI_GATE 79
|
||||
#define SRAM0_GATE 80
|
||||
#define SRAM1_GATE 81
|
||||
#define ROM_GATE 82
|
||||
#define TRA_GATE 83
|
||||
#define DBG_MUX 84
|
||||
#define DBG_GATE 85
|
||||
#define CKO_MUX 86
|
||||
#define CKO_DIV 87
|
||||
#define CKO_GATE 88
|
||||
#define GTMR_GATE 89
|
||||
#define GPA_GATE 90
|
||||
#define GPB_GATE 91
|
||||
#define GPC_GATE 92
|
||||
#define GPD_GATE 93
|
||||
#define GPE_GATE 94
|
||||
#define GPF_GATE 95
|
||||
#define GPG_GATE 96
|
||||
#define GPH_GATE 97
|
||||
#define GPI_GATE 98
|
||||
#define GPJ_GATE 99
|
||||
#define GPK_GATE 100
|
||||
#define GPL_GATE 101
|
||||
#define GPM_GATE 102
|
||||
#define GPN_GATE 103
|
||||
/* APB peripheral clocks */
|
||||
#define TMR0_MUX 104
|
||||
#define TMR0_GATE 105
|
||||
#define TMR1_MUX 106
|
||||
#define TMR1_GATE 107
|
||||
#define TMR2_MUX 108
|
||||
#define TMR2_GATE 109
|
||||
#define TMR3_MUX 110
|
||||
#define TMR3_GATE 111
|
||||
#define TMR4_MUX 112
|
||||
#define TMR4_GATE 113
|
||||
#define TMR5_MUX 114
|
||||
#define TMR5_GATE 115
|
||||
#define TMR6_MUX 116
|
||||
#define TMR6_GATE 117
|
||||
#define TMR7_MUX 118
|
||||
#define TMR7_GATE 119
|
||||
#define TMR8_MUX 120
|
||||
#define TMR8_GATE 121
|
||||
#define TMR9_MUX 122
|
||||
#define TMR9_GATE 123
|
||||
#define TMR10_MUX 124
|
||||
#define TMR10_GATE 125
|
||||
#define TMR11_MUX 126
|
||||
#define TMR11_GATE 127
|
||||
#define UART0_MUX 128
|
||||
#define UART0_DIV 129
|
||||
#define UART0_GATE 130
|
||||
#define UART1_MUX 131
|
||||
#define UART1_DIV 132
|
||||
#define UART1_GATE 133
|
||||
#define UART2_MUX 134
|
||||
#define UART2_DIV 135
|
||||
#define UART2_GATE 136
|
||||
#define UART3_MUX 137
|
||||
#define UART3_DIV 138
|
||||
#define UART3_GATE 139
|
||||
#define UART4_MUX 140
|
||||
#define UART4_DIV 141
|
||||
#define UART4_GATE 142
|
||||
#define UART5_MUX 143
|
||||
#define UART5_DIV 144
|
||||
#define UART5_GATE 145
|
||||
#define UART6_MUX 146
|
||||
#define UART6_DIV 147
|
||||
#define UART6_GATE 148
|
||||
#define UART7_MUX 149
|
||||
#define UART7_DIV 150
|
||||
#define UART7_GATE 151
|
||||
#define UART8_MUX 152
|
||||
#define UART8_DIV 153
|
||||
#define UART8_GATE 154
|
||||
#define UART9_MUX 155
|
||||
#define UART9_DIV 156
|
||||
#define UART9_GATE 157
|
||||
#define UART10_MUX 158
|
||||
#define UART10_DIV 159
|
||||
#define UART10_GATE 160
|
||||
#define UART11_MUX 161
|
||||
#define UART11_DIV 162
|
||||
#define UART11_GATE 163
|
||||
#define UART12_MUX 164
|
||||
#define UART12_DIV 165
|
||||
#define UART12_GATE 166
|
||||
#define UART13_MUX 167
|
||||
#define UART13_DIV 168
|
||||
#define UART13_GATE 169
|
||||
#define UART14_MUX 170
|
||||
#define UART14_DIV 171
|
||||
#define UART14_GATE 172
|
||||
#define UART15_MUX 173
|
||||
#define UART15_DIV 174
|
||||
#define UART15_GATE 175
|
||||
#define UART16_MUX 176
|
||||
#define UART16_DIV 177
|
||||
#define UART16_GATE 178
|
||||
#define RTC_GATE 179
|
||||
#define DDR_GATE 180
|
||||
#define KPI_MUX 181
|
||||
#define KPI_DIV 182
|
||||
#define KPI_GATE 183
|
||||
#define I2C0_GATE 184
|
||||
#define I2C1_GATE 185
|
||||
#define I2C2_GATE 186
|
||||
#define I2C3_GATE 187
|
||||
#define I2C4_GATE 188
|
||||
#define I2C5_GATE 189
|
||||
#define QSPI0_MUX 190
|
||||
#define QSPI0_GATE 191
|
||||
#define QSPI1_MUX 192
|
||||
#define QSPI1_GATE 193
|
||||
#define SMC0_MUX 194
|
||||
#define SMC0_DIV 195
|
||||
#define SMC0_GATE 196
|
||||
#define SMC1_MUX 197
|
||||
#define SMC1_DIV 198
|
||||
#define SMC1_GATE 199
|
||||
#define WDT0_MUX 200
|
||||
#define WDT0_GATE 201
|
||||
#define WDT1_MUX 202
|
||||
#define WDT1_GATE 203
|
||||
#define WDT2_MUX 204
|
||||
#define WDT2_GATE 205
|
||||
#define WWDT0_MUX 206
|
||||
#define WWDT1_MUX 207
|
||||
#define WWDT2_MUX 208
|
||||
#define EPWM0_GATE 209
|
||||
#define EPWM1_GATE 210
|
||||
#define EPWM2_GATE 211
|
||||
#define I2S0_MUX 212
|
||||
#define I2S0_GATE 213
|
||||
#define I2S1_MUX 214
|
||||
#define I2S1_GATE 215
|
||||
#define SSMCC_GATE 216
|
||||
#define SSPCC_GATE 217
|
||||
#define SPI0_MUX 218
|
||||
#define SPI0_GATE 219
|
||||
#define SPI1_MUX 220
|
||||
#define SPI1_GATE 221
|
||||
#define SPI2_MUX 222
|
||||
#define SPI2_GATE 223
|
||||
#define SPI3_MUX 224
|
||||
#define SPI3_GATE 225
|
||||
#define ECAP0_GATE 226
|
||||
#define ECAP1_GATE 227
|
||||
#define ECAP2_GATE 228
|
||||
#define QEI0_GATE 229
|
||||
#define QEI1_GATE 230
|
||||
#define QEI2_GATE 231
|
||||
#define ADC_DIV 232
|
||||
#define ADC_GATE 233
|
||||
#define EADC_DIV 234
|
||||
#define EADC_GATE 235
|
||||
#define CLK_MAX_IDX 236
|
||||
|
||||
#endif /* __DT_BINDINGS_CLOCK_NUVOTON_MA35D1_CLK_H */
|
@ -37,6 +37,9 @@
|
||||
#define STM32MP_PKG_AB 0x2
|
||||
#define STM32MP_PKG_AC 0x4
|
||||
#define STM32MP_PKG_AD 0x8
|
||||
#define STM32MP_PKG_AI 0x100
|
||||
#define STM32MP_PKG_AK 0x400
|
||||
#define STM32MP_PKG_AL 0x800
|
||||
|
||||
#endif /* _DT_BINDINGS_STM32_PINFUNC_H */
|
||||
|
||||
|
108
include/dt-bindings/reset/nuvoton,ma35d1-reset.h
Normal file
108
include/dt-bindings/reset/nuvoton,ma35d1-reset.h
Normal file
@ -0,0 +1,108 @@
|
||||
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
|
||||
/*
|
||||
* Copyright (C) 2023 Nuvoton Technologies.
|
||||
* Author: Chi-Fen Li <cfli0@nuvoton.com>
|
||||
*
|
||||
* Device Tree binding constants for MA35D1 reset controller.
|
||||
*/
|
||||
|
||||
#ifndef __DT_BINDINGS_RESET_MA35D1_H
|
||||
#define __DT_BINDINGS_RESET_MA35D1_H
|
||||
|
||||
#define MA35D1_RESET_CHIP 0
|
||||
#define MA35D1_RESET_CA35CR0 1
|
||||
#define MA35D1_RESET_CA35CR1 2
|
||||
#define MA35D1_RESET_CM4 3
|
||||
#define MA35D1_RESET_PDMA0 4
|
||||
#define MA35D1_RESET_PDMA1 5
|
||||
#define MA35D1_RESET_PDMA2 6
|
||||
#define MA35D1_RESET_PDMA3 7
|
||||
#define MA35D1_RESET_DISP 8
|
||||
#define MA35D1_RESET_VCAP0 9
|
||||
#define MA35D1_RESET_VCAP1 10
|
||||
#define MA35D1_RESET_GFX 11
|
||||
#define MA35D1_RESET_VDEC 12
|
||||
#define MA35D1_RESET_WHC0 13
|
||||
#define MA35D1_RESET_WHC1 14
|
||||
#define MA35D1_RESET_GMAC0 15
|
||||
#define MA35D1_RESET_GMAC1 16
|
||||
#define MA35D1_RESET_HWSEM 17
|
||||
#define MA35D1_RESET_EBI 18
|
||||
#define MA35D1_RESET_HSUSBH0 19
|
||||
#define MA35D1_RESET_HSUSBH1 20
|
||||
#define MA35D1_RESET_HSUSBD 21
|
||||
#define MA35D1_RESET_USBHL 22
|
||||
#define MA35D1_RESET_SDH0 23
|
||||
#define MA35D1_RESET_SDH1 24
|
||||
#define MA35D1_RESET_NAND 25
|
||||
#define MA35D1_RESET_GPIO 26
|
||||
#define MA35D1_RESET_MCTLP 27
|
||||
#define MA35D1_RESET_MCTLC 28
|
||||
#define MA35D1_RESET_DDRPUB 29
|
||||
#define MA35D1_RESET_TMR0 30
|
||||
#define MA35D1_RESET_TMR1 31
|
||||
#define MA35D1_RESET_TMR2 32
|
||||
#define MA35D1_RESET_TMR3 33
|
||||
#define MA35D1_RESET_I2C0 34
|
||||
#define MA35D1_RESET_I2C1 35
|
||||
#define MA35D1_RESET_I2C2 36
|
||||
#define MA35D1_RESET_I2C3 37
|
||||
#define MA35D1_RESET_QSPI0 38
|
||||
#define MA35D1_RESET_SPI0 39
|
||||
#define MA35D1_RESET_SPI1 40
|
||||
#define MA35D1_RESET_SPI2 41
|
||||
#define MA35D1_RESET_UART0 42
|
||||
#define MA35D1_RESET_UART1 43
|
||||
#define MA35D1_RESET_UART2 44
|
||||
#define MA35D1_RESET_UART3 45
|
||||
#define MA35D1_RESET_UART4 46
|
||||
#define MA35D1_RESET_UART5 47
|
||||
#define MA35D1_RESET_UART6 48
|
||||
#define MA35D1_RESET_UART7 49
|
||||
#define MA35D1_RESET_CANFD0 50
|
||||
#define MA35D1_RESET_CANFD1 51
|
||||
#define MA35D1_RESET_EADC0 52
|
||||
#define MA35D1_RESET_I2S0 53
|
||||
#define MA35D1_RESET_SC0 54
|
||||
#define MA35D1_RESET_SC1 55
|
||||
#define MA35D1_RESET_QSPI1 56
|
||||
#define MA35D1_RESET_SPI3 57
|
||||
#define MA35D1_RESET_EPWM0 58
|
||||
#define MA35D1_RESET_EPWM1 59
|
||||
#define MA35D1_RESET_QEI0 60
|
||||
#define MA35D1_RESET_QEI1 61
|
||||
#define MA35D1_RESET_ECAP0 62
|
||||
#define MA35D1_RESET_ECAP1 63
|
||||
#define MA35D1_RESET_CANFD2 64
|
||||
#define MA35D1_RESET_ADC0 65
|
||||
#define MA35D1_RESET_TMR4 66
|
||||
#define MA35D1_RESET_TMR5 67
|
||||
#define MA35D1_RESET_TMR6 68
|
||||
#define MA35D1_RESET_TMR7 69
|
||||
#define MA35D1_RESET_TMR8 70
|
||||
#define MA35D1_RESET_TMR9 71
|
||||
#define MA35D1_RESET_TMR10 72
|
||||
#define MA35D1_RESET_TMR11 73
|
||||
#define MA35D1_RESET_UART8 74
|
||||
#define MA35D1_RESET_UART9 75
|
||||
#define MA35D1_RESET_UART10 76
|
||||
#define MA35D1_RESET_UART11 77
|
||||
#define MA35D1_RESET_UART12 78
|
||||
#define MA35D1_RESET_UART13 79
|
||||
#define MA35D1_RESET_UART14 80
|
||||
#define MA35D1_RESET_UART15 81
|
||||
#define MA35D1_RESET_UART16 82
|
||||
#define MA35D1_RESET_I2S1 83
|
||||
#define MA35D1_RESET_I2C4 84
|
||||
#define MA35D1_RESET_I2C5 85
|
||||
#define MA35D1_RESET_EPWM2 86
|
||||
#define MA35D1_RESET_ECAP2 87
|
||||
#define MA35D1_RESET_QEI2 88
|
||||
#define MA35D1_RESET_CANFD3 89
|
||||
#define MA35D1_RESET_KPI 90
|
||||
#define MA35D1_RESET_GIC 91
|
||||
#define MA35D1_RESET_SSMCC 92
|
||||
#define MA35D1_RESET_SSPCC 93
|
||||
#define MA35D1_RESET_COUNT 94
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user