1// SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-3-Clause) 2/* 3 * Copyright (C) 2024 Leonard Göhrs, Pengutronix 4 */ 5 6/dts-v1/; 7 8#include "stm32mp153c-lxa-fairytux2.dtsi" 9 10/ { 11 model = "Linux Automation GmbH FairyTux 2 Gen 1"; 12 compatible = "lxa,stm32mp153c-fairytux2-gen1", "oct,stm32mp153x-osd32", "st,stm32mp153"; 13 14 gpio-keys { 15 compatible = "gpio-keys"; 16 17 button-left { 18 label = "USER_BTN1"; 19 linux,code = <KEY_ESC>; 20 gpios = <&gpioi 11 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; 21 }; 22 23 button-right { 24 label = "USER_BTN2"; 25 linux,code = <KEY_HOME>; 26 gpios = <&gpioe 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; 27 }; 28 }; 29}; 30 31&gpiof { 32 gpio-line-names = "GPIO1", "GPIO2", "", "", "", /* 0 */ 33 "", "", "", "", "", /* 5 */ 34 "", "", "", "", "", /* 10 */ 35 ""; /* 15 */ 36}; 37 38&gpioh { 39 gpio-line-names = "", "", "", "", "LCD_RESET", /* 0 */ 40 "", "", "", "", "", /* 5 */ 41 "", "", "", "GPIO3", "", /* 10 */ 42 ""; /* 15 */ 43}; 44 45&gpioi { 46 gpio-line-names = "", "", "", "", "", /* 0 */ 47 "", "", "", "ETH_", "", /* 5 */ 48 "", "USER_BTN1"; /* 10 */ 49}; 50 51&i2c1 { 52 pinctrl-names = "default", "sleep"; 53 pinctrl-0 = <&i2c1_pins_b>; 54 pinctrl-1 = <&i2c1_sleep_pins_b>; 55 status = "okay"; 56 57 io_board_gpio: gpio@20 { 58 compatible = "ti,tca6408"; 59 reg = <0x20>; 60 gpio-controller; 61 #gpio-cells = <2>; 62 vcc-supply = <&v3v3_hdmi>; 63 gpio-line-names = "LED1_GA_YK", "LED2_GA_YK", "LED1_GK_YA", "LED2_GK_YA", 64 "RS485_EN", "RS485_120R", "", "CAN_120R"; 65 }; 66}; 67 68&led_controller_io { 69 /* 70 * led-2 and led-3 are internally connected antiparallel to one 71 * another inside the ethernet jack like this: 72 * GPIO1 ---+---|led-2|>--+--- GPIO3 73 * +--<|led-3|---+ 74 * E.g. only one of the LEDs can be illuminated at a time while 75 * the other output must be driven low. 76 * This should likely be implemented using a multi color LED 77 * driver for antiparallel LEDs. 78 */ 79 led-2 { 80 color = <LED_COLOR_ID_GREEN>; 81 function = LED_FUNCTION_ACTIVITY; 82 gpios = <&io_board_gpio 1 GPIO_ACTIVE_HIGH>; 83 }; 84 85 led-3 { 86 color = <LED_COLOR_ID_ORANGE>; 87 function = LED_FUNCTION_ACTIVITY; 88 gpios = <&io_board_gpio 3 GPIO_ACTIVE_HIGH>; 89 }; 90}; 91 92&usart3 { 93 /* 94 * On Gen 1 FairyTux 2 only RTS can be used and not CTS as well, 95 * Because pins PD11 (CTS) and PI11 (USER_BTN1) share the same 96 * interrupt and only one of them can be used at a time. 97 */ 98 rts-gpios = <&gpiod 12 GPIO_ACTIVE_LOW>; 99}; 100 101&usbotg_hs { 102 dr_mode = "peripheral"; 103}; 104