From: Ludovic Desroches <ludovic.desroches@xxxxxxxxxxxxx> Signed-off-by: Ludovic Desroches <ludovic.desroches@xxxxxxxxxxxxx> --- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/at91-sama5d2_ptc_atqt1-xpro.dts | 492 ++++++++++++++++++++++ 2 files changed, 493 insertions(+) create mode 100644 arch/arm/boot/dts/at91-sama5d2_ptc_atqt1-xpro.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index dee46cc..225b3eb 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -47,6 +47,7 @@ dtb-$(CONFIG_SOC_AT91SAM9) += \ dtb-$(CONFIG_SOC_SAM_V7) += \ at91-kizbox2.dtb \ at91-sama5d2_xplained.dtb \ + at91-sama5d2_ptc_atqt1-xpro.dtb \ at91-sama5d3_xplained.dtb \ at91-tse850-3.dtb \ sama5d31ek.dtb \ diff --git a/arch/arm/boot/dts/at91-sama5d2_ptc_atqt1-xpro.dts b/arch/arm/boot/dts/at91-sama5d2_ptc_atqt1-xpro.dts new file mode 100644 index 0000000..a1766e8 --- /dev/null +++ b/arch/arm/boot/dts/at91-sama5d2_ptc_atqt1-xpro.dts @@ -0,0 +1,492 @@ +/* + * at91-sama5d2_ptc.dts - Device Tree file for SAMA5D2 PTC board + * + * Copyright (C) 2015 Atmel, + * 2015 Wenyou Yang <wenyou.yang@xxxxxxxxx> + * + * 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 "sama5d2.dtsi" +#include "sama5d2-pinfunc.h" +#include <dt-bindings/gpio/gpio.h> + +/ { + model = "Atmel SAMA5D2 PTC"; + compatible = "atmel,sama5d2-ptc", "atmel,sama5d2", "atmel,sama5"; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + memory { + reg = <0x20000000 0x80000>; + }; + + clocks { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + main_clock: clock@0 { + compatible = "atmel,osc", "fixed-clock"; + clock-frequency = <12000000>; + }; + + slow_xtal { + clock-frequency = <32768>; + }; + + main_xtal { + clock-frequency = <12000000>; + }; + }; + + ahb { + usb0: gadget@00300000 { + atmel,vbus-gpio = <&pioA 27 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usba_vbus>; + status = "okay"; + }; + + usb1: ohci@00400000 { + num-ports = <3>; + atmel,vbus-gpio = <0 + &pioA 28 GPIO_ACTIVE_HIGH + 0 + >; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usb_default>; + status = "okay"; + }; + + usb2: ehci@00500000 { + status = "okay"; + }; + + /* + nand0: nand@80000000 { + nand-bus-width = <8>; + nand-ecc-mode = "hw"; + nand-on-flash-bbt; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_nand_default>; + status = "okay"; + + bootstrap@0 { + label = "bootstrap"; + reg = <0x0 0x600000>; + }; + + kernel@200000 { + label = "kernel"; + reg = <0x600000 0x600000>; + }; + + rootfs@800000 { + label = "rootfs"; + reg = <0xc00000 0x0f800000>; + }; + }; + */ + + apb { + spi0: spi@f8000000 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_spi0_default>; + status = "okay"; + + m25p80@0 { + compatible = "atmel,at25df321a"; + reg = <0>; + spi-max-frequency = <50000000>; + }; + }; + + macb0: ethernet@f8008000 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_macb0_rmii>; + phy-mode = "rmii"; + status = "okay"; + }; + + uart0: serial@f801c000 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_uart0_default>; + status = "okay"; + }; + + i2c0: i2c@f8028000 { + dmas = <0>, <0>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c0_default>; + i2c-sda-hold-time-ns = <350>; + status = "okay"; + + pmic@5b { + compatible = "active-semi,act8945a"; + reg = <0x5b>; + active-semi,vsel-high; + active-semi,chglev-gpios = <&pioA 12 GPIO_ACTIVE_HIGH>; + active-semi,lbo-gpios = <&pioA 72 GPIO_ACTIVE_LOW>; + active-semi,irq_gpios = <&pioA 45 GPIO_ACTIVE_LOW>; + active-semi,input-voltage-threshold-microvolt = <6600>; + active-semi,precondition-timeout = <40>; + active-semi,total-timeout = <3>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_charger_chglev &pinctrl_charger_lbo &pinctrl_charger_irq>; + status = "okay"; + + regulators { + vdd_1v35_reg: REG_DCDC1 { + regulator-name = "VDD_1V35"; + regulator-min-microvolt = <1350000>; + regulator-max-microvolt = <1350000>; + regulator-always-on; + }; + + vdd_1v2_reg: REG_DCDC2 { + regulator-name = "VDD_1V2"; + regulator-min-microvolt = <1100000>; + regulator-max-microvolt = <1300000>; + regulator-always-on; + }; + + vdd_3v3_reg: REG_DCDC3 { + regulator-name = "VDD_3V3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + + vdd_fuse_reg: REG_LDO1 { + regulator-name = "VDD_FUSE"; + regulator-min-microvolt = <2500000>; + regulator-max-microvolt = <2500000>; + regulator-always-on; + }; + + vdd_3v3_lp_reg: REG_LDO2 { + regulator-name = "VDD_3V3_LP"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + + vdd_led_reg: REG_LDO3 { + regulator-name = "VDD_LED"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + + vdd_sdhc_1v8_reg: REG_LDO4 { + regulator-name = "VDD_SDHC_1V8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + }; + }; + }; + }; + + shdwc@f8048010 { + atmel,shdwc-debouncer = <976>; + + input@0 { + reg = <0>; + atmel,wakeup-type = "low"; + }; + }; + + i2c1: i2c@fc028000 { + dmas = <0>, <0>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c1_default>; + status = "okay"; + + at24@54 { + compatible = "atmel,24c02"; + reg = <0x5f>; + pagesize = <16>; + }; + }; + + pinctrl@fc038000 { + pinctrl_charger_chglev: charger_chglev { + pinmux = <PIN_PA12__GPIO>; + bias-disable; + }; + + pinctrl_charger_irq: charger_irq { + pinmux = <PIN_PB13__GPIO>; + bias-disable; + }; + + pinctrl_charger_lbo: charger_lbo { + pinmux = <PIN_PC8__GPIO>; + bias-pull-up; + }; + + pinctrl_i2c0_default: i2c0_default { + pinmux = <PIN_PD21__TWD0>, + <PIN_PD22__TWCK0>; + bias-disable; + }; + + pinctrl_i2c1_default: i2c1_default { + pinmux = <PIN_PC6__TWD1>, + <PIN_PC7__TWCK1>; + bias-disable; + }; + + pinctrl_key_gpio_default: key_gpio_default { + pinmux = <PIN_PB9__GPIO>; + bias-pull-up; + }; + + pinctrl_led_gpio_default: led_gpio_default { + pinmux = <PIN_PD11__GPIO>, + <PIN_PD12__GPIO>, + <PIN_PC0__GPIO>, + <PIN_PC1__GPIO>, + <PIN_PD17__GPIO>, + <PIN_PD18__GPIO>, + <PIN_PD16__GPIO>, + <PIN_PC2__GPIO>, + <PIN_PD7__GPIO>, + <PIN_PD8__GPIO>, + <PIN_PD9__GPIO>, + <PIN_PD10__GPIO>, + <PIN_PC4__GPIO>; + bias-pull-up; + }; + + pinctrl_macb0_rmii: macb0_rmii { + pinmux = <PIN_PB14__GTXCK>, + <PIN_PB15__GTXEN>, + <PIN_PB16__GRXDV>, + <PIN_PB17__GRXER>, + <PIN_PB18__GRX0>, + <PIN_PB19__GRX1>, + <PIN_PB20__GTX0>, + <PIN_PB21__GTX1>, + <PIN_PB22__GMDC>, + <PIN_PB23__GMDIO>; + bias-disable; + }; + + pinctrl_nand_default: nand_default { + pinmux = <PIN_PA8__NWE_NANDWE>, + <PIN_PA9__NCS3>, + <PIN_PA10__A21_NANDALE>, + <PIN_PA11__A22_NANDCLE>, + <PIN_PA12__NRD_NANDOE>, + <PIN_PA21__NANDRDY>, + <PIN_PA0__D0>, + <PIN_PA1__D1>, + <PIN_PA2__D2>, + <PIN_PA3__D3>, + <PIN_PA4__D4>, + <PIN_PA5__D5>, + <PIN_PA6__D6>, + <PIN_PA7__D7>; + bias-disable; + }; + + /* + * There is no real pinmux for PTC, if the pin + * is not requested by another peripheral then + * the muxing is done when device is activated. + * Requesting pins for PTC as GPIO is + * encouraged to prevent conflicts and to + * disable bias in order to be in the same + * state when the pin is not muxed to the PTC. + */ + pinctrl_ptc_default: ptc_default { + pinmux = <PIN_PD3__GPIO>, + <PIN_PD4__GPIO>, + <PIN_PD5__GPIO>, + <PIN_PD6__GPIO>, + <PIN_PD13__GPIO>, + <PIN_PD14__GPIO>, + <PIN_PD15__GPIO>; + bias-disable; + }; + + + pinctrl_spi0_default: spi0_default { + pinmux = <PIN_PA14__SPI0_SPCK>, + <PIN_PA15__SPI0_MOSI>, + <PIN_PA16__SPI0_MISO>, + <PIN_PA17__SPI0_NPCS0>; + bias-disable; + }; + + pinctrl_uart0_default: uart0_default { + pinmux = <PIN_PB26__URXD0>, + <PIN_PB27__UTXD0>; + bias-disable; + }; + + pinctrl_usb_default: usb_default { + pinmux = <PIN_PA28__GPIO>; + bias-disable; + }; + + pinctrl_usba_vbus: usba_vbus { + pinmux = <PIN_PA27__GPIO>; + bias-disable; + }; + }; + + ptc@fc060000 { + atmel,acq-type = "mutual"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ptc_default>; + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + slider@0 { + reg = <0>; + linux,axis = <0x0>; /* ABS_X */ + }; + wheel@1 { + reg = <1>; + }; + button@8 { + reg = <8>; + linux,keycode = <2>; + }; + + button@9 { + reg = <9>; + linux,keycode = <3>; + }; + }; + }; + }; + + gpio_keys { + compatible = "gpio-keys"; + + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_key_gpio_default>; + + bp1 { + label = "PB_USER"; + gpios = <&pioA 41 GPIO_ACTIVE_LOW>; + linux,code = <0x104>; + }; + }; + + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_led_gpio_default>; + status = "okay"; + + led0 { + label = "led0"; + gpios = <&pioA PIN_PD11 GPIO_ACTIVE_LOW>; + }; + + led1 { + label = "led1"; + gpios = <&pioA PIN_PD12 GPIO_ACTIVE_LOW>; + }; + + led2 { + label = "led2"; + gpios = <&pioA PIN_PC0 GPIO_ACTIVE_LOW>; + }; + + led3 { + label = "led3"; + gpios = <&pioA PIN_PC1 GPIO_ACTIVE_LOW>; + }; + + led4 { + label = "led4"; + gpios = <&pioA PIN_PD17 GPIO_ACTIVE_LOW>; + }; + + led5 { + label = "led5"; + gpios = <&pioA PIN_PD18 GPIO_ACTIVE_LOW>; + }; + + led6 { + label = "led6"; + gpios = <&pioA PIN_PC2 GPIO_ACTIVE_LOW>; + }; + + led7 { + label = "led7"; + gpios = <&pioA PIN_PD16 GPIO_ACTIVE_LOW>; + }; + + led8 { + label = "led8"; + gpios = <&pioA PIN_PD7 GPIO_ACTIVE_LOW>; + }; + + led9 { + label = "led9"; + gpios = <&pioA PIN_PD8 GPIO_ACTIVE_LOW>; + }; + + red { + label = "red"; + gpios = <&pioA PIN_PD9 GPIO_ACTIVE_LOW>; + }; + + green { + label = "green"; + gpios = <&pioA PIN_PD10 GPIO_ACTIVE_LOW>; + }; + + blue { + label = "blue"; + gpios = <&pioA PIN_PC4 GPIO_ACTIVE_LOW>; + }; + }; +}; -- 2.9.0 -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html