Add reboot modes for LEGO MINDSTORMS EV3
Subsystems (2)
cover Add reboot modes for LEGO MINDSTORMS EV3
This series adds a new device tree node to declare a special memory address that is used by the I2C bootloader on LEGO MINDSTORMS EV3 to boot into a special firmware update mode and enables the required module to use it.
David Lechner (2):
ARM: dts: da850-lego-ev3: Add node for reboot modes
ARM: davinci_all_defconfig: enable SYSCON_REBOOT_MODE
arch/arm/boot/dts/da850-lego-ev3.dts | 17 +++++++++++++++++ arch/arm/configs/davinci_all_defconfig | 1 + 2 files changed, 18 insertions(+)
Signature · 1 line
2.7.4
PATCH 1/2 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
--- arch/arm/boot/dts/da850-lego-ev3.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
arch/arm/boot/dts/da850-lego-ev3.dts +17 -0
@@ -212,6 +212,23 @@ compatible = "gpio-backlight"; gpios = <&gpio 44 GPIO_ACTIVE_HIGH>; }; + + /* ARM local RAM */ + memory at 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>; + }; + }; }; &cpu {
Signature · 1 line
2.7.4
Re: [PATCH 1/2] ARM: dts: da850-lego-ev3: Add node for reboot modes
Quoted 11 lines · David Lechner
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 loaderSigned-off-by David Lechner <[email protected]>---
Doh. I forgot to rebase, so this won't apply cleanly. V2 coming right up.
PATCH 2/2 ARM: davinci_all_defconfig: enable SYSCON_REBOOT_MODE
In reply to David LechnerThis enables SYSCON_REBOOT_MODE as a module. This is used by LEGO MINDSTORMS EV3 to reboot into a special firmware update mode.
--- arch/arm/configs/davinci_all_defconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/configs/davinci_all_defconfig +1 -0
@@ -135,6 +135,7 @@ CONFIG_GPIO_PCA953X=y CONFIG_GPIO_PCA953X_IRQ=y CONFIG_POWER_RESET=y CONFIG_POWER_RESET_GPIO=y +CONFIG_SYSCON_REBOOT_MODE=m CONFIG_BATTERY_LEGO_EV3=m CONFIG_WATCHDOG=y CONFIG_DAVINCI_WATCHDOG=m
Signature · 1 line
2.7.4