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>;
33 dio2133: analog-amplifier {
34 compatible = "simple-audio-amplifier";
35 sound-name-prefix = "AU2";
36 VCC-supply = <&vcc5v>;
37 enable-gpios = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>;
41 stdout-path = "serial0:115200n8";
45 compatible = "composite-video-connector";
49 cvbs_connector_in: endpoint {
50 remote-endpoint = <&cvbs_vdac_out>;
55 emmc_pwrseq: emmc-pwrseq {
56 compatible = "mmc-pwrseq-emmc";
57 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
61 compatible = "hdmi-connector";
65 hdmi_connector_in: endpoint {
66 remote-endpoint = <&hdmi_tx_tmds_out>;
72 compatible = "gpio-keys-polled";
73 poll-interval = <100>;
77 linux,code = <KEY_POWER>;
78 gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>;
83 device_type = "memory";
84 reg = <0x0 0x0 0x0 0x80000000>;
87 ao_5v: regulator-ao_5v {
88 compatible = "regulator-fixed";
89 regulator-name = "AO_5V";
90 regulator-min-microvolt = <5000000>;
91 regulator-max-microvolt = <5000000>;
92 vin-supply = <&dc_in>;
96 dc_in: regulator-dc_in {
97 compatible = "regulator-fixed";
98 regulator-name = "DC_IN";
99 regulator-min-microvolt = <5000000>;
100 regulator-max-microvolt = <5000000>;
105 compatible = "gpio-leds";
108 color = <LED_COLOR_ID_GREEN>;
109 function = LED_FUNCTION_DISK_ACTIVITY;
110 gpios = <&gpio_ao GPIOAO_9 GPIO_ACTIVE_HIGH>;
111 linux,default-trigger = "disk-activity";
115 color = <LED_COLOR_ID_BLUE>;
116 function = LED_FUNCTION_STATUS;
117 gpios = <&gpio GPIODV_28 GPIO_ACTIVE_HIGH>;
118 linux,default-trigger = "heartbeat";
123 vcc_card: regulator-vcc_card {
124 compatible = "regulator-fixed";
125 regulator-name = "VCC_CARD";
126 regulator-min-microvolt = <3300000>;
127 regulator-max-microvolt = <3300000>;
128 vin-supply = <&vddio_ao3v3>;
130 gpio = <&gpio GPIODV_4 GPIO_ACTIVE_HIGH>;
134 vcc5v: regulator-vcc5v {
135 compatible = "regulator-fixed";
136 regulator-name = "VCC5V";
137 regulator-min-microvolt = <5000000>;
138 regulator-max-microvolt = <5000000>;
139 vin-supply = <&ao_5v>;
141 gpio = <&gpio GPIOH_3 GPIO_OPEN_DRAIN>;
144 vddio_ao18: regulator-vddio_ao18 {
145 compatible = "regulator-fixed";
146 regulator-name = "VDDIO_AO18";
147 regulator-min-microvolt = <1800000>;
148 regulator-max-microvolt = <1800000>;
149 vin-supply = <&ao_5v>;
153 vddio_ao3v3: regulator-vddio_ao3v3 {
154 compatible = "regulator-fixed";
155 regulator-name = "VDDIO_AO3V3";
156 regulator-min-microvolt = <3300000>;
157 regulator-max-microvolt = <3300000>;
158 vin-supply = <&ao_5v>;
162 vddio_boot: regulator-vddio_boot {
163 compatible = "regulator-fixed";
164 regulator-name = "VDDIO_BOOT";
165 regulator-min-microvolt = <1800000>;
166 regulator-max-microvolt = <1800000>;
167 vin-supply = <&vddio_ao3v3>;
171 vddio_card: regulator-vddio-card {
172 compatible = "regulator-gpio";
173 regulator-name = "VDDIO_CARD";
174 regulator-min-microvolt = <1800000>;
175 regulator-max-microvolt = <3300000>;
177 gpios = <&gpio GPIODV_5 GPIO_ACTIVE_HIGH>;
180 states = <3300000 0>,
183 regulator-settling-time-up-us = <200>;
184 regulator-settling-time-down-us = <50000>;
188 compatible = "amlogic,gx-sound-card";
189 model = "GXL-LIBRETECH-S9XX-PC";
190 audio-aux-devs = <&dio2133>;
191 audio-widgets = "Speaker", "7J4-14 LEFT",
192 "Speaker", "7J4-11 RIGHT";
193 audio-routing = "AU2 INL", "ACODEC LOLN",
194 "AU2 INR", "ACODEC LORN",
195 "7J4-14 LEFT", "AU2 OUTL",
196 "7J4-11 RIGHT", "AU2 OUTR";
197 assigned-clocks = <&clkc CLKID_MPLL0>,
200 assigned-clock-parents = <0>, <0>, <0>;
201 assigned-clock-rates = <294912000>,
207 sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
211 sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;
216 sound-dai = <&aiu AIU_HDMI CTRL_I2S>;
220 sound-dai = <&aiu AIU_ACODEC CTRL_I2S>;
225 sound-dai = <&aiu AIU_HDMI CTRL_OUT>;
228 sound-dai = <&hdmi_tx>;
233 sound-dai = <&aiu AIU_ACODEC CTRL_OUT>;
236 sound-dai = <&acodec>;
243 AVDD-supply = <&vddio_ao18>;
252 pinctrl-0 = <&ao_cec_pins>;
253 pinctrl-names = "default";
254 hdmi-phandle = <&hdmi_tx>;
259 cvbs_vdac_out: endpoint {
260 remote-endpoint = <&cvbs_connector_in>;
265 pinctrl-0 = <ð_pins>, <ð_phy_irq_pins>;
266 pinctrl-names = "default";
267 phy-handle = <&external_phy>;
268 amlogic,tx-delay-ns = <2>;
274 external_phy: ethernet-phy@0 {
277 reset-assert-us = <10000>;
278 reset-deassert-us = <30000>;
279 reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
280 interrupt-parent = <&gpio_intc>;
281 interrupts = <25 IRQ_TYPE_LEVEL_LOW>;
287 * Make sure the reset pin of the usb HUB is driven high to take
290 usb1_rst_pins: usb1_rst_irq {
293 function = "gpio_periphs";
299 /* Make sure the phy irq pin is properly configured as input */
300 eth_phy_irq_pins: eth_phy_irq {
303 function = "gpio_periphs";
311 pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
312 pinctrl-names = "default";
313 hdmi-supply = <&vcc5v>;
318 hdmi_tx_tmds_out: endpoint {
319 remote-endpoint = <&hdmi_connector_in>;
324 pinctrl-0 = <&remote_input_ao_pins>;
325 pinctrl-names = "default";
330 pinctrl-0 = <&i2c_c_dv18_pins>;
331 pinctrl-names = "default";
336 compatible = "nxp,pcf8563";
338 clock-output-names = "rtc_clkout";
343 pinctrl-0 = <&pwm_ao_a_3_pins>;
344 pinctrl-names = "default";
345 clocks = <&clkc CLKID_FCLK_DIV4>;
346 clock-names = "clkin0";
351 pinctrl-0 = <&pwm_b_pins>;
352 pinctrl-names = "default";
353 clocks = <&clkc CLKID_FCLK_DIV4>;
354 clock-names = "clkin0";
359 pinctrl-0 = <&pwm_e_pins>, <&pwm_f_clk_pins>;
360 pinctrl-names = "default";
361 clocks = <&clkc CLKID_FCLK_DIV4>;
362 clock-names = "clkin0";
367 vref-supply = <&vddio_ao18>;
373 pinctrl-0 = <&sdcard_pins>;
374 pinctrl-1 = <&sdcard_clk_gate_pins>;
375 pinctrl-names = "default", "clk-gate";
383 max-frequency = <200000000>;
386 cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
388 vmmc-supply = <&vcc_card>;
389 vqmmc-supply = <&vddio_card>;
396 pinctrl-0 = <&emmc_pins>;
397 pinctrl-1 = <&emmc_clk_gate_pins>;
398 pinctrl-names = "default", "clk-gate";
404 max-frequency = <200000000>;
407 mmc-pwrseq = <&emmc_pwrseq>;
408 vmmc-supply = <&vddio_ao3v3>;
409 vqmmc-supply = <&vddio_boot>;
415 pinctrl-0 = <&nor_pins>;
416 pinctrl-names = "default";
419 gd25lq128: spi-flash@0 {
420 compatible = "jedec,spi-nor";
421 #address-cells = <1>;
424 spi-max-frequency = <12000000>;
429 pinctrl-0 = <&uart_ao_a_pins>;
430 pinctrl-names = "default";
440 pinctrl-0 = <&usb1_rst_pins>;
441 pinctrl-names = "default";
442 phy-supply = <&vcc5v>;
446 phy-supply = <&vcc5v>;