// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Minimal generic DT for RK3399 with eMMC, SD-card, SPI flash and USB OTG enabled
 */

/dts-v1/;
#include "rk3399.dtsi"

/ {
	model = "Generic RK3399";
	compatible = "rockchip,rk3399";

	aliases {
		mmc0 = &sdhci;
		mmc1 = &sdmmc;
	};

	chosen {
		stdout-path = "serial2:1500000n8";
	};
};

&emmc_phy {
	status = "okay";
};

&sdhci {
	bus-width = <8>;
	cap-mmc-highspeed;
	max-frequency = <150000000>;
	mmc-hs200-1_8v;
	mmc-ddr-1_8v;
	no-sd;
	no-sdio;
	non-removable;
	status = "okay";
};

&sdmmc {
	bus-width = <4>;
	cap-sd-highspeed;
	disable-wp;
	max-frequency = <150000000>;
	no-mmc;
	no-sdio;
	pinctrl-names = "default";
	pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc_cd>;
	status = "okay";
};

&spi1 {
	status = "okay";

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

&u2phy0 {
	status = "okay";
};

&u2phy0_otg {
	status = "okay";
};

&uart2 {
	status = "okay";
};

&usbdrd3_0 {
	status = "okay";
};

&usbdrd_dwc3_0 {
	dr_mode = "peripheral";
	maximum-speed = "high-speed";
	phys = <&u2phy0_otg>;
	phy-names = "usb2-phy";
	status = "okay";
};
