code:
/*
 * Copyright 2016 United Western Technologies.
 *
 * 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.
 *
 * 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 "imx6q.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>

/ {
	model = "Uniwest Evi";
	compatible = "uniwest,imx6q-evi", "fsl,imx6q";

	memory@10000000 {
		device_type = "memory";
		reg = <0x10000000 0x40000000>;
	};

	reg_usbh1_vbus: regulator-usbhubreset {
		compatible = "regulator-fixed";
		regulator-name = "usbh1_vbus";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		enable-active-high;
		startup-delay-us = <2>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_usbh1_hubreset>;
		gpio = <&gpio7 12 GPIO_ACTIVE_HIGH>;
	};

	reg_usb_otg_vbus: regulator-usbotgvbus {
		compatible = "regulator-fixed";
		regulator-name = "usb_otg_vbus";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_usbotgvbus>;
		gpio = <&gpio4 15 GPIO_ACTIVE_HIGH>;
		enable-active-high;
		regulator-always-on;
	};

	panel {
		compatible = "sharp,lq101k1ly04";

		port {
			panel_in: endpoint {
				remote-endpoint = <&lvds0_out>;
			};
		};
	};
};

&ecspi1 {
	cs-gpios = <&gpio4 10 GPIO_ACTIVE_LOW>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_ecspi1 &pinctrl_ecspi1cs>;
	status = "okay";

	fpga: fpga@0 {
		compatible = "altr,fpga-passive-serial";
		spi-max-frequency = <20000000>;
		reg = <0>;
		pinctrl-0 = <&pinctrl_fpgaspi>;
		nconfig-gpios = <&gpio4 9 GPIO_ACTIVE_LOW>;
		nstat-gpios = <&gpio4 11 GPIO_ACTIVE_LOW>;
	};
};

&ecspi3 {
	cs-gpios = <&gpio4 24 GPIO_ACTIVE_LOW>,
		<&gpio4 25 GPIO_ACTIVE_LOW>,
		<&gpio4 26 GPIO_ACTIVE_LOW>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_ecspi3 &pinctrl_ecspi3cs>;
	status = "okay";
};

&ecspi5 {
	cs-gpios = <&gpio1 14 GPIO_ACTIVE_LOW>,
		<&gpio1 13 GPIO_ACTIVE_LOW>,
		<&gpio1 12 GPIO_ACTIVE_LOW>,
		<&gpio2 9 GPIO_ACTIVE_HIGH>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_ecspi5 &pinctrl_ecspi5cs>;
	status = "okay";

	eeprom: m95m02@1 {
		compatible = "st,m95m02", "atmel,at25";
		size = <262144>;
		pagesize = <256>;
		address-width = <24>;
		spi-max-frequency = <5000000>;
		reg = <1>;
	};

	pb_rtc: rtc@3 {
		compatible = "nxp,rtc-pcf2123";
		spi-max-frequency = <2450000>;
		spi-cs-high;
		reg = <3>;
	};
};

&fec {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_enet>;
	phy-mode = "rgmii";
	phy-reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>;
	/delete-property/ interrupts;
	interrupts-extended = <&gpio1 6 IRQ_TYPE_LEVEL_HIGH>,
			      <&intc 0 119 IRQ_TYPE_LEVEL_HIGH>;
	fsl,err006687-workaround-present;
	status = "okay";
};

&gpmi {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_gpminand>;
	status = "okay";
};

&i2c2 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_i2c2>;
	clock-frequency = <100000>;
	status = "okay";
};

&i2c3 {
	pinctrl-names = "default", "gpio";
	pinctrl-0 = <&pinctrl_i2c3>;
	pinctrl-1 = <&pinctrl_i2c3_gpio>;
	clock-frequency = <100000>;
	scl-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
	sda-gpios = <&gpio7 11 GPIO_ACTIVE_HIGH>;
	status = "okay";

	battery: sbs-battery@b {
		compatible = "sbs,sbs-battery";
		reg = <0x0b>;
		sbs,poll-retry-count = <100>;
		sbs,i2c-retry-count = <100>;
	};
};

&ldb {
	status = "okay";

	lvds0: lvds-channel@0 {
		status = "okay";

		port@4 {
			reg = <4>;
			lvds0_out: endpoint {
				remote-endpoint = <&panel_in>;
			};
		};
	};
};

&ssi1 {
	status = "okay";
};

&uart1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_uart1>;
	status = "okay";
};

&uart2 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_uart2>;
	status = "okay";
};

&usbh1 {
	vbus-supply = <&reg_usbh1_vbus>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usbh1>;
	dr_mode = "host";
	disable-over-current;
	status = "okay";
};

&usbotg {
	vbus-supply = <&reg_usb_otg_vbus>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usbotg>;
	disable-over-current;
	dr_mode = "otg";
	status = "okay";
};

&usdhc1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usdhc1>;
	non-removable;
	status = "okay";
};

&weim {
	ranges = <0 0 0x08000000 0x08000000>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_weimfpga &pinctrl_weimcs>;
	status = "okay";
};

&iomuxc {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_hog>;

	pinctrl_hog: hoggrp {
		fsl,pins = <
			/* pwr mcu alert irq */
			MX6QDL_PAD_SD4_DAT2__GPIO2_IO10 0x1b0b0
			/* remainder ???? */
			MX6QDL_PAD_CSI0_MCLK__GPIO5_IO19 0x1b0b0
		>;
	};

	pinctrl_ecspi1: ecspi1grp {
		fsl,pins = <
			MX6QDL_PAD_KEY_COL1__ECSPI1_MISO 0x100b1
			MX6QDL_PAD_KEY_ROW0__ECSPI1_MOSI 0x100b1
			MX6QDL_PAD_KEY_COL0__ECSPI1_SCLK 0x100b1
		>;
	};

	pinctrl_ecspi1cs: ecspi1csgrp {
		fsl,pins = <
			MX6QDL_PAD_KEY_COL2__GPIO4_IO10 0x1b0b0
		>;
	};

	pinctrl_ecspi3: ecspi3grp {
		fsl,pins = <
			MX6QDL_PAD_DISP0_DAT0__ECSPI3_SCLK 0x10068
			MX6QDL_PAD_DISP0_DAT1__ECSPI3_MOSI 0x10068
			MX6QDL_PAD_DISP0_DAT2__ECSPI3_MISO 0x1f068
		>;
	};

	pinctrl_ecspi3cs: ecspi3csgrp {
		fsl,pins = <
			MX6QDL_PAD_DISP0_DAT3__GPIO4_IO24 0x1b0b0
			MX6QDL_PAD_DISP0_DAT4__GPIO4_IO25 0x1b0b0
			MX6QDL_PAD_DISP0_DAT5__GPIO4_IO26 0x1b0b0
			MX6QDL_PAD_DISP0_DAT6__GPIO4_IO27 0x1b0b0
		>;
	};

	pinctrl_ecspi5: ecspi5grp {
		fsl,pins = <
			MX6QDL_PAD_SD2_CLK__ECSPI5_SCLK 0x100b1
			MX6QDL_PAD_SD2_CMD__ECSPI5_MOSI 0x100b1
			MX6QDL_PAD_SD2_DAT0__ECSPI5_MISO 0x100b1
		>;
	};

	pinctrl_ecspi5cs: ecspi5csgrp {
		fsl,pins = <
			MX6QDL_PAD_SD2_DAT1__GPIO1_IO14 0x1b0b0
			MX6QDL_PAD_SD2_DAT2__GPIO1_IO13 0x1b0b0
			MX6QDL_PAD_SD2_DAT3__GPIO1_IO12 0x1b0b0
			MX6QDL_PAD_SD4_DAT1__GPIO2_IO09 0x1b0b0
		>;
	};

	pinctrl_enet: enetgrp {
		fsl,pins = <
			MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x1b0b0
			MX6QDL_PAD_ENET_MDC__ENET_MDC 0x1b0b0
			MX6QDL_PAD_RGMII_TXC__RGMII_TXC 0x1b030
			MX6QDL_PAD_RGMII_TD0__RGMII_TD0 0x1b030
			MX6QDL_PAD_RGMII_TD1__RGMII_TD1 0x1b030
			MX6QDL_PAD_RGMII_TD2__RGMII_TD2 0x1b030
			MX6QDL_PAD_RGMII_TD3__RGMII_TD3 0x1b030
			MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL 0x1b030
			MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK 0x1b0b0
			MX6QDL_PAD_RGMII_RXC__RGMII_RXC 0x1b030
			MX6QDL_PAD_RGMII_RD0__RGMII_RD0 0x1b030
			MX6QDL_PAD_RGMII_RD1__RGMII_RD1 0x1b030
			MX6QDL_PAD_RGMII_RD2__RGMII_RD2 0x1b030
			MX6QDL_PAD_RGMII_RD3__RGMII_RD3 0x1b030
			MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x1b030
			MX6QDL_PAD_ENET_TX_EN__ENET_TX_EN 0x4001b0a8
			MX6QDL_PAD_ENET_CRS_DV__GPIO1_IO25 0x1b0b0
			MX6QDL_PAD_GPIO_6__ENET_IRQ 0x000b1
		>;
	};

	pinctrl_fpgaspi: fpgaspigrp {
		fsl,pins = <
			MX6QDL_PAD_KEY_ROW1__GPIO4_IO09 0x1b0b0
			MX6QDL_PAD_KEY_ROW2__GPIO4_IO11 0x1b0b0
		>;
	};

	pinctrl_gpminand: gpminandgrp {
		fsl,pins = <
			MX6QDL_PAD_NANDF_CLE__NAND_CLE 0xb0b1
			MX6QDL_PAD_NANDF_ALE__NAND_ALE 0xb0b1
			MX6QDL_PAD_NANDF_WP_B__NAND_WP_B 0xb0b1
			MX6QDL_PAD_NANDF_RB0__NAND_READY_B 0xb000
			MX6QDL_PAD_NANDF_CS0__NAND_CE0_B 0xb0b1
			MX6QDL_PAD_NANDF_CS1__NAND_CE1_B 0xb0b1
			MX6QDL_PAD_SD4_CMD__NAND_RE_B 0xb0b1
			MX6QDL_PAD_SD4_CLK__NAND_WE_B 0xb0b1
			MX6QDL_PAD_NANDF_D0__NAND_DATA00 0xb0b1
			MX6QDL_PAD_NANDF_D1__NAND_DATA01 0xb0b1
			MX6QDL_PAD_NANDF_D2__NAND_DATA02 0xb0b1
			MX6QDL_PAD_NANDF_D3__NAND_DATA03 0xb0b1
			MX6QDL_PAD_NANDF_D4__NAND_DATA04 0xb0b1
			MX6QDL_PAD_NANDF_D5__NAND_DATA05 0xb0b1
			MX6QDL_PAD_NANDF_D6__NAND_DATA06 0xb0b1
			MX6QDL_PAD_NANDF_D7__NAND_DATA07 0xb0b1
			MX6QDL_PAD_SD4_DAT0__NAND_DQS 0x00b1
		>;
	};

	pinctrl_i2c2: i2c2grp {
		fsl,pins = <
			MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1
			MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1
		>;
	};

	pinctrl_i2c3: i2c3grp {
		fsl,pins = <
			MX6QDL_PAD_GPIO_5__I2C3_SCL 0x4001b8b1
			MX6QDL_PAD_GPIO_16__I2C3_SDA 0x4001b8b1
		>;
	};

	pinctrl_i2c3_gpio: i2c3gpiogrp {
		fsl,pins = <
			MX6QDL_PAD_GPIO_5__GPIO1_IO05 0x4001b8b1
			MX6QDL_PAD_GPIO_16__GPIO7_IO11 0x4001b8b1
		>;
	};

	pinctrl_weimcs: weimcsgrp {
		fsl,pins = <
			MX6QDL_PAD_EIM_CS0__EIM_CS0_B 0xb0b1
			MX6QDL_PAD_EIM_CS1__EIM_CS1_B 0xb0b1
		>;
	};

	pinctrl_weimfpga: weimfpgagrp {
		fsl,pins = <
			/* weim misc */
			MX6QDL_PAD_EIM_OE__EIM_OE_B 0xb0b1
			MX6QDL_PAD_EIM_RW__EIM_RW 0xb0b1
			MX6QDL_PAD_EIM_WAIT__EIM_WAIT_B 0xb060
			MX6QDL_PAD_EIM_BCLK__EIM_BCLK 0xb0b1
			MX6QDL_PAD_EIM_LBA__EIM_LBA_B 0xb0b1
			MX6QDL_PAD_EIM_EB0__EIM_EB0_B 0xb0b1
			MX6QDL_PAD_EIM_EB1__EIM_EB1_B 0xb0b1
			MX6QDL_PAD_EIM_EB2__EIM_EB2_B 0xb0b1
			MX6QDL_PAD_EIM_EB3__EIM_EB3_B 0xb0b1
			/* weim data */
			MX6QDL_PAD_CSI0_DATA_EN__EIM_DATA00 0x1b0b0
			MX6QDL_PAD_CSI0_VSYNC__EIM_DATA01 0x1b0b0
			MX6QDL_PAD_CSI0_DAT4__EIM_DATA02 0x1b0b0
			MX6QDL_PAD_CSI0_DAT5__EIM_DATA03 0x1b0b0
			MX6QDL_PAD_CSI0_DAT6__EIM_DATA04 0x1b0b0
			MX6QDL_PAD_CSI0_DAT7__EIM_DATA05 0x1b0b0
			MX6QDL_PAD_CSI0_DAT8__EIM_DATA06 0x1b0b0
			MX6QDL_PAD_CSI0_DAT9__EIM_DATA07 0x1b0b0
			MX6QDL_PAD_CSI0_DAT12__EIM_DATA08 0x1b0b0
			MX6QDL_PAD_CSI0_DAT13__EIM_DATA09 0x1b0b0
			MX6QDL_PAD_CSI0_DAT14__EIM_DATA10 0x1b0b0
			MX6QDL_PAD_CSI0_DAT15__EIM_DATA11 0x1b0b0
			MX6QDL_PAD_CSI0_DAT16__EIM_DATA12 0x1b0b0
			MX6QDL_PAD_CSI0_DAT17__EIM_DATA13 0x1b0b0
			MX6QDL_PAD_CSI0_DAT18__EIM_DATA14 0x1b0b0
			MX6QDL_PAD_CSI0_DAT19__EIM_DATA15 0x1b0b0
			MX6QDL_PAD_EIM_D16__EIM_DATA16 0x1b0b0
			MX6QDL_PAD_EIM_D17__EIM_DATA17 0x1b0b0
			MX6QDL_PAD_EIM_D18__EIM_DATA18 0x1b0b0
			MX6QDL_PAD_EIM_D19__EIM_DATA19 0x1b0b0
			MX6QDL_PAD_EIM_D20__EIM_DATA20 0x1b0b0
			MX6QDL_PAD_EIM_D21__EIM_DATA21 0x1b0b0
			MX6QDL_PAD_EIM_D22__EIM_DATA22 0x1b0b0
			MX6QDL_PAD_EIM_D23__EIM_DATA23 0x1b0b0
			MX6QDL_PAD_EIM_D24__EIM_DATA24 0x1b0b0
			MX6QDL_PAD_EIM_D25__EIM_DATA25 0x1b0b0
			MX6QDL_PAD_EIM_D26__EIM_DATA26 0x1b0b0
			MX6QDL_PAD_EIM_D27__EIM_DATA27 0x1b0b0
			MX6QDL_PAD_EIM_D28__EIM_DATA28 0x1b0b0
			MX6QDL_PAD_EIM_D29__EIM_DATA29 0x1b0b0
			MX6QDL_PAD_EIM_D30__EIM_DATA30 0x1b0b0
			MX6QDL_PAD_EIM_D31__EIM_DATA31 0x1b0b0
			/* weim address */
			MX6QDL_PAD_EIM_A25__EIM_ADDR25 0xb0b1
			MX6QDL_PAD_EIM_A24__EIM_ADDR24 0xb0b1
			MX6QDL_PAD_EIM_A23__EIM_ADDR23 0xb0b1
			MX6QDL_PAD_EIM_A22__EIM_ADDR22 0xb0b1
			MX6QDL_PAD_EIM_A21__EIM_ADDR21 0xb0b1
			MX6QDL_PAD_EIM_A20__EIM_ADDR20 0xb0b1
			MX6QDL_PAD_EIM_A19__EIM_ADDR19 0xb0b1
			MX6QDL_PAD_EIM_A18__EIM_ADDR18 0xb0b1
			MX6QDL_PAD_EIM_A17__EIM_ADDR17 0xb0b1
			MX6QDL_PAD_EIM_A16__EIM_ADDR16 0xb0b1
			MX6QDL_PAD_EIM_DA15__EIM_AD15 0xb0b1
			MX6QDL_PAD_EIM_DA14__EIM_AD14 0xb0b1
			MX6QDL_PAD_EIM_DA13__EIM_AD13 0xb0b1
			MX6QDL_PAD_EIM_DA12__EIM_AD12 0xb0b1
			MX6QDL_PAD_EIM_DA11__EIM_AD11 0xb0b1
			MX6QDL_PAD_EIM_DA10__EIM_AD10 0xb0b1
			MX6QDL_PAD_EIM_DA9__EIM_AD09 0xb0b1
			MX6QDL_PAD_EIM_DA8__EIM_AD08 0xb0b1
			MX6QDL_PAD_EIM_DA7__EIM_AD07 0xb0b1
			MX6QDL_PAD_EIM_DA6__EIM_AD06 0xb0b1
			MX6QDL_PAD_EIM_DA5__EIM_AD05 0xb0b1
			MX6QDL_PAD_EIM_DA4__EIM_AD04 0xb0b1
			MX6QDL_PAD_EIM_DA3__EIM_AD03 0xb0b1
			MX6QDL_PAD_EIM_DA2__EIM_AD02 0xb0b1
			MX6QDL_PAD_EIM_DA1__EIM_AD01 0xb0b1
			MX6QDL_PAD_EIM_DA0__EIM_AD00 0xb0b1
		>;
	};

	pinctrl_uart1: uart1grp {
		fsl,pins = <
			MX6QDL_PAD_CSI0_DAT10__UART1_TX_DATA 0x1b0b1
			MX6QDL_PAD_CSI0_DAT11__UART1_RX_DATA 0x1b0b1
		>;
	};

	pinctrl_uart2: uart2grp {
		fsl,pins = <
			MX6QDL_PAD_SD3_DAT5__UART2_TX_DATA 0x1b0b1
			MX6QDL_PAD_SD3_DAT4__UART2_RX_DATA 0x1b0b1
			MX6QDL_PAD_SD3_CLK__UART2_RTS_B 0x1b0b1
			MX6QDL_PAD_SD3_CMD__UART2_CTS_B 0x1b0b1
		>;
	};

	pinctrl_usbh1: usbh1grp {
		fsl,pins = <
			MX6QDL_PAD_GPIO_3__USB_H1_OC 0x1b0b0
			/* usbh1_b OC */
			MX6QDL_PAD_GPIO_0__GPIO1_IO00 0x1b0b0
		>;
	};

	pinctrl_usbh1_hubreset: usbh1hubresetgrp {
		fsl,pins = <
			MX6QDL_PAD_GPIO_17__GPIO7_IO12 0x1b0b0
		>;
	};

	pinctrl_usbotg: usbotggrp {
		fsl,pins = <
			MX6QDL_PAD_GPIO_1__USB_OTG_ID 0x17059
			MX6QDL_PAD_KEY_COL4__USB_OTG_OC 0x1b0b0
		>;
	};

	pinctrl_usbotgvbus: usbotgvbusgrp {
		fsl,pins = <
			MX6QDL_PAD_KEY_ROW4__GPIO4_IO15 0x000b0
		>;
	};

	pinctrl_usdhc1: usdhc1grp {
		fsl,pins = <
			MX6QDL_PAD_SD1_CMD__SD1_CMD 0x17059
			MX6QDL_PAD_SD1_CLK__SD1_CLK 0x10059
			MX6QDL_PAD_SD1_DAT0__SD1_DATA0 0x17059
			MX6QDL_PAD_SD1_DAT1__SD1_DATA1 0x17059
			MX6QDL_PAD_SD1_DAT2__SD1_DATA2 0x17059
			MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x17059
		>;
	};
};


