Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
torvalds
GitHub Repository: torvalds/linux
Path: blob/master/arch/arm64/boot/dts/st/stm32mp257f-ev1.dts
29274 views
// SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-3-Clause)
/*
 * Copyright (C) STMicroelectronics 2023 - All Rights Reserved
 * Author: Alexandre Torgue <[email protected]> for STMicroelectronics.
 */

/dts-v1/;

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/regulator/st,stm32mp25-regulator.h>
#include "stm32mp257.dtsi"
#include "stm32mp25xf.dtsi"
#include "stm32mp25-pinctrl.dtsi"
#include "stm32mp25xxai-pinctrl.dtsi"

/ {
	model = "STMicroelectronics STM32MP257F-EV1 Evaluation Board";
	compatible = "st,stm32mp257f-ev1", "st,stm32mp257";

	aliases {
		ethernet0 = &ethernet2;
		ethernet1 = &ethernet1;
		serial0 = &usart2;
		serial1 = &usart6;
	};

	chosen {
		stdout-path = "serial0:115200n8";
	};

	clocks {
		clk_ext_camera: clk-ext-camera {
			#clock-cells = <0>;
			compatible = "fixed-clock";
			clock-frequency = <24000000>;
		};

		pad_clk: pad-clk {
			#clock-cells = <0>;
			compatible = "fixed-clock";
			clock-frequency = <100000000>;
		};
	};

	imx335_2v9: regulator-2v9 {
		compatible = "regulator-fixed";
		regulator-name = "imx335-avdd";
		regulator-min-microvolt = <2900000>;
		regulator-max-microvolt = <2900000>;
		regulator-always-on;
	};

	imx335_1v8: regulator-1v8 {
		compatible = "regulator-fixed";
		regulator-name = "imx335-ovdd";
		regulator-min-microvolt = <1800000>;
		regulator-max-microvolt = <1800000>;
		regulator-always-on;
	};

	imx335_1v2: regulator-1v2 {
		compatible = "regulator-fixed";
		regulator-name = "imx335-dvdd";
		regulator-min-microvolt = <1200000>;
		regulator-max-microvolt = <1200000>;
		regulator-always-on;
	};

	memory@80000000 {
		device_type = "memory";
		reg = <0x0 0x80000000 0x1 0x0>;
	};

	panel_lvds: display {
		compatible = "edt,etml0700z9ndha", "panel-lvds";
		enable-gpios = <&gpiog 15 GPIO_ACTIVE_HIGH>;
		backlight = <&panel_lvds_backlight>;
		power-supply = <&scmi_v3v3>;
		width-mm = <156>;
		height-mm = <92>;
		data-mapping = "vesa-24";
		status = "okay";

		panel-timing {
			clock-frequency = <54000000>;
			hactive = <1024>;
			vactive = <600>;
			hfront-porch = <150>;
			hback-porch = <150>;
			hsync-len = <21>;
			vfront-porch = <24>;
			vback-porch = <24>;
			vsync-len = <21>;
		};

		port {
			lvds_panel_in: endpoint {
				remote-endpoint = <&lvds_out0>;
			};
		};
	};

	panel_lvds_backlight: backlight {
		compatible = "gpio-backlight";
		gpios = <&gpioi 5 GPIO_ACTIVE_HIGH>;
		default-on;
		status = "okay";
	};

	reserved-memory {
		#address-cells = <2>;
		#size-cells = <2>;
		ranges;

		fw@80000000 {
			compatible = "shared-dma-pool";
			reg = <0x0 0x80000000 0x0 0x4000000>;
			no-map;
		};

		mm_ospi1: mm-ospi@60000000 {
			reg = <0x0 0x60000000 0x0 0x10000000>;
			no-map;
		};
	};
};

&arm_wdt {
	timeout-sec = <32>;
	status = "okay";
};

&combophy {
	clocks = <&rcc CK_BUS_USB3PCIEPHY>, <&rcc CK_KER_USB3PCIEPHY>, <&pad_clk>;
	clock-names = "apb", "ker", "pad";
	status = "okay";
};

&csi {
	vdd-supply = <&scmi_vddcore>;
	vdda18-supply = <&scmi_v1v8>;
	status = "okay";
	ports {
		#address-cells = <1>;
		#size-cells = <0>;
		port@0 {
			reg = <0>;
			csi_sink: endpoint {
				remote-endpoint = <&imx335_ep>;
				data-lanes = <1 2>;
				bus-type = <4>;
			};
		};
		port@1 {
			reg = <1>;
			csi_source: endpoint {
				remote-endpoint = <&dcmipp_0>;
			};
		};
	};
};

&dcmipp {
	status = "okay";
	port {
		dcmipp_0: endpoint {
			remote-endpoint = <&csi_source>;
			bus-type = <4>;
		};
	};
};

