Skip to contentSkip to conversation

ARM: dts: samsung: Add support for Hardkernel ODROID-U2

PATCH Superseded Josef Schlehofer 2 participants 5 messages Oct 18 – Oct 19

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

cover ARM: dts: samsung: Add support for Hardkernel ODROID-U2

This series introduces device tree support for Hardkernel's ODROID-U2 single board computer, based on the Samsung Exynos4412 Prime SoC.

ODROID-U2 is the predecessor of ODROID-U3 and shares most of its hardware design (2 GB LPDDR2 RAM, LAN9730 10/100 Ethernet on HSIC0, USB3503A hub on HSIC1, MAX98090 audio codec with headphone jack and on-board MEMS DMIC, MAX77686 PMIC, PWM-controlled cooling fan header, blue heartbeat LED).

Key differences from ODROID-U3:
- The micro-USB (DWC2 / hsotg) port does not have a VBUS supply switch, so it operates only in peripheral mode (dr_mode = "peripheral").
- The 3.5 mm jack is headphone only, and the board features an on-board MEMS digital microphone (DMIC) rather than an analog mic input.
- There is no expansion header with SPI.

Hardware verification was performed on a physical ODROID-U2 board running Linux 6.12:
- DWC2 USB: verified in peripheral mode via /sys/class/udc and dmesg.
- Ethernet: SMSC LAN9730 detected on HSIC0, link up at 100 Mbps Full-Duplex.
- Storage: microSD (mmcblk2) detected and functional. eMMC was not tested, as no eMMC module was available.
- Thermal: /sys/class/thermal/cooling_device0/type shows pwm-fan (no fan was attached).
- Audio:
* Stereo headphone playback verified with speaker-test and aplay.
* On-board digital MEMS microphone (DMIC) recording verified with:
amixer -c OdroidU2 cset name='DMIC Mux' DMIC
arecord -D hw:OdroidU2,0 -f S16_LE -r 48000 -c 2 -d 5 /tmp/dmic.wav aplay -D hw:OdroidU2,0 /tmp/dmic.wav
Audio routing includes "Mixer DAI RX", "HiFi Capture" connecting the MAX98090 codec capture to the Exynos I2S controller.
- LED: blue:heartbeat blinking with heartbeat trigger.

Josef Schlehofer (2):
dt-bindings: arm: samsung: Add Hardkernel ODROID-U2
ARM: dts: samsung: Add Hardkernel ODROID-U2

 .../bindings/arm/samsung/samsung-boards.yaml  |   1 +
 arch/arm/boot/dts/samsung/Makefile            |   1 +
 .../dts/samsung/exynos4412-odroid-common.dtsi |   6 +-
 .../boot/dts/samsung/exynos4412-odroidu2.dts  | 139 ++++++++++++++++++
 4 files changed, 144 insertions(+), 3 deletions(-)
 create mode 100644 arch/arm/boot/dts/samsung/exynos4412-odroidu2.dts

base-commit: 58161ead29e50d70a317ea26b472e0c7508e69da

Signature · 1 line
2.54.0 (Apple Git-157)
#1 lore raw

PATCH 1/2 dt-bindings: arm: samsung: Add Hardkernel ODROID-U2

Add Hardkernel ODROID-U2 board compatible string.

The ODROID-U2 is an Exynos 4412 Prime (Cortex-A9) based single board computer featuring 2 GB LPDDR2 RAM, SMSC LAN9730 HSIC Ethernet, and MAX98090 audio codec.

---
 .../devicetree/bindings/arm/samsung/samsung-boards.yaml          | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/samsung/samsung-boards.yaml +1 -0
index 273464400477..f863803c84f8 100644
@@ -86,6 +86,7 @@ properties:
         items:
           - enum:
               - friendlyarm,tiny4412            # FriendlyARM TINY4412
+              - hardkernel,odroid-u2            # Hardkernel Odroid U2
               - hardkernel,odroid-u3            # Hardkernel Odroid U3
               - hardkernel,odroid-x             # Hardkernel Odroid X
               - hardkernel,odroid-x2            # Hardkernel Odroid X2
Signature · 1 line
2.54.0 (Apple Git-157)
Reviewed-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] dt-bindings: arm: samsung: Add Hardkernel ODROID-U2

Quoted 7 lines · Josef Schlehofer

Add Hardkernel ODROID-U2 board compatible string.

The ODROID-U2 is an Exynos 4412 Prime (Cortex-A9) based single board computer featuring 2 GB LPDDR2 RAM, SMSC LAN9730 HSIC Ethernet, and MAX98090 audio codec.

Best regards,
Henrik Grimler

Quoted 20 lines
---
 .../devicetree/bindings/arm/samsung/samsung-boards.yaml          | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/samsung/samsung-boards.yaml +1 -0