code:
// SPDX-License-Identifier: GPL-2.0-only
// Copyright (C) 2013 Philipp Zabel

/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include "imx6q.dtsi"

/ {
	model = "Zealz GK802";
	compatible = "zealz,imx6q-gk802", "fsl,imx6q";

	chosen {
		stdout-path = &uart4;
	};

	memory@10000000 {
		device_type = "memory";
		reg = <0x10000000 0x40000000>;
	};

	regulators {
		compatible = "simple-bus";
		#address-cells = <1>;
		#size-cells = <0>;

		reg_3p3v: regulator@0 {
			compatible = "regulator-fixed";
			reg = <0>;
			regulator-name = "3P3V";
			regulator-min-microvolt = <3300000>;
			regulator-max-microvolt = <3300000>;
			regulator-always-on;
		};
	};

	gpio-keys {
		compatible = "gpio-keys";

		recovery-button {
			label = "recovery";
			gpios = <&gpio3 16 1>;
			linux,code = <KEY_RESTART>;
			wakeup-source;
		};
	};
};

&hdmi {
	ddc-i2c-bus = <&i2c3>;
	status = "okay";
};

/* Internal I2C */
&i2c2 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_i2c2>;
	clock-frequency = <100000>;
	status = "okay";

	/* SDMC DM2016 1024 bit EEPROM + 128 bit OTP */
	eeprom: dm2016@51 {
		compatible = "sdmc,dm2016";
		reg = <0x51>;
	};
};

/* External I2C via HDMI */
&i2c3 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_i2c3>;
	clock-frequency = <100000>;
	status = "okay";
};

&iomuxc {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_hog>;

	imx6q-gk802 {
		pinctrl_hog: hoggrp {
			fsl,pins = <
				/* Recovery button, active-low */
				MX6QDL_PAD_EIM_D16__GPIO3_IO16  0x100b1
				/* RTL8192CU enable GPIO, active-low */
				MX6QDL_PAD_NANDF_D0__GPIO2_IO00 0x1b0b0
			>;
		};

		pinctrl_i2c2: i2c2grp {
			fsl,pins = <
				MX6QDL_PAD_KEY_COL3__I2C2_SCL		0x4001b8b1
				MX6QDL_PAD_KEY_ROW3__I2C2_SDA		0x4001b8b1
			>;
		};

		pinctrl_i2c3: i2c3grp {
			fsl,pins = <
				MX6QDL_PAD_GPIO_5__I2C3_SCL		0x4001b8b1
				MX6QDL_PAD_GPIO_16__I2C3_SDA		0x4001b8b1
			>;
		};

		pinctrl_uart4: uart4grp {
			fsl,pins = <
				MX6QDL_PAD_KEY_COL0__UART4_TX_DATA	0x1b0b1
				MX6QDL_PAD_KEY_ROW0__UART4_RX_DATA	0x1b0b1
			>;
		};

		pinctrl_usdhc3: usdhc3grp {
			fsl,pins = <
				MX6QDL_PAD_SD3_CMD__SD3_CMD		0x17059
				MX6QDL_PAD_SD3_CLK__SD3_CLK		0x10059
				MX6QDL_PAD_SD3_DAT0__SD3_DATA0		0x17059
				MX6QDL_PAD_SD3_DAT1__SD3_DATA1		0x17059
				MX6QDL_PAD_SD3_DAT2__SD3_DATA2		0x17059
				MX6QDL_PAD_SD3_DAT3__SD3_DATA3		0x17059
			>;
		};

		pinctrl_usdhc4: usdhc4grp {
			fsl,pins = <
				MX6QDL_PAD_SD4_CMD__SD4_CMD		0x17059
				MX6QDL_PAD_SD4_CLK__SD4_CLK		0x10059
				MX6QDL_PAD_SD4_DAT0__SD4_DATA0		0x17059
				MX6QDL_PAD_SD4_DAT1__SD4_DATA1		0x17059
				MX6QDL_PAD_SD4_DAT2__SD4_DATA2		0x17059
				MX6QDL_PAD_SD4_DAT3__SD4_DATA3		0x17059
			>;
		};
	};
};

&uart2 {
	status = "okay";
};

&uart4 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_uart4>;
	status = "okay";
};

/* External USB-A port (USBOTG) */
&usbotg {
	disable-over-current;
	status = "okay";
};

