/*
 * Copyright 2014 Maxime Ripard
 *
 * Maxime Ripard <maxime.ripard@free-electrons.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 = "Merrii A31 Hummingbird";
	compatible = "merrii,a31-hummingbird", "allwinner,sun6i-a31";

	aliases {
		serial0 = &uart0;
	};

	chosen {
		stdout-path = "serial0:115200n8";
	};

	wifi_pwrseq: wifi_pwrseq {
		compatible = "mmc-pwrseq-simple";
		reset-gpios = <&pio 6 10 GPIO_ACTIVE_LOW>; /* PG10 */
	};
};

&ehci0 {
	status = "okay";
};

&gmac {
	pinctrl-names = "default";
	pinctrl-0 = <&gmac_pins_rgmii_a>;
	phy = <&phy1>;
	phy-mode = "rgmii";
	snps,reset-gpio = <&pio 0 21 GPIO_ACTIVE_HIGH>;
	snps,reset-active-low;
	snps,reset-delays-us = <0 10000 30000>;
	status = "okay";

	phy1: ethernet-phy@1 {
		reg = <1>;
	};
};

&i2c0 {
	pinctrl-names = "default";
	pinctrl-0 = <&i2c0_pins_a>;
	/* pull-ups and devices require AXP221 DLDO3 */
	status = "failed";
};

&i2c1 {
	pinctrl-names = "default";
	pinctrl-0 = <&i2c1_pins_a>;
	status = "okay";
};

&i2c2 {
	pinctrl-names = "default";
	pinctrl-0 = <&i2c2_pins_a>;
	status = "okay";

	pcf8563: rtc@51 {
		compatible = "nxp,pcf8563";
		reg = <0x51>;
	};
};

&ir {
	pinctrl-names = "default";
	pinctrl-0 = <&ir_pins_a>;
	status = "okay";
};

&mmc0 {
	pinctrl-names = "default";
	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_hummingbird>;
	vmmc-supply = <&vcc_3v0>;
	bus-width = <4>;
	cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
	cd-inverted;
	status = "okay";
};

&mmc0_pins_a {
	/* external pull-ups missing for some pins */
	allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
};

&mmc1 {
	pinctrl-names = "default";
	pinctrl-0 = <&mmc1_pins_a>, <&wifi_reset_pin_hummingbird>;
	vmmc-supply = <&vcc_wifi>;
	mmc-pwrseq = <&wifi_pwrseq>;
	bus-width = <4>;
	non-removable;
	status = "okay";
};

&ohci0 {
	status = "okay";
};

&pio {
	mmc0_cd_pin_hummingbird: mmc0_cd_pin@0 {
		allwinner,pins = "PA8";
		allwinner,function = "gpio_in";
		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
	};

	wifi_reset_pin_hummingbird: wifi_reset_pin@0 {
		allwinner,pins = "PG10";
		allwinner,function = "gpio_out";
		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
	};
};

&p2wi {
	status = "okay";

	axp221: pmic@68 {
		compatible = "x-powers,axp221";
		reg = <0x68>;
		interrupt-parent = <&nmi_intc>;
		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
		interrupt-controller;
		#interrupt-cells = <1>;
		dcdc1-supply = <&vcc_3v0>;
		dcdc5-supply = <&vcc_dram>;

		regulators {
			x-powers,dcdc-freq = <3000>;

			vcc_3v0: dcdc1 {
				regulator-always-on;
				regulator-min-microvolt = <3000000>;
				regulator-max-microvolt = <3000000>;
				regulator-name = "vcc-3v0";
			};

			vdd_cpu: dcdc2 {
				regulator-always-on;
				regulator-min-microvolt = <700000>;
				regulator-max-microvolt = <1320000>;
				regulator-name = "vdd-cpu";
			};

			vdd_gpu: dcdc3 {
				regulator-always-on;
				regulator-min-microvolt = <700000>;
				regulator-max-microvolt = <1320000>;
				regulator-name = "vdd-gpu";
			};

			vdd_sys_dll: dcdc4 {
				regulator-always-on;
				regulator-min-microvolt = <1100000>;
				regulator-max-microvolt = <1100000>;
				regulator-name = "vdd-sys-dll";
			};

			vcc_dram: dcdc5 {
				regulator-always-on;
				regulator-min-microvolt = <1500000>;
				regulator-max-microvolt = <1500000>;
				regulator-name = "vcc-dram";
			};

			vcc_wifi: aldo1 {
				regulator-min-microvolt = <3300000>;
				regulator-max-microvolt = <3300000>;
				regulator-name = "vcc_wifi";
			};

			avcc: aldo3 {
				regulator-always-on;
				regulator-min-microvolt = <3000000>;
				regulator-max-microvolt = <3000000>;
				regulator-name = "avcc";
			};
		};
	};
};

&reg_usb1_vbus {
	gpio = <&pio 7 24 GPIO_ACTIVE_HIGH>; /* PH24 */
	status = "okay";
};

&uart0 {
	pinctrl-names = "default";
	pinctrl-0 = <&uart0_pins_a>;
	status = "okay";
};

&usb1_vbus_pin_a {
	/* different pin from sunxi-common-regulators */
	allwinner,pins = "PH24";
};

&usbphy {
	usb1_vbus-supply = <&reg_usb1_vbus>;
	status = "okay";
};
