diff options
author | Klaus Goger <klaus.goger@theobroma-systems.com> | 2016-01-31 20:09:16 +0100 |
---|---|---|
committer | Klaus Goger <klaus.goger@theobroma-systems.com> | 2016-08-17 14:54:38 +0200 |
commit | 6c1da56ab65cc3d4851be73d577ec7feafad160a (patch) | |
tree | 528fad01673f8967a25978fe3ddcdfb4f8193188 | |
parent | 4f99dbb59755682941f64a11f8ef6585e100f241 (diff) |
ARM: dts: sun6i: Add a dts for the Pangolin module
Pangolin is a A31 based uQseven module with up to 2GB DDR3, eMMC,
SPI NOR Flash, HDMI, LVDS, 7 USB Host ports, USB to SATA bridge,
Gigabit Ethernet and an Offload STM32 Cortex-M0 processor
providing CAN, RTC and fan controller functionality.
For more details see: http://theobroma-systems.com/a31-uq7/
Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com>
-rw-r--r-- | arch/arm/boot/dts/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/boot/dts/sun6i-a31-pangolin.dts | 417 |
2 files changed, 418 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 95c1923ce6fa..f836e209ff60 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -675,6 +675,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \ sun6i-a31-i7.dtb \ sun6i-a31-m9.dtb \ sun6i-a31-mele-a1000g-quad.dtb \ + sun6i-a31-pangolin.dtb \ sun6i-a31s-cs908.dtb \ sun6i-a31s-primo81.dtb \ sun6i-a31s-sina31s.dtb \ diff --git a/arch/arm/boot/dts/sun6i-a31-pangolin.dts b/arch/arm/boot/dts/sun6i-a31-pangolin.dts new file mode 100644 index 000000000000..01cfc848255d --- /dev/null +++ b/arch/arm/boot/dts/sun6i-a31-pangolin.dts @@ -0,0 +1,417 @@ +/* + * Copyright 2014 Maxime Ripard + * Copyright 2016 Klaus Goger + * + * Maxime Ripard <maxime.ripard@free-electrons.com> + * Klaus Goger <klaus.goger@theobroma-systems.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. + * + * You should have received a copy of the GNU General Public + * License along with this file; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + * MA 02110-1301 USA + * + * 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 "sun6i-a31.dtsi" +#include "sunxi-common-regulators.dtsi" + +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/pinctrl/sun4i-a10.h> + +/ { + model = "Theobroma Systems A31 Pangolin"; + compatible = "tsd,a31-pangolin", "allwinner,sun6i-a31"; + + chosen { + /* Enable kernel output on HDMI (tty0) and RS232 (ttyS2), rootfs on SD card */ + bootargs = "console=tty0 console=ttyS2,115200 root=/dev/mmcblk1p1 rw rootwait"; + }; + + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&leds_pins_pangolin>; + + module_led { + label = "module_led"; + gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "heartbeat"; + }; + sd_card_led { + label = "sd_card_led"; + gpios = <&pio 2 16 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "mmc1"; + }; + }; + + /* Redefines mmc0 under new name so that the sd card is probed after the emmc */ + soc@01c00000 { + sdcard: sdcard@01c0f000 { + compatible = "allwinner,sun5i-a13-mmc"; + reg = <0x01c0f000 0x1000>; + clocks = <&ahb1_gates 8>, + <&mmc0_clk 0>, + <&mmc0_clk 1>, + <&mmc0_clk 2>; + clock-names = "ahb", + "mmc", + "output", + "sample"; + resets = <&ahb1_rst 8>; + reset-names = "ahb"; + interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>; + + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_pangolin>; + vmmc-supply = <®_dcdc1>; + bus-width = <4>; + cd-gpios = <&pio 2 19 GPIO_ACTIVE_LOW>; /* PC19 */ + status = "okay"; + }; + }; + + thermal-zones { + cpu_thermal { + cooling-maps { + map_fan { + trip = <&cpu_active>; + cooling-device = <&fan 0 9>; + }; + map0 { + trip = <&cpu_alert0>; + cooling-device = <&cpu0 0 1>; + }; + map1 { + trip = <&cpu_alert1>; + cooling-device = <&cpu0 0 2>; + }; + map2 { + trip = <&cpu_alert2>; + cooling-device = <&cpu0 0 3>; + }; + }; + + trips { + cpu_active: cpu_active { + temperature = <40000>; + hysteresis = <2000>; + type = "active"; + }; + cpu_alert0: cpu_alert0 { + temperature = <70000>; + hysteresis = <2000>; + type = "passive"; + }; + cpu_alert1: cpu_alert1 { + temperature = <80000>; + hysteresis = <2000>; + type = "passive"; + }; + cpu_alert2: cpu_alert2 { + temperature = <90000>; + hysteresis = <2000>; + type = "passive"; + }; + cpu_crit: cpu_crit { + temperature = <100000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + }; + + reg_usbotg_vbus: usbotg-vbus { + compatible = "regulator-fixed"; + regulator-name = "otg-vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + status = "okay"; + }; +}; + +&rtc { + status = "disabled"; +}; + +&ehci0 { + status = "okay"; +}; + +&ehci1 { + status = "okay"; +}; + +&ohci1 { + status = "okay"; +}; + +&ohci2 { + pinctrl-names = "default"; + pinctrl-0 = <&ohci2_pins_a>; + status = "okay"; +}; + +&usb_otg { + dr_mode = "otg"; + status = "okay"; +}; + +&gmac { + pinctrl-names = "default"; + pinctrl-0 = <&gmac_pins_rgmii_a>; + phy-mode = "rgmii"; + snps,reset-gpio = <&pio 0 7 GPIO_ACTIVE_LOW>; + snps,reset-active-low; + snps,reset-delays-us = <0 50000 1000000>; + txc-skew-ps = <1800>; + rxc-skew-ps = <1800>; + status = "okay"; +}; + +&i2c0 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins_a>; + status = "okay"; +}; + +&i2c1 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_pins_a>; + status = "okay"; +}; + +&i2c2 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c2_pins_a>; + status = "okay"; +}; + +&i2c3 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c3_pins_a>; + status = "okay"; + + rtc_twi: rtc@6f { + compatible = "isil,isl1208"; + reg = <0x6f>; + }; + fan: fan@18 { + compatible = "ti,amc6821"; + reg = <0x18>; + cooling-min-state = <0>; + cooling-max-state = <9>; + #cooling-cells = <2>; + }; +}; + +&spi0 { + pinctrl-names = "default"; + pinctrl-0 = <&spi0_pins_a>; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + flash: mx25l@0 { + compatible = "macronix,mx25l4005a"; + reg = <0>; + spi-max-frequency = <16000000>; + }; +}; + +&spi1 { + pinctrl-names = "default"; + pinctrl-0 = <&spi1_pins_a>; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + spidev@0x00 { + compatible = "spidev"; + spi-max-frequency = <6000000>; + reg = <0>; + }; + spidev@0x01 { + compatible = "spidev"; + spi-max-frequency = <6000000>; + reg = <1>; + }; + +}; + +&mmc0_pins_a { + /* external pull-ups missing for some pins */ + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; +}; + +&mmc2 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc2_8bit_emmc_pins>; + vmmc-supply = <®_dcdc1>; + bus-width = <4>; + non-removable; + status = "okay"; +}; + +&pio { + mmc0_cd_pin_pangolin: mmc0_cd_pin@0 { + allwinner,pins = "PC19"; + allwinner,function = "gpio_in"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; + }; + leds_pins_pangolin: led_pins@0 { + allwinner,pins = "PH7", "PC16"; + allwinner,function = "gpio_out"; + allwinner,drive = <SUN4I_PINCTRL_20_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; + usb0_id_detect_pin: usb0_id_detect_pin@0 { + allwinner,pins = "PH2"; + allwinner,function = "gpio_in"; + allwinner,drive = <SUN4I_PINCTRL_20_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; + usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 { + allwinner,pins = "PD23"; + allwinner,function = "gpio_in"; + allwinner,drive = <SUN4I_PINCTRL_20_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; + usb0_vbus_enable: usb0_vbus_enable@0 { + allwinner,pins = "PD24"; + allwinner,function = "gpio_out"; + allwinner,drive = <SUN4I_PINCTRL_20_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; + gmac_pins_rgmii_a: gmac_rgmii@0 { + allwinner,drive = <SUN4I_PINCTRL_20_MA>; + }; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins_a>; + status = "okay"; +}; + +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&uart1_pins_a>; + status = "okay"; +}; + +&uart2 { + pinctrl-names = "default"; + pinctrl-0 = <&uart2_pins_a>; + status = "okay"; +}; + +&usbphy { + pinctrl-names = "default"; + pinctrl-0 = <&usb0_id_detect_pin>,<&usb0_vbus_detect_pin>; + usb0_vbus-supply = <®_usbotg_vbus>; + usb0_id_det-gpio = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */ + usb0_vbus_det-gpio = <&pio 3 23 GPIO_ACTIVE_HIGH>; /* PD23 */ + status = "okay"; +}; + +&p2wi { + status = "okay"; + axp22x: pmic@68 { + compatible = "x-powers,axp221"; + reg = <0x68>; + interrupt-parent = <&nmi_intc>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + }; +}; + + +#include "axp22x.dtsi" + +®_dc5ldo { + regulator-min-microvolt = <1100000>; + regulator-max-microvolt = <1100000>; + regulator-name = "vdd-cpus"; +}; + +®_dcdc1 { + regulator-always-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-3v0"; +}; + +®_dcdc2 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1220000>; + regulator-name = "vdd-gpu"; +}; + +®_dcdc3 { + regulator-always-on; + regulator-min-microvolt = <600000>; + regulator-max-microvolt = <1360000>; + regulator-name = "vdd-cpu"; +}; + +®_dcdc4 { + regulator-always-on; + regulator-min-microvolt = <1240000>; + regulator-max-microvolt = <1240000>; + regulator-name = "vdd-sys-dll"; +}; + +®_dcdc5 { + regulator-always-on; + regulator-min-microvolt = <1500000>; + regulator-max-microvolt = <1500000>; + regulator-name = "vcc-dram"; +}; + +®_aldo3 { + regulator-always-on; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-name = "vdd-rtc"; +}; + +&rtp { + status = "okay"; +}; |