/* Internal USB port (USBH1), connected to RTL8192CU */
&usbh1 {
	disable-over-current;
	status = "okay";
};

/* External microSD */
&usdhc3 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usdhc3>;
	bus-width = <4>;
	cd-gpios = <&gpio6 11 GPIO_ACTIVE_LOW>;
	vmmc-supply = <&reg_3p3v>;
	status = "okay";
};

/* Internal microSD */
&usdhc4 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usdhc4>;
	bus-width = <4>;
	vmmc-supply = <&reg_3p3v>;
	status = "okay";
};

repo_name: angery/linux


code:
// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Copyright 2013 Gateworks Corporation
 */

/dts-v1/;
#include "imx6q.dtsi"
#include "imx6qdl-gw51xx.dtsi"

/ {
	model = "Gateworks Ventana i.MX6 Dual/Quad GW51XX";
	compatible = "gw,imx6q-gw51xx", "gw,ventana", "fsl,imx6q";
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Copyright 2013 Gateworks Corporation
 */

/dts-v1/;
#include "imx6q.dtsi"
#include "imx6qdl-gw52xx.dtsi"

/ {
	model = "Gateworks Ventana i.MX6 Dual/Quad GW52XX";
	compatible = "gw,imx6q-gw52xx", "gw,ventana", "fsl,imx6q";
};

&i2c3 {
	adv7180: camera@20 {
		compatible = "adi,adv7180";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_adv7180>;
		reg = <0x20>;
		powerdown-gpios = <&gpio3 31 GPIO_ACTIVE_LOW>;
		interrupt-parent = <&gpio3>;
		interrupts = <30 IRQ_TYPE_LEVEL_LOW>;

		port {
			adv7180_to_ipu2_csi1_mux: endpoint {
				remote-endpoint = <&ipu2_csi1_mux_from_parallel_sensor>;
				bus-width = <8>;
			};
		};
	};
};

&ipu2_csi1_from_ipu2_csi1_mux {
	bus-width = <8>;
};

&ipu2_csi1_mux_from_parallel_sensor {
	remote-endpoint = <&adv7180_to_ipu2_csi1_mux>;
	bus-width = <8>;
};

&ipu2_csi1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_ipu2_csi1>;
};

&iomuxc {
	pinctrl_adv7180: adv7180grp {
		fsl,pins = <
			MX6QDL_PAD_EIM_D30__GPIO3_IO30          0x0001b0b0
			MX6QDL_PAD_EIM_D31__GPIO3_IO31          0x4001b0b0
		>;
	};

	pinctrl_ipu2_csi1: ipu2_csi1grp {
		fsl,pins = <
			MX6QDL_PAD_EIM_EB2__IPU2_CSI1_DATA19    0x1b0b0
			MX6QDL_PAD_EIM_D16__IPU2_CSI1_DATA18    0x1b0b0
			MX6QDL_PAD_EIM_D18__IPU2_CSI1_DATA17    0x1b0b0
			MX6QDL_PAD_EIM_D19__IPU2_CSI1_DATA16    0x1b0b0
			MX6QDL_PAD_EIM_D20__IPU2_CSI1_DATA15    0x1b0b0
			MX6QDL_PAD_EIM_D26__IPU2_CSI1_DATA14    0x1b0b0
			MX6QDL_PAD_EIM_D27__IPU2_CSI1_DATA13    0x1b0b0
			MX6QDL_PAD_EIM_A17__IPU2_CSI1_DATA12    0x1b0b0
			MX6QDL_PAD_EIM_D29__IPU2_CSI1_VSYNC     0x1b0b0
			MX6QDL_PAD_EIM_EB3__IPU2_CSI1_HSYNC     0x1b0b0
			MX6QDL_PAD_EIM_A16__IPU2_CSI1_PIXCLK    0x1b0b0
		>;
	};
};

&sata {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Copyright 2013 Gateworks Corporation
 */

/dts-v1/;
#include "imx6q.dtsi"
#include "imx6qdl-gw53xx.dtsi"

/ {
	model = "Gateworks Ventana i.MX6 Dual/Quad GW53XX";
	compatible = "gw,imx6q-gw53xx", "gw,ventana", "fsl,imx6q";
};

&i2c3 {
	adv7180: camera@20 {
		compatible = "adi,adv7180";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_adv7180>;
		reg = <0x20>;
		powerdown-gpios = <&gpio3 31 GPIO_ACTIVE_LOW>;
		interrupt-parent = <&gpio3>;
		interrupts = <30 IRQ_TYPE_LEVEL_LOW>;

		port {
			adv7180_to_ipu2_csi1_mux: endpoint {
				remote-endpoint = <&ipu2_csi1_mux_from_parallel_sensor>;
				bus-width = <8>;
			};
		};
	};
};

&ipu2_csi1_from_ipu2_csi1_mux {
	bus-width = <8>;
};

&ipu2_csi1_mux_from_parallel_sensor {
	remote-endpoint = <&adv7180_to_ipu2_csi1_mux>;
	bus-width = <8>;
};

&ipu2_csi1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_ipu2_csi1>;
};

&sata {
	status = "okay";
};

&iomuxc {
	pinctrl_adv7180: adv7180grp {
		fsl,pins = <
			MX6QDL_PAD_EIM_D30__GPIO3_IO30          0x0001b0b0
			MX6QDL_PAD_EIM_D31__GPIO3_IO31          0x4001b0b0
		>;
	};

	pinctrl_ipu2_csi1: ipu2_csi1grp {
		fsl,pins = <
			MX6QDL_PAD_EIM_EB2__IPU2_CSI1_DATA19    0x1b0b0
			MX6QDL_PAD_EIM_D16__IPU2_CSI1_DATA18    0x1b0b0
			MX6QDL_PAD_EIM_D18__IPU2_CSI1_DATA17    0x1b0b0
			MX6QDL_PAD_EIM_D19__IPU2_CSI1_DATA16    0x1b0b0
			MX6QDL_PAD_EIM_D20__IPU2_CSI1_DATA15    0x1b0b0
			MX6QDL_PAD_EIM_D26__IPU2_CSI1_DATA14    0x1b0b0
			MX6QDL_PAD_EIM_D27__IPU2_CSI1_DATA13    0x1b0b0
			MX6QDL_PAD_EIM_A17__IPU2_CSI1_DATA12    0x1b0b0
			MX6QDL_PAD_EIM_D29__IPU2_CSI1_VSYNC     0x1b0b0
			MX6QDL_PAD_EIM_EB3__IPU2_CSI1_HSYNC     0x1b0b0
			MX6QDL_PAD_EIM_A16__IPU2_CSI1_PIXCLK    0x1b0b0
		>;
	};
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Copyright 2013 Gateworks Corporation
 */

/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
#include "imx6q.dtsi"

/ {
	model = "Gateworks Ventana GW5400-A";
	compatible = "gw,imx6q-gw5400-a", "gw,ventana", "fsl,imx6q";

	/* these are used by bootloader for disabling nodes */
	aliases {
		i2c0 = &i2c1;
		i2c1 = &i2c2;
		i2c2 = &i2c3;
		led0 = &led0;
		led1 = &led1;
		led2 = &led2;
		ssi0 = &ssi1;
		spi0 = &ecspi1;
		usb0 = &usbh1;
		usb1 = &usbotg;
	};

	chosen {
		bootargs = "console=ttymxc1,115200";
	};

	leds {
		compatible = "gpio-leds";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_gpio_leds>;

		led0: user1 {
			label = "user1";
			gpios = <&gpio4 6 GPIO_ACTIVE_HIGH>; /* 102 -> MX6_PANLEDG */
			default-state = "on";
			linux,default-trigger = "heartbeat";
		};

		led1: user2 {
			label = "user2";
			gpios = <&gpio4 10 GPIO_ACTIVE_HIGH>; /* 106 -> MX6_PANLEDR */
			default-state = "off";
		};

		led2: user3 {
			label = "user3";
			gpios = <&gpio4 15 GPIO_ACTIVE_LOW>; /* 111 -> MX6_LOCLED# */
			default-state = "off";
		};
	};

	memory@10000000 {
		device_type = "memory";
		reg = <0x10000000 0x40000000>;
	};

	pps {
		compatible = "pps-gpio";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_gpio_leds>;
		gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
		status = "okay";
	};

	regulators {
		compatible = "simple-bus";
		#address-cells = <1>;
		#size-cells = <0>;

		reg_1p0v: regulator@0 {
			compatible = "regulator-fixed";
			reg = <0>;
			regulator-name = "1P0V";
			regulator-min-microvolt = <1000000>;
			regulator-max-microvolt = <1000000>;
			regulator-always-on;
		};

		reg_3p3v: regulator@1 {
			compatible = "regulator-fixed";
			reg = <1>;
			regulator-name = "3P3V";
			regulator-min-microvolt = <3300000>;
			regulator-max-microvolt = <3300000>;
			regulator-always-on;
		};

		reg_usb_h1_vbus: regulator@2 {
			compatible = "regulator-fixed";
			reg = <2>;
			regulator-name = "usb_h1_vbus";
			regulator-min-microvolt = <5000000>;
			regulator-max-microvolt = <5000000>;
			regulator-always-on;
		};

		reg_usb_otg_vbus: regulator@3 {
			compatible = "regulator-fixed";
			reg = <3>;
			regulator-name = "usb_otg_vbus";
			regulator-min-microvolt = <5000000>;
			regulator-max-microvolt = <5000000>;
			gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>;
			enable-active-high;
		};
	};

	sound {
		compatible = "fsl,imx6q-ventana-sgtl5000",
			     "fsl,imx-audio-sgtl5000";
		model = "sgtl5000-audio";
		ssi-controller = <&ssi1>;
		audio-codec = <&codec>;
		audio-routing =
			"MIC_IN", "Mic Jack",
			"Mic Jack", "Mic Bias",
			"Headphone Jack", "HP_OUT";
		mux-int-port = <1>;
		mux-ext-port = <4>;
	};
};

&audmux {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_audmux>;
	status = "okay";
};

&ecspi1 {
	cs-gpios = <&gpio3 19 GPIO_ACTIVE_LOW>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_ecspi1>;
	status = "okay";

	flash: flash@0 {
		compatible = "sst,w25q256", "jedec,spi-nor";
		spi-max-frequency = <30000000>;
		reg = <0>;
	};
};

&fec {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_enet>;
	phy-mode = "rgmii-id";
	phy-reset-gpios = <&gpio1 30 GPIO_ACTIVE_LOW>;
	status = "okay";
};

&hdmi {
	ddc-i2c-bus = <&i2c3>;
	status = "okay";
};

&i2c1 {
	clock-frequency = <100000>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_i2c1>;
	status = "okay";

	eeprom1: eeprom@50 {
		compatible = "atmel,24c02";
		reg = <0x50>;
		pagesize = <16>;
	};

	eeprom2: eeprom@51 {
		compatible = "atmel,24c02";
		reg = <0x51>;
		pagesize = <16>;
	};

	eeprom3: eeprom@52 {
		compatible = "atmel,24c02";
		reg = <0x52>;
		pagesize = <16>;
	};

	eeprom4: eeprom@53 {
		compatible = "atmel,24c02";
		reg = <0x53>;
		pagesize = <16>;
	};

	gpio: pca9555@23 {
		compatible = "nxp,pca9555";
		reg = <0x23>;
		gpio-controller;
		#gpio-cells = <2>;
	};

	rtc: ds1672@68 {
		compatible = "dallas,ds1672";
		reg = <0x68>;
	};
};

&i2c2 {
	clock-frequency = <100000>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_i2c2>;
	status = "okay";

	pmic: pfuze100@8 {
		compatible = "fsl,pfuze100";
		reg = <0x08>;

		regulators {
			sw1a_reg: sw1ab {
				regulator-min-microvolt = <300000>;
				regulator-max-microvolt = <1875000>;
				regulator-boot-on;
				regulator-always-on;
				regulator-ramp-delay = <6250>;
			};

			sw1c_reg: sw1c {
				regulator-min-microvolt = <300000>;
				regulator-max-microvolt = <1875000>;
				regulator-boot-on;
				regulator-always-on;
				regulator-ramp-delay = <6250>;
			};

			sw2_reg: sw2 {
				regulator-min-microvolt = <800000>;
				regulator-max-microvolt = <3950000>;
				regulator-boot-on;
				regulator-always-on;
			};

			sw3a_reg: sw3a {
				regulator-min-microvolt = <400000>;
				regulator-max-microvolt = <1975000>;
				regulator-boot-on;
				regulator-always-on;
			};

			sw3b_reg: sw3b {
				regulator-min-microvolt = <400000>;
				regulator-max-microvolt = <1975000>;
				regulator-boot-on;
				regulator-always-on;
			};

			sw4_reg: sw4 {
				regulator-min-microvolt = <800000>;
				regulator-max-microvolt = <3300000>;
			};

			swbst_reg: swbst {
				regulator-min-microvolt = <5000000>;
				regulator-max-microvolt = <5150000>;
			};

			snvs_reg: vsnvs {
				regulator-min-microvolt = <1000000>;
				regulator-max-microvolt = <3000000>;
				regulator-boot-on;
				regulator-always-on;
			};

			vref_reg: vrefddr {
				regulator-boot-on;
				regulator-always-on;
			};

			vgen1_reg: vgen1 {
				regulator-min-microvolt = <800000>;
				regulator-max-microvolt = <1550000>;
			};

			vgen2_reg: vgen2 {
				regulator-min-microvolt = <800000>;
				regulator-max-microvolt = <1550000>;
			};

			vgen3_reg: vgen3 {
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <3300000>;
			};

			vgen4_reg: vgen4 {
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <3300000>;
				regulator-always-on;
			};

			vgen5_reg: vgen5 {
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <3300000>;
				regulator-always-on;
			};

			vgen6_reg: vgen6 {
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <3300000>;
				regulator-always-on;
			};
		};
	};
};

&i2c3 {
	clock-frequency = <100000>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_i2c3>;
	status = "okay";

	accelerometer: mma8450@1c {
		compatible = "fsl,mma8450";
		reg = <0x1c>;
	};

	codec: sgtl5000@a {
		compatible = "fsl,sgtl5000";
		reg = <0x0a>;
		clocks = <&clks IMX6QDL_CLK_CKO>;
		VDDA-supply = <&sw4_reg>;
		VDDIO-supply = <&reg_3p3v>;
	};

	touchscreen: egalax_ts@4 {
		compatible = "eeti,egalax_ts";
		reg = <0x04>;
		interrupt-parent = <&gpio7>;
		interrupts = <12 2>;
		wakeup-gpios = <&gpio7 12 GPIO_ACTIVE_LOW>;
	};
};

&ldb {
	status = "okay";
};

&pcie {
	reset-gpio = <&gpio1 29 GPIO_ACTIVE_LOW>;
	status = "okay";
};

&ssi1 {
	status = "okay";
};

&uart1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_uart1>;
	status = "okay";
};

