diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2021-09-22 08:50:01 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-10-01 15:35:18 +0200 |
commit | 61c7adb83de79fe5bbdc82ec29651766891a1ac7 (patch) | |
tree | c79320962625d56b2ce9c5a2b03864e18894e9c1 /arch/arm/dts | |
parent | 9031c1a32a33a895aff518c9e49c11616ca4dbba (diff) | |
download | barebox-61c7adb83de79fe5bbdc82ec29651766891a1ac7.tar.gz barebox-61c7adb83de79fe5bbdc82ec29651766891a1ac7.tar.xz |
ARM: AT91: migrate sama5d3-xplained to DT
We have one other DT-enabled SAMA5D3 board already:
microchip-ksz8477-evb, which is basically a sama5d3 xplained in
different form factor and with a switch. Mimic what we do there to get
rid of the sama5d3 board code.
Unlike the microchip-ksz9477-evb, the barebox support for this board
includes NAND, which is not yet up to date with respect to DT:
- SMC for NAND configuration has no DT driver. Instead the board
driver create this device
- We don't support the newer NAND DT bindings (EBI). The device trees
fix this up, so barebox sees the old bindings with the upstream
partition layout. In future, this could be fixed.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20210922065000.20970-6-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/dts')
-rw-r--r-- | arch/arm/dts/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/dts/at91-microchip-ksz9477-evb.dts | 1 | ||||
-rw-r--r-- | arch/arm/dts/at91-sama5d3_xplained.dts | 50 | ||||
-rw-r--r-- | arch/arm/dts/sama5d3.dtsi | 23 |
4 files changed, 75 insertions, 0 deletions
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index ffa9fe88c1..96063c541d 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -165,6 +165,7 @@ lwl-$(CONFIG_MACH_ZII_VF610_DEV) += \ vf610-zii-ssmb-dtu.dtb.o lwl-$(CONFIG_MACH_AC_SXB) += ac-sxb.dtb.o lwl-$(CONFIG_MACH_AT91SAM9263EK_DT) += at91sam9263ek.dtb.o +lwl-$(CONFIG_MACH_SAMA5D3_XPLAINED) += at91-sama5d3_xplained.dtb.o lwl-$(CONFIG_MACH_MICROCHIP_KSZ9477_EVB) += at91-microchip-ksz9477-evb.dtb.o lwl-$(CONFIG_MACH_SAMA5D27_SOM1) += at91-sama5d27_som1_ek.dtb.o lwl-$(CONFIG_MACH_SAMA5D27_GIANTBOARD) += at91-sama5d27_giantboard.dtb.o diff --git a/arch/arm/dts/at91-microchip-ksz9477-evb.dts b/arch/arm/dts/at91-microchip-ksz9477-evb.dts index 3eb2017942..b7e619a363 100644 --- a/arch/arm/dts/at91-microchip-ksz9477-evb.dts +++ b/arch/arm/dts/at91-microchip-ksz9477-evb.dts @@ -9,6 +9,7 @@ */ /dts-v1/; #include <arm/sama5d36.dtsi> +#include "sama5d3.dtsi" / { model = "Microchip EVB-KSZ9477"; diff --git a/arch/arm/dts/at91-sama5d3_xplained.dts b/arch/arm/dts/at91-sama5d3_xplained.dts new file mode 100644 index 0000000000..cdb29ca666 --- /dev/null +++ b/arch/arm/dts/at91-sama5d3_xplained.dts @@ -0,0 +1,50 @@ +/* SPDX-License-Identifier: GPL-2.0 OR X11 */ +/* + * Copyright (C) 2021 Ahmad Fatoum <a.fatoum@pengutronix.de> + */ + +/dts-v1/; + +#include <arm/at91-sama5d3_xplained.dts> +#include "sama5d3.dtsi" + +/ { + model = "Atmel sama5d3_xplained"; + + chosen { + environment { + compatible = "barebox,environment"; + device-path = &mmc0, "partname:0"; + file-path = "barebox.env"; + }; + }; +}; + +/* Will be automatically read back from HW */ +/delete-node/ &{/memory@20000000}; + +&nand_controller { + nand@3 { + compatible = "atmel,at91rm9200-nand"; + #address-cells = <1>; + #size-cells = <1>; + reg = < 0x60000000 0x01000000 /* EBI CS3 */ + 0xffffc070 0x00000490 /* SMC PMECC regs */ + 0xffffc500 0x00000100 /* SMC PMECC Error Location regs */ + 0x00110000 0x00018000 /* ROM code */ + >; + interrupts = <5 IRQ_TYPE_LEVEL_HIGH 6>; + atmel,nand-addr-offset = <21>; + atmel,nand-cmd-offset = <22>; + atmel,nand-has-dma; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_nand0_ale_cle>; + atmel,pmecc-lookup-table-offset = <0x10000 0x8000>; + + atmel,has-pmecc; + atmel,pmecc-cap = <4>; + atmel,pmecc-sector-size = <512>; + status = "okay"; + }; +}; + diff --git a/arch/arm/dts/sama5d3.dtsi b/arch/arm/dts/sama5d3.dtsi new file mode 100644 index 0000000000..2301ad135b --- /dev/null +++ b/arch/arm/dts/sama5d3.dtsi @@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/ { + aliases { + mmc0 = &mmc0; + mmc1 = &mmc1; + }; +}; + +&ebi { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges; + +}; + +&nand_controller { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges; + +}; |