1*7705ce5aSSamuel Holland// SPDX-License-Identifier: (GPL-2.0+ or MIT)
2*7705ce5aSSamuel Holland// Copyright (C) 2022 Jisheng Zhang <jszhang@kernel.org>
3*7705ce5aSSamuel Holland// Copyright (C) 2022 Samuel Holland <samuel@sholland.org>
4*7705ce5aSSamuel Holland
5*7705ce5aSSamuel Holland#include <dt-bindings/gpio/gpio.h>
6*7705ce5aSSamuel Holland#include <dt-bindings/leds/common.h>
7*7705ce5aSSamuel Holland
8*7705ce5aSSamuel Holland/dts-v1/;
9*7705ce5aSSamuel Holland
10*7705ce5aSSamuel Holland#include "sun20i-d1.dtsi"
11*7705ce5aSSamuel Holland#include "sun20i-common-regulators.dtsi"
12*7705ce5aSSamuel Holland
13*7705ce5aSSamuel Holland/ {
14*7705ce5aSSamuel Holland	model = "Sipeed Lichee RV";
15*7705ce5aSSamuel Holland	compatible = "sipeed,lichee-rv", "allwinner,sun20i-d1";
16*7705ce5aSSamuel Holland
17*7705ce5aSSamuel Holland	aliases {
18*7705ce5aSSamuel Holland		serial0 = &uart0;
19*7705ce5aSSamuel Holland	};
20*7705ce5aSSamuel Holland
21*7705ce5aSSamuel Holland	chosen {
22*7705ce5aSSamuel Holland		stdout-path = "serial0:115200n8";
23*7705ce5aSSamuel Holland	};
24*7705ce5aSSamuel Holland
25*7705ce5aSSamuel Holland	leds {
26*7705ce5aSSamuel Holland		compatible = "gpio-leds";
27*7705ce5aSSamuel Holland
28*7705ce5aSSamuel Holland		led-0 {
29*7705ce5aSSamuel Holland			color = <LED_COLOR_ID_GREEN>;
30*7705ce5aSSamuel Holland			function = LED_FUNCTION_STATUS;
31*7705ce5aSSamuel Holland			gpios = <&pio 2 1 GPIO_ACTIVE_HIGH>; /* PC1 */
32*7705ce5aSSamuel Holland		};
33*7705ce5aSSamuel Holland	};
34*7705ce5aSSamuel Holland
35*7705ce5aSSamuel Holland	reg_vdd_cpu: vdd-cpu {
36*7705ce5aSSamuel Holland		compatible = "regulator-fixed";
37*7705ce5aSSamuel Holland		regulator-name = "vdd-cpu";
38*7705ce5aSSamuel Holland		regulator-min-microvolt = <900000>;
39*7705ce5aSSamuel Holland		regulator-max-microvolt = <900000>;
40*7705ce5aSSamuel Holland		vin-supply = <&reg_vcc>;
41*7705ce5aSSamuel Holland	};
42*7705ce5aSSamuel Holland};
43*7705ce5aSSamuel Holland
44*7705ce5aSSamuel Holland&cpu0 {
45*7705ce5aSSamuel Holland	cpu-supply = <&reg_vdd_cpu>;
46*7705ce5aSSamuel Holland};
47*7705ce5aSSamuel Holland
48*7705ce5aSSamuel Holland&dcxo {
49*7705ce5aSSamuel Holland	clock-frequency = <24000000>;
50*7705ce5aSSamuel Holland};
51*7705ce5aSSamuel Holland
52*7705ce5aSSamuel Holland&ehci0 {
53*7705ce5aSSamuel Holland	status = "okay";
54*7705ce5aSSamuel Holland};
55*7705ce5aSSamuel Holland
56*7705ce5aSSamuel Holland&mmc0 {
57*7705ce5aSSamuel Holland	broken-cd;
58*7705ce5aSSamuel Holland	bus-width = <4>;
59*7705ce5aSSamuel Holland	disable-wp;
60*7705ce5aSSamuel Holland	vmmc-supply = <&reg_vcc_3v3>;
61*7705ce5aSSamuel Holland	vqmmc-supply = <&reg_vcc_3v3>;
62*7705ce5aSSamuel Holland	pinctrl-0 = <&mmc0_pins>;
63*7705ce5aSSamuel Holland	pinctrl-names = "default";
64*7705ce5aSSamuel Holland	status = "okay";
65*7705ce5aSSamuel Holland};
66*7705ce5aSSamuel Holland
67*7705ce5aSSamuel Holland&ohci0 {
68*7705ce5aSSamuel Holland	status = "okay";
69*7705ce5aSSamuel Holland};
70*7705ce5aSSamuel Holland
71*7705ce5aSSamuel Holland&uart0 {
72*7705ce5aSSamuel Holland	pinctrl-0 = <&uart0_pb8_pins>;
73*7705ce5aSSamuel Holland	pinctrl-names = "default";
74*7705ce5aSSamuel Holland	status = "okay";
75*7705ce5aSSamuel Holland};
76*7705ce5aSSamuel Holland
77*7705ce5aSSamuel Holland&usb_otg {
78*7705ce5aSSamuel Holland	dr_mode = "otg";
79*7705ce5aSSamuel Holland	status = "okay";
80*7705ce5aSSamuel Holland};
81*7705ce5aSSamuel Holland
82*7705ce5aSSamuel Holland&usbphy {
83*7705ce5aSSamuel Holland	usb0_id_det-gpios = <&pio 3 21 GPIO_ACTIVE_HIGH>; /* PD21 */
84*7705ce5aSSamuel Holland	usb0_vbus_det-gpios = <&pio 3 20 GPIO_ACTIVE_HIGH>; /* PD20 */
85*7705ce5aSSamuel Holland	usb0_vbus-supply = <&reg_vcc>;
86*7705ce5aSSamuel Holland	status = "okay";
87*7705ce5aSSamuel Holland};
88