&uart2 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_uart2>;
	status = "okay";
};

&uart5 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_uart5>;
	status = "okay";
};

&usbotg {
	vbus-supply = <&reg_usb_otg_vbus>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usbotg>;
	disable-over-current;
	status = "okay";
};

&usbh1 {
	vbus-supply = <&reg_usb_h1_vbus>;
	status = "okay";
};

&usdhc3 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usdhc3>;
	cd-gpios = <&gpio7 0 GPIO_ACTIVE_LOW>;
	vmmc-supply = <&reg_3p3v>;
	status = "okay";
};

&iomuxc {
	pinctrl_audmux: audmuxgrp {
		fsl,pins = <
			MX6QDL_PAD_SD2_DAT0__AUD4_RXD		0x130b0
			MX6QDL_PAD_SD2_DAT3__AUD4_TXC		0x130b0
			MX6QDL_PAD_SD2_DAT2__AUD4_TXD		0x110b0
			MX6QDL_PAD_SD2_DAT1__AUD4_TXFS		0x130b0
			MX6QDL_PAD_GPIO_0__CCM_CLKO1		0x130b0 /* AUD4_MCK */
		>;
	};

	pinctrl_ecspi1: ecspi1grp {
		fsl,pins = <
			MX6QDL_PAD_EIM_D17__ECSPI1_MISO		0x100b1
			MX6QDL_PAD_EIM_D18__ECSPI1_MOSI		0x100b1
			MX6QDL_PAD_EIM_D16__ECSPI1_SCLK		0x100b1
			MX6QDL_PAD_EIM_D19__GPIO3_IO19		0x1b0b0 /* SPINOR_CS0# */
		>;
	};

	pinctrl_enet: enetgrp {
		fsl,pins = <
			MX6QDL_PAD_RGMII_RXC__RGMII_RXC		0x1b030
			MX6QDL_PAD_RGMII_RD0__RGMII_RD0		0x1b030
			MX6QDL_PAD_RGMII_RD1__RGMII_RD1		0x1b030
			MX6QDL_PAD_RGMII_RD2__RGMII_RD2		0x1b030
			MX6QDL_PAD_RGMII_RD3__RGMII_RD3		0x1b030
			MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL	0x1b030
			MX6QDL_PAD_RGMII_TXC__RGMII_TXC		0x1b030
			MX6QDL_PAD_RGMII_TD0__RGMII_TD0		0x1b030
			MX6QDL_PAD_RGMII_TD1__RGMII_TD1		0x1b030
			MX6QDL_PAD_RGMII_TD2__RGMII_TD2		0x1b030
			MX6QDL_PAD_RGMII_TD3__RGMII_TD3		0x1b030
			MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL	0x1b030
			MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK	0x1b0b0
			MX6QDL_PAD_ENET_MDIO__ENET_MDIO		0x1b0b0
			MX6QDL_PAD_ENET_MDC__ENET_MDC		0x1b0b0
			MX6QDL_PAD_GPIO_16__ENET_REF_CLK	0x4001b0a8
		>;
	};

	pinctrl_gpio_leds: gpioledsgrp {
		fsl,pins = <
			MX6QDL_PAD_KEY_COL0__GPIO4_IO06		0x1b0b0 /* user1 led */
			MX6QDL_PAD_KEY_COL2__GPIO4_IO10		0x1b0b0 /* user2 led */
			MX6QDL_PAD_KEY_ROW4__GPIO4_IO15		0x1b0b0 /* user3 led */
		>;
	};

	pinctrl_i2c1: i2c1grp {
		fsl,pins = <
			MX6QDL_PAD_EIM_D21__I2C1_SCL		0x4001b8b1
			MX6QDL_PAD_EIM_D28__I2C1_SDA		0x4001b8b1
		>;
	};

	pinctrl_i2c2: i2c2grp {
		fsl,pins = <
			MX6QDL_PAD_KEY_COL3__I2C2_SCL		0x4001b8b1
			MX6QDL_PAD_KEY_ROW3__I2C2_SDA		0x4001b8b1
		>;
	};

	pinctrl_i2c3: i2c3grp {
		fsl,pins = <
			MX6QDL_PAD_GPIO_3__I2C3_SCL		0x4001b8b1
			MX6QDL_PAD_GPIO_6__I2C3_SDA		0x4001b8b1
		>;
	};

	pinctrl_pcie: pciegrp {
		fsl,pins = <
			MX6QDL_PAD_ENET_TX_EN__GPIO1_IO28	0x1b0b0 /* PCIE IRQ */
			MX6QDL_PAD_ENET_TXD1__GPIO1_IO29	0x1b0b0 /* PCIE RST */
		>;
	};

	pinctrl_pps: ppsgrp {
		fsl,pins = <
			MX6QDL_PAD_GPIO_5__GPIO1_IO05		0x1b0b0 /* GPS_PPS */
		>;
	};

	pinctrl_uart1: uart1grp {
		fsl,pins = <
			MX6QDL_PAD_SD3_DAT7__UART1_TX_DATA	0x1b0b1
			MX6QDL_PAD_SD3_DAT6__UART1_RX_DATA	0x1b0b1
		>;
	};

	pinctrl_uart2: uart2grp {
		fsl,pins = <
			MX6QDL_PAD_SD4_DAT7__UART2_TX_DATA	0x1b0b1
			MX6QDL_PAD_SD4_DAT4__UART2_RX_DATA	0x1b0b1
		>;
	};

	pinctrl_uart5: uart5grp {
		fsl,pins = <
			MX6QDL_PAD_KEY_COL1__UART5_TX_DATA	0x1b0b1
			MX6QDL_PAD_KEY_ROW1__UART5_RX_DATA	0x1b0b1
		>;
	};

	pinctrl_usbotg: usbotggrp {
		fsl,pins = <
			MX6QDL_PAD_GPIO_1__USB_OTG_ID		0x17059
			MX6QDL_PAD_EIM_D22__GPIO3_IO22		0x1b0b0 /* OTG_PWR_EN */
		>;
	};

	pinctrl_usdhc3: usdhc3grp {
		fsl,pins = <
			MX6QDL_PAD_SD3_CMD__SD3_CMD		0x17059
			MX6QDL_PAD_SD3_CLK__SD3_CLK		0x10059
			MX6QDL_PAD_SD3_DAT0__SD3_DATA0		0x17059
			MX6QDL_PAD_SD3_DAT1__SD3_DATA1		0x17059
			MX6QDL_PAD_SD3_DAT2__SD3_DATA2		0x17059
			MX6QDL_PAD_SD3_DAT3__SD3_DATA3		0x17059
		>;
	};
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Copyright 2013 Gateworks Corporation
 */

/dts-v1/;
#include "imx6q.dtsi"
#include "imx6qdl-gw54xx.dtsi"
#include <dt-bindings/media/tda1997x.h>

/ {
	model = "Gateworks Ventana i.MX6 Dual/Quad GW54XX";
	compatible = "gw,imx6q-gw54xx", "gw,ventana", "fsl,imx6q";

	sound-digital {
		compatible = "simple-audio-card";
		simple-audio-card,name = "tda1997x-audio";
		simple-audio-card,format = "i2s";
		simple-audio-card,bitclock-master = <&sound_codec>;
		simple-audio-card,frame-master = <&sound_codec>;

		sound_cpu: simple-audio-card,cpu {
			sound-dai = <&ssi2>;
		};

		sound_codec: simple-audio-card,codec {
			sound-dai = <&hdmi_receiver>;
		};
	};
};

&i2c3 {
	adv7180: camera@20 {
		compatible = "adi,adv7180";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_adv7180>;
		reg = <0x20>;
		powerdown-gpios = <&gpio3 31 GPIO_ACTIVE_LOW>;
		interrupt-parent = <&gpio3>;
		interrupts = <30 IRQ_TYPE_LEVEL_LOW>;

		port {
			adv7180_to_ipu2_csi1_mux: endpoint {
				remote-endpoint = <&ipu2_csi1_mux_from_parallel_sensor>;
				bus-width = <8>;
			};
		};
	};

	hdmi_receiver: hdmi-receiver@48 {
		compatible = "nxp,tda19971";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_tda1997x>;
		reg = <0x48>;
		interrupt-parent = <&gpio1>;
		interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
		DOVDD-supply = <&reg_3p3v>;
		AVDD-supply = <&sw4_reg>;
		DVDD-supply = <&sw4_reg>;
		#sound-dai-cells = <0>;
		nxp,audout-format = "i2s";
		nxp,audout-layout = <0>;
		nxp,audout-width = <16>;
		nxp,audout-mclk-fs = <128>;
		/*
		 * The 8bpp YUV422 semi-planar mode outputs CbCr[11:4]
		 * and Y[11:4] across 16bits in the same cycle
		 * which we map to VP[15:08]<->CSI_DATA[19:12]
		 */
		nxp,vidout-portcfg =
			/*G_Y_11_8<->VP[15:12]<->CSI_DATA[19:16]*/
			< TDA1997X_VP24_V15_12 TDA1997X_G_Y_11_8 >,
			/*G_Y_7_4<->VP[11:08]<->CSI_DATA[15:12]*/
			< TDA1997X_VP24_V11_08 TDA1997X_G_Y_7_4 >,
			/*R_CR_CBCR_11_8<->VP[07:04]<->CSI_DATA[11:08]*/
			< TDA1997X_VP24_V07_04 TDA1997X_R_CR_CBCR_11_8 >,
			/*R_CR_CBCR_7_4<->VP[03:00]<->CSI_DATA[07:04]*/
			< TDA1997X_VP24_V03_00 TDA1997X_R_CR_CBCR_7_4 >;

		port {
			tda1997x_to_ipu1_csi0_mux: endpoint {
				remote-endpoint = <&ipu1_csi0_mux_from_parallel_sensor>;
				bus-width = <16>;
				hsync-active = <1>;
				vsync-active = <1>;
				data-active = <1>;
			};
		};
	};
};

&ipu1_csi0_from_ipu1_csi0_mux {
	bus-width = <16>;
};

&ipu1_csi0_mux_from_parallel_sensor {
	remote-endpoint = <&tda1997x_to_ipu1_csi0_mux>;
	bus-width = <16>;
};

&ipu1_csi0 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_ipu1_csi0>;
};

