Skip to contentSkip to conversation

misc: Add Renesas Synchronization Management Unit (SMU) support

PATCH In review [email protected] 2 participants 4 messages Mar 17, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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)

---
 drivers/misc/Kconfig      |  10 ++
 drivers/misc/Makefile     |   2 +
 drivers/misc/rsmu_cdev.c  | 336 ++++++++++++++++++++++++++++++++++++++++++++++
 drivers/misc/rsmu_cdev.h  |  72 ++++++++++
 drivers/misc/rsmu_cm.c    | 166 +++++++++++++++++++++++
 drivers/misc/rsmu_sabre.c | 128 ++++++++++++++++++
 include/uapi/linux/rsmu.h |  61 +++++++++
 7 files changed, 775 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 +10 -0
index f532c59..7c280a2 100644
@@ -445,6 +445,16 @@ 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)"
+	depends on MFD_RSMU_I2C || MFD_RSMU_SPI
+	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 +336 -0

336 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 +61 -0

61 lines not on this page · raw message

Signature · 1 line
2.7.4
maintainer
#1 lore raw
Quoted 12 lines · On Wed, Mar 17, 2021 at 02:59:56PM -0400, [email protected] wrote:

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

(quoted diff) +0 -3
-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)
Quoted 1 line

Why the "net-next" in the subject line?

This is not for the network tree (given that you didn't even cc:
netdev...) or am I confused?

thanks,

gre gk-h

author
#2 lore raw

Hi Greg

You are right, this is not for the network tree.

Can you point me to the right tree to base this change for?

Thanks

Min

Quoted 33 lines

-----Original Message-----
From: Greg KH <[email protected]>
Sent: March 17, 2021 3:20 PM
To: Min Li <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH net-next v1] misc: Add Renesas Synchronization Management Unit (SMU) support

Quoted 6 lines · On Wed, Mar 17, 2021 at 02:59:56PM -0400, [email protected] wrote:

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.

Quoted 7 lines

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)

Why the "net-next" in the subject line?

This is not for the network tree (given that you didn't even cc:
netdev...) or am I confused?

thanks,

gre gk-h

maintainer
#3 lore raw

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

A: No.
Q: Should I include quotations after my reply?

http://daringfireball.net/2007/07/on_top

Quoted 5 lines · Min Li

Hi Greg

You are right, this is not for the network tree.

Can you point me to the right tree to base this change for?

MAINTAINERS and scripts/get_maintainers.pl is your friend, please look there.

thanks,

greg k-h