1*7705ce5aSSamuel Holland// SPDX-License-Identifier: (GPL-2.0+ or MIT)
2*7705ce5aSSamuel Holland// Copyright (C) 2022 Samuel Holland <samuel@sholland.org>
3*7705ce5aSSamuel Holland
4*7705ce5aSSamuel Holland#include "sun20i-d1-lichee-rv.dts"
5*7705ce5aSSamuel Holland
6*7705ce5aSSamuel Holland/ {
7*7705ce5aSSamuel Holland	aliases {
8*7705ce5aSSamuel Holland		ethernet0 = &emac;
9*7705ce5aSSamuel Holland		ethernet1 = &xr829;
10*7705ce5aSSamuel Holland	};
11*7705ce5aSSamuel Holland
12*7705ce5aSSamuel Holland	dmic_codec: dmic-codec {
13*7705ce5aSSamuel Holland		compatible = "dmic-codec";
14*7705ce5aSSamuel Holland		num-channels = <2>;
15*7705ce5aSSamuel Holland		#sound-dai-cells = <0>;
16*7705ce5aSSamuel Holland	};
17*7705ce5aSSamuel Holland
18*7705ce5aSSamuel Holland	dmic-sound {
19*7705ce5aSSamuel Holland		compatible = "simple-audio-card";
20*7705ce5aSSamuel Holland		simple-audio-card,name = "DMIC";
21*7705ce5aSSamuel Holland		#address-cells = <1>;
22*7705ce5aSSamuel Holland		#size-cells = <0>;
23*7705ce5aSSamuel Holland
24*7705ce5aSSamuel Holland		simple-audio-card,dai-link@0 {
25*7705ce5aSSamuel Holland			reg = <0>;
26*7705ce5aSSamuel Holland			format = "pdm";
27*7705ce5aSSamuel Holland			frame-master = <&link0_cpu>;
28*7705ce5aSSamuel Holland			bitclock-master = <&link0_cpu>;
29*7705ce5aSSamuel Holland
30*7705ce5aSSamuel Holland			link0_cpu: cpu {
31*7705ce5aSSamuel Holland				sound-dai = <&dmic>;
32*7705ce5aSSamuel Holland			};
33*7705ce5aSSamuel Holland
34*7705ce5aSSamuel Holland			link0_codec: codec {
35*7705ce5aSSamuel Holland				sound-dai = <&dmic_codec>;
36*7705ce5aSSamuel Holland			};
37*7705ce5aSSamuel Holland		};
38*7705ce5aSSamuel Holland	};
39*7705ce5aSSamuel Holland
40*7705ce5aSSamuel Holland	/* PC1 is repurposed as BT_WAKE_AP */
41*7705ce5aSSamuel Holland	/delete-node/ leds;
42*7705ce5aSSamuel Holland
43*7705ce5aSSamuel Holland	wifi_pwrseq: wifi-pwrseq {
44*7705ce5aSSamuel Holland		compatible = "mmc-pwrseq-simple";
45*7705ce5aSSamuel Holland		clocks = <&ccu CLK_FANOUT1>;
46*7705ce5aSSamuel Holland		clock-names = "ext_clock";
47*7705ce5aSSamuel Holland		reset-gpios = <&pio 6 12 GPIO_ACTIVE_LOW>; /* PG12 */
48*7705ce5aSSamuel Holland		assigned-clocks = <&ccu CLK_FANOUT1>;
49*7705ce5aSSamuel Holland		assigned-clock-rates = <32768>;
50*7705ce5aSSamuel Holland		pinctrl-0 = <&clk_pg11_pin>;
51*7705ce5aSSamuel Holland		pinctrl-names = "default";
52*7705ce5aSSamuel Holland	};
53*7705ce5aSSamuel Holland};
54*7705ce5aSSamuel Holland
55*7705ce5aSSamuel Holland&dmic {
56*7705ce5aSSamuel Holland	pinctrl-0 = <&dmic_pb11_d0_pin>, <&dmic_pe17_clk_pin>;
57*7705ce5aSSamuel Holland	pinctrl-names = "default";
58*7705ce5aSSamuel Holland	status = "okay";
59*7705ce5aSSamuel Holland};
60*7705ce5aSSamuel Holland
61*7705ce5aSSamuel Holland&ehci1 {
62*7705ce5aSSamuel Holland	status = "okay";
63*7705ce5aSSamuel Holland};
64*7705ce5aSSamuel Holland
65*7705ce5aSSamuel Holland&emac {
66*7705ce5aSSamuel Holland	pinctrl-0 = <&rmii_pe_pins>;
67*7705ce5aSSamuel Holland	pinctrl-names = "default";
68*7705ce5aSSamuel Holland	phy-handle = <&ext_rmii_phy>;
69*7705ce5aSSamuel Holland	phy-mode = "rmii";
70*7705ce5aSSamuel Holland	phy-supply = <&reg_vcc_3v3>;
71*7705ce5aSSamuel Holland	status = "okay";
72*7705ce5aSSamuel Holland};
73*7705ce5aSSamuel Holland
74*7705ce5aSSamuel Holland&mdio {
75*7705ce5aSSamuel Holland	ext_rmii_phy: ethernet-phy@1 {
76*7705ce5aSSamuel Holland		compatible = "ethernet-phy-ieee802.3-c22";
77*7705ce5aSSamuel Holland		reg = <1>;
78*7705ce5aSSamuel Holland		reset-gpios = <&pio 4 16 GPIO_ACTIVE_LOW>; /* PE16 */
79*7705ce5aSSamuel Holland	};
80*7705ce5aSSamuel Holland};
81*7705ce5aSSamuel Holland
82*7705ce5aSSamuel Holland&mmc1 {
83*7705ce5aSSamuel Holland	bus-width = <4>;
84*7705ce5aSSamuel Holland	mmc-pwrseq = <&wifi_pwrseq>;
85*7705ce5aSSamuel Holland	non-removable;
86*7705ce5aSSamuel Holland	vmmc-supply = <&reg_vcc_3v3>;
87*7705ce5aSSamuel Holland	vqmmc-supply = <&reg_vcc_3v3>;
88*7705ce5aSSamuel Holland	pinctrl-0 = <&mmc1_pins>;
89*7705ce5aSSamuel Holland	pinctrl-names = "default";
90*7705ce5aSSamuel Holland	status = "okay";
91*7705ce5aSSamuel Holland
92*7705ce5aSSamuel Holland	xr829: wifi@1 {
93*7705ce5aSSamuel Holland		reg = <1>;
94*7705ce5aSSamuel Holland	};
95*7705ce5aSSamuel Holland};
96*7705ce5aSSamuel Holland
97*7705ce5aSSamuel Holland&ohci1 {
98*7705ce5aSSamuel Holland	status = "okay";
99*7705ce5aSSamuel Holland};
100*7705ce5aSSamuel Holland
101*7705ce5aSSamuel Holland&uart1 {
102*7705ce5aSSamuel Holland	uart-has-rtscts;
103*7705ce5aSSamuel Holland	pinctrl-0 = <&uart1_pg6_pins>, <&uart1_pg8_rts_cts_pins>;
104*7705ce5aSSamuel Holland	pinctrl-names = "default";
105*7705ce5aSSamuel Holland	status = "okay";
106*7705ce5aSSamuel Holland
107*7705ce5aSSamuel Holland	/* XR829 bluetooth is connected here */
108*7705ce5aSSamuel Holland};
109*7705ce5aSSamuel Holland
110*7705ce5aSSamuel Holland&usb_otg {
111*7705ce5aSSamuel Holland	status = "disabled";
112*7705ce5aSSamuel Holland};
113*7705ce5aSSamuel Holland
114*7705ce5aSSamuel Holland&usbphy {
115*7705ce5aSSamuel Holland	/* PD20 and PD21 are repurposed for the LCD panel */
116*7705ce5aSSamuel Holland	/delete-property/ usb0_id_det-gpios;
117*7705ce5aSSamuel Holland	/delete-property/ usb0_vbus_det-gpios;
118*7705ce5aSSamuel Holland	usb1_vbus-supply = <&reg_vcc>;
119*7705ce5aSSamuel Holland};
120