diff options
author | John Klug <john.klug@multitech.com> | 2018-10-23 12:30:40 -0500 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2019-07-03 11:22:01 -0500 |
commit | 18f53bbb76981baf8cf2dd565a7f591af8190997 (patch) | |
tree | ef6f7689c5e0a61179bbc332007674ab6663246a /recipes-kernel | |
parent | a69466795e6061db3fcbe2c26365397305b5afdf (diff) | |
download | meta-multitech-18f53bbb76981baf8cf2dd565a7f591af8190997.tar.gz meta-multitech-18f53bbb76981baf8cf2dd565a7f591af8190997.tar.bz2 meta-multitech-18f53bbb76981baf8cf2dd565a7f591af8190997.zip |
Add device tree and EEPROM code to kernel
Diffstat (limited to 'recipes-kernel')
4 files changed, 673 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-at91-4.9/linux-4.9-add-num_accessory_ports-config-option.patch b/recipes-kernel/linux/linux-at91-4.9/linux-4.9-add-num_accessory_ports-config-option.patch new file mode 100644 index 0000000..d1bd7cd --- /dev/null +++ b/recipes-kernel/linux/linux-at91-4.9/linux-4.9-add-num_accessory_ports-config-option.patch @@ -0,0 +1,22 @@ +Index: linux-3.12.13/arch/arm/Kconfig +=================================================================== +--- linux-3.12.13.orig/arch/arm/Kconfig 2014-02-22 15:32:50.000000000 -0600 ++++ linux-3.12.13/arch/arm/Kconfig 2014-09-11 14:57:00.908030666 -0500 +@@ -276,6 +276,17 @@ + + source "kernel/Kconfig.freezer" + ++menu "MTS" ++ ++config MTS_NUM_ACCESSORY_PORTS ++ int "Number of accessory ports in the MTS product" ++ default 0 ++ help ++ Enter the number of accessory ports on your MTS device. ++ If unsure, say '0'. ++ ++endmenu ++ + menu "System Type" + + config MMU diff --git a/recipes-kernel/linux/linux-at91-4.9/mtcdt/linux-4.9-eeprom-setup-mtcdt.patch b/recipes-kernel/linux/linux-at91-4.9/mtcdt/linux-4.9-eeprom-setup-mtcdt.patch new file mode 100644 index 0000000..a738ddd --- /dev/null +++ b/recipes-kernel/linux/linux-at91-4.9/mtcdt/linux-4.9-eeprom-setup-mtcdt.patch @@ -0,0 +1,163 @@ +diff -Naru 4.9+gitAUTOINC+29796588eb.orig/arch/arm/mach-at91/at91sam9.c 4.9+gitAUTOINC+29796588eb/arch/arm/mach-at91/at91sam9.c +--- 4.9+gitAUTOINC+29796588eb.orig/arch/arm/mach-at91/at91sam9.c 2018-10-23 11:58:04.826463464 -0500 ++++ 4.9+gitAUTOINC+29796588eb/arch/arm/mach-at91/at91sam9.c 2018-10-23 11:54:56.166469050 -0500 +@@ -14,6 +14,87 @@ + #include <asm/system_misc.h> + + #include "generic.h" ++#include <linux/mts_at24.h> ++ ++uint8_t mts_id_eeprom[512]; ++ ++EXPORT_SYMBOL(mts_id_eeprom); ++ ++static void mts_id_eeprom_load(struct nvmem_device *nvmem, void *context) ++{ ++ int tmp; ++ ++ memset(mts_id_eeprom, 0, sizeof(mts_id_eeprom)); ++ ++ tmp = nvmem_device_read(nvmem, 0, sizeof(mts_id_eeprom), mts_id_eeprom); ++ if (tmp != sizeof(mts_id_eeprom)) { ++ printk(KERN_ERR "sam9x5: id eeprom read failed: %d\n", tmp); ++ } else { ++ printk(KERN_INFO "sam9x5: read %d bytes from id eeprom\n", tmp); ++ } ++} ++ ++struct mts_eeprom_callback id_eeprom_callback = { ++ .address = 0x56, ++ .index = -1, ++ .setup = mts_id_eeprom_load, ++}; ++ ++#ifdef CONFIG_MTS_NUM_ACCESSORY_PORTS ++#define NUM_AP CONFIG_MTS_NUM_ACCESSORY_PORTS ++#else ++#define NUM_AP 0 ++#endif ++ ++#if NUM_AP > 0 ++ ++uint8_t mts_ap_eeprom[NUM_AP][512]; ++ ++EXPORT_SYMBOL(mts_ap_eeprom); ++ ++static void mts_ap_eeprom_load(struct nvmem_device *nvmem, void *context) ++{ ++ int tmp; ++ int* index = (int*)context; ++ ++ memset(mts_ap_eeprom[*index], 0, sizeof(mts_ap_eeprom[*index])); ++ ++ tmp = macc->read(macc, mts_ap_eeprom[*index], 0, sizeof(mts_ap_eeprom[*index])); ++ tmp = nvmem_device_read(nvmem, 0, sizeof(mts_ap_eeprom[*index]), mts_ap_eeprom[*index]); ++ if (tmp != sizeof(mts_ap_eeprom[*index])) { ++ printk(KERN_INFO "sam9x5: ap%d eeprom read failed: %d\n", *index + 1, tmp); ++ } else { ++ printk(KERN_INFO "sam9x5: read %d bytes from ap%d eeprom\n", tmp, *index + 1); ++ } ++} ++ ++struct mts_eeprom_callback ap1_eeprom_callback = { ++ .address = 0x50, ++ .index = 0, ++ .setup = mts_ap_eeprom_load, ++}; ++ ++struct mts_eeprom_callback ap2_eeprom_callback = { ++ .address = 0x52, ++ .index = 1, ++ .setup = mts_ap_eeprom_load, ++}; ++ ++struct mts_eeprom_callback* mts_eeprom_callback_lookup[] = { ++ &id_eeprom_callback, ++ &ap1_eeprom_callback, ++ &ap2_eeprom_callback, ++ NULL ++}; ++ ++#else ++ ++struct mts_eeprom_callback* mts_eeprom_callback_lookup[] = { ++ &id_eeprom_callback, ++ NULL ++}; ++ ++#endif + + static void __init at91sam9_init(void) + { +Index: linux-3.12.27/drivers/misc/eeprom/at24.c +=================================================================== +--- linux-3.12.27.orig/drivers/misc/eeprom/at24.c 2014-08-26 07:12:26.000000000 -0500 ++++ linux-3.12.27/drivers/misc/eeprom/at24.c 2014-09-23 11:41:52.470331651 -0500 +@@ -24,6 +24,8 @@ + #include <linux/i2c.h> + #include <linux/i2c/at24.h> + ++#include <linux/mts_at24.h> ++ + /* + * I2C EEPROMs from most vendors are inexpensive and mostly interchangeable. + * Differences between different vendor product lines (like Atmel AT24C or +@@ -473,6 +475,23 @@ + chip->page_size = be32_to_cpup(val); + } + } ++ ++static void at24_get_setup(struct i2c_client *client, ++ struct at24_platform_data *chip) ++{ ++ int i; ++ ++ for (i = 0; mts_eeprom_callback_lookup[i] != NULL; i++) { ++ if (mts_eeprom_callback_lookup[i]->address == client->addr) { ++ printk(KERN_INFO "%s: found a match for eeprom at %X\n", __func__, client->addr); ++ chip->setup = mts_eeprom_callback_lookup[i]->setup; ++ if (mts_eeprom_callback_lookup[i]->index > -1) { ++ chip->context = (void*)&mts_eeprom_callback_lookup[i]->index; ++ } ++ break; ++ } ++ } ++} + #else + static void at24_get_ofdata(struct i2c_client *client, + struct at24_platform_data *chip) +@@ -505,12 +524,14 @@ + * is recommended anyhow. + */ + chip.page_size = 1; ++ chip.setup = NULL; ++ chip.context = NULL; + + /* update chipdata if OF is present */ + at24_get_ofdata(client, &chip); + +- chip.setup = NULL; +- chip.context = NULL; ++ /* see if we have a setup callback */ ++ at24_get_setup(client, &chip); + } + + if (!is_power_of_2(chip.byte_len)) +diff -Naru 4.9+gitAUTOINC+29796588eb.orig/include/linux/mts_at24.h 4.9+gitAUTOINC+29796588eb/include/linux/mts_at24.h +--- 4.9+gitAUTOINC+29796588eb.orig/include/linux/mts_at24.h 1969-12-31 18:00:00.000000000 -0600 ++++ 4.9+gitAUTOINC+29796588eb/include/linux/mts_at24.h 2018-10-23 11:45:29.406485828 -0500 +@@ -0,0 +1,14 @@ ++#ifndef _LINUX_MTSAT24_H ++#define _LINUX_MTSAT24_H ++ ++#include <linux/nvmem-consumer.h> ++ ++struct mts_eeprom_callback { ++ unsigned short address; ++ int index; ++ void (*setup)(struct nvmem_device *, void *context); ++}; ++ ++extern struct mts_eeprom_callback* mts_eeprom_callback_lookup[]; ++ ++#endif /* _LINUX_MTSAT24_H */ diff --git a/recipes-kernel/linux/linux-at91-4.9/mtcdt/linux-4.9-mtcdt-device-tree.patch b/recipes-kernel/linux/linux-at91-4.9/mtcdt/linux-4.9-mtcdt-device-tree.patch new file mode 100644 index 0000000..c6d2915 --- /dev/null +++ b/recipes-kernel/linux/linux-at91-4.9/mtcdt/linux-4.9-mtcdt-device-tree.patch @@ -0,0 +1,476 @@ +Index: linux-3.12.27/arch/arm/boot/dts/mtcdt.dts +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-3.12.27/arch/arm/boot/dts/mtcdt.dts 2016-09-19 15:34:25.111103538 -0500 +@@ -0,0 +1,279 @@ ++/* ++ * DTS file for Multi-Tech Systems MTCDT Hardware ++ */ ++ ++/dts-v1/; ++#include "at91sam9g25.dtsi" ++#include "at91sam9x5ek.dtsi" ++ ++/ { ++ model = "Multi-Tech Systems MTCDT"; ++ compatible = "atmel,at91sam9g25ek", "atmel,at91sam9x5ek", "atmel,at91sam9x5", "atmel,at91sam9"; ++ ++ ahb { ++ apb { ++ macb0: ethernet@f802c000 { ++ phy-mode = "rmii"; ++ status = "okay"; ++ }; ++ ++ pinctrl@fffff400 { ++ nand { ++ pinctrl_nand: nand-0 { ++ atmel,pins = ++ <AT91_PIOD 0 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD0 periph A Read Enable */ ++ AT91_PIOD 1 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD1 periph A Write Enable */ ++ AT91_PIOD 2 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD2 periph A Address Latch Enable */ ++ AT91_PIOD 3 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD3 periph A Command Latch Enable */ ++ AT91_PIOD 4 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP /* PD4 gpio Chip Enable pin pull_up */ ++ AT91_PIOC 31 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP /* PC31 gpio RDY/BUSY pin pull_up */ ++ AT91_PIOD 6 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD6 periph A Data bit 0 */ ++ AT91_PIOD 7 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD7 periph A Data bit 1 */ ++ AT91_PIOD 8 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD8 periph A Data bit 2 */ ++ AT91_PIOD 9 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD9 periph A Data bit 3 */ ++ AT91_PIOD 10 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD10 periph A Data bit 4 */ ++ AT91_PIOD 11 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD11 periph A Data bit 5 */ ++ AT91_PIOD 12 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD12 periph A Data bit 6 */ ++ AT91_PIOD 13 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PD13 periph A Data bit 7 */ ++ }; ++ ++ pinctrl_nand_16bits: nand_16bits-0 { ++ atmel,pins = ++ <AT91_PIOD 14 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD14 periph A Data bit 8 */ ++ AT91_PIOD 15 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD15 periph A Data bit 9 */ ++ AT91_PIOD 16 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD16 periph A Data bit 10 */ ++ AT91_PIOD 17 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD17 periph A Data bit 11 */ ++ AT91_PIOD 18 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD18 periph A Data bit 12 */ ++ AT91_PIOD 19 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD19 periph A Data bit 13 */ ++ AT91_PIOD 20 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD20 periph A Data bit 14 */ ++ AT91_PIOD 21 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PD21 periph A Data bit 15 */ ++ }; ++ }; ++ ++ mmc1 { ++ pinctrl_mmc1_slot0_clk_cmd_dat0: mmc1_slot0_clk_cmd_dat0-0 { ++ atmel,pins = ++ <AT91_PIOA 13 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA13 periph B */ ++ AT91_PIOA 12 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* PA12 periph B with pullup */ ++ AT91_PIOA 11 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>; /* PA11 periph B with pullup */ ++ }; ++ ++ pinctrl_mmc1_slot0_dat1_3: mmc1_slot0_dat1_3-0 { ++ atmel,pins = ++ <AT91_PIOA 2 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* PA2 periph B with pullup */ ++ AT91_PIOA 3 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* PA3 periph B with pullup */ ++ AT91_PIOA 4 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>; /* PA4 periph B with pullup */ ++ }; ++ }; ++ }; ++ ++ rtc@fffffeb0 { ++ status = "okay"; ++ }; ++ ++ i2c0: i2c@f8010000 { ++ compatible = "i2c-gpio"; ++ status = "okay"; ++ ++ id_eeprom@56 { ++ compatible = "atmel,24c04"; ++ reg = <0x56>; ++ pagesize = <16>; ++ }; ++ board_temp@48 { ++ compatible = "ti,tmp102"; ++ reg = <0x48>; ++ /* tempsensor_alert line running to pin PC19 on processor ++ set up an interrupt for this? */ ++ }; ++ }; ++ ++ i2c1: i2c@f8014000 { ++ compatible = "i2c-gpio"; ++ status = "okay"; ++ ++ ap1_eeprom@50 { ++ compatible = "atmel,24c04"; ++ reg = <0x50>; ++ pagesize = <16>; ++ }; ++ ap2_eeprom@52 { ++ compatible = "atmel,24c04"; ++ reg = <0x52>; ++ pagesize = <16>; ++ }; ++ }; ++ ++ /* runs to Accessory Port 1 */ ++ spi0: spi@f0000000 { ++ status = "okay"; ++ cs-gpios = <&pioA 4 0>, <&pioA 2 0>, <&pioA 3 0>, <&pioA 5 0>; ++ ++ ap1-adc@0 { ++ compatible = "mts-io-ap1-adc"; ++ spi-max-frequency = <20000000>; ++ reg = <0>; ++ }; ++ ap1-dout@1 { ++ compatible = "mts-io-ap1-dout"; ++ spi-max-frequency = <1000000>; ++ reg = <1>; ++ }; ++ ap1-spi@2 { ++ compatible = "spidev"; ++ spi-max-frequency = <2000000>; ++ reg = <2>; ++ }; ++ ap1-din@3 { ++ compatible = "mts-io-ap1-din"; ++ spi-max-frequency = <1000000>; ++ reg = <3>; ++ }; ++ }; ++ ++ /* runs to Accessory Port 2 */ ++ spi1: spi@f0004000 { ++ status = "okay"; ++ ++ cs-gpios = <&pioC 15 0>, <&pioC 16 0>, <&pioC 17 0>, <&pioC 18 0>; ++ ++ ap2-adc@0 { ++ compatible = "mts-io-ap2-adc"; ++ spi-max-frequency = <20000000>; ++ reg = <0>; ++ }; ++ ap2-dout@1 { ++ compatible = "mts-io-ap2-dout"; ++ spi-max-frequency = <1000000>; ++ reg = <1>; ++ }; ++ ap2-spi@2 { ++ compatible = "spidev"; ++ spi-max-frequency = <2000000>; ++ reg = <2>; ++ }; ++ ap2-din@3 { ++ compatible = "mts-io-ap2-din"; ++ spi-max-frequency = <1000000>; ++ reg = <3>; ++ }; ++ }; ++ }; ++ ++ nand0: nand@40000000 { ++ reg = < 0x40000000 0x10000000 ++ 0xffffe000 0x600 /* PMECC Registers */ ++ 0xffffe600 0x200 /* PMECC Error Location Registers */ ++ 0x00100000 0x100000 /* PMECC looup table in ROM code */ ++ >; ++ atmel,pmecc-lookup-table-offset = <0x8000 0x10000>; ++ gpios = < &pioC 31 GPIO_ACTIVE_HIGH ++ &pioD 4 GPIO_ACTIVE_HIGH ++ 0 ++ >; ++ atmel,pmecc-cap = <4>; ++ atmel,nand-has-dma; ++ ++ nand@0 { ++ label = "NANDFlash"; ++ reg = <0x0 0x10000000>; ++ }; ++ at91bootstrap@0 { ++ label = "at91bootstrap"; ++ reg = <0x0 0x40000>; ++ }; ++ uboot@40000 { ++ label = "u-Boot"; ++ reg = <0x40000 0x80000>; ++ }; ++ ubootconfig0@c0000 { ++ label = "u-Boot Config"; ++ reg = <0xc0000 0xa0000>; ++ }; ++ ubootconfig1@160000 { ++ label = "u-Boot Redundant Config"; ++ reg = <0x160000 0xa0000>; ++ }; ++ uImage@200000 { ++ label = "uImage"; ++ reg = <0x200000 0x600000>; ++ }; ++ config0@800000 { ++ label = "Config"; ++ reg = <0x800000 0x800000>; ++ }; ++ config1@1000000 { ++ label = "OEM Config"; ++ reg = <0x1000000 0x800000>; ++ }; ++ rootfs@1800000 { ++ label = "Rootfs"; ++ reg = <0x1800000 0xe800000>; ++ }; ++ }; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ pa24 { ++ label = "led-status"; ++ gpios = <&pioA 24 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "default-on"; ++ }; ++ pa25 { ++ label = "led-a"; ++ gpios = <&pioA 25 GPIO_ACTIVE_LOW>; ++ }; ++ pa26 { ++ label = "led-b"; ++ gpios = <&pioA 26 GPIO_ACTIVE_LOW>; ++ }; ++ pa27 { ++ label = "led-c"; ++ gpios = <&pioA 27 GPIO_ACTIVE_LOW>; ++ }; ++ pa28 { ++ label = "led-d"; ++ gpios = <&pioA 28 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ /* GPS-PPS input on AP1 */ ++ pps { ++ compatible = "pps-gpio"; ++ gpios = <&pioA 29 0>; ++ capture-clear; ++ }; ++ ++ ++ i2c@0 { ++ status = "okay"; ++ ++ id_eeprom@56 { ++ compatible = "atmel,24c04"; ++ reg = <0x56>; ++ pagesize = <16>; ++ }; ++ board_temp@48 { ++ compatible = "ti,tmp102"; ++ reg = <0x48>; ++ /* tempsensor_alert line running to pin PC19 on processor ++ set up an interrupt for this? */ ++ }; ++ }; ++ i2c@1 { ++ status = "okay"; ++ ++ ap1_eeprom@50 { ++ compatible = "atmel,24c04"; ++ reg = <0x50>; ++ pagesize = <16>; ++ }; ++ ap2_eeprom@52 { ++ compatible = "atmel,24c04"; ++ reg = <0x52>; ++ pagesize = <16>; ++ }; ++ }; ++}; +Index: linux-3.12.27/arch/arm/boot/dts/at91sam9x5cm.dtsi +=================================================================== +--- linux-3.12.27.orig/arch/arm/boot/dts/at91sam9x5cm.dtsi 2014-08-26 07:12:26.000000000 -0500 ++++ linux-3.12.27/arch/arm/boot/dts/at91sam9x5cm.dtsi 2015-01-13 13:58:20.766078428 -0600 +@@ -40,48 +40,8 @@ + atmel,has-pmecc; /* Enable PMECC */ + atmel,pmecc-cap = <2>; + atmel,pmecc-sector-size = <512>; +- nand-on-flash-bbt; ++ /* nand-on-flash-bbt; */ + status = "okay"; +- +- at91bootstrap@0 { +- label = "at91bootstrap"; +- reg = <0x0 0x40000>; +- }; +- +- uboot@40000 { +- label = "u-boot"; +- reg = <0x40000 0x80000>; +- }; +- +- ubootenv@c0000 { +- label = "U-Boot Env"; +- reg = <0xc0000 0x140000>; +- }; +- +- kernel@200000 { +- label = "kernel"; +- reg = <0x200000 0x600000>; +- }; +- +- rootfs@800000 { +- label = "rootfs"; +- reg = <0x800000 0x1f800000>; +- }; +- }; +- }; +- +- leds { +- compatible = "gpio-leds"; +- +- pb18 { +- label = "pb18"; +- gpios = <&pioB 18 GPIO_ACTIVE_LOW>; +- linux,default-trigger = "heartbeat"; +- }; +- +- pd21 { +- label = "pd21"; +- gpios = <&pioD 21 GPIO_ACTIVE_HIGH>; + }; + }; + +@@ -93,5 +53,4 @@ + pinctrl-0 = <&pinctrl_1wire_cm>; + status = "okay"; + }; +- + }; +diff -aNru 4.9+gitAUTOINC+29796588eb.orig/arch/arm/boot/dts/at91sam9x5ek.dtsi 4.9+gitAUTOINC+29796588eb/arch/arm/boot/dts/at91sam9x5ek.dtsi +--- 4.9+gitAUTOINC+29796588eb.orig/arch/arm/boot/dts/at91sam9x5ek.dtsi 2018-10-22 15:41:00.544625331 -0500 ++++ 4.9+gitAUTOINC+29796588eb/arch/arm/boot/dts/at91sam9x5ek.dtsi 2018-10-23 09:28:17.902729520 -0500 +@@ -25,23 +25,11 @@ + &pinctrl_mmc0_slot0_clk_cmd_dat0 + &pinctrl_mmc0_slot0_dat1_3>; + status = "okay"; ++ /* external micro SD slot */ + slot@0 { + reg = <0>; + bus-width = <4>; +- cd-gpios = <&pioD 15 GPIO_ACTIVE_HIGH>; +- }; +- }; +- +- mmc1: mmc@f000c000 { +- pinctrl-0 = < +- &pinctrl_board_mmc1 +- &pinctrl_mmc1_slot0_clk_cmd_dat0 +- &pinctrl_mmc1_slot0_dat1_3>; +- status = "okay"; +- slot@0 { +- reg = <0>; +- bus-width = <4>; +- cd-gpios = <&pioD 14 GPIO_ACTIVE_HIGH>; ++ cd-gpios = <&pioA 1 GPIO_ACTIVE_HIGH>; + }; + }; + +@@ -49,7 +37,7 @@ + status = "okay"; + }; + +- usart0: serial@f801c000 { ++ uart0: serial@f8040000 { + atmel,use-dma-rx; + atmel,use-dma-tx; + status = "okay"; +@@ -58,25 +46,12 @@ + usb2: gadget@f803c000 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_board_usb2>; +- atmel,vbus-gpio = <&pioB 16 GPIO_ACTIVE_HIGH>; +- status = "okay"; +- }; +- +- i2c0: i2c@f8010000 { +- status = "okay"; +- +- wm8731: wm8731@1a { +- compatible = "wm8731"; +- reg = <0x1a>; +- }; +- }; +- +- adc0: adc@f804c000 { +- atmel,adc-ts-wires = <4>; +- atmel,adc-ts-pressure-threshold = <10000>; ++ /* atmel,vbus-gpio = <&pioB 16 GPIO_ACTIVE_HIGH>; mtcdt: no vbus-gpio */ + status = "okay"; + }; + ++ /* A/D convertor is unusable on Conduit */ ++ + pinctrl@fffff400 { + camera_sensor { + pinctrl_pck0_as_isi_mck: pck0_as_isi_mck-0 { +@@ -118,7 +93,7 @@ + }; + + spi0: spi@f0000000 { +- status = "disabled"; /* conflict with mmc1 */ ++ status = "okay"; + cs-gpios = <&pioA 14 0>, <0>, <0>, <0>; + m25p80@0 { + compatible = "atmel,at25df321a"; +@@ -131,37 +106,20 @@ + status = "okay"; + }; + +- ssc0: ssc@f0010000 { +- status = "okay"; +- }; + }; + + usb0: ohci@00600000 { + status = "okay"; + num-ports = <3>; +- atmel,vbus-gpio = <0 /* &pioD 18 GPIO_ACTIVE_LOW *//* Activate to have access to port A */ +- &pioD 19 GPIO_ACTIVE_LOW +- &pioD 20 GPIO_ACTIVE_LOW +- >; ++ //mtcdt: no vbus-gpio ++ // atmel,vbus-gpio = <0 /* &pioD 18 GPIO_ACTIVE_LOW *//* Activate to have access to port A */ ++ // &pioD 19 GPIO_ACTIVE_LOW ++ // &pioD 20 GPIO_ACTIVE_LOW ++ // >; + }; + + usb1: ehci@00700000 { + status = "okay"; + }; + }; +- +- sound { +- compatible = "atmel,sam9x5-wm8731-audio"; +- +- atmel,model = "wm8731 @ AT91SAM9X5EK"; +- +- atmel,audio-routing = +- "Headphone Jack", "RHPOUT", +- "Headphone Jack", "LHPOUT", +- "LLINEIN", "Line In Jack", +- "RLINEIN", "Line In Jack"; +- +- atmel,ssc-controller = <&ssc0>; +- atmel,audio-codec = <&wm8731>; +- }; + }; +diff -Naru 4.9+gitAUTOINC+29796588eb.orig/arch/arm/boot/dts/Makefile 4.9+gitAUTOINC+29796588eb/arch/arm/boot/dts/Makefile +--- 4.9+gitAUTOINC+29796588eb.orig/arch/arm/boot/dts/Makefile 2018-10-23 09:55:41.330680867 -0500 ++++ 4.9+gitAUTOINC+29796588eb/arch/arm/boot/dts/Makefile 2018-10-23 10:02:32.390668697 -0500 +@@ -43,7 +43,8 @@ + at91sam9g25ek.dtb \ + at91sam9g35ek.dtb \ + at91sam9x25ek.dtb \ +- at91sam9x35ek.dtb ++ at91sam9x35ek.dtb \ ++ mtcdt.dtb + dtb-$(CONFIG_SOC_SAM_V7) += \ + at91-kizbox2.dtb \ + at91-sama5d2_ptc_ek.dtb \ diff --git a/recipes-kernel/linux/linux-at91_4.9.bb b/recipes-kernel/linux/linux-at91_4.9.bb index 2ba9586..2709f1b 100644 --- a/recipes-kernel/linux/linux-at91_4.9.bb +++ b/recipes-kernel/linux/linux-at91_4.9.bb @@ -23,6 +23,18 @@ KBRANCH = "linux-4.9-at91" SRC_URI = "git://github.com/linux4sam/linux-at91.git;protocol=git;branch=${KBRANCH}" SRC_URI += "file://defconfig" +COMMON_PATCHES = "" + +SRC_URI_append_mtcdt = "\ + ${COMMON_PATCHES} \ + file://defconfig \ + file://linux-4.9-eeprom-setup-mtcdt.patch \ + file://linux-4.9-mtcdt-device-tree.patch \ + file://linux-4.9-add-num_accessory_ports-config-option.patch \ + " + +DTB_APPEND_mtcdt = "mtcdt" + python __anonymous () { if d.getVar('UBOOT_FIT_IMAGE', True) == 'xyes': d.appendVar('DEPENDS', ' u-boot-mkimage-native dtc-native') |