code:
// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Copyright 2013 Rostislav Lisovy <lisovy@gmail.com>, PiKRON s.r.o.
 */

#include "imx53.dtsi"

/ {
	model = "Voipac i.MX53 X53-DMM-668";
	compatible = "voipac,imx53-dmm-668", "fsl,imx53";

	memory@70000000 {
		device_type = "memory";
		reg = <0x70000000 0x20000000>,
		      <0xb0000000 0x20000000>;
	};

	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;
		};

		reg_usb_vbus: regulator@1 {
			compatible = "regulator-fixed";
			reg = <1>;
			regulator-name = "usb_vbus";
			regulator-min-microvolt = <5000000>;
			regulator-max-microvolt = <5000000>;
			gpio = <&gpio3 31 0>; /* PEN */
			enable-active-high;
		};
	};
};

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

	imx53-voipac {
		pinctrl_hog: hoggrp {
			fsl,pins = <
				/* Make DA9053 regulator functional */
				MX53_PAD_GPIO_16__GPIO7_11	0x80000000
				/* FEC Power enable */
				MX53_PAD_GPIO_11__GPIO4_1	0x80000000
				/* FEC RST */
				MX53_PAD_GPIO_12__GPIO4_2	0x80000000
			>;
		};

		pinctrl_ecspi1: ecspi1grp {
			fsl,pins = <
				MX53_PAD_EIM_D16__ECSPI1_SCLK		0x80000000
				MX53_PAD_EIM_D17__ECSPI1_MISO		0x80000000
				MX53_PAD_EIM_D18__ECSPI1_MOSI		0x80000000
			>;
		};

		pinctrl_fec: fecgrp {
			fsl,pins = <
				MX53_PAD_FEC_MDC__FEC_MDC		0x80000000
				MX53_PAD_FEC_MDIO__FEC_MDIO		0x80000000
				MX53_PAD_FEC_REF_CLK__FEC_TX_CLK	0x80000000
				MX53_PAD_FEC_RX_ER__FEC_RX_ER		0x80000000
				MX53_PAD_FEC_CRS_DV__FEC_RX_DV		0x80000000
				MX53_PAD_FEC_RXD1__FEC_RDATA_1		0x80000000
				MX53_PAD_FEC_RXD0__FEC_RDATA_0		0x80000000
				MX53_PAD_FEC_TX_EN__FEC_TX_EN		0x80000000
				MX53_PAD_FEC_TXD1__FEC_TDATA_1		0x80000000
				MX53_PAD_FEC_TXD0__FEC_TDATA_0		0x80000000
			>;
		};

		pinctrl_i2c1: i2c1grp {
			fsl,pins = <
				MX53_PAD_EIM_D21__I2C1_SCL		0xc0000000
				MX53_PAD_EIM_D28__I2C1_SDA		0xc0000000
			>;
		};

		pinctrl_uart1: uart1grp {
			fsl,pins = <
				MX53_PAD_PATA_DIOW__UART1_TXD_MUX	0x1e4
				MX53_PAD_PATA_DMACK__UART1_RXD_MUX	0x1e4
			>;
		};

		pinctrl_nand: nandgrp {
			fsl,pins = <
				MX53_PAD_NANDF_WE_B__EMI_NANDF_WE_B	0x4
				MX53_PAD_NANDF_RE_B__EMI_NANDF_RE_B	0x4
				MX53_PAD_NANDF_CLE__EMI_NANDF_CLE	0x4
				MX53_PAD_NANDF_ALE__EMI_NANDF_ALE	0x4
				MX53_PAD_NANDF_WP_B__EMI_NANDF_WP_B	0xe0
				MX53_PAD_NANDF_RB0__EMI_NANDF_RB_0	0xe0
				MX53_PAD_NANDF_CS0__EMI_NANDF_CS_0	0x4
				MX53_PAD_PATA_DATA0__EMI_NANDF_D_0	0xa4
				MX53_PAD_PATA_DATA1__EMI_NANDF_D_1	0xa4
				MX53_PAD_PATA_DATA2__EMI_NANDF_D_2	0xa4
				MX53_PAD_PATA_DATA3__EMI_NANDF_D_3	0xa4
				MX53_PAD_PATA_DATA4__EMI_NANDF_D_4	0xa4
				MX53_PAD_PATA_DATA5__EMI_NANDF_D_5	0xa4
				MX53_PAD_PATA_DATA6__EMI_NANDF_D_6	0xa4
				MX53_PAD_PATA_DATA7__EMI_NANDF_D_7	0xa4
			>;
		};
	};
};

&ecspi1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_ecspi1>;
	cs-gpios = <&gpio2 30 GPIO_ACTIVE_LOW>, <&gpio3 19 GPIO_ACTIVE_LOW>,
		   <&gpio2 16 GPIO_ACTIVE_LOW>, <&gpio2 17 GPIO_ACTIVE_LOW>;
	status = "okay";
};

&fec {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_fec>;
	phy-mode = "rmii";
	phy-reset-gpios = <&gpio4 2 GPIO_ACTIVE_LOW>;
	status = "okay";
};

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

	pmic: dialog@48 {
		compatible = "dlg,da9053-aa", "dlg,da9052";
		reg = <0x48>;
		interrupt-parent = <&gpio7>;
		interrupts = <11 IRQ_TYPE_LEVEL_LOW>; /* low-level active IRQ at GPIO7_11 */

		regulators {
			buck1_reg: buck1 {
				regulator-name = "BUCKCORE";
				regulator-min-microvolt = <1200000>;
				regulator-max-microvolt = <1400000>;
				regulator-always-on;
			};

			buck2_reg: buck2 {
				regulator-name = "BUCKPRO";
				regulator-min-microvolt = <900000>;
				regulator-max-microvolt = <1350000>;
				regulator-always-on;
			};

			buck3_reg: buck3 {
				regulator-name = "BUCKMEM";
				regulator-min-microvolt = <1420000>;
				regulator-max-microvolt = <1580000>;
				regulator-always-on;
			};

			buck4_reg: buck4 {
				regulator-name = "BUCKPERI";
				regulator-min-microvolt = <2370000>;
				regulator-max-microvolt = <2630000>;
				regulator-always-on;
			};

			ldo1_reg: ldo1 {
				regulator-name = "ldo1_1v3";
				regulator-min-microvolt = <1250000>;
				regulator-max-microvolt = <1350000>;
				regulator-boot-on;
				regulator-always-on;
			};

			ldo2_reg: ldo2 {
				regulator-name = "ldo2_1v3";
				regulator-min-microvolt = <1250000>;
				regulator-max-microvolt = <1350000>;
				regulator-always-on;
			};

			ldo3_reg: ldo3 {
				regulator-name = "ldo3_3v3";
				regulator-min-microvolt = <3250000>;
				regulator-max-microvolt = <3350000>;
				regulator-always-on;
			};

			ldo4_reg: ldo4 {
				regulator-name = "ldo4_2v775";
				regulator-min-microvolt = <2770000>;
				regulator-max-microvolt = <2780000>;
				regulator-always-on;
			};

			ldo5_reg: ldo5 {
				regulator-name = "ldo5_3v3";
				regulator-min-microvolt = <3250000>;
				regulator-max-microvolt = <3350000>;
				regulator-always-on;
			};

			ldo6_reg: ldo6 {
				regulator-name = "ldo6_1v3";
				regulator-min-microvolt = <1250000>;
				regulator-max-microvolt = <1350000>;
				regulator-always-on;
			};

			ldo7_reg: ldo7 {
				regulator-name = "ldo7_2v75";
				regulator-min-microvolt = <2700000>;
				regulator-max-microvolt = <2800000>;
				regulator-always-on;
			};

			ldo8_reg: ldo8 {
				regulator-name = "ldo8_1v8";
				regulator-min-microvolt = <1750000>;
				regulator-max-microvolt = <1850000>;
				regulator-always-on;
			};

			ldo9_reg: ldo9 {
				regulator-name = "ldo9_1v5";
				regulator-min-microvolt = <1450000>;
				regulator-max-microvolt = <1550000>;
				regulator-always-on;
			};

			ldo10_reg: ldo10 {
				regulator-name = "ldo10_1v3";
				regulator-min-microvolt = <1250000>;
				regulator-max-microvolt = <1350000>;
				regulator-always-on;
			};
		};
	};
};

&nfc {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_nand>;
	nand-bus-width = <8>;
	nand-ecc-mode = "hw";
	status = "okay";
};

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

