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@1000 {
			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>;
				gpio-line-names = "sd1_3_lane_a_mux",
						  "sd1_2_lane_b_mux",
						  "sd1_0_lane_d_mux",
						  "sd2_1_lane_b_mux",
						  "sd2_3_lane_d_mux1",
						  "sd2_3_lane_d_mux2",
						  "sd_mux_shdn",
						  "sd1_ref_clk2_sel",
						  "mpcie1_disable_n",
						  "mpcie1_wake_n",
						  "mpcie2_disable_n",
						  "mpcie2_wake_n",
						  "prsnt_n",
						  "pcie_pwr_en",
						  "dcdc_pwr_en",
						  "dcdc_pgood_1v8";
			};

			gpioexp2: pca9555@21 {
				compatible = "nxp,pca9555";
				reg = <0x21>;
				gpio-controller;
				#gpio-cells = <2>;
				gpio-line-names = "xfi1_tx_dis",
						  "xfi1_tx_fault",
						  "xfi1_moddef_det",
						  "xfi1_rx_loss",
						  "retimer1_loss",
						  "xfi1_ensmb",
						  "qsgmii1_clk_sel0",
						  "qsgmii_phy1_config3",
						  "xfi2_tx_fault",
						  "xfi2_tx_dis",
						  "xfi2_moddef_det",
						  "xfi2_rx_loss",
						  "retimer2_loss",
						  "xfi2_ensmb",
						  "qsgmii2_clk_sel0",
						  "qsgmii_phy2_config3";
			};

			gpioexp3: pca9555@22 {
				compatible = "nxp,pca9555";
				reg = <0x22>;
				gpio-controller;
				#gpio-cells = <2>;
				gpio-line-names = "ec1_phy_pwdn",
						  "ec2_phy_pwdn",
						  "usb_c_pwron",
						  "usb_en_oc_3v3_n",
						  "usb_h_grst_n",
						  "gpio_button0",
						  "gpio_button1",
						  "sda_pwr_en",
						  "qsgmii_phy1_int_n",
						  "qsgmii_phy2_int_n",
						  "spi_clko_sof",
						  "spi_int",
						  "can_sel",
						  "led_n",
						  "pcie_rst_3v3_n",
						  "pcie_wake_3v3_n";
			};
		};

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

&enet0 { /* EMAC.1 */
	phy-connection-type = "sgmii";
};

&enet1 { /* EMAC.2 */
	phy-connection-type = "sgmii";
};

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

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

&enet4 { /* EMAC.5 */
	phy-connection-type = "sgmii";
};

&enet5 { /* EMAC.6 */
	phy-connection-type = "sgmii";
};

&enet6 { /* EMAC.9 */
	phy-connection-type = "sgmii";
};

&enet7 { /* EMAC.10 */
	phy-connection-type = "sgmii";
};

&{/soc/fman@1a00000/mdio@e1000} {
	status = "disabled";
};

&{/soc/fman@1a00000/mdio@e3000} {
	status = "disabled";
};

&{/soc/fman@1a00000/mdio@e5000} {
	status = "disabled";
};

&{/soc/fman@1a00000/mdio@e7000} {
	status = "disabled";
};

&{/soc/fman@1a00000/mdio@e9000} {
	status = "disabled";
};

&{/soc/fman@1a00000/mdio@eb000} {
	status = "disabled";
};

&{/soc/fman@1a00000/mdio@f1000} {
	status = "disabled";
};

&{/soc/fman@1a00000/mdio@f3000} {
	status = "disabled";
};

&mdio0 {
	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>;
	};
};

&xmdio0 {
	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>;
		};
	};
};