From: Patrice Chotard Date: Tue, 12 Dec 2017 08:49:33 +0000 (+0100) Subject: ARM: DTS: stm32: add stm32f429-disco-u-boot dts file X-Git-Tag: v2018.03-rc1~236 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=791651e39076e42e7de6f47fac4a885a075e4e13;p=oweals%2Fu-boot.git ARM: DTS: stm32: add stm32f429-disco-u-boot dts file _ Add gpio compatible and aliases for stm32f429 _ Add FMC sdram node with associated new bindings value to manage second bank (ie bank 1). _ Add "u-boot,dm-pre-reloc" for rcc, fmc, fixed-clock, pinctrl, pwrcfg and gpio nodes. Signed-off-by: Patrice Chotard --- diff --git a/arch/arm/dts/stm32f429-disco-u-boot.dtsi b/arch/arm/dts/stm32f429-disco-u-boot.dtsi new file mode 100644 index 0000000000..59dda436b4 --- /dev/null +++ b/arch/arm/dts/stm32f429-disco-u-boot.dtsi @@ -0,0 +1,204 @@ +/* + * Copyright (C) 2017, STMicroelectronics - All Rights Reserved + * Author(s): Patrice Chotard, for STMicroelectronics. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include +/{ + clocks { + u-boot,dm-pre-reloc; + }; + + aliases { + /* Aliases for gpios so as to use sequence */ + gpio0 = &gpioa; + gpio1 = &gpiob; + gpio2 = &gpioc; + gpio3 = &gpiod; + gpio4 = &gpioe; + gpio5 = &gpiof; + gpio6 = &gpiog; + gpio7 = &gpioh; + gpio8 = &gpioi; + gpio9 = &gpioj; + gpio10 = &gpiok; + }; + + soc { + u-boot,dm-pre-reloc; + pin-controller { + u-boot,dm-pre-reloc; + }; + + fmc: fmc@A0000000 { + compatible = "st,stm32-fmc"; + reg = <0xA0000000 0x1000>; + clocks = <&rcc 0 STM32F4_AHB3_CLOCK(FMC)>; + pinctrl-0 = <&fmc_pins>; + pinctrl-names = "default"; + u-boot,dm-pre-reloc; + + /* + * Memory configuration from sdram datasheet + * IS42S16400J + */ + bank1: bank@1 { + st,sdram-control = /bits/ 8 ; + st,sdram-timing = /bits/ 8 ; + st,sdram-refcount = < 1386 >; + }; + }; + }; +}; + +&clk_hse { + u-boot,dm-pre-reloc; +}; + +&clk_lse { + u-boot,dm-pre-reloc; +}; + +&clk_i2s_ckin { + u-boot,dm-pre-reloc; +}; + +&pwrcfg { + u-boot,dm-pre-reloc; +}; + +&rcc { + u-boot,dm-pre-reloc; +}; + +&gpioa { + compatible = "st,stm32-gpio"; + u-boot,dm-pre-reloc; +}; + +&gpiob { + compatible = "st,stm32-gpio"; + u-boot,dm-pre-reloc; +}; + +&gpioc { + compatible = "st,stm32-gpio"; + u-boot,dm-pre-reloc; +}; + +&gpiod { + compatible = "st,stm32-gpio"; + u-boot,dm-pre-reloc; +}; + +&gpioe { + compatible = "st,stm32-gpio"; + u-boot,dm-pre-reloc; +}; + +&gpiof { + compatible = "st,stm32-gpio"; + u-boot,dm-pre-reloc; +}; + +&gpiog { + compatible = "st,stm32-gpio"; + u-boot,dm-pre-reloc; +}; + +&gpioh { + compatible = "st,stm32-gpio"; + u-boot,dm-pre-reloc; +}; + +&gpioi { + compatible = "st,stm32-gpio"; + u-boot,dm-pre-reloc; +}; + +&gpioj { + compatible = "st,stm32-gpio"; + u-boot,dm-pre-reloc; +}; + +&gpiok { + compatible = "st,stm32-gpio"; + u-boot,dm-pre-reloc; +}; + +&pinctrl { + usart1_pins_a: usart1@0 { + u-boot,dm-pre-reloc; + pins1 { + u-boot,dm-pre-reloc; + }; + pins2 { + u-boot,dm-pre-reloc; + }; + }; + + fmc_pins: fmc@0 { + u-boot,dm-pre-reloc; + pins + { + pinmux = , /* D15 */ + , /* D14 */ + , /* D13 */ + , /* D12 */ + , /* D11 */ + , /* D10 */ + , /* D09 */ + , /* D08 */ + , /* D07 */ + , /* D06 */ + , /* D05 */ + , /* D04 */ + , /* D03 */ + , /* D02 */ + , /* D01 */ + , /* D00 */ + + , /* NBL0 */ + , /* NBL1 */ + + , /* BA1 */ + , /* BA0 */ + + , /* A11 */ + , /* A10 */ + , /* A09 */ + , /* A08 */ + , /* A07 */ + , /* A06 */ + , /* A05 */ + , /* A04 */ + , /* A03 */ + , /* A02 */ + , /* A01 */ + , /* A00 */ + + , /* SDNE1 */ + , /* SDNWE */ + , /* SDNRAS */ + , /* SDNCAS */ + , /* SDCKE1 */ + ; /* SDCLK */ + slew-rate = <2>; + u-boot,dm-pre-reloc; + }; + }; +}; diff --git a/include/dt-bindings/memory/stm32-sdram.h b/include/dt-bindings/memory/stm32-sdram.h index c2b911febf..ab91d2b7f6 100644 --- a/include/dt-bindings/memory/stm32-sdram.h +++ b/include/dt-bindings/memory/stm32-sdram.h @@ -30,8 +30,10 @@ /* Timing = value +1 cycles */ #define TMRD_1 (1 - 1) #define TMRD_2 (2 - 1) +#define TMRD_3 (3 - 1) #define TXSR_1 (1 - 1) #define TXSR_6 (6 - 1) +#define TXSR_7 (7 - 1) #define TRAS_1 (1 - 1) #define TRAS_4 (4 - 1) #define TRC_6 (6 - 1)