Skip to contentSkip to conversation

misc: Add Renesas Synchronization Management Unit (SMU) support

PATCH New [email protected] 1 participant 1 message Mar 23, 2021 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 misc: Add Renesas Synchronization Management Unit (SMU) support

From: Min Li <[email protected]>

This driver is developed for the IDT ClockMatrix(TM) and 82P33xxx families of timing and synchronization devices.It will be used by Renesas PTP Clock Manager for Linux (pcm4l) software to provide support to GNSS assisted partial timing support (APTS) and other networking timing functions.

Current version provides kernel API's to support the following functions -set combomode to enable SYNCE clock support
-read dpll's state to determine if the dpll is locked to the GNSS channel -read dpll's ffo (fractional frequency offset) in ppqt

---
Change log
-rebase change to linux-next tree
-remove uncessary condition checks suggested by Greg -fix compile error for x86_64

 drivers/misc/Kconfig      |   9 ++
 drivers/misc/Makefile     |   2 +
 drivers/misc/rsmu_cdev.c  | 321 ++++++++++++++++++++++++++++++++++++++++++++++
 drivers/misc/rsmu_cdev.h  |  72 +++++++++++
 drivers/misc/rsmu_cm.c    | 166 ++++++++++++++++++++++++
 drivers/misc/rsmu_sabre.c | 128 ++++++++++++++++++
 include/uapi/linux/rsmu.h |  64 +++++++++
 7 files changed, 762 insertions(+)
 create mode 100644 drivers/misc/rsmu_cdev.c
 create mode 100644 drivers/misc/rsmu_cdev.h
 create mode 100644 drivers/misc/rsmu_cm.c
 create mode 100644 drivers/misc/rsmu_sabre.c
 create mode 100644 include/uapi/linux/rsmu.h
drivers/misc/Kconfig +9 -0
index f532c59..49b523a 100644
@@ -445,6 +445,15 @@ config HISI_HIKEY_USB
 	  switching between the dual-role USB-C port and the USB-A host ports
 	  using only one USB controller.
 
+config RSMU
+	tristate "Renesas Synchronization Management Unit (SMU)"
+	help
+	  This option enables support for the IDT ClockMatrix(TM) and 82P33xxx
+	  families of timing and synchronization devices. It will be used by
+	  Renesas PTP Clock Manager for Linux (pcm4l) software to provide support
+	  for GNSS assisted partial timing support (APTS) and other networking
+	  timing functions.
+
 source "drivers/misc/c2port/Kconfig"
 source "drivers/misc/eeprom/Kconfig"
 source "drivers/misc/cb710/Kconfig"
drivers/misc/Makefile +2 -0
index 99b6f15..21b8ed4 100644
@@ -56,3 +56,5 @@ obj-$(CONFIG_HABANA_AI)		+= habanalabs/
 obj-$(CONFIG_UACCE)		+= uacce/
 obj-$(CONFIG_XILINX_SDFEC)	+= xilinx_sdfec.o
 obj-$(CONFIG_HISI_HIKEY_USB)	+= hisi_hikey_usb.o
+rsmu-objs			:= rsmu_cdev.o rsmu_cm.o rsmu_sabre.o
+obj-$(CONFIG_RSMU)		+= rsmu.o
drivers/misc/rsmu_cdev.c new file +321 -0

321 lines not on this page · raw message

drivers/misc/rsmu_cdev.h new file +72 -0

72 lines not on this page · raw message

drivers/misc/rsmu_cm.c new file +166 -0

166 lines not on this page · raw message

drivers/misc/rsmu_sabre.c new file +128 -0

128 lines not on this page · raw message

include/uapi/linux/rsmu.h new file +64 -0

64 lines not on this page · raw message

Signature · 1 line
2.7.4