Skip to contentSkip to conversation

ARM: dts: add board dts file for EXYNOS4412 based TINY4412 board

PATCH Superseded Alex Ling 2 participants 5 messages Nov 15, 2013 – Dec 15, 2013

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Alex Ling

author
#0 lore raw

PATCH 1/1 ARM: dts: add board dts file for EXYNOS4412 based TINY4412 board

Add a minimal board dts file for EXYNOS4412 based FriendlyARM's TINY4412 board. This patch including adds the node to support peripherals like UART, SD card on SDMMC2 port, and this patch adds GPIO connected LEDS and configure its properties like following:
LED1: use 'heartbeat' trigger, blinking while the board is running.
LED4: use 'mmc0' trigger, on when mmc0 is accessing. LED2 and LED3 can be controlled from userspace.

---
 arch/arm/boot/dts/Makefile                |    1 +
 arch/arm/boot/dts/exynos4412-tiny4412.dts |   89 +++++++++++++++++++++++++++++
 2 files changed, 90 insertions(+)
 create mode 100644 arch/arm/boot/dts/exynos4412-tiny4412.dts
arch/arm/boot/dts/Makefile +1 -0
index 802720e..91671a2 100644
@@ -59,6 +59,7 @@ dtb-$(CONFIG_ARCH_EXYNOS) += exynos4210-origen.dtb \
 	exynos4412-odroidx.dtb \
 	exynos4412-origen.dtb \
 	exynos4412-smdk4412.dtb \
+	exynos4412-tiny4412.dtb \
 	exynos4412-trats2.dtb \
 	exynos5250-arndale.dtb \
 	exynos5250-smdk5250.dtb \
arch/arm/boot/dts/exynos4412-tiny4412.dts new file +89 -0

89 lines not on this page · raw message

Signature · 1 line
1.7.9.5
author
#1 lore raw

The board compatible string will be documented after the coresponding documentation is specified.

Regards,
Alex

Quoted 126 lines · Alex Ling

Add a minimal board dts file for EXYNOS4412 based FriendlyARM's TINY4412 board. This patch including adds the node to support peripherals like UART, SD card on SDMMC2 port, and this patch adds GPIO connected LEDS and configure its properties like following:
LED1: use 'heartbeat' trigger, blinking while the board is running.
LED4: use 'mmc0' trigger, on when mmc0 is accessing. LED2 and LED3 can be controlled from userspace.

---
 arch/arm/boot/dts/Makefile                |    1 +
 arch/arm/boot/dts/exynos4412-tiny4412.dts |   89 +++++++++++++++++++++++++++++
 2 files changed, 90 insertions(+)
 create mode 100644 arch/arm/boot/dts/exynos4412-tiny4412.dts
arch/arm/boot/dts/Makefile +1 -0
index 802720e..91671a2 100644
@@ -59,6 +59,7 @@ dtb-$(CONFIG_ARCH_EXYNOS) += exynos4210-origen.dtb \
        exynos4412-odroidx.dtb \
        exynos4412-origen.dtb \
        exynos4412-smdk4412.dtb \
+       exynos4412-tiny4412.dtb \
        exynos4412-trats2.dtb \
        exynos5250-arndale.dtb \
        exynos5250-smdk5250.dtb \
arch/arm/boot/dts/exynos4412-tiny4412.dts new file +89 -1
new file mode 100644
index 0000000..78ace14
@@ -0,0 +1,89 @@
+/*
+ * FriendlyARM's Exynos4412 based TINY4412 board device tree source
+ *
+ * Copyright (c) 2013 Alex Ling <[email protected]>
+ *
+ * Device tree source file for FriendlyARM's TINY4412 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.
+*/
+
+/dts-v1/;
+#include "exynos4412.dtsi"
+
+/ {
+       model = "FriendlyARM TINY4412 board based on Exynos4412";
+       compatible = "friendlyarm,tiny4412", "samsung,exynos4412";
+
+       memory {
+               reg = <0x40000000 0x40000000>;
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               led1 {
+                       label = "led1:heart";
+                       gpios = <&gpm4 0 1>;
+                       default-state = "off";
+                       linux,default-trigger = "heartbeat";
+               };
+               led2 {
+                       label = "led2";
+                       gpios = <&gpm4 1 1>;
+                       default-state = "off";
+               };
+               led3 {
+                       label = "led3";
+                       gpios = <&gpm4 2 1>;
+                       default-state = "off";
+               };
+               led4 {
+                       label = "led4:mmc0";
+                       gpios = <&gpm4 3 1>;
+                       default-state = "off";
+                       linux,default-trigger = "mmc0";
+               };
+       };
+
+       rtc at 10070000 {
+               status = "okay";
+       };
+
+       sdhci at 12530000 {
+               bus-width = <4>;
+               pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus4>;
+               pinctrl-names = "default";
+               status = "okay";
+       };
+
+       serial at 13800000 {
+               status = "okay";
+       };
+
+       serial at 13810000 {
+               status = "okay";
+       };
+
+       serial at 13820000 {
+               status = "okay";
+       };
+
+       serial at 13830000 {
+               status = "okay";
+       };
+
+       fixed-rate-clocks {
+               xxti {
+                       compatible = "samsung,clock-xxti";
+                       clock-frequency = <0>;
+               };
+
+               xusbxti {
+                       compatible = "samsung,clock-xusbxti";
+                       clock-frequency = <24000000>;
+               };
+       };
+};
--

