From 7d7eff8f1afcf33bd643786364f4e0bda08877fe Mon Sep 17 00:00:00 2001 From: David Lechner Date: Thu, 11 Jan 2018 20:29:50 -0600 Subject: [PATCH 1/3] ARM: dts: da850-lego-ev3: Add node for reboot modes This adds a new node for reboot modes on LEGO MINDSTORMS EV3. The EV3's bootloader looks for a magic number in the ARM local RAM and if found, it will boot into a special firmware update mode where the flash memory can be written via USB. This has been testing working using the command: # systemctl reboot loader Signed-off-by: David Lechner Signed-off-by: Sekhar Nori --- arch/arm/boot/dts/da850-lego-ev3.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/arm/boot/dts/da850-lego-ev3.dts b/arch/arm/boot/dts/da850-lego-ev3.dts index 81942ae83e1f..2e8508042e39 100644 --- a/arch/arm/boot/dts/da850-lego-ev3.dts +++ b/arch/arm/boot/dts/da850-lego-ev3.dts @@ -184,6 +184,23 @@ battery { io-channel-names = "voltage", "current"; rechargeable-gpios = <&gpio 136 GPIO_ACTIVE_LOW>; }; + + /* ARM local RAM */ + memory@ffff0000 { + compatible = "syscon", "simple-mfd"; + reg = <0xffff0000 0x2000>; /* 8k */ + + /* + * The I2C bootloader looks for this magic value to either + * boot normally or boot into a firmware update mode. + */ + reboot-mode { + compatible = "syscon-reboot-mode"; + offset = <0x1ffc>; + mode-normal = <0x00000000>; + mode-loader = <0x5555aaaa>; + }; + }; }; &pmx_core { From 95571b3bb51662bebc9ba7832ebc5466ac03d060 Mon Sep 17 00:00:00 2001 From: Bartosz Golaszewski Date: Mon, 22 Jan 2018 13:55:05 +0100 Subject: [PATCH 2/3] ARM: dts: da850-lego-ev3: use a correct fallback for at24 compatible We now require all at24 users to use the "atmel," fallback in device tree for different manufacturers. Reviewed-by: David Lechner Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori --- arch/arm/boot/dts/da850-lego-ev3.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/da850-lego-ev3.dts b/arch/arm/boot/dts/da850-lego-ev3.dts index 2e8508042e39..1ffd87796cac 100644 --- a/arch/arm/boot/dts/da850-lego-ev3.dts +++ b/arch/arm/boot/dts/da850-lego-ev3.dts @@ -310,7 +310,7 @@ &i2c0 { * EEPROM contains the first stage bootloader, HW ID and Bluetooth MAC. */ eeprom@50 { - compatible = "microchip,24c128"; + compatible = "microchip,24c128", "atmel,24c128"; pagesize = <64>; read-only; reg = <0x50>; From 25c88cb1c05856f365484c6647d8e17bfd7f3363 Mon Sep 17 00:00:00 2001 From: Adam Ford Date: Mon, 4 Sep 2017 17:12:04 -0500 Subject: [PATCH 3/3] ARM: dts: da850-evm: add chosen and SPI alias This patch will add the chosen container to point stdout-path to serial2 and set the alias for spi0 to spi1 since the SPI NOR flash exists on SPI1. Suggested-by: Sekhar Nori Signed-off-by: Adam Ford Signed-off-by: Sekhar Nori --- arch/arm/boot/dts/da850-evm.dts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts index c75507922f7d..3962fa4b07f5 100644 --- a/arch/arm/boot/dts/da850-evm.dts +++ b/arch/arm/boot/dts/da850-evm.dts @@ -15,11 +15,16 @@ / { compatible = "ti,da850-evm", "ti,da850"; model = "DA850/AM1808/OMAP-L138 EVM"; + chosen { + stdout-path = &serial2; + }; + aliases { serial0 = &serial0; serial1 = &serial1; serial2 = &serial2; ethernet0 = ð0; + spi0 = &spi1; }; soc@1c00000 {