xref: /rk3399_ARM-atf/fdts/stm32mp151a-prtt1a.dts (revision b246652e5ec004fb5691a123c5357ca857f937cc)
13812cebaSDavid Jander// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
23812cebaSDavid Jander/*
33812cebaSDavid Jander * Copyright (C) 2023, Protonic Holland - All Rights Reserved
4*5aeb0031SYann Gautier * Copyright (C) 2024-2025, STMicroelectronics - All Rights Reserved
53812cebaSDavid Jander * Author: David Jander <david@protonic.nl>
63812cebaSDavid Jander */
73812cebaSDavid Jander/dts-v1/;
83812cebaSDavid Jander
93812cebaSDavid Jander#include "stm32mp151.dtsi"
103812cebaSDavid Jander#include "stm32mp15-pinctrl.dtsi"
113812cebaSDavid Jander#include "stm32mp15xxad-pinctrl.dtsi"
123812cebaSDavid Jander#include <dt-bindings/clock/stm32mp1-clksrc.h>
133812cebaSDavid Jander#include "stm32mp15-ddr3-1x2Gb-1066-binG.dtsi"
143812cebaSDavid Jander
153812cebaSDavid Jander/ {
163812cebaSDavid Jander	model = "Protonic PRTT1A";
173812cebaSDavid Jander	compatible = "prt,prtt1a", "st,stm32mp151";
183812cebaSDavid Jander
193812cebaSDavid Jander	chosen {
203812cebaSDavid Jander		stdout-path = "serial0:115200n8";
213812cebaSDavid Jander	};
223812cebaSDavid Jander
233812cebaSDavid Jander	aliases {
243812cebaSDavid Jander		mmc0 = &sdmmc1;
253812cebaSDavid Jander		mmc1 = &sdmmc2;
263812cebaSDavid Jander		serial0 = &uart4;
273812cebaSDavid Jander	};
283812cebaSDavid Jander
293812cebaSDavid Jander	memory@c0000000 {
303812cebaSDavid Jander		device_type = "memory";
313812cebaSDavid Jander		reg = <0xC0000000 0x10000000>;
323812cebaSDavid Jander	};
333812cebaSDavid Jander};
343812cebaSDavid Jander
353812cebaSDavid Jander&iwdg2 {
363812cebaSDavid Jander	timeout-sec = <32>;
373812cebaSDavid Jander	status = "okay";
383812cebaSDavid Jander	secure-status = "okay";
393812cebaSDavid Jander};
403812cebaSDavid Jander
413812cebaSDavid Jander&qspi {
423812cebaSDavid Jander	pinctrl-names = "default", "sleep";
434c8e8ea7SYann Gautier	pinctrl-0 = <&qspi_clk_pins_a
444c8e8ea7SYann Gautier		     &qspi_bk1_pins_a
454c8e8ea7SYann Gautier		     &qspi_cs1_pins_a>;
463812cebaSDavid Jander	reg = <0x58003000 0x1000>, <0x70000000 0x4000000>;
473812cebaSDavid Jander	#address-cells = <1>;
483812cebaSDavid Jander	#size-cells = <0>;
493812cebaSDavid Jander	status = "okay";
503812cebaSDavid Jander
513812cebaSDavid Jander	flash@0 {
523812cebaSDavid Jander		compatible = "spi-nand";
533812cebaSDavid Jander		reg = <0>;
543812cebaSDavid Jander		spi-rx-bus-width = <4>;
553812cebaSDavid Jander		spi-max-frequency = <104000000>;
563812cebaSDavid Jander		#address-cells = <1>;
573812cebaSDavid Jander		#size-cells = <1>;
583812cebaSDavid Jander	};
593812cebaSDavid Jander};
603812cebaSDavid Jander
613812cebaSDavid Jander&qspi_bk1_pins_a {
624c8e8ea7SYann Gautier	pins {
633812cebaSDavid Jander		bias-pull-up;
643812cebaSDavid Jander		drive-push-pull;
653812cebaSDavid Jander		slew-rate = <1>;
663812cebaSDavid Jander	};
673812cebaSDavid Jander};
683812cebaSDavid Jander
693812cebaSDavid Jander&rcc {
703812cebaSDavid Jander	st,clksrc = <
713812cebaSDavid Jander		CLK_MPU_PLL1P
723812cebaSDavid Jander		CLK_AXI_PLL2P
733812cebaSDavid Jander		CLK_MCU_PLL3P
743812cebaSDavid Jander		CLK_RTC_LSI
753812cebaSDavid Jander		CLK_MCO1_DISABLED
763812cebaSDavid Jander		CLK_MCO2_DISABLED
773812cebaSDavid Jander		CLK_CKPER_HSE
783812cebaSDavid Jander		CLK_FMC_ACLK
793812cebaSDavid Jander		CLK_QSPI_ACLK
803812cebaSDavid Jander		CLK_ETH_DISABLED
813812cebaSDavid Jander		CLK_SDMMC12_PLL4P
823812cebaSDavid Jander		CLK_DSI_DSIPLL
833812cebaSDavid Jander		CLK_STGEN_HSE
843812cebaSDavid Jander		CLK_USBPHY_HSE
853812cebaSDavid Jander		CLK_SPI2S1_PLL3Q
863812cebaSDavid Jander		CLK_SPI2S23_PLL3Q
873812cebaSDavid Jander		CLK_SPI45_HSI
883812cebaSDavid Jander		CLK_SPI6_HSI
893812cebaSDavid Jander		CLK_I2C46_HSI
903812cebaSDavid Jander		CLK_SDMMC3_PLL4P
913812cebaSDavid Jander		CLK_USBO_USBPHY
923812cebaSDavid Jander		CLK_ADC_CKPER
933812cebaSDavid Jander		CLK_CEC_LSI
943812cebaSDavid Jander		CLK_I2C12_HSI
953812cebaSDavid Jander		CLK_I2C35_HSI
963812cebaSDavid Jander		CLK_UART1_HSI
973812cebaSDavid Jander		CLK_UART24_HSI
983812cebaSDavid Jander		CLK_UART35_HSI
993812cebaSDavid Jander		CLK_UART6_HSI
1003812cebaSDavid Jander		CLK_UART78_HSI
1013812cebaSDavid Jander		CLK_SPDIF_PLL4P
1023812cebaSDavid Jander		CLK_FDCAN_PLL4R
1033812cebaSDavid Jander		CLK_SAI1_PLL3Q
1043812cebaSDavid Jander		CLK_SAI2_PLL3Q
1053812cebaSDavid Jander		CLK_SAI3_PLL3Q
1063812cebaSDavid Jander		CLK_SAI4_PLL3Q
107d594239dSLionel Debieve		CLK_RNG1_CSI
1083812cebaSDavid Jander		CLK_RNG2_LSI
1093812cebaSDavid Jander		CLK_LPTIM1_PCLK1
1103812cebaSDavid Jander		CLK_LPTIM23_PCLK3
1113812cebaSDavid Jander		CLK_LPTIM45_LSI
1123812cebaSDavid Jander	>;
1133812cebaSDavid Jander
114*5aeb0031SYann Gautier	st,clkdiv = <
115*5aeb0031SYann Gautier		DIV(DIV_MPU, 1)
116*5aeb0031SYann Gautier		DIV(DIV_AXI, 0)
117*5aeb0031SYann Gautier		DIV(DIV_MCU, 0)
118*5aeb0031SYann Gautier		DIV(DIV_APB1, 1)
119*5aeb0031SYann Gautier		DIV(DIV_APB2, 1)
120*5aeb0031SYann Gautier		DIV(DIV_APB3, 1)
121*5aeb0031SYann Gautier		DIV(DIV_APB4, 1)
122*5aeb0031SYann Gautier		DIV(DIV_APB5, 2)
123*5aeb0031SYann Gautier		DIV(DIV_RTC, 23)
124*5aeb0031SYann Gautier		DIV(DIV_MCO1, 0)
125*5aeb0031SYann Gautier		DIV(DIV_MCO2, 0)
126*5aeb0031SYann Gautier	>;
127*5aeb0031SYann Gautier
128*5aeb0031SYann Gautier	st,pll_vco {
129*5aeb0031SYann Gautier		pll2_vco_1066Mhz: pll2-vco-1066Mhz {
130*5aeb0031SYann Gautier			src = <CLK_PLL12_HSE>;
131*5aeb0031SYann Gautier			divmn = <2 65>;
132*5aeb0031SYann Gautier			frac = <0x1400>;
133*5aeb0031SYann Gautier		};
134*5aeb0031SYann Gautier
135*5aeb0031SYann Gautier		pll3_vco_417Mhz: pll3-vco-417Mhz {
136*5aeb0031SYann Gautier			src = <CLK_PLL3_HSE>;
137*5aeb0031SYann Gautier			divmn = <1 33>;
138*5aeb0031SYann Gautier			frac = <0x1a04>;
139*5aeb0031SYann Gautier		};
140*5aeb0031SYann Gautier
141*5aeb0031SYann Gautier		pll4_vco_480Mhz: pll4-vco-480Mhz {
142*5aeb0031SYann Gautier			src = <CLK_PLL4_HSE>;
143*5aeb0031SYann Gautier			divmn = <1 39>;
144*5aeb0031SYann Gautier		};
1453812cebaSDavid Jander	};
1463812cebaSDavid Jander
1473812cebaSDavid Jander	/* VCO = 1066.0 MHz => P = 266 (AXI), Q = 533 (GPU), R = 533 (DDR) */
1483812cebaSDavid Jander	pll2: st,pll@1 {
1493812cebaSDavid Jander		compatible = "st,stm32mp1-pll";
1503812cebaSDavid Jander		reg = <1>;
151*5aeb0031SYann Gautier
152*5aeb0031SYann Gautier		st,pll = <&pll2_cfg1>;
153*5aeb0031SYann Gautier
154*5aeb0031SYann Gautier		pll2_cfg1: pll2_cfg1 {
155*5aeb0031SYann Gautier			st,pll_vco = <&pll2_vco_1066Mhz>;
156*5aeb0031SYann Gautier			st,pll_div_pqr = <1 0 0>;
157*5aeb0031SYann Gautier		};
1583812cebaSDavid Jander	};
1593812cebaSDavid Jander
1603812cebaSDavid Jander	/* VCO = 417.8 MHz => P = 209, Q = 24, R = 11 */
1613812cebaSDavid Jander	pll3: st,pll@2 {
1623812cebaSDavid Jander		compatible = "st,stm32mp1-pll";
1633812cebaSDavid Jander		reg = <2>;
164*5aeb0031SYann Gautier
165*5aeb0031SYann Gautier		st,pll = <&pll3_cfg1>;
166*5aeb0031SYann Gautier
167*5aeb0031SYann Gautier		pll3_cfg1: pll3_cfg1 {
168*5aeb0031SYann Gautier			st,pll_vco = <&pll3_vco_417Mhz>;
169*5aeb0031SYann Gautier			st,pll_div_pqr = <1 16 36>;
170*5aeb0031SYann Gautier		};
1713812cebaSDavid Jander	};
1723812cebaSDavid Jander
1733812cebaSDavid Jander	/* VCO = 480.0 MHz => P = 120, Q = 40, R = 96 */
1743812cebaSDavid Jander	pll4: st,pll@3 {
1753812cebaSDavid Jander		compatible = "st,stm32mp1-pll";
1763812cebaSDavid Jander		reg = <3>;
177*5aeb0031SYann Gautier
178*5aeb0031SYann Gautier		st,pll = <&pll4_cfg1>;
179*5aeb0031SYann Gautier
180*5aeb0031SYann Gautier		pll4_cfg1: pll4_cfg1 {
181*5aeb0031SYann Gautier			st,pll_vco = <&pll4_vco_480Mhz>;
182*5aeb0031SYann Gautier			st,pll_div_pqr = <3 11 4>;
183*5aeb0031SYann Gautier		};
1843812cebaSDavid Jander	};
1853812cebaSDavid Jander};
1863812cebaSDavid Jander
1873812cebaSDavid Jander&rng1 {
1883812cebaSDavid Jander	status = "okay";
1893812cebaSDavid Jander};
1903812cebaSDavid Jander
1913812cebaSDavid Jander&rtc {
1923812cebaSDavid Jander	status = "okay";
1933812cebaSDavid Jander};
1943812cebaSDavid Jander
1953812cebaSDavid Jander&sdmmc1 {
1963812cebaSDavid Jander	pinctrl-names = "default";
1973812cebaSDavid Jander	pinctrl-0 = <&sdmmc1_b4_pins_a>;
1983812cebaSDavid Jander	bus-width = <4>;
1993812cebaSDavid Jander	status = "okay";
2003812cebaSDavid Jander};
2013812cebaSDavid Jander
2023812cebaSDavid Jander&sdmmc1_b4_pins_a {
2033812cebaSDavid Jander	pins1 {
2043812cebaSDavid Jander		bias-pull-up;
2053812cebaSDavid Jander	};
2063812cebaSDavid Jander	pins2 {
2073812cebaSDavid Jander		bias-pull-up;
2083812cebaSDavid Jander	};
2093812cebaSDavid Jander};
2103812cebaSDavid Jander
2113812cebaSDavid Jander/* NOTE: Although the PRTT1A does not have an eMMC, we declare it
2123812cebaSDavid Jander * anyway, in order to be able to use the same binary for the
2133812cebaSDavid Jander * PRTT1C also. All involved pins are N.C. on PRTT1A/S for that
2143812cebaSDavid Jander * reason, so it should do no harm. All inputs configured with
2153812cebaSDavid Jander * pull-ups to avoid floating inputs. */
2163812cebaSDavid Jander&sdmmc2 {
2173812cebaSDavid Jander	pinctrl-names = "default";
2183812cebaSDavid Jander	pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_a>;
2193812cebaSDavid Jander	bus-width = <8>;
2203812cebaSDavid Jander	status = "okay";
2213812cebaSDavid Jander};
2223812cebaSDavid Jander
2233812cebaSDavid Jander&sdmmc2_b4_pins_a {
2243812cebaSDavid Jander	pins1 {
2253812cebaSDavid Jander		pinmux = <STM32_PINMUX('B', 14, AF9)>, /* SDMMC2_D0 */
2263812cebaSDavid Jander			 <STM32_PINMUX('B', 7, AF10)>, /* SDMMC2_D1 */
2273812cebaSDavid Jander			 <STM32_PINMUX('B', 3, AF9)>, /* SDMMC2_D2 */
2283812cebaSDavid Jander			 <STM32_PINMUX('B', 4, AF9)>, /* SDMMC2_D3 */
2293812cebaSDavid Jander			 <STM32_PINMUX('G', 6, AF10)>; /* SDMMC2_CMD */
2303812cebaSDavid Jander	};
2313812cebaSDavid Jander};
2323812cebaSDavid Jander
2333812cebaSDavid Jander&sdmmc2_d47_pins_a {
2343812cebaSDavid Jander	pins {
2353812cebaSDavid Jander		pinmux = <STM32_PINMUX('A', 8, AF9)>, /* SDMMC2_D4 */
2363812cebaSDavid Jander			 <STM32_PINMUX('A', 9, AF10)>, /* SDMMC2_D5 */
2373812cebaSDavid Jander			 <STM32_PINMUX('C', 6, AF10)>, /* SDMMC2_D6 */
2383812cebaSDavid Jander			 <STM32_PINMUX('C', 7, AF10)>; /* SDMMC2_D7 */
2393812cebaSDavid Jander	};
2403812cebaSDavid Jander};
2413812cebaSDavid Jander
2423812cebaSDavid Jander&uart4 {
2433812cebaSDavid Jander	pinctrl-names = "default";
2443812cebaSDavid Jander	pinctrl-0 = <&uart4_pins_a>;
2453812cebaSDavid Jander	status = "okay";
2463812cebaSDavid Jander};
2473812cebaSDavid Jander
2483812cebaSDavid Jander&uart4_pins_a {
2493812cebaSDavid Jander	pins1 {
2503812cebaSDavid Jander		pinmux = <STM32_PINMUX('B', 9, AF8)>; /* UART4_TX */
2513812cebaSDavid Jander		bias-disable;
2523812cebaSDavid Jander		drive-push-pull;
2533812cebaSDavid Jander		slew-rate = <0>;
2543812cebaSDavid Jander	};
2553812cebaSDavid Jander	pins2 {
2563812cebaSDavid Jander		pinmux = <STM32_PINMUX('B', 2, AF8)>; /* UART4_RX */
2573812cebaSDavid Jander		bias-pull-up;
2583812cebaSDavid Jander	};
2593812cebaSDavid Jander};
260