diff mbox series

[U-Boot,v3,7/7] sunxi: H6: Add basic Eachlink H6 Mini support

Message ID 20190715012710.16238-8-andre.przywara@arm.com
State Changes Requested
Delegated to: Jagannadha Sutradharudu Teki
Headers show
Series sunxi: Add H6 DDR3 DRAM support | expand

Commit Message

Andre Przywara July 15, 2019, 1:27 a.m. UTC
The Eachlink H6 Mini is a modestly priced TV box, using the Allwinner H6
SoC. It comes with 3GB of DRAM and 32GB of eMMC in the typical TV box
enclosure.

This adds a basic device tree and defconfig for it.

It contrast to the other supported H6 boards the H6 Mini uses DDR3 DRAM
chips (not LPDDR3), which require a different DRAM controller setup.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 arch/arm/dts/Makefile                       |   1 +
 arch/arm/dts/sun50i-h6-eachlink-h6-mini.dts | 116 ++++++++++++++++++++++++++++
 board/sunxi/MAINTAINERS                     |   6 ++
 configs/eachlink_h6_mini_defconfig          |  17 ++++
 4 files changed, 140 insertions(+)
 create mode 100644 arch/arm/dts/sun50i-h6-eachlink-h6-mini.dts
 create mode 100644 configs/eachlink_h6_mini_defconfig

Comments

Jagan Teki July 15, 2019, 7:11 a.m. UTC | #1
On Mon, Jul 15, 2019 at 6:57 AM Andre Przywara <andre.przywara@arm.com> wrote:
>
> The Eachlink H6 Mini is a modestly priced TV box, using the Allwinner H6
> SoC. It comes with 3GB of DRAM and 32GB of eMMC in the typical TV box
> enclosure.
>
> This adds a basic device tree and defconfig for it.
>
> It contrast to the other supported H6 boards the H6 Mini uses DDR3 DRAM
> chips (not LPDDR3), which require a different DRAM controller setup.

Send the linux sync commit, rest seems to fine for me. will update the
commit while applying.
Andre Przywara July 15, 2019, 9:21 a.m. UTC | #2
On Mon, 15 Jul 2019 12:41:34 +0530
Jagan Teki <jagan@amarulasolutions.com> wrote:

Hi Jagan!

> On Mon, Jul 15, 2019 at 6:57 AM Andre Przywara <andre.przywara@arm.com> wrote:
> >
> > The Eachlink H6 Mini is a modestly priced TV box, using the Allwinner H6
> > SoC. It comes with 3GB of DRAM and 32GB of eMMC in the typical TV box
> > enclosure.
> >
> > This adds a basic device tree and defconfig for it.
> >
> > It contrast to the other supported H6 boards the H6 Mini uses DDR3 DRAM
> > chips (not LPDDR3), which require a different DRAM controller setup.  
> 
> Send the linux sync commit, rest seems to fine for me. will update the
> commit while applying.

Which sync commit? I haven't send a device tree for Linux yet, if that is
what you mean. Reason is I don't have much working beyond MMC and
USB(2.0). I was hoping for at least HDMI to work, because this is a TV box
and requires opening and soldering to get serial output.
Also I guess it's a bit of a chicken and egg problem, a Linux DT wouldn't
make much sense without U-Boot support, especially if it's more than just
a defconfig as in this case.

So can we just merge this patch as well? Then people can at least start to
play with it. We can sync and update the DT later.

Cheers,
Andre.

P.S. I will try to send a sunxi64 Linux->U-Boot DT sync later this week. I
have the patches ready, just need to test them with several kernels.
Jagan Teki July 15, 2019, 10:13 a.m. UTC | #3
On Mon, Jul 15, 2019 at 2:51 PM Andre Przywara <andre.przywara@arm.com> wrote:
>
> On Mon, 15 Jul 2019 12:41:34 +0530
> Jagan Teki <jagan@amarulasolutions.com> wrote:
>
> Hi Jagan!
>
> > On Mon, Jul 15, 2019 at 6:57 AM Andre Przywara <andre.przywara@arm.com> wrote:
> > >
> > > The Eachlink H6 Mini is a modestly priced TV box, using the Allwinner H6
> > > SoC. It comes with 3GB of DRAM and 32GB of eMMC in the typical TV box
> > > enclosure.
> > >
> > > This adds a basic device tree and defconfig for it.
> > >
> > > It contrast to the other supported H6 boards the H6 Mini uses DDR3 DRAM
> > > chips (not LPDDR3), which require a different DRAM controller setup.
> >
> > Send the linux sync commit, rest seems to fine for me. will update the
> > commit while applying.
>
> Which sync commit? I haven't send a device tree for Linux yet, if that is

