1// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
2/*
3 * Copyright (C) 2020 Marcin Sloniewski <marcin.sloniewski@gmail.com>
4 */
5
6/dts-v1/;
7
8#include "stm32mp157c-odyssey-som.dtsi"
9
10/ {
11
12	model = "Seeed Studio Odyssey-STM32MP157C Board";
13	compatible = "seeed,odyssey-stm32mp157c", "st,stm32mp157";
14
15	aliases {
16		ethernet0 = &ethernet0;
17		serial0 = &uart4;
18	};
19
20	chosen {
21		stdout-path = "serial0:115200n8";
22	};
23
24	led {
25		compatible = "gpio-leds";
26		blue {
27			label = "heartbeat";
28			gpios = <&gpiog 3 GPIO_ACTIVE_HIGH>;
29			linux,default-trigger = "heartbeat";
30			default-state = "off";
31		};
32	};
33
34};
35
36&adc {
37	pinctrl-names = "default";
38	pinctrl-0 = <&adc12_ain_pins_a>, <&adc12_usb_cc_pins_a>;
39	vdd-supply = <&vdd>;
40	vdda-supply = <&vdd>;
41	vref-supply = <&vrefbuf>;
42	status = "disabled";
43	adc1: adc@0 {
44		/*
45		 * Type-C USB_PWR_CC1 & USB_PWR_CC2 on in18 & in19.
46		 * Use at least 5 * RC time, e.g. 5 * (Rp + Rd) * C:
47		 * 5 * (56 + 47kOhms) * 5pF => 2.5us.
48		 * Use arbitrary margin here (e.g. 5us).
49		 */
50		st,min-sample-time-nsecs = <5000>;
51		/* AIN connector, USB Type-C CC1 & CC2 */
52		st,adc-channels = <0 1 6 13 18 19>;
53		status = "okay";
54	};
55	adc2: adc@100 {
56		/* AIN connector, USB Type-C CC1 & CC2 */
57		st,adc-channels = <0 1 2 6 18 19>;
58		st,min-sample-time-nsecs = <5000>;
59		status = "okay";
60	};
61};
62
63&cec {
64	pinctrl-names = "default", "sleep";
65	pinctrl-0 = <&cec_pins_b>;
66	pinctrl-1 = <&cec_sleep_pins_b>;
67	status = "okay";
68};
69
70&ethernet0 {
71	status = "okay";
72	pinctrl-0 = <&ethernet0_rgmii_pins_a>;
73	pinctrl-1 = <&ethernet0_rgmii_sleep_pins_a>;
74	pinctrl-names = "default", "sleep";
75	phy-mode = "rgmii-id";
76	max-speed = <1000>;
77	phy-handle = <&phy0>;
78
79	mdio0 {
80		#address-cells = <1>;
81		#size-cells = <0>;
82		compatible = "snps,dwmac-mdio";
83		phy0: ethernet-phy@0 {
84			reg = <0>;
85		};
86	};
87};
88
89&gpu {
90	contiguous-area = <&gpu_reserved>;
91	status = "okay";
92};
93
94&i2c1 {
95	pinctrl-names = "default", "sleep";
96	pinctrl-0 = <&i2c1_pins_a>;
97	pinctrl-1 = <&i2c1_sleep_pins_a>;
98	i2c-scl-rising-time-ns = <100>;
99	i2c-scl-falling-time-ns = <7>;
100	status = "okay";
101	/delete-property/dmas;
102	/delete-property/dma-names;
103};
104
105&i2s2 {
106	clocks = <&rcc SPI2>, <&rcc SPI2_K>, <&rcc PLL3_Q>, <&rcc PLL3_R>;
107	clock-names = "pclk", "i2sclk", "x8k", "x11k";
108	pinctrl-names = "default", "sleep";
109	pinctrl-0 = <&i2s2_pins_a>;
110	pinctrl-1 = <&i2s2_sleep_pins_a>;
111	status = "okay";
112};
113
114&pwr_regulators {
115	vdd-supply = <&vdd>;
116	vdd_3v3_usbfs-supply = <&vdd_usb>;
117};
118
119&sdmmc1 {
120	pinctrl-names = "default", "opendrain", "sleep";
121	pinctrl-0 = <&sdmmc1_b4_pins_a>;
122	pinctrl-1 = <&sdmmc1_b4_od_pins_a>;
123	pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
124	broken-cd;
125	disable-wp;
126	st,neg-edge;
127	bus-width = <4>;
128	vmmc-supply = <&v3v3>;
129	status = "okay";
130};
131
132&uart4 {
133	pinctrl-names = "default";
134	pinctrl-0 = <&uart4_pins_a>;
135	status = "okay";
136};
137
138&usbh_ehci {
139	phys = <&usbphyc_port0>;
140	status = "okay";
141};
142
143&usbotg_hs {
144	dr_mode = "peripheral";
145	phys = <&usbphyc_port1 0>;
146	phy-names = "usb2-phy";
147	status = "okay";
148};
149
150&usbphyc {
151	status = "okay";
152};
153
154&usbphyc_port0 {
155	phy-supply = <&vdd_usb>;
156};
157
158&usbphyc_port1 {
159	phy-supply = <&vdd_usb>;
160};
161
162