1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (c) 2019 BayLibre SAS.
4 * Author: Jerome Brunet <jbrunet@baylibre.com>
7 /* Libretech Amlogic GX PC form factor - AKA: Tartiflette */
9 #include <dt-bindings/input/input.h>
10 #include <dt-bindings/leds/common.h>
11 #include <dt-bindings/sound/meson-aiu.h>
15 compatible = "adc-keys";
16 io-channels = <&saradc 0>;
17 io-channel-names = "buttons";
18 keyup-threshold-microvolt = <1800000>;
22 linux,code = <KEY_VENDOR>;
23 press-threshold-microvolt = <1300000>;
34 stdout-path = "serial0:115200n8";
38 compatible = "composite-video-connector";
42 cvbs_connector_in: endpoint {
43 remote-endpoint = <&cvbs_vdac_out>;
48 emmc_pwrseq: emmc-pwrseq {
49 compatible = "mmc-pwrseq-emmc";
50 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
54 compatible = "hdmi-connector";
58 hdmi_connector_in: endpoint {
59 remote-endpoint = <&hdmi_tx_tmds_out>;
65 compatible = "gpio-keys-polled";
66 poll-interval = <100>;
70 linux,code = <KEY_POWER>;
71 gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>;
76 device_type = "memory";
77 reg = <0x0 0x0 0x0 0x80000000>;
80 ao_5v: regulator-ao_5v {
81 compatible = "regulator-fixed";
82 regulator-name = "AO_5V";
83 regulator-min-microvolt = <5000000>;
84 regulator-max-microvolt = <5000000>;
85 vin-supply = <&dc_in>;
89 dc_in: regulator-dc_in {
90 compatible = "regulator-fixed";
91 regulator-name = "DC_IN";
92 regulator-min-microvolt = <5000000>;
93 regulator-max-microvolt = <5000000>;
98 compatible = "gpio-leds";
101 color = <LED_COLOR_ID_GREEN>;
102 function = LED_FUNCTION_DISK_ACTIVITY;
103 gpios = <&gpio_ao GPIOAO_9 GPIO_ACTIVE_HIGH>;
104 linux,default-trigger = "disk-activity";
108 color = <LED_COLOR_ID_BLUE>;
109 function = LED_FUNCTION_STATUS;
110 gpios = <&gpio GPIODV_28 GPIO_ACTIVE_HIGH>;
111 linux,default-trigger = "heartbeat";
116 vcc_card: regulator-vcc_card {
117 compatible = "regulator-fixed";
118 regulator-name = "VCC_CARD";
119 regulator-min-microvolt = <3300000>;
120 regulator-max-microvolt = <3300000>;
121 vin-supply = <&vddio_ao3v3>;
123 gpio = <&gpio GPIODV_4 GPIO_ACTIVE_HIGH>;
127 vcc5v: regulator-vcc5v {
128 compatible = "regulator-fixed";
129 regulator-name = "VCC5V";
130 regulator-min-microvolt = <5000000>;
131 regulator-max-microvolt = <5000000>;
132 vin-supply = <&ao_5v>;
134 gpio = <&gpio GPIOH_3 GPIO_OPEN_DRAIN>;
137 vddio_ao18: regulator-vddio_ao18 {
138 compatible = "regulator-fixed";
139 regulator-name = "VDDIO_AO18";
140 regulator-min-microvolt = <1800000>;
141 regulator-max-microvolt = <1800000>;
142 vin-supply = <&ao_5v>;
146 vddio_ao3v3: regulator-vddio_ao3v3 {
147 compatible = "regulator-fixed";
148 regulator-name = "VDDIO_AO3V3";
149 regulator-min-microvolt = <3300000>;
150 regulator-max-microvolt = <3300000>;
151 vin-supply = <&ao_5v>;
155 vddio_boot: regulator-vddio_boot {
156 compatible = "regulator-fixed";
157 regulator-name = "VDDIO_BOOT";
158 regulator-min-microvolt = <1800000>;
159 regulator-max-microvolt = <1800000>;
160 vin-supply = <&vddio_ao3v3>;
164 vddio_card: regulator-vddio-card {
165 compatible = "regulator-gpio";
166 regulator-name = "VDDIO_CARD";
167 regulator-min-microvolt = <1800000>;
168 regulator-max-microvolt = <3300000>;
170 gpios = <&gpio GPIODV_5 GPIO_ACTIVE_HIGH>;
173 states = <3300000 0>,
176 regulator-settling-time-up-us = <200>;
177 regulator-settling-time-down-us = <50000>;
181 compatible = "amlogic,gx-sound-card";
182 model = "GXL-LIBRETECH-S9XX-PC";
183 assigned-clocks = <&clkc CLKID_MPLL0>,
186 assigned-clock-parents = <0>, <0>, <0>;
187 assigned-clock-rates = <294912000>,
193 sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
197 sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;
202 sound-dai = <&aiu AIU_HDMI CTRL_I2S>;
207 sound-dai = <&aiu AIU_HDMI CTRL_OUT>;
210 sound-dai = <&hdmi_tx>;
221 pinctrl-0 = <&ao_cec_pins>;
222 pinctrl-names = "default";
223 hdmi-phandle = <&hdmi_tx>;
228 cvbs_vdac_out: endpoint {
229 remote-endpoint = <&cvbs_connector_in>;
234 pinctrl-0 = <ð_pins>, <ð_phy_irq_pins>;
235 pinctrl-names = "default";
236 phy-handle = <&external_phy>;
237 amlogic,tx-delay-ns = <2>;
243 external_phy: ethernet-phy@0 {
246 reset-assert-us = <10000>;
247 reset-deassert-us = <30000>;
248 reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
249 interrupt-parent = <&gpio_intc>;
250 interrupts = <25 IRQ_TYPE_LEVEL_LOW>;
256 * Make sure the reset pin of the usb HUB is driven high to take
259 usb1_rst_pins: usb1_rst_irq {
262 function = "gpio_periphs";
268 /* Make sure the phy irq pin is properly configured as input */
269 eth_phy_irq_pins: eth_phy_irq {
272 function = "gpio_periphs";
280 pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
281 pinctrl-names = "default";
282 hdmi-supply = <&vcc5v>;
287 hdmi_tx_tmds_out: endpoint {
288 remote-endpoint = <&hdmi_connector_in>;
293 pinctrl-0 = <&remote_input_ao_pins>;
294 pinctrl-names = "default";
299 pinctrl-0 = <&i2c_c_dv18_pins>;
300 pinctrl-names = "default";
305 compatible = "nxp,pcf8563";
307 clock-output-names = "rtc_clkout";
312 pinctrl-0 = <&pwm_ao_a_3_pins>;
313 pinctrl-names = "default";
314 clocks = <&clkc CLKID_FCLK_DIV4>;
315 clock-names = "clkin0";
320 pinctrl-0 = <&pwm_b_pins>;
321 pinctrl-names = "default";
322 clocks = <&clkc CLKID_FCLK_DIV4>;
323 clock-names = "clkin0";
328 pinctrl-0 = <&pwm_e_pins>, <&pwm_f_clk_pins>;
329 pinctrl-names = "default";
330 clocks = <&clkc CLKID_FCLK_DIV4>;
331 clock-names = "clkin0";
336 vref-supply = <&vddio_ao18>;
342 pinctrl-0 = <&sdcard_pins>;
343 pinctrl-1 = <&sdcard_clk_gate_pins>;
344 pinctrl-names = "default", "clk-gate";
352 max-frequency = <200000000>;
355 cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
357 vmmc-supply = <&vcc_card>;
358 vqmmc-supply = <&vddio_card>;
365 pinctrl-0 = <&emmc_pins>;
366 pinctrl-1 = <&emmc_clk_gate_pins>;
367 pinctrl-names = "default", "clk-gate";
373 max-frequency = <200000000>;
376 mmc-pwrseq = <&emmc_pwrseq>;
377 vmmc-supply = <&vddio_ao3v3>;
378 vqmmc-supply = <&vddio_boot>;
384 pinctrl-0 = <&nor_pins>;
385 pinctrl-names = "default";
388 gd25lq128: spi-flash@0 {
389 compatible = "jedec,spi-nor";
390 #address-cells = <1>;
393 spi-max-frequency = <12000000>;
398 pinctrl-0 = <&uart_ao_a_pins>;
399 pinctrl-names = "default";
409 pinctrl-0 = <&usb1_rst_pins>;
410 pinctrl-names = "default";
411 phy-supply = <&vcc5v>;
415 phy-supply = <&vcc5v>;