aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRohit Consul <rohitco@xilinx.com>2017-05-05 11:24:15 -0700
committerJeffrey Mouroux <jmouroux@xilinx.com>2017-06-28 11:16:03 -0700
commitc33ee6950b34e8b00d9c77238dd7dfe0789dc91f (patch)
treeeeb5935944ecffdcfd046423c45f7e624259c886
parent7290bf423f13ec6a996b443160bfd4a1f9629deb (diff)
downloadlinux-c33ee6950b34e8b00d9c77238dd7dfe0789dc91f.tar.gz
staging: xilinx: Add xilinx hdmi drivers to staging area
Initial release of Xilinx hdmi drivers is being done via staging area. HDMI solution comprises of hdmi-rx, hdmi-tx, vphy, si5324 clk generator and dp159 retimer. All these drivers will be in experimental state until further notice, pending full validation and protocol compliance Long term these drivers will be cleaned up and made ready for upstream Signed-off-by: Rohit Consul <rohitco@xilinx.com>
-rw-r--r--drivers/staging/Kconfig2
-rw-r--r--drivers/staging/Makefile1
-rw-r--r--drivers/staging/xilinx/Kconfig9
-rw-r--r--drivers/staging/xilinx/Makefile3
-rw-r--r--drivers/staging/xilinx/hdmi/Kconfig20
-rw-r--r--drivers/staging/xilinx/hdmi/Makefile97
6 files changed, 132 insertions, 0 deletions
diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig
index e909951be172ed..2d1822f583e0ec 100644
--- a/drivers/staging/Kconfig
+++ b/drivers/staging/Kconfig
@@ -112,4 +112,6 @@ source "drivers/staging/vc04_services/Kconfig"
source "drivers/staging/fclk/Kconfig"
+source "drivers/staging/xilinx/Kconfig"
+
endif # STAGING
diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile
index b37a42342327c5..46306d2e69e6e8 100644
--- a/drivers/staging/Makefile
+++ b/drivers/staging/Makefile
@@ -45,3 +45,4 @@ obj-$(CONFIG_ISDN_I4L) += i4l/
obj-$(CONFIG_KS7010) += ks7010/
obj-$(CONFIG_GREYBUS) += greybus/
obj-$(CONFIG_BCM2708_VCHIQ) += vc04_services/
+obj-y += xilinx/
diff --git a/drivers/staging/xilinx/Kconfig b/drivers/staging/xilinx/Kconfig
new file mode 100644
index 00000000000000..5de178c977b3a6
--- /dev/null
+++ b/drivers/staging/xilinx/Kconfig
@@ -0,0 +1,9 @@
+if STAGING
+
+source "drivers/staging/xilinx/hdmi/Kconfig"
+
+source "drivers/staging/xilinx/clk/Kconfig"
+
+source "drivers/staging/xilinx/misc/Kconfig"
+
+endif # STAGING
diff --git a/drivers/staging/xilinx/Makefile b/drivers/staging/xilinx/Makefile
new file mode 100644
index 00000000000000..c421567309e8ef
--- /dev/null
+++ b/drivers/staging/xilinx/Makefile
@@ -0,0 +1,3 @@
+obj-y += hdmi/
+obj-y += misc/
+obj-y += clk/
diff --git a/drivers/staging/xilinx/hdmi/Kconfig b/drivers/staging/xilinx/hdmi/Kconfig
new file mode 100644
index 00000000000000..fe427d0c4c2397
--- /dev/null
+++ b/drivers/staging/xilinx/hdmi/Kconfig
@@ -0,0 +1,20 @@
+config VIDEO_XILINX_HDMI_RX
+ tristate "Xilinx HDMI RX V4L2"
+ depends on VIDEO_XILINX
+ select PHY_XILINX_VPHY
+ ---help---
+ V4L2 driver for the Xilinx HDMI RX Subsystem IP.
+
+config DRM_XILINX_HDMI
+ tristate "Xilinx DRM HDMI Driver"
+ depends on DRM_XILINX
+ select PHY_XILINX_VPHY
+ help
+ DRM driver for the Xilinx HDMI TX Subsystem IP.
+
+config PHY_XILINX_VPHY
+ tristate "Xilinx Video PHY driver"
+ depends on ARCH_ZYNQMP
+ select GENERIC_PHY
+ help
+ Enable this to support the Video PHY for HDMI.
diff --git a/drivers/staging/xilinx/hdmi/Makefile b/drivers/staging/xilinx/hdmi/Makefile
new file mode 100644
index 00000000000000..86961853ce0a60
--- /dev/null
+++ b/drivers/staging/xilinx/hdmi/Makefile
@@ -0,0 +1,97 @@
+# mainlining: remove CFLAGS<...> += -I$(src)/include
+# see below for further mainlining hints
+
+# in same cases only used to check against presence, i.e. >0, actual number is not used
+ccflags-y := -DXPAR_XVPHY_NUM_INSTANCES=4
+ccflags-y += -DXPAR_XV_HDMIRXSS_NUM_INSTANCES=4
+ccflags-y += -DXPAR_XV_HDMITXSS_NUM_INSTANCES=4
+ccflags-y += -DXPAR_XV_HDMIRX_NUM_INSTANCES=4
+ccflags-y += -DXPAR_XV_HDMITX_NUM_INSTANCES=4
+ccflags-y += -DXPAR_XVTC_NUM_INSTANCES=4
+
+ccflags-y += -DXPAR_VPHY_0_TRANSCEIVER=5
+ccflags-y += -DXPAR_VPHY_0_RX_PROTOCOL=1
+ccflags-y += -DXPAR_VPHY_0_TX_PROTOCOL=1
+ccflags-y += -DXPAR_XV_HDMIRX_0_DEVICE_ID=0
+ccflags-y += -DXPAR_XV_HDMITX_0_DEVICE_ID=0
+
+
+ccflags-y += -I${src}/phy-xilinx-vphy
+
+# the BSP code uses C99 style declarations. The kernel is on C89, but steps to C11 are underway.
+ccflags-y += -Wno-declaration-after-statement
+
+# V4L2 (HDMI RX)
+# mainlining: drivers/media/platform/xilinx/Makefile
+obj-$(CONFIG_VIDEO_XILINX_HDMI_RX) += xilinx-hdmi-rx.o
+
+# top-level Linux driver source
+xilinx-hdmi-rx-objs := xilinx-hdmirx.o
+
+# the C API around the IP registers
+CFLAGS_xilinx-hdmirx.o += -I$(src)/xilinx-hdmi-rx/
+CFLAGS_xilinx-hdmirx.o += -I$(src)/include/ -I${src}/../../../media/platform/xilinx
+CFLAGS_xilinx-hdmirx.o += -I${src}/phy-xilinx-vphy
+xilinx-hdmi-rx-objs += xilinx-hdmi-rx/xv_hdmirx.o
+xilinx-hdmi-rx-objs += xilinx-hdmi-rx/xv_hdmirx_sinit.o
+xilinx-hdmi-rx-objs += xilinx-hdmi-rx/xv_hdmirx_intr.o
+xilinx-hdmi-rx-objs += xilinx-hdmi-rx/xv_hdmirxss.o
+xilinx-hdmi-rx-objs += xilinx-hdmi-rx/xv_hdmirxss_log.o
+xilinx-hdmi-rx-objs += xilinx-hdmi-rx/xv_hdmirxss_coreinit.o
+xilinx-hdmi-rx-objs += xilinx-hdmi-rx/xv_hdmirxss_hdcp.o
+xilinx-hdmi-rx-objs += xilinx-hdmi-rx/xv_hdmirx_vsif.o
+
+
+# DRM (HDMI TX)
+# mainlining: drivers/gpu/drm/xilinx/Makefile
+
+obj-$(CONFIG_DRM_XILINX_HDMI) += xilinx-hdmi-tx.o
+
+# top-level Linux driver source
+xilinx-hdmi-tx-objs := xilinx_drm_hdmi.o
+
+# the C API around the IP registers
+CFLAGS_xilinx_drm_hdmi.o += -I$(src)/xilinx-hdmi-tx/ -Wno-unused-label
+CFLAGS_xilinx_drm_hdmi.o += -I$(src)/include -I${src}/../../../gpu/drm/xilinx/
+CFLAGS_xilinx_drm_hdmi.o += -I${src}/phy-xilinx-vphy
+
+xilinx-hdmi-tx-objs += xilinx-hdmi-tx/xv_hdmitx.o
+xilinx-hdmi-tx-objs += xilinx-hdmi-tx/xv_hdmitx_sinit.o
+xilinx-hdmi-tx-objs += xilinx-hdmi-tx/xv_hdmitx_intr.o
+xilinx-hdmi-tx-objs += xilinx-hdmi-tx/xv_hdmitxss.o
+xilinx-hdmi-tx-objs += xilinx-hdmi-tx/xv_hdmitxss_log.o
+xilinx-hdmi-tx-objs += xilinx-hdmi-tx/xv_hdmitxss_coreinit.o
+xilinx-hdmi-tx-objs += xilinx-hdmi-tx/xv_hdmitxss_hdcp.o
+xilinx-hdmi-tx-objs += xilinx-hdmi-tx/xv_hdmitx_vsif.o
+xilinx-hdmi-tx-objs += xilinx-hdmi-tx/xvtc.o
+xilinx-hdmi-tx-objs += xilinx-hdmi-tx/xvtc_intr.o
+xilinx-hdmi-tx-objs += xilinx-hdmi-tx/xvtc_sinit.o
+
+# module interdependency during linking
+# (probably only needed when building separate modules)
+KBUILD_EXTRA_SYMBOLS += ../../../phy/Modules.symvers
+
+# PHY (HDMI RX/TX)
+# mainlining: drivers/phy/Makefile
+
+obj-$(CONFIG_PHY_XILINX_VPHY) += phy-xilinx-vphy.o
+
+# top-level Linux driver source
+phy-xilinx-vphy-objs := phy-vphy.o
+
+CFLAGS_phy-vphy.o += -I$(src)/include
+
+# the C API around the IP registers
+CFLAGS_phy-vphy.o += -I$(src)/phy-xilinx-vphy/
+phy-xilinx-vphy-objs += phy-xilinx-vphy/xvphy.o
+phy-xilinx-vphy-objs += phy-xilinx-vphy/xvphy_i.o
+phy-xilinx-vphy-objs += phy-xilinx-vphy/xvphy_gthe4.o
+phy-xilinx-vphy-objs += phy-xilinx-vphy/xvphy_hdmi.o
+phy-xilinx-vphy-objs += phy-xilinx-vphy/xvphy_hdmi_intr.o
+phy-xilinx-vphy-objs += phy-xilinx-vphy/xvphy_intr.o
+phy-xilinx-vphy-objs += phy-xilinx-vphy/xvphy_log.o
+phy-xilinx-vphy-objs += phy-xilinx-vphy/xvphy_sinit.o
+phy-xilinx-vphy-objs += phy-xilinx-vphy/xvidc.o
+phy-xilinx-vphy-objs += phy-xilinx-vphy/xvidc_edid.o
+phy-xilinx-vphy-objs += phy-xilinx-vphy/xvidc_timings_table.o
+