Re: [PATCH] arm: mvebu: Add support for Synology DS116 (Armada 385)

2023-02-13 Thread Stefan Roese

On 2/9/23 23:00, Tony Dinh wrote:

Synology DS116 is a NAS based on Marvell Armada 385 SoC.

Board Specification:

- Marvel MV88F6820 Dual Core at 1.8GHz
- 1 GiB DDR3 RAM
- 8MB Macronix mx25l6405d SPI flash
- I2C
- 2x USB 3.0
- 1x GBE LAN port (PHY: Marvell 88E1510)
- 1x SATA (6 Gbps)
- 3x LED
- PIC16F1829 (connected to uart1)
- GPIO fan
- serial console

Note that this patch depends on the add-support for Thecus N2350 patch:
https://patchwork.ozlabs.org/project/uboot/patch/20230201231306.7010-1-mibo...@gmail.com/

Signed-off-by: Tony Dinh 


Applied to u-boot-marvell/master

Thanks,
Stefan


---

  arch/arm/dts/Makefile  |   1 +
  arch/arm/dts/armada-385-synology-ds116.dts | 291 +
  arch/arm/mach-mvebu/Kconfig|   7 +
  board/Synology/ds116/MAINTAINERS   |   7 +
  board/Synology/ds116/Makefile  |   6 +
  board/Synology/ds116/ds116.c   | 135 ++
  configs/ds116_defconfig|  92 +++
  include/configs/ds116.h|  56 
  8 files changed, 595 insertions(+)
  create mode 100644 arch/arm/dts/armada-385-synology-ds116.dts
  create mode 100644 board/Synology/ds116/MAINTAINERS
  create mode 100644 board/Synology/ds116/Makefile
  create mode 100644 board/Synology/ds116/ds116.c
  create mode 100644 configs/ds116_defconfig
  create mode 100644 include/configs/ds116.h

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index dee298228f..9d647b9639 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -247,6 +247,7 @@ dtb-$(CONFIG_ARCH_MVEBU) += \
armada-385-atl-x530.dtb \
armada-385-atl-x530DP.dtb   \
armada-385-db-88f6820-amc.dtb   \
+   armada-385-synology-ds116.dtb   \
armada-385-thecus-n2350.dtb \
armada-385-turris-omnia.dtb \
armada-388-clearfog.dtb \
diff --git a/arch/arm/dts/armada-385-synology-ds116.dts 
b/arch/arm/dts/armada-385-synology-ds116.dts
new file mode 100644
index 00..82a0373f7f
--- /dev/null
+++ b/arch/arm/dts/armada-385-synology-ds116.dts
@@ -0,0 +1,291 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Device Tree file for Synology DS116 NAS
+ *
+ * Copyright (C) 2017 Willy Tarreau 
+ */
+
+/dts-v1/;
+#include "armada-385.dtsi"
+#include 
+
+/ {
+   model = "Synology DS116";
+   compatible = "marvell,a385-gp", "marvell,armada385", 
"marvell,armada380";
+
+   chosen {
+   stdout-path = "serial0:115200n8";
+   };
+
+   memory {
+   device_type = "memory";
+   reg = <0x 0x4000>; /* 1 GB */
+   };
+
+   soc {
+   ranges = ;
+
+   internal-regs {
+   i2c@11000 {
+   pinctrl-names = "default";
+   pinctrl-0 = <_pins>;
+   status = "okay";
+   clock-frequency = <10>;
+
+   eeprom@57 {
+   compatible = "atmel,24c64";
+   reg = <0x57>;
+   };
+   };
+
+   serial@12000 {
+   pinctrl-names = "default";
+   pinctrl-0 = <_pins>;
+   status = "okay";
+   };
+
+   serial@12100 {
+   /* A PIC16F1829 is connected to uart1 at 9600 
bps,
+* and takes single-character orders :
+*   "1" : power off // already handled by the 
poweroff node
+*   "2" : short beep
+*   "3" : long beep
+*   "4" : turn the power LED ON
+*   "5" : flash the power LED
+*   "6" : turn the power LED OFF
+*   "7" : turn the status LED OFF
+*   "8" : turn the status LED ON
+*   "9" : flash the status LED
+*   "A" : flash the motherboard LED (D8)
+*   "B" : turn the motherboard LED OFF
+*   "C" : hard reset
+*/
+   pinctrl-names = "default";
+   pinctrl-0 = <_pins>;
+   status = "okay";
+   };
+
+   poweroff@12100 {
+   compatible = "synology,power-off";
+   reg = <0x12100 0x100>;
+   clocks = < 0>;
+   };
+
+

[PATCH] arm: mvebu: Add support for Synology DS116 (Armada 385)

2023-02-09 Thread Tony Dinh
Synology DS116 is a NAS based on Marvell Armada 385 SoC.

Board Specification:

- Marvel MV88F6820 Dual Core at 1.8GHz
- 1 GiB DDR3 RAM
- 8MB Macronix mx25l6405d SPI flash
- I2C
- 2x USB 3.0
- 1x GBE LAN port (PHY: Marvell 88E1510)
- 1x SATA (6 Gbps)
- 3x LED
- PIC16F1829 (connected to uart1)
- GPIO fan
- serial console

Note that this patch depends on the add-support for Thecus N2350 patch:
https://patchwork.ozlabs.org/project/uboot/patch/20230201231306.7010-1-mibo...@gmail.com/

Signed-off-by: Tony Dinh 
---

 arch/arm/dts/Makefile  |   1 +
 arch/arm/dts/armada-385-synology-ds116.dts | 291 +
 arch/arm/mach-mvebu/Kconfig|   7 +
 board/Synology/ds116/MAINTAINERS   |   7 +
 board/Synology/ds116/Makefile  |   6 +
 board/Synology/ds116/ds116.c   | 135 ++
 configs/ds116_defconfig|  92 +++
 include/configs/ds116.h|  56 
 8 files changed, 595 insertions(+)
 create mode 100644 arch/arm/dts/armada-385-synology-ds116.dts
 create mode 100644 board/Synology/ds116/MAINTAINERS
 create mode 100644 board/Synology/ds116/Makefile
 create mode 100644 board/Synology/ds116/ds116.c
 create mode 100644 configs/ds116_defconfig
 create mode 100644 include/configs/ds116.h

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index dee298228f..9d647b9639 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -247,6 +247,7 @@ dtb-$(CONFIG_ARCH_MVEBU) += \
armada-385-atl-x530.dtb \
armada-385-atl-x530DP.dtb   \
armada-385-db-88f6820-amc.dtb   \
+   armada-385-synology-ds116.dtb   \
armada-385-thecus-n2350.dtb \
armada-385-turris-omnia.dtb \
armada-388-clearfog.dtb \
diff --git a/arch/arm/dts/armada-385-synology-ds116.dts 
b/arch/arm/dts/armada-385-synology-ds116.dts
new file mode 100644
index 00..82a0373f7f
--- /dev/null
+++ b/arch/arm/dts/armada-385-synology-ds116.dts
@@ -0,0 +1,291 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Device Tree file for Synology DS116 NAS
+ *
+ * Copyright (C) 2017 Willy Tarreau 
+ */
+
+/dts-v1/;
+#include "armada-385.dtsi"
+#include 
+
+/ {
+   model = "Synology DS116";
+   compatible = "marvell,a385-gp", "marvell,armada385", 
"marvell,armada380";
+
+   chosen {
+   stdout-path = "serial0:115200n8";
+   };
+
+   memory {
+   device_type = "memory";
+   reg = <0x 0x4000>; /* 1 GB */
+   };
+
+   soc {
+   ranges = ;
+
+   internal-regs {
+   i2c@11000 {
+   pinctrl-names = "default";
+   pinctrl-0 = <_pins>;
+   status = "okay";
+   clock-frequency = <10>;
+
+   eeprom@57 {
+   compatible = "atmel,24c64";
+   reg = <0x57>;
+   };
+   };
+
+   serial@12000 {
+   pinctrl-names = "default";
+   pinctrl-0 = <_pins>;
+   status = "okay";
+   };
+
+   serial@12100 {
+   /* A PIC16F1829 is connected to uart1 at 9600 
bps,
+* and takes single-character orders :
+*   "1" : power off // already handled by the 
poweroff node
+*   "2" : short beep
+*   "3" : long beep
+*   "4" : turn the power LED ON
+*   "5" : flash the power LED
+*   "6" : turn the power LED OFF
+*   "7" : turn the status LED OFF
+*   "8" : turn the status LED ON
+*   "9" : flash the status LED
+*   "A" : flash the motherboard LED (D8)
+*   "B" : turn the motherboard LED OFF
+*   "C" : hard reset
+*/
+   pinctrl-names = "default";
+   pinctrl-0 = <_pins>;
+   status = "okay";
+   };
+
+   poweroff@12100 {
+   compatible = "synology,power-off";
+   reg = <0x12100 0x100>;
+   clocks = < 0>;
+   };
+
+   ethernet@7 {
+   pinctrl-names = "default";
+