&ethernet1 {
	pinctrl-0 = <&eth1_rgmii_pins_a &eth1_mdio_pins_a>;
	pinctrl-1 = <&eth1_rgmii_sleep_pins_a &eth1_mdio_sleep_pins_a>;
	pinctrl-names = "default", "sleep";
	phy-handle = <&phy1_eth1>;
	phy-mode = "rgmii-id";
	st,ext-phyclk;
	status = "okay";

	mdio {
		#address-cells = <1>;
		#size-cells = <0>;
		compatible = "snps,dwmac-mdio";
		phy1_eth1: ethernet-phy@4 {
			compatible = "ethernet-phy-id001c.c916";
			reg = <4>;
			reset-gpios =  <&gpioj 9 GPIO_ACTIVE_LOW>;
			reset-assert-us = <10000>;
			reset-deassert-us = <80000>;
		};
	};
};

&ethernet2 {
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&eth2_rgmii_pins_a>;
	pinctrl-1 = <&eth2_rgmii_sleep_pins_a>;
	max-speed = <1000>;
	phy-handle = <&phy0_eth2>;
	phy-mode = "rgmii-id";
	status = "okay";

	mdio {
		#address-cells = <1>;
		#size-cells = <0>;
		compatible = "snps,dwmac-mdio";
		phy0_eth2: ethernet-phy@1 {
			compatible = "ethernet-phy-id001c.c916";
			reg = <1>;
			reset-assert-us = <10000>;
			reset-deassert-us = <300>;
			reset-gpios = <&gpiog 6 GPIO_ACTIVE_LOW>;
		};
	};
};

&i2c2 {
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&i2c2_pins_a>;
	pinctrl-1 = <&i2c2_sleep_pins_a>;
	i2c-scl-rising-time-ns = <100>;
	i2c-scl-falling-time-ns = <13>;
	clock-frequency = <400000>;
	status = "okay";

	imx335: camera@1a {
		compatible = "sony,imx335";
		reg = <0x1a>;
		clocks = <&clk_ext_camera>;
		avdd-supply = <&imx335_2v9>;
		ovdd-supply = <&imx335_1v8>;
		dvdd-supply = <&imx335_1v2>;
		reset-gpios = <&gpioi 7 (GPIO_ACTIVE_LOW | GPIO_PUSH_PULL)>;

		port {
			imx335_ep: endpoint {
				remote-endpoint = <&csi_sink>;
				clock-lanes = <0>;
				data-lanes = <1 2>;
				link-frequencies = /bits/ 64 <594000000>;
			};
		};
	};

	ili2511: ili2511@41 {
		compatible = "ilitek,ili251x";
		reg = <0x41>;
		interrupt-parent = <&gpioi>;
		interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
		reset-gpios = <&gpiog 14 GPIO_ACTIVE_LOW>;
		status = "okay";
	};
};

&i2c8 {
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&i2c8_pins_a>;
	pinctrl-1 = <&i2c8_sleep_pins_a>;
	i2c-scl-rising-time-ns = <57>;
	i2c-scl-falling-time-ns = <7>;
	clock-frequency = <400000>;
	status = "disabled";
};

&ommanager {
	memory-region = <&mm_ospi1>;
	pinctrl-0 = <&ospi_port1_clk_pins_a
		     &ospi_port1_io03_pins_a
		     &ospi_port1_cs0_pins_a>;
	pinctrl-1 = <&ospi_port1_clk_sleep_pins_a
		     &ospi_port1_io03_sleep_pins_a
		     &ospi_port1_cs0_sleep_pins_a>;
	pinctrl-names = "default", "sleep";
	status = "okay";

	spi@0 {
		#address-cells = <1>;
		#size-cells = <0>;
		memory-region = <&mm_ospi1>;
		status = "okay";

		flash0: flash@0 {
			compatible = "jedec,spi-nor";
			reg = <0>;
			spi-rx-bus-width = <4>;
			spi-tx-bus-width = <4>;
			spi-max-frequency = <50000000>;
		};
	};
};

/* use LPTIMER with tick broadcast for suspend mode */
&lptimer3 {
	status = "okay";
	timer {
		status = "okay";
	};
};

&ltdc {
	status = "okay";
	port {
		ltdc_ep0_out: endpoint {
			remote-endpoint = <&lvds_in>;
		};
	};
};

&lvds {
	status = "okay";
	ports {
		#address-cells = <1>;
		#size-cells = <0>;

		port@0 {
			reg = <0>;
			lvds_in: endpoint {
				remote-endpoint = <&ltdc_ep0_out>;
			};
		};

		port@1 {
			reg = <1>;
			lvds_out0: endpoint {
				remote-endpoint = <&lvds_panel_in>;
			};
		};
	};
};

