diff mbox series

[v7,10/10] ARM: dts: stm32: add STM32MP1-based Phytec board

Message ID 20230330050408.3806093-11-s.trumtrar@pengutronix.de (mailing list archive)
State New, archived
Headers show
Series ARM: stm32: add support for Phycore STM32MP1 | expand

Commit Message

Steffen Trumtrar March 30, 2023, 5:04 a.m. UTC
Add the Phytec STM32MP1-3 Dev board. The devboard uses a Phytec
stm32m157c-som.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
---
 arch/arm/boot/dts/Makefile                    |  3 +-
 .../dts/stm32mp157c-phycore-stm32mp1-3.dts    | 65 +++++++++++++++++++
 2 files changed, 67 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/stm32mp157c-phycore-stm32mp1-3.dts

Comments

Alexandre TORGUE April 3, 2023, 9:15 a.m. UTC | #1
On 3/30/23 07:04, Steffen Trumtrar wrote:
> Add the Phytec STM32MP1-3 Dev board. The devboard uses a Phytec
> stm32m157c-som.
> 
> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
> ---
>   arch/arm/boot/dts/Makefile                    |  3 +-
>   .../dts/stm32mp157c-phycore-stm32mp1-3.dts    | 65 +++++++++++++++++++
>   2 files changed, 67 insertions(+), 1 deletion(-)
>   create mode 100644 arch/arm/boot/dts/stm32mp157c-phycore-stm32mp1-3.dts
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index efe4152e5846d..dfa9a7477c825 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -1252,7 +1252,8 @@ dtb-$(CONFIG_ARCH_STM32) += \
>   	stm32mp157c-ev1.dtb \
>   	stm32mp157c-ev1-scmi.dtb \
>   	stm32mp157c-lxa-mc1.dtb \
> -	stm32mp157c-odyssey.dtb
> +	stm32mp157c-odyssey.dtb \
> +	stm32mp157c-phycore-stm32mp1-3.dtb
>   dtb-$(CONFIG_MACH_SUN4I) += \
>   	sun4i-a10-a1000.dtb \
>   	sun4i-a10-ba10-tvbox.dtb \
> diff --git a/arch/arm/boot/dts/stm32mp157c-phycore-stm32mp1-3.dts b/arch/arm/boot/dts/stm32mp157c-phycore-stm32mp1-3.dts
> new file mode 100644
> index 0000000000000..b433adc728710
> --- /dev/null
> +++ b/arch/arm/boot/dts/stm32mp157c-phycore-stm32mp1-3.dts
> @@ -0,0 +1,65 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
> +/*
> + * Copyright (C) Phytec GmbH 2019-2020 - All Rights Reserved
> + * Author: Dom VOVARD <dom.vovard@linrt.com>.
> + */
> +
> +/dts-v1/;
> +
> +#include <dt-bindings/pinctrl/stm32-pinfunc.h>
> +#include "stm32mp157.dtsi"
> +#include "stm32mp15xc.dtsi"
> +#include "stm32mp15xxac-pinctrl.dtsi"
> +#include "stm32mp157c-phycore-stm32mp15-som.dtsi"
> +
> +/ {
> +	model = "PHYTEC phyCORE-STM32MP1-3 Dev Board";
> +	compatible = "phytec,phycore-stm32mp1-3",
> +		     "phytec,phycore-stm32mp157c-som", "st,stm32mp157";
> +
> +	aliases {
> +		mmc0 = &sdmmc1;
> +		mmc1 = &sdmmc2;
> +		mmc2 = &sdmmc3;

mmc aliases are still used in linux?

> +		serial0 = &uart4;
> +		serial1 = &usart3;
> +		serial2 = &usart1;
> +	};
> +};
> +
> +&cryp1 {
> +	status = "okay";
> +};
> +
> +&dts {
> +	status = "okay";
> +};
> +
> +&fmc {
> +	status = "disabled";
> +};
> +
> +&gpu {
> +	status = "okay";
> +};
> +
> +&i2c4_eeprom {
> +	status = "okay";
> +};
> +
> +&i2c4_rtc {
> +	status = "okay";
> +};
> +
> +&qspi {
> +	status = "okay";
> +};
> +
> +&sdmmc1 {
> +	secure-status = "disabled";
> +};
> +
> +&sdmmc2 {
> +	status = "okay";
> +	secure-status = "disabled";
> +};

What is the need to put the secure status disabled for SDMMC nodes ?
Ahmad Fatoum April 3, 2023, 9:28 a.m. UTC | #2
Hello Alexandre,

On 03.04.23 11:15, Alexandre TORGUE wrote:
> On 3/30/23 07:04, Steffen Trumtrar wrote:
>> Add the Phytec STM32MP1-3 Dev board. The devboard uses a Phytec
>> stm32m157c-som.
>>
>> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
>> ---

[snip]

