mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
Merge e8bc52cb8d ("Merge tag 'driver-core-6.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core") into android-mainline
Steps on the way to 6.1-rc1 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I619f43c887f986bf2a8f464ebd8ffed3ca50a648
This commit is contained in:
@@ -227,6 +227,17 @@ Contact: dmaengine@vger.kernel.org
|
||||
Description: Indicate the number of retires for an enqcmds submission on a sharedwq.
|
||||
A max value to set attribute is capped at 64.
|
||||
|
||||
What: /sys/bus/dsa/devices/wq<m>.<n>/op_config
|
||||
Date: Sept 14, 2022
|
||||
KernelVersion: 6.0.0
|
||||
Contact: dmaengine@vger.kernel.org
|
||||
Description: Shows the operation capability bits displayed in bitmap format
|
||||
presented by %*pb printk() output format specifier.
|
||||
The attribute can be configured when the WQ is disabled in
|
||||
order to configure the WQ to accept specific bits that
|
||||
correlates to the operations allowed. It's visible only
|
||||
on platforms that support the capability.
|
||||
|
||||
What: /sys/bus/dsa/devices/engine<m>.<n>/group_id
|
||||
Date: Oct 25, 2019
|
||||
KernelVersion: 5.6.0
|
||||
@@ -255,3 +266,27 @@ Contact: dmaengine@vger.kernel.org
|
||||
Description: Indicates the number of Read Buffers reserved for the use of
|
||||
engines in the group. See DSA spec v1.2 9.2.18 GRPCFG Read Buffers
|
||||
Reserved.
|
||||
|
||||
What: /sys/bus/dsa/devices/group<m>.<n>/desc_progress_limit
|
||||
Date: Sept 14, 2022
|
||||
KernelVersion: 6.0.0
|
||||
Contact: dmaengine@vger.kernel.org
|
||||
Description: Allows control of the number of work descriptors that can be
|
||||
concurrently processed by an engine in the group as a fraction
|
||||
of the Maximum Work Descriptors in Progress value specified in
|
||||
the ENGCAP register. The acceptable values are 0 (default),
|
||||
1 (1/2 of max value), 2 (1/4 of the max value), and 3 (1/8 of
|
||||
the max value). It's visible only on platforms that support
|
||||
the capability.
|
||||
|
||||
What: /sys/bus/dsa/devices/group<m>.<n>/batch_progress_limit
|
||||
Date: Sept 14, 2022
|
||||
KernelVersion: 6.0.0
|
||||
Contact: dmaengine@vger.kernel.org
|
||||
Description: Allows control of the number of batch descriptors that can be
|
||||
concurrently processed by an engine in the group as a fraction
|
||||
of the Maximum Batch Descriptors in Progress value specified in
|
||||
the ENGCAP register. The acceptable values are 0 (default),
|
||||
1 (1/2 of max value), 2 (1/4 of the max value), and 3 (1/8 of
|
||||
the max value). It's visible only on platforms that support
|
||||
the capability.
|
||||
|
||||
@@ -153,7 +153,7 @@ Date: Jan 2020
|
||||
KernelVersion: 5.5
|
||||
Contact: Mika Westerberg <mika.westerberg@linux.intel.com>
|
||||
Description: This attribute reports number of RX lanes the device is
|
||||
using simultaneusly through its upstream port.
|
||||
using simultaneously through its upstream port.
|
||||
|
||||
What: /sys/bus/thunderbolt/devices/.../tx_speed
|
||||
Date: Jan 2020
|
||||
@@ -167,7 +167,7 @@ Date: Jan 2020
|
||||
KernelVersion: 5.5
|
||||
Contact: Mika Westerberg <mika.westerberg@linux.intel.com>
|
||||
Description: This attribute reports number of TX lanes the device is
|
||||
using simultaneusly through its upstream port.
|
||||
using simultaneously through its upstream port.
|
||||
|
||||
What: /sys/bus/thunderbolt/devices/.../vendor
|
||||
Date: Sep 2017
|
||||
|
||||
@@ -5,143 +5,115 @@ Dynamic debug
|
||||
Introduction
|
||||
============
|
||||
|
||||
This document describes how to use the dynamic debug (dyndbg) feature.
|
||||
Dynamic debug allows you to dynamically enable/disable kernel
|
||||
debug-print code to obtain additional kernel information.
|
||||
|
||||
Dynamic debug is designed to allow you to dynamically enable/disable
|
||||
kernel code to obtain additional kernel information. Currently, if
|
||||
``CONFIG_DYNAMIC_DEBUG`` is set, then all ``pr_debug()``/``dev_dbg()`` and
|
||||
``print_hex_dump_debug()``/``print_hex_dump_bytes()`` calls can be dynamically
|
||||
enabled per-callsite.
|
||||
If ``/proc/dynamic_debug/control`` exists, your kernel has dynamic
|
||||
debug. You'll need root access (sudo su) to use this.
|
||||
|
||||
If you do not want to enable dynamic debug globally (i.e. in some embedded
|
||||
system), you may set ``CONFIG_DYNAMIC_DEBUG_CORE`` as basic support of dynamic
|
||||
debug and add ``ccflags := -DDYNAMIC_DEBUG_MODULE`` into the Makefile of any
|
||||
modules which you'd like to dynamically debug later.
|
||||
Dynamic debug provides:
|
||||
|
||||
If ``CONFIG_DYNAMIC_DEBUG`` is not set, ``print_hex_dump_debug()`` is just
|
||||
shortcut for ``print_hex_dump(KERN_DEBUG)``.
|
||||
* a Catalog of all *prdbgs* in your kernel.
|
||||
``cat /proc/dynamic_debug/control`` to see them.
|
||||
|
||||
For ``print_hex_dump_debug()``/``print_hex_dump_bytes()``, format string is
|
||||
its ``prefix_str`` argument, if it is constant string; or ``hexdump``
|
||||
in case ``prefix_str`` is built dynamically.
|
||||
|
||||
Dynamic debug has even more useful features:
|
||||
|
||||
* Simple query language allows turning on and off debugging
|
||||
statements by matching any combination of 0 or 1 of:
|
||||
* a Simple query/command language to alter *prdbgs* by selecting on
|
||||
any combination of 0 or 1 of:
|
||||
|
||||
- source filename
|
||||
- function name
|
||||
- line number (including ranges of line numbers)
|
||||
- module name
|
||||
- format string
|
||||
|
||||
* Provides a debugfs control file: ``<debugfs>/dynamic_debug/control``
|
||||
which can be read to display the complete list of known debug
|
||||
statements, to help guide you
|
||||
|
||||
Controlling dynamic debug Behaviour
|
||||
===================================
|
||||
|
||||
The behaviour of ``pr_debug()``/``dev_dbg()`` are controlled via writing to a
|
||||
control file in the 'debugfs' filesystem. Thus, you must first mount
|
||||
the debugfs filesystem, in order to make use of this feature.
|
||||
Subsequently, we refer to the control file as:
|
||||
``<debugfs>/dynamic_debug/control``. For example, if you want to enable
|
||||
printing from source file ``svcsock.c``, line 1603 you simply do::
|
||||
|
||||
nullarbor:~ # echo 'file svcsock.c line 1603 +p' >
|
||||
<debugfs>/dynamic_debug/control
|
||||
|
||||
If you make a mistake with the syntax, the write will fail thus::
|
||||
|
||||
nullarbor:~ # echo 'file svcsock.c wtf 1 +p' >
|
||||
<debugfs>/dynamic_debug/control
|
||||
-bash: echo: write error: Invalid argument
|
||||
|
||||
Note, for systems without 'debugfs' enabled, the control file can be
|
||||
found in ``/proc/dynamic_debug/control``.
|
||||
- class name (as known/declared by each module)
|
||||
|
||||
Viewing Dynamic Debug Behaviour
|
||||
===============================
|
||||
|
||||
You can view the currently configured behaviour of all the debug
|
||||
statements via::
|
||||
You can view the currently configured behaviour in the *prdbg* catalog::
|
||||
|
||||
nullarbor:~ # cat <debugfs>/dynamic_debug/control
|
||||
:#> head -n7 /proc/dynamic_debug/control
|
||||
# filename:lineno [module]function flags format
|
||||
net/sunrpc/svc_rdma.c:323 [svcxprt_rdma]svc_rdma_cleanup =_ "SVCRDMA Module Removed, deregister RPC RDMA transport\012"
|
||||
net/sunrpc/svc_rdma.c:341 [svcxprt_rdma]svc_rdma_init =_ "\011max_inline : %d\012"
|
||||
net/sunrpc/svc_rdma.c:340 [svcxprt_rdma]svc_rdma_init =_ "\011sq_depth : %d\012"
|
||||
net/sunrpc/svc_rdma.c:338 [svcxprt_rdma]svc_rdma_init =_ "\011max_requests : %d\012"
|
||||
...
|
||||
init/main.c:1179 [main]initcall_blacklist =_ "blacklisting initcall %s\012
|
||||
init/main.c:1218 [main]initcall_blacklisted =_ "initcall %s blacklisted\012"
|
||||
init/main.c:1424 [main]run_init_process =_ " with arguments:\012"
|
||||
init/main.c:1426 [main]run_init_process =_ " %s\012"
|
||||
init/main.c:1427 [main]run_init_process =_ " with environment:\012"
|
||||
init/main.c:1429 [main]run_init_process =_ " %s\012"
|
||||
|
||||
The 3rd space-delimited column shows the current flags, preceded by
|
||||
a ``=`` for easy use with grep/cut. ``=p`` shows enabled callsites.
|
||||
|
||||
You can also apply standard Unix text manipulation filters to this
|
||||
data, e.g.::
|
||||
Controlling dynamic debug Behaviour
|
||||
===================================
|
||||
|
||||
nullarbor:~ # grep -i rdma <debugfs>/dynamic_debug/control | wc -l
|
||||
62
|
||||
The behaviour of *prdbg* sites are controlled by writing
|
||||
query/commands to the control file. Example::
|
||||
|
||||
nullarbor:~ # grep -i tcp <debugfs>/dynamic_debug/control | wc -l
|
||||
42
|
||||
# grease the interface
|
||||
:#> alias ddcmd='echo $* > /proc/dynamic_debug/control'
|
||||
|
||||
The third column shows the currently enabled flags for each debug
|
||||
statement callsite (see below for definitions of the flags). The
|
||||
default value, with no flags enabled, is ``=_``. So you can view all
|
||||
the debug statement callsites with any non-default flags::
|
||||
:#> ddcmd '-p; module main func run* +p'
|
||||
:#> grep =p /proc/dynamic_debug/control
|
||||
init/main.c:1424 [main]run_init_process =p " with arguments:\012"
|
||||
init/main.c:1426 [main]run_init_process =p " %s\012"
|
||||
init/main.c:1427 [main]run_init_process =p " with environment:\012"
|
||||
init/main.c:1429 [main]run_init_process =p " %s\012"
|
||||
|
||||
nullarbor:~ # awk '$3 != "=_"' <debugfs>/dynamic_debug/control
|
||||
# filename:lineno [module]function flags format
|
||||
net/sunrpc/svcsock.c:1603 [sunrpc]svc_send p "svc_process: st_sendto returned %d\012"
|
||||
Error messages go to console/syslog::
|
||||
|
||||
:#> ddcmd mode foo +p
|
||||
dyndbg: unknown keyword "mode"
|
||||
dyndbg: query parse failed
|
||||
bash: echo: write error: Invalid argument
|
||||
|
||||
If debugfs is also enabled and mounted, ``dynamic_debug/control`` is
|
||||
also under the mount-dir, typically ``/sys/kernel/debug/``.
|
||||
|
||||
Command Language Reference
|
||||
==========================
|
||||
|
||||
At the lexical level, a command comprises a sequence of words separated
|
||||
At the basic lexical level, a command is a sequence of words separated
|
||||
by spaces or tabs. So these are all equivalent::
|
||||
|
||||
nullarbor:~ # echo -n 'file svcsock.c line 1603 +p' >
|
||||
<debugfs>/dynamic_debug/control
|
||||
nullarbor:~ # echo -n ' file svcsock.c line 1603 +p ' >
|
||||
<debugfs>/dynamic_debug/control
|
||||
nullarbor:~ # echo -n 'file svcsock.c line 1603 +p' >
|
||||
<debugfs>/dynamic_debug/control
|
||||
:#> ddcmd file svcsock.c line 1603 +p
|
||||
:#> ddcmd "file svcsock.c line 1603 +p"
|
||||
:#> ddcmd ' file svcsock.c line 1603 +p '
|
||||
|
||||
Command submissions are bounded by a write() system call.
|
||||
Multiple commands can be written together, separated by ``;`` or ``\n``::
|
||||
|
||||
~# echo "func pnpacpi_get_resources +p; func pnp_assign_mem +p" \
|
||||
> <debugfs>/dynamic_debug/control
|
||||
:#> ddcmd "func pnpacpi_get_resources +p; func pnp_assign_mem +p"
|
||||
:#> ddcmd <<"EOC"
|
||||
func pnpacpi_get_resources +p
|
||||
func pnp_assign_mem +p
|
||||
EOC
|
||||
:#> cat query-batch-file > /proc/dynamic_debug/control
|
||||
|
||||
If your query set is big, you can batch them too::
|
||||
You can also use wildcards in each query term. The match rule supports
|
||||
``*`` (matches zero or more characters) and ``?`` (matches exactly one
|
||||
character). For example, you can match all usb drivers::
|
||||
|
||||
~# cat query-batch-file > <debugfs>/dynamic_debug/control
|
||||
:#> ddcmd file "drivers/usb/*" +p # "" to suppress shell expansion
|
||||
|
||||
Another way is to use wildcards. The match rule supports ``*`` (matches
|
||||
zero or more characters) and ``?`` (matches exactly one character). For
|
||||
example, you can match all usb drivers::
|
||||
|
||||
~# echo "file drivers/usb/* +p" > <debugfs>/dynamic_debug/control
|
||||
|
||||
At the syntactical level, a command comprises a sequence of match
|
||||
specifications, followed by a flags change specification::
|
||||
Syntactically, a command is pairs of keyword values, followed by a
|
||||
flags change or setting::
|
||||
|
||||
command ::= match-spec* flags-spec
|
||||
|
||||
The match-spec's are used to choose a subset of the known pr_debug()
|
||||
callsites to which to apply the flags-spec. Think of them as a query
|
||||
with implicit ANDs between each pair. Note that an empty list of
|
||||
match-specs will select all debug statement callsites.
|
||||
The match-spec's select *prdbgs* from the catalog, upon which to apply
|
||||
the flags-spec, all constraints are ANDed together. An absent keyword
|
||||
is the same as keyword "*".
|
||||
|
||||
A match specification comprises a keyword, which controls the
|
||||
attribute of the callsite to be compared, and a value to compare
|
||||
against. Possible keywords are:::
|
||||
|
||||
A match specification is a keyword, which selects the attribute of
|
||||
the callsite to be compared, and a value to compare against. Possible
|
||||
keywords are:::
|
||||
|
||||
match-spec ::= 'func' string |
|
||||
'file' string |
|
||||
'module' string |
|
||||
'format' string |
|
||||
'class' string |
|
||||
'line' line-range
|
||||
|
||||
line-range ::= lineno |
|
||||
@@ -203,6 +175,16 @@ format
|
||||
format "nfsd: SETATTR" // a neater way to match a format with whitespace
|
||||
format 'nfsd: SETATTR' // yet another way to match a format with whitespace
|
||||
|
||||
class
|
||||
The given class_name is validated against each module, which may
|
||||
have declared a list of known class_names. If the class_name is
|
||||
found for a module, callsite & class matching and adjustment
|
||||
proceeds. Examples::
|
||||
|
||||
class DRM_UT_KMS # a DRM.debug category
|
||||
class JUNK # silent non-match
|
||||
// class TLD_* # NOTICE: no wildcard in class names
|
||||
|
||||
line
|
||||
The given line number or range of line numbers is compared
|
||||
against the line number of each ``pr_debug()`` callsite. A single
|
||||
@@ -228,17 +210,16 @@ of the characters::
|
||||
The flags are::
|
||||
|
||||
p enables the pr_debug() callsite.
|
||||
f Include the function name in the printed message
|
||||
l Include line number in the printed message
|
||||
m Include module name in the printed message
|
||||
t Include thread ID in messages not generated from interrupt context
|
||||
_ No flags are set. (Or'd with others on input)
|
||||
_ enables no flags.
|
||||
|
||||
For ``print_hex_dump_debug()`` and ``print_hex_dump_bytes()``, only ``p`` flag
|
||||
have meaning, other flags ignored.
|
||||
Decorator flags add to the message-prefix, in order:
|
||||
t Include thread ID, or <intr>
|
||||
m Include module name
|
||||
f Include the function name
|
||||
l Include line number
|
||||
|
||||
For display, the flags are preceded by ``=``
|
||||
(mnemonic: what the flags are currently equal to).
|
||||
For ``print_hex_dump_debug()`` and ``print_hex_dump_bytes()``, only
|
||||
the ``p`` flag has meaning, other flags are ignored.
|
||||
|
||||
Note the regexp ``^[-+=][flmpt_]+$`` matches a flags specification.
|
||||
To clear all flags at once, use ``=_`` or ``-flmpt``.
|
||||
@@ -313,7 +294,7 @@ For ``CONFIG_DYNAMIC_DEBUG`` kernels, any settings given at boot-time (or
|
||||
enabled by ``-DDEBUG`` flag during compilation) can be disabled later via
|
||||
the debugfs interface if the debug messages are no longer needed::
|
||||
|
||||
echo "module module_name -p" > <debugfs>/dynamic_debug/control
|
||||
echo "module module_name -p" > /proc/dynamic_debug/control
|
||||
|
||||
Examples
|
||||
========
|
||||
@@ -321,37 +302,31 @@ Examples
|
||||
::
|
||||
|
||||
// enable the message at line 1603 of file svcsock.c
|
||||
nullarbor:~ # echo -n 'file svcsock.c line 1603 +p' >
|
||||
<debugfs>/dynamic_debug/control
|
||||
:#> ddcmd 'file svcsock.c line 1603 +p'
|
||||
|
||||
// enable all the messages in file svcsock.c
|
||||
nullarbor:~ # echo -n 'file svcsock.c +p' >
|
||||
<debugfs>/dynamic_debug/control
|
||||
:#> ddcmd 'file svcsock.c +p'
|
||||
|
||||
// enable all the messages in the NFS server module
|
||||
nullarbor:~ # echo -n 'module nfsd +p' >
|
||||
<debugfs>/dynamic_debug/control
|
||||
:#> ddcmd 'module nfsd +p'
|
||||
|
||||
// enable all 12 messages in the function svc_process()
|
||||
nullarbor:~ # echo -n 'func svc_process +p' >
|
||||
<debugfs>/dynamic_debug/control
|
||||
:#> ddcmd 'func svc_process +p'
|
||||
|
||||
// disable all 12 messages in the function svc_process()
|
||||
nullarbor:~ # echo -n 'func svc_process -p' >
|
||||
<debugfs>/dynamic_debug/control
|
||||
:#> ddcmd 'func svc_process -p'
|
||||
|
||||
// enable messages for NFS calls READ, READLINK, READDIR and READDIR+.
|
||||
nullarbor:~ # echo -n 'format "nfsd: READ" +p' >
|
||||
<debugfs>/dynamic_debug/control
|
||||
:#> ddcmd 'format "nfsd: READ" +p'
|
||||
|
||||
// enable messages in files of which the paths include string "usb"
|
||||
nullarbor:~ # echo -n 'file *usb* +p' > <debugfs>/dynamic_debug/control
|
||||
:#> ddcmd 'file *usb* +p' > /proc/dynamic_debug/control
|
||||
|
||||
// enable all messages
|
||||
nullarbor:~ # echo -n '+p' > <debugfs>/dynamic_debug/control
|
||||
:#> ddcmd '+p' > /proc/dynamic_debug/control
|
||||
|
||||
// add module, function to all enabled messages
|
||||
nullarbor:~ # echo -n '+mf' > <debugfs>/dynamic_debug/control
|
||||
:#> ddcmd '+mf' > /proc/dynamic_debug/control
|
||||
|
||||
// boot-args example, with newlines and comments for readability
|
||||
Kernel command line: ...
|
||||
@@ -364,3 +339,38 @@ Examples
|
||||
dyndbg="file init/* +p #cmt ; func parse_one +p"
|
||||
// enable pr_debugs in 2 functions in a module loaded later
|
||||
pc87360.dyndbg="func pc87360_init_device +p; func pc87360_find +p"
|
||||
|
||||
Kernel Configuration
|
||||
====================
|
||||
|
||||
Dynamic Debug is enabled via kernel config items::
|
||||
|
||||
CONFIG_DYNAMIC_DEBUG=y # build catalog, enables CORE
|
||||
CONFIG_DYNAMIC_DEBUG_CORE=y # enable mechanics only, skip catalog
|
||||
|
||||
If you do not want to enable dynamic debug globally (i.e. in some embedded
|
||||
system), you may set ``CONFIG_DYNAMIC_DEBUG_CORE`` as basic support of dynamic
|
||||
debug and add ``ccflags := -DDYNAMIC_DEBUG_MODULE`` into the Makefile of any
|
||||
modules which you'd like to dynamically debug later.
|
||||
|
||||
|
||||
Kernel *prdbg* API
|
||||
==================
|
||||
|
||||
The following functions are cataloged and controllable when dynamic
|
||||
debug is enabled::
|
||||
|
||||
pr_debug()
|
||||
dev_dbg()
|
||||
print_hex_dump_debug()
|
||||
print_hex_dump_bytes()
|
||||
|
||||
Otherwise, they are off by default; ``ccflags += -DDEBUG`` or
|
||||
``#define DEBUG`` in a source file will enable them appropriately.
|
||||
|
||||
If ``CONFIG_DYNAMIC_DEBUG`` is not set, ``print_hex_dump_debug()`` is
|
||||
just a shortcut for ``print_hex_dump(KERN_DEBUG)``.
|
||||
|
||||
For ``print_hex_dump_debug()``/``print_hex_dump_bytes()``, format string is
|
||||
its ``prefix_str`` argument, if it is constant string; or ``hexdump``
|
||||
in case ``prefix_str`` is built dynamically.
|
||||
|
||||
@@ -59,6 +59,7 @@ SoC-specific documents
|
||||
stm32/stm32f429-overview
|
||||
stm32/stm32mp13-overview
|
||||
stm32/stm32mp157-overview
|
||||
stm32/stm32-dma-mdma-chaining
|
||||
|
||||
sunxi
|
||||
|
||||
|
||||
415
Documentation/arm/stm32/stm32-dma-mdma-chaining.rst
Normal file
415
Documentation/arm/stm32/stm32-dma-mdma-chaining.rst
Normal file
@@ -0,0 +1,415 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
=======================
|
||||
STM32 DMA-MDMA chaining
|
||||
=======================
|
||||
|
||||
|
||||
Introduction
|
||||
------------
|
||||
|
||||
This document describes the STM32 DMA-MDMA chaining feature. But before going
|
||||
further, let's introduce the peripherals involved.
|
||||
|
||||
To offload data transfers from the CPU, STM32 microprocessors (MPUs) embed
|
||||
direct memory access controllers (DMA).
|
||||
|
||||
STM32MP1 SoCs embed both STM32 DMA and STM32 MDMA controllers. STM32 DMA
|
||||
request routing capabilities are enhanced by a DMA request multiplexer
|
||||
(STM32 DMAMUX).
|
||||
|
||||
**STM32 DMAMUX**
|
||||
|
||||
STM32 DMAMUX routes any DMA request from a given peripheral to any STM32 DMA
|
||||
controller (STM32MP1 counts two STM32 DMA controllers) channels.
|
||||
|
||||
**STM32 DMA**
|
||||
|
||||
STM32 DMA is mainly used to implement central data buffer storage (usually in
|
||||
the system SRAM) for different peripheral. It can access external RAMs but
|
||||
without the ability to generate convenient burst transfer ensuring the best
|
||||
load of the AXI.
|
||||
|
||||
**STM32 MDMA**
|
||||
|
||||
STM32 MDMA (Master DMA) is mainly used to manage direct data transfers between
|
||||
RAM data buffers without CPU intervention. It can also be used in a
|
||||
hierarchical structure that uses STM32 DMA as first level data buffer
|
||||
interfaces for AHB peripherals, while the STM32 MDMA acts as a second level
|
||||
DMA with better performance. As a AXI/AHB master, STM32 MDMA can take control
|
||||
of the AXI/AHB bus.
|
||||
|
||||
|
||||
Principles
|
||||
----------
|
||||
|
||||
STM32 DMA-MDMA chaining feature relies on the strengths of STM32 DMA and
|
||||
STM32 MDMA controllers.
|
||||
|
||||
STM32 DMA has a circular Double Buffer Mode (DBM). At each end of transaction
|
||||
(when DMA data counter - DMA_SxNDTR - reaches 0), the memory pointers
|
||||
(configured with DMA_SxSM0AR and DMA_SxM1AR) are swapped and the DMA data
|
||||
counter is automatically reloaded. This allows the SW or the STM32 MDMA to
|
||||
process one memory area while the second memory area is being filled/used by
|
||||
the STM32 DMA transfer.
|
||||
|
||||
With STM32 MDMA linked-list mode, a single request initiates the data array
|
||||
(collection of nodes) to be transferred until the linked-list pointer for the
|
||||
channel is null. The channel transfer complete of the last node is the end of
|
||||
transfer, unless first and last nodes are linked to each other, in such a
|
||||
case, the linked-list loops on to create a circular MDMA transfer.
|
||||
|
||||
STM32 MDMA has direct connections with STM32 DMA. This enables autonomous
|
||||
communication and synchronization between peripherals, thus saving CPU
|
||||
resources and bus congestion. Transfer Complete signal of STM32 DMA channel
|
||||
can triggers STM32 MDMA transfer. STM32 MDMA can clear the request generated
|
||||
by the STM32 DMA by writing to its Interrupt Clear register (whose address is
|
||||
stored in MDMA_CxMAR, and bit mask in MDMA_CxMDR).
|
||||
|
||||
.. table:: STM32 MDMA interconnect table with STM32 DMA
|
||||
|
||||
+--------------+----------------+-----------+------------+
|
||||
| STM32 DMAMUX | STM32 DMA | STM32 DMA | STM32 MDMA |
|
||||
| channels | channels | Transfer | request |
|
||||
| | | complete | |
|
||||
| | | signal | |
|
||||
+==============+================+===========+============+
|
||||
| Channel *0* | DMA1 channel 0 | dma1_tcf0 | *0x00* |
|
||||
+--------------+----------------+-----------+------------+
|
||||
| Channel *1* | DMA1 channel 1 | dma1_tcf1 | *0x01* |
|
||||
+--------------+----------------+-----------+------------+
|
||||
| Channel *2* | DMA1 channel 2 | dma1_tcf2 | *0x02* |
|
||||
+--------------+----------------+-----------+------------+
|
||||
| Channel *3* | DMA1 channel 3 | dma1_tcf3 | *0x03* |
|
||||
+--------------+----------------+-----------+------------+
|
||||
| Channel *4* | DMA1 channel 4 | dma1_tcf4 | *0x04* |
|
||||
+--------------+----------------+-----------+------------+
|
||||
| Channel *5* | DMA1 channel 5 | dma1_tcf5 | *0x05* |
|
||||
+--------------+----------------+-----------+------------+
|
||||
| Channel *6* | DMA1 channel 6 | dma1_tcf6 | *0x06* |
|
||||
+--------------+----------------+-----------+------------+
|
||||
| Channel *7* | DMA1 channel 7 | dma1_tcf7 | *0x07* |
|
||||
+--------------+----------------+-----------+------------+
|
||||
| Channel *8* | DMA2 channel 0 | dma2_tcf0 | *0x08* |
|
||||
+--------------+----------------+-----------+------------+
|
||||
| Channel *9* | DMA2 channel 1 | dma2_tcf1 | *0x09* |
|
||||
+--------------+----------------+-----------+------------+
|
||||
| Channel *10* | DMA2 channel 2 | dma2_tcf2 | *0x0A* |
|
||||
+--------------+----------------+-----------+------------+
|
||||
| Channel *11* | DMA2 channel 3 | dma2_tcf3 | *0x0B* |
|
||||
+--------------+----------------+-----------+------------+
|
||||
| Channel *12* | DMA2 channel 4 | dma2_tcf4 | *0x0C* |
|
||||
+--------------+----------------+-----------+------------+
|
||||
| Channel *13* | DMA2 channel 5 | dma2_tcf5 | *0x0D* |
|
||||
+--------------+----------------+-----------+------------+
|
||||
| Channel *14* | DMA2 channel 6 | dma2_tcf6 | *0x0E* |
|
||||
+--------------+----------------+-----------+------------+
|
||||
| Channel *15* | DMA2 channel 7 | dma2_tcf7 | *0x0F* |
|
||||
+--------------+----------------+-----------+------------+
|
||||
|
||||
STM32 DMA-MDMA chaining feature then uses a SRAM buffer. STM32MP1 SoCs embed
|
||||
three fast access static internal RAMs of various size, used for data storage.
|
||||
Due to STM32 DMA legacy (within microcontrollers), STM32 DMA performances are
|
||||
bad with DDR, while they are optimal with SRAM. Hence the SRAM buffer used
|
||||
between STM32 DMA and STM32 MDMA. This buffer is split in two equal periods
|
||||
and STM32 DMA uses one period while STM32 MDMA uses the other period
|
||||
simultaneously.
|
||||
::
|
||||
|
||||
dma[1:2]-tcf[0:7]
|
||||
.----------------.
|
||||
____________ ' _________ V____________
|
||||
| STM32 DMA | / __|>_ \ | STM32 MDMA |
|
||||
|------------| | / \ | |------------|
|
||||
| DMA_SxM0AR |<=>| | SRAM | |<=>| []-[]...[] |
|
||||
| DMA_SxM1AR | | \_____/ | | |
|
||||
|____________| \___<|____/ |____________|
|
||||
|
||||
STM32 DMA-MDMA chaining uses (struct dma_slave_config).peripheral_config to
|
||||
exchange the parameters needed to configure MDMA. These parameters are
|
||||
gathered into a u32 array with three values:
|
||||
|
||||
* the STM32 MDMA request (which is actually the DMAMUX channel ID),
|
||||
* the address of the STM32 DMA register to clear the Transfer Complete
|
||||
interrupt flag,
|
||||
* the mask of the Transfer Complete interrupt flag of the STM32 DMA channel.
|
||||
|
||||
Device Tree updates for STM32 DMA-MDMA chaining support
|
||||
-------------------------------------------------------
|
||||
|
||||
**1. Allocate a SRAM buffer**
|
||||
|
||||
SRAM device tree node is defined in SoC device tree. You can refer to it in
|
||||
your board device tree to define your SRAM pool.
|
||||
::
|
||||
|
||||
&sram {
|
||||
my_foo_device_dma_pool: dma-sram@0 {
|
||||
reg = <0x0 0x1000>;
|
||||
};
|
||||
};
|
||||
|
||||
Be careful of the start index, in case there are other SRAM consumers.
|
||||
Define your pool size strategically: to optimise chaining, the idea is that
|
||||
STM32 DMA and STM32 MDMA can work simultaneously, on each buffer of the
|
||||
SRAM.
|
||||
If the SRAM period is greater than the expected DMA transfer, then STM32 DMA
|
||||
and STM32 MDMA will work sequentially instead of simultaneously. It is not a
|
||||
functional issue but it is not optimal.
|
||||
|
||||
Don't forget to refer to your SRAM pool in your device node. You need to
|
||||
define a new property.
|
||||
::
|
||||
|
||||
&my_foo_device {
|
||||
...
|
||||
my_dma_pool = &my_foo_device_dma_pool;
|
||||
};
|
||||
|
||||
Then get this SRAM pool in your foo driver and allocate your SRAM buffer.
|
||||
|
||||
**2. Allocate a STM32 DMA channel and a STM32 MDMA channel**
|
||||
|
||||
You need to define an extra channel in your device tree node, in addition to
|
||||
the one you should already have for "classic" DMA operation.
|
||||
|
||||
This new channel must be taken from STM32 MDMA channels, so, the phandle of
|
||||
the DMA controller to use is the MDMA controller's one.
|
||||
::
|
||||
|
||||
&my_foo_device {
|
||||
[...]
|
||||
my_dma_pool = &my_foo_device_dma_pool;
|
||||
dmas = <&dmamux1 ...>, // STM32 DMA channel
|
||||
<&mdma1 0 0x3 0x1200000a 0 0>; // + STM32 MDMA channel
|
||||
};
|
||||
|
||||
Concerning STM32 MDMA bindings:
|
||||
|
||||
1. The request line number : whatever the value here, it will be overwritten
|
||||
by MDMA driver with the STM32 DMAMUX channel ID passed through
|
||||
(struct dma_slave_config).peripheral_config
|
||||
|
||||
2. The priority level : choose Very High (0x3) so that your channel will
|
||||
take priority other the other during request arbitration
|
||||
|
||||
3. A 32bit mask specifying the DMA channel configuration : source and
|
||||
destination address increment, block transfer with 128 bytes per single
|
||||
transfer
|
||||
|
||||
4. The 32bit value specifying the register to be used to acknowledge the
|
||||
request: it will be overwritten by MDMA driver, with the DMA channel
|
||||
interrupt flag clear register address passed through
|
||||
(struct dma_slave_config).peripheral_config
|
||||
|
||||
5. The 32bit mask specifying the value to be written to acknowledge the
|
||||
request: it will be overwritten by MDMA driver, with the DMA channel
|
||||
Transfer Complete flag passed through
|
||||
(struct dma_slave_config).peripheral_config
|
||||
|
||||
Driver updates for STM32 DMA-MDMA chaining support in foo driver
|
||||
----------------------------------------------------------------
|
||||
|
||||
**0. (optional) Refactor the original sg_table if dmaengine_prep_slave_sg()**
|
||||
|
||||
In case of dmaengine_prep_slave_sg(), the original sg_table can't be used as
|
||||
is. Two new sg_tables must be created from the original one. One for
|
||||
STM32 DMA transfer (where memory address targets now the SRAM buffer instead
|
||||
of DDR buffer) and one for STM32 MDMA transfer (where memory address targets
|
||||
the DDR buffer).
|
||||
|
||||
The new sg_list items must fit SRAM period length. Here is an example for
|
||||
DMA_DEV_TO_MEM:
|
||||
::
|
||||
|
||||
/*
|
||||
* Assuming sgl and nents, respectively the initial scatterlist and its
|
||||
* length.
|
||||
* Assuming sram_dma_buf and sram_period, respectively the memory
|
||||
* allocated from the pool for DMA usage, and the length of the period,
|
||||
* which is half of the sram_buf size.
|
||||
*/
|
||||
struct sg_table new_dma_sgt, new_mdma_sgt;
|
||||
struct scatterlist *s, *_sgl;
|
||||
dma_addr_t ddr_dma_buf;
|
||||
u32 new_nents = 0, len;
|
||||
int i;
|
||||
|
||||
/* Count the number of entries needed */
|
||||
for_each_sg(sgl, s, nents, i)
|
||||
if (sg_dma_len(s) > sram_period)
|
||||
new_nents += DIV_ROUND_UP(sg_dma_len(s), sram_period);
|
||||
else
|
||||
new_nents++;
|
||||
|
||||
/* Create sg table for STM32 DMA channel */
|
||||
ret = sg_alloc_table(&new_dma_sgt, new_nents, GFP_ATOMIC);
|
||||
if (ret)
|
||||
dev_err(dev, "DMA sg table alloc failed\n");
|
||||
|
||||
for_each_sg(new_dma_sgt.sgl, s, new_dma_sgt.nents, i) {
|
||||
_sgl = sgl;
|
||||
sg_dma_len(s) = min(sg_dma_len(_sgl), sram_period);
|
||||
/* Targets the beginning = first half of the sram_buf */
|
||||
s->dma_address = sram_buf;
|
||||
/*
|
||||
* Targets the second half of the sram_buf
|
||||
* for odd indexes of the item of the sg_list
|
||||
*/
|
||||
if (i & 1)
|
||||
s->dma_address += sram_period;
|
||||
}
|
||||
|
||||
/* Create sg table for STM32 MDMA channel */
|
||||
ret = sg_alloc_table(&new_mdma_sgt, new_nents, GFP_ATOMIC);
|
||||
if (ret)
|
||||
dev_err(dev, "MDMA sg_table alloc failed\n");
|
||||
|
||||
_sgl = sgl;
|
||||
len = sg_dma_len(sgl);
|
||||
ddr_dma_buf = sg_dma_address(sgl);
|
||||
for_each_sg(mdma_sgt.sgl, s, mdma_sgt.nents, i) {
|
||||
size_t bytes = min_t(size_t, len, sram_period);
|
||||
|
||||
sg_dma_len(s) = bytes;
|
||||
sg_dma_address(s) = ddr_dma_buf;
|
||||
len -= bytes;
|
||||
|
||||
if (!len && sg_next(_sgl)) {
|
||||
_sgl = sg_next(_sgl);
|
||||
len = sg_dma_len(_sgl);
|
||||
ddr_dma_buf = sg_dma_address(_sgl);
|
||||
} else {
|
||||
ddr_dma_buf += bytes;
|
||||
}
|
||||
}
|
||||
|
||||
Don't forget to release these new sg_tables after getting the descriptors
|
||||
with dmaengine_prep_slave_sg().
|
||||
|
||||
**1. Set controller specific parameters**
|
||||
|
||||
First, use dmaengine_slave_config() with a struct dma_slave_config to
|
||||
configure STM32 DMA channel. You just have to take care of DMA addresses,
|
||||
the memory address (depending on the transfer direction) must point on your
|
||||
SRAM buffer, and set (struct dma_slave_config).peripheral_size != 0.
|
||||
|
||||
STM32 DMA driver will check (struct dma_slave_config).peripheral_size to
|
||||
determine if chaining is being used or not. If it is used, then STM32 DMA
|
||||
driver fills (struct dma_slave_config).peripheral_config with an array of
|
||||
three u32 : the first one containing STM32 DMAMUX channel ID, the second one
|
||||
the channel interrupt flag clear register address, and the third one the
|
||||
channel Transfer Complete flag mask.
|
||||
|
||||
Then, use dmaengine_slave_config with another struct dma_slave_config to
|
||||
configure STM32 MDMA channel. Take care of DMA addresses, the device address
|
||||
(depending on the transfer direction) must point on your SRAM buffer, and
|
||||
the memory address must point to the buffer originally used for "classic"
|
||||
DMA operation. Use the previous (struct dma_slave_config).peripheral_size
|
||||
and .peripheral_config that have been updated by STM32 DMA driver, to set
|
||||
(struct dma_slave_config).peripheral_size and .peripheral_config of the
|
||||
struct dma_slave_config to configure STM32 MDMA channel.
|
||||
::
|
||||
|
||||
struct dma_slave_config dma_conf;
|
||||
struct dma_slave_config mdma_conf;
|
||||
|
||||
memset(&dma_conf, 0, sizeof(dma_conf));
|
||||
[...]
|
||||
config.direction = DMA_DEV_TO_MEM;
|
||||
config.dst_addr = sram_dma_buf; // SRAM buffer
|
||||
config.peripheral_size = 1; // peripheral_size != 0 => chaining
|
||||
|
||||
dmaengine_slave_config(dma_chan, &dma_config);
|
||||
|
||||
memset(&mdma_conf, 0, sizeof(mdma_conf));
|
||||
config.direction = DMA_DEV_TO_MEM;
|
||||
mdma_conf.src_addr = sram_dma_buf; // SRAM buffer
|
||||
mdma_conf.dst_addr = rx_dma_buf; // original memory buffer
|
||||
mdma_conf.peripheral_size = dma_conf.peripheral_size; // <- dma_conf
|
||||
mdma_conf.peripheral_config = dma_config.peripheral_config; // <- dma_conf
|
||||
|
||||
dmaengine_slave_config(mdma_chan, &mdma_conf);
|
||||
|
||||
**2. Get a descriptor for STM32 DMA channel transaction**
|
||||
|
||||
In the same way you get your descriptor for your "classic" DMA operation,
|
||||
you just have to replace the original sg_list (in case of
|
||||
dmaengine_prep_slave_sg()) with the new sg_list using SRAM buffer, or to
|
||||
replace the original buffer address, length and period (in case of
|
||||
dmaengine_prep_dma_cyclic()) with the new SRAM buffer.
|
||||
|
||||
**3. Get a descriptor for STM32 MDMA channel transaction**
|
||||
|
||||
If you previously get descriptor (for STM32 DMA) with
|
||||
|
||||
* dmaengine_prep_slave_sg(), then use dmaengine_prep_slave_sg() for
|
||||
STM32 MDMA;
|
||||
* dmaengine_prep_dma_cyclic(), then use dmaengine_prep_dma_cyclic() for
|
||||
STM32 MDMA.
|
||||
|
||||
Use the new sg_list using SRAM buffer (in case of dmaengine_prep_slave_sg())
|
||||
or, depending on the transfer direction, either the original DDR buffer (in
|
||||
case of DMA_DEV_TO_MEM) or the SRAM buffer (in case of DMA_MEM_TO_DEV), the
|
||||
source address being previously set with dmaengine_slave_config().
|
||||
|
||||
**4. Submit both transactions**
|
||||
|
||||
Before submitting your transactions, you may need to define on which
|
||||
descriptor you want a callback to be called at the end of the transfer
|
||||
(dmaengine_prep_slave_sg()) or the period (dmaengine_prep_dma_cyclic()).
|
||||
Depending on the direction, set the callback on the descriptor that finishes
|
||||
the overal transfer:
|
||||
|
||||
* DMA_DEV_TO_MEM: set the callback on the "MDMA" descriptor
|
||||
* DMA_MEM_TO_DEV: set the callback on the "DMA" descriptor
|
||||
|
||||
Then, submit the descriptors whatever the order, with dmaengine_tx_submit().
|
||||
|
||||
**5. Issue pending requests (and wait for callback notification)**
|
||||
|
||||
As STM32 MDMA channel transfer is triggered by STM32 DMA, you must issue
|
||||
STM32 MDMA channel before STM32 DMA channel.
|
||||
|
||||
If any, your callback will be called to warn you about the end of the overal
|
||||
transfer or the period completion.
|
||||
|
||||
Don't forget to terminate both channels. STM32 DMA channel is configured in
|
||||
cyclic Double-Buffer mode so it won't be disabled by HW, you need to terminate
|
||||
it. STM32 MDMA channel will be stopped by HW in case of sg transfer, but not
|
||||
in case of cyclic transfer. You can terminate it whatever the kind of transfer.
|
||||
|
||||
**STM32 DMA-MDMA chaining DMA_MEM_TO_DEV special case**
|
||||
|
||||
STM32 DMA-MDMA chaining in DMA_MEM_TO_DEV is a special case. Indeed, the
|
||||
STM32 MDMA feeds the SRAM buffer with the DDR data, and the STM32 DMA reads
|
||||
data from SRAM buffer. So some data (the first period) have to be copied in
|
||||
SRAM buffer when the STM32 DMA starts to read.
|
||||
|
||||
A trick could be pausing the STM32 DMA channel (that will raise a Transfer
|
||||
Complete signal, triggering the STM32 MDMA channel), but the first data read
|
||||
by the STM32 DMA could be "wrong". The proper way is to prepare the first SRAM
|
||||
period with dmaengine_prep_dma_memcpy(). Then this first period should be
|
||||
"removed" from the sg or the cyclic transfer.
|
||||
|
||||
Due to this complexity, rather use the STM32 DMA-MDMA chaining for
|
||||
DMA_DEV_TO_MEM and keep the "classic" DMA usage for DMA_MEM_TO_DEV, unless
|
||||
you're not afraid.
|
||||
|
||||
Resources
|
||||
---------
|
||||
|
||||
Application note, datasheet and reference manual are available on ST website
|
||||
(STM32MP1_).
|
||||
|
||||
Dedicated focus on three application notes (AN5224_, AN4031_ & AN5001_)
|
||||
dealing with STM32 DMAMUX, STM32 DMA and STM32 MDMA.
|
||||
|
||||
.. _STM32MP1: https://www.st.com/en/microcontrollers-microprocessors/stm32mp1-series.html
|
||||
.. _AN5224: https://www.st.com/resource/en/application_note/an5224-stm32-dmamux-the-dma-request-router-stmicroelectronics.pdf
|
||||
.. _AN4031: https://www.st.com/resource/en/application_note/dm00046011-using-the-stm32f2-stm32f4-and-stm32f7-series-dma-controller-stmicroelectronics.pdf
|
||||
.. _AN5001: https://www.st.com/resource/en/application_note/an5001-stm32cube-expansion-package-for-stm32h7-series-mdma-stmicroelectronics.pdf
|
||||
|
||||
:Authors:
|
||||
|
||||
- Amelie Delaunay <amelie.delaunay@foss.st.com>
|
||||
@@ -49,6 +49,13 @@ properties:
|
||||
in an interrupts-extended list the disconnected positions will contain
|
||||
an empty phandle reference <0>.
|
||||
|
||||
iommus:
|
||||
minItems: 1
|
||||
maxItems: 2
|
||||
|
||||
power-domains:
|
||||
maxItems: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
@@ -55,6 +55,12 @@ properties:
|
||||
|
||||
dma-coherent: true
|
||||
|
||||
iommus:
|
||||
minItems: 1
|
||||
maxItems: 9
|
||||
description: Up to 1 IOMMU entry per DMA channel for writes and 1
|
||||
IOMMU entry for reads.
|
||||
|
||||
power-domains:
|
||||
maxItems: 1
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ properties:
|
||||
- items:
|
||||
- enum:
|
||||
- mediatek,mt2712-uart-dma
|
||||
- mediatek,mt6795-uart-dma
|
||||
- mediatek,mt8365-uart-dma
|
||||
- mediatek,mt8516-uart-dma
|
||||
- const: mediatek,mt6577-uart-dma
|
||||
|
||||
99
Documentation/devicetree/bindings/dma/qcom,adm.yaml
Normal file
99
Documentation/devicetree/bindings/dma/qcom,adm.yaml
Normal file
@@ -0,0 +1,99 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/dma/qcom,adm.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Qualcomm ADM DMA Controller
|
||||
|
||||
maintainers:
|
||||
- Christian Marangi <ansuelsmth@gmail.com>
|
||||
- Bjorn Andersson <bjorn.andersson@linaro.org>
|
||||
|
||||
description: |
|
||||
QCOM ADM DMA controller provides DMA capabilities for
|
||||
peripheral buses such as NAND and SPI.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: qcom,adm
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
"#dma-cells":
|
||||
const: 1
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: phandle to the core clock
|
||||
- description: phandle to the iface clock
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: core
|
||||
- const: iface
|
||||
|
||||
resets:
|
||||
items:
|
||||
- description: phandle to the clk reset
|
||||
- description: phandle to the pbus reset
|
||||
- description: phandle to the c0 reset
|
||||
- description: phandle to the c1 reset
|
||||
- description: phandle to the c2 reset
|
||||
|
||||
reset-names:
|
||||
items:
|
||||
- const: clk
|
||||
- const: pbus
|
||||
- const: c0
|
||||
- const: c1
|
||||
- const: c2
|
||||
|
||||
qcom,ee:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
description: indicates the security domain identifier used in the secure world.
|
||||
minimum: 0
|
||||
maximum: 255
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- interrupts
|
||||
- "#dma-cells"
|
||||
- clocks
|
||||
- clock-names
|
||||
- resets
|
||||
- reset-names
|
||||
- qcom,ee
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/qcom,gcc-ipq806x.h>
|
||||
#include <dt-bindings/reset/qcom,gcc-ipq806x.h>
|
||||
|
||||
adm_dma: dma-controller@18300000 {
|
||||
compatible = "qcom,adm";
|
||||
reg = <0x18300000 0x100000>;
|
||||
interrupts = <0 170 0>;
|
||||
#dma-cells = <1>;
|
||||
|
||||
clocks = <&gcc ADM0_CLK>,
|
||||
<&gcc ADM0_PBUS_CLK>;
|
||||
clock-names = "core", "iface";
|
||||
|
||||
resets = <&gcc ADM0_RESET>,
|
||||
<&gcc ADM0_PBUS_RESET>,
|
||||
<&gcc ADM0_C0_RESET>,
|
||||
<&gcc ADM0_C1_RESET>,
|
||||
<&gcc ADM0_C2_RESET>;
|
||||
reset-names = "clk", "pbus", "c0", "c1", "c2";
|
||||
qcom,ee = <0>;
|
||||
};
|
||||
|
||||
...
|
||||
@@ -8,7 +8,7 @@ title: Qualcomm Technologies Inc BAM DMA controller
|
||||
|
||||
maintainers:
|
||||
- Andy Gross <agross@kernel.org>
|
||||
- Bjorn Andersson <bjorn.andersson@linaro.org>
|
||||
- Bjorn Andersson <andersson@kernel.org>
|
||||
|
||||
allOf:
|
||||
- $ref: "dma-controller.yaml#"
|
||||
@@ -20,7 +20,7 @@ properties:
|
||||
- qcom,bam-v1.3.0
|
||||
# MSM8974, APQ8074 and APQ8084
|
||||
- qcom,bam-v1.4.0
|
||||
# MSM8916
|
||||
# MSM8916 and SDM845
|
||||
- qcom,bam-v1.7.0
|
||||
|
||||
clocks:
|
||||
@@ -90,8 +90,8 @@ examples:
|
||||
|
||||
dma-controller@f9944000 {
|
||||
compatible = "qcom,bam-v1.4.0";
|
||||
reg = <0xf9944000 0x15000>;
|
||||
interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
|
||||
reg = <0xf9944000 0x19000>;
|
||||
interrupts = <GIC_SPI 239 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&gcc GCC_BLSP2_AHB_CLK>;
|
||||
clock-names = "bam_clk";
|
||||
#dma-cells = <1>;
|
||||
|
||||
@@ -21,6 +21,7 @@ properties:
|
||||
enum:
|
||||
- qcom,sc7280-gpi-dma
|
||||
- qcom,sdm845-gpi-dma
|
||||
- qcom,sm6350-gpi-dma
|
||||
- qcom,sm8150-gpi-dma
|
||||
- qcom,sm8250-gpi-dma
|
||||
- qcom,sm8350-gpi-dma
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
QCOM ADM DMA Controller
|
||||
|
||||
Required properties:
|
||||
- compatible: must contain "qcom,adm" for IPQ/APQ8064 and MSM8960
|
||||
- reg: Address range for DMA registers
|
||||
- interrupts: Should contain one interrupt shared by all channels
|
||||
- #dma-cells: must be <2>. First cell denotes the channel number. Second cell
|
||||
denotes CRCI (client rate control interface) flow control assignment.
|
||||
- clocks: Should contain the core clock and interface clock.
|
||||
- clock-names: Must contain "core" for the core clock and "iface" for the
|
||||
interface clock.
|
||||
- resets: Must contain an entry for each entry in reset names.
|
||||
- reset-names: Must include the following entries:
|
||||
- clk
|
||||
- c0
|
||||
- c1
|
||||
- c2
|
||||
- qcom,ee: indicates the security domain identifier used in the secure world.
|
||||
|
||||
Example:
|
||||
adm_dma: dma@18300000 {
|
||||
compatible = "qcom,adm";
|
||||
reg = <0x18300000 0x100000>;
|
||||
interrupts = <0 170 0>;
|
||||
#dma-cells = <2>;
|
||||
|
||||
clocks = <&gcc ADM0_CLK>, <&gcc ADM0_PBUS_CLK>;
|
||||
clock-names = "core", "iface";
|
||||
|
||||
resets = <&gcc ADM0_RESET>,
|
||||
<&gcc ADM0_C0_RESET>,
|
||||
<&gcc ADM0_C1_RESET>,
|
||||
<&gcc ADM0_C2_RESET>;
|
||||
reset-names = "clk", "c0", "c1", "c2";
|
||||
qcom,ee = <0>;
|
||||
};
|
||||
|
||||
DMA clients must use the format descripted in the dma.txt file, using a three
|
||||
cell specifier for each channel.
|
||||
|
||||
Each dmas request consists of 3 cells:
|
||||
1. phandle pointing to the DMA controller
|
||||
2. channel number
|
||||
3. CRCI assignment, if applicable. If no CRCI flow control is required, use 0.
|
||||
The CRCI is used for flow control. It identifies the peripheral device that
|
||||
is the source/destination for the transferred data.
|
||||
|
||||
Example:
|
||||
|
||||
spi4: spi@1a280000 {
|
||||
spi-max-frequency = <50000000>;
|
||||
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
cs-gpios = <&qcom_pinmux 20 0>;
|
||||
|
||||
dmas = <&adm_dma 6 9>,
|
||||
<&adm_dma 5 10>;
|
||||
dma-names = "rx", "tx";
|
||||
};
|
||||
@@ -45,6 +45,7 @@ properties:
|
||||
- enum:
|
||||
- renesas,dmac-r8a779a0 # R-Car V3U
|
||||
- renesas,dmac-r8a779f0 # R-Car S4-8
|
||||
- renesas,dmac-r8a779g0 # R-Car V4H
|
||||
- const: renesas,rcar-gen4-dmac # R-Car Gen4
|
||||
|
||||
reg: true
|
||||
|
||||
@@ -4,7 +4,7 @@ Required properties:
|
||||
- compatible: "ti,dra7-dma-crossbar" for DRA7xx DMA crossbar
|
||||
"ti,am335x-edma-crossbar" for AM335x and AM437x
|
||||
- reg: Memory map for accessing module
|
||||
- #dma-cells: Should be set to to match with the DMA controller's dma-cells
|
||||
- #dma-cells: Should be set to match with the DMA controller's dma-cells
|
||||
for ti,dra7-dma-crossbar and <3> for ti,am335x-edma-crossbar.
|
||||
- dma-requests: Number of DMA requests the crossbar can receive
|
||||
- dma-masters: phandle pointing to the DMA controller
|
||||
|
||||
@@ -1,98 +0,0 @@
|
||||
* Atmel Universal Synchronous Asynchronous Receiver/Transmitter (USART)
|
||||
|
||||
Required properties for USART:
|
||||
- compatible: Should be one of the following:
|
||||
- "atmel,at91rm9200-usart"
|
||||
- "atmel,at91sam9260-usart"
|
||||
- "microchip,sam9x60-usart"
|
||||
- "atmel,at91rm9200-dbgu", "atmel,at91rm9200-usart"
|
||||
- "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"
|
||||
- "microchip,sam9x60-dbgu", "microchip,sam9x60-usart"
|
||||
- reg: Should contain registers location and length
|
||||
- interrupts: Should contain interrupt
|
||||
- clock-names: tuple listing input clock names.
|
||||
Required elements: "usart"
|
||||
- clocks: phandles to input clocks.
|
||||
|
||||
Required properties for USART in SPI mode:
|
||||
- #size-cells : Must be <0>
|
||||
- #address-cells : Must be <1>
|
||||
- cs-gpios: chipselects (internal cs not supported)
|
||||
- atmel,usart-mode : Must be <AT91_USART_MODE_SPI> (found in dt-bindings/mfd/at91-usart.h)
|
||||
|
||||
Optional properties in serial and SPI mode:
|
||||
- dma bindings for dma transfer:
|
||||
- dmas: DMA specifier, consisting of a phandle to DMA controller node,
|
||||
memory peripheral interface and USART DMA channel ID, FIFO configuration.
|
||||
The order of DMA channels is fixed. The first DMA channel must be TX
|
||||
associated channel and the second one must be RX associated channel.
|
||||
Refer to dma.txt and atmel-dma.txt for details.
|
||||
- dma-names: "tx" for TX channel.
|
||||
"rx" for RX channel.
|
||||
The order of dma-names is also fixed. The first name must be "tx"
|
||||
and the second one must be "rx" as in the examples below.
|
||||
|
||||
Optional properties in serial mode:
|
||||
- atmel,use-dma-rx: use of PDC or DMA for receiving data
|
||||
- atmel,use-dma-tx: use of PDC or DMA for transmitting data
|
||||
- {rts,cts,dtr,dsr,rng,dcd}-gpios: specify a GPIO for RTS/CTS/DTR/DSR/RI/DCD line respectively.
|
||||
It will use specified PIO instead of the peripheral function pin for the USART feature.
|
||||
If unsure, don't specify this property.
|
||||
- atmel,fifo-size: maximum number of data the RX and TX FIFOs can store for FIFO
|
||||
capable USARTs.
|
||||
- rs485-rts-delay, rs485-rx-during-tx, linux,rs485-enabled-at-boot-time: see rs485.txt
|
||||
|
||||
<chip> compatible description:
|
||||
- at91rm9200: legacy USART support
|
||||
- at91sam9260: generic USART implementation for SAM9 SoCs
|
||||
|
||||
Example:
|
||||
- use PDC:
|
||||
usart0: serial@fff8c000 {
|
||||
compatible = "atmel,at91sam9260-usart";
|
||||
reg = <0xfff8c000 0x4000>;
|
||||
interrupts = <7>;
|
||||
clocks = <&usart0_clk>;
|
||||
clock-names = "usart";
|
||||
atmel,use-dma-rx;
|
||||
atmel,use-dma-tx;
|
||||
rts-gpios = <&pioD 15 GPIO_ACTIVE_LOW>;
|
||||
cts-gpios = <&pioD 16 GPIO_ACTIVE_LOW>;
|
||||
dtr-gpios = <&pioD 17 GPIO_ACTIVE_LOW>;
|
||||
dsr-gpios = <&pioD 18 GPIO_ACTIVE_LOW>;
|
||||
dcd-gpios = <&pioD 20 GPIO_ACTIVE_LOW>;
|
||||
rng-gpios = <&pioD 19 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
- use DMA:
|
||||
usart0: serial@f001c000 {
|
||||
compatible = "atmel,at91sam9260-usart";
|
||||
reg = <0xf001c000 0x100>;
|
||||
interrupts = <12 4 5>;
|
||||
clocks = <&usart0_clk>;
|
||||
clock-names = "usart";
|
||||
atmel,use-dma-rx;
|
||||
atmel,use-dma-tx;
|
||||
dmas = <&dma0 2 0x3>,
|
||||
<&dma0 2 0x204>;
|
||||
dma-names = "tx", "rx";
|
||||
atmel,fifo-size = <32>;
|
||||
};
|
||||
|
||||
- SPI mode:
|
||||
#include <dt-bindings/mfd/at91-usart.h>
|
||||
|
||||
spi0: spi@f001c000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "atmel,at91rm9200-usart", "atmel,at91sam9260-usart";
|
||||
atmel,usart-mode = <AT91_USART_MODE_SPI>;
|
||||
reg = <0xf001c000 0x100>;
|
||||
interrupts = <12 IRQ_TYPE_LEVEL_HIGH 5>;
|
||||
clocks = <&usart0_clk>;
|
||||
clock-names = "usart";
|
||||
dmas = <&dma0 2 AT91_DMA_CFG_PER_ID(3)>,
|
||||
<&dma0 2 (AT91_DMA_CFG_PER_ID(4) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
|
||||
dma-names = "tx", "rx";
|
||||
cs-gpios = <&pioB 3 0>;
|
||||
};
|
||||
@@ -54,6 +54,12 @@ patternProperties:
|
||||
description:
|
||||
Clock provider for TI EHRPWM nodes.
|
||||
|
||||
"phy@[0-9a-f]+$":
|
||||
type: object
|
||||
$ref: /schemas/phy/ti,phy-gmii-sel.yaml#
|
||||
description:
|
||||
The phy node corresponding to the ethernet MAC.
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
@@ -32,6 +32,7 @@ properties:
|
||||
patternProperties:
|
||||
"^pcie-phy@[0-9]+$":
|
||||
type: object
|
||||
additionalProperties: false
|
||||
description: >
|
||||
PCIe PHY child nodes
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
title: Cadence DPHY Rx Device Tree Bindings
|
||||
|
||||
maintainers:
|
||||
- Pratyush Yadav <p.yadav@ti.com>
|
||||
- Pratyush Yadav <pratyush@kernel.org>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
|
||||
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
title: Cadence DPHY Device Tree Bindings
|
||||
|
||||
maintainers:
|
||||
- Pratyush Yadav <p.yadav@ti.com>
|
||||
- Pratyush Yadav <pratyush@kernel.org>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
|
||||
@@ -163,6 +163,7 @@ patternProperties:
|
||||
- PHY_TYPE_USB3
|
||||
- PHY_TYPE_PCIE
|
||||
- PHY_TYPE_SATA
|
||||
- PHY_TYPE_SGMII
|
||||
|
||||
nvmem-cells:
|
||||
items:
|
||||
@@ -218,6 +219,16 @@ patternProperties:
|
||||
minimum: 1
|
||||
maximum: 15
|
||||
|
||||
mediatek,pre-emphasis:
|
||||
description:
|
||||
The level of pre-emphasis which used to widen the eye opening and
|
||||
boost eye swing, the unit step is about 4.16% increment; e.g. the
|
||||
level 1 means amplitude increases about 4.16%, the level 2 is about
|
||||
8.3% etc. (U2 phy)
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
minimum: 1
|
||||
maximum: 3
|
||||
|
||||
mediatek,bc12:
|
||||
description:
|
||||
Specify the flag to enable BC1.2 if support it
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/phy/mscc,vsc7514-serdes.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Microsemi Ocelot SerDes muxing
|
||||
|
||||
maintainers:
|
||||
- Alexandre Belloni <alexandre.belloni@bootlin.com>
|
||||
- UNGLinuxDriver@microchip.com
|
||||
|
||||
description: |
|
||||
On Microsemi Ocelot, there is a handful of registers in HSIO address
|
||||
space for setting up the SerDes to switch port muxing.
|
||||
|
||||
A SerDes X can be "muxed" to work with switch port Y or Z for example.
|
||||
One specific SerDes can also be used as a PCIe interface.
|
||||
|
||||
Hence, a SerDes represents an interface, be it an Ethernet or a PCIe one.
|
||||
|
||||
There are two kinds of SerDes: SERDES1G supports 10/100Mbps in
|
||||
half/full-duplex and 1000Mbps in full-duplex mode while SERDES6G supports
|
||||
10/100Mbps in half/full-duplex and 1000/2500Mbps in full-duplex mode.
|
||||
|
||||
Also, SERDES6G number (aka "macro") 0 is the only interface supporting
|
||||
QSGMII.
|
||||
|
||||
This is a child of the HSIO syscon ("mscc,ocelot-hsio", see
|
||||
Documentation/devicetree/bindings/mips/mscc.txt) on the Microsemi Ocelot.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- mscc,vsc7514-serdes
|
||||
|
||||
"#phy-cells":
|
||||
const: 2
|
||||
description: |
|
||||
The first number defines the input port to use for a given SerDes macro.
|
||||
The second defines the macro to use. They are defined in
|
||||
dt-bindings/phy/phy-ocelot-serdes.h
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- "#phy-cells"
|
||||
|
||||
additionalProperties:
|
||||
false
|
||||
|
||||
examples:
|
||||
- |
|
||||
serdes: serdes {
|
||||
compatible = "mscc,vsc7514-serdes";
|
||||
#phy-cells = <2>;
|
||||
};
|
||||
@@ -15,10 +15,10 @@ Required properties:
|
||||
- fsl,anatop: phandle for anatop register, it is only for imx6 SoC series
|
||||
|
||||
Optional properties:
|
||||
- fsl,tx-cal-45-dn-ohms: Integer [30-55]. Resistance (in ohms) of switchable
|
||||
- fsl,tx-cal-45-dn-ohms: Integer [35-54]. Resistance (in ohms) of switchable
|
||||
high-speed trimming resistor connected in parallel with the 45 ohm resistor
|
||||
that terminates the DN output signal. Default: 45
|
||||
- fsl,tx-cal-45-dp-ohms: Integer [30-55]. Resistance (in ohms) of switchable
|
||||
- fsl,tx-cal-45-dp-ohms: Integer [35-54]. Resistance (in ohms) of switchable
|
||||
high-speed trimming resistor connected in parallel with the 45 ohm resistor
|
||||
that terminates the DP output signal. Default: 45
|
||||
- fsl,tx-d-cal: Integer [79-119]. Current trimming value (as a percentage) of
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
Microsemi Ocelot SerDes muxing driver
|
||||
-------------------------------------
|
||||
|
||||
On Microsemi Ocelot, there is a handful of registers in HSIO address
|
||||
space for setting up the SerDes to switch port muxing.
|
||||
|
||||
A SerDes X can be "muxed" to work with switch port Y or Z for example.
|
||||
One specific SerDes can also be used as a PCIe interface.
|
||||
|
||||
Hence, a SerDes represents an interface, be it an Ethernet or a PCIe one.
|
||||
|
||||
There are two kinds of SerDes: SERDES1G supports 10/100Mbps in
|
||||
half/full-duplex and 1000Mbps in full-duplex mode while SERDES6G supports
|
||||
10/100Mbps in half/full-duplex and 1000/2500Mbps in full-duplex mode.
|
||||
|
||||
Also, SERDES6G number (aka "macro") 0 is the only interface supporting
|
||||
QSGMII.
|
||||
|
||||
This is a child of the HSIO syscon ("mscc,ocelot-hsio", see
|
||||
Documentation/devicetree/bindings/mips/mscc.txt) on the Microsemi Ocelot.
|
||||
|
||||
Required properties:
|
||||
|
||||
- compatible: should be "mscc,vsc7514-serdes"
|
||||
- #phy-cells : from the generic phy bindings, must be 2.
|
||||
The first number defines the input port to use for a given
|
||||
SerDes macro. The second defines the macro to use. They are
|
||||
defined in dt-bindings/phy/phy-ocelot-serdes.h
|
||||
|
||||
Example:
|
||||
|
||||
serdes: serdes {
|
||||
compatible = "mscc,vsc7514-serdes";
|
||||
#phy-cells = <2>;
|
||||
};
|
||||
|
||||
ethernet {
|
||||
port1 {
|
||||
phy-handle = <&phy_foo>;
|
||||
/* Link SERDES1G_5 to port1 */
|
||||
phys = <&serdes 1 SERDES1G_5>;
|
||||
};
|
||||
};
|
||||
@@ -13,6 +13,7 @@ properties:
|
||||
compatible:
|
||||
enum:
|
||||
- rockchip,px30-usb2phy
|
||||
- rockchip,rk3128-usb2phy
|
||||
- rockchip,rk3228-usb2phy
|
||||
- rockchip,rk3308-usb2phy
|
||||
- rockchip,rk3328-usb2phy
|
||||
|
||||
@@ -77,6 +77,8 @@ patternProperties:
|
||||
connector:
|
||||
type: object
|
||||
$ref: /schemas/connector/usb-connector.yaml
|
||||
unevaluatedProperties: false
|
||||
|
||||
properties:
|
||||
vbus-supply: true
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@ properties:
|
||||
enum:
|
||||
- qcom,sc7280-edp-phy
|
||||
- qcom,sc8180x-edp-phy
|
||||
- qcom,sc8280xp-dp-phy
|
||||
- qcom,sc8280xp-edp-phy
|
||||
|
||||
reg:
|
||||
items:
|
||||
|
||||
@@ -0,0 +1,189 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/phy/qcom,msm8996-qmp-pcie-phy.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Qualcomm QMP PHY controller (MSM8996 PCIe)
|
||||
|
||||
maintainers:
|
||||
- Vinod Koul <vkoul@kernel.org>
|
||||
|
||||
description:
|
||||
QMP PHY controller supports physical layer functionality for a number of
|
||||
controllers on Qualcomm chipsets, such as, PCIe, UFS, and USB.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: qcom,msm8996-qmp-pcie-phy
|
||||
|
||||
reg:
|
||||
items:
|
||||
- description: serdes
|
||||
|
||||
"#address-cells":
|
||||
enum: [ 1, 2 ]
|
||||
|
||||
"#size-cells":
|
||||
enum: [ 1, 2 ]
|
||||
|
||||
ranges: true
|
||||
|
||||
clocks:
|
||||
maxItems: 3
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: aux
|
||||
- const: cfg_ahb
|
||||
- const: ref
|
||||
|
||||
resets:
|
||||
maxItems: 3
|
||||
|
||||
reset-names:
|
||||
items:
|
||||
- const: phy
|
||||
- const: common
|
||||
- const: cfg
|
||||
|
||||
vdda-phy-supply: true
|
||||
|
||||
vdda-pll-supply: true
|
||||
|
||||
vddp-ref-clk-supply: true
|
||||
|
||||
patternProperties:
|
||||
"^phy@[0-9a-f]+$":
|
||||
type: object
|
||||
description: one child node per PHY provided by this block
|
||||
properties:
|
||||
reg:
|
||||
items:
|
||||
- description: TX
|
||||
- description: RX
|
||||
- description: PCS
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: PIPE clock
|
||||
|
||||
clock-names:
|
||||
deprecated: true
|
||||
items:
|
||||
- enum:
|
||||
- pipe0
|
||||
- pipe1
|
||||
- pipe2
|
||||
|
||||
resets:
|
||||
items:
|
||||
- description: PHY reset
|
||||
|
||||
reset-names:
|
||||
deprecated: true
|
||||
items:
|
||||
- enum:
|
||||
- lane0
|
||||
- lane1
|
||||
- lane2
|
||||
|
||||
"#clock-cells":
|
||||
const: 0
|
||||
|
||||
clock-output-names:
|
||||
maxItems: 1
|
||||
|
||||
"#phy-cells":
|
||||
const: 0
|
||||
|
||||
required:
|
||||
- reg
|
||||
- clocks
|
||||
- resets
|
||||
- "#clock-cells"
|
||||
- clock-output-names
|
||||
- "#phy-cells"
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- "#address-cells"
|
||||
- "#size-cells"
|
||||
- ranges
|
||||
- clocks
|
||||
- clock-names
|
||||
- resets
|
||||
- reset-names
|
||||
- vdda-phy-supply
|
||||
- vdda-pll-supply
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/qcom,gcc-msm8996.h>
|
||||
pcie_phy: phy-wrapper@34000 {
|
||||
compatible = "qcom,msm8996-qmp-pcie-phy";
|
||||
reg = <0x34000 0x488>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges = <0x0 0x34000 0x4000>;
|
||||
|
||||
clocks = <&gcc GCC_PCIE_PHY_AUX_CLK>,
|
||||
<&gcc GCC_PCIE_PHY_CFG_AHB_CLK>,
|
||||
<&gcc GCC_PCIE_CLKREF_CLK>;
|
||||
clock-names = "aux", "cfg_ahb", "ref";
|
||||
|
||||
resets = <&gcc GCC_PCIE_PHY_BCR>,
|
||||
<&gcc GCC_PCIE_PHY_COM_BCR>,
|
||||
<&gcc GCC_PCIE_PHY_COM_NOCSR_BCR>;
|
||||
reset-names = "phy", "common", "cfg";
|
||||
|
||||
vdda-phy-supply = <&vreg_l28a_0p925>;
|
||||
vdda-pll-supply = <&vreg_l12a_1p8>;
|
||||
|
||||
pciephy_0: phy@1000 {
|
||||
reg = <0x1000 0x130>,
|
||||
<0x1200 0x200>,
|
||||
<0x1400 0x1dc>;
|
||||
|
||||
clocks = <&gcc GCC_PCIE_0_PIPE_CLK>;
|
||||
resets = <&gcc GCC_PCIE_0_PHY_BCR>;
|
||||
|
||||
#clock-cells = <0>;
|
||||
clock-output-names = "pcie_0_pipe_clk_src";
|
||||
|
||||
#phy-cells = <0>;
|
||||
};
|
||||
|
||||
pciephy_1: phy@2000 {
|
||||
reg = <0x2000 0x130>,
|
||||
<0x2200 0x200>,
|
||||
<0x2400 0x1dc>;
|
||||
|
||||
clocks = <&gcc GCC_PCIE_1_PIPE_CLK>;
|
||||
resets = <&gcc GCC_PCIE_1_PHY_BCR>;
|
||||
|
||||
#clock-cells = <0>;
|
||||
clock-output-names = "pcie_1_pipe_clk_src";
|
||||
|
||||
#phy-cells = <0>;
|
||||
};
|
||||
|
||||
pciephy_2: phy@3000 {
|
||||
reg = <0x3000 0x130>,
|
||||
<0x3200 0x200>,
|
||||
<0x3400 0x1dc>;
|
||||
|
||||
clocks = <&gcc GCC_PCIE_2_PIPE_CLK>;
|
||||
resets = <&gcc GCC_PCIE_2_PHY_BCR>;
|
||||
|
||||
#clock-cells = <0>;
|
||||
clock-output-names = "pcie_2_pipe_clk_src";
|
||||
|
||||
#phy-cells = <0>;
|
||||
};
|
||||
};
|
||||
296
Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
Normal file
296
Documentation/devicetree/bindings/phy/qcom,qmp-pcie-phy.yaml
Normal file
@@ -0,0 +1,296 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/phy/qcom,qmp-pcie-phy.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Qualcomm QMP PHY controller (PCIe)
|
||||
|
||||
maintainers:
|
||||
- Vinod Koul <vkoul@kernel.org>
|
||||
|
||||
description:
|
||||
QMP PHY controller supports physical layer functionality for a number of
|
||||
controllers on Qualcomm chipsets, such as, PCIe, UFS, and USB.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- qcom,ipq6018-qmp-pcie-phy
|
||||
- qcom,ipq8074-qmp-gen3-pcie-phy
|
||||
- qcom,ipq8074-qmp-pcie-phy
|
||||
- qcom,msm8998-qmp-pcie-phy
|
||||
- qcom,sc8180x-qmp-pcie-phy
|
||||
- qcom,sdm845-qhp-pcie-phy
|
||||
- qcom,sdm845-qmp-pcie-phy
|
||||
- qcom,sdx55-qmp-pcie-phy
|
||||
- qcom,sm8250-qmp-gen3x1-pcie-phy
|
||||
- qcom,sm8250-qmp-gen3x2-pcie-phy
|
||||
- qcom,sm8250-qmp-modem-pcie-phy
|
||||
- qcom,sm8450-qmp-gen3x1-pcie-phy
|
||||
- qcom,sm8450-qmp-gen4x2-pcie-phy
|
||||
|
||||
reg:
|
||||
items:
|
||||
- description: serdes
|
||||
|
||||
"#address-cells":
|
||||
enum: [ 1, 2 ]
|
||||
|
||||
"#size-cells":
|
||||
enum: [ 1, 2 ]
|
||||
|
||||
ranges: true
|
||||
|
||||
clocks:
|
||||
minItems: 2
|
||||
maxItems: 4
|
||||
|
||||
clock-names:
|
||||
minItems: 2
|
||||
maxItems: 4
|
||||
|
||||
resets:
|
||||
minItems: 1
|
||||
maxItems: 2
|
||||
|
||||
reset-names:
|
||||
minItems: 1
|
||||
maxItems: 2
|
||||
|
||||
vdda-phy-supply: true
|
||||
|
||||
vdda-pll-supply: true
|
||||
|
||||
vddp-ref-clk-supply: true
|
||||
|
||||
patternProperties:
|
||||
"^phy@[0-9a-f]+$":
|
||||
type: object
|
||||
description: single PHY-provider child node
|
||||
properties:
|
||||
reg:
|
||||
minItems: 3
|
||||
maxItems: 6
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: PIPE clock
|
||||
|
||||
clock-names:
|
||||
deprecated: true
|
||||
items:
|
||||
- const: pipe0
|
||||
|
||||
"#clock-cells":
|
||||
const: 0
|
||||
|
||||
clock-output-names:
|
||||
maxItems: 1
|
||||
|
||||
"#phy-cells":
|
||||
const: 0
|
||||
|
||||
required:
|
||||
- reg
|
||||
- clocks
|
||||
- "#clock-cells"
|
||||
- clock-output-names
|
||||
- "#phy-cells"
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- "#address-cells"
|
||||
- "#size-cells"
|
||||
- ranges
|
||||
- clocks
|
||||
- clock-names
|
||||
- resets
|
||||
- reset-names
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
allOf:
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,msm8998-qmp-pcie-phy
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
maxItems: 3
|
||||
clock-names:
|
||||
items:
|
||||
- const: aux
|
||||
- const: cfg_ahb
|
||||
- const: ref
|
||||
resets:
|
||||
maxItems: 2
|
||||
reset-names:
|
||||
items:
|
||||
- const: phy
|
||||
- const: common
|
||||
required:
|
||||
- vdda-phy-supply
|
||||
- vdda-pll-supply
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,ipq6018-qmp-pcie-phy
|
||||
- qcom,ipq8074-qmp-gen3-pcie-phy
|
||||
- qcom,ipq8074-qmp-pcie-phy
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
maxItems: 2
|
||||
clock-names:
|
||||
items:
|
||||
- const: aux
|
||||
- const: cfg_ahb
|
||||
resets:
|
||||
maxItems: 2
|
||||
reset-names:
|
||||
items:
|
||||
- const: phy
|
||||
- const: common
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,sc8180x-qmp-pcie-phy
|
||||
- qcom,sdm845-qhp-pcie-phy
|
||||
- qcom,sdm845-qmp-pcie-phy
|
||||
- qcom,sdx55-qmp-pcie-phy
|
||||
- qcom,sm8250-qmp-gen3x1-pcie-phy
|
||||
- qcom,sm8250-qmp-gen3x2-pcie-phy
|
||||
- qcom,sm8250-qmp-modem-pcie-phy
|
||||
- qcom,sm8450-qmp-gen3x1-pcie-phy
|
||||
- qcom,sm8450-qmp-gen4x2-pcie-phy
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
maxItems: 4
|
||||
clock-names:
|
||||
items:
|
||||
- const: aux
|
||||
- const: cfg_ahb
|
||||
- const: ref
|
||||
- const: refgen
|
||||
resets:
|
||||
maxItems: 1
|
||||
reset-names:
|
||||
items:
|
||||
- const: phy
|
||||
required:
|
||||
- vdda-phy-supply
|
||||
- vdda-pll-supply
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,sm8250-qmp-gen3x2-pcie-phy
|
||||
- qcom,sm8250-qmp-modem-pcie-phy
|
||||
- qcom,sm8450-qmp-gen4x2-pcie-phy
|
||||
then:
|
||||
patternProperties:
|
||||
"^phy@[0-9a-f]+$":
|
||||
properties:
|
||||
reg:
|
||||
items:
|
||||
- description: TX lane 1
|
||||
- description: RX lane 1
|
||||
- description: PCS
|
||||
- description: TX lane 2
|
||||
- description: RX lane 2
|
||||
- description: PCS_MISC
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,sc8180x-qmp-pcie-phy
|
||||
- qcom,sdm845-qmp-pcie-phy
|
||||
- qcom,sdx55-qmp-pcie-phy
|
||||
- qcom,sm8250-qmp-gen3x1-pcie-phy
|
||||
- qcom,sm8450-qmp-gen3x1-pcie-phy
|
||||
then:
|
||||
patternProperties:
|
||||
"^phy@[0-9a-f]+$":
|
||||
properties:
|
||||
reg:
|
||||
items:
|
||||
- description: TX
|
||||
- description: RX
|
||||
- description: PCS
|
||||
- description: PCS_MISC
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,ipq6018-qmp-pcie-phy
|
||||
- qcom,ipq8074-qmp-pcie-phy
|
||||
- qcom,msm8998-qmp-pcie-phy
|
||||
- qcom,sdm845-qhp-pcie-phy
|
||||
then:
|
||||
patternProperties:
|
||||
"^phy@[0-9a-f]+$":
|
||||
properties:
|
||||
reg:
|
||||
items:
|
||||
- description: TX
|
||||
- description: RX
|
||||
- description: PCS
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/qcom,gcc-sm8250.h>
|
||||
phy-wrapper@1c0e000 {
|
||||
compatible = "qcom,sm8250-qmp-gen3x2-pcie-phy";
|
||||
reg = <0x01c0e000 0x1c0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges = <0x0 0x01c0e000 0x1000>;
|
||||
|
||||
clocks = <&gcc GCC_PCIE_PHY_AUX_CLK>,
|
||||
<&gcc GCC_PCIE_1_CFG_AHB_CLK>,
|
||||
<&gcc GCC_PCIE_WIGIG_CLKREF_EN>,
|
||||
<&gcc GCC_PCIE1_PHY_REFGEN_CLK>;
|
||||
clock-names = "aux", "cfg_ahb", "ref", "refgen";
|
||||
|
||||
resets = <&gcc GCC_PCIE_1_PHY_BCR>;
|
||||
reset-names = "phy";
|
||||
|
||||
vdda-phy-supply = <&vreg_l10c_0p88>;
|
||||
vdda-pll-supply = <&vreg_l6b_1p2>;
|
||||
|
||||
phy@200 {
|
||||
reg = <0x200 0x170>,
|
||||
<0x400 0x200>,
|
||||
<0xa00 0x1f0>,
|
||||
<0x600 0x170>,
|
||||
<0x800 0x200>,
|
||||
<0xe00 0xf4>;
|
||||
|
||||
clocks = <&gcc GCC_PCIE_1_PIPE_CLK>;
|
||||
|
||||
#clock-cells = <0>;
|
||||
clock-output-names = "pcie_1_pipe_clk";
|
||||
|
||||
#phy-cells = <0>;
|
||||
};
|
||||
};
|
||||
@@ -1,502 +0,0 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
||||
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: "http://devicetree.org/schemas/phy/qcom,qmp-phy.yaml#"
|
||||
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
|
||||
|
||||
title: Qualcomm QMP PHY controller
|
||||
|
||||
maintainers:
|
||||
- Vinod Koul <vkoul@kernel.org>
|
||||
|
||||
description:
|
||||
QMP phy controller supports physical layer functionality for a number of
|
||||
controllers on Qualcomm chipsets, such as, PCIe, UFS, and USB.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- qcom,ipq6018-qmp-pcie-phy
|
||||
- qcom,ipq6018-qmp-usb3-phy
|
||||
- qcom,ipq8074-qmp-gen3-pcie-phy
|
||||
- qcom,ipq8074-qmp-pcie-phy
|
||||
- qcom,ipq8074-qmp-usb3-phy
|
||||
- qcom,msm8996-qmp-pcie-phy
|
||||
- qcom,msm8996-qmp-ufs-phy
|
||||
- qcom,msm8996-qmp-usb3-phy
|
||||
- qcom,msm8998-qmp-pcie-phy
|
||||
- qcom,msm8998-qmp-ufs-phy
|
||||
- qcom,msm8998-qmp-usb3-phy
|
||||
- qcom,qcm2290-qmp-usb3-phy
|
||||
- qcom,sc7180-qmp-usb3-phy
|
||||
- qcom,sc8180x-qmp-pcie-phy
|
||||
- qcom,sc8180x-qmp-ufs-phy
|
||||
- qcom,sc8180x-qmp-usb3-phy
|
||||
- qcom,sc8280xp-qmp-ufs-phy
|
||||
- qcom,sdm845-qhp-pcie-phy
|
||||
- qcom,sdm845-qmp-pcie-phy
|
||||
- qcom,sdm845-qmp-ufs-phy
|
||||
- qcom,sdm845-qmp-usb3-phy
|
||||
- qcom,sdm845-qmp-usb3-uni-phy
|
||||
- qcom,sm6115-qmp-ufs-phy
|
||||
- qcom,sm6350-qmp-ufs-phy
|
||||
- qcom,sm8150-qmp-ufs-phy
|
||||
- qcom,sm8150-qmp-usb3-phy
|
||||
- qcom,sm8150-qmp-usb3-uni-phy
|
||||
- qcom,sm8250-qmp-ufs-phy
|
||||
- qcom,sm8250-qmp-gen3x1-pcie-phy
|
||||
- qcom,sm8250-qmp-gen3x2-pcie-phy
|
||||
- qcom,sm8250-qmp-modem-pcie-phy
|
||||
- qcom,sm8250-qmp-usb3-phy
|
||||
- qcom,sm8250-qmp-usb3-uni-phy
|
||||
- qcom,sm8350-qmp-ufs-phy
|
||||
- qcom,sm8350-qmp-usb3-phy
|
||||
- qcom,sm8350-qmp-usb3-uni-phy
|
||||
- qcom,sm8450-qmp-gen3x1-pcie-phy
|
||||
- qcom,sm8450-qmp-gen4x2-pcie-phy
|
||||
- qcom,sm8450-qmp-ufs-phy
|
||||
- qcom,sm8450-qmp-usb3-phy
|
||||
- qcom,sdx55-qmp-pcie-phy
|
||||
- qcom,sdx55-qmp-usb3-uni-phy
|
||||
- qcom,sdx65-qmp-usb3-uni-phy
|
||||
|
||||
reg:
|
||||
minItems: 1
|
||||
items:
|
||||
- description: Address and length of PHY's common serdes block.
|
||||
- description: Address and length of PHY's DP_COM control block.
|
||||
|
||||
"#clock-cells":
|
||||
enum: [ 1, 2 ]
|
||||
|
||||
"#address-cells":
|
||||
enum: [ 1, 2 ]
|
||||
|
||||
"#size-cells":
|
||||
enum: [ 1, 2 ]
|
||||
|
||||
ranges: true
|
||||
|
||||
clocks:
|
||||
minItems: 1
|
||||
maxItems: 4
|
||||
|
||||
clock-names:
|
||||
minItems: 1
|
||||
maxItems: 4
|
||||
|
||||
resets:
|
||||
minItems: 1
|
||||
maxItems: 3
|
||||
|
||||
reset-names:
|
||||
minItems: 1
|
||||
maxItems: 3
|
||||
|
||||
vdda-phy-supply:
|
||||
description:
|
||||
Phandle to a regulator supply to PHY core block.
|
||||
|
||||
vdda-pll-supply:
|
||||
description:
|
||||
Phandle to 1.8V regulator supply to PHY refclk pll block.
|
||||
|
||||
vddp-ref-clk-supply:
|
||||
description:
|
||||
Phandle to a regulator supply to any specific refclk pll block.
|
||||
|
||||
#Required nodes:
|
||||
patternProperties:
|
||||
"^phy@[0-9a-f]+$":
|
||||
type: object
|
||||
description:
|
||||
Each device node of QMP phy is required to have as many child nodes as
|
||||
the number of lanes the PHY has.
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- "#clock-cells"
|
||||
- "#address-cells"
|
||||
- "#size-cells"
|
||||
- ranges
|
||||
- clocks
|
||||
- clock-names
|
||||
- resets
|
||||
- reset-names
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
allOf:
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,sdm845-qmp-usb3-uni-phy
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
items:
|
||||
- description: Phy aux clock.
|
||||
- description: Phy config clock.
|
||||
- description: 19.2 MHz ref clk.
|
||||
- description: Phy common block aux clock.
|
||||
clock-names:
|
||||
items:
|
||||
- const: aux
|
||||
- const: cfg_ahb
|
||||
- const: ref
|
||||
- const: com_aux
|
||||
resets:
|
||||
items:
|
||||
- description: reset of phy block.
|
||||
- description: phy common block reset.
|
||||
reset-names:
|
||||
items:
|
||||
- const: phy
|
||||
- const: common
|
||||
required:
|
||||
- vdda-phy-supply
|
||||
- vdda-pll-supply
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,sdx55-qmp-usb3-uni-phy
|
||||
- qcom,sdx65-qmp-usb3-uni-phy
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
items:
|
||||
- description: Phy aux clock.
|
||||
- description: Phy config clock.
|
||||
- description: 19.2 MHz ref clk.
|
||||
clock-names:
|
||||
items:
|
||||
- const: aux
|
||||
- const: cfg_ahb
|
||||
- const: ref
|
||||
resets:
|
||||
items:
|
||||
- description: reset of phy block.
|
||||
- description: phy common block reset.
|
||||
reset-names:
|
||||
items:
|
||||
- const: phy
|
||||
- const: common
|
||||
required:
|
||||
- vdda-phy-supply
|
||||
- vdda-pll-supply
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,msm8996-qmp-pcie-phy
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
items:
|
||||
- description: Phy aux clock.
|
||||
- description: Phy config clock.
|
||||
- description: 19.2 MHz ref clk.
|
||||
clock-names:
|
||||
items:
|
||||
- const: aux
|
||||
- const: cfg_ahb
|
||||
- const: ref
|
||||
resets:
|
||||
items:
|
||||
- description: reset of phy block.
|
||||
- description: phy common block reset.
|
||||
- description: phy's ahb cfg block reset.
|
||||
reset-names:
|
||||
items:
|
||||
- const: phy
|
||||
- const: common
|
||||
- const: cfg
|
||||
required:
|
||||
- vdda-phy-supply
|
||||
- vdda-pll-supply
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,ipq8074-qmp-usb3-phy
|
||||
- qcom,msm8996-qmp-usb3-phy
|
||||
- qcom,msm8998-qmp-pcie-phy
|
||||
- qcom,msm8998-qmp-usb3-phy
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
items:
|
||||
- description: Phy aux clock.
|
||||
- description: Phy config clock.
|
||||
- description: 19.2 MHz ref clk.
|
||||
clock-names:
|
||||
items:
|
||||
- const: aux
|
||||
- const: cfg_ahb
|
||||
- const: ref
|
||||
resets:
|
||||
items:
|
||||
- description: reset of phy block.
|
||||
- description: phy common block reset.
|
||||
reset-names:
|
||||
items:
|
||||
- const: phy
|
||||
- const: common
|
||||
required:
|
||||
- vdda-phy-supply
|
||||
- vdda-pll-supply
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,msm8996-qmp-ufs-phy
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
items:
|
||||
- description: 19.2 MHz ref clk.
|
||||
clock-names:
|
||||
items:
|
||||
- const: ref
|
||||
resets:
|
||||
items:
|
||||
- description: PHY reset in the UFS controller.
|
||||
reset-names:
|
||||
items:
|
||||
- const: ufsphy
|
||||
required:
|
||||
- vdda-phy-supply
|
||||
- vdda-pll-supply
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,msm8998-qmp-ufs-phy
|
||||
- qcom,sdm845-qmp-ufs-phy
|
||||
- qcom,sm6350-qmp-ufs-phy
|
||||
- qcom,sm8150-qmp-ufs-phy
|
||||
- qcom,sm8250-qmp-ufs-phy
|
||||
- qcom,sc8180x-qmp-ufs-phy
|
||||
- qcom,sc8280xp-qmp-ufs-phy
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
items:
|
||||
- description: 19.2 MHz ref clk.
|
||||
- description: Phy reference aux clock.
|
||||
clock-names:
|
||||
items:
|
||||
- const: ref
|
||||
- const: ref_aux
|
||||
resets:
|
||||
items:
|
||||
- description: PHY reset in the UFS controller.
|
||||
reset-names:
|
||||
items:
|
||||
- const: ufsphy
|
||||
required:
|
||||
- vdda-phy-supply
|
||||
- vdda-pll-supply
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,ipq6018-qmp-pcie-phy
|
||||
- qcom,ipq8074-qmp-gen3-pcie-phy
|
||||
- qcom,ipq8074-qmp-pcie-phy
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
items:
|
||||
- description: Phy aux clock.
|
||||
- description: Phy config clock.
|
||||
clock-names:
|
||||
items:
|
||||
- const: aux
|
||||
- const: cfg_ahb
|
||||
resets:
|
||||
items:
|
||||
- description: reset of phy block.
|
||||
- description: phy common block reset.
|
||||
reset-names:
|
||||
items:
|
||||
- const: phy
|
||||
- const: common
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,sc8180x-qmp-pcie-phy
|
||||
- qcom,sdm845-qhp-pcie-phy
|
||||
- qcom,sdm845-qmp-pcie-phy
|
||||
- qcom,sdx55-qmp-pcie-phy
|
||||
- qcom,sm8250-qmp-gen3x1-pcie-phy
|
||||
- qcom,sm8250-qmp-gen3x2-pcie-phy
|
||||
- qcom,sm8250-qmp-modem-pcie-phy
|
||||
- qcom,sm8450-qmp-gen3x1-pcie-phy
|
||||
- qcom,sm8450-qmp-gen4x2-pcie-phy
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
items:
|
||||
- description: Phy aux clock.
|
||||
- description: Phy config clock.
|
||||
- description: 19.2 MHz ref clk.
|
||||
- description: Phy refgen clk.
|
||||
clock-names:
|
||||
items:
|
||||
- const: aux
|
||||
- const: cfg_ahb
|
||||
- const: ref
|
||||
- const: refgen
|
||||
resets:
|
||||
items:
|
||||
- description: reset of phy block.
|
||||
reset-names:
|
||||
items:
|
||||
- const: phy
|
||||
required:
|
||||
- vdda-phy-supply
|
||||
- vdda-pll-supply
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,sm8150-qmp-usb3-phy
|
||||
- qcom,sm8150-qmp-usb3-uni-phy
|
||||
- qcom,sm8250-qmp-usb3-uni-phy
|
||||
- qcom,sm8350-qmp-usb3-uni-phy
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
items:
|
||||
- description: Phy aux clock.
|
||||
- description: 19.2 MHz ref clk source.
|
||||
- description: 19.2 MHz ref clk.
|
||||
- description: Phy common block aux clock.
|
||||
clock-names:
|
||||
items:
|
||||
- const: aux
|
||||
- const: ref_clk_src
|
||||
- const: ref
|
||||
- const: com_aux
|
||||
resets:
|
||||
items:
|
||||
- description: reset of phy block.
|
||||
- description: phy common block reset.
|
||||
reset-names:
|
||||
items:
|
||||
- const: phy
|
||||
- const: common
|
||||
required:
|
||||
- vdda-phy-supply
|
||||
- vdda-pll-supply
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,sm8250-qmp-usb3-phy
|
||||
- qcom,sm8350-qmp-usb3-phy
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
items:
|
||||
- description: Phy aux clock.
|
||||
- description: 19.2 MHz ref clk.
|
||||
- description: Phy common block aux clock.
|
||||
clock-names:
|
||||
items:
|
||||
- const: aux
|
||||
- const: ref_clk_src
|
||||
- const: com_aux
|
||||
resets:
|
||||
items:
|
||||
- description: reset of phy block.
|
||||
- description: phy common block reset.
|
||||
reset-names:
|
||||
items:
|
||||
- const: phy
|
||||
- const: common
|
||||
required:
|
||||
- vdda-phy-supply
|
||||
- vdda-pll-supply
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,qcm2290-qmp-usb3-phy
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
items:
|
||||
- description: Phy config clock.
|
||||
- description: 19.2 MHz ref clk.
|
||||
- description: Phy common block aux clock.
|
||||
clock-names:
|
||||
items:
|
||||
- const: cfg_ahb
|
||||
- const: ref
|
||||
- const: com_aux
|
||||
resets:
|
||||
items:
|
||||
- description: phy_phy reset.
|
||||
- description: reset of phy block.
|
||||
reset-names:
|
||||
items:
|
||||
- const: phy_phy
|
||||
- const: phy
|
||||
required:
|
||||
- vdda-phy-supply
|
||||
- vdda-pll-supply
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/qcom,gcc-sdm845.h>
|
||||
usb_2_qmpphy: phy-wrapper@88eb000 {
|
||||
compatible = "qcom,sdm845-qmp-usb3-uni-phy";
|
||||
reg = <0x088eb000 0x18c>;
|
||||
#clock-cells = <1>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges = <0x0 0x088eb000 0x2000>;
|
||||
|
||||
clocks = <&gcc GCC_USB3_SEC_PHY_AUX_CLK >,
|
||||
<&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>,
|
||||
<&gcc GCC_USB3_SEC_CLKREF_CLK>,
|
||||
<&gcc GCC_USB3_SEC_PHY_COM_AUX_CLK>;
|
||||
clock-names = "aux", "cfg_ahb", "ref", "com_aux";
|
||||
|
||||
resets = <&gcc GCC_USB3PHY_PHY_SEC_BCR>,
|
||||
<&gcc GCC_USB3_PHY_SEC_BCR>;
|
||||
reset-names = "phy", "common";
|
||||
|
||||
vdda-phy-supply = <&vdda_usb2_ss_1p2>;
|
||||
vdda-pll-supply = <&vdda_usb2_ss_core>;
|
||||
|
||||
usb_2_ssphy: phy@200 {
|
||||
reg = <0x200 0x128>,
|
||||
<0x400 0x1fc>,
|
||||
<0x800 0x218>,
|
||||
<0x600 0x70>;
|
||||
#clock-cells = <0>;
|
||||
#phy-cells = <0>;
|
||||
clocks = <&gcc GCC_USB3_SEC_PHY_PIPE_CLK>;
|
||||
clock-names = "pipe0";
|
||||
clock-output-names = "usb3_uni_phy_pipe_clk_src";
|
||||
};
|
||||
};
|
||||
240
Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
Normal file
240
Documentation/devicetree/bindings/phy/qcom,qmp-ufs-phy.yaml
Normal file
@@ -0,0 +1,240 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/phy/qcom,qmp-ufs-phy.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Qualcomm QMP PHY controller (UFS)
|
||||
|
||||
maintainers:
|
||||
- Vinod Koul <vkoul@kernel.org>
|
||||
|
||||
description:
|
||||
QMP PHY controller supports physical layer functionality for a number of
|
||||
controllers on Qualcomm chipsets, such as, PCIe, UFS, and USB.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- qcom,msm8996-qmp-ufs-phy
|
||||
- qcom,msm8998-qmp-ufs-phy
|
||||
- qcom,sc8180x-qmp-ufs-phy
|
||||
- qcom,sc8280xp-qmp-ufs-phy
|
||||
- qcom,sdm845-qmp-ufs-phy
|
||||
- qcom,sm6115-qmp-ufs-phy
|
||||
- qcom,sm6350-qmp-ufs-phy
|
||||
- qcom,sm8150-qmp-ufs-phy
|
||||
- qcom,sm8250-qmp-ufs-phy
|
||||
- qcom,sm8350-qmp-ufs-phy
|
||||
- qcom,sm8450-qmp-ufs-phy
|
||||
|
||||
reg:
|
||||
items:
|
||||
- description: serdes
|
||||
|
||||
"#address-cells":
|
||||
enum: [ 1, 2 ]
|
||||
|
||||
"#size-cells":
|
||||
enum: [ 1, 2 ]
|
||||
|
||||
ranges: true
|
||||
|
||||
clocks:
|
||||
minItems: 1
|
||||
maxItems: 3
|
||||
|
||||
clock-names:
|
||||
minItems: 1
|
||||
maxItems: 3
|
||||
|
||||
power-domains:
|
||||
maxItems: 1
|
||||
|
||||
resets:
|
||||
maxItems: 1
|
||||
|
||||
reset-names:
|
||||
items:
|
||||
- const: ufsphy
|
||||
|
||||
vdda-phy-supply: true
|
||||
|
||||
vdda-pll-supply: true
|
||||
|
||||
vddp-ref-clk-supply: true
|
||||
|
||||
patternProperties:
|
||||
"^phy@[0-9a-f]+$":
|
||||
type: object
|
||||
description: single PHY-provider child node
|
||||
properties:
|
||||
reg:
|
||||
minItems: 3
|
||||
maxItems: 6
|
||||
|
||||
"#phy-cells":
|
||||
const: 0
|
||||
|
||||
required:
|
||||
- reg
|
||||
- "#phy-cells"
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- "#address-cells"
|
||||
- "#size-cells"
|
||||
- ranges
|
||||
- clocks
|
||||
- clock-names
|
||||
- resets
|
||||
- reset-names
|
||||
- vdda-phy-supply
|
||||
- vdda-pll-supply
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
allOf:
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,msm8996-qmp-ufs-phy
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
maxItems: 1
|
||||
clock-names:
|
||||
items:
|
||||
- const: ref
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,msm8998-qmp-ufs-phy
|
||||
- qcom,sc8180x-qmp-ufs-phy
|
||||
- qcom,sc8280xp-qmp-ufs-phy
|
||||
- qcom,sdm845-qmp-ufs-phy
|
||||
- qcom,sm6115-qmp-ufs-phy
|
||||
- qcom,sm6350-qmp-ufs-phy
|
||||
- qcom,sm8150-qmp-ufs-phy
|
||||
- qcom,sm8250-qmp-ufs-phy
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
maxItems: 2
|
||||
clock-names:
|
||||
items:
|
||||
- const: ref
|
||||
- const: ref_aux
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,sm8450-qmp-ufs-phy
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
maxItems: 3
|
||||
clock-names:
|
||||
items:
|
||||
- const: ref
|
||||
- const: ref_aux
|
||||
- const: qref
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,msm8998-qmp-ufs-phy
|
||||
- qcom,sc8280xp-qmp-ufs-phy
|
||||
- qcom,sdm845-qmp-ufs-phy
|
||||
- qcom,sm6350-qmp-ufs-phy
|
||||
- qcom,sm8150-qmp-ufs-phy
|
||||
- qcom,sm8250-qmp-ufs-phy
|
||||
- qcom,sm8350-qmp-ufs-phy
|
||||
- qcom,sm8450-qmp-ufs-phy
|
||||
then:
|
||||
patternProperties:
|
||||
"^phy@[0-9a-f]+$":
|
||||
properties:
|
||||
reg:
|
||||
items:
|
||||
- description: TX lane 1
|
||||
- description: RX lane 1
|
||||
- description: PCS
|
||||
- description: TX lane 2
|
||||
- description: RX lane 2
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,sc8180x-qmp-ufs-phy
|
||||
then:
|
||||
patternProperties:
|
||||
"^phy@[0-9a-f]+$":
|
||||
properties:
|
||||
reg:
|
||||
items:
|
||||
- description: TX
|
||||
- description: RX
|
||||
- description: PCS
|
||||
- description: PCS_MISC
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,msm8996-qmp-ufs-phy
|
||||
- qcom,sm6115-qmp-ufs-phy
|
||||
then:
|
||||
patternProperties:
|
||||
"^phy@[0-9a-f]+$":
|
||||
properties:
|
||||
reg:
|
||||
items:
|
||||
- description: TX
|
||||
- description: RX
|
||||
- description: PCS
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/qcom,gcc-sc8280xp.h>
|
||||
#include <dt-bindings/clock/qcom,rpmh.h>
|
||||
phy-wrapper@1d87000 {
|
||||
compatible = "qcom,sc8280xp-qmp-ufs-phy";
|
||||
reg = <0x01d87000 0xe10>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges = <0x0 0x01d87000 0x1000>;
|
||||
|
||||
clocks = <&rpmhcc RPMH_CXO_CLK>, <&gcc GCC_UFS_PHY_PHY_AUX_CLK>;
|
||||
clock-names = "ref", "ref_aux";
|
||||
|
||||
resets = <&ufs_mem_hc 0>;
|
||||
reset-names = "ufsphy";
|
||||
|
||||
vdda-phy-supply = <&vreg_l6b>;
|
||||
vdda-pll-supply = <&vreg_l3b>;
|
||||
|
||||
phy@400 {
|
||||
reg = <0x400 0x108>,
|
||||
<0x600 0x1e0>,
|
||||
<0xc00 0x1dc>,
|
||||
<0x800 0x108>,
|
||||
<0xa00 0x1e0>;
|
||||
#phy-cells = <0>;
|
||||
};
|
||||
};
|
||||
401
Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
Normal file
401
Documentation/devicetree/bindings/phy/qcom,qmp-usb-phy.yaml
Normal file
@@ -0,0 +1,401 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/phy/qcom,qmp-usb-phy.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Qualcomm QMP PHY controller (USB)
|
||||
|
||||
maintainers:
|
||||
- Vinod Koul <vkoul@kernel.org>
|
||||
|
||||
description:
|
||||
QMP PHY controller supports physical layer functionality for a number of
|
||||
controllers on Qualcomm chipsets, such as, PCIe, UFS, and USB.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- qcom,ipq6018-qmp-usb3-phy
|
||||
- qcom,ipq8074-qmp-usb3-phy
|
||||
- qcom,msm8996-qmp-usb3-phy
|
||||
- qcom,msm8998-qmp-usb3-phy
|
||||
- qcom,qcm2290-qmp-usb3-phy
|
||||
- qcom,sc7180-qmp-usb3-phy
|
||||
- qcom,sc8180x-qmp-usb3-phy
|
||||
- qcom,sc8280xp-qmp-usb3-uni-phy
|
||||
- qcom,sdm845-qmp-usb3-phy
|
||||
- qcom,sdm845-qmp-usb3-uni-phy
|
||||
- qcom,sdx55-qmp-usb3-uni-phy
|
||||
- qcom,sdx65-qmp-usb3-uni-phy
|
||||
- qcom,sm8150-qmp-usb3-phy
|
||||
- qcom,sm8150-qmp-usb3-uni-phy
|
||||
- qcom,sm8250-qmp-usb3-phy
|
||||
- qcom,sm8250-qmp-usb3-uni-phy
|
||||
- qcom,sm8350-qmp-usb3-phy
|
||||
- qcom,sm8350-qmp-usb3-uni-phy
|
||||
- qcom,sm8450-qmp-usb3-phy
|
||||
|
||||
reg:
|
||||
minItems: 1
|
||||
items:
|
||||
- description: serdes
|
||||
- description: DP_COM
|
||||
|
||||
"#address-cells":
|
||||
enum: [ 1, 2 ]
|
||||
|
||||
"#size-cells":
|
||||
enum: [ 1, 2 ]
|
||||
|
||||
ranges: true
|
||||
|
||||
clocks:
|
||||
minItems: 3
|
||||
maxItems: 4
|
||||
|
||||
clock-names:
|
||||
minItems: 3
|
||||
maxItems: 4
|
||||
|
||||
power-domains:
|
||||
maxItems: 1
|
||||
|
||||
resets:
|
||||
maxItems: 2
|
||||
|
||||
reset-names:
|
||||
maxItems: 2
|
||||
|
||||
vdda-phy-supply: true
|
||||
|
||||
vdda-pll-supply: true
|
||||
|
||||
vddp-ref-clk-supply: true
|
||||
|
||||
patternProperties:
|
||||
"^phy@[0-9a-f]+$":
|
||||
type: object
|
||||
description: single PHY-provider child node
|
||||
properties:
|
||||
reg:
|
||||
minItems: 3
|
||||
maxItems: 6
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: PIPE clock
|
||||
|
||||
clock-names:
|
||||
deprecated: true
|
||||
items:
|
||||
- const: pipe0
|
||||
|
||||
"#clock-cells":
|
||||
const: 0
|
||||
|
||||
clock-output-names:
|
||||
maxItems: 1
|
||||
|
||||
"#phy-cells":
|
||||
const: 0
|
||||
|
||||
required:
|
||||
- reg
|
||||
- clocks
|
||||
- "#clock-cells"
|
||||
- clock-output-names
|
||||
- "#phy-cells"
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- "#address-cells"
|
||||
- "#size-cells"
|
||||
- ranges
|
||||
- clocks
|
||||
- clock-names
|
||||
- resets
|
||||
- reset-names
|
||||
- vdda-phy-supply
|
||||
- vdda-pll-supply
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
allOf:
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,sc7180-qmp-usb3-phy
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
maxItems: 4
|
||||
clock-names:
|
||||
items:
|
||||
- const: aux
|
||||
- const: cfg_ahb
|
||||
- const: ref
|
||||
- const: com_aux
|
||||
resets:
|
||||
maxItems: 1
|
||||
reset-names:
|
||||
items:
|
||||
- const: phy
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,sdm845-qmp-usb3-uni-phy
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
maxItems: 4
|
||||
clock-names:
|
||||
items:
|
||||
- const: aux
|
||||
- const: cfg_ahb
|
||||
- const: ref
|
||||
- const: com_aux
|
||||
resets:
|
||||
maxItems: 2
|
||||
reset-names:
|
||||
items:
|
||||
- const: phy
|
||||
- const: common
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,ipq8074-qmp-usb3-phy
|
||||
- qcom,msm8996-qmp-usb3-phy
|
||||
- qcom,msm8998-qmp-usb3-phy
|
||||
- qcom,sdx55-qmp-usb3-uni-phy
|
||||
- qcom,sdx65-qmp-usb3-uni-phy
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
maxItems: 3
|
||||
clock-names:
|
||||
items:
|
||||
- const: aux
|
||||
- const: cfg_ahb
|
||||
- const: ref
|
||||
resets:
|
||||
maxItems: 2
|
||||
reset-names:
|
||||
items:
|
||||
- const: phy
|
||||
- const: common
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,sc8280xp-qmp-usb3-uni-phy
|
||||
- qcom,sm8150-qmp-usb3-phy
|
||||
- qcom,sm8150-qmp-usb3-uni-phy
|
||||
- qcom,sm8250-qmp-usb3-uni-phy
|
||||
- qcom,sm8350-qmp-usb3-uni-phy
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
maxItems: 4
|
||||
clock-names:
|
||||
items:
|
||||
- const: aux
|
||||
- const: ref_clk_src
|
||||
- const: ref
|
||||
- const: com_aux
|
||||
resets:
|
||||
maxItems: 2
|
||||
reset-names:
|
||||
items:
|
||||
- const: phy
|
||||
- const: common
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,sm8250-qmp-usb3-phy
|
||||
- qcom,sm8350-qmp-usb3-phy
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
maxItems: 3
|
||||
clock-names:
|
||||
items:
|
||||
- const: aux
|
||||
- const: ref_clk_src
|
||||
- const: com_aux
|
||||
resets:
|
||||
maxItems: 2
|
||||
reset-names:
|
||||
items:
|
||||
- const: phy
|
||||
- const: common
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,qcm2290-qmp-usb3-phy
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
maxItems: 3
|
||||
clock-names:
|
||||
items:
|
||||
- const: cfg_ahb
|
||||
- const: ref
|
||||
- const: com_aux
|
||||
resets:
|
||||
maxItems: 2
|
||||
reset-names:
|
||||
items:
|
||||
- const: phy_phy
|
||||
- const: phy
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,sc8280xp-qmp-usb3-uni-phy
|
||||
then:
|
||||
required:
|
||||
- power-domains
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,sdm845-qmp-usb3-phy
|
||||
- qcom,sm8150-qmp-usb3-phy
|
||||
- qcom,sm8350-qmp-usb3-phy
|
||||
- qcom,sm8450-qmp-usb3-phy
|
||||
then:
|
||||
patternProperties:
|
||||
"^phy@[0-9a-f]+$":
|
||||
properties:
|
||||
reg:
|
||||
items:
|
||||
- description: TX lane 1
|
||||
- description: RX lane 1
|
||||
- description: PCS
|
||||
- description: TX lane 2
|
||||
- description: RX lane 2
|
||||
- description: PCS_MISC
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,msm8998-qmp-usb3-phy
|
||||
then:
|
||||
patternProperties:
|
||||
"^phy@[0-9a-f]+$":
|
||||
properties:
|
||||
reg:
|
||||
items:
|
||||
- description: TX lane 1
|
||||
- description: RX lane 1
|
||||
- description: PCS
|
||||
- description: TX lane 2
|
||||
- description: RX lane 2
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,ipq6018-qmp-usb3-phy
|
||||
- qcom,ipq8074-qmp-usb3-phy
|
||||
- qcom,qcm2290-qmp-usb3-phy
|
||||
- qcom,sc7180-qmp-usb3-phy
|
||||
- qcom,sc8180x-qmp-usb3-phy
|
||||
- qcom,sdx55-qmp-usb3-uni-phy
|
||||
- qcom,sdx65-qmp-usb3-uni-phy
|
||||
- qcom,sm8150-qmp-usb3-uni-phy
|
||||
- qcom,sm8250-qmp-usb3-phy
|
||||
then:
|
||||
patternProperties:
|
||||
"^phy@[0-9a-f]+$":
|
||||
properties:
|
||||
reg:
|
||||
items:
|
||||
- description: TX
|
||||
- description: RX
|
||||
- description: PCS
|
||||
- description: PCS_MISC
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,msm8996-qmp-usb3-phy
|
||||
- qcom,sc8280xp-qmp-usb3-uni-phy
|
||||
- qcom,sm8250-qmp-usb3-uni-phy
|
||||
- qcom,sm8350-qmp-usb3-uni-phy
|
||||
then:
|
||||
patternProperties:
|
||||
"^phy@[0-9a-f]+$":
|
||||
properties:
|
||||
reg:
|
||||
items:
|
||||
- description: TX
|
||||
- description: RX
|
||||
- description: PCS
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/qcom,gcc-sdm845.h>
|
||||
usb_2_qmpphy: phy-wrapper@88eb000 {
|
||||
compatible = "qcom,sdm845-qmp-usb3-uni-phy";
|
||||
reg = <0x088eb000 0x18c>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges = <0x0 0x088eb000 0x2000>;
|
||||
|
||||
clocks = <&gcc GCC_USB3_SEC_PHY_AUX_CLK >,
|
||||
<&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>,
|
||||
<&gcc GCC_USB3_SEC_CLKREF_CLK>,
|
||||
<&gcc GCC_USB3_SEC_PHY_COM_AUX_CLK>;
|
||||
clock-names = "aux", "cfg_ahb", "ref", "com_aux";
|
||||
|
||||
resets = <&gcc GCC_USB3PHY_PHY_SEC_BCR>,
|
||||
<&gcc GCC_USB3_PHY_SEC_BCR>;
|
||||
reset-names = "phy", "common";
|
||||
|
||||
vdda-phy-supply = <&vdda_usb2_ss_1p2>;
|
||||
vdda-pll-supply = <&vdda_usb2_ss_core>;
|
||||
|
||||
usb_2_ssphy: phy@200 {
|
||||
reg = <0x200 0x128>,
|
||||
<0x400 0x1fc>,
|
||||
<0x800 0x218>,
|
||||
<0x600 0x70>;
|
||||
|
||||
clocks = <&gcc GCC_USB3_SEC_PHY_PIPE_CLK>;
|
||||
|
||||
#clock-cells = <0>;
|
||||
clock-output-names = "usb3_uni_phy_pipe_clk_src";
|
||||
|
||||
#phy-cells = <0>;
|
||||
};
|
||||
};
|
||||
@@ -16,6 +16,7 @@ properties:
|
||||
- qcom,sc7180-qmp-usb3-dp-phy
|
||||
- qcom,sc7280-qmp-usb3-dp-phy
|
||||
- qcom,sc8180x-qmp-usb3-dp-phy
|
||||
- qcom,sc8280xp-qmp-usb43dp-phy
|
||||
- qcom,sdm845-qmp-usb3-dp-phy
|
||||
- qcom,sm8250-qmp-usb3-dp-phy
|
||||
reg:
|
||||
@@ -30,9 +31,6 @@ properties:
|
||||
- const: dp_com
|
||||
- const: dp
|
||||
|
||||
"#clock-cells":
|
||||
enum: [ 1, 2 ]
|
||||
|
||||
"#address-cells":
|
||||
enum: [ 1, 2 ]
|
||||
|
||||
@@ -55,6 +53,9 @@ properties:
|
||||
- const: ref
|
||||
- const: com_aux
|
||||
|
||||
power-domains:
|
||||
maxItems: 1
|
||||
|
||||
resets:
|
||||
items:
|
||||
- description: reset of phy block.
|
||||
@@ -81,6 +82,7 @@ properties:
|
||||
patternProperties:
|
||||
"^usb3-phy@[0-9a-f]+$":
|
||||
type: object
|
||||
additionalProperties: false
|
||||
description:
|
||||
The USB3 PHY.
|
||||
|
||||
@@ -99,6 +101,7 @@ patternProperties:
|
||||
- description: pipe clock
|
||||
|
||||
clock-names:
|
||||
deprecated: true
|
||||
items:
|
||||
- const: pipe0
|
||||
|
||||
@@ -115,12 +118,12 @@ patternProperties:
|
||||
required:
|
||||
- reg
|
||||
- clocks
|
||||
- clock-names
|
||||
- '#clock-cells'
|
||||
- '#phy-cells'
|
||||
|
||||
"^dp-phy@[0-9a-f]+$":
|
||||
type: object
|
||||
additionalProperties: false
|
||||
description:
|
||||
The DP PHY.
|
||||
|
||||
@@ -147,7 +150,6 @@ patternProperties:
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- "#clock-cells"
|
||||
- "#address-cells"
|
||||
- "#size-cells"
|
||||
- ranges
|
||||
@@ -160,6 +162,17 @@ required:
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
allOf:
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,sc8280xp-qmp-usb43dp-phy
|
||||
then:
|
||||
required:
|
||||
- power-domains
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/qcom,gcc-sdm845.h>
|
||||
@@ -169,7 +182,6 @@ examples:
|
||||
<0x088e8000 0x10>,
|
||||
<0x088ea000 0x40>;
|
||||
reg-names = "usb", "dp_com", "dp";
|
||||
#clock-cells = <1>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges = <0x0 0x088e9000 0x2000>;
|
||||
@@ -197,7 +209,6 @@ examples:
|
||||
#clock-cells = <0>;
|
||||
#phy-cells = <0>;
|
||||
clocks = <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>;
|
||||
clock-names = "pipe0";
|
||||
clock-output-names = "usb3_phy_pipe_clk_src";
|
||||
};
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ properties:
|
||||
- items:
|
||||
- enum:
|
||||
- qcom,sc7180-qusb2-phy
|
||||
- qcom,sdm670-qusb2-phy
|
||||
- qcom,sdm845-qusb2-phy
|
||||
- qcom,sm6350-qusb2-phy
|
||||
- const: qcom,qusb2-v2-phy
|
||||
|
||||
@@ -20,6 +20,7 @@ properties:
|
||||
- qcom,sc7280-usb-hs-phy
|
||||
- qcom,sc8180x-usb-hs-phy
|
||||
- qcom,sc8280xp-usb-hs-phy
|
||||
- qcom,sm6375-usb-hs-phy
|
||||
- qcom,sm8150-usb-hs-phy
|
||||
- qcom,sm8250-usb-hs-phy
|
||||
- qcom,sm8350-usb-hs-phy
|
||||
@@ -53,6 +54,94 @@ properties:
|
||||
vdda33-supply:
|
||||
description: phandle to the regulator 3.3V supply node.
|
||||
|
||||
qcom,hs-disconnect-bp:
|
||||
description:
|
||||
This adjusts the voltage level for the threshold used to
|
||||
detect a disconnect event at the host.
|
||||
The hardware accepts only discrete values. The value closest to the
|
||||
provided input will be chosen as the override value for this param.
|
||||
minimum: -272
|
||||
maximum: 2156
|
||||
|
||||
qcom,squelch-detector-bp:
|
||||
description:
|
||||
This adjusts the voltage level for the threshold used to
|
||||
detect valid high-speed data.
|
||||
The hardware accepts only discrete values. The value closest to the
|
||||
provided input will be chosen as the override value for this param.
|
||||
minimum: -2090
|
||||
maximum: 1590
|
||||
|
||||
qcom,hs-amplitude-bp:
|
||||
description:
|
||||
This adjusts the high-speed DC level voltage.
|
||||
The hardware accepts only discrete values. The value closest to the
|
||||
provided input will be chosen as the override value for this param.
|
||||
minimum: -660
|
||||
maximum: 2670
|
||||
|
||||
qcom,pre-emphasis-duration-bp:
|
||||
description:
|
||||
This signal controls the duration for which the
|
||||
HS pre-emphasis current is sourced onto DP<#> or DM<#>.
|
||||
The HS Transmitter pre-emphasis duration is defined in terms of
|
||||
unit amounts. One unit of pre-emphasis duration is approximately
|
||||
650 ps and is defined as 1X pre-emphasis duration.
|
||||
The hardware accepts only discrete values. The value closest to the
|
||||
provided input will be chosen as the override value for this param.
|
||||
minimum: 10000
|
||||
maximum: 20000
|
||||
|
||||
qcom,pre-emphasis-amplitude-bp:
|
||||
description:
|
||||
This signal controls the amount of current sourced to
|
||||
DP<#> and DM<#> after a J-to-K or K-to-J transition.
|
||||
The HS Transmitter pre-emphasis current is defined in terms of unit
|
||||
amounts. One unit amount is approximately 2 mA and is defined as
|
||||
1X pre-emphasis current.
|
||||
The hardware accepts only discrete values. The value closest to the
|
||||
provided input will be chosen as the override value for this param.
|
||||
minimum: 10000
|
||||
maximum: 40000
|
||||
|
||||
qcom,hs-rise-fall-time-bp:
|
||||
description:
|
||||
This adjusts the rise/fall times of the high-speed waveform.
|
||||
The hardware accepts only discrete values. The value closest to the
|
||||
provided input will be chosen as the override value for this param.
|
||||
minimum: -4100
|
||||
maximum: 5430
|
||||
|
||||
qcom,hs-crossover-voltage-microvolt:
|
||||
description:
|
||||
This adjusts the voltage at which the DP<#> and DM<#>
|
||||
signals cross while transmitting in HS mode.
|
||||
The hardware accepts only discrete values. The value closest to the
|
||||
provided input will be chosen as the override value for this param.
|
||||
minimum: -31000
|
||||
maximum: 28000
|
||||
|
||||
qcom,hs-output-impedance-micro-ohms:
|
||||
description:
|
||||
In some applications, there can be significant series resistance
|
||||
on the D+ and D- paths between the transceiver and cable. This adjusts
|
||||
the driver source impedance to compensate for added series
|
||||
resistance on the USB. The hardware accepts only discrete values. The
|
||||
value closest to the provided input will be chosen as the override value
|
||||
for this param.
|
||||
minimum: -2300000
|
||||
maximum: 6100000
|
||||
|
||||
qcom,ls-fs-output-impedance-bp:
|
||||
description:
|
||||
This adjusts the low- and full-speed single-ended source
|
||||
impedance while driving high. The following adjustment values are based
|
||||
on nominal process, voltage, and temperature.
|
||||
The hardware accepts only discrete values. The value closest to the
|
||||
provided input will be chosen as the override value for this param.
|
||||
minimum: -1053
|
||||
maximum: 1310
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
@@ -1,112 +0,0 @@
|
||||
* Renesas R-Car generation 2 USB PHY
|
||||
|
||||
This file provides information on what the device node for the R-Car generation
|
||||
2 USB PHY contains.
|
||||
|
||||
Required properties:
|
||||
- compatible: "renesas,usb-phy-r8a7742" if the device is a part of R8A7742 SoC.
|
||||
"renesas,usb-phy-r8a7743" if the device is a part of R8A7743 SoC.
|
||||
"renesas,usb-phy-r8a7744" if the device is a part of R8A7744 SoC.
|
||||
"renesas,usb-phy-r8a7745" if the device is a part of R8A7745 SoC.
|
||||
"renesas,usb-phy-r8a77470" if the device is a part of R8A77470 SoC.
|
||||
"renesas,usb-phy-r8a7790" if the device is a part of R8A7790 SoC.
|
||||
"renesas,usb-phy-r8a7791" if the device is a part of R8A7791 SoC.
|
||||
"renesas,usb-phy-r8a7794" if the device is a part of R8A7794 SoC.
|
||||
"renesas,rcar-gen2-usb-phy" for a generic R-Car Gen2 or
|
||||
RZ/G1 compatible device.
|
||||
|
||||
When compatible with the generic version, nodes must list the
|
||||
SoC-specific version corresponding to the platform first
|
||||
followed by the generic version.
|
||||
|
||||
- reg: offset and length of the register block.
|
||||
- #address-cells: number of address cells for the USB channel subnodes, must
|
||||
be <1>.
|
||||
- #size-cells: number of size cells for the USB channel subnodes, must be <0>.
|
||||
- clocks: clock phandle and specifier pair.
|
||||
- clock-names: string, clock input name, must be "usbhs".
|
||||
|
||||
The USB PHY device tree node should have the subnodes corresponding to the USB
|
||||
channels. These subnodes must contain the following properties:
|
||||
- reg: the USB controller selector; see the table below for the values.
|
||||
- #phy-cells: see phy-bindings.txt in the same directory, must be <1>.
|
||||
|
||||
The phandle's argument in the PHY specifier is the USB controller selector for
|
||||
the USB channel other than r8a77470 SoC; see the selector meanings below:
|
||||
|
||||
+-----------+---------------+---------------+
|
||||
|\ Selector | | |
|
||||
+ --------- + 0 | 1 |
|
||||
| Channel \| | |
|
||||
+-----------+---------------+---------------+
|
||||
| 0 | PCI EHCI/OHCI | HS-USB |
|
||||
| 2 | PCI EHCI/OHCI | xHCI |
|
||||
+-----------+---------------+---------------+
|
||||
|
||||
For r8a77470 SoC;see the selector meaning below:
|
||||
|
||||
+-----------+---------------+---------------+
|
||||
|\ Selector | | |
|
||||
+ --------- + 0 | 1 |
|
||||
| Channel \| | |
|
||||
+-----------+---------------+---------------+
|
||||
| 0 | EHCI/OHCI | HS-USB |
|
||||
+-----------+---------------+---------------+
|
||||
|
||||
Example (Lager board):
|
||||
|
||||
usb-phy@e6590100 {
|
||||
compatible = "renesas,usb-phy-r8a7790", "renesas,rcar-gen2-usb-phy";
|
||||
reg = <0 0xe6590100 0 0x100>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
clocks = <&cpg CPG_MOD 704>;
|
||||
clock-names = "usbhs";
|
||||
power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
|
||||
resets = <&cpg 704>;
|
||||
|
||||
usb0: usb-channel@0 {
|
||||
reg = <0>;
|
||||
#phy-cells = <1>;
|
||||
};
|
||||
usb2: usb-channel@2 {
|
||||
reg = <2>;
|
||||
#phy-cells = <1>;
|
||||
};
|
||||
};
|
||||
|
||||
Example (iWave RZ/G1C sbc):
|
||||
|
||||
usbphy0: usb-phy0@e6590100 {
|
||||
compatible = "renesas,usb-phy-r8a77470",
|
||||
"renesas,rcar-gen2-usb-phy";
|
||||
reg = <0 0xe6590100 0 0x100>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
clocks = <&cpg CPG_MOD 704>;
|
||||
clock-names = "usbhs";
|
||||
power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
|
||||
resets = <&cpg 704>;
|
||||
|
||||
usb0: usb-channel@0 {
|
||||
reg = <0>;
|
||||
#phy-cells = <1>;
|
||||
};
|
||||
};
|
||||
|
||||
usbphy1: usb-phy@e6598100 {
|
||||
compatible = "renesas,usb-phy-r8a77470",
|
||||
"renesas,rcar-gen2-usb-phy";
|
||||
reg = <0 0xe6598100 0 0x100>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
clocks = <&cpg CPG_MOD 706>;
|
||||
clock-names = "usbhs";
|
||||
power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
|
||||
resets = <&cpg 706>;
|
||||
|
||||
usb1: usb-channel@0 {
|
||||
reg = <0>;
|
||||
#phy-cells = <1>;
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,123 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/phy/renesas,rcar-gen2-usb-phy.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Renesas R-Car Gen2 USB PHY
|
||||
|
||||
maintainers:
|
||||
- Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
items:
|
||||
- enum:
|
||||
- renesas,usb-phy-r8a7742 # RZ/G1H
|
||||
- renesas,usb-phy-r8a7743 # RZ/G1M
|
||||
- renesas,usb-phy-r8a7744 # RZ/G1N
|
||||
- renesas,usb-phy-r8a7745 # RZ/G1E
|
||||
- renesas,usb-phy-r8a77470 # RZ/G1C
|
||||
- renesas,usb-phy-r8a7790 # R-Car H2
|
||||
- renesas,usb-phy-r8a7791 # R-Car M2-W
|
||||
- renesas,usb-phy-r8a7794 # R-Car E2
|
||||
- const: renesas,rcar-gen2-usb-phy # R-Car Gen2 or RZ/G1
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
'#address-cells':
|
||||
const: 1
|
||||
|
||||
'#size-cells':
|
||||
const: 0
|
||||
|
||||
clocks:
|
||||
maxItems: 1
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: usbhs
|
||||
|
||||
power-domains:
|
||||
maxItems: 1
|
||||
|
||||
resets:
|
||||
maxItems: 1
|
||||
|
||||
patternProperties:
|
||||
"^usb-phy@[02]$":
|
||||
type: object
|
||||
description: Subnode corresponding to a USB channel.
|
||||
|
||||
properties:
|
||||
reg:
|
||||
description: FIXME RZ/G1C supports channel 0 only
|
||||
enum: [0, 2]
|
||||
|
||||
'#phy-cells':
|
||||
description: |
|
||||
The phandle's argument in the PHY specifier is the USB controller
|
||||
selector for the USB channel.
|
||||
For RZ/G1C:
|
||||
- 0 for EHCI/OHCI
|
||||
- 1 for HS-USB
|
||||
For all other SoCS:
|
||||
- 0 for PCI EHCI/OHCI
|
||||
- 1 for HS-USB (channel 0) or xHCI (channel 2)
|
||||
const: 1
|
||||
|
||||
required:
|
||||
- reg
|
||||
- '#phy-cells'
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- '#address-cells'
|
||||
- '#size-cells'
|
||||
- clocks
|
||||
- clock-names
|
||||
- resets
|
||||
- power-domains
|
||||
- usb-phy@0
|
||||
|
||||
if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: renesas,usb-phy-r8a77470
|
||||
then:
|
||||
properties:
|
||||
usb-phy@2: false
|
||||
else:
|
||||
required:
|
||||
- usb-phy@2
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/r8a7790-cpg-mssr.h>
|
||||
#include <dt-bindings/power/r8a7790-sysc.h>
|
||||
usb-phy-controller@e6590100 {
|
||||
compatible = "renesas,usb-phy-r8a7790", "renesas,rcar-gen2-usb-phy";
|
||||
reg = <0xe6590100 0x100>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
clocks = <&cpg CPG_MOD 704>;
|
||||
clock-names = "usbhs";
|
||||
power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
|
||||
resets = <&cpg 704>;
|
||||
|
||||
usb0: usb-phy@0 {
|
||||
reg = <0>;
|
||||
#phy-cells = <1>;
|
||||
};
|
||||
usb2: usb-phy@2 {
|
||||
reg = <2>;
|
||||
#phy-cells = <1>;
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,80 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/phy/rockchip,pcie3-phy.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Rockchip PCIe v3 phy
|
||||
|
||||
maintainers:
|
||||
- Heiko Stuebner <heiko@sntech.de>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- rockchip,rk3568-pcie3-phy
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
minItems: 3
|
||||
maxItems: 3
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: refclk_m
|
||||
- const: refclk_n
|
||||
- const: pclk
|
||||
|
||||
data-lanes:
|
||||
description: which lanes (by position) should be mapped to which
|
||||
controller (value). 0 means lane disabled, higher value means used.
|
||||
(controller-number +1 )
|
||||
$ref: /schemas/types.yaml#/definitions/uint32-array
|
||||
minItems: 2
|
||||
maxItems: 16
|
||||
items:
|
||||
minimum: 0
|
||||
maximum: 16
|
||||
|
||||
"#phy-cells":
|
||||
const: 0
|
||||
|
||||
resets:
|
||||
maxItems: 1
|
||||
|
||||
reset-names:
|
||||
const: phy
|
||||
|
||||
rockchip,phy-grf:
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
description: phandle to the syscon managing the phy "general register files"
|
||||
|
||||
rockchip,pipe-grf:
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
description: phandle to the syscon managing the pipe "general register files"
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- rockchip,phy-grf
|
||||
- "#phy-cells"
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/rk3568-cru.h>
|
||||
pcie30phy: phy@fe8c0000 {
|
||||
compatible = "rockchip,rk3568-pcie3-phy";
|
||||
reg = <0xfe8c0000 0x20000>;
|
||||
#phy-cells = <0>;
|
||||
clocks = <&pmucru CLK_PCIE30PHY_REF_M>,
|
||||
<&pmucru CLK_PCIE30PHY_REF_N>,
|
||||
<&cru PCLK_PCIE30PHY>;
|
||||
clock-names = "refclk_m", "refclk_n", "pclk";
|
||||
resets = <&cru SRST_PCIE30PHY>;
|
||||
reset-names = "phy";
|
||||
rockchip,phy-grf = <&pcie30_phy_grf>;
|
||||
};
|
||||
@@ -18,6 +18,7 @@ properties:
|
||||
- rockchip,px30-dsi-dphy
|
||||
- rockchip,rk3128-dsi-dphy
|
||||
- rockchip,rk3368-dsi-dphy
|
||||
- rockchip,rk3568-dsi-dphy
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
@@ -20,6 +20,7 @@ properties:
|
||||
- rockchip,rk1808-csi-dphy
|
||||
- rockchip,rk3326-csi-dphy
|
||||
- rockchip,rk3368-csi-dphy
|
||||
- rockchip,rk3568-csi-dphy
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
@@ -27,18 +27,12 @@ properties:
|
||||
- const: phy-pma
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: PLL reference clock
|
||||
- description: symbol clock for input symbol ( rx0-ch0 symbol clock)
|
||||
- description: symbol clock for input symbol ( rx1-ch1 symbol clock)
|
||||
- description: symbol clock for output symbol ( tx0 symbol clock)
|
||||
minItems: 1
|
||||
maxItems: 4
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: ref_clk
|
||||
- const: rx1_symbol_clk
|
||||
- const: rx0_symbol_clk
|
||||
- const: tx0_symbol_clk
|
||||
minItems: 1
|
||||
maxItems: 4
|
||||
|
||||
samsung,pmu-syscon:
|
||||
$ref: '/schemas/types.yaml#/definitions/phandle-array'
|
||||
@@ -62,6 +56,39 @@ required:
|
||||
- clock-names
|
||||
- samsung,pmu-syscon
|
||||
|
||||
allOf:
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: samsung,exynos7-ufs-phy
|
||||
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
items:
|
||||
- description: PLL reference clock
|
||||
- description: symbol clock for input symbol (rx0-ch0 symbol clock)
|
||||
- description: symbol clock for input symbol (rx1-ch1 symbol clock)
|
||||
- description: symbol clock for output symbol (tx0 symbol clock)
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: ref_clk
|
||||
- const: rx1_symbol_clk
|
||||
- const: rx0_symbol_clk
|
||||
- const: tx0_symbol_clk
|
||||
|
||||
else:
|
||||
properties:
|
||||
clocks:
|
||||
items:
|
||||
- description: PLL reference clock
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: ref_clk
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
# Copyright (C) Sunplus Co., Ltd. 2021
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: "http://devicetree.org/schemas/phy/sunplus,sp7021-usb2-phy.yaml#"
|
||||
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
|
||||
|
||||
title: Sunplus SP7021 USB 2.0 PHY Controller
|
||||
|
||||
maintainers:
|
||||
- Vincent Shih <vincent.sunplus@gmail.com>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: sunplus,sp7021-usb2-phy
|
||||
|
||||
reg:
|
||||
items:
|
||||
- description: UPHY register region
|
||||
- description: MOON4 register region
|
||||
|
||||
reg-names:
|
||||
items:
|
||||
- const: phy
|
||||
- const: moon4
|
||||
|
||||
clocks:
|
||||
maxItems: 1
|
||||
|
||||
resets:
|
||||
maxItems: 1
|
||||
|
||||
"#phy-cells":
|
||||
const: 0
|
||||
|
||||
nvmem-cell-names:
|
||||
description: names corresponding to the nvmem cells of disconnect voltage
|
||||
const: disc_vol
|
||||
|
||||
nvmem-cells:
|
||||
description: nvmem cell address of disconnect voltage
|
||||
maxItems: 1
|
||||
|
||||
sunplus,disc-vol-addr-off:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
description: the otp address offset of disconnect voltage
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- reg-names
|
||||
- clocks
|
||||
- resets
|
||||
- "#phy-cells"
|
||||
- nvmem-cell-names
|
||||
- nvmem-cells
|
||||
- sunplus,disc-vol-addr-off
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
sp_uphy0: usb-phy@9c004a80 {
|
||||
compatible = "sunplus,sp7021-usb2-phy";
|
||||
reg = <0x9c004a80 0x80>, <0x9c000248 0x10>;
|
||||
reg-names = "phy", "moon4";
|
||||
clocks = <&clkc 0x3d>;
|
||||
resets = <&rstc 0x2d>;
|
||||
#phy-cells = <0>;
|
||||
nvmem-cell-names = "disc_vol";
|
||||
nvmem-cells = <&disc_vol>;
|
||||
sunplus,disc-vol-addr-off = <0>;
|
||||
};
|
||||
@@ -53,12 +53,25 @@ properties:
|
||||
- ti,am43xx-phy-gmii-sel
|
||||
- ti,dm814-phy-gmii-sel
|
||||
- ti,am654-phy-gmii-sel
|
||||
- ti,j7200-cpsw5g-phy-gmii-sel
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
'#phy-cells': true
|
||||
|
||||
ti,qsgmii-main-ports:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32-array
|
||||
description: |
|
||||
Required only for QSGMII mode. Array to select the port for
|
||||
QSGMII main mode. Rest of the ports are selected as QSGMII_SUB
|
||||
ports automatically. Any one of the 4 CPSW5G ports can act as the
|
||||
main port with the rest of them being the QSGMII_SUB ports.
|
||||
maxItems: 1
|
||||
items:
|
||||
minimum: 1
|
||||
maximum: 4
|
||||
|
||||
allOf:
|
||||
- if:
|
||||
properties:
|
||||
@@ -73,6 +86,18 @@ allOf:
|
||||
'#phy-cells':
|
||||
const: 1
|
||||
description: CPSW port number (starting from 1)
|
||||
|
||||
- if:
|
||||
not:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- ti,j7200-cpsw5g-phy-gmii-sel
|
||||
then:
|
||||
properties:
|
||||
ti,qsgmii-main-ports: false
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
@@ -97,7 +122,7 @@ additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
phy_gmii_sel: phy-gmii-sel@650 {
|
||||
phy_gmii_sel: phy@650 {
|
||||
compatible = "ti,am3352-phy-gmii-sel";
|
||||
reg = <0x650 0x4>;
|
||||
#phy-cells = <2>;
|
||||
|
||||
@@ -16,19 +16,23 @@ properties:
|
||||
- ti,j721e-wiz-16g
|
||||
- ti,j721e-wiz-10g
|
||||
- ti,am64-wiz-10g
|
||||
- ti,j7200-wiz-10g
|
||||
|
||||
power-domains:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
maxItems: 3
|
||||
minItems: 3
|
||||
maxItems: 4
|
||||
description: clock-specifier to represent input to the WIZ
|
||||
|
||||
clock-names:
|
||||
minItems: 3
|
||||
items:
|
||||
- const: fck
|
||||
- const: core_ref_clk
|
||||
- const: ext_ref_clk
|
||||
- const: core_ref1_clk
|
||||
|
||||
num-lanes:
|
||||
minimum: 1
|
||||
@@ -79,10 +83,12 @@ properties:
|
||||
|
||||
refclk-dig:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
description: |
|
||||
WIZ node should have subnode for refclk_dig to select the reference
|
||||
clock source for the reference clock used in the PHY and PMA digital
|
||||
logic.
|
||||
deprecated: true
|
||||
properties:
|
||||
clocks:
|
||||
minItems: 2
|
||||
@@ -105,12 +111,19 @@ properties:
|
||||
- assigned-clocks
|
||||
- assigned-clock-parents
|
||||
|
||||
ti,scm:
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
description: |
|
||||
phandle to System Control Module for syscon regmap access.
|
||||
|
||||
patternProperties:
|
||||
"^pll[0|1]-refclk$":
|
||||
type: object
|
||||
additionalProperties: false
|
||||
description: |
|
||||
WIZ node should have subnodes for each of the PLLs present in
|
||||
the SERDES.
|
||||
deprecated: true
|
||||
properties:
|
||||
clocks:
|
||||
maxItems: 2
|
||||
@@ -133,9 +146,11 @@ patternProperties:
|
||||
|
||||
"^cmn-refclk1?-dig-div$":
|
||||
type: object
|
||||
additionalProperties: false
|
||||
description:
|
||||
WIZ node should have subnodes for each of the PMA common refclock
|
||||
provided by the SERDES.
|
||||
deprecated: true
|
||||
properties:
|
||||
clocks:
|
||||
maxItems: 1
|
||||
@@ -170,6 +185,16 @@ required:
|
||||
- "#reset-cells"
|
||||
- ranges
|
||||
|
||||
allOf:
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: ti,j7200-wiz-10g
|
||||
then:
|
||||
required:
|
||||
- ti,scm
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
|
||||
190
Documentation/devicetree/bindings/serial/atmel,at91-usart.yaml
Normal file
190
Documentation/devicetree/bindings/serial/atmel,at91-usart.yaml
Normal file
@@ -0,0 +1,190 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
# Copyright (C) 2022 Microchip Technology, Inc. and its subsidiaries
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/serial/atmel,at91-usart.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Atmel Universal Synchronous Asynchronous Receiver/Transmitter (USART)
|
||||
|
||||
maintainers:
|
||||
- Richard Genoud <richard.genoud@gmail.com>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
oneOf:
|
||||
- enum:
|
||||
- atmel,at91rm9200-usart
|
||||
- atmel,at91sam9260-usart
|
||||
- microchip,sam9x60-usart
|
||||
- items:
|
||||
- const: atmel,at91rm9200-dbgu
|
||||
- const: atmel,at91rm9200-usart
|
||||
- items:
|
||||
- const: atmel,at91sam9260-dbgu
|
||||
- const: atmel,at91sam9260-usart
|
||||
- items:
|
||||
- const: microchip,sam9x60-dbgu
|
||||
- const: microchip,sam9x60-usart
|
||||
- const: atmel,at91sam9260-dbgu
|
||||
- const: atmel,at91sam9260-usart
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
clock-names:
|
||||
minItems: 1
|
||||
items:
|
||||
- const: usart
|
||||
- const: gclk
|
||||
|
||||
clocks:
|
||||
minItems: 1
|
||||
items:
|
||||
- description: USART Peripheral Clock
|
||||
- description: USART Generic Clock
|
||||
|
||||
dmas:
|
||||
items:
|
||||
- description: TX DMA Channel
|
||||
- description: RX DMA Channel
|
||||
|
||||
dma-names:
|
||||
items:
|
||||
- const: tx
|
||||
- const: rx
|
||||
|
||||
atmel,usart-mode:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
description:
|
||||
Must be either <AT91_USART_MODE_SPI> for SPI or
|
||||
<AT91_USART_MODE_SERIAL> for USART (found in dt-bindings/mfd/at91-usart.h).
|
||||
enum: [ 0, 1 ]
|
||||
|
||||
atmel,use-dma-rx:
|
||||
type: boolean
|
||||
description: use of PDC or DMA for receiving data
|
||||
|
||||
atmel,use-dma-tx:
|
||||
type: boolean
|
||||
description: use of PDC or DMA for transmitting data
|
||||
|
||||
atmel,fifo-size:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
description:
|
||||
Maximum number of data the RX and TX FIFOs can store for FIFO
|
||||
capable USARTS.
|
||||
enum: [ 16, 32 ]
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- interrupts
|
||||
- clock-names
|
||||
- clocks
|
||||
- atmel,usart-mode
|
||||
|
||||
allOf:
|
||||
- if:
|
||||
properties:
|
||||
atmel,usart-mode:
|
||||
const: 1
|
||||
then:
|
||||
allOf:
|
||||
- $ref: /schemas/spi/spi-controller.yaml#
|
||||
|
||||
properties:
|
||||
atmel,use-dma-rx: false
|
||||
|
||||
atmel,use-dma-tx: false
|
||||
|
||||
atmel,fifo-size: false
|
||||
|
||||
"#size-cells":
|
||||
const: 0
|
||||
|
||||
"#address-cells":
|
||||
const: 1
|
||||
|
||||
required:
|
||||
- "#size-cells"
|
||||
- "#address-cells"
|
||||
|
||||
else:
|
||||
allOf:
|
||||
- $ref: /schemas/serial/serial.yaml#
|
||||
- $ref: /schemas/serial/rs485.yaml#
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
#include <dt-bindings/mfd/at91-usart.h>
|
||||
#include <dt-bindings/dma/at91.h>
|
||||
|
||||
/* use PDC */
|
||||
usart0: serial@fff8c000 {
|
||||
compatible = "atmel,at91sam9260-usart";
|
||||
reg = <0xfff8c000 0x4000>;
|
||||
atmel,usart-mode = <AT91_USART_MODE_SERIAL>;
|
||||
interrupts = <7>;
|
||||
clocks = <&usart0_clk>;
|
||||
clock-names = "usart";
|
||||
atmel,use-dma-rx;
|
||||
atmel,use-dma-tx;
|
||||
rts-gpios = <&pioD 15 GPIO_ACTIVE_LOW>;
|
||||
cts-gpios = <&pioD 16 GPIO_ACTIVE_LOW>;
|
||||
dtr-gpios = <&pioD 17 GPIO_ACTIVE_LOW>;
|
||||
dsr-gpios = <&pioD 18 GPIO_ACTIVE_LOW>;
|
||||
dcd-gpios = <&pioD 20 GPIO_ACTIVE_LOW>;
|
||||
rng-gpios = <&pioD 19 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
- |
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
#include <dt-bindings/mfd/at91-usart.h>
|
||||
#include <dt-bindings/dma/at91.h>
|
||||
|
||||
/* use DMA */
|
||||
usart1: serial@f001c000 {
|
||||
compatible = "atmel,at91sam9260-usart";
|
||||
reg = <0xf001c000 0x100>;
|
||||
atmel,usart-mode = <AT91_USART_MODE_SERIAL>;
|
||||
interrupts = <12 IRQ_TYPE_LEVEL_HIGH 5>;
|
||||
clocks = <&usart0_clk>;
|
||||
clock-names = "usart";
|
||||
atmel,use-dma-rx;
|
||||
atmel,use-dma-tx;
|
||||
dmas = <&dma0 2 AT91_DMA_CFG_PER_ID(3)>,
|
||||
<&dma0 2 (AT91_DMA_CFG_PER_ID(4) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
|
||||
dma-names = "tx", "rx";
|
||||
atmel,fifo-size = <32>;
|
||||
};
|
||||
|
||||
- |
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
#include <dt-bindings/mfd/at91-usart.h>
|
||||
#include <dt-bindings/dma/at91.h>
|
||||
|
||||
/* SPI mode */
|
||||
spi0: spi@f001c000 {
|
||||
compatible = "atmel,at91sam9260-usart";
|
||||
reg = <0xf001c000 0x100>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
atmel,usart-mode = <AT91_USART_MODE_SPI>;
|
||||
interrupts = <12 IRQ_TYPE_LEVEL_HIGH 5>;
|
||||
clocks = <&usart0_clk>;
|
||||
clock-names = "usart";
|
||||
dmas = <&dma0 2 AT91_DMA_CFG_PER_ID(3)>,
|
||||
<&dma0 2 (AT91_DMA_CFG_PER_ID(4) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
|
||||
dma-names = "tx", "rx";
|
||||
cs-gpios = <&pioB 3 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
@@ -42,6 +42,7 @@ properties:
|
||||
- mediatek,mt8173-uart
|
||||
- mediatek,mt8183-uart
|
||||
- mediatek,mt8186-uart
|
||||
- mediatek,mt8188-uart
|
||||
- mediatek,mt8192-uart
|
||||
- mediatek,mt8195-uart
|
||||
- mediatek,mt8516-uart
|
||||
|
||||
@@ -94,6 +94,12 @@ properties:
|
||||
resets:
|
||||
maxItems: 1
|
||||
|
||||
reg-io-width:
|
||||
description:
|
||||
The size (in bytes) of the IO accesses that should be performed
|
||||
on the device.
|
||||
enum: [1, 4]
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
@@ -76,7 +76,7 @@ properties:
|
||||
|
||||
- items:
|
||||
- enum:
|
||||
- renesas,scif-r9a07g043 # RZ/G2UL
|
||||
- renesas,scif-r9a07g043 # RZ/G2UL and RZ/Five
|
||||
- renesas,scif-r9a07g054 # RZ/V2L
|
||||
- const: renesas,scif-r9a07g044 # RZ/G2{L,LC} fallback
|
||||
|
||||
|
||||
@@ -40,7 +40,6 @@ properties:
|
||||
description: |
|
||||
The size (in bytes) of the IO accesses that should be performed
|
||||
on the device.
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
enum: [ 1, 4 ]
|
||||
|
||||
clocks:
|
||||
@@ -72,6 +71,9 @@ properties:
|
||||
minItems: 1
|
||||
maxItems: 2
|
||||
|
||||
power-domains:
|
||||
maxItems: 1
|
||||
|
||||
samsung,uart-fifosize:
|
||||
description: The fifo size supported by the UART channel.
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
|
||||
@@ -26,6 +26,7 @@ properties:
|
||||
- rockchip,rk1808-uart
|
||||
- rockchip,rk3036-uart
|
||||
- rockchip,rk3066-uart
|
||||
- rockchip,rk3128-uart
|
||||
- rockchip,rk3188-uart
|
||||
- rockchip,rk3288-uart
|
||||
- rockchip,rk3308-uart
|
||||
|
||||
@@ -23,6 +23,8 @@ properties:
|
||||
connector:
|
||||
type: object
|
||||
$ref: ../connector/usb-connector.yaml
|
||||
unevaluatedProperties: false
|
||||
|
||||
description:
|
||||
Properties for usb c connector.
|
||||
|
||||
|
||||
@@ -67,6 +67,7 @@ properties:
|
||||
|
||||
vhub-strings:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
|
||||
properties:
|
||||
'#address-cells':
|
||||
@@ -78,6 +79,7 @@ properties:
|
||||
patternProperties:
|
||||
'^string@[0-9a-f]+$':
|
||||
type: object
|
||||
additionalProperties: false
|
||||
description: string descriptors of the specific language
|
||||
|
||||
properties:
|
||||
|
||||
@@ -32,6 +32,7 @@ properties:
|
||||
- enum:
|
||||
- rockchip,px30-usb
|
||||
- rockchip,rk3036-usb
|
||||
- rockchip,rk3128-usb
|
||||
- rockchip,rk3188-usb
|
||||
- rockchip,rk3228-usb
|
||||
- rockchip,rk3288-usb
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
Faraday FOTG Host controller
|
||||
|
||||
This OTG-capable USB host controller is found in Cortina Systems
|
||||
Gemini and other SoC products.
|
||||
|
||||
Required properties:
|
||||
- compatible: should be one of:
|
||||
"faraday,fotg210"
|
||||
"cortina,gemini-usb", "faraday,fotg210"
|
||||
- reg: should contain one register range i.e. start and length
|
||||
- interrupts: description of the interrupt line
|
||||
|
||||
Optional properties:
|
||||
- clocks: should contain the IP block clock
|
||||
- clock-names: should be "PCLK" for the IP block clock
|
||||
|
||||
Required properties for "cortina,gemini-usb" compatible:
|
||||
- syscon: a phandle to the system controller to access PHY registers
|
||||
|
||||
Optional properties for "cortina,gemini-usb" compatible:
|
||||
- cortina,gemini-mini-b: boolean property that indicates that a Mini-B
|
||||
OTG connector is in use
|
||||
- wakeup-source: see power/wakeup-source.txt
|
||||
|
||||
Example for Gemini:
|
||||
|
||||
usb@68000000 {
|
||||
compatible = "cortina,gemini-usb", "faraday,fotg210";
|
||||
reg = <0x68000000 0x1000>;
|
||||
interrupts = <10 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&cc 12>;
|
||||
clock-names = "PCLK";
|
||||
syscon = <&syscon>;
|
||||
wakeup-source;
|
||||
};
|
||||
77
Documentation/devicetree/bindings/usb/faraday,fotg210.yaml
Normal file
77
Documentation/devicetree/bindings/usb/faraday,fotg210.yaml
Normal file
@@ -0,0 +1,77 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
||||
# Copyright 2022 Linaro Ltd.
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/usb/faraday,fotg210.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Faraday Technology FOTG210 HS OTG USB 2.0 controller Bindings
|
||||
|
||||
maintainers:
|
||||
- Linus Walleij <linus.walleij@linaro.org>
|
||||
|
||||
allOf:
|
||||
- $ref: usb-drd.yaml#
|
||||
- $ref: usb-hcd.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
oneOf:
|
||||
- const: faraday,fotg210
|
||||
- items:
|
||||
- const: cortina,gemini-usb
|
||||
- const: faraday,fotg210
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
maxItems: 1
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: PCLK
|
||||
|
||||
resets:
|
||||
maxItems: 1
|
||||
|
||||
syscon:
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
description: a phandle to the global Gemini system controller on
|
||||
Gemini systems
|
||||
|
||||
dr_mode: true
|
||||
|
||||
phys:
|
||||
maxItems: 1
|
||||
|
||||
phy-names:
|
||||
const: usb2-phy
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- interrupts
|
||||
- clocks
|
||||
- clock-names
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
#include <dt-bindings/clock/cortina,gemini-clock.h>
|
||||
#include <dt-bindings/reset/cortina,gemini-reset.h>
|
||||
usb0: usb@68000000 {
|
||||
compatible = "cortina,gemini-usb", "faraday,fotg210";
|
||||
reg = <0x68000000 0x1000>;
|
||||
interrupts = <10 IRQ_TYPE_LEVEL_HIGH>;
|
||||
resets = <&syscon GEMINI_RESET_USB0>;
|
||||
clocks = <&syscon GEMINI_CLK_GATE_USB0>;
|
||||
clock-names = "PCLK";
|
||||
syscon = <&syscon>;
|
||||
dr_mode = "host";
|
||||
};
|
||||
@@ -0,0 +1,36 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: "http://devicetree.org/schemas/usb/mediatek,mt6370-tcpc.yaml#"
|
||||
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
|
||||
|
||||
title: MediatTek MT6370 Type-C Port Switch and Power Delivery controller
|
||||
|
||||
maintainers:
|
||||
- ChiYuan Huang <cy_huang@richtek.com>
|
||||
|
||||
description: |
|
||||
MediaTek MT6370 is a multi-functional device.
|
||||
It integrates charger, ADC, flash, RGB indicators,
|
||||
regulators (DSV/VIBLDO), and TypeC Port Switch with Power Delivery controller.
|
||||
This document only describes MT6370 Type-C Port Switch and
|
||||
Power Delivery controller.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- mediatek,mt6370-tcpc
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
connector:
|
||||
type: object
|
||||
$ref: /schemas/connector/usb-connector.yaml#
|
||||
unevaluatedProperties: false
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- interrupts
|
||||
@@ -5,7 +5,9 @@ EHCI:
|
||||
-----
|
||||
|
||||
Required properties:
|
||||
- compatible: "nuvoton,npcm750-ehci"
|
||||
- compatible: should be one of
|
||||
"nuvoton,npcm750-ehci"
|
||||
"nuvoton,npcm845-ehci"
|
||||
- interrupts: Should contain the EHCI interrupt
|
||||
- reg: Physical address and length of the register set for the device
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ properties:
|
||||
- qcom,sc7280-dwc3
|
||||
- qcom,sc8280xp-dwc3
|
||||
- qcom,sdm660-dwc3
|
||||
- qcom,sdm670-dwc3
|
||||
- qcom,sdm845-dwc3
|
||||
- qcom,sdx55-dwc3
|
||||
- qcom,sdx65-dwc3
|
||||
@@ -175,6 +176,7 @@ allOf:
|
||||
- qcom,msm8998-dwc3
|
||||
- qcom,sc7180-dwc3
|
||||
- qcom,sc7280-dwc3
|
||||
- qcom,sdm670-dwc3
|
||||
- qcom,sdm845-dwc3
|
||||
- qcom,sdx55-dwc3
|
||||
- qcom,sm6350-dwc3
|
||||
@@ -294,6 +296,7 @@ allOf:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,sm6115-dwc3
|
||||
- qcom,sm6125-dwc3
|
||||
- qcom,sm8150-dwc3
|
||||
- qcom,sm8250-dwc3
|
||||
@@ -344,11 +347,11 @@ allOf:
|
||||
- qcom,msm8994-dwc3
|
||||
- qcom,qcs404-dwc3
|
||||
- qcom,sc7180-dwc3
|
||||
- qcom,sdm670-dwc3
|
||||
- qcom,sdm845-dwc3
|
||||
- qcom,sdx55-dwc3
|
||||
- qcom,sdx65-dwc3
|
||||
- qcom,sm4250-dwc3
|
||||
- qcom,sm6115-dwc3
|
||||
- qcom,sm6125-dwc3
|
||||
- qcom,sm6350-dwc3
|
||||
- qcom,sm8150-dwc3
|
||||
@@ -380,6 +383,7 @@ allOf:
|
||||
- qcom,msm8953-dwc3
|
||||
- qcom,msm8996-dwc3
|
||||
- qcom,msm8998-dwc3
|
||||
- qcom,sm6115-dwc3
|
||||
then:
|
||||
properties:
|
||||
interrupts:
|
||||
|
||||
@@ -11,27 +11,55 @@ maintainers:
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
items:
|
||||
- enum:
|
||||
- renesas,r8a774a1-usb3-peri # RZ/G2M
|
||||
- renesas,r8a774b1-usb3-peri # RZ/G2N
|
||||
- renesas,r8a774c0-usb3-peri # RZ/G2E
|
||||
- renesas,r8a774e1-usb3-peri # RZ/G2H
|
||||
- renesas,r8a7795-usb3-peri # R-Car H3
|
||||
- renesas,r8a7796-usb3-peri # R-Car M3-W
|
||||
- renesas,r8a77961-usb3-peri # R-Car M3-W+
|
||||
- renesas,r8a77965-usb3-peri # R-Car M3-N
|
||||
- renesas,r8a77990-usb3-peri # R-Car E3
|
||||
- const: renesas,rcar-gen3-usb3-peri
|
||||
oneOf:
|
||||
- items:
|
||||
- enum:
|
||||
- renesas,r8a774a1-usb3-peri # RZ/G2M
|
||||
- renesas,r8a774b1-usb3-peri # RZ/G2N
|
||||
- renesas,r8a774c0-usb3-peri # RZ/G2E
|
||||
- renesas,r8a774e1-usb3-peri # RZ/G2H
|
||||
- renesas,r8a7795-usb3-peri # R-Car H3
|
||||
- renesas,r8a7796-usb3-peri # R-Car M3-W
|
||||
- renesas,r8a77961-usb3-peri # R-Car M3-W+
|
||||
- renesas,r8a77965-usb3-peri # R-Car M3-N
|
||||
- renesas,r8a77990-usb3-peri # R-Car E3
|
||||
- const: renesas,rcar-gen3-usb3-peri
|
||||
|
||||
- items:
|
||||
- enum:
|
||||
- renesas,r9a09g011-usb3-peri # RZ/V2M
|
||||
- const: renesas,rzv2m-usb3-peri
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
minItems: 1
|
||||
items:
|
||||
- description: Combined interrupt for DMA, SYS and ERR
|
||||
- description: Dual Role Device (DRD)
|
||||
- description: Battery Charging
|
||||
- description: Global Purpose Input
|
||||
|
||||
interrupt-names:
|
||||
minItems: 1
|
||||
items:
|
||||
- const: all_p
|
||||
- const: drd
|
||||
- const: bc
|
||||
- const: gpi
|
||||
|
||||
clocks:
|
||||
maxItems: 1
|
||||
minItems: 1
|
||||
items:
|
||||
- description: Main clock
|
||||
- description: Register access clock
|
||||
|
||||
clock-names:
|
||||
minItems: 1
|
||||
items:
|
||||
- const: aclk
|
||||
- const: reg
|
||||
|
||||
phys:
|
||||
maxItems: 1
|
||||
@@ -43,7 +71,15 @@ properties:
|
||||
maxItems: 1
|
||||
|
||||
resets:
|
||||
maxItems: 1
|
||||
minItems: 1
|
||||
items:
|
||||
- description: Peripheral reset
|
||||
- description: DRD reset
|
||||
|
||||
reset-names:
|
||||
items:
|
||||
- const: aresetn_p
|
||||
- const: drd_reset
|
||||
|
||||
usb-role-switch:
|
||||
$ref: /schemas/types.yaml#/definitions/flag
|
||||
@@ -78,6 +114,39 @@ required:
|
||||
- interrupts
|
||||
- clocks
|
||||
|
||||
allOf:
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- renesas,rzv2m-usb3-peri
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
minItems: 2
|
||||
clock-names:
|
||||
minItems: 2
|
||||
interrupts:
|
||||
minItems: 4
|
||||
interrupt-names:
|
||||
minItems: 4
|
||||
resets:
|
||||
minItems: 2
|
||||
required:
|
||||
- clock-names
|
||||
- interrupt-names
|
||||
- resets
|
||||
- reset-names
|
||||
else:
|
||||
properties:
|
||||
clocks:
|
||||
maxItems: 1
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
resets:
|
||||
maxItems: 1
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
|
||||
100
Documentation/devicetree/bindings/usb/richtek,rt1711h.yaml
Normal file
100
Documentation/devicetree/bindings/usb/richtek,rt1711h.yaml
Normal file
@@ -0,0 +1,100 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: "http://devicetree.org/schemas/usb/richtek,rt1711h.yaml#"
|
||||
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
|
||||
|
||||
title: Richtek RT1711H Type-C Port Switch and Power Delivery controller
|
||||
|
||||
maintainers:
|
||||
- Gene Chen <gene_chen@richtek.com>
|
||||
|
||||
description: |
|
||||
The RT1711H is a USB Type-C controller that complies with the latest
|
||||
USB Type-C and PD standards. It does the USB Type-C detection including attach
|
||||
and orientation. It integrates the physical layer of the USB BMC power
|
||||
delivery protocol to allow up to 100W of power. The BMC PD block enables full
|
||||
support for alternative interfaces of the Type-C specification.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- richtek,rt1711h
|
||||
- richtek,rt1715
|
||||
description:
|
||||
RT1711H support PD20, RT1715 support PD30 except Fast Role Swap.
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
wakeup-source:
|
||||
type: boolean
|
||||
|
||||
connector:
|
||||
type: object
|
||||
$ref: /schemas/connector/usb-connector.yaml#
|
||||
description:
|
||||
Properties for usb c connector.
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- connector
|
||||
- interrupts
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
#include <dt-bindings/usb/pd.h>
|
||||
i2c0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
rt1711h@4e {
|
||||
compatible = "richtek,rt1711h";
|
||||
reg = <0x4e>;
|
||||
interrupts-extended = <&gpio26 3 IRQ_TYPE_LEVEL_LOW>;
|
||||
wakeup-source;
|
||||
|
||||
connector {
|
||||
compatible = "usb-c-connector";
|
||||
label = "USB-C";
|
||||
data-role = "dual";
|
||||
power-role = "dual";
|
||||
try-power-role = "sink";
|
||||
source-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_DUAL_ROLE | PDO_FIXED_DATA_SWAP)>;
|
||||
sink-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_DUAL_ROLE | PDO_FIXED_DATA_SWAP)>;
|
||||
op-sink-microwatt = <10000000>;
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
endpoint {
|
||||
remote-endpoint = <&usb_hs>;
|
||||
};
|
||||
};
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
endpoint {
|
||||
remote-endpoint = <&usb_ss>;
|
||||
};
|
||||
};
|
||||
port@2 {
|
||||
reg = <2>;
|
||||
endpoint {
|
||||
remote-endpoint = <&dp_aux>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
...
|
||||
@@ -234,6 +234,18 @@ properties:
|
||||
avoid -EPROTO errors with usbhid on some devices (Hikey 970).
|
||||
type: boolean
|
||||
|
||||
snps,gfladj-refclk-lpm-sel-quirk:
|
||||
description:
|
||||
When set, run the SOF/ITP counter based on ref_clk.
|
||||
type: boolean
|
||||
|
||||
snps,resume-hs-terminations:
|
||||
description:
|
||||
Fix the issue of HS terminations CRC error on resume by enabling this
|
||||
quirk. When set, all the termsel, xcvrsel, opmode becomes 0 during end
|
||||
of resume. This option is to support certain legacy ULPI PHYs.
|
||||
type: boolean
|
||||
|
||||
snps,is-utmi-l1-suspend:
|
||||
description:
|
||||
True when DWC3 asserts output signal utmi_l1_suspend_n, false when
|
||||
|
||||
@@ -33,6 +33,7 @@ properties:
|
||||
connector:
|
||||
type: object
|
||||
$ref: /schemas/connector/usb-connector.yaml#
|
||||
unevaluatedProperties: false
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
@@ -74,9 +75,14 @@ examples:
|
||||
data-role = "dual";
|
||||
typec-power-opmode = "default";
|
||||
|
||||
port {
|
||||
typec_con_ep: endpoint {
|
||||
remote-endpoint = <&usbotg_hs_ep>;
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
typec_con_ep: endpoint {
|
||||
remote-endpoint = <&usbotg_hs_ep>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -28,6 +28,7 @@ properties:
|
||||
connector:
|
||||
type: object
|
||||
$ref: ../connector/usb-connector.yaml#
|
||||
unevaluatedProperties: false
|
||||
description:
|
||||
The managed USB Type-C connector. Since WUSB3801 does not support
|
||||
Power Delivery, the node should have the "pd-disable" property.
|
||||
|
||||
@@ -311,7 +311,6 @@ IOMAP
|
||||
devm_ioremap()
|
||||
devm_ioremap_uc()
|
||||
devm_ioremap_wc()
|
||||
devm_ioremap_np()
|
||||
devm_ioremap_resource() : checks resource, requests memory region, ioremaps
|
||||
devm_ioremap_resource_wc()
|
||||
devm_platform_ioremap_resource() : calls devm_ioremap_resource() for platform device
|
||||
|
||||
@@ -263,7 +263,7 @@ A very simple (and naive) implementation of a device attribute is::
|
||||
static ssize_t show_name(struct device *dev, struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
return scnprintf(buf, PAGE_SIZE, "%s\n", dev->name);
|
||||
return sysfs_emit(buf, "%s\n", dev->name);
|
||||
}
|
||||
|
||||
static ssize_t store_name(struct device *dev, struct device_attribute *attr,
|
||||
|
||||
@@ -69,86 +69,17 @@ Changelog::
|
||||
Magic Name Number Structure File
|
||||
===================== ================ ======================== ==========================================
|
||||
PG_MAGIC 'P' pg_{read,write}_hdr ``include/linux/pg.h``
|
||||
CMAGIC 0x0111 user ``include/linux/a.out.h``
|
||||
MKISS_DRIVER_MAGIC 0x04bf mkiss_channel ``drivers/net/mkiss.h``
|
||||
HDLC_MAGIC 0x239e n_hdlc ``drivers/char/n_hdlc.c``
|
||||
APM_BIOS_MAGIC 0x4101 apm_user ``arch/x86/kernel/apm_32.c``
|
||||
DB_MAGIC 0x4442 fc_info ``drivers/net/iph5526_novram.c``
|
||||
DL_MAGIC 0x444d fc_info ``drivers/net/iph5526_novram.c``
|
||||
FASYNC_MAGIC 0x4601 fasync_struct ``include/linux/fs.h``
|
||||
FF_MAGIC 0x4646 fc_info ``drivers/net/iph5526_novram.c``
|
||||
PTY_MAGIC 0x5001 ``drivers/char/pty.c``
|
||||
PPP_MAGIC 0x5002 ppp ``include/linux/if_pppvar.h``
|
||||
SSTATE_MAGIC 0x5302 serial_state ``include/linux/serial.h``
|
||||
SLIP_MAGIC 0x5302 slip ``drivers/net/slip.h``
|
||||
STRIP_MAGIC 0x5303 strip ``drivers/net/strip.c``
|
||||
SIXPACK_MAGIC 0x5304 sixpack ``drivers/net/hamradio/6pack.h``
|
||||
AX25_MAGIC 0x5316 ax_disp ``drivers/net/mkiss.h``
|
||||
TTY_MAGIC 0x5401 tty_struct ``include/linux/tty.h``
|
||||
MGSL_MAGIC 0x5401 mgsl_info ``drivers/char/synclink.c``
|
||||
TTY_DRIVER_MAGIC 0x5402 tty_driver ``include/linux/tty_driver.h``
|
||||
MGSLPC_MAGIC 0x5402 mgslpc_info ``drivers/char/pcmcia/synclink_cs.c``
|
||||
USB_SERIAL_MAGIC 0x6702 usb_serial ``drivers/usb/serial/usb-serial.h``
|
||||
FULL_DUPLEX_MAGIC 0x6969 ``drivers/net/ethernet/dec/tulip/de2104x.c``
|
||||
USB_BLUETOOTH_MAGIC 0x6d02 usb_bluetooth ``drivers/usb/class/bluetty.c``
|
||||
RFCOMM_TTY_MAGIC 0x6d02 ``net/bluetooth/rfcomm/tty.c``
|
||||
USB_SERIAL_PORT_MAGIC 0x7301 usb_serial_port ``drivers/usb/serial/usb-serial.h``
|
||||
CG_MAGIC 0x00090255 ufs_cylinder_group ``include/linux/ufs_fs.h``
|
||||
LSEMAGIC 0x05091998 lse ``drivers/fc4/fc.c``
|
||||
RIEBL_MAGIC 0x09051990 ``drivers/net/atarilance.c``
|
||||
NBD_REQUEST_MAGIC 0x12560953 nbd_request ``include/linux/nbd.h``
|
||||
RED_MAGIC2 0x170fc2a5 (any) ``mm/slab.c``
|
||||
BAYCOM_MAGIC 0x19730510 baycom_state ``drivers/net/baycom_epp.c``
|
||||
ISDN_X25IFACE_MAGIC 0x1e75a2b9 isdn_x25iface_proto_data ``drivers/isdn/isdn_x25iface.h``
|
||||
ECP_MAGIC 0x21504345 cdkecpsig ``include/linux/cdk.h``
|
||||
LSOMAGIC 0x27091997 lso ``drivers/fc4/fc.c``
|
||||
LSMAGIC 0x2a3b4d2a ls ``drivers/fc4/fc.c``
|
||||
WANPIPE_MAGIC 0x414C4453 sdla_{dump,exec} ``include/linux/wanpipe.h``
|
||||
CS_CARD_MAGIC 0x43525553 cs_card ``sound/oss/cs46xx.c``
|
||||
LABELCL_MAGIC 0x4857434c labelcl_info_s ``include/asm/ia64/sn/labelcl.h``
|
||||
ISDN_ASYNC_MAGIC 0x49344C01 modem_info ``include/linux/isdn.h``
|
||||
CTC_ASYNC_MAGIC 0x49344C01 ctc_tty_info ``drivers/s390/net/ctctty.c``
|
||||
ISDN_NET_MAGIC 0x49344C02 isdn_net_local_s ``drivers/isdn/i4l/isdn_net_lib.h``
|
||||
SAVEKMSG_MAGIC2 0x4B4D5347 savekmsg ``arch/*/amiga/config.c``
|
||||
CS_STATE_MAGIC 0x4c4f4749 cs_state ``sound/oss/cs46xx.c``
|
||||
SLAB_C_MAGIC 0x4f17a36d kmem_cache ``mm/slab.c``
|
||||
COW_MAGIC 0x4f4f4f4d cow_header_v1 ``arch/um/drivers/ubd_user.c``
|
||||
I810_CARD_MAGIC 0x5072696E i810_card ``sound/oss/i810_audio.c``
|
||||
TRIDENT_CARD_MAGIC 0x5072696E trident_card ``sound/oss/trident.c``
|
||||
ROUTER_MAGIC 0x524d4157 wan_device [in ``wanrouter.h`` pre 3.9]
|
||||
SAVEKMSG_MAGIC1 0x53415645 savekmsg ``arch/*/amiga/config.c``
|
||||
GDA_MAGIC 0x58464552 gda ``arch/mips/include/asm/sn/gda.h``
|
||||
RED_MAGIC1 0x5a2cf071 (any) ``mm/slab.c``
|
||||
EEPROM_MAGIC_VALUE 0x5ab478d2 lanai_dev ``drivers/atm/lanai.c``
|
||||
HDLCDRV_MAGIC 0x5ac6e778 hdlcdrv_state ``include/linux/hdlcdrv.h``
|
||||
PCXX_MAGIC 0x5c6df104 channel ``drivers/char/pcxx.h``
|
||||
KV_MAGIC 0x5f4b565f kernel_vars_s ``arch/mips/include/asm/sn/klkernvars.h``
|
||||
I810_STATE_MAGIC 0x63657373 i810_state ``sound/oss/i810_audio.c``
|
||||
TRIDENT_STATE_MAGIC 0x63657373 trient_state ``sound/oss/trident.c``
|
||||
M3_CARD_MAGIC 0x646e6f50 m3_card ``sound/oss/maestro3.c``
|
||||
FW_HEADER_MAGIC 0x65726F66 fw_header ``drivers/atm/fore200e.h``
|
||||
SLOT_MAGIC 0x67267321 slot ``drivers/hotplug/cpqphp.h``
|
||||
SLOT_MAGIC 0x67267322 slot ``drivers/hotplug/acpiphp.h``
|
||||
LO_MAGIC 0x68797548 nbd_device ``include/linux/nbd.h``
|
||||
M3_STATE_MAGIC 0x734d724d m3_state ``sound/oss/maestro3.c``
|
||||
VMALLOC_MAGIC 0x87654320 snd_alloc_track ``sound/core/memory.c``
|
||||
KMALLOC_MAGIC 0x87654321 snd_alloc_track ``sound/core/memory.c``
|
||||
PWC_MAGIC 0x89DC10AB pwc_device ``drivers/usb/media/pwc.h``
|
||||
NBD_REPLY_MAGIC 0x96744668 nbd_reply ``include/linux/nbd.h``
|
||||
ENI155_MAGIC 0xa54b872d midway_eprom ``drivers/atm/eni.h``
|
||||
CODA_MAGIC 0xC0DAC0DA coda_file_info ``fs/coda/coda_fs_i.h``
|
||||
YAM_MAGIC 0xF10A7654 yam_port ``drivers/net/hamradio/yam.c``
|
||||
CCB_MAGIC 0xf2691ad2 ccb ``drivers/scsi/ncr53c8xx.c``
|
||||
QUEUE_MAGIC_FREE 0xf7e1c9a3 queue_entry ``drivers/scsi/arm/queue.c``
|
||||
QUEUE_MAGIC_USED 0xf7e1cc33 queue_entry ``drivers/scsi/arm/queue.c``
|
||||
HTB_CMAGIC 0xFEFAFEF1 htb_class ``net/sched/sch_htb.c``
|
||||
NMI_MAGIC 0x48414d4d455201 nmi_s ``arch/mips/include/asm/sn/nmi.h``
|
||||
===================== ================ ======================== ==========================================
|
||||
|
||||
Note that there are also defined special per-driver magic numbers in sound
|
||||
memory management. See ``include/sound/sndmagic.h`` for complete list of them. Many
|
||||
OSS sound drivers have their magic numbers constructed from the soundcard PCI
|
||||
ID - these are not listed here as well.
|
||||
|
||||
HFS is another larger user of magic numbers - you can find them in
|
||||
``fs/hfs/hfs.h``.
|
||||
|
||||
@@ -75,87 +75,17 @@ Registro dei cambiamenti::
|
||||
Nome magico Numero Struttura File
|
||||
===================== ================ ======================== ==========================================
|
||||
PG_MAGIC 'P' pg_{read,write}_hdr ``include/linux/pg.h``
|
||||
CMAGIC 0x0111 user ``include/linux/a.out.h``
|
||||
MKISS_DRIVER_MAGIC 0x04bf mkiss_channel ``drivers/net/mkiss.h``
|
||||
HDLC_MAGIC 0x239e n_hdlc ``drivers/char/n_hdlc.c``
|
||||
APM_BIOS_MAGIC 0x4101 apm_user ``arch/x86/kernel/apm_32.c``
|
||||
DB_MAGIC 0x4442 fc_info ``drivers/net/iph5526_novram.c``
|
||||
DL_MAGIC 0x444d fc_info ``drivers/net/iph5526_novram.c``
|
||||
FASYNC_MAGIC 0x4601 fasync_struct ``include/linux/fs.h``
|
||||
FF_MAGIC 0x4646 fc_info ``drivers/net/iph5526_novram.c``
|
||||
PTY_MAGIC 0x5001 ``drivers/char/pty.c``
|
||||
PPP_MAGIC 0x5002 ppp ``include/linux/if_pppvar.h``
|
||||
SSTATE_MAGIC 0x5302 serial_state ``include/linux/serial.h``
|
||||
SLIP_MAGIC 0x5302 slip ``drivers/net/slip.h``
|
||||
STRIP_MAGIC 0x5303 strip ``drivers/net/strip.c``
|
||||
SIXPACK_MAGIC 0x5304 sixpack ``drivers/net/hamradio/6pack.h``
|
||||
AX25_MAGIC 0x5316 ax_disp ``drivers/net/mkiss.h``
|
||||
TTY_MAGIC 0x5401 tty_struct ``include/linux/tty.h``
|
||||
MGSL_MAGIC 0x5401 mgsl_info ``drivers/char/synclink.c``
|
||||
TTY_DRIVER_MAGIC 0x5402 tty_driver ``include/linux/tty_driver.h``
|
||||
MGSLPC_MAGIC 0x5402 mgslpc_info ``drivers/char/pcmcia/synclink_cs.c``
|
||||
USB_SERIAL_MAGIC 0x6702 usb_serial ``drivers/usb/serial/usb-serial.h``
|
||||
FULL_DUPLEX_MAGIC 0x6969 ``drivers/net/ethernet/dec/tulip/de2104x.c``
|
||||
USB_BLUETOOTH_MAGIC 0x6d02 usb_bluetooth ``drivers/usb/class/bluetty.c``
|
||||
RFCOMM_TTY_MAGIC 0x6d02 ``net/bluetooth/rfcomm/tty.c``
|
||||
USB_SERIAL_PORT_MAGIC 0x7301 usb_serial_port ``drivers/usb/serial/usb-serial.h``
|
||||
CG_MAGIC 0x00090255 ufs_cylinder_group ``include/linux/ufs_fs.h``
|
||||
LSEMAGIC 0x05091998 lse ``drivers/fc4/fc.c``
|
||||
RIEBL_MAGIC 0x09051990 ``drivers/net/atarilance.c``
|
||||
NBD_REQUEST_MAGIC 0x12560953 nbd_request ``include/linux/nbd.h``
|
||||
RED_MAGIC2 0x170fc2a5 (any) ``mm/slab.c``
|
||||
BAYCOM_MAGIC 0x19730510 baycom_state ``drivers/net/baycom_epp.c``
|
||||
ISDN_X25IFACE_MAGIC 0x1e75a2b9 isdn_x25iface_proto_data ``drivers/isdn/isdn_x25iface.h``
|
||||
ECP_MAGIC 0x21504345 cdkecpsig ``include/linux/cdk.h``
|
||||
LSOMAGIC 0x27091997 lso ``drivers/fc4/fc.c``
|
||||
LSMAGIC 0x2a3b4d2a ls ``drivers/fc4/fc.c``
|
||||
WANPIPE_MAGIC 0x414C4453 sdla_{dump,exec} ``include/linux/wanpipe.h``
|
||||
CS_CARD_MAGIC 0x43525553 cs_card ``sound/oss/cs46xx.c``
|
||||
LABELCL_MAGIC 0x4857434c labelcl_info_s ``include/asm/ia64/sn/labelcl.h``
|
||||
ISDN_ASYNC_MAGIC 0x49344C01 modem_info ``include/linux/isdn.h``
|
||||
CTC_ASYNC_MAGIC 0x49344C01 ctc_tty_info ``drivers/s390/net/ctctty.c``
|
||||
ISDN_NET_MAGIC 0x49344C02 isdn_net_local_s ``drivers/isdn/i4l/isdn_net_lib.h``
|
||||
SAVEKMSG_MAGIC2 0x4B4D5347 savekmsg ``arch/*/amiga/config.c``
|
||||
CS_STATE_MAGIC 0x4c4f4749 cs_state ``sound/oss/cs46xx.c``
|
||||
SLAB_C_MAGIC 0x4f17a36d kmem_cache ``mm/slab.c``
|
||||
COW_MAGIC 0x4f4f4f4d cow_header_v1 ``arch/um/drivers/ubd_user.c``
|
||||
I810_CARD_MAGIC 0x5072696E i810_card ``sound/oss/i810_audio.c``
|
||||
TRIDENT_CARD_MAGIC 0x5072696E trident_card ``sound/oss/trident.c``
|
||||
ROUTER_MAGIC 0x524d4157 wan_device [in ``wanrouter.h`` pre 3.9]
|
||||
SAVEKMSG_MAGIC1 0x53415645 savekmsg ``arch/*/amiga/config.c``
|
||||
GDA_MAGIC 0x58464552 gda ``arch/mips/include/asm/sn/gda.h``
|
||||
RED_MAGIC1 0x5a2cf071 (any) ``mm/slab.c``
|
||||
EEPROM_MAGIC_VALUE 0x5ab478d2 lanai_dev ``drivers/atm/lanai.c``
|
||||
HDLCDRV_MAGIC 0x5ac6e778 hdlcdrv_state ``include/linux/hdlcdrv.h``
|
||||
PCXX_MAGIC 0x5c6df104 channel ``drivers/char/pcxx.h``
|
||||
KV_MAGIC 0x5f4b565f kernel_vars_s ``arch/mips/include/asm/sn/klkernvars.h``
|
||||
I810_STATE_MAGIC 0x63657373 i810_state ``sound/oss/i810_audio.c``
|
||||
TRIDENT_STATE_MAGIC 0x63657373 trient_state ``sound/oss/trident.c``
|
||||
M3_CARD_MAGIC 0x646e6f50 m3_card ``sound/oss/maestro3.c``
|
||||
FW_HEADER_MAGIC 0x65726F66 fw_header ``drivers/atm/fore200e.h``
|
||||
SLOT_MAGIC 0x67267321 slot ``drivers/hotplug/cpqphp.h``
|
||||
SLOT_MAGIC 0x67267322 slot ``drivers/hotplug/acpiphp.h``
|
||||
LO_MAGIC 0x68797548 nbd_device ``include/linux/nbd.h``
|
||||
M3_STATE_MAGIC 0x734d724d m3_state ``sound/oss/maestro3.c``
|
||||
VMALLOC_MAGIC 0x87654320 snd_alloc_track ``sound/core/memory.c``
|
||||
KMALLOC_MAGIC 0x87654321 snd_alloc_track ``sound/core/memory.c``
|
||||
PWC_MAGIC 0x89DC10AB pwc_device ``drivers/usb/media/pwc.h``
|
||||
NBD_REPLY_MAGIC 0x96744668 nbd_reply ``include/linux/nbd.h``
|
||||
ENI155_MAGIC 0xa54b872d midway_eprom ``drivers/atm/eni.h``
|
||||
CODA_MAGIC 0xC0DAC0DA coda_file_info ``fs/coda/coda_fs_i.h``
|
||||
YAM_MAGIC 0xF10A7654 yam_port ``drivers/net/hamradio/yam.c``
|
||||
CCB_MAGIC 0xf2691ad2 ccb ``drivers/scsi/ncr53c8xx.c``
|
||||
QUEUE_MAGIC_FREE 0xf7e1c9a3 queue_entry ``drivers/scsi/arm/queue.c``
|
||||
QUEUE_MAGIC_USED 0xf7e1cc33 queue_entry ``drivers/scsi/arm/queue.c``
|
||||
HTB_CMAGIC 0xFEFAFEF1 htb_class ``net/sched/sch_htb.c``
|
||||
NMI_MAGIC 0x48414d4d455201 nmi_s ``arch/mips/include/asm/sn/nmi.h``
|
||||
===================== ================ ======================== ==========================================
|
||||
|
||||
Da notare che ci sono anche dei numeri magici specifici per driver nel
|
||||
*sound memory management*. Consultate ``include/sound/sndmagic.h`` per una
|
||||
lista completa. Molti driver audio OSS hanno i loro numeri magici costruiti a
|
||||
partire dall'identificativo PCI della scheda audio - nemmeno questi sono
|
||||
elencati in questo file.
|
||||
|
||||
Il file-system HFS è un altro grande utilizzatore di numeri magici - potete
|
||||
trovarli qui ``fs/hfs/hfs.h``.
|
||||
|
||||
@@ -58,87 +58,17 @@ Linux 魔术数
|
||||
魔术数名 数字 结构 文件
|
||||
===================== ================ ======================== ==========================================
|
||||
PG_MAGIC 'P' pg_{read,write}_hdr ``include/linux/pg.h``
|
||||
CMAGIC 0x0111 user ``include/linux/a.out.h``
|
||||
MKISS_DRIVER_MAGIC 0x04bf mkiss_channel ``drivers/net/mkiss.h``
|
||||
HDLC_MAGIC 0x239e n_hdlc ``drivers/char/n_hdlc.c``
|
||||
APM_BIOS_MAGIC 0x4101 apm_user ``arch/x86/kernel/apm_32.c``
|
||||
DB_MAGIC 0x4442 fc_info ``drivers/net/iph5526_novram.c``
|
||||
DL_MAGIC 0x444d fc_info ``drivers/net/iph5526_novram.c``
|
||||
FASYNC_MAGIC 0x4601 fasync_struct ``include/linux/fs.h``
|
||||
FF_MAGIC 0x4646 fc_info ``drivers/net/iph5526_novram.c``
|
||||
PTY_MAGIC 0x5001 ``drivers/char/pty.c``
|
||||
PPP_MAGIC 0x5002 ppp ``include/linux/if_pppvar.h``
|
||||
SSTATE_MAGIC 0x5302 serial_state ``include/linux/serial.h``
|
||||
SLIP_MAGIC 0x5302 slip ``drivers/net/slip.h``
|
||||
STRIP_MAGIC 0x5303 strip ``drivers/net/strip.c``
|
||||
SIXPACK_MAGIC 0x5304 sixpack ``drivers/net/hamradio/6pack.h``
|
||||
AX25_MAGIC 0x5316 ax_disp ``drivers/net/mkiss.h``
|
||||
TTY_MAGIC 0x5401 tty_struct ``include/linux/tty.h``
|
||||
MGSL_MAGIC 0x5401 mgsl_info ``drivers/char/synclink.c``
|
||||
TTY_DRIVER_MAGIC 0x5402 tty_driver ``include/linux/tty_driver.h``
|
||||
MGSLPC_MAGIC 0x5402 mgslpc_info ``drivers/char/pcmcia/synclink_cs.c``
|
||||
USB_SERIAL_MAGIC 0x6702 usb_serial ``drivers/usb/serial/usb-serial.h``
|
||||
FULL_DUPLEX_MAGIC 0x6969 ``drivers/net/ethernet/dec/tulip/de2104x.c``
|
||||
USB_BLUETOOTH_MAGIC 0x6d02 usb_bluetooth ``drivers/usb/class/bluetty.c``
|
||||
RFCOMM_TTY_MAGIC 0x6d02 ``net/bluetooth/rfcomm/tty.c``
|
||||
USB_SERIAL_PORT_MAGIC 0x7301 usb_serial_port ``drivers/usb/serial/usb-serial.h``
|
||||
CG_MAGIC 0x00090255 ufs_cylinder_group ``include/linux/ufs_fs.h``
|
||||
LSEMAGIC 0x05091998 lse ``drivers/fc4/fc.c``
|
||||
GDTIOCTL_MAGIC 0x06030f07 gdth_iowr_str ``drivers/scsi/gdth_ioctl.h``
|
||||
RIEBL_MAGIC 0x09051990 ``drivers/net/atarilance.c``
|
||||
NBD_REQUEST_MAGIC 0x12560953 nbd_request ``include/linux/nbd.h``
|
||||
RED_MAGIC2 0x170fc2a5 (any) ``mm/slab.c``
|
||||
BAYCOM_MAGIC 0x19730510 baycom_state ``drivers/net/baycom_epp.c``
|
||||
ISDN_X25IFACE_MAGIC 0x1e75a2b9 isdn_x25iface_proto_data ``drivers/isdn/isdn_x25iface.h``
|
||||
ECP_MAGIC 0x21504345 cdkecpsig ``include/linux/cdk.h``
|
||||
LSOMAGIC 0x27091997 lso ``drivers/fc4/fc.c``
|
||||
LSMAGIC 0x2a3b4d2a ls ``drivers/fc4/fc.c``
|
||||
WANPIPE_MAGIC 0x414C4453 sdla_{dump,exec} ``include/linux/wanpipe.h``
|
||||
CS_CARD_MAGIC 0x43525553 cs_card ``sound/oss/cs46xx.c``
|
||||
LABELCL_MAGIC 0x4857434c labelcl_info_s ``include/asm/ia64/sn/labelcl.h``
|
||||
ISDN_ASYNC_MAGIC 0x49344C01 modem_info ``include/linux/isdn.h``
|
||||
CTC_ASYNC_MAGIC 0x49344C01 ctc_tty_info ``drivers/s390/net/ctctty.c``
|
||||
ISDN_NET_MAGIC 0x49344C02 isdn_net_local_s ``drivers/isdn/i4l/isdn_net_lib.h``
|
||||
SAVEKMSG_MAGIC2 0x4B4D5347 savekmsg ``arch/*/amiga/config.c``
|
||||
CS_STATE_MAGIC 0x4c4f4749 cs_state ``sound/oss/cs46xx.c``
|
||||
SLAB_C_MAGIC 0x4f17a36d kmem_cache ``mm/slab.c``
|
||||
COW_MAGIC 0x4f4f4f4d cow_header_v1 ``arch/um/drivers/ubd_user.c``
|
||||
I810_CARD_MAGIC 0x5072696E i810_card ``sound/oss/i810_audio.c``
|
||||
TRIDENT_CARD_MAGIC 0x5072696E trident_card ``sound/oss/trident.c``
|
||||
ROUTER_MAGIC 0x524d4157 wan_device [in ``wanrouter.h`` pre 3.9]
|
||||
SAVEKMSG_MAGIC1 0x53415645 savekmsg ``arch/*/amiga/config.c``
|
||||
GDA_MAGIC 0x58464552 gda ``arch/mips/include/asm/sn/gda.h``
|
||||
RED_MAGIC1 0x5a2cf071 (any) ``mm/slab.c``
|
||||
EEPROM_MAGIC_VALUE 0x5ab478d2 lanai_dev ``drivers/atm/lanai.c``
|
||||
HDLCDRV_MAGIC 0x5ac6e778 hdlcdrv_state ``include/linux/hdlcdrv.h``
|
||||
PCXX_MAGIC 0x5c6df104 channel ``drivers/char/pcxx.h``
|
||||
KV_MAGIC 0x5f4b565f kernel_vars_s ``arch/mips/include/asm/sn/klkernvars.h``
|
||||
I810_STATE_MAGIC 0x63657373 i810_state ``sound/oss/i810_audio.c``
|
||||
TRIDENT_STATE_MAGIC 0x63657373 trient_state ``sound/oss/trident.c``
|
||||
M3_CARD_MAGIC 0x646e6f50 m3_card ``sound/oss/maestro3.c``
|
||||
FW_HEADER_MAGIC 0x65726F66 fw_header ``drivers/atm/fore200e.h``
|
||||
SLOT_MAGIC 0x67267321 slot ``drivers/hotplug/cpqphp.h``
|
||||
SLOT_MAGIC 0x67267322 slot ``drivers/hotplug/acpiphp.h``
|
||||
LO_MAGIC 0x68797548 nbd_device ``include/linux/nbd.h``
|
||||
M3_STATE_MAGIC 0x734d724d m3_state ``sound/oss/maestro3.c``
|
||||
VMALLOC_MAGIC 0x87654320 snd_alloc_track ``sound/core/memory.c``
|
||||
KMALLOC_MAGIC 0x87654321 snd_alloc_track ``sound/core/memory.c``
|
||||
PWC_MAGIC 0x89DC10AB pwc_device ``drivers/usb/media/pwc.h``
|
||||
NBD_REPLY_MAGIC 0x96744668 nbd_reply ``include/linux/nbd.h``
|
||||
ENI155_MAGIC 0xa54b872d midway_eprom ``drivers/atm/eni.h``
|
||||
CODA_MAGIC 0xC0DAC0DA coda_file_info ``fs/coda/coda_fs_i.h``
|
||||
DPMEM_MAGIC 0xc0ffee11 gdt_pci_sram ``drivers/scsi/gdth.h``
|
||||
YAM_MAGIC 0xF10A7654 yam_port ``drivers/net/hamradio/yam.c``
|
||||
CCB_MAGIC 0xf2691ad2 ccb ``drivers/scsi/ncr53c8xx.c``
|
||||
QUEUE_MAGIC_FREE 0xf7e1c9a3 queue_entry ``drivers/scsi/arm/queue.c``
|
||||
QUEUE_MAGIC_USED 0xf7e1cc33 queue_entry ``drivers/scsi/arm/queue.c``
|
||||
HTB_CMAGIC 0xFEFAFEF1 htb_class ``net/sched/sch_htb.c``
|
||||
NMI_MAGIC 0x48414d4d455201 nmi_s ``arch/mips/include/asm/sn/nmi.h``
|
||||
===================== ================ ======================== ==========================================
|
||||
|
||||
|
||||
请注意,在声音记忆管理中仍然有一些特殊的为每个驱动定义的魔术值。查看include/sound/sndmagic.h来获取他们完整的列表信息。很多OSS声音驱动拥有自己从声卡PCI ID构建的魔术值-他们也没有被列在这里。
|
||||
|
||||
IrDA子系统也使用了大量的自己的魔术值,查看include/net/irda/irda.h来获取他们完整的信息。
|
||||
|
||||
HFS是另外一个比较大的使用魔术值的文件系统-你可以在fs/hfs/hfs.h中找到他们。
|
||||
|
||||
@@ -61,88 +61,17 @@ Linux 魔術數
|
||||
魔術數名 數字 結構 文件
|
||||
===================== ================ ======================== ==========================================
|
||||
PG_MAGIC 'P' pg_{read,write}_hdr ``include/linux/pg.h``
|
||||
CMAGIC 0x0111 user ``include/linux/a.out.h``
|
||||
MKISS_DRIVER_MAGIC 0x04bf mkiss_channel ``drivers/net/mkiss.h``
|
||||
HDLC_MAGIC 0x239e n_hdlc ``drivers/char/n_hdlc.c``
|
||||
APM_BIOS_MAGIC 0x4101 apm_user ``arch/x86/kernel/apm_32.c``
|
||||
DB_MAGIC 0x4442 fc_info ``drivers/net/iph5526_novram.c``
|
||||
DL_MAGIC 0x444d fc_info ``drivers/net/iph5526_novram.c``
|
||||
FASYNC_MAGIC 0x4601 fasync_struct ``include/linux/fs.h``
|
||||
FF_MAGIC 0x4646 fc_info ``drivers/net/iph5526_novram.c``
|
||||
PTY_MAGIC 0x5001 ``drivers/char/pty.c``
|
||||
PPP_MAGIC 0x5002 ppp ``include/linux/if_pppvar.h``
|
||||
SSTATE_MAGIC 0x5302 serial_state ``include/linux/serial.h``
|
||||
SLIP_MAGIC 0x5302 slip ``drivers/net/slip.h``
|
||||
STRIP_MAGIC 0x5303 strip ``drivers/net/strip.c``
|
||||
SIXPACK_MAGIC 0x5304 sixpack ``drivers/net/hamradio/6pack.h``
|
||||
AX25_MAGIC 0x5316 ax_disp ``drivers/net/mkiss.h``
|
||||
TTY_MAGIC 0x5401 tty_struct ``include/linux/tty.h``
|
||||
MGSL_MAGIC 0x5401 mgsl_info ``drivers/char/synclink.c``
|
||||
TTY_DRIVER_MAGIC 0x5402 tty_driver ``include/linux/tty_driver.h``
|
||||
MGSLPC_MAGIC 0x5402 mgslpc_info ``drivers/char/pcmcia/synclink_cs.c``
|
||||
USB_SERIAL_MAGIC 0x6702 usb_serial ``drivers/usb/serial/usb-serial.h``
|
||||
FULL_DUPLEX_MAGIC 0x6969 ``drivers/net/ethernet/dec/tulip/de2104x.c``
|
||||
USB_BLUETOOTH_MAGIC 0x6d02 usb_bluetooth ``drivers/usb/class/bluetty.c``
|
||||
RFCOMM_TTY_MAGIC 0x6d02 ``net/bluetooth/rfcomm/tty.c``
|
||||
USB_SERIAL_PORT_MAGIC 0x7301 usb_serial_port ``drivers/usb/serial/usb-serial.h``
|
||||
CG_MAGIC 0x00090255 ufs_cylinder_group ``include/linux/ufs_fs.h``
|
||||
LSEMAGIC 0x05091998 lse ``drivers/fc4/fc.c``
|
||||
GDTIOCTL_MAGIC 0x06030f07 gdth_iowr_str ``drivers/scsi/gdth_ioctl.h``
|
||||
RIEBL_MAGIC 0x09051990 ``drivers/net/atarilance.c``
|
||||
NBD_REQUEST_MAGIC 0x12560953 nbd_request ``include/linux/nbd.h``
|
||||
RED_MAGIC2 0x170fc2a5 (any) ``mm/slab.c``
|
||||
BAYCOM_MAGIC 0x19730510 baycom_state ``drivers/net/baycom_epp.c``
|
||||
ISDN_X25IFACE_MAGIC 0x1e75a2b9 isdn_x25iface_proto_data ``drivers/isdn/isdn_x25iface.h``
|
||||
ECP_MAGIC 0x21504345 cdkecpsig ``include/linux/cdk.h``
|
||||
LSOMAGIC 0x27091997 lso ``drivers/fc4/fc.c``
|
||||
LSMAGIC 0x2a3b4d2a ls ``drivers/fc4/fc.c``
|
||||
WANPIPE_MAGIC 0x414C4453 sdla_{dump,exec} ``include/linux/wanpipe.h``
|
||||
CS_CARD_MAGIC 0x43525553 cs_card ``sound/oss/cs46xx.c``
|
||||
LABELCL_MAGIC 0x4857434c labelcl_info_s ``include/asm/ia64/sn/labelcl.h``
|
||||
ISDN_ASYNC_MAGIC 0x49344C01 modem_info ``include/linux/isdn.h``
|
||||
CTC_ASYNC_MAGIC 0x49344C01 ctc_tty_info ``drivers/s390/net/ctctty.c``
|
||||
ISDN_NET_MAGIC 0x49344C02 isdn_net_local_s ``drivers/isdn/i4l/isdn_net_lib.h``
|
||||
SAVEKMSG_MAGIC2 0x4B4D5347 savekmsg ``arch/*/amiga/config.c``
|
||||
CS_STATE_MAGIC 0x4c4f4749 cs_state ``sound/oss/cs46xx.c``
|
||||
SLAB_C_MAGIC 0x4f17a36d kmem_cache ``mm/slab.c``
|
||||
COW_MAGIC 0x4f4f4f4d cow_header_v1 ``arch/um/drivers/ubd_user.c``
|
||||
I810_CARD_MAGIC 0x5072696E i810_card ``sound/oss/i810_audio.c``
|
||||
TRIDENT_CARD_MAGIC 0x5072696E trident_card ``sound/oss/trident.c``
|
||||
ROUTER_MAGIC 0x524d4157 wan_device [in ``wanrouter.h`` pre 3.9]
|
||||
SAVEKMSG_MAGIC1 0x53415645 savekmsg ``arch/*/amiga/config.c``
|
||||
GDA_MAGIC 0x58464552 gda ``arch/mips/include/asm/sn/gda.h``
|
||||
RED_MAGIC1 0x5a2cf071 (any) ``mm/slab.c``
|
||||
EEPROM_MAGIC_VALUE 0x5ab478d2 lanai_dev ``drivers/atm/lanai.c``
|
||||
HDLCDRV_MAGIC 0x5ac6e778 hdlcdrv_state ``include/linux/hdlcdrv.h``
|
||||
PCXX_MAGIC 0x5c6df104 channel ``drivers/char/pcxx.h``
|
||||
KV_MAGIC 0x5f4b565f kernel_vars_s ``arch/mips/include/asm/sn/klkernvars.h``
|
||||
I810_STATE_MAGIC 0x63657373 i810_state ``sound/oss/i810_audio.c``
|
||||
TRIDENT_STATE_MAGIC 0x63657373 trient_state ``sound/oss/trident.c``
|
||||
M3_CARD_MAGIC 0x646e6f50 m3_card ``sound/oss/maestro3.c``
|
||||
FW_HEADER_MAGIC 0x65726F66 fw_header ``drivers/atm/fore200e.h``
|
||||
SLOT_MAGIC 0x67267321 slot ``drivers/hotplug/cpqphp.h``
|
||||
SLOT_MAGIC 0x67267322 slot ``drivers/hotplug/acpiphp.h``
|
||||
LO_MAGIC 0x68797548 nbd_device ``include/linux/nbd.h``
|
||||
M3_STATE_MAGIC 0x734d724d m3_state ``sound/oss/maestro3.c``
|
||||
VMALLOC_MAGIC 0x87654320 snd_alloc_track ``sound/core/memory.c``
|
||||
KMALLOC_MAGIC 0x87654321 snd_alloc_track ``sound/core/memory.c``
|
||||
PWC_MAGIC 0x89DC10AB pwc_device ``drivers/usb/media/pwc.h``
|
||||
NBD_REPLY_MAGIC 0x96744668 nbd_reply ``include/linux/nbd.h``
|
||||
ENI155_MAGIC 0xa54b872d midway_eprom ``drivers/atm/eni.h``
|
||||
CODA_MAGIC 0xC0DAC0DA coda_file_info ``fs/coda/coda_fs_i.h``
|
||||
DPMEM_MAGIC 0xc0ffee11 gdt_pci_sram ``drivers/scsi/gdth.h``
|
||||
YAM_MAGIC 0xF10A7654 yam_port ``drivers/net/hamradio/yam.c``
|
||||
CCB_MAGIC 0xf2691ad2 ccb ``drivers/scsi/ncr53c8xx.c``
|
||||
QUEUE_MAGIC_FREE 0xf7e1c9a3 queue_entry ``drivers/scsi/arm/queue.c``
|
||||
QUEUE_MAGIC_USED 0xf7e1cc33 queue_entry ``drivers/scsi/arm/queue.c``
|
||||
HTB_CMAGIC 0xFEFAFEF1 htb_class ``net/sched/sch_htb.c``
|
||||
NMI_MAGIC 0x48414d4d455201 nmi_s ``arch/mips/include/asm/sn/nmi.h``
|
||||
===================== ================ ======================== ==========================================
|
||||
|
||||
|
||||
請注意,在聲音記憶管理中仍然有一些特殊的爲每個驅動定義的魔術值。查看include/sound/sndmagic.h來獲取他們完整的列表信息。很多OSS聲音驅動擁有自己從音效卡PCI ID構建的魔術值-他們也沒有被列在這裡。
|
||||
|
||||
IrDA子系統也使用了大量的自己的魔術值,查看include/net/irda/irda.h來獲取他們完整的信息。
|
||||
|
||||
HFS是另外一個比較大的使用魔術值的文件系統-你可以在fs/hfs/hfs.h中找到他們。
|
||||
|
||||
|
||||
@@ -340,13 +340,12 @@ USBIP_CMD_SUBMIT:
|
||||
| 0 | 20 | usbip_header_basic, 'command' shall be 0x00000001 |
|
||||
+-----------+--------+---------------------------------------------------+
|
||||
| 0x14 | 4 | transfer_flags: possible values depend on the |
|
||||
| | | URB transfer_flags (refer to URB doc in |
|
||||
| | | Documentation/driver-api/usb/URB.rst) |
|
||||
| | | but with URB_NO_TRANSFER_DMA_MAP masked. Refer to |
|
||||
| | | function usbip_pack_cmd_submit and function |
|
||||
| | | tweak_transfer_flags in drivers/usb/usbip/ |
|
||||
| | | usbip_common.c. The following fields may also ref |
|
||||
| | | to function usbip_pack_cmd_submit and URB doc |
|
||||
| | | USBIP_URB transfer_flags. |
|
||||
| | | Refer to include/uapi/linux/usbip.h and |
|
||||
| | | Documentation/driver-api/usb/URB.rst. |
|
||||
| | | Refer to usbip_pack_cmd_submit() and |
|
||||
| | | tweak_transfer_flags() in drivers/usb/usbip/ |
|
||||
| | | usbip_common.c. |
|
||||
+-----------+--------+---------------------------------------------------+
|
||||
| 0x18 | 4 | transfer_buffer_length: |
|
||||
| | | use URB transfer_buffer_length |
|
||||
|
||||
22
MAINTAINERS
22
MAINTAINERS
@@ -5921,10 +5921,9 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git
|
||||
F: drivers/usb/dwc2/
|
||||
|
||||
DESIGNWARE USB3 DRD IP DRIVER
|
||||
M: Felipe Balbi <balbi@kernel.org>
|
||||
M: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
|
||||
L: linux-usb@vger.kernel.org
|
||||
S: Maintained
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git
|
||||
F: drivers/usb/dwc3/
|
||||
|
||||
DEVANTECH SRF ULTRASONIC RANGER IIO DRIVER
|
||||
@@ -7236,6 +7235,8 @@ M: Jason Baron <jbaron@akamai.com>
|
||||
S: Maintained
|
||||
F: include/linux/dynamic_debug.h
|
||||
F: lib/dynamic_debug.c
|
||||
M: Jim Cromie <jim.cromie@gmail.com>
|
||||
F: lib/test_dynamic_debug.c
|
||||
|
||||
DYNAMIC INTERRUPT MODERATION
|
||||
M: Tal Gilboa <talgi@nvidia.com>
|
||||
@@ -9157,6 +9158,7 @@ F: net/dsa/tag_hellcreek.c
|
||||
|
||||
HISILICON DMA DRIVER
|
||||
M: Zhou Wang <wangzhou1@hisilicon.com>
|
||||
M: Jie Hai <haijie1@hisilicon.com>
|
||||
L: dmaengine@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/dma/hisi_dma.c
|
||||
@@ -13345,7 +13347,7 @@ F: include/dt-bindings/dma/at91.h
|
||||
MICROCHIP AT91 SERIAL DRIVER
|
||||
M: Richard Genoud <richard.genoud@gmail.com>
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/mfd/atmel-usart.txt
|
||||
F: Documentation/devicetree/bindings/serial/atmel,at91-usart.yaml
|
||||
F: drivers/tty/serial/atmel_serial.c
|
||||
F: drivers/tty/serial/atmel_serial.h
|
||||
|
||||
@@ -13353,7 +13355,7 @@ MICROCHIP AT91 USART MFD DRIVER
|
||||
M: Radu Pirea <radu_nicolae.pirea@upb.ro>
|
||||
L: linux-kernel@vger.kernel.org
|
||||
S: Supported
|
||||
F: Documentation/devicetree/bindings/mfd/atmel-usart.txt
|
||||
F: Documentation/devicetree/bindings/serial/atmel,at91-usart.yaml
|
||||
F: drivers/mfd/at91-usart.c
|
||||
F: include/dt-bindings/mfd/at91-usart.h
|
||||
|
||||
@@ -13361,7 +13363,7 @@ MICROCHIP AT91 USART SPI DRIVER
|
||||
M: Radu Pirea <radu_nicolae.pirea@upb.ro>
|
||||
L: linux-spi@vger.kernel.org
|
||||
S: Supported
|
||||
F: Documentation/devicetree/bindings/mfd/atmel-usart.txt
|
||||
F: Documentation/devicetree/bindings/serial/atmel,at91-usart.yaml
|
||||
F: drivers/spi/spi-at91-usart.c
|
||||
|
||||
MICROCHIP AUDIO ASOC DRIVERS
|
||||
@@ -13554,6 +13556,7 @@ M: UNGLinuxDriver@microchip.com
|
||||
L: linux-mips@vger.kernel.org
|
||||
S: Supported
|
||||
F: Documentation/devicetree/bindings/mips/mscc.txt
|
||||
F: Documentation/devicetree/bindings/phy/mscc,vsc7514-serdes.yaml
|
||||
F: Documentation/devicetree/bindings/power/reset/ocelot-reset.txt
|
||||
F: arch/mips/boot/dts/mscc/
|
||||
F: arch/mips/configs/generic/board-ocelot.config
|
||||
@@ -19623,6 +19626,15 @@ S: Maintained
|
||||
F: Documentation/devicetree/bindings/nvmem/sunplus,sp7021-ocotp.yaml
|
||||
F: drivers/nvmem/sunplus-ocotp.c
|
||||
|
||||
SUNPLUS USB2 PHY DRIVER
|
||||
M: Vincent Shih <vincent.sunplus@gmail.com>
|
||||
L: linux-usb@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/phy/sunplus,sp7021-usb2-phy.yaml
|
||||
F: drivers/phy/sunplus/Kconfig
|
||||
F: drivers/phy/sunplus/Makefile
|
||||
F: drivers/phy/sunplus/phy-sunplus-usb2.c
|
||||
|
||||
SUNPLUS PWM DRIVER
|
||||
M: Hammer Hsieh <hammerh0314@gmail.com>
|
||||
S: Maintained
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef _ALPHA_TERMIOS_H
|
||||
#define _ALPHA_TERMIOS_H
|
||||
|
||||
#include <uapi/asm/termios.h>
|
||||
|
||||
/* eof=^D eol=\0 eol2=\0 erase=del
|
||||
werase=^W kill=^U reprint=^R sxtc=\0
|
||||
intr=^C quit=^\ susp=^Z <OSF/1 VDSUSP>
|
||||
start=^Q stop=^S lnext=^V discard=^U
|
||||
vmin=\1 vtime=\0
|
||||
*/
|
||||
#define INIT_C_CC "\004\000\000\177\027\025\022\000\003\034\032\000\021\023\026\025\001\000"
|
||||
|
||||
/*
|
||||
* Translate a "termio" structure into a "termios". Ugh.
|
||||
*/
|
||||
|
||||
#define user_termio_to_kernel_termios(a_termios, u_termio) \
|
||||
({ \
|
||||
struct ktermios *k_termios = (a_termios); \
|
||||
struct termio k_termio; \
|
||||
int canon, ret; \
|
||||
\
|
||||
ret = copy_from_user(&k_termio, u_termio, sizeof(k_termio)); \
|
||||
if (!ret) { \
|
||||
/* Overwrite only the low bits. */ \
|
||||
*(unsigned short *)&k_termios->c_iflag = k_termio.c_iflag; \
|
||||
*(unsigned short *)&k_termios->c_oflag = k_termio.c_oflag; \
|
||||
*(unsigned short *)&k_termios->c_cflag = k_termio.c_cflag; \
|
||||
*(unsigned short *)&k_termios->c_lflag = k_termio.c_lflag; \
|
||||
canon = k_termio.c_lflag & ICANON; \
|
||||
\
|
||||
k_termios->c_cc[VINTR] = k_termio.c_cc[_VINTR]; \
|
||||
k_termios->c_cc[VQUIT] = k_termio.c_cc[_VQUIT]; \
|
||||
k_termios->c_cc[VERASE] = k_termio.c_cc[_VERASE]; \
|
||||
k_termios->c_cc[VKILL] = k_termio.c_cc[_VKILL]; \
|
||||
k_termios->c_cc[VEOL2] = k_termio.c_cc[_VEOL2]; \
|
||||
k_termios->c_cc[VSWTC] = k_termio.c_cc[_VSWTC]; \
|
||||
k_termios->c_cc[canon ? VEOF : VMIN] = k_termio.c_cc[_VEOF]; \
|
||||
k_termios->c_cc[canon ? VEOL : VTIME] = k_termio.c_cc[_VEOL]; \
|
||||
} \
|
||||
ret; \
|
||||
})
|
||||
|
||||
/*
|
||||
* Translate a "termios" structure into a "termio". Ugh.
|
||||
*
|
||||
* Note the "fun" _VMIN overloading.
|
||||
*/
|
||||
#define kernel_termios_to_user_termio(u_termio, a_termios) \
|
||||
({ \
|
||||
struct ktermios *k_termios = (a_termios); \
|
||||
struct termio k_termio; \
|
||||
int canon; \
|
||||
\
|
||||
k_termio.c_iflag = k_termios->c_iflag; \
|
||||
k_termio.c_oflag = k_termios->c_oflag; \
|
||||
k_termio.c_cflag = k_termios->c_cflag; \
|
||||
canon = (k_termio.c_lflag = k_termios->c_lflag) & ICANON; \
|
||||
\
|
||||
k_termio.c_line = k_termios->c_line; \
|
||||
k_termio.c_cc[_VINTR] = k_termios->c_cc[VINTR]; \
|
||||
k_termio.c_cc[_VQUIT] = k_termios->c_cc[VQUIT]; \
|
||||
k_termio.c_cc[_VERASE] = k_termios->c_cc[VERASE]; \
|
||||
k_termio.c_cc[_VKILL] = k_termios->c_cc[VKILL]; \
|
||||
k_termio.c_cc[_VEOF] = k_termios->c_cc[canon ? VEOF : VMIN]; \
|
||||
k_termio.c_cc[_VEOL] = k_termios->c_cc[canon ? VEOL : VTIME]; \
|
||||
k_termio.c_cc[_VEOL2] = k_termios->c_cc[VEOL2]; \
|
||||
k_termio.c_cc[_VSWTC] = k_termios->c_cc[VSWTC]; \
|
||||
\
|
||||
copy_to_user(u_termio, &k_termio, sizeof(k_termio)); \
|
||||
})
|
||||
|
||||
#define user_termios_to_kernel_termios(k, u) \
|
||||
copy_from_user(k, u, sizeof(struct termios2))
|
||||
|
||||
#define kernel_termios_to_user_termios(u, k) \
|
||||
copy_to_user(u, k, sizeof(struct termios2))
|
||||
|
||||
#define user_termios_to_kernel_termios_1(k, u) \
|
||||
copy_from_user(k, u, sizeof(struct termios))
|
||||
|
||||
#define kernel_termios_to_user_termios_1(u, k) \
|
||||
copy_to_user(u, k, sizeof(struct termios))
|
||||
|
||||
#endif /* _ALPHA_TERMIOS_H */
|
||||
@@ -9,7 +9,7 @@ ccflags-y := -Wno-sign-compare
|
||||
|
||||
obj-y := entry.o traps.o process.o osf_sys.o irq.o \
|
||||
irq_alpha.o signal.o setup.o ptrace.o time.o \
|
||||
systbls.o err_common.o io.o bugs.o
|
||||
systbls.o err_common.o io.o bugs.o termios.o
|
||||
|
||||
obj-$(CONFIG_VGA_HOSE) += console.o
|
||||
obj-$(CONFIG_SMP) += smp.o
|
||||
|
||||
56
arch/alpha/kernel/termios.c
Normal file
56
arch/alpha/kernel/termios.c
Normal file
@@ -0,0 +1,56 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
#include <linux/termios_internal.h>
|
||||
|
||||
int user_termio_to_kernel_termios(struct ktermios *termios,
|
||||
struct termio __user *termio)
|
||||
{
|
||||
struct termio v;
|
||||
bool canon;
|
||||
|
||||
if (copy_from_user(&v, termio, sizeof(struct termio)))
|
||||
return -EFAULT;
|
||||
|
||||
termios->c_iflag = (0xffff0000 & termios->c_iflag) | v.c_iflag;
|
||||
termios->c_oflag = (0xffff0000 & termios->c_oflag) | v.c_oflag;
|
||||
termios->c_cflag = (0xffff0000 & termios->c_cflag) | v.c_cflag;
|
||||
termios->c_lflag = (0xffff0000 & termios->c_lflag) | v.c_lflag;
|
||||
termios->c_line = (0xffff0000 & termios->c_lflag) | v.c_line;
|
||||
|
||||
canon = v.c_lflag & ICANON;
|
||||
termios->c_cc[VINTR] = v.c_cc[_VINTR];
|
||||
termios->c_cc[VQUIT] = v.c_cc[_VQUIT];
|
||||
termios->c_cc[VERASE] = v.c_cc[_VERASE];
|
||||
termios->c_cc[VKILL] = v.c_cc[_VKILL];
|
||||
termios->c_cc[VEOL2] = v.c_cc[_VEOL2];
|
||||
termios->c_cc[VSWTC] = v.c_cc[_VSWTC];
|
||||
termios->c_cc[canon ? VEOF : VMIN] = v.c_cc[_VEOF];
|
||||
termios->c_cc[canon ? VEOL : VTIME] = v.c_cc[_VEOL];
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int kernel_termios_to_user_termio(struct termio __user *termio,
|
||||
struct ktermios *termios)
|
||||
{
|
||||
struct termio v;
|
||||
bool canon;
|
||||
|
||||
memset(&v, 0, sizeof(struct termio));
|
||||
v.c_iflag = termios->c_iflag;
|
||||
v.c_oflag = termios->c_oflag;
|
||||
v.c_cflag = termios->c_cflag;
|
||||
v.c_lflag = termios->c_lflag;
|
||||
v.c_line = termios->c_line;
|
||||
|
||||
canon = v.c_lflag & ICANON;
|
||||
v.c_cc[_VINTR] = termios->c_cc[VINTR];
|
||||
v.c_cc[_VQUIT] = termios->c_cc[VQUIT];
|
||||
v.c_cc[_VERASE] = termios->c_cc[VERASE];
|
||||
v.c_cc[_VKILL] = termios->c_cc[VKILL];
|
||||
v.c_cc[_VEOF] = termios->c_cc[canon ? VEOF : VMIN];
|
||||
v.c_cc[_VEOL] = termios->c_cc[canon ? VEOL : VTIME];
|
||||
v.c_cc[_VEOL2] = termios->c_cc[VEOL2];
|
||||
v.c_cc[_VSWTC] = termios->c_cc[VSWTC];
|
||||
|
||||
return copy_to_user(termio, &v, sizeof(struct termio));
|
||||
}
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <linux/io.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/leds.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/termios.h>
|
||||
#include <linux/amba/bus.h>
|
||||
#include <linux/amba/serial.h>
|
||||
|
||||
@@ -421,7 +421,14 @@ static struct s3c2410_platform_nand __initdata gta02_nand_info = {
|
||||
/* Get PMU to set USB current limit accordingly. */
|
||||
static struct s3c2410_udc_mach_info gta02_udc_cfg __initdata = {
|
||||
.vbus_draw = gta02_udc_vbus_draw,
|
||||
.pullup_pin = GTA02_GPIO_USB_PULLUP,
|
||||
};
|
||||
|
||||
static struct gpiod_lookup_table gta02_udc_gpio_table = {
|
||||
.dev_id = "s3c2410-usbgadget",
|
||||
.table = {
|
||||
GPIO_LOOKUP("GPIOB", 9, "pullup", GPIO_ACTIVE_HIGH),
|
||||
{ },
|
||||
},
|
||||
};
|
||||
|
||||
/* USB */
|
||||
@@ -555,6 +562,7 @@ static void __init gta02_machine_init(void)
|
||||
s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
|
||||
S3C_GPIO_PULL_NONE);
|
||||
|
||||
gpiod_add_lookup_table(>a02_udc_gpio_table);
|
||||
gpiod_add_lookup_table(>a02_audio_gpio_table);
|
||||
gpiod_add_lookup_table(>a02_mmc_gpio_table);
|
||||
platform_add_devices(gta02_devices, ARRAY_SIZE(gta02_devices));
|
||||
|
||||
@@ -167,9 +167,15 @@ static struct gpio_chip h1940_latch_gpiochip = {
|
||||
};
|
||||
|
||||
static struct s3c2410_udc_mach_info h1940_udc_cfg __initdata = {
|
||||
.vbus_pin = S3C2410_GPG(5),
|
||||
.vbus_pin_inverted = 1,
|
||||
.pullup_pin = H1940_LATCH_USB_DP,
|
||||
};
|
||||
|
||||
static struct gpiod_lookup_table h1940_udc_gpio_table = {
|
||||
.dev_id = "s3c2410-usbgadget",
|
||||
.table = {
|
||||
GPIO_LOOKUP("GPIOG", 5, "vbus", GPIO_ACTIVE_LOW),
|
||||
GPIO_LOOKUP("H1940_LATCH", 7, "pullup", GPIO_ACTIVE_HIGH),
|
||||
{ },
|
||||
},
|
||||
};
|
||||
|
||||
static struct s3c2410_ts_mach_info h1940_ts_cfg __initdata = {
|
||||
@@ -725,6 +731,7 @@ static void __init h1940_init(void)
|
||||
u32 tmp;
|
||||
|
||||
s3c24xx_fb_set_platdata(&h1940_fb_info);
|
||||
gpiod_add_lookup_table(&h1940_udc_gpio_table);
|
||||
gpiod_add_lookup_table(&h1940_mmc_gpio_table);
|
||||
gpiod_add_lookup_table(&h1940_audio_gpio_table);
|
||||
gpiod_add_lookup_table(&h1940_bat_gpio_table);
|
||||
|
||||
@@ -493,7 +493,14 @@ static struct platform_device *jive_devices[] __initdata = {
|
||||
};
|
||||
|
||||
static struct s3c2410_udc_mach_info jive_udc_cfg __initdata = {
|
||||
.vbus_pin = S3C2410_GPG(1), /* detect is on GPG1 */
|
||||
};
|
||||
|
||||
static struct gpiod_lookup_table jive_udc_gpio_table = {
|
||||
.dev_id = "s3c2410-usbgadget",
|
||||
.table = {
|
||||
GPIO_LOOKUP("GPIOG", 1, "vbus", GPIO_ACTIVE_HIGH),
|
||||
{ },
|
||||
},
|
||||
};
|
||||
|
||||
/* Jive power management device */
|
||||
@@ -669,6 +676,7 @@ static void __init jive_machine_init(void)
|
||||
|
||||
pm_power_off = jive_power_off;
|
||||
|
||||
gpiod_add_lookup_table(&jive_udc_gpio_table);
|
||||
gpiod_add_lookup_table(&jive_lcdspi_gpiod_table);
|
||||
gpiod_add_lookup_table(&jive_wm8750_gpiod_table);
|
||||
platform_add_devices(jive_devices, ARRAY_SIZE(jive_devices));
|
||||
|
||||
@@ -93,9 +93,15 @@ static struct s3c2410_uartcfg mini2440_uartcfgs[] __initdata = {
|
||||
/* USB device UDC support */
|
||||
|
||||
static struct s3c2410_udc_mach_info mini2440_udc_cfg __initdata = {
|
||||
.pullup_pin = S3C2410_GPC(5),
|
||||
};
|
||||
|
||||
static struct gpiod_lookup_table mini2440_udc_gpio_table = {
|
||||
.dev_id = "s3c2410-usbgadget",
|
||||
.table = {
|
||||
GPIO_LOOKUP("GPIOC", 5, "pullup", GPIO_ACTIVE_HIGH),
|
||||
{ },
|
||||
},
|
||||
};
|
||||
|
||||
/* LCD timing and setup */
|
||||
|
||||
@@ -755,6 +761,7 @@ static void __init mini2440_init(void)
|
||||
s3c24xx_fb_set_platdata(&mini2440_fb_info);
|
||||
}
|
||||
|
||||
gpiod_add_lookup_table(&mini2440_udc_gpio_table);
|
||||
s3c24xx_udc_set_platdata(&mini2440_udc_cfg);
|
||||
gpiod_add_lookup_table(&mini2440_mmc_gpio_table);
|
||||
s3c24xx_mci_set_platdata(&mini2440_mmc_cfg);
|
||||
|
||||
@@ -84,9 +84,15 @@ static struct s3c2410_uartcfg n30_uartcfgs[] = {
|
||||
};
|
||||
|
||||
static struct s3c2410_udc_mach_info n30_udc_cfg __initdata = {
|
||||
.vbus_pin = S3C2410_GPG(1),
|
||||
.vbus_pin_inverted = 0,
|
||||
.pullup_pin = S3C2410_GPB(3),
|
||||
};
|
||||
|
||||
static struct gpiod_lookup_table n30_udc_gpio_table = {
|
||||
.dev_id = "s3c2410-usbgadget",
|
||||
.table = {
|
||||
GPIO_LOOKUP("GPIOG", 1, "vbus", GPIO_ACTIVE_HIGH),
|
||||
GPIO_LOOKUP("GPIOB", 3, "pullup", GPIO_ACTIVE_HIGH),
|
||||
{ },
|
||||
},
|
||||
};
|
||||
|
||||
static struct gpio_keys_button n30_buttons[] = {
|
||||
@@ -595,6 +601,7 @@ static void __init n30_init(void)
|
||||
WARN_ON(gpio_request(S3C2410_GPG(4), "mmc power"));
|
||||
|
||||
s3c24xx_fb_set_platdata(&n30_fb_info);
|
||||
gpiod_add_lookup_table(&n30_udc_gpio_table);
|
||||
s3c24xx_udc_set_platdata(&n30_udc_cfg);
|
||||
gpiod_add_lookup_table(&n30_mci_gpio_table);
|
||||
s3c24xx_mci_set_platdata(&n30_mci_cfg);
|
||||
|
||||
@@ -643,9 +643,15 @@ static struct s3c2410_platform_nand rx1950_nand_info = {
|
||||
};
|
||||
|
||||
static struct s3c2410_udc_mach_info rx1950_udc_cfg __initdata = {
|
||||
.vbus_pin = S3C2410_GPG(5),
|
||||
.vbus_pin_inverted = 1,
|
||||
.pullup_pin = S3C2410_GPJ(5),
|
||||
};
|
||||
|
||||
static struct gpiod_lookup_table rx1950_udc_gpio_table = {
|
||||
.dev_id = "s3c2410-usbgadget",
|
||||
.table = {
|
||||
GPIO_LOOKUP("GPIOG", 5, "vbus", GPIO_ACTIVE_LOW),
|
||||
GPIO_LOOKUP("GPIOJ", 5, "pullup", GPIO_ACTIVE_HIGH),
|
||||
{ },
|
||||
},
|
||||
};
|
||||
|
||||
static struct s3c2410_ts_mach_info rx1950_ts_cfg __initdata = {
|
||||
@@ -847,6 +853,7 @@ static void __init rx1950_init_machine(void)
|
||||
gpio_direction_output(S3C2410_GPJ(6), 0);
|
||||
|
||||
pwm_add_table(rx1950_pwm_lookup, ARRAY_SIZE(rx1950_pwm_lookup));
|
||||
gpiod_add_lookup_table(&rx1950_udc_gpio_table);
|
||||
gpiod_add_lookup_table(&rx1950_audio_gpio_table);
|
||||
gpiod_add_lookup_table(&rx1950_bat_gpio_table);
|
||||
/* Configure the I2S pins (GPE0...GPE4) in correct mode */
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <linux/list.h>
|
||||
#include <linux/timer.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/gpio/machine.h>
|
||||
#include <linux/serial_core.h>
|
||||
#include <linux/serial_s3c.h>
|
||||
#include <linux/platform_device.h>
|
||||
@@ -74,9 +74,15 @@ static struct s3c2410_uartcfg smdk2413_uartcfgs[] __initdata = {
|
||||
|
||||
|
||||
static struct s3c2410_udc_mach_info smdk2413_udc_cfg __initdata = {
|
||||
.pullup_pin = S3C2410_GPF(2),
|
||||
};
|
||||
|
||||
static struct gpiod_lookup_table smdk2413_udc_gpio_table = {
|
||||
.dev_id = "s3c2410-usbgadget",
|
||||
.table = {
|
||||
GPIO_LOOKUP("GPIOF", 2, "pullup", GPIO_ACTIVE_HIGH),
|
||||
{ },
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device *smdk2413_devices[] __initdata = {
|
||||
&s3c_device_ohci,
|
||||
@@ -115,7 +121,7 @@ static void __init smdk2413_machine_init(void)
|
||||
S3C2410_MISCCR_USBSUSPND0 |
|
||||
S3C2410_MISCCR_USBSUSPND1, 0x0);
|
||||
|
||||
|
||||
gpiod_add_lookup_table(&smdk2413_udc_gpio_table);
|
||||
s3c24xx_udc_set_platdata(&smdk2413_udc_cfg);
|
||||
s3c_i2c0_set_platdata(NULL);
|
||||
/* Configure the I2S pins (GPE0...GPE4) in correct mode */
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <linux/of_irq.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/termios.h>
|
||||
#include <linux/mfd/syscon.h>
|
||||
#include <linux/regmap.h>
|
||||
|
||||
@@ -1299,7 +1299,7 @@
|
||||
interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
|
||||
phys = <&usb3_phy0>, <&usb3_phy0>;
|
||||
phy-names = "usb2-phy", "usb3-phy";
|
||||
snps,dis-u2-freeclk-exists-quirk;
|
||||
snps,gfladj-refclk-lpm-sel-quirk;
|
||||
};
|
||||
|
||||
};
|
||||
@@ -1341,7 +1341,7 @@
|
||||
interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
|
||||
phys = <&usb3_phy1>, <&usb3_phy1>;
|
||||
phy-names = "usb2-phy", "usb3-phy";
|
||||
snps,dis-u2-freeclk-exists-quirk;
|
||||
snps,gfladj-refclk-lpm-sel-quirk;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* Modified 1999
|
||||
* David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co
|
||||
*
|
||||
* 99/01/28 Added N_IRDA and N_SMSBLOCK
|
||||
*/
|
||||
#ifndef _ASM_IA64_TERMIOS_H
|
||||
#define _ASM_IA64_TERMIOS_H
|
||||
|
||||
#include <uapi/asm/termios.h>
|
||||
|
||||
|
||||
/* intr=^C quit=^\ erase=del kill=^U
|
||||
eof=^D vtime=\0 vmin=\1 sxtc=\0
|
||||
start=^Q stop=^S susp=^Z eol=\0
|
||||
reprint=^R discard=^U werase=^W lnext=^V
|
||||
eol2=\0
|
||||
*/
|
||||
#define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0"
|
||||
|
||||
/*
|
||||
* Translate a "termio" structure into a "termios". Ugh.
|
||||
*/
|
||||
#define SET_LOW_TERMIOS_BITS(termios, termio, x) { \
|
||||
unsigned short __tmp; \
|
||||
get_user(__tmp,&(termio)->x); \
|
||||
*(unsigned short *) &(termios)->x = __tmp; \
|
||||
}
|
||||
|
||||
#define user_termio_to_kernel_termios(termios, termio) \
|
||||
({ \
|
||||
SET_LOW_TERMIOS_BITS(termios, termio, c_iflag); \
|
||||
SET_LOW_TERMIOS_BITS(termios, termio, c_oflag); \
|
||||
SET_LOW_TERMIOS_BITS(termios, termio, c_cflag); \
|
||||
SET_LOW_TERMIOS_BITS(termios, termio, c_lflag); \
|
||||
copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \
|
||||
})
|
||||
|
||||
/*
|
||||
* Translate a "termios" structure into a "termio". Ugh.
|
||||
*/
|
||||
#define kernel_termios_to_user_termio(termio, termios) \
|
||||
({ \
|
||||
put_user((termios)->c_iflag, &(termio)->c_iflag); \
|
||||
put_user((termios)->c_oflag, &(termio)->c_oflag); \
|
||||
put_user((termios)->c_cflag, &(termio)->c_cflag); \
|
||||
put_user((termios)->c_lflag, &(termio)->c_lflag); \
|
||||
put_user((termios)->c_line, &(termio)->c_line); \
|
||||
copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \
|
||||
})
|
||||
|
||||
#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2))
|
||||
#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2))
|
||||
#define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios))
|
||||
#define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios))
|
||||
|
||||
#endif /* _ASM_IA64_TERMIOS_H */
|
||||
@@ -1,51 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Modified 1999
|
||||
* David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co
|
||||
*
|
||||
* 99/01/28 Added N_IRDA and N_SMSBLOCK
|
||||
*/
|
||||
#ifndef _UAPI_ASM_IA64_TERMIOS_H
|
||||
#define _UAPI_ASM_IA64_TERMIOS_H
|
||||
|
||||
|
||||
#include <asm/termbits.h>
|
||||
#include <asm/ioctls.h>
|
||||
|
||||
struct winsize {
|
||||
unsigned short ws_row;
|
||||
unsigned short ws_col;
|
||||
unsigned short ws_xpixel;
|
||||
unsigned short ws_ypixel;
|
||||
};
|
||||
|
||||
#define NCC 8
|
||||
struct termio {
|
||||
unsigned short c_iflag; /* input mode flags */
|
||||
unsigned short c_oflag; /* output mode flags */
|
||||
unsigned short c_cflag; /* control mode flags */
|
||||
unsigned short c_lflag; /* local mode flags */
|
||||
unsigned char c_line; /* line discipline */
|
||||
unsigned char c_cc[NCC]; /* control characters */
|
||||
};
|
||||
|
||||
/* modem lines */
|
||||
#define TIOCM_LE 0x001
|
||||
#define TIOCM_DTR 0x002
|
||||
#define TIOCM_RTS 0x004
|
||||
#define TIOCM_ST 0x008
|
||||
#define TIOCM_SR 0x010
|
||||
#define TIOCM_CTS 0x020
|
||||
#define TIOCM_CAR 0x040
|
||||
#define TIOCM_RNG 0x080
|
||||
#define TIOCM_DSR 0x100
|
||||
#define TIOCM_CD TIOCM_CAR
|
||||
#define TIOCM_RI TIOCM_RNG
|
||||
#define TIOCM_OUT1 0x2000
|
||||
#define TIOCM_OUT2 0x4000
|
||||
#define TIOCM_LOOP 0x8000
|
||||
|
||||
/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
|
||||
|
||||
|
||||
#endif /* _UAPI_ASM_IA64_TERMIOS_H */
|
||||
@@ -21,7 +21,6 @@ generic-y += shmbuf.h
|
||||
generic-y += statfs.h
|
||||
generic-y += socket.h
|
||||
generic-y += sockios.h
|
||||
generic-y += termios.h
|
||||
generic-y += termbits.h
|
||||
generic-y += poll.h
|
||||
generic-y += param.h
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
|
||||
#include <asm/sn/addrs.h>
|
||||
|
||||
#define GDA_MAGIC 0x58464552
|
||||
|
||||
/*
|
||||
* GDA Version History
|
||||
*
|
||||
|
||||
@@ -1,105 +0,0 @@
|
||||
/*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
* Copyright (C) 1995, 1996, 2000, 2001 by Ralf Baechle
|
||||
* Copyright (C) 2000, 2001 Silicon Graphics, Inc.
|
||||
*/
|
||||
#ifndef _ASM_TERMIOS_H
|
||||
#define _ASM_TERMIOS_H
|
||||
|
||||
#include <linux/uaccess.h>
|
||||
#include <uapi/asm/termios.h>
|
||||
|
||||
/*
|
||||
* intr=^C quit=^\ erase=del kill=^U
|
||||
* vmin=\1 vtime=\0 eol2=\0 swtc=\0
|
||||
* start=^Q stop=^S susp=^Z vdsusp=
|
||||
* reprint=^R discard=^U werase=^W lnext=^V
|
||||
* eof=^D eol=\0
|
||||
*/
|
||||
#define INIT_C_CC "\003\034\177\025\1\0\0\0\021\023\032\0\022\017\027\026\004\0"
|
||||
|
||||
#include <linux/string.h>
|
||||
|
||||
/*
|
||||
* Translate a "termio" structure into a "termios". Ugh.
|
||||
*/
|
||||
static inline int user_termio_to_kernel_termios(struct ktermios *termios,
|
||||
struct termio __user *termio)
|
||||
{
|
||||
unsigned short iflag, oflag, cflag, lflag;
|
||||
unsigned int err;
|
||||
|
||||
if (!access_ok(termio, sizeof(struct termio)))
|
||||
return -EFAULT;
|
||||
|
||||
err = __get_user(iflag, &termio->c_iflag);
|
||||
termios->c_iflag = (termios->c_iflag & 0xffff0000) | iflag;
|
||||
err |=__get_user(oflag, &termio->c_oflag);
|
||||
termios->c_oflag = (termios->c_oflag & 0xffff0000) | oflag;
|
||||
err |=__get_user(cflag, &termio->c_cflag);
|
||||
termios->c_cflag = (termios->c_cflag & 0xffff0000) | cflag;
|
||||
err |=__get_user(lflag, &termio->c_lflag);
|
||||
termios->c_lflag = (termios->c_lflag & 0xffff0000) | lflag;
|
||||
err |=__get_user(termios->c_line, &termio->c_line);
|
||||
if (err)
|
||||
return -EFAULT;
|
||||
|
||||
if (__copy_from_user(termios->c_cc, termio->c_cc, NCC))
|
||||
return -EFAULT;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Translate a "termios" structure into a "termio". Ugh.
|
||||
*/
|
||||
static inline int kernel_termios_to_user_termio(struct termio __user *termio,
|
||||
struct ktermios *termios)
|
||||
{
|
||||
int err;
|
||||
|
||||
if (!access_ok(termio, sizeof(struct termio)))
|
||||
return -EFAULT;
|
||||
|
||||
err = __put_user(termios->c_iflag, &termio->c_iflag);
|
||||
err |= __put_user(termios->c_oflag, &termio->c_oflag);
|
||||
err |= __put_user(termios->c_cflag, &termio->c_cflag);
|
||||
err |= __put_user(termios->c_lflag, &termio->c_lflag);
|
||||
err |= __put_user(termios->c_line, &termio->c_line);
|
||||
if (err)
|
||||
return -EFAULT;
|
||||
|
||||
if (__copy_to_user(termio->c_cc, termios->c_cc, NCC))
|
||||
return -EFAULT;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int user_termios_to_kernel_termios(struct ktermios __user *k,
|
||||
struct termios2 *u)
|
||||
{
|
||||
return copy_from_user(k, u, sizeof(struct termios2)) ? -EFAULT : 0;
|
||||
}
|
||||
|
||||
static inline int kernel_termios_to_user_termios(struct termios2 __user *u,
|
||||
struct ktermios *k)
|
||||
{
|
||||
return copy_to_user(u, k, sizeof(struct termios2)) ? -EFAULT : 0;
|
||||
}
|
||||
|
||||
static inline int user_termios_to_kernel_termios_1(struct ktermios *k,
|
||||
struct termios __user *u)
|
||||
{
|
||||
return copy_from_user(k, u, sizeof(struct termios)) ? -EFAULT : 0;
|
||||
}
|
||||
|
||||
static inline int kernel_termios_to_user_termios_1(struct termios __user *u,
|
||||
struct ktermios *k)
|
||||
{
|
||||
return copy_to_user(u, k, sizeof(struct termios)) ? -EFAULT : 0;
|
||||
}
|
||||
|
||||
#endif /* _ASM_TERMIOS_H */
|
||||
@@ -1,52 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef _PARISC_TERMIOS_H
|
||||
#define _PARISC_TERMIOS_H
|
||||
|
||||
#include <uapi/asm/termios.h>
|
||||
|
||||
|
||||
/* intr=^C quit=^\ erase=del kill=^U
|
||||
eof=^D vtime=\0 vmin=\1 sxtc=\0
|
||||
start=^Q stop=^S susp=^Z eol=\0
|
||||
reprint=^R discard=^U werase=^W lnext=^V
|
||||
eol2=\0
|
||||
*/
|
||||
#define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0"
|
||||
|
||||
/*
|
||||
* Translate a "termio" structure into a "termios". Ugh.
|
||||
*/
|
||||
#define SET_LOW_TERMIOS_BITS(termios, termio, x) { \
|
||||
unsigned short __tmp; \
|
||||
get_user(__tmp,&(termio)->x); \
|
||||
*(unsigned short *) &(termios)->x = __tmp; \
|
||||
}
|
||||
|
||||
#define user_termio_to_kernel_termios(termios, termio) \
|
||||
({ \
|
||||
SET_LOW_TERMIOS_BITS(termios, termio, c_iflag); \
|
||||
SET_LOW_TERMIOS_BITS(termios, termio, c_oflag); \
|
||||
SET_LOW_TERMIOS_BITS(termios, termio, c_cflag); \
|
||||
SET_LOW_TERMIOS_BITS(termios, termio, c_lflag); \
|
||||
copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \
|
||||
})
|
||||
|
||||
/*
|
||||
* Translate a "termios" structure into a "termio". Ugh.
|
||||
*/
|
||||
#define kernel_termios_to_user_termio(termio, termios) \
|
||||
({ \
|
||||
put_user((termios)->c_iflag, &(termio)->c_iflag); \
|
||||
put_user((termios)->c_oflag, &(termio)->c_oflag); \
|
||||
put_user((termios)->c_cflag, &(termio)->c_cflag); \
|
||||
put_user((termios)->c_lflag, &(termio)->c_lflag); \
|
||||
put_user((termios)->c_line, &(termio)->c_line); \
|
||||
copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \
|
||||
})
|
||||
|
||||
#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2))
|
||||
#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2))
|
||||
#define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios))
|
||||
#define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios))
|
||||
|
||||
#endif /* _PARISC_TERMIOS_H */
|
||||
@@ -1,44 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
#ifndef _UAPI_PARISC_TERMIOS_H
|
||||
#define _UAPI_PARISC_TERMIOS_H
|
||||
|
||||
#include <asm/termbits.h>
|
||||
#include <asm/ioctls.h>
|
||||
|
||||
struct winsize {
|
||||
unsigned short ws_row;
|
||||
unsigned short ws_col;
|
||||
unsigned short ws_xpixel;
|
||||
unsigned short ws_ypixel;
|
||||
};
|
||||
|
||||
#define NCC 8
|
||||
struct termio {
|
||||
unsigned short c_iflag; /* input mode flags */
|
||||
unsigned short c_oflag; /* output mode flags */
|
||||
unsigned short c_cflag; /* control mode flags */
|
||||
unsigned short c_lflag; /* local mode flags */
|
||||
unsigned char c_line; /* line discipline */
|
||||
unsigned char c_cc[NCC]; /* control characters */
|
||||
};
|
||||
|
||||
/* modem lines */
|
||||
#define TIOCM_LE 0x001
|
||||
#define TIOCM_DTR 0x002
|
||||
#define TIOCM_RTS 0x004
|
||||
#define TIOCM_ST 0x008
|
||||
#define TIOCM_SR 0x010
|
||||
#define TIOCM_CTS 0x020
|
||||
#define TIOCM_CAR 0x040
|
||||
#define TIOCM_RNG 0x080
|
||||
#define TIOCM_DSR 0x100
|
||||
#define TIOCM_CD TIOCM_CAR
|
||||
#define TIOCM_RI TIOCM_RNG
|
||||
#define TIOCM_OUT1 0x2000
|
||||
#define TIOCM_OUT2 0x4000
|
||||
#define TIOCM_LOOP 0x8000
|
||||
|
||||
/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
|
||||
|
||||
|
||||
#endif /* _UAPI_PARISC_TERMIOS_H */
|
||||
@@ -1,18 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
/*
|
||||
* Liberally adapted from alpha/termios.h. In particular, the c_cc[]
|
||||
* fields have been reordered so that termio & termios share the
|
||||
* common subset in the same order (for brain dead programs that don't
|
||||
* know or care about the differences).
|
||||
*/
|
||||
#ifndef _ASM_POWERPC_TERMIOS_H
|
||||
#define _ASM_POWERPC_TERMIOS_H
|
||||
|
||||
#include <uapi/asm/termios.h>
|
||||
|
||||
/* ^C ^\ del ^U ^D 1 0 0 0 0 ^W ^R ^Z ^Q ^S ^V ^U */
|
||||
#define INIT_C_CC "\003\034\177\025\004\001\000\000\000\000\027\022\032\021\023\026\025"
|
||||
|
||||
#include <asm-generic/termios-base.h>
|
||||
|
||||
#endif /* _ASM_POWERPC_TERMIOS_H */
|
||||
@@ -1,26 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* S390 version
|
||||
*
|
||||
* Derived from "include/asm-i386/termios.h"
|
||||
*/
|
||||
#ifndef _S390_TERMIOS_H
|
||||
#define _S390_TERMIOS_H
|
||||
|
||||
#include <uapi/asm/termios.h>
|
||||
|
||||
|
||||
/* intr=^C quit=^\ erase=del kill=^U
|
||||
eof=^D vtime=\0 vmin=\1 sxtc=\0
|
||||
start=^Q stop=^S susp=^Z eol=\0
|
||||
reprint=^R discard=^U werase=^W lnext=^V
|
||||
eol2=\0
|
||||
*/
|
||||
#define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0"
|
||||
|
||||
#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2))
|
||||
#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2))
|
||||
|
||||
#include <asm-generic/termios-base.h>
|
||||
|
||||
#endif /* _S390_TERMIOS_H */
|
||||
@@ -1,50 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* S390 version
|
||||
*
|
||||
* Derived from "include/asm-i386/termios.h"
|
||||
*/
|
||||
|
||||
#ifndef _UAPI_S390_TERMIOS_H
|
||||
#define _UAPI_S390_TERMIOS_H
|
||||
|
||||
#include <asm/termbits.h>
|
||||
#include <asm/ioctls.h>
|
||||
|
||||
struct winsize {
|
||||
unsigned short ws_row;
|
||||
unsigned short ws_col;
|
||||
unsigned short ws_xpixel;
|
||||
unsigned short ws_ypixel;
|
||||
};
|
||||
|
||||
#define NCC 8
|
||||
struct termio {
|
||||
unsigned short c_iflag; /* input mode flags */
|
||||
unsigned short c_oflag; /* output mode flags */
|
||||
unsigned short c_cflag; /* control mode flags */
|
||||
unsigned short c_lflag; /* local mode flags */
|
||||
unsigned char c_line; /* line discipline */
|
||||
unsigned char c_cc[NCC]; /* control characters */
|
||||
};
|
||||
|
||||
/* modem lines */
|
||||
#define TIOCM_LE 0x001
|
||||
#define TIOCM_DTR 0x002
|
||||
#define TIOCM_RTS 0x004
|
||||
#define TIOCM_ST 0x008
|
||||
#define TIOCM_SR 0x010
|
||||
#define TIOCM_CTS 0x020
|
||||
#define TIOCM_CAR 0x040
|
||||
#define TIOCM_RNG 0x080
|
||||
#define TIOCM_DSR 0x100
|
||||
#define TIOCM_CD TIOCM_CAR
|
||||
#define TIOCM_RI TIOCM_RNG
|
||||
#define TIOCM_OUT1 0x2000
|
||||
#define TIOCM_OUT2 0x4000
|
||||
#define TIOCM_LOOP 0x8000
|
||||
|
||||
/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
|
||||
|
||||
|
||||
#endif /* _UAPI_S390_TERMIOS_H */
|
||||
@@ -1,147 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef _SPARC_TERMIOS_H
|
||||
#define _SPARC_TERMIOS_H
|
||||
|
||||
#include <uapi/asm/termios.h>
|
||||
|
||||
|
||||
/*
|
||||
* c_cc characters in the termio structure. Oh, how I love being
|
||||
* backwardly compatible. Notice that character 4 and 5 are
|
||||
* interpreted differently depending on whether ICANON is set in
|
||||
* c_lflag. If it's set, they are used as _VEOF and _VEOL, otherwise
|
||||
* as _VMIN and V_TIME. This is for compatibility with OSF/1 (which
|
||||
* is compatible with sysV)...
|
||||
*/
|
||||
#define _VMIN 4
|
||||
#define _VTIME 5
|
||||
|
||||
/* intr=^C quit=^\ erase=del kill=^U
|
||||
eof=^D eol=\0 eol2=\0 sxtc=\0
|
||||
start=^Q stop=^S susp=^Z dsusp=^Y
|
||||
reprint=^R discard=^U werase=^W lnext=^V
|
||||
vmin=\1 vtime=\0
|
||||
*/
|
||||
#define INIT_C_CC "\003\034\177\025\004\000\000\000\021\023\032\031\022\025\027\026\001"
|
||||
|
||||
/*
|
||||
* Translate a "termio" structure into a "termios". Ugh.
|
||||
*/
|
||||
#define user_termio_to_kernel_termios(termios, termio) \
|
||||
({ \
|
||||
unsigned short tmp; \
|
||||
int err; \
|
||||
err = get_user(tmp, &(termio)->c_iflag); \
|
||||
(termios)->c_iflag = (0xffff0000 & ((termios)->c_iflag)) | tmp; \
|
||||
err |= get_user(tmp, &(termio)->c_oflag); \
|
||||
(termios)->c_oflag = (0xffff0000 & ((termios)->c_oflag)) | tmp; \
|
||||
err |= get_user(tmp, &(termio)->c_cflag); \
|
||||
(termios)->c_cflag = (0xffff0000 & ((termios)->c_cflag)) | tmp; \
|
||||
err |= get_user(tmp, &(termio)->c_lflag); \
|
||||
(termios)->c_lflag = (0xffff0000 & ((termios)->c_lflag)) | tmp; \
|
||||
err |= copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \
|
||||
err; \
|
||||
})
|
||||
|
||||
/*
|
||||
* Translate a "termios" structure into a "termio". Ugh.
|
||||
*
|
||||
* Note the "fun" _VMIN overloading.
|
||||
*/
|
||||
#define kernel_termios_to_user_termio(termio, termios) \
|
||||
({ \
|
||||
int err; \
|
||||
err = put_user((termios)->c_iflag, &(termio)->c_iflag); \
|
||||
err |= put_user((termios)->c_oflag, &(termio)->c_oflag); \
|
||||
err |= put_user((termios)->c_cflag, &(termio)->c_cflag); \
|
||||
err |= put_user((termios)->c_lflag, &(termio)->c_lflag); \
|
||||
err |= put_user((termios)->c_line, &(termio)->c_line); \
|
||||
err |= copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \
|
||||
if (!((termios)->c_lflag & ICANON)) { \
|
||||
err |= put_user((termios)->c_cc[VMIN], &(termio)->c_cc[_VMIN]); \
|
||||
err |= put_user((termios)->c_cc[VTIME], &(termio)->c_cc[_VTIME]); \
|
||||
} \
|
||||
err; \
|
||||
})
|
||||
|
||||
#define user_termios_to_kernel_termios(k, u) \
|
||||
({ \
|
||||
int err; \
|
||||
err = get_user((k)->c_iflag, &(u)->c_iflag); \
|
||||
err |= get_user((k)->c_oflag, &(u)->c_oflag); \
|
||||
err |= get_user((k)->c_cflag, &(u)->c_cflag); \
|
||||
err |= get_user((k)->c_lflag, &(u)->c_lflag); \
|
||||
err |= get_user((k)->c_line, &(u)->c_line); \
|
||||
err |= copy_from_user((k)->c_cc, (u)->c_cc, NCCS); \
|
||||
if ((k)->c_lflag & ICANON) { \
|
||||
err |= get_user((k)->c_cc[VEOF], &(u)->c_cc[VEOF]); \
|
||||
err |= get_user((k)->c_cc[VEOL], &(u)->c_cc[VEOL]); \
|
||||
} else { \
|
||||
err |= get_user((k)->c_cc[VMIN], &(u)->c_cc[_VMIN]); \
|
||||
err |= get_user((k)->c_cc[VTIME], &(u)->c_cc[_VTIME]); \
|
||||
} \
|
||||
err |= get_user((k)->c_ispeed, &(u)->c_ispeed); \
|
||||
err |= get_user((k)->c_ospeed, &(u)->c_ospeed); \
|
||||
err; \
|
||||
})
|
||||
|
||||
#define kernel_termios_to_user_termios(u, k) \
|
||||
({ \
|
||||
int err; \
|
||||
err = put_user((k)->c_iflag, &(u)->c_iflag); \
|
||||
err |= put_user((k)->c_oflag, &(u)->c_oflag); \
|
||||
err |= put_user((k)->c_cflag, &(u)->c_cflag); \
|
||||
err |= put_user((k)->c_lflag, &(u)->c_lflag); \
|
||||
err |= put_user((k)->c_line, &(u)->c_line); \
|
||||
err |= copy_to_user((u)->c_cc, (k)->c_cc, NCCS); \
|
||||
if (!((k)->c_lflag & ICANON)) { \
|
||||
err |= put_user((k)->c_cc[VMIN], &(u)->c_cc[_VMIN]); \
|
||||
err |= put_user((k)->c_cc[VTIME], &(u)->c_cc[_VTIME]); \
|
||||
} else { \
|
||||
err |= put_user((k)->c_cc[VEOF], &(u)->c_cc[VEOF]); \
|
||||
err |= put_user((k)->c_cc[VEOL], &(u)->c_cc[VEOL]); \
|
||||
} \
|
||||
err |= put_user((k)->c_ispeed, &(u)->c_ispeed); \
|
||||
err |= put_user((k)->c_ospeed, &(u)->c_ospeed); \
|
||||
err; \
|
||||
})
|
||||
|
||||
#define user_termios_to_kernel_termios_1(k, u) \
|
||||
({ \
|
||||
int err; \
|
||||
err = get_user((k)->c_iflag, &(u)->c_iflag); \
|
||||
err |= get_user((k)->c_oflag, &(u)->c_oflag); \
|
||||
err |= get_user((k)->c_cflag, &(u)->c_cflag); \
|
||||
err |= get_user((k)->c_lflag, &(u)->c_lflag); \
|
||||
err |= get_user((k)->c_line, &(u)->c_line); \
|
||||
err |= copy_from_user((k)->c_cc, (u)->c_cc, NCCS); \
|
||||
if ((k)->c_lflag & ICANON) { \
|
||||
err |= get_user((k)->c_cc[VEOF], &(u)->c_cc[VEOF]); \
|
||||
err |= get_user((k)->c_cc[VEOL], &(u)->c_cc[VEOL]); \
|
||||
} else { \
|
||||
err |= get_user((k)->c_cc[VMIN], &(u)->c_cc[_VMIN]); \
|
||||
err |= get_user((k)->c_cc[VTIME], &(u)->c_cc[_VTIME]); \
|
||||
} \
|
||||
err; \
|
||||
})
|
||||
|
||||
#define kernel_termios_to_user_termios_1(u, k) \
|
||||
({ \
|
||||
int err; \
|
||||
err = put_user((k)->c_iflag, &(u)->c_iflag); \
|
||||
err |= put_user((k)->c_oflag, &(u)->c_oflag); \
|
||||
err |= put_user((k)->c_cflag, &(u)->c_cflag); \
|
||||
err |= put_user((k)->c_lflag, &(u)->c_lflag); \
|
||||
err |= put_user((k)->c_line, &(u)->c_line); \
|
||||
err |= copy_to_user((u)->c_cc, (k)->c_cc, NCCS); \
|
||||
if (!((k)->c_lflag & ICANON)) { \
|
||||
err |= put_user((k)->c_cc[VMIN], &(u)->c_cc[_VMIN]); \
|
||||
err |= put_user((k)->c_cc[VTIME], &(u)->c_cc[_VTIME]); \
|
||||
} else { \
|
||||
err |= put_user((k)->c_cc[VEOF], &(u)->c_cc[VEOF]); \
|
||||
err |= put_user((k)->c_cc[VEOL], &(u)->c_cc[VEOL]); \
|
||||
} \
|
||||
err; \
|
||||
})
|
||||
|
||||
#endif /* _SPARC_TERMIOS_H */
|
||||
@@ -87,12 +87,13 @@ obj-$(CONFIG_SPARC64_SMP) += hvtramp.o
|
||||
obj-y += auxio_$(BITS).o
|
||||
obj-$(CONFIG_SUN_PM) += apc.o pmc.o
|
||||
|
||||
obj-y += termios.o
|
||||
|
||||
obj-$(CONFIG_MODULES) += module.o
|
||||
obj-$(CONFIG_MODULES) += sparc_ksyms.o
|
||||
obj-$(CONFIG_SPARC_LED) += led.o
|
||||
obj-$(CONFIG_KGDB) += kgdb_$(BITS).o
|
||||
|
||||
|
||||
obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o
|
||||
obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o
|
||||
|
||||
@@ -104,6 +105,7 @@ obj-$(CONFIG_SPARC64_PCI) += pci_psycho.o pci_sabre.o pci_schizo.o
|
||||
obj-$(CONFIG_SPARC64_PCI) += pci_sun4v.o pci_sun4v_asm.o pci_fire.o
|
||||
obj-$(CONFIG_SPARC64_PCI_MSI) += pci_msi.o
|
||||
|
||||
|
||||
obj-$(CONFIG_COMPAT) += sys32.o sys_sparc32.o signal32.o
|
||||
|
||||
obj-$(CONFIG_US3_MC) += chmc.o
|
||||
|
||||
115
arch/sparc/kernel/termios.c
Normal file
115
arch/sparc/kernel/termios.c
Normal file
@@ -0,0 +1,115 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
#include <linux/termios_internal.h>
|
||||
|
||||
/*
|
||||
* c_cc characters in the termio structure. Oh, how I love being
|
||||
* backwardly compatible. Notice that character 4 and 5 are
|
||||
* interpreted differently depending on whether ICANON is set in
|
||||
* c_lflag. If it's set, they are used as _VEOF and _VEOL, otherwise
|
||||
* as _VMIN and V_TIME. This is for compatibility with OSF/1 (which
|
||||
* is compatible with sysV)...
|
||||
*/
|
||||
#define _VMIN 4
|
||||
#define _VTIME 5
|
||||
|
||||
int kernel_termios_to_user_termio(struct termio __user *termio,
|
||||
struct ktermios *termios)
|
||||
{
|
||||
struct termio v;
|
||||
memset(&v, 0, sizeof(struct termio));
|
||||
v.c_iflag = termios->c_iflag;
|
||||
v.c_oflag = termios->c_oflag;
|
||||
v.c_cflag = termios->c_cflag;
|
||||
v.c_lflag = termios->c_lflag;
|
||||
v.c_line = termios->c_line;
|
||||
memcpy(v.c_cc, termios->c_cc, NCC);
|
||||
if (!(v.c_lflag & ICANON)) {
|
||||
v.c_cc[_VMIN] = termios->c_cc[VMIN];
|
||||
v.c_cc[_VTIME] = termios->c_cc[VTIME];
|
||||
}
|
||||
return copy_to_user(termio, &v, sizeof(struct termio));
|
||||
}
|
||||
|
||||
int user_termios_to_kernel_termios(struct ktermios *k,
|
||||
struct termios2 __user *u)
|
||||
{
|
||||
int err;
|
||||
err = get_user(k->c_iflag, &u->c_iflag);
|
||||
err |= get_user(k->c_oflag, &u->c_oflag);
|
||||
err |= get_user(k->c_cflag, &u->c_cflag);
|
||||
err |= get_user(k->c_lflag, &u->c_lflag);
|
||||
err |= get_user(k->c_line, &u->c_line);
|
||||
err |= copy_from_user(k->c_cc, u->c_cc, NCCS);
|
||||
if (k->c_lflag & ICANON) {
|
||||
err |= get_user(k->c_cc[VEOF], &u->c_cc[VEOF]);
|
||||
err |= get_user(k->c_cc[VEOL], &u->c_cc[VEOL]);
|
||||
} else {
|
||||
err |= get_user(k->c_cc[VMIN], &u->c_cc[_VMIN]);
|
||||
err |= get_user(k->c_cc[VTIME], &u->c_cc[_VTIME]);
|
||||
}
|
||||
err |= get_user(k->c_ispeed, &u->c_ispeed);
|
||||
err |= get_user(k->c_ospeed, &u->c_ospeed);
|
||||
return err;
|
||||
}
|
||||
|
||||
int kernel_termios_to_user_termios(struct termios2 __user *u,
|
||||
struct ktermios *k)
|
||||
{
|
||||
int err;
|
||||
err = put_user(k->c_iflag, &u->c_iflag);
|
||||
err |= put_user(k->c_oflag, &u->c_oflag);
|
||||
err |= put_user(k->c_cflag, &u->c_cflag);
|
||||
err |= put_user(k->c_lflag, &u->c_lflag);
|
||||
err |= put_user(k->c_line, &u->c_line);
|
||||
err |= copy_to_user(u->c_cc, k->c_cc, NCCS);
|
||||
if (!(k->c_lflag & ICANON)) {
|
||||
err |= put_user(k->c_cc[VMIN], &u->c_cc[_VMIN]);
|
||||
err |= put_user(k->c_cc[VTIME], &u->c_cc[_VTIME]);
|
||||
} else {
|
||||
err |= put_user(k->c_cc[VEOF], &u->c_cc[VEOF]);
|
||||
err |= put_user(k->c_cc[VEOL], &u->c_cc[VEOL]);
|
||||
}
|
||||
err |= put_user(k->c_ispeed, &u->c_ispeed);
|
||||
err |= put_user(k->c_ospeed, &u->c_ospeed);
|
||||
return err;
|
||||
}
|
||||
|
||||
int user_termios_to_kernel_termios_1(struct ktermios *k,
|
||||
struct termios __user *u)
|
||||
{
|
||||
int err;
|
||||
err = get_user(k->c_iflag, &u->c_iflag);
|
||||
err |= get_user(k->c_oflag, &u->c_oflag);
|
||||
err |= get_user(k->c_cflag, &u->c_cflag);
|
||||
err |= get_user(k->c_lflag, &u->c_lflag);
|
||||
err |= get_user(k->c_line, &u->c_line);
|
||||
err |= copy_from_user(k->c_cc, u->c_cc, NCCS);
|
||||
if (k->c_lflag & ICANON) {
|
||||
err |= get_user(k->c_cc[VEOF], &u->c_cc[VEOF]);
|
||||
err |= get_user(k->c_cc[VEOL], &u->c_cc[VEOL]);
|
||||
} else {
|
||||
err |= get_user(k->c_cc[VMIN], &u->c_cc[_VMIN]);
|
||||
err |= get_user(k->c_cc[VTIME], &u->c_cc[_VTIME]);
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
int kernel_termios_to_user_termios_1(struct termios __user *u,
|
||||
struct ktermios *k)
|
||||
{
|
||||
int err;
|
||||
err = put_user(k->c_iflag, &u->c_iflag);
|
||||
err |= put_user(k->c_oflag, &u->c_oflag);
|
||||
err |= put_user(k->c_cflag, &u->c_cflag);
|
||||
err |= put_user(k->c_lflag, &u->c_lflag);
|
||||
err |= put_user(k->c_line, &u->c_line);
|
||||
err |= copy_to_user(u->c_cc, k->c_cc, NCCS);
|
||||
if (!(k->c_lflag & ICANON)) {
|
||||
err |= put_user(k->c_cc[VMIN], &u->c_cc[_VMIN]);
|
||||
err |= put_user(k->c_cc[VTIME], &u->c_cc[_VTIME]);
|
||||
} else {
|
||||
err |= put_user(k->c_cc[VEOF], &u->c_cc[VEOF]);
|
||||
err |= put_user(k->c_cc[VEOL], &u->c_cc[VEOL]);
|
||||
}
|
||||
return err;
|
||||
}
|
||||
@@ -154,8 +154,6 @@ extern void driver_remove_groups(struct device_driver *drv,
|
||||
const struct attribute_group **groups);
|
||||
void device_driver_detach(struct device *dev);
|
||||
|
||||
extern char *make_class_name(const char *name, struct kobject *kobj);
|
||||
|
||||
extern int devres_release_all(struct device *dev);
|
||||
extern void device_block_probing(void);
|
||||
extern void device_unblock_probing(void);
|
||||
|
||||
@@ -260,7 +260,7 @@ EXPORT_SYMBOL_GPL(__class_create);
|
||||
*/
|
||||
void class_destroy(struct class *cls)
|
||||
{
|
||||
if ((cls == NULL) || (IS_ERR(cls)))
|
||||
if (IS_ERR_OR_NULL(cls))
|
||||
return;
|
||||
|
||||
class_unregister(cls);
|
||||
|
||||
@@ -2509,7 +2509,7 @@ static ssize_t uevent_store(struct device *dev, struct device_attribute *attr,
|
||||
rc = kobject_synth_uevent(&dev->kobj, buf, count);
|
||||
|
||||
if (rc) {
|
||||
dev_err(dev, "uevent: failed to send synthetic uevent\n");
|
||||
dev_err(dev, "uevent: failed to send synthetic uevent: %d\n", rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -4170,7 +4170,7 @@ device_create_groups_vargs(struct class *class, struct device *parent,
|
||||
struct device *dev = NULL;
|
||||
int retval = -ENODEV;
|
||||
|
||||
if (class == NULL || IS_ERR(class))
|
||||
if (IS_ERR_OR_NULL(class))
|
||||
goto error;
|
||||
|
||||
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
|
||||
|
||||
@@ -836,7 +836,7 @@ static int __init save_async_options(char *buf)
|
||||
if (strlen(buf) >= ASYNC_DRV_NAMES_MAX_LEN)
|
||||
pr_warn("Too long list of driver names for 'driver_async_probe'!\n");
|
||||
|
||||
strlcpy(async_probe_drv_names, buf, ASYNC_DRV_NAMES_MAX_LEN);
|
||||
strscpy(async_probe_drv_names, buf, ASYNC_DRV_NAMES_MAX_LEN);
|
||||
async_probe_default = parse_option_str(async_probe_drv_names, "*");
|
||||
|
||||
return 1;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user