&ipu2_csi1_from_ipu2_csi1_mux {
	bus-width = <8>;
};

&ipu2_csi1_mux_from_parallel_sensor {
	remote-endpoint = <&adv7180_to_ipu2_csi1_mux>;
	bus-width = <8>;
};

&ipu2_csi1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_ipu2_csi1>;
};

&sata {
	status = "okay";
};

&iomuxc {
	pinctrl_adv7180: adv7180grp {
		fsl,pins = <
			MX6QDL_PAD_EIM_D30__GPIO3_IO30          0x0001b0b0
			MX6QDL_PAD_EIM_D31__GPIO3_IO31          0x4001b0b0
		>;
	};

	pinctrl_ipu1_csi0: ipu1_csi0grp {
		fsl,pins = <
			MX6QDL_PAD_CSI0_DAT4__IPU1_CSI0_DATA04		0x1b0b0
			MX6QDL_PAD_CSI0_DAT5__IPU1_CSI0_DATA05		0x1b0b0
			MX6QDL_PAD_CSI0_DAT6__IPU1_CSI0_DATA06		0x1b0b0
			MX6QDL_PAD_CSI0_DAT7__IPU1_CSI0_DATA07		0x1b0b0
			MX6QDL_PAD_CSI0_DAT8__IPU1_CSI0_DATA08		0x1b0b0
			MX6QDL_PAD_CSI0_DAT9__IPU1_CSI0_DATA09		0x1b0b0
			MX6QDL_PAD_CSI0_DAT10__IPU1_CSI0_DATA10		0x1b0b0
			MX6QDL_PAD_CSI0_DAT11__IPU1_CSI0_DATA11		0x1b0b0
			MX6QDL_PAD_CSI0_DAT12__IPU1_CSI0_DATA12		0x1b0b0
			MX6QDL_PAD_CSI0_DAT13__IPU1_CSI0_DATA13		0x1b0b0
			MX6QDL_PAD_CSI0_DAT14__IPU1_CSI0_DATA14		0x1b0b0
			MX6QDL_PAD_CSI0_DAT15__IPU1_CSI0_DATA15		0x1b0b0
			MX6QDL_PAD_CSI0_DAT16__IPU1_CSI0_DATA16		0x1b0b0
			MX6QDL_PAD_CSI0_DAT17__IPU1_CSI0_DATA17		0x1b0b0
			MX6QDL_PAD_CSI0_DAT18__IPU1_CSI0_DATA18		0x1b0b0
			MX6QDL_PAD_CSI0_DAT19__IPU1_CSI0_DATA19		0x1b0b0
			MX6QDL_PAD_CSI0_MCLK__IPU1_CSI0_HSYNC		0x1b0b0
			MX6QDL_PAD_CSI0_PIXCLK__IPU1_CSI0_PIXCLK	0x1b0b0
			MX6QDL_PAD_CSI0_VSYNC__IPU1_CSI0_VSYNC		0x1b0b0
		>;
	};

	pinctrl_ipu2_csi1: ipu2_csi1grp {
		fsl,pins = <
			MX6QDL_PAD_EIM_EB2__IPU2_CSI1_DATA19    0x1b0b0
			MX6QDL_PAD_EIM_D16__IPU2_CSI1_DATA18    0x1b0b0
			MX6QDL_PAD_EIM_D18__IPU2_CSI1_DATA17    0x1b0b0
			MX6QDL_PAD_EIM_D19__IPU2_CSI1_DATA16    0x1b0b0
			MX6QDL_PAD_EIM_D20__IPU2_CSI1_DATA15    0x1b0b0
			MX6QDL_PAD_EIM_D26__IPU2_CSI1_DATA14    0x1b0b0
			MX6QDL_PAD_EIM_D27__IPU2_CSI1_DATA13    0x1b0b0
			MX6QDL_PAD_EIM_A17__IPU2_CSI1_DATA12    0x1b0b0
			MX6QDL_PAD_EIM_D29__IPU2_CSI1_VSYNC     0x1b0b0
			MX6QDL_PAD_EIM_EB3__IPU2_CSI1_HSYNC     0x1b0b0
			MX6QDL_PAD_EIM_A16__IPU2_CSI1_PIXCLK    0x1b0b0
		>;
	};

	pinctrl_tda1997x: tda1997xgrp {
		fsl,pins = <
			MX6QDL_PAD_GPIO_7__GPIO1_IO07	0x1b0b0
		>;
	};
};


code:
/*
 * Copyright 2014 Gateworks Corporation
 *
 * 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 "imx6q.dtsi"
#include "imx6qdl-gw551x.dtsi"

/ {
	model = "Gateworks Ventana i.MX6 Dual/Quad GW551X";
	compatible = "gw,imx6q-gw551x", "gw,ventana", "fsl,imx6q";
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Copyright 2014 Gateworks Corporation
 */

/dts-v1/;

#include "imx6q.dtsi"
#include "imx6qdl-gw552x.dtsi"

/ {
	model = "Gateworks Ventana i.MX6 Dual/Quad GW552X";
	compatible = "gw,imx6q-gw552x", "gw,ventana", "fsl,imx6q";
};

&sata {
	status = "okay";
};


code:
/*
 * Copyright 2016 Gateworks Corporation
 *
 * 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 "imx6q.dtsi"
#include "imx6qdl-gw553x.dtsi"

/ {
	model = "Gateworks Ventana i.MX6 Dual/Quad GW553X";
	compatible = "gw,imx6q-gw553x", "gw,ventana", "fsl,imx6q";
};


code:
/*
 * Copyright 2017 Gateworks Corporation
 *
 * 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 "imx6q.dtsi"
#include "imx6qdl-gw560x.dtsi"

/ {
	model = "Gateworks Ventana i.MX6 Dual/Quad GW560X";
	compatible = "gw,imx6q-gw560x", "gw,ventana", "fsl,imx6q";
};

&sata {
	status = "okay";
};


code:
/*
 * Copyright 2017 Gateworks Corporation
 *
 * 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 "imx6q.dtsi"
#include "imx6qdl-gw5903.dtsi"

/ {
	model = "Gateworks Ventana i.MX6 Dual/Quad GW5903";
	compatible = "gw,imx6q-gw5903", "gw,ventana", "fsl,imx6q";
};


code:
/*
 * Copyright 2017 Gateworks Corporation
 *
 * 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 "imx6q.dtsi"
#include "imx6qdl-gw5904.dtsi"

/ {
	model = "Gateworks Ventana i.MX6 Dual/Quad GW5904";
	compatible = "gw,imx6q-gw5904", "gw,ventana", "fsl,imx6q";
};

&sata {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright 2019 Gateworks Corporation
 */

/dts-v1/;

#include "imx6q.dtsi"
#include "imx6qdl-gw5907.dtsi"

/ {
	model = "Gateworks Ventana i.MX6 Dual/Quad GW5907";
	compatible = "gw,imx6q-gw5907", "gw,ventana", "fsl,imx6q";
};


code:
// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright 2019 Gateworks Corporation
 */

/dts-v1/;

#include "imx6q.dtsi"
#include "imx6qdl-gw5910.dtsi"

/ {
	model = "Gateworks Ventana i.MX6 Dual/Quad GW5910";
	compatible = "gw,imx6q-gw5910", "gw,ventana", "fsl,imx6q";
};


code:
// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright 2019 Gateworks Corporation
 */

/dts-v1/;
#include "imx6q.dtsi"
#include "imx6qdl-gw5912.dtsi"

/ {
	model = "Gateworks Ventana i.MX6 Dual/Quad GW5912";
	compatible = "gw,imx6q-gw5912", "gw,ventana", "fsl,imx6q";
};


code:
// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright 2019 Gateworks Corporation
 */

/dts-v1/;

#include "imx6q.dtsi"
#include "imx6qdl-gw5913.dtsi"

/ {
	model = "Gateworks Ventana i.MX6 Dual/Quad GW5913";
	compatible = "gw,imx6q-gw5913", "gw,ventana", "fsl,imx6q";
};


code:
/*
 * Copyright (C) 2015 Lucas Stach <kernel@pengutronix.de>
 *
 * 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 "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 "imx6q.dtsi"
#include "imx6qdl-sr-som.dtsi"
#include "imx6qdl-sr-som-brcm.dtsi"

/ {
	model = "Auvidea H100";
	compatible = "auvidea,h100", "fsl,imx6q";

	/* Will be filled by the bootloader */
	memory@10000000 {
		device_type = "memory";
		reg = <0x10000000 0>;
	};

	aliases {
		rtc0 = &rtc;
		rtc1 = &snvs_rtc;
	};

	chosen {
		stdout-path = &uart2;
	};

	hdmi_osc: hdmi-osc {
		compatible = "fixed-clock";
		clock-output-names = "hdmi-osc";
		clock-frequency = <27000000>;
		#clock-cells = <0>;
	};

	leds {
		compatible = "gpio-leds";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_h100_leds>;

		led0: power {
			label = "power";
			gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
			default-state = "on";
		};

		led1: stream {
			label = "stream";
			gpios = <&gpio2 29 GPIO_ACTIVE_LOW>;
			default-state = "off";
		};

		led2: rec {
			label = "rec";
			gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
			default-state = "off";
		};
	};

	reg_3p3v: regulator-3p3v {
		compatible = "regulator-fixed";
		regulator-name = "3P3V";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
	};

	reg_hdmi: regulator-hdmi {
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_h100_reg_hdmi>;
		compatible = "regulator-fixed";
		enable-active-high;
		gpio = <&gpio2 20 GPIO_ACTIVE_HIGH>;
		regulator-name = "V_HDMI";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		regulator-always-on;
	};

	reg_usbh1_vbus: regulator-usb-h1-vbus {
		compatible = "regulator-fixed";
		enable-active-high;
		gpio = <&gpio1 0 GPIO_ACTIVE_HIGH>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_h100_usbh1_vbus>;
		regulator-name = "USB_H1_VBUS";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
	};

	reg_usbotg_vbus: regulator-usb-otg-vbus {
		compatible = "regulator-fixed";
		enable-active-high;
		gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_h100_usbotg_vbus>;
		regulator-name = "USB_OTG_VBUS";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
	};

	sound-sgtl5000 {
		compatible = "fsl,imx-audio-sgtl5000";
		model = "H100 on-board codec";
		audio-codec = <&sgtl5000>;
		audio-routing =
			"MIC_IN", "Mic Jack",
			"Mic Jack", "Mic Bias",
			"Headphone Jack", "HP_OUT";
		mux-ext-port = <5>;
		mux-int-port = <1>;
		ssi-controller = <&ssi1>;
	};
};

&audmux {
	status = "okay";
};

&hdmi {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_h100_hdmi>;
	ddc-i2c-bus = <&i2c2>;
	status = "okay";
};

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

	eeprom: 24c02@51 {
		compatible = "microchip,24c02", "atmel,24c02";
		reg = <0x51>;
	};

	rtc: pcf8523@68 {
		compatible = "nxp,pcf8523";
		reg = <0x68>;
	};

	sgtl5000: sgtl5000@a {
		compatible = "fsl,sgtl5000";
		reg = <0x0a>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_h100_sgtl5000>;
		clocks = <&clks IMX6QDL_CLK_CKO>;
		VDDA-supply = <&reg_3p3v>;
		VDDIO-supply = <&reg_3p3v>;
	};

	tc358743: tc358743@f {
		compatible = "toshiba,tc358743";
		reg = <0x0f>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_h100_tc358743>;
		clocks = <&hdmi_osc>;
		clock-names = "refclk";
		reset-gpios = <&gpio6 15 GPIO_ACTIVE_LOW>;
		/* IRQ has a wrong pull resistor which renders it useless  */

		port {
			tc358743_out: endpoint {
				remote-endpoint = <&mipi_csi2_in>;
				data-lanes = <1 2 3 4>;
				clock-lanes = <0>;
				clock-noncontinuous;
				link-frequencies = /bits/ 64 <297000000>;
			};
		};
	};
};