>> +/ {
>> +    model = "PHYTEC phyCORE-STM32MP1-3 Dev Board";
>> +    compatible = "phytec,phycore-stm32mp1-3",
>> +             "phytec,phycore-stm32mp157c-som", "st,stm32mp157";
>> +
>> +    aliases {
>> +        mmc0 = &sdmmc1;
>> +        mmc1 = &sdmmc2;
>> +        mmc2 = &sdmmc3;
> 
> mmc aliases are still used in linux?

Since kernel commit fa2d0aa96941 ("mmc: core: Allow setting slot
index via device tree alias") added with v5.10-rc1, aliases
dictate kernel numbering of /dev/mmcblk devices, so it's good
to have these aliases for consistency as the alternative of
using PARTUUID breaks down once the same image is flashed to
both SD and eMMC and use of an initrd is not always practical.

>> +&sdmmc1 {
>> +    secure-status = "disabled";
>> +};
>> +
>> +&sdmmc2 {
>> +    status = "okay";
>> +    secure-status = "disabled";
>> +};
> 
> What is the need to put the secure status disabled for SDMMC nodes ?

TF-A parses them, but for SDMMC, it should have no effect, so I agree
they can be removed.

Cheers,
Ahmad
Alexandre TORGUE April 3, 2023, 9:45 a.m. UTC | #3
Hello Ahmad

On 4/3/23 11:28, Ahmad Fatoum wrote:
> Hello Alexandre,
> 
> On 03.04.23 11:15, Alexandre TORGUE wrote:
>> On 3/30/23 07:04, Steffen Trumtrar wrote:
>>> Add the Phytec STM32MP1-3 Dev board. The devboard uses a Phytec
>>> stm32m157c-som.
>>>
>>> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
>>> ---
> 
> [snip]
> 
>>> +/ {
>>> +    model = "PHYTEC phyCORE-STM32MP1-3 Dev Board";
>>> +    compatible = "phytec,phycore-stm32mp1-3",
>>> +             "phytec,phycore-stm32mp157c-som", "st,stm32mp157";
>>> +
>>> +    aliases {
>>> +        mmc0 = &sdmmc1;
>>> +        mmc1 = &sdmmc2;
>>> +        mmc2 = &sdmmc3;
>>
>> mmc aliases are still used in linux?
> 
> Since kernel commit fa2d0aa96941 ("mmc: core: Allow setting slot
> index via device tree alias") added with v5.10-rc1, aliases
> dictate kernel numbering of /dev/mmcblk devices, so it's good
> to have these aliases for consistency as the alternative of
> using PARTUUID breaks down once the same image is flashed to
> both SD and eMMC and use of an initrd is not always practical.

Oh ok. I thought the opposite. Sorry for this mistake.

Cheers
Alex

>>> +&sdmmc1 {
>>> +    secure-status = "disabled";
>>> +};
>>> +
>>> +&sdmmc2 {
>>> +    status = "okay";
>>> +    secure-status = "disabled";
>>> +};
>>
>> What is the need to put the secure status disabled for SDMMC nodes ?
> 
> TF-A parses them, but for SDMMC, it should have no effect, so I agree
> they can be removed.
> 
> Cheers,
> Ahmad
> 
>
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index efe4152e5846d..dfa9a7477c825 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -1252,7 +1252,8 @@  dtb-$(CONFIG_ARCH_STM32) += \
 	stm32mp157c-ev1.dtb \
 	stm32mp157c-ev1-scmi.dtb \
 	stm32mp157c-lxa-mc1.dtb \
-	stm32mp157c-odyssey.dtb
+	stm32mp157c-odyssey.dtb \
+	stm32mp157c-phycore-stm32mp1-3.dtb
 dtb-$(CONFIG_MACH_SUN4I) += \
 	sun4i-a10-a1000.dtb \
 	sun4i-a10-ba10-tvbox.dtb \
diff --git a/arch/arm/boot/dts/stm32mp157c-phycore-stm32mp1-3.dts b/arch/arm/boot/dts/stm32mp157c-phycore-stm32mp1-3.dts
new file mode 100644
index 0000000000000..b433adc728710
--- /dev/null
+++ b/arch/arm/boot/dts/stm32mp157c-phycore-stm32mp1-3.dts
@@ -0,0 +1,65 @@ 
+// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
+/*
+ * Copyright (C) Phytec GmbH 2019-2020 - All Rights Reserved
+ * Author: Dom VOVARD <dom.vovard@linrt.com>.
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/pinctrl/stm32-pinfunc.h>
+#include "stm32mp157.dtsi"
+#include "stm32mp15xc.dtsi"
+#include "stm32mp15xxac-pinctrl.dtsi"
+#include "stm32mp157c-phycore-stm32mp15-som.dtsi"
+
+/ {
+	model = "PHYTEC phyCORE-STM32MP1-3 Dev Board";
+	compatible = "phytec,phycore-stm32mp1-3",
+		     "phytec,phycore-stm32mp157c-som", "st,stm32mp157";
+
+	aliases {
+		mmc0 = &sdmmc1;
+		mmc1 = &sdmmc2;
+		mmc2 = &sdmmc3;
+		serial0 = &uart4;
+		serial1 = &usart3;
+		serial2 = &usart1;
+	};
+};
+
+&cryp1 {
+	status = "okay";
+};
+
+&dts {
+	status = "okay";
+};
+
+&fmc {
+	status = "disabled";
+};
+
+&gpu {
+	status = "okay";
+};
+
+&i2c4_eeprom {
+	status = "okay";
+};
+
+&i2c4_rtc {
+	status = "okay";
+};
+
+&qspi {
+	status = "okay";
+};
+
+&sdmmc1 {
+	secure-status = "disabled";
+};
+
+&sdmmc2 {
+	status = "okay";
+	secure-status = "disabled";
+};