sun50i-h6-eachlink-h6-mini.dts this was synced from Linux right? need
head commit id of this dts.
Andre Przywara July 15, 2019, 10:21 a.m. UTC | #4
On Mon, 15 Jul 2019 15:43:10 +0530
Jagan Teki <jagan@amarulasolutions.com> wrote:

Hi,

> On Mon, Jul 15, 2019 at 2:51 PM Andre Przywara <andre.przywara@arm.com> wrote:
> >
> > On Mon, 15 Jul 2019 12:41:34 +0530
> > Jagan Teki <jagan@amarulasolutions.com> wrote:
> >
> > Hi Jagan!
> >  
> > > On Mon, Jul 15, 2019 at 6:57 AM Andre Przywara <andre.przywara@arm.com> wrote:  
> > > >
> > > > The Eachlink H6 Mini is a modestly priced TV box, using the Allwinner H6
> > > > SoC. It comes with 3GB of DRAM and 32GB of eMMC in the typical TV box
> > > > enclosure.
> > > >
> > > > This adds a basic device tree and defconfig for it.
> > > >
> > > > It contrast to the other supported H6 boards the H6 Mini uses DDR3 DRAM
> > > > chips (not LPDDR3), which require a different DRAM controller setup.  
> > >
> > > Send the linux sync commit, rest seems to fine for me. will update the
> > > commit while applying.  
> >
> > Which sync commit? I haven't send a device tree for Linux yet, if that is  
> 
> sun50i-h6-eachlink-h6-mini.dts this was synced from Linux right? need
> head commit id of this dts.

As I was trying to say in the line above: There is no sun50i-h6-eachlink-h6-mini.dts in Linux (yet), for the said reasons.

Cheers,
Andre.
Jagan Teki July 15, 2019, 11:13 a.m. UTC | #5
On Mon, Jul 15, 2019 at 3:51 PM Andre Przywara <andre.przywara@arm.com> wrote:
>
> On Mon, 15 Jul 2019 15:43:10 +0530
> Jagan Teki <jagan@amarulasolutions.com> wrote:
>
> Hi,
>
> > On Mon, Jul 15, 2019 at 2:51 PM Andre Przywara <andre.przywara@arm.com> wrote:
> > >
> > > On Mon, 15 Jul 2019 12:41:34 +0530
> > > Jagan Teki <jagan@amarulasolutions.com> wrote:
> > >
> > > Hi Jagan!
> > >
> > > > On Mon, Jul 15, 2019 at 6:57 AM Andre Przywara <andre.przywara@arm.com> wrote:
> > > > >
> > > > > The Eachlink H6 Mini is a modestly priced TV box, using the Allwinner H6
> > > > > SoC. It comes with 3GB of DRAM and 32GB of eMMC in the typical TV box
> > > > > enclosure.
> > > > >
> > > > > This adds a basic device tree and defconfig for it.
> > > > >
> > > > > It contrast to the other supported H6 boards the H6 Mini uses DDR3 DRAM
> > > > > chips (not LPDDR3), which require a different DRAM controller setup.
> > > >
> > > > Send the linux sync commit, rest seems to fine for me. will update the
> > > > commit while applying.
> > >
> > > Which sync commit? I haven't send a device tree for Linux yet, if that is
> >
> > sun50i-h6-eachlink-h6-mini.dts this was synced from Linux right? need
> > head commit id of this dts.
>
> As I was trying to say in the line above: There is no sun50i-h6-eachlink-h6-mini.dts in Linux (yet), for the said reasons.

Ohh. Sorry for overlook. Will skip this patch for now.
diff mbox series

Patch

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 39cf4c3b3d..dd676ac090 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -511,6 +511,7 @@  dtb-$(CONFIG_MACH_SUN50I_H5) += \
 	sun50i-h5-orangepi-zero-plus2.dtb
 dtb-$(CONFIG_MACH_SUN50I_H6) += \
 	sun50i-h6-beelink-gs1.dtb \
+	sun50i-h6-eachlink-h6-mini.dtb \
 	sun50i-h6-orangepi-lite2.dtb \
 	sun50i-h6-orangepi-one-plus.dtb \
 	sun50i-h6-pine-h64.dtb
