Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause |
| 2 | /* |
| 3 | * Copyright (C) 2023 DH electronics GmbH |
| 4 | * |
| 5 | * DHCOM iMX6ULL variant: |
| 6 | * DHCM-iMX6ULL-C080-R051-F0409-SPI-E2-CAN2-RTC-WBT-ADC-I-01D2 |
| 7 | * DHCOR PCB number: 578-200 or newer |
| 8 | * DHCOM PCB number: 579-200 or newer |
| 9 | * PDK2 PCB number: 516-400 or newer |
| 10 | */ |
| 11 | /dts-v1/; |
| 12 | |
| 13 | #include "imx6ull-dhcom-som.dtsi" |
| 14 | |
| 15 | / { |
| 16 | model = "DH electronics i.MX6ULL DHCOM on Premium Developer Kit (2)"; |
| 17 | compatible = "dh,imx6ull-dhcom-pdk2", "dh,imx6ull-dhcom-som", |
| 18 | "dh,imx6ull-dhcor-som", "fsl,imx6ull"; |
| 19 | |
| 20 | clk_ext_audio_codec: clock-codec { |
| 21 | compatible = "fixed-clock"; |
| 22 | #clock-cells = <0>; |
| 23 | clock-frequency = <24000000>; |
| 24 | }; |
| 25 | |
| 26 | display_bl: display-bl { |
| 27 | compatible = "pwm-backlight"; |
| 28 | brightness-levels = <0 16 22 30 40 55 75 102 138 188 255>; |
| 29 | default-brightness-level = <8>; |
| 30 | enable-gpios = <&gpio5 8 GPIO_ACTIVE_HIGH>; /* GPIO G */ |
| 31 | power-supply = <®_panel_3v3>; |
| 32 | pwms = <&pwm1 0 50000 PWM_POLARITY_INVERTED>; |
| 33 | }; |
| 34 | |
| 35 | gpio-keys { |
| 36 | compatible = "gpio-keys"; |
| 37 | |
| 38 | button-0 { |
| 39 | gpios = <&gpio5 0 GPIO_ACTIVE_LOW>; /* GPIO A */ |
| 40 | label = "TA1-GPIO-A"; |
| 41 | linux,code = <KEY_A>; |
| 42 | wakeup-source; |
| 43 | }; |
| 44 | |
| 45 | button-1 { |
| 46 | gpios = <&gpio5 1 GPIO_ACTIVE_LOW>; /* GPIO B */ |
| 47 | label = "TA2-GPIO-B"; |
| 48 | linux,code = <KEY_B>; |
| 49 | wakeup-source; |
| 50 | }; |
| 51 | |
| 52 | button-2 { |
| 53 | gpios = <&gpio5 2 GPIO_ACTIVE_LOW>; /* GPIO C */ |
| 54 | label = "TA3-GPIO-C"; |
| 55 | linux,code = <KEY_C>; |
| 56 | wakeup-source; |
| 57 | }; |
| 58 | |
| 59 | button-3 { |
| 60 | gpios = <&gpio5 3 GPIO_ACTIVE_LOW>; /* GPIO D */ |
| 61 | label = "TA4-GPIO-D"; |
| 62 | linux,code = <KEY_D>; |
| 63 | wakeup-source; |
| 64 | }; |
| 65 | }; |
| 66 | |
| 67 | led: led { |
| 68 | compatible = "gpio-leds"; |
| 69 | |
| 70 | /* |
| 71 | * Disable PDK2 LED5, because GPIO E is |
| 72 | * already used as touch interrupt. |
| 73 | */ |
| 74 | led-0 { |
| 75 | color = <LED_COLOR_ID_GREEN>; |
| 76 | default-state = "off"; |
| 77 | function = LED_FUNCTION_INDICATOR; |
| 78 | function-enumerator = <5>; /* PDK2 LED5 */ |
| 79 | gpios = <&gpio5 4 GPIO_ACTIVE_HIGH>; /* GPIO E */ |
| 80 | status = "disabled"; |
| 81 | }; |
| 82 | |
| 83 | led-1 { |
| 84 | color = <LED_COLOR_ID_GREEN>; |
| 85 | default-state = "off"; |
| 86 | function = LED_FUNCTION_INDICATOR; |
| 87 | function-enumerator = <6>; /* PDK2 LED6 */ |
| 88 | gpios = <&gpio5 7 GPIO_ACTIVE_HIGH>; /* GPIO F */ |
| 89 | }; |
| 90 | |
| 91 | /* |
| 92 | * Disable PDK2 LED7, because GPIO H is |
| 93 | * already used for WiFi pin WL_REG_ON. |
| 94 | */ |
| 95 | led-2 { |
| 96 | color = <LED_COLOR_ID_GREEN>; |
| 97 | default-state = "off"; |
| 98 | function = LED_FUNCTION_INDICATOR; |
| 99 | function-enumerator = <7>; /* PDK2 LED7 */ |
| 100 | gpios = <&gpio5 9 GPIO_ACTIVE_HIGH>; /* GPIO H */ |
| 101 | status = "disabled"; |
| 102 | }; |
| 103 | |
| 104 | /* |
| 105 | * Disable PDK2 LED8, because GPIO I is |
| 106 | * already used for BT pin BT_REG_ON. |
| 107 | */ |
| 108 | led-3 { |
| 109 | color = <LED_COLOR_ID_GREEN>; |
| 110 | default-state = "off"; |
| 111 | function = LED_FUNCTION_INDICATOR; |
| 112 | function-enumerator = <8>; /* PDK2 LED8 */ |
| 113 | gpios = <&gpio1 18 GPIO_ACTIVE_HIGH>; /* GPIO I */ |
| 114 | status = "disabled"; |
| 115 | }; |
| 116 | }; |
| 117 | |
| 118 | panel { |
| 119 | compatible = "edt,etm0700g0edh6"; |
| 120 | backlight = <&display_bl>; |
| 121 | power-supply = <®_panel_3v3>; |
| 122 | |
| 123 | port { |
| 124 | lcd_panel_in: endpoint { |
| 125 | remote-endpoint = <&lcd_display_out>; |
| 126 | }; |
| 127 | }; |
| 128 | }; |
| 129 | |
| 130 | /* Filtered supply voltage */ |
| 131 | reg_pdk2_24v: regulator-pdk2-24v { |
| 132 | compatible = "regulator-fixed"; |
| 133 | regulator-always-on; |
| 134 | regulator-max-microvolt = <24000000>; |
| 135 | regulator-min-microvolt = <24000000>; |
| 136 | regulator-name = "24V_PDK2"; |
| 137 | }; |
| 138 | |
| 139 | /* PDK2 U35 */ |
| 140 | reg_pdk2_3v3: regulator-pdk2-3v3 { |
| 141 | compatible = "regulator-fixed"; |
| 142 | regulator-always-on; |
| 143 | regulator-min-microvolt = <3300000>; |
| 144 | regulator-max-microvolt = <3300000>; |
| 145 | regulator-name = "3V3_PDK2"; |
| 146 | vin-supply = <®_pdk2_24v>; |
| 147 | }; |
| 148 | |
| 149 | /* 560-200 U1 */ |
| 150 | reg_panel_3v3: regulator-panel-3v3 { |
| 151 | compatible = "regulator-fixed"; |
| 152 | regulator-always-on; |
| 153 | regulator-min-microvolt = <3300000>; |
| 154 | regulator-max-microvolt = <3300000>; |
| 155 | regulator-name = "3V3_PANEL"; |
| 156 | vin-supply = <®_pdk2_24v>; |
| 157 | }; |
| 158 | |
| 159 | sound { |
| 160 | compatible = "simple-audio-card"; |
| 161 | simple-audio-card,bitclock-master = <&dailink_master>; |
| 162 | simple-audio-card,format = "i2s"; |
| 163 | simple-audio-card,frame-master = <&dailink_master>; |
| 164 | simple-audio-card,name = "sgtl5000"; |
| 165 | simple-audio-card,routing = |
| 166 | "MIC_IN", "Mic Jack", |
| 167 | "Mic Jack", "Mic Bias", |
| 168 | "LINE_IN", "Line In Jack", |
| 169 | "Headphone Jack", "HP_OUT"; |
| 170 | simple-audio-card,widgets = |
| 171 | "Microphone", "Mic Jack", |
| 172 | "Line", "Line In Jack", |
| 173 | "Headphone", "Headphone Jack"; |
| 174 | |
| 175 | simple-audio-card,cpu { |
| 176 | sound-dai = <&sai2>; |
| 177 | }; |
| 178 | |
| 179 | dailink_master: simple-audio-card,codec { |
| 180 | clocks = <&clk_ext_audio_codec>; |
| 181 | sound-dai = <&sgtl5000>; |
| 182 | }; |
| 183 | }; |
| 184 | }; |
| 185 | |
| 186 | /* DHCOM I2C1 */ |
| 187 | &i2c2 { |
| 188 | sgtl5000: audio-codec@a { |
| 189 | compatible = "fsl,sgtl5000"; |
| 190 | reg = <0x0a>; |
| 191 | #sound-dai-cells = <0>; |
| 192 | clocks = <&clk_ext_audio_codec>; |
| 193 | VDDA-supply = <®_pdk2_3v3>; |
| 194 | VDDIO-supply = <®_pdk2_3v3>; |
| 195 | }; |
| 196 | |
| 197 | touchscreen@38 { |
| 198 | compatible = "edt,edt-ft5406"; |
| 199 | reg = <0x38>; |
| 200 | interrupt-parent = <&gpio5>; |
| 201 | interrupts = <4 IRQ_TYPE_EDGE_FALLING>; /* GPIO E */ |
| 202 | power-supply = <®_panel_3v3>; |
| 203 | }; |
| 204 | }; |
| 205 | |
| 206 | &lcdif { |
| 207 | status = "okay"; |
| 208 | |
| 209 | port { |
| 210 | lcd_display_out: endpoint { |
| 211 | remote-endpoint = <&lcd_panel_in>; |
| 212 | }; |
| 213 | }; |
| 214 | }; |
| 215 | |
| 216 | &pwm1 { |
| 217 | status = "okay"; |
| 218 | }; |
| 219 | |
| 220 | &sai2 { |
| 221 | status = "okay"; |
| 222 | }; |