summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2019-01-31 18:21:32 -0600
committerJohn Klug <john.klug@multitech.com>2019-07-03 11:22:01 -0500
commit90e71ca5fe1b09c669c5456aa8317b1403152f18 (patch)
tree930b610d75dcd10395eb71d7371090549eccfd15
parent35da4ce8454b036b7fe456213901a45771d3cc7d (diff)
downloadmeta-multitech-90e71ca5fe1b09c669c5456aa8317b1403152f18.tar.gz
meta-multitech-90e71ca5fe1b09c669c5456aa8317b1403152f18.tar.bz2
meta-multitech-90e71ca5fe1b09c669c5456aa8317b1403152f18.zip
Pins must be set from a driver. Tie the radio pins to the MTS-IO driver.
-rw-r--r--recipes-kernel/linux/linux-at91-4.9.87/mtcap/linux-4.9-mtcap-device-tree.patch29
1 files changed, 25 insertions, 4 deletions
diff --git a/recipes-kernel/linux/linux-at91-4.9.87/mtcap/linux-4.9-mtcap-device-tree.patch b/recipes-kernel/linux/linux-at91-4.9.87/mtcap/linux-4.9-mtcap-device-tree.patch
index 7bb7268..0173ed0 100644
--- a/recipes-kernel/linux/linux-at91-4.9.87/mtcap/linux-4.9-mtcap-device-tree.patch
+++ b/recipes-kernel/linux/linux-at91-4.9.87/mtcap/linux-4.9-mtcap-device-tree.patch
@@ -245,10 +245,20 @@ diff -Naru linux-4.9.87.orig/arch/arm/boot/dts/Makefile linux-4.9.87/arch/arm/bo
dtb-$(CONFIG_SOC_SAM_V7) += \
at91-kizbox2.dtb \
at91-sama5d2_ptc_ek.dtb \
+===================================================================================================
+ The dts file contains pinctrl to set the pull-up and pull-down features using the at91 pinctrl
+ driver. Because pins seemed to be assigned random values if not set, it is probably good
+ to set any pin used by mts-io here, and it wouldn't be a bad idea to set unused pins as well,
+ since they can be both pull-up and pull-down at the same time.
+ For future hardware revisions, it should be possible to overwrite the pinctrl with an overlay
+ prior to loading the mts-io driver.
+
+ To use the pinctrl, one must call platform_device_register() in the driver.
+==================================================================================================
diff -Naru linux-4.9.87.orig/arch/arm/boot/dts/mtcap.dts linux-4.9.87/arch/arm/boot/dts/mtcap.dts
--- linux-4.9.87.orig/arch/arm/boot/dts/mtcap.dts 1969-12-31 18:00:00.000000000 -0600
-+++ linux-4.9.87/arch/arm/boot/dts/mtcap.dts 2019-01-30 18:15:28.034199195 -0600
-@@ -0,0 +1,253 @@
++++ linux-4.9.87/arch/arm/boot/dts/mtcap.dts 2019-01-31 18:11:18.651648726 -0600
+@@ -0,0 +1,264 @@
+/*
+ * DTS file for Multi-Tech Systems MTCAP Hardware
+ *
@@ -345,9 +355,13 @@ diff -Naru linux-4.9.87.orig/arch/arm/boot/dts/mtcap.dts linux-4.9.87/arch/arm/b
+ /*
+ * Pin D21 will be left floating when the power goes off on the radio.
+ * We need to pull it down to ensure it is low during radio power-off.
++ * pinctrl is loaded during the call to platform_device_register() in mts-io.
++ * If we need to customize this for various hardware revisions, these can
++ * be loaded as overlays prior to loading the mts-io module, overwriting the
++ * atmel,pins section.
+ */
-+ radio_control {
-+ pinctrl_radio_control: radio_control-0 {
++ mts_io {
++ pinctrl_mts_io: mts_io-0 {
+ atmel,pins =
+ <AT91_PIOA 21 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP /* PA21 GPIO pull-up radio-power */
+ AT91_PIOA 22 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP /* PA22 GPIO pull-up radio-reset */
@@ -501,4 +515,11 @@ diff -Naru linux-4.9.87.orig/arch/arm/boot/dts/mtcap.dts linux-4.9.87/arch/arm/b
+ status = "okay";
+ };
+ };
++
++ mts-io-0 {
++ status = "okay";
++ compatible = "mts,mts-io";
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_mts_io>;
++ };
+};