diff --git a/arch/arm/dts/sun50i-h6-eachlink-h6-mini.dts b/arch/arm/dts/sun50i-h6-eachlink-h6-mini.dts
new file mode 100644
index 0000000000..5956b5ccd7
--- /dev/null
+++ b/arch/arm/dts/sun50i-h6-eachlink-h6-mini.dts
@@ -0,0 +1,116 @@ 
+// SPDX-License-Identifier: (GPL-2.0+ or MIT)
+/*
+ * Copyright (c) 2018 Arm Ltd.
+ * based on work by:
+ *   Copyright (c) 2017 Icenowy Zheng <icenowy@aosc.io>
+ */
+
+/dts-v1/;
+
+#include "sun50i-h6.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+	model = "Eachlink H6 Mini";
+	compatible = "eachlink,h6-mini", "allwinner,sun50i-h6";
+
+	aliases {
+		serial0 = &uart0;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	connector {
+		compatible = "hdmi-connector";
+		type = "a";
+
+		port {
+			hdmi_con_in: endpoint {
+				remote-endpoint = <&hdmi_out_con>;
+			};
+		};
+	};
+
+	reg_vcc3v3: vcc3v3 {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc3v3";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+	};
+
+	reg_vcc5v: vcc5v {
+		/* supply from the micro-USB DC jack */
+		compatible = "regulator-fixed";
+		regulator-name = "vcc-5v";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		regulator-always-on;
+	};
+};
+
+&de {
+	status = "okay";
+};
+
+&hdmi {
+	status = "okay";
+};
+
+&hdmi_out {
+	hdmi_out_con: endpoint {
+		remote-endpoint = <&hdmi_con_in>;
+	};
+};
+
+&ehci0 {
+	phys = <&usb2phy 0>;
+	status = "okay";
+};
+
+&ehci3 {
+	status = "okay";
+};
+
+&mmc0 {
+	vmmc-supply = <&reg_vcc3v3>;
+	cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
+	bus-width = <4>;
+	status = "okay";
+};
+
+&mmc2 {
+	vmmc-supply = <&reg_vcc3v3>;
+	vqmmc-supply = <&reg_vcc3v3>;
+	non-removable;
+	cap-mmc-hw-reset;
+	bus-width = <8>;
+	status = "okay";
+};
+
+&ohci0 {
+	phys = <&usb2phy 0>;
+	status = "okay";
+};
+
+&ohci3 {
+	status = "okay";
+};
+
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_ph_pins>;
+	status = "okay";
+};
+
+&usb2otg {
+	dr_mode = "host";
+	status = "okay";
+};
+
+&usb2phy {
+	usb0_vbus-supply = <&reg_vcc5v>;
+	status = "okay";
+};
diff --git a/board/sunxi/MAINTAINERS b/board/sunxi/MAINTAINERS
index bdd1854197..fa8c2ef181 100644
--- a/board/sunxi/MAINTAINERS
+++ b/board/sunxi/MAINTAINERS
@@ -195,6 +195,12 @@  M:	Chen-Yu Tsai <wens@csie.org>
 S:	Maintained
 F:	configs/Cubietruck_plus_defconfig
 
+EACHLINK H6 MINI
+M:	Andre Przywara <andre.przywara@arm.com>
+S:	Maintained
+F:	configs/eachlink_h6_mini_defconfig
+F:	arch/arm/dts/sun50i-h6-eachlink-h6-mini.dts
+
 EMLID NEUTIS N5 DEV BOARD
 M:	Aleksandr Aleksandrov <aleksandr.aleksandrov@emlid.com>
 S:	Maintained
diff --git a/configs/eachlink_h6_mini_defconfig b/configs/eachlink_h6_mini_defconfig
new file mode 100644
index 0000000000..d471a24dd5
--- /dev/null
+++ b/configs/eachlink_h6_mini_defconfig
@@ -0,0 +1,17 @@ 
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_NR_DRAM_BANKS=1
+CONFIG_SPL=y
+CONFIG_MACH_SUN50I_H6=y
+CONFIG_DRAM_CLK=660
+CONFIG_DRAM_ZQ=3881979
+CONFIG_SUNXI_DRAM_H6_DDR3_1333=y
+CONFIG_MMC0_CD_PIN="PF6"
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
+# CONFIG_PSCI_RESET is not set
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_SPL_TEXT_BASE=0x20060
+# CONFIG_CMD_FLASH is not set
+# CONFIG_SPL_DOS_PARTITION is not set
+# CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_DEFAULT_DEVICE_TREE="sun50i-h6-eachlink-h6-mini"