Skip to contentSkip to conversation

Support for LEGO MINDSTORMS EV3

PATCH In review David Lechner 3 participants 9 messages Jan 13, 2017 – Jan 20, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v4 cover Support for LEGO MINDSTORMS EV3

This patch series adds support for LEGO MINDSTORMS EV3. This is a TI AM1808 based board.

v4 changes:
* New patches for device tree bindings specifications
* Fixed vendor on eeprom device node

v3 changes:
* required defconfig patches have been picked up in linux-davinci tree, so this is the only patch left in the series
* Added aliases node for consistent naming of serial ports
* Added memory node
* Removed nodes that are not finalized yet
* Renamed button labels to match EV3 users manual

v2 changes:
* Dropped defconfig patches that have already been pick up
* Added some new defconfig patches
* Updated device tree file based on feedback and new available bindings
* Renamed file to include da850- prefix
* Changed button labels
* Fixed LED names
* Added beeper device for sound
* Added regulators for USB and A/DC
* Removed unused pinmux nodes
* Added pinconf for buttons
* Enabled pwms
* Used preferred bindings for flash partitions
* Added A/DC spi device
* Enabled USB

David Lechner (4):
dt-bindings: Add vendor prefix for LEGO
dt-bindings: Add LEGO MINDSTORMS EV3 compatible specification
dt-bindings: add "microchip,24c128" compatible string
ARM: dts: Add LEGO MINDSTORMS EV3 dts

 Documentation/devicetree/bindings/arm/davinci.txt  |   4 +
 .../devicetree/bindings/eeprom/eeprom.txt          |   2 +
 .../devicetree/bindings/vendor-prefixes.txt        |   1 +
 arch/arm/boot/dts/Makefile                         |   3 +-
 arch/arm/boot/dts/da850-lego-ev3.dts               | 313 +++++++++++++++++++++
 5 files changed, 322 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/da850-lego-ev3.dts
Signature · 1 line
2.7.4
#1 lore raw

PATCH v4 1/4 dt-bindings: Add vendor prefix for LEGO

Add a vendor prefix for LEGO Systems A/S

---
 Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/vendor-prefixes.txt +1 -0
index 61cb272..c1ccfd4 100644
@@ -159,6 +159,7 @@ kosagi	Sutajio Ko-Usagi PTE Ltd.
 kyo	Kyocera Corporation
 lacie	LaCie
 lantiq	Lantiq Semiconductor
+lego	LEGO Systems A/S
 lenovo	Lenovo Group Ltd.
 lg	LG Corporation
 licheepi	Lichee Pi
Signature · 1 line
2.7.4
#3 lore raw

PATCH v4 2/4 dt-bindings: Add LEGO MINDSTORMS EV3 compatible specification

In reply to David Lechner

This adds the board level device tree specification for LEGO MINDSTORMS EV3

---
 Documentation/devicetree/bindings/arm/davinci.txt | 4 ++++
 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/arm/davinci.txt +4 -0
index f0841ce..715622c 100644
@@ -13,6 +13,10 @@ EnBW AM1808 based CMC board
 Required root node properties:
     - compatible = "enbw,cmc", "ti,da850;
 
+LEGO MINDSTORMS EV3 (AM1808 based)
+Required root node properties:
+    - compatible = "lego,ev3", "ti,da850";
+
 Generic DaVinci Boards
 ----------------------
 
Signature · 1 line
2.7.4
#5 lore raw

PATCH v4 3/4 dt-bindings: add "microchip,24c128" compatible string

In reply to David Lechner

This adds "microchip,24c128" to the list of compatible strings for i2c eeproms.

---
 Documentation/devicetree/bindings/eeprom/eeprom.txt | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/eeprom/eeprom.txt +2 -0
index 735bc94..5696eb5 100644
@@ -10,6 +10,8 @@ Required properties:
 
 	"catalyst,24c32"
 
+	"microchip,24c128"
+
 	"ramtron,24c64"
 
 	"renesas,r1ex24002"
Signature · 1 line
2.7.4
#7 lore raw

PATCH v4 4/4 ARM: dts: Add LEGO MINDSTORMS EV3 dts

In reply to David Lechner

This adds a device tree definition file for LEGO MINDSTORMS EV3.

What is working:

* Pin muxing
* Pinconf
* GPIOs
* MicroSD card reader
* UART on input port 1
* Buttons
* LEDs
* Poweroff/reset
* Flash memory
* EEPROM
* USB host port
* USB peripheral port

What is not working/to be added later:

* Speaker - have patch submitted to get pwm-beeper working - maybe someday it will have a real sound driver that uses PRU
* A/DC chip - have driver submitted and accepted - waiting for ack on device tree bindings
* Display - waiting for "simple DRM" to be mainlined
* Bluetooth - needs new driver for sequencing power/enable/clock
* Input and output ports - need some sort of new phy or extcon driver as well as PRU UART and PRU I2C drivers
* Battery indication - needs new power supply driver

Note on flash partitions:

These partitions are based on the official EV3 firmware from LEGO. It is expected that most users of the mainline kernel on EV3 will be booting from an SD card while retaining the official firmware in the flash memory. Furthermore, the official firmware uses an ancient U-Boot (2009) that has no device tree support. So, it makes sense to have this partition table in the EV3 device tree file. In the unlikely case that anyone does create their own firmware image with different partitioning, they can use a modern U-Boot in their own firmware image that modifies the device tree with the custom partitions.

---
 arch/arm/boot/dts/Makefile           |   3 +-
 arch/arm/boot/dts/da850-lego-ev3.dts | 313 +++++++++++++++++++++++++++++++++++
 2 files changed, 315 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/da850-lego-ev3.dts
arch/arm/boot/dts/Makefile +2 -1
index 78a94b7..1a19e7a 100644
@@ -130,7 +130,8 @@ dtb-$(CONFIG_ARCH_CLPS711X) += \
 dtb-$(CONFIG_ARCH_DAVINCI) += \
 	da850-lcdk.dtb \
 	da850-enbw-cmc.dtb \
-	da850-evm.dtb
+	da850-evm.dtb \
+	da850-lego-ev3.dtb
 dtb-$(CONFIG_ARCH_DIGICOLOR) += \
 	cx92755_equinox.dtb
 dtb-$(CONFIG_ARCH_EFM32) += \
arch/arm/boot/dts/da850-lego-ev3.dts new file +313 -0

313 lines not on this page · raw message

Signature · 1 line
2.7.4
#8 lore raw
In reply to David Lechner
Quoted 2 lines · David Lechner

This patch series adds support for LEGO MINDSTORMS EV3. This is a TI AM1808 based board.

Series applied with Rob's acks.

Thanks,
Sekhar