Debian Codegraph @

scripts/dtc/include-prefixes/arm64/allwinner/sun50i-h313-tanix-tx1.dts

raw
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 /*
3 * Copyright (C) 2024 Arm Ltd.
4 */
5
6 /dts-v1/;
7
8 #include "sun50i-h616.dtsi"
9 #include "sun50i-h616-cpu-opp.dtsi"
10
11 #include <dt-bindings/gpio/gpio.h>
12 #include <dt-bindings/interrupt-controller/arm-gic.h>
13 #include <dt-bindings/input/linux-event-codes.h>
14 #include <dt-bindings/leds/common.h>
15
16 / {
17 model = "Tanix TX1";
18 compatible = "oranth,tanix-tx1", "allwinner,sun50i-h616";
19
20 aliases {
21 serial0 = &uart0;
22 ethernet0 = &sdio_wifi;
23 };
24
25 chosen {
26 stdout-path = "serial0:115200n8";
27 };
28
29 gpio-keys {
30 compatible = "gpio-keys";
31
32 key {
33 label = "hidden";
34 linux,code = <BTN_0>;
35 gpios = <&pio 7 9 GPIO_ACTIVE_LOW>; /* PH9 */
36 };
37 };
38
39 leds {
40 compatible = "gpio-leds";
41
42 led-0 {
43 function = LED_FUNCTION_POWER;
44 color = <LED_COLOR_ID_BLUE>;
45 gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
46 default-state = "on";
47 };
48 };
49
50 wifi_pwrseq: pwrseq {
51 compatible = "mmc-pwrseq-simple";
52 clocks = <&rtc CLK_OSC32K_FANOUT>;
53 clock-names = "ext_clock";
54 pinctrl-0 = <&x32clk_fanout_pin>;
55 pinctrl-names = "default";
56 reset-gpios = <&pio 6 18 GPIO_ACTIVE_LOW>; /* PG18 */
57 };
58
59 reg_vcc5v: vcc5v {
60 /* board wide 5V supply directly from the DC input */
61 compatible = "regulator-fixed";
62 regulator-name = "vcc-5v";
63 regulator-min-microvolt = <5000000>;
64 regulator-max-microvolt = <5000000>;
65 regulator-always-on;
66 };
67 };
68
69 &codec {
70 allwinner,audio-routing = "Line Out", "LINEOUT";
71 status = "okay";
72 };
73
74 &cpu0 {
75 cpu-supply = <&reg_dcdc2>;
76 };
77
78 &ehci0 {
79 status = "okay";
80 };
81
82 &gpu {
83 mali-supply = <&reg_dcdc1>;
84 status = "okay";
85 };
86
87 &ir {
88 status = "okay";
89 };
90
91 &mmc1 {
92 vmmc-supply = <&reg_dldo1>;
93 vqmmc-supply = <&reg_aldo1>;
94 mmc-pwrseq = <&wifi_pwrseq>;
95 bus-width = <4>;
96 non-removable;
97 status = "okay";
98
99 sdio_wifi: wifi@1 {
100 reg = <1>;
101 };
102 };
103
104 &mmc2 {
105 vmmc-supply = <&reg_dldo1>;
106 vqmmc-supply = <&reg_aldo1>;
107 bus-width = <8>;
108 non-removable;
109 max-frequency = <100000000>;
110 cap-mmc-hw-reset;
111 mmc-ddr-1_8v;
112 status = "okay";
113 };
114
115 &ohci0 {
116 status = "okay";
117 };
118
119 &pio {
120 vcc-pc-supply = <&reg_aldo1>;
121 vcc-pf-supply = <&reg_dldo1>;
122 vcc-pg-supply = <&reg_aldo1>;
123 vcc-ph-supply = <&reg_dldo1>;
124 vcc-pi-supply = <&reg_dldo1>;
125 };
126
127 &r_i2c {
128 status = "okay";
129
130 axp313: pmic@36 {
131 compatible = "x-powers,axp313a";
132 reg = <0x36>;
133 #interrupt-cells = <1>;
134 interrupt-controller;
135
136 vin1-supply = <&reg_vcc5v>;
137 vin2-supply = <&reg_vcc5v>;
138 vin3-supply = <&reg_vcc5v>;
139
140 regulators {
141 /* Supplies VCC-PLL, so needs to be always on. */
142 reg_aldo1: aldo1 {
143 regulator-always-on;
144 regulator-min-microvolt = <1800000>;
145 regulator-max-microvolt = <1800000>;
146 regulator-name = "vcc1v8";
147 };
148
149 /* Supplies VCC-IO, so needs to be always on. */
150 reg_dldo1: dldo1 {
151 regulator-always-on;
152 regulator-min-microvolt = <3300000>;
153 regulator-max-microvolt = <3300000>;
154 regulator-name = "vcc3v3";
155 };
156
157 reg_dcdc1: dcdc1 {
158 regulator-always-on;
159 regulator-min-microvolt = <810000>;
160 regulator-max-microvolt = <990000>;
161 regulator-name = "vdd-gpu-sys";
162 };
163
164 reg_dcdc2: dcdc2 {
165 regulator-always-on;
166 regulator-min-microvolt = <810000>;
167 regulator-max-microvolt = <1120000>;
168 regulator-name = "vdd-cpu";
169 };
170
171 reg_dcdc3: dcdc3 {
172 regulator-always-on;
173 regulator-min-microvolt = <1200000>;
174 regulator-max-microvolt = <1200000>;
175 regulator-name = "vdd-dram";
176 };
177 };
178 };
179 };
180
181 &uart0 {
182 pinctrl-names = "default";
183 pinctrl-0 = <&uart0_ph_pins>;
184 status = "okay";
185 };
186
187 &usbotg {
188 dr_mode = "host"; /* USB A type receptable */
189 status = "okay";
190 };
191
192 &usbphy {
193 status = "okay";
194 };