mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
net: ti: icss-iep: Add IEP driver
Add a driver for Industrial Ethernet Peripheral (IEP) block of PRUSS to support timestamping of ethernet packets and thus support PTP and PPS for PRU ethernet ports. Signed-off-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Murali Karicheri <m-karicheri2@ti.com> Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: MD Danish Anwar <danishanwar@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
b120562783
commit
c1e0230eea
@@ -196,4 +196,15 @@ config TI_ICSSG_PRUETH
|
|||||||
to support the Ethernet operation. Currently, it supports Ethernet
|
to support the Ethernet operation. Currently, it supports Ethernet
|
||||||
with 1G and 100M link speed.
|
with 1G and 100M link speed.
|
||||||
|
|
||||||
|
config TI_ICSS_IEP
|
||||||
|
tristate "TI PRU ICSS IEP driver"
|
||||||
|
depends on TI_PRUSS
|
||||||
|
default TI_PRUSS
|
||||||
|
help
|
||||||
|
This driver enables support for the PRU-ICSS Industrial Ethernet
|
||||||
|
Peripheral within a PRU-ICSS subsystem present on various TI SoCs.
|
||||||
|
|
||||||
|
To compile this driver as a module, choose M here. The module
|
||||||
|
will be called icss_iep.
|
||||||
|
|
||||||
endif # NET_VENDOR_TI
|
endif # NET_VENDOR_TI
|
||||||
|
|||||||
@@ -38,3 +38,4 @@ icssg-prueth-y := k3-cppi-desc-pool.o \
|
|||||||
icssg/icssg_mii_cfg.o \
|
icssg/icssg_mii_cfg.o \
|
||||||
icssg/icssg_stats.o \
|
icssg/icssg_stats.o \
|
||||||
icssg/icssg_ethtool.o
|
icssg/icssg_ethtool.o
|
||||||
|
obj-$(CONFIG_TI_ICSS_IEP) += icssg/icss_iep.o
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,38 @@
|
|||||||
|
/* SPDX-License-Identifier: GPL-2.0 */
|
||||||
|
/* Texas Instruments ICSSG Industrial Ethernet Peripheral (IEP) Driver
|
||||||
|
*
|
||||||
|
* Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __NET_TI_ICSS_IEP_H
|
||||||
|
#define __NET_TI_ICSS_IEP_H
|
||||||
|
|
||||||
|
#include <linux/mutex.h>
|
||||||
|
#include <linux/ptp_clock_kernel.h>
|
||||||
|
#include <linux/regmap.h>
|
||||||
|
|
||||||
|
struct icss_iep;
|
||||||
|
|
||||||
|
/* Firmware specific clock operations */
|
||||||
|
struct icss_iep_clockops {
|
||||||
|
void (*settime)(void *clockops_data, u64 ns);
|
||||||
|
void (*adjtime)(void *clockops_data, s64 delta);
|
||||||
|
u64 (*gettime)(void *clockops_data, struct ptp_system_timestamp *sts);
|
||||||
|
int (*perout_enable)(void *clockops_data,
|
||||||
|
struct ptp_perout_request *req, int on,
|
||||||
|
u64 *cmp);
|
||||||
|
int (*extts_enable)(void *clockops_data, u32 index, int on);
|
||||||
|
};
|
||||||
|
|
||||||
|
struct icss_iep *icss_iep_get(struct device_node *np);
|
||||||
|
struct icss_iep *icss_iep_get_idx(struct device_node *np, int idx);
|
||||||
|
void icss_iep_put(struct icss_iep *iep);
|
||||||
|
int icss_iep_init(struct icss_iep *iep, const struct icss_iep_clockops *clkops,
|
||||||
|
void *clockops_data, u32 cycle_time_ns);
|
||||||
|
int icss_iep_exit(struct icss_iep *iep);
|
||||||
|
int icss_iep_get_count_low(struct icss_iep *iep);
|
||||||
|
int icss_iep_get_count_hi(struct icss_iep *iep);
|
||||||
|
int icss_iep_get_ptp_clock_idx(struct icss_iep *iep);
|
||||||
|
|
||||||
|
#endif /* __NET_TI_ICSS_IEP_H */
|
||||||
Reference in New Issue
Block a user