1// SPDX-License-Identifier: GPL-2.0-or-later OR MIT 2/* 3 * Copyright (c) 2016 Protonic Holland 4 * Copyright (c) 2020 Oleksij Rempel <kernel@pengutronix.de>, Pengutronix 5 */ 6 7/dts-v1/; 8#include "imx6dl.dtsi" 9#include "imx6qdl-vicut1.dtsi" 10 11/ { 12 model = "Kverneland TGO"; 13 compatible = "kvg,victgo", "fsl,imx6dl"; 14 15 gpio-keys { 16 compatible = "gpio-keys"; 17 pinctrl-names = "default"; 18 pinctrl-0 = <&pinctrl_gpiokeys>; 19 autorepeat; 20 21 key-power { 22 label = "Power Button"; 23 gpios = <&gpio2 23 GPIO_ACTIVE_LOW>; 24 linux,code = <KEY_POWER>; 25 wakeup-source; 26 }; 27 28 key-enter { 29 label = "Rotary Key"; 30 gpios = <&gpio2 05 GPIO_ACTIVE_LOW>; 31 linux,code = <KEY_ENTER>; 32 wakeup-source; 33 }; 34 }; 35 36 iio-hwmon { 37 compatible = "iio-hwmon"; 38 io-channels = <&vdiv_vaccu>, <&vdiv_hitch_pos>; 39 }; 40 41 panel { 42 compatible = "lg,lb070wv8"; 43 backlight = <&backlight_lcd>; 44 power-supply = <®_3v3>; 45 46 port { 47 panel_in: endpoint { 48 remote-endpoint = <&lvds0_out>; 49 }; 50 }; 51 }; 52 53 clk50m_phy: phy-clock { 54 compatible = "fixed-clock"; 55 #clock-cells = <0>; 56 clock-frequency = <50000000>; 57 }; 58 59 rotary-encoder { 60 compatible = "rotary-encoder"; 61 pinctrl-0 = <&pinctrl_rotary_ch>; 62 gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>, 63 <&gpio2 4 GPIO_ACTIVE_HIGH>; 64 linux,axis = <REL_WHEEL>; 65 rotary-encoder,steps-per-period = <4>; 66 rotary-encoder,relative-axis; 67 rotary-encoder,rollover; 68 wakeup-source; 69 }; 70 71 thermal-zones { 72 chassis-thermal { 73 polling-delay = <20000>; 74 polling-delay-passive = <0>; 75 thermal-sensors = <&tsens0>; 76 }; 77 78 touch-thermal0 { 79 polling-delay = <20000>; 80 polling-delay-passive = <0>; 81 thermal-sensors = <&touch_temp0>; 82 }; 83 84 touch-thermal1 { 85 polling-delay = <20000>; 86 polling-delay-passive = <0>; 87 thermal-sensors = <&touch_temp1>; 88 }; 89 }; 90 91 touchscreen { 92 compatible = "resistive-adc-touch"; 93 io-channels = <&adc_ts 1>, <&adc_ts 3>, <&adc_ts 4>, 94 <&adc_ts 5>; 95 io-channel-names = "y", "z1", "z2", "x"; 96 touchscreen-min-pressure = <64687>; 97 touchscreen-inverted-y; 98 touchscreen-x-plate-ohms = <300>; 99 touchscreen-y-plate-ohms = <800>; 100 }; 101 102 touch_temp0: touch-temperature-sensor0 { 103 compatible = "generic-adc-thermal"; 104 #thermal-sensor-cells = <0>; 105 io-channels = <&adc_ts 0>; 106 io-channel-names = "sensor-channel"; 107 temperature-lookup-table = < (-40000) 736 108 85000 474>; 109 }; 110 111 touch_temp1: touch-temperature-sensor1 { 112 compatible = "generic-adc-thermal"; 113 #thermal-sensor-cells = <0>; 114 io-channels = <&adc_ts 7>; 115 io-channel-names = "sensor-channel"; 116 temperature-lookup-table = < (-40000) 826 117 85000 609>; 118 }; 119 120 vdiv_vaccu: voltage-divider-vaccu { 121 compatible = "voltage-divider"; 122 io-channels = <&adc_ts 2>; 123 output-ohms = <2500>; 124 full-ohms = <64000>; 125 #io-channel-cells = <0>; 126 }; 127 128 vdiv_hitch_pos: voltage-divider-hitch-pos { 129 compatible = "voltage-divider"; 130 io-channels = <&adc_ts 6>; 131 output-ohms = <3300>; 132 full-ohms = <13300>; 133 #io-channel-cells = <0>; 134 }; 135}; 136 137&ecspi2 { 138 cs-gpios = <&gpio5 12 GPIO_ACTIVE_LOW>; 139 pinctrl-names = "default"; 140 pinctrl-0 = <&pinctrl_ecspi2>; 141 status = "okay"; 142 143 adc_ts: adc@0 { 144 compatible = "ti,tsc2046e-adc"; 145 reg = <0>; 146 pinctrl-0 = <&pinctrl_touchscreen>; 147 pinctrl-names = "default"; 148 spi-max-frequency = <1000000>; 149 interrupts-extended = <&gpio5 8 IRQ_TYPE_LEVEL_LOW>; 150 #io-channel-cells = <1>; 151 152 #address-cells = <1>; 153 #size-cells = <0>; 154 155 channel@1 { 156 reg = <1>; 157 settling-time-us = <700>; 158 oversampling-ratio = <5>; 159 }; 160 161 channel@3 { 162 reg = <3>; 163 settling-time-us = <700>; 164 oversampling-ratio = <5>; 165 }; 166 167 channel@4 { 168 reg = <4>; 169 settling-time-us = <700>; 170 oversampling-ratio = <5>; 171 }; 172 173 channel@5 { 174 reg = <5>; 175 settling-time-us = <700>; 176 oversampling-ratio = <5>; 177 }; 178 }; 179}; 180 181&fec { 182 pinctrl-names = "default"; 183 pinctrl-0 = <&pinctrl_enet>; 184 phy-mode = "rmii"; 185 clocks = <&clks IMX6QDL_CLK_ENET>, 186 <&clks IMX6QDL_CLK_ENET>, 187 <&clk50m_phy>; 188 clock-names = "ipg", "ahb", "ptp"; 189 phy-handle = <&rmii_phy>; 190 status = "okay"; 191 192 mdio { 193 #address-cells = <1>; 194 #size-cells = <0>; 195 196 /* Microchip KSZ8081RNA PHY */ 197 rmii_phy: ethernet-phy@0 { 198 reg = <0>; 199 interrupts-extended = <&gpio4 30 IRQ_TYPE_LEVEL_LOW>; 200 reset-gpios = <&gpio4 26 GPIO_ACTIVE_LOW>; 201 reset-assert-us = <10000>; 202 reset-deassert-us = <300>; 203 }; 204 }; 205}; 206 207&gpio1 { 208 gpio-line-names = 209 "CAN1_TERM", "SD1_CD", "ITU656_RESET", "CAM1_MIRROR", 210 "CAM2_MIRROR", "", "", "SMBALERT", 211 "DEBUG_0", "DEBUG_1", "", "", "", "", "", "", 212 "SD1_DATA0", "SD1_DATA1", "SD1_CMD", "SD1_DATA2", "SD1_CLK", 213 "SD1_DATA3", "ETH_MDIO", "", 214 "", "", "", "", "", "", "", "ETH_MDC"; 215}; 216 217&gpio4 { 218 gpio-line-names = 219 "", "", "", "", "", "", "UART4_TXD", "UART4_RXD", 220 "UART5_TXD", "UART5_RXD", "CAN1_TX", "CAN1_RX", "CAN1_SR", 221 "CAN2_SR", "CAN2_TX", "CAN2_RX", 222 "", "", "DIP1_FB", "", "VCAM_EN", "ON1_CTRL", "ON2_CTRL", 223 "HITCH_IN_OUT", 224 "LIGHT_ON", "", "ETH_RESET", "CONTACT_IN", "BL_EN", 225 "BL_PWM", "ETH_INT", "ISB_LED"; 226}; 227 228&gpio5 { 229 gpio-line-names = 230 "", "", "", "", "", "", "", "", 231 "TSC_PENIRQ", "TSC_BUSY", "ECSPI2_MOSI", "ECSPI2_MISO", 232 "ECSPI2_SS0", "ECSPI2_SCLK", "", "", 233 "", "", "ITU656_CLK", "I2S_MCLK", "ITU656_PDN", "AUDIO_RESET", 234 "I2S_BITCLK", "I2S_DOUT", 235 "I2S_LRCLK", "I2S_DIN", "I2C1_SDA", "I2C1_SCL", "YACO_AUX_RX", 236 "YACO_AUX_TX", "ITU656_D0", "ITU656_D1"; 237}; 238 239&gpio6 { 240 gpio-line-names = 241 "ITU656_D2", "ITU656_D3", "ITU656_D4", "ITU656_D5", 242 "ITU656_D6", "ITU656_D7", "", "", 243 "", "", "", "", "", "", "", "", 244 "", "", "", "", "", "", "", "", 245 "", "", "", "", "", "", "", ""; 246}; 247 248&i2c1 { 249 keypad@70 { 250 compatible = "holtek,ht16k33"; 251 pinctrl-names = "default"; 252 pinctrl-0 = <&pinctrl_keypad>; 253 reg = <0x70>; 254 refresh-rate-hz = <20>; 255 debounce-delay-ms = <50>; 256 interrupts-extended = <&gpio4 5 (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_EDGE_RISING)>; 257 keypad,num-rows = <12>; 258 keypad,num-columns = <3>; 259 linux,keymap = < 260 MATRIX_KEY(2, 0, KEY_F6) 261 MATRIX_KEY(3, 0, KEY_F8) 262 MATRIX_KEY(4, 0, KEY_F10) 263 MATRIX_KEY(5, 0, KEY_F4) 264 MATRIX_KEY(6, 0, KEY_F2) 265 MATRIX_KEY(2, 1, KEY_F5) 266 MATRIX_KEY(3, 1, KEY_F7) 267 MATRIX_KEY(4, 1, KEY_F9) 268 MATRIX_KEY(5, 1, KEY_F3) 269 MATRIX_KEY(6, 1, KEY_F1) 270 >; 271 }; 272}; 273 274&iomuxc { 275 pinctrl_ecspi2: ecspi2grp { 276 fsl,pins = < 277 MX6QDL_PAD_DISP0_DAT16__ECSPI2_MOSI 0x100b1 278 MX6QDL_PAD_DISP0_DAT17__ECSPI2_MISO 0x100b1 279 MX6QDL_PAD_DISP0_DAT18__GPIO5_IO12 0x100b1 280 MX6QDL_PAD_DISP0_DAT19__ECSPI2_SCLK 0x100b1 281 >; 282 }; 283 284 pinctrl_enet: enetgrp { 285 fsl,pins = < 286 /* MX6QDL_ENET_PINGRP4 */ 287 MX6QDL_PAD_ENET_MDC__ENET_MDC 0x1b0b0 288 MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x1b0b0 289 MX6QDL_PAD_ENET_RXD0__ENET_RX_DATA0 0x1b0b0 290 MX6QDL_PAD_ENET_RXD1__ENET_RX_DATA1 0x1b0b0 291 MX6QDL_PAD_ENET_RX_ER__ENET_RX_ER 0x1b0b0 292 MX6QDL_PAD_ENET_TX_EN__ENET_TX_EN 0x1b0b0 293 MX6QDL_PAD_ENET_TXD0__ENET_TX_DATA0 0x1b0b0 294 MX6QDL_PAD_ENET_TXD1__ENET_TX_DATA1 0x1b0b0 295 MX6QDL_PAD_ENET_CRS_DV__ENET_RX_EN 0x1b0b0 296 MX6QDL_PAD_GPIO_16__ENET_REF_CLK 0x1b0b0 297 /* Phy reset */ 298 MX6QDL_PAD_DISP0_DAT5__GPIO4_IO26 0x1b0b0 299 /* nINTRP */ 300 MX6QDL_PAD_DISP0_DAT9__GPIO4_IO30 0x1b0b0 301 >; 302 }; 303 304 pinctrl_gpiokeys: gpiokeygrp { 305 fsl,pins = < 306 /* ROTARY_BTN */ 307 MX6QDL_PAD_NANDF_D5__GPIO2_IO05 0x1b0b0 308 /* nON_SWITCH */ 309 MX6QDL_PAD_EIM_CS0__GPIO2_IO23 0x1b0b0 310 >; 311 }; 312 313 pinctrl_keypad: keypadgrp { 314 fsl,pins = < 315 MX6QDL_PAD_GPIO_19__GPIO4_IO05 0x1b0b0 316 >; 317 }; 318 319 pinctrl_rotary_ch: rotarychgrp { 320 fsl,pins = < 321 MX6QDL_PAD_NANDF_D3__GPIO2_IO03 0x1b0b0 322 MX6QDL_PAD_NANDF_D4__GPIO2_IO04 0x1b0b0 323 >; 324 }; 325 326 pinctrl_touchscreen: touchscreengrp { 327 fsl,pins = < 328 MX6QDL_PAD_DISP0_DAT14__GPIO5_IO08 0x1b0b0 329 MX6QDL_PAD_DISP0_DAT15__GPIO5_IO09 0x1b0b0 330 >; 331 }; 332}; 333