0001 // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
0002 /*
0003 * Copyright (C) STMicroelectronics 2017 - All Rights Reserved
0004 * Author: Ludovic Barre <ludovic.barre@st.com> for STMicroelectronics.
0005 */
0006 /dts-v1/;
0007
0008 #include "stm32mp157c-ed1.dts"
0009 #include <dt-bindings/gpio/gpio.h>
0010 #include <dt-bindings/input/input.h>
0011
0012 / {
0013 model = "STMicroelectronics STM32MP157C eval daughter on eval mother";
0014 compatible = "st,stm32mp157c-ev1", "st,stm32mp157c-ed1", "st,stm32mp157";
0015
0016 chosen {
0017 stdout-path = "serial0:115200n8";
0018 };
0019
0020 aliases {
0021 serial0 = &uart4;
0022 serial1 = &usart3;
0023 ethernet0 = ðernet0;
0024 };
0025
0026 clocks {
0027 clk_ext_camera: clk-ext-camera {
0028 #clock-cells = <0>;
0029 compatible = "fixed-clock";
0030 clock-frequency = <24000000>;
0031 };
0032 };
0033
0034 joystick {
0035 compatible = "gpio-keys";
0036 pinctrl-0 = <&joystick_pins>;
0037 pinctrl-names = "default";
0038 button-0 {
0039 label = "JoySel";
0040 linux,code = <KEY_ENTER>;
0041 interrupt-parent = <&stmfx_pinctrl>;
0042 interrupts = <0 IRQ_TYPE_EDGE_RISING>;
0043 };
0044 button-1 {
0045 label = "JoyDown";
0046 linux,code = <KEY_DOWN>;
0047 interrupt-parent = <&stmfx_pinctrl>;
0048 interrupts = <1 IRQ_TYPE_EDGE_RISING>;
0049 };
0050 button-2 {
0051 label = "JoyLeft";
0052 linux,code = <KEY_LEFT>;
0053 interrupt-parent = <&stmfx_pinctrl>;
0054 interrupts = <2 IRQ_TYPE_EDGE_RISING>;
0055 };
0056 button-3 {
0057 label = "JoyRight";
0058 linux,code = <KEY_RIGHT>;
0059 interrupt-parent = <&stmfx_pinctrl>;
0060 interrupts = <3 IRQ_TYPE_EDGE_RISING>;
0061 };
0062 button-4 {
0063 label = "JoyUp";
0064 linux,code = <KEY_UP>;
0065 interrupt-parent = <&stmfx_pinctrl>;
0066 interrupts = <4 IRQ_TYPE_EDGE_RISING>;
0067 };
0068 };
0069
0070 panel_backlight: panel-backlight {
0071 compatible = "gpio-backlight";
0072 gpios = <&gpiod 13 GPIO_ACTIVE_LOW>;
0073 default-on;
0074 status = "okay";
0075 };
0076 };
0077
0078 &cec {
0079 pinctrl-names = "default";
0080 pinctrl-0 = <&cec_pins_a>;
0081 status = "okay";
0082 };
0083
0084 &dcmi {
0085 status = "okay";
0086 pinctrl-names = "default", "sleep";
0087 pinctrl-0 = <&dcmi_pins_a>;
0088 pinctrl-1 = <&dcmi_sleep_pins_a>;
0089
0090 port {
0091 dcmi_0: endpoint {
0092 remote-endpoint = <&ov5640_0>;
0093 bus-type = <5>;
0094 bus-width = <8>;
0095 hsync-active = <0>;
0096 vsync-active = <0>;
0097 pclk-sample = <1>;
0098 };
0099 };
0100 };
0101
0102 &dsi {
0103 phy-dsi-supply = <®18>;
0104 status = "okay";
0105
0106 ports {
0107 port@0 {
0108 reg = <0>;
0109 dsi_in: endpoint {
0110 remote-endpoint = <<dc_ep0_out>;
0111 };
0112 };
0113
0114 port@1 {
0115 reg = <1>;
0116 dsi_out: endpoint {
0117 remote-endpoint = <&dsi_panel_in>;
0118 };
0119 };
0120 };
0121
0122 panel-dsi@0 {
0123 compatible = "raydium,rm68200";
0124 reg = <0>;
0125 reset-gpios = <&gpiof 15 GPIO_ACTIVE_LOW>;
0126 backlight = <&panel_backlight>;
0127 power-supply = <&v3v3>;
0128 status = "okay";
0129
0130 port {
0131 dsi_panel_in: endpoint {
0132 remote-endpoint = <&dsi_out>;
0133 };
0134 };
0135 };
0136 };
0137
0138 ðernet0 {
0139 status = "okay";
0140 pinctrl-0 = <ðernet0_rgmii_pins_a>;
0141 pinctrl-1 = <ðernet0_rgmii_sleep_pins_a>;
0142 pinctrl-names = "default", "sleep";
0143 phy-mode = "rgmii-id";
0144 max-speed = <1000>;
0145 phy-handle = <&phy0>;
0146
0147 mdio0 {
0148 #address-cells = <1>;
0149 #size-cells = <0>;
0150 compatible = "snps,dwmac-mdio";
0151 phy0: ethernet-phy@0 {
0152 reg = <0>;
0153 };
0154 };
0155 };
0156
0157 &fmc {
0158 pinctrl-names = "default", "sleep";
0159 pinctrl-0 = <&fmc_pins_a>;
0160 pinctrl-1 = <&fmc_sleep_pins_a>;
0161 status = "okay";
0162
0163 nand-controller@4,0 {
0164 status = "okay";
0165
0166 nand@0 {
0167 reg = <0>;
0168 nand-on-flash-bbt;
0169 #address-cells = <1>;
0170 #size-cells = <1>;
0171 };
0172 };
0173 };
0174
0175 &i2c2 {
0176 pinctrl-names = "default", "sleep";
0177 pinctrl-0 = <&i2c2_pins_a>;
0178 pinctrl-1 = <&i2c2_sleep_pins_a>;
0179 i2c-scl-rising-time-ns = <185>;
0180 i2c-scl-falling-time-ns = <20>;
0181 status = "okay";
0182
0183 ov5640: camera@3c {
0184 compatible = "ovti,ov5640";
0185 reg = <0x3c>;
0186 clocks = <&clk_ext_camera>;
0187 clock-names = "xclk";
0188 DOVDD-supply = <&v2v8>;
0189 powerdown-gpios = <&stmfx_pinctrl 18 (GPIO_ACTIVE_HIGH | GPIO_PUSH_PULL)>;
0190 reset-gpios = <&stmfx_pinctrl 19 (GPIO_ACTIVE_LOW | GPIO_PUSH_PULL)>;
0191 rotation = <180>;
0192 status = "okay";
0193
0194 port {
0195 ov5640_0: endpoint {
0196 remote-endpoint = <&dcmi_0>;
0197 bus-width = <8>;
0198 data-shift = <2>; /* lines 9:2 are used */
0199 hsync-active = <0>;
0200 vsync-active = <0>;
0201 pclk-sample = <1>;
0202 };
0203 };
0204 };
0205
0206 stmfx: stmfx@42 {
0207 compatible = "st,stmfx-0300";
0208 reg = <0x42>;
0209 interrupts = <8 IRQ_TYPE_EDGE_RISING>;
0210 interrupt-parent = <&gpioi>;
0211 vdd-supply = <&v3v3>;
0212
0213 stmfx_pinctrl: pinctrl {
0214 compatible = "st,stmfx-0300-pinctrl";
0215 gpio-controller;
0216 #gpio-cells = <2>;
0217 interrupt-controller;
0218 #interrupt-cells = <2>;
0219 gpio-ranges = <&stmfx_pinctrl 0 0 24>;
0220
0221 joystick_pins: joystick-pins {
0222 pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4";
0223 bias-pull-down;
0224 };
0225 };
0226 };
0227 };
0228
0229 &i2c5 {
0230 pinctrl-names = "default", "sleep";
0231 pinctrl-0 = <&i2c5_pins_a>;
0232 pinctrl-1 = <&i2c5_sleep_pins_a>;
0233 i2c-scl-rising-time-ns = <185>;
0234 i2c-scl-falling-time-ns = <20>;
0235 status = "okay";
0236 };
0237
0238 <dc {
0239 status = "okay";
0240
0241 port {
0242 ltdc_ep0_out: endpoint@0 {
0243 reg = <0>;
0244 remote-endpoint = <&dsi_in>;
0245 };
0246 };
0247 };
0248
0249 &m_can1 {
0250 pinctrl-names = "default", "sleep";
0251 pinctrl-0 = <&m_can1_pins_a>;
0252 pinctrl-1 = <&m_can1_sleep_pins_a>;
0253 status = "okay";
0254 };
0255
0256 &qspi {
0257 pinctrl-names = "default", "sleep";
0258 pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a &qspi_bk2_pins_a>;
0259 pinctrl-1 = <&qspi_clk_sleep_pins_a &qspi_bk1_sleep_pins_a &qspi_bk2_sleep_pins_a>;
0260 reg = <0x58003000 0x1000>, <0x70000000 0x4000000>;
0261 #address-cells = <1>;
0262 #size-cells = <0>;
0263 status = "okay";
0264
0265 flash0: flash@0 {
0266 compatible = "jedec,spi-nor";
0267 reg = <0>;
0268 spi-rx-bus-width = <4>;
0269 spi-max-frequency = <108000000>;
0270 #address-cells = <1>;
0271 #size-cells = <1>;
0272 };
0273
0274 flash1: flash@1 {
0275 compatible = "jedec,spi-nor";
0276 reg = <1>;
0277 spi-rx-bus-width = <4>;
0278 spi-max-frequency = <108000000>;
0279 #address-cells = <1>;
0280 #size-cells = <1>;
0281 };
0282 };
0283
0284 &sdmmc3 {
0285 pinctrl-names = "default", "opendrain", "sleep";
0286 pinctrl-0 = <&sdmmc3_b4_pins_a>;
0287 pinctrl-1 = <&sdmmc3_b4_od_pins_a>;
0288 pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>;
0289 broken-cd;
0290 st,neg-edge;
0291 bus-width = <4>;
0292 vmmc-supply = <&v3v3>;
0293 status = "disabled";
0294 };
0295
0296 &spi1 {
0297 pinctrl-names = "default";
0298 pinctrl-0 = <&spi1_pins_a>;
0299 status = "disabled";
0300 };
0301
0302 &timers2 {
0303 /* spare dmas for other usage (un-delete to enable pwm capture) */
0304 /delete-property/dmas;
0305 /delete-property/dma-names;
0306 status = "disabled";
0307 pwm {
0308 pinctrl-0 = <&pwm2_pins_a>;
0309 pinctrl-1 = <&pwm2_sleep_pins_a>;
0310 pinctrl-names = "default", "sleep";
0311 status = "okay";
0312 };
0313 timer@1 {
0314 status = "okay";
0315 };
0316 };
0317
0318 &timers8 {
0319 /delete-property/dmas;
0320 /delete-property/dma-names;
0321 status = "disabled";
0322 pwm {
0323 pinctrl-0 = <&pwm8_pins_a>;
0324 pinctrl-1 = <&pwm8_sleep_pins_a>;
0325 pinctrl-names = "default", "sleep";
0326 status = "okay";
0327 };
0328 timer@7 {
0329 status = "okay";
0330 };
0331 };
0332
0333 &timers12 {
0334 /delete-property/dmas;
0335 /delete-property/dma-names;
0336 status = "disabled";
0337 pwm {
0338 pinctrl-0 = <&pwm12_pins_a>;
0339 pinctrl-1 = <&pwm12_sleep_pins_a>;
0340 pinctrl-names = "default", "sleep";
0341 status = "okay";
0342 };
0343 timer@11 {
0344 status = "okay";
0345 };
0346 };
0347
0348 &usart3 {
0349 pinctrl-names = "default", "sleep", "idle";
0350 pinctrl-0 = <&usart3_pins_b>;
0351 pinctrl-1 = <&usart3_sleep_pins_b>;
0352 pinctrl-2 = <&usart3_idle_pins_b>;
0353 /*
0354 * HW flow control USART3_RTS is optional, and isn't default wired to
0355 * the connector. SB23 needs to be soldered in order to use it, and R77
0356 * (ETH_CLK) should be removed.
0357 */
0358 uart-has-rtscts;
0359 status = "disabled";
0360 };
0361
0362 &usbh_ehci {
0363 phys = <&usbphyc_port0>;
0364 status = "okay";
0365 };
0366
0367 &usbotg_hs {
0368 pinctrl-0 = <&usbotg_hs_pins_a>;
0369 pinctrl-names = "default";
0370 phys = <&usbphyc_port1 0>;
0371 phy-names = "usb2-phy";
0372 status = "okay";
0373 };
0374
0375 &usbphyc {
0376 status = "okay";
0377 };
0378
0379 &usbphyc_port0 {
0380 st,tune-hs-dc-level = <2>;
0381 st,enable-fs-rftime-tuning;
0382 st,enable-hs-rftime-reduction;
0383 st,trim-hs-current = <15>;
0384 st,trim-hs-impedance = <1>;
0385 st,tune-squelch-level = <3>;
0386 st,tune-hs-rx-offset = <2>;
0387 st,no-lsfs-sc;
0388 };
0389
0390 &usbphyc_port1 {
0391 st,tune-hs-dc-level = <2>;
0392 st,enable-fs-rftime-tuning;
0393 st,enable-hs-rftime-reduction;
0394 st,trim-hs-current = <15>;
0395 st,trim-hs-impedance = <1>;
0396 st,tune-squelch-level = <3>;
0397 st,tune-hs-rx-offset = <2>;
0398 st,no-lsfs-sc;
0399 };