mirror of
				https://github.com/smaeul/u-boot.git
				synced 2025-10-30 19:48:19 +00:00 
			
		
		
		
	Add initial support for STM32MP2 SoCs family. SoCs information are available here : https://www.st.com/content/st_com/en/campaigns/microprocessor-stm32mp2.html Migrate all MP1 related code into stm32mp1/ directory Create stm32mp2 directory dedicated for STM32MP2 SoCs. Common code to MP1, MP13 and MP25 is kept into arch/arm/mach-stm32/mach-stm32mp directory : - boot_params.c - bsec - cmd_stm32key - cmd_stm32prog - dram_init.c - syscon.c - ecdsa_romapi.c For STM32MP2, it also : - adds memory region description needed for ARMv8 MMU. - enables early data cache before relocation. During the transition before/after relocation, the MMU, initially setup at the beginning of DDR, must be setup again at a correct address after relocation. This is done in enables_caches() by disabling cache, force arch.tlb_fillptr to NULL which will force the MMU to be setup again but with a new value for gd->arch.tlb_addr. gd->arch.tlb_addr has been updated after relocation in arm_reserve_mmu(). Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
		
			
				
	
	
		
			37 lines
		
	
	
		
			802 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			802 B
		
	
	
	
		
			C
		
	
	
	
	
	
| // SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
 | |
| /*
 | |
|  * Copyright (C) 2018, STMicroelectronics - All Rights Reserved
 | |
|  */
 | |
| 
 | |
| #include <common.h>
 | |
| #include <clk.h>
 | |
| #include <dm.h>
 | |
| #include <syscon.h>
 | |
| #include <asm/arch/stm32.h>
 | |
| 
 | |
| static const struct udevice_id stm32mp_syscon_ids[] = {
 | |
| 	{ .compatible = "st,stm32mp157-syscfg", .data = STM32MP_SYSCON_SYSCFG },
 | |
| 	{ .compatible = "st,stm32mp25-syscfg", .data = STM32MP_SYSCON_SYSCFG},
 | |
| 	{ }
 | |
| };
 | |
| 
 | |
| 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,
 | |
| };
 |