10aaf2359SKlaus Goger// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
20aaf2359SKlaus Goger/*
30aaf2359SKlaus Goger * Copyright (c) 2018 Theobroma Systems Design und Consulting GmbH
40aaf2359SKlaus Goger */
50aaf2359SKlaus Goger
60aaf2359SKlaus Goger/dts-v1/;
70aaf2359SKlaus Goger#include "rk3368-lion.dtsi"
80aaf2359SKlaus Goger
90aaf2359SKlaus Goger/ {
100aaf2359SKlaus Goger	model = "Theobroma Systems RK3368-uQ7 Baseboard";
110aaf2359SKlaus Goger	compatible = "tsd,rk3368-lion-haikou", "rockchip,rk3368";
120aaf2359SKlaus Goger
13*751a78a8SHeiko Stuebner	aliases {
14*751a78a8SHeiko Stuebner		mmc1 = &sdmmc;
15*751a78a8SHeiko Stuebner	};
16*751a78a8SHeiko Stuebner
170aaf2359SKlaus Goger	chosen {
180aaf2359SKlaus Goger		stdout-path = "serial0:115200n8";
190aaf2359SKlaus Goger	};
200aaf2359SKlaus Goger
210aaf2359SKlaus Goger	i2cmux2 {
220aaf2359SKlaus Goger		i2c@0 {
230aaf2359SKlaus Goger			eeprom: eeprom@50 {
240aaf2359SKlaus Goger				compatible = "atmel,24c01";
250aaf2359SKlaus Goger				pagesize = <8>;
260aaf2359SKlaus Goger				reg = <0x50>;
270aaf2359SKlaus Goger			};
280aaf2359SKlaus Goger		};
290aaf2359SKlaus Goger	};
300aaf2359SKlaus Goger
310aaf2359SKlaus Goger	leds {
326dd5e12cSJohan Jonker		pinctrl-0 = <&module_led_pins>, <&sd_card_led_pin>;
330aaf2359SKlaus Goger
346dd5e12cSJohan Jonker		sd_card_led: led-3 {
350aaf2359SKlaus Goger			label = "sd_card_led";
360aaf2359SKlaus Goger			gpios = <&gpio0 RK_PD2 GPIO_ACTIVE_HIGH>;
370aaf2359SKlaus Goger			linux,default-trigger = "mmc0";
380aaf2359SKlaus Goger		};
390aaf2359SKlaus Goger	};
400aaf2359SKlaus Goger
410aaf2359SKlaus Goger	dc_12v: dc-12v {
420aaf2359SKlaus Goger		compatible = "regulator-fixed";
430aaf2359SKlaus Goger		regulator-name = "dc_12v";
440aaf2359SKlaus Goger		regulator-always-on;
450aaf2359SKlaus Goger		regulator-boot-on;
460aaf2359SKlaus Goger		regulator-min-microvolt = <12000000>;
470aaf2359SKlaus Goger		regulator-max-microvolt = <12000000>;
480aaf2359SKlaus Goger	};
490aaf2359SKlaus Goger
500aaf2359SKlaus Goger	vcc3v3_baseboard: vcc3v3-baseboard {
510aaf2359SKlaus Goger		compatible = "regulator-fixed";
520aaf2359SKlaus Goger		regulator-name = "vcc3v3_baseboard";
530aaf2359SKlaus Goger		regulator-always-on;
540aaf2359SKlaus Goger		regulator-boot-on;
550aaf2359SKlaus Goger		regulator-min-microvolt = <3300000>;
560aaf2359SKlaus Goger		regulator-max-microvolt = <3300000>;
570aaf2359SKlaus Goger		vin-supply = <&dc_12v>;
580aaf2359SKlaus Goger	};
590aaf2359SKlaus Goger
600aaf2359SKlaus Goger	vcc5v0_otg: vcc5v0-otg-regulator {
610aaf2359SKlaus Goger		compatible = "regulator-fixed";
620aaf2359SKlaus Goger		enable-active-high;
630aaf2359SKlaus Goger		gpio = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;
640aaf2359SKlaus Goger		pinctrl-names = "default";
650aaf2359SKlaus Goger		pinctrl-0 = <&otg_vbus_drv>;
660aaf2359SKlaus Goger		regulator-name = "vcc5v0_otg";
670aaf2359SKlaus Goger		regulator-always-on;
680aaf2359SKlaus Goger	};
690aaf2359SKlaus Goger};
700aaf2359SKlaus Goger
710aaf2359SKlaus Goger&sdmmc {
720aaf2359SKlaus Goger	bus-width = <4>;
730aaf2359SKlaus Goger	cap-mmc-highspeed;
740aaf2359SKlaus Goger	cap-sd-highspeed;
750aaf2359SKlaus Goger	cd-gpios = <&gpio2 RK_PB3 GPIO_ACTIVE_LOW>;
760aaf2359SKlaus Goger	disable-wp;
770aaf2359SKlaus Goger	max-frequency = <25000000>;
780aaf2359SKlaus Goger	pinctrl-names = "default";
790aaf2359SKlaus Goger	pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
800aaf2359SKlaus Goger	rockchip,default-sample-phase = <90>;
810aaf2359SKlaus Goger	vmmc-supply = <&vcc3v3_baseboard>;
820aaf2359SKlaus Goger	status = "okay";
830aaf2359SKlaus Goger};
840aaf2359SKlaus Goger
850aaf2359SKlaus Goger&spi2 {
860aaf2359SKlaus Goger	cs-gpios = <0>, <&gpio2 RK_PC3 GPIO_ACTIVE_LOW>;
870aaf2359SKlaus Goger	status = "okay";
880aaf2359SKlaus Goger};
890aaf2359SKlaus Goger
900aaf2359SKlaus Goger&usb_otg {
910aaf2359SKlaus Goger	dr_mode = "otg";
920aaf2359SKlaus Goger	status = "okay";
930aaf2359SKlaus Goger};
940aaf2359SKlaus Goger
950aaf2359SKlaus Goger&uart0 {
960aaf2359SKlaus Goger	pinctrl-names = "default";
970aaf2359SKlaus Goger	pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
980aaf2359SKlaus Goger	status = "okay";
990aaf2359SKlaus Goger};
1000aaf2359SKlaus Goger
1010aaf2359SKlaus Goger&uart1 {
1020aaf2359SKlaus Goger	/* alternate function of GPIO5/6 */
1030aaf2359SKlaus Goger	status = "disabled";
1040aaf2359SKlaus Goger};
1050aaf2359SKlaus Goger
1060aaf2359SKlaus Goger&pinctrl {
1070aaf2359SKlaus Goger	pinctrl-names = "default";
1080aaf2359SKlaus Goger	pinctrl-0 = <&haikou_pin_hog>;
1090aaf2359SKlaus Goger
1100aaf2359SKlaus Goger	hog {
1110aaf2359SKlaus Goger		haikou_pin_hog: haikou-pin-hog {
1120aaf2359SKlaus Goger			rockchip,pins =
1130aaf2359SKlaus Goger				/* LID_BTN */
114d64420e8SHeiko Stuebner				<3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>,
1150aaf2359SKlaus Goger				/* BATLOW# */
116d64420e8SHeiko Stuebner				<0 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>,
1170aaf2359SKlaus Goger				/* SLP_BTN# */
118d64420e8SHeiko Stuebner				<3 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>,
1190aaf2359SKlaus Goger				/* BIOS_DISABLE# */
120d64420e8SHeiko Stuebner				<3 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
1210aaf2359SKlaus Goger		};
1220aaf2359SKlaus Goger	};
1230aaf2359SKlaus Goger
1240aaf2359SKlaus Goger	leds {
1256dd5e12cSJohan Jonker		sd_card_led_pin: sd-card-led-pin {
1260aaf2359SKlaus Goger			rockchip,pins =
127d64420e8SHeiko Stuebner				<0 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
1280aaf2359SKlaus Goger		};
1290aaf2359SKlaus Goger	};
1300aaf2359SKlaus Goger
1310aaf2359SKlaus Goger	sdmmc {
1322bc65fefSJohan Jonker		sdmmc_cd_pin: sdmmc-cd-pin {
1330aaf2359SKlaus Goger			rockchip,pins =
134d64420e8SHeiko Stuebner				<2 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
1350aaf2359SKlaus Goger		};
1360aaf2359SKlaus Goger	};
1370aaf2359SKlaus Goger
1380aaf2359SKlaus Goger	usb_otg {
1390aaf2359SKlaus Goger		otg_vbus_drv: otg-vbus-drv {
1400aaf2359SKlaus Goger			rockchip,pins =
141d64420e8SHeiko Stuebner				<0 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
1420aaf2359SKlaus Goger		};
1430aaf2359SKlaus Goger	};
1440aaf2359SKlaus Goger};
145