summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2020-09-16 11:35:10 -0500
committerJohn Klug <john.klug@multitech.com>2021-06-23 05:38:28 -0500
commit403698bff59eeb3de3408ce4810ee96b00c72035 (patch)
tree270d5ba23419af4ef0d11adfcffca11bc02244d4
parent6e1eaedfba3e9168011228eadc50f114ab182775 (diff)
downloadmeta-multitech-atmel-403698bff59eeb3de3408ce4810ee96b00c72035.tar.gz
meta-multitech-atmel-403698bff59eeb3de3408ce4810ee96b00c72035.tar.bz2
meta-multitech-atmel-403698bff59eeb3de3408ce4810ee96b00c72035.zip
Fix up GNSS for MTCDTIP2
-rw-r--r--recipes-kernel/linux/linux-at91-4.9.87/mtcap/linux-4.9-mtcap-device-tree.patch81
-rw-r--r--recipes-kernel/linux/linux-at91_4.9.87.bb5
2 files changed, 48 insertions, 38 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 ba75daa..0486c5c 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
@@ -255,10 +255,10 @@ diff -Naru linux-4.9.87.orig/arch/arm/boot/dts/Makefile linux-4.9.87/arch/arm/bo
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-31 18:11:18.651648726 -0600
-@@ -0,0 +1,301 @@
+diff -Naru orig/arch/arm/boot/dts/mtcap.dts new/arch/arm/boot/dts/mtcap.dts
+--- orig/arch/arm/boot/dts/mtcap.dts 1969-12-31 18:00:00.000000000 -0600
++++ new/arch/arm/boot/dts/mtcap.dts 2020-09-16 11:22:15.246528081 -0500
+@@ -0,0 +1,311 @@
+/*
+ * DTS file for Multi-Tech Systems MTCAP Hardware
+ *
@@ -282,7 +282,7 @@ diff -Naru linux-4.9.87.orig/arch/arm/boot/dts/mtcap.dts linux-4.9.87/arch/arm/b
+ aliases {
+ spi0 = "/ahb/apb/spi@f0000000";
+ ssc0 = "";
-+ serial1 = "";
++ serial1 = "&uart0";
+ serial2 = "";
+ serial3 = "";
+ serial4 = "";
@@ -393,12 +393,23 @@ diff -Naru linux-4.9.87.orig/arch/arm/boot/dts/mtcap.dts linux-4.9.87/arch/arm/b
+ atmel,use-dma-tx;
+ };
+
-+ usb2: gadget@f803c000 {
-+ atmel,vbus-gpio = <&pioB 16 GPIO_ACTIVE_HIGH>;
-+ status = "okay";
-+ };
-+ watchdog@fffffe40 {
-+ status = "okay";
++ /* uart0 is GNSS on MTCDTIP2, enabled by overlay */
++ uart0: serial@f8040000 {
++ status = "disabled";
++ atmel,use-dma-rx;
++ atmel,use-dma-tx;
++ /* Table 30-1 of the SAM9G25 datasheet specifies the dma channel numbers
++ * for TWI0 (I2C). Note that a channel number is a slot in a table
++ * in the kernel when printed in the kernel log. It has nothing to do
++ * with the channel numbers specified here which correspond to the
++ * SAM9G25 datasheet.
++ * In atmel-dma.txt kernel documentation the SAM9G25 channel number
++ * is referred to as:
++ * peripheral identifier for the hardware handshaking interface
++ */
++ dmas = <&dma0 1 AT91_DMA_CFG_PER_ID(11)>,
++ <&dma0 1 (AT91_DMA_CFG_PER_ID(12) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
++ dma-names = "tx", "rx";
+ };
+ spi@f0000000 {
+ status = "okay";
@@ -424,7 +435,6 @@ diff -Naru linux-4.9.87.orig/arch/arm/boot/dts/mtcap.dts linux-4.9.87/arch/arm/b
+ /delete-node/ serial@f8024000;
+ /delete-node/ serial@f8024400;
+ /delete-node/ serial@f8028000;
-+ /delete-node/ serial@f8040000;
+ /delete-node/ serial@f8044000;
+ /delete-node/ gadget@f803c000;
+ /delete-node/ adc@f804c000;
@@ -524,34 +534,34 @@ diff -Naru linux-4.9.87.orig/arch/arm/boot/dts/mtcap.dts linux-4.9.87/arch/arm/b
+ };
+ };
+
-+ /* GPS-PPS input on AP1 - enabled by overlay*/
-+ pps-0 {
++ /* GPS-PPS input on AP1 MTCDTIP2 - enabled by overlay*/
++ pps-0 {
+ compatible = "pps-gpio";
+ gpios = <&pioC 10 0>;
+ capture-clear;
+ status = "disabled";
-+ };
++ };
+
-+ i2c0: i2c@f8010000 {
-+ compatible = "atmel,at91sam9x5-i2c";
-+ reg = <0xf8010000 0x100>;
-+ interrupts = <9 IRQ_TYPE_LEVEL_HIGH 6>;
-+ mas = <&dma0 1 AT91_DMA_CFG_PER_ID(7)>,
-+ <&dma0 1 AT91_DMA_CFG_PER_ID(8)>;
-+ dma-names = "tx", "rx";
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ pinctrl-names = "default";
-+ pinctrl-0 = <&pinctrl_i2c0>;
-+ clocks = <&twi0_clk>;
-+ status = "okay";
-+ id_eeprom@56 {
-+ compatible = "atmel,24c04";
-+ reg = <0x56>;
-+ pagesize = <16>;
-+ status = "okay";
-+ };
-+ };
++ i2c0: i2c@f8010000 {
++ compatible = "atmel,at91sam9x5-i2c";
++ reg = <0xf8010000 0x100>;
++ interrupts = <9 IRQ_TYPE_LEVEL_HIGH 6>;
++ dmas = <&dma0 1 AT91_DMA_CFG_PER_ID(7)>,
++ <&dma0 1 AT91_DMA_CFG_PER_ID(8)>;
++ dma-names = "tx", "rx";
++ #address-cells = <1>;
++ #size-cells = <0>;
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_i2c0>;
++ clocks = <&twi0_clk>;
++ status = "okay";
++ id_eeprom@56 {
++ compatible = "atmel,24c04";
++ reg = <0x56>;
++ pagesize = <16>;
++ status = "okay";
++ };
++ };
+
+ mts-io-0 {
+ status = "okay";
@@ -560,3 +570,4 @@ diff -Naru linux-4.9.87.orig/arch/arm/boot/dts/mtcap.dts linux-4.9.87/arch/arm/b
+ pinctrl-0 = <&pinctrl_mts_io>;
+ };
+};
+
diff --git a/recipes-kernel/linux/linux-at91_4.9.87.bb b/recipes-kernel/linux/linux-at91_4.9.87.bb
index 6c863cd..26a5d21 100644
--- a/recipes-kernel/linux/linux-at91_4.9.87.bb
+++ b/recipes-kernel/linux/linux-at91_4.9.87.bb
@@ -18,8 +18,7 @@ RDEPENDS_${KERNEL_PACKAGE_NAME}-base=""
FILESEXTRAPATHS_prepend := "${THISDIR}/${P}:"
KERNEL_EXTRA_ARGS ="LOADADDR=0x20008000"
-PR = "r12"
-PKGR_kernel-module-i2c-at91 = "${PR}a${EXTENDPRAUTO}"
+PR = "r13"
KERNEL_VERSION = "${PV}"
KERNEL_REVISION = "${PR}"
EXTRAVERSION = ""
@@ -165,4 +164,4 @@ do_install_append() {
}
FILES_kernel-dt-bindings-dev = "/usr/include/linux/dt-bindings"
-FILES_kernel-module-i2c-at91 += "${sysconfdir}/modprobe.d/i2c-at91.conf"
+FILES_kernel-module-i2c-at91 += "${sysconfdir}/modprobe.d" \ No newline at end of file