18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Copyright (c) 2017 T-Chip Intelligent Technology Co., Ltd
48c2ecf20Sopenharmony_ci * Copyright (c) 2019 Markus Reichl <m.reichl@fivetechno.de>
58c2ecf20Sopenharmony_ci */
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci/dts-v1/;
88c2ecf20Sopenharmony_ci#include "rk3399-roc-pc.dtsi"
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ci/ {
118c2ecf20Sopenharmony_ci	model = "Firefly ROC-RK3399-PC Mezzanine Board";
128c2ecf20Sopenharmony_ci	compatible = "firefly,roc-rk3399-pc-mezzanine", "rockchip,rk3399";
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ci	/* MP8009 PoE PD */
158c2ecf20Sopenharmony_ci	poe_12v: poe-12v {
168c2ecf20Sopenharmony_ci		compatible = "regulator-fixed";
178c2ecf20Sopenharmony_ci		regulator-name = "poe_12v";
188c2ecf20Sopenharmony_ci		regulator-always-on;
198c2ecf20Sopenharmony_ci		regulator-boot-on;
208c2ecf20Sopenharmony_ci		regulator-min-microvolt = <12000000>;
218c2ecf20Sopenharmony_ci		regulator-max-microvolt = <12000000>;
228c2ecf20Sopenharmony_ci	};
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ci	vcc3v3_ngff: vcc3v3-ngff {
258c2ecf20Sopenharmony_ci		compatible = "regulator-fixed";
268c2ecf20Sopenharmony_ci		regulator-name = "vcc3v3_ngff";
278c2ecf20Sopenharmony_ci		enable-active-high;
288c2ecf20Sopenharmony_ci		gpio = <&gpio4 RK_PD3 GPIO_ACTIVE_HIGH>;
298c2ecf20Sopenharmony_ci		pinctrl-names = "default";
308c2ecf20Sopenharmony_ci		pinctrl-0 = <&vcc3v3_ngff_en>;
318c2ecf20Sopenharmony_ci		regulator-always-on;
328c2ecf20Sopenharmony_ci		regulator-boot-on;
338c2ecf20Sopenharmony_ci		regulator-min-microvolt = <3300000>;
348c2ecf20Sopenharmony_ci		regulator-max-microvolt = <3300000>;
358c2ecf20Sopenharmony_ci		vin-supply = <&sys_12v>;
368c2ecf20Sopenharmony_ci	};
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci	vcc3v3_pcie: vcc3v3-pcie {
398c2ecf20Sopenharmony_ci		compatible = "regulator-fixed";
408c2ecf20Sopenharmony_ci		regulator-name = "vcc3v3_pcie";
418c2ecf20Sopenharmony_ci		enable-active-high;
428c2ecf20Sopenharmony_ci		gpio = <&gpio1 RK_PC1 GPIO_ACTIVE_HIGH>;
438c2ecf20Sopenharmony_ci		pinctrl-names = "default";
448c2ecf20Sopenharmony_ci		pinctrl-0 = <&vcc3v3_pcie_en>;
458c2ecf20Sopenharmony_ci		regulator-min-microvolt = <3300000>;
468c2ecf20Sopenharmony_ci		regulator-max-microvolt = <3300000>;
478c2ecf20Sopenharmony_ci		vin-supply = <&sys_12v>;
488c2ecf20Sopenharmony_ci	};
498c2ecf20Sopenharmony_ci};
508c2ecf20Sopenharmony_ci
518c2ecf20Sopenharmony_ci&sys_12v {
528c2ecf20Sopenharmony_ci	vin-supply = <&poe_12v>;
538c2ecf20Sopenharmony_ci};
548c2ecf20Sopenharmony_ci
558c2ecf20Sopenharmony_ci&pcie_phy {
568c2ecf20Sopenharmony_ci	status = "okay";
578c2ecf20Sopenharmony_ci};
588c2ecf20Sopenharmony_ci
598c2ecf20Sopenharmony_ci&pcie0 {
608c2ecf20Sopenharmony_ci	ep-gpios = <&gpio4 RK_PD1 GPIO_ACTIVE_HIGH>;
618c2ecf20Sopenharmony_ci	num-lanes = <4>;
628c2ecf20Sopenharmony_ci	pinctrl-names = "default";
638c2ecf20Sopenharmony_ci	pinctrl-0 = <&pcie_perst>;
648c2ecf20Sopenharmony_ci	vpcie3v3-supply = <&vcc3v3_pcie>;
658c2ecf20Sopenharmony_ci	vpcie1v8-supply = <&vcc1v8_pmu>;
668c2ecf20Sopenharmony_ci	vpcie0v9-supply = <&vcca_0v9>;
678c2ecf20Sopenharmony_ci	status = "okay";
688c2ecf20Sopenharmony_ci};
698c2ecf20Sopenharmony_ci
708c2ecf20Sopenharmony_ci&pinctrl {
718c2ecf20Sopenharmony_ci	ngff {
728c2ecf20Sopenharmony_ci		vcc3v3_ngff_en: vcc3v3-ngff-en {
738c2ecf20Sopenharmony_ci			rockchip,pins = <4 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
748c2ecf20Sopenharmony_ci		};
758c2ecf20Sopenharmony_ci	};
768c2ecf20Sopenharmony_ci
778c2ecf20Sopenharmony_ci	pcie {
788c2ecf20Sopenharmony_ci		vcc3v3_pcie_en: vcc3v3-pcie-en {
798c2ecf20Sopenharmony_ci			rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
808c2ecf20Sopenharmony_ci		};
818c2ecf20Sopenharmony_ci
828c2ecf20Sopenharmony_ci		pcie_perst: pcie-perst {
838c2ecf20Sopenharmony_ci			rockchip,pins = <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
848c2ecf20Sopenharmony_ci		};
858c2ecf20Sopenharmony_ci	};
868c2ecf20Sopenharmony_ci};
878c2ecf20Sopenharmony_ci
888c2ecf20Sopenharmony_ci&sdio0 {
898c2ecf20Sopenharmony_ci	bus-width = <4>;
908c2ecf20Sopenharmony_ci	cap-sd-highspeed;
918c2ecf20Sopenharmony_ci	cap-sdio-irq;
928c2ecf20Sopenharmony_ci	keep-power-in-suspend;
938c2ecf20Sopenharmony_ci	mmc-pwrseq = <&sdio_pwrseq>;
948c2ecf20Sopenharmony_ci	non-removable;
958c2ecf20Sopenharmony_ci	pinctrl-names = "default";
968c2ecf20Sopenharmony_ci	pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
978c2ecf20Sopenharmony_ci	sd-uhs-sdr104;
988c2ecf20Sopenharmony_ci	vmmc-supply = <&vcc3v3_ngff>;
998c2ecf20Sopenharmony_ci	vqmmc-supply = <&vcc_1v8>;
1008c2ecf20Sopenharmony_ci	status = "okay";
1018c2ecf20Sopenharmony_ci};
1028c2ecf20Sopenharmony_ci
1038c2ecf20Sopenharmony_ci&uart0 {
1048c2ecf20Sopenharmony_ci	pinctrl-names = "default";
1058c2ecf20Sopenharmony_ci	pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
1068c2ecf20Sopenharmony_ci	status = "okay";
1078c2ecf20Sopenharmony_ci};
108