&usbh1 {
	vbus-supply = <&reg_usb_vbus>;
	phy_type = "utmi";
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0+
//
// Copyright 2011 Freescale Semiconductor, Inc.
// Copyright 2011 Linaro Ltd.

#include "imx53-pinfunc.h"
#include <dt-bindings/clock/imx5-clock.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>

/ {
	#address-cells = <1>;
	#size-cells = <1>;
	/*
	 * The decompressor and also some bootloaders rely on a
	 * pre-existing /chosen node to be available to insert the
	 * command line and merge other ATAGS info.
	 */
	chosen {};

	aliases {
		ethernet0 = &fec;
		gpio0 = &gpio1;
		gpio1 = &gpio2;
		gpio2 = &gpio3;
		gpio3 = &gpio4;
		gpio4 = &gpio5;
		gpio5 = &gpio6;
		gpio6 = &gpio7;
		i2c0 = &i2c1;
		i2c1 = &i2c2;
		i2c2 = &i2c3;
		ipu0 = &ipu;
		mmc0 = &esdhc1;
		mmc1 = &esdhc2;
		mmc2 = &esdhc3;
		mmc3 = &esdhc4;
		serial0 = &uart1;
		serial1 = &uart2;
		serial2 = &uart3;
		serial3 = &uart4;
		serial4 = &uart5;
		spi0 = &ecspi1;
		spi1 = &ecspi2;
		spi2 = &cspi;
	};

	cpus {
		#address-cells = <1>;
		#size-cells = <0>;
		cpu0: cpu@0 {
			device_type = "cpu";
			compatible = "arm,cortex-a8";
			reg = <0x0>;
			clocks = <&clks IMX5_CLK_ARM>;
			clock-latency = <61036>;
			voltage-tolerance = <5>;
			operating-points = <
				/* kHz */
				 166666  850000
				 400000  900000
				 800000 1050000
				1000000 1200000
				1200000 1300000
			>;
		};
	};

	display-subsystem {
		compatible = "fsl,imx-display-subsystem";
		ports = <&ipu_di0>, <&ipu_di1>;
	};

	capture_subsystem {
		compatible = "fsl,imx-capture-subsystem";
		ports = <&ipu_csi0>, <&ipu_csi1>;
	};

	tzic: tz-interrupt-controller@fffc000 {
		compatible = "fsl,imx53-tzic", "fsl,tzic";
		interrupt-controller;
		#interrupt-cells = <1>;
		reg = <0x0fffc000 0x4000>;
	};

	clocks {
		ckil {
			compatible = "fixed-clock";
			#clock-cells = <0>;
			clock-frequency = <32768>;
		};

		ckih1 {
			compatible = "fixed-clock";
			#clock-cells = <0>;
			clock-frequency = <22579200>;
		};

		ckih2 {
			compatible = "fixed-clock";
			#clock-cells = <0>;
			clock-frequency = <0>;
		};

		osc {
			compatible = "fixed-clock";
			#clock-cells = <0>;
			clock-frequency = <24000000>;
		};
	};

	pmu: pmu {
		compatible = "arm,cortex-a8-pmu";
		interrupt-parent = <&tzic>;
		interrupts = <77>;
	};

	usbphy0: usbphy-0 {
		compatible = "usb-nop-xceiv";
		clocks = <&clks IMX5_CLK_USB_PHY1_GATE>;
		clock-names = "main_clk";
		#phy-cells = <0>;
		status = "okay";
	};

	usbphy1: usbphy-1 {
		compatible = "usb-nop-xceiv";
		clocks = <&clks IMX5_CLK_USB_PHY2_GATE>;
		clock-names = "main_clk";
		#phy-cells = <0>;
		status = "okay";
	};

	soc: soc {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "simple-bus";
		interrupt-parent = <&tzic>;
		ranges;

		sata: sata@10000000 {
			compatible = "fsl,imx53-ahci";
			reg = <0x10000000 0x1000>;
			interrupts = <28>;
			clocks = <&clks IMX5_CLK_SATA_GATE>,
				 <&clks IMX5_CLK_SATA_REF>,
				 <&clks IMX5_CLK_AHB>;
			clock-names = "sata", "sata_ref", "ahb";
			status = "disabled";
		};

		ipu: ipu@18000000 {
			#address-cells = <1>;
			#size-cells = <0>;
			compatible = "fsl,imx53-ipu";
			reg = <0x18000000 0x08000000>;
			interrupts = <11 10>;
			clocks = <&clks IMX5_CLK_IPU_GATE>,
				 <&clks IMX5_CLK_IPU_DI0_GATE>,
				 <&clks IMX5_CLK_IPU_DI1_GATE>;
			clock-names = "bus", "di0", "di1";
			resets = <&src 2>;

			ipu_csi0: port@0 {
				reg = <0>;

				ipu_csi0_from_parallel_sensor: endpoint {
				};
			};

			ipu_csi1: port@1 {
				reg = <1>;

				ipu_csi1_from_parallel_sensor: endpoint {
				};
			};

			ipu_di0: port@2 {
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <2>;

				ipu_di0_disp0: endpoint@0 {
					reg = <0>;
				};

				ipu_di0_lvds0: endpoint@1 {
					reg = <1>;
					remote-endpoint = <&lvds0_in>;
				};
			};

			ipu_di1: port@3 {
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <3>;

				ipu_di1_disp1: endpoint@0 {
					reg = <0>;
				};

				ipu_di1_lvds1: endpoint@1 {
					reg = <1>;
					remote-endpoint = <&lvds1_in>;
				};

				ipu_di1_tve: endpoint@2 {
					reg = <2>;
					remote-endpoint = <&tve_in>;
				};
			};
		};

		gpu: gpu@30000000 {
			compatible = "amd,imageon-200.0", "amd,imageon";
			reg = <0x30000000 0x20000>;
			reg-names = "kgsl_3d0_reg_memory";
			interrupts = <12>;
			interrupt-names = "kgsl_3d0_irq";
			clocks = <&clks IMX5_CLK_GPU3D_GATE>, <&clks IMX5_CLK_GARB_GATE>;
			clock-names = "core_clk", "mem_iface_clk";
		};

		aips1: bus@50000000 { /* AIPS1 */
			compatible = "fsl,aips-bus", "simple-bus";
			#address-cells = <1>;
			#size-cells = <1>;
			reg = <0x50000000 0x10000000>;
			ranges;

			spba-bus@50000000 {
				compatible = "fsl,spba-bus", "simple-bus";
				#address-cells = <1>;
				#size-cells = <1>;
				reg = <0x50000000 0x40000>;
				ranges;

				esdhc1: mmc@50004000 {
					compatible = "fsl,imx53-esdhc";
					reg = <0x50004000 0x4000>;
					interrupts = <1>;
					clocks = <&clks IMX5_CLK_ESDHC1_IPG_GATE>,
						 <&clks IMX5_CLK_DUMMY>,
						 <&clks IMX5_CLK_ESDHC1_PER_GATE>;
					clock-names = "ipg", "ahb", "per";
					bus-width = <4>;
					status = "disabled";
				};

				esdhc2: mmc@50008000 {
					compatible = "fsl,imx53-esdhc";
					reg = <0x50008000 0x4000>;
					interrupts = <2>;
					clocks = <&clks IMX5_CLK_ESDHC2_IPG_GATE>,
						 <&clks IMX5_CLK_DUMMY>,
						 <&clks IMX5_CLK_ESDHC2_PER_GATE>;
					clock-names = "ipg", "ahb", "per";
					bus-width = <4>;
					status = "disabled";
				};

				uart3: serial@5000c000 {
					compatible = "fsl,imx53-uart", "fsl,imx21-uart";
					reg = <0x5000c000 0x4000>;
					interrupts = <33>;
					clocks = <&clks IMX5_CLK_UART3_IPG_GATE>,
						 <&clks IMX5_CLK_UART3_PER_GATE>;
					clock-names = "ipg", "per";
					dmas = <&sdma 42 4 0>, <&sdma 43 4 0>;
					dma-names = "rx", "tx";
					status = "disabled";
				};

				ecspi1: spi@50010000 {
					#address-cells = <1>;
					#size-cells = <0>;
					compatible = "fsl,imx53-ecspi", "fsl,imx51-ecspi";
					reg = <0x50010000 0x4000>;
					interrupts = <36>;
					clocks = <&clks IMX5_CLK_ECSPI1_IPG_GATE>,
						 <&clks IMX5_CLK_ECSPI1_PER_GATE>;
					clock-names = "ipg", "per";
					status = "disabled";
				};

				ssi2: ssi@50014000 {
					#sound-dai-cells = <0>;
					compatible = "fsl,imx53-ssi",
							"fsl,imx51-ssi",
							"fsl,imx21-ssi";
					reg = <0x50014000 0x4000>;
					interrupts = <30>;
					clocks = <&clks IMX5_CLK_SSI2_IPG_GATE>,
						 <&clks IMX5_CLK_SSI2_ROOT_GATE>;
					clock-names = "ipg", "baud";
					dmas = <&sdma 24 1 0>,
					       <&sdma 25 1 0>;
					dma-names = "rx", "tx";
					fsl,fifo-depth = <15>;
					status = "disabled";
				};

				esdhc3: mmc@50020000 {
					compatible = "fsl,imx53-esdhc";
					reg = <0x50020000 0x4000>;
					interrupts = <3>;
					clocks = <&clks IMX5_CLK_ESDHC3_IPG_GATE>,
						 <&clks IMX5_CLK_DUMMY>,
						 <&clks IMX5_CLK_ESDHC3_PER_GATE>;
					clock-names = "ipg", "ahb", "per";
					bus-width = <4>;
					status = "disabled";
				};

				esdhc4: mmc@50024000 {
					compatible = "fsl,imx53-esdhc";
					reg = <0x50024000 0x4000>;
					interrupts = <4>;
					clocks = <&clks IMX5_CLK_ESDHC4_IPG_GATE>,
						 <&clks IMX5_CLK_DUMMY>,
						 <&clks IMX5_CLK_ESDHC4_PER_GATE>;
					clock-names = "ipg", "ahb", "per";
					bus-width = <4>;
					status = "disabled";
				};
			};

			aipstz1: bridge@53f00000 {
				compatible = "fsl,imx53-aipstz";
				reg = <0x53f00000 0x60>;
			};

			usbotg: usb@53f80000 {
				compatible = "fsl,imx53-usb", "fsl,imx27-usb";
				reg = <0x53f80000 0x0200>;
				interrupts = <18>;
				clocks = <&clks IMX5_CLK_USBOH3_GATE>;
				fsl,usbmisc = <&usbmisc 0>;
				fsl,usbphy = <&usbphy0>;
				status = "disabled";
			};

			usbh1: usb@53f80200 {
				compatible = "fsl,imx53-usb", "fsl,imx27-usb";
				reg = <0x53f80200 0x0200>;
				interrupts = <14>;
				clocks = <&clks IMX5_CLK_USBOH3_GATE>;
				fsl,usbmisc = <&usbmisc 1>;
				fsl,usbphy = <&usbphy1>;
				dr_mode = "host";
				status = "disabled";
			};

			usbh2: usb@53f80400 {
				compatible = "fsl,imx53-usb", "fsl,imx27-usb";
				reg = <0x53f80400 0x0200>;
				interrupts = <16>;
				clocks = <&clks IMX5_CLK_USBOH3_GATE>;
				fsl,usbmisc = <&usbmisc 2>;
				dr_mode = "host";
				status = "disabled";
			};

			usbh3: usb@53f80600 {
				compatible = "fsl,imx53-usb", "fsl,imx27-usb";
				reg = <0x53f80600 0x0200>;
				interrupts = <17>;
				clocks = <&clks IMX5_CLK_USBOH3_GATE>;
				fsl,usbmisc = <&usbmisc 3>;
				dr_mode = "host";
				status = "disabled";
			};

			usbmisc: usbmisc@53f80800 {
				#index-cells = <1>;
				compatible = "fsl,imx53-usbmisc";
				reg = <0x53f80800 0x200>;
				clocks = <&clks IMX5_CLK_USBOH3_GATE>;
			};

			gpio1: gpio@53f84000 {
				compatible = "fsl,imx53-gpio", "fsl,imx35-gpio";
				reg = <0x53f84000 0x4000>;
				interrupts = <50 51>;
				gpio-controller;
				#gpio-cells = <2>;
				interrupt-controller;
				#interrupt-cells = <2>;
			};

			gpio2: gpio@53f88000 {
				compatible = "fsl,imx53-gpio", "fsl,imx35-gpio";
				reg = <0x53f88000 0x4000>;
				interrupts = <52 53>;
				gpio-controller;
				#gpio-cells = <2>;
				interrupt-controller;
				#interrupt-cells = <2>;
			};

			gpio3: gpio@53f8c000 {
				compatible = "fsl,imx53-gpio", "fsl,imx35-gpio";
				reg = <0x53f8c000 0x4000>;
				interrupts = <54 55>;
				gpio-controller;
				#gpio-cells = <2>;
				interrupt-controller;
				#interrupt-cells = <2>;
			};

			gpio4: gpio@53f90000 {
				compatible = "fsl,imx53-gpio", "fsl,imx35-gpio";
				reg = <0x53f90000 0x4000>;
				interrupts = <56 57>;
				gpio-controller;
				#gpio-cells = <2>;
				interrupt-controller;
				#interrupt-cells = <2>;
			};

			kpp: kpp@53f94000 {
				compatible = "fsl,imx53-kpp", "fsl,imx21-kpp";
				reg = <0x53f94000 0x4000>;
				interrupts = <60>;
				clocks = <&clks IMX5_CLK_DUMMY>;
				status = "disabled";
			};

			wdog1: watchdog@53f98000 {
				compatible = "fsl,imx53-wdt", "fsl,imx21-wdt";
				reg = <0x53f98000 0x4000>;
				interrupts = <58>;
				clocks = <&clks IMX5_CLK_DUMMY>;
			};

			wdog2: watchdog@53f9c000 {
				compatible = "fsl,imx53-wdt", "fsl,imx21-wdt";
				reg = <0x53f9c000 0x4000>;
				interrupts = <59>;
				clocks = <&clks IMX5_CLK_DUMMY>;
				status = "disabled";
			};

			gpt: timer@53fa0000 {
				compatible = "fsl,imx53-gpt", "fsl,imx31-gpt";
				reg = <0x53fa0000 0x4000>;
				interrupts = <39>;
				clocks = <&clks IMX5_CLK_GPT_IPG_GATE>,
					 <&clks IMX5_CLK_GPT_HF_GATE>;
				clock-names = "ipg", "per";
			};

			srtc: rtc@53fa4000 {
				compatible = "fsl,imx53-rtc";
				reg = <0x53fa4000 0x4000>;
				interrupts = <24>;
				clocks = <&clks IMX5_CLK_SRTC_GATE>;
			};

			iomuxc: iomuxc@53fa8000 {
				compatible = "fsl,imx53-iomuxc";
				reg = <0x53fa8000 0x4000>;
			};

			gpr: iomuxc-gpr@53fa8000 {
				compatible = "fsl,imx53-iomuxc-gpr", "syscon";
				reg = <0x53fa8000 0xc>;
			};

			ldb: ldb@53fa8008 {
				#address-cells = <1>;
				#size-cells = <0>;
				compatible = "fsl,imx53-ldb";
				reg = <0x53fa8008 0x4>;
				gpr = <&gpr>;
				clocks = <&clks IMX5_CLK_LDB_DI0_SEL>,
					 <&clks IMX5_CLK_LDB_DI1_SEL>,
					 <&clks IMX5_CLK_IPU_DI0_SEL>,
					 <&clks IMX5_CLK_IPU_DI1_SEL>,
					 <&clks IMX5_CLK_LDB_DI0_GATE>,
					 <&clks IMX5_CLK_LDB_DI1_GATE>;
				clock-names = "di0_pll", "di1_pll",
					      "di0_sel", "di1_sel",
					      "di0", "di1";
				status = "disabled";

				lvds-channel@0 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <0>;
					status = "disabled";

					port@0 {
						reg = <0>;

						lvds0_in: endpoint {
							remote-endpoint = <&ipu_di0_lvds0>;
						};
					};

					port@2 {
						reg = <2>;
					};
				};

				lvds-channel@1 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <1>;
					status = "disabled";

					port@1 {
						reg = <1>;

						lvds1_in: endpoint {
							remote-endpoint = <&ipu_di1_lvds1>;
						};
					};

					port@2 {
						reg = <2>;
					};
				};
			};

			pwm1: pwm@53fb4000 {
				#pwm-cells = <3>;
				compatible = "fsl,imx53-pwm", "fsl,imx27-pwm";
				reg = <0x53fb4000 0x4000>;
				clocks = <&clks IMX5_CLK_PWM1_IPG_GATE>,
					 <&clks IMX5_CLK_PWM1_HF_GATE>;
				clock-names = "ipg", "per";
				interrupts = <61>;
			};

			pwm2: pwm@53fb8000 {
				#pwm-cells = <3>;
				compatible = "fsl,imx53-pwm", "fsl,imx27-pwm";
				reg = <0x53fb8000 0x4000>;
				clocks = <&clks IMX5_CLK_PWM2_IPG_GATE>,
					 <&clks IMX5_CLK_PWM2_HF_GATE>;
				clock-names = "ipg", "per";
				interrupts = <94>;
			};

			uart1: serial@53fbc000 {
				compatible = "fsl,imx53-uart", "fsl,imx21-uart";
				reg = <0x53fbc000 0x4000>;
				interrupts = <31>;
				clocks = <&clks IMX5_CLK_UART1_IPG_GATE>,
					 <&clks IMX5_CLK_UART1_PER_GATE>;
				clock-names = "ipg", "per";
				dmas = <&sdma 18 4 0>, <&sdma 19 4 0>;
				dma-names = "rx", "tx";
				status = "disabled";
			};

			uart2: serial@53fc0000 {
				compatible = "fsl,imx53-uart", "fsl,imx21-uart";
				reg = <0x53fc0000 0x4000>;
				interrupts = <32>;
				clocks = <&clks IMX5_CLK_UART2_IPG_GATE>,
					 <&clks IMX5_CLK_UART2_PER_GATE>;
				clock-names = "ipg", "per";
				dmas = <&sdma 12 4 0>, <&sdma 13 4 0>;
				dma-names = "rx", "tx";
				status = "disabled";
			};

			can1: can@53fc8000 {
				compatible = "fsl,imx53-flexcan", "fsl,imx25-flexcan";
				reg = <0x53fc8000 0x4000>;
				interrupts = <82>;
				clocks = <&clks IMX5_CLK_CAN1_IPG_GATE>,
					 <&clks IMX5_CLK_CAN1_SERIAL_GATE>;
				clock-names = "ipg", "per";
				status = "disabled";
			};

			can2: can@53fcc000 {
				compatible = "fsl,imx53-flexcan", "fsl,imx25-flexcan";
				reg = <0x53fcc000 0x4000>;
				interrupts = <83>;
				clocks = <&clks IMX5_CLK_CAN2_IPG_GATE>,
					 <&clks IMX5_CLK_CAN2_SERIAL_GATE>;
				clock-names = "ipg", "per";
				status = "disabled";
			};

			src: reset-controller@53fd0000 {
				compatible = "fsl,imx53-src", "fsl,imx51-src";
				reg = <0x53fd0000 0x4000>;
				interrupts = <75>;
				#reset-cells = <1>;
			};

			clks: ccm@53fd4000{
				compatible = "fsl,imx53-ccm";
				reg = <0x53fd4000 0x4000>;
				interrupts = <0 71 0x04 0 72 0x04>;
				#clock-cells = <1>;
			};

			gpio5: gpio@53fdc000 {
				compatible = "fsl,imx53-gpio", "fsl,imx35-gpio";
				reg = <0x53fdc000 0x4000>;
				interrupts = <103 104>;
				gpio-controller;
				#gpio-cells = <2>;
				interrupt-controller;
				#interrupt-cells = <2>;
			};

			gpio6: gpio@53fe0000 {
				compatible = "fsl,imx53-gpio", "fsl,imx35-gpio";
				reg = <0x53fe0000 0x4000>;
				interrupts = <105 106>;
				gpio-controller;
				#gpio-cells = <2>;
				interrupt-controller;
				#interrupt-cells = <2>;
			};

			gpio7: gpio@53fe4000 {
				compatible = "fsl,imx53-gpio", "fsl,imx35-gpio";
				reg = <0x53fe4000 0x4000>;
				interrupts = <107 108>;
				gpio-controller;
				#gpio-cells = <2>;
				interrupt-controller;
				#interrupt-cells = <2>;
			};

			i2c3: i2c@53fec000 {
				#address-cells = <1>;
				#size-cells = <0>;
				compatible = "fsl,imx53-i2c", "fsl,imx21-i2c";
				reg = <0x53fec000 0x4000>;
				interrupts = <64>;
				clocks = <&clks IMX5_CLK_I2C3_GATE>;
				status = "disabled";
			};

			uart4: serial@53ff0000 {
				compatible = "fsl,imx53-uart", "fsl,imx21-uart";
				reg = <0x53ff0000 0x4000>;
				interrupts = <13>;
				clocks = <&clks IMX5_CLK_UART4_IPG_GATE>,
					 <&clks IMX5_CLK_UART4_PER_GATE>;
				clock-names = "ipg", "per";
				dmas = <&sdma 2 4 0>, <&sdma 3 4 0>;
				dma-names = "rx", "tx";
				status = "disabled";
			};
		};

		aips2: bus@60000000 {	/* AIPS2 */
			compatible = "fsl,aips-bus", "simple-bus";
			#address-cells = <1>;
			#size-cells = <1>;
			reg = <0x60000000 0x10000000>;
			ranges;

			aipstz2: bridge@63f00000 {
				compatible = "fsl,imx53-aipstz";
				reg = <0x63f00000 0x60>;
			};

			iim: efuse@63f98000 {
				compatible = "fsl,imx53-iim", "fsl,imx27-iim", "syscon";
				reg = <0x63f98000 0x4000>;
				interrupts = <69>;
				clocks = <&clks IMX5_CLK_IIM_GATE>;
			};

			uart5: serial@63f90000 {
				compatible = "fsl,imx53-uart", "fsl,imx21-uart";
				reg = <0x63f90000 0x4000>;
				interrupts = <86>;
				clocks = <&clks IMX5_CLK_UART5_IPG_GATE>,
					 <&clks IMX5_CLK_UART5_PER_GATE>;
				clock-names = "ipg", "per";
				dmas = <&sdma 16 4 0>, <&sdma 17 4 0>;
				dma-names = "rx", "tx";
				status = "disabled";
			};

			tigerp: tigerp@63fa0000 {
				compatible = "fsl,imx53-tigerp", "fsl,imx51-tigerp";
				reg = <0x63fa0000 0x28>;
			};

			owire: owire@63fa4000 {
				compatible = "fsl,imx53-owire", "fsl,imx21-owire";
				reg = <0x63fa4000 0x4000>;
				clocks = <&clks IMX5_CLK_OWIRE_GATE>;
				status = "disabled";
			};

			ecspi2: spi@63fac000 {
				#address-cells = <1>;
				#size-cells = <0>;
				compatible = "fsl,imx53-ecspi", "fsl,imx51-ecspi";
				reg = <0x63fac000 0x4000>;
				interrupts = <37>;
				clocks = <&clks IMX5_CLK_ECSPI2_IPG_GATE>,
					 <&clks IMX5_CLK_ECSPI2_PER_GATE>;
				clock-names = "ipg", "per";
				status = "disabled";
			};

			sdma: dma-controller@63fb0000 {
				compatible = "fsl,imx53-sdma", "fsl,imx35-sdma";
				reg = <0x63fb0000 0x4000>;
				interrupts = <6>;
				clocks = <&clks IMX5_CLK_SDMA_GATE>,
					 <&clks IMX5_CLK_AHB>;
				clock-names = "ipg", "ahb";
				#dma-cells = <3>;
				fsl,sdma-ram-script-name = "imx/sdma/sdma-imx53.bin";
			};

			cspi: spi@63fc0000 {
				#address-cells = <1>;
				#size-cells = <0>;
				compatible = "fsl,imx53-cspi", "fsl,imx35-cspi";
				reg = <0x63fc0000 0x4000>;
				interrupts = <38>;
				clocks = <&clks IMX5_CLK_CSPI_IPG_GATE>,
					 <&clks IMX5_CLK_CSPI_IPG_GATE>;
				clock-names = "ipg", "per";
				status = "disabled";
			};

			i2c2: i2c@63fc4000 {
				#address-cells = <1>;
				#size-cells = <0>;
				compatible = "fsl,imx53-i2c", "fsl,imx21-i2c";
				reg = <0x63fc4000 0x4000>;
				interrupts = <63>;
				clocks = <&clks IMX5_CLK_I2C2_GATE>;
				status = "disabled";
			};

			i2c1: i2c@63fc8000 {
				#address-cells = <1>;
				#size-cells = <0>;
				compatible = "fsl,imx53-i2c", "fsl,imx21-i2c";
				reg = <0x63fc8000 0x4000>;
				interrupts = <62>;
				clocks = <&clks IMX5_CLK_I2C1_GATE>;
				status = "disabled";
			};

			ssi1: ssi@63fcc000 {
				#sound-dai-cells = <0>;
				compatible = "fsl,imx53-ssi", "fsl,imx51-ssi",
						"fsl,imx21-ssi";
				reg = <0x63fcc000 0x4000>;
				interrupts = <29>;
				clocks = <&clks IMX5_CLK_SSI1_IPG_GATE>,
					 <&clks IMX5_CLK_SSI1_ROOT_GATE>;
				clock-names = "ipg", "baud";
				dmas = <&sdma 28 0 0>,
				       <&sdma 29 0 0>;
				dma-names = "rx", "tx";
				fsl,fifo-depth = <15>;
				status = "disabled";
			};

			audmux: audmux@63fd0000 {
				compatible = "fsl,imx53-audmux", "fsl,imx31-audmux";
				reg = <0x63fd0000 0x4000>;
				status = "disabled";
			};

			nfc: nand@63fdb000 {
				compatible = "fsl,imx53-nand";
				reg = <0x63fdb000 0x1000 0xf7ff0000 0x10000>;
				interrupts = <8>;
				clocks = <&clks IMX5_CLK_NFC_GATE>;
				status = "disabled";
			};

			ssi3: ssi@63fe8000 {
				#sound-dai-cells = <0>;
				compatible = "fsl,imx53-ssi", "fsl,imx51-ssi",
						"fsl,imx21-ssi";
				reg = <0x63fe8000 0x4000>;
				interrupts = <96>;
				clocks = <&clks IMX5_CLK_SSI3_IPG_GATE>,
					 <&clks IMX5_CLK_SSI3_ROOT_GATE>;
				clock-names = "ipg", "baud";
				dmas = <&sdma 46 0 0>,
				       <&sdma 47 0 0>;
				dma-names = "rx", "tx";
				fsl,fifo-depth = <15>;
				status = "disabled";
			};

			fec: ethernet@63fec000 {
				compatible = "fsl,imx53-fec", "fsl,imx25-fec";
				reg = <0x63fec000 0x4000>;
				interrupts = <87>;
				clocks = <&clks IMX5_CLK_FEC_GATE>,
					 <&clks IMX5_CLK_FEC_GATE>,
					 <&clks IMX5_CLK_FEC_GATE>;
				clock-names = "ipg", "ahb", "ptp";
				status = "disabled";
			};

			tve: tve@63ff0000 {
				compatible = "fsl,imx53-tve";
				reg = <0x63ff0000 0x1000>;
				interrupts = <92>;
				clocks = <&clks IMX5_CLK_TVE_GATE>,
					 <&clks IMX5_CLK_IPU_DI1_SEL>;
				clock-names = "tve", "di_sel";
				status = "disabled";

				port {
					tve_in: endpoint {
						remote-endpoint = <&ipu_di1_tve>;
					};
				};
			};

			vpu: vpu@63ff4000 {
				compatible = "fsl,imx53-vpu", "cnm,coda7541";
				reg = <0x63ff4000 0x1000>;
				interrupts = <9>;
				clocks = <&clks IMX5_CLK_VPU_REFERENCE_GATE>,
					 <&clks IMX5_CLK_VPU_GATE>;
				clock-names = "per", "ahb";
				resets = <&src 1>;
				iram = <&ocram>;
			};

			sahara: crypto@63ff8000 {
				compatible = "fsl,imx53-sahara";
				reg = <0x63ff8000 0x4000>;
				interrupts = <19 20>;
				clocks = <&clks IMX5_CLK_SAHARA_IPG_GATE>,
					 <&clks IMX5_CLK_SAHARA_IPG_GATE>;
				clock-names = "ipg", "ahb";
			};
		};

		ocram: sram@f8000000 {
			compatible = "mmio-sram";
			reg = <0xf8000000 0x20000>;
			clocks = <&clks IMX5_CLK_OCRAM>;
		};
	};
};

