From 1e29eefb77ba7d10d5214bd3361a85c0a0fa7849 Mon Sep 17 00:00:00 2001 From: Brandon Bayer Date: Tue, 13 Sep 2016 10:42:58 -0500 Subject: fix: mtp device tree patch --- .../mtp/linux-3.12-mtp-device-tree.patch | 592 +++++++-------------- 1 file changed, 178 insertions(+), 414 deletions(-) diff --git a/recipes-kernel/linux/linux-3.12.27/mtp/linux-3.12-mtp-device-tree.patch b/recipes-kernel/linux/linux-3.12.27/mtp/linux-3.12-mtp-device-tree.patch index 39dfe73..494d2bb 100644 --- a/recipes-kernel/linux/linux-3.12.27/mtp/linux-3.12-mtp-device-tree.patch +++ b/recipes-kernel/linux/linux-3.12.27/mtp/linux-3.12-mtp-device-tree.patch @@ -2,457 +2,221 @@ Index: linux-3.12.27/arch/arm/boot/dts/mtp.dts =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ linux-3.12.27/arch/arm/boot/dts/mtp.dts 2015-01-13 13:58:20.766078428 -0600 -@@ -0,0 +1,278 @@ +@@ -0,0 +1,214 @@ +/* -+ * DTS file for MTP Hardware ++ * DTS file for Multi-Tech Systems MTP Hardware + */ + +/dts-v1/; +#include "at91sam9g25.dtsi" -+#include "at91sam9x5ek.dtsi" + +/ { -+ model = "Multi-Tech Systems MTCDT"; -+ compatible = "atmel,at91sam9g25ek", "atmel,at91sam9x5ek", "atmel,at91sam9x5", "atmel,at91sam9"; ++ model = "Multi-Tech Systems MTP"; ++ 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 = -+ ; /* PD13 periph A Data bit 7 */ -+ }; -+ -+ pinctrl_nand_16bits: nand_16bits-0 { -+ atmel,pins = -+ ; /* PD21 periph A Data bit 15 */ -+ }; -+ }; -+ -+ mmc1 { -+ pinctrl_mmc1_slot0_clk_cmd_dat0: mmc1_slot0_clk_cmd_dat0-0 { -+ atmel,pins = -+ ; /* PA11 periph B with pullup */ -+ }; -+ -+ pinctrl_mmc1_slot0_dat1_3: mmc1_slot0_dat1_3-0 { -+ atmel,pins = -+ ; /* 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? */ -+ }; -+ }; ++ chosen { ++ bootargs = "mem=256M console=ttyS0,115200 root=/dev/mtdblock8 ro rootfstype=jffs2"; ++ }; + -+ i2c1: i2c@f8014000 { -+ compatible = "i2c-gpio"; -+ status = "okay"; ++ aliases { ++ spi0 = &spi0; ++ }; + -+ ap1_eeprom@50 { -+ compatible = "atmel,24c04"; -+ reg = <0x50>; -+ pagesize = <16>; -+ }; -+ ap2_eeprom@52 { -+ compatible = "atmel,24c04"; -+ reg = <0x52>; -+ pagesize = <16>; -+ }; -+ }; ++ memory { ++ reg = <0x20000000 0x8000000>; ++ }; + -+ /* runs to Accessory Port 1 */ -+ spi0: spi@f0000000 { -+ status = "okay"; -+ cs-gpios = <&pioA 4 0>, <&pioA 2 0>, <&pioA 3 0>, <&pioA 5 0>; ++ clocks { ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ranges; + -+ 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>; ++ main_clock: clock@0 { ++ compatible = "atmel,osc", "fixed-clock"; ++ clock-frequency = <12000000>; + }; -+ }; -+ -+ /* runs to Accessory Port 2 */ -+ spi1: spi@f0004000 { -+ status = "okay"; ++ }; + -+ cs-gpios = <&pioC 15 0>, <&pioC 16 0>, <&pioC 17 0>, <&pioC 18 0>; ++ ahb { ++ apb { ++ macb0: ethernet@f802c000 { ++ phy-mode = "rmii"; ++ status = "okay"; ++ }; ++ ++ pinctrl@fffff400 { ++ nand { ++ pinctrl_nand: nand-0 { ++ atmel,pins = ++ ; /* PD13 periph A Data bit 7 */ ++ }; ++ ++ pinctrl_nand_16bits: nand_16bits-0 { ++ atmel,pins = ++ ; /* PD21 periph A Data bit 15 */ ++ }; ++ }; ++ }; ++ ++ rtc@fffffeb0 { ++ status = "okay"; ++ }; ++ ++ i2c0: i2c@f8010000 { ++ compatible = "i2c-gpio"; ++ status = "okay"; ++ ++ id_eeprom@56 { ++ compatible = "atmel,24c04"; ++ reg = <0x56>; ++ pagesize = <16>; ++ }; ++ }; ++ ++ spi0: spi@f0000000 { ++ status = "okay"; ++ cs-gpios = <&pioA 7 0>, <0>, <0>, <0>; ++ lora-spi@0 { ++ compatible = "spidev"; ++ spi-max-frequency = <2000000>; ++ reg = <0>; ++ }; ++ }; ++ ++ dbgu: serial@fffff200 { ++ status = "okay"; ++ }; + -+ 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>; ++ uart0: serial@f8040000 { ++ status = "okay"; ++ }; ++ ++ watchdog@fffffe40 { ++ status = "okay"; ++ }; ++ }; ++ ++ nand0: nand@40000000 { ++ nand-bus-width = <8>; ++ nand-ecc-mode = "hw"; ++ atmel,has-pmecc; /* Enable PMECC */ ++ atmel,pmecc-sector-size = <512>; ++ status = "okay"; ++ 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>; ++ }; ++ }; ++ ++ usb0: ohci@00600000 { ++ status = "okay"; ++ num-ports = <3>; ++ }; ++ ++ usb1: ehci@00700000 { ++ status = "okay"; + }; -+ }; -+ }; -+ -+ 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 { ++ pc15 { + label = "led-a"; -+ gpios = <&pioA 25 GPIO_ACTIVE_LOW>; ++ gpios = <&pioC 15 GPIO_ACTIVE_LOW>; + }; -+ pa26 { ++ pc16 { + label = "led-b"; -+ gpios = <&pioA 26 GPIO_ACTIVE_LOW>; ++ gpios = <&pioC 16 GPIO_ACTIVE_LOW>; + }; -+ pa27 { ++ pc20 { + label = "led-c"; -+ gpios = <&pioA 27 GPIO_ACTIVE_LOW>; ++ gpios = <&pioC 20 GPIO_ACTIVE_LOW>; + }; -+ pa28 { ++ pc25 { + label = "led-d"; -+ gpios = <&pioA 28 GPIO_ACTIVE_LOW>; ++ gpios = <&pioC 25 GPIO_ACTIVE_LOW>; + }; + }; + -+ /* GPS-PPS input on AP1 */ -+ pps { -+ compatible = "pps-gpio"; -+ gpios = <&pioA 29 0>; -+ }; -+ -+ -+ 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>; ++ i2c@0 { ++ status = "okay"; ++ id_eeprom@56 { ++ compatible = "atmel,24c04"; ++ reg = <0x56>; ++ 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"; - }; -- - }; -Index: linux-3.12.27/arch/arm/boot/dts/at91sam9x5ek.dtsi -=================================================================== ---- linux-3.12.27.orig/arch/arm/boot/dts/at91sam9x5ek.dtsi 2014-08-26 07:12:26.000000000 -0500 -+++ linux-3.12.27/arch/arm/boot/dts/at91sam9x5ek.dtsi 2015-01-15 14:57:35.931862696 -0600 -@@ -24,23 +24,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>; - }; - }; - -@@ -48,22 +36,13 @@ - status = "okay"; - }; - -- usart0: serial@f801c000 { -+ uart0: serial@f8040000 { - status = "okay"; - }; - - usb2: gadget@f803c000 { -- atmel,vbus-gpio = <&pioB 16 GPIO_ACTIVE_HIGH>; -- status = "okay"; -- }; -- -- i2c0: i2c@f8010000 { -+ /* atmel,vbus-gpio = <&pioB 16 GPIO_ACTIVE_HIGH>; mtcdt: no vbus-gpio */ - status = "okay"; -- -- wm8731: wm8731@1a { -- compatible = "wm8731"; -- reg = <0x1a>; -- }; - }; - - pinctrl@fffff400 { -@@ -82,51 +61,24 @@ - }; - }; - -- spi0: spi@f0000000 { -- status = "okay"; -- cs-gpios = <&pioA 14 0>, <0>, <0>, <0>; -- m25p80@0 { -- compatible = "atmel,at25df321a"; -- spi-max-frequency = <50000000>; -- reg = <0>; -- }; -- }; -- - watchdog@fffffe40 { - 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>; -- }; - }; Index: linux-3.12.27/arch/arm/boot/dts/Makefile =================================================================== --- linux-3.12.27.orig/arch/arm/boot/dts/Makefile 2014-08-26 07:12:26.000000000 -0500 -- cgit v1.2.3