153ab4af3SHans de Goede/*
253ab4af3SHans de Goede * Copyright 2013 Maxime Ripard
353ab4af3SHans de Goede *
453ab4af3SHans de Goede * Maxime Ripard <maxime.ripard@free-electrons.com>
553ab4af3SHans de Goede *
653ab4af3SHans de Goede * This file is dual-licensed: you can use it either under the terms
753ab4af3SHans de Goede * of the GPL or the X11 license, at your option. Note that this dual
853ab4af3SHans de Goede * licensing only applies to this file, and not this project as a
953ab4af3SHans de Goede * whole.
1053ab4af3SHans de Goede *
1153ab4af3SHans de Goede *  a) This file is free software; you can redistribute it and/or
1253ab4af3SHans de Goede *     modify it under the terms of the GNU General Public License as
1353ab4af3SHans de Goede *     published by the Free Software Foundation; either version 2 of the
1453ab4af3SHans de Goede *     License, or (at your option) any later version.
1553ab4af3SHans de Goede *
1653ab4af3SHans de Goede *     This file is distributed in the hope that it will be useful,
1753ab4af3SHans de Goede *     but WITHOUT ANY WARRANTY; without even the implied warranty of
1853ab4af3SHans de Goede *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1953ab4af3SHans de Goede *     GNU General Public License for more details.
2053ab4af3SHans de Goede *
2153ab4af3SHans de Goede * Or, alternatively,
2253ab4af3SHans de Goede *
2353ab4af3SHans de Goede *  b) Permission is hereby granted, free of charge, to any person
2453ab4af3SHans de Goede *     obtaining a copy of this software and associated documentation
2553ab4af3SHans de Goede *     files (the "Software"), to deal in the Software without
2653ab4af3SHans de Goede *     restriction, including without limitation the rights to use,
2753ab4af3SHans de Goede *     copy, modify, merge, publish, distribute, sublicense, and/or
2853ab4af3SHans de Goede *     sell copies of the Software, and to permit persons to whom the
2953ab4af3SHans de Goede *     Software is furnished to do so, subject to the following
3053ab4af3SHans de Goede *     conditions:
3153ab4af3SHans de Goede *
3253ab4af3SHans de Goede *     The above copyright notice and this permission notice shall be
3353ab4af3SHans de Goede *     included in all copies or substantial portions of the Software.
3453ab4af3SHans de Goede *
3553ab4af3SHans de Goede *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
3653ab4af3SHans de Goede *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
3753ab4af3SHans de Goede *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
3853ab4af3SHans de Goede *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
3953ab4af3SHans de Goede *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
4053ab4af3SHans de Goede *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
4153ab4af3SHans de Goede *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
4253ab4af3SHans de Goede *     OTHER DEALINGS IN THE SOFTWARE.
4353ab4af3SHans de Goede */
4453ab4af3SHans de Goede
4553ab4af3SHans de Goede/dts-v1/;
4653ab4af3SHans de Goede#include "sun6i-a31.dtsi"
4753ab4af3SHans de Goede#include "sunxi-common-regulators.dtsi"
4853ab4af3SHans de Goede
4953ab4af3SHans de Goede#include <dt-bindings/gpio/gpio.h>
5053ab4af3SHans de Goede#include <dt-bindings/pinctrl/sun4i-a10.h>
5153ab4af3SHans de Goede
5253ab4af3SHans de Goede/ {
5353ab4af3SHans de Goede	model = "WITS A31 Colombus Evaluation Board";
5453ab4af3SHans de Goede	compatible = "wits,colombus", "allwinner,sun6i-a31";
5553ab4af3SHans de Goede
5653ab4af3SHans de Goede	aliases {
5753ab4af3SHans de Goede		serial0 = &uart0;
5853ab4af3SHans de Goede	};
5953ab4af3SHans de Goede
6053ab4af3SHans de Goede	chosen {
6153ab4af3SHans de Goede		stdout-path = "serial0:115200n8";
6253ab4af3SHans de Goede	};
63*80e5f83cSHans de Goede
64*80e5f83cSHans de Goede	i2c_lcd: i2c@0 {
65*80e5f83cSHans de Goede		/* The lcd panel i2c interface is hooked up via gpios */
66*80e5f83cSHans de Goede		compatible = "i2c-gpio";
67*80e5f83cSHans de Goede		pinctrl-names = "default";
68*80e5f83cSHans de Goede		pinctrl-0 = <&i2c_lcd_pins>;
69*80e5f83cSHans de Goede		gpios = <&pio 0 23 GPIO_ACTIVE_HIGH>, /* PA23, sda */
70*80e5f83cSHans de Goede			<&pio 0 24 GPIO_ACTIVE_HIGH>; /* PA24, scl */
71*80e5f83cSHans de Goede		i2c-gpio,delay-us = <5>;
72*80e5f83cSHans de Goede	};
7353ab4af3SHans de Goede};
7453ab4af3SHans de Goede
7553ab4af3SHans de Goede&ehci1 {
7653ab4af3SHans de Goede	status = "okay";
7753ab4af3SHans de Goede};
7853ab4af3SHans de Goede
79f00e8207SHans de Goede&gmac {
80f00e8207SHans de Goede	pinctrl-names = "default";
81f00e8207SHans de Goede	pinctrl-0 = <&gmac_pins_rgmii_a>;
82f00e8207SHans de Goede	phy = <&phy1>;
83f00e8207SHans de Goede	phy-mode = "rgmii";
84f00e8207SHans de Goede	status = "okay";
85f00e8207SHans de Goede
86f00e8207SHans de Goede	phy1: ethernet-phy@1 {
87f00e8207SHans de Goede		reg = <1>;
88f00e8207SHans de Goede	};
89f00e8207SHans de Goede};
90f00e8207SHans de Goede
9153ab4af3SHans de Goede&i2c0 {
9253ab4af3SHans de Goede	pinctrl-names = "default";
9353ab4af3SHans de Goede	pinctrl-0 = <&i2c0_pins_a>;
9453ab4af3SHans de Goede	status = "fail";
9553ab4af3SHans de Goede};
9653ab4af3SHans de Goede
9753ab4af3SHans de Goede&i2c1 {
9853ab4af3SHans de Goede	pinctrl-names = "default";
9953ab4af3SHans de Goede	pinctrl-0 = <&i2c1_pins_a>;
10053ab4af3SHans de Goede	status = "okay";
10153ab4af3SHans de Goede};
10253ab4af3SHans de Goede
10353ab4af3SHans de Goede&i2c2 {
10453ab4af3SHans de Goede	pinctrl-names = "default";
10553ab4af3SHans de Goede	pinctrl-0 = <&i2c2_pins_a>;
10653ab4af3SHans de Goede	status = "okay";
107*80e5f83cSHans de Goede
108*80e5f83cSHans de Goede	mma8452: mma8452@1d {
109*80e5f83cSHans de Goede		compatible = "fsl,mma8452";
110*80e5f83cSHans de Goede		reg = <0x1d>;
111*80e5f83cSHans de Goede		interrupt-parent = <&pio>;
112*80e5f83cSHans de Goede		interrupts = <0 9 IRQ_TYPE_LEVEL_LOW>; /* PA9 */
113*80e5f83cSHans de Goede	};
11453ab4af3SHans de Goede};
11553ab4af3SHans de Goede
11653ab4af3SHans de Goede&mmc0 {
11753ab4af3SHans de Goede	pinctrl-names = "default";
11853ab4af3SHans de Goede	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_colombus>;
11953ab4af3SHans de Goede	vmmc-supply = <&reg_vcc3v0>;
12053ab4af3SHans de Goede	bus-width = <4>;
12153ab4af3SHans de Goede	cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
12253ab4af3SHans de Goede	cd-inverted;
12353ab4af3SHans de Goede	status = "okay";
12453ab4af3SHans de Goede};
12553ab4af3SHans de Goede
12653ab4af3SHans de Goede&mmc0_pins_a {
12753ab4af3SHans de Goede	allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
12853ab4af3SHans de Goede};
12953ab4af3SHans de Goede
13053ab4af3SHans de Goede&pio {
13153ab4af3SHans de Goede	mmc0_cd_pin_colombus: mmc0_cd_pin@0 {
13253ab4af3SHans de Goede		allwinner,pins = "PA8";
13353ab4af3SHans de Goede		allwinner,function = "gpio_in";
13453ab4af3SHans de Goede		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
13553ab4af3SHans de Goede		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
13653ab4af3SHans de Goede	};
13753ab4af3SHans de Goede
13853ab4af3SHans de Goede	usb2_vbus_pin_colombus: usb2_vbus_pin@0 {
13953ab4af3SHans de Goede		allwinner,pins = "PH24";
14053ab4af3SHans de Goede		allwinner,function = "gpio_out";
14153ab4af3SHans de Goede		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
14253ab4af3SHans de Goede		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
14353ab4af3SHans de Goede	};
144*80e5f83cSHans de Goede
145*80e5f83cSHans de Goede	i2c_lcd_pins: i2c_lcd_pin@0 {
146*80e5f83cSHans de Goede		allwinner,pins = "PA23", "PA24";
147*80e5f83cSHans de Goede		allwinner,function = "gpio_out";
148*80e5f83cSHans de Goede		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
149*80e5f83cSHans de Goede		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
150*80e5f83cSHans de Goede	};
15153ab4af3SHans de Goede};
15253ab4af3SHans de Goede
15353ab4af3SHans de Goede&reg_usb2_vbus {
15453ab4af3SHans de Goede	pinctrl-names = "default";
15553ab4af3SHans de Goede	pinctrl-0 = <&usb2_vbus_pin_colombus>;
15653ab4af3SHans de Goede	gpio = <&pio 7 24 GPIO_ACTIVE_HIGH>;
15753ab4af3SHans de Goede	status = "okay";
15853ab4af3SHans de Goede};
15953ab4af3SHans de Goede
16053ab4af3SHans de Goede&uart0 {
16153ab4af3SHans de Goede	pinctrl-names = "default";
16253ab4af3SHans de Goede	pinctrl-0 = <&uart0_pins_a>;
16353ab4af3SHans de Goede	status = "okay";
16453ab4af3SHans de Goede};
16553ab4af3SHans de Goede
16653ab4af3SHans de Goede&usbphy {
16753ab4af3SHans de Goede	usb2_vbus-supply = <&reg_usb2_vbus>;
16853ab4af3SHans de Goede	status = "okay";
16953ab4af3SHans de Goede};
170