index 273464400477..f863803c84f8 100644
@@ -86,6 +86,7 @@ properties:
         items:
           - enum:
               - friendlyarm,tiny4412            # FriendlyARM TINY4412
+              - hardkernel,odroid-u2            # Hardkernel Odroid U2
               - hardkernel,odroid-u3            # Hardkernel Odroid U3
               - hardkernel,odroid-x             # Hardkernel Odroid X
               - hardkernel,odroid-x2            # Hardkernel Odroid X2
Signature · 1 line
2.54.0 (Apple Git-157)
#3 lore raw

PATCH 2/2 ARM: dts: samsung: Add Hardkernel ODROID-U2

In reply to Josef Schlehofer

ODROID-U2 is a single board computer from Hardkernel based on the Samsung Exynos4412 Prime SoC with 2 GB of LPDDR2 RAM. It is the predecessor of the ODROID-U3 and shares most of its design:
- microSD card slot and eMMC module socket
- SMSC LAN9730 10/100 Ethernet on HSIC0
- SMSC USB3503A hub on HSIC1 with two USB 2.0 host ports
- micro-HDMI port with CEC
- MAX98090 audio codec with a 3.5 mm headphone jack and an on-board digital microphone
- MAX77686 PMIC
- 2-pin header for an optional PWM controlled cooling fan
- blue heartbeat LED

Unlike the ODROID-U3, the micro-USB port has no VBUS supply switch, so it can only work in peripheral mode, and there is no expansion header with SPI. The 3.5 mm jack is headphone only and the speaker outputs of the codec are not connected.

Add an initial device tree for the board, based on the ODROID-U3 one, and update the comments in the common dtsi, as the LDO22 and BUCK8 constraints are now also set by the ODROID-U2.

Also route "HiFi Capture" to "Mixer DAI RX", as on the ODROID-XU3. The odroid sound card driver adds only the playback routes for boards with a single CPU DAI, so without it the DPCM capture path to the I2S back-end is incomplete and recording from the digital microphone fails with "no backend DAIs enabled for Primary".

---
 arch/arm/boot/dts/samsung/Makefile            |   1 +
 .../dts/samsung/exynos4412-odroid-common.dtsi |   6 +-
 .../boot/dts/samsung/exynos4412-odroidu2.dts  | 139 ++++++++++++++++++
 3 files changed, 143 insertions(+), 3 deletions(-)
 create mode 100644 arch/arm/boot/dts/samsung/exynos4412-odroidu2.dts
arch/arm/boot/dts/samsung/Makefile +1 -0
index e0143ee8c82d..2a173e4b3e1a 100644
@@ -16,6 +16,7 @@ dtb-$(CONFIG_ARCH_EXYNOS4) += \
 	exynos4412-i9305.dtb \
 	exynos4412-itop-elite.dtb \
 	exynos4412-n710x.dtb \
+	exynos4412-odroidu2.dtb \
 	exynos4412-odroidu3.dtb \
 	exynos4412-odroidx.dtb \
 	exynos4412-odroidx2.dtb \
