--- /dev/null
+/*
+ * at91-sama5d4-txa5.dts - Device Tree file for Ka-Ro electronics TXA5 module
+ *
+ * Copyright (C) 2015 Lothar Waßmann <LW@KARO-electronics.de>
+ * based on: at91-sama5d4_xplained.dts
+ * Copyright (C) 2015 Atmel,
+ * 2015 Josh Wu <josh.wu@atmel.com>
+ *
+ * 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 "sama5d4.dtsi"
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/pwm/pwm.h>
+
+//#define NO_PWM
+
+/ {
+ model = "Ka-Ro SAMA5D4 TXA5";
+ compatible = "atmel,sama5d4-txa5", "atmel,sama5d4", "atmel,sama5";
+
+ aliases {
+ display = &hlcdc;
+ ethernet0 = &macb0;
+ serial0 = &usart0;
+ serial1 = &usart1;
+ serial2 = &usart3;
+ };
+
+ clocks {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ mclk: clock@0 {
+ compatible = "fixed-clock";
+ reg = <0>;
+ #clock-cells = <0>;
+ clock-frequency = <27000000>;
+ };
+ };
+
+ backlight: backlight {
+ compatible = "pwm-backlight";
+ pwms = <&hlcdc_pwm 0 90000 PWM_POLARITY_INVERTED>;
+ brightness-levels = < 0 1 2 3 4 5 6 7 8 9
+ 10 11 12 13 14 15 16 17 18 19
+ 20 21 22 23 24 25 26 27 28 29
+ 30 31 32 33 34 35 36 37 38 39
+ 40 41 42 43 44 45 46 47 48 49
+ 50 51 52 53 54 55 56 57 58 59
+ 60 61 62 63 64 65 66 67 68 69
+ 70 71 72 73 74 75 76 77 78 79
+ 80 81 82 83 84 85 86 87 88 89
+ 90 91 92 93 94 95 96 97 98 99
+ 100>;
+ default-brightness-level = <50>;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+ status = "okay";
+
+ heartbeat {
+ label = "heartbeat";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_led>;
+ gpios = <&pioD 29 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "heartbeat";
+ };
+ };
+
+ panel: panel {
+ compatible = "edt,et070080dh6", "simple-panel";
+ //pinctrl-names = "default";
+ //pinctrl-0 = <&pinctrl_lcd_reset>;
+ //enable-gpios = <&pioB 15 GPIO_ACTIVE_HIGH>;
+ power-supply = <®_lcd_pwr>;
+ status = "okay";
+
+ port {
+ display0_in: endpoint {
+ remote-endpoint = <&hlcdc_disp0_ep>;
+ };
+ };
+ };
+
+ regulators {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ reg_lcd_pwr: regulator@0 {
+ compatible = "regulator-fixed";
+ reg = <0>;
+ regulator-name = "LCD POWER";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_lcd_pwr>;
+ gpio = <&pioA 25 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ regulator-always-on;
+ };
+
+ reg_lcd_reset: regulator@1 {
+ compatible = "regulator-fixed";
+ reg = <1>;
+ regulator-name = "LCD RESET";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_lcd_reset>;
+ gpio = <&pioB 15 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ regulator-always-on;
+ };
+#ifdef NO_PWM
+ reg_lcd_backlight: regulator@2 {
+ compatible = "regulator-fixed";
+ reg = <2>;
+ regulator-name = "LCD Backlight";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_lcd_backlight>;
+ gpio = <&pioA 24 GPIO_ACTIVE_HIGH>;
+ regulator-always-on;
+ };
+#endif
+ reg_vdda: regulator@3 {
+ compatible = "regulator-fixed";
+ reg = <3>;
+ regulator-name = "VDDA";
+ regulator-min-microvolt = <2500000>;
+ regulator-max-microvolt = <2500000>;
+ regulator-always-on;
+ };
+
+ };
+};
+
+&adc0 {
+ atmel,adc-vref = <3300>;
+ status = "okay";
+};
+
+&hlcdc {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_lcd_rgb888>;
+ panel = <&panel>;
+ status = "okay";
+
+ display-timings {
+ VGA {
+ clock-frequency = <25200000>;
+ hactive = <640>;
+ vactive = <480>;
+ hback-porch = <48>;
+ hsync-len = <96>;
+ hfront-porch = <16>;
+ vback-porch = <31>;
+ vsync-len = <2>;
+ vfront-porch = <12>;
+ hsync-active = <0>;
+ vsync-active = <0>;
+ de-active = <1>;
+ pixelclk-active = <0>;
+ };
+
+ ETV570 {
+ clock-frequency = <25200000>;
+ hactive = <640>;
+ vactive = <480>;
+ hback-porch = <114>;
+ hsync-len = <30>;
+ hfront-porch = <16>;
+ vback-porch = <32>;
+ vsync-len = <3>;
+ vfront-porch = <10>;
+ hsync-active = <0>;
+ vsync-active = <0>;
+ de-active = <1>;
+ pixelclk-active = <0>;
+ };
+
+ ET0350 {
+ clock-frequency = <6413760>;
+ hactive = <320>;
+ vactive = <240>;
+ hback-porch = <34>;
+ hsync-len = <34>;
+ hfront-porch = <20>;
+ vback-porch = <15>;
+ vsync-len = <3>;
+ vfront-porch = <4>;
+ hsync-active = <0>;
+ vsync-active = <0>;
+ de-active = <1>;
+ pixelclk-active = <0>;
+ };
+
+ ET0430 {
+ clock-frequency = <9009000>;
+ hactive = <480>;
+ vactive = <272>;
+ hback-porch = <2>;
+ hsync-len = <41>;
+ hfront-porch = <2>;
+ vback-porch = <2>;
+ vsync-len = <10>;
+ vfront-porch = <2>;
+ hsync-active = <0>;
+ vsync-active = <0>;
+ de-active = <1>;
+ pixelclk-active = <1>;
+ };
+
+ ET0500 {
+ clock-frequency = <33264000>;
+ hactive = <800>;
+ vactive = <480>;
+ hback-porch = <88>;
+ hsync-len = <128>;
+ hfront-porch = <40>;
+ vback-porch = <33>;
+ vsync-len = <2>;
+ vfront-porch = <10>;
+ hsync-active = <0>;
+ vsync-active = <0>;
+ de-active = <1>;
+ pixelclk-active = <0>;
+ };
+
+ ET0700 { /* same as ET0500 */
+ clock-frequency = <33264000>;
+ hactive = <800>;
+ vactive = <480>;
+ hback-porch = <88>;
+ hsync-len = <128>;
+ hfront-porch = <40>;
+ vback-porch = <33>;
+ vsync-len = <2>;
+ vfront-porch = <10>;
+ hsync-active = <0>;
+ vsync-active = <0>;
+ de-active = <1>;
+ pixelclk-active = <0>;
+ };
+
+ ETQ570 {
+ clock-frequency = <6596040>;
+ hactive = <320>;
+ vactive = <240>;
+ hback-porch = <38>;
+ hsync-len = <30>;
+ hfront-porch = <30>;
+ vback-porch = <16>;
+ vsync-len = <3>;
+ vfront-porch = <4>;
+ hsync-active = <0>;
+ vsync-active = <0>;
+ de-active = <1>;
+ pixelclk-active = <0>;
+ };
+ };
+};
+
+&hlcdc_disp0 {
+ panel = <&panel>;
+};
+
+&hlcdc_disp0_ep {
+ panel = <&panel>;
+ remote-endpoint = <&display0_in>;
+};
+
+&i2c0 {
+ clock-frequency = <400000>;
+ status = "okay";
+
+ sgtl5000: sgtl5000@0a {
+ compatible = "fsl,sgtl5000";
+ reg = <0x0a>;
+ VDDA-supply = <®_vdda>;
+ VDDIO-supply = <&vcc_3v3_reg>;
+ clocks = <&mclk>;
+ };
+
+ polytouch: edt-ft5x06@38 {
+ compatible = "edt,edt-ft5x06";
+ reg = <0x38>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_edt_ft5x06>;
+ interrupt-parent = <&pioB>;
+ interrupts = <15 0>;
+ reset-gpios = <&pioB 14 GPIO_ACTIVE_LOW>;
+ wake-gpios = <&pioD 28 GPIO_ACTIVE_HIGH>;
+ linux,wakeup;
+ };
+
+ touchscreen: tsc2007@48 {
+ compatible = "ti,tsc2007";
+ reg = <0x48>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_tsc2007>;
+ interrupt-parent = <&pioE>;
+ interrupts = <4 0>;
+ gpios = <&pioE 4 GPIO_ACTIVE_LOW>;
+ ti,x-plate-ohms = <660>;
+ linux,wakeup;
+ };
+};
+
+&i2c1 {
+ clock-frequency = <400000>;
+ status = "okay";
+
+ pmic: act8865@5b {
+ compatible = "active-semi,act8865";
+ reg = <0x5b>;
+ system-power-controller;
+ interrupt-parent = <&pioE>;
+ interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
+ status = "okay";
+
+ regulators {
+ vcc_1v8_reg: DCDC_REG1 {
+ regulator-name = "VCC_1V8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ };
+
+ vcc_3v3_reg: DCDC_REG3 {
+ regulator-name = "VCC_3V3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
+
+ vddfuse_reg: LDO_REG1 {
+ regulator-name = "FUSE_2V5";
+ regulator-min-microvolt = <2500000>;
+ regulator-max-microvolt = <2500000>;
+ };
+
+ vddana_reg: LDO_REG2 {
+ regulator-name = "VDDANA";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
+ };
+ };
+
+ sound {
+ compatible = "atmel,asoc-sgtl5000";
+ atmel,model = "sgtl5000 @ TXA5";
+ atmel,audio-routing =
+ "MIC_IN", "Mic Jack",
+ "Mic Jack", "Mic Bias",
+ "Headphone Jack", "HP_OUT";
+ atmel,ssc-controller = <&ssc0>;
+ atmel,audio-codec = <&sgtl5000>;
+#if 0
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "SGTL5000 Audio";
+
+ simple-audio-card,dai-link {
+ cpu_dai: simple-audio-card,cpu {
+ format = "i2s";
+ sound-dai = <&sgtl5000 0>;
+ };
+
+ codec_dai: simple-audio-card,codec {
+ format = "dsp_b";
+ sound-dai = <&cpu_dai 0>;
+ };
+ };
+#endif
+ };
+};
+
+&macb0 {
+ phy-mode = "rmii";
+ status = "okay";
+
+ phy0: ethernet-phy@1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_etn_phy>;
+ interrupt-parent = <&pioE>;
+ interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
+ reg = <1>;
+ };
+};
+
+&main_xtal {
+ clock-frequency = <12000000>;
+};
+
+&mmc1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_mmc1_clk_cmd_dat0 &pinctrl_mmc1_dat1_3 &pinctrl_mmc1_cd>;
+ status = "okay";
+ slot@0 {
+ reg = <0>;
+ bus-width = <4>;
+ cd-gpios = <&pioE 3 0>;
+ };
+};
+
+&nand0 {
+ nand-bus-width = <8>;
+ nand-ecc-mode = "hw";
+ nand-on-flash-bbt;
+ atmel,has-pmecc;
+ status = "okay";
+};
+
+&pinctrl {
+ sama5d4-txa5 {
+ pinctrl_edt_ft5x06: edt-ft5x06-0 {
+ atmel,pins = <
+ AT91_PIOB 11 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH /* nINT */
+ AT91_PIOB 14 AT91_PERIPH_GPIO AT91_PINCTRL_NONE /* RESET */
+ AT91_PIOD 28 AT91_PERIPH_GPIO AT91_PINCTRL_NONE /* WAKE */
+ >;
+ };
+
+ pinctrl_etn_phy: ent-phygrp-1 {
+ atmel,pins = <
+ AT91_PIOE 1 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH /* nINT */
+ >;
+ };
+
+ pinctrl_lcd_pwr: lcd-pwrgrp-1 {
+ atmel,pins = <
+ AT91_PIOA 25 AT91_PERIPH_GPIO AT91_PINCTRL_NONE
+ >;
+ };
+
+ pinctrl_lcd_reset: lcd-resetgrp-1 {
+ atmel,pins = <
+ AT91_PIOB 15 AT91_PERIPH_GPIO AT91_PINCTRL_NONE
+ >;
+ };
+#ifdef NO_PWM
+ pinctrl_lcd_backlight: lcd-backlightgrp-1 {
+ atmel,pins = <
+ AT91_PIOA 24 AT91_PERIPH_GPIO AT91_PINCTRL_NONE
+ >;
+ };
+#endif
+ pinctrl_led: ledgrp-1 {
+ atmel,pins = <
+ AT91_PIOD 29 AT91_PERIPH_GPIO AT91_PINCTRL_NONE
+ >;
+ };
+
+ pinctrl_mmc1_cd: mmc1-cdgrp-0 {
+ atmel,pins = <AT91_PIOE 6 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
+ };
+
+ pinctrl_spi0_cs: spi0-csgrp-0 {
+ atmel,pins = <
+ AT91_PIOC 3 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP
+ AT91_PIOC 27 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP
+ AT91_PIOB 28 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP
+ AT91_PIOB 29 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP
+ >;
+ };
+
+ pinctrl_spi1_cs: spi1-csgrp-0 {
+ atmel,pins = <
+ AT91_PIOB 21 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP /* CSPI_SS0 */
+ AT91_PIOB 22 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP /* CSPI_SS1 */
+ AT91_PIOB 23 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP /* CSPI_RDY */
+ >;
+ };
+
+ pinctrl_tsc2007: tsc2007grp-0 {
+ atmel,pins = <
+ AT91_PIOE 4 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH /* nINT */
+ >;
+ };
+ pinctrl_usba_vbus: usba-vbusgrp-1 {
+ atmel,pins = <
+ AT91_PIOE 10 AT91_PERIPH_GPIO AT91_PINCTRL_NONE /* USBOTG_VBUSEN */
+ AT91_PIOD 8 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH /* USBOTG_OC */
+ >;
+ };
+
+ pinctrl_usbb_vbus: usbb-vbusgrp-1 {
+ atmel,pins = <
+ AT91_PIOE 11 AT91_PERIPH_GPIO AT91_PINCTRL_NONE /* USBH_VBUSEN */
+ AT91_PIOD 9 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH /* USBH_OC */
+ >;
+ };
+ };
+};
+
+&pioC {
+ status = "disabled";
+};
+
+&pioD {
+ status = "okay";
+};
+
+&slow_xtal {
+ clock-frequency = <32768>;
+};
+
+&spi1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_spi1 &pinctrl_spi1_cs>;
+ status = "okay";
+
+ cs-gpios = <
+ &pioB 21 GPIO_ACTIVE_LOW
+ &pioB 22 GPIO_ACTIVE_LOW
+ &pioB 23 GPIO_ACTIVE_LOW
+ 0 0
+ >;
+
+ spidev0: spi@0 {
+ compatible = "karo,spidev";
+ reg = <0>;
+ spi-max-frequency = <48000000>;
+ };
+
+ spidev1: spi@1 {
+ compatible = "karo,spidev";
+ reg = <1>;
+ spi-max-frequency = <48000000>;
+ };
+
+ spidev2: spi@2 {
+ compatible = "karo,spidev";
+ reg = <2>;
+ spi-max-frequency = <48000000>;
+ };
+};
+
+&ssc0 {
+ status = "okay";
+};
+
+&usart0 {
+ status = "okay";
+};
+
+&usart1 {
+ status = "okay";
+};
+
+&usart3 {
+ status = "okay";
+};
+
+&usb0 {
+ atmel,vbus-gpio = <&pioE 10 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usba_vbus>;
+ status = "okay";
+};
+
+&usb1 {
+ num-ports = <1>;
+ atmel,vbus-gpio = <&pioE 11 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usbb_vbus>;
+ status = "okay";
+};
+
+&watchdog {
+ status = "okay";
+};