Skip to content

Commit aa05346

Browse files
committed
Merge branch 'iep-drver-timestamping-support'
MD Danish Anwar says: ==================== Introduce IEP driver and packet timestamping support This series introduces Industrial Ethernet Peripheral (IEP) driver to support timestamping of ethernet packets and thus support PTP and PPS for PRU ICSSG ethernet ports. This series also adds 10M full duplex support for ICSSG ethernet driver. There are two IEP instances. IEP0 is used for packet timestamping while IEP1 is used for 10M full duplex support. This is v7 of the series [v1]. It addresses comments made on [v6]. This series is based on linux-next(#next-20230823). Changes from v6 to v7: *) Dropped blank line in example section of patch 1. *) Patch 1 previously had three examples, removed two examples and kept only one example as asked by Krzysztof. *) Added Jacob Keller's RB tag in patch 5. *) Dropped Roger's RB tags from the patches that he has authored (Patch 3 and 4) Changes from v5 to v6: *) Added description of IEP in commit messages of patch 2 as asked by Rob. *) Described the items constraints properly for iep property in patch 2 as asked by Rob. *) Added Roger and Simon's RB tags. Changes from v4 to v5: *) Added comments on why we are using readl / writel instead of regmap_read() / write() in icss_iep_gettime() / settime() APIs as asked by Roger. *) Added Conor's RB tag in patch 1 and 2. Change from v3 to v4: *) Changed compatible in iep dt bindings. Now each SoC has their own compatible in the binding with "ti,am654-icss-iep" as a fallback as asked by Conor. *) Addressed Andew's comments and removed helper APIs icss_iep_readl() / writel(). Now the settime/gettime APIs directly use readl() / writel(). *) Moved selecting TI_ICSS_IEP in Kconfig from patch 3 to patch 4. *) Removed forward declaration of icss_iep_of_match in patch 3. *) Replaced use of of_device_get_match_data() to device_get_match_data() in patch 3. *) Removed of_match_ptr() from patch 3 as it is not needed. Changes from v2 to v3: *) Addressed Roger's comment and moved IEP1 related changes in patch 5. *) Addressed Roger's comment and moved icss_iep.c / .h changes from patch 4 to patch 3. *) Added support for multiple timestamping in patch 4 as asked by Roger. *) Addressed Andrew's comment and added comment in case SPEED_10 in icssg_config_ipg() API. *) Kept compatible as "ti,am654-icss-iep" for all TI K3 SoCs Changes from v1 to v2: *) Addressed Simon's comment to fix reverse xmas tree declaration. Some APIs in patch 3 and 4 were not following reverse xmas tree variable declaration. Fixed it in this version. *) Addressed Conor's comments and removed unsupported SoCs from compatible comment in patch 1. *) Addded patch 2 which was not part of v1. Patch 2, adds IEP node to dt bindings for ICSSG. [v1] https://lore.kernel.org/all/20230803110153.3309577-1-danishanwar@ti.com/ [v2] https://lore.kernel.org/all/20230807110048.2611456-1-danishanwar@ti.com/ [v3] https://lore.kernel.org/all/20230809114906.21866-1-danishanwar@ti.com/ [v4] https://lore.kernel.org/all/20230814100847.3531480-1-danishanwar@ti.com/ [v5] https://lore.kernel.org/all/20230817114527.1585631-1-danishanwar@ti.com/ [v6] https://lore.kernel.org/all/20230823113254.292603-1-danishanwar@ti.com/ ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2 parents 2cc88bb + 443a236 commit aa05346

10 files changed

Lines changed: 1572 additions & 8 deletions

File tree

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/net/ti,icss-iep.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Texas Instruments ICSS Industrial Ethernet Peripheral (IEP) module
8+
9+
maintainers:
10+
- Md Danish Anwar <danishanwar@ti.com>
11+
12+
properties:
13+
compatible:
14+
oneOf:
15+
- items:
16+
- enum:
17+
- ti,am642-icss-iep
18+
- ti,j721e-icss-iep
19+
- const: ti,am654-icss-iep
20+
21+
- const: ti,am654-icss-iep
22+
23+
24+
reg:
25+
maxItems: 1
26+
27+
clocks:
28+
maxItems: 1
29+
description: phandle to the IEP source clock
30+
31+
required:
32+
- compatible
33+
- reg
34+
- clocks
35+
36+
additionalProperties: false
37+
38+
examples:
39+
- |
40+
/* AM65x */
41+
icssg0_iep0: iep@2e000 {
42+
compatible = "ti,am654-icss-iep";
43+
reg = <0x2e000 0x1000>;
44+
clocks = <&icssg0_iepclk_mux>;
45+
};

Documentation/devicetree/bindings/net/ti,icssg-prueth.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@ properties:
5252
description:
5353
phandle to MII_RT module's syscon regmap
5454

55+
ti,iep:
56+
$ref: /schemas/types.yaml#/definitions/phandle-array
57+
maxItems: 2
58+
items:
59+
maxItems: 1
60+
description:
61+
phandle to IEP (Industrial Ethernet Peripheral) for ICSSG
62+
5563
interrupts:
5664
maxItems: 2
5765
description:
@@ -155,6 +163,7 @@ examples:
155163
"tx1-0", "tx1-1", "tx1-2", "tx1-3",
156164
"rx0", "rx1";
157165
ti,mii-g-rt = <&icssg2_mii_g_rt>;
166+
ti,iep = <&icssg2_iep0>, <&icssg2_iep1>;
158167
interrupt-parent = <&icssg2_intc>;
159168
interrupts = <24 0 2>, <25 1 3>;
160169
interrupt-names = "tx_ts0", "tx_ts1";

drivers/net/ethernet/ti/Kconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ config CPMAC
186186
config TI_ICSSG_PRUETH
187187
tristate "TI Gigabit PRU Ethernet driver"
188188
select PHYLIB
189+
select TI_ICSS_IEP
189190
depends on PRU_REMOTEPROC
190191
depends on ARCH_K3 && OF && TI_K3_UDMA_GLUE_LAYER
191192
help
@@ -196,4 +197,15 @@ config TI_ICSSG_PRUETH
196197
to support the Ethernet operation. Currently, it supports Ethernet
197198
with 1G and 100M link speed.
198199

200+
config TI_ICSS_IEP
201+
tristate "TI PRU ICSS IEP driver"
202+
depends on TI_PRUSS
203+
default TI_PRUSS
204+
help
205+
This driver enables support for the PRU-ICSS Industrial Ethernet
206+
Peripheral within a PRU-ICSS subsystem present on various TI SoCs.
207+
208+
To compile this driver as a module, choose M here. The module
209+
will be called icss_iep.
210+
199211
endif # NET_VENDOR_TI

drivers/net/ethernet/ti/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,4 @@ icssg-prueth-y := k3-cppi-desc-pool.o \
3838
icssg/icssg_mii_cfg.o \
3939
icssg/icssg_stats.o \
4040
icssg/icssg_ethtool.o
41+
obj-$(CONFIG_TI_ICSS_IEP) += icssg/icss_iep.o

0 commit comments

Comments
 (0)