repo_name: angery/linux


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

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

		button-0 {
			gpios = <&pcf8575 0 GPIO_ACTIVE_LOW>;
			label = "btn0";
			linux,code = <KEY_WAKEUP>;
			debounce-interval = <10>;
			wakeup-source;
		};

		button-1 {
			gpios = <&pcf8575 1 GPIO_ACTIVE_LOW>;
			label = "btn1";
			linux,code = <KEY_WAKEUP>;
			debounce-interval = <10>;
			wakeup-source;
		};

		button-2 {
			gpios = <&pcf8575 2 GPIO_ACTIVE_LOW>;
			label = "btn2";
			linux,code = <KEY_WAKEUP>;
			debounce-interval = <10>;
			wakeup-source;
		};

		button-3 {
			gpios = <&pcf8575 3 GPIO_ACTIVE_LOW>;
			label = "btn3";
			linux,code = <KEY_WAKEUP>;
			debounce-interval = <10>;
			wakeup-source;
		};

	};

	leds {
		compatible = "gpio-leds";

		gen-led0 {
			label = "led0";
			pinctrl-names = "default";
			pinctrl-0 = <&pinctrl_led0>;
			gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "cpu0";
		};

		gen-led1 {
			label = "led1";
			gpios = <&pcf8575 8 GPIO_ACTIVE_HIGH>;
		};

		gen-led2 {
			label = "led2";
			gpios = <&pcf8575 9 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "heartbeat";
		};

		gen-led3 {
			label = "led3";
			gpios = <&pcf8575 10 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "default-on";
		};
	};

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

	reg_usb_h1_vbus: regulator-usb-h1-vbus {
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_reg_usb_h1_vbus>;
		compatible = "regulator-fixed";
		regulator-name = "usb_h1_vbus";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		gpio = <&gpio7 12 GPIO_ACTIVE_HIGH>;
		startup-delay-us = <70000>;
		enable-active-high;
	};

	reg_3v3: regulator-3v3 {
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_reg_3v3>;
		compatible = "regulator-fixed";
		regulator-name = "reg_3v3";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		gpio = <&gpio1 26 GPIO_ACTIVE_HIGH>;
		startup-delay-us = <70000>;
		enable-active-high;
		regulator-always-on;
	};

	reg_enet: regulator-ethernet {
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_reg_enet>;
		compatible = "regulator-fixed";
		regulator-name = "ethernet-supply";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		gpio = <&gpio3 31 GPIO_ACTIVE_HIGH>;
		startup-delay-us = <70000>;
		enable-active-high;
		vin-supply = <&sw4_reg>;
	};

	reg_audio: regulator-audio {
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_reg_audio>;
		compatible = "regulator-fixed";
		regulator-name = "3v3_aud";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		gpio = <&gpio1 29 GPIO_ACTIVE_HIGH>;
		enable-active-high;
		vin-supply = <&reg_3v3>;
	};

	reg_hdmi: regulator-hdmi {
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_reg_hdmi>;
		compatible = "regulator-fixed";
		regulator-name = "hdmi-supply";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		gpio = <&gpio3 20 GPIO_ACTIVE_HIGH>;
		enable-active-high;
		vin-supply = <&reg_3v3>;
	};

	reg_uart3: regulator-uart3 {
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_reg_uart3>;
		compatible = "regulator-fixed";
		regulator-name = "uart3-supply";
		gpio = <&gpio1 28 GPIO_ACTIVE_HIGH>;
		enable-active-high;
		regulator-always-on;
		vin-supply = <&reg_3v3>;
	};

	reg_1v8: regulator-1v8 {
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_reg_1v8>;
		compatible = "regulator-fixed";
		regulator-name = "1v8-supply";
		gpio = <&gpio3 30 GPIO_ACTIVE_HIGH>;
		enable-active-high;
		regulator-always-on;
		vin-supply = <&reg_3v3>;
	};

	reg_pcie: regulator-pcie {
		compatible = "regulator-fixed";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_reg_pcie>;
		regulator-name = "mpcie_3v3";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		gpio = <&gpio1 2 GPIO_ACTIVE_HIGH>;
		enable-active-high;
	};

	reg_mipi: regulator-mipi {
		compatible = "regulator-fixed";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_reg_mipi>;
		regulator-name = "mipi_pwr_en";
		regulator-min-microvolt = <2800000>;
		regulator-max-microvolt = <2800000>;
		gpio = <&gpio3 19 GPIO_ACTIVE_HIGH>;
		enable-active-high;
	};

	sound {
		compatible = "fsl,imx-audio-wm8962";
		model = "wm8962-audio";
		ssi-controller = <&ssi2>;
		audio-codec = <&wm8962>;
		audio-routing =
			"Headphone Jack", "HPOUTL",
			"Headphone Jack", "HPOUTR",
			"Ext Spk", "SPKOUTL",
			"Ext Spk", "SPKOUTR",
			"AMIC", "MICBIAS",
			"IN3R", "AMIC";
		mux-int-port = <2>;
		mux-ext-port = <4>;
	};
};

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

