Newer
Older
barebox / arch / arm / dts / fsl-tqmls1046a-mbls10xxa.dts
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Device Tree Include file for TQMLS1046A SoM on MBLS10xxA from TQ
 *
 * Copyright 2018 TQ-Systems GmbH
 */

/dts-v1/;

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

#include "fsl-tqmls1046a.dtsi"

/ {
	model = "TQ TQMLS1046A SoM on MBLS10xxA board";
	compatible = "tqc,tqmls1046a", "fsl,ls1046a";

	aliases {
		serial0 = &duart0;
		serial1 = &duart1;
		mmc0 = &esdhc;
		qspiflash0 = &qflash0;
		qspiflash1 = &qflash1;
		qsgmii_s1_p1 = &qsgmii1_phy1;
		qsgmii_s1_p2 = &qsgmii1_phy2;
		qsgmii_s2_p1 = &qsgmii2_phy1;
		qsgmii_s2_p2 = &qsgmii2_phy2;
		qsgmii_s2_p3 = &qsgmii2_phy3;
		qsgmii_s2_p4 = &qsgmii2_phy4;
	};

	chosen {
		stdout-path = "serial1:115200n8";

		environment-sd {
			compatible = "barebox,environment";
			device-path = &environment_sd;
			status = "disabled";
		};

		environment-qspi {
			compatible = "barebox,environment";
			device-path = &environment_qspi;
			status = "disabled";
		};
	};

	gpio-keys-polled {
		compatible = "gpio-keys-polled";
		gpio-keys,name = "gpio-keys";
		poll-interval = <100>;
		autorepeat;

		button0 {
			label = "button0";
			gpios = <&gpioexp3 5 GPIO_ACTIVE_LOW>;
			linux,code = <KEY_F1>;
		};

		button1 {
			label = "button1";
			gpios = <&gpioexp3 6 GPIO_ACTIVE_LOW>;
			linux,code = <KEY_F2>;
		};
	};

	leds {
		compatible = "gpio-leds";

		user {
			gpios = <&gpioexp3 13 GPIO_ACTIVE_LOW>;
			label = "led:user";
			linux,default-trigger = "heartbeat";
		};
	};

};

&esdhc {
	partitions {
		#address-cells = <1>;
		#size-cells = <1>;

		compatible = "fixed-partitions";

		partition@0 {
			label = "barebox";
			reg = <0x1000 0xdf000>;
		};

		environment_sd: partition@e0000 {
			label = "barebox-environment";
			reg = <0xe0000 0x20000>;
		};
	};
};

&duart0 {
	status = "okay";
};

&duart1 {
	status = "okay";
};

&esdhc {
	mmc-hs200-1_8v;
	sd-uhs-sdr104;
	sd-uhs-sdr50;
	sd-uhs-sdr25;
	sd-uhs-sdr12;
};

&i2c3 {
	status = "okay";

	i2c-mux@70 {
		compatible = "nxp,pca9544";
		reg = <0x70>;
		#address-cells = <1>;
		#size-cells = <0>;

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

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

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

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

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

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

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

&usb1 {
	dr_mode = "otg";
};

#include <arm64/freescale/fsl-ls1046-post.dtsi>
#include <dt-bindings/net/ti-dp83867.h>

&fman0 {
	status = "okay";

	ethernet@e0000 { /* EMAC.1 */
		phy-connection-type = "sgmii";

	};

	ethernet@e2000 { /* EMAC.2 */
		phy-connection-type = "sgmii";
	};

	ethernet@e4000 { /* EMAC.3 */
		phy-handle = <&rgmii_phy1>;
		phy-connection-type = "rgmii";
		phy-mode = "rgmii-id";
	};

	ethernet@e6000 { /* EMAC.4 */
		phy-handle = <&rgmii_phy2>;
		phy-connection-type = "rgmii";
		phy-mode = "rgmii-id";
	};

	ethernet@e8000 { /* EMAC.5 */
		phy-connection-type = "sgmii";
	};

	ethernet@ea000 { /* EMAC.6 */
		phy-connection-type = "sgmii";
	};

	ethernet@f0000 { /* EMAC.9 */
		phy-connection-type = "sgmii";
	};

	ethernet@f2000 { /* EMAC.10 */
		phy-connection-type = "sgmii";
	};

	mdio@e1000 {
		status = "disabled";
	};

	mdio@e3000 {
		status = "disabled";
	};

	mdio@e5000 {
		status = "disabled";
	};

	mdio@e7000 {
		status = "disabled";
	};

	mdio@e9000 {
		status = "disabled";
	};

	mdio@eb000 {
		status = "disabled";
	};

	mdio@f1000 {
		status = "disabled";
	};

	mdio@f3000 {
		status = "disabled";
	};

	mdio@fc000 {
		rgmii_phy1: ethernet-phy@0e {
			reg = <0x0e>;
			ti,rx-internal-delay = <DP83867_RGMIIDCTL_1_50_NS>;
			ti,tx-internal-delay = <DP83867_RGMIIDCTL_1_50_NS>;
			ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_8_B_NIB>;
		};

		rgmii_phy2: ethernet-phy@0c {
			reg = <0x0c>;
			ti,rx-internal-delay = <DP83867_RGMIIDCTL_1_50_NS>;
			ti,tx-internal-delay = <DP83867_RGMIIDCTL_1_50_NS>;
			ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_8_B_NIB>;
		};

		qsgmii1_phy1: ethernet-phy@1c {
			reg = <0x1c>;
		};

		qsgmii1_phy2: ethernet-phy@1d {
			reg = <0x1d>;
		};

		qsgmii2_phy1: ethernet-phy@00 {
			reg = <0x00>;
		};

		qsgmii2_phy2: ethernet-phy@01 {
			reg = <0x01>;
		};

		qsgmii2_phy3: ethernet-phy@02 {
			reg = <0x02>;
		};

		qsgmii2_phy4: ethernet-phy@03 {
			reg = <0x03>;
		};
	};

	mdio@fd000 {
		status = "disabled";
	};
};

&qflash0 {
	partitions {
		#address-cells = <1>;
		#size-cells = <1>;

		compatible = "fixed-partitions";

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

		environment_qspi: partition@200000 {
			label = "barebox-environment";
			reg = <0x200000 0x80000>;
		};

		partition@280000 {
			label = "data";
			reg = <0x280000 0x0>;
		};
	};
};