mirror of
https://github.com/Dasharo/linux.git
synced 2026-03-06 15:25:10 -08:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next
Pull networking updates from David Miller:
1) Allow setting bluetooth L2CAP modes via socket option, from Luiz
Augusto von Dentz.
2) Add GSO partial support to igc, from Sasha Neftin.
3) Several cleanups and improvements to r8169 from Heiner Kallweit.
4) Add IF_OPER_TESTING link state and use it when ethtool triggers a
device self-test. From Andrew Lunn.
5) Start moving away from custom driver versions, use the globally
defined kernel version instead, from Leon Romanovsky.
6) Support GRO vis gro_cells in DSA layer, from Alexander Lobakin.
7) Allow hard IRQ deferral during NAPI, from Eric Dumazet.
8) Add sriov and vf support to hinic, from Luo bin.
9) Support Media Redundancy Protocol (MRP) in the bridging code, from
Horatiu Vultur.
10) Support netmap in the nft_nat code, from Pablo Neira Ayuso.
11) Allow UDPv6 encapsulation of ESP in the ipsec code, from Sabrina
Dubroca. Also add ipv6 support for espintcp.
12) Lots of ReST conversions of the networking documentation, from Mauro
Carvalho Chehab.
13) Support configuration of ethtool rxnfc flows in bcmgenet driver,
from Doug Berger.
14) Allow to dump cgroup id and filter by it in inet_diag code, from
Dmitry Yakunin.
15) Add infrastructure to export netlink attribute policies to
userspace, from Johannes Berg.
16) Several optimizations to sch_fq scheduler, from Eric Dumazet.
17) Fallback to the default qdisc if qdisc init fails because otherwise
a packet scheduler init failure will make a device inoperative. From
Jesper Dangaard Brouer.
18) Several RISCV bpf jit optimizations, from Luke Nelson.
19) Correct the return type of the ->ndo_start_xmit() method in several
drivers, it's netdev_tx_t but many drivers were using
'int'. From Yunjian Wang.
20) Add an ethtool interface for PHY master/slave config, from Oleksij
Rempel.
21) Add BPF iterators, from Yonghang Song.
22) Add cable test infrastructure, including ethool interfaces, from
Andrew Lunn. Marvell PHY driver is the first to support this
facility.
23) Remove zero-length arrays all over, from Gustavo A. R. Silva.
24) Calculate and maintain an explicit frame size in XDP, from Jesper
Dangaard Brouer.
25) Add CAP_BPF, from Alexei Starovoitov.
26) Support terse dumps in the packet scheduler, from Vlad Buslov.
27) Support XDP_TX bulking in dpaa2 driver, from Ioana Ciornei.
28) Add devm_register_netdev(), from Bartosz Golaszewski.
29) Minimize qdisc resets, from Cong Wang.
30) Get rid of kernel_getsockopt and kernel_setsockopt in order to
eliminate set_fs/get_fs calls. From Christoph Hellwig.
* git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (2517 commits)
selftests: net: ip_defrag: ignore EPERM
net_failover: fixed rollback in net_failover_open()
Revert "tipc: Fix potential tipc_aead refcnt leak in tipc_crypto_rcv"
Revert "tipc: Fix potential tipc_node refcnt leak in tipc_rcv"
vmxnet3: allow rx flow hash ops only when rss is enabled
hinic: add set_channels ethtool_ops support
selftests/bpf: Add a default $(CXX) value
tools/bpf: Don't use $(COMPILE.c)
bpf, selftests: Use bpf_probe_read_kernel
s390/bpf: Use bcr 0,%0 as tail call nop filler
s390/bpf: Maintain 8-byte stack alignment
selftests/bpf: Fix verifier test
selftests/bpf: Fix sample_cnt shared between two threads
bpf, selftests: Adapt cls_redirect to call csum_level helper
bpf: Add csum_level helper for fixing up csum levels
bpf: Fix up bpf_skb_adjust_room helper's skb csum setting
sfc: add missing annotation for efx_ef10_try_update_nic_stats_vf()
crypto/chtls: IPv6 support for inline TLS
Crypto/chcr: Fixes a coccinile check error
Crypto/chcr: Fixes compilations warnings
...
This commit is contained in:
@@ -124,6 +124,19 @@ Description:
|
||||
authentication is performed (e.g: 802.1x). 'link_mode' attribute
|
||||
will also reflect the dormant state.
|
||||
|
||||
What: /sys/class/net/<iface>/testing
|
||||
Date: April 2002
|
||||
KernelVersion: 5.8
|
||||
Contact: netdev@vger.kernel.org
|
||||
Description:
|
||||
Indicates whether the interface is under test. Possible
|
||||
values are:
|
||||
0: interface is not being tested
|
||||
1: interface is being tested
|
||||
|
||||
When an interface is under test, it cannot be expected
|
||||
to pass packets as normal.
|
||||
|
||||
What: /sys/clas/net/<iface>/duplex
|
||||
Date: October 2009
|
||||
KernelVersion: 2.6.33
|
||||
|
||||
@@ -356,7 +356,7 @@
|
||||
shot down by NMI
|
||||
|
||||
autoconf= [IPV6]
|
||||
See Documentation/networking/ipv6.txt.
|
||||
See Documentation/networking/ipv6.rst.
|
||||
|
||||
show_lapic= [APIC,X86] Advanced Programmable Interrupt Controller
|
||||
Limit apic dumping. The parameter defines the maximal
|
||||
@@ -638,7 +638,7 @@
|
||||
|
||||
See Documentation/admin-guide/serial-console.rst for more
|
||||
information. See
|
||||
Documentation/networking/netconsole.txt for an
|
||||
Documentation/networking/netconsole.rst for an
|
||||
alternative.
|
||||
|
||||
uart[8250],io,<addr>[,options]
|
||||
@@ -831,7 +831,7 @@
|
||||
|
||||
decnet.addr= [HW,NET]
|
||||
Format: <area>[,<node>]
|
||||
See also Documentation/networking/decnet.txt.
|
||||
See also Documentation/networking/decnet.rst.
|
||||
|
||||
default_hugepagesz=
|
||||
[same as hugepagesz=] The size of the default
|
||||
@@ -872,7 +872,7 @@
|
||||
miss to occur.
|
||||
|
||||
disable= [IPV6]
|
||||
See Documentation/networking/ipv6.txt.
|
||||
See Documentation/networking/ipv6.rst.
|
||||
|
||||
hardened_usercopy=
|
||||
[KNL] Under CONFIG_HARDENED_USERCOPY, whether
|
||||
@@ -912,7 +912,7 @@
|
||||
to workaround buggy firmware.
|
||||
|
||||
disable_ipv6= [IPV6]
|
||||
See Documentation/networking/ipv6.txt.
|
||||
See Documentation/networking/ipv6.rst.
|
||||
|
||||
disable_mtrr_cleanup [X86]
|
||||
The kernel tries to adjust MTRR layout from continuous
|
||||
@@ -4956,7 +4956,7 @@
|
||||
Set the number of tcp_metrics_hash slots.
|
||||
Default value is 8192 or 16384 depending on total
|
||||
ram pages. This is used to specify the TCP metrics
|
||||
cache size. See Documentation/networking/ip-sysctl.txt
|
||||
cache size. See Documentation/networking/ip-sysctl.rst
|
||||
"tcp_no_metrics_save" section for more details.
|
||||
|
||||
tdfx= [HW,DRM]
|
||||
|
||||
@@ -54,7 +54,7 @@ You will need to create a new device to use ``/dev/console``. The official
|
||||
``/dev/console`` is now character device 5,1.
|
||||
|
||||
(You can also use a network device as a console. See
|
||||
``Documentation/networking/netconsole.txt`` for information on that.)
|
||||
``Documentation/networking/netconsole.rst`` for information on that.)
|
||||
|
||||
Here's an example that will use ``/dev/ttyS1`` (COM2) as the console.
|
||||
Replace the sample values as needed.
|
||||
|
||||
@@ -339,7 +339,9 @@ settings from init_net and for IPv6 we reset all settings to default.
|
||||
|
||||
If set to 1, both IPv4 and IPv6 settings are forced to inherit from
|
||||
current ones in init_net. If set to 2, both IPv4 and IPv6 settings are
|
||||
forced to reset to their default values.
|
||||
forced to reset to their default values. If set to 3, both IPv4 and IPv6
|
||||
settings are forced to inherit from current ones in the netns where this
|
||||
new netns has been created.
|
||||
|
||||
Default : 0 (for compatibility reasons)
|
||||
|
||||
@@ -353,8 +355,8 @@ socket's buffer. It will not take effect unless PF_UNIX flag is specified.
|
||||
|
||||
3. /proc/sys/net/ipv4 - IPV4 settings
|
||||
-------------------------------------
|
||||
Please see: Documentation/networking/ip-sysctl.txt and ipvs-sysctl.txt for
|
||||
descriptions of these entries.
|
||||
Please see: Documentation/networking/ip-sysctl.rst and
|
||||
Documentation/admin-guide/sysctl/net.rst for descriptions of these entries.
|
||||
|
||||
|
||||
4. Appletalk
|
||||
|
||||
@@ -437,6 +437,21 @@ needed::
|
||||
See the kernels selftest `Documentation/dev-tools/kselftest.rst`_
|
||||
document for further documentation.
|
||||
|
||||
To maximize the number of tests passing, the .config of the kernel
|
||||
under test should match the config file fragment in
|
||||
tools/testing/selftests/bpf as closely as possible.
|
||||
|
||||
Finally to ensure support for latest BPF Type Format features -
|
||||
discussed in `Documentation/bpf/btf.rst`_ - pahole version 1.16
|
||||
is required for kernels built with CONFIG_DEBUG_INFO_BTF=y.
|
||||
pahole is delivered in the dwarves package or can be built
|
||||
from source at
|
||||
|
||||
https://github.com/acmel/dwarves
|
||||
|
||||
Some distros have pahole version 1.16 packaged already, e.g.
|
||||
Fedora, Gentoo.
|
||||
|
||||
Q: Which BPF kernel selftests version should I run my kernel against?
|
||||
---------------------------------------------------------------------
|
||||
A: If you run a kernel ``xyz``, then always run the BPF kernel selftests
|
||||
|
||||
@@ -7,7 +7,7 @@ Filter) facility, with a focus on the extended BPF version (eBPF).
|
||||
|
||||
This kernel side documentation is still work in progress. The main
|
||||
textual documentation is (for historical reasons) described in
|
||||
`Documentation/networking/filter.txt`_, which describe both classical
|
||||
`Documentation/networking/filter.rst`_, which describe both classical
|
||||
and extended BPF instruction-set.
|
||||
The Cilium project also maintains a `BPF and XDP Reference Guide`_
|
||||
that goes into great technical depth about the BPF Architecture.
|
||||
@@ -59,7 +59,7 @@ Testing and debugging BPF
|
||||
|
||||
|
||||
.. Links:
|
||||
.. _Documentation/networking/filter.txt: ../networking/filter.txt
|
||||
.. _Documentation/networking/filter.rst: ../networking/filter.txt
|
||||
.. _man-pages: https://www.kernel.org/doc/man-pages/
|
||||
.. _bpf(2): http://man7.org/linux/man-pages/man2/bpf.2.html
|
||||
.. _BPF and XDP Reference Guide: http://cilium.readthedocs.io/en/latest/bpf/
|
||||
|
||||
209
Documentation/bpf/ringbuf.rst
Normal file
209
Documentation/bpf/ringbuf.rst
Normal file
@@ -0,0 +1,209 @@
|
||||
===============
|
||||
BPF ring buffer
|
||||
===============
|
||||
|
||||
This document describes BPF ring buffer design, API, and implementation details.
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
Motivation
|
||||
----------
|
||||
|
||||
There are two distinctive motivators for this work, which are not satisfied by
|
||||
existing perf buffer, which prompted creation of a new ring buffer
|
||||
implementation.
|
||||
|
||||
- more efficient memory utilization by sharing ring buffer across CPUs;
|
||||
- preserving ordering of events that happen sequentially in time, even across
|
||||
multiple CPUs (e.g., fork/exec/exit events for a task).
|
||||
|
||||
These two problems are independent, but perf buffer fails to satisfy both.
|
||||
Both are a result of a choice to have per-CPU perf ring buffer. Both can be
|
||||
also solved by having an MPSC implementation of ring buffer. The ordering
|
||||
problem could technically be solved for perf buffer with some in-kernel
|
||||
counting, but given the first one requires an MPSC buffer, the same solution
|
||||
would solve the second problem automatically.
|
||||
|
||||
Semantics and APIs
|
||||
------------------
|
||||
|
||||
Single ring buffer is presented to BPF programs as an instance of BPF map of
|
||||
type ``BPF_MAP_TYPE_RINGBUF``. Two other alternatives considered, but
|
||||
ultimately rejected.
|
||||
|
||||
One way would be to, similar to ``BPF_MAP_TYPE_PERF_EVENT_ARRAY``, make
|
||||
``BPF_MAP_TYPE_RINGBUF`` could represent an array of ring buffers, but not
|
||||
enforce "same CPU only" rule. This would be more familiar interface compatible
|
||||
with existing perf buffer use in BPF, but would fail if application needed more
|
||||
advanced logic to lookup ring buffer by arbitrary key.
|
||||
``BPF_MAP_TYPE_HASH_OF_MAPS`` addresses this with current approach.
|
||||
Additionally, given the performance of BPF ringbuf, many use cases would just
|
||||
opt into a simple single ring buffer shared among all CPUs, for which current
|
||||
approach would be an overkill.
|
||||
|
||||
Another approach could introduce a new concept, alongside BPF map, to represent
|
||||
generic "container" object, which doesn't necessarily have key/value interface
|
||||
with lookup/update/delete operations. This approach would add a lot of extra
|
||||
infrastructure that has to be built for observability and verifier support. It
|
||||
would also add another concept that BPF developers would have to familiarize
|
||||
themselves with, new syntax in libbpf, etc. But then would really provide no
|
||||
additional benefits over the approach of using a map. ``BPF_MAP_TYPE_RINGBUF``
|
||||
doesn't support lookup/update/delete operations, but so doesn't few other map
|
||||
types (e.g., queue and stack; array doesn't support delete, etc).
|
||||
|
||||
The approach chosen has an advantage of re-using existing BPF map
|
||||
infrastructure (introspection APIs in kernel, libbpf support, etc), being
|
||||
familiar concept (no need to teach users a new type of object in BPF program),
|
||||
and utilizing existing tooling (bpftool). For common scenario of using a single
|
||||
ring buffer for all CPUs, it's as simple and straightforward, as would be with
|
||||
a dedicated "container" object. On the other hand, by being a map, it can be
|
||||
combined with ``ARRAY_OF_MAPS`` and ``HASH_OF_MAPS`` map-in-maps to implement
|
||||
a wide variety of topologies, from one ring buffer for each CPU (e.g., as
|
||||
a replacement for perf buffer use cases), to a complicated application
|
||||
hashing/sharding of ring buffers (e.g., having a small pool of ring buffers
|
||||
with hashed task's tgid being a look up key to preserve order, but reduce
|
||||
contention).
|
||||
|
||||
Key and value sizes are enforced to be zero. ``max_entries`` is used to specify
|
||||
the size of ring buffer and has to be a power of 2 value.
|
||||
|
||||
There are a bunch of similarities between perf buffer
|
||||
(``BPF_MAP_TYPE_PERF_EVENT_ARRAY``) and new BPF ring buffer semantics:
|
||||
|
||||
- variable-length records;
|
||||
- if there is no more space left in ring buffer, reservation fails, no
|
||||
blocking;
|
||||
- memory-mappable data area for user-space applications for ease of
|
||||
consumption and high performance;
|
||||
- epoll notifications for new incoming data;
|
||||
- but still the ability to do busy polling for new data to achieve the
|
||||
lowest latency, if necessary.
|
||||
|
||||
BPF ringbuf provides two sets of APIs to BPF programs:
|
||||
|
||||
- ``bpf_ringbuf_output()`` allows to *copy* data from one place to a ring
|
||||
buffer, similarly to ``bpf_perf_event_output()``;
|
||||
- ``bpf_ringbuf_reserve()``/``bpf_ringbuf_commit()``/``bpf_ringbuf_discard()``
|
||||
APIs split the whole process into two steps. First, a fixed amount of space
|
||||
is reserved. If successful, a pointer to a data inside ring buffer data
|
||||
area is returned, which BPF programs can use similarly to a data inside
|
||||
array/hash maps. Once ready, this piece of memory is either committed or
|
||||
discarded. Discard is similar to commit, but makes consumer ignore the
|
||||
record.
|
||||
|
||||
``bpf_ringbuf_output()`` has disadvantage of incurring extra memory copy,
|
||||
because record has to be prepared in some other place first. But it allows to
|
||||
submit records of the length that's not known to verifier beforehand. It also
|
||||
closely matches ``bpf_perf_event_output()``, so will simplify migration
|
||||
significantly.
|
||||
|
||||
``bpf_ringbuf_reserve()`` avoids the extra copy of memory by providing a memory
|
||||
pointer directly to ring buffer memory. In a lot of cases records are larger
|
||||
than BPF stack space allows, so many programs have use extra per-CPU array as
|
||||
a temporary heap for preparing sample. bpf_ringbuf_reserve() avoid this needs
|
||||
completely. But in exchange, it only allows a known constant size of memory to
|
||||
be reserved, such that verifier can verify that BPF program can't access memory
|
||||
outside its reserved record space. bpf_ringbuf_output(), while slightly slower
|
||||
due to extra memory copy, covers some use cases that are not suitable for
|
||||
``bpf_ringbuf_reserve()``.
|
||||
|
||||
The difference between commit and discard is very small. Discard just marks
|
||||
a record as discarded, and such records are supposed to be ignored by consumer
|
||||
code. Discard is useful for some advanced use-cases, such as ensuring
|
||||
all-or-nothing multi-record submission, or emulating temporary
|
||||
``malloc()``/``free()`` within single BPF program invocation.
|
||||
|
||||
Each reserved record is tracked by verifier through existing
|
||||
reference-tracking logic, similar to socket ref-tracking. It is thus
|
||||
impossible to reserve a record, but forget to submit (or discard) it.
|
||||
|
||||
``bpf_ringbuf_query()`` helper allows to query various properties of ring
|
||||
buffer. Currently 4 are supported:
|
||||
|
||||
- ``BPF_RB_AVAIL_DATA`` returns amount of unconsumed data in ring buffer;
|
||||
- ``BPF_RB_RING_SIZE`` returns the size of ring buffer;
|
||||
- ``BPF_RB_CONS_POS``/``BPF_RB_PROD_POS`` returns current logical possition
|
||||
of consumer/producer, respectively.
|
||||
|
||||
Returned values are momentarily snapshots of ring buffer state and could be
|
||||
off by the time helper returns, so this should be used only for
|
||||
debugging/reporting reasons or for implementing various heuristics, that take
|
||||
into account highly-changeable nature of some of those characteristics.
|
||||
|
||||
One such heuristic might involve more fine-grained control over poll/epoll
|
||||
notifications about new data availability in ring buffer. Together with
|
||||
``BPF_RB_NO_WAKEUP``/``BPF_RB_FORCE_WAKEUP`` flags for output/commit/discard
|
||||
helpers, it allows BPF program a high degree of control and, e.g., more
|
||||
efficient batched notifications. Default self-balancing strategy, though,
|
||||
should be adequate for most applications and will work reliable and efficiently
|
||||
already.
|
||||
|
||||
Design and Implementation
|
||||
-------------------------
|
||||
|
||||
This reserve/commit schema allows a natural way for multiple producers, either
|
||||
on different CPUs or even on the same CPU/in the same BPF program, to reserve
|
||||
independent records and work with them without blocking other producers. This
|
||||
means that if BPF program was interruped by another BPF program sharing the
|
||||
same ring buffer, they will both get a record reserved (provided there is
|
||||
enough space left) and can work with it and submit it independently. This
|
||||
applies to NMI context as well, except that due to using a spinlock during
|
||||
reservation, in NMI context, ``bpf_ringbuf_reserve()`` might fail to get
|
||||
a lock, in which case reservation will fail even if ring buffer is not full.
|
||||
|
||||
The ring buffer itself internally is implemented as a power-of-2 sized
|
||||
circular buffer, with two logical and ever-increasing counters (which might
|
||||
wrap around on 32-bit architectures, that's not a problem):
|
||||
|
||||
- consumer counter shows up to which logical position consumer consumed the
|
||||
data;
|
||||
- producer counter denotes amount of data reserved by all producers.
|
||||
|
||||
Each time a record is reserved, producer that "owns" the record will
|
||||
successfully advance producer counter. At that point, data is still not yet
|
||||
ready to be consumed, though. Each record has 8 byte header, which contains the
|
||||
length of reserved record, as well as two extra bits: busy bit to denote that
|
||||
record is still being worked on, and discard bit, which might be set at commit
|
||||
time if record is discarded. In the latter case, consumer is supposed to skip
|
||||
the record and move on to the next one. Record header also encodes record's
|
||||
relative offset from the beginning of ring buffer data area (in pages). This
|
||||
allows ``bpf_ringbuf_commit()``/``bpf_ringbuf_discard()`` to accept only the
|
||||
pointer to the record itself, without requiring also the pointer to ring buffer
|
||||
itself. Ring buffer memory location will be restored from record metadata
|
||||
header. This significantly simplifies verifier, as well as improving API
|
||||
usability.
|
||||
|
||||
Producer counter increments are serialized under spinlock, so there is
|
||||
a strict ordering between reservations. Commits, on the other hand, are
|
||||
completely lockless and independent. All records become available to consumer
|
||||
in the order of reservations, but only after all previous records where
|
||||
already committed. It is thus possible for slow producers to temporarily hold
|
||||
off submitted records, that were reserved later.
|
||||
|
||||
Reservation/commit/consumer protocol is verified by litmus tests in
|
||||
Documentation/litmus_tests/bpf-rb/_.
|
||||
|
||||
One interesting implementation bit, that significantly simplifies (and thus
|
||||
speeds up as well) implementation of both producers and consumers is how data
|
||||
area is mapped twice contiguously back-to-back in the virtual memory. This
|
||||
allows to not take any special measures for samples that have to wrap around
|
||||
at the end of the circular buffer data area, because the next page after the
|
||||
last data page would be first data page again, and thus the sample will still
|
||||
appear completely contiguous in virtual memory. See comment and a simple ASCII
|
||||
diagram showing this visually in ``bpf_ringbuf_area_alloc()``.
|
||||
|
||||
Another feature that distinguishes BPF ringbuf from perf ring buffer is
|
||||
a self-pacing notifications of new data being availability.
|
||||
``bpf_ringbuf_commit()`` implementation will send a notification of new record
|
||||
being available after commit only if consumer has already caught up right up to
|
||||
the record being committed. If not, consumer still has to catch up and thus
|
||||
will see new data anyways without needing an extra poll notification.
|
||||
Benchmarks (see tools/testing/selftests/bpf/benchs/bench_ringbuf.c_) show that
|
||||
this allows to achieve a very high throughput without having to resort to
|
||||
tricks like "notify only every Nth sample", which are necessary with perf
|
||||
buffer. For extreme cases, when BPF program wants more manual control of
|
||||
notifications, commit/discard/output helpers accept ``BPF_RB_NO_WAKEUP`` and
|
||||
``BPF_RB_FORCE_WAKEUP`` flags, which give full control over notifications of
|
||||
data availability, but require extra caution and diligence in using this API.
|
||||
@@ -301,7 +301,8 @@ Helpers
|
||||
|
||||
.. kernel-doc:: tools/testing/selftests/kselftest_harness.h
|
||||
:functions: TH_LOG TEST TEST_SIGNAL FIXTURE FIXTURE_DATA FIXTURE_SETUP
|
||||
FIXTURE_TEARDOWN TEST_F TEST_HARNESS_MAIN
|
||||
FIXTURE_TEARDOWN TEST_F TEST_HARNESS_MAIN FIXTURE_VARIANT
|
||||
FIXTURE_VARIANT_ADD
|
||||
|
||||
Operators
|
||||
---------
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
Mediatek pericfg controller
|
||||
===========================
|
||||
|
||||
The Mediatek pericfg controller provides various clocks and reset
|
||||
outputs to the system.
|
||||
|
||||
Required Properties:
|
||||
|
||||
- compatible: Should be one of:
|
||||
- "mediatek,mt2701-pericfg", "syscon"
|
||||
- "mediatek,mt2712-pericfg", "syscon"
|
||||
- "mediatek,mt7622-pericfg", "syscon"
|
||||
- "mediatek,mt7623-pericfg", "mediatek,mt2701-pericfg", "syscon"
|
||||
- "mediatek,mt7629-pericfg", "syscon"
|
||||
- "mediatek,mt8135-pericfg", "syscon"
|
||||
- "mediatek,mt8173-pericfg", "syscon"
|
||||
- "mediatek,mt8183-pericfg", "syscon"
|
||||
- #clock-cells: Must be 1
|
||||
- #reset-cells: Must be 1
|
||||
|
||||
The pericfg controller uses the common clk binding from
|
||||
Documentation/devicetree/bindings/clock/clock-bindings.txt
|
||||
The available clocks are defined in dt-bindings/clock/mt*-clk.h.
|
||||
Also it uses the common reset controller binding from
|
||||
Documentation/devicetree/bindings/reset/reset.txt.
|
||||
The available reset outputs are defined in
|
||||
dt-bindings/reset/mt*-resets.h
|
||||
|
||||
Example:
|
||||
|
||||
pericfg: power-controller@10003000 {
|
||||
compatible = "mediatek,mt8173-pericfg", "syscon";
|
||||
reg = <0 0x10003000 0 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
#reset-cells = <1>;
|
||||
};
|
||||
@@ -0,0 +1,64 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: "http://devicetree.org/schemas/arm/mediatek/mediatek,pericfg.yaml#"
|
||||
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
|
||||
|
||||
title: MediaTek Peripheral Configuration Controller
|
||||
|
||||
maintainers:
|
||||
- Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
||||
|
||||
description:
|
||||
The Mediatek pericfg controller provides various clocks and reset outputs
|
||||
to the system.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
oneOf:
|
||||
- items:
|
||||
- enum:
|
||||
- mediatek,mt2701-pericfg
|
||||
- mediatek,mt2712-pericfg
|
||||
- mediatek,mt7622-pericfg
|
||||
- mediatek,mt7629-pericfg
|
||||
- mediatek,mt8135-pericfg
|
||||
- mediatek,mt8173-pericfg
|
||||
- mediatek,mt8183-pericfg
|
||||
- mediatek,mt8516-pericfg
|
||||
- const: syscon
|
||||
- items:
|
||||
# Special case for mt7623 for backward compatibility
|
||||
- const: mediatek,mt7623-pericfg
|
||||
- const: mediatek,mt2701-pericfg
|
||||
- const: syscon
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
'#clock-cells':
|
||||
const: 1
|
||||
|
||||
'#reset-cells':
|
||||
const: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
examples:
|
||||
- |
|
||||
pericfg@10003000 {
|
||||
compatible = "mediatek,mt8173-pericfg", "syscon";
|
||||
reg = <0x10003000 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
#reset-cells = <1>;
|
||||
};
|
||||
|
||||
- |
|
||||
pericfg@10003000 {
|
||||
compatible = "mediatek,mt7623-pericfg", "mediatek,mt2701-pericfg", "syscon";
|
||||
reg = <0x10003000 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
#reset-cells = <1>;
|
||||
};
|
||||
@@ -40,18 +40,22 @@ allOf:
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
minItems: 3
|
||||
maxItems: 4
|
||||
items:
|
||||
- description: GMAC main clock
|
||||
- description: First parent clock of the internal mux
|
||||
- description: Second parent clock of the internal mux
|
||||
- description: The clock which drives the timing adjustment logic
|
||||
|
||||
clock-names:
|
||||
minItems: 3
|
||||
maxItems: 3
|
||||
maxItems: 4
|
||||
items:
|
||||
- const: stmmaceth
|
||||
- const: clkin0
|
||||
- const: clkin1
|
||||
- const: timing-adjustment
|
||||
|
||||
amlogic,tx-delay-ns:
|
||||
$ref: /schemas/types.yaml#definitions/uint32
|
||||
@@ -67,6 +71,19 @@ allOf:
|
||||
PHY and MAC are adding a delay).
|
||||
Any configuration is ignored when the phy-mode is set to "rmii".
|
||||
|
||||
amlogic,rx-delay-ns:
|
||||
enum:
|
||||
- 0
|
||||
- 2
|
||||
default: 0
|
||||
description:
|
||||
The internal RGMII RX clock delay (provided by this IP block) in
|
||||
nanoseconds. When phy-mode is set to "rgmii" then the RX delay
|
||||
should be explicitly configured. When the phy-mode is set to
|
||||
either "rgmii-id" or "rgmii-rxid" the RX clock delay is already
|
||||
provided by the PHY. Any configuration is ignored when the
|
||||
phy-mode is set to "rmii".
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
additionalItems: true
|
||||
@@ -107,7 +124,7 @@ examples:
|
||||
reg = <0xc9410000 0x10000>, <0xc8834540 0x8>;
|
||||
interrupts = <8>;
|
||||
interrupt-names = "macirq";
|
||||
clocks = <&clk_eth>, <&clkc_fclk_div2>, <&clk_mpll2>;
|
||||
clock-names = "stmmaceth", "clkin0", "clkin1";
|
||||
clocks = <&clk_eth>, <&clk_fclk_div2>, <&clk_mpll2>, <&clk_fclk_div2>;
|
||||
clock-names = "stmmaceth", "clkin0", "clkin1", "timing-adjustment";
|
||||
phy-mode = "rgmii";
|
||||
};
|
||||
|
||||
@@ -81,7 +81,8 @@ properties:
|
||||
$ref: /schemas/types.yaml#definitions/flag
|
||||
description:
|
||||
If set, indicates the PHY device does not correctly release
|
||||
the turn around line low at the end of a MDIO transaction.
|
||||
the turn around line low at end of the control phase of the
|
||||
MDIO transaction.
|
||||
|
||||
enet-phy-lane-swap:
|
||||
$ref: /schemas/types.yaml#definitions/flag
|
||||
|
||||
@@ -22,8 +22,11 @@ Optional properties:
|
||||
- fsl,err006687-workaround-present: If present indicates that the system has
|
||||
the hardware workaround for ERR006687 applied and does not need a software
|
||||
workaround.
|
||||
- gpr: phandle of SoC general purpose register mode. Required for wake on LAN
|
||||
on some SoCs
|
||||
- fsl,stop-mode: register bits of stop mode control, the format is
|
||||
<&gpr req_gpr req_bit>.
|
||||
gpr is the phandle to general purpose register node.
|
||||
req_gpr is the gpr register offset for ENET stop request.
|
||||
req_bit is the gpr bit offset for ENET stop request.
|
||||
-interrupt-names: names of the interrupts listed in interrupts property in
|
||||
the same order. The defaults if not specified are
|
||||
__Number of interrupts__ __Default__
|
||||
@@ -82,6 +85,7 @@ ethernet@83fec000 {
|
||||
phy-supply = <®_fec_supply>;
|
||||
phy-handle = <ðphy>;
|
||||
mdio {
|
||||
clock-frequency = <5000000>;
|
||||
ethphy: ethernet-phy@6 {
|
||||
compatible = "ethernet-phy-ieee802.3-c22";
|
||||
reg = <6>;
|
||||
|
||||
56
Documentation/devicetree/bindings/net/imx-dwmac.txt
Normal file
56
Documentation/devicetree/bindings/net/imx-dwmac.txt
Normal file
@@ -0,0 +1,56 @@
|
||||
IMX8 glue layer controller, NXP imx8 families support Synopsys MAC 5.10a IP.
|
||||
|
||||
This file documents platform glue layer for IMX.
|
||||
Please see stmmac.txt for the other unchanged properties.
|
||||
|
||||
The device node has following properties.
|
||||
|
||||
Required properties:
|
||||
- compatible: Should be "nxp,imx8mp-dwmac-eqos" to select glue layer
|
||||
and "snps,dwmac-5.10a" to select IP version.
|
||||
- clocks: Must contain a phandle for each entry in clock-names.
|
||||
- clock-names: Should be "stmmaceth" for the host clock.
|
||||
Should be "pclk" for the MAC apb clock.
|
||||
Should be "ptp_ref" for the MAC timer clock.
|
||||
Should be "tx" for the MAC RGMII TX clock:
|
||||
Should be "mem" for EQOS MEM clock.
|
||||
- "mem" clock is required for imx8dxl platform.
|
||||
- "mem" clock is not required for imx8mp platform.
|
||||
- interrupt-names: Should contain a list of interrupt names corresponding to
|
||||
the interrupts in the interrupts property, if available.
|
||||
Should be "macirq" for the main MAC IRQ
|
||||
Should be "eth_wake_irq" for the IT which wake up system
|
||||
- intf_mode: Should be phandle/offset pair. The phandle to the syscon node which
|
||||
encompases the GPR register, and the offset of the GPR register.
|
||||
- required for imx8mp platform.
|
||||
- is optional for imx8dxl platform.
|
||||
|
||||
Optional properties:
|
||||
- intf_mode: is optional for imx8dxl platform.
|
||||
- snps,rmii_refclk_ext: to select RMII reference clock from external.
|
||||
|
||||
Example:
|
||||
eqos: ethernet@30bf0000 {
|
||||
compatible = "nxp,imx8mp-dwmac-eqos", "snps,dwmac-5.10a";
|
||||
reg = <0x30bf0000 0x10000>;
|
||||
interrupts = <GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "eth_wake_irq", "macirq";
|
||||
clocks = <&clk IMX8MP_CLK_ENET_QOS_ROOT>,
|
||||
<&clk IMX8MP_CLK_QOS_ENET_ROOT>,
|
||||
<&clk IMX8MP_CLK_ENET_QOS_TIMER>,
|
||||
<&clk IMX8MP_CLK_ENET_QOS>;
|
||||
clock-names = "stmmaceth", "pclk", "ptp_ref", "tx";
|
||||
assigned-clocks = <&clk IMX8MP_CLK_ENET_AXI>,
|
||||
<&clk IMX8MP_CLK_ENET_QOS_TIMER>,
|
||||
<&clk IMX8MP_CLK_ENET_QOS>;
|
||||
assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_266M>,
|
||||
<&clk IMX8MP_SYS_PLL2_100M>,
|
||||
<&clk IMX8MP_SYS_PLL2_125M>;
|
||||
assigned-clock-rates = <0>, <100000000>, <125000000>;
|
||||
nvmem-cells = <ð_mac0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
nvmem_macaddr_swap;
|
||||
intf_mode = <&gpr 0x4>;
|
||||
status = "disabled";
|
||||
};
|
||||
@@ -31,13 +31,25 @@ properties:
|
||||
maxItems: 1
|
||||
description:
|
||||
The phandle and specifier for the GPIO that controls the RESET
|
||||
lines of all PHYs on that MDIO bus.
|
||||
lines of all devices on that MDIO bus.
|
||||
|
||||
reset-delay-us:
|
||||
description:
|
||||
RESET pulse width in microseconds. It applies to all PHY devices
|
||||
and must therefore be appropriately determined based on all PHY
|
||||
requirements (maximum value of all per-PHY RESET pulse widths).
|
||||
RESET pulse width in microseconds. It applies to all MDIO devices
|
||||
and must therefore be appropriately determined based on all devices
|
||||
requirements (maximum value of all per-device RESET pulse widths).
|
||||
|
||||
clock-frequency:
|
||||
description:
|
||||
Desired MDIO bus clock frequency in Hz. Values greater than IEEE 802.3
|
||||
defined 2.5MHz should only be used when all devices on the bus support
|
||||
the given clock speed.
|
||||
|
||||
suppress-preamble:
|
||||
description:
|
||||
The 32 bit preamble should be suppressed. In order for this to
|
||||
work, all devices on the bus must support suppressed preamble.
|
||||
type: boolean
|
||||
|
||||
patternProperties:
|
||||
"^ethernet-phy@[0-9a-f]+$":
|
||||
@@ -48,7 +60,35 @@ patternProperties:
|
||||
minimum: 0
|
||||
maximum: 31
|
||||
description:
|
||||
The ID number for the PHY.
|
||||
The ID number for the device.
|
||||
|
||||
broken-turn-around:
|
||||
$ref: /schemas/types.yaml#definitions/flag
|
||||
description:
|
||||
If set, indicates the MDIO device does not correctly release
|
||||
the turn around line low at end of the control phase of the
|
||||
MDIO transaction.
|
||||
|
||||
resets:
|
||||
maxItems: 1
|
||||
|
||||
reset-names:
|
||||
const: phy
|
||||
|
||||
reset-gpios:
|
||||
maxItems: 1
|
||||
description:
|
||||
The GPIO phandle and specifier for the MDIO reset signal.
|
||||
|
||||
reset-assert-us:
|
||||
description:
|
||||
Delay after the reset was asserted in microseconds. If this
|
||||
property is missing the delay will be skipped.
|
||||
|
||||
reset-deassert-us:
|
||||
description:
|
||||
Delay after the reset was deasserted in microseconds. If
|
||||
this property is missing the delay will be skipped.
|
||||
|
||||
required:
|
||||
- reg
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/net/mediatek,star-emac.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: MediaTek STAR Ethernet MAC Controller
|
||||
|
||||
maintainers:
|
||||
- Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
||||
|
||||
description:
|
||||
This Ethernet MAC is used on the MT8* family of SoCs from MediaTek.
|
||||
It's compliant with 802.3 standards and supports half- and full-duplex
|
||||
modes with flow-control as well as CRC offloading and VLAN tags.
|
||||
|
||||
allOf:
|
||||
- $ref: "ethernet-controller.yaml#"
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- mediatek,mt8516-eth
|
||||
- mediatek,mt8518-eth
|
||||
- mediatek,mt8175-eth
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
minItems: 3
|
||||
maxItems: 3
|
||||
|
||||
clock-names:
|
||||
additionalItems: false
|
||||
items:
|
||||
- const: core
|
||||
- const: reg
|
||||
- const: trans
|
||||
|
||||
mediatek,pericfg:
|
||||
$ref: /schemas/types.yaml#definitions/phandle
|
||||
description:
|
||||
Phandle to the device containing the PERICFG register range. This is used
|
||||
to control the MII mode.
|
||||
|
||||
mdio:
|
||||
type: object
|
||||
description:
|
||||
Creates and registers an MDIO bus.
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- interrupts
|
||||
- clocks
|
||||
- clock-names
|
||||
- mediatek,pericfg
|
||||
- phy-handle
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
#include <dt-bindings/clock/mt8516-clk.h>
|
||||
|
||||
ethernet: ethernet@11180000 {
|
||||
compatible = "mediatek,mt8516-eth";
|
||||
reg = <0x11180000 0x1000>;
|
||||
mediatek,pericfg = <&pericfg>;
|
||||
interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_LOW>;
|
||||
clocks = <&topckgen CLK_TOP_RG_ETH>,
|
||||
<&topckgen CLK_TOP_66M_ETH>,
|
||||
<&topckgen CLK_TOP_133M_ETH>;
|
||||
clock-names = "core", "reg", "trans";
|
||||
phy-handle = <ð_phy>;
|
||||
phy-mode = "rmii";
|
||||
|
||||
mdio {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
eth_phy: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
61
Documentation/devicetree/bindings/net/nxp,tja11xx.yaml
Normal file
61
Documentation/devicetree/bindings/net/nxp,tja11xx.yaml
Normal file
@@ -0,0 +1,61 @@
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/net/nxp,tja11xx.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: NXP TJA11xx PHY
|
||||
|
||||
maintainers:
|
||||
- Andrew Lunn <andrew@lunn.ch>
|
||||
- Florian Fainelli <f.fainelli@gmail.com>
|
||||
- Heiner Kallweit <hkallweit1@gmail.com>
|
||||
|
||||
description:
|
||||
Bindings for NXP TJA11xx automotive PHYs
|
||||
|
||||
allOf:
|
||||
- $ref: ethernet-phy.yaml#
|
||||
|
||||
patternProperties:
|
||||
"^ethernet-phy@[0-9a-f]+$":
|
||||
type: object
|
||||
description: |
|
||||
Some packages have multiple PHYs. Secondary PHY should be defines as
|
||||
subnode of the first (parent) PHY.
|
||||
|
||||
properties:
|
||||
reg:
|
||||
minimum: 0
|
||||
maximum: 31
|
||||
description:
|
||||
The ID number for the child PHY. Should be +1 of parent PHY.
|
||||
|
||||
required:
|
||||
- reg
|
||||
|
||||
examples:
|
||||
- |
|
||||
mdio {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
tja1101_phy0: ethernet-phy@4 {
|
||||
reg = <0x4>;
|
||||
};
|
||||
};
|
||||
- |
|
||||
mdio {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
tja1102_phy0: ethernet-phy@4 {
|
||||
reg = <0x4>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
tja1102_phy1: ethernet-phy@5 {
|
||||
reg = <0x5>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -1,45 +0,0 @@
|
||||
Required properties:
|
||||
- compatible: Should be "qca,<soc>-eth". Currently support compatibles are:
|
||||
qca,ar7100-eth - Atheros AR7100
|
||||
qca,ar7240-eth - Atheros AR7240
|
||||
qca,ar7241-eth - Atheros AR7241
|
||||
qca,ar7242-eth - Atheros AR7242
|
||||
qca,ar9130-eth - Atheros AR9130
|
||||
qca,ar9330-eth - Atheros AR9330
|
||||
qca,ar9340-eth - Atheros AR9340
|
||||
qca,qca9530-eth - Qualcomm Atheros QCA9530
|
||||
qca,qca9550-eth - Qualcomm Atheros QCA9550
|
||||
qca,qca9560-eth - Qualcomm Atheros QCA9560
|
||||
|
||||
- reg : Address and length of the register set for the device
|
||||
- interrupts : Should contain eth interrupt
|
||||
- phy-mode : See ethernet.txt file in the same directory
|
||||
- clocks: the clock used by the core
|
||||
- clock-names: the names of the clock listed in the clocks property. These are
|
||||
"eth" and "mdio".
|
||||
- resets: Should contain phandles to the reset signals
|
||||
- reset-names: Should contain the names of reset signal listed in the resets
|
||||
property. These are "mac" and "mdio"
|
||||
|
||||
Optional properties:
|
||||
- phy-handle : phandle to the PHY device connected to this device.
|
||||
- fixed-link : Assume a fixed link. See fixed-link.txt in the same directory.
|
||||
Use instead of phy-handle.
|
||||
|
||||
Optional subnodes:
|
||||
- mdio : specifies the mdio bus, used as a container for phy nodes
|
||||
according to phy.txt in the same directory
|
||||
|
||||
Example:
|
||||
|
||||
ethernet@1a000000 {
|
||||
compatible = "qca,ar9330-eth";
|
||||
reg = <0x1a000000 0x200>;
|
||||
interrupts = <5>;
|
||||
resets = <&rst 13>, <&rst 23>;
|
||||
reset-names = "mac", "mdio";
|
||||
clocks = <&pll ATH79_CLK_AHB>, <&pll ATH79_CLK_MDIO>;
|
||||
clock-names = "eth", "mdio";
|
||||
|
||||
phy-mode = "gmii";
|
||||
};
|
||||
216
Documentation/devicetree/bindings/net/qca,ar71xx.yaml
Normal file
216
Documentation/devicetree/bindings/net/qca,ar71xx.yaml
Normal file
@@ -0,0 +1,216 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/net/qca,ar71xx.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: QCA AR71XX MAC
|
||||
|
||||
allOf:
|
||||
- $ref: ethernet-controller.yaml#
|
||||
|
||||
maintainers:
|
||||
- Oleksij Rempel <o.rempel@pengutronix.de>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
oneOf:
|
||||
- items:
|
||||
- enum:
|
||||
- qca,ar7100-eth # Atheros AR7100
|
||||
- qca,ar7240-eth # Atheros AR7240
|
||||
- qca,ar7241-eth # Atheros AR7241
|
||||
- qca,ar7242-eth # Atheros AR7242
|
||||
- qca,ar9130-eth # Atheros AR9130
|
||||
- qca,ar9330-eth # Atheros AR9330
|
||||
- qca,ar9340-eth # Atheros AR9340
|
||||
- qca,qca9530-eth # Qualcomm Atheros QCA9530
|
||||
- qca,qca9550-eth # Qualcomm Atheros QCA9550
|
||||
- qca,qca9560-eth # Qualcomm Atheros QCA9560
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
'#address-cells':
|
||||
description: number of address cells for the MDIO bus
|
||||
const: 1
|
||||
|
||||
'#size-cells':
|
||||
description: number of size cells on the MDIO bus
|
||||
const: 0
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: MAC main clock
|
||||
- description: MDIO clock
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: eth
|
||||
- const: mdio
|
||||
|
||||
resets:
|
||||
items:
|
||||
- description: MAC reset
|
||||
- description: MDIO reset
|
||||
|
||||
reset-names:
|
||||
items:
|
||||
- const: mac
|
||||
- const: mdio
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- interrupts
|
||||
- phy-mode
|
||||
- clocks
|
||||
- clock-names
|
||||
- resets
|
||||
- reset-names
|
||||
|
||||
examples:
|
||||
# Lager board
|
||||
- |
|
||||
eth0: ethernet@19000000 {
|
||||
compatible = "qca,ar9330-eth";
|
||||
reg = <0x19000000 0x200>;
|
||||
interrupts = <4>;
|
||||
resets = <&rst 9>, <&rst 22>;
|
||||
reset-names = "mac", "mdio";
|
||||
clocks = <&pll 1>, <&pll 2>;
|
||||
clock-names = "eth", "mdio";
|
||||
qca,ethcfg = <ðcfg>;
|
||||
phy-mode = "mii";
|
||||
phy-handle = <&phy_port4>;
|
||||
};
|
||||
|
||||
eth1: ethernet@1a000000 {
|
||||
compatible = "qca,ar9330-eth";
|
||||
reg = <0x1a000000 0x200>;
|
||||
interrupts = <5>;
|
||||
resets = <&rst 13>, <&rst 23>;
|
||||
reset-names = "mac", "mdio";
|
||||
clocks = <&pll 1>, <&pll 2>;
|
||||
clock-names = "eth", "mdio";
|
||||
|
||||
phy-mode = "gmii";
|
||||
|
||||
status = "disabled";
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
full-duplex;
|
||||
};
|
||||
|
||||
mdio {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
switch10: switch@10 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
compatible = "qca,ar9331-switch";
|
||||
reg = <0x10>;
|
||||
resets = <&rst 8>;
|
||||
reset-names = "switch";
|
||||
|
||||
interrupt-parent = <&miscintc>;
|
||||
interrupts = <12>;
|
||||
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <1>;
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
switch_port0: port@0 {
|
||||
reg = <0x0>;
|
||||
label = "cpu";
|
||||
ethernet = <ð1>;
|
||||
|
||||
phy-mode = "gmii";
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
|
||||
switch_port1: port@1 {
|
||||
reg = <0x1>;
|
||||
phy-handle = <&phy_port0>;
|
||||
phy-mode = "internal";
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
switch_port2: port@2 {
|
||||
reg = <0x2>;
|
||||
phy-handle = <&phy_port1>;
|
||||
phy-mode = "internal";
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
switch_port3: port@3 {
|
||||
reg = <0x3>;
|
||||
phy-handle = <&phy_port2>;
|
||||
phy-mode = "internal";
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
switch_port4: port@4 {
|
||||
reg = <0x4>;
|
||||
phy-handle = <&phy_port3>;
|
||||
phy-mode = "internal";
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
mdio {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
interrupt-parent = <&switch10>;
|
||||
|
||||
phy_port0: phy@0 {
|
||||
reg = <0x0>;
|
||||
interrupts = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
phy_port1: phy@1 {
|
||||
reg = <0x1>;
|
||||
interrupts = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
phy_port2: phy@2 {
|
||||
reg = <0x2>;
|
||||
interrupts = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
phy_port3: phy@3 {
|
||||
reg = <0x3>;
|
||||
interrupts = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
phy_port4: phy@4 {
|
||||
reg = <0x4>;
|
||||
interrupts = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -20,7 +20,10 @@ description:
|
||||
The GSI is an integral part of the IPA, but it is logically isolated
|
||||
and has a distinct interrupt and a separately-defined address space.
|
||||
|
||||
See also soc/qcom/qcom,smp2p.txt and interconnect/interconnect.txt.
|
||||
See also soc/qcom/qcom,smp2p.txt and interconnect/interconnect.txt. See
|
||||
iommu/iommu.txt and iommu/arm,smmu.yaml for more information about SMMU
|
||||
bindings.
|
||||
|
||||
|
||||
- |
|
||||
-------- ---------
|
||||
@@ -54,6 +57,9 @@ properties:
|
||||
- const: ipa-shared
|
||||
- const: gsi
|
||||
|
||||
iommus:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
maxItems: 1
|
||||
|
||||
@@ -126,6 +132,7 @@ properties:
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- iommus
|
||||
- reg
|
||||
- clocks
|
||||
- interrupts
|
||||
@@ -164,6 +171,7 @@ examples:
|
||||
modem-init;
|
||||
modem-remoteproc = <&mss_pil>;
|
||||
|
||||
iommus = <&apps_smmu 0x720 0x3>;
|
||||
reg = <0 0x1e40000 0 0x7000>,
|
||||
<0 0x1e47000 0 0x2000>,
|
||||
<0 0x1e04000 0 0x2c000>;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user