Re: [PATCH V2] ARM: dts: armada388-helios4

2018-06-05 Thread Gregory CLEMENT
Hi Dennis,
 
 On mar., juin 05 2018, Dennis Gilmore  wrote:

> The helios4 is a Armada388 based nas board designed by SolidRun and
> based on their SOM. It is sold by kobol.io the dts file came from
> https://raw.githubusercontent.com/armbian/build/master/patch/kernel/mvebu-default/95-helios4-device-tree.patch
> I added a SPDX license line to match the clearfog it says it was based
> on and a compatible line for "kobol,helios4"

This patch looks good, I have only two remarks for now.

> + usb3_phy: usb3-phy {
> + compatible = "usb-nop-xceiv";
> + //vbus-regulator = <®_5p0v_usb>;
Why did you comment this line?
What about removing it, if you don't need it?

[...]
> +
> + usb@58000 {
> + //vcc-supply = <®_5p0v_usb>;
Same here

> + usb-phy = <&usb2_phy>;
> + status = "okay";
> + };
> +

Gregory

-- 
Gregory Clement, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com


[PATCH V2] ARM: dts: armada388-helios4

2018-06-05 Thread Dennis Gilmore
The helios4 is a Armada388 based nas board designed by SolidRun and
based on their SOM. It is sold by kobol.io the dts file came from
https://raw.githubusercontent.com/armbian/build/master/patch/kernel/mvebu-default/95-helios4-device-tree.patch
I added a SPDX license line to match the clearfog it says it was based
on and a compatible line for "kobol,helios4"

Signed-off-by: Dennis Gilmore 

---

changes since first submission
change solidrun to kobol in compatible line based on feedback
---
 arch/arm/boot/dts/Makefile   |   1 +
 arch/arm/boot/dts/armada-388-helios4.dts | 315 +++
 2 files changed, 316 insertions(+)
 create mode 100644 arch/arm/boot/dts/armada-388-helios4.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 7e2424957809..490bfd586198 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -1123,6 +1123,7 @@ dtb-$(CONFIG_MACH_ARMADA_38X) += \
armada-388-clearfog-pro.dtb \
armada-388-db.dtb \
armada-388-gp.dtb \
+   armada-388-helios4.dtb \
armada-388-rd.dtb
 dtb-$(CONFIG_MACH_ARMADA_39X) += \
armada-398-db.dtb
diff --git a/arch/arm/boot/dts/armada-388-helios4.dts 
b/arch/arm/boot/dts/armada-388-helios4.dts
new file mode 100644
index ..16026bedc380
--- /dev/null
+++ b/arch/arm/boot/dts/armada-388-helios4.dts
@@ -0,0 +1,315 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Device Tree file for Helios4
+ * based on SolidRun Clearfog revision A1 rev 2.0 (88F6828)
+ *
+ *  Copyright (C) 2017
+ *
+ */
+
+/dts-v1/;
+#include "armada-388.dtsi"
+#include "armada-38x-solidrun-microsom.dtsi"
+
+/ {
+   model = "Helios4";
+   compatible = "kobol,helios4", "marvell,armada388",
+   "marvell,armada385", "marvell,armada380";
+
+   memory {
+   device_type = "memory";
+   reg = <0x 0x8000>; /* 2 GB */
+   };
+
+   aliases {
+   /* So that mvebu u-boot can update the MAC addresses */
+   ethernet1 = ð0;
+   };
+
+   chosen {
+   stdout-path = "serial0:115200n8";
+   };
+
+   reg_12v: regulator-12v {
+   compatible = "regulator-fixed";
+   regulator-name = "power_brick_12V";
+   regulator-min-microvolt = <1200>;
+   regulator-max-microvolt = <1200>;
+   regulator-always-on;
+   };
+
+   reg_3p3v: regulator-3p3v {
+   compatible = "regulator-fixed";
+   regulator-name = "3P3V";
+   regulator-min-microvolt = <330>;
+   regulator-max-microvolt = <330>;
+   regulator-always-on;
+   vin-supply = <®_12v>;
+   };
+
+   reg_5p0v_hdd: regulator-5v-hdd {
+   compatible = "regulator-fixed";
+   regulator-name = "5V_HDD";
+   regulator-min-microvolt = <500>;
+   regulator-max-microvolt = <500>;
+   regulator-always-on;
+   vin-supply = <®_12v>;
+   };
+
+   reg_5p0v_usb: regulator-5v-usb {
+   compatible = "regulator-fixed";
+   regulator-name = "USB-PWR";
+   regulator-min-microvolt = <500>;
+   regulator-max-microvolt = <500>;
+   regulator-boot-on;
+   regulator-always-on;
+   enable-active-high;
+   gpio = <&expander0 6 GPIO_ACTIVE_HIGH>;
+   vin-supply = <®_12v>;
+   };
+
+   system-leds {
+   compatible = "gpio-leds";
+   status-led {
+   label = "helios4:green:status";
+   gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
+   linux,default-trigger = "heartbeat";
+   default-state = "on";
+   };
+
+   fault-led {
+   label = "helios4:red:fault";
+   gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
+   default-state = "keep";
+   };
+   };
+
+   io-leds {
+   compatible = "gpio-leds";
+   sata1-led {
+   label = "helios4:green:ata1";
+   gpios = <&gpio1 17 GPIO_ACTIVE_LOW>;
+   linux,default-trigger = "ata1";
+   default-state = "off";
+   };
+   sata2-led {
+   label = "helios4:green:ata2";
+   gpios = <&gpio1 18 GPIO_ACTIVE_LOW>;
+   linux,default-trigger = "ata2";
+   default-state = "off";
+   };
+   sata3-led {
+   label = "helios4:green:ata3";
+   gpios = <&gpio1 20 GPIO_ACTIVE_LOW>;
+   linux,default-trigger = "ata3";
+   default-state = "off";
+   };
+   sata4-led {
+