&ecspi1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_ecspi1>;
	cs-gpios = <&gpio4 9 GPIO_ACTIVE_LOW>;
	status = "disabled";
};

&fec {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_enet>;
	phy-mode = "rgmii-id";
	phy-reset-duration = <10>;
	phy-reset-gpios = <&gpio1 24 GPIO_ACTIVE_LOW>;
	phy-supply = <&reg_enet>;
	interrupt-parent = <&gpio1>;
	interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
	status = "okay";
};

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

	wm8962: audio-codec@1a {
		compatible = "wlf,wm8962";
		reg = <0x1a>;
		clocks = <&clks IMX6QDL_CLK_CKO>;
		DCVDD-supply = <&reg_audio>;
		DBVDD-supply = <&reg_audio>;
		AVDD-supply = <&reg_audio>;
		CPVDD-supply = <&reg_audio>;
		MICVDD-supply = <&reg_audio>;
		PLLVDD-supply = <&reg_audio>;
		SPKVDD1-supply = <&reg_audio>;
		SPKVDD2-supply = <&reg_audio>;
		gpio-cfg = <
			0x0000 /* 0:Default */
			0x0000 /* 1:Default */
			0x0000 /* 2:FN_DMICCLK */
			0x0000 /* 3:Default */
			0x0000 /* 4:FN_DMICCDAT */
			0x0000 /* 5:Default */
		>;
	};
};

&i2c3 {
	ov5640: camera@10 {
		compatible = "ovti,ov5640";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_ov5640>;
		reg = <0x10>;
		clocks = <&clks IMX6QDL_CLK_CKO>;
		clock-names = "xclk";
		DOVDD-supply = <&reg_mipi>;
		AVDD-supply = <&reg_mipi>;
		DVDD-supply = <&reg_mipi>;
		reset-gpios = <&gpio3 26 GPIO_ACTIVE_LOW>;
		powerdown-gpios = <&gpio3 27 GPIO_ACTIVE_HIGH>;

		port {
			ov5640_to_mipi_csi2: endpoint {
				remote-endpoint = <&mipi_csi2_in>;
				clock-lanes = <0>;
				data-lanes = <1 2>;
			};
		};
	};

	pcf8575: gpio@20 {
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_pcf8574>;
		compatible = "nxp,pcf8575";
		reg = <0x20>;
		interrupt-parent = <&gpio6>;
		interrupts = <31 IRQ_TYPE_EDGE_FALLING>;
		gpio-controller;
		#gpio-cells = <2>;
		interrupt-controller;
		#interrupt-cells = <2>;
		lines-initial-states = <0x0710>;
		wakeup-source;
	};
};

&ipu1_csi1_from_mipi_vc1 {
	clock-lanes = <0>;
	data-lanes = <1 2>;
};

&mipi_csi {
	status = "okay";

	port@0 {
		reg = <0>;

		mipi_csi2_in: endpoint {
			remote-endpoint = <&ov5640_to_mipi_csi2>;
			clock-lanes = <0>;
			data-lanes = <1 2>;
		};
	};
};

&pcie {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_pcie>;
	reset-gpio = <&gpio1 9 GPIO_ACTIVE_LOW>;
	vpcie-supply = <&reg_pcie>;
	status = "okay";
};

&pwm3 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_pwm3>;
};

&snvs_pwrkey {
	status = "okay";
};

&ssi2 {
	status = "okay";
};

&uart3 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_uart3>;
	status = "okay";
};

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

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

&usdhc2 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usdhc2>;
	pinctrl-1 = <&pinctrl_usdhc2_100mhz>;
	pinctrl-2 = <&pinctrl_usdhc2_200mhz>;
	vmmc-supply = <&reg_3v3>;
	no-1-8-v;
	keep-power-in-suspend;
	cd-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
	status = "okay";
};

&iomuxc {
	pinctrl_audmux: audmuxgrp {
		fsl,pins = <
			MX6QDL_PAD_DISP0_DAT20__AUD4_TXC  0x130b0
			MX6QDL_PAD_DISP0_DAT21__AUD4_TXD  0x110b0
			MX6QDL_PAD_DISP0_DAT22__AUD4_TXFS 0x130b0
			MX6QDL_PAD_DISP0_DAT23__AUD4_RXD  0x130b0
		>;
	};

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

	pinctrl_enet: enetgrp {
		fsl,pins = <
			MX6QDL_PAD_ENET_MDIO__ENET_MDIO		0x1b8b0
			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_ENET_REF_CLK__ENET_TX_CLK	0x100b0
			MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL	0x1b030
			MX6QDL_PAD_GPIO_16__ENET_REF_CLK	0x4001b0a8
			MX6QDL_PAD_RGMII_RXC__RGMII_RXC		0x1b030
			MX6QDL_PAD_RGMII_RD0__RGMII_RD0		0x13030
			MX6QDL_PAD_RGMII_RD1__RGMII_RD1		0x13030
			MX6QDL_PAD_RGMII_RD2__RGMII_RD2		0x1b030
			MX6QDL_PAD_RGMII_RD3__RGMII_RD3		0x1b030
			MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL	0x13030
			MX6QDL_PAD_ENET_CRS_DV__GPIO1_IO25	0x1b0b0	/* ENET_INT */
			MX6QDL_PAD_ENET_RX_ER__GPIO1_IO24	0x1b0b0	/* ETHR_nRST */
		>;
	};

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

	pinctrl_led0: led0grp {
	    fsl,pins = <
		MX6QDL_PAD_ENET_TXD0__GPIO1_IO30	0x1b0b0
	    >;
	};

	pinctrl_ov5640: ov5640grp {
		fsl,pins = <
			MX6QDL_PAD_EIM_D26__GPIO3_IO26	0x1b0b1
			MX6QDL_PAD_EIM_D27__GPIO3_IO27	0x1b0b1
		>;
	};

	pinctrl_pcf8574: pcf8575grp {
		fsl,pins = <
			MX6QDL_PAD_EIM_BCLK__GPIO6_IO31 0x1b0b0
		>;
	};

	pinctrl_pcie: pciegrp {
		fsl,pins = <
			MX6QDL_PAD_GPIO_8__GPIO1_IO08 0x1b0b0
			MX6QDL_PAD_GPIO_9__GPIO1_IO09 0x1b0b0
		>;
	};

	pinctrl_pwm3: pwm3grp {
	    fsl,pins = <
		MX6QDL_PAD_SD4_DAT1__PWM3_OUT		0x1b0b1
	    >;
	};

	pinctrl_reg_1v8: reg1v8grp {
	    fsl,pins = <
		MX6QDL_PAD_EIM_D30__GPIO3_IO30		0x1b0b0
	    >;
	};

	pinctrl_reg_3v3: reg3v3grp {
	    fsl,pins = <
		MX6QDL_PAD_ENET_RXD1__GPIO1_IO26	0x1b0b0
	    >;
	};

	pinctrl_reg_audio: reg-audiogrp {
		fsl,pins = <
			MX6QDL_PAD_ENET_TXD1__GPIO1_IO29 0x1b0b0
		>;
	};

	pinctrl_reg_enet: reg-enetgrp {
		fsl,pins = <
			MX6QDL_PAD_EIM_D31__GPIO3_IO31	0x1b0b0
		>;
	};

	pinctrl_reg_hdmi: reg-hdmigrp {
		fsl,pins = <
			MX6QDL_PAD_EIM_D20__GPIO3_IO20	0x1b0b0
		>;
	};

	pinctrl_reg_mipi: reg-mipigrp {
		fsl,pins = <MX6QDL_PAD_EIM_D19__GPIO3_IO19 0x1b0b1>;
	};

	pinctrl_reg_pcie: reg-pciegrp {
		fsl,pins = <
			MX6QDL_PAD_GPIO_2__GPIO1_IO02	0x1b0b0
			>;
	};

	pinctrl_reg_uart3: reguart3grp {
	    fsl,pins = <
		MX6QDL_PAD_ENET_TX_EN__GPIO1_IO28	0x1b0b0
	    >;
	};

	pinctrl_reg_usb_h1_vbus: usbh1grp {
		fsl,pins = <
			MX6QDL_PAD_GPIO_17__GPIO7_IO12		0x1b0b0
		>;
	};

	pinctrl_reg_usb_otg: reg-usb-otggrp {
		fsl,pins = <
			MX6QDL_PAD_KEY_ROW4__GPIO4_IO15		0x1b0b0
		>;
	};

	pinctrl_uart3: uart3grp {
		fsl,pins = <
			MX6QDL_PAD_EIM_D23__UART3_CTS_B		0x1b0b1
			MX6QDL_PAD_EIM_D24__UART3_TX_DATA	0x1b0b1
			MX6QDL_PAD_EIM_D25__UART3_RX_DATA	0x1b0b1
			MX6QDL_PAD_EIM_EB3__UART3_RTS_B		0x1b0b1
		>;
	};

	pinctrl_usbotg: usbotggrp {
		fsl,pins = <
			MX6QDL_PAD_GPIO_1__USB_OTG_ID	0xd17059
		>;
	};

	pinctrl_usdhc2: usdhc2grp {
		fsl,pins = <
			MX6QDL_PAD_GPIO_4__GPIO1_IO04		0x1b0b0	/* CD */
			MX6QDL_PAD_SD2_CMD__SD2_CMD		0x17069
			MX6QDL_PAD_SD2_CLK__SD2_CLK		0x10069
			MX6QDL_PAD_SD2_DAT0__SD2_DATA0		0x17069
			MX6QDL_PAD_SD2_DAT1__SD2_DATA1		0x17069
			MX6QDL_PAD_SD2_DAT2__SD2_DATA2		0x17069
			MX6QDL_PAD_SD2_DAT3__SD2_DATA3		0x17069
		>;
	};

	pinctrl_usdhc2_100mhz: h100-usdhc2-100mhz {
		fsl,pins = <
			MX6QDL_PAD_GPIO_4__GPIO1_IO04		0x1b0b0	/* CD */
			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
		>;
	};

	pinctrl_usdhc2_200mhz: h100-usdhc2-200mhz {
		fsl,pins = <
			MX6QDL_PAD_GPIO_4__GPIO1_IO04		0x1b0b0	/* CD */
			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
		>;
	};

};


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

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>

/ {
	chosen {
		stdout-path = &uart1;
	};

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

	reg_wl18xx_vmmc: regulator-wl18xx {
		compatible = "regulator-fixed";
		regulator-name = "vwl1837";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		gpio = <&gpio7 0 GPIO_ACTIVE_HIGH>;
		startup-delay-us = <70000>;
		enable-active-high;
	};
};

&clks {
	assigned-clocks = <&clks IMX6QDL_CLK_LDB_DI0_SEL>,
			  <&clks IMX6QDL_CLK_LDB_DI1_SEL>;
	assigned-clock-parents = <&clks IMX6QDL_CLK_PLL3_USB_OTG>,
				 <&clks IMX6QDL_CLK_PLL3_USB_OTG>;
};

&gpmi {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_gpmi_nand>;
	nand-on-flash-bbt;
	status = "okay";
};

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

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

		regulators {
			sw1a_reg: sw1ab {
				regulator-min-microvolt = <725000>;
				regulator-max-microvolt = <1450000>;
				regulator-name = "vddcore";
				regulator-boot-on;
				regulator-always-on;
				regulator-ramp-delay = <6250>;
			};

			sw1c_reg: sw1c {
				regulator-min-microvolt = <725000>;
				regulator-max-microvolt = <1450000>;
				regulator-name = "vddsoc";
				regulator-boot-on;
				regulator-always-on;
				regulator-ramp-delay = <6250>;
			};

			sw2_reg: sw2 {
				regulator-min-microvolt = <3300000>;
				regulator-max-microvolt = <3300000>;
				regulator-name = "gen_3v3";
				regulator-boot-on;
			};

			sw3a_reg: sw3a {
				regulator-min-microvolt = <1350000>;
				regulator-max-microvolt = <1350000>;
				regulator-name = "sw3a_vddr";
				regulator-boot-on;
				regulator-always-on;
			};

			sw3b_reg: sw3b {
				regulator-min-microvolt = <1350000>;
				regulator-max-microvolt = <1350000>;
				regulator-name = "sw3b_vddr";
				regulator-boot-on;
				regulator-always-on;
			};

			sw4_reg: sw4 {
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <3300000>;
				regulator-name = "gen_rgmii";
			};

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

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

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

			vgen1_reg: vgen1 {
				regulator-min-microvolt = <1500000>;
				regulator-max-microvolt = <1500000>;
				regulator-name = "gen_1v5";
			};

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

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

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

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

			vgen6_reg: vgen6 {
				regulator-name = "gen_2v5";
				regulator-min-microvolt = <2500000>;
				regulator-max-microvolt = <2500000>;
				regulator-always-on;
			};

			coin_reg: coin {
				regulator-min-microvolt = <2500000>;
				regulator-max-microvolt = <3000000>;
				regulator-always-on;
			};
		};
	};

	temperature-sensor@49 {
		compatible = "ti,tmp102";
		reg = <0x49>;
		interrupt-parent = <&gpio6>;
		interrupts = <15 IRQ_TYPE_LEVEL_LOW>;
		#thermal-sensor-cells = <1>;
	};

	temperature-sensor@4a {
		compatible = "ti,tmp102";
		reg = <0x4a>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_tempsense>;
		interrupt-parent = <&gpio6>;
		interrupts = <15 IRQ_TYPE_LEVEL_LOW>;
		#thermal-sensor-cells = <1>;
	};

	eeprom@51 {
		compatible = "atmel,24c64";
		pagesize = <32>;
		read-only;	/* Manufacturing EEPROM programmed at factory */
		reg = <0x51>;
	};

	eeprom@52 {
		compatible = "atmel,24c64";
		pagesize = <32>;
		reg = <0x52>;
	};
};