arch/arm/boot/dts/samsung/exynos4412-odroid-common.dtsi +3 -3
index 93ddbd4b0a18..b56b92c78c1d 100644
@@ -414,8 +414,8 @@ ldo21_reg: LDO21 {
 
 			ldo22_reg: LDO22 {
 				/*
-				 * Only U3 uses it, so let it define the
-				 * constraints
+				 * Only U2 and U3 use it, so let them define
+				 * the constraints
 				 */
 				regulator-name = "LDO22";
 				regulator-boot-on;
@@ -486,7 +486,7 @@ buck7_reg: BUCK7 {
 			buck8_reg: BUCK8 {
 				/*
 				 * Constraints set by specific board: X,
-				 * X2 and U3.
+				 * X2, U2 and U3.
 				 */
 				regulator-name = "BUCK8_2.8V";
 			};
arch/arm/boot/dts/samsung/exynos4412-odroidu2.dts new file +139 -0

139 lines not on this page · raw message

Signature · 1 line
2.54.0 (Apple Git-157)
#4 lore raw

Re: [PATCH 2/2] ARM: dts: samsung: Add Hardkernel ODROID-U2

Hi Josef,

Running dt-check-style --mode strict exynos4412-odroidu2.dts with dt-check-style from
https://github.com/krzk/linux/blob/b4/dts-style-checker-blank-lines/scripts/dtc/dt-check-style
shows a few things that can be improved, commented inline.

Quoted 13 lines · Josef Schlehofer

ODROID-U2 is a single board computer from Hardkernel based on the Samsung Exynos4412 Prime SoC with 2 GB of LPDDR2 RAM. It is the predecessor of the ODROID-U3 and shares most of its design:
- microSD card slot and eMMC module socket
- SMSC LAN9730 10/100 Ethernet on HSIC0
- SMSC USB3503A hub on HSIC1 with two USB 2.0 host ports
- micro-HDMI port with CEC
- MAX98090 audio codec with a 3.5 mm headphone jack and an on-board digital microphone
- MAX77686 PMIC
- 2-pin header for an optional PWM controlled cooling fan
- blue heartbeat LED

Quoted 4 lines

Unlike the ODROID-U3, the micro-USB port has no VBUS supply switch, so it can only work in peripheral mode, and there is no expansion header with SPI. The 3.5 mm jack is headphone only and the speaker outputs of the codec are not connected.

I compared your linked schematics with the ones for odroid-u3 and agree that this seems to be all the differences.

Quoted 80 lines

Add an initial device tree for the board, based on the ODROID-U3 one, and update the comments in the common dtsi, as the LDO22 and BUCK8 constraints are now also set by the ODROID-U2.

Also route "HiFi Capture" to "Mixer DAI RX", as on the ODROID-XU3. The odroid sound card driver adds only the playback routes for boards with a single CPU DAI, so without it the DPCM capture path to the I2S back-end is incomplete and recording from the digital microphone fails with "no backend DAIs enabled for Primary".

---
 arch/arm/boot/dts/samsung/Makefile            |   1 +
 .../dts/samsung/exynos4412-odroid-common.dtsi |   6 +-
 .../boot/dts/samsung/exynos4412-odroidu2.dts  | 139 ++++++++++++++++++
 3 files changed, 143 insertions(+), 3 deletions(-)
 create mode 100644 arch/arm/boot/dts/samsung/exynos4412-odroidu2.dts
arch/arm/boot/dts/samsung/Makefile +1 -0
index e0143ee8c82d..2a173e4b3e1a 100644
@@ -16,6 +16,7 @@ dtb-$(CONFIG_ARCH_EXYNOS4) += \
 	exynos4412-i9305.dtb \
 	exynos4412-itop-elite.dtb \
 	exynos4412-n710x.dtb \
+	exynos4412-odroidu2.dtb \
 	exynos4412-odroidu3.dtb \
 	exynos4412-odroidx.dtb \
 	exynos4412-odroidx2.dtb \
arch/arm/boot/dts/samsung/exynos4412-odroid-common.dtsi +3 -3
index 93ddbd4b0a18..b56b92c78c1d 100644
@@ -414,8 +414,8 @@ ldo21_reg: LDO21 {
 
 			ldo22_reg: LDO22 {
 				/*
-				 * Only U3 uses it, so let it define the
-				 * constraints
+				 * Only U2 and U3 use it, so let them define
+				 * the constraints
 				 */
 				regulator-name = "LDO22";
 				regulator-boot-on;
@@ -486,7 +486,7 @@ buck7_reg: BUCK7 {
 			buck8_reg: BUCK8 {
 				/*
 				 * Constraints set by specific board: X,
-				 * X2 and U3.
+				 * X2, U2 and U3.
 				 */
 				regulator-name = "BUCK8_2.8V";
 			};
arch/arm/boot/dts/samsung/exynos4412-odroidu2.dts new file +18 -0
new file mode 100644
index 000000000000..5cb5f874b562
@@ -0,0 +1,139 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Hardkernel's Exynos4412 based ODROID-U2 board device tree source
+ *
+ * Copyright (c) 2014 Marek Szyprowski <[email protected]>
+ * Copyright (c) 2026 Josef Schlehofer <[email protected]>
+ *
+ * Device tree source file for Hardkernel's ODROID-U2 board which is based
+ * on Samsung's Exynos4412 SoC.
+ */
+
+/dts-v1/;
+#include <dt-bindings/leds/common.h>
+#include "exynos4412-odroid-common.dtsi"
+#include "exynos4412-prime.dtsi"
+
+/ {
+	model = "Hardkernel ODROID-U2 board based on Exynos4412";

arch/arm/boot/dts/samsung/exynos4412-odroidu2.dts line 28

Quoted 10 lines
arch/arm/boot/dts/samsung/exynos4412-odroidu2.dts new file +10 -0
+	compatible = "hardkernel,odroid-u2", "samsung,exynos4412", "samsung,exynos4";
+
+	aliases {
+		ethernet = &ethernet;
+	};
+
+	memory@40000000 {
+		device_type = "memory";
+		reg = <0x40000000 0x7ff00000>;
+	};

Please move below leds {} so that the nodes are sorted alphabetically.

Quoted 31 lines
arch/arm/boot/dts/samsung/exynos4412-odroidu2.dts new file +31 -0
+
+	leds {
+		compatible = "gpio-leds";
+
+		led1 {
+			function = LED_FUNCTION_HEARTBEAT;
+			color = <LED_COLOR_ID_BLUE>;
+			gpios = <&gpc1 0 GPIO_ACTIVE_LOW>;
+			default-state = "on";
+			linux,default-trigger = "heartbeat";
+		};
+	};
+
+	fan0: pwm-fan {
+		compatible = "pwm-fan";
+		pwms = <&pwm 0 10000 0>;
+		#cooling-cells = <2>;
+		cooling-levels = <0 102 170 230>;
+	};
+};
+
+&adc {
+	vdd-supply = <&ldo10_reg>;
+	/* Nothing connected to ADC inputs, keep it disabled */
+};
+
+/* Supply for LAN9730/SMSC95xx */
+&buck8_reg {
+	regulator-name = "BUCK8_P3V3";
+	regulator-min-microvolt = <3300000>;
+	regulator-max-microvolt = <3300000>;

arch/arm/boot/dts/samsung/exynos4412-odroidu2.dts line 69

Quoted 10 lines
arch/arm/boot/dts/samsung/exynos4412-odroidu2.dts new file +10 -0
+};
+
+&cpu_thermal {
+	cooling-maps {
+		map0 {
+			trip = <&cpu_alert1>;
+			cooling-device = <&cpu0 9 9>, <&cpu1 9 9>,
+					 <&cpu2 9 9>, <&cpu3 9 9>,
+					 <&fan0 1 2>;
+		};

Newline here between child nodes please.

arch/arm/boot/dts/samsung/exynos4412-odroidu2.dts line 75

Quoted 6 lines
arch/arm/boot/dts/samsung/exynos4412-odroidu2.dts new file +6 -0
+		map1 {
+			trip = <&cpu_alert2>;
+			cooling-device = <&cpu0 15 15>, <&cpu1 15 15>,
+					 <&cpu2 15 15>, <&cpu3 15 15>,
+					 <&fan0 2 3>;
+		};

Newline here between child nodes please.

Quoted 35 lines
arch/arm/boot/dts/samsung/exynos4412-odroidu2.dts new file +35 -0
+		map2 {
+			trip = <&cpu_alert0>;
+			cooling-device = <&fan0 0 1>;
+		};
+	};
+};
+
+&ehci {
+	#address-cells = <1>;
+	#size-cells = <0>;
+	phys = <&exynos_usbphy 2>, <&exynos_usbphy 3>;
+	phy-names = "hsic0", "hsic1";
+
+	ethernet: ethernet@2 {
+		compatible = "usb424,9730";
+		reg = <2>;
+		local-mac-address = [00 00 00 00 00 00]; /* Filled in by a bootloader */
+	};
+};
+
+&hdmicec {
+	needs-hpd;
+};
+
+/* No VBUS supply switch on the micro-USB port */
+&hsotg {
+	dr_mode = "peripheral";
+};
+
+/* VDDQ for MSHC (eMMC card) */
+&ldo22_reg {
+	regulator-name = "LDO22_VDDQ_MMC4_2.8V";
+	regulator-min-microvolt = <2800000>;
+	regulator-max-microvolt = <2800000>;
+};

arch/arm/boot/dts/samsung/exynos4412-odroidu2.dts line 120

Quoted 10 lines
arch/arm/boot/dts/samsung/exynos4412-odroidu2.dts new file +10 -0
+
+&mshc_0 {
+	vqmmc-supply = <&ldo22_reg>;
+};
+
+&pwm {
+	pinctrl-0 = <&pwm0_out>;
+	pinctrl-names = "default";
+	samsung,pwm-outputs = <0>;
+	status = "okay";

Empty line before status please.

arch/arm/boot/dts/samsung/exynos4412-odroidu2.dts line 127

Quoted 7 lines
arch/arm/boot/dts/samsung/exynos4412-odroidu2.dts new file +7 -0
+};
+
+&sound {
+	model = "Odroid-U2";
+	samsung,audio-widgets =
+		"Headphone", "Headphone Jack",
+		"Microphone", "DMIC";

Please sort samsung,audio-widgets after audio-routing (vendor prefixed properties last).

arch/arm/boot/dts/samsung/exynos4412-odroidu2.dts line 136

Quoted 9 lines
arch/arm/boot/dts/samsung/exynos4412-odroidu2.dts new file +9 -0
+	audio-routing = "Headphone Jack", "HPL",
+			"Headphone Jack", "HPR",
+			"DMICL", "DMIC",
+			"DMICR", "DMIC",
+			"Mixer DAI RX", "HiFi Capture";
+};
+
+&usb3503 {
+	clock-names = "refclk";

Please sort clock-names after clocks.

Quoted 7 lines
arch/arm/boot/dts/samsung/exynos4412-odroidu2.dts new file +3 -0
+	clocks = <&pmu_system_controller 0>;
+	refclk-frequency = <24000000>;
+};
Signature · 1 line
2.54.0 (Apple Git-157)

Best regards
Henrik Grimler