18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Copyright (c) 2018 Theobroma Systems Design und Consulting GmbH
48c2ecf20Sopenharmony_ci */
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ci/dts-v1/;
78c2ecf20Sopenharmony_ci#include "rk3368-lion.dtsi"
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci/ {
108c2ecf20Sopenharmony_ci	model = "Theobroma Systems RK3368-uQ7 Baseboard";
118c2ecf20Sopenharmony_ci	compatible = "tsd,rk3368-lion-haikou", "rockchip,rk3368";
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ci	chosen {
148c2ecf20Sopenharmony_ci		stdout-path = "serial0:115200n8";
158c2ecf20Sopenharmony_ci	};
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ci	i2cmux2 {
188c2ecf20Sopenharmony_ci		i2c@0 {
198c2ecf20Sopenharmony_ci			eeprom: eeprom@50 {
208c2ecf20Sopenharmony_ci				compatible = "atmel,24c01";
218c2ecf20Sopenharmony_ci				pagesize = <8>;
228c2ecf20Sopenharmony_ci				reg = <0x50>;
238c2ecf20Sopenharmony_ci			};
248c2ecf20Sopenharmony_ci		};
258c2ecf20Sopenharmony_ci	};
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ci	leds {
288c2ecf20Sopenharmony_ci		pinctrl-0 = <&module_led_pins>, <&sd_card_led_pin>;
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_ci		sd_card_led: led-3 {
318c2ecf20Sopenharmony_ci			label = "sd_card_led";
328c2ecf20Sopenharmony_ci			gpios = <&gpio0 RK_PD2 GPIO_ACTIVE_HIGH>;
338c2ecf20Sopenharmony_ci			linux,default-trigger = "mmc0";
348c2ecf20Sopenharmony_ci		};
358c2ecf20Sopenharmony_ci	};
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_ci	dc_12v: dc-12v {
388c2ecf20Sopenharmony_ci		compatible = "regulator-fixed";
398c2ecf20Sopenharmony_ci		regulator-name = "dc_12v";
408c2ecf20Sopenharmony_ci		regulator-always-on;
418c2ecf20Sopenharmony_ci		regulator-boot-on;
428c2ecf20Sopenharmony_ci		regulator-min-microvolt = <12000000>;
438c2ecf20Sopenharmony_ci		regulator-max-microvolt = <12000000>;
448c2ecf20Sopenharmony_ci	};
458c2ecf20Sopenharmony_ci
468c2ecf20Sopenharmony_ci	vcc3v3_baseboard: vcc3v3-baseboard {
478c2ecf20Sopenharmony_ci		compatible = "regulator-fixed";
488c2ecf20Sopenharmony_ci		regulator-name = "vcc3v3_baseboard";
498c2ecf20Sopenharmony_ci		regulator-always-on;
508c2ecf20Sopenharmony_ci		regulator-boot-on;
518c2ecf20Sopenharmony_ci		regulator-min-microvolt = <3300000>;
528c2ecf20Sopenharmony_ci		regulator-max-microvolt = <3300000>;
538c2ecf20Sopenharmony_ci		vin-supply = <&dc_12v>;
548c2ecf20Sopenharmony_ci	};
558c2ecf20Sopenharmony_ci
568c2ecf20Sopenharmony_ci	vcc5v0_otg: vcc5v0-otg-regulator {
578c2ecf20Sopenharmony_ci		compatible = "regulator-fixed";
588c2ecf20Sopenharmony_ci		enable-active-high;
598c2ecf20Sopenharmony_ci		gpio = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;
608c2ecf20Sopenharmony_ci		pinctrl-names = "default";
618c2ecf20Sopenharmony_ci		pinctrl-0 = <&otg_vbus_drv>;
628c2ecf20Sopenharmony_ci		regulator-name = "vcc5v0_otg";
638c2ecf20Sopenharmony_ci		regulator-always-on;
648c2ecf20Sopenharmony_ci	};
658c2ecf20Sopenharmony_ci};
668c2ecf20Sopenharmony_ci
678c2ecf20Sopenharmony_ci&sdmmc {
688c2ecf20Sopenharmony_ci	bus-width = <4>;
698c2ecf20Sopenharmony_ci	cap-mmc-highspeed;
708c2ecf20Sopenharmony_ci	cap-sd-highspeed;
718c2ecf20Sopenharmony_ci	cd-gpios = <&gpio2 RK_PB3 GPIO_ACTIVE_LOW>;
728c2ecf20Sopenharmony_ci	disable-wp;
738c2ecf20Sopenharmony_ci	max-frequency = <25000000>;
748c2ecf20Sopenharmony_ci	pinctrl-names = "default";
758c2ecf20Sopenharmony_ci	pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
768c2ecf20Sopenharmony_ci	rockchip,default-sample-phase = <90>;
778c2ecf20Sopenharmony_ci	vmmc-supply = <&vcc3v3_baseboard>;
788c2ecf20Sopenharmony_ci	status = "okay";
798c2ecf20Sopenharmony_ci};
808c2ecf20Sopenharmony_ci
818c2ecf20Sopenharmony_ci&spi2 {
828c2ecf20Sopenharmony_ci	cs-gpios = <0>, <&gpio2 RK_PC3 GPIO_ACTIVE_LOW>;
838c2ecf20Sopenharmony_ci	status = "okay";
848c2ecf20Sopenharmony_ci};
858c2ecf20Sopenharmony_ci
868c2ecf20Sopenharmony_ci&usb_otg {
878c2ecf20Sopenharmony_ci	dr_mode = "otg";
888c2ecf20Sopenharmony_ci	status = "okay";
898c2ecf20Sopenharmony_ci};
908c2ecf20Sopenharmony_ci
918c2ecf20Sopenharmony_ci&uart0 {
928c2ecf20Sopenharmony_ci	pinctrl-names = "default";
938c2ecf20Sopenharmony_ci	pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
948c2ecf20Sopenharmony_ci	status = "okay";
958c2ecf20Sopenharmony_ci};
968c2ecf20Sopenharmony_ci
978c2ecf20Sopenharmony_ci&uart1 {
988c2ecf20Sopenharmony_ci	/* alternate function of GPIO5/6 */
998c2ecf20Sopenharmony_ci	status = "disabled";
1008c2ecf20Sopenharmony_ci};
1018c2ecf20Sopenharmony_ci
1028c2ecf20Sopenharmony_ci&pinctrl {
1038c2ecf20Sopenharmony_ci	pinctrl-names = "default";
1048c2ecf20Sopenharmony_ci	pinctrl-0 = <&haikou_pin_hog>;
1058c2ecf20Sopenharmony_ci
1068c2ecf20Sopenharmony_ci	hog {
1078c2ecf20Sopenharmony_ci		haikou_pin_hog: haikou-pin-hog {
1088c2ecf20Sopenharmony_ci			rockchip,pins =
1098c2ecf20Sopenharmony_ci				/* LID_BTN */
1108c2ecf20Sopenharmony_ci				<3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>,
1118c2ecf20Sopenharmony_ci				/* BATLOW# */
1128c2ecf20Sopenharmony_ci				<0 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>,
1138c2ecf20Sopenharmony_ci				/* SLP_BTN# */
1148c2ecf20Sopenharmony_ci				<3 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>,
1158c2ecf20Sopenharmony_ci				/* BIOS_DISABLE# */
1168c2ecf20Sopenharmony_ci				<3 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
1178c2ecf20Sopenharmony_ci		};
1188c2ecf20Sopenharmony_ci	};
1198c2ecf20Sopenharmony_ci
1208c2ecf20Sopenharmony_ci	leds {
1218c2ecf20Sopenharmony_ci		sd_card_led_pin: sd-card-led-pin {
1228c2ecf20Sopenharmony_ci			rockchip,pins =
1238c2ecf20Sopenharmony_ci				<0 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
1248c2ecf20Sopenharmony_ci		};
1258c2ecf20Sopenharmony_ci	};
1268c2ecf20Sopenharmony_ci
1278c2ecf20Sopenharmony_ci	sdmmc {
1288c2ecf20Sopenharmony_ci		sdmmc_cd_pin: sdmmc-cd-pin {
1298c2ecf20Sopenharmony_ci			rockchip,pins =
1308c2ecf20Sopenharmony_ci				<2 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
1318c2ecf20Sopenharmony_ci		};
1328c2ecf20Sopenharmony_ci	};
1338c2ecf20Sopenharmony_ci
1348c2ecf20Sopenharmony_ci	usb_otg {
1358c2ecf20Sopenharmony_ci		otg_vbus_drv: otg-vbus-drv {
1368c2ecf20Sopenharmony_ci			rockchip,pins =
1378c2ecf20Sopenharmony_ci				<0 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
1388c2ecf20Sopenharmony_ci		};
1398c2ecf20Sopenharmony_ci	};
1408c2ecf20Sopenharmony_ci};
141