1.7.9.5

author
#2 lore raw

Hi, Kukjin,
Could you please review this patch? Thanks!

Regards,
Alex

Quoted 134 lines · kasim ling

The board compatible string will be documented after the coresponding documentation is specified.

Regards,
Alex

Quoted 126 lines · Alex Ling

Add a minimal board dts file for EXYNOS4412 based FriendlyARM's TINY4412 board. This patch including adds the node to support peripherals like UART, SD card on SDMMC2 port, and this patch adds GPIO connected LEDS and configure its properties like following:
LED1: use 'heartbeat' trigger, blinking while the board is running.
LED4: use 'mmc0' trigger, on when mmc0 is accessing. LED2 and LED3 can be controlled from userspace.

---
 arch/arm/boot/dts/Makefile                |    1 +
 arch/arm/boot/dts/exynos4412-tiny4412.dts |   89 +++++++++++++++++++++++++++++
 2 files changed, 90 insertions(+)
 create mode 100644 arch/arm/boot/dts/exynos4412-tiny4412.dts
arch/arm/boot/dts/Makefile +1 -0
index 802720e..91671a2 100644
@@ -59,6 +59,7 @@ dtb-$(CONFIG_ARCH_EXYNOS) += exynos4210-origen.dtb \
        exynos4412-odroidx.dtb \
        exynos4412-origen.dtb \
        exynos4412-smdk4412.dtb \
+       exynos4412-tiny4412.dtb \
        exynos4412-trats2.dtb \
        exynos5250-arndale.dtb \
        exynos5250-smdk5250.dtb \
arch/arm/boot/dts/exynos4412-tiny4412.dts new file +89 -1
new file mode 100644
index 0000000..78ace14
@@ -0,0 +1,89 @@
+/*
+ * FriendlyARM's Exynos4412 based TINY4412 board device tree source
+ *
+ * Copyright (c) 2013 Alex Ling <[email protected]>
+ *
+ * Device tree source file for FriendlyARM's TINY4412 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.
+*/
+
+/dts-v1/;
+#include "exynos4412.dtsi"
+
+/ {
+       model = "FriendlyARM TINY4412 board based on Exynos4412";
+       compatible = "friendlyarm,tiny4412", "samsung,exynos4412";
+
+       memory {
+               reg = <0x40000000 0x40000000>;
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               led1 {
+                       label = "led1:heart";
+                       gpios = <&gpm4 0 1>;
+                       default-state = "off";
+                       linux,default-trigger = "heartbeat";
+               };
+               led2 {
+                       label = "led2";
+                       gpios = <&gpm4 1 1>;
+                       default-state = "off";
+               };
+               led3 {
+                       label = "led3";
+                       gpios = <&gpm4 2 1>;
+                       default-state = "off";
+               };
+               led4 {
+                       label = "led4:mmc0";
+                       gpios = <&gpm4 3 1>;
+                       default-state = "off";
+                       linux,default-trigger = "mmc0";
+               };
+       };
+
+       rtc at 10070000 {
+               status = "okay";
+       };
+
+       sdhci at 12530000 {
+               bus-width = <4>;
+               pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus4>;
+               pinctrl-names = "default";
+               status = "okay";
+       };
+
+       serial at 13800000 {
+               status = "okay";
+       };
+
+       serial at 13810000 {
+               status = "okay";
+       };
+
+       serial at 13820000 {
+               status = "okay";
+       };
+
+       serial at 13830000 {
+               status = "okay";
+       };
+
+       fixed-rate-clocks {
+               xxti {
+                       compatible = "samsung,clock-xxti";
+                       clock-frequency = <0>;
+               };
+
+               xusbxti {
+                       compatible = "samsung,clock-xusbxti";
+                       clock-frequency = <24000000>;
+               };
+       };
+};
--

1.7.9.5

#3 lore raw
In reply to Alex Ling

Hi Alex,