&i2c2 {
	clock-frequency = <100000>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_h100_i2c2>;
	status = "okay";
};

&iomuxc {
	h100 {
		pinctrl_h100_hdmi: h100-hdmi {
			fsl,pins = <
				MX6QDL_PAD_KEY_ROW2__HDMI_TX_CEC_LINE	0x1f8b0
			>;
		};

		pinctrl_h100_i2c1: h100-i2c1 {
			fsl,pins = <
				MX6QDL_PAD_EIM_D21__I2C1_SCL		0x4001b8b1
				MX6QDL_PAD_EIM_D28__I2C1_SDA		0x4001b8b1
			>;
		};

		pinctrl_h100_i2c2: h100-i2c2 {
			fsl,pins = <
				MX6QDL_PAD_KEY_COL3__I2C2_SCL		0x4001b8b1
				MX6QDL_PAD_KEY_ROW3__I2C2_SDA		0x4001b8b1
			>;
		};

		pinctrl_h100_leds: pinctrl-h100-leds {
			fsl,pins = <
				MX6QDL_PAD_EIM_DA0__GPIO3_IO00		0x1b0b0
				MX6QDL_PAD_EIM_EB1__GPIO2_IO29		0x1b0b0
				MX6QDL_PAD_EIM_EB0__GPIO2_IO28		0x1b0b0
			>;
		};

		pinctrl_h100_reg_hdmi: h100-reg-hdmi {
			fsl,pins = <
				MX6QDL_PAD_EIM_A18__GPIO2_IO20		0x1b0b0
			>;
		};

		pinctrl_h100_sgtl5000: h100-sgtl5000 {
			fsl,pins = <
				MX6QDL_PAD_DISP0_DAT19__AUD5_RXD	0x130b0
				MX6QDL_PAD_KEY_COL0__AUD5_TXC		0x130b0
				MX6QDL_PAD_KEY_ROW0__AUD5_TXD		0x110b0
				MX6QDL_PAD_KEY_COL1__AUD5_TXFS		0x130b0
				MX6QDL_PAD_GPIO_5__CCM_CLKO1		0x130b0
			>;
		};

		pinctrl_h100_tc358743: h100-tc358743 {
			fsl,pins = <
				MX6QDL_PAD_NANDF_CS2__GPIO6_IO15	0x1b0b0
			>;
		};

		pinctrl_h100_uart2: h100-uart2 {
			fsl,pins = <
				MX6QDL_PAD_SD4_DAT4__UART2_RX_DATA	0x1b0b1
				MX6QDL_PAD_SD4_DAT7__UART2_TX_DATA	0x1b0b1
			>;
		};

		pinctrl_h100_usbh1_vbus: hummingboard-usbh1-vbus {
			fsl,pins = <
				MX6QDL_PAD_GPIO_0__GPIO1_IO00		0x1b0b0
			>;
		};

		pinctrl_h100_usbotg_id: hummingboard-usbotg-id {
			fsl,pins = <
				MX6QDL_PAD_GPIO_1__USB_OTG_ID		0x13059
			>;
		};

		pinctrl_h100_usbotg_vbus: hummingboard-usbotg-vbus {
			fsl,pins = <
				MX6QDL_PAD_EIM_D22__GPIO3_IO22		0x1b0b0
			>;
		};

		pinctrl_h100_usdhc2: h100-usdhc2 {
			fsl,pins = <
				MX6QDL_PAD_GPIO_4__GPIO1_IO04		0x1f071
				MX6QDL_PAD_SD2_CMD__SD2_CMD		0x17059
				MX6QDL_PAD_SD2_CLK__SD2_CLK		0x10059
				MX6QDL_PAD_SD2_DAT0__SD2_DATA0		0x17059
				MX6QDL_PAD_SD2_DAT1__SD2_DATA1		0x17059
				MX6QDL_PAD_SD2_DAT2__SD2_DATA2		0x17059
				MX6QDL_PAD_SD2_DAT3__SD2_DATA3		0x13059
				MX6QDL_PAD_KEY_ROW1__SD2_VSELECT	0x1b0b0
			>;
		};

		pinctrl_h100_usdhc2_100mhz: h100-usdhc2-100mhz {
			fsl,pins = <
				MX6QDL_PAD_GPIO_4__GPIO1_IO04		0x1f071
				MX6QDL_PAD_SD2_CMD__SD2_CMD		0x170b9
				MX6QDL_PAD_SD2_CLK__SD2_CLK		0x100b9
				MX6QDL_PAD_SD2_DAT0__SD2_DATA0		0x170b9
				MX6QDL_PAD_SD2_DAT1__SD2_DATA1		0x170b9
				MX6QDL_PAD_SD2_DAT2__SD2_DATA2		0x170b9
				MX6QDL_PAD_SD2_DAT3__SD2_DATA3		0x170b9
				MX6QDL_PAD_KEY_ROW1__SD2_VSELECT	0x1b0b0
			>;
		};

		pinctrl_h100_usdhc2_200mhz: h100-usdhc2-200mhz {
			fsl,pins = <
				MX6QDL_PAD_GPIO_4__GPIO1_IO04		0x1f071
				MX6QDL_PAD_SD2_CMD__SD2_CMD		0x170f9
				MX6QDL_PAD_SD2_CLK__SD2_CLK		0x100f9
				MX6QDL_PAD_SD2_DAT0__SD2_DATA0		0x170f9
				MX6QDL_PAD_SD2_DAT1__SD2_DATA1		0x170f9
				MX6QDL_PAD_SD2_DAT2__SD2_DATA2		0x170f9
				MX6QDL_PAD_SD2_DAT3__SD2_DATA3		0x170f9
				MX6QDL_PAD_KEY_ROW1__SD2_VSELECT	0x1b0b0
			>;
		};
	};
};

&mipi_csi {
	status = "okay";

	port {
		mipi_csi2_in: endpoint {
			remote-endpoint = <&tc358743_out>;
			data-lanes = <1 2 3 4>;
			clock-lanes = <0>;
			clock-noncontinuous;
			link-frequencies = /bits/ 64 <297000000>;
		};
	};
};

&ssi1 {
	status = "okay";
};

&uart2 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_h100_uart2>;
	status = "okay";
};

&usbh1 {
	disable-over-current;
	vbus-supply = <&reg_usbh1_vbus>;
	status = "okay";
};

&usbotg {
	disable-over-current;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_h100_usbotg_id>;
	vbus-supply = <&reg_usbotg_vbus>;
	status = "okay";
};

&usdhc2 {
	pinctrl-names = "default", "state_100mhz", "state_200mhz";
	pinctrl-0 = <&pinctrl_h100_usdhc2>;
	pinctrl-1 = <&pinctrl_h100_usdhc2_100mhz>;
	pinctrl-2 = <&pinctrl_h100_usdhc2_200mhz>;
	vmmc-supply = <&reg_3p3v>;
	cd-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
	status = "okay";
};


code:
/*
 * Copyright (C) 2014 Rabeeh Khoury (rabeeh@solid-run.com)
 * Based on dt work by Russell King
 *
 * 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 "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 "imx6q.dtsi"
#include "imx6qdl-sr-som.dtsi"
#include "imx6qdl-sr-som-ti.dtsi"
#include "imx6qdl-sr-som-emmc.dtsi"
#include "imx6qdl-hummingboard.dtsi"

/ {
	model = "SolidRun HummingBoard Dual/Quad (1.5som+emmc)";
	compatible = "solidrun,hummingboard/q", "fsl,imx6q";
};

&sata {
	status = "okay";
	fsl,transmit-level-mV = <1025>;
	fsl,transmit-boost-mdB = <3330>;
	fsl,transmit-atten-16ths = <9>;
	fsl,receive-eq-mdB = <3000>;
};


code:
/*
 * Copyright (C) 2014 Rabeeh Khoury (rabeeh@solid-run.com)
 * Based on dt work by Russell King
 *
 * 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 "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 "imx6q.dtsi"
#include "imx6qdl-sr-som.dtsi"
#include "imx6qdl-sr-som-ti.dtsi"
#include "imx6qdl-hummingboard.dtsi"

/ {
	model = "SolidRun HummingBoard Dual/Quad (1.5som)";
	compatible = "solidrun,hummingboard/q", "fsl,imx6q";
};

&sata {
	status = "okay";
	fsl,transmit-level-mV = <1025>;
	fsl,transmit-boost-mdB = <3330>;
	fsl,transmit-atten-16ths = <9>;
	fsl,receive-eq-mdB = <3000>;
};


code:
/*
 * Copyright (C) 2014 Rabeeh Khoury (rabeeh@solid-run.com)
 * Based on dt work by Russell King
 *
 * 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 "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 "imx6q.dtsi"
#include "imx6qdl-sr-som.dtsi"
#include "imx6qdl-sr-som-brcm.dtsi"
#include "imx6qdl-hummingboard.dtsi"

/ {
	model = "SolidRun HummingBoard Dual/Quad";
	compatible = "solidrun,hummingboard/q", "fsl,imx6q";
};

&sata {
	status = "okay";
	fsl,transmit-level-mV = <1025>;
	fsl,transmit-boost-mdB = <3330>;
	fsl,transmit-atten-16ths = <9>;
	fsl,receive-eq-mdB = <3000>;
};


code:
/*
 * Device Tree file for SolidRun HummingBoard2
 * Copyright (C) 2015 Rabeeh Khoury <rabeeh@solid-run.com>
 * Based on work by Russell King
 *
 * 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.
 *
 *     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.
 */
/dts-v1/;

#include "imx6q.dtsi"
#include "imx6qdl-sr-som.dtsi"
#include "imx6qdl-sr-som-emmc.dtsi"
#include "imx6qdl-sr-som-ti.dtsi"
#include "imx6qdl-hummingboard2.dtsi"

/ {
	model = "SolidRun HummingBoard2 Dual/Quad (1.5som+emmc)";
	compatible = "solidrun,hummingboard2/q", "fsl,imx6q";
};

&sata {
	status = "okay";
	fsl,transmit-level-mV = <1104>;
	fsl,transmit-boost-mdB = <0>;
	fsl,transmit-atten-16ths = <9>;
	fsl,no-spread-spectrum;
};


code:
/*
 * Device Tree file for SolidRun HummingBoard2
 * Copyright (C) 2015 Rabeeh Khoury <rabeeh@solid-run.com>
 * Based on work by Russell King
 *
 * 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.
 *
 *     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.
 */
/dts-v1/;

#include "imx6q.dtsi"
#include "imx6qdl-sr-som.dtsi"
#include "imx6qdl-sr-som-ti.dtsi"
#include "imx6qdl-hummingboard2.dtsi"

/ {
	model = "SolidRun HummingBoard2 Dual/Quad (1.5som)";
	compatible = "solidrun,hummingboard2/q", "fsl,imx6q";
};

&sata {
	status = "okay";
	fsl,transmit-level-mV = <1104>;
	fsl,transmit-boost-mdB = <0>;
	fsl,transmit-atten-16ths = <9>;
	fsl,no-spread-spectrum;
};


code:
/*
 * Copyright (C) 2015 Rabeeh Khoury <rabeeh@solid-run.com>
 * Based on dt work by Russell King
 *
 * 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 "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 "imx6q.dtsi"
#include "imx6qdl-sr-som.dtsi"
#include "imx6qdl-sr-som-brcm.dtsi"
#include "imx6qdl-hummingboard2.dtsi"
#include "imx6qdl-hummingboard2-emmc.dtsi"

/ {
	model = "SolidRun HummingBoard2 Dual/Quad";
	compatible = "solidrun,hummingboard2/q", "fsl,imx6q";
};

&sata {
	status = "okay";
	fsl,transmit-level-mV = <1104>;
	fsl,transmit-boost-mdB = <0>;
	fsl,transmit-atten-16ths = <9>;
	fsl,no-spread-spectrum;
};


code:
// SPDX-License-Identifier: GPL-2.0 OR X11
/*
 * Copyright (C) 2017 Engicam S.r.l.
 * Copyright (C) 2017 Amarula Solutions B.V.
 * Author: Jagan Teki <jagan@amarulasolutions.com>
 */

/dts-v1/;

#include "imx6q.dtsi"
#include "imx6qdl-icore-1.5.dtsi"

