From: Vikas Manocha Date: Mon, 10 Apr 2017 22:02:53 +0000 (-0700) Subject: ARM: DT: stm32f7: add sdram pin contol node X-Git-Tag: v2017.07-rc1~446 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=fd198ee1a8c5de79d31df9ca3c04d6d783868690;p=u-boot ARM: DT: stm32f7: add sdram pin contol node Also added DT binding doc for stm32 fmc(flexible memory controller). Signed-off-by: Vikas Manocha cc: Christophe KERELLO --- diff --git a/arch/arm/dts/stm32f746-disco.dts b/arch/arm/dts/stm32f746-disco.dts index 07e0ca7021..5846b0d7e7 100644 --- a/arch/arm/dts/stm32f746-disco.dts +++ b/arch/arm/dts/stm32f746-disco.dts @@ -1,5 +1,6 @@ /* * Copyright 2016 - Michael Kurz + * Copyright 2016 - Vikas MANOCHA * * Based on: * stm32f469-disco.dts from Linux @@ -76,6 +77,12 @@ status = "okay"; }; +&fmc { + pinctrl-0 = <&fmc_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + &mac { status = "okay"; pinctrl-0 = <ðernet_mii>; diff --git a/arch/arm/dts/stm32f746.dtsi b/arch/arm/dts/stm32f746.dtsi index 883f818578..3707550b03 100644 --- a/arch/arm/dts/stm32f746.dtsi +++ b/arch/arm/dts/stm32f746.dtsi @@ -1,5 +1,6 @@ /* * Copyright 2016 - Michael Kurz + * Copyright 2016 - Vikas MANOCHA * * Based on: * stm32f429.dtsi from Linux @@ -70,6 +71,12 @@ status = "disabled"; }; + fmc: fmc@A0000000 { + compatible = "st,stm32-fmc"; + reg = <0xA0000000 0x1000>; + u-boot,dm-pre-reloc; + }; + qspi: quadspi@A0001000 { compatible = "st,stm32-qspi"; #address-cells = <1>; @@ -143,6 +150,55 @@ slew-rate = <2>; }; }; + + fmc_pins: fmc@0 { + pins { + pinmux = , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + + , + , + + , + , + + , + , + , + , + , + , + , + , + , + , + , + , + + , + , + , + , + , + ; + slew-rate = <2>; + }; + }; + }; }; }; diff --git a/doc/device-tree-bindings/ram/st,stm32-fmc.txt b/doc/device-tree-bindings/ram/st,stm32-fmc.txt new file mode 100644 index 0000000000..3d1392c764 --- /dev/null +++ b/doc/device-tree-bindings/ram/st,stm32-fmc.txt @@ -0,0 +1,51 @@ +ST, stm32 flexible memory controller Drive +Required properties: +- compatible : "st,stm32-fmc" +- reg : fmc controller base address +- clocks : fmc controller clock +u-boot,dm-pre-reloc: flag to initialize memory before relocation. + +on-board sdram memory attributes: +- st,sdram-control : parameters for sdram configuration, in this order: + number of columns + number of rows + memory width + number of intenal banks in memory + cas latency + read burst enable or disable + read pipe delay + +- st,sdram-timing: timings for sdram, in this order: + tmrd + txsr + tras + trc + trp + trcd + +There is device tree include file at : +include/dt-bindings/memory/stm32-sdram.h to define sdram control and timing +parameters as MACROS. + +Example: + fmc: fmc@A0000000 { + compatible = "st,stm32-fmc"; + reg = <0xA0000000 0x1000>; + clocks = <&rcc 0 64>; + u-boot,dm-pre-reloc; + }; + + &fmc { + pinctrl-0 = <&fmc_pins>; + pinctrl-names = "default"; + status = "okay"; + + mr-nbanks = <1>; + /* sdram memory configuration from sdram datasheet */ + bank1: bank@0 { + st,sdram-control = /bits/ 8 ; + st,sdram-timing = /bits/ 8 ; + }; +}