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