Compare commits
182 Commits
v2022.07-r
...
v2020.10-s
| Author | SHA1 | Date | |
|---|---|---|---|
| 1d1745cd1a | |||
| 82ca306e54 | |||
| 7b6901ccb5 | |||
| fb2deee978 | |||
| c9e312ceb1 | |||
| fe1ed4fbe2 | |||
| 6fde82adf7 | |||
| 660fbb2f29 | |||
| 601a3c6be5 | |||
| f6d6c70357 | |||
| eaa8cca44d | |||
| 6915c0af15 | |||
| 1801c3f50e | |||
| fff51dc169 | |||
| 99e43c3568 | |||
| 68f77d9038 | |||
| 30c0547c6e | |||
| 36c435c3fa | |||
| d66d737eef | |||
| e14597a7e9 | |||
| 982c2440e4 | |||
| 21096715be | |||
| 42d11e3ca8 | |||
| 9242458677 | |||
| b3d2d1e925 | |||
| 732f280fa4 | |||
| 22495180b0 | |||
| 4dd56025bf | |||
| 29ddeeb4c0 | |||
| 2b62541713 | |||
| 1e9aad96e6 | |||
| e7c947af9f | |||
| 1449d7f127 | |||
| f24784bc7c | |||
| 10ab5b2929 | |||
| 880cd78bcd | |||
| 14134c0f8d | |||
| 0a14445700 | |||
| 6b9d4ab5b2 | |||
| e242aaeca1 | |||
| a356a25ca6 | |||
| 13013cc0f0 | |||
| 6ff8fbd7b3 | |||
| f5243e06b8 | |||
| d8d19eacd5 | |||
| a09ed2a86a | |||
| 946ed39534 | |||
| 7326278c93 | |||
| 5f67652571 | |||
| 9fc4e59b53 | |||
| aeb1a56609 | |||
| 3c3a5fb941 | |||
| b72fa9b7bf | |||
| c05b6ee1e7 | |||
| 8289d8e398 | |||
| e6e01e11d4 | |||
| ada914b20f | |||
| f6c1d336b4 | |||
| 8d55486192 | |||
| 491269d2cd | |||
| a66185a32a | |||
| bb1048c697 | |||
| 447b2d8077 | |||
| 09d0fdb70b | |||
| cc0c6678b3 | |||
| fc202f138e | |||
| 731bc0cf93 | |||
| c17d0f4d1c | |||
| afb75ee8f1 | |||
| d2db468576 | |||
| 2965ca0343 | |||
| c763b5eceb | |||
| d015f8127f | |||
| c7cc7526c3 | |||
| 50e9cd1b89 | |||
| d306020222 | |||
| f7fd427d1d | |||
| 5a99604863 | |||
| dd12fc4a67 | |||
| 943db903e1 | |||
| 845f1618ea | |||
| b9f621e1d5 | |||
| 201c8ae8d9 | |||
| d2c99cb7e5 | |||
| 96c80bc4ab | |||
| 755a624309 | |||
| 4074f61955 | |||
| e162f7b15a | |||
| f25ae3ad15 | |||
| 3ec26bca18 | |||
| ab6b54a960 | |||
| eac38177a5 | |||
| 24cfdbc039 | |||
| bba889da70 | |||
| 4ad26a89cc | |||
| 88e2f3e3f2 | |||
| e3549a7636 | |||
| 4df4dd68c4 | |||
| 4f13edabfe | |||
| a539394615 | |||
| 1603a3f161 | |||
| 2f37c0df57 | |||
| 5973650434 | |||
| 9af6dce609 | |||
| 01110cd0a9 | |||
| 9bac53ceb9 | |||
| ccf0f7f3a8 | |||
| 71902be420 | |||
| 786b57af24 | |||
| 94fbdb5ad9 | |||
| 883351e230 | |||
| 32619a4db6 | |||
| a9a6ef9f26 | |||
| 530378050a | |||
| 89378cad53 | |||
| a276021ce2 | |||
| a667e88971 | |||
| 9e916f62f9 | |||
| a9a416d7ef | |||
| bdda8b06a9 | |||
| 6b2a718e81 | |||
| eb0109d557 | |||
| 9a54910efc | |||
| 21cc5096c3 | |||
| 427aa1cb63 | |||
| c4628d1760 | |||
| b65b0dab59 | |||
| 2ca27108ba | |||
| 16ea27215d | |||
| fe67dde0a9 | |||
| a27bb329bb | |||
| 155cd5d967 | |||
| 27023f0622 | |||
| dad06fb439 | |||
| ea8d62311f | |||
| 660f93a7dd | |||
| 6b0a2110e3 | |||
| 19200c0da0 | |||
| a4242ee4dd | |||
| 8f4e7f90af | |||
| 8185e4ef32 | |||
| 8394f45f4c | |||
| 1d0aabdada | |||
| 54172bd819 | |||
| 625dc3af9f | |||
| 38cab67688 | |||
| 70ab7eaf11 | |||
| d1531adc7d | |||
| 84af99d7fb | |||
| cbba2eb804 | |||
| 9c66fde95b | |||
| 002c5fe8f4 | |||
| 844f722e5c | |||
| 101b18a11b | |||
| 1c8bb54c75 | |||
| 14a049aac7 | |||
| ad597c3596 | |||
| 35ebbb4dd7 | |||
| c532220188 | |||
| 6f15b18c2a | |||
| 31cb9f8b1e | |||
| 0747c5fd3e | |||
| d019c25475 | |||
| 35607c6fdc | |||
| 06d87a5083 | |||
| 1672d72a2c | |||
| d923687d36 | |||
| 22313e34b2 | |||
| 12d1e62295 | |||
| 18b732f78a | |||
| 938ea5ce35 | |||
| e27bb6886a | |||
| 09a1bd58c7 | |||
| d85f35f67a | |||
| 6f2c14f673 | |||
| 52fd68c0ca | |||
| 54eb65bc01 | |||
| 828055b0f2 | |||
| 7a3599a5a4 | |||
| 7561878cdc | |||
| 9444435a55 | |||
| 5f4cb019c5 |
3
.gitignore
vendored
3
.gitignore
vendored
@ -95,3 +95,6 @@ GTAGS
|
||||
|
||||
# Python cache
|
||||
__pycache__
|
||||
|
||||
/oe-*
|
||||
bitbake-cookerdaemon.log
|
||||
|
||||
30
CONTRIBUTING.md
Normal file
30
CONTRIBUTING.md
Normal file
@ -0,0 +1,30 @@
|
||||
# Contributing guide
|
||||
|
||||
This document serves as a checklist before contributing to this repository. It includes links to read up on if topics are unclear to you.
|
||||
|
||||
This guide mainly focuses on the proper use of Git.
|
||||
|
||||
## 1. Issues
|
||||
|
||||
STM32MPU projects do not activate "Github issues" feature for the time being. If you need to report an issue or question about this project deliverables, you can report them using [ ST Support Center ](https://my.st.com/ols#/ols/newrequest) or [ ST Community MPU Forum ](https://community.st.com/s/topic/0TO0X0000003u2AWAQ/stm32-mpus).
|
||||
|
||||
## 2. Pull Requests
|
||||
|
||||
STMicrolectronics is happy to receive contributions from the community, based on an initial Contributor License Agreement (CLA) procedure.
|
||||
|
||||
* If you are an individual writing original source code and you are sure **you own the intellectual property**, then you need to sign an Individual CLA (https://cla.st.com).
|
||||
* If you work for a company that wants also to allow you to contribute with your work, your company needs to provide a Corporate CLA (https://cla.st.com) mentioning your GitHub account name.
|
||||
* If you are not sure that a CLA (Individual or Corporate) has been signed for your GitHub account you can check here (https://cla.st.com).
|
||||
|
||||
Please note that:
|
||||
* The Corporate CLA will always take precedence over the Individual CLA.
|
||||
* One CLA submission is sufficient, for any project proposed by STMicroelectronics.
|
||||
|
||||
__How to proceed__
|
||||
|
||||
* We recommend to fork the project in your GitHub account to further develop your contribution. Please use the latest commit version.
|
||||
* Please, submit one Pull Request for one new feature or proposal. This will ease the analysis and final merge if accepted.
|
||||
|
||||
__Note__
|
||||
|
||||
Merge will not be done directly in GitHub but it will need first to follow internal integration process before public deliver in a standard release. The Pull request will stay open until it is merged and delivered.
|
||||
2
Makefile
2
Makefile
@ -3,7 +3,7 @@
|
||||
VERSION = 2020
|
||||
PATCHLEVEL = 10
|
||||
SUBLEVEL =
|
||||
EXTRAVERSION =
|
||||
EXTRAVERSION = -stm32mp-r2.1
|
||||
NAME =
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
||||
@ -8,6 +8,4 @@
|
||||
|
||||
#define CONFIG_SYS_BOOT_RAMDISK_HIGH
|
||||
|
||||
#define CONFIG_LMB
|
||||
|
||||
#endif /*__ASM_ARC_CONFIG_H_ */
|
||||
|
||||
@ -176,9 +176,6 @@ void mmu_page_table_flush(unsigned long start, unsigned long stop)
|
||||
{
|
||||
}
|
||||
|
||||
void arm_init_domains(void)
|
||||
{
|
||||
}
|
||||
#endif /* #if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) */
|
||||
|
||||
#if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF)
|
||||
|
||||
@ -943,13 +943,21 @@ dtb-$(CONFIG_ARCH_ASPEED) += ast2500-evb.dtb
|
||||
dtb-$(CONFIG_ARCH_STI) += stih410-b2260.dtb
|
||||
|
||||
dtb-$(CONFIG_STM32MP15x) += \
|
||||
stm32mp157a-dk1.dtb \
|
||||
stm32mp157a-avenger96.dtb \
|
||||
stm32mp157a-dk1.dtb \
|
||||
stm32mp157a-ed1.dtb \
|
||||
stm32mp157a-ev1.dtb \
|
||||
stm32mp157c-dk2.dtb \
|
||||
stm32mp157c-ed1.dtb \
|
||||
stm32mp157c-ev1.dtb \
|
||||
stm32mp157c-odyssey.dtb \
|
||||
stm32mp15xx-dhcom-drc02.dtb \
|
||||
stm32mp157d-dk1.dtb \
|
||||
stm32mp157d-ed1.dtb \
|
||||
stm32mp157d-ev1.dtb \
|
||||
stm32mp157f-dk2.dtb \
|
||||
stm32mp157f-ed1.dtb \
|
||||
stm32mp157f-ev1.dtb \
|
||||
stm32mp15xx-dhcom-pdk2.dtb \
|
||||
stm32mp15xx-dhcor-avenger96.dtb
|
||||
|
||||
|
||||
@ -315,6 +315,7 @@
|
||||
clocks = <&rcc 1 CLK_I2C1>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
i2c-analog-filter;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@ -327,6 +328,7 @@
|
||||
clocks = <&rcc 1 CLK_I2C2>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
i2c-analog-filter;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@ -339,6 +341,7 @@
|
||||
clocks = <&rcc 1 CLK_I2C3>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
i2c-analog-filter;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@ -351,6 +354,7 @@
|
||||
clocks = <&rcc 1 CLK_I2C4>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
i2c-analog-filter;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
||||
@ -106,6 +106,7 @@
|
||||
<32>;
|
||||
resets = <&rcc STM32H7_APB1L_RESET(I2C1)>;
|
||||
clocks = <&rcc I2C1_CK>;
|
||||
i2c-analog-filter;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@ -118,6 +119,7 @@
|
||||
<34>;
|
||||
resets = <&rcc STM32H7_APB1L_RESET(I2C2)>;
|
||||
clocks = <&rcc I2C2_CK>;
|
||||
i2c-analog-filter;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@ -130,6 +132,7 @@
|
||||
<73>;
|
||||
resets = <&rcc STM32H7_APB1L_RESET(I2C3)>;
|
||||
clocks = <&rcc I2C3_CK>;
|
||||
i2c-analog-filter;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@ -349,6 +352,7 @@
|
||||
<96>;
|
||||
resets = <&rcc STM32H7_APB4_RESET(I2C4)>;
|
||||
clocks = <&rcc I2C4_CK>;
|
||||
i2c-analog-filter;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
st,mem-speed = <DDR_MEM_SPEED>;
|
||||
st,mem-size = <DDR_MEM_SIZE>;
|
||||
|
||||
#ifndef CONFIG_TFABOOT
|
||||
st,ctl-reg = <
|
||||
DDR_MSTR
|
||||
DDR_MRCTRL0
|
||||
@ -133,7 +134,7 @@
|
||||
>;
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
* Save Date: 2020.02.20, save Time: 18:45:20
|
||||
*/
|
||||
#define DDR_MEM_COMPATIBLE ddr3-1066-888-bin-g-1x4gb-533mhz
|
||||
#define DDR_MEM_NAME "DDR3-DDR3L 16bits 533000Khz"
|
||||
#define DDR_MEM_NAME "DDR3-DDR3L 16bits 533000kHz"
|
||||
#define DDR_MEM_SPEED 533000
|
||||
#define DDR_MEM_SIZE 0x20000000
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
* Save Date: 2020.02.20, save Time: 18:49:33
|
||||
*/
|
||||
#define DDR_MEM_COMPATIBLE ddr3-1066-888-bin-g-2x4gb-533mhz
|
||||
#define DDR_MEM_NAME "DDR3-DDR3L 32bits 533000Khz"
|
||||
#define DDR_MEM_NAME "DDR3-DDR3L 32bits 533000kHz"
|
||||
#define DDR_MEM_SPEED 533000
|
||||
#define DDR_MEM_SIZE 0x40000000
|
||||
|
||||
|
||||
524
arch/arm/dts/stm32mp15-m4-srm-pinctrl.dtsi
Normal file
524
arch/arm/dts/stm32mp15-m4-srm-pinctrl.dtsi
Normal file
@ -0,0 +1,524 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
|
||||
/*
|
||||
* Copyright (C) STMicroelectronics 2019 - All Rights Reserved
|
||||
* Author: Fabien Dessenne <fabien.dessenne@st.com> for STMicroelectronics.
|
||||
*/
|
||||
|
||||
&pinctrl {
|
||||
m4_adc1_in6_pins_a: m4-adc1-in6 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('F', 12, RSVD)>;
|
||||
};
|
||||
};
|
||||
|
||||
m4_adc12_ain_pins_a: m4-adc12-ain-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('C', 3, RSVD)>, /* ADC1 in13 */
|
||||
<STM32_PINMUX('F', 12, RSVD)>, /* ADC1 in6 */
|
||||
<STM32_PINMUX('F', 13, RSVD)>, /* ADC2 in2 */
|
||||
<STM32_PINMUX('F', 14, RSVD)>; /* ADC2 in6 */
|
||||
};
|
||||
};
|
||||
|
||||
m4_adc12_usb_pwr_pins_a: m4-adc12-usb-pwr-pins-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('A', 4, RSVD)>, /* ADC12 in18 */
|
||||
<STM32_PINMUX('A', 5, RSVD)>; /* ADC12 in19 */
|
||||
};
|
||||
};
|
||||
|
||||
m4_cec_pins_a: m4-cec-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('A', 15, RSVD)>;
|
||||
};
|
||||
};
|
||||
|
||||
m4_cec_pins_b: m4-cec-1 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('B', 6, RSVD)>;
|
||||
};
|
||||
};
|
||||
|
||||
m4_dac_ch1_pins_a: m4-dac-ch1 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('A', 4, RSVD)>;
|
||||
};
|
||||
};
|
||||
|
||||
m4_dac_ch2_pins_a: m4-dac-ch2 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('A', 5, RSVD)>;
|
||||
};
|
||||
};
|
||||
|
||||
m4_dcmi_pins_a: m4-dcmi-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('H', 8, RSVD)>,/* DCMI_HSYNC */
|
||||
<STM32_PINMUX('B', 7, RSVD)>,/* DCMI_VSYNC */
|
||||
<STM32_PINMUX('A', 6, RSVD)>,/* DCMI_PIXCLK */
|
||||
<STM32_PINMUX('H', 9, RSVD)>,/* DCMI_D0 */
|
||||
<STM32_PINMUX('H', 10, RSVD)>,/* DCMI_D1 */
|
||||
<STM32_PINMUX('H', 11, RSVD)>,/* DCMI_D2 */
|
||||
<STM32_PINMUX('H', 12, RSVD)>,/* DCMI_D3 */
|
||||
<STM32_PINMUX('H', 14, RSVD)>,/* DCMI_D4 */
|
||||
<STM32_PINMUX('I', 4, RSVD)>,/* DCMI_D5 */
|
||||
<STM32_PINMUX('B', 8, RSVD)>,/* DCMI_D6 */
|
||||
<STM32_PINMUX('E', 6, RSVD)>,/* DCMI_D7 */
|
||||
<STM32_PINMUX('I', 1, RSVD)>,/* DCMI_D8 */
|
||||
<STM32_PINMUX('H', 7, RSVD)>,/* DCMI_D9 */
|
||||
<STM32_PINMUX('I', 3, RSVD)>,/* DCMI_D10 */
|
||||
<STM32_PINMUX('H', 15, RSVD)>;/* DCMI_D11 */
|
||||
};
|
||||
};
|
||||
|
||||
m4_dfsdm_clkout_pins_a: m4-dfsdm-clkout-pins-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('B', 13, RSVD)>; /* DFSDM_CKOUT */
|
||||
};
|
||||
};
|
||||
|
||||
m4_dfsdm_data1_pins_a: m4-dfsdm-data1-pins-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('C', 3, RSVD)>; /* DFSDM_DATA1 */
|
||||
};
|
||||
};
|
||||
|
||||
m4_dfsdm_data3_pins_a: m4-dfsdm-data3-pins-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('F', 13, RSVD)>; /* DFSDM_DATA3 */
|
||||
};
|
||||
};
|
||||
|
||||
m4_ethernet0_rgmii_pins_a: m4-rgmii-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('G', 5, RSVD)>, /* ETH_RGMII_CLK125 */
|
||||
<STM32_PINMUX('G', 4, RSVD)>, /* ETH_RGMII_GTX_CLK */
|
||||
<STM32_PINMUX('G', 13, RSVD)>, /* ETH_RGMII_TXD0 */
|
||||
<STM32_PINMUX('G', 14, RSVD)>, /* ETH_RGMII_TXD1 */
|
||||
<STM32_PINMUX('C', 2, RSVD)>, /* ETH_RGMII_TXD2 */
|
||||
<STM32_PINMUX('E', 2, RSVD)>, /* ETH_RGMII_TXD3 */
|
||||
<STM32_PINMUX('B', 11, RSVD)>, /* ETH_RGMII_TX_CTL */
|
||||
<STM32_PINMUX('C', 1, RSVD)>, /* ETH_MDC */
|
||||
<STM32_PINMUX('A', 2, RSVD)>, /* ETH_MDIO */
|
||||
<STM32_PINMUX('C', 4, RSVD)>, /* ETH_RGMII_RXD0 */
|
||||
<STM32_PINMUX('C', 5, RSVD)>, /* ETH_RGMII_RXD1 */
|
||||
<STM32_PINMUX('B', 0, RSVD)>, /* ETH_RGMII_RXD2 */
|
||||
<STM32_PINMUX('B', 1, RSVD)>, /* ETH_RGMII_RXD3 */
|
||||
<STM32_PINMUX('A', 1, RSVD)>, /* ETH_RGMII_RX_CLK */
|
||||
<STM32_PINMUX('A', 7, RSVD)>; /* ETH_RGMII_RX_CTL */
|
||||
};
|
||||
};
|
||||
|
||||
m4_fmc_pins_a: m4-fmc-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('D', 4, RSVD)>, /* FMC_NOE */
|
||||
<STM32_PINMUX('D', 5, RSVD)>, /* FMC_NWE */
|
||||
<STM32_PINMUX('D', 11, RSVD)>, /* FMC_A16_FMC_CLE */
|
||||
<STM32_PINMUX('D', 12, RSVD)>, /* FMC_A17_FMC_ALE */
|
||||
<STM32_PINMUX('D', 14, RSVD)>, /* FMC_D0 */
|
||||
<STM32_PINMUX('D', 15, RSVD)>, /* FMC_D1 */
|
||||
<STM32_PINMUX('D', 0, RSVD)>, /* FMC_D2 */
|
||||
<STM32_PINMUX('D', 1, RSVD)>, /* FMC_D3 */
|
||||
<STM32_PINMUX('E', 7, RSVD)>, /* FMC_D4 */
|
||||
<STM32_PINMUX('E', 8, RSVD)>, /* FMC_D5 */
|
||||
<STM32_PINMUX('E', 9, RSVD)>, /* FMC_D6 */
|
||||
<STM32_PINMUX('E', 10, RSVD)>, /* FMC_D7 */
|
||||
<STM32_PINMUX('G', 9, RSVD)>, /* FMC_NE2_FMC_NCE */
|
||||
<STM32_PINMUX('D', 6, RSVD)>; /* FMC_NWAIT */
|
||||
};
|
||||
};
|
||||
|
||||
m4_hdp0_pins_a: m4-hdp0-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('I', 12, RSVD)>; /* HDP0 */
|
||||
};
|
||||
};
|
||||
|
||||
m4_hdp6_pins_a: m4-hdp6-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('K', 5, RSVD)>; /* HDP6 */
|
||||
};
|
||||
};
|
||||
|
||||
m4_hdp7_pins_a: m4-hdp7-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('K', 6, RSVD)>; /* HDP7 */
|
||||
};
|
||||
};
|
||||
|
||||
m4_i2c1_pins_a: m4-i2c1-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('D', 12, RSVD)>, /* I2C1_SCL */
|
||||
<STM32_PINMUX('F', 15, RSVD)>; /* I2C1_SDA */
|
||||
};
|
||||
};
|
||||
|
||||
m4_i2c2_pins_a: m4-i2c2-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('H', 4, RSVD)>, /* I2C2_SCL */
|
||||
<STM32_PINMUX('H', 5, RSVD)>; /* I2C2_SDA */
|
||||
};
|
||||
};
|
||||
|
||||
m4_i2c5_pins_a: m4-i2c5-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('A', 11, RSVD)>, /* I2C5_SCL */
|
||||
<STM32_PINMUX('A', 12, RSVD)>; /* I2C5_SDA */
|
||||
};
|
||||
};
|
||||
|
||||
m4_i2s2_pins_a: m4-i2s2-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('I', 3, RSVD)>, /* I2S2_SDO */
|
||||
<STM32_PINMUX('B', 9, RSVD)>, /* I2S2_WS */
|
||||
<STM32_PINMUX('A', 9, RSVD)>; /* I2S2_CK */
|
||||
};
|
||||
};
|
||||
|
||||
m4_ltdc_pins_a: m4-ltdc-a-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('G', 7, RSVD)>, /* LCD_CLK */
|
||||
<STM32_PINMUX('I', 10, RSVD)>, /* LCD_HSYNC */
|
||||
<STM32_PINMUX('I', 9, RSVD)>, /* LCD_VSYNC */
|
||||
<STM32_PINMUX('F', 10, RSVD)>, /* LCD_DE */
|
||||
<STM32_PINMUX('H', 2, RSVD)>, /* LCD_R0 */
|
||||
<STM32_PINMUX('H', 3, RSVD)>, /* LCD_R1 */
|
||||
<STM32_PINMUX('H', 8, RSVD)>, /* LCD_R2 */
|
||||
<STM32_PINMUX('H', 9, RSVD)>, /* LCD_R3 */
|
||||
<STM32_PINMUX('H', 10, RSVD)>, /* LCD_R4 */
|
||||
<STM32_PINMUX('C', 0, RSVD)>, /* LCD_R5 */
|
||||
<STM32_PINMUX('H', 12, RSVD)>, /* LCD_R6 */
|
||||
<STM32_PINMUX('E', 15, RSVD)>, /* LCD_R7 */
|
||||
<STM32_PINMUX('E', 5, RSVD)>, /* LCD_G0 */
|
||||
<STM32_PINMUX('E', 6, RSVD)>, /* LCD_G1 */
|
||||
<STM32_PINMUX('H', 13, RSVD)>, /* LCD_G2 */
|
||||
<STM32_PINMUX('H', 14, RSVD)>, /* LCD_G3 */
|
||||
<STM32_PINMUX('H', 15, RSVD)>, /* LCD_G4 */
|
||||
<STM32_PINMUX('I', 0, RSVD)>, /* LCD_G5 */
|
||||
<STM32_PINMUX('I', 1, RSVD)>, /* LCD_G6 */
|
||||
<STM32_PINMUX('I', 2, RSVD)>, /* LCD_G7 */
|
||||
<STM32_PINMUX('D', 9, RSVD)>, /* LCD_B0 */
|
||||
<STM32_PINMUX('G', 12, RSVD)>, /* LCD_B1 */
|
||||
<STM32_PINMUX('G', 10, RSVD)>, /* LCD_B2 */
|
||||
<STM32_PINMUX('D', 10, RSVD)>, /* LCD_B3 */
|
||||
<STM32_PINMUX('I', 4, RSVD)>, /* LCD_B4 */
|
||||
<STM32_PINMUX('A', 3, RSVD)>, /* LCD_B5 */
|
||||
<STM32_PINMUX('B', 8, RSVD)>, /* LCD_B6 */
|
||||
<STM32_PINMUX('D', 8, RSVD)>; /* LCD_B7 */
|
||||
};
|
||||
};
|
||||
|
||||
m4_ltdc_pins_b: m4-ltdc-b-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('I', 14, RSVD)>, /* LCD_CLK */
|
||||
<STM32_PINMUX('I', 12, RSVD)>, /* LCD_HSYNC */
|
||||
<STM32_PINMUX('I', 13, RSVD)>, /* LCD_VSYNC */
|
||||
<STM32_PINMUX('K', 7, RSVD)>, /* LCD_DE */
|
||||
<STM32_PINMUX('I', 15, RSVD)>, /* LCD_R0 */
|
||||
<STM32_PINMUX('J', 0, RSVD)>, /* LCD_R1 */
|
||||
<STM32_PINMUX('J', 1, RSVD)>, /* LCD_R2 */
|
||||
<STM32_PINMUX('J', 2, RSVD)>, /* LCD_R3 */
|
||||
<STM32_PINMUX('J', 3, RSVD)>, /* LCD_R4 */
|
||||
<STM32_PINMUX('J', 4, RSVD)>, /* LCD_R5 */
|
||||
<STM32_PINMUX('J', 5, RSVD)>, /* LCD_R6 */
|
||||
<STM32_PINMUX('J', 6, RSVD)>, /* LCD_R7 */
|
||||
<STM32_PINMUX('J', 7, RSVD)>, /* LCD_G0 */
|
||||
<STM32_PINMUX('J', 8, RSVD)>, /* LCD_G1 */
|
||||
<STM32_PINMUX('J', 9, RSVD)>, /* LCD_G2 */
|
||||
<STM32_PINMUX('J', 10, RSVD)>, /* LCD_G3 */
|
||||
<STM32_PINMUX('J', 11, RSVD)>, /* LCD_G4 */
|
||||
<STM32_PINMUX('K', 0, RSVD)>, /* LCD_G5 */
|
||||
<STM32_PINMUX('K', 1, RSVD)>, /* LCD_G6 */
|
||||
<STM32_PINMUX('K', 2, RSVD)>, /* LCD_G7 */
|
||||
<STM32_PINMUX('J', 12, RSVD)>, /* LCD_B0 */
|
||||
<STM32_PINMUX('J', 13, RSVD)>, /* LCD_B1 */
|
||||
<STM32_PINMUX('J', 14, RSVD)>, /* LCD_B2 */
|
||||
<STM32_PINMUX('J', 15, RSVD)>, /* LCD_B3 */
|
||||
<STM32_PINMUX('K', 3, RSVD)>, /* LCD_B4 */
|
||||
<STM32_PINMUX('K', 4, RSVD)>, /* LCD_B5 */
|
||||
<STM32_PINMUX('K', 5, RSVD)>, /* LCD_B6 */
|
||||
<STM32_PINMUX('K', 6, RSVD)>; /* LCD_B7 */
|
||||
};
|
||||
};
|
||||
|
||||
m4_m_can1_pins_a: m4-m-can1-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('H', 13, RSVD)>, /* CAN1_TX */
|
||||
<STM32_PINMUX('I', 9, RSVD)>; /* CAN1_RX */
|
||||
};
|
||||
};
|
||||
|
||||
m4_pwm1_pins_a: m4-pwm1-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('E', 9, RSVD)>, /* TIM1_CH1 */
|
||||
<STM32_PINMUX('E', 11, RSVD)>, /* TIM1_CH2 */
|
||||
<STM32_PINMUX('E', 14, RSVD)>; /* TIM1_CH4 */
|
||||
};
|
||||
};
|
||||
|
||||
m4_pwm2_pins_a: m4-pwm2-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('A', 3, RSVD)>; /* TIM2_CH4 */
|
||||
};
|
||||
};
|
||||
|
||||
m4_pwm3_pins_a: m4-pwm3-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('C', 7, RSVD)>; /* TIM3_CH2 */
|
||||
};
|
||||
};
|
||||
|
||||
m4_pwm4_pins_a: m4-pwm4-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('D', 14, RSVD)>, /* TIM4_CH3 */
|
||||
<STM32_PINMUX('D', 15, RSVD)>; /* TIM4_CH4 */
|
||||
};
|
||||
};
|
||||
|
||||
m4_pwm4_pins_b: m4-pwm4-1 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('D', 13, RSVD)>; /* TIM4_CH2 */
|
||||
};
|
||||
};
|
||||
|
||||
m4_pwm5_pins_a: m4-pwm5-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('H', 11, RSVD)>; /* TIM5_CH2 */
|
||||
};
|
||||
};
|
||||
|
||||
m4_pwm8_pins_a: m4-pwm8-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('I', 2, RSVD)>; /* TIM8_CH4 */
|
||||
};
|
||||
};
|
||||
|
||||
m4_pwm12_pins_a: m4-pwm12-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('H', 6, RSVD)>; /* TIM12_CH1 */
|
||||
};
|
||||
};
|
||||
|
||||
m4_qspi_bk1_pins_a: m4-qspi-bk1-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('F', 8, RSVD)>, /* QSPI_BK1_IO0 */
|
||||
<STM32_PINMUX('F', 9, RSVD)>, /* QSPI_BK1_IO1 */
|
||||
<STM32_PINMUX('F', 7, RSVD)>, /* QSPI_BK1_IO2 */
|
||||
<STM32_PINMUX('F', 6, RSVD)>, /* QSPI_BK1_IO3 */
|
||||
<STM32_PINMUX('B', 6, RSVD)>; /* QSPI_BK1_NCS */
|
||||
};
|
||||
};
|
||||
|
||||
m4_qspi_bk2_pins_a: m4-qspi-bk2-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('H', 2, RSVD)>, /* QSPI_BK2_IO0 */
|
||||
<STM32_PINMUX('H', 3, RSVD)>, /* QSPI_BK2_IO1 */
|
||||
<STM32_PINMUX('G', 10, RSVD)>, /* QSPI_BK2_IO2 */
|
||||
<STM32_PINMUX('G', 7, RSVD)>, /* QSPI_BK2_IO3 */
|
||||
<STM32_PINMUX('C', 0, RSVD)>; /* QSPI_BK2_NCS */
|
||||
};
|
||||
};
|
||||
|
||||
m4_qspi_clk_pins_a: m4-qspi-clk-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('F', 10, RSVD)>; /* QSPI_CLK */
|
||||
};
|
||||
};
|
||||
|
||||
m4_rtc_out2_rmp_pins_a: m4-rtc-out2-rmp-pins-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('I', 8, RSVD)>; /* RTC_OUT2_RMP */
|
||||
};
|
||||
};
|
||||
|
||||
m4_sai2a_pins_a: m4-sai2a-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('I', 5, RSVD)>, /* SAI2_SCK_A */
|
||||
<STM32_PINMUX('I', 6, RSVD)>, /* SAI2_SD_A */
|
||||
<STM32_PINMUX('I', 7, RSVD)>, /* SAI2_FS_A */
|
||||
<STM32_PINMUX('E', 0, RSVD)>; /* SAI2_MCLK_A */
|
||||
};
|
||||
};
|
||||
|
||||
m4_sai2b_pins_a: m4-sai2b-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('E', 12, RSVD)>, /* SAI2_SCK_B */
|
||||
<STM32_PINMUX('E', 13, RSVD)>, /* SAI2_FS_B */
|
||||
<STM32_PINMUX('E', 14, RSVD)>, /* SAI2_MCLK_B */
|
||||
<STM32_PINMUX('F', 11, RSVD)>; /* SAI2_SD_B */
|
||||
};
|
||||
};
|
||||
|
||||
m4_sai2b_pins_b: m4-sai2b-2 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('F', 11, RSVD)>; /* SAI2_SD_B */
|
||||
};
|
||||
};
|
||||
|
||||
m4_sai4a_pins_a: m4-sai4a-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('B', 5, RSVD)>; /* SAI4_SD_A */
|
||||
};
|
||||
};
|
||||
|
||||
m4_sdmmc1_b4_pins_a: m4-sdmmc1-b4-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('C', 8, RSVD)>, /* SDMMC1_D0 */
|
||||
<STM32_PINMUX('C', 9, RSVD)>, /* SDMMC1_D1 */
|
||||
<STM32_PINMUX('C', 10, RSVD)>, /* SDMMC1_D2 */
|
||||
<STM32_PINMUX('C', 11, RSVD)>, /* SDMMC1_D3 */
|
||||
<STM32_PINMUX('D', 2, RSVD)>, /* SDMMC1_CMD */
|
||||
<STM32_PINMUX('C', 12, RSVD)>; /* SDMMC1_CK */
|
||||
};
|
||||
};
|
||||
|
||||
m4_sdmmc1_dir_pins_a: m4-sdmmc1-dir-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('F', 2, RSVD)>, /* SDMMC1_D0DIR */
|
||||
<STM32_PINMUX('C', 7, RSVD)>, /* SDMMC1_D123DIR */
|
||||
<STM32_PINMUX('B', 9, RSVD)>, /* SDMMC1_CDIR */
|
||||
<STM32_PINMUX('E', 4, RSVD)>; /* SDMMC1_CKIN */
|
||||
};
|
||||
};
|
||||
|
||||
m4_sdmmc2_b4_pins_a: m4-sdmmc2-b4-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('B', 14, RSVD)>, /* SDMMC2_D0 */
|
||||
<STM32_PINMUX('B', 15, RSVD)>, /* SDMMC2_D1 */
|
||||
<STM32_PINMUX('B', 3, RSVD)>, /* SDMMC2_D2 */
|
||||
<STM32_PINMUX('B', 4, RSVD)>, /* SDMMC2_D3 */
|
||||
<STM32_PINMUX('G', 6, RSVD)>, /* SDMMC2_CMD */
|
||||
<STM32_PINMUX('E', 3, RSVD)>; /* SDMMC2_CK */
|
||||
};
|
||||
};
|
||||
|
||||
m4_sdmmc2_b4_pins_b: m4-sdmmc2-b4-1 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('B', 14, RSVD)>, /* SDMMC2_D0 */
|
||||
<STM32_PINMUX('B', 15, RSVD)>, /* SDMMC2_D1 */
|
||||
<STM32_PINMUX('B', 3, RSVD)>, /* SDMMC2_D2 */
|
||||
<STM32_PINMUX('B', 4, RSVD)>, /* SDMMC2_D3 */
|
||||
<STM32_PINMUX('G', 6, RSVD)>, /* SDMMC2_CMD */
|
||||
<STM32_PINMUX('E', 3, RSVD)>; /* SDMMC2_CK */
|
||||
};
|
||||
};
|
||||
|
||||
m4_sdmmc2_d47_pins_a: m4-sdmmc2-d47-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('A', 8, RSVD)>, /* SDMMC2_D4 */
|
||||
<STM32_PINMUX('A', 9, RSVD)>, /* SDMMC2_D5 */
|
||||
<STM32_PINMUX('E', 5, RSVD)>, /* SDMMC2_D6 */
|
||||
<STM32_PINMUX('D', 3, RSVD)>; /* SDMMC2_D7 */
|
||||
};
|
||||
};
|
||||
|
||||
m4_sdmmc3_b4_pins_a: m4-sdmmc3-b4-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('F', 0, RSVD)>, /* SDMMC3_D0 */
|
||||
<STM32_PINMUX('F', 4, RSVD)>, /* SDMMC3_D1 */
|
||||
<STM32_PINMUX('F', 5, RSVD)>, /* SDMMC3_D2 */
|
||||
<STM32_PINMUX('D', 7, RSVD)>, /* SDMMC3_D3 */
|
||||
<STM32_PINMUX('F', 1, RSVD)>, /* SDMMC3_CMD */
|
||||
<STM32_PINMUX('G', 15, RSVD)>; /* SDMMC3_CK */
|
||||
};
|
||||
};
|
||||
|
||||
m4_spdifrx_pins_a: m4-spdifrx-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('G', 12, RSVD)>; /* SPDIF_IN1 */
|
||||
};
|
||||
};
|
||||
|
||||
m4_spi4_pins_a: m4-spi4-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('E', 12, RSVD)>, /* SPI4_SCK */
|
||||
<STM32_PINMUX('E', 14, RSVD)>, /* SPI4_MOSI */
|
||||
<STM32_PINMUX('E', 13, RSVD)>; /* SPI4_MISO */
|
||||
};
|
||||
};
|
||||
|
||||
m4_spi5_pins_a: m4-spi5-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('F', 7, RSVD)>, /* SPI5_SCK */
|
||||
<STM32_PINMUX('F', 9, RSVD)>, /* SPI5_MOSI */
|
||||
<STM32_PINMUX('F', 8, RSVD)>; /* SPI5_MISO */
|
||||
};
|
||||
};
|
||||
|
||||
m4_stusb1600_pins_a: m4-stusb1600-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('I', 11, RSVD)>;
|
||||
};
|
||||
};
|
||||
|
||||
m4_uart4_pins_a: m4-uart4-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('G', 11, RSVD)>, /* UART4_TX */
|
||||
<STM32_PINMUX('B', 2, RSVD)>; /* UART4_RX */
|
||||
};
|
||||
};
|
||||
|
||||
m4_uart7_pins_a: m4-uart7-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('E', 8, RSVD)>, /* USART7_TX */
|
||||
<STM32_PINMUX('E', 7, RSVD)>; /* USART7_RX */
|
||||
};
|
||||
};
|
||||
|
||||
m4_usart2_pins_a: m4-usart2-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('D', 5, RSVD)>, /* USART2_TX */
|
||||
<STM32_PINMUX('D', 4, RSVD)>, /* USART2_RTS */
|
||||
<STM32_PINMUX('D', 6, RSVD)>, /* USART2_RX */
|
||||
<STM32_PINMUX('D', 3, RSVD)>; /* USART2_CTS_NSS */
|
||||
};
|
||||
};
|
||||
|
||||
m4_usart3_pins_a: m4-usart3-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('B', 10, RSVD)>, /* USART3_TX */
|
||||
<STM32_PINMUX('G', 8, RSVD)>, /* USART3_RTS */
|
||||
<STM32_PINMUX('B', 12, RSVD)>, /* USART3_RX */
|
||||
<STM32_PINMUX('I', 10, RSVD)>; /* USART3_CTS_NSS */
|
||||
};
|
||||
};
|
||||
|
||||
m4_usart3_pins_b: m4-usart3-1 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('B', 10, RSVD)>, /* USART3_TX */
|
||||
<STM32_PINMUX('G', 8, RSVD)>, /* USART3_RTS */
|
||||
<STM32_PINMUX('B', 12, RSVD)>, /* USART3_RX */
|
||||
<STM32_PINMUX('B', 13, RSVD)>; /* USART3_CTS_NSS */
|
||||
};
|
||||
};
|
||||
|
||||
m4_usbotg_hs_pins_a: m4-usbotg_hs-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('A', 10, RSVD)>; /* OTG_ID */
|
||||
};
|
||||
};
|
||||
|
||||
m4_usbotg_fs_dp_dm_pins_a: m4-usbotg-fs-dp-dm-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('A', 11, RSVD)>, /* OTG_FS_DM */
|
||||
<STM32_PINMUX('A', 12, RSVD)>; /* OTG_FS_DP */
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pinctrl_z {
|
||||
m4_i2c4_pins_a: m4-i2c4-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('Z', 4, RSVD)>, /* I2C4_SCL */
|
||||
<STM32_PINMUX('Z', 5, RSVD)>; /* I2C4_SDA */
|
||||
};
|
||||
};
|
||||
|
||||
m4_spi1_pins_a: m4-spi1-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('Z', 0, RSVD)>, /* SPI1_SCK */
|
||||
<STM32_PINMUX('Z', 2, RSVD)>, /* SPI1_MOSI */
|
||||
<STM32_PINMUX('Z', 1, RSVD)>; /* SPI1_MISO */
|
||||
};
|
||||
};
|
||||
};
|
||||
448
arch/arm/dts/stm32mp15-m4-srm.dtsi
Normal file
448
arch/arm/dts/stm32mp15-m4-srm.dtsi
Normal file
@ -0,0 +1,448 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
|
||||
/*
|
||||
* Copyright (C) STMicroelectronics 2019 - All Rights Reserved
|
||||
* Author: Fabien Dessenne <fabien.dessenne@st.com> for STMicroelectronics.
|
||||
*/
|
||||
|
||||
&m4_rproc {
|
||||
m4_system_resources {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
m4_timers2: timer@40000000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x40000000 0x400>;
|
||||
clocks = <&rcc TIM2_K>;
|
||||
clock-names = "int";
|
||||
status = "disabled";
|
||||
};
|
||||
m4_timers3: timer@40001000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x40001000 0x400>;
|
||||
clocks = <&rcc TIM3_K>;
|
||||
clock-names = "int";
|
||||
status = "disabled";
|
||||
};
|
||||
m4_timers4: timer@40002000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x40002000 0x400>;
|
||||
clocks = <&rcc TIM4_K>;
|
||||
clock-names = "int";
|
||||
status = "disabled";
|
||||
};
|
||||
m4_timers5: timer@40003000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x40003000 0x400>;
|
||||
clocks = <&rcc TIM5_K>;
|
||||
clock-names = "int";
|
||||
status = "disabled";
|
||||
};
|
||||
m4_timers6: timer@40004000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x40004000 0x400>;
|
||||
clocks = <&rcc TIM6_K>;
|
||||
clock-names = "int";
|
||||
status = "disabled";
|
||||
};
|
||||
m4_timers7: timer@40005000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x40005000 0x400>;
|
||||
clocks = <&rcc TIM7_K>;
|
||||
clock-names = "int";
|
||||
status = "disabled";
|
||||
};
|
||||
m4_timers12: timer@40006000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x40006000 0x400>;
|
||||
clocks = <&rcc TIM12_K>;
|
||||
clock-names = "int";
|
||||
status = "disabled";
|
||||
};
|
||||
m4_timers13: timer@40007000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x40007000 0x400>;
|
||||
clocks = <&rcc TIM13_K>;
|
||||
clock-names = "int";
|
||||
status = "disabled";
|
||||
};
|
||||
m4_timers14: timer@40008000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x40008000 0x400>;
|
||||
clocks = <&rcc TIM14_K>;
|
||||
clock-names = "int";
|
||||
status = "disabled";
|
||||
};
|
||||
m4_lptimer1: timer@40009000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x40009000 0x400>;
|
||||
clocks = <&rcc LPTIM1_K>;
|
||||
clock-names = "mux";
|
||||
status = "disabled";
|
||||
};
|
||||
m4_spi2: spi@4000b000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x4000b000 0x400>;
|
||||
clocks = <&rcc SPI2_K>;
|
||||
status = "disabled";
|
||||
};
|
||||
m4_i2s2: audio-controller@4000b000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x4000b000 0x400>;
|
||||
status = "disabled";
|
||||
};
|
||||
m4_spi3: spi@4000c000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x4000c000 0x400>;
|
||||
clocks = <&rcc SPI3_K>;
|
||||
status = "disabled";
|
||||
};
|
||||
m4_i2s3: audio-controller@4000c000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x4000c000 0x400>;
|
||||
status = "disabled";
|
||||
};
|
||||
m4_spdifrx: audio-controller@4000d000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x4000d000 0x400>;
|
||||
clocks = <&rcc SPDIF_K>;
|
||||
clock-names = "kclk";
|
||||
status = "disabled";
|
||||
};
|
||||
m4_usart2: serial@4000e000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x4000e000 0x400>;
|
||||
interrupt-parent = <&exti>;
|
||||
interrupts = <27 1>;
|
||||
clocks = <&rcc USART2_K>;
|
||||
status = "disabled";
|
||||
};
|
||||
m4_usart3: serial@4000f000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x4000f000 0x400>;
|
||||
interrupt-parent = <&exti>;
|
||||
interrupts = <28 1>;
|
||||
clocks = <&rcc USART3_K>;
|
||||
status = "disabled";
|
||||
};
|
||||
m4_uart4: serial@40010000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x40010000 0x400>;
|
||||
interrupt-parent = <&exti>;
|
||||
interrupts = <30 1>;
|
||||
clocks = <&rcc UART4_K>;
|
||||
status = "disabled";
|
||||
};
|
||||
m4_uart5: serial@40011000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x40011000 0x400>;
|
||||
interrupt-parent = <&exti>;
|
||||
interrupts = <31 1>;
|
||||
clocks = <&rcc UART5_K>;
|
||||
status = "disabled";
|
||||
};
|
||||
m4_i2c1: i2c@40012000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x40012000 0x400>;
|
||||
interrupt-parent = <&exti>;
|
||||
interrupts = <21 1>;
|
||||
clocks = <&rcc I2C1_K>;
|
||||
status = "disabled";
|
||||
};
|
||||
m4_i2c2: i2c@40013000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x40013000 0x400>;
|
||||
interrupt-parent = <&exti>;
|
||||
interrupts = <22 1>;
|
||||
clocks = <&rcc I2C2_K>;
|
||||
status = "disabled";
|
||||
};
|
||||
m4_i2c3: i2c@40014000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x40014000 0x400>;
|
||||
interrupt-parent = <&exti>;
|
||||
interrupts = <23 1>;
|
||||
clocks = <&rcc I2C3_K>;
|
||||
status = "disabled";
|
||||
};
|
||||
m4_i2c5: i2c@40015000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x40015000 0x400>;
|
||||
interrupt-parent = <&exti>;
|
||||
interrupts = <25 1>;
|
||||
clocks = <&rcc I2C5_K>;
|
||||
status = "disabled";
|
||||
};
|
||||
m4_cec: cec@40016000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x40016000 0x400>;
|
||||
interrupt-parent = <&exti>;
|
||||
interrupts = <69 1>;
|
||||
clocks = <&rcc CEC_K>, <&rcc CEC>;
|
||||
clock-names = "cec", "hdmi-cec";
|
||||
status = "disabled";
|
||||
};
|
||||
m4_dac: dac@40017000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x40017000 0x400>;
|
||||
clocks = <&rcc DAC12>;
|
||||
clock-names = "pclk";
|
||||
status = "disabled";
|
||||
};
|
||||
m4_uart7: serial@40018000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x40018000 0x400>;
|
||||
interrupt-parent = <&exti>;
|
||||
interrupts = <32 1>;
|
||||
clocks = <&rcc UART7_K>;
|
||||
status = "disabled";
|
||||
};
|
||||
m4_uart8: serial@40019000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x40019000 0x400>;
|
||||
interrupt-parent = <&exti>;
|
||||
interrupts = <33 1>;
|
||||
clocks = <&rcc UART8_K>;
|
||||
status = "disabled";
|
||||
};
|
||||
m4_timers1: timer@44000000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x44000000 0x400>;
|
||||
clocks = <&rcc TIM1_K>;
|
||||
clock-names = "int";
|
||||
status = "disabled";
|
||||
};
|
||||
m4_timers8: timer@44001000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x44001000 0x400>;
|
||||
clocks = <&rcc TIM8_K>;
|
||||
clock-names = "int";
|
||||
status = "disabled";
|
||||
};
|
||||
m4_usart6: serial@44003000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x44003000 0x400>;
|
||||
interrupt-parent = <&exti>;
|
||||
interrupts = <29 1>;
|
||||
clocks = <&rcc USART6_K>;
|
||||
status = "disabled";
|
||||
};
|
||||
m4_spi1: spi@44004000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x44004000 0x400>;
|
||||
clocks = <&rcc SPI1_K>;
|
||||
status = "disabled";
|
||||
};
|
||||
m4_i2s1: audio-controller@44004000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x44004000 0x400>;
|
||||
status = "disabled";
|
||||
};
|
||||
m4_spi4: spi@44005000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x44005000 0x400>;
|
||||
clocks = <&rcc SPI4_K>;
|
||||
status = "disabled";
|
||||
};
|
||||
m4_timers15: timer@44006000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x44006000 0x400>;
|
||||
clocks = <&rcc TIM15_K>;
|
||||
clock-names = "int";
|
||||
status = "disabled";
|
||||
};
|
||||
m4_timers16: timer@44007000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x44007000 0x400>;
|
||||
clocks = <&rcc TIM16_K>;
|
||||
clock-names = "int";
|
||||
status = "disabled";
|
||||
};
|
||||
m4_timers17: timer@44008000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x44008000 0x400>;
|
||||
clocks = <&rcc TIM17_K>;
|
||||
clock-names = "int";
|
||||
status = "disabled";
|
||||
};
|
||||
m4_spi5: spi@44009000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x44009000 0x400>;
|
||||
clocks = <&rcc SPI5_K>;
|
||||
status = "disabled";
|
||||
};
|
||||
m4_sai1: sai@4400a000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x4400a000 0x4>;
|
||||
clocks = <&rcc SAI1_K>;
|
||||
clock-names = "sai_ck";
|
||||
status = "disabled";
|
||||
};
|
||||
m4_sai2: sai@4400b000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x4400b000 0x4>;
|
||||
clocks = <&rcc SAI2_K>;
|
||||
clock-names = "sai_ck";
|
||||
status = "disabled";
|
||||
};
|
||||
m4_sai3: sai@4400c000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x4400c000 0x4>;
|
||||
clocks = <&rcc SAI3_K>;
|
||||
clock-names = "sai_ck";
|
||||
status = "disabled";
|
||||
};
|
||||
m4_dfsdm: dfsdm@4400d000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x4400d000 0x800>;
|
||||
clocks = <&rcc DFSDM_K>, <&rcc ADFSDM_K>;
|
||||
clock-names = "dfsdm", "audio";
|
||||
status = "disabled";
|
||||
};
|
||||
m4_m_can1: can@4400e000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x4400e000 0x400>, <0x44011000 0x2800>;
|
||||
clocks = <&scmi0_clk CK_SCMI0_HSE>, <&rcc FDCAN_K>;
|
||||
clock-names = "hclk", "cclk";
|
||||
status = "disabled";
|
||||
};
|
||||
m4_m_can2: can@4400f000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x4400f000 0x400>, <0x44011000 0x2800>;
|
||||
clocks = <&scmi0_clk CK_SCMI0_HSE>, <&rcc FDCAN_K>;
|
||||
clock-names = "hclk", "cclk";
|
||||
status = "disabled";
|
||||
};
|
||||
m4_dma1: dma@48000000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x48000000 0x400>;
|
||||
clocks = <&rcc DMA1>;
|
||||
status = "disabled";
|
||||
};
|
||||
m4_dma2: dma@48001000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x48001000 0x400>;
|
||||
clocks = <&rcc DMA2>;
|
||||
status = "disabled";
|
||||
};
|
||||
m4_dmamux1: dma-router@48002000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x48002000 0x1c>;
|
||||
clocks = <&rcc DMAMUX>;
|
||||
status = "disabled";
|
||||
};
|
||||
m4_adc: adc@48003000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x48003000 0x400>;
|
||||
clocks = <&rcc ADC12>, <&rcc ADC12_K>;
|
||||
clock-names = "bus", "adc";
|
||||
status = "disabled";
|
||||
};
|
||||
m4_sdmmc3: sdmmc@48004000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x48004000 0x400>, <0x48005000 0x400>;
|
||||
clocks = <&rcc SDMMC3_K>;
|
||||
status = "disabled";
|
||||
};
|
||||
m4_usbotg_hs: usb-otg@49000000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x49000000 0x10000>;
|
||||
clocks = <&rcc USBO_K>;
|
||||
clock-names = "otg";
|
||||
status = "disabled";
|
||||
};
|
||||
m4_hash2: hash@4c002000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x4c002000 0x400>;
|
||||
clocks = <&rcc HASH2>;
|
||||
status = "disabled";
|
||||
};
|
||||
m4_rng2: rng@4c003000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x4c003000 0x400>;
|
||||
clocks = <&rcc RNG2_K>;
|
||||
status = "disabled";
|
||||
};
|
||||
m4_crc2: crc@4c004000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x4c004000 0x400>;
|
||||
clocks = <&rcc CRC2>;
|
||||
status = "disabled";
|
||||
};
|
||||
m4_cryp2: cryp@4c005000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x4c005000 0x400>;
|
||||
clocks = <&rcc CRYP2>;
|
||||
status = "disabled";
|
||||
};
|
||||
m4_dcmi: dcmi@4c006000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x4c006000 0x400>;
|
||||
clocks = <&rcc DCMI>;
|
||||
clock-names = "mclk";
|
||||
status = "disabled";
|
||||
};
|
||||
m4_lptimer2: timer@50021000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x50021000 0x400>;
|
||||
clocks = <&rcc LPTIM2_K>;
|
||||
clock-names = "mux";
|
||||
status = "disabled";
|
||||
};
|
||||
m4_lptimer3: timer@50022000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x50022000 0x400>;
|
||||
clocks = <&rcc LPTIM3_K>;
|
||||
clock-names = "mux";
|
||||
status = "disabled";
|
||||
};
|
||||
m4_lptimer4: timer@50023000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x50023000 0x400>;
|
||||
clocks = <&rcc LPTIM4_K>;
|
||||
clock-names = "mux";
|
||||
status = "disabled";
|
||||
};
|
||||
m4_lptimer5: timer@50024000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x50024000 0x400>;
|
||||
clocks = <&rcc LPTIM5_K>;
|
||||
clock-names = "mux";
|
||||
status = "disabled";
|
||||
};
|
||||
m4_sai4: sai@50027000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x50027000 0x4>;
|
||||
clocks = <&rcc SAI4_K>;
|
||||
clock-names = "sai_ck";
|
||||
status = "disabled";
|
||||
};
|
||||
m4_fmc: memory-controller@58002000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x5800200 0x1000>;
|
||||
clocks = <&rcc FMC_K>;
|
||||
status = "disabled";
|
||||
};
|
||||
m4_qspi: qspi@58003000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x58003000 0x1000>, <0x70000000 0x10000000>;
|
||||
clocks = <&rcc QSPI_K>;
|
||||
status = "disabled";
|
||||
};
|
||||
m4_ethernet0: ethernet@5800a000 {
|
||||
compatible = "rproc-srm-dev";
|
||||
reg = <0x5800a000 0x2000>;
|
||||
clock-names = "stmmaceth",
|
||||
"mac-clk-tx",
|
||||
"mac-clk-rx",
|
||||
"ethstp",
|
||||
"syscfg-clk";
|
||||
clocks = <&rcc ETHMAC>,
|
||||
<&rcc ETHTX>,
|
||||
<&rcc ETHRX>,
|
||||
<&rcc ETHSTP>,
|
||||
<&rcc SYSCFG>;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
153
arch/arm/dts/stm32mp15-no-scmi.dtsi
Normal file
153
arch/arm/dts/stm32mp15-no-scmi.dtsi
Normal file
@ -0,0 +1,153 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
|
||||
/*
|
||||
* Copyright (C) STMicroelectronics 2020 - All Rights Reserved
|
||||
* Author: Gabriel Fernandez <gabriel.fernandez@st.com> for STMicroelectronics.
|
||||
*/
|
||||
|
||||
/ {
|
||||
|
||||
clocks {
|
||||
clk_hse: clk-hse {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <24000000>;
|
||||
};
|
||||
|
||||
clk_hsi: clk-hsi {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <64000000>;
|
||||
};
|
||||
|
||||
clk_lse: clk-lse {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <32768>;
|
||||
};
|
||||
|
||||
clk_lsi: clk-lsi {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <32000>;
|
||||
};
|
||||
|
||||
clk_csi: clk-csi {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <4000000>;
|
||||
};
|
||||
};
|
||||
|
||||
cpus {
|
||||
cpu0: cpu@0 {
|
||||
clocks = <&rcc CK_MPU>;
|
||||
};
|
||||
|
||||
cpu1: cpu@1 {
|
||||
clocks = <&rcc CK_MPU>;
|
||||
};
|
||||
};
|
||||
|
||||
reboot {
|
||||
compatible = "syscon-reboot";
|
||||
regmap = <&rcc>;
|
||||
offset = <0x404>;
|
||||
mask = <0x1>;
|
||||
};
|
||||
|
||||
soc {
|
||||
m_can1: can@4400e000 {
|
||||
clocks = <&rcc CK_HSE>, <&rcc FDCAN_K>;
|
||||
};
|
||||
|
||||
m_can2: can@4400f000 {
|
||||
clocks = <&rcc CK_HSE>, <&rcc FDCAN_K>;
|
||||
};
|
||||
|
||||
cryp1: cryp@54001000 {
|
||||
clocks = <&rcc CRYP1>;
|
||||
resets = <&rcc CRYP1_R>;
|
||||
};
|
||||
|
||||
dsi: dsi@5a000000 {
|
||||
clocks = <&rcc DSI_K>, <&clk_hse>, <&rcc DSI_PX>;
|
||||
};
|
||||
};
|
||||
|
||||
ahb {
|
||||
m4_rproc: m4@10000000 {
|
||||
resets = <&rcc MCU_R>, <&rcc MCU_HOLD_BOOT_R>;
|
||||
|
||||
m4_system_resources {
|
||||
m4_m_can1: can@4400e000 {
|
||||
clocks = <&rcc CK_HSE>, <&rcc FDCAN_K>;
|
||||
};
|
||||
|
||||
m4_m_can2: can@4400f000 {
|
||||
clocks = <&rcc CK_HSE>, <&rcc FDCAN_K>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
firmware {
|
||||
/delete-node/ scmi0;
|
||||
/delete-node/ scmi1;
|
||||
};
|
||||
/delete-node/ sram@2ffff000;
|
||||
};
|
||||
|
||||
&bsec {
|
||||
clocks = <&rcc BSEC>;
|
||||
};
|
||||
|
||||
&gpioz {
|
||||
clocks = <&rcc GPIOZ>;
|
||||
};
|
||||
|
||||
&hash1 {
|
||||
clocks = <&rcc HASH1>;
|
||||
resets = <&rcc HASH1_R>;
|
||||
};
|
||||
|
||||
&i2c4 {
|
||||
clocks = <&rcc I2C4_K>;
|
||||
resets = <&rcc I2C4_R>;
|
||||
};
|
||||
|
||||
&i2c6 {
|
||||
clocks = <&rcc I2C6_K>;
|
||||
resets = <&rcc I2C6_R>;
|
||||
};
|
||||
|
||||
&iwdg2 {
|
||||
clocks = <&rcc IWDG2>, <&rcc CK_LSI>;
|
||||
};
|
||||
|
||||
&mdma1 {
|
||||
clocks = <&rcc MDMA>;
|
||||
resets = <&rcc MDMA_R>;
|
||||
};
|
||||
|
||||
&rcc {
|
||||
compatible = "st,stm32mp1-rcc", "syscon";
|
||||
clocks = <&clk_hse>, <&clk_hsi>, <&clk_csi>, <&clk_lse>, <&clk_lsi>;
|
||||
};
|
||||
|
||||
&rng1 {
|
||||
clocks = <&rcc RNG1_K>;
|
||||
resets = <&rcc RNG1_R>;
|
||||
};
|
||||
|
||||
&rtc {
|
||||
clocks = <&rcc RTCAPB>, <&rcc RTC>;
|
||||
};
|
||||
|
||||
&spi6 {
|
||||
clocks = <&rcc SPI6_K>;
|
||||
resets = <&rcc SPI6_R>;
|
||||
};
|
||||
|
||||
&usart1 {
|
||||
clocks = <&rcc USART1_K>;
|
||||
};
|
||||
@ -118,6 +118,45 @@
|
||||
};
|
||||
};
|
||||
|
||||
dfsdm_clkout_pins_a: dfsdm-clkout-pins-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('B', 13, AF3)>; /* DFSDM_CKOUT */
|
||||
bias-disable;
|
||||
drive-push-pull;
|
||||
slew-rate = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
dfsdm_clkout_sleep_pins_a: dfsdm-clkout-sleep-pins-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('B', 13, ANALOG)>; /* DFSDM_CKOUT */
|
||||
};
|
||||
};
|
||||
|
||||
dfsdm_data1_pins_a: dfsdm-data1-pins-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('C', 3, AF3)>; /* DFSDM_DATA1 */
|
||||
};
|
||||
};
|
||||
|
||||
dfsdm_data1_sleep_pins_a: dfsdm-data1-sleep-pins-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('C', 3, ANALOG)>; /* DFSDM_DATA1 */
|
||||
};
|
||||
};
|
||||
|
||||
dfsdm_data3_pins_a: dfsdm-data3-pins-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('F', 13, AF6)>; /* DFSDM_DATA3 */
|
||||
};
|
||||
};
|
||||
|
||||
dfsdm_data3_sleep_pins_a: dfsdm-data3-sleep-pins-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('F', 13, ANALOG)>; /* DFSDM_DATA3 */
|
||||
};
|
||||
};
|
||||
|
||||
ethernet0_rgmii_pins_a: rgmii-0 {
|
||||
pins1 {
|
||||
pinmux = <STM32_PINMUX('G', 5, AF11)>, /* ETH_RGMII_CLK125 */
|
||||
@ -349,6 +388,51 @@
|
||||
};
|
||||
};
|
||||
|
||||
hdp0_pins_a: hdp0-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('I', 12, AF2)>; /* HDP0 */
|
||||
bias-disable;
|
||||
drive-push-pull;
|
||||
slew-rate = <2>;
|
||||
};
|
||||
};
|
||||
|
||||
hdp0_pins_sleep_a: hdp0-sleep-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('I', 12, ANALOG)>; /* HDP0 */
|
||||
};
|
||||
};
|
||||
|
||||
hdp6_pins_a: hdp6-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('K', 5, AF2)>; /* HDP6 */
|
||||
bias-disable;
|
||||
drive-push-pull;
|
||||
slew-rate = <2>;
|
||||
};
|
||||
};
|
||||
|
||||
hdp6_pins_sleep_a: hdp6-sleep-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('K', 5, ANALOG)>; /* HDP6 */
|
||||
};
|
||||
};
|
||||
|
||||
hdp7_pins_a: hdp7-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('K', 6, AF2)>; /* HDP7 */
|
||||
bias-disable;
|
||||
drive-push-pull;
|
||||
slew-rate = <2>;
|
||||
};
|
||||
};
|
||||
|
||||
hdp7_pins_sleep_a: hdp7-sleep-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('K', 6, ANALOG)>; /* HDP7 */
|
||||
};
|
||||
};
|
||||
|
||||
i2c1_pins_a: i2c1-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('D', 12, AF5)>, /* I2C1_SCL */
|
||||
@ -1051,6 +1135,12 @@
|
||||
};
|
||||
};
|
||||
|
||||
rtc_out2_rmp_pins_a: rtc-out2-rmp-pins-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('I', 8, ANALOG)>; /* RTC_OUT2_RMP */
|
||||
};
|
||||
};
|
||||
|
||||
sai2a_pins_a: sai2a-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('I', 5, AF10)>, /* SAI2_SCK_A */
|
||||
@ -1147,7 +1237,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
sai2b_pins_c: sai2a-4 {
|
||||
sai2b_pins_c: sai2b-4 {
|
||||
pins1 {
|
||||
pinmux = <STM32_PINMUX('F', 11, AF10)>; /* SAI2_SD_B */
|
||||
bias-disable;
|
||||
@ -1437,6 +1527,24 @@
|
||||
};
|
||||
};
|
||||
|
||||
sdmmc2_d47_pins_d: sdmmc2-d47-3 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('A', 8, AF9)>, /* SDMMC2_D4 */
|
||||
<STM32_PINMUX('A', 9, AF10)>, /* SDMMC2_D5 */
|
||||
<STM32_PINMUX('E', 5, AF9)>, /* SDMMC2_D6 */
|
||||
<STM32_PINMUX('C', 7, AF10)>; /* SDMMC2_D7 */
|
||||
};
|
||||
};
|
||||
|
||||
sdmmc2_d47_sleep_pins_d: sdmmc2-d47-sleep-3 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('A', 8, ANALOG)>, /* SDMMC2_D4 */
|
||||
<STM32_PINMUX('A', 9, ANALOG)>, /* SDMMC2_D5 */
|
||||
<STM32_PINMUX('E', 5, ANALOG)>, /* SDMMC2_D6 */
|
||||
<STM32_PINMUX('C', 7, ANALOG)>; /* SDMMC2_D7 */
|
||||
};
|
||||
};
|
||||
|
||||
sdmmc3_b4_pins_a: sdmmc3-b4-0 {
|
||||
pins1 {
|
||||
pinmux = <STM32_PINMUX('F', 0, AF9)>, /* SDMMC3_D0 */
|
||||
@ -1573,10 +1681,205 @@
|
||||
};
|
||||
};
|
||||
|
||||
spi4_pins_a: spi4-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('E', 12, AF5)>, /* SPI4_SCK */
|
||||
<STM32_PINMUX('E', 6, AF5)>; /* SPI4_MOSI */
|
||||
bias-disable;
|
||||
drive-push-pull;
|
||||
slew-rate = <1>;
|
||||
};
|
||||
pins2 {
|
||||
pinmux = <STM32_PINMUX('E', 13, AF5)>; /* SPI4_MISO */
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
spi4_pins_b: spi4-1 {
|
||||
pins1 {
|
||||
pinmux = <STM32_PINMUX('E', 12, AF5)>, /* SPI4_SCK */
|
||||
<STM32_PINMUX('E', 14, AF5)>; /* SPI4_MOSI */
|
||||
bias-disable;
|
||||
drive-push-pull;
|
||||
slew-rate = <1>;
|
||||
};
|
||||
|
||||
pins2 {
|
||||
pinmux = <STM32_PINMUX('E', 13, AF5)>; /* SPI4_MISO */
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
spi4_sleep_pins_b: spi4-sleep-1 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('E', 12, ANALOG)>, /* SPI4_SCK */
|
||||
<STM32_PINMUX('E', 13, ANALOG)>, /* SPI4_MISO */
|
||||
<STM32_PINMUX('E', 14, ANALOG)>; /* SPI4_MOSI */
|
||||
};
|
||||
};
|
||||
|
||||
spi5_pins_a: spi5-0 {
|
||||
pins1 {
|
||||
pinmux = <STM32_PINMUX('F', 7, AF5)>, /* SPI5_SCK */
|
||||
<STM32_PINMUX('F', 9, AF5)>; /* SPI5_MOSI */
|
||||
bias-disable;
|
||||
drive-push-pull;
|
||||
slew-rate = <1>;
|
||||
};
|
||||
|
||||
pins2 {
|
||||
pinmux = <STM32_PINMUX('F', 8, AF5)>; /* SPI5_MISO */
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
spi5_sleep_pins_a: spi5-sleep-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('F', 7, ANALOG)>, /* SPI5_SCK */
|
||||
<STM32_PINMUX('F', 8, ANALOG)>, /* SPI5_MISO */
|
||||
<STM32_PINMUX('F', 9, ANALOG)>; /* SPI5_MOSI */
|
||||
};
|
||||
};
|
||||
|
||||
stusb1600_pins_a: stusb1600-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('I', 11, ANALOG)>;
|
||||
bias-pull-up;
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('I', 11, ANALOG)>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
uart4_pins_a: uart4-0 {
|
||||
pins1 {
|
||||
pinmux = <STM32_PINMUX('G', 11, AF6)>; /* UART4_TX */
|
||||
bias-disable;
|
||||
drive-push-pull;
|
||||
slew-rate = <0>;
|
||||
};
|
||||
pins2 {
|
||||
pinmux = <STM32_PINMUX('B', 2, AF8)>; /* UART4_RX */
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
uart4_idle_pins_a: uart4-idle-0 {
|
||||
pins1 {
|
||||
pinmux = <STM32_PINMUX('G', 11, ANALOG)>; /* UART4_TX */
|
||||
};
|
||||
pins2 {
|
||||
pinmux = <STM32_PINMUX('B', 2, AF8)>; /* UART4_RX */
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
uart4_sleep_pins_a: uart4-sleep-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('G', 11, ANALOG)>, /* UART4_TX */
|
||||
<STM32_PINMUX('B', 2, ANALOG)>; /* UART4_RX */
|
||||
};
|
||||
};
|
||||
|
||||
uart4_pins_b: uart4-1 {
|
||||
pins1 {
|
||||
pinmux = <STM32_PINMUX('D', 1, AF8)>; /* UART4_TX */
|
||||
bias-disable;
|
||||
drive-push-pull;
|
||||
slew-rate = <0>;
|
||||
};
|
||||
pins2 {
|
||||
pinmux = <STM32_PINMUX('B', 2, AF8)>; /* UART4_RX */
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
uart4_pins_c: uart4-2 {
|
||||
pins1 {
|
||||
pinmux = <STM32_PINMUX('G', 11, AF6)>; /* UART4_TX */
|
||||
bias-disable;
|
||||
drive-push-pull;
|
||||
slew-rate = <0>;
|
||||
};
|
||||
pins2 {
|
||||
pinmux = <STM32_PINMUX('B', 2, AF8)>; /* UART4_RX */
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
uart7_pins_a: uart7-0 {
|
||||
pins1 {
|
||||
pinmux = <STM32_PINMUX('E', 8, AF7)>; /* UART7_TX */
|
||||
bias-disable;
|
||||
drive-push-pull;
|
||||
slew-rate = <0>;
|
||||
};
|
||||
pins2 {
|
||||
pinmux = <STM32_PINMUX('E', 7, AF7)>, /* UART7_RX */
|
||||
<STM32_PINMUX('E', 10, AF7)>, /* UART7_CTS */
|
||||
<STM32_PINMUX('E', 9, AF7)>; /* UART7_RTS */
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
uart7_pins_b: uart7-1 {
|
||||
pins1 {
|
||||
pinmux = <STM32_PINMUX('F', 7, AF7)>; /* UART7_TX */
|
||||
bias-disable;
|
||||
drive-push-pull;
|
||||
slew-rate = <0>;
|
||||
};
|
||||
pins2 {
|
||||
pinmux = <STM32_PINMUX('F', 6, AF7)>; /* UART7_RX */
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
uart7_pins_c: uart7-2 {
|
||||
pins1 {
|
||||
pinmux = <STM32_PINMUX('E', 8, AF7)>; /* UART7_TX */
|
||||
bias-disable;
|
||||
drive-push-pull;
|
||||
slew-rate = <0>;
|
||||
};
|
||||
pins2 {
|
||||
pinmux = <STM32_PINMUX('E', 7, AF7)>; /* UART7_RX */
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
uart7_idle_pins_c: uart7-idle-2 {
|
||||
pins1 {
|
||||
pinmux = <STM32_PINMUX('E', 8, ANALOG)>; /* UART7_TX */
|
||||
};
|
||||
pins2 {
|
||||
pinmux = <STM32_PINMUX('E', 7, AF7)>; /* UART7_RX */
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
uart7_sleep_pins_c: uart7-sleep-2 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('E', 8, ANALOG)>, /* UART7_TX */
|
||||
<STM32_PINMUX('E', 7, ANALOG)>; /* UART7_RX */
|
||||
};
|
||||
};
|
||||
|
||||
uart8_pins_a: uart8-0 {
|
||||
pins1 {
|
||||
pinmux = <STM32_PINMUX('E', 1, AF8)>; /* UART8_TX */
|
||||
bias-disable;
|
||||
drive-push-pull;
|
||||
slew-rate = <0>;
|
||||
};
|
||||
pins2 {
|
||||
pinmux = <STM32_PINMUX('E', 0, AF8)>; /* UART8_RX */
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
uart8_rtscts_pins_a: uart8rtscts-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('G', 7, AF8)>, /* UART8_RTS */
|
||||
<STM32_PINMUX('G', 10, AF8)>; /* UART8_CTS */
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
@ -1628,6 +1931,47 @@
|
||||
};
|
||||
};
|
||||
|
||||
usart2_pins_c: usart2-2 {
|
||||
pins1 {
|
||||
pinmux = <STM32_PINMUX('D', 5, AF7)>, /* USART2_TX */
|
||||
<STM32_PINMUX('D', 4, AF7)>; /* USART2_RTS */
|
||||
bias-disable;
|
||||
drive-push-pull;
|
||||
slew-rate = <0>;
|
||||
};
|
||||
pins2 {
|
||||
pinmux = <STM32_PINMUX('D', 6, AF7)>, /* USART2_RX */
|
||||
<STM32_PINMUX('D', 3, AF7)>; /* USART2_CTS_NSS */
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
usart2_idle_pins_c: usart2-idle-2 {
|
||||
pins1 {
|
||||
pinmux = <STM32_PINMUX('D', 5, ANALOG)>, /* USART2_TX */
|
||||
<STM32_PINMUX('D', 3, ANALOG)>; /* USART2_CTS_NSS */
|
||||
};
|
||||
pins2 {
|
||||
pinmux = <STM32_PINMUX('D', 4, AF7)>; /* USART2_RTS */
|
||||
bias-disable;
|
||||
drive-push-pull;
|
||||
slew-rate = <0>;
|
||||
};
|
||||
pins3 {
|
||||
pinmux = <STM32_PINMUX('D', 6, AF7)>; /* USART2_RX */
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
usart2_sleep_pins_c: usart2-sleep-2 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('D', 5, ANALOG)>, /* USART2_TX */
|
||||
<STM32_PINMUX('D', 4, ANALOG)>, /* USART2_RTS */
|
||||
<STM32_PINMUX('D', 6, ANALOG)>, /* USART2_RX */
|
||||
<STM32_PINMUX('D', 3, ANALOG)>; /* USART2_CTS_NSS */
|
||||
};
|
||||
};
|
||||
|
||||
usart3_pins_a: usart3-0 {
|
||||
pins1 {
|
||||
pinmux = <STM32_PINMUX('B', 10, AF7)>; /* USART3_TX */
|
||||
@ -1641,83 +1985,85 @@
|
||||
};
|
||||
};
|
||||
|
||||
uart4_pins_a: uart4-0 {
|
||||
usart3_pins_b: usart3-1 {
|
||||
pins1 {
|
||||
pinmux = <STM32_PINMUX('G', 11, AF6)>; /* UART4_TX */
|
||||
pinmux = <STM32_PINMUX('B', 10, AF7)>, /* USART3_TX */
|
||||
<STM32_PINMUX('G', 8, AF8)>; /* USART3_RTS */
|
||||
bias-disable;
|
||||
drive-push-pull;
|
||||
slew-rate = <0>;
|
||||
};
|
||||
pins2 {
|
||||
pinmux = <STM32_PINMUX('B', 2, AF8)>; /* UART4_RX */
|
||||
pinmux = <STM32_PINMUX('B', 12, AF8)>, /* USART3_RX */
|
||||
<STM32_PINMUX('I', 10, AF8)>; /* USART3_CTS_NSS */
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
uart4_pins_b: uart4-1 {
|
||||
usart3_idle_pins_b: usart3-idle-1 {
|
||||
pins1 {
|
||||
pinmux = <STM32_PINMUX('D', 1, AF8)>; /* UART4_TX */
|
||||
pinmux = <STM32_PINMUX('B', 10, ANALOG)>, /* USART3_TX */
|
||||
<STM32_PINMUX('I', 10, ANALOG)>; /* USART3_CTS_NSS */
|
||||
};
|
||||
pins2 {
|
||||
pinmux = <STM32_PINMUX('G', 8, AF8)>; /* USART3_RTS */
|
||||
bias-disable;
|
||||
drive-push-pull;
|
||||
slew-rate = <0>;
|
||||
};
|
||||
pins2 {
|
||||
pinmux = <STM32_PINMUX('B', 2, AF8)>; /* UART4_RX */
|
||||
pins3 {
|
||||
pinmux = <STM32_PINMUX('B', 12, AF8)>; /* USART3_RX */
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
uart4_pins_c: uart4-2 {
|
||||
pins1 {
|
||||
pinmux = <STM32_PINMUX('G', 11, AF6)>; /* UART4_TX */
|
||||
bias-disable;
|
||||
drive-push-pull;
|
||||
slew-rate = <0>;
|
||||
};
|
||||
pins2 {
|
||||
pinmux = <STM32_PINMUX('B', 2, AF8)>; /* UART4_RX */
|
||||
bias-disable;
|
||||
usart3_sleep_pins_b: usart3-sleep-1 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('B', 10, ANALOG)>, /* USART3_TX */
|
||||
<STM32_PINMUX('G', 8, ANALOG)>, /* USART3_RTS */
|
||||
<STM32_PINMUX('I', 10, ANALOG)>, /* USART3_CTS_NSS */
|
||||
<STM32_PINMUX('B', 12, ANALOG)>; /* USART3_RX */
|
||||
};
|
||||
};
|
||||
|
||||
uart7_pins_a: uart7-0 {
|
||||
usart3_pins_c: usart3-2 {
|
||||
pins1 {
|
||||
pinmux = <STM32_PINMUX('E', 8, AF7)>; /* UART4_TX */
|
||||
pinmux = <STM32_PINMUX('B', 10, AF7)>, /* USART3_TX */
|
||||
<STM32_PINMUX('G', 8, AF8)>; /* USART3_RTS */
|
||||
bias-disable;
|
||||
drive-push-pull;
|
||||
slew-rate = <0>;
|
||||
};
|
||||
pins2 {
|
||||
pinmux = <STM32_PINMUX('E', 7, AF7)>, /* UART4_RX */
|
||||
<STM32_PINMUX('E', 10, AF7)>, /* UART4_CTS */
|
||||
<STM32_PINMUX('E', 9, AF7)>; /* UART4_RTS */
|
||||
bias-disable;
|
||||
pinmux = <STM32_PINMUX('B', 12, AF8)>, /* USART3_RX */
|
||||
<STM32_PINMUX('B', 13, AF7)>; /* USART3_CTS_NSS */
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
uart7_pins_b: uart7-1 {
|
||||
usart3_idle_pins_c: usart3-idle-2 {
|
||||
pins1 {
|
||||
pinmux = <STM32_PINMUX('F', 7, AF7)>; /* UART7_TX */
|
||||
pinmux = <STM32_PINMUX('B', 10, ANALOG)>, /* USART3_TX */
|
||||
<STM32_PINMUX('B', 13, ANALOG)>; /* USART3_CTS_NSS */
|
||||
};
|
||||
pins2 {
|
||||
pinmux = <STM32_PINMUX('G', 8, AF8)>; /* USART3_RTS */
|
||||
bias-disable;
|
||||
drive-push-pull;
|
||||
slew-rate = <0>;
|
||||
};
|
||||
pins2 {
|
||||
pinmux = <STM32_PINMUX('F', 6, AF7)>; /* UART7_RX */
|
||||
bias-disable;
|
||||
pins3 {
|
||||
pinmux = <STM32_PINMUX('B', 12, AF8)>; /* USART3_RX */
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
uart8_pins_a: uart8-0 {
|
||||
pins1 {
|
||||
pinmux = <STM32_PINMUX('E', 1, AF8)>; /* UART8_TX */
|
||||
bias-disable;
|
||||
drive-push-pull;
|
||||
slew-rate = <0>;
|
||||
};
|
||||
pins2 {
|
||||
pinmux = <STM32_PINMUX('E', 0, AF8)>; /* UART8_RX */
|
||||
bias-disable;
|
||||
usart3_sleep_pins_c: usart3-sleep-2 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('B', 10, ANALOG)>, /* USART3_TX */
|
||||
<STM32_PINMUX('G', 8, ANALOG)>, /* USART3_RTS */
|
||||
<STM32_PINMUX('B', 13, ANALOG)>, /* USART3_CTS_NSS */
|
||||
<STM32_PINMUX('B', 12, ANALOG)>; /* USART3_RX */
|
||||
};
|
||||
};
|
||||
|
||||
@ -1783,17 +2129,11 @@
|
||||
};
|
||||
};
|
||||
|
||||
spi4_pins_a: spi4-0 {
|
||||
spi1_sleep_pins_a: spi1-sleep-0 {
|
||||
pins {
|
||||
pinmux = <STM32_PINMUX('E', 12, AF5)>, /* SPI4_SCK */
|
||||
<STM32_PINMUX('E', 6, AF5)>; /* SPI4_MOSI */
|
||||
bias-disable;
|
||||
drive-push-pull;
|
||||
slew-rate = <1>;
|
||||
};
|
||||
pins2 {
|
||||
pinmux = <STM32_PINMUX('E', 13, AF5)>; /* SPI4_MISO */
|
||||
bias-disable;
|
||||
pinmux = <STM32_PINMUX('Z', 0, ANALOG)>, /* SPI1_SCK */
|
||||
<STM32_PINMUX('Z', 1, ANALOG)>, /* SPI1_MISO */
|
||||
<STM32_PINMUX('Z', 2, ANALOG)>; /* SPI1_MOSI */
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@ -21,23 +21,11 @@
|
||||
pinctrl1 = &pinctrl_z;
|
||||
};
|
||||
|
||||
clocks {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
/* need PSCI for sysreset during board_f */
|
||||
psci {
|
||||
u-boot,dm-pre-proper;
|
||||
};
|
||||
|
||||
reboot {
|
||||
u-boot,dm-pre-reloc;
|
||||
compatible = "syscon-reboot";
|
||||
regmap = <&rcc>;
|
||||
offset = <0x404>;
|
||||
mask = <0x1>;
|
||||
};
|
||||
|
||||
soc {
|
||||
u-boot,dm-pre-reloc;
|
||||
|
||||
@ -72,36 +60,6 @@
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&clk_csi {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&clk_hsi {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&clk_hse {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&clk_lsi {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&clk_lse {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&cpu0_opp_table {
|
||||
u-boot,dm-spl;
|
||||
opp-650000000 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
opp-800000000 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
};
|
||||
|
||||
&gpioa {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
@ -167,16 +125,44 @@
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&pwr_regulators {
|
||||
&rcc {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&rcc {
|
||||
#ifdef CONFIG_TFABOOT
|
||||
&scmi0 {
|
||||
u-boot,dm-pre-reloc;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
|
||||
&scmi0_clk {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&scmi0_reset {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&scmi0_shm {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&scmi1 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&scmi1_clk {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&scmi1_shm {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&scmi_sram {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
#endif
|
||||
|
||||
&sdmmc1 {
|
||||
compatible = "st,stm32-sdmmc2", "arm,pl18x", "arm,primecell";
|
||||
};
|
||||
@ -190,7 +176,7 @@
|
||||
};
|
||||
|
||||
&usart1 {
|
||||
resets = <&rcc USART1_R>;
|
||||
resets = <&scmi0_reset RST_SCMI0_USART1>;
|
||||
};
|
||||
|
||||
&usart2 {
|
||||
@ -221,6 +207,63 @@
|
||||
resets = <&rcc UART8_R>;
|
||||
};
|
||||
|
||||
&usbotg_hs {
|
||||
compatible = "st,stm32mp1-hsotg", "snps,dwc2";
|
||||
/* NO MORE USE SCMI SUPPORT for BASIC boot chain */
|
||||
#ifndef CONFIG_TFABOOT
|
||||
|
||||
#include "stm32mp15-no-scmi.dtsi"
|
||||
|
||||
/ {
|
||||
clocks {
|
||||
u-boot,dm-pre-reloc;
|
||||
|
||||
clk_hse: clk-hse {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
clk_hsi: clk-hsi {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
clk_lse: clk-lse {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
clk_lsi: clk-lsi {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
clk_csi: clk-csi {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
};
|
||||
|
||||
reboot {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
};
|
||||
|
||||
&cpu0_opp_table {
|
||||
u-boot,dm-spl;
|
||||
opp-650000000 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
opp-800000000 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
};
|
||||
|
||||
/* only for vdd-supply in sysconf_init() */
|
||||
&pwr_regulators {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&rcc {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
|
||||
&usart1 {
|
||||
resets = <&rcc USART1_R>;
|
||||
};
|
||||
|
||||
#endif /* CONFIG_TFABOOT */
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -10,12 +10,20 @@
|
||||
cpus {
|
||||
cpu1: cpu@1 {
|
||||
compatible = "arm,cortex-a7";
|
||||
clock-frequency = <650000000>;
|
||||
device_type = "cpu";
|
||||
reg = <1>;
|
||||
clocks = <&scmi0_clk CK_SCMI0_MPU>;
|
||||
clock-names = "cpu";
|
||||
operating-points-v2 = <&cpu0_opp_table>;
|
||||
};
|
||||
};
|
||||
|
||||
arm-pmu {
|
||||
interrupts = <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-affinity = <&cpu0>, <&cpu1>;
|
||||
};
|
||||
|
||||
soc {
|
||||
m_can1: can@4400e000 {
|
||||
compatible = "bosch,m_can";
|
||||
@ -24,7 +32,7 @@
|
||||
interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "int0", "int1";
|
||||
clocks = <&rcc CK_HSE>, <&rcc FDCAN_K>;
|
||||
clocks = <&scmi0_clk CK_SCMI0_HSE>, <&rcc FDCAN_K>;
|
||||
clock-names = "hclk", "cclk";
|
||||
bosch,mram-cfg = <0x0 0 0 32 0 0 2 2>;
|
||||
status = "disabled";
|
||||
@ -37,7 +45,7 @@
|
||||
interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "int0", "int1";
|
||||
clocks = <&rcc CK_HSE>, <&rcc FDCAN_K>;
|
||||
clocks = <&scmi0_clk CK_SCMI0_HSE>, <&rcc FDCAN_K>;
|
||||
clock-names = "hclk", "cclk";
|
||||
bosch,mram-cfg = <0x1400 0 0 32 0 0 2 2>;
|
||||
status = "disabled";
|
||||
|
||||
@ -20,7 +20,8 @@
|
||||
dsi: dsi@5a000000 {
|
||||
compatible = "st,stm32-dsi";
|
||||
reg = <0x5a000000 0x800>;
|
||||
clocks = <&rcc DSI_K>, <&clk_hse>, <&rcc DSI_PX>;
|
||||
phy-dsi-supply = <®18>;
|
||||
clocks = <&rcc DSI_K>, <&scmi0_clk CK_SCMI0_HSE>, <&rcc DSI_PX>;
|
||||
clock-names = "pclk", "ref", "px_clk";
|
||||
resets = <&rcc DSI_R>;
|
||||
reset-names = "apb";
|
||||
|
||||
@ -16,12 +16,18 @@
|
||||
config {
|
||||
u-boot,boot-led = "heartbeat";
|
||||
u-boot,error-led = "error";
|
||||
u-boot,mmc-env-partition = "ssbl";
|
||||
u-boot,mmc-env-partition = "fip";
|
||||
st,adc_usb_pd = <&adc1 18>, <&adc1 19>;
|
||||
st,fastboot-gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
|
||||
st,stm32prog-gpios = <&gpioa 14 GPIO_ACTIVE_LOW>;
|
||||
st,fastboot-gpios = <&gpioa 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
st,stm32prog-gpios = <&gpioa 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_STM32MP15x_STM32IMAGE
|
||||
config {
|
||||
u-boot,mmc-env-partition = "ssbl";
|
||||
};
|
||||
|
||||
/* only needed for boot with TF-A, witout FIP support */
|
||||
firmware {
|
||||
optee {
|
||||
compatible = "linaro,optee-tz";
|
||||
@ -35,9 +41,10 @@
|
||||
no-map;
|
||||
};
|
||||
};
|
||||
#endif
|
||||
|
||||
led {
|
||||
red {
|
||||
led-red {
|
||||
label = "error";
|
||||
gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
|
||||
default-state = "off";
|
||||
@ -50,6 +57,7 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
#ifndef CONFIG_TFABOOT
|
||||
&clk_hse {
|
||||
st,digbypass;
|
||||
};
|
||||
@ -65,6 +73,10 @@
|
||||
};
|
||||
};
|
||||
|
||||
&i2s2 {
|
||||
clocks = <&rcc SPI2>, <&rcc SPI2_K>, <&rcc PLL3_Q>, <&rcc PLL3_R>;
|
||||
};
|
||||
|
||||
&pmic {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
@ -161,6 +173,10 @@
|
||||
};
|
||||
};
|
||||
|
||||
&sai2 {
|
||||
clocks = <&rcc SAI2>, <&rcc PLL3_Q>, <&rcc PLL3_R>;
|
||||
};
|
||||
|
||||
&sdmmc1 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
@ -174,6 +190,7 @@
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
};
|
||||
#endif
|
||||
|
||||
&uart4 {
|
||||
u-boot,dm-pre-reloc;
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
/dts-v1/;
|
||||
|
||||
#include "stm32mp157.dtsi"
|
||||
#include "stm32mp15xa.dtsi"
|
||||
#include "stm32mp15-pinctrl.dtsi"
|
||||
#include "stm32mp15xxac-pinctrl.dtsi"
|
||||
#include "stm32mp15xx-dkx.dtsi"
|
||||
@ -15,11 +16,6 @@
|
||||
model = "STMicroelectronics STM32MP157A-DK1 Discovery Board";
|
||||
compatible = "st,stm32mp157a-dk1", "st,stm32mp157";
|
||||
|
||||
aliases {
|
||||
ethernet0 = ðernet0;
|
||||
serial0 = &uart4;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
228
arch/arm/dts/stm32mp157a-ed1-u-boot.dtsi
Normal file
228
arch/arm/dts/stm32mp157a-ed1-u-boot.dtsi
Normal file
@ -0,0 +1,228 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright : STMicroelectronics 2018
|
||||
*/
|
||||
|
||||
#include <dt-bindings/clock/stm32mp1-clksrc.h>
|
||||
#include "stm32mp15-u-boot.dtsi"
|
||||
#include "stm32mp15-ddr3-2x4Gb-1066-binG.dtsi"
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
i2c3 = &i2c4;
|
||||
mmc0 = &sdmmc1;
|
||||
mmc1 = &sdmmc2;
|
||||
};
|
||||
|
||||
config {
|
||||
u-boot,boot-led = "heartbeat";
|
||||
u-boot,error-led = "error";
|
||||
u-boot,mmc-env-partition = "fip";
|
||||
st,fastboot-gpios = <&gpioa 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
st,stm32prog-gpios = <&gpioa 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
};
|
||||
|
||||
led {
|
||||
led-red {
|
||||
label = "error";
|
||||
gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
|
||||
default-state = "off";
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
#ifdef CONFIG_STM32MP15x_STM32IMAGE
|
||||
config {
|
||||
u-boot,mmc-env-partition = "ssbl";
|
||||
};
|
||||
|
||||
/* only needed for boot with TF-A, witout FIP support */
|
||||
firmware {
|
||||
optee {
|
||||
compatible = "linaro,optee-tz";
|
||||
method = "smc";
|
||||
};
|
||||
};
|
||||
|
||||
reserved-memory {
|
||||
optee@fe000000 {
|
||||
reg = <0xfe000000 0x02000000>;
|
||||
no-map;
|
||||
};
|
||||
};
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifndef CONFIG_TFABOOT
|
||||
&clk_hse {
|
||||
st,digbypass;
|
||||
};
|
||||
|
||||
&i2c4 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&i2c4_pins_a {
|
||||
u-boot,dm-pre-reloc;
|
||||
pins {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
};
|
||||
|
||||
&pmic {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&rcc {
|
||||
st,clksrc = <
|
||||
CLK_MPU_PLL1P
|
||||
CLK_AXI_PLL2P
|
||||
CLK_MCU_PLL3P
|
||||
CLK_PLL12_HSE
|
||||
CLK_PLL3_HSE
|
||||
CLK_PLL4_HSE
|
||||
CLK_RTC_LSE
|
||||
CLK_MCO1_DISABLED
|
||||
CLK_MCO2_DISABLED
|
||||
>;
|
||||
|
||||
st,clkdiv = <
|
||||
1 /*MPU*/
|
||||
0 /*AXI*/
|
||||
0 /*MCU*/
|
||||
1 /*APB1*/
|
||||
1 /*APB2*/
|
||||
1 /*APB3*/
|
||||
1 /*APB4*/
|
||||
2 /*APB5*/
|
||||
23 /*RTC*/
|
||||
0 /*MCO1*/
|
||||
0 /*MCO2*/
|
||||
>;
|
||||
|
||||
st,pkcs = <
|
||||
CLK_CKPER_HSE
|
||||
CLK_FMC_ACLK
|
||||
CLK_QSPI_ACLK
|
||||
CLK_ETH_DISABLED
|
||||
CLK_SDMMC12_PLL4P
|
||||
CLK_DSI_DSIPLL
|
||||
CLK_STGEN_HSE
|
||||
CLK_USBPHY_HSE
|
||||
CLK_SPI2S1_PLL3Q
|
||||
CLK_SPI2S23_PLL3Q
|
||||
CLK_SPI45_HSI
|
||||
CLK_SPI6_HSI
|
||||
CLK_I2C46_HSI
|
||||
CLK_SDMMC3_PLL4P
|
||||
CLK_USBO_USBPHY
|
||||
CLK_ADC_CKPER
|
||||
CLK_CEC_LSE
|
||||
CLK_I2C12_HSI
|
||||
CLK_I2C35_HSI
|
||||
CLK_UART1_HSI
|
||||
CLK_UART24_HSI
|
||||
CLK_UART35_HSI
|
||||
CLK_UART6_HSI
|
||||
CLK_UART78_HSI
|
||||
CLK_SPDIF_PLL4P
|
||||
CLK_FDCAN_PLL4R
|
||||
CLK_SAI1_PLL3Q
|
||||
CLK_SAI2_PLL3Q
|
||||
CLK_SAI3_PLL3Q
|
||||
CLK_SAI4_PLL3Q
|
||||
CLK_RNG1_LSI
|
||||
CLK_RNG2_LSI
|
||||
CLK_LPTIM1_PCLK1
|
||||
CLK_LPTIM23_PCLK3
|
||||
CLK_LPTIM45_LSE
|
||||
>;
|
||||
|
||||
/* VCO = 1066.0 MHz => P = 266 (AXI), Q = 533 (GPU), R = 533 (DDR) */
|
||||
pll2: st,pll@1 {
|
||||
compatible = "st,stm32mp1-pll";
|
||||
reg = <1>;
|
||||
cfg = < 2 65 1 0 0 PQR(1,1,1) >;
|
||||
frac = < 0x1400 >;
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
/* VCO = 417.8 MHz => P = 209, Q = 24, R = 11 */
|
||||
pll3: st,pll@2 {
|
||||
compatible = "st,stm32mp1-pll";
|
||||
reg = <2>;
|
||||
cfg = < 1 33 1 16 36 PQR(1,1,1) >;
|
||||
frac = < 0x1a04 >;
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
/* VCO = 594.0 MHz => P = 99, Q = 74, R = 74 */
|
||||
pll4: st,pll@3 {
|
||||
compatible = "st,stm32mp1-pll";
|
||||
reg = <3>;
|
||||
cfg = < 3 98 5 7 7 PQR(1,1,1) >;
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
};
|
||||
|
||||
&sdmmc1 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
|
||||
&sdmmc1_b4_pins_a {
|
||||
u-boot,dm-spl;
|
||||
pins1 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
pins2 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
};
|
||||
|
||||
&sdmmc1_dir_pins_a {
|
||||
u-boot,dm-spl;
|
||||
pins1 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
pins2 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
};
|
||||
|
||||
&sdmmc2 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
|
||||
&sdmmc2_b4_pins_a {
|
||||
u-boot,dm-spl;
|
||||
pins1 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
pins2 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
};
|
||||
|
||||
&sdmmc2_d47_pins_a {
|
||||
u-boot,dm-spl;
|
||||
pins {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
};
|
||||
#endif
|
||||
|
||||
&uart4 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&uart4_pins_a {
|
||||
u-boot,dm-pre-reloc;
|
||||
pins1 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
pins2 {
|
||||
u-boot,dm-pre-reloc;
|
||||
/* pull-up on rx to avoid floating level */
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
32
arch/arm/dts/stm32mp157a-ed1.dts
Normal file
32
arch/arm/dts/stm32mp157a-ed1.dts
Normal file
@ -0,0 +1,32 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
|
||||
/*
|
||||
* Copyright (C) STMicroelectronics 2019 - All Rights Reserved
|
||||
* Author: Alexandre Torgue <alexandre.torgue@st.com> for STMicroelectronics.
|
||||
*/
|
||||
/dts-v1/;
|
||||
|
||||
#include "stm32mp157.dtsi"
|
||||
#include "stm32mp15xa.dtsi"
|
||||
#include "stm32mp15-pinctrl.dtsi"
|
||||
#include "stm32mp15xxaa-pinctrl.dtsi"
|
||||
#include "stm32mp15xx-edx.dtsi"
|
||||
|
||||
/ {
|
||||
model = "STMicroelectronics STM32MP157A eval daughter";
|
||||
compatible = "st,stm32mp157a-ed1", "st,stm32mp157";
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
reserved-memory {
|
||||
gpu_reserved: gpu@f6000000 {
|
||||
reg = <0xf6000000 0x8000000>;
|
||||
no-map;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&gpu {
|
||||
contiguous-area = <&gpu_reserved>;
|
||||
};
|
||||
62
arch/arm/dts/stm32mp157a-ev1-u-boot.dtsi
Normal file
62
arch/arm/dts/stm32mp157a-ev1-u-boot.dtsi
Normal file
@ -0,0 +1,62 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright : STMicroelectronics 2018
|
||||
*/
|
||||
|
||||
#include "stm32mp157c-ed1-u-boot.dtsi"
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
gpio26 = &stmfx_pinctrl;
|
||||
i2c1 = &i2c2;
|
||||
i2c4 = &i2c5;
|
||||
pinctrl2 = &stmfx_pinctrl;
|
||||
spi0 = &qspi;
|
||||
usb0 = &usbotg_hs;
|
||||
};
|
||||
};
|
||||
|
||||
#ifndef CONFIG_TFABOOT
|
||||
&flash0 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
|
||||
&qspi {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
|
||||
&qspi_clk_pins_a {
|
||||
u-boot,dm-spl;
|
||||
pins {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
};
|
||||
|
||||
&qspi_bk1_pins_a {
|
||||
u-boot,dm-spl;
|
||||
pins1 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
pins2 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
};
|
||||
|
||||
&qspi_bk2_pins_a {
|
||||
u-boot,dm-spl;
|
||||
pins1 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
pins2 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
};
|
||||
&sai2 {
|
||||
clocks = <&rcc SAI2>, <&rcc PLL3_Q>, <&rcc PLL3_R>;
|
||||
};
|
||||
|
||||
&sai4 {
|
||||
clocks = <&rcc SAI4>, <&rcc PLL3_Q>, <&rcc PLL3_R>;
|
||||
};
|
||||
#endif
|
||||
|
||||
83
arch/arm/dts/stm32mp157a-ev1.dts
Normal file
83
arch/arm/dts/stm32mp157a-ev1.dts
Normal file
@ -0,0 +1,83 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
|
||||
/*
|
||||
* Copyright (C) STMicroelectronics 2019 - All Rights Reserved
|
||||
* Author: Alexandre Torgue <alexandre.torgue@st.com> for STMicroelectronics.
|
||||
*/
|
||||
/dts-v1/;
|
||||
|
||||
#include "stm32mp157a-ed1.dts"
|
||||
#include "stm32mp15xx-evx.dtsi"
|
||||
|
||||
/ {
|
||||
model = "STMicroelectronics STM32MP157A eval daughter on eval mother";
|
||||
compatible = "st,stm32mp157a-ev1", "st,stm32mp157a-ed1", "st,stm32mp157";
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
};
|
||||
|
||||
<dc {
|
||||
status = "okay";
|
||||
|
||||
port {
|
||||
ltdc_ep0_out: endpoint@0 {
|
||||
reg = <0>;
|
||||
remote-endpoint = <&dsi_in>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&dsi {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "okay";
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
dsi_in: endpoint {
|
||||
remote-endpoint = <<dc_ep0_out>;
|
||||
};
|
||||
};
|
||||
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
dsi_out: endpoint {
|
||||
remote-endpoint = <&dsi_panel_in>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
panel_dsi: panel-dsi@0 {
|
||||
compatible = "raydium,rm68200";
|
||||
reg = <0>;
|
||||
reset-gpios = <&gpiof 15 GPIO_ACTIVE_LOW>;
|
||||
backlight = <&panel_backlight>;
|
||||
power-supply = <&v3v3>;
|
||||
status = "okay";
|
||||
|
||||
port {
|
||||
dsi_panel_in: endpoint {
|
||||
remote-endpoint = <&dsi_out>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
gt9147: goodix_ts@5d {
|
||||
compatible = "goodix,gt9147";
|
||||
reg = <0x5d>;
|
||||
panel = <&panel_dsi>;
|
||||
pinctrl-0 = <&goodix_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
|
||||
interrupts = <14 IRQ_TYPE_EDGE_RISING>;
|
||||
interrupt-parent = <&stmfx_pinctrl>;
|
||||
};
|
||||
};
|
||||
@ -11,24 +11,32 @@
|
||||
#include "stm32mp15-pinctrl.dtsi"
|
||||
#include "stm32mp15xxac-pinctrl.dtsi"
|
||||
#include "stm32mp15xx-dkx.dtsi"
|
||||
#include <dt-bindings/rtc/rtc-stm32.h>
|
||||
|
||||
/ {
|
||||
model = "STMicroelectronics STM32MP157C-DK2 Discovery Board";
|
||||
compatible = "st,stm32mp157c-dk2", "st,stm32mp157";
|
||||
|
||||
aliases {
|
||||
ethernet0 = ðernet0;
|
||||
serial0 = &uart4;
|
||||
serial3 = &usart2;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
wifi_pwrseq: wifi-pwrseq {
|
||||
compatible = "mmc-pwrseq-simple";
|
||||
reset-gpios = <&gpioh 4 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
&cryp1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&dsi {
|
||||
status = "okay";
|
||||
phy-dsi-supply = <®18>;
|
||||
|
||||
ports {
|
||||
port@0 {
|
||||
@ -46,7 +54,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
panel@0 {
|
||||
panel_otm8009a: panel-otm8009a@0 {
|
||||
compatible = "orisetech,otm8009a";
|
||||
reg = <0>;
|
||||
reset-gpios = <&gpioe 4 GPIO_ACTIVE_LOW>;
|
||||
@ -62,6 +70,18 @@
|
||||
};
|
||||
|
||||
&i2c1 {
|
||||
touchscreen@2a {
|
||||
compatible = "focaltech,ft6236";
|
||||
reg = <0x2a>;
|
||||
interrupts = <2 2>;
|
||||
interrupt-parent = <&gpiof>;
|
||||
interrupt-controller;
|
||||
touchscreen-size-x = <480>;
|
||||
touchscreen-size-y = <800>;
|
||||
panel = <&panel_otm8009a>;
|
||||
vcc-supply = <&v3v3>;
|
||||
status = "okay";
|
||||
};
|
||||
touchscreen@38 {
|
||||
compatible = "focaltech,ft6236";
|
||||
reg = <0x38>;
|
||||
@ -70,6 +90,8 @@
|
||||
interrupt-controller;
|
||||
touchscreen-size-x = <480>;
|
||||
touchscreen-size-y = <800>;
|
||||
panel = <&panel_otm8009a>;
|
||||
vcc-supply = <&v3v3>;
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
@ -84,3 +106,49 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&rtc {
|
||||
st,lsco = <RTC_OUT2_RMP>;
|
||||
pinctrl-0 = <&rtc_out2_rmp_pins_a>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
/* Wifi */
|
||||
&sdmmc2 {
|
||||
arm,primecell-periphid = <0x10153180>;
|
||||
pinctrl-names = "default", "opendrain", "sleep";
|
||||
pinctrl-0 = <&sdmmc2_b4_pins_a>;
|
||||
pinctrl-1 = <&sdmmc2_b4_od_pins_a>;
|
||||
pinctrl-2 = <&sdmmc2_b4_sleep_pins_a>;
|
||||
non-removable;
|
||||
st,neg-edge;
|
||||
bus-width = <4>;
|
||||
vmmc-supply = <&v3v3>;
|
||||
mmc-pwrseq = <&wifi_pwrseq>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "okay";
|
||||
|
||||
brcmf: bcrmf@1 {
|
||||
reg = <1>;
|
||||
compatible = "brcm,bcm4329-fmac";
|
||||
};
|
||||
};
|
||||
|
||||
/* Bluetooth */
|
||||
&usart2 {
|
||||
pinctrl-names = "default", "sleep", "idle";
|
||||
pinctrl-0 = <&usart2_pins_c>;
|
||||
pinctrl-1 = <&usart2_sleep_pins_c>;
|
||||
pinctrl-2 = <&usart2_idle_pins_c>;
|
||||
uart-has-rtscts;
|
||||
status = "okay";
|
||||
|
||||
bluetooth {
|
||||
shutdown-gpios = <&gpioz 6 GPIO_ACTIVE_HIGH>;
|
||||
compatible = "brcm,bcm43438-bt";
|
||||
max-speed = <3000000>;
|
||||
vbat-supply = <&v3v3>;
|
||||
vddio-supply = <&v3v3>;
|
||||
};
|
||||
};
|
||||
|
||||
@ -3,217 +3,4 @@
|
||||
* Copyright : STMicroelectronics 2018
|
||||
*/
|
||||
|
||||
#include <dt-bindings/clock/stm32mp1-clksrc.h>
|
||||
#include "stm32mp15-u-boot.dtsi"
|
||||
#include "stm32mp15-ddr3-2x4Gb-1066-binG.dtsi"
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
i2c3 = &i2c4;
|
||||
mmc0 = &sdmmc1;
|
||||
mmc1 = &sdmmc2;
|
||||
};
|
||||
|
||||
config {
|
||||
u-boot,boot-led = "heartbeat";
|
||||
u-boot,error-led = "error";
|
||||
u-boot,mmc-env-partition = "ssbl";
|
||||
st,fastboot-gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
|
||||
st,stm32prog-gpios = <&gpioa 14 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
firmware {
|
||||
optee {
|
||||
compatible = "linaro,optee-tz";
|
||||
method = "smc";
|
||||
};
|
||||
};
|
||||
|
||||
reserved-memory {
|
||||
optee@fe000000 {
|
||||
reg = <0xfe000000 0x02000000>;
|
||||
no-map;
|
||||
};
|
||||
};
|
||||
|
||||
led {
|
||||
red {
|
||||
label = "error";
|
||||
gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
|
||||
default-state = "off";
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&clk_hse {
|
||||
st,digbypass;
|
||||
};
|
||||
|
||||
&i2c4 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&i2c4_pins_a {
|
||||
u-boot,dm-pre-reloc;
|
||||
pins {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
};
|
||||
|
||||
&pmic {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&rcc {
|
||||
st,clksrc = <
|
||||
CLK_MPU_PLL1P
|
||||
CLK_AXI_PLL2P
|
||||
CLK_MCU_PLL3P
|
||||
CLK_PLL12_HSE
|
||||
CLK_PLL3_HSE
|
||||
CLK_PLL4_HSE
|
||||
CLK_RTC_LSE
|
||||
CLK_MCO1_DISABLED
|
||||
CLK_MCO2_DISABLED
|
||||
>;
|
||||
|
||||
st,clkdiv = <
|
||||
1 /*MPU*/
|
||||
0 /*AXI*/
|
||||
0 /*MCU*/
|
||||
1 /*APB1*/
|
||||
1 /*APB2*/
|
||||
1 /*APB3*/
|
||||
1 /*APB4*/
|
||||
2 /*APB5*/
|
||||
23 /*RTC*/
|
||||
0 /*MCO1*/
|
||||
0 /*MCO2*/
|
||||
>;
|
||||
|
||||
st,pkcs = <
|
||||
CLK_CKPER_HSE
|
||||
CLK_FMC_ACLK
|
||||
CLK_QSPI_ACLK
|
||||
CLK_ETH_DISABLED
|
||||
CLK_SDMMC12_PLL4P
|
||||
CLK_DSI_DSIPLL
|
||||
CLK_STGEN_HSE
|
||||
CLK_USBPHY_HSE
|
||||
CLK_SPI2S1_PLL3Q
|
||||
CLK_SPI2S23_PLL3Q
|
||||
CLK_SPI45_HSI
|
||||
CLK_SPI6_HSI
|
||||
CLK_I2C46_HSI
|
||||
CLK_SDMMC3_PLL4P
|
||||
CLK_USBO_USBPHY
|
||||
CLK_ADC_CKPER
|
||||
CLK_CEC_LSE
|
||||
CLK_I2C12_HSI
|
||||
CLK_I2C35_HSI
|
||||
CLK_UART1_HSI
|
||||
CLK_UART24_HSI
|
||||
CLK_UART35_HSI
|
||||
CLK_UART6_HSI
|
||||
CLK_UART78_HSI
|
||||
CLK_SPDIF_PLL4P
|
||||
CLK_FDCAN_PLL4R
|
||||
CLK_SAI1_PLL3Q
|
||||
CLK_SAI2_PLL3Q
|
||||
CLK_SAI3_PLL3Q
|
||||
CLK_SAI4_PLL3Q
|
||||
CLK_RNG1_LSI
|
||||
CLK_RNG2_LSI
|
||||
CLK_LPTIM1_PCLK1
|
||||
CLK_LPTIM23_PCLK3
|
||||
CLK_LPTIM45_LSE
|
||||
>;
|
||||
|
||||
/* VCO = 1066.0 MHz => P = 266 (AXI), Q = 533 (GPU), R = 533 (DDR) */
|
||||
pll2: st,pll@1 {
|
||||
compatible = "st,stm32mp1-pll";
|
||||
reg = <1>;
|
||||
cfg = < 2 65 1 0 0 PQR(1,1,1) >;
|
||||
frac = < 0x1400 >;
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
/* VCO = 417.8 MHz => P = 209, Q = 24, R = 11 */
|
||||
pll3: st,pll@2 {
|
||||
compatible = "st,stm32mp1-pll";
|
||||
reg = <2>;
|
||||
cfg = < 1 33 1 16 36 PQR(1,1,1) >;
|
||||
frac = < 0x1a04 >;
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
/* VCO = 594.0 MHz => P = 99, Q = 74, R = 74 */
|
||||
pll4: st,pll@3 {
|
||||
compatible = "st,stm32mp1-pll";
|
||||
reg = <3>;
|
||||
cfg = < 3 98 5 7 7 PQR(1,1,1) >;
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
};
|
||||
|
||||
&sdmmc1 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
|
||||
&sdmmc1_b4_pins_a {
|
||||
u-boot,dm-spl;
|
||||
pins1 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
pins2 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
};
|
||||
|
||||
&sdmmc1_dir_pins_a {
|
||||
u-boot,dm-spl;
|
||||
pins1 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
pins2 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
};
|
||||
|
||||
&sdmmc2 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
|
||||
&sdmmc2_b4_pins_a {
|
||||
u-boot,dm-spl;
|
||||
pins1 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
pins2 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
};
|
||||
|
||||
&sdmmc2_d47_pins_a {
|
||||
u-boot,dm-spl;
|
||||
pins {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
};
|
||||
|
||||
&uart4 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&uart4_pins_a {
|
||||
u-boot,dm-pre-reloc;
|
||||
pins1 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
pins2 {
|
||||
u-boot,dm-pre-reloc;
|
||||
/* pull-up on rx to avoid floating level */
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
#include "stm32mp157a-ed1-u-boot.dtsi"
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
|
||||
/*
|
||||
* Copyright (C) STMicroelectronics 2017 - All Rights Reserved
|
||||
* Author: Ludovic Barre <ludovic.barre@st.com> for STMicroelectronics.
|
||||
* Copyright (C) STMicroelectronics 2019 - All Rights Reserved
|
||||
* Author: Alexandre Torgue <alexandre.torgue@st.com> for STMicroelectronics.
|
||||
*/
|
||||
/dts-v1/;
|
||||
|
||||
@ -9,8 +9,7 @@
|
||||
#include "stm32mp15xc.dtsi"
|
||||
#include "stm32mp15-pinctrl.dtsi"
|
||||
#include "stm32mp15xxaa-pinctrl.dtsi"
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/mfd/st,stpmic1.h>
|
||||
#include "stm32mp15xx-edx.dtsi"
|
||||
|
||||
/ {
|
||||
model = "STMicroelectronics STM32MP157C eval daughter";
|
||||
@ -20,360 +19,18 @@
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
memory@c0000000 {
|
||||
device_type = "memory";
|
||||
reg = <0xC0000000 0x40000000>;
|
||||
};
|
||||
|
||||
reserved-memory {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges;
|
||||
|
||||
mcuram2: mcuram2@10000000 {
|
||||
compatible = "shared-dma-pool";
|
||||
reg = <0x10000000 0x40000>;
|
||||
gpu_reserved: gpu@f6000000 {
|
||||
reg = <0xf6000000 0x8000000>;
|
||||
no-map;
|
||||
};
|
||||
|
||||
vdev0vring0: vdev0vring0@10040000 {
|
||||
compatible = "shared-dma-pool";
|
||||
reg = <0x10040000 0x1000>;
|
||||
no-map;
|
||||
};
|
||||
|
||||
vdev0vring1: vdev0vring1@10041000 {
|
||||
compatible = "shared-dma-pool";
|
||||
reg = <0x10041000 0x1000>;
|
||||
no-map;
|
||||
};
|
||||
|
||||
vdev0buffer: vdev0buffer@10042000 {
|
||||
compatible = "shared-dma-pool";
|
||||
reg = <0x10042000 0x4000>;
|
||||
no-map;
|
||||
};
|
||||
|
||||
mcuram: mcuram@30000000 {
|
||||
compatible = "shared-dma-pool";
|
||||
reg = <0x30000000 0x40000>;
|
||||
no-map;
|
||||
};
|
||||
|
||||
retram: retram@38000000 {
|
||||
compatible = "shared-dma-pool";
|
||||
reg = <0x38000000 0x10000>;
|
||||
no-map;
|
||||
};
|
||||
|
||||
gpu_reserved: gpu@e8000000 {
|
||||
reg = <0xe8000000 0x8000000>;
|
||||
no-map;
|
||||
};
|
||||
};
|
||||
|
||||
aliases {
|
||||
serial0 = &uart4;
|
||||
};
|
||||
|
||||
sd_switch: regulator-sd_switch {
|
||||
compatible = "regulator-gpio";
|
||||
regulator-name = "sd_switch";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <2900000>;
|
||||
regulator-type = "voltage";
|
||||
regulator-always-on;
|
||||
|
||||
gpios = <&gpiof 14 GPIO_ACTIVE_HIGH>;
|
||||
gpios-states = <0>;
|
||||
states = <1800000 0x1>,
|
||||
<2900000 0x0>;
|
||||
};
|
||||
};
|
||||
|
||||
&adc {
|
||||
/* ANA0, ANA1 are dedicated pins and don't need pinctrl: only in6. */
|
||||
pinctrl-0 = <&adc1_in6_pins_a>;
|
||||
pinctrl-names = "default";
|
||||
vdd-supply = <&vdd>;
|
||||
vdda-supply = <&vdda>;
|
||||
vref-supply = <&vdda>;
|
||||
status = "disabled";
|
||||
adc1: adc@0 {
|
||||
st,adc-channels = <0 1 6>;
|
||||
/* 16.5 ck_cycles sampling time */
|
||||
st,min-sample-time-nsecs = <400>;
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
&cpu0{
|
||||
cpu-supply = <&vddcore>;
|
||||
};
|
||||
|
||||
&cpu1{
|
||||
cpu-supply = <&vddcore>;
|
||||
};
|
||||
|
||||
&dac {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&dac_ch1_pins_a &dac_ch2_pins_a>;
|
||||
vref-supply = <&vdda>;
|
||||
status = "disabled";
|
||||
dac1: dac@1 {
|
||||
status = "okay";
|
||||
};
|
||||
dac2: dac@2 {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
&dts {
|
||||
&cryp1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpu {
|
||||
contiguous-area = <&gpu_reserved>;
|
||||
};
|
||||
|
||||
&i2c4 {
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&i2c4_pins_a>;
|
||||
pinctrl-1 = <&i2c4_sleep_pins_a>;
|
||||
i2c-scl-rising-time-ns = <185>;
|
||||
i2c-scl-falling-time-ns = <20>;
|
||||
clock-frequency = <400000>;
|
||||
status = "okay";
|
||||
/* spare dmas for other usage */
|
||||
/delete-property/dmas;
|
||||
/delete-property/dma-names;
|
||||
|
||||
pmic: stpmic@33 {
|
||||
compatible = "st,stpmic1";
|
||||
reg = <0x33>;
|
||||
interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
status = "okay";
|
||||
|
||||
regulators {
|
||||
compatible = "st,stpmic1-regulators";
|
||||
ldo1-supply = <&v3v3>;
|
||||
ldo2-supply = <&v3v3>;
|
||||
ldo3-supply = <&vdd_ddr>;
|
||||
ldo5-supply = <&v3v3>;
|
||||
ldo6-supply = <&v3v3>;
|
||||
pwr_sw1-supply = <&bst_out>;
|
||||
pwr_sw2-supply = <&bst_out>;
|
||||
|
||||
vddcore: buck1 {
|
||||
regulator-name = "vddcore";
|
||||
regulator-min-microvolt = <1200000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
regulator-always-on;
|
||||
regulator-initial-mode = <0>;
|
||||
regulator-over-current-protection;
|
||||
};
|
||||
|
||||
vdd_ddr: buck2 {
|
||||
regulator-name = "vdd_ddr";
|
||||
regulator-min-microvolt = <1350000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
regulator-always-on;
|
||||
regulator-initial-mode = <0>;
|
||||
regulator-over-current-protection;
|
||||
};
|
||||
|
||||
vdd: buck3 {
|
||||
regulator-name = "vdd";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-always-on;
|
||||
st,mask-reset;
|
||||
regulator-initial-mode = <0>;
|
||||
regulator-over-current-protection;
|
||||
};
|
||||
|
||||
v3v3: buck4 {
|
||||
regulator-name = "v3v3";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-always-on;
|
||||
regulator-over-current-protection;
|
||||
regulator-initial-mode = <0>;
|
||||
};
|
||||
|
||||
vdda: ldo1 {
|
||||
regulator-name = "vdda";
|
||||
regulator-min-microvolt = <2900000>;
|
||||
regulator-max-microvolt = <2900000>;
|
||||
interrupts = <IT_CURLIM_LDO1 0>;
|
||||
};
|
||||
|
||||
v2v8: ldo2 {
|
||||
regulator-name = "v2v8";
|
||||
regulator-min-microvolt = <2800000>;
|
||||
regulator-max-microvolt = <2800000>;
|
||||
interrupts = <IT_CURLIM_LDO2 0>;
|
||||
};
|
||||
|
||||
vtt_ddr: ldo3 {
|
||||
regulator-name = "vtt_ddr";
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <750000>;
|
||||
regulator-always-on;
|
||||
regulator-over-current-protection;
|
||||
};
|
||||
|
||||
vdd_usb: ldo4 {
|
||||
regulator-name = "vdd_usb";
|
||||
interrupts = <IT_CURLIM_LDO4 0>;
|
||||
};
|
||||
|
||||
vdd_sd: ldo5 {
|
||||
regulator-name = "vdd_sd";
|
||||
regulator-min-microvolt = <2900000>;
|
||||
regulator-max-microvolt = <2900000>;
|
||||
interrupts = <IT_CURLIM_LDO5 0>;
|
||||
regulator-boot-on;
|
||||
};
|
||||
|
||||
v1v8: ldo6 {
|
||||
regulator-name = "v1v8";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
interrupts = <IT_CURLIM_LDO6 0>;
|
||||
};
|
||||
|
||||
vref_ddr: vref_ddr {
|
||||
regulator-name = "vref_ddr";
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
bst_out: boost {
|
||||
regulator-name = "bst_out";
|
||||
interrupts = <IT_OCP_BOOST 0>;
|
||||
};
|
||||
|
||||
vbus_otg: pwr_sw1 {
|
||||
regulator-name = "vbus_otg";
|
||||
interrupts = <IT_OCP_OTG 0>;
|
||||
};
|
||||
|
||||
vbus_sw: pwr_sw2 {
|
||||
regulator-name = "vbus_sw";
|
||||
interrupts = <IT_OCP_SWOUT 0>;
|
||||
regulator-active-discharge = <1>;
|
||||
};
|
||||
};
|
||||
|
||||
onkey {
|
||||
compatible = "st,stpmic1-onkey";
|
||||
interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 0>;
|
||||
interrupt-names = "onkey-falling", "onkey-rising";
|
||||
power-off-time-sec = <10>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
watchdog {
|
||||
compatible = "st,stpmic1-wdt";
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&ipcc {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&iwdg2 {
|
||||
timeout-sec = <32>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&m4_rproc {
|
||||
memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>,
|
||||
<&vdev0vring1>, <&vdev0buffer>;
|
||||
mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>;
|
||||
mbox-names = "vq0", "vq1", "shutdown";
|
||||
interrupt-parent = <&exti>;
|
||||
interrupts = <68 1>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pwr_regulators {
|
||||
vdd-supply = <&vdd>;
|
||||
vdd_3v3_usbfs-supply = <&vdd_usb>;
|
||||
};
|
||||
|
||||
&rng1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&rtc {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdmmc1 {
|
||||
pinctrl-names = "default", "opendrain", "sleep";
|
||||
pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_a>;
|
||||
pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_dir_pins_a>;
|
||||
pinctrl-2 = <&sdmmc1_b4_sleep_pins_a &sdmmc1_dir_sleep_pins_a>;
|
||||
cd-gpios = <&gpiog 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
disable-wp;
|
||||
st,sig-dir;
|
||||
st,neg-edge;
|
||||
st,use-ckin;
|
||||
bus-width = <4>;
|
||||
vmmc-supply = <&vdd_sd>;
|
||||
vqmmc-supply = <&sd_switch>;
|
||||
sd-uhs-sdr12;
|
||||
sd-uhs-sdr25;
|
||||
sd-uhs-sdr50;
|
||||
sd-uhs-ddr50;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdmmc2 {
|
||||
pinctrl-names = "default", "opendrain", "sleep";
|
||||
pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_a>;
|
||||
pinctrl-1 = <&sdmmc2_b4_od_pins_a &sdmmc2_d47_pins_a>;
|
||||
pinctrl-2 = <&sdmmc2_b4_sleep_pins_a &sdmmc2_d47_sleep_pins_a>;
|
||||
non-removable;
|
||||
no-sd;
|
||||
no-sdio;
|
||||
st,neg-edge;
|
||||
bus-width = <8>;
|
||||
vmmc-supply = <&v3v3>;
|
||||
vqmmc-supply = <&vdd>;
|
||||
mmc-ddr-3_3v;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&timers6 {
|
||||
status = "okay";
|
||||
/* spare dmas for other usage */
|
||||
/delete-property/dmas;
|
||||
/delete-property/dma-names;
|
||||
timer@5 {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
&uart4 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart4_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbotg_hs {
|
||||
vbus-supply = <&vbus_otg>;
|
||||
};
|
||||
|
||||
&usbphyc_port0 {
|
||||
phy-supply = <&vdd_usb>;
|
||||
};
|
||||
|
||||
&usbphyc_port1 {
|
||||
phy-supply = <&vdd_usb>;
|
||||
};
|
||||
|
||||
@ -3,51 +3,4 @@
|
||||
* Copyright : STMicroelectronics 2018
|
||||
*/
|
||||
|
||||
#include "stm32mp157c-ed1-u-boot.dtsi"
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
gpio26 = &stmfx_pinctrl;
|
||||
i2c1 = &i2c2;
|
||||
i2c4 = &i2c5;
|
||||
pinctrl2 = &stmfx_pinctrl;
|
||||
spi0 = &qspi;
|
||||
usb0 = &usbotg_hs;
|
||||
};
|
||||
};
|
||||
|
||||
&flash0 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
|
||||
&qspi {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
|
||||
&qspi_clk_pins_a {
|
||||
u-boot,dm-spl;
|
||||
pins {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
};
|
||||
|
||||
&qspi_bk1_pins_a {
|
||||
u-boot,dm-spl;
|
||||
pins1 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
pins2 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
};
|
||||
|
||||
&qspi_bk2_pins_a {
|
||||
u-boot,dm-spl;
|
||||
pins1 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
pins2 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
};
|
||||
|
||||
#include "stm32mp157a-ev1-u-boot.dtsi"
|
||||
|
||||
@ -1,13 +1,12 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
|
||||
/*
|
||||
* Copyright (C) STMicroelectronics 2017 - All Rights Reserved
|
||||
* Author: Ludovic Barre <ludovic.barre@st.com> for STMicroelectronics.
|
||||
* Copyright (C) STMicroelectronics 2019 - All Rights Reserved
|
||||
* Author: Alexandre Torgue <alexandre.torgue@st.com> for STMicroelectronics.
|
||||
*/
|
||||
/dts-v1/;
|
||||
|
||||
#include "stm32mp157c-ed1.dts"
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include "stm32mp15xx-evx.dtsi"
|
||||
|
||||
/ {
|
||||
model = "STMicroelectronics STM32MP157C eval daughter on eval mother";
|
||||
@ -16,92 +15,28 @@
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
aliases {
|
||||
serial0 = &uart4;
|
||||
ethernet0 = ðernet0;
|
||||
};
|
||||
|
||||
clocks {
|
||||
clk_ext_camera: clk-ext-camera {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <24000000>;
|
||||
};
|
||||
};
|
||||
|
||||
joystick {
|
||||
compatible = "gpio-keys";
|
||||
pinctrl-0 = <&joystick_pins>;
|
||||
pinctrl-names = "default";
|
||||
button-0 {
|
||||
label = "JoySel";
|
||||
linux,code = <KEY_ENTER>;
|
||||
interrupt-parent = <&stmfx_pinctrl>;
|
||||
interrupts = <0 IRQ_TYPE_EDGE_RISING>;
|
||||
};
|
||||
button-1 {
|
||||
label = "JoyDown";
|
||||
linux,code = <KEY_DOWN>;
|
||||
interrupt-parent = <&stmfx_pinctrl>;
|
||||
interrupts = <1 IRQ_TYPE_EDGE_RISING>;
|
||||
};
|
||||
button-2 {
|
||||
label = "JoyLeft";
|
||||
linux,code = <KEY_LEFT>;
|
||||
interrupt-parent = <&stmfx_pinctrl>;
|
||||
interrupts = <2 IRQ_TYPE_EDGE_RISING>;
|
||||
};
|
||||
button-3 {
|
||||
label = "JoyRight";
|
||||
linux,code = <KEY_RIGHT>;
|
||||
interrupt-parent = <&stmfx_pinctrl>;
|
||||
interrupts = <3 IRQ_TYPE_EDGE_RISING>;
|
||||
};
|
||||
button-4 {
|
||||
label = "JoyUp";
|
||||
linux,code = <KEY_UP>;
|
||||
interrupt-parent = <&stmfx_pinctrl>;
|
||||
interrupts = <4 IRQ_TYPE_EDGE_RISING>;
|
||||
};
|
||||
};
|
||||
|
||||
panel_backlight: panel-backlight {
|
||||
compatible = "gpio-backlight";
|
||||
gpios = <&gpiod 13 GPIO_ACTIVE_LOW>;
|
||||
default-on;
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
&cec {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&cec_pins_a>;
|
||||
<dc {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&dcmi {
|
||||
status = "okay";
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&dcmi_pins_a>;
|
||||
pinctrl-1 = <&dcmi_sleep_pins_a>;
|
||||
|
||||
port {
|
||||
dcmi_0: endpoint {
|
||||
remote-endpoint = <&ov5640_0>;
|
||||
bus-width = <8>;
|
||||
hsync-active = <0>;
|
||||
vsync-active = <0>;
|
||||
pclk-sample = <1>;
|
||||
ltdc_ep0_out: endpoint@0 {
|
||||
reg = <0>;
|
||||
remote-endpoint = <&dsi_in>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&dsi {
|
||||
phy-dsi-supply = <®18>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "okay";
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
dsi_in: endpoint {
|
||||
@ -117,7 +52,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
panel-dsi@0 {
|
||||
panel_dsi: panel-dsi@0 {
|
||||
compatible = "raydium,rm68200";
|
||||
reg = <0>;
|
||||
reset-gpios = <&gpiof 15 GPIO_ACTIVE_LOW>;
|
||||
@ -133,229 +68,16 @@
|
||||
};
|
||||
};
|
||||
|
||||
ðernet0 {
|
||||
status = "okay";
|
||||
pinctrl-0 = <ðernet0_rgmii_pins_a>;
|
||||
pinctrl-1 = <ðernet0_rgmii_sleep_pins_a>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
phy-mode = "rgmii-id";
|
||||
max-speed = <1000>;
|
||||
phy-handle = <&phy0>;
|
||||
|
||||
mdio0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "snps,dwmac-mdio";
|
||||
phy0: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&fmc {
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&fmc_pins_a>;
|
||||
pinctrl-1 = <&fmc_sleep_pins_a>;
|
||||
status = "okay";
|
||||
|
||||
nand-controller@4,0 {
|
||||
status = "okay";
|
||||
|
||||
nand@0 {
|
||||
reg = <0>;
|
||||
nand-on-flash-bbt;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&i2c2_pins_a>;
|
||||
pinctrl-1 = <&i2c2_sleep_pins_a>;
|
||||
i2c-scl-rising-time-ns = <185>;
|
||||
i2c-scl-falling-time-ns = <20>;
|
||||
status = "okay";
|
||||
|
||||
ov5640: camera@3c {
|
||||
compatible = "ovti,ov5640";
|
||||
reg = <0x3c>;
|
||||
clocks = <&clk_ext_camera>;
|
||||
clock-names = "xclk";
|
||||
DOVDD-supply = <&v2v8>;
|
||||
powerdown-gpios = <&stmfx_pinctrl 18 (GPIO_ACTIVE_HIGH | GPIO_PUSH_PULL)>;
|
||||
reset-gpios = <&stmfx_pinctrl 19 (GPIO_ACTIVE_LOW | GPIO_PUSH_PULL)>;
|
||||
rotation = <180>;
|
||||
gt9147: goodix_ts@5d {
|
||||
compatible = "goodix,gt9147";
|
||||
reg = <0x5d>;
|
||||
panel = <&panel_dsi>;
|
||||
pinctrl-0 = <&goodix_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
|
||||
port {
|
||||
ov5640_0: endpoint {
|
||||
remote-endpoint = <&dcmi_0>;
|
||||
bus-width = <8>;
|
||||
data-shift = <2>; /* lines 9:2 are used */
|
||||
hsync-active = <0>;
|
||||
vsync-active = <0>;
|
||||
pclk-sample = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
stmfx: stmfx@42 {
|
||||
compatible = "st,stmfx-0300";
|
||||
reg = <0x42>;
|
||||
interrupts = <8 IRQ_TYPE_EDGE_RISING>;
|
||||
interrupt-parent = <&gpioi>;
|
||||
vdd-supply = <&v3v3>;
|
||||
|
||||
stmfx_pinctrl: pinctrl {
|
||||
compatible = "st,stmfx-0300-pinctrl";
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
gpio-ranges = <&stmfx_pinctrl 0 0 24>;
|
||||
|
||||
joystick_pins: joystick-pins {
|
||||
pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4";
|
||||
bias-pull-down;
|
||||
};
|
||||
};
|
||||
interrupts = <14 IRQ_TYPE_EDGE_RISING>;
|
||||
interrupt-parent = <&stmfx_pinctrl>;
|
||||
};
|
||||
};
|
||||
|
||||
&i2c5 {
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&i2c5_pins_a>;
|
||||
pinctrl-1 = <&i2c5_sleep_pins_a>;
|
||||
i2c-scl-rising-time-ns = <185>;
|
||||
i2c-scl-falling-time-ns = <20>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
<dc {
|
||||
status = "okay";
|
||||
|
||||
port {
|
||||
ltdc_ep0_out: endpoint@0 {
|
||||
reg = <0>;
|
||||
remote-endpoint = <&dsi_in>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&m_can1 {
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&m_can1_pins_a>;
|
||||
pinctrl-1 = <&m_can1_sleep_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&qspi {
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a &qspi_bk2_pins_a>;
|
||||
pinctrl-1 = <&qspi_clk_sleep_pins_a &qspi_bk1_sleep_pins_a &qspi_bk2_sleep_pins_a>;
|
||||
reg = <0x58003000 0x1000>, <0x70000000 0x4000000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "okay";
|
||||
|
||||
flash0: mx66l51235l@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-rx-bus-width = <4>;
|
||||
spi-max-frequency = <108000000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
};
|
||||
|
||||
flash1: mx66l51235l@1 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <1>;
|
||||
spi-rx-bus-width = <4>;
|
||||
spi-max-frequency = <108000000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
};
|
||||
};
|
||||
|
||||
&sdmmc3 {
|
||||
pinctrl-names = "default", "opendrain", "sleep";
|
||||
pinctrl-0 = <&sdmmc3_b4_pins_a>;
|
||||
pinctrl-1 = <&sdmmc3_b4_od_pins_a>;
|
||||
pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>;
|
||||
broken-cd;
|
||||
st,neg-edge;
|
||||
bus-width = <4>;
|
||||
vmmc-supply = <&v3v3>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&spi1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spi1_pins_a>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&timers2 {
|
||||
/* spare dmas for other usage (un-delete to enable pwm capture) */
|
||||
/delete-property/dmas;
|
||||
/delete-property/dma-names;
|
||||
status = "disabled";
|
||||
pwm {
|
||||
pinctrl-0 = <&pwm2_pins_a>;
|
||||
pinctrl-1 = <&pwm2_sleep_pins_a>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
status = "okay";
|
||||
};
|
||||
timer@1 {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
&timers8 {
|
||||
/delete-property/dmas;
|
||||
/delete-property/dma-names;
|
||||
status = "disabled";
|
||||
pwm {
|
||||
pinctrl-0 = <&pwm8_pins_a>;
|
||||
pinctrl-1 = <&pwm8_sleep_pins_a>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
status = "okay";
|
||||
};
|
||||
timer@7 {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
&timers12 {
|
||||
/delete-property/dmas;
|
||||
/delete-property/dma-names;
|
||||
status = "disabled";
|
||||
pwm {
|
||||
pinctrl-0 = <&pwm12_pins_a>;
|
||||
pinctrl-1 = <&pwm12_sleep_pins_a>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
status = "okay";
|
||||
};
|
||||
timer@11 {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
&usbh_ehci {
|
||||
phys = <&usbphyc_port0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbotg_hs {
|
||||
pinctrl-0 = <&usbotg_hs_pins_a>;
|
||||
pinctrl-names = "default";
|
||||
phys = <&usbphyc_port1 0>;
|
||||
phy-names = "usb2-phy";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbphyc {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@ -13,9 +13,11 @@
|
||||
};
|
||||
};
|
||||
|
||||
#ifndef CONFIG_TFABOOT
|
||||
&clk_hse {
|
||||
st,digbypass;
|
||||
};
|
||||
#endif
|
||||
|
||||
&i2c2 {
|
||||
u-boot,dm-pre-reloc;
|
||||
@ -32,6 +34,7 @@
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
#ifndef CONFIG_TFABOOT
|
||||
&rcc {
|
||||
st,clksrc = <
|
||||
CLK_MPU_PLL1P
|
||||
@ -123,3 +126,4 @@
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
};
|
||||
#endif
|
||||
|
||||
6
arch/arm/dts/stm32mp157d-dk1-u-boot.dtsi
Normal file
6
arch/arm/dts/stm32mp157d-dk1-u-boot.dtsi
Normal file
@ -0,0 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright : STMicroelectronics 2019
|
||||
*/
|
||||
|
||||
#include "stm32mp157a-dk1-u-boot.dtsi"
|
||||
22
arch/arm/dts/stm32mp157d-dk1.dts
Normal file
22
arch/arm/dts/stm32mp157d-dk1.dts
Normal file
@ -0,0 +1,22 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
|
||||
/*
|
||||
* Copyright (C) STMicroelectronics 2019 - All Rights Reserved
|
||||
* Author: Alexandre Torgue <alexandre.torgue@st.com> for STMicroelectronics.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include "stm32mp157.dtsi"
|
||||
#include "stm32mp15xd.dtsi"
|
||||
#include "stm32mp15-pinctrl.dtsi"
|
||||
#include "stm32mp15xxac-pinctrl.dtsi"
|
||||
#include "stm32mp15xx-dkx.dtsi"
|
||||
|
||||
/ {
|
||||
model = "STMicroelectronics STM32MP157D-DK1 Discovery Board";
|
||||
compatible = "st,stm32mp157d-dk1", "st,stm32mp157";
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
};
|
||||
6
arch/arm/dts/stm32mp157d-ed1-u-boot.dtsi
Normal file
6
arch/arm/dts/stm32mp157d-ed1-u-boot.dtsi
Normal file
@ -0,0 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright : STMicroelectronics 2019
|
||||
*/
|
||||
|
||||
#include "stm32mp157a-ed1-u-boot.dtsi"
|
||||
33
arch/arm/dts/stm32mp157d-ed1.dts
Normal file
33
arch/arm/dts/stm32mp157d-ed1.dts
Normal file
@ -0,0 +1,33 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
|
||||
/*
|
||||
* Copyright (C) STMicroelectronics 2019 - All Rights Reserved
|
||||
* Author: Alexandre Torgue <alexandre.torgue@st.com> for STMicroelectronics.
|
||||
*/
|
||||
/dts-v1/;
|
||||
|
||||
#include "stm32mp157.dtsi"
|
||||
#include "stm32mp15xd.dtsi"
|
||||
#include "stm32mp15-pinctrl.dtsi"
|
||||
#include "stm32mp15xxaa-pinctrl.dtsi"
|
||||
#include "stm32mp15xx-edx.dtsi"
|
||||
|
||||
/ {
|
||||
model = "STMicroelectronics STM32MP157D eval daughter";
|
||||
compatible = "st,stm32mp157d-ed1", "st,stm32mp157";
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
reserved-memory {
|
||||
gpu_reserved: gpu@f6000000 {
|
||||
reg = <0xf6000000 0x8000000>;
|
||||
no-map;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&gpu {
|
||||
contiguous-area = <&gpu_reserved>;
|
||||
status = "okay";
|
||||
};
|
||||
6
arch/arm/dts/stm32mp157d-ev1-u-boot.dtsi
Normal file
6
arch/arm/dts/stm32mp157d-ev1-u-boot.dtsi
Normal file
@ -0,0 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright : STMicroelectronics 2019
|
||||
*/
|
||||
|
||||
#include "stm32mp157a-ev1-u-boot.dtsi"
|
||||
83
arch/arm/dts/stm32mp157d-ev1.dts
Normal file
83
arch/arm/dts/stm32mp157d-ev1.dts
Normal file
@ -0,0 +1,83 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
|
||||
/*
|
||||
* Copyright (C) STMicroelectronics 2019 - All Rights Reserved
|
||||
* Author: Alexandre Torgue <alexandre.torgue@st.com> for STMicroelectronics.
|
||||
*/
|
||||
/dts-v1/;
|
||||
|
||||
#include "stm32mp157d-ed1.dts"
|
||||
#include "stm32mp15xx-evx.dtsi"
|
||||
|
||||
/ {
|
||||
model = "STMicroelectronics STM32MP157D eval daughter on eval mother";
|
||||
compatible = "st,stm32mp157d-ev1", "st,stm32mp157d-ed1", "st,stm32mp157";
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
};
|
||||
|
||||
<dc {
|
||||
status = "okay";
|
||||
|
||||
port {
|
||||
ltdc_ep0_out: endpoint@0 {
|
||||
reg = <0>;
|
||||
remote-endpoint = <&dsi_in>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&dsi {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "okay";
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
dsi_in: endpoint {
|
||||
remote-endpoint = <<dc_ep0_out>;
|
||||
};
|
||||
};
|
||||
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
dsi_out: endpoint {
|
||||
remote-endpoint = <&dsi_panel_in>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
panel_dsi: panel-dsi@0 {
|
||||
compatible = "raydium,rm68200";
|
||||
reg = <0>;
|
||||
reset-gpios = <&gpiof 15 GPIO_ACTIVE_LOW>;
|
||||
backlight = <&panel_backlight>;
|
||||
power-supply = <&v3v3>;
|
||||
status = "okay";
|
||||
|
||||
port {
|
||||
dsi_panel_in: endpoint {
|
||||
remote-endpoint = <&dsi_out>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
gt9147: goodix_ts@5d {
|
||||
compatible = "goodix,gt9147";
|
||||
reg = <0x5d>;
|
||||
panel = <&panel_dsi>;
|
||||
pinctrl-0 = <&goodix_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
|
||||
interrupts = <14 IRQ_TYPE_EDGE_RISING>;
|
||||
interrupt-parent = <&stmfx_pinctrl>;
|
||||
};
|
||||
};
|
||||
6
arch/arm/dts/stm32mp157f-dk2-u-boot.dtsi
Normal file
6
arch/arm/dts/stm32mp157f-dk2-u-boot.dtsi
Normal file
@ -0,0 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright : STMicroelectronics 2019
|
||||
*/
|
||||
|
||||
#include "stm32mp157c-dk2-u-boot.dtsi"
|
||||
154
arch/arm/dts/stm32mp157f-dk2.dts
Normal file
154
arch/arm/dts/stm32mp157f-dk2.dts
Normal file
@ -0,0 +1,154 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
|
||||
/*
|
||||
* Copyright (C) STMicroelectronics 2019 - All Rights Reserved
|
||||
* Author: Alexandre Torgue <alexandre.torgue@st.com> for STMicroelectronics.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include "stm32mp157.dtsi"
|
||||
#include "stm32mp15xf.dtsi"
|
||||
#include "stm32mp15-pinctrl.dtsi"
|
||||
#include "stm32mp15xxac-pinctrl.dtsi"
|
||||
#include "stm32mp15xx-dkx.dtsi"
|
||||
#include <dt-bindings/rtc/rtc-stm32.h>
|
||||
|
||||
/ {
|
||||
model = "STMicroelectronics STM32MP157F-DK2 Discovery Board";
|
||||
compatible = "st,stm32mp157f-dk2", "st,stm32mp157";
|
||||
|
||||
aliases {
|
||||
serial3 = &usart2;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
wifi_pwrseq: wifi-pwrseq {
|
||||
compatible = "mmc-pwrseq-simple";
|
||||
reset-gpios = <&gpioh 4 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
&cryp1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&dsi {
|
||||
status = "okay";
|
||||
|
||||
ports {
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
dsi_in: endpoint {
|
||||
remote-endpoint = <<dc_ep1_out>;
|
||||
};
|
||||
};
|
||||
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
dsi_out: endpoint {
|
||||
remote-endpoint = <&panel_in>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
panel_otm8009a: panel-otm8009a@0 {
|
||||
compatible = "orisetech,otm8009a";
|
||||
reg = <0>;
|
||||
reset-gpios = <&gpioe 4 GPIO_ACTIVE_LOW>;
|
||||
power-supply = <&v3v3>;
|
||||
status = "okay";
|
||||
|
||||
port {
|
||||
panel_in: endpoint {
|
||||
remote-endpoint = <&dsi_out>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2c1 {
|
||||
touchscreen@2a {
|
||||
compatible = "focaltech,ft6236";
|
||||
reg = <0x2a>;
|
||||
interrupts = <2 2>;
|
||||
interrupt-parent = <&gpiof>;
|
||||
interrupt-controller;
|
||||
touchscreen-size-x = <480>;
|
||||
touchscreen-size-y = <800>;
|
||||
panel = <&panel_otm8009a>;
|
||||
vcc-supply = <&v3v3>;
|
||||
status = "okay";
|
||||
};
|
||||
touchscreen@38 {
|
||||
compatible = "focaltech,ft6236";
|
||||
reg = <0x38>;
|
||||
interrupts = <2 2>;
|
||||
interrupt-parent = <&gpiof>;
|
||||
interrupt-controller;
|
||||
touchscreen-size-x = <480>;
|
||||
touchscreen-size-y = <800>;
|
||||
panel = <&panel_otm8009a>;
|
||||
vcc-supply = <&v3v3>;
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
<dc {
|
||||
status = "okay";
|
||||
|
||||
port {
|
||||
ltdc_ep1_out: endpoint@1 {
|
||||
reg = <1>;
|
||||
remote-endpoint = <&dsi_in>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&rtc {
|
||||
st,lsco = <RTC_OUT2_RMP>;
|
||||
pinctrl-0 = <&rtc_out2_rmp_pins_a>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
/* Wifi */
|
||||
&sdmmc2 {
|
||||
arm,primecell-periphid = <0x10153180>;
|
||||
pinctrl-names = "default", "opendrain", "sleep";
|
||||
pinctrl-0 = <&sdmmc2_b4_pins_a>;
|
||||
pinctrl-1 = <&sdmmc2_b4_od_pins_a>;
|
||||
pinctrl-2 = <&sdmmc2_b4_sleep_pins_a>;
|
||||
non-removable;
|
||||
st,neg-edge;
|
||||
bus-width = <4>;
|
||||
vmmc-supply = <&v3v3>;
|
||||
mmc-pwrseq = <&wifi_pwrseq>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "okay";
|
||||
|
||||
brcmf: bcrmf@1 {
|
||||
reg = <1>;
|
||||
compatible = "brcm,bcm4329-fmac";
|
||||
};
|
||||
};
|
||||
|
||||
/* Bluetooth */
|
||||
&usart2 {
|
||||
pinctrl-names = "default", "sleep", "idle";
|
||||
pinctrl-0 = <&usart2_pins_c>;
|
||||
pinctrl-1 = <&usart2_sleep_pins_c>;
|
||||
pinctrl-2 = <&usart2_idle_pins_c>;
|
||||
uart-has-rtscts;
|
||||
status = "okay";
|
||||
|
||||
bluetooth {
|
||||
shutdown-gpios = <&gpioz 6 GPIO_ACTIVE_HIGH>;
|
||||
compatible = "brcm,bcm43438-bt";
|
||||
max-speed = <3000000>;
|
||||
vbat-supply = <&v3v3>;
|
||||
vddio-supply = <&v3v3>;
|
||||
};
|
||||
};
|
||||
6
arch/arm/dts/stm32mp157f-ed1-u-boot.dtsi
Normal file
6
arch/arm/dts/stm32mp157f-ed1-u-boot.dtsi
Normal file
@ -0,0 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright : STMicroelectronics 2019
|
||||
*/
|
||||
|
||||
#include "stm32mp157c-ed1-u-boot.dtsi"
|
||||
37
arch/arm/dts/stm32mp157f-ed1.dts
Normal file
37
arch/arm/dts/stm32mp157f-ed1.dts
Normal file
@ -0,0 +1,37 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
|
||||
/*
|
||||
* Copyright (C) STMicroelectronics 2019 - All Rights Reserved
|
||||
* Author: Alexandre Torgue <alexandre.torgue@st.com> for STMicroelectronics.
|
||||
*/
|
||||
/dts-v1/;
|
||||
|
||||
#include "stm32mp157.dtsi"
|
||||
#include "stm32mp15xf.dtsi"
|
||||
#include "stm32mp15-pinctrl.dtsi"
|
||||
#include "stm32mp15xxaa-pinctrl.dtsi"
|
||||
#include "stm32mp15xx-edx.dtsi"
|
||||
|
||||
/ {
|
||||
model = "STMicroelectronics STM32MP157F eval daughter";
|
||||
compatible = "st,stm32mp157f-ed1", "st,stm32mp157";
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
reserved-memory {
|
||||
gpu_reserved: gpu@f6000000 {
|
||||
reg = <0xf6000000 0x8000000>;
|
||||
no-map;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&cryp1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpu {
|
||||
contiguous-area = <&gpu_reserved>;
|
||||
status = "okay";
|
||||
};
|
||||
6
arch/arm/dts/stm32mp157f-ev1-u-boot.dtsi
Normal file
6
arch/arm/dts/stm32mp157f-ev1-u-boot.dtsi
Normal file
@ -0,0 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright : STMicroelectronics 2019
|
||||
*/
|
||||
|
||||
#include "stm32mp157c-ev1-u-boot.dtsi"
|
||||
84
arch/arm/dts/stm32mp157f-ev1.dts
Normal file
84
arch/arm/dts/stm32mp157f-ev1.dts
Normal file
@ -0,0 +1,84 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
|
||||
/*
|
||||
* Copyright (C) STMicroelectronics 2019 - All Rights Reserved
|
||||
* Author: Alexandre Torgue <alexandre.torgue@st.com> for STMicroelectronics.
|
||||
*/
|
||||
/dts-v1/;
|
||||
|
||||
#include "stm32mp157f-ed1.dts"
|
||||
#include "stm32mp15xx-evx.dtsi"
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
model = "STMicroelectronics STM32MP157F eval daughter on eval mother";
|
||||
compatible = "st,stm32mp157f-ev1", "st,stm32mp157f-ed1", "st,stm32mp157";
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
};
|
||||
|
||||
<dc {
|
||||
status = "okay";
|
||||
|
||||
port {
|
||||
ltdc_ep0_out: endpoint@0 {
|
||||
reg = <0>;
|
||||
remote-endpoint = <&dsi_in>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&dsi {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "okay";
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
dsi_in: endpoint {
|
||||
remote-endpoint = <<dc_ep0_out>;
|
||||
};
|
||||
};
|
||||
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
dsi_out: endpoint {
|
||||
remote-endpoint = <&dsi_panel_in>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
panel_dsi: panel-dsi@0 {
|
||||
compatible = "raydium,rm68200";
|
||||
reg = <0>;
|
||||
reset-gpios = <&gpiof 15 GPIO_ACTIVE_LOW>;
|
||||
backlight = <&panel_backlight>;
|
||||
power-supply = <&v3v3>;
|
||||
status = "okay";
|
||||
|
||||
port {
|
||||
dsi_panel_in: endpoint {
|
||||
remote-endpoint = <&dsi_out>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
gt9147: goodix_ts@5d {
|
||||
compatible = "goodix,gt9147";
|
||||
reg = <0x5d>;
|
||||
panel = <&panel_dsi>;
|
||||
pinctrl-0 = <&goodix_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
|
||||
interrupts = <14 IRQ_TYPE_EDGE_RISING>;
|
||||
interrupt-parent = <&stmfx_pinctrl>;
|
||||
};
|
||||
};
|
||||
13
arch/arm/dts/stm32mp15xa.dtsi
Normal file
13
arch/arm/dts/stm32mp15xa.dtsi
Normal file
@ -0,0 +1,13 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
|
||||
/*
|
||||
* Copyright (C) STMicroelectronics 2019 - All Rights Reserved
|
||||
* Author: Alexandre Torgue <alexandre.torgue@st.com> for STMicroelectronics.
|
||||
*/
|
||||
|
||||
&cpu0_opp_table {
|
||||
opp-650000000 {
|
||||
opp-hz = /bits/ 64 <650000000>;
|
||||
opp-microvolt = <1200000>;
|
||||
opp-supported-hw = <0x1>;
|
||||
};
|
||||
};
|
||||
@ -4,14 +4,16 @@
|
||||
* Author: Alexandre Torgue <alexandre.torgue@st.com> for STMicroelectronics.
|
||||
*/
|
||||
|
||||
#include "stm32mp15xa.dtsi"
|
||||
|
||||
/ {
|
||||
soc {
|
||||
cryp1: cryp@54001000 {
|
||||
compatible = "st,stm32mp1-cryp";
|
||||
reg = <0x54001000 0x400>;
|
||||
interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&rcc CRYP1>;
|
||||
resets = <&rcc CRYP1_R>;
|
||||
clocks = <&scmi0_clk CK_SCMI0_CRYP1>;
|
||||
resets = <&scmi0_reset RST_SCMI0_CRYP1>;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
42
arch/arm/dts/stm32mp15xd.dtsi
Normal file
42
arch/arm/dts/stm32mp15xd.dtsi
Normal file
@ -0,0 +1,42 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
|
||||
/*
|
||||
* Copyright (C) STMicroelectronics 2019 - All Rights Reserved
|
||||
* Author: Alexandre Torgue <alexandre.torgue@st.com> for STMicroelectronics.
|
||||
*/
|
||||
|
||||
&cpu0_opp_table {
|
||||
opp-800000000 {
|
||||
opp-hz = /bits/ 64 <800000000>;
|
||||
opp-microvolt = <1350000>;
|
||||
opp-supported-hw = <0x2>;
|
||||
};
|
||||
opp-400000000 {
|
||||
opp-hz = /bits/ 64 <400000000>;
|
||||
opp-microvolt = <1200000>;
|
||||
opp-supported-hw = <0x2>;
|
||||
opp-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
&cpu_thermal {
|
||||
trips {
|
||||
cpu-crit {
|
||||
temperature = <105000>;
|
||||
hysteresis = <0>;
|
||||
type = "critical";
|
||||
};
|
||||
|
||||
cpu_alert: cpu-alert {
|
||||
temperature = <95000>;
|
||||
hysteresis = <10000>;
|
||||
type = "passive";
|
||||
};
|
||||
};
|
||||
|
||||
cooling-maps {
|
||||
map0 {
|
||||
trip = <&cpu_alert>;
|
||||
cooling-device = <&cpu0 1 1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
20
arch/arm/dts/stm32mp15xf.dtsi
Normal file
20
arch/arm/dts/stm32mp15xf.dtsi
Normal file
@ -0,0 +1,20 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
|
||||
/*
|
||||
* Copyright (C) STMicroelectronics 2019 - All Rights Reserved
|
||||
* Author: Alexandre Torgue <alexandre.torgue@st.com> for STMicroelectronics.
|
||||
*/
|
||||
|
||||
#include "stm32mp15xd.dtsi"
|
||||
|
||||
/ {
|
||||
soc {
|
||||
cryp1: cryp@54001000 {
|
||||
compatible = "st,stm32mp1-cryp";
|
||||
reg = <0x54001000 0x400>;
|
||||
interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&scmi0_clk CK_SCMI0_CRYP1>;
|
||||
resets = <&scmi0_reset RST_SCMI0_CRYP1>;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -171,6 +171,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
#ifndef CONFIG_TFABOOT
|
||||
&rcc {
|
||||
st,clksrc = <
|
||||
CLK_MPU_PLL1P
|
||||
@ -262,6 +263,7 @@
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
};
|
||||
#endif
|
||||
|
||||
&sdmmc1 {
|
||||
u-boot,dm-spl;
|
||||
|
||||
@ -70,6 +70,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
#ifndef CONFIG_TFABOOT
|
||||
&rcc {
|
||||
st,clksrc = <
|
||||
CLK_MPU_PLL1P
|
||||
@ -161,3 +162,4 @@
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
};
|
||||
#endif
|
||||
@ -4,10 +4,19 @@
|
||||
* Author: Alexandre Torgue <alexandre.torgue@st.com> for STMicroelectronics.
|
||||
*/
|
||||
|
||||
#include "stm32mp15-m4-srm.dtsi"
|
||||
#include "stm32mp15-m4-srm-pinctrl.dtsi"
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/mfd/st,stpmic1.h>
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
ethernet0 = ðernet0;
|
||||
serial0 = &uart4;
|
||||
serial1 = &usart3;
|
||||
serial2 = &uart7;
|
||||
};
|
||||
|
||||
memory@c0000000 {
|
||||
device_type = "memory";
|
||||
reg = <0xc0000000 0x20000000>;
|
||||
@ -42,6 +51,12 @@
|
||||
no-map;
|
||||
};
|
||||
|
||||
mcu_rsc_table: mcu_rsc_table@10048000 {
|
||||
compatible = "shared-dma-pool";
|
||||
reg = <0x10048000 0x8000>;
|
||||
no-map;
|
||||
};
|
||||
|
||||
mcuram: mcuram@30000000 {
|
||||
compatible = "shared-dma-pool";
|
||||
reg = <0x30000000 0x40000>;
|
||||
@ -62,7 +77,7 @@
|
||||
|
||||
led {
|
||||
compatible = "gpio-leds";
|
||||
blue {
|
||||
led-blue {
|
||||
label = "heartbeat";
|
||||
gpios = <&gpiod 11 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "heartbeat";
|
||||
@ -72,7 +87,7 @@
|
||||
|
||||
sound {
|
||||
compatible = "audio-graph-card";
|
||||
label = "STM32MP1-DK";
|
||||
label = "STM32MP15-DK";
|
||||
routing =
|
||||
"Playback" , "MCLK",
|
||||
"Capture" , "MCLK",
|
||||
@ -80,6 +95,25 @@
|
||||
dais = <&sai2a_port &sai2b_port &i2s2_port>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
usb_phy_tuning: usb-phy-tuning {
|
||||
st,hs-dc-level = <2>;
|
||||
st,fs-rftime-tuning;
|
||||
st,hs-rftime-reduction;
|
||||
st,hs-current-trim = <15>;
|
||||
st,hs-impedance-trim = <1>;
|
||||
st,squelch-level = <3>;
|
||||
st,hs-rx-offset = <2>;
|
||||
st,no-lsfs-sc;
|
||||
};
|
||||
|
||||
vin: vin {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vin";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
};
|
||||
|
||||
&adc {
|
||||
@ -116,10 +150,6 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&dts {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&cpu0{
|
||||
cpu-supply = <&vddcore>;
|
||||
};
|
||||
@ -128,6 +158,22 @@
|
||||
cpu-supply = <&vddcore>;
|
||||
};
|
||||
|
||||
&crc1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&dma1 {
|
||||
sram = <&dma_pool>;
|
||||
};
|
||||
|
||||
&dma2 {
|
||||
sram = <&dma_pool>;
|
||||
};
|
||||
|
||||
&dts {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
ðernet0 {
|
||||
status = "okay";
|
||||
pinctrl-0 = <ðernet0_rgmii_pins_a>;
|
||||
@ -136,6 +182,8 @@
|
||||
phy-mode = "rgmii-id";
|
||||
max-speed = <1000>;
|
||||
phy-handle = <&phy0>;
|
||||
nvmem-cells = <ðernet_mac_address>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
|
||||
mdio0 {
|
||||
#address-cells = <1>;
|
||||
@ -151,6 +199,10 @@
|
||||
contiguous-area = <&gpu_reserved>;
|
||||
};
|
||||
|
||||
&hash1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c1 {
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&i2c1_pins_a>;
|
||||
@ -238,37 +290,52 @@
|
||||
/delete-property/dmas;
|
||||
/delete-property/dma-names;
|
||||
|
||||
typec: stusb1600@28 {
|
||||
stusb1600@28 {
|
||||
compatible = "st,stusb1600";
|
||||
reg = <0x28>;
|
||||
interrupts = <11 IRQ_TYPE_EDGE_FALLING>;
|
||||
interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
|
||||
interrupt-parent = <&gpioi>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&stusb1600_pins_a>;
|
||||
|
||||
status = "okay";
|
||||
vdd-supply = <&vin>;
|
||||
|
||||
typec_con: connector {
|
||||
connector {
|
||||
compatible = "usb-c-connector";
|
||||
label = "USB-C";
|
||||
power-role = "sink";
|
||||
power-opmode = "default";
|
||||
power-role = "dual";
|
||||
typec-power-opmode = "default";
|
||||
|
||||
port {
|
||||
con_usbotg_hs_ep: endpoint {
|
||||
remote-endpoint = <&usbotg_hs_ep>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
pmic: stpmic@33 {
|
||||
compatible = "st,stpmic1";
|
||||
reg = <0x33>;
|
||||
interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>;
|
||||
interrupts-extended = <&exti_pwr 55 IRQ_TYPE_EDGE_FALLING>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
status = "okay";
|
||||
|
||||
regulators {
|
||||
compatible = "st,stpmic1-regulators";
|
||||
buck1-supply = <&vin>;
|
||||
buck2-supply = <&vin>;
|
||||
buck3-supply = <&vin>;
|
||||
buck4-supply = <&vin>;
|
||||
ldo1-supply = <&v3v3>;
|
||||
ldo2-supply = <&vin>;
|
||||
ldo3-supply = <&vdd_ddr>;
|
||||
ldo4-supply = <&vin>;
|
||||
ldo5-supply = <&vin>;
|
||||
ldo6-supply = <&v3v3>;
|
||||
vref_ddr-supply = <&vin>;
|
||||
boost-supply = <&vin>;
|
||||
pwr_sw1-supply = <&bst_out>;
|
||||
pwr_sw2-supply = <&bst_out>;
|
||||
|
||||
@ -357,23 +424,24 @@
|
||||
vref_ddr: vref_ddr {
|
||||
regulator-name = "vref_ddr";
|
||||
regulator-always-on;
|
||||
regulator-over-current-protection;
|
||||
};
|
||||
|
||||
bst_out: boost {
|
||||
bst_out: boost {
|
||||
regulator-name = "bst_out";
|
||||
interrupts = <IT_OCP_BOOST 0>;
|
||||
};
|
||||
};
|
||||
|
||||
vbus_otg: pwr_sw1 {
|
||||
regulator-name = "vbus_otg";
|
||||
interrupts = <IT_OCP_OTG 0>;
|
||||
};
|
||||
};
|
||||
|
||||
vbus_sw: pwr_sw2 {
|
||||
vbus_sw: pwr_sw2 {
|
||||
regulator-name = "vbus_sw";
|
||||
interrupts = <IT_OCP_SWOUT 0>;
|
||||
regulator-active-discharge = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
onkey {
|
||||
@ -391,6 +459,19 @@
|
||||
};
|
||||
};
|
||||
|
||||
&i2c5 {
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&i2c5_pins_a>;
|
||||
pinctrl-1 = <&i2c5_sleep_pins_a>;
|
||||
i2c-scl-rising-time-ns = <185>;
|
||||
i2c-scl-falling-time-ns = <20>;
|
||||
clock-frequency = <400000>;
|
||||
/* spare dmas for other usage */
|
||||
/delete-property/dmas;
|
||||
/delete-property/dma-names;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&i2s2 {
|
||||
clocks = <&rcc SPI2>, <&rcc SPI2_K>, <&rcc PLL3_Q>, <&rcc PLL3_R>;
|
||||
clock-names = "pclk", "i2sclk", "x8k", "x11k";
|
||||
@ -433,11 +514,12 @@
|
||||
|
||||
&m4_rproc {
|
||||
memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>,
|
||||
<&vdev0vring1>, <&vdev0buffer>;
|
||||
<&vdev0vring1>, <&vdev0buffer>, <&mcu_rsc_table>;
|
||||
mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>;
|
||||
mbox-names = "vq0", "vq1", "shutdown";
|
||||
interrupt-parent = <&exti>;
|
||||
interrupts = <68 1>;
|
||||
wakeup-source;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@ -465,8 +547,6 @@
|
||||
sai2a: audio-controller@4400b004 {
|
||||
#clock-cells = <0>;
|
||||
dma-names = "tx";
|
||||
clocks = <&rcc SAI2_K>;
|
||||
clock-names = "sai_ck";
|
||||
status = "okay";
|
||||
|
||||
sai2a_port: port {
|
||||
@ -524,6 +604,27 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&spi4 {
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&spi4_pins_b>;
|
||||
pinctrl-1 = <&spi4_sleep_pins_b>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&spi5 {
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&spi5_pins_a>;
|
||||
pinctrl-1 = <&spi5_sleep_pins_a>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&sram {
|
||||
dma_pool: dma_pool@0 {
|
||||
reg = <0x50000 0x10000>;
|
||||
pool;
|
||||
};
|
||||
};
|
||||
|
||||
&timers1 {
|
||||
/* spare dmas for other usage */
|
||||
/delete-property/dmas;
|
||||
@ -610,21 +711,50 @@
|
||||
};
|
||||
|
||||
&uart4 {
|
||||
pinctrl-names = "default";
|
||||
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";
|
||||
};
|
||||
|
||||
&uart7 {
|
||||
pinctrl-names = "default", "sleep", "idle";
|
||||
pinctrl-0 = <&uart7_pins_c>;
|
||||
pinctrl-1 = <&uart7_sleep_pins_c>;
|
||||
pinctrl-2 = <&uart7_idle_pins_c>;
|
||||
/delete-property/dmas;
|
||||
/delete-property/dma-names;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&usart3 {
|
||||
pinctrl-names = "default", "sleep", "idle";
|
||||
pinctrl-0 = <&usart3_pins_c>;
|
||||
pinctrl-1 = <&usart3_sleep_pins_c>;
|
||||
pinctrl-2 = <&usart3_idle_pins_c>;
|
||||
uart-has-rtscts;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&usbh_ehci {
|
||||
phys = <&usbphyc_port0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbotg_hs {
|
||||
dr_mode = "peripheral";
|
||||
phys = <&usbphyc_port1 0>;
|
||||
phy-names = "usb2-phy";
|
||||
usb-role-switch;
|
||||
status = "okay";
|
||||
|
||||
port {
|
||||
usbotg_hs_ep: endpoint {
|
||||
remote-endpoint = <&con_usbotg_hs_ep>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&usbphyc {
|
||||
@ -633,10 +763,22 @@
|
||||
|
||||
&usbphyc_port0 {
|
||||
phy-supply = <&vdd_usb>;
|
||||
st,phy-tuning = <&usb_phy_tuning>;
|
||||
|
||||
/*
|
||||
* Hack to keep hub active until all connected devices are suspended
|
||||
* otherwise the hub will be powered off as soon as the v3v3 is disabled
|
||||
* and it can disturb connected devices.
|
||||
*/
|
||||
connector {
|
||||
compatible = "usb-a-connector";
|
||||
vbus-supply = <&v3v3>;
|
||||
};
|
||||
};
|
||||
|
||||
&usbphyc_port1 {
|
||||
phy-supply = <&vdd_usb>;
|
||||
st,phy-tuning = <&usb_phy_tuning>;
|
||||
};
|
||||
|
||||
&vrefbuf {
|
||||
|
||||
419
arch/arm/dts/stm32mp15xx-edx.dtsi
Normal file
419
arch/arm/dts/stm32mp15xx-edx.dtsi
Normal file
@ -0,0 +1,419 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
|
||||
/*
|
||||
* Copyright (C) STMicroelectronics 2017 - All Rights Reserved
|
||||
* Author: Ludovic Barre <ludovic.barre@st.com> for STMicroelectronics.
|
||||
*/
|
||||
|
||||
#include "stm32mp15-m4-srm.dtsi"
|
||||
#include "stm32mp15-m4-srm-pinctrl.dtsi"
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/mfd/st,stpmic1.h>
|
||||
|
||||
/ {
|
||||
memory@c0000000 {
|
||||
device_type = "memory";
|
||||
reg = <0xC0000000 0x40000000>;
|
||||
};
|
||||
|
||||
reserved-memory {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges;
|
||||
|
||||
mcuram2: mcuram2@10000000 {
|
||||
compatible = "shared-dma-pool";
|
||||
reg = <0x10000000 0x40000>;
|
||||
no-map;
|
||||
};
|
||||
|
||||
vdev0vring0: vdev0vring0@10040000 {
|
||||
compatible = "shared-dma-pool";
|
||||
reg = <0x10040000 0x1000>;
|
||||
no-map;
|
||||
};
|
||||
|
||||
vdev0vring1: vdev0vring1@10041000 {
|
||||
compatible = "shared-dma-pool";
|
||||
reg = <0x10041000 0x1000>;
|
||||
no-map;
|
||||
};
|
||||
|
||||
vdev0buffer: vdev0buffer@10042000 {
|
||||
compatible = "shared-dma-pool";
|
||||
reg = <0x10042000 0x4000>;
|
||||
no-map;
|
||||
};
|
||||
|
||||
mcu_rsc_table: mcu_rsc_table@10048000 {
|
||||
compatible = "shared-dma-pool";
|
||||
reg = <0x10048000 0x8000>;
|
||||
no-map;
|
||||
};
|
||||
|
||||
mcuram: mcuram@30000000 {
|
||||
compatible = "shared-dma-pool";
|
||||
reg = <0x30000000 0x40000>;
|
||||
no-map;
|
||||
};
|
||||
|
||||
retram: retram@38000000 {
|
||||
compatible = "shared-dma-pool";
|
||||
reg = <0x38000000 0x10000>;
|
||||
no-map;
|
||||
};
|
||||
};
|
||||
|
||||
aliases {
|
||||
serial0 = &uart4;
|
||||
};
|
||||
|
||||
led {
|
||||
compatible = "gpio-leds";
|
||||
led-blue {
|
||||
label = "heartbeat";
|
||||
gpios = <&gpiod 9 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "heartbeat";
|
||||
default-state = "off";
|
||||
};
|
||||
};
|
||||
|
||||
sd_switch: regulator-sd_switch {
|
||||
compatible = "regulator-gpio";
|
||||
regulator-name = "sd_switch";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <2900000>;
|
||||
regulator-type = "voltage";
|
||||
regulator-always-on;
|
||||
|
||||
gpios = <&gpiof 14 GPIO_ACTIVE_HIGH>;
|
||||
gpios-states = <0>;
|
||||
states = <1800000 0x1>,
|
||||
<2900000 0x0>;
|
||||
};
|
||||
|
||||
vin: vin {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vin";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
};
|
||||
|
||||
&adc {
|
||||
/* ANA0, ANA1 are dedicated pins and don't need pinctrl: only in6. */
|
||||
pinctrl-0 = <&adc1_in6_pins_a>;
|
||||
pinctrl-names = "default";
|
||||
vdd-supply = <&vdd>;
|
||||
vdda-supply = <&vdda>;
|
||||
vref-supply = <&vdda>;
|
||||
status = "disabled";
|
||||
adc1: adc@0 {
|
||||
st,adc-channels = <0 1 6>;
|
||||
/* 16.5 ck_cycles sampling time */
|
||||
st,min-sample-time-nsecs = <400>;
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
&cpu0{
|
||||
cpu-supply = <&vddcore>;
|
||||
};
|
||||
|
||||
&cpu1{
|
||||
cpu-supply = <&vddcore>;
|
||||
};
|
||||
|
||||
&crc1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&dac {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&dac_ch1_pins_a &dac_ch2_pins_a>;
|
||||
vref-supply = <&vdda>;
|
||||
status = "disabled";
|
||||
dac1: dac@1 {
|
||||
status = "okay";
|
||||
};
|
||||
dac2: dac@2 {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
&dma1 {
|
||||
sram = <&dma_pool>;
|
||||
};
|
||||
|
||||
&dma2 {
|
||||
sram = <&dma_pool>;
|
||||
};
|
||||
|
||||
&dts {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&hash1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c4 {
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&i2c4_pins_a>;
|
||||
pinctrl-1 = <&i2c4_sleep_pins_a>;
|
||||
i2c-scl-rising-time-ns = <185>;
|
||||
i2c-scl-falling-time-ns = <20>;
|
||||
clock-frequency = <400000>;
|
||||
status = "okay";
|
||||
/* spare dmas for other usage */
|
||||
/delete-property/dmas;
|
||||
/delete-property/dma-names;
|
||||
|
||||
pmic: stpmic@33 {
|
||||
compatible = "st,stpmic1";
|
||||
reg = <0x33>;
|
||||
interrupts-extended = <&exti_pwr 55 IRQ_TYPE_EDGE_FALLING>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
status = "okay";
|
||||
regulators {
|
||||
compatible = "st,stpmic1-regulators";
|
||||
buck1-supply = <&vin>;
|
||||
buck2-supply = <&vin>;
|
||||
buck3-supply = <&vin>;
|
||||
buck4-supply = <&vin>;
|
||||
ldo1-supply = <&v3v3>;
|
||||
ldo2-supply = <&v3v3>;
|
||||
ldo3-supply = <&vdd_ddr>;
|
||||
ldo4-supply = <&vin>;
|
||||
ldo5-supply = <&v3v3>;
|
||||
ldo6-supply = <&v3v3>;
|
||||
vref_ddr-supply = <&vin>;
|
||||
boost-supply = <&vin>;
|
||||
pwr_sw1-supply = <&bst_out>;
|
||||
pwr_sw2-supply = <&bst_out>;
|
||||
|
||||
vddcore: buck1 {
|
||||
regulator-name = "vddcore";
|
||||
regulator-min-microvolt = <1200000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
regulator-always-on;
|
||||
regulator-initial-mode = <0>;
|
||||
regulator-over-current-protection;
|
||||
};
|
||||
|
||||
vdd_ddr: buck2 {
|
||||
regulator-name = "vdd_ddr";
|
||||
regulator-min-microvolt = <1350000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
regulator-always-on;
|
||||
regulator-initial-mode = <0>;
|
||||
regulator-over-current-protection;
|
||||
};
|
||||
|
||||
vdd: buck3 {
|
||||
regulator-name = "vdd";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-always-on;
|
||||
st,mask-reset;
|
||||
regulator-initial-mode = <0>;
|
||||
regulator-over-current-protection;
|
||||
};
|
||||
|
||||
v3v3: buck4 {
|
||||
regulator-name = "v3v3";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-always-on;
|
||||
regulator-over-current-protection;
|
||||
regulator-initial-mode = <0>;
|
||||
};
|
||||
|
||||
vdda: ldo1 {
|
||||
regulator-name = "vdda";
|
||||
regulator-min-microvolt = <2900000>;
|
||||
regulator-max-microvolt = <2900000>;
|
||||
interrupts = <IT_CURLIM_LDO1 0>;
|
||||
};
|
||||
|
||||
v2v8: ldo2 {
|
||||
regulator-name = "v2v8";
|
||||
regulator-min-microvolt = <2800000>;
|
||||
regulator-max-microvolt = <2800000>;
|
||||
interrupts = <IT_CURLIM_LDO2 0>;
|
||||
};
|
||||
|
||||
vtt_ddr: ldo3 {
|
||||
regulator-name = "vtt_ddr";
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <750000>;
|
||||
regulator-always-on;
|
||||
regulator-over-current-protection;
|
||||
};
|
||||
|
||||
vdd_usb: ldo4 {
|
||||
regulator-name = "vdd_usb";
|
||||
interrupts = <IT_CURLIM_LDO4 0>;
|
||||
};
|
||||
|
||||
vdd_sd: ldo5 {
|
||||
regulator-name = "vdd_sd";
|
||||
regulator-min-microvolt = <2900000>;
|
||||
regulator-max-microvolt = <2900000>;
|
||||
interrupts = <IT_CURLIM_LDO5 0>;
|
||||
regulator-boot-on;
|
||||
};
|
||||
|
||||
v1v8: ldo6 {
|
||||
regulator-name = "v1v8";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
interrupts = <IT_CURLIM_LDO6 0>;
|
||||
};
|
||||
|
||||
vref_ddr: vref_ddr {
|
||||
regulator-name = "vref_ddr";
|
||||
regulator-always-on;
|
||||
regulator-over-current-protection;
|
||||
};
|
||||
|
||||
bst_out: boost {
|
||||
regulator-name = "bst_out";
|
||||
interrupts = <IT_OCP_BOOST 0>;
|
||||
};
|
||||
|
||||
vbus_otg: pwr_sw1 {
|
||||
regulator-name = "vbus_otg";
|
||||
interrupts = <IT_OCP_OTG 0>;
|
||||
};
|
||||
|
||||
vbus_sw: pwr_sw2 {
|
||||
regulator-name = "vbus_sw";
|
||||
interrupts = <IT_OCP_SWOUT 0>;
|
||||
regulator-active-discharge = <1>;
|
||||
};
|
||||
};
|
||||
|
||||
onkey {
|
||||
compatible = "st,stpmic1-onkey";
|
||||
interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 0>;
|
||||
interrupt-names = "onkey-falling", "onkey-rising";
|
||||
power-off-time-sec = <10>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
watchdog {
|
||||
compatible = "st,stpmic1-wdt";
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&ipcc {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&iwdg2 {
|
||||
timeout-sec = <32>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&m4_rproc {
|
||||
memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>,
|
||||
<&vdev0vring1>, <&vdev0buffer>, <&mcu_rsc_table>;
|
||||
mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>;
|
||||
mbox-names = "vq0", "vq1", "shutdown";
|
||||
interrupt-parent = <&exti>;
|
||||
interrupts = <68 1>;
|
||||
wakeup-source;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pwr_regulators {
|
||||
vdd-supply = <&vdd>;
|
||||
vdd_3v3_usbfs-supply = <&vdd_usb>;
|
||||
};
|
||||
|
||||
&rng1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&rtc {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdmmc1 {
|
||||
pinctrl-names = "default", "opendrain", "sleep";
|
||||
pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_a>;
|
||||
pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_dir_pins_a>;
|
||||
pinctrl-2 = <&sdmmc1_b4_sleep_pins_a &sdmmc1_dir_sleep_pins_a>;
|
||||
cd-gpios = <&gpiog 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
disable-wp;
|
||||
st,sig-dir;
|
||||
st,neg-edge;
|
||||
st,use-ckin;
|
||||
bus-width = <4>;
|
||||
vmmc-supply = <&vdd_sd>;
|
||||
vqmmc-supply = <&sd_switch>;
|
||||
sd-uhs-sdr12;
|
||||
sd-uhs-sdr25;
|
||||
sd-uhs-sdr50;
|
||||
sd-uhs-ddr50;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdmmc2 {
|
||||
pinctrl-names = "default", "opendrain", "sleep";
|
||||
pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_a>;
|
||||
pinctrl-1 = <&sdmmc2_b4_od_pins_a &sdmmc2_d47_pins_a>;
|
||||
pinctrl-2 = <&sdmmc2_b4_sleep_pins_a &sdmmc2_d47_sleep_pins_a>;
|
||||
non-removable;
|
||||
no-sd;
|
||||
no-sdio;
|
||||
st,neg-edge;
|
||||
bus-width = <8>;
|
||||
vmmc-supply = <&v3v3>;
|
||||
vqmmc-supply = <&vdd>;
|
||||
mmc-ddr-3_3v;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sram {
|
||||
dma_pool: dma_pool@0 {
|
||||
reg = <0x50000 0x10000>;
|
||||
pool;
|
||||
};
|
||||
};
|
||||
|
||||
&timers6 {
|
||||
status = "okay";
|
||||
/* spare dmas for other usage */
|
||||
/delete-property/dmas;
|
||||
/delete-property/dma-names;
|
||||
timer@5 {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
&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";
|
||||
};
|
||||
|
||||
&usbotg_hs {
|
||||
vbus-supply = <&vbus_otg>;
|
||||
};
|
||||
|
||||
&usbphyc_port0 {
|
||||
phy-supply = <&vdd_usb>;
|
||||
};
|
||||
|
||||
&usbphyc_port1 {
|
||||
phy-supply = <&vdd_usb>;
|
||||
};
|
||||
696
arch/arm/dts/stm32mp15xx-evx.dtsi
Normal file
696
arch/arm/dts/stm32mp15xx-evx.dtsi
Normal file
@ -0,0 +1,696 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
|
||||
/*
|
||||
* Copyright (C) STMicroelectronics 2017 - All Rights Reserved
|
||||
* Author: Ludovic Barre <ludovic.barre@st.com> for STMicroelectronics.
|
||||
*/
|
||||
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/soc/stm32-hdp.h>
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
ethernet0 = ðernet0;
|
||||
serial1 = &usart3;
|
||||
};
|
||||
|
||||
clocks {
|
||||
clk_ext_camera: clk-ext-camera {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <24000000>;
|
||||
};
|
||||
};
|
||||
|
||||
joystick {
|
||||
compatible = "gpio-keys";
|
||||
#size-cells = <0>;
|
||||
pinctrl-0 = <&joystick_pins>;
|
||||
pinctrl-names = "default";
|
||||
button-0 {
|
||||
label = "JoySel";
|
||||
linux,code = <KEY_ENTER>;
|
||||
interrupt-parent = <&stmfx_pinctrl>;
|
||||
interrupts = <0 IRQ_TYPE_EDGE_RISING>;
|
||||
};
|
||||
button-1 {
|
||||
label = "JoyDown";
|
||||
linux,code = <KEY_DOWN>;
|
||||
interrupt-parent = <&stmfx_pinctrl>;
|
||||
interrupts = <1 IRQ_TYPE_EDGE_RISING>;
|
||||
};
|
||||
button-2 {
|
||||
label = "JoyLeft";
|
||||
linux,code = <KEY_LEFT>;
|
||||
interrupt-parent = <&stmfx_pinctrl>;
|
||||
interrupts = <2 IRQ_TYPE_EDGE_RISING>;
|
||||
};
|
||||
button-3 {
|
||||
label = "JoyRight";
|
||||
linux,code = <KEY_RIGHT>;
|
||||
interrupt-parent = <&stmfx_pinctrl>;
|
||||
interrupts = <3 IRQ_TYPE_EDGE_RISING>;
|
||||
};
|
||||
button-4 {
|
||||
label = "JoyUp";
|
||||
linux,code = <KEY_UP>;
|
||||
interrupt-parent = <&stmfx_pinctrl>;
|
||||
interrupts = <4 IRQ_TYPE_EDGE_RISING>;
|
||||
};
|
||||
};
|
||||
|
||||
panel_backlight: panel-backlight {
|
||||
compatible = "gpio-backlight";
|
||||
gpios = <&gpiod 13 GPIO_ACTIVE_LOW>;
|
||||
default-on;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
spdif_out: spdif-out {
|
||||
#sound-dai-cells = <0>;
|
||||
compatible = "linux,spdif-dit";
|
||||
status = "okay";
|
||||
|
||||
spdif_out_port: port {
|
||||
spdif_out_endpoint: endpoint {
|
||||
remote-endpoint = <&sai4a_endpoint>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
spdif_in: spdif-in {
|
||||
#sound-dai-cells = <0>;
|
||||
compatible = "linux,spdif-dir";
|
||||
status = "okay";
|
||||
|
||||
spdif_in_port: port {
|
||||
spdif_in_endpoint: endpoint {
|
||||
remote-endpoint = <&spdifrx_endpoint>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
sound {
|
||||
compatible = "audio-graph-card";
|
||||
label = "STM32MP15-EV";
|
||||
routing =
|
||||
"AIF1CLK" , "MCLK1",
|
||||
"AIF2CLK" , "MCLK1",
|
||||
"IN1LN" , "MICBIAS2",
|
||||
"DMIC2DAT" , "MICBIAS1",
|
||||
"DMIC1DAT" , "MICBIAS1";
|
||||
dais = <&sai2a_port &sai2b_port &sai4a_port &spdifrx_port
|
||||
&dfsdm0_port &dfsdm1_port &dfsdm2_port &dfsdm3_port>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
dmic0: dmic-0 {
|
||||
compatible = "dmic-codec";
|
||||
#sound-dai-cells = <1>;
|
||||
sound-name-prefix = "dmic0";
|
||||
status = "okay";
|
||||
|
||||
port {
|
||||
dmic0_endpoint: endpoint {
|
||||
remote-endpoint = <&dfsdm_endpoint0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
dmic1: dmic-1 {
|
||||
compatible = "dmic-codec";
|
||||
#sound-dai-cells = <1>;
|
||||
sound-name-prefix = "dmic1";
|
||||
status = "okay";
|
||||
|
||||
port {
|
||||
dmic1_endpoint: endpoint {
|
||||
remote-endpoint = <&dfsdm_endpoint1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
dmic2: dmic-2 {
|
||||
compatible = "dmic-codec";
|
||||
#sound-dai-cells = <1>;
|
||||
sound-name-prefix = "dmic2";
|
||||
status = "okay";
|
||||
|
||||
port {
|
||||
dmic2_endpoint: endpoint {
|
||||
remote-endpoint = <&dfsdm_endpoint2>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
dmic3: dmic-3 {
|
||||
compatible = "dmic-codec";
|
||||
#sound-dai-cells = <1>;
|
||||
sound-name-prefix = "dmic3";
|
||||
status = "okay";
|
||||
|
||||
port {
|
||||
dmic3_endpoint: endpoint {
|
||||
remote-endpoint = <&dfsdm_endpoint3>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
usb_phy_tuning: usb-phy-tuning {
|
||||
st,hs-dc-level = <2>;
|
||||
st,fs-rftime-tuning;
|
||||
st,hs-rftime-reduction;
|
||||
st,hs-current-trim = <15>;
|
||||
st,hs-impedance-trim = <1>;
|
||||
st,squelch-level = <3>;
|
||||
st,hs-rx-offset = <2>;
|
||||
st,no-lsfs-sc;
|
||||
};
|
||||
};
|
||||
|
||||
&cec {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&cec_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&dcmi {
|
||||
status = "okay";
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&dcmi_pins_a>;
|
||||
pinctrl-1 = <&dcmi_sleep_pins_a>;
|
||||
|
||||
port {
|
||||
dcmi_0: endpoint {
|
||||
remote-endpoint = <&ov5640_0>;
|
||||
bus-type = <5>;
|
||||
bus-width = <8>;
|
||||
hsync-active = <0>;
|
||||
vsync-active = <0>;
|
||||
pclk-sample = <1>;
|
||||
pclk-max-frequency = <77000000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&dfsdm {
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&dfsdm_clkout_pins_a
|
||||
&dfsdm_data1_pins_a &dfsdm_data3_pins_a>;
|
||||
pinctrl-1 = <&dfsdm_clkout_sleep_pins_a
|
||||
&dfsdm_data1_sleep_pins_a &dfsdm_data3_sleep_pins_a>;
|
||||
spi-max-frequency = <2048000>;
|
||||
|
||||
clocks = <&rcc DFSDM_K>, <&rcc ADFSDM_K>;
|
||||
clock-names = "dfsdm", "audio";
|
||||
status = "okay";
|
||||
|
||||
dfsdm0: filter@0 {
|
||||
compatible = "st,stm32-dfsdm-dmic";
|
||||
st,adc-channels = <3>;
|
||||
st,adc-channel-names = "dmic_u1";
|
||||
st,adc-channel-types = "SPI_R";
|
||||
st,adc-channel-clk-src = "CLKOUT";
|
||||
st,filter-order = <3>;
|
||||
status = "okay";
|
||||
|
||||
asoc_pdm0: dfsdm-dai {
|
||||
compatible = "st,stm32h7-dfsdm-dai";
|
||||
#sound-dai-cells = <0>;
|
||||
io-channels = <&dfsdm0 0>;
|
||||
status = "okay";
|
||||
|
||||
dfsdm0_port: port {
|
||||
dfsdm_endpoint0: endpoint {
|
||||
remote-endpoint = <&dmic0_endpoint>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
dfsdm1: filter@1 {
|
||||
compatible = "st,stm32-dfsdm-dmic";
|
||||
st,adc-channels = <0>;
|
||||
st,adc-channel-names = "dmic_u2";
|
||||
st,adc-channel-types = "SPI_F";
|
||||
st,adc-channel-clk-src = "CLKOUT";
|
||||
st,filter-order = <3>;
|
||||
st,adc-alt-channel = <1>;
|
||||
status = "okay";
|
||||
|
||||
asoc_pdm1: dfsdm-dai {
|
||||
compatible = "st,stm32h7-dfsdm-dai";
|
||||
#sound-dai-cells = <0>;
|
||||
io-channels = <&dfsdm1 0>;
|
||||
status = "okay";
|
||||
|
||||
dfsdm1_port: port {
|
||||
dfsdm_endpoint1: endpoint {
|
||||
remote-endpoint = <&dmic1_endpoint>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
dfsdm2: filter@2 {
|
||||
compatible = "st,stm32-dfsdm-dmic";
|
||||
st,adc-channels = <2>;
|
||||
st,adc-channel-names = "dmic_u3";
|
||||
st,adc-channel-types = "SPI_F";
|
||||
st,adc-channel-clk-src = "CLKOUT";
|
||||
st,adc-alt-channel = <1>;
|
||||
st,filter-order = <3>;
|
||||
status = "okay";
|
||||
|
||||
asoc_pdm2: dfsdm-dai {
|
||||
compatible = "st,stm32h7-dfsdm-dai";
|
||||
#sound-dai-cells = <0>;
|
||||
io-channels = <&dfsdm2 0>;
|
||||
status = "okay";
|
||||
|
||||
dfsdm2_port: port {
|
||||
dfsdm_endpoint2: endpoint {
|
||||
remote-endpoint = <&dmic2_endpoint>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
dfsdm3: filter@3 {
|
||||
compatible = "st,stm32-dfsdm-dmic";
|
||||
st,adc-channels = <1>;
|
||||
st,adc-channel-names = "dmic_u4";
|
||||
st,adc-channel-types = "SPI_R";
|
||||
st,adc-channel-clk-src = "CLKOUT";
|
||||
st,filter-order = <3>;
|
||||
status = "okay";
|
||||
|
||||
asoc_pdm3: dfsdm-dai {
|
||||
compatible = "st,stm32h7-dfsdm-dai";
|
||||
#sound-dai-cells = <0>;
|
||||
io-channels = <&dfsdm3 0>;
|
||||
status = "okay";
|
||||
|
||||
dfsdm3_port: port {
|
||||
dfsdm_endpoint3: endpoint {
|
||||
remote-endpoint = <&dmic3_endpoint>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
ðernet0 {
|
||||
status = "okay";
|
||||
pinctrl-0 = <ðernet0_rgmii_pins_a>;
|
||||
pinctrl-1 = <ðernet0_rgmii_sleep_pins_a>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
phy-mode = "rgmii-id";
|
||||
max-speed = <1000>;
|
||||
phy-handle = <&phy0>;
|
||||
nvmem-cells = <ðernet_mac_address>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
|
||||
mdio0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "snps,dwmac-mdio";
|
||||
phy0: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&fmc {
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&fmc_pins_a>;
|
||||
pinctrl-1 = <&fmc_sleep_pins_a>;
|
||||
status = "okay";
|
||||
|
||||
nand-controller@4,0 {
|
||||
status = "okay";
|
||||
|
||||
nand@0 {
|
||||
reg = <0>;
|
||||
nand-on-flash-bbt;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&hdp {
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&hdp0_pins_a &hdp6_pins_a &hdp7_pins_a>;
|
||||
pinctrl-1 = <&hdp0_pins_sleep_a &hdp6_pins_sleep_a &hdp7_pins_sleep_a>;
|
||||
status = "disabled";
|
||||
|
||||
muxing-hdp = <(STM32_HDP(0, HDP0_GPOVAL_0) |
|
||||
STM32_HDP(6, HDP6_GPOVAL_6) |
|
||||
STM32_HDP(7, HDP7_GPOVAL_7))>;
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&i2c2_pins_a>;
|
||||
pinctrl-1 = <&i2c2_sleep_pins_a>;
|
||||
i2c-scl-rising-time-ns = <185>;
|
||||
i2c-scl-falling-time-ns = <20>;
|
||||
status = "okay";
|
||||
/delete-property/dmas;
|
||||
/delete-property/dma-names;
|
||||
|
||||
wm8994: wm8994@1b {
|
||||
compatible = "wlf,wm8994";
|
||||
#sound-dai-cells = <0>;
|
||||
reg = <0x1b>;
|
||||
status = "okay";
|
||||
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
|
||||
DBVDD-supply = <&vdd>;
|
||||
SPKVDD1-supply = <&vdd>;
|
||||
SPKVDD2-supply = <&vdd>;
|
||||
AVDD2-supply = <&v1v8>;
|
||||
CPVDD-supply = <&v1v8>;
|
||||
|
||||
wlf,ldoena-always-driven;
|
||||
|
||||
clocks = <&sai2a>;
|
||||
clock-names = "MCLK1";
|
||||
|
||||
wlf,gpio-cfg = <0x8101 0xa100 0xa100 0xa100 0xa101 0xa101 0xa100 0xa101 0xa101 0xa101 0xa101>;
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
wm8994_tx_port: port@0 {
|
||||
reg = <0>;
|
||||
wm8994_tx_endpoint: endpoint {
|
||||
remote-endpoint = <&sai2a_endpoint>;
|
||||
};
|
||||
};
|
||||
|
||||
wm8994_rx_port: port@1 {
|
||||
reg = <1>;
|
||||
wm8994_rx_endpoint: endpoint {
|
||||
remote-endpoint = <&sai2b_endpoint>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
ov5640: camera@3c {
|
||||
compatible = "ovti,ov5640";
|
||||
reg = <0x3c>;
|
||||
clocks = <&clk_ext_camera>;
|
||||
clock-names = "xclk";
|
||||
DOVDD-supply = <&v2v8>;
|
||||
powerdown-gpios = <&stmfx_pinctrl 18 (GPIO_ACTIVE_HIGH | GPIO_PUSH_PULL)>;
|
||||
reset-gpios = <&stmfx_pinctrl 19 (GPIO_ACTIVE_LOW | GPIO_PUSH_PULL)>;
|
||||
rotation = <180>;
|
||||
status = "okay";
|
||||
|
||||
port {
|
||||
ov5640_0: endpoint {
|
||||
remote-endpoint = <&dcmi_0>;
|
||||
bus-width = <8>;
|
||||
data-shift = <2>; /* lines 9:2 are used */
|
||||
hsync-active = <0>;
|
||||
vsync-active = <0>;
|
||||
pclk-sample = <1>;
|
||||
pclk-max-frequency = <77000000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
stmfx: stmfx@42 {
|
||||
compatible = "st,stmfx-0300";
|
||||
reg = <0x42>;
|
||||
interrupts = <8 IRQ_TYPE_EDGE_RISING>;
|
||||
interrupt-parent = <&gpioi>;
|
||||
vdd-supply = <&v3v3>;
|
||||
|
||||
stmfx_pinctrl: pinctrl {
|
||||
compatible = "st,stmfx-0300-pinctrl";
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
gpio-ranges = <&stmfx_pinctrl 0 0 24>;
|
||||
|
||||
goodix_pins: goodix {
|
||||
pins = "gpio14";
|
||||
bias-pull-down;
|
||||
};
|
||||
|
||||
joystick_pins: joystick-pins {
|
||||
pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4";
|
||||
bias-pull-down;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2c4 {
|
||||
pmic: stpmic@33 {
|
||||
regulators {
|
||||
v1v8: ldo6 {
|
||||
regulator-enable-ramp-delay = <300000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2c5 {
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&i2c5_pins_a>;
|
||||
pinctrl-1 = <&i2c5_sleep_pins_a>;
|
||||
i2c-scl-rising-time-ns = <185>;
|
||||
i2c-scl-falling-time-ns = <20>;
|
||||
/delete-property/dmas;
|
||||
/delete-property/dma-names;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&m_can1 {
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&m_can1_pins_a>;
|
||||
pinctrl-1 = <&m_can1_sleep_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&qspi {
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a &qspi_bk2_pins_a>;
|
||||
pinctrl-1 = <&qspi_clk_sleep_pins_a &qspi_bk1_sleep_pins_a &qspi_bk2_sleep_pins_a>;
|
||||
reg = <0x58003000 0x1000>, <0x70000000 0x4000000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "okay";
|
||||
|
||||
flash0: mx66l51235l@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-rx-bus-width = <4>;
|
||||
spi-max-frequency = <108000000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
};
|
||||
|
||||
flash1: mx66l51235l@1 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <1>;
|
||||
spi-rx-bus-width = <4>;
|
||||
spi-max-frequency = <108000000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
};
|
||||
};
|
||||
|
||||
&sai2 {
|
||||
clocks = <&rcc SAI2>, <&rcc PLL3_Q>, <&rcc PLL3_R>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&sai2a_pins_a>, <&sai2b_pins_a>;
|
||||
pinctrl-1 = <&sai2a_sleep_pins_a>, <&sai2b_sleep_pins_a>;
|
||||
clock-names = "pclk", "x8k", "x11k";
|
||||
status = "okay";
|
||||
|
||||
sai2a: audio-controller@4400b004 {
|
||||
#clock-cells = <0>;
|
||||
dma-names = "tx";
|
||||
status = "okay";
|
||||
|
||||
sai2a_port: port {
|
||||
sai2a_endpoint: endpoint {
|
||||
remote-endpoint = <&wm8994_tx_endpoint>;
|
||||
format = "i2s";
|
||||
mclk-fs = <256>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
sai2b: audio-controller@4400b024 {
|
||||
dma-names = "rx";
|
||||
clocks = <&rcc SAI2_K>, <&sai2a>;
|
||||
clock-names = "sai_ck", "MCLK";
|
||||
status = "okay";
|
||||
|
||||
sai2b_port: port {
|
||||
sai2b_endpoint: endpoint {
|
||||
remote-endpoint = <&wm8994_rx_endpoint>;
|
||||
format = "i2s";
|
||||
mclk-fs = <256>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&sai4 {
|
||||
clocks = <&rcc SAI4>, <&rcc PLL3_Q>, <&rcc PLL3_R>;
|
||||
clock-names = "pclk", "x8k", "x11k";
|
||||
status = "okay";
|
||||
|
||||
sai4a: audio-controller@50027004 {
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&sai4a_pins_a>;
|
||||
pinctrl-1 = <&sai4a_sleep_pins_a>;
|
||||
dma-names = "tx";
|
||||
st,iec60958;
|
||||
status = "okay";
|
||||
|
||||
sai4a_port: port {
|
||||
sai4a_endpoint: endpoint {
|
||||
remote-endpoint = <&spdif_out_endpoint>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&sdmmc3 {
|
||||
pinctrl-names = "default", "opendrain", "sleep";
|
||||
pinctrl-0 = <&sdmmc3_b4_pins_a>;
|
||||
pinctrl-1 = <&sdmmc3_b4_od_pins_a>;
|
||||
pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>;
|
||||
broken-cd;
|
||||
st,neg-edge;
|
||||
bus-width = <4>;
|
||||
vmmc-supply = <&v3v3>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&spdifrx {
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&spdifrx_pins_a>;
|
||||
pinctrl-1 = <&spdifrx_sleep_pins_a>;
|
||||
status = "okay";
|
||||
|
||||
spdifrx_port: port {
|
||||
spdifrx_endpoint: endpoint {
|
||||
remote-endpoint = <&spdif_in_endpoint>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&spi1 {
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&spi1_pins_a>;
|
||||
pinctrl-1 = <&spi1_sleep_pins_a>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&timers2 {
|
||||
/* spare dmas for other usage (un-delete to enable pwm capture) */
|
||||
/delete-property/dmas;
|
||||
/delete-property/dma-names;
|
||||
status = "disabled";
|
||||
pwm {
|
||||
pinctrl-0 = <&pwm2_pins_a>;
|
||||
pinctrl-1 = <&pwm2_sleep_pins_a>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
status = "okay";
|
||||
};
|
||||
timer@1 {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
&timers8 {
|
||||
/delete-property/dmas;
|
||||
/delete-property/dma-names;
|
||||
status = "disabled";
|
||||
pwm {
|
||||
pinctrl-0 = <&pwm8_pins_a>;
|
||||
pinctrl-1 = <&pwm8_sleep_pins_a>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
status = "okay";
|
||||
};
|
||||
timer@7 {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
&timers12 {
|
||||
/delete-property/dmas;
|
||||
/delete-property/dma-names;
|
||||
status = "disabled";
|
||||
pwm {
|
||||
pinctrl-0 = <&pwm12_pins_a>;
|
||||
pinctrl-1 = <&pwm12_sleep_pins_a>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
status = "okay";
|
||||
};
|
||||
timer@11 {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
&usart3 {
|
||||
pinctrl-names = "default", "sleep", "idle";
|
||||
pinctrl-0 = <&usart3_pins_b>;
|
||||
pinctrl-1 = <&usart3_sleep_pins_b>;
|
||||
pinctrl-2 = <&usart3_idle_pins_b>;
|
||||
/*
|
||||
* HW flow control USART3_RTS is optional, and isn't default wired to
|
||||
* the connector. SB23 needs to be soldered in order to use it, and R77
|
||||
* (ETH_CLK) should be removed.
|
||||
*/
|
||||
uart-has-rtscts;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&usbh_ehci {
|
||||
phys = <&usbphyc_port0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbotg_hs {
|
||||
pinctrl-0 = <&usbotg_hs_pins_a>;
|
||||
pinctrl-names = "default";
|
||||
phys = <&usbphyc_port1 0>;
|
||||
phy-names = "usb2-phy";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbphyc {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbphyc_port0 {
|
||||
st,phy-tuning = <&usb_phy_tuning>;
|
||||
|
||||
/*
|
||||
* Hack to keep hub active until all connected devices are suspended
|
||||
* otherwise the hub will be powered off as soon as the v3v3 is disabled
|
||||
* and it can disturb connected devices.
|
||||
*/
|
||||
connector {
|
||||
compatible = "usb-a-connector";
|
||||
vbus-supply = <&v3v3>;
|
||||
};
|
||||
};
|
||||
|
||||
&usbphyc_port1 {
|
||||
st,phy-tuning = <&usb_phy_tuning>;
|
||||
};
|
||||
@ -114,6 +114,4 @@ struct stm32_gpio_priv {
|
||||
unsigned int gpio_range;
|
||||
};
|
||||
|
||||
int stm32_offset_to_index(struct udevice *dev, unsigned int offset);
|
||||
|
||||
#endif /* _GPIO_H_ */
|
||||
|
||||
@ -35,7 +35,6 @@ void l2_cache_disable(void);
|
||||
void set_section_dcache(int section, enum dcache_option option);
|
||||
|
||||
void arm_init_before_mmu(void);
|
||||
void arm_init_domains(void);
|
||||
void cpu_cache_initialization(void);
|
||||
void dram_bank_mmu_setup(int bank);
|
||||
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
#ifndef _ASM_CONFIG_H_
|
||||
#define _ASM_CONFIG_H_
|
||||
|
||||
#define CONFIG_LMB
|
||||
#define CONFIG_SYS_BOOT_RAMDISK_HIGH
|
||||
|
||||
#if defined(CONFIG_ARCH_LS1021A) || \
|
||||
|
||||
@ -397,20 +397,6 @@ static inline void set_cr(unsigned int val)
|
||||
isb();
|
||||
}
|
||||
|
||||
static inline unsigned int get_dacr(void)
|
||||
{
|
||||
unsigned int val;
|
||||
asm("mrc p15, 0, %0, c3, c0, 0 @ get DACR" : "=r" (val) : : "cc");
|
||||
return val;
|
||||
}
|
||||
|
||||
static inline void set_dacr(unsigned int val)
|
||||
{
|
||||
asm volatile("mcr p15, 0, %0, c3, c0, 0 @ set DACR"
|
||||
: : "r" (val) : "cc");
|
||||
isb();
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ARMV7_LPAE
|
||||
/* Long-Descriptor Translation Table Level 1/2 Bits */
|
||||
#define TTB_SECT_XN_MASK (1ULL << 54)
|
||||
@ -458,6 +444,7 @@ static inline void set_dacr(unsigned int val)
|
||||
|
||||
/* options available for data cache on each page */
|
||||
enum dcache_option {
|
||||
INVALID_ENTRY = 0,
|
||||
DCACHE_OFF = TTB_SECT | TTB_SECT_MAIR(0) | TTB_SECT_XN_MASK,
|
||||
DCACHE_WRITETHROUGH = TTB_SECT | TTB_SECT_MAIR(1),
|
||||
DCACHE_WRITEBACK = TTB_SECT | TTB_SECT_MAIR(2),
|
||||
@ -475,7 +462,7 @@ enum dcache_option {
|
||||
#define TTB_SECT_XN_MASK (1 << 4)
|
||||
#define TTB_SECT_C_MASK (1 << 3)
|
||||
#define TTB_SECT_B_MASK (1 << 2)
|
||||
#define TTB_SECT (2 << 0)
|
||||
#define TTB_SECT (2 << 0)
|
||||
|
||||
/*
|
||||
* Short-descriptor format memory region attributes, without TEX remap
|
||||
@ -488,8 +475,9 @@ enum dcache_option {
|
||||
* 1 1 1 Outer/Inner Write-Back, Read-Allocate Write-Allocate
|
||||
*/
|
||||
enum dcache_option {
|
||||
INVALID_ENTRY = 0,
|
||||
DCACHE_OFF = TTB_SECT_DOMAIN(0) | TTB_SECT_XN_MASK | TTB_SECT,
|
||||
DCACHE_WRITETHROUGH = DCACHE_OFF | TTB_SECT_C_MASK,
|
||||
DCACHE_WRITETHROUGH = TTB_SECT_DOMAIN(0) | TTB_SECT | TTB_SECT_C_MASK,
|
||||
DCACHE_WRITEBACK = DCACHE_WRITETHROUGH | TTB_SECT_B_MASK,
|
||||
DCACHE_WRITEALLOC = DCACHE_WRITEBACK | TTB_SECT_TEX(1),
|
||||
};
|
||||
@ -497,6 +485,7 @@ enum dcache_option {
|
||||
#define TTB_SECT_AP (3 << 10)
|
||||
/* options available for data cache on each page */
|
||||
enum dcache_option {
|
||||
INVALID_ENTRY = 0,
|
||||
DCACHE_OFF = 0x12,
|
||||
DCACHE_WRITETHROUGH = 0x1a,
|
||||
DCACHE_WRITEBACK = 0x1e,
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
|
||||
#include <common.h>
|
||||
#include <cpu_func.h>
|
||||
#include <lmb.h>
|
||||
#include <log.h>
|
||||
#include <asm/system.h>
|
||||
#include <asm/cache.h>
|
||||
@ -21,10 +22,6 @@ __weak void arm_init_before_mmu(void)
|
||||
{
|
||||
}
|
||||
|
||||
__weak void arm_init_domains(void)
|
||||
{
|
||||
}
|
||||
|
||||
static void set_section_phys(int section, phys_addr_t phys,
|
||||
enum dcache_option option)
|
||||
{
|
||||
@ -96,27 +93,33 @@ void mmu_set_region_dcache_behaviour_phys(phys_addr_t start, phys_addr_t phys,
|
||||
mmu_page_table_flush(startpt, stoppt);
|
||||
}
|
||||
|
||||
void mmu_set_region_dcache_behaviour(phys_addr_t start, size_t size,
|
||||
enum dcache_option option)
|
||||
{
|
||||
mmu_set_region_dcache_behaviour_phys(start, start, size, option);
|
||||
}
|
||||
|
||||
__weak void dram_bank_mmu_setup(int bank)
|
||||
{
|
||||
struct bd_info *bd = gd->bd;
|
||||
struct lmb lmb;
|
||||
int i;
|
||||
|
||||
/* bd->bi_dram is available only after relocation */
|
||||
if ((gd->flags & GD_FLG_RELOC) == 0)
|
||||
return;
|
||||
|
||||
/*
|
||||
* don't allow cache on reserved memory tagged 'no-map' in DT
|
||||
* => avoid speculative access to "secure" data
|
||||
*/
|
||||
lmb_init_and_reserve(&lmb, bd, (void *)gd->fdt_blob);
|
||||
|
||||
debug("%s: bank: %d\n", __func__, bank);
|
||||
for (i = bd->bi_dram[bank].start >> MMU_SECTION_SHIFT;
|
||||
i < (bd->bi_dram[bank].start >> MMU_SECTION_SHIFT) +
|
||||
(bd->bi_dram[bank].size >> MMU_SECTION_SHIFT);
|
||||
i++)
|
||||
set_section_dcache(i, DCACHE_DEFAULT_OPTION);
|
||||
i++) {
|
||||
if (lmb_is_reserved_flags(&lmb, i << MMU_SECTION_SHIFT,
|
||||
LMB_NOMAP))
|
||||
set_section_dcache(i, INVALID_ENTRY);
|
||||
else
|
||||
set_section_dcache(i, DCACHE_DEFAULT_OPTION);
|
||||
}
|
||||
}
|
||||
|
||||
/* to activate the MMU we need to set up virtual memory: use 1M areas */
|
||||
@ -202,11 +205,12 @@ static inline void mmu_setup(void)
|
||||
asm volatile("mcr p15, 0, %0, c2, c0, 0"
|
||||
: : "r" (gd->arch.tlb_addr) : "memory");
|
||||
#endif
|
||||
/* Set the access control to all-supervisor */
|
||||
/*
|
||||
* initial value of Domain Access Control Register (DACR)
|
||||
* Set the access control to client (1U) for each of the 16 domains
|
||||
*/
|
||||
asm volatile("mcr p15, 0, %0, c3, c0, 0"
|
||||
: : "r" (~0));
|
||||
|
||||
arm_init_domains();
|
||||
: : "r" (0x55555555));
|
||||
|
||||
/* and enable the mmu */
|
||||
reg = get_cr(); /* get control reg. */
|
||||
@ -313,6 +317,12 @@ int dcache_status(void)
|
||||
{
|
||||
return 0; /* always off */
|
||||
}
|
||||
|
||||
void mmu_set_region_dcache_behaviour(phys_addr_t start, size_t size,
|
||||
enum dcache_option option)
|
||||
{
|
||||
}
|
||||
|
||||
#else
|
||||
void dcache_enable(void)
|
||||
{
|
||||
@ -328,4 +338,10 @@ int dcache_status(void)
|
||||
{
|
||||
return (get_cr() & CR_C) != 0;
|
||||
}
|
||||
|
||||
void mmu_set_region_dcache_behaviour(phys_addr_t start, size_t size,
|
||||
enum dcache_option option)
|
||||
{
|
||||
mmu_set_region_dcache_behaviour_phys(start, start, size, option);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -40,9 +40,6 @@ DECLARE_GLOBAL_DATA_PTR;
|
||||
#define ARMV7_DCACHE_POLICY DCACHE_WRITEBACK & ~TTB_SECT_XN_MASK
|
||||
#endif
|
||||
|
||||
#define ARMV7_DOMAIN_CLIENT 1
|
||||
#define ARMV7_DOMAIN_MASK (0x3 << 0)
|
||||
|
||||
void enable_caches(void)
|
||||
{
|
||||
|
||||
@ -66,17 +63,3 @@ void dram_bank_mmu_setup(int bank)
|
||||
for (i = start; i < end; i++)
|
||||
set_section_dcache(i, ARMV7_DCACHE_POLICY);
|
||||
}
|
||||
|
||||
void arm_init_domains(void)
|
||||
{
|
||||
u32 reg;
|
||||
|
||||
reg = get_dacr();
|
||||
/*
|
||||
* Set DOMAIN to client access so that all permissions
|
||||
* set in pagetables are validated by the mmu.
|
||||
*/
|
||||
reg &= ~ARMV7_DOMAIN_MASK;
|
||||
reg |= ARMV7_DOMAIN_CLIENT;
|
||||
set_dacr(reg);
|
||||
}
|
||||
|
||||
@ -56,6 +56,13 @@ config STM32MP15x
|
||||
dual core A7 for STM32MP157/3, monocore for STM32MP151
|
||||
target all the STMicroelectronics board with SOC STM32MP1 family
|
||||
|
||||
config STM32MP15x_STM32IMAGE
|
||||
bool "Support STM32 image for generated U-Boot image"
|
||||
depends on STM32MP15x && TFABOOT
|
||||
help
|
||||
Support of STM32 image generation for SOC STM32MP15x
|
||||
for TF-A boot when FIP container is not used
|
||||
|
||||
choice
|
||||
prompt "STM32MP15x board select"
|
||||
optional
|
||||
@ -93,6 +100,19 @@ config SYS_TEXT_BASE
|
||||
config NR_DRAM_BANKS
|
||||
default 1
|
||||
|
||||
config DDR_CACHEABLE_SIZE
|
||||
hex "Size of the DDR marked cacheable in pre-reloc stage"
|
||||
default 0x10000000 if TFABOOT
|
||||
default 0x40000000
|
||||
help
|
||||
Define the size of the DDR marked as cacheable in U-Boot
|
||||
pre-reloc stage.
|
||||
This option can be useful to avoid speculatif access
|
||||
to secured area of DDR used by TF-A or OP-TEE before U-Boot
|
||||
initialization.
|
||||
The areas marked "no-map" in device tree should be located
|
||||
before this limit: STM32_DDR_BASE + DDR_CACHEABLE_SIZE.
|
||||
|
||||
config SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_MMC2
|
||||
hex "Partition on MMC2 to use to load U-Boot from"
|
||||
depends on SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
|
||||
@ -108,29 +128,14 @@ config STM32_ETZPC
|
||||
help
|
||||
Say y to enable STM32 Extended TrustZone Protection
|
||||
|
||||
config CMD_STM32PROG
|
||||
bool "command stm32prog for STM32CudeProgrammer"
|
||||
select DFU
|
||||
select DFU_RAM
|
||||
select DFU_VIRT
|
||||
select PARTITION_TYPE_GUID
|
||||
imply CMD_GPT if MMC
|
||||
imply CMD_MTD if MTD
|
||||
imply DFU_MMC if MMC
|
||||
imply DFU_MTD if MTD
|
||||
help
|
||||
activate a specific command stm32prog for STM32MP soc family
|
||||
witch update the device with the tools STM32CubeProgrammer,
|
||||
using UART with STM32 protocol or USB with DFU protocol
|
||||
NB: access to not volatile memory (NOR/NAND/SD/eMMC) is based
|
||||
on U-Boot DFU framework
|
||||
|
||||
config CMD_STM32KEY
|
||||
bool "command stm32key to fuse public key hash"
|
||||
default y
|
||||
default n
|
||||
help
|
||||
fuse public key hash in corresponding fuse used to authenticate
|
||||
binary.
|
||||
This command is used to evaluate the secure boot on stm32mp SOC,
|
||||
it is deactivated by default in real products.
|
||||
|
||||
config PRE_CON_BUF_ADDR
|
||||
default 0xC02FF000
|
||||
@ -164,6 +169,7 @@ config DEBUG_UART_CLOCK
|
||||
default 64000000
|
||||
endif
|
||||
|
||||
source "arch/arm/mach-stm32mp/cmd_stm32prog/Kconfig"
|
||||
source "board/st/stm32mp1/Kconfig"
|
||||
source "board/dhelectronics/dh_stm32mp1/Kconfig"
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ obj-y += bsec.o
|
||||
ifdef CONFIG_SPL_BUILD
|
||||
obj-y += spl.o
|
||||
else
|
||||
obj-$(CONFIG_CMD_STM32PROG) += cmd_stm32prog/
|
||||
obj-y += cmd_stm32prog/
|
||||
obj-$(CONFIG_CMD_STM32KEY) += cmd_stm32key.o
|
||||
obj-$(CONFIG_ARMV7_PSCI) += psci.o
|
||||
obj-$(CONFIG_TFABOOT) += boot_params.o
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <clk.h>
|
||||
#include <dm.h>
|
||||
#include <log.h>
|
||||
#include <misc.h>
|
||||
@ -486,6 +487,15 @@ static int stm32mp_bsec_probe(struct udevice *dev)
|
||||
{
|
||||
int otp;
|
||||
struct stm32mp_bsec_platdata *plat;
|
||||
struct clk_bulk clk_bulk;
|
||||
int ret;
|
||||
|
||||
ret = clk_get_bulk(dev, &clk_bulk);
|
||||
if (!ret) {
|
||||
ret = clk_enable_bulk(&clk_bulk);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* update unlocked shadow for OTP cleared by the rom code
|
||||
|
||||
@ -10,13 +10,30 @@
|
||||
#include <dm/device.h>
|
||||
#include <dm/uclass.h>
|
||||
|
||||
#define STM32_OTP_HASH_KEY_START 24
|
||||
#define STM32_OTP_HASH_KEY_SIZE 8
|
||||
/* Closed device : bit 6 of OPT0*/
|
||||
#define STM32_OTP_CLOSE_ID 0
|
||||
#define STM32_OTP_CLOSE_MASK BIT(6)
|
||||
|
||||
/* HASH of key: 8 OTPs, starting with OTP24) */
|
||||
#define STM32_OTP_HASH_KEY_START 24
|
||||
#define STM32_OTP_HASH_KEY_SIZE 8
|
||||
|
||||
static int get_misc_dev(struct udevice **dev)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = uclass_get_device_by_driver(UCLASS_MISC, DM_GET_DRIVER(stm32mp_bsec), dev);
|
||||
if (ret)
|
||||
pr_err("Can't find stm32mp_bsec driver\n");
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void read_hash_value(u32 addr)
|
||||
{
|
||||
int i;
|
||||
|
||||
printf("Read KEY at 0x%x\n", addr);
|
||||
for (i = 0; i < STM32_OTP_HASH_KEY_SIZE; i++) {
|
||||
printf("OTP value %i: %x\n", STM32_OTP_HASH_KEY_START + i,
|
||||
__be32_to_cpu(*(u32 *)addr));
|
||||
@ -24,32 +41,101 @@ static void read_hash_value(u32 addr)
|
||||
}
|
||||
}
|
||||
|
||||
static void fuse_hash_value(u32 addr, bool print)
|
||||
static int read_hash_otp(bool print, bool *locked, bool *closed)
|
||||
{
|
||||
struct udevice *dev;
|
||||
int i, word, ret;
|
||||
int nb_invalid = 0, nb_zero = 0, nb_lock = 0;
|
||||
u32 val, lock;
|
||||
bool status;
|
||||
|
||||
ret = get_misc_dev(&dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
for (i = 0, word = STM32_OTP_HASH_KEY_START; i < STM32_OTP_HASH_KEY_SIZE; i++, word++) {
|
||||
ret = misc_read(dev, STM32_BSEC_OTP(word), &val, 4);
|
||||
if (ret != 4)
|
||||
val = ~0x0;
|
||||
ret = misc_read(dev, STM32_BSEC_LOCK(word), &lock, 4);
|
||||
if (ret != 4)
|
||||
lock = -1;
|
||||
if (print)
|
||||
printf("OTP HASH %i: %x lock : %d\n", word, val, lock);
|
||||
if (val == ~0x0)
|
||||
nb_invalid++;
|
||||
else if (val == 0x0)
|
||||
nb_zero++;
|
||||
if (lock == 1)
|
||||
nb_lock++;
|
||||
}
|
||||
|
||||
word = STM32_OTP_CLOSE_ID;
|
||||
ret = misc_read(dev, STM32_BSEC_OTP(word), &val, 4);
|
||||
if (ret != 4)
|
||||
val = 0x0;
|
||||
ret = misc_read(dev, STM32_BSEC_LOCK(word), &lock, 4);
|
||||
if (ret != 4)
|
||||
lock = -1;
|
||||
|
||||
status = (val & STM32_OTP_CLOSE_MASK) == STM32_OTP_CLOSE_MASK;
|
||||
if (closed)
|
||||
*closed = status;
|
||||
if (print)
|
||||
printf("OTP %d: closed status: %d lock : %d\n", word, status, lock);
|
||||
|
||||
status = (nb_lock == STM32_OTP_HASH_KEY_SIZE);
|
||||
if (locked)
|
||||
*locked = status;
|
||||
if (!status && print)
|
||||
printf("HASK key is not locked!\n");
|
||||
|
||||
if (nb_invalid == STM32_OTP_HASH_KEY_SIZE) {
|
||||
if (print)
|
||||
printf("HASK key is invalid!\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
if (nb_zero == STM32_OTP_HASH_KEY_SIZE) {
|
||||
if (print)
|
||||
printf("HASK key is free!\n");
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int fuse_hash_value(u32 addr, bool print)
|
||||
{
|
||||
struct udevice *dev;
|
||||
u32 word, val;
|
||||
int i, ret;
|
||||
|
||||
ret = uclass_get_device_by_driver(UCLASS_MISC,
|
||||
DM_GET_DRIVER(stm32mp_bsec),
|
||||
&dev);
|
||||
if (ret) {
|
||||
pr_err("Can't find stm32mp_bsec driver\n");
|
||||
return;
|
||||
}
|
||||
ret = get_misc_dev(&dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
for (i = 0; i < STM32_OTP_HASH_KEY_SIZE; i++) {
|
||||
if (print)
|
||||
printf("Fuse OTP %i : %x\n",
|
||||
STM32_OTP_HASH_KEY_START + i,
|
||||
__be32_to_cpu(*(u32 *)addr));
|
||||
|
||||
word = STM32_OTP_HASH_KEY_START + i;
|
||||
for (i = 0, word = STM32_OTP_HASH_KEY_START;
|
||||
i < STM32_OTP_HASH_KEY_SIZE;
|
||||
i++, word++, addr += 4) {
|
||||
val = __be32_to_cpu(*(u32 *)addr);
|
||||
misc_write(dev, STM32_BSEC_OTP(word), &val, 4);
|
||||
if (print)
|
||||
printf("Fuse OTP %i : %x\n", word, val);
|
||||
|
||||
addr += 4;
|
||||
ret = misc_write(dev, STM32_BSEC_OTP(word), &val, 4);
|
||||
if (ret != 4) {
|
||||
printf("Fuse OTP %i failed\n", word);
|
||||
return ret;
|
||||
}
|
||||
/* on success, lock the OTP for HASH key */
|
||||
val = 1;
|
||||
ret = misc_write(dev, STM32_BSEC_LOCK(word), &val, 4);
|
||||
if (ret != 4) {
|
||||
printf("Lock OTP %i failed\n", word);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int confirm_prog(void)
|
||||
@ -66,36 +152,113 @@ static int confirm_prog(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int do_stm32key(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
char *const argv[])
|
||||
static int do_stm32key_read(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||
{
|
||||
u32 addr;
|
||||
const char *op = argc >= 2 ? argv[1] : NULL;
|
||||
int confirmed = argc > 3 && !strcmp(argv[2], "-y");
|
||||
|
||||
argc -= 2 + confirmed;
|
||||
argv += 2 + confirmed;
|
||||
if (argc == 1) {
|
||||
read_hash_otp(true, NULL, NULL);
|
||||
return CMD_RET_SUCCESS;
|
||||
}
|
||||
|
||||
if (argc < 1)
|
||||
return CMD_RET_USAGE;
|
||||
|
||||
addr = simple_strtoul(argv[0], NULL, 16);
|
||||
addr = simple_strtoul(argv[1], NULL, 16);
|
||||
if (!addr)
|
||||
return CMD_RET_USAGE;
|
||||
|
||||
if (!strcmp(op, "read"))
|
||||
read_hash_value(addr);
|
||||
|
||||
if (!strcmp(op, "fuse")) {
|
||||
if (!confirmed && !confirm_prog())
|
||||
return CMD_RET_FAILURE;
|
||||
fuse_hash_value(addr, !confirmed);
|
||||
}
|
||||
read_hash_value(addr);
|
||||
|
||||
return CMD_RET_SUCCESS;
|
||||
}
|
||||
|
||||
U_BOOT_CMD(stm32key, 4, 1, do_stm32key,
|
||||
"Fuse ST Hash key",
|
||||
"read <addr>: Read the hash store at addr in memory\n"
|
||||
"stm32key fuse [-y] <addr> : Fuse hash store at addr in otp\n");
|
||||
static int do_stm32key_fuse(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||
{
|
||||
u32 addr;
|
||||
bool yes = false, lock, closed;
|
||||
|
||||
if (argc < 2)
|
||||
return CMD_RET_USAGE;
|
||||
|
||||
if (argc == 3) {
|
||||
if (strcmp(argv[1], "-y"))
|
||||
return CMD_RET_USAGE;
|
||||
yes = true;
|
||||
}
|
||||
|
||||
addr = simple_strtoul(argv[argc - 1], NULL, 16);
|
||||
if (!addr)
|
||||
return CMD_RET_USAGE;
|
||||
|
||||
if (read_hash_otp(!yes, &lock, &closed) != -ENOENT) {
|
||||
printf("Error: can't fuse again the OTP\n");
|
||||
return CMD_RET_FAILURE;
|
||||
}
|
||||
|
||||
if (lock || closed) {
|
||||
printf("Error: invalid OTP configuration (lock=%d, closed=%d)\n", lock, closed);
|
||||
return CMD_RET_FAILURE;
|
||||
}
|
||||
|
||||
if (!yes && !confirm_prog())
|
||||
return CMD_RET_FAILURE;
|
||||
|
||||
if (fuse_hash_value(addr, !yes))
|
||||
return CMD_RET_FAILURE;
|
||||
|
||||
printf("Hash key updated !\n");
|
||||
|
||||
return CMD_RET_SUCCESS;
|
||||
}
|
||||
|
||||
static int do_stm32key_close(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||
{
|
||||
bool yes, lock, closed;
|
||||
struct udevice *dev;
|
||||
u32 val;
|
||||
int ret;
|
||||
|
||||
yes = false;
|
||||
if (argc == 2) {
|
||||
if (strcmp(argv[1], "-y"))
|
||||
return CMD_RET_USAGE;
|
||||
yes = true;
|
||||
}
|
||||
|
||||
if (read_hash_otp(!yes, &lock, &closed))
|
||||
return CMD_RET_FAILURE;
|
||||
|
||||
if (closed) {
|
||||
printf("Error: already closed!\n");
|
||||
return CMD_RET_FAILURE;
|
||||
}
|
||||
|
||||
if (!lock)
|
||||
printf("Warning: OTP not locked, revocation is possible!\n");
|
||||
|
||||
if (!yes && !confirm_prog())
|
||||
return CMD_RET_FAILURE;
|
||||
|
||||
ret = get_misc_dev(&dev);
|
||||
if (ret)
|
||||
return CMD_RET_FAILURE;
|
||||
|
||||
val = STM32_OTP_CLOSE_MASK;
|
||||
ret = misc_write(dev, STM32_BSEC_OTP(STM32_OTP_CLOSE_ID), &val, 4);
|
||||
if (ret != 4) {
|
||||
printf("Error: can't update OTP\n");
|
||||
return CMD_RET_FAILURE;
|
||||
}
|
||||
|
||||
printf("Device is closed !\n");
|
||||
|
||||
return CMD_RET_SUCCESS;
|
||||
}
|
||||
|
||||
static char stm32key_help_text[] =
|
||||
"read [<addr>]: Read the hash stored at addr in memory or in OTP\n"
|
||||
"stm32key fuse [-y] <addr> : Fuse hash stored at addr in OTP\n"
|
||||
"stm32key close [-y] : Close the device, the hash stored in OTP\n";
|
||||
|
||||
U_BOOT_CMD_WITH_SUBCMDS(stm32key, "Fuse ST Hash key", stm32key_help_text,
|
||||
U_BOOT_SUBCMD_MKENT(read, 2, 0, do_stm32key_read),
|
||||
U_BOOT_SUBCMD_MKENT(fuse, 3, 0, do_stm32key_fuse),
|
||||
U_BOOT_SUBCMD_MKENT(close, 2, 0, do_stm32key_close));
|
||||
|
||||
34
arch/arm/mach-stm32mp/cmd_stm32prog/Kconfig
Normal file
34
arch/arm/mach-stm32mp/cmd_stm32prog/Kconfig
Normal file
@ -0,0 +1,34 @@
|
||||
|
||||
config CMD_STM32PROG
|
||||
bool "command stm32prog for STM32CudeProgrammer"
|
||||
select DFU
|
||||
select DFU_RAM
|
||||
select DFU_VIRT
|
||||
select PARTITION_TYPE_GUID
|
||||
imply CMD_GPT if MMC
|
||||
imply CMD_MTD if MTD
|
||||
imply DFU_MMC if MMC
|
||||
imply DFU_MTD if MTD
|
||||
help
|
||||
activate a specific command stm32prog for STM32MP soc family
|
||||
witch update the device with the tools STM32CubeProgrammer
|
||||
NB: access to not volatile memory (NOR/NAND/SD/eMMC) is based
|
||||
on U-Boot DFU framework
|
||||
|
||||
config CMD_STM32PROG_USB
|
||||
bool "support stm32prog over USB"
|
||||
depends on CMD_STM32PROG
|
||||
default y
|
||||
help
|
||||
activate the command "stm32prog usb" for STM32MP soc family
|
||||
witch update the device with the tools STM32CubeProgrammer,
|
||||
using USB with DFU protocol
|
||||
|
||||
config CMD_STM32PROG_SERIAL
|
||||
bool "support stm32prog over UART"
|
||||
depends on CMD_STM32PROG
|
||||
default y
|
||||
help
|
||||
activate the command "stm32prog serial" for STM32MP soc family
|
||||
with the tools STM32CubeProgrammer using U-Boot serial device
|
||||
and UART protocol.
|
||||
@ -3,7 +3,7 @@
|
||||
# Copyright (C) 2020, STMicroelectronics - All Rights Reserved
|
||||
#
|
||||
|
||||
obj-y += cmd_stm32prog.o
|
||||
obj-y += stm32prog.o
|
||||
obj-y += stm32prog_serial.o
|
||||
obj-y += stm32prog_usb.o
|
||||
obj-$(CONFIG_CMD_STM32PROG) += cmd_stm32prog.o
|
||||
obj-$(CONFIG_CMD_STM32PROG) += stm32prog.o
|
||||
obj-$(CONFIG_CMD_STM32PROG_SERIAL) += stm32prog_serial.o
|
||||
obj-$(CONFIG_CMD_STM32PROG_USB) += stm32prog_usb.o
|
||||
|
||||
@ -45,14 +45,13 @@ static int do_stm32prog(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
bool reset = false;
|
||||
struct image_header_s header;
|
||||
struct stm32prog_data *data;
|
||||
u32 uimage, dtb;
|
||||
|
||||
if (argc < 3 || argc > 5)
|
||||
return CMD_RET_USAGE;
|
||||
|
||||
if (!strcmp(argv[1], "usb"))
|
||||
if (IS_ENABLED(CONFIG_CMD_STM32PROG_USB) && !strcmp(argv[1], "usb"))
|
||||
link = LINK_USB;
|
||||
else if (!strcmp(argv[1], "serial"))
|
||||
else if (IS_ENABLED(CONFIG_CMD_STM32PROG_SERIAL) && !strcmp(argv[1], "serial"))
|
||||
link = LINK_SERIAL;
|
||||
|
||||
if (link == LINK_UNDEFINED) {
|
||||
@ -73,15 +72,18 @@ static int do_stm32prog(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
size = simple_strtoul(argv[4], NULL, 16);
|
||||
|
||||
/* check STM32IMAGE presence */
|
||||
if (size == 0 &&
|
||||
!stm32prog_header_check((struct raw_header_s *)addr, &header)) {
|
||||
size = header.image_length + BL_HEADER_SIZE;
|
||||
if (size == 0) {
|
||||
stm32prog_header_check((struct raw_header_s *)addr, &header);
|
||||
if (header.type == HEADER_STM32IMAGE) {
|
||||
size = header.image_length + BL_HEADER_SIZE;
|
||||
|
||||
/* uImage detected in STM32IMAGE, execute the script */
|
||||
if (IMAGE_FORMAT_LEGACY ==
|
||||
genimg_get_format((void *)(addr + BL_HEADER_SIZE)))
|
||||
return image_source_script(addr + BL_HEADER_SIZE,
|
||||
"script@1");
|
||||
#if defined(CONFIG_LEGACY_IMAGE_FORMAT)
|
||||
/* uImage detected in STM32IMAGE, execute the script */
|
||||
if (IMAGE_FORMAT_LEGACY ==
|
||||
genimg_get_format((void *)(addr + BL_HEADER_SIZE)))
|
||||
return image_source_script(addr + BL_HEADER_SIZE, "script@1");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
if (IS_ENABLED(CONFIG_DM_VIDEO))
|
||||
@ -97,7 +99,7 @@ static int do_stm32prog(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
|
||||
ret = stm32prog_init(data, addr, size);
|
||||
if (ret)
|
||||
printf("Invalid or missing layout file.");
|
||||
log_debug("Invalid or missing layout file at 0x%lx.\n", addr);
|
||||
|
||||
/* prepare DFU for device read/write */
|
||||
ret = stm32prog_dfu_init(data);
|
||||
@ -118,21 +120,23 @@ static int do_stm32prog(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
uimage = data->uimage;
|
||||
dtb = data->dtb;
|
||||
|
||||
stm32prog_clean(data);
|
||||
free(stm32prog_data);
|
||||
stm32prog_data = NULL;
|
||||
|
||||
puts("Download done\n");
|
||||
|
||||
if (uimage) {
|
||||
if (data->uimage) {
|
||||
char boot_addr_start[20];
|
||||
char dtb_addr[20];
|
||||
char initrd_addr[40];
|
||||
char *bootm_argv[5] = {
|
||||
"bootm", boot_addr_start, "-", dtb_addr, NULL
|
||||
};
|
||||
u32 uimage = data->uimage;
|
||||
u32 dtb = data->dtb;
|
||||
u32 initrd = data->initrd;
|
||||
|
||||
if (!dtb)
|
||||
bootm_argv[3] = env_get("fdtcontroladdr");
|
||||
else
|
||||
@ -141,8 +145,15 @@ static int do_stm32prog(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
|
||||
snprintf(boot_addr_start, sizeof(boot_addr_start) - 1,
|
||||
"0x%x", uimage);
|
||||
printf("Booting kernel at %s - %s...\n\n\n",
|
||||
boot_addr_start, bootm_argv[3]);
|
||||
|
||||
if (initrd) {
|
||||
snprintf(initrd_addr, sizeof(initrd_addr) - 1, "0x%x:0x%x",
|
||||
initrd, data->initrd_size);
|
||||
bootm_argv[2] = initrd_addr;
|
||||
}
|
||||
|
||||
printf("Booting kernel at %s %s %s...\n\n\n",
|
||||
boot_addr_start, bootm_argv[2], bootm_argv[3]);
|
||||
/* Try bootm for legacy and FIT format image */
|
||||
if (genimg_get_format((void *)uimage) != IMAGE_FORMAT_INVALID)
|
||||
do_bootm(cmdtp, 0, 4, bootm_argv);
|
||||
@ -166,14 +177,15 @@ cleanup:
|
||||
}
|
||||
|
||||
U_BOOT_CMD(stm32prog, 5, 0, do_stm32prog,
|
||||
"start communication with tools STM32Cubeprogrammer",
|
||||
"<link> <dev> [<addr>] [<size>]\n"
|
||||
"start communication with tools STM32Cubeprogrammer on <link> with Flashlayout at <addr>",
|
||||
"<link> = serial|usb\n"
|
||||
"<dev> = device instance\n"
|
||||
"<addr> = address of flashlayout\n"
|
||||
"<size> = size of flashlayout\n"
|
||||
" <link> = serial|usb\n"
|
||||
" <dev> = device instance\n"
|
||||
" <addr> = address of flashlayout\n"
|
||||
" <size> = size of flashlayout (optional for image with STM32 header)\n"
|
||||
);
|
||||
|
||||
#ifdef CONFIG_STM32MP15x_STM32IMAGE
|
||||
bool stm32prog_get_tee_partitions(void)
|
||||
{
|
||||
if (stm32prog_data)
|
||||
@ -181,6 +193,7 @@ bool stm32prog_get_tee_partitions(void)
|
||||
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool stm32prog_get_fsbl_nor(void)
|
||||
{
|
||||
|
||||
@ -59,8 +59,6 @@ static const efi_guid_t uuid_mmc[3] = {
|
||||
ROOTFS_MMC2_UUID
|
||||
};
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
/* order of column in flash layout file */
|
||||
enum stm32prog_col_t {
|
||||
COL_OPTION,
|
||||
@ -72,6 +70,16 @@ enum stm32prog_col_t {
|
||||
COL_NB_STM32
|
||||
};
|
||||
|
||||
#define FIP_TOC_HEADER_NAME 0xAA640001
|
||||
|
||||
struct fip_toc_header {
|
||||
u32 name;
|
||||
u32 serial_number;
|
||||
u64 flags;
|
||||
};
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
/* partition handling routines : CONFIG_CMD_MTDPARTS */
|
||||
int mtdparts_init(void);
|
||||
int find_dev_and_part(const char *id, struct mtd_device **dev,
|
||||
@ -87,46 +95,57 @@ char *stm32prog_get_error(struct stm32prog_data *data)
|
||||
return data->error;
|
||||
}
|
||||
|
||||
u8 stm32prog_header_check(struct raw_header_s *raw_header,
|
||||
struct image_header_s *header)
|
||||
static bool stm32prog_is_fip_header(struct fip_toc_header *header)
|
||||
{
|
||||
return (header->name == FIP_TOC_HEADER_NAME) && header->serial_number;
|
||||
}
|
||||
|
||||
void stm32prog_header_check(struct raw_header_s *raw_header,
|
||||
struct image_header_s *header)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
header->present = 0;
|
||||
if (!raw_header || !header) {
|
||||
pr_debug("%s:no header data\n", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
header->type = HEADER_NONE;
|
||||
header->image_checksum = 0x0;
|
||||
header->image_length = 0x0;
|
||||
|
||||
if (!raw_header || !header) {
|
||||
pr_debug("%s:no header data\n", __func__);
|
||||
return -1;
|
||||
if (stm32prog_is_fip_header((struct fip_toc_header *)raw_header)) {
|
||||
header->type = HEADER_FIP;
|
||||
return;
|
||||
}
|
||||
|
||||
if (raw_header->magic_number !=
|
||||
(('S' << 0) | ('T' << 8) | ('M' << 16) | (0x32 << 24))) {
|
||||
pr_debug("%s:invalid magic number : 0x%x\n",
|
||||
__func__, raw_header->magic_number);
|
||||
return -2;
|
||||
return;
|
||||
}
|
||||
/* only header v1.0 supported */
|
||||
if (raw_header->header_version != 0x00010000) {
|
||||
pr_debug("%s:invalid header version : 0x%x\n",
|
||||
__func__, raw_header->header_version);
|
||||
return -3;
|
||||
return;
|
||||
}
|
||||
if (raw_header->reserved1 != 0x0 || raw_header->reserved2) {
|
||||
pr_debug("%s:invalid reserved field\n", __func__);
|
||||
return -4;
|
||||
return;
|
||||
}
|
||||
for (i = 0; i < (sizeof(raw_header->padding) / 4); i++) {
|
||||
if (raw_header->padding[i] != 0) {
|
||||
pr_debug("%s:invalid padding field\n", __func__);
|
||||
return -5;
|
||||
return;
|
||||
}
|
||||
}
|
||||
header->present = 1;
|
||||
header->type = HEADER_STM32IMAGE;
|
||||
header->image_checksum = le32_to_cpu(raw_header->image_checksum);
|
||||
header->image_length = le32_to_cpu(raw_header->image_length);
|
||||
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
static u32 stm32prog_header_checksum(u32 addr, struct image_header_s *header)
|
||||
@ -349,23 +368,24 @@ static int parse_flash_layout(struct stm32prog_data *data,
|
||||
bool end_of_line, eof;
|
||||
char *p, *start, *last, *col;
|
||||
struct stm32prog_part_t *part;
|
||||
struct image_header_s header;
|
||||
int part_list_size;
|
||||
int i;
|
||||
|
||||
data->part_nb = 0;
|
||||
|
||||
/* check if STM32image is detected */
|
||||
if (!stm32prog_header_check((struct raw_header_s *)addr,
|
||||
&data->header)) {
|
||||
stm32prog_header_check((struct raw_header_s *)addr, &header);
|
||||
if (header.type == HEADER_STM32IMAGE) {
|
||||
u32 checksum;
|
||||
|
||||
addr = addr + BL_HEADER_SIZE;
|
||||
size = data->header.image_length;
|
||||
size = header.image_length;
|
||||
|
||||
checksum = stm32prog_header_checksum(addr, &data->header);
|
||||
if (checksum != data->header.image_checksum) {
|
||||
checksum = stm32prog_header_checksum(addr, &header);
|
||||
if (checksum != header.image_checksum) {
|
||||
stm32prog_err("Layout: invalid checksum : 0x%x expected 0x%x",
|
||||
checksum, data->header.image_checksum);
|
||||
checksum, header.image_checksum);
|
||||
return -EIO;
|
||||
}
|
||||
}
|
||||
@ -768,9 +788,8 @@ static int init_device(struct stm32prog_data *data,
|
||||
part_found = true;
|
||||
}
|
||||
|
||||
/* no partition for this device */
|
||||
if (!part_found) {
|
||||
stm32prog_err("%s (0x%x): Invalid partition",
|
||||
part->name, part->id);
|
||||
pr_debug("\n");
|
||||
continue;
|
||||
}
|
||||
@ -804,7 +823,9 @@ static int treat_partition_list(struct stm32prog_data *data)
|
||||
INIT_LIST_HEAD(&data->dev[j].part_list);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_STM32MP15x_STM32IMAGE
|
||||
data->tee_detected = false;
|
||||
#endif
|
||||
data->fsbl_nor_detected = false;
|
||||
for (i = 0; i < data->part_nb; i++) {
|
||||
part = &data->part_array[i];
|
||||
@ -858,10 +879,12 @@ static int treat_partition_list(struct stm32prog_data *data)
|
||||
/* fallthrough */
|
||||
case STM32PROG_NAND:
|
||||
case STM32PROG_SPI_NAND:
|
||||
#ifdef CONFIG_STM32MP15x_STM32IMAGE
|
||||
if (!data->tee_detected &&
|
||||
!strncmp(part->name, "tee", 3))
|
||||
data->tee_detected = true;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -1130,7 +1153,10 @@ static int dfu_init_entities(struct stm32prog_data *data)
|
||||
struct dfu_entity *dfu;
|
||||
int alt_nb;
|
||||
|
||||
alt_nb = 3; /* number of virtual = CMD, OTP, PMIC*/
|
||||
alt_nb = 2; /* number of virtual = CMD, OTP*/
|
||||
if (CONFIG_IS_ENABLED(DM_PMIC))
|
||||
alt_nb++; /* PMIC NVMEM*/
|
||||
|
||||
if (data->part_nb == 0)
|
||||
alt_nb++; /* +1 for FlashLayout */
|
||||
else
|
||||
@ -1176,13 +1202,13 @@ static int dfu_init_entities(struct stm32prog_data *data)
|
||||
}
|
||||
|
||||
if (!ret)
|
||||
ret = stm32prog_alt_add_virt(dfu, "virtual", PHASE_CMD, 512);
|
||||
ret = stm32prog_alt_add_virt(dfu, "virtual", PHASE_CMD, CMD_SIZE);
|
||||
|
||||
if (!ret)
|
||||
ret = stm32prog_alt_add_virt(dfu, "OTP", PHASE_OTP, 512);
|
||||
ret = stm32prog_alt_add_virt(dfu, "OTP", PHASE_OTP, OTP_SIZE);
|
||||
|
||||
if (!ret && CONFIG_IS_ENABLED(DM_PMIC))
|
||||
ret = stm32prog_alt_add_virt(dfu, "PMIC", PHASE_PMIC, 8);
|
||||
ret = stm32prog_alt_add_virt(dfu, "PMIC", PHASE_PMIC, PMIC_SIZE);
|
||||
|
||||
if (ret)
|
||||
stm32prog_err("dfu init failed: %d", ret);
|
||||
@ -1410,7 +1436,7 @@ static int stm32prog_copy_fsbl(struct stm32prog_part_t *part)
|
||||
|
||||
if (part->target != STM32PROG_NAND &&
|
||||
part->target != STM32PROG_SPI_NAND)
|
||||
return -1;
|
||||
return -EINVAL;
|
||||
|
||||
dfu = dfu_get_entity(part->alt_id);
|
||||
|
||||
@ -1420,8 +1446,10 @@ static int stm32prog_copy_fsbl(struct stm32prog_part_t *part)
|
||||
ret = dfu->read_medium(dfu, 0, (void *)&raw_header, &size);
|
||||
if (ret)
|
||||
return ret;
|
||||
if (stm32prog_header_check(&raw_header, &header))
|
||||
return -1;
|
||||
|
||||
stm32prog_header_check(&raw_header, &header);
|
||||
if (header.type != HEADER_STM32IMAGE)
|
||||
return -ENOENT;
|
||||
|
||||
/* read header + payload */
|
||||
size = header.image_length + BL_HEADER_SIZE;
|
||||
@ -1451,7 +1479,7 @@ error:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void stm32prog_end_phase(struct stm32prog_data *data)
|
||||
static void stm32prog_end_phase(struct stm32prog_data *data, u64 offset)
|
||||
{
|
||||
if (data->phase == PHASE_FLASHLAYOUT) {
|
||||
if (parse_flash_layout(data, STM32_DDR_BASE, 0))
|
||||
@ -1467,6 +1495,10 @@ static void stm32prog_end_phase(struct stm32prog_data *data)
|
||||
data->uimage = data->cur_part->addr;
|
||||
if (data->cur_part->part_type == PART_FILESYSTEM)
|
||||
data->dtb = data->cur_part->addr;
|
||||
if (data->cur_part->part_type == PART_BINARY) {
|
||||
data->initrd = data->cur_part->addr;
|
||||
data->initrd_size = offset;
|
||||
}
|
||||
}
|
||||
|
||||
if (CONFIG_IS_ENABLED(MMC) &&
|
||||
@ -1706,7 +1738,6 @@ void stm32prog_clean(struct stm32prog_data *data)
|
||||
free(data->part_array);
|
||||
free(data->otp_part);
|
||||
free(data->buffer);
|
||||
free(data->header_data);
|
||||
}
|
||||
|
||||
/* DFU callback: used after serial and direct DFU USB access */
|
||||
@ -1726,7 +1757,7 @@ void dfu_flush_callback(struct dfu_entity *dfu)
|
||||
if (dfu->dev_type == DFU_DEV_RAM) {
|
||||
if (dfu->alt == 0 &&
|
||||
stm32prog_data->phase == PHASE_FLASHLAYOUT) {
|
||||
stm32prog_end_phase(stm32prog_data);
|
||||
stm32prog_end_phase(stm32prog_data, dfu->offset);
|
||||
/* waiting DFU DETACH for reenumeration */
|
||||
}
|
||||
}
|
||||
@ -1735,7 +1766,7 @@ void dfu_flush_callback(struct dfu_entity *dfu)
|
||||
return;
|
||||
|
||||
if (dfu->alt == stm32prog_data->cur_part->alt_id) {
|
||||
stm32prog_end_phase(stm32prog_data);
|
||||
stm32prog_end_phase(stm32prog_data, dfu->offset);
|
||||
stm32prog_next_phase(stm32prog_data);
|
||||
}
|
||||
}
|
||||
@ -1755,3 +1786,17 @@ void dfu_initiated_callback(struct dfu_entity *dfu)
|
||||
pr_debug("dfu offset = 0x%llx\n", dfu->offset);
|
||||
}
|
||||
}
|
||||
|
||||
void dfu_error_callback(struct dfu_entity *dfu, const char *msg)
|
||||
{
|
||||
struct stm32prog_data *data = stm32prog_data;
|
||||
|
||||
if (!stm32prog_data)
|
||||
return;
|
||||
|
||||
if (!stm32prog_data->cur_part)
|
||||
return;
|
||||
|
||||
if (dfu->alt == stm32prog_data->cur_part->alt_id)
|
||||
stm32prog_err(msg);
|
||||
}
|
||||
|
||||
@ -19,6 +19,7 @@
|
||||
|
||||
#define DEFAULT_ADDRESS 0xFFFFFFFF
|
||||
|
||||
#define CMD_SIZE 512
|
||||
#define OTP_SIZE 1024
|
||||
#define PMIC_SIZE 8
|
||||
|
||||
@ -37,8 +38,14 @@ enum stm32prog_link_t {
|
||||
LINK_UNDEFINED,
|
||||
};
|
||||
|
||||
enum stm32prog_header_t {
|
||||
HEADER_NONE,
|
||||
HEADER_STM32IMAGE,
|
||||
HEADER_FIP,
|
||||
};
|
||||
|
||||
struct image_header_s {
|
||||
bool present;
|
||||
enum stm32prog_header_t type;
|
||||
u32 image_checksum;
|
||||
u32 image_length;
|
||||
};
|
||||
@ -115,7 +122,9 @@ struct stm32prog_data {
|
||||
struct stm32prog_dev_t dev[STM32PROG_MAX_DEV]; /* array of device */
|
||||
int part_nb; /* nb of partition */
|
||||
struct stm32prog_part_t *part_array; /* array of partition */
|
||||
#ifdef CONFIG_STM32MP15x_STM32IMAGE
|
||||
bool tee_detected;
|
||||
#endif
|
||||
bool fsbl_nor_detected;
|
||||
|
||||
/* command internal information */
|
||||
@ -126,14 +135,9 @@ struct stm32prog_data {
|
||||
u32 *otp_part;
|
||||
u8 pmic_part[PMIC_SIZE];
|
||||
|
||||
/* STM32 header information */
|
||||
struct raw_header_s *header_data;
|
||||
struct image_header_s header;
|
||||
|
||||
/* SERIAL information */
|
||||
u32 cursor;
|
||||
u32 packet_number;
|
||||
u32 checksum;
|
||||
u8 *buffer; /* size = USART_RAM_BUFFER_SIZE*/
|
||||
int dfu_seq;
|
||||
u8 read_phase;
|
||||
@ -141,6 +145,8 @@ struct stm32prog_data {
|
||||
/* bootm information */
|
||||
u32 uimage;
|
||||
u32 dtb;
|
||||
u32 initrd;
|
||||
u32 initrd_size;
|
||||
};
|
||||
|
||||
extern struct stm32prog_data *stm32prog_data;
|
||||
@ -160,8 +166,8 @@ int stm32prog_pmic_read(struct stm32prog_data *data, u32 offset,
|
||||
int stm32prog_pmic_start(struct stm32prog_data *data);
|
||||
|
||||
/* generic part*/
|
||||
u8 stm32prog_header_check(struct raw_header_s *raw_header,
|
||||
struct image_header_s *header);
|
||||
void stm32prog_header_check(struct raw_header_s *raw_header,
|
||||
struct image_header_s *header);
|
||||
int stm32prog_dfu_init(struct stm32prog_data *data);
|
||||
void stm32prog_next_phase(struct stm32prog_data *data);
|
||||
void stm32prog_do_reset(struct stm32prog_data *data);
|
||||
@ -177,9 +183,29 @@ char *stm32prog_get_error(struct stm32prog_data *data);
|
||||
|
||||
/* Main function */
|
||||
int stm32prog_init(struct stm32prog_data *data, ulong addr, ulong size);
|
||||
int stm32prog_serial_init(struct stm32prog_data *data, int link_dev);
|
||||
bool stm32prog_serial_loop(struct stm32prog_data *data);
|
||||
bool stm32prog_usb_loop(struct stm32prog_data *data, int dev);
|
||||
void stm32prog_clean(struct stm32prog_data *data);
|
||||
|
||||
#ifdef CONFIG_CMD_STM32PROG_SERIAL
|
||||
int stm32prog_serial_init(struct stm32prog_data *data, int link_dev);
|
||||
bool stm32prog_serial_loop(struct stm32prog_data *data);
|
||||
#else
|
||||
static inline int stm32prog_serial_init(struct stm32prog_data *data, int link_dev)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
static inline bool stm32prog_serial_loop(struct stm32prog_data *data)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CMD_STM32PROG_USB
|
||||
bool stm32prog_usb_loop(struct stm32prog_data *data, int dev);
|
||||
#else
|
||||
static inline bool stm32prog_usb_loop(struct stm32prog_data *data, int dev)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
#include <malloc.h>
|
||||
#include <serial.h>
|
||||
#include <watchdog.h>
|
||||
#include <asm/arch/sys_proto.h>
|
||||
#include <dm/lists.h>
|
||||
#include <dm/device-internal.h>
|
||||
#include <linux/delay.h>
|
||||
@ -18,8 +19,7 @@
|
||||
/* - configuration part -----------------------------*/
|
||||
#define USART_BL_VERSION 0x40 /* USART bootloader version V4.0*/
|
||||
#define UBOOT_BL_VERSION 0x03 /* bootloader version V0.3*/
|
||||
#define DEVICE_ID_BYTE1 0x05 /* MSB byte of device ID*/
|
||||
#define DEVICE_ID_BYTE2 0x00 /* LSB byte of device ID*/
|
||||
|
||||
#define USART_RAM_BUFFER_SIZE 256 /* Size of USART_RAM_Buf buffer*/
|
||||
|
||||
/* - Commands -----------------------------*/
|
||||
@ -59,6 +59,9 @@ const u8 cmd_id[] = {
|
||||
|
||||
#define NB_CMD sizeof(cmd_id)
|
||||
|
||||
/* with 115200 bauds, 20 ms allow to receive the 256 bytes buffer */
|
||||
#define TIMEOUT_SERIAL_BUFFER 30
|
||||
|
||||
/* DFU support for serial *********************************************/
|
||||
static struct dfu_entity *stm32prog_get_entity(struct stm32prog_data *data)
|
||||
{
|
||||
@ -186,36 +189,19 @@ static int stm32prog_read(struct stm32prog_data *data, u8 phase, u32 offset,
|
||||
int stm32prog_serial_init(struct stm32prog_data *data, int link_dev)
|
||||
{
|
||||
struct udevice *dev = NULL;
|
||||
int node;
|
||||
char alias[10];
|
||||
const char *path;
|
||||
struct dm_serial_ops *ops;
|
||||
/* no parity, 8 bits, 1 stop */
|
||||
u32 serial_config = SERIAL_DEFAULT_CONFIG;
|
||||
|
||||
down_serial_dev = NULL;
|
||||
|
||||
sprintf(alias, "serial%d", link_dev);
|
||||
path = fdt_get_alias(gd->fdt_blob, alias);
|
||||
if (!path) {
|
||||
pr_err("%s alias not found", alias);
|
||||
return -ENODEV;
|
||||
}
|
||||
node = fdt_path_offset(gd->fdt_blob, path);
|
||||
if (!uclass_get_device_by_of_offset(UCLASS_SERIAL, node,
|
||||
&dev)) {
|
||||
down_serial_dev = dev;
|
||||
} else if (node > 0 &&
|
||||
!lists_bind_fdt(gd->dm_root, offset_to_ofnode(node),
|
||||
&dev, false)) {
|
||||
if (!device_probe(dev))
|
||||
down_serial_dev = dev;
|
||||
}
|
||||
if (!down_serial_dev) {
|
||||
pr_err("%s = %s device not found", alias, path);
|
||||
if (uclass_get_device_by_seq(UCLASS_SERIAL, link_dev, &dev)) {
|
||||
pr_err("serial %d device not found\n", link_dev);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
down_serial_dev = dev;
|
||||
|
||||
/* force silent console on uart only when used */
|
||||
if (gd->cur_serial_dev == down_serial_dev)
|
||||
gd->flags |= GD_FLG_DISABLE_CONSOLE | GD_FLG_SILENT;
|
||||
@ -225,11 +211,11 @@ int stm32prog_serial_init(struct stm32prog_data *data, int link_dev)
|
||||
ops = serial_get_ops(down_serial_dev);
|
||||
|
||||
if (!ops) {
|
||||
pr_err("%s = %s missing ops", alias, path);
|
||||
pr_err("serial %d = %s missing ops\n", link_dev, dev->name);
|
||||
return -ENODEV;
|
||||
}
|
||||
if (!ops->setconfig) {
|
||||
pr_err("%s = %s missing setconfig", alias, path);
|
||||
pr_err("serial %d = %s missing setconfig\n", link_dev, dev->name);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
@ -280,6 +266,7 @@ static bool stm32prog_serial_get_buffer(u8 *buffer, u32 *count)
|
||||
{
|
||||
struct dm_serial_ops *ops = serial_get_ops(down_serial_dev);
|
||||
int err;
|
||||
ulong start = get_timer(0);
|
||||
|
||||
do {
|
||||
err = ops->getc(down_serial_dev);
|
||||
@ -289,6 +276,10 @@ static bool stm32prog_serial_get_buffer(u8 *buffer, u32 *count)
|
||||
} else if (err == -EAGAIN) {
|
||||
ctrlc();
|
||||
WATCHDOG_RESET();
|
||||
if (get_timer(start) > TIMEOUT_SERIAL_BUFFER) {
|
||||
err = -ETIMEDOUT;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
@ -308,57 +299,6 @@ static void stm32prog_serial_putc(u8 w_byte)
|
||||
}
|
||||
|
||||
/* Helper function ************************************************/
|
||||
|
||||
static u8 stm32prog_header(struct stm32prog_data *data)
|
||||
{
|
||||
u8 ret;
|
||||
u8 boot = 0;
|
||||
struct dfu_entity *dfu_entity;
|
||||
u64 size = 0;
|
||||
|
||||
dfu_entity = stm32prog_get_entity(data);
|
||||
if (!dfu_entity)
|
||||
return -ENODEV;
|
||||
|
||||
printf("\nSTM32 download write %s\n", dfu_entity->name);
|
||||
|
||||
/* force cleanup to avoid issue with previous read */
|
||||
dfu_transaction_cleanup(dfu_entity);
|
||||
|
||||
ret = stm32prog_header_check(data->header_data,
|
||||
&data->header);
|
||||
|
||||
/* no header : max size is partition size */
|
||||
if (ret) {
|
||||
dfu_entity->get_medium_size(dfu_entity, &size);
|
||||
data->header.image_length = size;
|
||||
}
|
||||
|
||||
/**** Flash the header if necessary for boot partition */
|
||||
if (data->phase < PHASE_FIRST_USER)
|
||||
boot = 1;
|
||||
|
||||
/* write header if boot partition */
|
||||
if (boot) {
|
||||
if (ret) {
|
||||
stm32prog_err("invalid header (error %d)", ret);
|
||||
} else {
|
||||
ret = stm32prog_write(data,
|
||||
(u8 *)data->header_data,
|
||||
BL_HEADER_SIZE);
|
||||
}
|
||||
} else {
|
||||
if (ret)
|
||||
printf(" partition without checksum\n");
|
||||
ret = 0;
|
||||
}
|
||||
|
||||
free(data->header_data);
|
||||
data->header_data = NULL;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static u8 stm32prog_start(struct stm32prog_data *data, u32 address)
|
||||
{
|
||||
u8 ret = 0;
|
||||
@ -397,32 +337,14 @@ static u8 stm32prog_start(struct stm32prog_data *data, u32 address)
|
||||
if (!dfu_entity)
|
||||
return -ENODEV;
|
||||
|
||||
if (data->dfu_seq) {
|
||||
ret = dfu_flush(dfu_entity, NULL, 0, data->dfu_seq);
|
||||
data->dfu_seq = 0;
|
||||
if (ret) {
|
||||
stm32prog_err("DFU flush failed [%d]", ret);
|
||||
return ret;
|
||||
}
|
||||
ret = dfu_flush(dfu_entity, NULL, 0, data->dfu_seq);
|
||||
if (ret) {
|
||||
stm32prog_err("DFU flush failed [%d]", ret);
|
||||
return ret;
|
||||
}
|
||||
data->dfu_seq = 0;
|
||||
|
||||
printf("\n received length = 0x%x\n", data->cursor);
|
||||
if (data->header.present) {
|
||||
if (data->cursor !=
|
||||
(data->header.image_length + BL_HEADER_SIZE)) {
|
||||
stm32prog_err("transmission interrupted (length=0x%x expected=0x%x)",
|
||||
data->cursor,
|
||||
data->header.image_length +
|
||||
BL_HEADER_SIZE);
|
||||
return -EIO;
|
||||
}
|
||||
if (data->header.image_checksum != data->checksum) {
|
||||
stm32prog_err("invalid checksum received (0x%x expected 0x%x)",
|
||||
data->checksum,
|
||||
data->header.image_checksum);
|
||||
return -EIO;
|
||||
}
|
||||
printf("\n checksum OK (0x%x)\n", data->checksum);
|
||||
}
|
||||
|
||||
/* update DFU with received flashlayout */
|
||||
if (data->phase == PHASE_FLASHLAYOUT)
|
||||
@ -513,10 +435,12 @@ static void get_version_command(struct stm32prog_data *data)
|
||||
*/
|
||||
static void get_id_command(struct stm32prog_data *data)
|
||||
{
|
||||
u32 cpu = get_cpu_dev();
|
||||
|
||||
/* Send Device IDCode */
|
||||
stm32prog_serial_putc(0x1);
|
||||
stm32prog_serial_putc(DEVICE_ID_BYTE1);
|
||||
stm32prog_serial_putc(DEVICE_ID_BYTE2);
|
||||
stm32prog_serial_putc((cpu >> 8) & 0xFF);
|
||||
stm32prog_serial_putc(cpu & 0xFF);
|
||||
stm32prog_serial_result(ACK_BYTE);
|
||||
}
|
||||
|
||||
@ -645,14 +569,12 @@ static void download_command(struct stm32prog_data *data)
|
||||
u32 counter = 0x0, codesize = 0x0;
|
||||
u8 *ramaddress = 0;
|
||||
u8 rcv_data = 0x0;
|
||||
struct image_header_s *image_header = &data->header;
|
||||
u32 cursor = data->cursor;
|
||||
long size = 0;
|
||||
u8 operation;
|
||||
u32 packet_number;
|
||||
u32 result = ACK_BYTE;
|
||||
u8 ret;
|
||||
unsigned int i;
|
||||
bool error;
|
||||
int rcv;
|
||||
|
||||
@ -686,13 +608,8 @@ static void download_command(struct stm32prog_data *data)
|
||||
if (packet_number == 0) {
|
||||
/* erase: re-initialize the image_header struct */
|
||||
data->packet_number = 0;
|
||||
if (data->header_data)
|
||||
memset(data->header_data, 0, BL_HEADER_SIZE);
|
||||
else
|
||||
data->header_data = calloc(1, BL_HEADER_SIZE);
|
||||
cursor = 0;
|
||||
data->cursor = 0;
|
||||
data->checksum = 0;
|
||||
/*idx = cursor;*/
|
||||
} else {
|
||||
data->packet_number++;
|
||||
@ -740,7 +657,7 @@ static void download_command(struct stm32prog_data *data)
|
||||
printf("transmission error on packet %d, byte %d\n",
|
||||
packet_number, codesize - counter);
|
||||
/* waiting end of packet before flush & NACK */
|
||||
mdelay(30);
|
||||
mdelay(TIMEOUT_SERIAL_BUFFER);
|
||||
data->packet_number--;
|
||||
result = NACK_BYTE;
|
||||
goto end;
|
||||
@ -758,80 +675,33 @@ static void download_command(struct stm32prog_data *data)
|
||||
/* wait to be sure that all data are received
|
||||
* in the FIFO before flush
|
||||
*/
|
||||
mdelay(30);
|
||||
mdelay(TIMEOUT_SERIAL_BUFFER);
|
||||
data->packet_number--;
|
||||
result = NACK_BYTE;
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* Update current position in buffer */
|
||||
data->cursor += codesize;
|
||||
switch (operation) {
|
||||
case PHASE_OTP:
|
||||
size = codesize;
|
||||
ret = stm32prog_otp_write(data, cursor, data->buffer, &size);
|
||||
break;
|
||||
|
||||
if (operation == PHASE_OTP) {
|
||||
size = data->cursor - cursor;
|
||||
/* no header for OTP */
|
||||
if (stm32prog_otp_write(data, cursor,
|
||||
data->buffer, &size))
|
||||
result = ABORT_BYTE;
|
||||
goto end;
|
||||
case PHASE_PMIC:
|
||||
size = codesize;
|
||||
ret = stm32prog_pmic_write(data, cursor, data->buffer, &size);
|
||||
break;
|
||||
|
||||
default:
|
||||
ret = stm32prog_write(data, data->buffer, codesize);
|
||||
break;
|
||||
}
|
||||
|
||||
if (operation == PHASE_PMIC) {
|
||||
size = data->cursor - cursor;
|
||||
/* no header for PMIC */
|
||||
if (stm32prog_pmic_write(data, cursor,
|
||||
data->buffer, &size))
|
||||
result = ABORT_BYTE;
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (cursor < BL_HEADER_SIZE) {
|
||||
/* size = portion of header in this chunck */
|
||||
if (data->cursor >= BL_HEADER_SIZE)
|
||||
size = BL_HEADER_SIZE - cursor;
|
||||
else
|
||||
size = data->cursor - cursor;
|
||||
memcpy((void *)((u32)(data->header_data) + cursor),
|
||||
data->buffer, size);
|
||||
cursor += size;
|
||||
|
||||
if (cursor == BL_HEADER_SIZE) {
|
||||
/* Check and Write the header */
|
||||
if (stm32prog_header(data)) {
|
||||
result = ABORT_BYTE;
|
||||
goto end;
|
||||
}
|
||||
} else {
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (image_header->present) {
|
||||
if (data->cursor <= BL_HEADER_SIZE)
|
||||
goto end;
|
||||
/* compute checksum on payload */
|
||||
for (i = (unsigned long)size; i < codesize; i++)
|
||||
data->checksum += data->buffer[i];
|
||||
|
||||
if (data->cursor >
|
||||
image_header->image_length + BL_HEADER_SIZE) {
|
||||
pr_err("expected size exceeded\n");
|
||||
result = ABORT_BYTE;
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* write data (payload) */
|
||||
ret = stm32prog_write(data,
|
||||
&data->buffer[size],
|
||||
codesize - size);
|
||||
} else {
|
||||
/* write all */
|
||||
ret = stm32prog_write(data,
|
||||
data->buffer,
|
||||
codesize);
|
||||
}
|
||||
if (ret)
|
||||
result = ABORT_BYTE;
|
||||
else
|
||||
/* Update current position in buffer */
|
||||
data->cursor += codesize;
|
||||
|
||||
end:
|
||||
stm32prog_serial_result(result);
|
||||
|
||||
@ -178,7 +178,7 @@ int stm32prog_get_medium_size_virt(struct dfu_entity *dfu, u64 *size)
|
||||
|
||||
switch (dfu->data.virt.dev_num) {
|
||||
case PHASE_CMD:
|
||||
*size = 512;
|
||||
*size = CMD_SIZE;
|
||||
break;
|
||||
case PHASE_OTP:
|
||||
*size = OTP_SIZE;
|
||||
@ -207,13 +207,10 @@ bool stm32prog_usb_loop(struct stm32prog_data *data, int dev)
|
||||
|
||||
if (stm32prog_data->phase == PHASE_FLASHLAYOUT) {
|
||||
ret = run_usb_dnl_gadget(dev, "usb_dnl_dfu");
|
||||
if (ret || stm32prog_data->phase == PHASE_DO_RESET)
|
||||
if (ret || stm32prog_data->phase != PHASE_FLASHLAYOUT)
|
||||
return ret;
|
||||
/* prepare the second enumeration with the FlashLayout */
|
||||
if (stm32prog_data->phase == PHASE_FLASHLAYOUT)
|
||||
stm32prog_dfu_init(data);
|
||||
/* found next selected partition */
|
||||
stm32prog_next_phase(data);
|
||||
stm32prog_dfu_init(data);
|
||||
}
|
||||
|
||||
ret = run_usb_dnl_gadget(dev, "usb_dnl_dfu");
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
#
|
||||
|
||||
ifndef CONFIG_SPL
|
||||
INPUTS-y += u-boot.stm32
|
||||
INPUTS-$(CONFIG_STM32MP15x_STM32IMAGE) += u-boot.stm32
|
||||
else
|
||||
ifdef CONFIG_SPL_BUILD
|
||||
INPUTS-y += u-boot-spl.stm32
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
#include <env.h>
|
||||
#include <init.h>
|
||||
#include <log.h>
|
||||
#include <lmb.h>
|
||||
#include <misc.h>
|
||||
#include <net.h>
|
||||
#include <asm/io.h>
|
||||
@ -86,6 +87,8 @@
|
||||
*/
|
||||
u8 early_tlb[PGTABLE_SIZE] __section(".data") __aligned(0x4000);
|
||||
|
||||
struct lmb lmb;
|
||||
|
||||
#if !defined(CONFIG_SPL) || defined(CONFIG_SPL_BUILD)
|
||||
#ifndef CONFIG_TFABOOT
|
||||
static void security_init(void)
|
||||
@ -207,6 +210,44 @@ u32 get_bootmode(void)
|
||||
TAMP_BOOT_MODE_SHIFT;
|
||||
}
|
||||
|
||||
/*
|
||||
* weak function overidde: set the DDR/SYSRAM executable before to enable the
|
||||
* MMU and configure DACR, for early early_enable_caches (SPL or pre-reloc)
|
||||
*/
|
||||
void dram_bank_mmu_setup(int bank)
|
||||
{
|
||||
struct bd_info *bd = gd->bd;
|
||||
int i;
|
||||
phys_addr_t start;
|
||||
phys_size_t size;
|
||||
bool use_lmb = false;
|
||||
enum dcache_option option;
|
||||
|
||||
if (IS_ENABLED(CONFIG_SPL_BUILD)) {
|
||||
#ifdef CONFIG_SPL
|
||||
start = ALIGN_DOWN(STM32_SYSRAM_BASE, MMU_SECTION_SIZE);
|
||||
size = ALIGN(STM32_SYSRAM_SIZE, MMU_SECTION_SIZE);
|
||||
#endif
|
||||
} else if (gd->flags & GD_FLG_RELOC) {
|
||||
/* bd->bi_dram is available only after relocation */
|
||||
start = bd->bi_dram[bank].start;
|
||||
size = bd->bi_dram[bank].size;
|
||||
use_lmb = true;
|
||||
} else {
|
||||
/* mark cacheable and executable the beggining of the DDR */
|
||||
start = STM32_DDR_BASE;
|
||||
size = CONFIG_DDR_CACHEABLE_SIZE;
|
||||
}
|
||||
|
||||
for (i = start >> MMU_SECTION_SHIFT;
|
||||
i < (start >> MMU_SECTION_SHIFT) + (size >> MMU_SECTION_SHIFT);
|
||||
i++) {
|
||||
option = DCACHE_DEFAULT_OPTION;
|
||||
if (use_lmb && lmb_is_reserved_flags(&lmb, i << MMU_SECTION_SHIFT, LMB_NOMAP))
|
||||
option = INVALID_ENTRY;
|
||||
set_section_dcache(i, option);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* initialize the MMU and activate cache in SPL or in U-Boot pre-reloc stage
|
||||
* MMU/TLB is updated in enable_caches() for U-Boot after relocation
|
||||
@ -219,19 +260,13 @@ static void early_enable_caches(void)
|
||||
if (CONFIG_IS_ENABLED(SYS_DCACHE_OFF))
|
||||
return;
|
||||
|
||||
#if !(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF))
|
||||
gd->arch.tlb_size = PGTABLE_SIZE;
|
||||
gd->arch.tlb_addr = (unsigned long)&early_tlb;
|
||||
#endif
|
||||
|
||||
/* enable MMU (default configuration) */
|
||||
dcache_enable();
|
||||
|
||||
if (IS_ENABLED(CONFIG_SPL_BUILD))
|
||||
mmu_set_region_dcache_behaviour(
|
||||
ALIGN(STM32_SYSRAM_BASE, MMU_SECTION_SIZE),
|
||||
round_up(STM32_SYSRAM_SIZE, MMU_SECTION_SIZE),
|
||||
DCACHE_DEFAULT_OPTION);
|
||||
else
|
||||
mmu_set_region_dcache_behaviour(STM32_DDR_BASE, STM32_DDR_SIZE,
|
||||
DCACHE_DEFAULT_OPTION);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -260,7 +295,8 @@ int arch_cpu_init(void)
|
||||
|
||||
boot_mode = get_bootmode();
|
||||
|
||||
if ((boot_mode & TAMP_BOOT_DEVICE_MASK) == BOOT_SERIAL_UART)
|
||||
if (IS_ENABLED(CONFIG_CMD_STM32PROG_SERIAL) &&
|
||||
(boot_mode & TAMP_BOOT_DEVICE_MASK) == BOOT_SERIAL_UART)
|
||||
gd->flags |= GD_FLG_SILENT | GD_FLG_DISABLE_CONSOLE;
|
||||
#if defined(CONFIG_DEBUG_UART) && \
|
||||
!defined(CONFIG_TFABOOT) && \
|
||||
@ -274,6 +310,9 @@ int arch_cpu_init(void)
|
||||
|
||||
void enable_caches(void)
|
||||
{
|
||||
/* parse device tree when data cache is still activated */
|
||||
lmb_init_and_reserve(&lmb, gd->bd, (void *)gd->fdt_blob);
|
||||
|
||||
/* I-cache is already enabled in start.S: icache_enable() not needed */
|
||||
|
||||
/* deactivate the data cache, early enabled in arch_cpu_init() */
|
||||
@ -460,7 +499,6 @@ static void setup_boot_mode(void)
|
||||
unsigned int instance = (boot_mode & TAMP_BOOT_INSTANCE_MASK) - 1;
|
||||
u32 forced_mode = (boot_ctx & TAMP_BOOT_FORCED_MASK);
|
||||
struct udevice *dev;
|
||||
int alias;
|
||||
|
||||
pr_debug("%s: boot_ctx=0x%x => boot_mode=%x, instance=%d forced=%x\n",
|
||||
__func__, boot_ctx, boot_mode, instance, forced_mode);
|
||||
@ -470,17 +508,22 @@ static void setup_boot_mode(void)
|
||||
break;
|
||||
/* serial : search associated alias in devicetree */
|
||||
sprintf(cmd, "serial@%x", serial_addr[instance]);
|
||||
if (uclass_get_device_by_name(UCLASS_SERIAL, cmd, &dev))
|
||||
if (uclass_get_device_by_name(UCLASS_SERIAL, cmd, &dev)) {
|
||||
/* restore console on error */
|
||||
if (IS_ENABLED(CONFIG_CMD_STM32PROG_SERIAL))
|
||||
gd->flags &= ~(GD_FLG_SILENT |
|
||||
GD_FLG_DISABLE_CONSOLE);
|
||||
printf("uart%d = %s not found in device tree!\n",
|
||||
instance + 1, cmd);
|
||||
break;
|
||||
if (fdtdec_get_alias_seq(gd->fdt_blob, "serial",
|
||||
dev_of_offset(dev), &alias))
|
||||
break;
|
||||
sprintf(cmd, "%d", alias);
|
||||
}
|
||||
sprintf(cmd, "%d", dev->seq);
|
||||
env_set("boot_device", "serial");
|
||||
env_set("boot_instance", cmd);
|
||||
|
||||
/* restore console on uart when not used */
|
||||
if (gd->cur_serial_dev != dev) {
|
||||
if (IS_ENABLED(CONFIG_CMD_STM32PROG_SERIAL) &&
|
||||
(gd->cur_serial_dev != dev)) {
|
||||
gd->flags &= ~(GD_FLG_SILENT |
|
||||
GD_FLG_DISABLE_CONSOLE);
|
||||
printf("serial boot with console enabled!\n");
|
||||
@ -509,7 +552,9 @@ static void setup_boot_mode(void)
|
||||
env_set("boot_instance", "0");
|
||||
break;
|
||||
default:
|
||||
pr_debug("unexpected boot mode = %x\n", boot_mode);
|
||||
env_set("boot_device", "invalid");
|
||||
env_set("boot_instance", "");
|
||||
log_err("unexpected boot mode = %x\n", boot_mode);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
#include <lmb.h>
|
||||
#include <log.h>
|
||||
#include <ram.h>
|
||||
#include <asm/system.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
@ -38,17 +39,27 @@ int dram_init(void)
|
||||
|
||||
ulong board_get_usable_ram_top(ulong total_size)
|
||||
{
|
||||
phys_size_t size;
|
||||
phys_addr_t reg;
|
||||
struct lmb lmb;
|
||||
|
||||
if (!total_size)
|
||||
return gd->ram_top;
|
||||
|
||||
/* found enough not-reserved memory to relocated U-Boot */
|
||||
lmb_init(&lmb);
|
||||
lmb_add(&lmb, gd->ram_base, gd->ram_size);
|
||||
boot_fdt_add_mem_rsv_regions(&lmb, (void *)gd->fdt_blob);
|
||||
reg = lmb_alloc(&lmb, CONFIG_SYS_MALLOC_LEN + total_size, SZ_4K);
|
||||
/* add 8M for reserved memory for display, fdt, gd,... */
|
||||
size = ALIGN(SZ_8M + CONFIG_SYS_MALLOC_LEN + total_size, MMU_SECTION_SIZE),
|
||||
reg = lmb_alloc(&lmb, size, MMU_SECTION_SIZE);
|
||||
|
||||
if (reg)
|
||||
return ALIGN(reg + CONFIG_SYS_MALLOC_LEN + total_size, SZ_4K);
|
||||
if (!reg)
|
||||
reg = gd->ram_top - size;
|
||||
|
||||
return gd->ram_top;
|
||||
/* before relocation, mark the U-Boot memory as cacheable by default */
|
||||
if (!(gd->flags & GD_FLG_RELOC))
|
||||
mmu_set_region_dcache_behaviour(reg, size, DCACHE_DEFAULT_OPTION);
|
||||
|
||||
return reg + size;
|
||||
}
|
||||
|
||||
@ -328,7 +328,16 @@ int ft_system_setup(void *blob, struct bd_info *bd)
|
||||
"st,package", pkg, false);
|
||||
}
|
||||
|
||||
if (!CONFIG_IS_ENABLED(OPTEE) ||
|
||||
/*
|
||||
* TEMP: remove OP-TEE nodes in kernel device tree
|
||||
* copied from U-Boot device tree by optee_copy_fdt_nodes
|
||||
* when OP-TEE is not detected (probe failed)
|
||||
* these OP-TEE nodes are present in <board>-u-boot.dtsi
|
||||
* under CONFIG_STM32MP15x_STM32IMAGE only for compatibility
|
||||
* when FIP is not used by TF-A
|
||||
*/
|
||||
if (CONFIG_IS_ENABLED(STM32MP15x_STM32IMAGE) &&
|
||||
CONFIG_IS_ENABLED(OPTEE) &&
|
||||
!tee_find_device(NULL, NULL, NULL, NULL))
|
||||
stm32_fdt_disable_optee(blob);
|
||||
|
||||
|
||||
@ -91,8 +91,10 @@ enum boot_device {
|
||||
|
||||
/* TAMP registers */
|
||||
#define TAMP_BACKUP_REGISTER(x) (STM32_TAMP_BASE + 0x100 + 4 * x)
|
||||
/* secure access */
|
||||
#define TAMP_BACKUP_MAGIC_NUMBER TAMP_BACKUP_REGISTER(4)
|
||||
#define TAMP_BACKUP_BRANCH_ADDRESS TAMP_BACKUP_REGISTER(5)
|
||||
/* non secure access */
|
||||
#define TAMP_COPRO_RSC_TBL_ADDRESS TAMP_BACKUP_REGISTER(17)
|
||||
#define TAMP_COPRO_STATE TAMP_BACKUP_REGISTER(18)
|
||||
#define TAMP_BOOT_CONTEXT TAMP_BACKUP_REGISTER(20)
|
||||
|
||||
@ -8,19 +8,53 @@
|
||||
|
||||
#include <linux/arm-smccc.h>
|
||||
|
||||
/* SMC service generic return codes */
|
||||
#define STM32_SMC_OK 0x00000000U
|
||||
#define STM32_SMC_NOT_SUPPORTED 0xFFFFFFFFU
|
||||
#define STM32_SMC_FAILED 0xFFFFFFFEU
|
||||
#define STM32_SMC_INVALID_PARAMS 0xFFFFFFFDU
|
||||
|
||||
/*
|
||||
* SMC function IDs for STM32 Service queries
|
||||
* SMC function IDs for STM32 Service queries.
|
||||
* STM32 SMC services use the space between 0x82000000 and 0x8200FFFF
|
||||
* like this is defined in SMC calling Convention by ARM
|
||||
* for SiP (silicon Partner)
|
||||
* http://infocenter.arm.com/help/topic/com.arm.doc.den0028a/index.html
|
||||
* for SiP (silicon Partner).
|
||||
* https://developer.arm.com/docs/den0028/latest
|
||||
*/
|
||||
#define STM32_SMC_VERSION 0x82000000
|
||||
|
||||
/* Secure Service access from Non-secure */
|
||||
|
||||
/*
|
||||
* SMC function STM32_SMC_PWR.
|
||||
*
|
||||
* Argument a0: (input) SMCC ID.
|
||||
* (output) Status return code.
|
||||
* Argument a1: (input) Service ID (STM32_SMC_REG_xxx).
|
||||
* Argument a2: (input) Register offset or physical address.
|
||||
* (output) Register read value, if applicable.
|
||||
* Argument a3: (input) Register target value if applicable.
|
||||
*/
|
||||
#define STM32_SMC_PWR 0x82001001
|
||||
|
||||
/*
|
||||
* SMC functions STM32_SMC_BSEC.
|
||||
*
|
||||
* Argument a0: (input) SMCC ID.
|
||||
* (output) Status return code.
|
||||
* Argument a1: (input) Service ID (STM32_SMC_READ_xxx/_PROG_xxx/_WRITE_xxx).
|
||||
* (output) OTP read value, if applicable.
|
||||
* Argument a2: (input) OTP index.
|
||||
* Argument a3: (input) OTP value if applicable.
|
||||
*/
|
||||
#define STM32_SMC_BSEC 0x82001003
|
||||
|
||||
/* Service for BSEC */
|
||||
/* Service ID for STM32_SMC_PWR */
|
||||
#define STM32_SMC_REG_READ 0x0
|
||||
#define STM32_SMC_REG_WRITE 0x1
|
||||
#define STM32_SMC_REG_SET 0x2
|
||||
#define STM32_SMC_REG_CLEAR 0x3
|
||||
|
||||
/* Service ID for STM32_SMC_BSEC */
|
||||
#define STM32_SMC_READ_SHADOW 0x01
|
||||
#define STM32_SMC_PROG_OTP 0x02
|
||||
#define STM32_SMC_WRITE_SHADOW 0x03
|
||||
@ -29,12 +63,6 @@
|
||||
#define STM32_SMC_WRITE_ALL 0x06
|
||||
#define STM32_SMC_WRLOCK_OTP 0x07
|
||||
|
||||
/* SMC error codes */
|
||||
#define STM32_SMC_OK 0x0
|
||||
#define STM32_SMC_NOT_SUPPORTED -1
|
||||
#define STM32_SMC_FAILED -2
|
||||
#define STM32_SMC_INVALID_PARAMS -3
|
||||
|
||||
#define stm32_smc_exec(svc, op, data1, data2) \
|
||||
stm32_smc(svc, op, data1, data2, NULL)
|
||||
|
||||
|
||||
@ -11,6 +11,7 @@ int stm32prog_read_medium_virt(struct dfu_entity *dfu, u64 offset,
|
||||
void *buf, long *len);
|
||||
int stm32prog_get_medium_size_virt(struct dfu_entity *dfu, u64 *size);
|
||||
|
||||
/* only needed for CONFIG_STM32MP15x_STM32IMAGE, prototype defined to avoid compilation issue */
|
||||
bool stm32prog_get_tee_partitions(void);
|
||||
|
||||
bool stm32prog_get_fsbl_nor(void);
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
#include <errno.h>
|
||||
#include <syscon.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/stm32mp1_smc.h>
|
||||
#include <dm/device_compat.h>
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/err.h>
|
||||
@ -41,6 +42,10 @@ static int stm32mp_pwr_write(struct udevice *dev, uint reg,
|
||||
if (len != 4)
|
||||
return -EINVAL;
|
||||
|
||||
if (IS_ENABLED(CONFIG_TFABOOT))
|
||||
return stm32_smc_exec(STM32_SMC_PWR, STM32_SMC_REG_WRITE,
|
||||
STM32MP_PWR_CR3, val);
|
||||
|
||||
writel(val, priv->base + STM32MP_PWR_CR3);
|
||||
|
||||
return 0;
|
||||
|
||||
@ -55,6 +55,7 @@ u32 spl_mmc_boot_mode(const u32 boot_device)
|
||||
return MMCSD_MODE_RAW;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
|
||||
int spl_mmc_boot_partition(const u32 boot_device)
|
||||
{
|
||||
switch (boot_device) {
|
||||
@ -66,6 +67,7 @@ int spl_mmc_boot_partition(const u32 boot_device)
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SPL_DISPLAY_PRINT
|
||||
void spl_display_print(void)
|
||||
@ -138,7 +140,8 @@ void board_init_f(ulong dummy)
|
||||
* to avoid speculative access and issue in get_ram_size()
|
||||
*/
|
||||
if (!CONFIG_IS_ENABLED(SYS_DCACHE_OFF))
|
||||
mmu_set_region_dcache_behaviour(STM32_DDR_BASE, STM32_DDR_SIZE,
|
||||
mmu_set_region_dcache_behaviour(STM32_DDR_BASE,
|
||||
CONFIG_DDR_CACHEABLE_SIZE,
|
||||
DCACHE_DEFAULT_OPTION);
|
||||
}
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <clk.h>
|
||||
#include <dm.h>
|
||||
#include <syscon.h>
|
||||
#include <asm/arch/stm32.h>
|
||||
@ -14,9 +15,22 @@ static const struct udevice_id stm32mp_syscon_ids[] = {
|
||||
{ }
|
||||
};
|
||||
|
||||
static int stm32mp_syscon_probe(struct udevice *dev)
|
||||
{
|
||||
struct clk_bulk clk_bulk;
|
||||
int ret;
|
||||
|
||||
ret = clk_get_bulk(dev, &clk_bulk);
|
||||
if (!ret)
|
||||
clk_enable_bulk(&clk_bulk);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
U_BOOT_DRIVER(syscon_stm32mp) = {
|
||||
.name = "stmp32mp_syscon",
|
||||
.id = UCLASS_SYSCON,
|
||||
.of_match = stm32mp_syscon_ids,
|
||||
.bind = dm_scan_fdt_dev,
|
||||
.probe = stm32mp_syscon_probe,
|
||||
};
|
||||
|
||||
@ -8,7 +8,6 @@
|
||||
|
||||
#define CONFIG_NEEDS_MANUAL_RELOC
|
||||
|
||||
#define CONFIG_LMB
|
||||
#define CONFIG_SYS_BOOT_RAMDISK_HIGH
|
||||
|
||||
#endif
|
||||
|
||||
@ -6,8 +6,6 @@
|
||||
#ifndef _ASM_CONFIG_H_
|
||||
#define _ASM_CONFIG_H_
|
||||
|
||||
#define CONFIG_LMB
|
||||
|
||||
#ifndef CONFIG_SPL_BUILD
|
||||
#define CONFIG_NEEDS_MANUAL_RELOC
|
||||
#endif
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
#ifndef _ASM_CONFIG_H_
|
||||
#define _ASM_CONFIG_H_
|
||||
|
||||
#define CONFIG_LMB
|
||||
#define CONFIG_SYS_BOOT_RAMDISK_HIGH
|
||||
|
||||
#endif
|
||||
|
||||
@ -7,6 +7,5 @@
|
||||
|
||||
#ifndef _ASM_CONFIG_H_
|
||||
#define _ASM_CONFIG_H_
|
||||
#define CONFIG_LMB
|
||||
|
||||
#endif
|
||||
|
||||
@ -18,7 +18,6 @@
|
||||
#define HWCONFIG_BUFFER_SIZE 256
|
||||
#endif
|
||||
|
||||
#define CONFIG_LMB
|
||||
#define CONFIG_SYS_BOOT_RAMDISK_HIGH
|
||||
|
||||
#ifndef CONFIG_MAX_MEM_MAPPED
|
||||
|
||||
@ -7,7 +7,6 @@
|
||||
#ifndef _ASM_CONFIG_H_
|
||||
#define _ASM_CONFIG_H_
|
||||
|
||||
#define CONFIG_LMB
|
||||
#define CONFIG_SYS_BOOT_RAMDISK_HIGH
|
||||
|
||||
#endif
|
||||
|
||||
@ -75,7 +75,7 @@ int riscv_fdt_copy_resv_mem_node(const void *src, void *dst)
|
||||
pmp_mem.start = addr;
|
||||
pmp_mem.end = addr + size - 1;
|
||||
err = fdtdec_add_reserved_memory(dst, basename, &pmp_mem,
|
||||
&phandle);
|
||||
&phandle, false);
|
||||
if (err < 0 && err != -FDT_ERR_EXISTS) {
|
||||
log_err("failed to add reserved memory: %d\n", err);
|
||||
return err;
|
||||
|
||||
@ -356,6 +356,37 @@
|
||||
sandbox_firmware: sandbox-firmware {
|
||||
compatible = "sandbox,firmware";
|
||||
};
|
||||
|
||||
sandbox-scmi-agent@0 {
|
||||
compatible = "sandbox,scmi-agent";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
clk_scmi0: protocol@14 {
|
||||
reg = <0x14>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
reset_scmi0: protocol@16 {
|
||||
reg = <0x16>;
|
||||
#reset-cells = <1>;
|
||||
};
|
||||
};
|
||||
|
||||
sandbox-scmi-agent@1 {
|
||||
compatible = "sandbox,scmi-agent";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
clk_scmi1: protocol@14 {
|
||||
reg = <0x14>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
protocol@10 {
|
||||
reg = <0x10>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
pinctrl-gpio {
|
||||
@ -1036,6 +1067,12 @@
|
||||
compatible = "sandbox,virtio2";
|
||||
};
|
||||
|
||||
sandbox_scmi {
|
||||
compatible = "sandbox,scmi-devices";
|
||||
clocks = <&clk_scmi0 7>, <&clk_scmi0 3>, <&clk_scmi1 1>;
|
||||
resets = <&reset_scmi0 3>;
|
||||
};
|
||||
|
||||
pinctrl {
|
||||
compatible = "sandbox,pinctrl";
|
||||
|
||||
|
||||
99
arch/sandbox/include/asm/scmi_test.h
Normal file
99
arch/sandbox/include/asm/scmi_test.h
Normal file
@ -0,0 +1,99 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* Copyright (C) 2020, Linaro Limited
|
||||
*/
|
||||
|
||||
#ifndef __SANDBOX_SCMI_TEST_H
|
||||
#define __SANDBOX_SCMI_TEST_H
|
||||
|
||||
struct udevice;
|
||||
struct sandbox_scmi_agent;
|
||||
struct sandbox_scmi_service;
|
||||
|
||||
/**
|
||||
* struct sandbox_scmi_clk - Simulated clock exposed by SCMI
|
||||
* @id: Identifier of the clock used in the SCMI protocol
|
||||
* @enabled: Clock state: true if enabled, false if disabled
|
||||
* @rate: Clock rate in Hertz
|
||||
*/
|
||||
struct sandbox_scmi_clk {
|
||||
uint id;
|
||||
bool enabled;
|
||||
ulong rate;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct sandbox_scmi_reset - Simulated reset controller exposed by SCMI
|
||||
* @asserted: Reset control state: true if asserted, false if desasserted
|
||||
*/
|
||||
struct sandbox_scmi_reset {
|
||||
uint id;
|
||||
bool asserted;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct sandbox_scmi_agent - Simulated SCMI service seen by SCMI agent
|
||||
* @idx: Identifier for the SCMI agent, its index
|
||||
* @clk: Simulated clocks
|
||||
* @clk_count: Simulated clocks array size
|
||||
* @clk: Simulated reset domains
|
||||
* @clk_count: Simulated reset domains array size
|
||||
*/
|
||||
struct sandbox_scmi_agent {
|
||||
uint idx;
|
||||
struct sandbox_scmi_clk *clk;
|
||||
size_t clk_count;
|
||||
struct sandbox_scmi_reset *reset;
|
||||
size_t reset_count;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct sandbox_scmi_service - Reference to simutaed SCMI agents/services
|
||||
* @agent: Pointer to SCMI sandbox agent pointers array
|
||||
* @agent_count: Number of emulated agents exposed in array @agent.
|
||||
*/
|
||||
struct sandbox_scmi_service {
|
||||
struct sandbox_scmi_agent **agent;
|
||||
size_t agent_count;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct sandbox_scmi_devices - Reference to devices probed through SCMI
|
||||
* @clk: Array the clock devices
|
||||
* @clk_count: Number of clock devices probed
|
||||
* @reset: Array the reset controller devices
|
||||
* @reset_count: Number of reset controller devices probed
|
||||
*/
|
||||
struct sandbox_scmi_devices {
|
||||
struct clk *clk;
|
||||
size_t clk_count;
|
||||
struct reset_ctl *reset;
|
||||
size_t reset_count;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_SCMI_FIRMWARE
|
||||
/**
|
||||
* sandbox_scmi_service_context - Get the simulated SCMI services context
|
||||
* @return: Reference to backend simulated resources state
|
||||
*/
|
||||
struct sandbox_scmi_service *sandbox_scmi_service_ctx(void);
|
||||
|
||||
/**
|
||||
* sandbox_scmi_devices_get_ref - Get references to devices accessed through SCMI
|
||||
* @dev: Reference to the test device used get test resources
|
||||
* @return: Reference to the devices probed by the SCMI test
|
||||
*/
|
||||
struct sandbox_scmi_devices *sandbox_scmi_devices_ctx(struct udevice *dev);
|
||||
#else
|
||||
static inline struct sandbox_scmi_service *sandbox_scmi_service_ctx(void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline
|
||||
struct sandbox_scmi_devices *sandbox_scmi_devices_ctx(struct udevice *dev)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
#endif /* CONFIG_SCMI_FIRMWARE */
|
||||
#endif /* __SANDBOX_SCMI_TEST_H */
|
||||
@ -8,8 +8,6 @@
|
||||
|
||||
#include <asm/processor.h>
|
||||
|
||||
#define CONFIG_LMB
|
||||
|
||||
/* Timer */
|
||||
#define CONFIG_SYS_TIMER_COUNTS_DOWN
|
||||
#define CONFIG_SYS_TIMER_COUNTER (TMU_BASE + 0xc) /* TCNT0 */
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
#ifndef _ASM_CONFIG_H_
|
||||
#define _ASM_CONFIG_H_
|
||||
|
||||
#define CONFIG_LMB
|
||||
#define CONFIG_SYS_BOOT_RAMDISK_HIGH
|
||||
|
||||
#endif
|
||||
|
||||
@ -9,8 +9,6 @@
|
||||
|
||||
#include <asm/arch/core.h>
|
||||
|
||||
#define CONFIG_LMB
|
||||
|
||||
/*
|
||||
* Make boot parameters available in the MMUv2 virtual memory layout by
|
||||
* restricting used physical memory to the first 128MB.
|
||||
|
||||
@ -551,9 +551,6 @@ int board_init(void)
|
||||
/* address of boot parameters */
|
||||
gd->bd->bi_boot_params = STM32_DDR_BASE + 0x100;
|
||||
|
||||
if (CONFIG_IS_ENABLED(DM_GPIO_HOG))
|
||||
gpio_hog_probe_all();
|
||||
|
||||
board_key_check();
|
||||
|
||||
#ifdef CONFIG_DM_REGULATOR
|
||||
@ -610,7 +607,7 @@ void board_quiesce_devices(void)
|
||||
|
||||
/* eth init function : weak called in eqos driver */
|
||||
int board_interface_eth_init(struct udevice *dev,
|
||||
phy_interface_t interface_type)
|
||||
phy_interface_t interface_type, ulong rate)
|
||||
{
|
||||
u8 *syscfg;
|
||||
u32 value;
|
||||
@ -618,11 +615,11 @@ int board_interface_eth_init(struct udevice *dev,
|
||||
bool eth_ref_clk_sel_reg = false;
|
||||
|
||||
/* Gigabit Ethernet 125MHz clock selection. */
|
||||
eth_clk_sel_reg = dev_read_bool(dev, "st,eth_clk_sel");
|
||||
eth_clk_sel_reg = dev_read_bool(dev, "st,eth-clk-sel");
|
||||
|
||||
/* Ethernet 50Mhz RMII clock selection */
|
||||
eth_ref_clk_sel_reg =
|
||||
dev_read_bool(dev, "st,eth_ref_clk_sel");
|
||||
dev_read_bool(dev, "st,eth-ref-clk-sel");
|
||||
|
||||
syscfg = (u8 *)syscon_get_first_range(STM32MP_SYSCON_SYSCFG);
|
||||
|
||||
|
||||
@ -485,7 +485,7 @@ int ft_board_setup(void *blob, struct bd_info *bd)
|
||||
* should be more intelligent, and e.g. only do this if no enabled DT
|
||||
* node exists for the "real" graphics driver.
|
||||
*/
|
||||
lcd_dt_simplefb_add_node(blob);
|
||||
fdt_simplefb_add_node(blob);
|
||||
|
||||
#ifdef CONFIG_EFI_LOADER
|
||||
/* Reserve the spin table */
|
||||
|
||||
@ -8,18 +8,22 @@ config CMD_STBOARD
|
||||
|
||||
config MTDPARTS_NAND0_BOOT
|
||||
string "mtd boot partitions for nand0"
|
||||
default "2m(fsbl),2m(ssbl1),2m(ssbl2)"
|
||||
default "2m(fsbl),2m(ssbl1),2m(ssbl2)" if STM32MP15x_STM32IMAGE || \
|
||||
!TFABOOT
|
||||
default "2m(fsbl),4m(fip1),4m(fip2)"
|
||||
depends on SYS_MTDPARTS_RUNTIME && ARCH_STM32MP
|
||||
help
|
||||
This define the partitions of nand0 used to build mtparts dynamically
|
||||
for boot from nand0.
|
||||
Each partition need to be aligned with the device erase block size,
|
||||
512KB is the max size for the NAND supported by stm32mp1 platform.
|
||||
The fsbl partition support multiple copy of the same binary, one by
|
||||
erase block.
|
||||
|
||||
config MTDPARTS_NAND0_TEE
|
||||
string "mtd tee partitions for nand0"
|
||||
default "512k(teeh),512k(teed),512k(teex)"
|
||||
depends on SYS_MTDPARTS_RUNTIME && ARCH_STM32MP
|
||||
depends on SYS_MTDPARTS_RUNTIME && ARCH_STM32MP && STM32MP15x_STM32IMAGE
|
||||
help
|
||||
This define the tee partitions added in mtparts dynamically
|
||||
when tee is supported with boot from nand0.
|
||||
@ -28,7 +32,9 @@ config MTDPARTS_NAND0_TEE
|
||||
|
||||
config MTDPARTS_NOR0_BOOT
|
||||
string "mtd boot partitions for nor0"
|
||||
default "256k(fsbl1),256k(fsbl2),2m(ssbl),512k(u-boot-env)"
|
||||
default "256k(fsbl1),256k(fsbl2),2m(ssbl),512k(u-boot-env)" if STM32MP15x_STM32IMAGE || \
|
||||
!TFABOOT
|
||||
default "256k(fsbl1),256k(fsbl2),4m(fip),512k(u-boot-env)"
|
||||
depends on SYS_MTDPARTS_RUNTIME && ARCH_STM32MP
|
||||
help
|
||||
This define the partitions of nand0 used to build mtparts dynamically
|
||||
@ -40,24 +46,27 @@ config MTDPARTS_NOR0_BOOT
|
||||
config MTDPARTS_NOR0_TEE
|
||||
string "mtd tee partitions for nor0"
|
||||
default "256k(teeh),512k(teed),256k(teex)"
|
||||
depends on SYS_MTDPARTS_RUNTIME && ARCH_STM32MP
|
||||
depends on SYS_MTDPARTS_RUNTIME && ARCH_STM32MP && STM32MP15x_STM32IMAGE
|
||||
help
|
||||
This define the tee partitions added in mtparts dynamically
|
||||
when tee is supported with boot from nor0.
|
||||
|
||||
config MTDPARTS_SPINAND0_BOOT
|
||||
string "mtd boot partitions for spi-nand0"
|
||||
default "2m(fsbl),2m(ssbl1),2m(ssbl2)"
|
||||
default "2m(fsbl),2m(ssbl1),2m(ssbl2)" if STM32MP15x_STM32IMAGE || !TFABOOT
|
||||
default "2m(fsbl),4m(fip1),4m(fip2)"
|
||||
depends on SYS_MTDPARTS_RUNTIME && ARCH_STM32MP
|
||||
help
|
||||
This define the partitions of nand0 used to build mtparts dynamically
|
||||
for boot from spi-nand0,
|
||||
512KB is the max size for the NAND supported by stm32mp1 platform.
|
||||
The fsbl partition support multiple copy of the same binary, one by
|
||||
erase block.
|
||||
|
||||
config MTDPARTS_SPINAND0_TEE
|
||||
string "mtd tee partitions for spi-nand0"
|
||||
default "512k(teeh),512k(teed),512k(teex)"
|
||||
depends on SYS_MTDPARTS_RUNTIME && ARCH_STM32MP
|
||||
depends on SYS_MTDPARTS_RUNTIME && ARCH_STM32MP && STM32MP15x_STM32IMAGE
|
||||
help
|
||||
This define the tee partitions added in mtparts dynamically
|
||||
when tee is supported with boot from spi-nand0,
|
||||
|
||||
@ -142,7 +142,8 @@ void set_dfu_alt_info(char *interface, char *devstr)
|
||||
board_get_alt_info_mtd(mtd, buf);
|
||||
}
|
||||
|
||||
if (IS_ENABLED(CONFIG_DFU_VIRT)) {
|
||||
if (IS_ENABLED(CONFIG_DFU_VIRT) &&
|
||||
IS_ENABLED(CMD_STM32PROG_USB)) {
|
||||
strncat(buf, "&virt 0=OTP", DFU_ALT_BUF_LEN);
|
||||
|
||||
if (IS_ENABLED(CONFIG_PMIC_STPMIC1))
|
||||
@ -216,7 +217,7 @@ int dfu_read_medium_virt(struct dfu_entity *dfu, u64 offset,
|
||||
return dfu_pmic_read(offset, buf, len);
|
||||
}
|
||||
|
||||
if (CONFIG_IS_ENABLED(CMD_STM32PROG) &&
|
||||
if (IS_ENABLED(CONFIG_CMD_STM32PROG_USB) &&
|
||||
dfu->data.virt.dev_num >= STM32PROG_VIRT_FIRST_DEV_NUM)
|
||||
return stm32prog_read_medium_virt(dfu, offset, buf, len);
|
||||
|
||||
@ -227,7 +228,7 @@ int dfu_read_medium_virt(struct dfu_entity *dfu, u64 offset,
|
||||
int dfu_write_medium_virt(struct dfu_entity *dfu, u64 offset,
|
||||
void *buf, long *len)
|
||||
{
|
||||
if (CONFIG_IS_ENABLED(CMD_STM32PROG) &&
|
||||
if (IS_ENABLED(CONFIG_CMD_STM32PROG_USB) &&
|
||||
dfu->data.virt.dev_num >= STM32PROG_VIRT_FIRST_DEV_NUM)
|
||||
return stm32prog_write_medium_virt(dfu, offset, buf, len);
|
||||
|
||||
@ -236,7 +237,7 @@ int dfu_write_medium_virt(struct dfu_entity *dfu, u64 offset,
|
||||
|
||||
int __weak dfu_get_medium_size_virt(struct dfu_entity *dfu, u64 *size)
|
||||
{
|
||||
if (CONFIG_IS_ENABLED(CMD_STM32PROG) &&
|
||||
if (IS_ENABLED(CONFIG_CMD_STM32PROG_USB) &&
|
||||
dfu->data.virt.dev_num >= STM32PROG_VIRT_FIRST_DEV_NUM)
|
||||
return stm32prog_get_medium_size_virt(dfu, size);
|
||||
|
||||
|
||||
@ -10,7 +10,9 @@
|
||||
#include <env_internal.h>
|
||||
#include <mtd.h>
|
||||
#include <mtd_node.h>
|
||||
#ifdef CONFIG_STM32MP15x_STM32IMAGE
|
||||
#include <tee.h>
|
||||
#endif
|
||||
#include <asm/arch/stm32prog.h>
|
||||
#include <asm/arch/sys_proto.h>
|
||||
|
||||
@ -29,7 +31,9 @@ static void board_set_mtdparts(const char *dev,
|
||||
char *mtdids,
|
||||
char *mtdparts,
|
||||
const char *boot,
|
||||
#ifdef CONFIG_STM32MP15x_STM32IMAGE
|
||||
const char *tee,
|
||||
#endif
|
||||
const char *user)
|
||||
{
|
||||
/* mtdids: "<dev>=<dev>, ...." */
|
||||
@ -53,10 +57,12 @@ static void board_set_mtdparts(const char *dev,
|
||||
strncat(mtdparts, ",", MTDPARTS_LEN);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_STM32MP15x_STM32IMAGE
|
||||
if (tee) {
|
||||
strncat(mtdparts, tee, MTDPARTS_LEN);
|
||||
strncat(mtdparts, ",", MTDPARTS_LEN);
|
||||
}
|
||||
#endif
|
||||
|
||||
strncat(mtdparts, user, MTDPARTS_LEN);
|
||||
}
|
||||
@ -68,7 +74,10 @@ void board_mtdparts_default(const char **mtdids, const char **mtdparts)
|
||||
static char parts[3 * MTDPARTS_LEN + 1];
|
||||
static char ids[MTDIDS_LEN + 1];
|
||||
static bool mtd_initialized;
|
||||
bool tee, nor, nand, spinand, serial;
|
||||
bool nor, nand, spinand, serial;
|
||||
#ifdef CONFIG_STM32MP15x_STM32IMAGE
|
||||
bool tee = false;
|
||||
#endif
|
||||
|
||||
if (mtd_initialized) {
|
||||
*mtdids = ids;
|
||||
@ -76,7 +85,6 @@ void board_mtdparts_default(const char **mtdids, const char **mtdparts)
|
||||
return;
|
||||
}
|
||||
|
||||
tee = false;
|
||||
nor = false;
|
||||
nand = false;
|
||||
spinand = false;
|
||||
@ -87,7 +95,9 @@ void board_mtdparts_default(const char **mtdids, const char **mtdparts)
|
||||
case BOOT_SERIAL_USB:
|
||||
serial = true;
|
||||
if (CONFIG_IS_ENABLED(CMD_STM32PROG)) {
|
||||
#ifdef CONFIG_STM32MP15x_STM32IMAGE
|
||||
tee = stm32prog_get_tee_partitions();
|
||||
#endif
|
||||
nor = stm32prog_get_fsbl_nor();
|
||||
}
|
||||
nand = true;
|
||||
@ -106,9 +116,11 @@ void board_mtdparts_default(const char **mtdids, const char **mtdparts)
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_STM32MP15x_STM32IMAGE
|
||||
if (!serial && CONFIG_IS_ENABLED(OPTEE) &&
|
||||
tee_find_device(NULL, NULL, NULL, NULL))
|
||||
tee = true;
|
||||
#endif
|
||||
|
||||
memset(parts, 0, sizeof(parts));
|
||||
memset(ids, 0, sizeof(ids));
|
||||
@ -120,29 +132,27 @@ void board_mtdparts_default(const char **mtdids, const char **mtdparts)
|
||||
pr_debug("mtd device = %s\n", dev->name);
|
||||
}
|
||||
|
||||
if (nor || nand) {
|
||||
if (nand) {
|
||||
mtd = get_mtd_device_nm("nand0");
|
||||
if (!IS_ERR_OR_NULL(mtd)) {
|
||||
const char *mtd_boot = CONFIG_MTDPARTS_NAND0_BOOT;
|
||||
const char *mtd_tee = CONFIG_MTDPARTS_NAND0_TEE;
|
||||
|
||||
board_set_mtdparts("nand0", ids, parts,
|
||||
!nor ? mtd_boot : NULL,
|
||||
!nor && tee ? mtd_tee : NULL,
|
||||
CONFIG_MTDPARTS_NAND0_BOOT,
|
||||
#ifdef CONFIG_STM32MP15x_STM32IMAGE
|
||||
!nor && tee ? CONFIG_MTDPARTS_NAND0_TEE : NULL,
|
||||
#endif
|
||||
"-(UBI)");
|
||||
put_mtd_device(mtd);
|
||||
}
|
||||
}
|
||||
|
||||
if (nor || spinand) {
|
||||
if (spinand) {
|
||||
mtd = get_mtd_device_nm("spi-nand0");
|
||||
if (!IS_ERR_OR_NULL(mtd)) {
|
||||
const char *mtd_boot = CONFIG_MTDPARTS_SPINAND0_BOOT;
|
||||
const char *mtd_tee = CONFIG_MTDPARTS_SPINAND0_TEE;
|
||||
|
||||
board_set_mtdparts("spi-nand0", ids, parts,
|
||||
!nor ? mtd_boot : NULL,
|
||||
!nor && tee ? mtd_tee : NULL,
|
||||
CONFIG_MTDPARTS_SPINAND0_BOOT,
|
||||
#ifdef CONFIG_STM32MP15x_STM32IMAGE
|
||||
!nor && tee ? CONFIG_MTDPARTS_SPINAND0_TEE : NULL,
|
||||
#endif
|
||||
"-(UBI)");
|
||||
put_mtd_device(mtd);
|
||||
}
|
||||
@ -150,12 +160,11 @@ void board_mtdparts_default(const char **mtdids, const char **mtdparts)
|
||||
|
||||
if (nor) {
|
||||
if (!uclass_get_device(UCLASS_SPI_FLASH, 0, &dev)) {
|
||||
const char *mtd_boot = CONFIG_MTDPARTS_NOR0_BOOT;
|
||||
const char *mtd_tee = CONFIG_MTDPARTS_NOR0_TEE;
|
||||
|
||||
board_set_mtdparts("nor0", ids, parts,
|
||||
mtd_boot,
|
||||
tee ? mtd_tee : NULL,
|
||||
CONFIG_MTDPARTS_NOR0_BOOT,
|
||||
#ifdef CONFIG_STM32MP15x_STM32IMAGE
|
||||
tee ? CONFIG_MTDPARTS_NOR0_TEE : NULL,
|
||||
#endif
|
||||
"-(nor_user)");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,20 @@
|
||||
/*
|
||||
* Compilation:
|
||||
* mkimage -f fit_copro_kernel_dtb.its fit_copro_kernel_dtb.itb
|
||||
*
|
||||
* M4 firmware to load with remoteproc: rproc-m4-fw.elf
|
||||
*
|
||||
* Files in linux build dir:
|
||||
* - arch/arm/boot/zImage
|
||||
* - arch/arm/boot/dts/stm32mp157c-dk2.dtb
|
||||
* - arch/arm/boot/dts/stm32mp157c-ev1.dtb
|
||||
*
|
||||
* load mmc 0:4 $kernel_addr_r fit_copro_kernel_dtb.itb
|
||||
* bootm $kernel_addr_r
|
||||
* bootm $kernel_addr_r#dk2
|
||||
* bootm $kernel_addr_r#ev1
|
||||
* bootm $kernel_addr_r#dk2-m4
|
||||
* bootm $kernel_addr_r#ev1-m4
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
@ -29,8 +43,8 @@
|
||||
arch = "arm";
|
||||
os = "linux";
|
||||
compression = "none";
|
||||
load = <0xC0008000>;
|
||||
entry = <0xC0008000>;
|
||||
load = <0xC4000000>;
|
||||
entry = <0xC4000000>;
|
||||
hash-1 {
|
||||
algo = "sha1";
|
||||
};
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
* mkimage -f fit_kernel_dtb.its fit_kernel_dtb.itb
|
||||
*
|
||||
* Files in linux build dir:
|
||||
* - arch/arm/boot/zImage
|
||||
* - arch/arm/boot/Image (gzipped in Image.gz)
|
||||
* - arch/arm/boot/dts/stm32mp157c-dk2.dtb
|
||||
* - arch/arm/boot/dts/stm32mp157c-ev1.dtb
|
||||
*
|
||||
@ -23,11 +23,11 @@
|
||||
images {
|
||||
kernel {
|
||||
description = "Linux kernel";
|
||||
data = /incbin/("zImage");
|
||||
data = /incbin/("Image.gz");
|
||||
type = "kernel";
|
||||
arch = "arm";
|
||||
os = "linux";
|
||||
compression = "none";
|
||||
compression = "gzip";
|
||||
load = <0xC0008000>;
|
||||
entry = <0xC0008000>;
|
||||
hash-1 {
|
||||
|
||||
@ -10,11 +10,13 @@
|
||||
#include <dm.h>
|
||||
#include <env.h>
|
||||
#include <env_internal.h>
|
||||
#include <fdt_simplefb.h>
|
||||
#include <fdt_support.h>
|
||||
#include <g_dnl.h>
|
||||
#include <generic-phy.h>
|
||||
#include <hang.h>
|
||||
#include <i2c.h>
|
||||
#include <regmap.h>
|
||||
#include <init.h>
|
||||
#include <led.h>
|
||||
#include <log.h>
|
||||
@ -66,16 +68,6 @@
|
||||
|
||||
#define SYSCFG_CMPENSETR_MPU_EN BIT(0)
|
||||
|
||||
#define SYSCFG_PMCSETR_ETH_CLK_SEL BIT(16)
|
||||
#define SYSCFG_PMCSETR_ETH_REF_CLK_SEL BIT(17)
|
||||
|
||||
#define SYSCFG_PMCSETR_ETH_SELMII BIT(20)
|
||||
|
||||
#define SYSCFG_PMCSETR_ETH_SEL_MASK GENMASK(23, 21)
|
||||
#define SYSCFG_PMCSETR_ETH_SEL_GMII_MII 0
|
||||
#define SYSCFG_PMCSETR_ETH_SEL_RGMII BIT(21)
|
||||
#define SYSCFG_PMCSETR_ETH_SEL_RMII BIT(23)
|
||||
|
||||
/*
|
||||
* Get a global data pointer
|
||||
*/
|
||||
@ -101,7 +93,9 @@ int checkboard(void)
|
||||
const char *fdt_compat;
|
||||
int fdt_compat_len;
|
||||
|
||||
if (IS_ENABLED(CONFIG_TFABOOT))
|
||||
if (IS_ENABLED(CONFIG_STM32MP15x_STM32IMAGE))
|
||||
mode = "trusted - stm32image";
|
||||
else if (IS_ENABLED(CONFIG_TFABOOT))
|
||||
mode = "trusted";
|
||||
else
|
||||
mode = "basic";
|
||||
@ -153,6 +147,7 @@ static void board_key_check(void)
|
||||
debug("%s: could not find a /config/st,fastboot-gpios\n",
|
||||
__func__);
|
||||
} else {
|
||||
udelay(20);
|
||||
if (dm_gpio_get_value(&gpio)) {
|
||||
puts("Fastboot key pressed, ");
|
||||
boot_mode = BOOT_FASTBOOT;
|
||||
@ -167,6 +162,7 @@ static void board_key_check(void)
|
||||
debug("%s: could not find a /config/st,stm32prog-gpios\n",
|
||||
__func__);
|
||||
} else {
|
||||
udelay(20);
|
||||
if (dm_gpio_get_value(&gpio)) {
|
||||
puts("STM32Programmer key pressed, ");
|
||||
boot_mode = BOOT_STM32PROG;
|
||||
@ -288,42 +284,13 @@ static void __maybe_unused led_error_blink(u32 nb_blink)
|
||||
hang();
|
||||
}
|
||||
|
||||
static int board_check_usb_power(void)
|
||||
static int adc_measurement(ofnode node, int adc_count, int *min_uV, int *max_uV)
|
||||
{
|
||||
struct ofnode_phandle_args adc_args;
|
||||
struct udevice *adc;
|
||||
ofnode node;
|
||||
unsigned int raw;
|
||||
int max_uV = 0;
|
||||
int min_uV = USB_START_HIGH_THRESHOLD_UV;
|
||||
int ret, uV, adc_count;
|
||||
u32 nb_blink;
|
||||
u8 i;
|
||||
|
||||
if (!IS_ENABLED(CONFIG_ADC))
|
||||
return -ENODEV;
|
||||
|
||||
node = ofnode_path("/config");
|
||||
if (!ofnode_valid(node)) {
|
||||
debug("%s: no /config node?\n", __func__);
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
/*
|
||||
* Retrieve the ADC channels devices and get measurement
|
||||
* for each of them
|
||||
*/
|
||||
adc_count = ofnode_count_phandle_with_args(node, "st,adc_usb_pd",
|
||||
"#io-channel-cells");
|
||||
if (adc_count < 0) {
|
||||
if (adc_count == -ENOENT)
|
||||
return 0;
|
||||
|
||||
pr_err("%s: can't find adc channel (%d)\n", __func__,
|
||||
adc_count);
|
||||
|
||||
return adc_count;
|
||||
}
|
||||
int ret, uV;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < adc_count; i++) {
|
||||
if (ofnode_parse_phandle_with_args(node, "st,adc_usb_pd",
|
||||
@ -352,10 +319,10 @@ static int board_check_usb_power(void)
|
||||
}
|
||||
/* Convert to uV */
|
||||
if (!adc_raw_to_uV(adc, raw, &uV)) {
|
||||
if (uV > max_uV)
|
||||
max_uV = uV;
|
||||
if (uV < min_uV)
|
||||
min_uV = uV;
|
||||
if (uV > *max_uV)
|
||||
*max_uV = uV;
|
||||
if (uV < *min_uV)
|
||||
*min_uV = uV;
|
||||
pr_debug("%s: %s[%02d] = %u, %d uV\n", __func__,
|
||||
adc->name, adc_args.args[0], raw, uV);
|
||||
} else {
|
||||
@ -364,18 +331,66 @@ static int board_check_usb_power(void)
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int board_check_usb_power(void)
|
||||
{
|
||||
ofnode node;
|
||||
int max_uV = 0;
|
||||
int min_uV = USB_START_HIGH_THRESHOLD_UV;
|
||||
int adc_count, ret;
|
||||
u32 nb_blink;
|
||||
u8 i;
|
||||
|
||||
if (!IS_ENABLED(CONFIG_ADC))
|
||||
return -ENODEV;
|
||||
|
||||
node = ofnode_path("/config");
|
||||
if (!ofnode_valid(node)) {
|
||||
debug("%s: no /config node?\n", __func__);
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
/*
|
||||
* If highest value is inside 1.23 Volts and 2.10 Volts, that means
|
||||
* board is plugged on an USB-C 3A power supply and boot process can
|
||||
* continue.
|
||||
* Retrieve the ADC channels devices and get measurement
|
||||
* for each of them
|
||||
*/
|
||||
if (max_uV > USB_START_LOW_THRESHOLD_UV &&
|
||||
max_uV <= USB_START_HIGH_THRESHOLD_UV &&
|
||||
min_uV <= USB_LOW_THRESHOLD_UV)
|
||||
return 0;
|
||||
adc_count = ofnode_count_phandle_with_args(node, "st,adc_usb_pd",
|
||||
"#io-channel-cells");
|
||||
if (adc_count < 0) {
|
||||
if (adc_count == -ENOENT)
|
||||
return 0;
|
||||
|
||||
pr_err("%s: can't find adc channel (%d)\n", __func__,
|
||||
adc_count);
|
||||
|
||||
return adc_count;
|
||||
}
|
||||
|
||||
/* perform maximum of 2 ADC measurement to detect power supply current */
|
||||
for (i = 0; i < 2; i++) {
|
||||
ret = adc_measurement(node, adc_count, &min_uV, &max_uV);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/*
|
||||
* If highest value is inside 1.23 Volts and 2.10 Volts, that means
|
||||
* board is plugged on an USB-C 3A power supply and boot process can
|
||||
* continue.
|
||||
*/
|
||||
if (max_uV > USB_START_LOW_THRESHOLD_UV &&
|
||||
max_uV <= USB_START_HIGH_THRESHOLD_UV &&
|
||||
min_uV <= USB_LOW_THRESHOLD_UV)
|
||||
return 0;
|
||||
|
||||
if (i == 0) {
|
||||
pr_debug("Previous ADC measurements was not the one expected, retry in 20ms\n");
|
||||
mdelay(20); /* equal to max tPDDebounce duration (min 10ms - max 20ms) */
|
||||
}
|
||||
}
|
||||
|
||||
pr_err("****************************************************\n");
|
||||
|
||||
/*
|
||||
* If highest and lowest value are either both below
|
||||
* USB_LOW_THRESHOLD_UV or both above USB_LOW_THRESHOLD_UV, that
|
||||
@ -583,7 +598,8 @@ error:
|
||||
static bool board_is_dk2(void)
|
||||
{
|
||||
if (CONFIG_IS_ENABLED(TARGET_ST_STM32MP15x) &&
|
||||
of_machine_is_compatible("st,stm32mp157c-dk2"))
|
||||
(of_machine_is_compatible("st,stm32mp157c-dk2") ||
|
||||
of_machine_is_compatible("st,stm32mp157f-dk2")))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
@ -627,9 +643,6 @@ int board_init(void)
|
||||
/* address of boot parameters */
|
||||
gd->bd->bi_boot_params = STM32_DDR_BASE + 0x100;
|
||||
|
||||
if (CONFIG_IS_ENABLED(DM_GPIO_HOG))
|
||||
gpio_hog_probe_all();
|
||||
|
||||
board_key_check();
|
||||
|
||||
if (board_is_ev1())
|
||||
@ -707,74 +720,112 @@ void board_quiesce_devices(void)
|
||||
setup_led(LEDST_OFF);
|
||||
}
|
||||
|
||||
/* CLOCK feed to PHY*/
|
||||
#define ETH_CK_F_25M 25000000
|
||||
#define ETH_CK_F_50M 50000000
|
||||
#define ETH_CK_F_125M 125000000
|
||||
|
||||
struct stm32_syscfg_pmcsetr {
|
||||
u32 syscfg_clr_off;
|
||||
u32 eth1_clk_sel;
|
||||
u32 eth1_ref_clk_sel;
|
||||
u32 eth1_sel_mii;
|
||||
u32 eth1_sel_rgmii;
|
||||
u32 eth1_sel_rmii;
|
||||
u32 eth2_clk_sel;
|
||||
u32 eth2_ref_clk_sel;
|
||||
u32 eth2_sel_rgmii;
|
||||
u32 eth2_sel_rmii;
|
||||
};
|
||||
|
||||
const struct stm32_syscfg_pmcsetr stm32mp15_syscfg_pmcsetr = {
|
||||
.syscfg_clr_off = 0x44,
|
||||
.eth1_clk_sel = BIT(16),
|
||||
.eth1_ref_clk_sel = BIT(17),
|
||||
.eth1_sel_mii = BIT(20),
|
||||
.eth1_sel_rgmii = BIT(21),
|
||||
.eth1_sel_rmii = BIT(23),
|
||||
.eth2_clk_sel = 0,
|
||||
.eth2_ref_clk_sel = 0,
|
||||
.eth2_sel_rgmii = 0,
|
||||
.eth2_sel_rmii = 0
|
||||
};
|
||||
|
||||
#define SYSCFG_PMCSETR_ETH_MASK GENMASK(23, 16)
|
||||
#define SYSCFG_PMCR_ETH_SEL_GMII 0
|
||||
|
||||
/* eth init function : weak called in eqos driver */
|
||||
int board_interface_eth_init(struct udevice *dev,
|
||||
phy_interface_t interface_type)
|
||||
phy_interface_t interface_type, ulong rate)
|
||||
{
|
||||
u8 *syscfg;
|
||||
struct regmap *regmap;
|
||||
uint regmap_mask;
|
||||
int ret;
|
||||
u32 value;
|
||||
bool eth_clk_sel_reg = false;
|
||||
bool eth_ref_clk_sel_reg = false;
|
||||
bool ext_phyclk, eth_clk_sel_reg, eth_ref_clk_sel_reg;
|
||||
const struct stm32_syscfg_pmcsetr *pmcsetr;
|
||||
|
||||
/* Ethernet PHY have no crystal */
|
||||
ext_phyclk = dev_read_bool(dev, "st,ext-phyclk");
|
||||
|
||||
/* Gigabit Ethernet 125MHz clock selection. */
|
||||
eth_clk_sel_reg = dev_read_bool(dev, "st,eth_clk_sel");
|
||||
eth_clk_sel_reg = dev_read_bool(dev, "st,eth-clk-sel");
|
||||
|
||||
/* Ethernet 50Mhz RMII clock selection */
|
||||
eth_ref_clk_sel_reg =
|
||||
dev_read_bool(dev, "st,eth_ref_clk_sel");
|
||||
eth_ref_clk_sel_reg = dev_read_bool(dev, "st,eth-ref-clk-sel");
|
||||
|
||||
syscfg = (u8 *)syscon_get_first_range(STM32MP_SYSCON_SYSCFG);
|
||||
pmcsetr = &stm32mp15_syscfg_pmcsetr;
|
||||
|
||||
if (!syscfg)
|
||||
regmap = syscon_regmap_lookup_by_phandle(dev, "st,syscon");
|
||||
if (!IS_ERR(regmap)) {
|
||||
u32 fmp[3];
|
||||
|
||||
ret = dev_read_u32_array(dev, "st,syscon", fmp, 3);
|
||||
if (ret)
|
||||
/* If no mask in DT, it is MP15 (backward compatibility) */
|
||||
regmap_mask = SYSCFG_PMCSETR_ETH_MASK;
|
||||
else
|
||||
regmap_mask = fmp[2];
|
||||
} else {
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
switch (interface_type) {
|
||||
case PHY_INTERFACE_MODE_MII:
|
||||
value = SYSCFG_PMCSETR_ETH_SEL_GMII_MII |
|
||||
SYSCFG_PMCSETR_ETH_REF_CLK_SEL;
|
||||
debug("%s: PHY_INTERFACE_MODE_MII\n", __func__);
|
||||
value = pmcsetr->eth1_sel_mii;
|
||||
log_debug("PHY_INTERFACE_MODE_MII\n");
|
||||
break;
|
||||
case PHY_INTERFACE_MODE_GMII:
|
||||
if (eth_clk_sel_reg)
|
||||
value = SYSCFG_PMCSETR_ETH_SEL_GMII_MII |
|
||||
SYSCFG_PMCSETR_ETH_CLK_SEL;
|
||||
else
|
||||
value = SYSCFG_PMCSETR_ETH_SEL_GMII_MII;
|
||||
debug("%s: PHY_INTERFACE_MODE_GMII\n", __func__);
|
||||
value = SYSCFG_PMCR_ETH_SEL_GMII;
|
||||
log_debug("PHY_INTERFACE_MODE_GMII\n");
|
||||
break;
|
||||
case PHY_INTERFACE_MODE_RMII:
|
||||
if (eth_ref_clk_sel_reg)
|
||||
value = SYSCFG_PMCSETR_ETH_SEL_RMII |
|
||||
SYSCFG_PMCSETR_ETH_REF_CLK_SEL;
|
||||
else
|
||||
value = SYSCFG_PMCSETR_ETH_SEL_RMII;
|
||||
debug("%s: PHY_INTERFACE_MODE_RMII\n", __func__);
|
||||
value = pmcsetr->eth1_sel_rmii;
|
||||
if (rate == ETH_CK_F_50M && (eth_clk_sel_reg || ext_phyclk))
|
||||
value |= pmcsetr->eth1_ref_clk_sel;
|
||||
log_debug("PHY_INTERFACE_MODE_RMII\n");
|
||||
break;
|
||||
case PHY_INTERFACE_MODE_RGMII:
|
||||
case PHY_INTERFACE_MODE_RGMII_ID:
|
||||
case PHY_INTERFACE_MODE_RGMII_RXID:
|
||||
case PHY_INTERFACE_MODE_RGMII_TXID:
|
||||
if (eth_clk_sel_reg)
|
||||
value = SYSCFG_PMCSETR_ETH_SEL_RGMII |
|
||||
SYSCFG_PMCSETR_ETH_CLK_SEL;
|
||||
else
|
||||
value = SYSCFG_PMCSETR_ETH_SEL_RGMII;
|
||||
debug("%s: PHY_INTERFACE_MODE_RGMII\n", __func__);
|
||||
value = pmcsetr->eth1_sel_rgmii;
|
||||
if (rate == ETH_CK_F_125M && (eth_clk_sel_reg || ext_phyclk))
|
||||
value |= pmcsetr->eth1_clk_sel;
|
||||
log_debug("PHY_INTERFACE_MODE_RGMII\n");
|
||||
break;
|
||||
default:
|
||||
debug("%s: Do not manage %d interface\n",
|
||||
__func__, interface_type);
|
||||
log_debug("Do not manage %d interface\n", interface_type);
|
||||
/* Do not manage others interfaces */
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* clear and set ETH configuration bits */
|
||||
writel(SYSCFG_PMCSETR_ETH_SEL_MASK | SYSCFG_PMCSETR_ETH_SELMII |
|
||||
SYSCFG_PMCSETR_ETH_REF_CLK_SEL | SYSCFG_PMCSETR_ETH_CLK_SEL,
|
||||
syscfg + SYSCFG_PMCCLRR);
|
||||
writel(value, syscfg + SYSCFG_PMCSETR);
|
||||
/* Need to update PMCCLRR (clear register) */
|
||||
regmap_write(regmap, pmcsetr->syscfg_clr_off, regmap_mask);
|
||||
|
||||
return 0;
|
||||
ret = regmap_update_bits(regmap, SYSCFG_PMCSETR, regmap_mask, value);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
enum env_location env_get_location(enum env_operation op, int prio)
|
||||
@ -832,10 +883,17 @@ const char *env_ext4_get_dev_part(void)
|
||||
|
||||
return dev_part[(bootmode & TAMP_BOOT_INSTANCE_MASK) - 1];
|
||||
}
|
||||
|
||||
int mmc_get_env_dev(void)
|
||||
{
|
||||
u32 bootmode = get_bootmode();
|
||||
u32 bootmode;
|
||||
|
||||
if (CONFIG_SYS_MMC_ENV_DEV >= 0)
|
||||
return CONFIG_SYS_MMC_ENV_DEV;
|
||||
|
||||
bootmode = get_bootmode();
|
||||
|
||||
/* use boot instance to select the correct mmc device identifier */
|
||||
return (bootmode & TAMP_BOOT_INSTANCE_MASK) - 1;
|
||||
}
|
||||
|
||||
@ -848,9 +906,17 @@ int ft_board_setup(void *blob, struct bd_info *bd)
|
||||
{ "st,stm32mp15-fmc2", MTD_DEV_TYPE_NAND, },
|
||||
{ "st,stm32mp1-fmc2-nfc", MTD_DEV_TYPE_NAND, },
|
||||
};
|
||||
char *boot_device;
|
||||
|
||||
if (IS_ENABLED(CONFIG_FDT_FIXUP_PARTITIONS))
|
||||
fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes));
|
||||
/* Check the boot-source and don't update MTD for serial or usb boot */
|
||||
boot_device = env_get("boot_device");
|
||||
if (!boot_device ||
|
||||
(strcmp(boot_device, "serial") && strcmp(boot_device, "usb")))
|
||||
if (IS_ENABLED(CONFIG_FDT_FIXUP_PARTITIONS))
|
||||
fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes));
|
||||
|
||||
if (CONFIG_IS_ENABLED(FDT_SIMPLEFB))
|
||||
fdt_simplefb_add_node_and_mem_rsv(blob);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
103
cmd/pxe_utils.c
103
cmd/pxe_utils.c
@ -13,6 +13,8 @@
|
||||
#include <mapmem.h>
|
||||
#include <lcd.h>
|
||||
#include <net.h>
|
||||
#include <fdt_support.h>
|
||||
#include <linux/libfdt.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/ctype.h>
|
||||
#include <errno.h>
|
||||
@ -284,6 +286,9 @@ static void label_destroy(struct pxe_label *label)
|
||||
if (label->fdtdir)
|
||||
free(label->fdtdir);
|
||||
|
||||
if (label->fdtoverlays)
|
||||
free(label->fdtoverlays);
|
||||
|
||||
free(label);
|
||||
}
|
||||
|
||||
@ -331,6 +336,92 @@ static int label_localboot(struct pxe_label *label)
|
||||
return run_command_list(localcmd, strlen(localcmd), 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Loads fdt overlays specified in 'fdtoverlays'.
|
||||
*/
|
||||
#ifdef CONFIG_OF_LIBFDT_OVERLAY
|
||||
static void label_boot_fdtoverlay(struct cmd_tbl *cmdtp, struct pxe_label *label)
|
||||
{
|
||||
char *fdtoverlay = label->fdtoverlays;
|
||||
struct fdt_header *working_fdt;
|
||||
char *fdtoverlay_addr_env;
|
||||
ulong fdtoverlay_addr;
|
||||
ulong fdt_addr;
|
||||
int err;
|
||||
|
||||
/* Get the main fdt and map it */
|
||||
fdt_addr = simple_strtoul(env_get("fdt_addr_r"), NULL, 16);
|
||||
working_fdt = map_sysmem(fdt_addr, 0);
|
||||
err = fdt_check_header(working_fdt);
|
||||
if (err)
|
||||
return;
|
||||
|
||||
/* Get the specific overlay loading address */
|
||||
fdtoverlay_addr_env = env_get("fdtoverlay_addr_r");
|
||||
if (!fdtoverlay_addr_env) {
|
||||
printf("Invalid fdtoverlay_addr_r for loading overlays\n");
|
||||
return;
|
||||
}
|
||||
|
||||
fdtoverlay_addr = simple_strtoul(fdtoverlay_addr_env, NULL, 16);
|
||||
|
||||
/* Cycle over the overlay files and apply them in order */
|
||||
do {
|
||||
struct fdt_header *blob;
|
||||
char *overlayfile;
|
||||
char *end;
|
||||
int len;
|
||||
|
||||
/* Drop leading spaces */
|
||||
while (*fdtoverlay == ' ')
|
||||
++fdtoverlay;
|
||||
|
||||
/* Copy a single filename if multiple provided */
|
||||
end = strstr(fdtoverlay, " ");
|
||||
if (end) {
|
||||
len = (int)(end - fdtoverlay);
|
||||
overlayfile = malloc(len + 1);
|
||||
strncpy(overlayfile, fdtoverlay, len);
|
||||
overlayfile[len] = '\0';
|
||||
} else
|
||||
overlayfile = fdtoverlay;
|
||||
|
||||
if (!strlen(overlayfile))
|
||||
goto skip_overlay;
|
||||
|
||||
/* Load overlay file */
|
||||
err = get_relfile_envaddr(cmdtp, overlayfile,
|
||||
"fdtoverlay_addr_r");
|
||||
if (err < 0) {
|
||||
printf("Failed loading overlay %s\n", overlayfile);
|
||||
goto skip_overlay;
|
||||
}
|
||||
|
||||
/* Resize main fdt */
|
||||
fdt_shrink_to_minimum(working_fdt, 8192);
|
||||
|
||||
blob = map_sysmem(fdtoverlay_addr, 0);
|
||||
err = fdt_check_header(blob);
|
||||
if (err) {
|
||||
printf("Invalid overlay %s, skipping\n",
|
||||
overlayfile);
|
||||
goto skip_overlay;
|
||||
}
|
||||
|
||||
err = fdt_overlay_apply_verbose(working_fdt, blob);
|
||||
if (err) {
|
||||
printf("Failed to apply overlay %s, skipping\n",
|
||||
overlayfile);
|
||||
goto skip_overlay;
|
||||
}
|
||||
|
||||
skip_overlay:
|
||||
if (end)
|
||||
free(overlayfile);
|
||||
} while ((fdtoverlay = strstr(fdtoverlay, " ")));
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Boot according to the contents of a pxe_label.
|
||||
*
|
||||
@ -525,6 +616,11 @@ static int label_boot(struct cmd_tbl *cmdtp, struct pxe_label *label)
|
||||
label->name);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_OF_LIBFDT_OVERLAY
|
||||
if (label->fdtoverlays)
|
||||
label_boot_fdtoverlay(cmdtp, label);
|
||||
#endif
|
||||
} else {
|
||||
bootm_argv[3] = NULL;
|
||||
}
|
||||
@ -582,6 +678,7 @@ enum token_type {
|
||||
T_INCLUDE,
|
||||
T_FDT,
|
||||
T_FDTDIR,
|
||||
T_FDTOVERLAYS,
|
||||
T_ONTIMEOUT,
|
||||
T_IPAPPEND,
|
||||
T_BACKGROUND,
|
||||
@ -616,6 +713,7 @@ static const struct token keywords[] = {
|
||||
{"fdt", T_FDT},
|
||||
{"devicetreedir", T_FDTDIR},
|
||||
{"fdtdir", T_FDTDIR},
|
||||
{"fdtoverlays", T_FDTOVERLAYS},
|
||||
{"ontimeout", T_ONTIMEOUT,},
|
||||
{"ipappend", T_IPAPPEND,},
|
||||
{"background", T_BACKGROUND,},
|
||||
@ -1048,6 +1146,11 @@ static int parse_label(char **c, struct pxe_menu *cfg)
|
||||
err = parse_sliteral(c, &label->fdtdir);
|
||||
break;
|
||||
|
||||
case T_FDTOVERLAYS:
|
||||
if (!label->fdtoverlays)
|
||||
err = parse_sliteral(c, &label->fdtoverlays);
|
||||
break;
|
||||
|
||||
case T_LOCALBOOT:
|
||||
label->localboot = 1;
|
||||
err = parse_integer(c, &label->localboot_val);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user