Newer
Older
barebox / arch / arm / dts / imx6qdl-zii-rdu2.dtsi
@Sascha Hauer Sascha Hauer on 9 Nov 2018 3 KB Merge branch 'for-next/imx'
/*
 * Copyright (C) 2016-2017 Zodiac Inflight Innovations
 *
 * 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
 *     version 2 as published by the Free Software Foundation.
 *
 *     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 , 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.
 */

#include <arm/imx6qdl-zii-rdu2.dtsi>

/ {
	chosen {
		environment {
			compatible = "barebox,environment";
			device-path = &nor_flash, "partname:barebox-environment";
		};
	};

	aliases {
		ethernet0 = &fec;
		ethernet1 = &i210;
		/*
		 * NVMEM device corresponding to EEPROM attached to
                 * the switch shared DT node with it, so we use that
                 * fact to create a desirable naming
		 */
		switch-eeprom = &switch;
	};
};


&uart4 {
	rave-sp {
		#address-cells = <1>;
		#size-cells = <1>;

		watchdog {
			nvmem-cells = <&boot_source>;
			nvmem-cell-names = "boot-source";
		};

		eeprom@a4 {
			boot_source: boot-source@83 {
				reg = <0x83 1>;
			};

			mac_address_0: mac-address@180 {
				reg = <0x180 6>;
			};

			mac_address_1: mac-address@190 {
				reg = <0x190 6>;
			};
		};
	};
};

&ecspi1 {
	nor_flash: flash@0 {
		#address-cells = <1>;
		#size-cells = <1>;

		partition@0 {
			label = "barebox";
			reg = <0x0 0xc0000>;
		};

		partition@c0000 {
			label = "barebox-environment";
			reg = <0xc0000 0x40000>;
		};
	};
};

&fec {
	nvmem-cells = <&mac_address_0>;
	nvmem-cell-names = "mac-address";
};

&i2c2 {
	temp-sense@48 {
		barebox,sensor-name = "Temp Sensor 1";
	};
};

&i210 {
	nvmem-cells = <&mac_address_1>;
	nvmem-cell-names = "mac-address";
};

&usbotg {
	dr_mode = "otg";
};

&gpio3 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_gpio3_hog>;

	usb-emulation {
		gpio-hog;
		gpios = <19 GPIO_ACTIVE_HIGH>;
		output-low;
		line-name = "usb-emulation";
	};

	usb-mode1 {
		gpio-hog;
		gpios = <20 GPIO_ACTIVE_HIGH>;
		output-high;
		line-name = "usb-mode1";
	};

	usb-mode2 {
		gpio-hog;
		gpios = <23 GPIO_ACTIVE_HIGH>;
		output-high;
		line-name = "usb-mode2";
	};
};

&iomuxc {
	pinctrl_gpio3_hog: gpio3hoggrp {
		fsl,pins = <
			MX6QDL_PAD_EIM_D19__GPIO3_IO19		0x40000038
			MX6QDL_PAD_EIM_D20__GPIO3_IO20		0x40000038
			MX6QDL_PAD_EIM_D23__GPIO3_IO23		0x40000038
		>;
	};
};