/* Reroute power feeding the CPU to come from the external PMIC */
&reg_arm
{
	vin-supply = <&sw1a_reg>;
};

&reg_soc
{
	vin-supply = <&sw1c_reg>;
};

&snvs_poweroff {
	status = "okay";
};

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

	pinctrl_gpmi_nand: gpmi-nandgrp {
		fsl,pins = <
			MX6QDL_PAD_NANDF_CLE__NAND_CLE		0x0b0b1
			MX6QDL_PAD_NANDF_ALE__NAND_ALE		0x0b0b1
			MX6QDL_PAD_NANDF_WP_B__NAND_WP_B	0x0b0b1
			MX6QDL_PAD_NANDF_RB0__NAND_READY_B	0x0b000
			MX6QDL_PAD_NANDF_CS0__NAND_CE0_B	0x0b0b1
			MX6QDL_PAD_SD4_CMD__NAND_RE_B		0x0b0b1
			MX6QDL_PAD_SD4_CLK__NAND_WE_B		0x0b0b1
			MX6QDL_PAD_NANDF_D0__NAND_DATA00	0x0b0b1
			MX6QDL_PAD_NANDF_D1__NAND_DATA01	0x0b0b1
			MX6QDL_PAD_NANDF_D2__NAND_DATA02	0x0b0b1
			MX6QDL_PAD_NANDF_D3__NAND_DATA03	0x0b0b1
			MX6QDL_PAD_NANDF_D4__NAND_DATA04	0x0b0b1
			MX6QDL_PAD_NANDF_D5__NAND_DATA05	0x0b0b1
			MX6QDL_PAD_NANDF_D6__NAND_DATA06	0x0b0b1
			MX6QDL_PAD_NANDF_D7__NAND_DATA07	0x0b0b1
		>;
	};

	pinctrl_hog: hoggrp {
		fsl,pins = <	/* Enable ARM Debugger */
			MX6QDL_PAD_CSI0_MCLK__ARM_TRACE_CTL	0x1b0b0
			MX6QDL_PAD_CSI0_PIXCLK__ARM_EVENTO	0x1b0b0
			MX6QDL_PAD_CSI0_VSYNC__ARM_TRACE00	0x1b0b0
			MX6QDL_PAD_CSI0_DATA_EN__ARM_TRACE_CLK	0x1b0b0
			MX6QDL_PAD_CSI0_DAT4__ARM_TRACE01	0x1b0b0
			MX6QDL_PAD_CSI0_DAT5__ARM_TRACE02	0x1b0b0
			MX6QDL_PAD_CSI0_DAT6__ARM_TRACE03	0x1b0b0
			MX6QDL_PAD_CSI0_DAT7__ARM_TRACE04	0x1b0b0
			MX6QDL_PAD_CSI0_DAT8__ARM_TRACE05	0x1b0b0
			MX6QDL_PAD_CSI0_DAT9__ARM_TRACE06	0x1b0b0
			MX6QDL_PAD_CSI0_DAT10__ARM_TRACE07	0x1b0b0
			MX6QDL_PAD_CSI0_DAT11__ARM_TRACE08	0x1b0b0
			MX6QDL_PAD_CSI0_DAT12__ARM_TRACE09	0x1b0b0
			MX6QDL_PAD_CSI0_DAT13__ARM_TRACE10	0x1b0b0
			MX6QDL_PAD_CSI0_DAT14__ARM_TRACE11	0x1b0b0
			MX6QDL_PAD_CSI0_DAT15__ARM_TRACE12	0x1b0b0
			MX6QDL_PAD_CSI0_DAT16__ARM_TRACE13	0x1b0b0
			MX6QDL_PAD_CSI0_DAT17__ARM_TRACE14	0x1b0b0
			MX6QDL_PAD_CSI0_DAT18__ARM_TRACE15	0x1b0b0
			MX6QDL_PAD_GPIO_0__CCM_CLKO1        0x130b0
		>;
	};

	pinctrl_i2c3: i2c3grp {
		fsl,pins = <
			MX6QDL_PAD_EIM_D17__I2C3_SCL		0x4001b8b1
			MX6QDL_PAD_EIM_D18__I2C3_SDA		0x4001b8b1
		>;
	};

	pinctrl_tempsense: tempsensegrp {
		fsl,pins = <
			MX6QDL_PAD_NANDF_CS2__GPIO6_IO15 0x1b0b0
		>;
	};

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

	pinctrl_uart2: uart2grp {
		fsl,pins = <
			MX6QDL_PAD_SD3_RST__GPIO7_IO08		0x13059	/* BT_EN */
			MX6QDL_PAD_SD4_DAT4__UART2_RX_DATA	0x1b0b1
			MX6QDL_PAD_SD4_DAT5__UART2_RTS_B	0x1b0b1
			MX6QDL_PAD_SD4_DAT6__UART2_CTS_B	0x1b0b1
			MX6QDL_PAD_SD4_DAT7__UART2_TX_DATA	0x1b0b1
		>;
	};

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

	pinctrl_usdhc3: usdhc3grp {
		fsl,pins = <
			MX6QDL_PAD_SD3_CMD__SD3_CMD    0x17049
			MX6QDL_PAD_SD3_CLK__SD3_CLK    0x10049
			MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x17049
			MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x17049
			MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x17049
			MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x17049
			MX6QDL_PAD_SD3_DAT4__GPIO7_IO01	0x130b0 /* WL_IRQ */
			MX6QDL_PAD_SD3_DAT5__GPIO7_IO00	0x17059 /* WLAN_EN */
		>;
	};
};

&snvs_poweroff {
	status = "okay";
};

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

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

	bluetooth {
		compatible = "ti,wl1837-st";
		enable-gpios = <&gpio7 8 GPIO_ACTIVE_HIGH>;
	};
};

&usdhc1 {
	pinctrl-names = "default", "state_100mhz", "state_200mhz";
	pinctrl-0 = <&pinctrl_usdhc1>;
	non-removable;
	keep-power-in-suspend;
	wakeup-source;
	vmmc-supply = <&sw2_reg>;
	status = "okay";
};

&usdhc3 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usdhc3>;
	non-removable;
	cap-power-off-card;
	keep-power-in-suspend;
	wakeup-source;
	vmmc-supply = <&reg_wl18xx_vmmc>;
	#address-cells = <1>;
	#size-cells = <0>;
	status = "okay";

	wlcore: wlcore@2 {
		  compatible = "ti,wl1837";
		  reg = <2>;
		  interrupt-parent = <&gpio7>;
		  interrupts = <1 IRQ_TYPE_LEVEL_HIGH>;
		  tcxo-clock-frequency = <26000000>;
	};
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright (c) 2016 Protonic Holland
 * Copyright (c) 2020 Oleksij Rempel <kernel@pengutronix.de>, Pengutronix
 */

/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/sound/fsl-imx-audmux.h>
#include "imx6dl.dtsi"

/ {
	model = "Altesco I6P Board";
	compatible = "alt,alti6p", "fsl,imx6dl";

	chosen {
		stdout-path = &uart4;
	};

	clock_ksz8081: clock-ksz8081 {
		compatible = "fixed-clock";
		#clock-cells = <0>;
		clock-frequency = <50000000>;
	};

	i2c2-mux {
		compatible = "i2c-mux";
		i2c-parent = <&i2c2>;
		mux-controls = <&i2c_mux>;
		#address-cells = <1>;
		#size-cells = <0>;

		i2c@1 {
			reg = <1>;
			#address-cells = <1>;
			#size-cells = <0>;
		};

		i2c@2 {
			reg = <2>;
			#address-cells = <1>;
			#size-cells = <0>;
		};
	};

	i2c4-mux {
		compatible = "i2c-mux";
		i2c-parent = <&i2c4>;
		mux-controls = <&i2c_mux>;
		#address-cells = <1>;
		#size-cells = <0>;

		i2c@1 {
			reg = <1>;
			#address-cells = <1>;
			#size-cells = <0>;
		};

		i2c@2 {
			reg = <2>;
			#address-cells = <1>;
			#size-cells = <0>;
		};
	};

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

		led-debug0 {
			function = LED_FUNCTION_STATUS;
			gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "heartbeat";
		};

		led-debug1 {
			function = LED_FUNCTION_SD;
			gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "disk-activity";
		};
	};

	i2c_mux: mux-controller {
		compatible = "gpio-mux";
		#mux-control-cells = <0>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_i2cmux>;

		mux-gpios = <&gpio5 10 GPIO_ACTIVE_HIGH>,
			    <&gpio5 11 GPIO_ACTIVE_HIGH>;
	};

	reg_1v8: regulator-1v8 {
		compatible = "regulator-fixed";
		regulator-name = "1v8";
		regulator-min-microvolt = <1800000>;
		regulator-max-microvolt = <1800000>;
	};

	reg_3v3: regulator-3v3 {
		compatible = "regulator-fixed";
		regulator-name = "3v3";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
	};

	reg_5v0: regulator-5v0 {
		compatible = "regulator-fixed";
		regulator-name = "5v0";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
	};

	reg_h1_vbus: regulator-h1-vbus {
		compatible = "regulator-fixed";
		regulator-name = "h1-vbus";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		gpio = <&gpio1 0 GPIO_ACTIVE_HIGH>;
		enable-active-high;
	};

	reg_otg_vbus: regulator-otg-vbus {
		compatible = "regulator-fixed";
		regulator-name = "otg-vbus";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>;
		enable-active-high;
	};

	sound {
		compatible = "simple-audio-card";
		simple-audio-card,name = "prti6q-sgtl5000";
		simple-audio-card,format = "i2s";
		simple-audio-card,widgets =
			"Microphone", "Microphone Jack",
			"Line", "Line In Jack",
			"Headphone", "Headphone Jack",
			"Speaker", "External Speaker";
		simple-audio-card,routing =
			"MIC_IN", "Microphone Jack",
			"LINE_IN", "Line In Jack",
			"Headphone Jack", "HP_OUT",
			"External Speaker", "LINE_OUT";

		simple-audio-card,cpu {
			sound-dai = <&ssi1>;
			system-clock-frequency = <0>;
		};

		simple-audio-card,codec {
			sound-dai = <&sgtl5000>;
			bitclock-master;
			frame-master;
		};
	};
};

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

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

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

&can1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_can1>;
	xceiver-supply = <&reg_5v0>;
	status = "okay";
};

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

	flash@0 {
		compatible = "jedec,spi-nor";
		reg = <0>;
		spi-max-frequency = <20000000>;
	};
};

&fec {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_enet>;
	phy-mode = "rmii";
	clocks = <&clks IMX6QDL_CLK_ENET>,
		 <&clks IMX6QDL_CLK_ENET>,
		 <&clock_ksz8081>;
	clock-names = "ipg", "ahb", "ptp";
	status = "okay";

	mdio {
		#address-cells = <1>;
		#size-cells = <0>;

		/* Microchip KSZ8081RNA PHY */
		rgmii_phy: ethernet-phy@0 {
			reg = <0>;
			interrupts-extended = <&gpio4 30 IRQ_TYPE_LEVEL_LOW>;
			reset-gpios = <&gpio4 26 GPIO_ACTIVE_LOW>;
			reset-assert-us = <10000>;
			reset-deassert-us = <300>;
		};
	};
};

&gpio1 {
	gpio-line-names =
		"", "SD1_CD", "", "USB_H1_OC", "", "", "", "",
		"DEBUG_0", "DEBUG_1", "", "", "", "", "", "",
		"", "", "", "", "", "", "", "",
		"", "", "", "", "", "", "", "";
};

&gpio3 {
	gpio-line-names =
		"", "", "", "", "", "", "", "",
		"", "", "", "", "", "", "", "",
		"", "", "", "ECSPI1_SS1", "", "USB_EXT1_OC", "USB_EXT1_PWR", "",
		"", "", "", "", "", "", "", "";
};

&gpio4 {
	gpio-line-names =
		"", "", "", "", "", "", "", "",
		"", "", "", "", "", "", "", "",
		"", "", "", "", "", "", "", "",
		"", "", "ETH_RESET", "", "", "BUZZER", "ETH_INTRP", "";
};

&gpio5 {
	gpio-line-names =
		"", "", "", "", "", "", "", "",
		"", "", "I2C_EN13", "I2C_EN24", "", "", "", "",
		"", "", "", "", "", "AUDIO_RESET", "", "",
		"", "", "", "", "", "", "", "";
};

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

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

	sgtl5000: audio-codec@a {
		compatible = "fsl,sgtl5000";
		reg = <0xa>;
		#sound-dai-cells = <0>;
		clocks = <&clks 201>;
		VDDA-supply = <&reg_3v3>;
		VDDIO-supply = <&reg_3v3>;
		VDDD-supply = <&reg_1v8>;
	};

	/* additional i2c devices are added automatically by the boot loader */
};

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

	/* external interface, device are configured from user space */
};

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

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

	temperature-sensor@70 {
		compatible = "ti,tmp103";
		reg = <0x70>;
	};
};

&i2c4 {
	clock-frequency = <50000>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_i2c4>;
	status = "okay";
};

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

&ssi1 {
	#sound-dai-cells = <0>;
	fsl,mode = "ac97-slave";
	status = "okay";
};

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

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

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

&usbh1 {
	vbus-supply = <&reg_h1_vbus>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usbh1>;
	phy_type = "utmi";
	dr_mode = "host";
	status = "okay";
};

