Linux-libre 5.4.49-gnu
[librecmc/linux-libre.git] / arch / arm64 / boot / dts / rockchip / rk3368-lion-haikou.dts
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 /*
3  * Copyright (c) 2018 Theobroma Systems Design und Consulting GmbH
4  */
5
6 /dts-v1/;
7 #include "rk3368-lion.dtsi"
8
9 / {
10         model = "Theobroma Systems RK3368-uQ7 Baseboard";
11         compatible = "tsd,rk3368-lion-haikou", "rockchip,rk3368";
12
13         chosen {
14                 stdout-path = "serial0:115200n8";
15         };
16
17         i2cmux2 {
18                 i2c@0 {
19                         eeprom: eeprom@50 {
20                                 compatible = "atmel,24c01";
21                                 pagesize = <8>;
22                                 reg = <0x50>;
23                         };
24                 };
25         };
26
27         leds {
28                 pinctrl-0 = <&led_pins_module>, <&led_sd_haikou>;
29
30                 sd-card-led {
31                         label = "sd_card_led";
32                         gpios = <&gpio0 RK_PD2 GPIO_ACTIVE_HIGH>;
33                         linux,default-trigger = "mmc0";
34                 };
35         };
36
37         dc_12v: dc-12v {
38                 compatible = "regulator-fixed";
39                 regulator-name = "dc_12v";
40                 regulator-always-on;
41                 regulator-boot-on;
42                 regulator-min-microvolt = <12000000>;
43                 regulator-max-microvolt = <12000000>;
44         };
45
46         vcc3v3_baseboard: vcc3v3-baseboard {
47                 compatible = "regulator-fixed";
48                 regulator-name = "vcc3v3_baseboard";
49                 regulator-always-on;
50                 regulator-boot-on;
51                 regulator-min-microvolt = <3300000>;
52                 regulator-max-microvolt = <3300000>;
53                 vin-supply = <&dc_12v>;
54         };
55
56         vcc5v0_otg: vcc5v0-otg-regulator {
57                 compatible = "regulator-fixed";
58                 enable-active-high;
59                 gpio = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;
60                 pinctrl-names = "default";
61                 pinctrl-0 = <&otg_vbus_drv>;
62                 regulator-name = "vcc5v0_otg";
63                 regulator-always-on;
64         };
65 };
66
67 &sdmmc {
68         bus-width = <4>;
69         cap-mmc-highspeed;
70         cap-sd-highspeed;
71         cd-gpios = <&gpio2 RK_PB3 GPIO_ACTIVE_LOW>;
72         disable-wp;
73         max-frequency = <25000000>;
74         pinctrl-names = "default";
75         pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
76         rockchip,default-sample-phase = <90>;
77         vmmc-supply = <&vcc3v3_baseboard>;
78         status = "okay";
79 };
80
81 &spi2 {
82         cs-gpios = <0>, <&gpio2 RK_PC3 GPIO_ACTIVE_LOW>;
83         status = "okay";
84 };
85
86 &uart0 {
87         pinctrl-names = "default";
88         pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
89         status = "okay";
90 };
91
92 &usb_otg {
93         dr_mode = "otg";
94         status = "okay";
95 };
96
97 &uart0 {
98         pinctrl-names = "default";
99         pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
100         status = "okay";
101 };
102
103 &uart1 {
104         /* alternate function of GPIO5/6 */
105         status = "disabled";
106 };
107
108 &pinctrl {
109         pinctrl-names = "default";
110         pinctrl-0 = <&haikou_pin_hog>;
111
112         hog {
113                 haikou_pin_hog: haikou-pin-hog {
114                         rockchip,pins =
115                                 /* LID_BTN */
116                                 <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>,
117                                 /* BATLOW# */
118                                 <0 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>,
119                                 /* SLP_BTN# */
120                                 <3 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>,
121                                 /* BIOS_DISABLE# */
122                                 <3 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
123                 };
124         };
125
126         leds {
127                 led_sd_haikou: led-sd-gpio {
128                         rockchip,pins =
129                                 <0 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
130                 };
131         };
132
133         sdmmc {
134                 sdmmc_cd_gpio: sdmmc-cd-gpio {
135                         rockchip,pins =
136                                 <2 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
137                 };
138         };
139
140         usb_otg {
141                 otg_vbus_drv: otg-vbus-drv {
142                         rockchip,pins =
143                                 <0 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
144                 };
145         };
146 };