Neil Armstrong | 425d9d5 | 2021-09-17 09:37:00 +0200 | [diff] [blame] | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 2 | /* |
| 3 | * Copyright (c) 2019 BayLibre, SAS |
| 4 | * Author: Neil Armstrong <narmstrong@baylibre.com> |
| 5 | * Copyright (c) 2019 Christian Hewitt <christianshewitt@gmail.com> |
| 6 | */ |
| 7 | |
| 8 | /dts-v1/; |
| 9 | |
| 10 | #include "meson-g12b-w400.dtsi" |
| 11 | #include <dt-bindings/leds/common.h> |
| 12 | #include <dt-bindings/sound/meson-g12a-tohdmitx.h> |
| 13 | |
| 14 | / { |
| 15 | compatible = "azw,gsking-x", "amlogic,s922x", "amlogic,g12b"; |
| 16 | model = "Beelink GS-King X"; |
| 17 | |
| 18 | aliases { |
| 19 | rtc0 = &rtc; |
| 20 | rtc1 = &vrtc; |
| 21 | }; |
| 22 | |
| 23 | gpio-keys-polled { |
| 24 | compatible = "gpio-keys-polled"; |
| 25 | #address-cells = <1>; |
| 26 | #size-cells = <0>; |
| 27 | poll-interval = <100>; |
| 28 | |
| 29 | power-button { |
| 30 | label = "power"; |
| 31 | linux,code = <KEY_POWER>; |
| 32 | gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>; |
| 33 | }; |
| 34 | }; |
| 35 | |
| 36 | sound { |
| 37 | compatible = "amlogic,axg-sound-card"; |
| 38 | model = "GSKING-X"; |
| 39 | audio-aux-devs = <&tdmout_a>; |
| 40 | audio-routing = "TDMOUT_A IN 0", "FRDDR_A OUT 1", |
| 41 | "TDMOUT_A IN 1", "FRDDR_B OUT 1", |
| 42 | "TDMOUT_A IN 2", "FRDDR_C OUT 1", |
| 43 | "TDM_A Playback", "TDMOUT_A OUT"; |
| 44 | |
| 45 | assigned-clocks = <&clkc CLKID_MPLL2>, |
| 46 | <&clkc CLKID_MPLL0>, |
| 47 | <&clkc CLKID_MPLL1>; |
| 48 | assigned-clock-parents = <0>, <0>, <0>; |
| 49 | assigned-clock-rates = <294912000>, |
| 50 | <270950400>, |
| 51 | <393216000>; |
| 52 | status = "okay"; |
| 53 | |
| 54 | dai-link-0 { |
| 55 | sound-dai = <&frddr_a>; |
| 56 | }; |
| 57 | |
| 58 | dai-link-1 { |
| 59 | sound-dai = <&frddr_b>; |
| 60 | }; |
| 61 | |
| 62 | dai-link-2 { |
| 63 | sound-dai = <&frddr_c>; |
| 64 | }; |
| 65 | |
| 66 | /* 8ch hdmi interface */ |
| 67 | dai-link-3 { |
| 68 | sound-dai = <&tdmif_a>; |
| 69 | dai-format = "i2s"; |
| 70 | dai-tdm-slot-tx-mask-0 = <1 1>; |
| 71 | dai-tdm-slot-tx-mask-1 = <1 1>; |
| 72 | dai-tdm-slot-tx-mask-2 = <1 1>; |
| 73 | dai-tdm-slot-tx-mask-3 = <1 1>; |
| 74 | mclk-fs = <256>; |
| 75 | |
| 76 | codec { |
| 77 | sound-dai = <&tohdmitx TOHDMITX_I2S_IN_A>; |
| 78 | }; |
| 79 | }; |
| 80 | |
| 81 | dai-link-4 { |
| 82 | sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>; |
| 83 | |
| 84 | codec { |
| 85 | sound-dai = <&hdmi_tx>; |
| 86 | }; |
| 87 | }; |
| 88 | }; |
| 89 | }; |
| 90 | |
| 91 | &arb { |
| 92 | status = "okay"; |
| 93 | }; |
| 94 | |
| 95 | &clkc_audio { |
| 96 | status = "okay"; |
| 97 | }; |
| 98 | |
| 99 | &frddr_a { |
| 100 | status = "okay"; |
| 101 | }; |
| 102 | |
| 103 | &frddr_b { |
| 104 | status = "okay"; |
| 105 | }; |
| 106 | |
| 107 | &frddr_c { |
| 108 | status = "okay"; |
| 109 | }; |
| 110 | |
| 111 | &i2c3 { |
| 112 | status = "okay"; |
| 113 | pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>; |
| 114 | pinctrl-names = "default"; |
| 115 | |
| 116 | rtc: rtc@51 { |
| 117 | compatible = "nxp,pcf8563"; |
| 118 | reg = <0x51>; |
| 119 | wakeup-source; |
| 120 | }; |
| 121 | }; |
| 122 | |
| 123 | &tdmif_a { |
| 124 | status = "okay"; |
| 125 | }; |
| 126 | |
| 127 | &tdmout_a { |
| 128 | status = "okay"; |
| 129 | }; |
| 130 | |
| 131 | &tohdmitx { |
| 132 | status = "okay"; |
| 133 | }; |