Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Copyright 2015 Hans de Goede <hdegoede@redhat.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 "sun7i-a20.dtsi"
- #include "sunxi-common-regulators.dtsi"
- #include <dt-bindings/gpio/gpio.h>
- #include <dt-bindings/interrupt-controller/arm-gic.h>
- / {
- model = "LeMaker Banana Pro";
- compatible = "lemaker,bananapro", "allwinner,sun7i-a20";
- };
- &spi0 {
- pinctrl-names = "default";
- pinctrl-0 = <&spi0_pins_a>;
- status = "okay";
- };
- &mmc0 {
- pinctrl-names = "default";
- pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bananapi>;
- vmmc-supply = <®_vcc3v3>;
- bus-width = <4>;
- cd-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */
- cd-inverted;
- status = "okay";
- };
- &mmc3 {
- pinctrl-names = "default";
- pinctrl-0 = <&mmc3_pins_a>;
- vmmc-supply = <®_vmmc3>;
- bus-width = <4>;
- non-removable;
- status = "okay";
- };
- &usbphy {
- usb1_vbus-supply = <®_usb1_vbus>;
- usb2_vbus-supply = <®_usb2_vbus>;
- status = "okay";
- };
- &ehci0 {
- status = "okay";
- };
- &ohci0 {
- status = "okay";
- };
- &ahci {
- status = "okay";
- };
- &ehci1 {
- status = "okay";
- };
- &ohci1 {
- status = "okay";
- };
- &pio {
- usb1_vbus_pin_bananapro: usb1_vbus_pin@0 {
- allwinner,pins = "PH0";
- allwinner,function = "gpio_out";
- allwinner,drive = <0>;
- allwinner,pull = <0>;
- };
- usb2_vbus_pin_bananapro: usb2_vbus_pin@0 {
- allwinner,pins = "PH1";
- allwinner,function = "gpio_out";
- allwinner,drive = <0>;
- allwinner,pull = <0>;
- };
- mmc0_cd_pin_bananapi: mmc0_cd_pin@0 {
- allwinner,pins = "PH10";
- allwinner,function = "gpio_in";
- allwinner,drive = <0>;
- allwinner,pull = <1>;
- };
- vmmc3_pin_bananapro: vmmc3_pin@0 {
- allwinner,pins = "PH22";
- allwinner,function = "gpio_out";
- allwinner,drive = <0>;
- allwinner,pull = <0>;
- };
- gmac_power_pin_bananapi: gmac_power_pin@0 {
- allwinner,pins = "PH23";
- allwinner,function = "gpio_out";
- allwinner,drive = <0>;
- allwinner,pull = <0>;
- };
- led_pins_bananapi: led_pins@0 {
- allwinner,pins = "PH24", "PG2";
- allwinner,function = "gpio_out";
- allwinner,drive = <0>;
- allwinner,pull = <0>;
- };
- };
- &ir0 {
- pinctrl-names = "default";
- pinctrl-0 = <&ir0_pins_a>;
- status = "okay";
- };
- &uart0 {
- pinctrl-names = "default";
- pinctrl-0 = <&uart0_pins_a>;
- status = "okay";
- };
- &uart2 {
- pinctrl-names = "default";
- pinctrl-0 = <&uart2_pins_a>;
- status = "okay";
- };
- &uart7 {
- pinctrl-names = "default";
- pinctrl-0 = <&uart7_pins_a>;
- status = "okay";
- };
- &i2c0 {
- pinctrl-names = "default";
- pinctrl-0 = <&i2c0_pins_a>;
- status = "okay";
- axp209: pmic@34 {
- compatible = "x-powers,axp209";
- reg = <0x34>;
- interrupt-parent = <&nmi_intc>;
- interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
- interrupt-controller;
- #interrupt-cells = <1>;
- };
- };
- &i2c2 {
- pinctrl-names = "default";
- pinctrl-0 = <&i2c2_pins_a>;
- status = "okay";
- };
- &gmac {
- pinctrl-names = "default";
- pinctrl-0 = <&gmac_pins_rgmii_a>;
- phy = <&phy1>;
- phy-mode = "rgmii";
- phy-supply = <®_gmac_3v3>;
- status = "okay";
- phy1: ethernet-phy@1 {
- reg = <1>;
- };
- };
- ®_usb1_vbus {
- pinctrl-0 = <&usb1_vbus_pin_bananapro>;
- gpio = <&pio 7 0 GPIO_ACTIVE_HIGH>; /* PH0 */
- status = "okay";
- };
- ®_usb2_vbus {
- pinctrl-0 = <&usb2_vbus_pin_bananapro>;
- gpio = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
- status = "okay";
- };
- / {
- reg_gmac_3v3: gmac-3v3 {
- compatible = "regulator-fixed";
- pinctrl-names = "default";
- pinctrl-0 = <&gmac_power_pin_bananapi>;
- regulator-name = "gmac-3v3";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- startup-delay-us = <100000>;
- enable-active-high;
- gpio = <&pio 7 23 GPIO_ACTIVE_HIGH>;
- };
- reg_vmmc3: vmmc3 {
- compatible = "regulator-fixed";
- pinctrl-names = "default";
- pinctrl-0 = <&vmmc3_pin_bananapro>;
- regulator-name = "vmmc3";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- enable-active-high;
- gpio = <&pio 7 22 GPIO_ACTIVE_HIGH>;
- };
- leds {
- compatible = "gpio-leds";
- pinctrl-names = "default";
- pinctrl-0 = <&led_pins_bananapi>;
- green {
- label = "bananapi:green:usr";
- gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>;
- };
- blue {
- label = "bananapi:blue:usr";
- gpios = <&pio 6 2 GPIO_ACTIVE_HIGH>;
- };
- };
- };
- &spi0 {
- /* this is provided here to make it easy to enable SPI when editing this file */
- // status = "okay";
- };
- /*
- * Texy
- * 2.8" TFT + Touch Shield Board (320x240) HY28A
- *
- */
- &spi0 {
- hy28a@0{
- compatible = "ilitek,ili9320";
- reg = <0>;
- status = "disabled";
- spi-max-frequency = <32000000>;
- spi-cpol;
- spi-cpha;
- rotate = <270>;
- bgr;
- fps = <50>;
- buswidth = <8>;
- startbyte = <0x70>;
- reset-gpios = <&pio 25 0>;
- led-gpios = <&pio 18 1>;
- debug = <0>;
- };
- hy28a_ts@1 {
- compatible = "ti,ads7846";
- reg = <1>;
- status = "disabled";
- spi-max-frequency = <2000000>;
- interrupts = <3 17>;
- pendown-gpio = <&pio 17 0>;
- ti,x-plate-ohms = /bits/ 16 <100>;
- ti,pressure-max = /bits/ 16 <255>;
- };
- };
- /*
- * Texy
- * 2.8" TFT + Touch Shield Board (320x240) HY28B
- * NOT TESTED
- */
- &spi0 {
- hy28b@0{
- compatible = "ilitek,ili9325";
- reg = <0>;
- status = "disabled";
- spi-max-frequency = <48000000>;
- rotate = <270>;
- bgr;
- fps = <50>;
- buswidth = <8>;
- startbyte = <0x70>;
- reset-gpios = <&pio 25 0>;
- led-gpios = <&pio 18 1>;
- gamma = "04 1F 4 7 7 0 7 7 6 0\n0F 00 1 7 4 0 0 0 6 7";
- init = <0x10000e7 0x0010
- 0x1000000 0x0001
- 0x1000001 0x0100
- 0x1000002 0x0700
- 0x1000003 0x1030
- 0x1000004 0x0000
- 0x1000008 0x0207
- 0x1000009 0x0000
- 0x100000a 0x0000
- 0x100000c 0x0001
- 0x100000d 0x0000
- 0x100000f 0x0000
- 0x1000010 0x0000
- 0x1000011 0x0007
- 0x1000012 0x0000
- 0x1000013 0x0000
- 0x2000032
- 0x1000010 0x1590
- 0x1000011 0x0227
- 0x2000032
- 0x1000012 0x009c
- 0x2000032
- 0x1000013 0x1900
- 0x1000029 0x0023
- 0x100002b 0x000e
- 0x2000032
- 0x1000020 0x0000
- 0x1000021 0x0000
- 0x2000032
- 0x1000050 0x0000
- 0x1000051 0x00ef
- 0x1000052 0x0000
- 0x1000053 0x013f
- 0x1000060 0xa700
- 0x1000061 0x0001
- 0x100006a 0x0000
- 0x1000080 0x0000
- 0x1000081 0x0000
- 0x1000082 0x0000
- 0x1000083 0x0000
- 0x1000084 0x0000
- 0x1000085 0x0000
- 0x1000090 0x0010
- 0x1000092 0x0000
- 0x1000093 0x0003
- 0x1000095 0x0110
- 0x1000097 0x0000
- 0x1000098 0x0000
- 0x1000007 0x0133
- 0x1000020 0x0000
- 0x1000021 0x0000
- 0x2000064>;
- debug = <0>;
- };
- hy28b_ts@1 {
- compatible = "ti,ads7846";
- reg = <1>;
- status = "disabled";
- spi-max-frequency = <2000000>;
- interrupts = <3 17>;
- pendown-gpio = <&pio 17 0>;
- ti,x-plate-ohms = /bits/ 16 <100>;
- ti,pressure-max = /bits/ 16 <255>;
- };
- };
- /*
- * ITEAD
- * ITDB02-2.8
- *
- */
- / {
- itdb28 {
- compatible = "ilitek,ili9325";
- status = "disabled";
- rotate = <0>;
- bgr;
- buswidth = <8>;
- reset-gpios = <&pio 17 0>;
- dc-gpios = <&pio 3 0>;
- cs-gpios = <&pio 27 0>;
- wr-gpios = <&pio 2 0>;
- db-gpios = <&pio 9 0>,
- <&pio 11 0>,
- <&pio 18 0>,
- <&pio 23 0>,
- <&pio 24 0>,
- <&pio 25 0>,
- <&pio 8 0>,
- <&pio 7 0>;
- /* LED pin drives backlight directly. Use transistor (50mA) */
- /* led-gpios = <&pio 4 1>; */
- debug = <0>;
- };
- };
- /*
- * Watterott
- * RPi-Display - 2.8" Touch-Display (320x240)
- *
- */
- &spi0 {
- rpi-display@0{
- compatible = "ilitek,ili9341";
- reg = <0>;
- status = "disabled";
- spi-max-frequency = <32000000>;
- rotate = <270>;
- bgr;
- fps = <30>;
- buswidth = <8>;
- reset-gpios = <&pio 23 0>;
- dc-gpios = <&pio 24 0>;
- led-gpios = <&pio 18 1>;
- debug = <0>;
- };
- rpi-display_ts@1 {
- compatible = "ti,ads7846";
- reg = <1>;
- status = "disabled";
- spi-max-frequency = <2000000>;
- interrupts = <3 25>;
- pendown-gpio = <&pio 25 0>;
- ti,x-plate-ohms = /bits/ 16 <60>;
- ti,pressure-max = /bits/ 16 <255>;
- };
- };
- /*
- * Ozzmaker
- * PiScreen - 3.5" TFT touchscreen (480x320)
- *
- */
- &spi0 {
- piscreen@0{
- compatible = "ilitek,ili9486";
- reg = <0>;
- status = "disabled";
- spi-max-frequency = <20000000>;
- rotate = <270>;
- bgr;
- fps = <30>;
- buswidth = <8>;
- reset-gpios = <&pio 25 0>;
- dc-gpios = <&pio 24 0>;
- led-gpios = <&pio 22 1>;
- init = <0x10000b0 0x00
- 0x1000011
- 0x20000FF
- 0x100003A 0x55
- 0x1000036 0x28
- 0x10000C2 0x44
- 0x10000C5 0x00 0x00 0x00 0x00
- 0x10000E0 0x0F 0x1F 0x1C 0x0C 0x0F 0x08 0x48 0x98 0x37 0x0A 0x13 0x04 0x11 0x0D 0x00
- 0x10000E1 0x0F 0x32 0x2E 0x0B 0x0D 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00
- 0x10000E2 0x0F 0x32 0x2E 0x0B 0x0D 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00
- 0x1000011
- 0X1000029>;
- debug = <0>;
- };
- piscreen_ts@1 {
- compatible = "ti,ads7846";
- reg = <1>;
- status = "disabled";
- spi-max-frequency = <2000000>;
- interrupts = <3 17>;
- pendown-gpio = <&pio 17 0>;
- ti,x-plate-ohms = /bits/ 16 <100>;
- ti,pressure-max = /bits/ 16 <255>;
- };
- };
- /*
- * NeoSec LLC
- * 3.5 inch TFT Display (320x480)
- *
- */
- &spi0 {
- tinylcd35@0{
- compatible = "neosec,tinylcd";
- reg = <0>;
- status = "disabled";
- spi-max-frequency = <48000000>;
- rotate = <270>;
- bgr;
- fps = <50>;
- buswidth = <8>;
- reset-gpios = <&pio 25 0>;
- dc-gpios = <&pio 24 0>;
- led-gpios = <&pio 18 1>;
- debug = <0>;
- };
- tinylcd35@1 {
- compatible = "ti,ads7846";
- reg = <1>;
- status = "disabled";
- spi-max-frequency = <2000000>;
- interrupts = <3 3>;
- pendown-gpio = <&pio 3 0>;
- ti,x-plate-ohms = /bits/ 16 <100>;
- ti,pressure-max = /bits/ 16 <255>;
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement