Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame^] | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 2 | /* |
| 3 | * Copyright (c) 2016 Andreas Färber |
| 4 | * Copyright (c) 2016 BayLibre, Inc. |
| 5 | * Author: Kevin Hilman <khilman@kernel.org> |
| 6 | */ |
| 7 | |
| 8 | /dts-v1/; |
| 9 | |
| 10 | #include "meson-gxbb-p20x.dtsi" |
| 11 | #include <dt-bindings/input/input.h> |
| 12 | #include <dt-bindings/sound/meson-aiu.h> |
| 13 | |
| 14 | / { |
| 15 | compatible = "amlogic,p200", "amlogic,meson-gxbb"; |
| 16 | model = "Amlogic Meson GXBB P200 Development Board"; |
| 17 | |
| 18 | spdif_dit: audio-codec-0 { |
| 19 | #sound-dai-cells = <0>; |
| 20 | compatible = "linux,spdif-dit"; |
| 21 | status = "okay"; |
| 22 | sound-name-prefix = "DIT"; |
| 23 | }; |
| 24 | |
| 25 | avdd18_usb_adc: regulator-avdd18_usb_adc { |
| 26 | compatible = "regulator-fixed"; |
| 27 | regulator-name = "AVDD18_USB_ADC"; |
| 28 | regulator-min-microvolt = <1800000>; |
| 29 | regulator-max-microvolt = <1800000>; |
| 30 | }; |
| 31 | |
| 32 | adc_keys { |
| 33 | compatible = "adc-keys"; |
| 34 | io-channels = <&saradc 0>; |
| 35 | io-channel-names = "buttons"; |
| 36 | keyup-threshold-microvolt = <1800000>; |
| 37 | |
| 38 | button-home { |
| 39 | label = "Home"; |
| 40 | linux,code = <KEY_HOME>; |
| 41 | press-threshold-microvolt = <900000>; /* 50% */ |
| 42 | }; |
| 43 | |
| 44 | button-esc { |
| 45 | label = "Esc"; |
| 46 | linux,code = <KEY_ESC>; |
| 47 | press-threshold-microvolt = <684000>; /* 38% */ |
| 48 | }; |
| 49 | |
| 50 | button-up { |
| 51 | label = "Volume Up"; |
| 52 | linux,code = <KEY_VOLUMEUP>; |
| 53 | press-threshold-microvolt = <468000>; /* 26% */ |
| 54 | }; |
| 55 | |
| 56 | button-down { |
| 57 | label = "Volume Down"; |
| 58 | linux,code = <KEY_VOLUMEDOWN>; |
| 59 | press-threshold-microvolt = <252000>; /* 14% */ |
| 60 | }; |
| 61 | |
| 62 | button-menu { |
| 63 | label = "Menu"; |
| 64 | linux,code = <KEY_MENU>; |
| 65 | press-threshold-microvolt = <0>; /* 0% */ |
| 66 | }; |
| 67 | }; |
| 68 | |
| 69 | sound { |
| 70 | compatible = "amlogic,gx-sound-card"; |
| 71 | model = "P200"; |
| 72 | assigned-clocks = <&clkc CLKID_MPLL0>, |
| 73 | <&clkc CLKID_MPLL1>, |
| 74 | <&clkc CLKID_MPLL2>; |
| 75 | assigned-clock-parents = <0>, <0>, <0>; |
| 76 | assigned-clock-rates = <294912000>, |
| 77 | <270950400>, |
| 78 | <393216000>; |
| 79 | |
| 80 | dai-link-0 { |
| 81 | sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>; |
| 82 | }; |
| 83 | |
| 84 | dai-link-1 { |
| 85 | sound-dai = <&aiu AIU_CPU CPU_SPDIF_FIFO>; |
| 86 | }; |
| 87 | |
| 88 | dai-link-2 { |
| 89 | sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>; |
| 90 | dai-format = "i2s"; |
| 91 | mclk-fs = <256>; |
| 92 | |
| 93 | codec-0 { |
| 94 | sound-dai = <&aiu AIU_HDMI CTRL_I2S>; |
| 95 | }; |
| 96 | }; |
| 97 | |
| 98 | dai-link-3 { |
| 99 | sound-dai = <&aiu AIU_CPU CPU_SPDIF_ENCODER>; |
| 100 | |
| 101 | codec-0 { |
| 102 | sound-dai = <&spdif_dit>; |
| 103 | }; |
| 104 | }; |
| 105 | |
| 106 | dai-link-4 { |
| 107 | sound-dai = <&aiu AIU_HDMI CTRL_OUT>; |
| 108 | |
| 109 | codec-0 { |
| 110 | sound-dai = <&hdmi_tx>; |
| 111 | }; |
| 112 | }; |
| 113 | }; |
| 114 | }; |
| 115 | |
| 116 | &aiu { |
| 117 | status = "okay"; |
| 118 | pinctrl-0 = <&spdif_out_y_pins>; |
| 119 | pinctrl-names = "default"; |
| 120 | }; |
| 121 | |
| 122 | ðmac { |
| 123 | status = "okay"; |
| 124 | pinctrl-0 = <ð_rgmii_pins>; |
| 125 | pinctrl-names = "default"; |
| 126 | phy-handle = <ð_phy0>; |
| 127 | phy-mode = "rgmii"; |
| 128 | |
| 129 | amlogic,tx-delay-ns = <2>; |
| 130 | |
| 131 | mdio { |
| 132 | compatible = "snps,dwmac-mdio"; |
| 133 | #address-cells = <1>; |
| 134 | #size-cells = <0>; |
| 135 | |
| 136 | eth_phy0: ethernet-phy@3 { |
| 137 | /* Micrel KSZ9031 (0x00221620) */ |
| 138 | reg = <3>; |
| 139 | |
| 140 | reset-assert-us = <10000>; |
| 141 | reset-deassert-us = <30000>; |
| 142 | reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>; |
| 143 | |
| 144 | interrupt-parent = <&gpio_intc>; |
| 145 | /* MAC_INTR on GPIOZ_15 */ |
| 146 | interrupts = <29 IRQ_TYPE_LEVEL_LOW>; |
| 147 | }; |
| 148 | }; |
| 149 | }; |
| 150 | |
| 151 | &i2c_B { |
| 152 | status = "okay"; |
| 153 | pinctrl-0 = <&i2c_b_pins>; |
| 154 | pinctrl-names = "default"; |
| 155 | }; |
| 156 | |
| 157 | &saradc { |
| 158 | status = "okay"; |
| 159 | vref-supply = <&avdd18_usb_adc>; |
| 160 | }; |