Add Exynos4412 based Odroid X2 and U2/U3/U3+ support
Subsystems (3)
cover Add Exynos4412 based Odroid X2 and U2/U3/U3+ support
Hello,
This is the initial patch series adding support for Exynos 4412 based Odroid X2 and U2/U3/U3+ boards and improving support for Odroid X.
Complete USB support for Odroid U2/U3/U3+ still requires some fixes in Exynos4 USB2 Phy driver and clock driver for CLKOUT:
http://www.spinics.net/lists/linux-usb/msg108028.html
http://www.spinics.net/lists/kernel/msg1743815.html
The above changes however don't affect Odroid DTS files, but without them, usb3503 hub is not yet functional.
Support for audio codec will be posted separately by Sylwester Nawrocki soon. Support for HDMI video output will be also posted separately together with the required ExynosDRM-HDMI fixes.
If you are interested in more complete and open-source Odroid board support, please also check the latest patches for u-boot project:
http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/188295/focus=188610
Best regards
Marek Szyprowski
Samsung R&D Institute Poland
Marek Szyprowski (4):
ARM: dts: exynos4: add port sub-nodes to exynos usb host modules
ARM: dts: exynos4412-odroidx: enable common hardware blocks
ARM: dts: exynos4412-odroidx: add support for USB (phy, host, device)
ARM: dts: refactor Odroid DTS file and add support for Odroid X2 and
U2/U3
arch/arm/boot/dts/Makefile | 2 + arch/arm/boot/dts/exynos4.dtsi | 24 ++ arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 319 ++++++++++++++++++++++++ arch/arm/boot/dts/exynos4412-odroidu3.dts | 49 ++++ arch/arm/boot/dts/exynos4412-odroidx.dts | 264 +------------------- arch/arm/boot/dts/exynos4412-odroidx2.dts | 23 ++ 6 files changed, 424 insertions(+), 257 deletions(-) create mode 100644 arch/arm/boot/dts/exynos4412-odroid-common.dtsi create mode 100644 arch/arm/boot/dts/exynos4412-odroidu3.dts create mode 100644 arch/arm/boot/dts/exynos4412-odroidx2.dts
Signature · 1 line
1.9.2
PATCH 1/4 ARM: dts: exynos4: add port sub-nodes to exynos usb host modules
This patch adds port sub-nodes to exynos4 ehci and ohci modules, which are required by recently merged new exynos4 usb2 phy support.
--- arch/arm/boot/dts/exynos4.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)
arch/arm/boot/dts/exynos4.dtsi +24 -0
@@ -322,6 +322,23 @@ clocks = <&clock CLK_USB_HOST>; clock-names = "usbhost"; status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + port@0 { + reg = <0>; + phys = <&exynos_usbphy 1>; + status = "disabled"; + }; + port@1 { + reg = <1>; + phys = <&exynos_usbphy 2>; + status = "disabled"; + }; + port@2 { + reg = <2>; + phys = <&exynos_usbphy 3>; + status = "disabled"; + }; }; ohci@12590000 {
@@ -331,6 +348,13 @@ clocks = <&clock CLK_USB_HOST>; clock-names = "usbhost"; status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + port@0 { + reg = <0>; + phys = <&exynos_usbphy 1>; + status = "disabled"; + }; }; i2s1: i2s@13960000 {
Signature · 1 line
1.9.2
Re: [PATCH 1/4] ARM: dts: exynos4: add port sub-nodes to exynos usb host modules
Quoted 4 lines · Marek Szyprowski
This patch adds port sub-nodes to exynos4 ehci and ohci modules, which are required by recently merged new exynos4 usb2 phy support.
Signed-off-by Marek Szyprowski <[email protected]>
I checked this against the DT binding documentation for the samsung,exynos4210-ohci and samsung,exynos4210-ehci nodes, and also the usb2 phy binding docs. Looks fine.
Also tested on ODROID-U2, seems to be working:
ehci-exynos: EHCI EXYNOS driver
exynos-ehci 12580000.ehci: EHCI Host Controller
exynos-ehci 12580000.ehci: new USB bus registered, assigned bus number 1 exynos-ehci 12580000.ehci: irq 102, io mem 0x12580000 exynos-ehci 12580000.ehci: USB 2.0 started, EHCI 1.00ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci-exynos: OHCI EXYNOS driver
...and the onboard USB (EHCI) ethernet adapter works. Nice.
The only thing I don't quite understand is the relationship between EHCI and OHCI controllers, one being at 12580000 and the other at 1259000; the SoC docs (which I have not studied in detail) don't make this very clear to me - no registers listed at base address 12590000? Anyway,
Re: [PATCH 1/4] ARM: dts: exynos4: add port sub-nodes to exynos usb host modules
Quoted 5 lines · Daniel Drake
Quoted 3 lines · Marek Szyprowski
This patch adds port sub-nodes to exynos4 ehci and ohci modules, which are required by recently merged new exynos4 usb2 phy support.
Quoted 7 lines
Quoted 1 line
Signed-off-by Marek Szyprowski <[email protected]>I checked this against the DT binding documentation for the samsung,exynos4210-ohci and samsung,exynos4210-ehci nodes, and also the usb2 phy binding docs. Looks fine.
Also tested on ODROID-U2, seems to be working:
Thanks for testing.
Quoted 9 lines
ehci-exynos: EHCI EXYNOS driver
exynos-ehci 12580000.ehci: EHCI Host Controller
exynos-ehci 12580000.ehci: new USB bus registered, assigned bus number 1 exynos-ehci 12580000.ehci: irq 102, io mem0x12580000exynos-ehci 12580000.ehci: USB 2.0 started, EHCI 1.00ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci-exynos: OHCI EXYNOS driver
Quoted 7 lines
...and the onboard USB (EHCI) ethernet adapter works. Nice.
The only thing I don't quite understand is the relationship between EHCI and OHCI controllers, one being at 12580000 and the other at 1259000; the SoC docs (which I have not studied in detail) don't make this very clear to me - no registers listed at base address 12590000? Anyway,
Well, that's exactly the same relationship as on PCs, where you have both EHCI and UHCI/OHCI and depending on what kind of device you connect the proper controller will pick it up.
AFAIK the base address is good, but I believe it was already tested anyway.
Best regards,
Tomasz
PATCH 2/4 ARM: dts: exynos4412-odroidx: enable common hardware blocks
In reply to Marek SzyprowskiThis patch adds support for common hardware modules available on all Exynos4412-based Odroid boards, which already have complete support in mainline kernel. This includes secure firmware calls, watchdog, g2d and fimc (mem2mem) multimedia accelerators.
--- arch/arm/boot/dts/exynos4412-odroidx.dts | 35 ++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+)
arch/arm/boot/dts/exynos4412-odroidx.dts +35 -0
@@ -22,6 +22,11 @@ reg = <0x40000000 0x40000000>; }; + firmware@0204F000 { + compatible = "samsung,secure-firmware"; + reg = <0x0204F000 0x1000>; + }; + leds { compatible = "gpio-leds"; led1 {
@@ -68,10 +73,40 @@ regulator-boot-on; }; + watchdog@10060000 { + status = "okay"; + }; + rtc@10070000 { status = "okay"; }; + g2d@10800000 { + status = "okay"; + }; + + camera { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <>; + + fimc_0: fimc@11800000 { + status = "okay"; + }; + + fimc_1: fimc@11810000 { + status = "okay"; + }; + + fimc_2: fimc@11820000 { + status = "okay"; + }; + + fimc_3: fimc@11830000 { + status = "okay"; + }; + }; + sdhci@12530000 { bus-width = <4>; pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus4>;
Signature · 1 line
1.9.2
Re: [PATCH 2/4] ARM: dts: exynos4412-odroidx: enable common hardware blocks
Quoted 4 lines · Marek Szyprowski
This patch adds support for common hardware modules available on all Exynos4412-based Odroid boards, which already have complete support in mainline kernel. This includes secure firmware calls, watchdog, g2d and fimc (mem2mem) multimedia accelerators.
For the secure firmware, this is indeed required for U2/U3, otherwise the system crashes in weird ways during early boot. If this entry also makes sense for ODROID-X, I'm surprised it was not there already, does it boot without it?
As for the watchdog, g2d and fimc, is there really any Exynos4412 configuration where such components are not available? Sorry if that is a silly question - just wondering why we wouldn't enable these in exynos4412.dtsi.
Thanks
Daniel
Re: [PATCH 2/4] ARM: dts: exynos4412-odroidx: enable common hardware blocks
Quoted 11 lines · Daniel Drake
Quoted 4 lines · Marek Szyprowski
This patch adds support for common hardware modules available on all Exynos4412-based Odroid boards, which already have complete support in mainline kernel. This includes secure firmware calls, watchdog, g2d and fimc (mem2mem) multimedia accelerators.
For the secure firmware, this is indeed required for U2/U3, otherwise the system crashes in weird ways during early boot. If this entry also makes sense for ODROID-X, I'm surprised it was not there already, does it boot without it?
It probably does, but certain things fail, such as secondary CPU bring-up.
Quoted 5 lines
As for the watchdog, g2d and fimc, is there really any Exynos4412 configuration where such components are not available? Sorry if that is a silly question - just wondering why we wouldn't enable these in
exynos4412.dtsi.
I believe they should all be enabled at highest possible level, as they don't have any board-specific hardware dependencies. Probably even in exynos4.dtsi for some of them (watchdog likely).
Best regards,
Tomasz
PATCH 3/4 ARM: dts: exynos4412-odroidx: add support for USB (phy, host, device)
In reply to Marek SzyprowskiFrom: Kamil Debski <[email protected]>
This patch adds basic support for USB modules (host and device) on OdroidX board.
--- arch/arm/boot/dts/exynos4412-odroidx.dts | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
arch/arm/boot/dts/exynos4412-odroidx.dts +30 -0
@@ -148,6 +148,16 @@ pinctrl-names = "default"; status = "okay"; + usb3503@08 { + compatible = "smsc,usb3503"; + reg = <0x08>; + + intn-gpios = <&gpx3 0 0>; + connect-gpios = <&gpx3 4 0>; + reset-gpios = <&gpx3 5 0>; + initial-mode = <1>; + }; + max77686: pmic@09 { compatible = "maxim,max77686"; reg = <0x09>;
@@ -338,4 +348,24 @@ }; }; }; + + exynos-usbphy@125B0000 { + status = "okay"; + }; + + hsotg@12480000 { + status = "okay"; + vusb_d-supply = <&ldo15_reg>; + vusb_a-supply = <&ldo12_reg>; + }; + + ehci@12580000 { + status = "okay"; + port@1 { + status = "okay"; + }; + port@2 { + status = "okay"; + }; + }; };
Signature · 1 line
1.9.2
Re: [PATCH 3/4] ARM: dts: exynos4412-odroidx: add support for USB (phy, host, device)
Quoted 7 lines · Marek Szyprowski
From: Kamil Debski <[email protected]>
This patch adds basic support for USB modules (host and device) on OdroidX board.
Signed-off-by Kamil Debski <[email protected]>Signed-off-by Marek Szyprowski <[email protected]>
Checked that this conforms to the documented DT bindings.
PATCH 4/4 ARM: dts: refactor Odroid DTS file and add support for Odroid X2 and U2/U3
In reply to Marek SzyprowskiThis patch moves some parts of exynos4412-odroidx.dts to common exynos4412-odroid-common.dtsi file and adds support for Odroid X2 and U2/U3 boards. X2 is same as X, but it has faster SoC module (1.7GHz instead of 1.4GHz), while U2/U3 differs from X2 by different way of routing signals to host USB hub. It also lacks some hw modules not yet supported by those dts files (i.e. LCD & touch panel).
--- arch/arm/boot/dts/Makefile | 2 + arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 319 +++++++++++++++++++++++ arch/arm/boot/dts/exynos4412-odroidu3.dts | 49 ++++ arch/arm/boot/dts/exynos4412-odroidx.dts | 329 +----------------------- arch/arm/boot/dts/exynos4412-odroidx2.dts | 23 ++ 5 files changed, 400 insertions(+), 322 deletions(-) create mode 100644 arch/arm/boot/dts/exynos4412-odroid-common.dtsi create mode 100644 arch/arm/boot/dts/exynos4412-odroidu3.dts create mode 100644 arch/arm/boot/dts/exynos4412-odroidx2.dts
arch/arm/boot/dts/Makefile +2 -0
@@ -66,7 +66,9 @@ dtb-$(CONFIG_ARCH_EXYNOS) += exynos4210-origen.dtb \ exynos4210-smdkv310.dtb \ exynos4210-trats.dtb \ exynos4210-universal_c210.dtb \ + exynos4412-odroidu3.dtb \ exynos4412-odroidx.dtb \ + exynos4412-odroidx2.dtb \ exynos4412-origen.dtb \ exynos4412-smdk4412.dtb \ exynos4412-tiny4412.dtb \
arch/arm/boot/dts/exynos4412-odroid-common.dtsi new file +319 -0
319 lines not on this page · raw message
arch/arm/boot/dts/exynos4412-odroidu3.dts new file +49 -0
49 lines not on this page · raw message
arch/arm/boot/dts/exynos4412-odroidx.dts +7 -322
361 lines not on this page · raw message
arch/arm/boot/dts/exynos4412-odroidx2.dts new file +23 -0
@@ -0,0 +1,23 @@ +/* + * Hardkernel's Exynos4412 based ODROID-X2 board device tree source + * + * Copyright (c) 2012 Dongjin Kim <[email protected]> + * + * Device tree source file for Hardkernel's ODROID-X2 board which is based + * on Samsung's Exynos4412 SoC. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. +*/ + +#include "exynos4412-odroidx.dts" + +/ { + model = "Hardkernel ODROID-X2 board based on Exynos4412"; + compatible = "hardkernel,odroid-x2", "samsung,exynos4412", "samsung,exynos4"; + + memory { + reg = <0x40000000 0x80000000>; + }; +};
Signature · 1 line
1.9.2
Re: [PATCH 4/4] ARM: dts: refactor Odroid DTS file and add support for Odroid X2 and U2/U3
Quoted 6 lines · Marek Szyprowski
This patch moves some parts of
exynos4412-odroidx.dtsto commonexynos4412-odroid-common.dtsifile and adds support for Odroid X2 and U2/U3 boards. X2 is same as X, but it has faster SoC module (1.7GHz instead of 1.4GHz), while U2/U3 differs from X2 by different way of routing signals to host USB hub. It also lacks some hw modules not yet supported by those dts files (i.e. LCD & touch panel).
Thanks for this! It is working on ODROID-U2: at least eMMC/SD, LED, serial.
Just 2 minor questions from reviewing:
Odroid-X DTS used to have serial ports at 13820000 and 13830000, this patch removes them, but leaves 2.
I can understand the idea of removing entries for ports that are not available on the board, but I've never seen an ODROID with 2 serial ports - should we bring this down to just the 1 enabled serial port that is accessible?
Odroid-X DTS used to enable EHCI port 2, but with this refactoring, no longer does. Intentional?
Thanks
Daniel
Re: [PATCH 4/4] ARM: dts: refactor Odroid DTS file and add support for Odroid X2 and U2/U3
Hello,
Quoted 8 lines · Daniel Drake
Quoted 6 lines · Marek Szyprowski
This patch moves some parts of
exynos4412-odroidx.dtsto commonexynos4412-odroid-common.dtsifile and adds support for Odroid X2 and U2/U3 boards. X2 is same as X, but it has faster SoC module (1.7GHz instead of 1.4GHz), while U2/U3 differs from X2 by different way of routing signals to host USB hub. It also lacks some hw modules not yet supported by those dts files (i.e. LCD & touch panel).
Quoted 6 lines
Thanks for this! It is working on ODROID-U2: at least eMMC/SD, LED, serial.
Just 2 minor questions from reviewing:
Odroid-X DTS used to have serial ports at 13820000 and 13830000, this patch removes them, but leaves 2.
Right. I've forgot the UART port change. Now I've checked it again and schematics reveals that Odroid X/X2 and U2/U3 has UART1 available on UART connector. On the other hand U2/U3 have UART0 RX/TX lines on GPIO connector, while X/X2 has UART3 lines on the LCD/GPIO connector.
Quoted 4 lines
I can understand the idea of removing entries for ports that are not available on the board, but I've never seen an ODROID with 2 serial ports - should we bring this down to just the 1 enabled serial port that is accessible?
That would be best solution, but this way the tty driver name will change from ttySAC1 to ttySAC0 for UART1 port. Until uart driver gets fixed, I would keep all 4 uart defined on X/X2 and define only uart 0 and 1 on U2/U3. I will fix this in the next version of Odroid patches.
Quoted 2 lines
Odroid-X DTS used to enable EHCI port 2, but with this refactoring, no longer does. Intentional?
This was a bug in the initial patch adding usb support. X and X2 uses only HSCI0 port (ehci port 1).
Thanks for your review!
Best regards
Signature · 2 lines
Marek Szyprowski, PhD Samsung R&D Institute Poland
Re: [PATCH 4/4] ARM: dts: refactor Odroid DTS file and add support for Odroid X2 and U2/U3
Hi Marek, Daniel,
Quoted 30 lines · Marek Szyprowski
Hello,
Quoted 8 lines · Daniel Drake
Quoted 6 lines · Marek Szyprowski
This patch moves some parts of
exynos4412-odroidx.dtsto commonexynos4412-odroid-common.dtsifile and adds support for Odroid X2 and U2/U3 boards. X2 is same as X, but it has faster SoC module (1.7GHz instead of 1.4GHz), while U2/U3 differs from X2 by different way of routing signals to host USB hub. It also lacks some hw modules not yet supported by those dts files (i.e. LCD & touch panel).Quoted 7 lines
Thanks for this! It is working on ODROID-U2: at least eMMC/SD, LED, serial.
Just 2 minor questions from reviewing:
Odroid-X DTS used to have serial ports at 13820000 and 13830000, this patch removes them, but leaves 2.
Right. I've forgot the UART port change. Now I've checked it again and schematics reveals that Odroid X/X2 and U2/U3 has UART1 available on UART connector. On the other hand U2/U3 have UART0 RX/TX lines on GPIO connector,
while X/X2 has UART3 lines on the LCD/GPIO connector.Quoted 4 lines
I can understand the idea of removing entries for ports that are not available on the board, but I've never seen an ODROID with 2 serial ports - should we bring this down to just the 1 enabled serial port that is accessible?
Quoted 4 lines
That would be best solution, but this way the tty driver name will change from ttySAC1 to ttySAC0 for UART1 port. Until uart driver gets fixed, I would keep all 4 uart defined on X/X2 and define only uart 0 and 1 on U2/U3. I will fix this in the next version of Odroid patches.
I managed to code port ID look-up from DT aliases today. I'll try to polish the patches a bit more and send them to ML tomorrow. With this, the problem should be fixed.
Best regards,
Tomasz