From fe7ff1fdfa75034dcf85b27f7bb8811b58d7e3e0 Mon Sep 17 00:00:00 2001 From: Mykyta Dorokhin Date: Thu, 14 Jan 2021 18:16:01 +0200 Subject: linux 5.4: apply mtcdt DTS changes --- .../linux/linux-at91-5.4.81/mts-dts/mtcdt.dts | 372 +++++++++++---------- 1 file changed, 203 insertions(+), 169 deletions(-) (limited to 'recipes-kernel/linux/linux-at91-5.4.81/mts-dts/mtcdt.dts') diff --git a/recipes-kernel/linux/linux-at91-5.4.81/mts-dts/mtcdt.dts b/recipes-kernel/linux/linux-at91-5.4.81/mts-dts/mtcdt.dts index 6a1ba37..7273af7 100644 --- a/recipes-kernel/linux/linux-at91-5.4.81/mts-dts/mtcdt.dts +++ b/recipes-kernel/linux/linux-at91-5.4.81/mts-dts/mtcdt.dts @@ -20,7 +20,7 @@ / { #address-cells = <1>; #size-cells = <1>; - model = "Atmel AT91SAM9X5-EK"; + model = "Multi-Tech Systems MTCDT"; compatible = "atmel,at91sam9x5ek", "atmel,at91sam9x5", "atmel,at91sam9"; interrupt-parent = <&aic>; @@ -35,15 +35,12 @@ gpio3 = &pioD; tcb0 = &tcb0; tcb1 = &tcb1; - i2c0 = &i2c0; - i2c1 = &i2c1; - i2c2 = &i2c2; ssc0 = &ssc0; pwm0 = &pwm0; }; chosen { - bootargs = "root=/dev/mtdblock1 rw rootfstype=ubifs ubi.mtd=1 root=ubi0:rootfs"; + bootargs = "mem=256M console=ttyS0,115200 root=/dev/mtdblock8 ro rootfstype=jffs2"; stdout-path = "serial0:115200n8"; }; @@ -87,21 +84,6 @@ reg = <0x00300000 0x8000>; }; - 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>; - }; - ahb { compatible = "simple-bus"; #address-cells = <1>; @@ -329,32 +311,20 @@ ebi { pinctrl_ebi_data_0_7: ebi-data-lsb-0 { atmel,pins = - ; - }; - - pinctrl_ebi_data_8_15: ebi-data-msb-0 { - atmel,pins = - ; + ; }; pinctrl_ebi_addr_nand: ebi-addr-0 { atmel,pins = - ; + ; }; }; @@ -469,13 +439,13 @@ nand { pinctrl_nand_oe_we: nand-oe-we-0 { atmel,pins = - ; + ; }; pinctrl_nand_rb: nand-rb-0 { atmel,pins = - ; + ; }; pinctrl_nand_cs: nand-cs-0 { @@ -484,6 +454,28 @@ }; }; + mts-io { + pinctrl_mts_io_out: mts_io-0 { + atmel,pins = + ; /* PD18 USB Hub reset */ + output-high; + }; + pinctrl_mts_io_in: mts_io-1 { + atmel,pins = + ; /* PD20 WiFi_BT_LPMode Input */ + }; + pinctrl_mts_io_gnss: mts_io-2 { + atmel,pins = + ; /* PD15 N_GNSS_RESET */ + output-low; + }; + }; + mmc0 { pinctrl_mmc0_slot0_clk_cmd_dat0: mmc0_slot0_clk_cmd_dat0-0 { atmel,pins = @@ -501,7 +493,7 @@ pinctrl_board_mmc0: mmc0-board { atmel,pins = - ; /* PD15 gpio CD pin pull up and deglitch */ + ; /* PA1 gpio SD card pin pull up and deglitch */ }; }; @@ -519,11 +511,6 @@ 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 */ }; - - pinctrl_board_mmc1: mmc1-board { - atmel,pins = - ; /* PD14 gpio CD pin pull up and deglitch */ - }; }; usb2 { @@ -813,7 +800,9 @@ pinctrl-0 = <&pinctrl_macb0_rmii>; clocks = <&pmc PMC_TYPE_PERIPHERAL 24>, <&pmc PMC_TYPE_PERIPHERAL 24>; clock-names = "hclk", "pclk"; - status = "disabled"; + + phy-mode = "rmii"; + status = "okay"; }; ssc0: ssc@f0010000 { @@ -828,7 +817,7 @@ clocks = <&pmc PMC_TYPE_PERIPHERAL 28>; clock-names = "pclk"; - status = "okay"; + status = "disabled"; }; mmc0: mmc@f0008000 { @@ -848,11 +837,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>; + cd-gpios = <&pioA 1 GPIO_ACTIVE_HIGH>; }; }; @@ -867,19 +856,7 @@ clock-names = "mci_clk"; #address-cells = <1>; #size-cells = <0>; - - - 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>; - }; + status = "disabled"; }; dbgu: serial@fffff200 { @@ -893,8 +870,9 @@ dma-names = "tx", "rx"; clocks = <&pmc PMC_TYPE_CORE PMC_MCK>; clock-names = "usart"; - status = "okay"; + atmel,use-dma-rx; + atmel,use-dma-tx; }; usart0: serial@f801c000 { @@ -908,10 +886,7 @@ dma-names = "tx", "rx"; clocks = <&pmc PMC_TYPE_PERIPHERAL 5>; clock-names = "usart"; - - atmel,use-dma-rx; - atmel,use-dma-tx; - status = "okay"; + status = "disabled"; }; usart1: serial@f8020000 { @@ -956,55 +931,6 @@ status = "disabled"; }; - 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 = <&pmc PMC_TYPE_PERIPHERAL 9>; - status = "okay"; - wm8731: wm8731@1a { - compatible = "wm8731"; - reg = <0x1a>; - }; - }; - - i2c1: i2c@f8014000 { - compatible = "atmel,at91sam9x5-i2c"; - reg = <0xf8014000 0x100>; - interrupts = <10 IRQ_TYPE_LEVEL_HIGH 6>; - dmas = <&dma1 1 AT91_DMA_CFG_PER_ID(5)>, - <&dma1 1 AT91_DMA_CFG_PER_ID(6)>; - dma-names = "tx", "rx"; - #address-cells = <1>; - #size-cells = <0>; - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_i2c1>; - clocks = <&pmc PMC_TYPE_PERIPHERAL 10>; - status = "disabled"; - }; - - i2c2: i2c@f8018000 { - compatible = "atmel,at91sam9x5-i2c"; - reg = <0xf8018000 0x100>; - interrupts = <11 IRQ_TYPE_LEVEL_HIGH 6>; - dmas = <&dma0 1 AT91_DMA_CFG_PER_ID(9)>, - <&dma0 1 AT91_DMA_CFG_PER_ID(10)>; - dma-names = "tx", "rx"; - #address-cells = <1>; - #size-cells = <0>; - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_i2c2>; - clocks = <&pmc PMC_TYPE_PERIPHERAL 11>; - status = "disabled"; - }; - uart0: serial@f8040000 { compatible = "atmel,at91sam9260-usart"; reg = <0xf8040000 0x200>; @@ -1013,7 +939,9 @@ pinctrl-0 = <&pinctrl_uart0>; clocks = <&pmc PMC_TYPE_PERIPHERAL 15>; clock-names = "usart"; - status = "disabled"; + atmel,use-dma-rx; + atmel,use-dma-tx; + status = "okay"; }; uart1: serial@f8044000 { @@ -1045,10 +973,6 @@ atmel,adc-res-names = "lowres", "highres"; atmel,adc-use-res = "highres"; - atmel,adc-ts-wires = <4>; - atmel,adc-ts-pressure-threshold = <10000>; - status = "okay"; - trigger0 { trigger-name = "external-rising"; trigger-value = <0x1>; @@ -1073,6 +997,7 @@ }; }; + /* runs to Accessory Port 1 */ spi0: spi@f0000000 { #address-cells = <1>; #size-cells = <0>; @@ -1087,16 +1012,27 @@ clocks = <&pmc PMC_TYPE_PERIPHERAL 13>; clock-names = "spi_clk"; - cs-gpios = <&pioA 14 0>, <0>, <0>, <0>; - status = "disabled"; /* conflicts with mmc1 */ + status = "okay"; + cs-gpios = <&pioA 4 0>, <&pioA 2 0>, <&pioA 3 0>, <&pioA 5 0>; - m25p80@0 { - compatible = "atmel,at25df321a"; - spi-max-frequency = <50000000>; - reg = <0>; + ap1-dout@1 { + compatible = "mts-io-ap1-dout"; + spi-max-frequency = <1000000>; + reg = <1>; + }; + ap1-spi@2 { + compatible = "mts,mtac"; + 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 { #address-cells = <1>; #size-cells = <0>; @@ -1110,7 +1046,29 @@ pinctrl-0 = <&pinctrl_spi1>; clocks = <&pmc PMC_TYPE_PERIPHERAL 14>; clock-names = "spi_clk"; - status = "disabled"; + + 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 = "mts,mtac"; + spi-max-frequency = <2000000>; + reg = <2>; + }; + ap2-din@3 { + compatible = "mts-io-ap2-din"; + spi-max-frequency = <1000000>; + reg = <3>; + }; }; usb2: gadget@f803c000 { @@ -1126,7 +1084,6 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_board_usb2>; - atmel,vbus-gpio = <&pioB 16 GPIO_ACTIVE_HIGH>; status = "okay"; ep@0 { @@ -1221,10 +1178,11 @@ clock-names = "ohci_clk", "hclk", "uhpck"; 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 + // >; status = "okay"; }; @@ -1275,13 +1233,13 @@ nand@3 { reg = <0x3 0x0 0x800000>; - rb-gpios = <&pioD 5 GPIO_ACTIVE_HIGH>; + rb-gpios = <&pioC 31 GPIO_ACTIVE_HIGH>; cs-gpios = <&pioD 4 GPIO_ACTIVE_HIGH>; nand-bus-width = <8>; nand-ecc-mode = "hw"; - nand-ecc-strength = <2>; + nand-ecc-strength = <4>; nand-ecc-step-size = <512>; - nand-on-flash-bbt; + /* nand-on-flash-bbt; */ label = "atmel_nand"; partitions { @@ -1289,39 +1247,54 @@ #address-cells = <1>; #size-cells = <1>; + nand@0 { + label = "NANDFlash"; + reg = <0x0 0x10000000>; + }; + at91bootstrap@0 { label = "at91bootstrap"; reg = <0x0 0x40000>; }; uboot@40000 { - label = "u-boot"; - reg = <0x40000 0xc0000>; + label = "u-Boot"; + reg = <0x40000 0x80000>; }; - - ubootenvred@100000 { - label = "U-Boot Env Redundant"; - reg = <0x100000 0x40000>; + + 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>; }; - ubootenv@140000 { - label = "U-Boot Env"; - reg = <0x140000 0x40000>; + config0@800000 { + label = "Config"; + reg = <0x800000 0x800000>; }; - dtb@180000 { - label = "device tree"; - reg = <0x180000 0x80000>; + config1@1000000 { + label = "OEM Config"; + reg = <0x1000000 0x800000>; }; - kernel@200000 { - label = "kernel"; - reg = <0x200000 0x600000>; + rootfs@1800000 { + label = "Rootfs"; + reg = <0x1800000 0x8000000>; }; - rootfs@800000 { - label = "rootfs"; - reg = <0x800000 0x0f800000>; + user@9800000 { + label = "User data"; + reg = <0x9800000 0x6800000>; }; }; }; @@ -1341,7 +1314,22 @@ #size-cells = <0>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_i2c_gpio0>; - status = "disabled"; + status = "okay"; + + id_eeprom@56 { + compatible = "atmel,24c04"; + reg = <0x56>; + pagesize = <16>; + status = "okay"; + }; + + board_temp@48 { + compatible = "ti,tmp102"; + reg = <0x48>; + status = "okay"; + /* tempsensor_alert line running to pin PC19 on processor + set up an interrupt for this? */ + }; }; i2c-gpio-1 { @@ -1356,7 +1344,21 @@ #size-cells = <0>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_i2c_gpio1>; - status = "disabled"; + status = "okay"; + + ap1_eeprom@50 { + compatible = "atmel,24c04"; + reg = <0x50>; + pagesize = <16>; + status = "okay"; + }; + + ap2_eeprom@52 { + compatible = "atmel,24c04"; + reg = <0x52>; + pagesize = <16>; + status = "okay"; + }; }; i2c-gpio-2 { @@ -1374,19 +1376,51 @@ status = "disabled"; }; + mts-io-0 { + status = "okay"; + compatible = "mts,mts-io"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_mts_io_out>; + pinctrl-1 = <&pinctrl_mts_io_in>; + pinctrl-2 = <&pinctrl_mts_io_gnss>; + }; + leds { compatible = "gpio-leds"; - pb18 { - label = "pb18"; - gpios = <&pioB 18 GPIO_ACTIVE_LOW>; - linux,default-trigger = "heartbeat"; + 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>; }; - pd21 { - label = "pd21"; - gpios = <&pioD 21 GPIO_ACTIVE_HIGH>; + 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-0 { + compatible = "pps-gpio"; + gpios = <&pioA 29 0>; + capture-clear; + status = "okay"; }; 1wire_cm { -- cgit v1.2.3