xref: /freebsd/sys/contrib/device-tree/src/arm/st/stm32mp157a-microgea-stm32mp1-microdev2.0-of7.dts (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
1*f126890aSEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
2*f126890aSEmmanuel Vadot/*
3*f126890aSEmmanuel Vadot * Copyright (c) STMicroelectronics 2019 - All Rights Reserved
4*f126890aSEmmanuel Vadot * Copyright (c) 2020 Engicam srl
5*f126890aSEmmanuel Vadot * Copyright (c) 2020 Amarula Solutions(India)
6*f126890aSEmmanuel Vadot */
7*f126890aSEmmanuel Vadot
8*f126890aSEmmanuel Vadot/dts-v1/;
9*f126890aSEmmanuel Vadot#include "stm32mp157.dtsi"
10*f126890aSEmmanuel Vadot#include "stm32mp157a-microgea-stm32mp1.dtsi"
11*f126890aSEmmanuel Vadot#include "stm32mp15-pinctrl.dtsi"
12*f126890aSEmmanuel Vadot#include "stm32mp15xxaa-pinctrl.dtsi"
13*f126890aSEmmanuel Vadot#include <dt-bindings/gpio/gpio.h>
14*f126890aSEmmanuel Vadot
15*f126890aSEmmanuel Vadot/ {
16*f126890aSEmmanuel Vadot	model = "Engicam MicroGEA STM32MP1 MicroDev 2.0 7\" Open Frame";
17*f126890aSEmmanuel Vadot	compatible = "engicam,microgea-stm32mp1-microdev2.0-of7",
18*f126890aSEmmanuel Vadot		     "engicam,microgea-stm32mp1", "st,stm32mp157";
19*f126890aSEmmanuel Vadot
20*f126890aSEmmanuel Vadot	aliases {
21*f126890aSEmmanuel Vadot		serial0 = &uart4;
22*f126890aSEmmanuel Vadot		serial1 = &uart8;
23*f126890aSEmmanuel Vadot	};
24*f126890aSEmmanuel Vadot
25*f126890aSEmmanuel Vadot	chosen {
26*f126890aSEmmanuel Vadot		stdout-path = "serial0:115200n8";
27*f126890aSEmmanuel Vadot	};
28*f126890aSEmmanuel Vadot
29*f126890aSEmmanuel Vadot	backlight: backlight {
30*f126890aSEmmanuel Vadot		compatible = "gpio-backlight";
31*f126890aSEmmanuel Vadot		gpios = <&gpiod 13 GPIO_ACTIVE_HIGH>;
32*f126890aSEmmanuel Vadot		default-on;
33*f126890aSEmmanuel Vadot	};
34*f126890aSEmmanuel Vadot
35*f126890aSEmmanuel Vadot	lcd_3v3: regulator-lcd-3v3 {
36*f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
37*f126890aSEmmanuel Vadot		regulator-name = "lcd_3v3";
38*f126890aSEmmanuel Vadot		regulator-min-microvolt = <3300000>;
39*f126890aSEmmanuel Vadot		regulator-max-microvolt = <3300000>;
40*f126890aSEmmanuel Vadot		gpio = <&gpiof 10 GPIO_ACTIVE_HIGH>;
41*f126890aSEmmanuel Vadot		enable-active-high;
42*f126890aSEmmanuel Vadot		regulator-always-on;
43*f126890aSEmmanuel Vadot		power-supply = <&panel_pwr>;
44*f126890aSEmmanuel Vadot	};
45*f126890aSEmmanuel Vadot
46*f126890aSEmmanuel Vadot	panel_pwr: regulator-panel-pwr {
47*f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
48*f126890aSEmmanuel Vadot		regulator-name = "panel_pwr";
49*f126890aSEmmanuel Vadot		regulator-min-microvolt = <3300000>;
50*f126890aSEmmanuel Vadot		regulator-max-microvolt = <3300000>;
51*f126890aSEmmanuel Vadot		gpio = <&gpiob 10 GPIO_ACTIVE_HIGH>;
52*f126890aSEmmanuel Vadot		regulator-always-on;
53*f126890aSEmmanuel Vadot	};
54*f126890aSEmmanuel Vadot
55*f126890aSEmmanuel Vadot	panel {
56*f126890aSEmmanuel Vadot		compatible = "auo,b101aw03";
57*f126890aSEmmanuel Vadot		backlight = <&backlight>;
58*f126890aSEmmanuel Vadot		enable-gpios = <&gpiof 2 GPIO_ACTIVE_HIGH>;
59*f126890aSEmmanuel Vadot		power-supply = <&lcd_3v3>;
60*f126890aSEmmanuel Vadot
61*f126890aSEmmanuel Vadot		port {
62*f126890aSEmmanuel Vadot			panel_in: endpoint {
63*f126890aSEmmanuel Vadot				remote-endpoint = <&ltdc_ep0_out>;
64*f126890aSEmmanuel Vadot			};
65*f126890aSEmmanuel Vadot		};
66*f126890aSEmmanuel Vadot	};
67*f126890aSEmmanuel Vadot};
68*f126890aSEmmanuel Vadot
69*f126890aSEmmanuel Vadot&i2c2 {
70*f126890aSEmmanuel Vadot	i2c-scl-falling-time-ns = <20>;
71*f126890aSEmmanuel Vadot	i2c-scl-rising-time-ns = <185>;
72*f126890aSEmmanuel Vadot	pinctrl-names = "default", "sleep";
73*f126890aSEmmanuel Vadot	pinctrl-0 = <&i2c2_pins_a>;
74*f126890aSEmmanuel Vadot	pinctrl-1 = <&i2c2_sleep_pins_a>;
75*f126890aSEmmanuel Vadot	status = "okay";
76*f126890aSEmmanuel Vadot};
77*f126890aSEmmanuel Vadot
78*f126890aSEmmanuel Vadot&ltdc {
79*f126890aSEmmanuel Vadot	pinctrl-names = "default";
80*f126890aSEmmanuel Vadot	pinctrl-0 = <&ltdc_pins>;
81*f126890aSEmmanuel Vadot	status = "okay";
82*f126890aSEmmanuel Vadot
83*f126890aSEmmanuel Vadot	port {
84*f126890aSEmmanuel Vadot		ltdc_ep0_out: endpoint {
85*f126890aSEmmanuel Vadot			remote-endpoint = <&panel_in>;
86*f126890aSEmmanuel Vadot		};
87*f126890aSEmmanuel Vadot	};
88*f126890aSEmmanuel Vadot};
89*f126890aSEmmanuel Vadot
90*f126890aSEmmanuel Vadot&pinctrl {
91*f126890aSEmmanuel Vadot	ltdc_pins: ltdc-0 {
92*f126890aSEmmanuel Vadot		pins {
93*f126890aSEmmanuel Vadot			pinmux = <STM32_PINMUX('G', 10, AF14)>,	/* LTDC_B2 */
94*f126890aSEmmanuel Vadot				 <STM32_PINMUX('H', 12, AF14)>,	/* LTDC_R6 */
95*f126890aSEmmanuel Vadot				 <STM32_PINMUX('H', 11, AF14)>,	/* LTDC_R5 */
96*f126890aSEmmanuel Vadot				 <STM32_PINMUX('D', 10, AF14)>,	/* LTDC_B3 */
97*f126890aSEmmanuel Vadot				 <STM32_PINMUX('D', 9, AF14)>,	/* LTDC_B0 */
98*f126890aSEmmanuel Vadot				 <STM32_PINMUX('E', 5, AF14)>,	/* LTDC_G0 */
99*f126890aSEmmanuel Vadot				 <STM32_PINMUX('E', 6, AF14)>,	/* LTDC_G1 */
100*f126890aSEmmanuel Vadot				 <STM32_PINMUX('E', 13, AF14)>,	/* LTDC_DE */
101*f126890aSEmmanuel Vadot				 <STM32_PINMUX('E', 15, AF14)>,	/* LTDC_R7 */
102*f126890aSEmmanuel Vadot				 <STM32_PINMUX('G', 7, AF14)>,	/* LTDC_CLK */
103*f126890aSEmmanuel Vadot				 <STM32_PINMUX('G', 12, AF14)>,	/* LTDC_B1 */
104*f126890aSEmmanuel Vadot				 <STM32_PINMUX('H', 2, AF14)>,	/* LTDC_R0 */
105*f126890aSEmmanuel Vadot				 <STM32_PINMUX('H', 3, AF14)>,	/* LTDC_R1 */
106*f126890aSEmmanuel Vadot				 <STM32_PINMUX('H', 8, AF14)>,	/* LTDC_R2 */
107*f126890aSEmmanuel Vadot				 <STM32_PINMUX('H', 9, AF14)>,	/* LTDC_R3 */
108*f126890aSEmmanuel Vadot				 <STM32_PINMUX('H', 10, AF14)>,	/* LTDC_R4 */
109*f126890aSEmmanuel Vadot				 <STM32_PINMUX('H', 13, AF14)>,	/* LTDC_G2 */
110*f126890aSEmmanuel Vadot				 <STM32_PINMUX('H', 14, AF14)>,	/* LTDC_G3 */
111*f126890aSEmmanuel Vadot				 <STM32_PINMUX('H', 15, AF14)>,	/* LTDC_G4 */
112*f126890aSEmmanuel Vadot				 <STM32_PINMUX('I', 0, AF14)>,	/* LTDC_G5 */
113*f126890aSEmmanuel Vadot				 <STM32_PINMUX('I', 1, AF14)>,	/* LTDC_G6 */
114*f126890aSEmmanuel Vadot				 <STM32_PINMUX('I', 2, AF14)>,	/* LTDC_G7 */
115*f126890aSEmmanuel Vadot				 <STM32_PINMUX('I', 4, AF14)>,	/* LTDC_B4 */
116*f126890aSEmmanuel Vadot				 <STM32_PINMUX('I', 5, AF14)>,	/* LTDC_B5 */
117*f126890aSEmmanuel Vadot				 <STM32_PINMUX('B', 8, AF14)>,	/* LTDC_B6 */
118*f126890aSEmmanuel Vadot				 <STM32_PINMUX('I', 7, AF14)>,	/* LTDC_B7 */
119*f126890aSEmmanuel Vadot				 <STM32_PINMUX('I', 9, AF14)>,	/* LTDC_VSYNC */
120*f126890aSEmmanuel Vadot				 <STM32_PINMUX('I', 10, AF14)>;	/* LTDC_HSYNC */
121*f126890aSEmmanuel Vadot			bias-disable;
122*f126890aSEmmanuel Vadot			drive-push-pull;
123*f126890aSEmmanuel Vadot			slew-rate = <3>;
124*f126890aSEmmanuel Vadot		};
125*f126890aSEmmanuel Vadot	};
126*f126890aSEmmanuel Vadot};
127*f126890aSEmmanuel Vadot
128*f126890aSEmmanuel Vadot&sdmmc1 {
129*f126890aSEmmanuel Vadot	bus-width = <4>;
130*f126890aSEmmanuel Vadot	disable-wp;
131*f126890aSEmmanuel Vadot	pinctrl-names = "default", "opendrain", "sleep";
132*f126890aSEmmanuel Vadot	pinctrl-0 = <&sdmmc1_b4_pins_a>;
133*f126890aSEmmanuel Vadot	pinctrl-1 = <&sdmmc1_b4_od_pins_a>;
134*f126890aSEmmanuel Vadot	pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
135*f126890aSEmmanuel Vadot	st,neg-edge;
136*f126890aSEmmanuel Vadot	vmmc-supply = <&vdd>;
137*f126890aSEmmanuel Vadot	status = "okay";
138*f126890aSEmmanuel Vadot};
139*f126890aSEmmanuel Vadot
140*f126890aSEmmanuel Vadot&uart4 {
141*f126890aSEmmanuel Vadot	pinctrl-names = "default", "sleep", "idle";
142*f126890aSEmmanuel Vadot	pinctrl-0 = <&uart4_pins_a>;
143*f126890aSEmmanuel Vadot	pinctrl-1 = <&uart4_sleep_pins_a>;
144*f126890aSEmmanuel Vadot	pinctrl-2 = <&uart4_idle_pins_a>;
145*f126890aSEmmanuel Vadot	/delete-property/dmas;
146*f126890aSEmmanuel Vadot	/delete-property/dma-names;
147*f126890aSEmmanuel Vadot	status = "okay";
148*f126890aSEmmanuel Vadot};
149*f126890aSEmmanuel Vadot
150*f126890aSEmmanuel Vadot/* J31: RS323 */
151*f126890aSEmmanuel Vadot&uart8 {
152*f126890aSEmmanuel Vadot	pinctrl-names = "default";
153*f126890aSEmmanuel Vadot	pinctrl-0 = <&uart8_pins_a>;
154*f126890aSEmmanuel Vadot	/delete-property/dmas;
155*f126890aSEmmanuel Vadot	/delete-property/dma-names;
156*f126890aSEmmanuel Vadot	status = "okay";
157*f126890aSEmmanuel Vadot};
158