541 lines
11 KiB
Plaintext
Executable File
541 lines
11 KiB
Plaintext
Executable File
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
|
|
/*
|
|
* Copyright (C) MYiR 2022 - All Rights Reserved
|
|
* Author: Alexhu <fan.hu@myirtech.com> for MYiR.
|
|
*/
|
|
|
|
/dts-v1/;
|
|
|
|
#include <dt-bindings/gpio/gpio.h>
|
|
#include <dt-bindings/input/input.h>
|
|
#include <dt-bindings/leds/common.h>
|
|
#include <dt-bindings/rtc/rtc-stm32.h>
|
|
#include "stm32mp135.dtsi"
|
|
#include "stm32mp13xf.dtsi"
|
|
#include "stm32mp13-gateway-pinctrl.dtsi"
|
|
|
|
/ {
|
|
model = "STMicroelectronics STM32MP135F-DK Discovery Board";
|
|
compatible = "st,stm32mp135f-dk", "st,stm32mp135";
|
|
|
|
aliases {
|
|
ethernet0 = ð1;
|
|
ethernet1 = ð2;
|
|
serial0 = &uart4;
|
|
serial3 = &usart1;
|
|
serial1 = &usart2;
|
|
serial2 = &usart3;
|
|
serial5 = &uart5;
|
|
};
|
|
|
|
chosen {
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
ranges;
|
|
stdout-path = "serial0:115200n8";
|
|
};
|
|
|
|
memory@c0000000 {
|
|
device_type = "memory";
|
|
reg = <0xc0000000 0x20000000>;
|
|
};
|
|
|
|
reserved-memory {
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
ranges;
|
|
|
|
optee_framebuffer@dd000000 {
|
|
reg = <0xdd000000 0x1000000>;
|
|
no-map;
|
|
};
|
|
|
|
optee@de000000 {
|
|
reg = <0xde000000 0x2000000>;
|
|
no-map;
|
|
};
|
|
};
|
|
|
|
clocks {
|
|
clk_ext_audio: clk-ext-audio {
|
|
#clock-cells = <0>;
|
|
compatible = "fixed-clock";
|
|
clock-frequency = <12000000>;
|
|
};
|
|
|
|
clk_ext_camera: clk-ext-camera {
|
|
#clock-cells = <0>;
|
|
compatible = "fixed-clock";
|
|
clock-frequency = <12000000>;
|
|
};
|
|
|
|
clk_mco1: clk-mco1 {
|
|
#clock-cells = <0>;
|
|
compatible = "fixed-clock";
|
|
clock-frequency = <24000000>;
|
|
};
|
|
};
|
|
|
|
sys_mclk: clock-mclk {
|
|
compatible = "fixed-clock";
|
|
#clock-cells = <0>;
|
|
clock-frequency = <12000000>;
|
|
};
|
|
|
|
gpio-keys {
|
|
compatible = "gpio-keys";
|
|
#size-cells = <0>;
|
|
|
|
user {
|
|
label = "user";
|
|
linux,code = <BTN_1>;
|
|
gpios = <&gpioi 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
|
};
|
|
};
|
|
|
|
leds {
|
|
compatible = "gpio-leds";
|
|
|
|
run {
|
|
label = "run";
|
|
gpios = <&gpioe 14 GPIO_ACTIVE_LOW>;
|
|
linux,default-trigger = "heartbeat";
|
|
default-state = "on";
|
|
};
|
|
|
|
data {
|
|
label = "data";
|
|
gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
|
|
default-state = "off";
|
|
};
|
|
|
|
srv {
|
|
label = "srv";
|
|
gpios = <&gpioa 14 GPIO_ACTIVE_LOW>;
|
|
default-state = "off";
|
|
};
|
|
|
|
};
|
|
|
|
watchdog: watchdog {
|
|
compatible = "linux,wdt-gpio";
|
|
pinctrl-names = "default";
|
|
gpios = <&gpiod 1 GPIO_ACTIVE_LOW>;
|
|
hw_algo = "toggle";
|
|
hw_margin_ms = <1000>;
|
|
/*always-running;*/
|
|
};
|
|
|
|
v3v3_hdmi: regulator-v3v3-hdmi {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "v3v3_hdmi";
|
|
regulator-min-microvolt = <3300000>;
|
|
regulator-max-microvolt = <3300000>;
|
|
regulator-always-on;
|
|
regulator-boot-on;
|
|
};
|
|
|
|
v1v2_hdmi: regulator-v1v2-hdmi {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "v1v2_hdmi";
|
|
regulator-min-microvolt = <1200000>;
|
|
regulator-max-microvolt = <1200000>;
|
|
regulator-always-on;
|
|
regulator-boot-on;
|
|
};
|
|
|
|
vdd_usb: reg-vdd_usb {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "vdd_usb";
|
|
regulator-min-microvolt = <3300000>;
|
|
regulator-max-microvolt = <3300000>;
|
|
regulator-always-on;
|
|
regulator-boot-on;
|
|
};
|
|
|
|
reg_1p8v: regulator3 {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "fixed-1.8V";
|
|
regulator-min-microvolt = <1800000>;
|
|
regulator-max-microvolt = <1800000>;
|
|
regulator-boot-on;
|
|
regulator-always-on;
|
|
};
|
|
|
|
v3v3_ao: v3v3_ao {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "v3v3_ao";
|
|
regulator-min-microvolt = <3300000>;
|
|
regulator-max-microvolt = <3300000>;
|
|
regulator-always-on;
|
|
};
|
|
|
|
v3v3_panle: v3v3_panle {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "v3v3_panle";
|
|
regulator-min-microvolt = <3300000>;
|
|
regulator-max-microvolt = <3300000>;
|
|
regulator-always-on;
|
|
};
|
|
|
|
vddmmc: fixedregulator@0 {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "vddmmc";
|
|
regulator-min-microvolt = <3300000>;
|
|
regulator-max-microvolt = <3300000>;
|
|
};
|
|
|
|
vddadcvref: fixedregulator@0 {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "vddadcvref";
|
|
regulator-min-microvolt = <3300000>;
|
|
regulator-max-microvolt = <3300000>;
|
|
};
|
|
|
|
vddadc: fixedregulator@0 {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "vddadc";
|
|
regulator-min-microvolt = <3300000>;
|
|
regulator-max-microvolt = <3300000>;
|
|
};
|
|
|
|
vdd1v8: vdd1v8 {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "vdd1v8";
|
|
regulator-min-microvolt = <3300000>;
|
|
regulator-max-microvolt = <3300000>;
|
|
};
|
|
|
|
v2v8: v2v8 {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "v2v8";
|
|
regulator-min-microvolt = <2800000>;
|
|
regulator-max-microvolt = <2800000>;
|
|
};
|
|
};
|
|
|
|
&crc1 {
|
|
status = "okay";
|
|
};
|
|
|
|
&cryp {
|
|
status = "okay";
|
|
};
|
|
|
|
&dma1 {
|
|
sram = <&dma_pool>;
|
|
};
|
|
|
|
&dma2 {
|
|
sram = <&dma_pool>;
|
|
};
|
|
|
|
&dts {
|
|
status = "okay";
|
|
};
|
|
|
|
ð1 {
|
|
status = "okay";
|
|
pinctrl-0 = <ð1_rgmii_pins_a>;
|
|
pinctrl-1 = <ð1_rgmii_sleep_pins_a>;
|
|
pinctrl-names = "default", "sleep";
|
|
phy-mode = "rgmii-id";
|
|
max-speed = <1000>;
|
|
phy-handle = <&phy0_eth1>;
|
|
//st,phy-reset-gpios = <&gpiog 10 GPIO_ACTIVE_HIGH>;
|
|
//snps,phy-reset-gpios = <&gpiog 10 GPIO_ACTIVE_HIGH>;
|
|
|
|
mdio1 {
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
compatible = "snps,dwmac-mdio";
|
|
phy0_eth1: ethernet-phy@1 {
|
|
compatible = "ethernet-phy-ieee802.3-c22";
|
|
reg = <1>;
|
|
reset-gpios = <&gpiog 10 GPIO_ACTIVE_LOW>;
|
|
reset-assert-us = <10000>;
|
|
reset-deassert-us = <1000>;
|
|
};
|
|
};
|
|
|
|
};
|
|
|
|
ð2 {
|
|
status = "okay";
|
|
pinctrl-0 = <ð2_rgmii_pins_a>;
|
|
pinctrl-1 = <ð2_rgmii_sleep_pins_a>;
|
|
pinctrl-names = "default", "sleep";
|
|
phy-mode = "rgmii-id";
|
|
max-speed = <1000>;
|
|
phy-handle = <&phy0_eth2>;
|
|
phy-supply = <&v3v3_ao>;
|
|
//st,phy-reset-gpios = <&gpiog 9 GPIO_ACTIVE_HIGH>;
|
|
//snps,phy-reset-gpios = <&gpiog 9 GPIO_ACTIVE_HIGH>;
|
|
// reset-deassert-us = <1000>;
|
|
// reset-assert-us = <1000>;
|
|
|
|
|
|
mdio1 {
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
compatible = "snps,dwmac-mdio";
|
|
phy0_eth2: ethernet-phy@2 {
|
|
compatible = "ethernet-phy-ieee802.3-c22";
|
|
reg = <2>;
|
|
reset-gpios = <&gpiog 9 GPIO_ACTIVE_LOW>;
|
|
reset-assert-us = <10000>;
|
|
reset-deassert-us = <1000>;
|
|
};
|
|
};
|
|
|
|
};
|
|
|
|
&i2c1 {
|
|
pinctrl-names = "default", "sleep";
|
|
pinctrl-0 = <&i2c1_pins_a>;
|
|
pinctrl-1 = <&i2c1_sleep_pins_a>;
|
|
i2c-scl-rising-time-ns = <96>;
|
|
i2c-scl-falling-time-ns = <3>;
|
|
clock-frequency = <1000000>;
|
|
status = "okay";
|
|
/* spare dmas for other usage */
|
|
/delete-property/dmas;
|
|
/delete-property/dma-names;
|
|
|
|
rx8010: rx8010@32 {
|
|
compatible = "epson,rx8010";
|
|
reg = <0x32>;
|
|
};
|
|
};
|
|
|
|
&i2c3 {
|
|
pinctrl-names = "default", "sleep";
|
|
pinctrl-0 = <&i2c3_pins_a>;
|
|
pinctrl-1 = <&i2c3_sleep_pins_a>;
|
|
i2c-scl-rising-time-ns = <300>;
|
|
i2c-scl-falling-time-ns = <300>;
|
|
clock-frequency = <100000>;
|
|
status = "okay";
|
|
/* spare dmas for other usage */
|
|
/delete-property/dmas;
|
|
/delete-property/dma-names;
|
|
};
|
|
|
|
&iwdg2 {
|
|
timeout-sec = <32>;
|
|
status = "okay";
|
|
};
|
|
|
|
&rtc {
|
|
status = "disabled";
|
|
};
|
|
|
|
&sdmmc1 {
|
|
pinctrl-names = "default", "opendrain", "sleep";
|
|
pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_clk_pins_a>;
|
|
pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_clk_pins_a>;
|
|
pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
|
|
cd-gpios = <&gpioh 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
|
disable-wp;
|
|
st,neg-edge;
|
|
bus-width = <4>;
|
|
vmmc-supply = <&vddmmc>;
|
|
status = "okay";
|
|
};
|
|
|
|
/* eMMC */
|
|
&sdmmc2 {
|
|
arm,primecell-periphid = <0x10153180>;
|
|
pinctrl-names = "default", "opendrain", "sleep";
|
|
pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_clk_pins_a>;
|
|
pinctrl-1 = <&sdmmc2_b4_od_pins_a &sdmmc2_clk_pins_a>;
|
|
pinctrl-2 = <&sdmmc2_b4_sleep_pins_a>;
|
|
non-removable;
|
|
no-sd;
|
|
no-sdio;
|
|
st,neg-edge;
|
|
bus-width = <8>;
|
|
vmmc-supply = <&vddmmc>;
|
|
vqmmc-supply = <&vdd1v8>;
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
status = "okay";
|
|
};
|
|
|
|
&sram {
|
|
dma_pool: dma-sram@0 {
|
|
reg = <0x0 0x4000>;
|
|
pool;
|
|
};
|
|
};
|
|
|
|
&timers3 {
|
|
/delete-property/dmas;
|
|
/delete-property/dma-names;
|
|
status = "disabled";
|
|
};
|
|
|
|
&timers4 {
|
|
/delete-property/dmas;
|
|
/delete-property/dma-names;
|
|
status = "disabled";
|
|
};
|
|
|
|
&timers8 {
|
|
/delete-property/dmas;
|
|
/delete-property/dma-names;
|
|
status = "disabled";
|
|
};
|
|
|
|
&timers14 {
|
|
status = "disabled";
|
|
};
|
|
|
|
&uart8 {
|
|
pinctrl-names = "default", "sleep", "idle";
|
|
pinctrl-0 = <&uart8_pins_a>;
|
|
pinctrl-1 = <&uart8_sleep_pins_a>;
|
|
pinctrl-2 = <&uart8_idle_pins_a>;
|
|
/delete-property/dmas;
|
|
/delete-property/dma-names;
|
|
status = "disabled";
|
|
};
|
|
|
|
&usart1 {
|
|
pinctrl-names = "default", "sleep";
|
|
pinctrl-0 = <&usart1_pins_b>;
|
|
pinctrl-1 = <&usart1_sleep_pins_b>;
|
|
//pinctrl-2 = <&usart1_idle_pins_b>;
|
|
status = "okay";
|
|
};
|
|
|
|
&usart2 {
|
|
pinctrl-names = "default", "sleep", "idle";
|
|
pinctrl-0 = <&usart2_pins_a>;
|
|
pinctrl-1 = <&usart2_sleep_pins_a>;
|
|
pinctrl-2 = <&usart2_idle_pins_a>;
|
|
//rts-gpios = <&gpiod 4 GPIO_ACTIVE_HIGH>;
|
|
linux,rs485-enabled-at-boot-time;
|
|
status = "okay";
|
|
};
|
|
|
|
&usart3 {
|
|
pinctrl-names = "default", "sleep", "idle";
|
|
pinctrl-0 = <&usart3_pins_a>;
|
|
pinctrl-1 = <&usart3_sleep_pins_a>;
|
|
pinctrl-2 = <&usart3_idle_pins_a>;
|
|
//rts-gpios = <&gpiog 8 GPIO_ACTIVE_HIGH>;
|
|
linux,rs485-enabled-at-boot-time;
|
|
status = "okay";
|
|
};
|
|
|
|
/*console*/
|
|
&uart4 {
|
|
pinctrl-names = "default", "sleep", "idle";
|
|
pinctrl-0 = <&uart4_pins_a>;
|
|
pinctrl-1 = <&uart4_sleep_pins_a>;
|
|
pinctrl-2 = <&uart4_idle_pins_a>;
|
|
/delete-property/dmas;
|
|
/delete-property/dma-names;
|
|
status = "okay";
|
|
};
|
|
|
|
/*RS232*/
|
|
&uart5 {
|
|
pinctrl-names = "default", "sleep", "idle";
|
|
pinctrl-0 = <&uart5_pins_b>;
|
|
pinctrl-1 = <&uart5_sleep_pins_b>;
|
|
pinctrl-2 = <&uart5_idle_pins_b>;
|
|
// /delete-property/dmas;
|
|
// /delete-property/dma-names;
|
|
status = "okay";
|
|
};
|
|
|
|
&spi3 {
|
|
pinctrl-names = "default", "sleep";
|
|
pinctrl-0 = <&spi3_pins_a>;
|
|
pinctrl-1 = <&spi3_sleep_pins_a>;
|
|
cs-gpios = <&gpiof 3 0>;
|
|
status = "okay";
|
|
|
|
spidev@0 {
|
|
compatible = "semtech,sx1301";
|
|
spi-max-frequency = <20000000>;
|
|
reg = <0>;
|
|
};
|
|
};
|
|
|
|
|
|
&usbh_ehci {
|
|
phys = <&usbphyc_port0>, <&usbphyc_port1 1>;
|
|
phy-names = "usb", "usb";
|
|
status = "okay";
|
|
};
|
|
|
|
&usbh_ohci {
|
|
phys = <&usbphyc_port0>, <&usbphyc_port1 1>;
|
|
phy-names = "usb", "usb";
|
|
status = "okay";
|
|
};
|
|
/*
|
|
&usbotg_hs {
|
|
phys = <&usbphyc_port1 0>;
|
|
phy-names = "usb2-phy";
|
|
usb-role-switch;
|
|
//dr_mode = "otg";
|
|
dr_mode = "host";
|
|
// hnp-disable;
|
|
// srp-disable;
|
|
// adp-disable;
|
|
status = "okay";
|
|
|
|
port {
|
|
usbotg_hs_ep: endpoint {
|
|
remote-endpoint = <&con_usb_c_ep>;
|
|
};
|
|
};
|
|
|
|
};
|
|
*/
|
|
|
|
&usbphyc {
|
|
status = "okay";
|
|
};
|
|
|
|
&usbphyc_port0 {
|
|
phy-supply = <&vdd_usb>;
|
|
st,current-boost-microamp = <1000>;
|
|
st,decrease-hs-slew-rate;
|
|
st,tune-hs-dc-level = <2>;
|
|
st,enable-hs-rftime-reduction;
|
|
st,trim-hs-current = <11>;
|
|
st,trim-hs-impedance = <2>;
|
|
st,tune-squelch-level = <1>;
|
|
st,enable-hs-rx-gain-eq;
|
|
st,no-hs-ftime-ctrl;
|
|
st,no-lsfs-sc;
|
|
|
|
/*
|
|
* Hack to keep hub active if wakeup source is enabled
|
|
* otherwise the hub will wakeup the port0 as soon as the v3v3_sw is disabled
|
|
*/
|
|
// connector {
|
|
// compatible = "usb-a-connector";
|
|
// vbus-supply = <&scmi_v3v3_sw>;
|
|
// };
|
|
};
|
|
|
|
&usbphyc_port1 {
|
|
phy-supply = <&vdd_usb>;
|
|
st,current-boost-microamp = <1000>;
|
|
st,decrease-hs-slew-rate;
|
|
st,tune-hs-dc-level = <2>;
|
|
st,enable-hs-rftime-reduction;
|
|
st,trim-hs-current = <11>;
|
|
st,trim-hs-impedance = <2>;
|
|
st,tune-squelch-level = <1>;
|
|
st,enable-hs-rx-gain-eq;
|
|
st,no-hs-ftime-ctrl;
|
|
st,no-lsfs-sc;
|
|
};
|