Device Tree File /* * at91-sama5d4_xplained.dts - Device Tree file for SAMA5D4 Xplained board * * Copyright (C) 2015 Atmel, * 2015 Josh Wu * * This file is dual-licensed: you can use it either under the terms * of the GPL or the X11 license, at your option. Note that this dual * licensing only applies to this file, and not this project as a * whole. * * a) This file is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * Or, alternatively, * * b) Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or * sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following * conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. */ /dts-v1/; #include #include "sama5d4.dtsi" / { model = "Atmel SAMA5D4 VI"; compatible = "atmel,sama5d4-xplained", "atmel,sama5d4", "atmel,sama5"; chosen { stdout-path = "serial0:115200n8"; /* usart3 */ }; /* SDRAM BANKS 1 BASE 0x20000000 SIZE 0x8000000 - 128MiB */ memory { reg = <0x20000000 0x8000000>; }; /* OSC Slow Clock 32768 Main Clock 12000000 */ clocks { slow_xtal { clock-frequency = <32768>; }; main_xtal { clock-frequency = <12000000>; }; }; ahb { apb { /* LCD Controller BASE 0xf0000000 */ hlcdc: hlcdc@f0000000 { status = "okay"; hlcdc-display-controller { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb666>; port@0 { hlcdc_panel_output: endpoint@0 { reg = <0>; remote-endpoint = <&panel_input>; }; }; }; }; /* UART0 For MSR */ uart0: serial@f8004000 { atmel,use-dma-rx; atmel,use-dma-tx; status = "okay"; }; pwm0: pwm@f800c000 { pinctrl-names = "default"; /*portB 26*/ pinctrl-0 = <&pinctrl_pwm0_pwmh0_2>; status = "okay"; }; i2c0: i2c@f8014000 { status = "okay"; }; macb0: ethernet@f8020000 { phy-mode = "rmii"; status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_macb0_rmii &pinctrl_macb0_phy_irq>; phy0: ethernet-phy@1 { interrupt-parent = <&pioB>; interrupts = <1 IRQ_TYPE_LEVEL_LOW>; reg = <1>; }; }; /* USART0 For SMD */ usart0: serial@f802c000 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usart0 &pinctrl_usart0_rts &pinctrl_usart0_cts>; /* atmel,use-dma-rx; atmel,use-dma-tx; */ status = "okay"; }; /* USART1 For LTE Modem */ usart1: serial@f8030000 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usart1 &pinctrl_usart1_rts &pinctrl_usart1_cts>; /* pinctrl-0 = <&pinctrl_usart1 &pinctrl_usart1_rts &pinctrl_usart1_cts>; atmel,use-dma-rx; atmel,use-dma-tx; */ status = "okay"; }; /* mmc1: mmc@fc000000 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_mmc1_clk_cmd_dat0 &pinctrl_mmc1_dat1_3 &pinctrl_mmc1_cd>; vmmc-supply = <&vcc_mmc1_reg>; vqmmc-supply = <&vcc_3v3_reg>; status = "okay"; slot@0 { reg = <0>; bus-width = <4>; cd-gpios = <&pioE 3 0>; }; }; */ /* USART2 For RS */ usart2: serial@fc008000 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usart2>; /* pinctrl-0 = <&pinctrl_usart2 &pinctrl_usart2_rts &pinctrl_usart2_cts>; - for Printer & LTE atmel,use-dma-rx; atmel,use-dma-tx; */ status = "okay"; }; /* USART3 For Debug */ usart3: serial@fc00c000 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usart3>; atmel,use-dma-rx; atmel,use-dma-tx; status = "okay"; }; /* USART4 For ICC */ usart4: serial@fc010000 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usart4>; status = "okay"; }; spi1: spi@fc018000 { cs-gpios = <&pioB 21 0>, <&pioB 22 0>, <&pioB 23 0>; status = "okay"; }; adc0: adc@fc034000 { pinctrl-names = "default"; pinctrl-0 = < &pinctrl_adc0_ad0 &pinctrl_adc0_ad1 &pinctrl_adc0_ad2 &pinctrl_adc0_ad3 &pinctrl_adc0_ad4 >; atmel,adc-vref = <3300>; status = "okay"; }; watchdog@fc068640 { status = "okay"; }; pinctrl@fc06a000 { board { pinctrl_mmc1_cd: mmc1_cd { atmel,pins = ; }; /* pinctrl_usba_vbus: usba_vbus { atmel,pins = ; }; */ /* pinctrl_key_gpio_0: key_gpio_0 { atmel,pins = ; }; */ /* pinctrl_key_gpio_1: key_gpio_1 { atmel,pins = ; }; pinctrl_key_gpio_2: key_gpio_2 { atmel,pins = ; }; pinctrl_key_gpio_3: key_gpio_3 { atmel,pins = ; }; */ pinctrl_macb0_phy_irq: macb0_phy_irq_0 { atmel,pins = ; }; /* shellbt, 170719 */ pinctrl_matrix_keypad_gpio: key_gpio_1 { atmel,pins = < AT91_PIOD 19 AT91_PERIPH_GPIO AT91_PINCTRL_NONE AT91_PIOD 20 AT91_PERIPH_GPIO AT91_PINCTRL_NONE AT91_PIOD 21 AT91_PERIPH_GPIO AT91_PINCTRL_NONE AT91_PIOD 22 AT91_PERIPH_GPIO AT91_PINCTRL_NONE AT91_PIOD 23 AT91_PERIPH_GPIO AT91_PINCTRL_NONE AT91_PIOD 24 AT91_PERIPH_GPIO AT91_PINCTRL_NONE AT91_PIOD 25 AT91_PERIPH_GPIO AT91_PINCTRL_NONE AT91_PIOD 26 AT91_PERIPH_GPIO AT91_PINCTRL_NONE AT91_PIOD 27 AT91_PERIPH_GPIO AT91_PINCTRL_NONE >; }; pinctrl_thermal_printer_gpio: printer_gpio { atmel,pins = < AT91_PIOB 27 AT91_PERIPH_GPIO AT91_PINCTRL_NONE /* Out : Printer Clock */ AT91_PIOB 28 AT91_PERIPH_GPIO AT91_PINCTRL_NONE /* Out : Printer Data */ AT91_PIOB 29 AT91_PERIPH_GPIO AT91_PINCTRL_NONE /* Out : Printer Latch */ AT91_PIOB 30 AT91_PERIPH_GPIO AT91_PINCTRL_NONE /* In : Printer Paper Detect */ AT91_PIOB 31 AT91_PERIPH_GPIO AT91_PINCTRL_NONE /* In : Printer PP Detect */ AT91_PIOC 0 AT91_PERIPH_GPIO AT91_PINCTRL_NONE /* Out : Printer Motor PH 1 */ AT91_PIOC 1 AT91_PERIPH_GPIO AT91_PINCTRL_NONE /* Out : Printer Motor PH 2 */ AT91_PIOC 2 AT91_PERIPH_GPIO AT91_PINCTRL_NONE /* Out : Printer Motor PH 3 */ AT91_PIOC 3 AT91_PERIPH_GPIO AT91_PINCTRL_NONE /* Out : Printer Motor PH 4 */ AT91_PIOC 4 AT91_PERIPH_GPIO AT91_PINCTRL_NONE /* Out : Printer SB */ AT91_PIOE 6 AT91_PERIPH_GPIO AT91_PINCTRL_NONE /* In : Printer Over Heater Detect */ AT91_PIOE 14 AT91_PERIPH_GPIO AT91_PINCTRL_NONE /* Out : Printer Enable */ AT91_PIOE 15 AT91_PERIPH_GPIO AT91_PINCTRL_NONE /* In : Printer Heater Power Detect */ AT91_PIOE 18 AT91_PERIPH_GPIO AT91_PINCTRL_NONE /* Out : Printer DST 1 */ AT91_PIOE 19 AT91_PERIPH_GPIO AT91_PINCTRL_NONE /* Out : Printer DST 2 */ AT91_PIOE 20 AT91_PERIPH_GPIO AT91_PINCTRL_NONE /* Out : Printer DST 3 */ AT91_PIOE 21 AT91_PERIPH_GPIO AT91_PINCTRL_NONE /* Out : Printer DST 4 */ AT91_PIOE 22 AT91_PERIPH_GPIO AT91_PINCTRL_NONE /* Out : Printer DST 5 */ AT91_PIOE 23 AT91_PERIPH_GPIO AT91_PINCTRL_NONE /* Out : Printer DST 6 */ >; }; }; }; }; usb0: gadget@00400000 { /* atmel,vbus-gpio = <&pioE 31 GPIO_ACTIVE_HIGH>; */ pinctrl-names = "default"; /* pinctrl-0 = <&pinctrl_usba_vbus>; */ status = "okay"; }; usb1: ohci@00500000 { num-ports = <3>; /* atmel,vbus-gpio = <0 &pioE 11 GPIO_ACTIVE_HIGH &pioE 14 GPIO_ACTIVE_HIGH >; */ status = "okay"; }; usb2: ehci@00600000 { status = "okay"; }; /* NAND BootStrap 0x00000000 ~ 0x00040000 U-Boot 0x00040000 ~ U-Boot ENV 0x00100000 ~ Logo 0x00180000 ~ DTB 0x00200000 ~ Kernel 0x00280000 ~ File System 0x00880000 ~ */ nand0: nand@80000000 { nand-bus-width = <8>; nand-ecc-mode = "hw"; nand-on-flash-bbt; atmel,has-pmecc; status = "okay"; at91bootstrap@0 { label = "at91bootstrap"; reg = <0x0 0x40000>; }; bootloader@40000 { label = "bootloader"; reg = <0x40000 0x80000>; }; bootloaderenv@c0000 { label = "bootloader env"; reg = <0xc0000 0xc0000>; }; boot_logo@c0000 { label = "boot logo"; reg = <0x180000 0x80000>; }; dtb@200000 { label = "device tree"; reg = <0x200000 0x80000>; }; kernel@280000 { label = "kernel"; reg = <0x280000 0x600000>; }; rootfs@800000 { label = "rootfs"; reg = <0x880000 0x0f780000>; }; }; }; gpio_keys { compatible = "gpio-keys"; key_slide_up { label = "SlideUp"; gpios = <&pioD 28 GPIO_ACTIVE_LOW>; /* debounce_interval = <50>; */ linux,code = <66>; /* KEY_F8 */ }; key_slide_down { label = "SlideDown"; gpios = <&pioD 29 GPIO_ACTIVE_LOW>; /* debounce_interval = <50>; */ linux,code = <67>; /* KEY_F9 */ }; key_scan { label = "Scan"; gpios = <&pioD 30 GPIO_ACTIVE_LOW>; /* debounce_interval = <50>; */ linux,code = <68>; /* KEY_F10 */ }; }; vi_keypad { compatible = "gpio-matrix-keypad"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_matrix_keypad_gpio>; debounce-delay-ms = <5>; col-scan-delay-us = <2>; col-gpios = < &pioD 19 GPIO_ACTIVE_HIGH &pioD 20 GPIO_ACTIVE_HIGH &pioD 21 GPIO_ACTIVE_HIGH &pioD 22 GPIO_ACTIVE_HIGH >; row-gpios = < &pioD 23 GPIO_ACTIVE_HIGH &pioD 24 GPIO_ACTIVE_HIGH &pioD 25 GPIO_ACTIVE_HIGH &pioD 26 GPIO_ACTIVE_HIGH &pioD 27 GPIO_ACTIVE_HIGH >; linux,keymap = < MATRIX_KEY(0, 0, KEY_F1) MATRIX_KEY(0, 1, KEY_F2) MATRIX_KEY(0, 2, KEY_F3) MATRIX_KEY(0, 3, KEY_F4) MATRIX_KEY(1, 0, KEY_1) MATRIX_KEY(1, 1, KEY_2) MATRIX_KEY(1, 2, KEY_3) MATRIX_KEY(1, 3, KEY_F5) MATRIX_KEY(2, 0, KEY_4) MATRIX_KEY(2, 1, KEY_5) MATRIX_KEY(2, 2, KEY_6) MATRIX_KEY(2, 3, 0xFF) MATRIX_KEY(3, 0, KEY_7) MATRIX_KEY(3, 1, KEY_8) MATRIX_KEY(3, 2, KEY_9) MATRIX_KEY(3, 3, KEY_BACKSPACE) MATRIX_KEY(4, 0, KEY_F6) MATRIX_KEY(4, 1, KEY_0) MATRIX_KEY(4, 2, KEY_F7) MATRIX_KEY(4, 3, KEY_ENTER) >; }; /* For LPT 01 */ thermal-printer { compatible = "thermal-printer"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_thermal_printer_gpio>; thermal-printer-name = "LPT01"; /* Sensing Printer State */ thermal-printer-detect = /* 반드시 Paper, Cover, Power, Over Heat 의 순서로 저장 */ < &pioB 30 GPIO_ACTIVE_HIGH /* In : Printer Paper Detect */ &pioB 31 GPIO_ACTIVE_HIGH /* In : Printer Cover Detect */ &pioE 15 GPIO_ACTIVE_HIGH /* In : Printer Heater Power Detect */ &pioE 6 GPIO_ACTIVE_HIGH /* In : Printer Over Heater Detect */ >; thermal-printer-detect-active-logic = /* 반드시 Paper, Cover, Power, Over Heat 의 순서로 저장 */ < 0 /* In : Printer Paper Detect - Active Low */ 0 /* In : Printer Cover Detect - Active Low */ 1 /* In : Printer Heater Power Detect - Active Low*/ 0 /* In : Printer Over Heater Detect - Active Low*/ >; /* Motor Enable */ thermal-printer-motor-sw = < &pioC 4 GPIO_ACTIVE_HIGH /* Out : Printer SB */ >; thermal-printer-motor-sw-default = < 0 /* Motor Enable to High */ >; /* Motor Phase */ thermal-printer-motor-phase = /* 반드시 A, /A, B, /B 의 순서로 저장 */ < &pioC 0 GPIO_ACTIVE_HIGH /* Out : Printer Motor A */ &pioC 1 GPIO_ACTIVE_HIGH /* Out : Printer Motor /A */ &pioC 2 GPIO_ACTIVE_HIGH /* Out : Printer Motor B */ &pioC 3 GPIO_ACTIVE_HIGH /* Out : Printer Motor /B */ >; thermal-printer-motor-phase-default = < 0 0 0 0 >; /* Printer Enable */ thermal-printer-enables = < &pioE 14 GPIO_ACTIVE_HIGH /* Out : Printer Enable */ >; thermal-printer-enables-default = < 0 >; /* Data Control */ thermal-printer-data-control = /* 반드시 Clock, Data, Latch 의 순서로 저장 */ < &pioB 27 GPIO_ACTIVE_HIGH /* Out : Printer Clock */ &pioB 28 GPIO_ACTIVE_HIGH /* Out : Printer Data */ &pioB 29 GPIO_ACTIVE_HIGH /* Out : Printer Latch */ >; thermal-printer-defalut-motor-data-control-low; thermal-printer-data-control-default = /* 반드시 Clock, Data, Latch 의 순서로 저장 */ < 0 /* Out : Printer Clock */ 0 /* Out : Printer Data */ 1 /* Out : Printer Latch */ >; /* DSTs */ thermal-printer-dsts = /* 반드시 DST x 의 순서로 저장 */ < &pioE 18 GPIO_ACTIVE_HIGH /* Out : Printer DST 1 */ &pioE 19 GPIO_ACTIVE_HIGH /* Out : Printer DST 2 */ &pioE 20 GPIO_ACTIVE_HIGH /* Out : Printer DST 3 */ &pioE 21 GPIO_ACTIVE_HIGH /* Out : Printer DST 4 */ &pioE 22 GPIO_ACTIVE_HIGH /* Out : Printer DST 5 */ &pioE 23 GPIO_ACTIVE_HIGH /* Out : Printer DST 6 */ >; thermal-printer-dsts-default = < 0 0 0 0 0 0 >; thermal-printer-dots-per-line = <384>; thermal-printer-acceleration-table-size = <64>; thermal-printer-acceleration-step-time = < /* micro second */ 4654 2876 2221 1865 1635 1471 1348 1251 1171 1105 1049 1001 958 921 887 857 830 805 782 761 742 724 707 692 677 663 650 638 627 616 605 595 586 577 568 560 552 545 537 530 524 517 511 505 499 494 488 483 478 473 468 463 459 455 450 446 442 438 434 431 427 423 420 417 >; thermal-printer-acceleration-pulse-rate = < /* pps */ 215 348 450 536 612 680 742 800 854 905 953 999 1044 1086 1127 1167 1205 1242 1278 1313 1348 1381 1414 1446 1477 1508 1538 1567 1596 1624 1652 1680 1707 1733 1760 1786 1811 1836 1861 1885 1910 1934 1957 1980 2003 2026 2049 2071 2093 2115 2137 2158 2179 2200 2221 2242 2262 2282 2302 2322 2342 2361 2381 2400 >; thermal-printer-motor-phase-steps = <8>; thermal-printer-motor-phase-steps-per-line = <4>; thermal-printer-motor-phase-step-start = < /*A /A B /B*/ 1 0 0 1 >; thermal-printer-motor-phase-step-pause = < /*A /A B /B*/ 0 0 0 0 >; thermal-printer-motor-phase-step-normal = < /*A /A B /B*/ 1 0 0 0 /* Step 1 */ 1 0 1 0 /* Step 2 */ 0 0 1 0 /* Step 3 */ 0 1 1 0 /* Step 4 */ 0 1 0 0 /* Step 5 */ 0 1 0 1 /* Step 6 */ 0 0 0 1 /* Step 7 */ 1 0 0 1 /* Step 8 */ >; thermal-printer-heater-operation-temperature = < 60 /* Low Operation Temperature */ 70 /* High Operation Temperature */ >; /* Timer for Thermal Printer Heater ADC interval and Delay */ interrupts = <42 IRQ_TYPE_LEVEL_HIGH 0>; reg = <0xFC024000 0x100>; }; leds { compatible = "gpio-leds"; status = "okay"; /* Ready LED - Busy LED for Printer - Status LED for AP */ b14 { label = "b14"; gpios = <&pioB 14 GPIO_ACTIVE_LOW>; default-state = "off"; }; /* Process LED - n Busy LED for Printer */ a25 { label = "a25"; gpios = <&pioA 25 GPIO_ACTIVE_LOW>; default-state = "off"; }; /* Complete LED - Audio In */ c21 { label = "c21"; gpios = <&pioC 21 GPIO_ACTIVE_LOW>; default-state = "off"; }; /* Error LED - No paper LED for Printer - Error LED for AP */ b15 { label = "b15"; gpios = <&pioB 15 GPIO_ACTIVE_LOW>; default-state = "off"; }; /* Key Pad BackLight */ key_light { label = "key_light"; gpios = <&pioE 11 GPIO_ACTIVE_HIGH>; default-state = "off"; }; }; backlight: backlight { compatible = "pwm-backlight"; pwms = <&hlcdc_pwm 0 50000 0>; brightness-levels = <0 4 8 16 32 64 128 255>; default-brightness-level = <128>; status = "okay"; }; panel: panel { /* Actually .... */ compatible = "vinotek,ilitek_ILI9488", "simple-panel"; backlight = <&backlight>; #address-cells = <1>; #size-cells = <0>; status = "okay"; port@0 { #address-cells = <1>; #size-cells = <0>; panel_input: endpoint@0 { reg = <0>; remote-endpoint = <&hlcdc_panel_output>; }; }; }; vcc_3v3_reg: fixedregulator_3v3 { compatible = "regulator-fixed"; regulator-name = "VCC 3V3"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; regulator-boot-on; regulator-always-on; }; vcc_mmc1_reg: fixedregulator_mmc1 { compatible = "regulator-fixed"; gpio = <&pioE 4 GPIO_ACTIVE_LOW>; regulator-name = "VDD MCI1"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; vin-supply = <&vcc_3v3_reg>; regulator-always-on; }; };