Quoted 8 lines · On Friday 15 of November 2013 21:09:29 Alex Ling wrote:

Add a minimal board dts file for EXYNOS4412 based FriendlyARM's TINY4412 board. This patch including adds the node to support peripherals like UART, SD card on SDMMC2 port, and this patch adds GPIO connected LEDS and configure its properties like following:
LED1: use 'heartbeat' trigger, blinking while the board is running.
LED4: use 'mmc0' trigger, on when mmc0 is accessing. LED2 and LED3 can be controlled from userspace.

Well, all the LEDs can be controlled from userspace. The default trigger is just the initial setting, which can be changed later by userspace. It's just a general comment, not an issue with the patch, though.

Anyway, you don't need such detailed patch description, as you can see most of the things directly from the code. In case of this patch, just the list of supported peripherals is fine, without going into minor details, such as LED triggers.

Also, please see my comments inline.

[snip]

Quoted 5 lines
arch/arm/boot/dts/exynos4412-tiny4412.dts new file +0 -0
new file mode 100644
index 0000000..78ace14

[snip]

arch/arm/boot/dts/exynos4412-tiny4412.dts line 26

Quoted 2 lines
arch/arm/boot/dts/exynos4412-tiny4412.dts new file +2 -0
+	leds {
+		compatible = "gpio-leds";

style: A blank line should be separating properties from nodes.

arch/arm/boot/dts/exynos4412-tiny4412.dts line 28

Quoted 2 lines
arch/arm/boot/dts/exynos4412-tiny4412.dts new file +2 -0
+		led1 {
+			label = "led1:heart";

Are the labels for this and the LEDs below related to the hardware? I mean, the label should preferrably come from the board documentation, or a label on the PCB next to the LED. Also they shouldn't represent any particular use case, so you should remove the ":heart" suffix.

arch/arm/boot/dts/exynos4412-tiny4412.dts line 32

Quoted 4 lines
arch/arm/boot/dts/exynos4412-tiny4412.dts new file +4 -0
+			gpios = <&gpm4 0 1>;
+			default-state = "off";
+			linux,default-trigger = "heartbeat";
+		};

style: Subnodes should be separated with blank lines.

Otherwise the patch looks fine.

Best regards,
Tomasz

author
#4 lore raw

Tomasz,
Thanks for reviewing. I'll fix the patch description and style problems.

Regards,
Alex

Quoted 55 lines · Tomasz Figa

Hi Alex,

Quoted 8 lines · On Friday 15 of November 2013 21:09:29 Alex Ling wrote:

Add a minimal board dts file for EXYNOS4412 based FriendlyARM's TINY4412 board. This patch including adds the node to support peripherals like UART, SD card on SDMMC2 port, and this patch adds GPIO connected LEDS and configure its properties like following:
LED1: use 'heartbeat' trigger, blinking while the board is running.
LED4: use 'mmc0' trigger, on when mmc0 is accessing. LED2 and LED3 can be controlled from userspace.

Well, all the LEDs can be controlled from userspace. The default trigger is just the initial setting, which can be changed later by userspace. It's just a general comment, not an issue with the patch, though.

Anyway, you don't need such detailed patch description, as you can see most of the things directly from the code. In case of this patch, just the list of supported peripherals is fine, without going into minor details, such as LED triggers.

Also, please see my comments inline.

[snip]

Quoted 5 lines
arch/arm/boot/dts/exynos4412-tiny4412.dts new file +0 -0
new file mode 100644
index 0000000..78ace14

[snip]

arch/arm/boot/dts/exynos4412-tiny4412.dts line 26

Quoted 2 lines
arch/arm/boot/dts/exynos4412-tiny4412.dts new file +2 -0
+     leds {
+             compatible = "gpio-leds";

style: A blank line should be separating properties from nodes.

arch/arm/boot/dts/exynos4412-tiny4412.dts line 28

Quoted 2 lines
arch/arm/boot/dts/exynos4412-tiny4412.dts new file +2 -0
+             led1 {
+                     label = "led1:heart";

Are the labels for this and the LEDs below related to the hardware? I mean, the label should preferrably come from the board documentation, or a label on the PCB next to the LED. Also they shouldn't represent any particular use case, so you should remove the ":heart" suffix.

arch/arm/boot/dts/exynos4412-tiny4412.dts line 32

Quoted 4 lines
arch/arm/boot/dts/exynos4412-tiny4412.dts new file +4 -0
+                     gpios = <&gpm4 0 1>;
+                     default-state = "off";
+                     linux,default-trigger = "heartbeat";
+             };

style: Subnodes should be separated with blank lines.

Otherwise the patch looks fine.

Best regards,
Tomasz