xref: /rk3399_ARM-atf/fdts/stm32mp15xx-osd32.dtsi (revision b8816d3cbdb838298185e3145d24f86dd86699cb)
12fbb6064SAhmad Fatoum/* SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-3-Clause) */
22fbb6064SAhmad Fatoum/*
3*b8816d3cSYann Gautier * Copyright (C) 2020-2024 STMicroelectronics - All Rights Reserved
42fbb6064SAhmad Fatoum * Copyright (C) 2020 Ahmad Fatoum, Pengutronix
52fbb6064SAhmad Fatoum */
62fbb6064SAhmad Fatoum
72fbb6064SAhmad Fatoum#include "stm32mp15-pinctrl.dtsi"
82fbb6064SAhmad Fatoum
92fbb6064SAhmad Fatoum&i2c4 {
102fbb6064SAhmad Fatoum	pinctrl-names = "default";
112fbb6064SAhmad Fatoum	pinctrl-0 = <&i2c4_pins_a>;
122fbb6064SAhmad Fatoum	clock-frequency = <400000>;
132fbb6064SAhmad Fatoum	i2c-scl-rising-time-ns = <185>;
142fbb6064SAhmad Fatoum	i2c-scl-falling-time-ns = <20>;
152fbb6064SAhmad Fatoum	status = "okay";
162fbb6064SAhmad Fatoum
172fbb6064SAhmad Fatoum	pmic: stpmic@33 {
182fbb6064SAhmad Fatoum		compatible = "st,stpmic1";
192fbb6064SAhmad Fatoum		reg = <0x33>;
202fbb6064SAhmad Fatoum		interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>;
212fbb6064SAhmad Fatoum		interrupt-controller;
222fbb6064SAhmad Fatoum		#interrupt-cells = <2>;
232fbb6064SAhmad Fatoum
242fbb6064SAhmad Fatoum		regulators {
252fbb6064SAhmad Fatoum			compatible = "st,stpmic1-regulators";
262fbb6064SAhmad Fatoum
272fbb6064SAhmad Fatoum			ldo1-supply = <&v3v3>;
282fbb6064SAhmad Fatoum			ldo6-supply = <&v3v3>;
292fbb6064SAhmad Fatoum			pwr_sw1-supply = <&bst_out>;
302fbb6064SAhmad Fatoum
312fbb6064SAhmad Fatoum			vddcore: buck1 {
322fbb6064SAhmad Fatoum				regulator-name = "vddcore";
332fbb6064SAhmad Fatoum				regulator-min-microvolt = <1200000>;
342fbb6064SAhmad Fatoum				regulator-max-microvolt = <1350000>;
352fbb6064SAhmad Fatoum				regulator-always-on;
362fbb6064SAhmad Fatoum				regulator-initial-mode = <0>;
372fbb6064SAhmad Fatoum				regulator-over-current-protection;
382fbb6064SAhmad Fatoum			};
392fbb6064SAhmad Fatoum
402fbb6064SAhmad Fatoum			vdd_ddr: buck2 {
412fbb6064SAhmad Fatoum				regulator-name = "vdd_ddr";
422fbb6064SAhmad Fatoum				regulator-min-microvolt = <1350000>;
432fbb6064SAhmad Fatoum				regulator-max-microvolt = <1350000>;
442fbb6064SAhmad Fatoum				regulator-always-on;
452fbb6064SAhmad Fatoum				regulator-initial-mode = <0>;
462fbb6064SAhmad Fatoum				regulator-over-current-protection;
472fbb6064SAhmad Fatoum			};
482fbb6064SAhmad Fatoum
492fbb6064SAhmad Fatoum			vdd: buck3 {
502fbb6064SAhmad Fatoum				regulator-name = "vdd";
512fbb6064SAhmad Fatoum				regulator-min-microvolt = <3300000>;
522fbb6064SAhmad Fatoum				regulator-max-microvolt = <3300000>;
532fbb6064SAhmad Fatoum				regulator-always-on;
542fbb6064SAhmad Fatoum				st,mask-reset;
552fbb6064SAhmad Fatoum				regulator-initial-mode = <0>;
562fbb6064SAhmad Fatoum				regulator-over-current-protection;
572fbb6064SAhmad Fatoum			};
582fbb6064SAhmad Fatoum
592fbb6064SAhmad Fatoum			v3v3: buck4 {
602fbb6064SAhmad Fatoum				regulator-name = "v3v3";
612fbb6064SAhmad Fatoum				regulator-min-microvolt = <3300000>;
622fbb6064SAhmad Fatoum				regulator-max-microvolt = <3300000>;
632fbb6064SAhmad Fatoum				regulator-always-on;
642fbb6064SAhmad Fatoum				regulator-over-current-protection;
652fbb6064SAhmad Fatoum				regulator-initial-mode = <0>;
662fbb6064SAhmad Fatoum			};
672fbb6064SAhmad Fatoum
682fbb6064SAhmad Fatoum			v1v8_audio: ldo1 {
692fbb6064SAhmad Fatoum				regulator-name = "v1v8_audio";
702fbb6064SAhmad Fatoum				regulator-min-microvolt = <1800000>;
712fbb6064SAhmad Fatoum				regulator-max-microvolt = <1800000>;
722fbb6064SAhmad Fatoum				regulator-always-on;
732fbb6064SAhmad Fatoum			};
742fbb6064SAhmad Fatoum
752fbb6064SAhmad Fatoum			v3v3_hdmi: ldo2 {
762fbb6064SAhmad Fatoum				regulator-name = "v3v3_hdmi";
772fbb6064SAhmad Fatoum				regulator-min-microvolt = <3300000>;
782fbb6064SAhmad Fatoum				regulator-max-microvolt = <3300000>;
792fbb6064SAhmad Fatoum				regulator-always-on;
802fbb6064SAhmad Fatoum			};
812fbb6064SAhmad Fatoum
822fbb6064SAhmad Fatoum			vtt_ddr: ldo3 {
832fbb6064SAhmad Fatoum				regulator-name = "vtt_ddr";
842fbb6064SAhmad Fatoum				regulator-always-on;
852fbb6064SAhmad Fatoum				regulator-over-current-protection;
869eed71b7SAhmad Fatoum				st,regulator-sink-source;
872fbb6064SAhmad Fatoum			};
882fbb6064SAhmad Fatoum
892fbb6064SAhmad Fatoum			vdd_usb: ldo4 {
902fbb6064SAhmad Fatoum				regulator-name = "vdd_usb";
912fbb6064SAhmad Fatoum				regulator-min-microvolt = <3300000>;
922fbb6064SAhmad Fatoum				regulator-max-microvolt = <3300000>;
932fbb6064SAhmad Fatoum			};
942fbb6064SAhmad Fatoum
952fbb6064SAhmad Fatoum			vdda: ldo5 {
962fbb6064SAhmad Fatoum				regulator-name = "vdda";
972fbb6064SAhmad Fatoum				regulator-min-microvolt = <2900000>;
982fbb6064SAhmad Fatoum				regulator-max-microvolt = <2900000>;
992fbb6064SAhmad Fatoum				regulator-boot-on;
1002fbb6064SAhmad Fatoum			};
1012fbb6064SAhmad Fatoum
1022fbb6064SAhmad Fatoum			v1v2_hdmi: ldo6 {
1032fbb6064SAhmad Fatoum				regulator-name = "v1v2_hdmi";
1042fbb6064SAhmad Fatoum				regulator-min-microvolt = <1200000>;
1052fbb6064SAhmad Fatoum				regulator-max-microvolt = <1200000>;
1062fbb6064SAhmad Fatoum				regulator-always-on;
1072fbb6064SAhmad Fatoum			};
1082fbb6064SAhmad Fatoum
1092fbb6064SAhmad Fatoum			vref_ddr: vref_ddr {
1102fbb6064SAhmad Fatoum				regulator-name = "vref_ddr";
1112fbb6064SAhmad Fatoum				regulator-always-on;
1122fbb6064SAhmad Fatoum			};
1132fbb6064SAhmad Fatoum
1142fbb6064SAhmad Fatoum			bst_out: boost {
1152fbb6064SAhmad Fatoum				regulator-name = "bst_out";
1162fbb6064SAhmad Fatoum			};
1172fbb6064SAhmad Fatoum
1182fbb6064SAhmad Fatoum			vbus_otg: pwr_sw1 {
1192fbb6064SAhmad Fatoum				regulator-name = "vbus_otg";
1202fbb6064SAhmad Fatoum				regulator-active-discharge;
1212fbb6064SAhmad Fatoum			};
1222fbb6064SAhmad Fatoum
1232fbb6064SAhmad Fatoum			vbus_sw: pwr_sw2 {
1242fbb6064SAhmad Fatoum				regulator-name = "vbus_sw";
1252fbb6064SAhmad Fatoum				regulator-active-discharge;
1262fbb6064SAhmad Fatoum			};
1272fbb6064SAhmad Fatoum		};
1282fbb6064SAhmad Fatoum
1292fbb6064SAhmad Fatoum		pmic_watchdog: watchdog {
1302fbb6064SAhmad Fatoum			compatible = "st,stpmic1-wdt";
1312fbb6064SAhmad Fatoum			status = "disabled";
1322fbb6064SAhmad Fatoum		};
1332fbb6064SAhmad Fatoum	};
1342fbb6064SAhmad Fatoum};
1352fbb6064SAhmad Fatoum
1362fbb6064SAhmad Fatoum&rng1 {
1372fbb6064SAhmad Fatoum	status = "okay";
1382fbb6064SAhmad Fatoum};
1392fbb6064SAhmad Fatoum
1402fbb6064SAhmad Fatoum/* ATF Specific */
1412fbb6064SAhmad Fatoum#include <dt-bindings/clock/stm32mp1-clksrc.h>
1422fbb6064SAhmad Fatoum
1432fbb6064SAhmad Fatoum/ {
1442fbb6064SAhmad Fatoum	aliases {
1452fbb6064SAhmad Fatoum		gpio0 = &gpioa;
1462fbb6064SAhmad Fatoum		gpio1 = &gpiob;
1472fbb6064SAhmad Fatoum		gpio2 = &gpioc;
1482fbb6064SAhmad Fatoum		gpio3 = &gpiod;
1492fbb6064SAhmad Fatoum		gpio4 = &gpioe;
1502fbb6064SAhmad Fatoum		gpio5 = &gpiof;
1512fbb6064SAhmad Fatoum		gpio6 = &gpiog;
1522fbb6064SAhmad Fatoum		gpio7 = &gpioh;
1532fbb6064SAhmad Fatoum		gpio8 = &gpioi;
1542fbb6064SAhmad Fatoum		gpio25 = &gpioz;
1552fbb6064SAhmad Fatoum		i2c3 = &i2c4;
1562fbb6064SAhmad Fatoum	};
1572fbb6064SAhmad Fatoum};
1582fbb6064SAhmad Fatoum
1592fbb6064SAhmad Fatoum&bsec {
160*b8816d3cSYann Gautier	board_id: board-id@ec {
1612fbb6064SAhmad Fatoum		reg = <0xec 0x4>;
1622fbb6064SAhmad Fatoum		st,non-secure-otp;
1632fbb6064SAhmad Fatoum	};
1642fbb6064SAhmad Fatoum};
1652fbb6064SAhmad Fatoum
1662fbb6064SAhmad Fatoum&clk_hse {
1672fbb6064SAhmad Fatoum	st,digbypass;
1682fbb6064SAhmad Fatoum};
1692fbb6064SAhmad Fatoum
1702fbb6064SAhmad Fatoum&cpu0 {
1712fbb6064SAhmad Fatoum	cpu-supply = <&vddcore>;
1722fbb6064SAhmad Fatoum};
1732fbb6064SAhmad Fatoum
1742fbb6064SAhmad Fatoum&cpu1 {
1752fbb6064SAhmad Fatoum	cpu-supply = <&vddcore>;
1762fbb6064SAhmad Fatoum};
1772fbb6064SAhmad Fatoum
1782fbb6064SAhmad Fatoum&hash1 {
1792fbb6064SAhmad Fatoum	status = "okay";
1802fbb6064SAhmad Fatoum};
1812fbb6064SAhmad Fatoum
1822fbb6064SAhmad Fatoum/* CLOCK init */
1832fbb6064SAhmad Fatoum&rcc {
1842fbb6064SAhmad Fatoum	st,clksrc = <
1852fbb6064SAhmad Fatoum		CLK_MPU_PLL1P
1862fbb6064SAhmad Fatoum		CLK_AXI_PLL2P
1872fbb6064SAhmad Fatoum		CLK_MCU_PLL3P
1882fbb6064SAhmad Fatoum		CLK_PLL12_HSE
1892fbb6064SAhmad Fatoum		CLK_PLL3_HSE
1902fbb6064SAhmad Fatoum		CLK_PLL4_HSE
1912fbb6064SAhmad Fatoum		CLK_RTC_LSE
1922fbb6064SAhmad Fatoum		CLK_MCO1_DISABLED
1932fbb6064SAhmad Fatoum		CLK_MCO2_DISABLED
1942fbb6064SAhmad Fatoum	>;
1952fbb6064SAhmad Fatoum
1962fbb6064SAhmad Fatoum	st,clkdiv = <
1972fbb6064SAhmad Fatoum		1 /*MPU*/
1982fbb6064SAhmad Fatoum		0 /*AXI*/
1992fbb6064SAhmad Fatoum		0 /*MCU*/
2002fbb6064SAhmad Fatoum		1 /*APB1*/
2012fbb6064SAhmad Fatoum		1 /*APB2*/
2022fbb6064SAhmad Fatoum		1 /*APB3*/
2032fbb6064SAhmad Fatoum		1 /*APB4*/
2042fbb6064SAhmad Fatoum		2 /*APB5*/
2052fbb6064SAhmad Fatoum		23 /*RTC*/
2062fbb6064SAhmad Fatoum		0 /*MCO1*/
2072fbb6064SAhmad Fatoum		0 /*MCO2*/
2082fbb6064SAhmad Fatoum	>;
2092fbb6064SAhmad Fatoum
2102fbb6064SAhmad Fatoum	st,pkcs = <
2112fbb6064SAhmad Fatoum		CLK_CKPER_HSE
2122fbb6064SAhmad Fatoum		CLK_FMC_ACLK
2132fbb6064SAhmad Fatoum		CLK_QSPI_ACLK
2142fbb6064SAhmad Fatoum		CLK_ETH_PLL4P
2152fbb6064SAhmad Fatoum		CLK_SDMMC12_PLL4P
2162fbb6064SAhmad Fatoum		CLK_DSI_DSIPLL
2172fbb6064SAhmad Fatoum		CLK_STGEN_HSE
2182fbb6064SAhmad Fatoum		CLK_USBPHY_HSE
2192fbb6064SAhmad Fatoum		CLK_SPI2S1_PLL3Q
2202fbb6064SAhmad Fatoum		CLK_SPI2S23_PLL3Q
2212fbb6064SAhmad Fatoum		CLK_SPI45_HSI
2222fbb6064SAhmad Fatoum		CLK_SPI6_HSI
2232fbb6064SAhmad Fatoum		CLK_I2C46_HSI
2242fbb6064SAhmad Fatoum		CLK_SDMMC3_PLL4P
2252fbb6064SAhmad Fatoum		CLK_USBO_USBPHY
2262fbb6064SAhmad Fatoum		CLK_ADC_CKPER
2272fbb6064SAhmad Fatoum		CLK_CEC_LSE
2282fbb6064SAhmad Fatoum		CLK_I2C12_HSI
2292fbb6064SAhmad Fatoum		CLK_I2C35_HSI
2302fbb6064SAhmad Fatoum		CLK_UART1_HSI
2312fbb6064SAhmad Fatoum		CLK_UART24_HSI
2322fbb6064SAhmad Fatoum		CLK_UART35_HSI
2332fbb6064SAhmad Fatoum		CLK_UART6_HSI
2342fbb6064SAhmad Fatoum		CLK_UART78_HSI
2352fbb6064SAhmad Fatoum		CLK_SPDIF_PLL4P
2362fbb6064SAhmad Fatoum		CLK_FDCAN_PLL4R
2372fbb6064SAhmad Fatoum		CLK_SAI1_PLL3Q
2382fbb6064SAhmad Fatoum		CLK_SAI2_PLL3Q
2392fbb6064SAhmad Fatoum		CLK_SAI3_PLL3Q
2402fbb6064SAhmad Fatoum		CLK_SAI4_PLL3Q
2412fbb6064SAhmad Fatoum		CLK_RNG1_LSI
2422fbb6064SAhmad Fatoum		CLK_RNG2_LSI
2432fbb6064SAhmad Fatoum		CLK_LPTIM1_PCLK1
2442fbb6064SAhmad Fatoum		CLK_LPTIM23_PCLK3
2452fbb6064SAhmad Fatoum		CLK_LPTIM45_LSE
2462fbb6064SAhmad Fatoum	>;
2472fbb6064SAhmad Fatoum
2482fbb6064SAhmad Fatoum	/* VCO = 1300.0 MHz => P = 650 (CPU) */
2492fbb6064SAhmad Fatoum	pll1: st,pll@0 {
2502fbb6064SAhmad Fatoum		compatible = "st,stm32mp1-pll";
2512fbb6064SAhmad Fatoum		reg = <0>;
2522fbb6064SAhmad Fatoum		cfg = < 2 80 0 0 0 PQR(1,0,0) >;
2532fbb6064SAhmad Fatoum		frac = < 0x800 >;
2542fbb6064SAhmad Fatoum	};
2552fbb6064SAhmad Fatoum
2562fbb6064SAhmad Fatoum	/* VCO = 1066.0 MHz => P = 266 (AXI), Q = 533 (GPU), R = 533 (DDR) */
2572fbb6064SAhmad Fatoum	pll2: st,pll@1 {
2582fbb6064SAhmad Fatoum		compatible = "st,stm32mp1-pll";
2592fbb6064SAhmad Fatoum		reg = <1>;
2602fbb6064SAhmad Fatoum		cfg = <2 65 1 0 0 PQR(1,1,1)>;
2612fbb6064SAhmad Fatoum		frac = <0x1400>;
2622fbb6064SAhmad Fatoum	};
2632fbb6064SAhmad Fatoum
2642fbb6064SAhmad Fatoum	/* VCO = 417.8 MHz => P = 209, Q = 24, R = 11 */
2652fbb6064SAhmad Fatoum	pll3: st,pll@2 {
2662fbb6064SAhmad Fatoum		compatible = "st,stm32mp1-pll";
2672fbb6064SAhmad Fatoum		reg = <2>;
2682fbb6064SAhmad Fatoum		cfg = <1 33 1 16 36 PQR(1,1,1)>;
2692fbb6064SAhmad Fatoum		frac = <0x1a04>;
2702fbb6064SAhmad Fatoum	};
2712fbb6064SAhmad Fatoum
2722fbb6064SAhmad Fatoum	/* VCO = 594.0 MHz => P = 99, Q = 74, R = 74 */
2732fbb6064SAhmad Fatoum	pll4: st,pll@3 {
2742fbb6064SAhmad Fatoum		compatible = "st,stm32mp1-pll";
2752fbb6064SAhmad Fatoum		reg = <3>;
2762fbb6064SAhmad Fatoum		cfg = <3 98 5 7 7 PQR(1,1,1)>;
2772fbb6064SAhmad Fatoum	};
2782fbb6064SAhmad Fatoum};
279