Skip to contentSkip to conversation

linux-ti-staging: Update to include uio device tree entries

PATCH New Jacob Stiffler 1 participant 1 message Feb 2, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 linux-ti-staging: Update to include uio device tree entries

- Adds device tree entries for multiple devices that use uio driver
- These entries are added for k2h, k2l & k2e : keystone2 platforms

---
v2 changes:
* Changed shortlog "ti-staging" to "linux-ti-staging"
* Removed redundant "+=" from "_append" var
* Added "ENABLE_TI_UIO_DEVICES" to enable the uio device nodes

 recipes-kernel/linux/files/k2e-evm/k2e-uio.dtsi    |  32 ++++
 recipes-kernel/linux/files/k2hk-evm/k2hk-uio.dtsi  |  58 +++++++
 recipes-kernel/linux/files/k2l-evm/k2l-uio.dtsi    |  10 ++
 .../linux/files/keystone/keystone-uio.dtsi         | 186 +++++++++++++++++++++
 recipes-kernel/linux/linux-ti-staging_4.1.bb       |   3 +-
 recipes-kernel/linux/ti-uio.inc                    |  27 +++
 6 files changed, 315 insertions(+), 1 deletion(-)
 create mode 100644 recipes-kernel/linux/files/k2e-evm/k2e-uio.dtsi
 create mode 100644 recipes-kernel/linux/files/k2hk-evm/k2hk-uio.dtsi
 create mode 100644 recipes-kernel/linux/files/k2l-evm/k2l-uio.dtsi
 create mode 100644 recipes-kernel/linux/files/keystone/keystone-uio.dtsi
 create mode 100644 recipes-kernel/linux/ti-uio.inc
recipes-kernel/linux/files/k2e-evm/k2e-uio.dtsi new file +32 -0
new file mode 100644
index 0000000..36f41b0
@@ -0,0 +1,32 @@
+/ {
+	soc {
+		uio_hyperlink0: hyperlink0 {
+			compatible = "ti,uio-ti-pdrv";
+			mem  = <0x21400000 0x00001000
+				0x40000000 0x10000000
+				0x0231a000 0x00002000>;
+			clocks = <&clkhyperlink0>;
+			interrupts	= <0 387 0x101>;
+			cfg-params
+			{
+				ti,serdes_refclk_khz = <312500>;
+				ti,serdes_maxserrate_khz = <6250000>;
+				ti,serdes_lanerate = "half";
+				ti,serdes_numlanes = <4>;
+				ti,serdes_c1 = <4 4 4 4>;
+				ti,serdes_c2 = <0 0 0 0>;
+				ti,serdes_cm = <0 0 0 0>;
+				ti,serdes_tx_att = <12 12 12 12>;
+				ti,serdes_tx_vreg = <4 4 4 4>;
+				ti,serdes_rx_att = <11 11 11 11>;
+				ti,serdes_rx_boost = <3 3 3 3>;
+			};
+		};
+		uio_srss: srss {
+			compatible = "ti,uio-ti-pdrv";
+			mem  = <0x02330000 0x0000400>;
+			clocks=<&clksr>;
+			interrupts = <0 0x173 0xf01>;
+		};
+	};
+};
recipes-kernel/linux/files/k2hk-evm/k2hk-uio.dtsi new file +58 -0

58 lines not on this page · raw message

recipes-kernel/linux/files/k2l-evm/k2l-uio.dtsi new file +10 -0
new file mode 100644
index 0000000..0334483
@@ -0,0 +1,10 @@
+/ {
+	soc {
+		uio_srss: srss {
+			compatible = "ti,uio-ti-pdrv";
+			mem  = <0x02330000 0x0000400>;
+			clocks=<&clksr>;
+			interrupts = <0 0x173 0xf01>;
+		};
+	};
+};
recipes-kernel/linux/files/keystone/keystone-uio.dtsi new file +186 -0

186 lines not on this page · raw message

recipes-kernel/linux/linux-ti-staging_4.1.bb +2 -1
index 71f2de9..689a086 100644
@@ -8,6 +8,7 @@ inherit kernel
 require recipes-kernel/linux/linux-dtb.inc
 require recipes-kernel/linux/setup-defconfig.inc
 require recipes-kernel/linux/cmem.inc
+require recipes-kernel/linux/ti-uio.inc
 
 # Look in the generic major.minor directory for files
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-4.1:"
@@ -68,7 +69,7 @@ SRCREV = "e4346cf990da13eb936de5e130d8a4baab5c5688"
 PV = "4.1.17+git${SRCPV}"
 
 # Append to the MACHINE_KERNEL_PR so that a new SRCREV will cause a rebuild
-MACHINE_KERNEL_PR_append = "a"
+MACHINE_KERNEL_PR_append = "b"
 PR = "${MACHINE_KERNEL_PR}"
 
 KERNEL_CONFIG_DIR = "${S}/ti_config_fragments"
recipes-kernel/linux/ti-uio.inc new file +27 -0
new file mode 100644
index 0000000..776e4a4
@@ -0,0 +1,27 @@
+SRC_URI_append_keystone = " file://keystone-uio.dtsi"
+SRC_URI_append_k2hk-evm = " file://k2hk-uio.dtsi"
+SRC_URI_append_k2l-evm = " file://k2l-uio.dtsi"
+SRC_URI_append_k2e-evm = " file://k2e-uio.dtsi"
+
+DTSI_LIST = ""
+DTSI_LIST_append_keystone = " keystone-uio.dtsi"
+DTSI_LIST_append_k2hk-evm = " k2hk-uio.dtsi"
+DTSI_LIST_append_k2l-evm = " k2l-uio.dtsi"
+DTSI_LIST_append_k2e-evm = " k2e-uio.dtsi"
+
+do_setup_uio() {
+    if [ "${ENABLE_TI_UIO_DEVICES}" == "1" ]
+    then
+        for dtsi in ${DTSI_LIST}
+        do
+            cp ${WORKDIR}/${dtsi} ${S}/arch/arm/boot/dts/
+            for dtb in ${KERNEL_DEVICETREE}
+            do
+                dts=`echo $dtb | sed -e 's|dtb$|dts|'`
+                echo "#include \"${dtsi}\"" >> ${S}/arch/arm/boot/dts/$dts
+            done
+        done
+    fi
+}
+
+do_patch[postfuncs] += "do_setup_uio"
Signature · 1 line
1.9.1