&usbotg {
	vbus-supply = <&reg_otg_vbus>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usbotg>;
	phy_type = "utmi";
	dr_mode = "host";
	status = "okay";
};

&usdhc1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usdhc1>;
	cd-gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
	no-1-8-v;
	disable-wp;
	cap-sd-highspeed;
	no-mmc;
	no-sdio;
	status = "okay";
};

&usdhc3 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usdhc3>;
	bus-width = <8>;
	no-1-8-v;
	non-removable;
	no-sd;
	no-sdio;
	status = "okay";
};

&iomuxc {
	pinctrl_audmux: audmuxgrp {
		fsl,pins = <
			MX6QDL_PAD_CSI0_MCLK__CCM_CLKO1			0x030b0
			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_can1: can1grp {
		fsl,pins = <
			MX6QDL_PAD_KEY_ROW2__FLEXCAN1_RX		0x1b000
			MX6QDL_PAD_KEY_COL2__FLEXCAN1_TX		0x3008
		>;
	};

	pinctrl_ecspi1: ecspi1grp {
		fsl,pins = <
			MX6QDL_PAD_EIM_D17__ECSPI1_MISO			0x1b000
			MX6QDL_PAD_EIM_D18__ECSPI1_MOSI			0x3008
			MX6QDL_PAD_EIM_D16__ECSPI1_SCLK			0x3008
			/* CS */
			MX6QDL_PAD_EIM_D19__GPIO3_IO19			0x3008
		>;
	};

	pinctrl_enet: enetgrp {
		fsl,pins = <
			/* MX6QDL_ENET_PINGRP4 */
			MX6QDL_PAD_ENET_MDC__ENET_MDC			0x1b0b0
			MX6QDL_PAD_ENET_MDIO__ENET_MDIO			0x1b0b0
			MX6QDL_PAD_ENET_RXD0__ENET_RX_DATA0		0x1b0b0
			MX6QDL_PAD_ENET_RXD1__ENET_RX_DATA1		0x1b0b0
			MX6QDL_PAD_ENET_RX_ER__ENET_RX_ER		0x1b0b0
			MX6QDL_PAD_ENET_TX_EN__ENET_TX_EN		0x1b0b0
			MX6QDL_PAD_ENET_TXD0__ENET_TX_DATA0		0x1b0b0
			MX6QDL_PAD_ENET_TXD1__ENET_TX_DATA1		0x1b0b0
			MX6QDL_PAD_ENET_CRS_DV__ENET_RX_EN		0x1b0b0

			MX6QDL_PAD_GPIO_16__ENET_REF_CLK		0x1b0b0
			/* Phy reset */
			MX6QDL_PAD_DISP0_DAT5__GPIO4_IO26		0x1b0b0
			/* nINTRP */
			MX6QDL_PAD_DISP0_DAT9__GPIO4_IO30		0x1b0b0
		>;
	};

	pinctrl_hdmi: hdmigrp {
		fsl,pins = <
			/* NOTE: DDC is done via I2C2, so DON'T configure DDC
			 * pins for HDMI!
			 */
			MX6QDL_PAD_EIM_A25__HDMI_TX_CEC_LINE		0x1f8b0
		>;
	};

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

	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_6__I2C3_SDA			0x4001b8b1
		>;
	};

	pinctrl_i2c4: i2c4grp {
		fsl,pins = <
			MX6QDL_PAD_NANDF_CS3__I2C4_SDA			0x4001f8b1
			MX6QDL_PAD_NANDF_WP_B__I2C4_SCL			0x4001f8b1
		>;
	};

	pinctrl_i2cmux: i2cmuxgrp {
		fsl,pins = <
			MX6QDL_PAD_DISP0_DAT16__GPIO5_IO10		0x1b0b0
			MX6QDL_PAD_DISP0_DAT17__GPIO5_IO11		0x1b0b0
		>;
	};

	pinctrl_leds: ledsgrp {
		fsl,pins = <
			MX6QDL_PAD_GPIO_8__GPIO1_IO08			0x1b0b0
			MX6QDL_PAD_GPIO_9__GPIO1_IO09			0x1b0b0
		>;
	};

	pinctrl_pwm1: pwm1grp {
		fsl,pins = <
			MX6QDL_PAD_DISP0_DAT8__PWM1_OUT			0x8
		>;
	};

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

	pinctrl_uart4: uart4grp {
		fsl,pins = <
			MX6QDL_PAD_KEY_COL0__UART4_TX_DATA		0x1b0b1
			MX6QDL_PAD_KEY_ROW0__UART4_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_usbh1: usbh1grp {
		fsl,pins = <
			MX6QDL_PAD_GPIO_3__USB_H1_OC			0x1B058
			MX6QDL_PAD_GPIO_0__GPIO1_IO00			0x1B058

		>;
	};

	pinctrl_usbotg: usbotggrp {
		fsl,pins = <
			MX6QDL_PAD_EIM_D21__USB_OTG_OC			0x1b0b0
			MX6QDL_PAD_EIM_D22__GPIO3_IO22			0x1b0b0
		>;
	};

	pinctrl_usdhc1: usdhc1grp {
		fsl,pins = <
			MX6QDL_PAD_SD1_CMD__SD1_CMD			0x170f9
			MX6QDL_PAD_SD1_CLK__SD1_CLK			0x100f9
			MX6QDL_PAD_SD1_DAT0__SD1_DATA0			0x170f9
			MX6QDL_PAD_SD1_DAT1__SD1_DATA1			0x170f9
			MX6QDL_PAD_SD1_DAT2__SD1_DATA2			0x170f9
			MX6QDL_PAD_SD1_DAT3__SD1_DATA3			0x170f9
			MX6QDL_PAD_GPIO_1__GPIO1_IO01			0x1b0b0
		>;
	};

	pinctrl_usdhc3: usdhc3grp {
		fsl,pins = <
			MX6QDL_PAD_SD3_CMD__SD3_CMD			0x17099
			MX6QDL_PAD_SD3_CLK__SD3_CLK			0x10099
			MX6QDL_PAD_SD3_DAT0__SD3_DATA0			0x17099
			MX6QDL_PAD_SD3_DAT1__SD3_DATA1			0x17099
			MX6QDL_PAD_SD3_DAT2__SD3_DATA2			0x17099
			MX6QDL_PAD_SD3_DAT3__SD3_DATA3			0x17099
			MX6QDL_PAD_SD3_DAT4__SD3_DATA4			0x17099
			MX6QDL_PAD_SD3_DAT5__SD3_DATA5			0x17099
			MX6QDL_PAD_SD3_DAT6__SD3_DATA6			0x17099
			MX6QDL_PAD_SD3_DAT7__SD3_DATA7			0x17099
			MX6QDL_PAD_SD3_RST__SD3_RESET			0x1b0b1
		>;
	};
};


code:
// SPDX-License-Identifier: GPL-2.0+ OR MIT
//
// Copyright 2015 Armadeus Systems <support@armadeus.com>

/dts-v1/;
#include "imx6dl.dtsi"
#include "imx6qdl-apf6.dtsi"
#include "imx6qdl-apf6dev.dtsi"

/ {
	model = "Armadeus APF6 Solo Module on APF6Dev Board";
	compatible = "armadeus,imx6dl-apf6dev", "armadeus,imx6dl-apf6", "fsl,imx6dl";

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


code:
/*
 * support for the imx6 based aristainetos2 board
 *
 * Copyright (C) 2015 Heiko Schocher <hs@denx.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 "imx6dl.dtsi"
#include "imx6qdl-aristainetos2.dtsi"

/ {
	model = "aristainetos2 i.MX6 Dual Lite Board 4";
	compatible = "abb,aristainetos2-imx6dl-4", "fsl,imx6dl";

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

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

		port@0 {
			reg = <0>;
			display0_in: endpoint {
				remote-endpoint = <&ipu1_di0_disp0>;
			};
		};

		port@1 {
			reg = <1>;
			display_out: endpoint {
				remote-endpoint = <&panel_in>;
			};
		};
	};
};

&ecspi1 {
	lcd_panel: display@0 {
		compatible = "lg,lg4573";
		spi-max-frequency = <10000000>;
		reg = <0>;
		power-on-delay = <10>;

		display-timings {
			480x800p57 {
				native-mode;
				clock-frequency = <27000027>;
				hactive = <480>;
				vactive = <800>;
				hfront-porch = <10>;
				hback-porch = <59>;
				hsync-len = <10>;
				vback-porch = <15>;
				vfront-porch = <15>;
				vsync-len = <15>;
				hsync-active = <1>;
				vsync-active = <1>;
			};
		};

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

&i2c3 {
	touch: touch@4b {
		compatible = "atmel,maxtouch";
		reg = <0x4b>;
		interrupt-parent = <&gpio2>;
		interrupts = <9 8>;
	};
};

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

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


code:
/*
 * support for the imx6 based aristainetos2 board
 *
 * Copyright (C) 2015 Heiko Schocher <hs@denx.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 "imx6dl.dtsi"
#include "imx6qdl-aristainetos2.dtsi"

/ {
	model = "aristainetos2 i.MX6 Dual Lite Board 7";
	compatible = "abb,aristainetos2-imx6dl-7", "fsl,imx6dl";

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

	panel: panel {
		compatible = "lg,lb070wv8";
		backlight = <&backlight>;
		enable-gpios = <&gpio6 15 GPIO_ACTIVE_HIGH>;

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

&i2c3 {
	touch: touch@4d {
		compatible = "atmel,maxtouch";
		reg = <0x4d>;
		interrupt-parent = <&gpio2>;
		interrupts = <9 8>;
	};
};

&ldb {
	status = "okay";

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

		port@0 {
			reg = <0>;
			lvds0_in: endpoint {
				remote-endpoint = <&ipu1_di0_lvds0>;
			};
		};

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


code:
// SPDX-License-Identifier: GPL-2.0-only
/*
 * support fot the imx6 based aristainetos board
 *
 * Copyright (C) 2014 Heiko Schocher <hs@denx.de>
 */
/dts-v1/;
#include "imx6dl.dtsi"
#include "imx6qdl-aristainetos.dtsi"

/ {
	model = "aristainetos i.MX6 Dual Lite Board 4";
	compatible = "abb,aristainetos-imx6dl-4", "fsl,imx6dl";

	backlight {
		compatible = "pwm-backlight";
		pwms = <&pwm1 0 5000000>;
		brightness-levels = <0 4 8 16 32 64 128 255>;
		default-brightness-level = <7>;
		enable-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_backlight>;
		status = "okay";
	};

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

	display0: disp0 {
		compatible = "fsl,imx-parallel-display";
		interface-pix-fmt = "rgb24";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_ipu_disp>;
		status = "okay";

		display-timings {
			480x800p60 {
				native-mode;
				clock-frequency = <30000000>;
				hactive = <480>;
				vactive = <800>;
				hfront-porch = <59>;
				hback-porch = <10>;
				hsync-len = <10>;
				vback-porch = <15>;
				vfront-porch = <15>;
				vsync-len = <15>;
				hsync-active = <1>;
				vsync-active = <1>;
			};
		};

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

&ecspi2 {
	cs-gpios = <&gpio3 24 GPIO_ACTIVE_LOW>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_ecspi2>;
	status = "okay";
};

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

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

&pwm1 {
	#pwm-cells = <2>;
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0-only
/*
 * support fot the imx6 based aristainetos board
 *
 * Copyright (C) 2014 Heiko Schocher <hs@denx.de>
 */
/dts-v1/;
#include "imx6dl.dtsi"
#include "imx6qdl-aristainetos.dtsi"

/ {
	model = "aristainetos i.MX6 Dual Lite Board 7";
	compatible = "abb,aristainetos-imx6dl-7", "fsl,imx6dl";

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

	display0: disp0 {
		compatible = "fsl,imx-parallel-display";
		interface-pix-fmt = "rgb24";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_ipu_disp>;
		status = "okay";

		display-timings {
			800x480p60 {
				native-mode;
				clock-frequency = <33246000>;
				hactive = <800>;
				vactive = <480>;
				hfront-porch = <88>;
				hback-porch = <88>;
				hsync-len = <80>;
				vback-porch = <10>;
				vfront-porch = <10>;
				vsync-len = <25>;
				vsync-active = <1>;
			};
		};

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

	backlight {
		compatible = "pwm-backlight";
		pwms = <&pwm3 0 3000>;
		brightness-levels = <0 4 8 16 32 64 128 255>;
		default-brightness-level = <6>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_backlight>;
	};
};

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

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

&pwm3 {
	#pwm-cells = <2>;
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0 or MIT
//
// Device Tree Source for General Electric B105Pv2
//
// Copyright 2018-2021 General Electric Company
// Copyright 2018-2021 Collabora

/dts-v1/;
#include "imx6dl-b1x5pv2.dtsi"

/ {
	model = "General Electric B105Pv2";
	compatible = "ge,imx6dl-b105pv2", "congatec,qmx6", "fsl,imx6dl";

	panel {
		compatible = "auo,g101evn010";
	};
};

&i2c3 {
	touchscreen@41 {
		compatible = "ilitek,ili251x";
		reg = <0x41>;
		pinctrl-names = "default";
		pinctrl-0 =<&pinctrl_q7_gpio0>;
		interrupt-parent = <&gpio5>;
		interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
		reset-gpios = <&tca6424a 21 GPIO_ACTIVE_LOW>;
		touchscreen-size-x = <1280>;
		touchscreen-size-y = <800>;
	};
};


code:
// SPDX-License-Identifier: GPL-2.0 or MIT
//
// Device Tree Source for General Electric B105v2
//
// Copyright 2018-2021 General Electric Company
// Copyright 2018-2021 Collabora

/dts-v1/;
#include "imx6dl-b1x5v2.dtsi"

/ {
	model = "General Electric B105v2";
	compatible = "ge,imx6dl-b105v2", "congatec,qmx6", "fsl,imx6dl";

	panel {
		compatible = "auo,g101evn010";
	};
};

&i2c3 {
	touchscreen@41 {
		compatible = "ilitek,ili251x";
		reg = <0x41>;
		pinctrl-names = "default";
		pinctrl-0 =<&pinctrl_q7_gpio0>;
		interrupt-parent = <&gpio5>;
		interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
		reset-gpios = <&tca6424a 21 GPIO_ACTIVE_LOW>;
		touchscreen-size-x = <1280>;
		touchscreen-size-y = <800>;
	};
};


code:
// SPDX-License-Identifier: GPL-2.0 or MIT
//
// Device Tree Source for General Electric B125Pv2
//
// Copyright 2018-2021 General Electric Company
// Copyright 2018-2021 Collabora

/dts-v1/;
#include "imx6dl-b1x5pv2.dtsi"

/ {
	model = "General Electric B125Pv2";
	compatible = "ge,imx6dl-b125pv2", "congatec,qmx6", "fsl,imx6dl";

	panel {
		compatible = "auo,g121ean01";
	};
};

&i2c3 {
	touchscreen@2a {
		compatible = "eeti,exc80h60";
		reg = <0x2a>;
		pinctrl-names = "default";
		pinctrl-0 =<&pinctrl_q7_gpio0>;
		interrupt-parent = <&gpio5>;
		interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
		reset-gpios = <&tca6424a 21 GPIO_ACTIVE_HIGH>;
	};
};


code:
// SPDX-License-Identifier: GPL-2.0 or MIT
//
// Device Tree Source for General Electric B125v2
//
// Copyright 2018-2021 General Electric Company
// Copyright 2018-2021 Collabora

/dts-v1/;
#include "imx6dl-b1x5v2.dtsi"

/ {
	model = "General Electric B125v2";
	compatible = "ge,imx6dl-b125v2", "congatec,qmx6", "fsl,imx6dl";

	panel {
		compatible = "auo,g121ean01";
	};
};

&i2c3 {
	touchscreen@2a {
		compatible = "eeti,exc80h60";
		reg = <0x2a>;
		pinctrl-names = "default";
		pinctrl-0 =<&pinctrl_q7_gpio0>;
		interrupt-parent = <&gpio5>;
		interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
		reset-gpios = <&tca6424a 21 GPIO_ACTIVE_HIGH>;
	};
};


code:
// SPDX-License-Identifier: GPL-2.0 or MIT
//
// Device Tree Source for General Electric B155v2
//
// Copyright 2018-2021 General Electric Company
// Copyright 2018-2021 Collabora

/dts-v1/;
#include "imx6dl-b1x5v2.dtsi"

/ {
	model = "General Electric B155v2";
	compatible = "ge,imx6dl-b155v2", "congatec,qmx6", "fsl,imx6dl";

	panel {
		compatible = "auo,g156xtn01";
	};
};

&i2c3 {
	touchscreen@2a {
		compatible = "eeti,exc80h84";
		reg = <0x2a>;
		pinctrl-names = "default";
		pinctrl-0 =<&pinctrl_q7_gpio0>;
		interrupt-parent = <&gpio5>;
		interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
		touchscreen-inverted-x;
		touchscreen-inverted-y;
		reset-gpios = <&tca6424a 21 GPIO_ACTIVE_HIGH>;
	};
};


code:
// SPDX-License-Identifier: GPL-2.0 or MIT
//
// Device Tree Source for General Electric B1x5Pv2
// patient monitor series
//
// Copyright 2018-2021 General Electric Company
// Copyright 2018-2021 Collabora

#include <dt-bindings/input/input.h>
#include "imx6dl-qmx6.dtsi"

/ {
	chosen {
		stdout-path = &uart3;
	};

	/* Do not allow frequencies above 800MHz */
	cpus {
		cpu@0 {
			operating-points = <
				/* kHz    uV */
				792000  1175000
				396000  1150000
			>;
			fsl,soc-operating-points = <
				/* ARM kHz	SOC-PU uV */
				792000	1175000
				396000	1175000
			>;
		};

		cpu@1 {
			operating-points = <
				/* kHz    uV */
				792000  1175000
				396000  1150000
			>;
			fsl,soc-operating-points = <
				/* ARM kHz	SOC-PU uV */
				792000	1175000
				396000	1175000
			>;
		};
	};

	reg_syspwr: regulator-12v {
		compatible = "regulator-fixed";
		regulator-name = "SYS_PWR";
		regulator-min-microvolt = <12000000>;
		regulator-max-microvolt = <12000000>;
	};

	reg_5v_pmc: regulator-5v-pmc {
		compatible = "regulator-fixed";
		regulator-name = "5V PMC";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		vin-supply = <&reg_syspwr>;
	};

	reg_5v: regulator-5v {
		compatible = "regulator-fixed";
		regulator-name = "5V";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		vin-supply = <&reg_syspwr>;
	};

	reg_3v3: regulator-3v3 {
		compatible = "regulator-fixed";
		regulator-name = "3V3";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		vin-supply = <&reg_syspwr>;
	};

	reg_5v0_audio: regulator-5v0-audio {
		compatible = "regulator-fixed";
		regulator-name = "5V0_AUDIO";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		vin-supply = <&reg_5v>;
		gpio = <&tca6424a 16 GPIO_ACTIVE_HIGH>;
		enable-active-high;
		/*
		 * This must be always-on for da7212, which has some not
		 * properly documented dependencies for it's speaker supply
		 * pin. The issue manifests as speaker volume being very low.
		 */
		regulator-always-on;
	};

	reg_3v3_audio: regulator-3v3-audio {
		compatible = "regulator-fixed";
		regulator-name = "3V3_AUDIO";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		vin-supply = <&reg_3v3>;
		pinctrl-0 = <&pinctrl_q7_hda_reset>;
		pinctrl-names = "default";
		gpio = <&gpio6 8 GPIO_ACTIVE_HIGH>;
		enable-active-high;
	};

	reg_2v5_audio: regulator-2v5-audio {
		compatible = "regulator-fixed";
		regulator-name = "2V5_AUDIO";
		regulator-min-microvolt = <2500000>;
		regulator-max-microvolt = <2500000>;
		regulator-always-on;
		vin-supply = <&reg_3v3_audio>;

	};

	reg_wlan: regulator-wlan {
		compatible = "regulator-fixed";
		regulator-name = "WLAN";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		vin-supply = <&reg_3v3>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_q7_sdio_power>;
		gpio = <&gpio4 30 GPIO_ACTIVE_HIGH>;
		enable-active-high;
		startup-delay-us = <70000>;
	};

	reg_bl: regulator-backlight {
		compatible = "regulator-fixed";
		regulator-name = "LED_VCC";
		regulator-min-microvolt = <12000000>;
		regulator-max-microvolt = <12000000>;
		vin-supply = <&reg_syspwr>;
		pinctrl-0 = <&pinctrl_q7_lcd_power>;
		pinctrl-names = "default";
		gpio = <&gpio1 7 GPIO_ACTIVE_HIGH>;
		enable-active-high;
	};

	reg_lcd: regulator-lcd {
		compatible = "regulator-fixed";
		regulator-name = "LCD_5V";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		vin-supply = <&reg_5v>;
	};

	usb_power: regulator-usb-power {
		compatible = "regulator-fixed";
		regulator-name = "USB POWER";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		vin-supply = <&reg_5v>;
	};

	charger: battery-charger {
		compatible = "gpio-charger"; /* ti,bq24172 */
		charger-type = "mains";
		gpios = <&tca6424a 3 GPIO_ACTIVE_LOW>;
		charge-current-limit-gpios = <&tca6424a 11 GPIO_ACTIVE_HIGH>,
					     <&tca6424a 12 GPIO_ACTIVE_HIGH>;
		charge-current-limit-mapping = <1300000 0x0>,
					       <700000 0x1>,
					       <0 0x2>;
		charge-status-gpios = <&tca6424a 6 GPIO_ACTIVE_HIGH>;
	};

	poweroff {
		compatible = "gpio-poweroff";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_q7_spi_cs1>;
		gpios = <&gpio4 25 GPIO_ACTIVE_LOW>;
	};

	power-button-key {
		compatible = "gpio-keys";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_q7_sleep_button>;

		power-button {
			label = "power button";
			gpios = <&gpio4 7 GPIO_ACTIVE_LOW>;
			linux,code = <KEY_POWER>;
		};
	};

	rotary-encoder-key {
		compatible = "gpio-keys";

		rotary-encoder-event {
			label = "rotary-encoder press";
			gpios = <&tca6424a 0 GPIO_ACTIVE_HIGH>;
			linux,code = <KEY_ENTER>;
			linux,can-disable;
		};
	};

	rotary-encoder {
		compatible = "rotary-encoder";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_q7_gpio2 &pinctrl_q7_gpio4>;
		gpios = <&gpio4 26 GPIO_ACTIVE_LOW>, <&gpio1 0 GPIO_ACTIVE_LOW>;
		rotary-encoder,relative-axis;
		rotary-encoder,steps-per-period = <2>;
		wakeup-source;
	};

	leds {
		compatible = "gpio-leds";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_q7_gpio1 &pinctrl_q7_gpio3 &pinctrl_q7_gpio5>;

		alarm1 {
			label = "alarm:red";
			gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
		};

		alarm2 {
			label = "alarm:yellow";
			gpios = <&gpio4 27 GPIO_ACTIVE_HIGH>;
		};

		alarm3 {
			label = "alarm:blue";
			gpios = <&gpio4 15 GPIO_ACTIVE_HIGH>;
		};
	};

	backlight: backlight {
		compatible = "pwm-backlight";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_q7_backlight_enable>;
		power-supply = <&reg_bl>;
		pwms = <&pwm4 0 5000000 0>;
		brightness-levels = <0 255>;
		num-interpolated-steps = <255>;
		default-brightness-level = <179>;
		enable-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
	};

	panel {
		backlight = <&backlight>;
		power-supply = <&reg_lcd>;

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

	sound {
		compatible = "simple-audio-card";
		simple-audio-card,name = "audio-card";
		simple-audio-card,format = "i2s";
		simple-audio-card,bitclock-master = <&dailink_master>;
		simple-audio-card,frame-master = <&dailink_master>;
		simple-audio-card,widgets = "Speaker", "Ext Spk";
		simple-audio-card,audio-routing = "Ext Spk", "LINE";

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

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

	clk_ext_audio_codec: clock-codec {
		compatible = "fixed-clock";
		#clock-cells = <0>;
		clock-frequency = <12288000>;
	};
};

&audmux {
	status = "okay";
};

&fec {
	status = "okay";
};

&hdmi {
	status = "okay";
};

&i2c1 {
	battery: battery@b {
		compatible = "ti,bq20z65", "sbs,sbs-battery";
		reg = <0x0b>;
		sbs,battery-detect-gpios = <&tca6424a 5 GPIO_ACTIVE_LOW>;
		sbs,i2c-retry-count = <5>;
		power-supplies = <&charger>;
	};

	codec: audio-codec@1a {
		compatible = "dlg,da7212";
		reg = <0x1a>;
		#sound-dai-cells = <0>;
		VDDA-supply = <&reg_2v5_audio>;
		VDDSP-supply = <&reg_5v0_audio>;
		VDDMIC-supply = <&reg_3v3_audio>;
		VDDIO-supply = <&reg_3v3_audio>;
		clocks = <&clk_ext_audio_codec>;
		clock-names = "mclk";
	};
};

&i2c5 {
	tca6424a: gpio-controller@22 {
		compatible = "ti,tca6424";
		reg = <0x22>;
		gpio-controller;
		#gpio-cells = <2>;
		vcc-supply = <&reg_3v3>;
		interrupt-parent = <&gpio7>;
		interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_q7_gpio6>;
		interrupt-controller;
		#interrupt-cells = <2>;
		gpio-line-names = "GPIO_ROTOR#", "ACM_IO_INT", "TMP_SENSOR_IRQ", "AC_IN",
				  "TF_S", "BATT_T", "LED_INC_CHAR", "ACM1_OCF",
				  "ACM2_OCF", "ACM_IO_RST", "USB1_POWER_EN", "EGPIO_CC_CTL0",
				  "EGPIO_CC_CTL1", "12V_OEMNBP_EN", "CP2105_RST", "",
				  "SPEAKER_PA_EN", "ARM7_UPI_RESET", "ARM7_PWR_RST", "NURSE_CALL",
				  "MARKER_EN", "EGPIO_TOUCH_RST", "PRESSURE_INT1", "PRESSURE_INT2";

	};

	tmp75: temperature-sensor@48 {
		compatible = "ti,tmp75";
		reg = <0x48>;
		vs-supply = <&reg_3v3>;
		interrupt-parent = <&tca6424a>;
		interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
	};
};

&ldb {
	status = "okay";

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

		port@4 {
			reg = <4>;

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

&pwm4 {
	status = "okay";
};

&ssi1 {
	fsl,mode = "i2s-slave";
	status = "okay";
};

&usbotg {
	vbus-supply = <&usb_power>;
	disable-over-current;
	dr_mode = "host";
	status = "okay";

	/*
	 * TPS2051BDGN fault-gpio is connected to Q7[86] USB_0_1_OC_N.
	 * On QMX6 this is not connceted to the i.MX6, but to the USB Hub
	 * from &usbh1. This means, that we cannot easily detect and handle
	 * over-current events. Fortunately the regulator limits the current
	 * automatically, so the hardware is still protected.
	 */
};

&usdhc4 {
	/* WiFi module */
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usdhc4>;
	bus-width = <4>;
	no-1-8-v;
	non-removable;
	wakeup-source;
	keep-power-in-suspend;
	cap-power-off-card;
	max-frequency = <25000000>;
	vmmc-supply = <&reg_wlan>;
	#address-cells = <1>;
	#size-cells = <0>;
	status = "okay";

	wlcore: wlcore@2 {
		compatible = "ti,wl1837";
		reg = <2>;

		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_q7_gpio7>;

		interrupt-parent = <&gpio4>;
		interrupts = <14 IRQ_TYPE_LEVEL_HIGH>;

		tcxo-clock-frequency = <26000000>;
	};
};


code:
// SPDX-License-Identifier: GPL-2.0 or MIT
//
// Device Tree Source for General Electric B1x5v2
// patient monitor series
//
// Copyright 2018-2021 General Electric Company
// Copyright 2018-2021 Collabora

#include <dt-bindings/input/input.h>
#include "imx6dl-b1x5pv2.dtsi"

/ {
	reg_3v3_acm: regulator-3v3-acm {
		compatible = "regulator-fixed";
		regulator-name = "3V3 ACM";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		regulator-always-on;
		vin-supply = <&reg_3v3>;
	};
};

&i2c1 {
	tca6416: gpio-controller@21 {
		compatible = "ti,tca6416";
		reg = <0x21>;
		gpio-controller;
		#gpio-cells = <2>;
		reset-gpios = <&tca6424a 9 GPIO_ACTIVE_LOW>;
		vcc-supply = <&reg_3v3_acm>;
		gpio-line-names = "ACM1_EN", "ACM1_CL0", "ACM1_CL1", "ACM1_CL2",
				  "", "ACM2_EN", "ACM2_CL0", "ACM2_CL1",
				  "ACM2_CL2", "", "", "",
				  "", "", "", "";

		/*
		 * The interrupt pin is connected to &tca6424a pin 1, but the Linux
		 * TCA6424 driver cannot handle low type interrupts at the moment
		 * (and support cannot be added without some ugly hacks). Since this
		 * controller does not have any input type GPIOs, just pretend
		 * that the interrupt pin is unconnected.
		 */
	};
};

&i2c5 {
	mpl3115a2: pressure-sensor@60 {
		compatible = "fsl,mpl3115";
		reg = <0x60>;

		/*
		 * The MPL3115 interrupts are connected to pin 22 and 23
		 * of &tca6424a, but the binding does not yet support
		 * interrupts.
		 */
	};
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright 2022 Toradex
 */

/dts-v1/;

#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include "imx6dl.dtsi"
#include "imx6qdl-colibri.dtsi"

/ {
	model = "Toradex Colibri iMX6DL/S on Colibri Aster Board";
	compatible = "toradex,colibri_imx6dl-aster", "toradex,colibri_imx6dl",
		     "fsl,imx6dl";

	aliases {
		i2c0 = &i2c2;
		i2c1 = &i2c3;
	};

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

/* Colibri SSP */
&ecspi4 {
	cs-gpios = <
		&gpio5 2 GPIO_ACTIVE_HIGH
		&gpio5 4 GPIO_ACTIVE_HIGH
	>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_ecspi4 &pinctrl_csi_gpio_2>;
	status = "okay";
};

/* Colibri I2C: I2C3_SDA/SCL on SODIMM 194/196 */
&i2c3 {
	status = "okay";
};

&iomuxc {
	pinctrl-names = "default";
	pinctrl-0 = <
		&pinctrl_csi_gpio_1
		&pinctrl_gpio_2
		&pinctrl_gpio_aster
		&pinctrl_usbh_oc_1
		&pinctrl_usbc_id_1
		&pinctrl_weim_gpio_5
	>;

	pinctrl_gpio_aster: gpioaster {
		fsl,pins = <
			MX6QDL_PAD_KEY_COL2__GPIO4_IO10		0x1b0b0
			MX6QDL_PAD_KEY_ROW2__GPIO4_IO11		0x1b0b0
			MX6QDL_PAD_KEY_ROW4__GPIO4_IO15		0x1b0b0
			MX6QDL_PAD_NANDF_D1__GPIO2_IO01		0x1b0b0
			MX6QDL_PAD_NANDF_D3__GPIO2_IO03		0x1b0b0
			MX6QDL_PAD_NANDF_D6__GPIO2_IO06		0x1b0b0
			MX6QDL_PAD_SD4_DAT0__GPIO2_IO08		0x1b0b0
			MX6QDL_PAD_SD4_DAT3__GPIO2_IO11		0x1b0b0
		>;
	};
};

&pwm1 {
	status = "okay";
};

&pwm2 {
	status = "okay";
};

&pwm3 {
	status = "okay";
};

&pwm4 {
	status = "okay";
};

&reg_usb_host_vbus {
	status = "okay";
};

&uart1 {
	status = "okay";
};

&uart2 {
	status = "okay";
};

&uart3 {
	status = "okay";
};

&usbh1 {
	status = "okay";
};

&usbotg {
	status = "okay";
};

/* Colibri MMC */
&usdhc1 {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright 2014-2022 Toradex
 * Copyright 2012 Freescale Semiconductor, Inc.
 * Copyright 2011 Linaro Ltd.
 */

/dts-v1/;

#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include "imx6dl.dtsi"
#include "imx6qdl-colibri.dtsi"

/ {
	model = "Toradex Colibri iMX6DL/S on Colibri Evaluation Board V3";
	compatible = "toradex,colibri_imx6dl-eval-v3", "toradex,colibri_imx6dl",
		     "fsl,imx6dl";

	aliases {
		i2c0 = &i2c2;
		i2c1 = &i2c3;
	};

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

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

	/* Fixed crystal dedicated to mcp251x */
	clk16m: clock-16m {
		compatible = "fixed-clock";
		#clock-cells = <0>;
		clock-frequency = <16000000>;
		clock-output-names = "clk16m";
	};
};

/* Colibri SSP */
&ecspi4 {
	status = "okay";

	mcp251x0: mcp251x@0 {
		compatible = "microchip,mcp2515";
		clocks = <&clk16m>;
		interrupt-parent = <&gpio3>;
		interrupts = <27 0x2>;
		reg = <0>;
		spi-max-frequency = <10000000>;
		status = "okay";
	};
};

/*
 * Colibri I2C: I2C3_SDA/SCL on SODIMM 194/196 (e.g. RTC on carrier board)
 */
&i2c3 {
	status = "okay";

	/* M41T0M6 real time clock on carrier board */
	rtc_i2c: rtc@68 {
		compatible = "st,m41t0";
		reg = <0x68>;
	};
};

&iomuxc {
	pinctrl-names = "default";
	pinctrl-0 = <
		&pinctrl_weim_gpio_1 &pinctrl_weim_gpio_2
		&pinctrl_weim_gpio_3 &pinctrl_weim_gpio_4
		&pinctrl_weim_gpio_5 &pinctrl_weim_gpio_6
		&pinctrl_usbh_oc_1 &pinctrl_usbc_id_1
	>;
};

&pwm1 {
	status = "okay";
};

&pwm2 {
	status = "okay";
};

&pwm3 {
	status = "okay";
};

&pwm4 {
	status = "okay";
};

&reg_usb_host_vbus {
	status = "okay";
};

&uart1 {
	status = "okay";
};

&uart2 {
	status = "okay";
};

&uart3 {
	status = "okay";
};

&usbh1 {
	status = "okay";
};

&usbotg {
	status = "okay";
};

/* Colibri MMC */
&usdhc1 {
	status = "okay";
};

&weim {
	status = "okay";

	/* weim memory map: 32MB on CS0, CS1, CS2 and CS3 */
	ranges = <0 0 0x08000000 0x02000000
		  1 0 0x0a000000 0x02000000
		  2 0 0x0c000000 0x02000000
		  3 0 0x0e000000 0x02000000>;

	/* SRAM on Colibri nEXT_CS0 */
	sram@0,0 {
		compatible = "cypress,cy7c1019dv33-10zsxi", "mtd-ram";
		reg = <0 0 0x00010000>;
		#address-cells = <1>;
		#size-cells = <1>;
		bank-width = <2>;
		fsl,weim-cs-timing = <0x00010081 0x00000000 0x04000000
				      0x00000000 0x04000040 0x00000000>;
	};

	/* SRAM on Colibri nEXT_CS1 */
	sram@1,0 {
		compatible = "cypress,cy7c1019dv33-10zsxi", "mtd-ram";
		reg = <1 0 0x00010000>;
		#address-cells = <1>;
		#size-cells = <1>;
		bank-width = <2>;
		fsl,weim-cs-timing = <0x00010081 0x00000000 0x04000000
				      0x00000000 0x04000040 0x00000000>;
	};
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright 2022 Toradex
 */

/dts-v1/;

#include "imx6dl-colibri-iris.dts"

/ {
	model = "Toradex Colibri iMX6DL/S on Colibri Iris V2 Board";
	compatible = "toradex,colibri_imx6dl-iris-v2", "toradex,colibri_imx6dl",
		     "fsl,imx6dl";

	reg_3v3_vmmc: regulator-3v3-vmmc {
		compatible = "regulator-fixed";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_enable_3v3_vmmc>;
		regulator-name = "3v3_vmmc";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		gpio = <&gpio2 11 GPIO_ACTIVE_HIGH>;
		startup-delay-us = <100>;
		enable-active-high;
	};
};

&iomuxc {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_gpio_iris	&pinctrl_usbh_oc_1 &pinctrl_usbc_id_1>;

	pinctrl_enable_3v3_vmmc: enable3v3vmmcgrp {
		fsl,pins = <
			MX6QDL_PAD_SD4_DAT3__GPIO2_IO11	0x1b0b0
		>;
	};
};

/* Colibri MMC */
&usdhc1 {
	cap-power-off-card;
	/* uncomment the following to enable SD card UHS mode if you have a V1.1 module */
	/* /delete-property/ no-1-8-v; */
	vmmc-supply = <&reg_3v3_vmmc>;
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright 2022 Toradex
 */

/dts-v1/;

#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include "imx6dl.dtsi"
#include "imx6qdl-colibri.dtsi"

/ {
	model = "Toradex Colibri iMX6DL/S on Colibri Iris Board";
	compatible = "toradex,colibri_imx6dl-iris", "toradex,colibri_imx6dl",
		     "fsl,imx6dl";

	aliases {
		i2c0 = &i2c2;
		i2c1 = &i2c3;
	};

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

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

/* Colibri SSP */
&ecspi4 {
	status = "okay";
};

&gpio2 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_uart1_forceoff &pinctrl_uart23_forceoff>;

	/*
	 * uart-a-on-x13-enable turns the UART transceiver for UART_A on. If one
	 * wants to turn the transceiver off, that property has to be deleted
	 * and the gpio handled in userspace.
	 * The same applies to uart-b-c-on-x14-enable where the UART_B and
	 * UART_C transceiver is turned on.
	 */
	uart-a-on-x13-enable-hog {
		gpio-hog;
		gpios = <4 GPIO_ACTIVE_HIGH>; /* SODIMM 102 */
		output-high;
	};

	uart-b-c-on-x14-enable-hog {
		gpio-hog;
		gpios = <8 GPIO_ACTIVE_HIGH>; /* SODIMM 104 */
		output-high;
	};
};

/*
 * Colibri I2C: I2C3_SDA/SCL on SODIMM 194/196 (e.g. RTC on carrier board)
 */
&i2c3 {
	status = "okay";

	rtc_i2c: rtc@68 {
		compatible = "st,m41t0";
		reg = <0x68>;
	};
};

&iomuxc {
	pinctrl-names = "default";
	pinctrl-0 = <
		&pinctrl_gpio_iris
		&pinctrl_usbh_oc_1
		&pinctrl_usbc_id_1
	>;

	pinctrl_gpio_iris: gpioirisgrp {
		fsl,pins = <
			MX6QDL_PAD_EIM_A17__GPIO2_IO21	0x1b0b0
			MX6QDL_PAD_EIM_A18__GPIO2_IO20	0x1b0b0
			MX6QDL_PAD_EIM_A19__GPIO2_IO19	0x1b0b0
			MX6QDL_PAD_EIM_A20__GPIO2_IO18	0x1b0b0
			MX6QDL_PAD_EIM_A23__GPIO6_IO06	0x1b0b0
			MX6QDL_PAD_EIM_D27__GPIO3_IO27	0x1b0b0
			MX6QDL_PAD_NANDF_D3__GPIO2_IO03	0x1b0b0
			MX6QDL_PAD_SD2_DAT0__GPIO1_IO15	0x1b0b0
		>;
	};

	pinctrl_uart1_forceoff: uart1forceoffgrp {
		fsl,pins = <
			MX6QDL_PAD_NANDF_D4__GPIO2_IO04 0x1b0b0
		>;
	};

	pinctrl_uart23_forceoff: uart23forceoffgrp {
		fsl,pins = <
			MX6QDL_PAD_SD4_DAT0__GPIO2_IO08 0x1b0b0
		>;
	};
};

&pwm1 {
	status = "okay";
};

&pwm2 {
	status = "okay";
};

&pwm3 {
	status = "okay";
};

&pwm4 {
	status = "okay";
};

&reg_usb_host_vbus {
	status = "okay";
};

&uart1 {
	status = "okay";
};

&uart2 {
	status = "okay";
};

&uart3 {
	status = "okay";
};

&usbh1 {
	status = "okay";
};

&usbotg {
	status = "okay";
};

/* Colibri MMC */
&usdhc1 {
	status = "okay";
};


code:
/*
 * Copyright (C) 2014 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 "imx6dl.dtsi"
#include "imx6qdl-sr-som.dtsi"
#include "imx6qdl-sr-som-ti.dtsi"
#include "imx6qdl-sr-som-emmc.dtsi"
#include "imx6qdl-cubox-i.dtsi"

/ {
	model = "SolidRun Cubox-i Solo/DualLite (1.5som+emmc)";
	compatible = "solidrun,cubox-i/dl", "fsl,imx6dl";
};


code:
/*
 * Copyright (C) 2014 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 "imx6dl.dtsi"
#include "imx6qdl-sr-som.dtsi"
#include "imx6qdl-sr-som-ti.dtsi"
#include "imx6qdl-cubox-i.dtsi"

/ {
	model = "SolidRun Cubox-i Solo/DualLite (1.5som)";
	compatible = "solidrun,cubox-i/dl", "fsl,imx6dl";
};