0001 /* SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-3-Clause) */
0002 /*
0003 * Copyright (C) 2020 STMicroelectronics - All Rights Reserved
0004 * Copyright (C) 2020 Ahmad Fatoum, Pengutronix
0005 */
0006
0007 /dts-v1/;
0008
0009 #include "stm32mp157.dtsi"
0010 #include "stm32mp15xx-osd32.dtsi"
0011 #include "stm32mp15xxac-pinctrl.dtsi"
0012
0013 #include <dt-bindings/gpio/gpio.h>
0014 #include <dt-bindings/pwm/pwm.h>
0015
0016 / {
0017 model = "Linux Automation MC-1 board";
0018 compatible = "lxa,stm32mp157c-mc1", "oct,stm32mp15xx-osd32", "st,stm32mp157";
0019
0020 aliases {
0021 ethernet0 = ðernet0;
0022 mmc0 = &sdmmc1;
0023 mmc1 = &sdmmc2;
0024 serial0 = &uart4;
0025 };
0026
0027 backlight: backlight {
0028 compatible = "pwm-backlight";
0029 pwms = <&backlight_pwm 1 100000 PWM_POLARITY_INVERTED>;
0030 brightness-levels = <0 31 63 95 127 159 191 223 255>;
0031 default-brightness-level = <7>;
0032 power-supply = <®_5v2>; /* 3V3_BACKLIGHT */
0033 };
0034
0035 chosen {
0036 stdout-path = &uart4;
0037 };
0038
0039 led-controller-0 {
0040 compatible = "gpio-leds";
0041
0042 led-0 {
0043 label = "mc1:green:act";
0044 gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
0045 linux,default-trigger = "heartbeat";
0046 };
0047 };
0048
0049 led-controller-1 {
0050 compatible = "pwm-leds";
0051
0052 /* led-1 to led-3 are part of a single RGB led */
0053 led-1 {
0054 label = "mc1:red:rgb";
0055 pwms = <&leds_pwm 1 1000000 0>;
0056 max-brightness = <255>;
0057 active-low;
0058 };
0059
0060 led-2 {
0061 label = "mc1:green:rgb";
0062 pwms = <&leds_pwm 2 1000000 0>;
0063 max-brightness = <255>;
0064 active-low;
0065 };
0066
0067 led-3 {
0068 label = "mc1:blue:rgb";
0069 pwms = <&leds_pwm 3 1000000 0>;
0070 max-brightness = <255>;
0071 active-low;
0072 };
0073 };
0074
0075 panel: panel {
0076 compatible = "edt,etm0700g0edh6", "simple-panel";
0077 backlight = <&backlight>;
0078 enable-gpios = <&gpiod 4 GPIO_ACTIVE_HIGH>;
0079 power-supply = <®_3v3>;
0080
0081 port {
0082 panel_input: endpoint {
0083 remote-endpoint = <<dc_ep0_out>;
0084 };
0085 };
0086 };
0087
0088 reg_3v3: regulator_3v3 {
0089 compatible = "regulator-fixed";
0090 regulator-name = "3V3";
0091 regulator-min-microvolt = <3300000>;
0092 regulator-max-microvolt = <3300000>;
0093 regulator-always-on;
0094 vin-supply = <&v3v3>;
0095 };
0096
0097 /* supplied by either debug board or PoE */
0098 reg_5v2: regulator_5v2 {
0099 compatible = "regulator-fixed";
0100 regulator-name = "5V2";
0101 regulator-min-microvolt = <5200000>;
0102 regulator-max-microvolt = <5200000>;
0103 regulator-always-on;
0104 };
0105 };
0106
0107 ðernet0 {
0108 pinctrl-names = "default", "sleep";
0109 pinctrl-0 = <ðernet0_rgmii_pins_b>;
0110 pinctrl-1 = <ðernet0_rgmii_sleep_pins_b>;
0111 phy-mode = "rgmii-id";
0112 phy-handle = <ðphy>;
0113 status = "okay";
0114
0115 mdio0 {
0116 compatible = "snps,dwmac-mdio";
0117 #address-cells = <1>;
0118 #size-cells = <0>;
0119
0120 ethphy: ethernet-phy@3 { /* KSZ9031RN */
0121 reg = <3>;
0122 reset-gpios = <&gpiog 0 GPIO_ACTIVE_LOW>; /* ETH_RST# */
0123 interrupt-parent = <&gpioa>;
0124 interrupts = <6 IRQ_TYPE_EDGE_FALLING>; /* ETH_MDINT# */
0125 reset-assert-us = <10000>;
0126 reset-deassert-us = <300>;
0127 micrel,force-master;
0128 };
0129 };
0130 };
0131
0132 &gpioz {
0133 gpio-line-names = "HWID0", "HWID1", "HWID2", "HWID3", "", "",
0134 "HWID4", "HWID5";
0135 };
0136
0137 &i2c5 {
0138 pinctrl-names = "default", "sleep";
0139 pinctrl-0 = <&i2c5_pins_b>;
0140 pinctrl-1 = <&i2c5_sleep_pins_b>;
0141 clock-frequency = <400000>;
0142 status = "okay";
0143
0144 touchscreen@38 {
0145 compatible = "edt,edt-ft5x06";
0146 interrupt-parent = <&gpiod>;
0147 interrupts = <11 IRQ_TYPE_EDGE_FALLING>; /* TOUCH_INT# */
0148 vcc-supply = <®_3v3>;
0149 reg = <0x38>;
0150 reset-gpios = <&gpiof 8 GPIO_ACTIVE_LOW>; /* TOUCH_RESET# */
0151 touchscreen-size-x = <1792>;
0152 touchscreen-size-y = <1024>;
0153 wakeup-source;
0154 };
0155 };
0156
0157 <dc {
0158 pinctrl-names = "default", "sleep";
0159 pinctrl-0 = <<dc_pins_c>;
0160 pinctrl-1 = <<dc_sleep_pins_c>;
0161 status = "okay";
0162
0163 port {
0164 ltdc_ep0_out: endpoint@0 {
0165 reg = <0>;
0166 remote-endpoint = <&panel_input>;
0167 };
0168 };
0169 };
0170
0171 &pmic {
0172 regulators {
0173 buck4-supply = <®_5v2>; /* VIN */
0174 ldo2-supply = <®_5v2>; /* PMIC_LDO25IN */
0175 ldo5-supply = <®_5v2>; /* PMIC_LDO25IN */
0176 boost-supply = <®_5v2>; /* PMIC_BSTIN */
0177 pwr_sw2-supply = <&bst_out>; /* PMIC_SWIN */
0178 };
0179 };
0180
0181 &sdmmc1 {
0182 pinctrl-names = "default", "opendrain", "sleep";
0183 pinctrl-0 = <&sdmmc1_b4_pins_a>;
0184 pinctrl-1 = <&sdmmc1_b4_od_pins_a>;
0185 pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
0186 bus-width = <4>;
0187 cd-gpios = <&gpioh 3 GPIO_ACTIVE_LOW>;
0188 disable-wp;
0189 no-1-8-v;
0190 st,neg-edge;
0191 vmmc-supply = <®_3v3>;
0192 status = "okay";
0193 };
0194
0195 &sdmmc1_b4_pins_a {
0196 /*
0197 * board lacks external pull-ups on SDMMC lines. Class 10 SD refuses to
0198 * work, thus enable internal pull-ups.
0199 */
0200 pins1 {
0201 /delete-property/ bias-disable;
0202 bias-pull-up;
0203 };
0204 pins2 {
0205 /delete-property/ bias-disable;
0206 bias-pull-up;
0207 };
0208 };
0209
0210 &sdmmc2 {
0211 pinctrl-names = "default", "opendrain", "sleep";
0212 pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_b>;
0213 pinctrl-1 = <&sdmmc2_b4_od_pins_a &sdmmc2_d47_pins_b>;
0214 pinctrl-2 = <&sdmmc2_b4_sleep_pins_a &sdmmc2_d47_sleep_pins_b>;
0215 bus-width = <8>;
0216 mmc-ddr-3_3v;
0217 no-1-8-v;
0218 no-sd;
0219 no-sdio;
0220 non-removable;
0221 st,neg-edge;
0222 vmmc-supply = <®_3v3>;
0223 status = "okay";
0224 };
0225
0226 &timers3 {
0227 status = "okay";
0228
0229 backlight_pwm: pwm {
0230 pinctrl-names = "default", "sleep";
0231 pinctrl-0 = <&pwm3_pins_b>;
0232 pinctrl-1 = <&pwm3_sleep_pins_b>;
0233 status = "okay";
0234 };
0235 };
0236
0237 &timers5 {
0238 status = "okay";
0239
0240 leds_pwm: pwm {
0241 pinctrl-names = "default", "sleep";
0242 pinctrl-0 = <&pwm5_pins_b>;
0243 pinctrl-1 = <&pwm5_sleep_pins_b>;
0244 status = "okay";
0245 };
0246 };
0247
0248 &uart4 {
0249 pinctrl-names = "default";
0250 pinctrl-0 = <&uart4_pins_a>;
0251 /delete-property/dmas;
0252 /delete-property/dma-names;
0253 status = "okay";
0254 };