/ {
	model = "Engicam i.CoreM6 1.5 Quad/Dual MIPI Starter Kit";
	compatible = "engicam,imx6-icore", "fsl,imx6q";
};

&hdmi {
	ddc-i2c-bus = <&i2c2>;
	status = "okay";
};

&mipi_csi {
	status = "okay";
};

&ov5640 {
	status = "okay";
};

&usdhc3 {
	status = "okay";
};


code:
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Copyright (C) 2016 Amarula Solutions B.V.
 * Copyright (C) 2016 Engicam S.r.l.
 */

/dts-v1/;

#include "imx6q.dtsi"
#include "imx6qdl-icore.dtsi"

/ {
	model = "Engicam i.CoreM6 Quad/Dual OpenFrame Capacitive touch 10.1 Kit";
	compatible = "engicam,imx6-icore", "fsl,imx6q";

	panel {
		compatible = "ampire,am-1280800n3tzqw-t00h";
		backlight = <&backlight_lvds>;

		port {
			panel_in: endpoint {
				remote-endpoint = <&lvds0_out>;
			};
		};
	};
};

&ldb {
	status = "okay";

	lvds-channel@0 {
		fsl,data-mapping = "spwg";
		fsl,data-width = <24>;
		status = "okay";

		port@4 {
			reg = <4>;

			lvds0_out: endpoint {
				remote-endpoint = <&panel_in>;
			};
		};
	};
};


code:
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Copyright (C) 2016 Amarula Solutions B.V.
 * Copyright (C) 2016 Engicam S.r.l.
 */

/dts-v1/;

#include "imx6q.dtsi"
#include "imx6qdl-icore.dtsi"

/ {
	model = "Engicam i.CoreM6 Quad/Dual OpenFrame Capacitive touch 12 Kit";
	compatible = "engicam,imx6-icore", "fsl,imx6q";

	panel {
		compatible = "koe,tx31d200vm0baa";
		backlight = <&backlight_lvds>;

		port {
			panel_in: endpoint {
				remote-endpoint = <&lvds0_out>;
			};
		};
	};
};

&ldb {
	status = "okay";

	lvds-channel@0 {
		reg = <0>;
		status = "okay";

		port@4 {
			reg = <4>;

			lvds0_out: endpoint {
				remote-endpoint = <&panel_in>;
			};
		};
	};
};


code:
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Copyright (C) 2015 Amarula Solutions B.V.
 * Copyright (C) 2015 Engicam S.r.l.
 */

/dts-v1/;

#include "imx6q.dtsi"
#include "imx6qdl-icore-rqs.dtsi"

/ {
	model = "Engicam i.CoreM6 Quad/Dual RQS Starter Kit";
	compatible = "engicam,imx6-icore-rqs", "fsl,imx6q";
};

&sata {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0 OR X11
/*
 * Copyright (C) 2016 Amarula Solutions B.V.
 * Copyright (C) 2016 Engicam S.r.l.
 */

/dts-v1/;

#include "imx6q.dtsi"
#include "imx6qdl-icore.dtsi"

/ {
	model = "Engicam i.CoreM6 Quad/Dual Starter Kit";
	compatible = "engicam,imx6-icore", "fsl,imx6q";
};

&can1 {
	status = "okay";
};

&can2 {
	status = "okay";
};

&i2c1 {
	max11801: touchscreen@48 {
		compatible = "maxim,max11801";
		reg = <0x48>;
		interrupt-parent = <&gpio3>;
		interrupts = <31 IRQ_TYPE_EDGE_FALLING>;
	};
};

&ldb {
	status = "okay";

	lvds-channel@0 {
		fsl,data-mapping = "spwg";
		fsl,data-width = <18>;
		status = "okay";

		display-timings {
			native-mode = <&timing0>;
			timing0: timing0 {
				clock-frequency = <60000000>;
				hactive = <800>;
				vactive = <480>;
				hback-porch = <30>;
				hfront-porch = <30>;
				vback-porch = <5>;
				vfront-porch = <5>;
				hsync-len = <64>;
				vsync-len = <20>;
			};
		};
	};
};


code:
// SPDX-License-Identifier: GPL-2.0 OR X11
/*
 * Copyright 2019 (C) Pengutronix, Marco Felsch <kernel@pengutronix.de>
 */

#include "imx6q.dtsi"
#include "imx6qdl-kontron-samx6i.dtsi"
#include <dt-bindings/gpio/gpio.h>

/ {
	model = "Kontron SMARC sAMX6i Quad/Dual";
	compatible = "kontron,imx6q-samx6i", "fsl,imx6q";
};

/* Quad/Dual SoMs have 3 chip-select signals */
&ecspi4 {
	cs-gpios = <&gpio3 24 GPIO_ACTIVE_LOW>,
		   <&gpio3 29 GPIO_ACTIVE_LOW>,
		   <&gpio3 25 GPIO_ACTIVE_LOW>;
};

&pinctrl_ecspi4 {
	fsl,pins = <
		MX6QDL_PAD_EIM_D21__ECSPI4_SCLK 0x100b1
		MX6QDL_PAD_EIM_D28__ECSPI4_MOSI 0x100b1
		MX6QDL_PAD_EIM_D22__ECSPI4_MISO 0x100b1

		/* SPI4_IMX_CS2# - connected to internal flash */
		MX6QDL_PAD_EIM_D24__GPIO3_IO24 0x1b0b0
		/* SPI4_IMX_CS0# - connected to SMARC SPI0_CS0# */
		MX6QDL_PAD_EIM_D29__GPIO3_IO29 0x1b0b0
		/* SPI4_CS3# - connected to  SMARC SPI0_CS1# */
		MX6QDL_PAD_EIM_D25__GPIO3_IO25 0x1b0b0
	>;
};


code:
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Copyright 2018
 * Lukasz Majewski, DENX Software Engineering, lukma@denx.de
 */

/dts-v1/;

#include "imx6q-kp.dtsi"

/ {
	model = "Freescale i.MX6 Qwuad K+P TPC Board";
	compatible = "kiebackpeter,imx6q-tpc", "fsl,imx6q";

	memory@10000000 {
		device_type = "memory";
		reg = <0x10000000 0x40000000>;
	};
};

&ipu1_di0_disp0 {
	remote-endpoint = <&lcd_display_in>;
};


code:
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Copyright 2018
 * Lukasz Majewski, DENX Software Engineering, lukma@denx.de
 */

/dts-v1/;

#include "imx6q.dtsi"

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pwm/pwm.h>
#include <dt-bindings/sound/fsl-imx-audmux.h>

/ {
	backlight_lcd: backlight-lcd {
		compatible = "pwm-backlight";
		pwms = <&pwm1 0 5000000>;
		brightness-levels = <0 255>;
		num-interpolated-steps = <255>;
		default-brightness-level = <250>;
	};

	beeper {
		compatible = "pwm-beeper";
		pwms = <&pwm2 0 500000>;
	};

	lcd_display: display {
		compatible = "fsl,imx-parallel-display";
		#address-cells = <1>;
		#size-cells = <0>;
		interface-pix-fmt = "rgb24";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_ipu1>;

		port@0 {
			reg = <0>;

			lcd_display_in: endpoint {
				remote-endpoint = <&ipu1_di0_disp0>;
			};
		};

		port@1 {
			reg = <1>;

			lcd_display_out: endpoint {
				remote-endpoint = <&lcd_panel_in>;
			};
		};
	};

	lcd_panel: lcd-panel {
		compatible = "auo,g070vvn01";
		backlight = <&backlight_lcd>;
		power-supply = <&reg_display>;

		port {
			lcd_panel_in: endpoint {
				remote-endpoint = <&lcd_display_out>;
			};
		};
	};

	leds {
		compatible = "gpio-leds";

		green {
			label = "led1";
			gpios = <&gpio3 16 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "gpio";
			default-state = "off";
		};

		red {
			label = "led0";
			gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "gpio";
			default-state = "off";
		};
	};

	reg_3p3v: regulator-3p3v {
		compatible = "regulator-fixed";
		regulator-name = "3P3V";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		regulator-always-on;
	};

	reg_audio: regulator-audio {
		compatible = "regulator-fixed";
		regulator-name = "sgtl5000-supply";
		gpio = <&gpio6 31 GPIO_ACTIVE_HIGH>;
		enable-active-high;
		regulator-always-on;
	};

	reg_display: regulator-display {
		compatible = "regulator-fixed";
		regulator-name = "display-supply";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		regulator-always-on;
	};

	reg_usb_h1_vbus: regulator-usb_h1_vbus {
		compatible = "regulator-fixed";
		regulator-name = "usb_h1_vbus";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		enable-active-high;
	};

	sound {
		compatible = "simple-audio-card";
		simple-audio-card,name = "imx6q-sgtl5000-audio";
		simple-audio-card,format = "i2s";
		simple-audio-card,bitclock-master = <&codec_dai>;
		simple-audio-card,frame-master = <&codec_dai>;

		cpu_dai: simple-audio-card,cpu {
			sound-dai = <&ssi1>;
		};

		codec_dai: simple-audio-card,codec {
			sound-dai = <&sgtl5000>;
		};
	};
};

&audmux {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_audmux>;
	status = "okay";

	ssi1 {
		fsl,audmux-port = <0>;
		fsl,port-config = <
			(IMX_AUDMUX_V2_PTCR_SYN |
			IMX_AUDMUX_V2_PTCR_TFSEL(2) |
			IMX_AUDMUX_V2_PTCR_TCSEL(2) |
			IMX_AUDMUX_V2_PTCR_TFSDIR |
			IMX_AUDMUX_V2_PTCR_TCLKDIR)
			IMX_AUDMUX_V2_PDCR_RXDSEL(2)
		>;
	};

	aud3 {
		fsl,audmux-port = <2>;
		fsl,port-config = <
			IMX_AUDMUX_V2_PTCR_SYN
			IMX_AUDMUX_V2_PDCR_RXDSEL(0)
		>;
	};
};

&can1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_flexcan1>;
};

&can2 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_flexcan2>;
};

&fec {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_enet>;
	phy-mode = "rgmii";
	fsl,magic-packet;
	status = "okay";
};

&i2c1 {
	clock-frequency = <400000>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_i2c1>;
	status = "okay";

	touchscreen@5d {
		compatible = "goodix,gt911";
		reg = <0x5d>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_ts>;
		interrupt-parent = <&gpio1>;
		interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
		irq-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
		reset-gpios = <&gpio5 2 GPIO_ACTIVE_HIGH>;
	};

	ds1307: rtc@32 {
		compatible = "dallas,ds1307";
		reg = <0x32>;
	};
};

&i2c2 {
	clock-frequency = <400000>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_i2c2>;
	status = "okay";

	sgtl5000: audio-codec@a {
		compatible = "fsl,sgtl5000";
		#sound-dai-cells = <0>;
		reg = <0x0a>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_codec>;
		clocks = <&clks IMX6QDL_CLK_CKO>;
		VDDA-supply = <&reg_3p3v>;
		VDDIO-supply = <&reg_3p3v>;
	};
};