&pcie_ep {
	pinctrl-names = "default", "init";
	pinctrl-0 = <&pcie_pins_a>;
	pinctrl-1 = <&pcie_init_pins_a>;
	reset-gpios = <&gpioj 8 GPIO_ACTIVE_LOW>;
	status = "disabled";
};

&pcie_rc {
	pinctrl-names = "default", "init", "sleep";
	pinctrl-0 = <&pcie_pins_a>;
	pinctrl-1 = <&pcie_init_pins_a>;
	pinctrl-2 = <&pcie_sleep_pins_a>;
	status = "okay";

	pcie@0,0 {
		 reset-gpios = <&gpioj 8 GPIO_ACTIVE_LOW>;
		 wake-gpios = <&gpioh 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
	};
};

&rtc {
	status = "okay";
};

&scmi_regu {
	scmi_vddio1: regulator@0 {
		regulator-min-microvolt = <1800000>;
		regulator-max-microvolt = <3300000>;
	};
	scmi_vddcore: regulator@11  {
		reg = <VOLTD_SCMI_STPMIC2_BUCK2>;
		regulator-name = "vddcore";
	};
	scmi_v1v8: regulator@14  {
		reg = <VOLTD_SCMI_STPMIC2_BUCK5>;
		regulator-name = "v1v8";
	};
	scmi_v3v3: regulator@16 {
		reg = <VOLTD_SCMI_STPMIC2_BUCK7>;
		regulator-name = "v3v3";
	};
	scmi_vdd_emmc: regulator@18 {
		reg = <VOLTD_SCMI_STPMIC2_LDO2>;
		regulator-name = "vdd_emmc";
	};
	scmi_vdd3v3_usb: regulator@20 {
		reg = <VOLTD_SCMI_STPMIC2_LDO4>;
		regulator-name = "vdd3v3_usb";
	};
	scmi_vdd_sdcard: regulator@23 {
		reg = <VOLTD_SCMI_STPMIC2_LDO7>;
		regulator-name = "vdd_sdcard";
	};
};

&sdmmc1 {
	pinctrl-names = "default", "opendrain", "sleep";
	pinctrl-0 = <&sdmmc1_b4_pins_a>;
	pinctrl-1 = <&sdmmc1_b4_od_pins_a>;
	pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
	cd-gpios = <&gpiod 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
	disable-wp;
	st,neg-edge;
	bus-width = <4>;
	vmmc-supply = <&scmi_vdd_sdcard>;
	vqmmc-supply = <&scmi_vddio1>;
	status = "okay";
};

&spi3 {
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&spi3_pins_a>;
	pinctrl-1 = <&spi3_sleep_pins_a>;
	status = "disabled";
};

&spi8 {
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&spi8_pins_a>;
	pinctrl-1 = <&spi8_sleep_pins_a>;
	status = "disabled";
};

&timers3 {
	status = "disabled";
	counter {
		status = "okay";
	};
	pwm {
		pinctrl-0 = <&pwm3_pins_a>;
		pinctrl-1 = <&pwm3_sleep_pins_a>;
		pinctrl-names = "default", "sleep";
		status = "okay";
	};
	timer@2 {
		status = "okay";
	};
};

&timers8 {
	status = "disabled";
	counter {
		status = "okay";
	};
	pwm {
		pinctrl-0 = <&pwm8_pins_a>;
		pinctrl-1 = <&pwm8_sleep_pins_a>;
		pinctrl-names = "default", "sleep";
		status = "okay";
	};
	timer@7 {
		status = "okay";
	};
};

&timers10 {
	status = "disabled";
	counter {
		pinctrl-0 = <&tim10_counter_pins_a>;
		pinctrl-1 = <&tim10_counter_sleep_pins_a>;
		pinctrl-names = "default", "sleep";
		status = "okay";
	};
};

&timers12 {
	status = "disabled";
	counter {
		status = "okay";
	};
	pwm {
		pinctrl-0 = <&pwm12_pins_a>;
		pinctrl-1 = <&pwm12_sleep_pins_a>;
		pinctrl-names = "default", "sleep";
		status = "okay";
	};
	timer@11 {
		status = "okay";
	};
};

&usart2 {
	pinctrl-names = "default", "idle", "sleep";
	pinctrl-0 = <&usart2_pins_a>;
	pinctrl-1 = <&usart2_idle_pins_a>;
	pinctrl-2 = <&usart2_sleep_pins_a>;
	/delete-property/dmas;
	/delete-property/dma-names;
	status = "okay";
};

&usart6 {
	pinctrl-names = "default", "idle", "sleep";
	pinctrl-0 = <&usart6_pins_a>;
	pinctrl-1 = <&usart6_idle_pins_a>;
	pinctrl-2 = <&usart6_sleep_pins_a>;
	uart-has-rtscts;
	status = "disabled";
};