summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Schenker <philippe.schenker@toradex.com>2020-03-13 20:20:14 +0100
committerStefan Agner <stefan.agner@toradex.com>2020-03-19 16:00:23 +0000
commit492fb93221f032c4d1450ec62002b4e11e832cac (patch)
treeeda3f47e495109b09cc5f84f0c0cb13f577b1727
parent32e6c85e8795dce3a654325fdbfb2946de891033 (diff)
recipes-core: Add udev-toradex-rules recipe
These rules make sure that a symlink is created for all i2c and tty devices. This symlinks are named like on the Toradex carrier boards. This makes it easy to identify which device in software is matching the hardware pins. Additional non-standard devices that are not named clearly on the carrier board are left out to prevent confusion. Related-to: ELB-2380 Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com> (cherry picked from commit 47ef64803548f73a0eda753c5d3d3f7f315af606)
-rw-r--r--recipes-core/udev/files/99-toradex.rules0
-rw-r--r--recipes-core/udev/files/apalis-imx6/99-toradex.rules9
-rw-r--r--recipes-core/udev/files/apalis-imx8/99-toradex.rules8
-rw-r--r--recipes-core/udev/files/apalis-imx8x/99-toradex.rules9
-rw-r--r--recipes-core/udev/files/colibri-imx6/99-toradex.rules7
-rw-r--r--recipes-core/udev/files/colibri-imx6ull/99-toradex.rules6
-rw-r--r--recipes-core/udev/files/colibri-imx7-emmc/99-toradex.rules6
-rw-r--r--recipes-core/udev/files/colibri-imx7/99-toradex.rules6
-rw-r--r--recipes-core/udev/files/colibri-imx8x/99-toradex.rules6
-rw-r--r--recipes-core/udev/files/verdin-imx8mm/99-toradex.rules8
-rw-r--r--recipes-core/udev/udev-toradex-rules.bb11
11 files changed, 76 insertions, 0 deletions
diff --git a/recipes-core/udev/files/99-toradex.rules b/recipes-core/udev/files/99-toradex.rules
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/recipes-core/udev/files/99-toradex.rules
diff --git a/recipes-core/udev/files/apalis-imx6/99-toradex.rules b/recipes-core/udev/files/apalis-imx6/99-toradex.rules
new file mode 100644
index 0000000..016a110
--- /dev/null
+++ b/recipes-core/udev/files/apalis-imx6/99-toradex.rules
@@ -0,0 +1,9 @@
+ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="21a0000.i2c", SYMLINK+="apalis-i2c1"
+ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="i2c@0", SYMLINK+="apalis-i2c2"
+ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="21a8000.i2c", SYMLINK+="apalis-i2c3"
+ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="21a4000.i2c", SYMLINK+="apalis-i2c-on-module"
+ACTION=="add", ATTRS{iomem_base}=="0x2020000", SYMLINK+="apalis-tty1"
+ACTION=="add", ATTRS{iomem_base}=="0x21E8000", SYMLINK+="apalis-tty2"
+ACTION=="add", ATTRS{iomem_base}=="0x21F0000", SYMLINK+="apalis-tty3"
+ACTION=="add", ATTRS{iomem_base}=="0x21F4000", SYMLINK+="apalis-tty4"
+ACTION=="add", KERNELS=="20bc000.wdog", SYMLINK+="apalis-watchdog"
diff --git a/recipes-core/udev/files/apalis-imx8/99-toradex.rules b/recipes-core/udev/files/apalis-imx8/99-toradex.rules
new file mode 100644
index 0000000..0599594
--- /dev/null
+++ b/recipes-core/udev/files/apalis-imx8/99-toradex.rules
@@ -0,0 +1,8 @@
+ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="5a820000.i2c", SYMLINK+="apalis-i2c1"
+ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="5a830000.i2c", SYMLINK+="apalis-i2c3"
+ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="5a810000.i2c", SYMLINK+="apalis-i2c-on-module"
+ACTION=="add", ATTRS{iomem_base}=="0x5A070010", SYMLINK+="apalis-tty1"
+ACTION=="add", ATTRS{iomem_base}=="0x5A090010", SYMLINK+="apalis-tty2"
+ACTION=="add", ATTRS{iomem_base}=="0x5A060010", SYMLINK+="apalis-tty3"
+ACTION=="add", ATTRS{iomem_base}=="0x5A080010", SYMLINK+="apalis-tty4"
+ACTION=="add", KERNELS=="watchdog", SYMLINK+="apalis-watchdog"
diff --git a/recipes-core/udev/files/apalis-imx8x/99-toradex.rules b/recipes-core/udev/files/apalis-imx8x/99-toradex.rules
new file mode 100644
index 0000000..960ede0
--- /dev/null
+++ b/recipes-core/udev/files/apalis-imx8x/99-toradex.rules
@@ -0,0 +1,9 @@
+ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="5a810000.i2c", SYMLINK+="apalis-i2c1"
+ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="56246000.i2c", SYMLINK+="apalis-i2c2"
+ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="5a830000.i2c", SYMLINK+="apalis-i2c3"
+ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="5a800000.i2c", SYMLINK+="apalis-i2c-on-module"
+ACTION=="add", ATTRS{iomem_base}=="0x5A070010", SYMLINK+="apalis-tty1"
+ACTION=="add", ATTRS{iomem_base}=="0x5A060010", SYMLINK+="apalis-tty2"
+ACTION=="add", ATTRS{iomem_base}=="0x5A080010", SYMLINK+="apalis-tty3"
+ACTION=="add", ATTRS{iomem_base}=="0x5A090010", SYMLINK+="apalis-tty4"
+ACTION=="add", KERNELS=="watchdog", SYMLINK+="apalis-watchdog"
diff --git a/recipes-core/udev/files/colibri-imx6/99-toradex.rules b/recipes-core/udev/files/colibri-imx6/99-toradex.rules
new file mode 100644
index 0000000..b1624bb
--- /dev/null
+++ b/recipes-core/udev/files/colibri-imx6/99-toradex.rules
@@ -0,0 +1,7 @@
+ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="21a8000.i2c", SYMLINK+="colibri-i2c"
+ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="i2c@0", SYMLINK+="colibri-i2c-ddc"
+ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="21a4000.i2c", SYMLINK+="colibri-i2c-on-module"
+ACTION=="add", ATTRS{iomem_base}=="0x2020000", SYMLINK+="colibri-ttya"
+ACTION=="add", ATTRS{iomem_base}=="0x21E8000", SYMLINK+="colibri-ttyb"
+ACTION=="add", ATTRS{iomem_base}=="0x21EC000", SYMLINK+="colibri-ttyc"
+ACTION=="add", KERNELS=="20bc000.wdog", SYMLINK+="colibri-watchdog"
diff --git a/recipes-core/udev/files/colibri-imx6ull/99-toradex.rules b/recipes-core/udev/files/colibri-imx6ull/99-toradex.rules
new file mode 100644
index 0000000..7fbfb6d
--- /dev/null
+++ b/recipes-core/udev/files/colibri-imx6ull/99-toradex.rules
@@ -0,0 +1,6 @@
+ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="21a0000.i2c", SYMLINK+="colibri-i2c"
+ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="21a4000.i2c", SYMLINK+="colibri-i2c-on-module"
+ACTION=="add", ATTRS{iomem_base}=="0x2020000", SYMLINK+="colibri-ttya"
+ACTION=="add", ATTRS{iomem_base}=="0x21E8000", SYMLINK+="colibri-ttyb"
+ACTION=="add", ATTRS{iomem_base}=="0x21F4000", SYMLINK+="colibri-ttyc"
+ACTION=="add", KERNELS=="20bc000.wdog", SYMLINK+="colibri-watchdog"
diff --git a/recipes-core/udev/files/colibri-imx7-emmc/99-toradex.rules b/recipes-core/udev/files/colibri-imx7-emmc/99-toradex.rules
new file mode 100644
index 0000000..b82f24a
--- /dev/null
+++ b/recipes-core/udev/files/colibri-imx7-emmc/99-toradex.rules
@@ -0,0 +1,6 @@
+ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="30a50000.i2c", SYMLINK+="colibri-i2c"
+ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="30a20000.i2c", SYMLINK+="colibri-i2c-on-module"
+ACTION=="add", ATTRS{iomem_base}=="0x30860000", SYMLINK+="colibri-ttya"
+ACTION=="add", ATTRS{iomem_base}=="0x30890000", SYMLINK+="colibri-ttyb"
+ACTION=="add", ATTRS{iomem_base}=="0x30880000", SYMLINK+="colibri-ttyc"
+ACTION=="add", KERNEL=="watchdog", DRIVERS=="rn5t618-wdt", SYMLINK+="colibri-watchdog"
diff --git a/recipes-core/udev/files/colibri-imx7/99-toradex.rules b/recipes-core/udev/files/colibri-imx7/99-toradex.rules
new file mode 100644
index 0000000..b82f24a
--- /dev/null
+++ b/recipes-core/udev/files/colibri-imx7/99-toradex.rules
@@ -0,0 +1,6 @@
+ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="30a50000.i2c", SYMLINK+="colibri-i2c"
+ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="30a20000.i2c", SYMLINK+="colibri-i2c-on-module"
+ACTION=="add", ATTRS{iomem_base}=="0x30860000", SYMLINK+="colibri-ttya"
+ACTION=="add", ATTRS{iomem_base}=="0x30890000", SYMLINK+="colibri-ttyb"
+ACTION=="add", ATTRS{iomem_base}=="0x30880000", SYMLINK+="colibri-ttyc"
+ACTION=="add", KERNEL=="watchdog", DRIVERS=="rn5t618-wdt", SYMLINK+="colibri-watchdog"
diff --git a/recipes-core/udev/files/colibri-imx8x/99-toradex.rules b/recipes-core/udev/files/colibri-imx8x/99-toradex.rules
new file mode 100644
index 0000000..00390f1
--- /dev/null
+++ b/recipes-core/udev/files/colibri-imx8x/99-toradex.rules
@@ -0,0 +1,6 @@
+ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="5a810000.i2c", SYMLINK+="colibri-i2c"
+ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="5a800000.i2c", SYMLINK+="colibri-i2c-on-module"
+ACTION=="add", ATTRS{iomem_base}=="0x5A090010", SYMLINK+="colibri-ttya"
+ACTION=="add", ATTRS{iomem_base}=="0x5A060010", SYMLINK+="colibri-ttyb"
+ACTION=="add", ATTRS{iomem_base}=="0x5A080010", SYMLINK+="colibri-ttyc"
+ACTION=="add", KERNELS=="watchdog", SYMLINK+="colibri-watchdog"
diff --git a/recipes-core/udev/files/verdin-imx8mm/99-toradex.rules b/recipes-core/udev/files/verdin-imx8mm/99-toradex.rules
new file mode 100644
index 0000000..b0ee1f2
--- /dev/null
+++ b/recipes-core/udev/files/verdin-imx8mm/99-toradex.rules
@@ -0,0 +1,8 @@
+ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="30a50000.i2c", SYMLINK+="verdin-i2c1"
+ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="30a30000.i2c", SYMLINK+="verdin-i2c2"
+ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="30a40000.i2c", SYMLINK+="verdin-i2c4"
+ACTION=="add", KERNEL=="i2c-[0-9]*", ATTRS{name}=="30a20000.i2c", SYMLINK+="verdin-i2c-on-module"
+ACTION=="add", ATTRS{iomem_base}=="0x30890000", SYMLINK+="verdin-tty1"
+ACTION=="add", ATTRS{iomem_base}=="0x30880000", SYMLINK+="verdin-tty2"
+ACTION=="add", ATTRS{iomem_base}=="0x30860000", SYMLINK+="verdin-tty3"
+ACTION=="add", KERNELS=="watchdog", SYMLINK+="verdin-watchdog"
diff --git a/recipes-core/udev/udev-toradex-rules.bb b/recipes-core/udev/udev-toradex-rules.bb
new file mode 100644
index 0000000..9cc69a9
--- /dev/null
+++ b/recipes-core/udev/udev-toradex-rules.bb
@@ -0,0 +1,11 @@
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+SRC_URI = "\
+ file://99-toradex.rules \
+"
+
+do_install () {
+ install -d ${D}${sysconfdir}/udev/rules.d
+ install -m 0644 ${WORKDIR}/99-toradex.rules ${D}${sysconfdir}/udev/rules.d/
+}