&iomuxc {
	pinctrl_audmux: audmuxgrp {
		fsl,pins = <
			MX6QDL_PAD_CSI0_DAT7__AUD3_RXD		0x130b0
			MX6QDL_PAD_CSI0_DAT4__AUD3_TXC		0x130b0
			MX6QDL_PAD_CSI0_DAT5__AUD3_TXD		0x110b0
			MX6QDL_PAD_CSI0_DAT6__AUD3_TXFS	0x130b0
		>;
	};

	pinctrl_codec: codecgrp {
		fsl,pins = <
			MX6QDL_PAD_EIM_BCLK__GPIO6_IO31   0x1b0b0
			/* sgtl5000 sys_mclk clock routed to CLKO1 */
			MX6QDL_PAD_GPIO_0__CCM_CLKO1      0x000b0
		>;
	};

	pinctrl_enet: enetgrp {
		fsl,pins = <
			MX6QDL_PAD_ENET_MDIO__ENET_MDIO	0x1b0b0
			MX6QDL_PAD_ENET_MDC__ENET_MDC		0x1b0b0
			MX6QDL_PAD_RGMII_TXC__RGMII_TXC	0x1b0b0
			MX6QDL_PAD_RGMII_TD0__RGMII_TD0	0x1b0b0
			MX6QDL_PAD_RGMII_TD1__RGMII_TD1	0x1b0b0
			MX6QDL_PAD_RGMII_TD2__RGMII_TD2	0x1b0b0
			MX6QDL_PAD_RGMII_TD3__RGMII_TD3	0x1b0b0
			MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL	0x1b0b0
			MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK	0x1b0b0
			MX6QDL_PAD_RGMII_RXC__RGMII_RXC	0x1b0b0
			MX6QDL_PAD_RGMII_RD0__RGMII_RD0	0x1b0b0
			MX6QDL_PAD_RGMII_RD1__RGMII_RD1	0x1b0b0
			MX6QDL_PAD_RGMII_RD2__RGMII_RD2	0x1b0b0
			MX6QDL_PAD_RGMII_RD3__RGMII_RD3	0x1b0b0
			MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL	0x1b0b0
			MX6QDL_PAD_GPIO_16__ENET_REF_CLK 0x4001b0a8
		>;
	};

	pinctrl_flexcan1: can1grp {
		fsl,pins = <
			MX6QDL_PAD_GPIO_7__FLEXCAN1_TX        0x1b0b0
			MX6QDL_PAD_GPIO_8__FLEXCAN1_RX        0x1b0b0
		>;
	};

	pinctrl_flexcan2: can2grp {
		fsl,pins = <
			MX6QDL_PAD_KEY_COL4__FLEXCAN2_TX        0x1b0b0
			MX6QDL_PAD_KEY_ROW4__FLEXCAN2_RX        0x1b0b0
		>;
	};

	pinctrl_i2c1: i2c1grp {
		fsl,pins = <
			MX6QDL_PAD_CSI0_DAT8__I2C1_SDA	0x4001b8b1
			MX6QDL_PAD_CSI0_DAT9__I2C1_SCL	0x4001b8b1
		>;
	};

	pinctrl_i2c2: i2c2grp {
		fsl,pins = <
			MX6QDL_PAD_KEY_COL3__I2C2_SCL	0x4001b8b1
			MX6QDL_PAD_KEY_ROW3__I2C2_SDA	0x4001b8b1
		 >;
	};

	pinctrl_ipu1: ipu1grp {
		fsl,pins = <
			MX6QDL_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK 0x10
			MX6QDL_PAD_DI0_PIN15__IPU1_DI0_PIN15       0x10
			MX6QDL_PAD_DI0_PIN2__IPU1_DI0_PIN02        0x10
			MX6QDL_PAD_DI0_PIN3__IPU1_DI0_PIN03        0x10
			MX6QDL_PAD_DISP0_DAT0__IPU1_DISP0_DATA00   0x10
			MX6QDL_PAD_DISP0_DAT1__IPU1_DISP0_DATA01   0x10
			MX6QDL_PAD_DISP0_DAT2__IPU1_DISP0_DATA02   0x10
			MX6QDL_PAD_DISP0_DAT3__IPU1_DISP0_DATA03   0x10
			MX6QDL_PAD_DISP0_DAT4__IPU1_DISP0_DATA04   0x10
			MX6QDL_PAD_DISP0_DAT5__IPU1_DISP0_DATA05   0x10
			MX6QDL_PAD_DISP0_DAT6__IPU1_DISP0_DATA06   0x10
			MX6QDL_PAD_DISP0_DAT7__IPU1_DISP0_DATA07   0x10
			MX6QDL_PAD_DISP0_DAT8__IPU1_DISP0_DATA08   0x10
			MX6QDL_PAD_DISP0_DAT9__IPU1_DISP0_DATA09   0x10
			MX6QDL_PAD_DISP0_DAT10__IPU1_DISP0_DATA10  0x10
			MX6QDL_PAD_DISP0_DAT11__IPU1_DISP0_DATA11  0x10
			MX6QDL_PAD_DISP0_DAT12__IPU1_DISP0_DATA12  0x10
			MX6QDL_PAD_DISP0_DAT13__IPU1_DISP0_DATA13  0x10
			MX6QDL_PAD_DISP0_DAT14__IPU1_DISP0_DATA14  0x10
			MX6QDL_PAD_DISP0_DAT15__IPU1_DISP0_DATA15  0x10
			MX6QDL_PAD_DISP0_DAT16__IPU1_DISP0_DATA16  0x10
			MX6QDL_PAD_DISP0_DAT17__IPU1_DISP0_DATA17  0x10
			MX6QDL_PAD_DISP0_DAT18__IPU1_DISP0_DATA18  0x10
			MX6QDL_PAD_DISP0_DAT19__IPU1_DISP0_DATA19  0x10
			MX6QDL_PAD_DISP0_DAT20__IPU1_DISP0_DATA20  0x10
			MX6QDL_PAD_DISP0_DAT21__IPU1_DISP0_DATA21  0x10
			MX6QDL_PAD_DISP0_DAT22__IPU1_DISP0_DATA22  0x10
			MX6QDL_PAD_DISP0_DAT23__IPU1_DISP0_DATA23  0x10
		>;
	};

	pinctrl_pwm1: pwm1grp {
		fsl,pins = <
			MX6QDL_PAD_SD1_DAT3__PWM1_OUT		0x1b0b1
		>;
	};

	pinctrl_pwm2: pwm2grp {
		fsl,pins = <
			MX6QDL_PAD_SD1_DAT2__PWM2_OUT		0x1b0b1
		>;
	};

	pinctrl_ts: tsgrp {
		fsl,pins = <
			MX6QDL_PAD_GPIO_9__GPIO1_IO09 0x1b0b0
			MX6QDL_PAD_EIM_A25__GPIO5_IO02 0x1b0b0
		>;
	};

	pinctrl_uart1: uart1grp {
		fsl,pins = <
			MX6QDL_PAD_SD3_DAT7__UART1_TX_DATA	0x1b0b1
			MX6QDL_PAD_SD3_DAT6__UART1_RX_DATA	0x1b0b1
		>;
	};

	pinctrl_uart2: uart2grp {
		fsl,pins = <
			MX6QDL_PAD_EIM_D26__UART2_TX_DATA       0x1b0b1
			MX6QDL_PAD_EIM_D27__UART2_RX_DATA       0x1b0b1
			MX6QDL_PAD_EIM_D28__UART2_CTS_B         0x1b0b1
			MX6QDL_PAD_EIM_D29__UART2_RTS_B         0x1b0b1
		>;
	};

	pinctrl_usdhc2: usdhc2grp {
		fsl,pins = <
			MX6QDL_PAD_SD2_CMD__SD2_CMD		0x17059
			MX6QDL_PAD_SD2_CLK__SD2_CLK		0x10059
			MX6QDL_PAD_SD2_DAT0__SD2_DATA0		0x17059
			MX6QDL_PAD_SD2_DAT1__SD2_DATA1		0x17059
			MX6QDL_PAD_SD2_DAT2__SD2_DATA2		0x17059
			MX6QDL_PAD_SD2_DAT3__SD2_DATA3		0x17059
		>;
	};

	pinctrl_usdhc4: usdhc4grp {
		fsl,pins = <
			MX6QDL_PAD_SD4_CMD__SD4_CMD		0x17059
			MX6QDL_PAD_SD4_CLK__SD4_CLK		0x10059
			MX6QDL_PAD_SD4_DAT0__SD4_DATA0		0x17059
			MX6QDL_PAD_SD4_DAT1__SD4_DATA1		0x17059
			MX6QDL_PAD_SD4_DAT2__SD4_DATA2		0x17059
			MX6QDL_PAD_SD4_DAT3__SD4_DATA3		0x17059
			MX6QDL_PAD_SD4_DAT4__SD4_DATA4		0x17059
			MX6QDL_PAD_SD4_DAT5__SD4_DATA5		0x17059
			MX6QDL_PAD_SD4_DAT6__SD4_DATA6		0x17059
			MX6QDL_PAD_SD4_DAT7__SD4_DATA7		0x17059
		>;
	};
};

&pwm1 {
	#pwm-cells = <2>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_pwm1>;
	status = "okay";
};

&pwm2 {
	#pwm-cells = <2>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_pwm2>;
	status = "okay";
};

&ssi1 {
	status = "okay";
};

&uart1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_uart1>;
	status = "okay";
};

&uart2 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_uart2>;
	uart-has-rtscts;
};

&usbh1 {
	status = "okay";
};

&usdhc2 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usdhc2>;
	bus-width = <4>;
	cd-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
	status = "okay";
};

&usdhc4 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usdhc4>;
	bus-width = <8>;
	non-removable;
	no-1-8-v;
	keep-power-in-suspend;
	status = "okay";
};

&wdog1 {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0
//
// Copyright (C) 2019 Logic PD, Inc.

/dts-v1/;
#include "imx6q.dtsi"
#include "imx6-logicpd-som.dtsi"
#include "imx6-logicpd-baseboard.dtsi"

/ {
	model = "Logic PD i.MX6QD SOM-M3";
	compatible = "logicpd,imx6q-logicpd", "fsl,imx6q";

	backlight: backlight-lvds {
		compatible = "pwm-backlight";
		pwms = <&pwm3 0 20000 0>;
		brightness-levels = <0 4 8 16 32 64 128 255>;
		default-brightness-level = <6>;
		power-supply = <&reg_lcd>;
	};

	panel-lvds0 {
		compatible = "okaya,rs800480t-7x0gp";
		power-supply = <&reg_lcd_reset>;
		backlight = <&backlight>;

		port {
			panel_in_lvds0: endpoint {
				remote-endpoint = <&lvds0_out>;
			};
		};
	};

	reg_lcd: regulator-lcd {
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_lcd_reg>;
		compatible = "regulator-fixed";
		regulator-name = "lcd_panel_pwr";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		gpio = <&gpio4 17 GPIO_ACTIVE_HIGH>;
		enable-active-high;
		vin-supply = <&reg_3v3>;
		startup-delay-us = <500000>;
	};

	reg_lcd_reset: regulator-lcd-reset {
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_lcd_reset>;
		compatible = "regulator-fixed";
		regulator-name = "nLCD_RESET";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		gpio = <&gpio5 2 GPIO_ACTIVE_HIGH>;
		enable-active-high;
		vin-supply = <&reg_lcd>;
	};
};

&clks {
	assigned-clocks = <&clks IMX6QDL_CLK_LDB_DI0_SEL>,
			  <&clks IMX6QDL_CLK_LDB_DI1_SEL>,
			  <&clks IMX6QDL_CLK_IPU1_DI0_PRE_SEL>,
			  <&clks IMX6QDL_CLK_IPU2_DI0_PRE_SEL>;
	assigned-clock-parents = <&clks IMX6QDL_CLK_PLL5_VIDEO_DIV>,
				 <&clks IMX6QDL_CLK_PLL5_VIDEO_DIV>,
				 <&clks IMX6QDL_CLK_PLL2_PFD2_396M>,
				 <&clks IMX6QDL_CLK_PLL2_PFD2_396M>;
};

&hdmi {
	ddc-i2c-bus = <&i2c3>;
	status = "okay";
};

&i2c1 {
	touchscreen@26 {
		compatible = "ilitek,ili2117";
		reg = <0x26>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_touchscreen>;
		interrupts-extended = <&gpio1 6 IRQ_TYPE_EDGE_RISING>;
	};
};

&ldb {
	status = "okay";

	lvds-channel@0 {
		fsl,data-mapping = "spwg";
		fsl,data-width = <24>;
		status = "okay";

		port@4 {
			reg = <4>;
			lvds0_out: endpoint {
				remote-endpoint = <&panel_in_lvds0>;
			};
		};
	};

};

&pwm3 {
	status = "okay";
};

&reg_hdmi {
	regulator-always-on;	/* Without this, the level shifter on HDMI doesn't turn on */
};

&iomuxc {
	pinctrl_lcd_reg: lcdreg {
		fsl,pins = <
			MX6QDL_PAD_DI0_PIN15__GPIO4_IO17	0x100b0	/* R_LCD_PANEL_PWR */
		>;
	};

	pinctrl_lcd_reset: lcdreset {
		fsl,pins = <
			MX6QDL_PAD_EIM_A25__GPIO5_IO02	0x100b0	/* LCD_nRESET */
		>;
	};

	pinctrl_touchscreen: touchscreengrp {
		fsl,pins = <
			MX6QDL_PAD_GPIO_6__GPIO1_IO06	0x1b0b0	/* TOUCH_nPINTDAV */
		>;
	};
};