From 56696e74c6de23f39c56a3eb114dfca4534e0ae8 Mon Sep 17 00:00:00 2001
From: christophe montaud <christophe.montaud@st.com>
Date: Wed, 3 Oct 2018 17:23:23 +0200
Subject: [PATCH] DTSO: align to new kernel delivery r3-rc4

DTBO: update pin config names
DTBO: align to new kernel stm32mp157c-m4-srm.dtsi
so
DTBO: disable DMA at the end
---
 .../stm32mp157-dk/M4ResourcesForAllExamples.dtso   | 204 +++++++++---------
 .../stm32mp157-ev/M4ResourcesForAllExamples.dtso   | 239 +++++++++++----------
 2 files changed, 234 insertions(+), 209 deletions(-)

diff --git a/Utilities/DTSO/stm32mp157-dk/M4ResourcesForAllExamples.dtso b/Utilities/DTSO/stm32mp157-dk/M4ResourcesForAllExamples.dtso
index 9a0e508..c0c9dd7 100644
--- a/Utilities/DTSO/stm32mp157-dk/M4ResourcesForAllExamples.dtso
+++ b/Utilities/DTSO/stm32mp157-dk/M4ResourcesForAllExamples.dtso
@@ -8,7 +8,7 @@
 	compatible = "st,stm32mp157";
 
 	fragment@0 {
-		target = <&dma2>;
+		target = <&dac>;
 
 		__overlay__ {
 				status = "disabled";
@@ -16,7 +16,7 @@
 	};
 
 	fragment@1 {
-		target = <&dac>;
+		target = <&adc>;
 
 		__overlay__ {
 				status = "disabled";
@@ -24,7 +24,7 @@
 	};
 
 	fragment@2 {
-		target = <&adc>;
+		target = <&timers1>;
 
 		__overlay__ {
 				status = "disabled";
@@ -32,7 +32,7 @@
 	};
 
 	fragment@3 {
-		target = <&timers1>;
+		target = <&dma2>;
 
 		__overlay__ {
 				status = "disabled";
@@ -44,7 +44,7 @@
 
 		__overlay__ {
 				dma-masters = <&dma1>;
-				dma-channels = <8>;	
+				dma-channels = <8>;
 		};
 	};
 
@@ -55,120 +55,132 @@
 			m4_system_resources {
 				status = "okay";
 
-				m4_crc2: crc@4c00400 {
+				button {
 					compatible = "rproc-srm-dev";
-					reg = <0x4c00400 0x400>;			
-					clocks = <&rcc CRC2>;
+					interrupt-parent = <&gpioa>;
+					interrupts = <14 2>;
+					interrupt-names = "irq";
 					status = "okay";
 				};
 
-				m4_cryp2: cryp@4c005000 {
+				m4_led: m4_led {
 					compatible = "rproc-srm-dev";
-					reg = <0x4c005000 0x400>;
-					clocks = <&rcc CRYP2>;
+					pinctrl-names = "rproc_default", "rproc_sleep";
+					pinctrl-0 = <&leds_orange_pins>;
+					pinctrl-1 = <&leds_orange_sleep_pins>;
 					status = "okay";
 				};
+			};
+		};
+	};
 
-				m4_hash2: hash@4c002000 {
-					compatible =  "rproc-srm-dev";
-					reg = <0x4c002000 0x400>;
-					clocks = <&rcc HASH2>;
-					status = "okay";
-				};
+	fragment@6 {
+		target = <&m4_crc2>;
 
-				m4_rng2: rng@4c003000 {
-					compatible = "rproc-srm-dev";
-					reg = <0x4c003000 0x400>;
-					clocks = <&rcc RNG2_K>;
-					status = "okay";
-				};
+		__overlay__ {
+			status = "okay";
+		};
+	};
 
-				m4_uart7: serial@40018000 {
-					compatible = "rproc-srm-dev";
-					reg = <0x40018000 0x400>;			
-					clocks = <&rcc UART7_K>;
-					pinctrl-names = "default";
-					pinctrl-0 = <&uart7_pins>;
-					status = "okay";
-				};
+	fragment@7 {
+		target = <&m4_cryp2>;
 
-				m4_spi4: spi@44005000 {
-					compatible = "rproc-srm-dev";
-					reg = <0x44005000 0x400>;
-					clocks = <&rcc SPI4_K>;
-					pinctrl-names = "default";
-					pinctrl-0 = <&spi4_pins_a>;
-					status = "okay";
-				};
+		__overlay__ {
+			status = "okay";
+		};
+	};
 
-				m4_i2c5: i2c@40015000 {
-					compatible = "rproc-srm-dev";
-					reg = <0x40015000 0x400>;
-					clocks = <&rcc I2C5_K>;
-					pinctrl-names = "default";
-					pinctrl-0 = <&i2c5_pins_a>;
-					status = "okay";
-				};
+	fragment@8 {
+		target = <&m4_hash2>;
 
-				m4_timers2: timer@40000000 {
-					compatible = "rproc-srm-dev";
-					reg = <0x40000000 0x400>;
-					clocks = <&rcc TIM2_K>;
-					status = "okay";
-				};
+		__overlay__ {
+			status = "okay";
+		};
+	};
 
-				m4_timers1: timer@44000000 {
-					compatible = "rproc-srm-dev";
-					reg = <0x44000000 0x400>;
-					clocks = <&rcc TIM1_K>;
-					pinctrl-names = "default";
-					pinctrl-0 = <&timer1_pins>;
-					status = "okay";
-				};
+	fragment@9 {
+		target = <&m4_rng2>;
 
-				m4_dac: dac@40017000 {
-					compatible = "rproc-srm-dev";
-					reg = <0x40017000 0x400>;
-					clocks = <&rcc DAC12>;
-					status = "okay";
-				};
+		__overlay__ {
+			status = "okay";
+		};
+	};
 
-				m4_adc: adc@48003000 {
-					compatible = "rproc-srm-dev";
-					reg = <0x48003000 0x400>;
-					vref-supply = <&vrefbuf>;	
-					clocks = <&rcc ADC12>, <&rcc ADC12_K>;
-					status = "okay";
-				};
+	fragment@10 {
+		target = <&m4_uart7>;
 
-				m4_dma2: dma@48001000 {
-					compatible = "rproc-srm-dev";
-					reg = <0x48001000 0x400>;
-					clocks = <&rcc DMA2>;
-					status = "okay";
-				};
+		__overlay__ {
+			pinctrl-names = "rproc_default";
+			pinctrl-0 = <&uart7_pins>;
+			status = "okay";
+		};
+	};
 
-				button {
-					compatible = "rproc-srm-dev";
-                    interrupt-parent = <&gpioa>;
-                    interrupts = <14 2>;
-                    interrupt-names = "irq";
-                    status = "okay";
-                };
+	fragment@11 {
+		target = <&m4_spi4>;
 
-				m4_led: m4_led {
-					compatible = "rproc-srm-dev";
-					pinctrl-names = "default", "sleep";
-					pinctrl-0 = <&leds_orange_pins>;
-					pinctrl-1 = <&leds_orange_sleep_pins>;
-					status = "okay";
-				};
-			};
+		__overlay__ {
+			pinctrl-names = "rproc_default";
+			pinctrl-0 = <&spi4_pins_a>;
+			status = "okay";
 		};
 	};
 
+	fragment@12 {
+		target = <&m4_i2c5>;
 
-	fragment@6 {
+		__overlay__ {
+			pinctrl-names = "rproc_default";
+			pinctrl-0 = <&i2c5_pins_a>;
+			status = "okay";
+		};
+	};
+
+	fragment@13 {
+		target = <&m4_timers2>;
+
+		__overlay__ {
+			pinctrl-names = "rproc_default";
+			status = "okay";
+		};
+	};
+
+	fragment@14 {
+		target = <&m4_timers1>;
+
+		__overlay__ {
+			pinctrl-names = "rproc_default";
+			pinctrl-0 = <&timer1_pins>;
+			status = "okay";
+		};
+	};
+
+	fragment@15 {
+		target = <&m4_dac>;
+
+		__overlay__ {
+			status = "okay";
+		};
+	};
+
+	fragment@16 {
+		target = <&m4_adc>;
+
+		__overlay__ {
+			vref-supply = <&vrefbuf>;
+			status = "okay";
+		};
+	};
+
+	fragment@17 {
+		target = <&m4_dma2>;
+
+		__overlay__ {
+			status = "okay";
+		};
+	};
+
+	fragment@18 {
 		target = <&pinctrl>;
 		__overlay__ {
 
diff --git a/Utilities/DTSO/stm32mp157-ev/M4ResourcesForAllExamples.dtso b/Utilities/DTSO/stm32mp157-ev/M4ResourcesForAllExamples.dtso
index 37e73d1..84cf399 100644
--- a/Utilities/DTSO/stm32mp157-ev/M4ResourcesForAllExamples.dtso
+++ b/Utilities/DTSO/stm32mp157-ev/M4ResourcesForAllExamples.dtso
@@ -8,7 +8,7 @@
 	compatible = "st,stm32mp157";
 
 	fragment@0 {
-		target = <&dma2>;
+		target = <&dac>;
 
 		__overlay__ {
 				status = "disabled";
@@ -16,7 +16,7 @@
 	};
 
 	fragment@1 {
-		target = <&dac>;
+		target = <&adc>;
 
 		__overlay__ {
 				status = "disabled";
@@ -24,7 +24,7 @@
 	};
 
 	fragment@2 {
-		target = <&adc>;
+		target = <&timers2>;
 
 		__overlay__ {
 				status = "disabled";
@@ -32,7 +32,7 @@
 	};
 
 	fragment@3 {
-		target = <&timers2>;
+		target = <&sai2b>;
 
 		__overlay__ {
 				status = "disabled";
@@ -40,7 +40,7 @@
 	};
 
 	fragment@4 {
-		target = <&sai2b>;
+		target = <&fmc2_nand>;
 
 		__overlay__ {
 				status = "disabled";
@@ -48,7 +48,7 @@
 	};
 
 	fragment@5 {
-		target = <&fmc2_nand>;
+		target = <&i2c5>;
 
 		__overlay__ {
 				status = "disabled";
@@ -56,16 +56,15 @@
 	};
 
 	fragment@6 {
-		target = <&dmamux1>;
+		target = <&qspi>;
 
 		__overlay__ {
-				dma-masters = <&dma1>;
-				dma-channels = <8>;	
+				status = "disabled";
 		};
 	};
 
 	fragment@7 {
-		target = <&i2c5>;
+		target = <&dma2>;
 
 		__overlay__ {
 				status = "disabled";
@@ -73,10 +72,11 @@
 	};
 
 	fragment@8 {
-		target = <&qspi>;
+		target = <&dmamux1>;
 
 		__overlay__ {
-				status = "disabled";
+				dma-masters = <&dma1>;
+				dma-channels = <8>;
 		};
 	};
 
@@ -87,131 +87,144 @@
 			m4_system_resources {
 				status = "okay";
 
-				m4_crc2: crc@4c00400 {
+
+				button {
 					compatible = "rproc-srm-dev";
-					reg = <0x4c00400 0x400>;			
-					clocks = <&rcc CRC2>;
+					interrupt-parent = <&gpioa>;
+					interrupts = <14 2>;
+					interrupt-names = "irq";
 					status = "okay";
 				};
 
-				m4_cryp2: cryp@4c005000 {
+				m4_led: m4_led {
 					compatible = "rproc-srm-dev";
-					reg = <0x4c005000 0x400>;
-					clocks = <&rcc CRYP2>;
+					pinctrl-names = "rproc_default", "rproc_sleep";
+					pinctrl-0 = <&leds_orange_pins>;
+					pinctrl-1 = <&leds_orange_sleep_pins>;
 					status = "okay";
 				};
+			};
+		};
+	};
 
-				m4_hash2: hash@4c002000 {
-					compatible =  "rproc-srm-dev";
-					reg = <0x4c002000 0x400>;
-					clocks = <&rcc HASH2>;
-					status = "okay";
-				};
+	fragment@10 {
+		target = <&m4_crc2>;
 
-				m4_rng2: rng@4c003000 {
-					compatible = "rproc-srm-dev";
-					reg = <0x4c003000 0x400>;
-					clocks = <&rcc RNG2_K>;
-					status = "okay";
-				};
+		__overlay__ {
+			status = "okay";
+		};
+	};
 
-				m4_usart3: serial@4000f000 {
-					compatible = "rproc-srm-dev";
-					reg = <0x4000f000 0x400>;			
-					clocks = <&rcc USART3_K>;
-					pinctrl-names = "default";
-					pinctrl-0 = <&usart3_pins_a>;
-					status = "okay";
-				};
+	fragment@11 {
+		target = <&m4_cryp2>;
 
-				m4_spi1: spi@44004000 {
-					compatible = "rproc-srm-dev";
-					reg = <0x44004000 0x400>;
-					clocks = <&rcc SPI1_K>;
-					pinctrl-names = "default";
-					pinctrl-0 = <&spi1_pins_a>;
-					status = "okay";
-				};
+		__overlay__ {
+			status = "okay";
+		};
+	};
 
-				m4_i2c5: i2c@40015000 {
-					compatible = "rproc-srm-dev";
-					reg = <0x40015000 0x400>;
-					clocks = <&rcc I2C5_K>;
-					pinctrl-names = "default";
-					pinctrl-0 = <&i2c5_pins_a>;
-					status = "okay";
-				};
+	fragment@12 {
+		target = <&m4_hash2>;
 
-				m4_timers2: timer@40000000 {
-					compatible = "rproc-srm-dev";
-					reg = <0x40000000 0x400>;
-					pinctrl-names = "default";
-					pinctrl-0 = <&pwm2_pins_a>;
-					clocks = <&rcc TIM2_K>;
-					status = "okay";
-				};
+		__overlay__ {
+			status = "okay";
+		};
+	};
 
-				m4_timers1: timer@44000000 {
-					compatible = "rproc-srm-dev";
-					reg = <0x44000000 0x400>;
-					clocks = <&rcc TIM1_K>;
-					pinctrl-names = "default";
-					pinctrl-0 = <&pwm1_pins_a>;
-					status = "okay";
-				};
+	fragment@13 {
+		target = <&m4_rng2>;
 
-				m4_dac: dac@40017000 {
-					compatible = "rproc-srm-dev";
-					reg = <0x40017000 0x400>;
-					clocks = <&rcc DAC12>;
-					status = "okay";
-				};
+		__overlay__ {
+			status = "okay";
+		};
+	};
 
-				m4_adc: adc@48003000 {
-					compatible = "rproc-srm-dev";
-					reg = <0x48003000 0x400>;
-					vref-supply = <&vdda>;	
-					clocks = <&rcc ADC12>, <&rcc ADC12_K>;
-					status = "okay";
-				};
+	fragment@14 {
+		target = <&m4_usart3>;
 
-				m4_dma2: dma@48001000 {
-					compatible = "rproc-srm-dev";
-					reg = <0x48001000 0x400>;
-					clocks = <&rcc DMA2>;
-					status = "okay";
-				};
+		__overlay__ {
+			pinctrl-names = "rproc_default";
+			pinctrl-0 = <&usart3_pins_a>;
+			status = "okay";
+		};
+	};
 
-				m4_qspi: qspi@58003000 {
-					compatible = "rproc-srm-dev";
-					reg = <0x58003000  0x1000>;
-					pinctrl-names = "default";
-					pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a &qspi_bk2_pins_a>;
-					clocks = <&rcc QSPI_K>;
-					status = "okay";
-				};
+	fragment@15 {
+		target = <&m4_spi1>;
 
-				button {
-					compatible = "rproc-srm-dev";
-                    interrupt-parent = <&gpioa>;
-                    interrupts = <14 2>;
-                    interrupt-names = "irq";
-                    status = "okay";
-                };
+		__overlay__ {
+			pinctrl-names = "rproc_default";
+			pinctrl-0 = <&spi1_pins_a>;
+			status = "okay";
+		};
+	};
 
-				m4_led: m4_led {
-					compatible = "rproc-srm-dev";
-					pinctrl-names = "default", "sleep";
-					pinctrl-0 = <&leds_orange_pins>;
-					pinctrl-1 = <&leds_orange_sleep_pins>;
-					status = "okay";
-				};
-			};
+	fragment@16 {
+		target = <&m4_i2c5>;
+
+		__overlay__ {
+			pinctrl-names = "rproc_default";
+			pinctrl-0 = <&i2c5_pins_a>;
+			status = "okay";
 		};
 	};
 
+	fragment@17 {
+		target = <&m4_timers2>;
 
-	fragment@10 {
+		__overlay__ {
+			pinctrl-names = "rproc_default";
+			pinctrl-0 = <&pwm2_pins_a>;
+			status = "okay";
+		};
+	};
+
+	fragment@18 {
+		target = <&m4_timers1>;
+
+		__overlay__ {
+			pinctrl-names = "rproc_default";
+			pinctrl-0 = <&pwm1_pins_a>;
+			status = "okay";
+		};
+	};
+
+	fragment@19 {
+		target = <&m4_dac>;
+
+		__overlay__ {
+			status = "okay";
+		};
+	};
+
+	fragment@20 {
+		target = <&m4_adc>;
+
+		__overlay__ {
+			vref-supply = <&vdda>;
+			status = "okay";
+		};
+	};
+
+	fragment@21 {
+		target = <&m4_dma2>;
+
+		__overlay__ {
+			status = "okay";
+		};
+	};
+
+	fragment@22 {
+		target = <&m4_qspi>;
+
+		__overlay__ {
+			pinctrl-names = "rproc_default";
+			pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a &qspi_bk2_pins_a>;
+			status = "okay";
+		};
+	};
+
+	fragment@23 {
 		target = <&pinctrl>;
 		__overlay__ {
 
-- 
2.7.4

