All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/3] arm64: dts: armada-3720-espressobin: use Linux model/compatible strings
@ 2020-09-04 15:33 Andre Heider
  2020-09-04 15:33 ` [PATCH v2 2/3] arm64: dts: armada-3720-espressobin: split common parts to .dtsi Andre Heider
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Andre Heider @ 2020-09-04 15:33 UTC (permalink / raw)
  To: u-boot

Fix the actual board vendor and ease synching dts files from Linux.

Signed-off-by: Andre Heider <a.heider@gmail.com>
---
 arch/arm/dts/armada-3720-espressobin.dts | 4 ++--
 board/Marvell/mvebu_armada-37xx/board.c  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/dts/armada-3720-espressobin.dts b/arch/arm/dts/armada-3720-espressobin.dts
index 4534f5ff29..be67a45870 100644
--- a/arch/arm/dts/armada-3720-espressobin.dts
+++ b/arch/arm/dts/armada-3720-espressobin.dts
@@ -50,8 +50,8 @@
 #include "armada-372x.dtsi"
 
 / {
-	model = "Marvell Armada 3720 Community Board ESPRESSOBin";
-	compatible = "marvell,armada-3720-espressobin", "marvell,armada3720", "marvell,armada3710";
+	model = "Globalscale Marvell ESPRESSOBin Board";
+	compatible = "globalscale,espressobin", "marvell,armada3720", "marvell,armada3710";
 
 	chosen {
 		stdout-path = "serial0:115200n8";
diff --git a/board/Marvell/mvebu_armada-37xx/board.c b/board/Marvell/mvebu_armada-37xx/board.c
index 7b9c3223ed..90bfc139aa 100644
--- a/board/Marvell/mvebu_armada-37xx/board.c
+++ b/board/Marvell/mvebu_armada-37xx/board.c
@@ -201,7 +201,7 @@ static int mii_multi_chip_mode_write(struct mii_dev *bus, int dev_smi_addr,
 /* Bring-up board-specific network stuff */
 int board_network_enable(struct mii_dev *bus)
 {
-	if (!of_machine_is_compatible("marvell,armada-3720-espressobin"))
+	if (!of_machine_is_compatible("globalscale,espressobin"))
 		return 0;
 
 	/*
@@ -253,7 +253,7 @@ int ft_board_setup(void *blob, struct bd_info *bd)
 	int part_off;
 
 	/* Fill SPI MTD partitions for Linux kernel on Espressobin */
-	if (!of_machine_is_compatible("marvell,armada-3720-espressobin"))
+	if (!of_machine_is_compatible("globalscale,espressobin"))
 		return 0;
 
 	spi_off = fdt_node_offset_by_compatible(blob, -1, "jedec,spi-nor");
-- 
2.28.0

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2 2/3] arm64: dts: armada-3720-espressobin: split common parts to .dtsi
  2020-09-04 15:33 [PATCH v2 1/3] arm64: dts: armada-3720-espressobin: use Linux model/compatible strings Andre Heider
@ 2020-09-04 15:33 ` Andre Heider
  2020-10-14  8:17   ` Stefan Roese
  2020-09-04 15:33 ` [PATCH v2 3/3] arm64: dts: a3720: add support for espressobin with populated emmc Andre Heider
  2020-10-02  5:51 ` [PATCH v3] arm64: dts: armada-3720-espressobin: use Linux model/compatible strings Andre Heider
  2 siblings, 1 reply; 16+ messages in thread
From: Andre Heider @ 2020-09-04 15:33 UTC (permalink / raw)
  To: u-boot

Move most of the dts to the new common armada-3720-espressobin.dtsi
file, just like Linux, but keep the current, downstream based, version.

The dts itself is imported from Linux.

Signed-off-by: Andre Heider <a.heider@gmail.com>
---
 arch/arm/dts/armada-3720-espressobin.dts      | 190 ++----------------
 ...sobin.dts => armada-3720-espressobin.dtsi} |   3 -
 2 files changed, 20 insertions(+), 173 deletions(-)
 rewrite arch/arm/dts/armada-3720-espressobin.dts (95%)
 copy arch/arm/dts/{armada-3720-espressobin.dts => armada-3720-espressobin.dtsi} (96%)

diff --git a/arch/arm/dts/armada-3720-espressobin.dts b/arch/arm/dts/armada-3720-espressobin.dts
dissimilarity index 95%
index be67a45870..1542d836c0 100644
--- a/arch/arm/dts/armada-3720-espressobin.dts
+++ b/arch/arm/dts/armada-3720-espressobin.dts
@@ -1,170 +1,20 @@
-/*
- * Device Tree file for Marvell Armada 3720 community board
- * (ESPRESSOBin)
- * Copyright (C) 2016 Marvell
- *
- * Gregory CLEMENT <gregory.clement@free-electrons.com>
- * Konstantin Porotchkin <kostap@marvell.com>
- *
- * This file is dual-licensed: you can use it either under the terms
- * of the GPL or the X11 license, at your option. Note that this dual
- * licensing only applies to this file, and not this project as a
- * whole.
- *
- *  a) This file is free software; you can redistribute it and/or
- *     modify it under the terms of the GNU General Public License as
- *     published by the Free Software Foundation; either version 2 of the
- *     License, or (at your option) any later version.
- *
- *     This file is distributed in the hope that it will be useful
- *     but WITHOUT ANY WARRANTY; without even the implied warranty of
- *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *     GNU General Public License for more details.
- *
- * Or, alternatively
- *
- *  b) Permission is hereby granted, free of charge, to any person
- *     obtaining a copy of this software and associated documentation
- *     files (the "Software"), to deal in the Software without
- *     restriction, including without limitation the rights to use
- *     copy, modify, merge, publish, distribute, sublicense, and/or
- *     sell copies of the Software, and to permit persons to whom the
- *     Software is furnished to do so, subject to the following
- *     conditions:
- *
- *     The above copyright notice and this permission notice shall be
- *     included in all copies or substantial portions of the Software.
- *
- *     THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
- *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
- *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- *     OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/dts-v1/;
-
-#include "armada-372x.dtsi"
-
-/ {
-	model = "Globalscale Marvell ESPRESSOBin Board";
-	compatible = "globalscale,espressobin", "marvell,armada3720", "marvell,armada3710";
-
-	chosen {
-		stdout-path = "serial0:115200n8";
-	};
-
-	aliases {
-		ethernet0 = &eth0;
-		i2c0 = &i2c0;
-		spi0 = &spi0;
-	};
-
-	memory {
-		device_type = "memory";
-		reg = <0x00000000 0x00000000 0x00000000 0x20000000>;
-	};
-
-	vcc_sd_reg0: regulator at 0 {
-		compatible = "regulator-gpio";
-		regulator-name = "vcc_sd0";
-		regulator-min-microvolt = <1800000>;
-		regulator-max-microvolt = <3300000>;
-		regulator-type = "voltage";
-		states = <1800000 0x1
-			  3300000 0x0>;
-		gpios = <&gpionb 4 GPIO_ACTIVE_HIGH>;
-	};
-};
-
-&comphy {
-	max-lanes = <3>;
-	phy0 {
-		phy-type = <PHY_TYPE_USB3_HOST0>;
-		phy-speed = <PHY_SPEED_5G>;
-	};
-
-	phy1 {
-		phy-type = <PHY_TYPE_PEX0>;
-		phy-speed = <PHY_SPEED_2_5G>;
-	};
-
-	phy2 {
-		phy-type = <PHY_TYPE_SATA0>;
-		phy-speed = <PHY_SPEED_5G>;
-	};
-};
-
-&eth0 {
-	status = "okay";
-	pinctrl-names = "default";
-	pinctrl-0 = <&rgmii_pins>, <&smi_pins>;
-	phy-mode = "rgmii";
-	phy_addr = <0x1>;
-	fixed-link {
-		speed = <1000>;
-		full-duplex;
-	};
-};
-
-&i2c0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c1_pins>;
-	status = "okay";
-};
-
-/* CON3 */
-&sata {
-	status = "okay";
-};
-
-&sdhci0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&sdio_pins>;
-	bus-width = <4>;
-	cd-gpios = <&gpionb 3 GPIO_ACTIVE_LOW>;
-	vqmmc-supply = <&vcc_sd_reg0>;
-	status = "okay";
-};
-
-&spi0 {
-	status = "okay";
-	pinctrl-names = "default";
-	pinctrl-0 = <&spi_quad_pins>;
-
-	spi-flash at 0 {
-		#address-cells = <1>;
-		#size-cells = <1>;
-		compatible = "st,m25p128", "jedec,spi-nor";
-		reg = <0>; /* Chip select 0 */
-		spi-max-frequency = <50000000>;
-		m25p,fast-read;
-	};
-};
-
-/* Exported on the micro USB connector CON32 through an FTDI */
-&uart0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&uart1_pins>;
-	status = "okay";
-};
-
-/* CON29 */
-&usb2 {
-	status = "okay";
-};
-
-/* CON31 */
-&usb3 {
-	status = "okay";
-};
-
-&pcie0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&pcie_pins>;
-	reset-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>;
-	status = "okay";
-};
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Device Tree file for Globalscale Marvell ESPRESSOBin Board
+ * Copyright (C) 2016 Marvell
+ *
+ * Romain Perier <romain.perier@free-electrons.com>
+ *
+ */
+/*
+ * Schematic available at http://espressobin.net/wp-content/uploads/2017/08/ESPRESSObin_V5_Schematics.pdf
+ */
+
+/dts-v1/;
+
+#include "armada-3720-espressobin.dtsi"
+
+/ {
+	model = "Globalscale Marvell ESPRESSOBin Board";
+	compatible = "globalscale,espressobin", "marvell,armada3720", "marvell,armada3710";
+};
diff --git a/arch/arm/dts/armada-3720-espressobin.dts b/arch/arm/dts/armada-3720-espressobin.dtsi
similarity index 96%
copy from arch/arm/dts/armada-3720-espressobin.dts
copy to arch/arm/dts/armada-3720-espressobin.dtsi
index be67a45870..05dec89834 100644
--- a/arch/arm/dts/armada-3720-espressobin.dts
+++ b/arch/arm/dts/armada-3720-espressobin.dtsi
@@ -50,9 +50,6 @@
 #include "armada-372x.dtsi"
 
 / {
-	model = "Globalscale Marvell ESPRESSOBin Board";
-	compatible = "globalscale,espressobin", "marvell,armada3720", "marvell,armada3710";
-
 	chosen {
 		stdout-path = "serial0:115200n8";
 	};
-- 
2.28.0

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2 3/3] arm64: dts: a3720: add support for espressobin with populated emmc
  2020-09-04 15:33 [PATCH v2 1/3] arm64: dts: armada-3720-espressobin: use Linux model/compatible strings Andre Heider
  2020-09-04 15:33 ` [PATCH v2 2/3] arm64: dts: armada-3720-espressobin: split common parts to .dtsi Andre Heider
@ 2020-09-04 15:33 ` Andre Heider
  2020-09-09  9:16   ` Andre Heider
  2020-10-14  8:17   ` Stefan Roese
  2020-10-02  5:51 ` [PATCH v3] arm64: dts: armada-3720-espressobin: use Linux model/compatible strings Andre Heider
  2 siblings, 2 replies; 16+ messages in thread
From: Andre Heider @ 2020-09-04 15:33 UTC (permalink / raw)
  To: u-boot

Import armada-3720-espressobin-emmc.dts from Linux, but use sdhc1 for
emmc, since our dtsi is still based on downstream and sdhc0 is used for
the sd card.

Signed-off-by: Andre Heider <a.heider@gmail.com>
---
 arch/arm/dts/Makefile                         |  1 +
 arch/arm/dts/armada-3720-espressobin-emmc.dts | 44 +++++++++++++++++++
 doc/README.marvell                            |  7 ++-
 3 files changed, 50 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/dts/armada-3720-espressobin-emmc.dts

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 5e34192be6..8f1958b5a7 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -202,6 +202,7 @@ dtb-$(CONFIG_ARCH_TEGRA) += tegra20-harmony.dtb \
 dtb-$(CONFIG_ARCH_MVEBU) +=			\
 	armada-3720-db.dtb			\
 	armada-3720-espressobin.dtb		\
+	armada-3720-espressobin-emmc.dtb	\
 	armada-3720-turris-mox.dtb		\
 	armada-3720-uDPU.dtb			\
 	armada-375-db.dtb			\
diff --git a/arch/arm/dts/armada-3720-espressobin-emmc.dts b/arch/arm/dts/armada-3720-espressobin-emmc.dts
new file mode 100644
index 0000000000..29ccb6a573
--- /dev/null
+++ b/arch/arm/dts/armada-3720-espressobin-emmc.dts
@@ -0,0 +1,44 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Device Tree file for Globalscale Marvell ESPRESSOBin Board with eMMC
+ * Copyright (C) 2018 Marvell
+ *
+ * Romain Perier <romain.perier@free-electrons.com>
+ * Konstantin Porotchkin <kostap@marvell.com>
+ *
+ */
+/*
+ * Schematic available at http://espressobin.net/wp-content/uploads/2017/08/ESPRESSObin_V5_Schematics.pdf
+ */
+
+/dts-v1/;
+
+#include "armada-3720-espressobin.dtsi"
+
+/ {
+	model = "Globalscale Marvell ESPRESSOBin Board (eMMC)";
+	compatible = "globalscale,espressobin-emmc", "globalscale,espressobin",
+		     "marvell,armada3720", "marvell,armada3710";
+};
+
+/* U11 */
+&sdhci1 {
+	non-removable;
+	bus-width = <8>;
+	mmc-ddr-1_8v;
+	mmc-hs400-1_8v;
+	marvell,xenon-emmc;
+	marvell,xenon-tun-count = <9>;
+	marvell,pad-type = "fixed-1-8v";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc_pins>;
+	status = "okay";
+
+	#address-cells = <1>;
+	#size-cells = <0>;
+	mmccard: mmccard at 0 {
+		compatible = "mmc-card";
+		reg = <0>;
+	};
+};
diff --git a/doc/README.marvell b/doc/README.marvell
index 5416bc3035..be07f31f8c 100644
--- a/doc/README.marvell
+++ b/doc/README.marvell
@@ -43,8 +43,11 @@ Build Procedure
         In order to prevent this, the required device-tree MUST be set during compilation.
         All device-tree files are located in ./arch/arm/dts/ folder.
 
-	For other DB boards (MacchiatoBin, EspressoBin and 3700 DB board) compile u-boot with
-	just default device-tree from defconfig using:
+	For the EspressoBin board with populated eMMC device use
+		# make DEVICE_TREE=armada-3720-espressobin-emmc
+
+	For other DB boards (MacchiatoBin, EspressoBin without soldered eMMC and 3700 DB board)
+	compile u-boot with just default device-tree from defconfig using:
 
 		# make
 
-- 
2.28.0

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2 3/3] arm64: dts: a3720: add support for espressobin with populated emmc
  2020-09-04 15:33 ` [PATCH v2 3/3] arm64: dts: a3720: add support for espressobin with populated emmc Andre Heider
@ 2020-09-09  9:16   ` Andre Heider
  2020-09-10 18:04     ` Andre Heider
  2020-10-14  8:17   ` Stefan Roese
  1 sibling, 1 reply; 16+ messages in thread
From: Andre Heider @ 2020-09-09  9:16 UTC (permalink / raw)
  To: u-boot

On 04/09/2020 17:33, Andre Heider wrote:
> Import armada-3720-espressobin-emmc.dts from Linux, but use sdhc1 for
> emmc, since our dtsi is still based on downstream and sdhc0 is used for
> the sd card.
> 
> Signed-off-by: Andre Heider <a.heider@gmail.com>

We've found a tester with an eMMC board, and unfortunately this patch is 
not sufficient. eMMC shows up, but accessing it errors out with "MMC: no 
card present".

Stefan, please ignore 3/3 for now.
If you agree, 1/3 and 2/3 are still worth having, they prepare for 
syncing dts files with Linux.

Regards,
Andre

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v2 3/3] arm64: dts: a3720: add support for espressobin with populated emmc
  2020-09-09  9:16   ` Andre Heider
@ 2020-09-10 18:04     ` Andre Heider
  0 siblings, 0 replies; 16+ messages in thread
From: Andre Heider @ 2020-09-10 18:04 UTC (permalink / raw)
  To: u-boot

On 09/09/2020 11:16, Andre Heider wrote:
> On 04/09/2020 17:33, Andre Heider wrote:
>> Import armada-3720-espressobin-emmc.dts from Linux, but use sdhc1 for
>> emmc, since our dtsi is still based on downstream and sdhc0 is used for
>> the sd card.
>>
>> Signed-off-by: Andre Heider <a.heider@gmail.com>
> 
> We've found a tester with an eMMC board, and unfortunately this patch is 
> not sufficient. eMMC shows up, but accessing it errors out with "MMC: no 
> card present".
> 
> Stefan, please ignore 3/3 for now.
> If you agree, 1/3 and 2/3 are still worth having, they prepare for 
> syncing dts files with Linux.

Thanks to G?rald we managed to fix it. 3/3 is good to go, the missing 
piece was just respecting "non-removable", see [0].

That patch combined with this set makes it work, so please go ahead and 
review :)

Thanks,
Andre

[0] 
https://patchwork.ozlabs.org/project/uboot/patch/20200910175340.515227-1-a.heider at gmail.com/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v3] arm64: dts: armada-3720-espressobin: use Linux model/compatible strings
  2020-09-04 15:33 [PATCH v2 1/3] arm64: dts: armada-3720-espressobin: use Linux model/compatible strings Andre Heider
  2020-09-04 15:33 ` [PATCH v2 2/3] arm64: dts: armada-3720-espressobin: split common parts to .dtsi Andre Heider
  2020-09-04 15:33 ` [PATCH v2 3/3] arm64: dts: a3720: add support for espressobin with populated emmc Andre Heider
@ 2020-10-02  5:51 ` Andre Heider
  2020-10-02 10:56   ` Pali Rohár
                     ` (2 more replies)
  2 siblings, 3 replies; 16+ messages in thread
From: Andre Heider @ 2020-10-02  5:51 UTC (permalink / raw)
  To: u-boot

Fix the actual board vendor and ease synching dts files from Linux.

Signed-off-by: Andre Heider <a.heider@gmail.com>
---
v3: rebase on master

 arch/arm/dts/armada-3720-espressobin.dts | 4 ++--
 board/Marvell/mvebu_armada-37xx/board.c  | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/dts/armada-3720-espressobin.dts b/arch/arm/dts/armada-3720-espressobin.dts
index 4534f5ff29..be67a45870 100644
--- a/arch/arm/dts/armada-3720-espressobin.dts
+++ b/arch/arm/dts/armada-3720-espressobin.dts
@@ -50,8 +50,8 @@
 #include "armada-372x.dtsi"
 
 / {
-	model = "Marvell Armada 3720 Community Board ESPRESSOBin";
-	compatible = "marvell,armada-3720-espressobin", "marvell,armada3720", "marvell,armada3710";
+	model = "Globalscale Marvell ESPRESSOBin Board";
+	compatible = "globalscale,espressobin", "marvell,armada3720", "marvell,armada3710";
 
 	chosen {
 		stdout-path = "serial0:115200n8";
diff --git a/board/Marvell/mvebu_armada-37xx/board.c b/board/Marvell/mvebu_armada-37xx/board.c
index 2bfc7171c4..73d69e0388 100644
--- a/board/Marvell/mvebu_armada-37xx/board.c
+++ b/board/Marvell/mvebu_armada-37xx/board.c
@@ -88,14 +88,14 @@ int board_late_init(void)
 	if (env_get("fdtfile"))
 		return 0;
 
-	if (!of_machine_is_compatible("marvell,armada-3720-espressobin"))
+	if (!of_machine_is_compatible("globalscale,espressobin"))
 		return 0;
 
 	/* If the memory controller has been configured for DDR4, we're running on v7 */
 	ddr4 = ((readl(A3700_CH0_MC_CTRL2_REG) >> A3700_MC_CTRL2_SDRAM_TYPE_OFFS)
 		& A3700_MC_CTRL2_SDRAM_TYPE_MASK) == A3700_MC_CTRL2_SDRAM_TYPE_DDR4;
 
-	emmc = of_machine_is_compatible("marvell,armada-3720-espressobin-emmc");
+	emmc = of_machine_is_compatible("globalscale,espressobin-emmc");
 
 	if (ddr4 && emmc)
 		env_set("fdtfile", "marvell/armada-3720-espressobin-v7-emmc.dtb");
@@ -248,7 +248,7 @@ static int mii_multi_chip_mode_write(struct mii_dev *bus, int dev_smi_addr,
 /* Bring-up board-specific network stuff */
 int board_network_enable(struct mii_dev *bus)
 {
-	if (!of_machine_is_compatible("marvell,armada-3720-espressobin"))
+	if (!of_machine_is_compatible("globalscale,espressobin"))
 		return 0;
 
 	/*
@@ -300,7 +300,7 @@ int ft_board_setup(void *blob, struct bd_info *bd)
 	int part_off;
 
 	/* Fill SPI MTD partitions for Linux kernel on Espressobin */
-	if (!of_machine_is_compatible("marvell,armada-3720-espressobin"))
+	if (!of_machine_is_compatible("globalscale,espressobin"))
 		return 0;
 
 	spi_off = fdt_node_offset_by_compatible(blob, -1, "jedec,spi-nor");
-- 
2.28.0

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v3] arm64: dts: armada-3720-espressobin: use Linux model/compatible strings
  2020-10-02  5:51 ` [PATCH v3] arm64: dts: armada-3720-espressobin: use Linux model/compatible strings Andre Heider
@ 2020-10-02 10:56   ` Pali Rohár
  2020-10-07  4:57   ` Stefan Roese
  2020-10-14  8:16   ` Stefan Roese
  2 siblings, 0 replies; 16+ messages in thread
From: Pali Rohár @ 2020-10-02 10:56 UTC (permalink / raw)
  To: u-boot

CCing Heinrich, I think you should be interested in this patch.

On Friday 02 October 2020 07:51:12 Andre Heider wrote:
> Fix the actual board vendor and ease synching dts files from Linux.
> 
> Signed-off-by: Andre Heider <a.heider@gmail.com>

Reviewed-by: Pali Roh?r <pali@kernel.org>

> ---
> v3: rebase on master
> 
>  arch/arm/dts/armada-3720-espressobin.dts | 4 ++--
>  board/Marvell/mvebu_armada-37xx/board.c  | 8 ++++----
>  2 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/arm/dts/armada-3720-espressobin.dts b/arch/arm/dts/armada-3720-espressobin.dts
> index 4534f5ff29..be67a45870 100644
> --- a/arch/arm/dts/armada-3720-espressobin.dts
> +++ b/arch/arm/dts/armada-3720-espressobin.dts
> @@ -50,8 +50,8 @@
>  #include "armada-372x.dtsi"
>  
>  / {
> -	model = "Marvell Armada 3720 Community Board ESPRESSOBin";
> -	compatible = "marvell,armada-3720-espressobin", "marvell,armada3720", "marvell,armada3710";
> +	model = "Globalscale Marvell ESPRESSOBin Board";
> +	compatible = "globalscale,espressobin", "marvell,armada3720", "marvell,armada3710";
>  
>  	chosen {
>  		stdout-path = "serial0:115200n8";
> diff --git a/board/Marvell/mvebu_armada-37xx/board.c b/board/Marvell/mvebu_armada-37xx/board.c
> index 2bfc7171c4..73d69e0388 100644
> --- a/board/Marvell/mvebu_armada-37xx/board.c
> +++ b/board/Marvell/mvebu_armada-37xx/board.c
> @@ -88,14 +88,14 @@ int board_late_init(void)
>  	if (env_get("fdtfile"))
>  		return 0;
>  
> -	if (!of_machine_is_compatible("marvell,armada-3720-espressobin"))
> +	if (!of_machine_is_compatible("globalscale,espressobin"))
>  		return 0;
>  
>  	/* If the memory controller has been configured for DDR4, we're running on v7 */
>  	ddr4 = ((readl(A3700_CH0_MC_CTRL2_REG) >> A3700_MC_CTRL2_SDRAM_TYPE_OFFS)
>  		& A3700_MC_CTRL2_SDRAM_TYPE_MASK) == A3700_MC_CTRL2_SDRAM_TYPE_DDR4;
>  
> -	emmc = of_machine_is_compatible("marvell,armada-3720-espressobin-emmc");
> +	emmc = of_machine_is_compatible("globalscale,espressobin-emmc");
>  
>  	if (ddr4 && emmc)
>  		env_set("fdtfile", "marvell/armada-3720-espressobin-v7-emmc.dtb");
> @@ -248,7 +248,7 @@ static int mii_multi_chip_mode_write(struct mii_dev *bus, int dev_smi_addr,
>  /* Bring-up board-specific network stuff */
>  int board_network_enable(struct mii_dev *bus)
>  {
> -	if (!of_machine_is_compatible("marvell,armada-3720-espressobin"))
> +	if (!of_machine_is_compatible("globalscale,espressobin"))
>  		return 0;
>  
>  	/*
> @@ -300,7 +300,7 @@ int ft_board_setup(void *blob, struct bd_info *bd)
>  	int part_off;
>  
>  	/* Fill SPI MTD partitions for Linux kernel on Espressobin */
> -	if (!of_machine_is_compatible("marvell,armada-3720-espressobin"))
> +	if (!of_machine_is_compatible("globalscale,espressobin"))
>  		return 0;
>  
>  	spi_off = fdt_node_offset_by_compatible(blob, -1, "jedec,spi-nor");
> -- 
> 2.28.0
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v3] arm64: dts: armada-3720-espressobin: use Linux model/compatible strings
  2020-10-02  5:51 ` [PATCH v3] arm64: dts: armada-3720-espressobin: use Linux model/compatible strings Andre Heider
  2020-10-02 10:56   ` Pali Rohár
@ 2020-10-07  4:57   ` Stefan Roese
  2020-10-14  8:16   ` Stefan Roese
  2 siblings, 0 replies; 16+ messages in thread
From: Stefan Roese @ 2020-10-07  4:57 UTC (permalink / raw)
  To: u-boot

On 02.10.20 07:51, Andre Heider wrote:
> Fix the actual board vendor and ease synching dts files from Linux.
> 
> Signed-off-by: Andre Heider <a.heider@gmail.com>

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

> ---
> v3: rebase on master
> 
>   arch/arm/dts/armada-3720-espressobin.dts | 4 ++--
>   board/Marvell/mvebu_armada-37xx/board.c  | 8 ++++----
>   2 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/arm/dts/armada-3720-espressobin.dts b/arch/arm/dts/armada-3720-espressobin.dts
> index 4534f5ff29..be67a45870 100644
> --- a/arch/arm/dts/armada-3720-espressobin.dts
> +++ b/arch/arm/dts/armada-3720-espressobin.dts
> @@ -50,8 +50,8 @@
>   #include "armada-372x.dtsi"
>   
>   / {
> -	model = "Marvell Armada 3720 Community Board ESPRESSOBin";
> -	compatible = "marvell,armada-3720-espressobin", "marvell,armada3720", "marvell,armada3710";
> +	model = "Globalscale Marvell ESPRESSOBin Board";
> +	compatible = "globalscale,espressobin", "marvell,armada3720", "marvell,armada3710";
>   
>   	chosen {
>   		stdout-path = "serial0:115200n8";
> diff --git a/board/Marvell/mvebu_armada-37xx/board.c b/board/Marvell/mvebu_armada-37xx/board.c
> index 2bfc7171c4..73d69e0388 100644
> --- a/board/Marvell/mvebu_armada-37xx/board.c
> +++ b/board/Marvell/mvebu_armada-37xx/board.c
> @@ -88,14 +88,14 @@ int board_late_init(void)
>   	if (env_get("fdtfile"))
>   		return 0;
>   
> -	if (!of_machine_is_compatible("marvell,armada-3720-espressobin"))
> +	if (!of_machine_is_compatible("globalscale,espressobin"))
>   		return 0;
>   
>   	/* If the memory controller has been configured for DDR4, we're running on v7 */
>   	ddr4 = ((readl(A3700_CH0_MC_CTRL2_REG) >> A3700_MC_CTRL2_SDRAM_TYPE_OFFS)
>   		& A3700_MC_CTRL2_SDRAM_TYPE_MASK) == A3700_MC_CTRL2_SDRAM_TYPE_DDR4;
>   
> -	emmc = of_machine_is_compatible("marvell,armada-3720-espressobin-emmc");
> +	emmc = of_machine_is_compatible("globalscale,espressobin-emmc");
>   
>   	if (ddr4 && emmc)
>   		env_set("fdtfile", "marvell/armada-3720-espressobin-v7-emmc.dtb");
> @@ -248,7 +248,7 @@ static int mii_multi_chip_mode_write(struct mii_dev *bus, int dev_smi_addr,
>   /* Bring-up board-specific network stuff */
>   int board_network_enable(struct mii_dev *bus)
>   {
> -	if (!of_machine_is_compatible("marvell,armada-3720-espressobin"))
> +	if (!of_machine_is_compatible("globalscale,espressobin"))
>   		return 0;
>   
>   	/*
> @@ -300,7 +300,7 @@ int ft_board_setup(void *blob, struct bd_info *bd)
>   	int part_off;
>   
>   	/* Fill SPI MTD partitions for Linux kernel on Espressobin */
> -	if (!of_machine_is_compatible("marvell,armada-3720-espressobin"))
> +	if (!of_machine_is_compatible("globalscale,espressobin"))
>   		return 0;
>   
>   	spi_off = fdt_node_offset_by_compatible(blob, -1, "jedec,spi-nor");
> 


Viele Gr??e,
Stefan

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v3] arm64: dts: armada-3720-espressobin: use Linux model/compatible strings
  2020-10-02  5:51 ` [PATCH v3] arm64: dts: armada-3720-espressobin: use Linux model/compatible strings Andre Heider
  2020-10-02 10:56   ` Pali Rohár
  2020-10-07  4:57   ` Stefan Roese
@ 2020-10-14  8:16   ` Stefan Roese
  2 siblings, 0 replies; 16+ messages in thread
From: Stefan Roese @ 2020-10-14  8:16 UTC (permalink / raw)
  To: u-boot

On 02.10.20 07:51, Andre Heider wrote:
> Fix the actual board vendor and ease synching dts files from Linux.
> 
> Signed-off-by: Andre Heider <a.heider@gmail.com>
> ---
> v3: rebase on master

Applied to u-boot-marvell/master

Thanks,
Stefan

>   arch/arm/dts/armada-3720-espressobin.dts | 4 ++--
>   board/Marvell/mvebu_armada-37xx/board.c  | 8 ++++----
>   2 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/arm/dts/armada-3720-espressobin.dts b/arch/arm/dts/armada-3720-espressobin.dts
> index 4534f5ff29..be67a45870 100644
> --- a/arch/arm/dts/armada-3720-espressobin.dts
> +++ b/arch/arm/dts/armada-3720-espressobin.dts
> @@ -50,8 +50,8 @@
>   #include "armada-372x.dtsi"
>   
>   / {
> -	model = "Marvell Armada 3720 Community Board ESPRESSOBin";
> -	compatible = "marvell,armada-3720-espressobin", "marvell,armada3720", "marvell,armada3710";
> +	model = "Globalscale Marvell ESPRESSOBin Board";
> +	compatible = "globalscale,espressobin", "marvell,armada3720", "marvell,armada3710";
>   
>   	chosen {
>   		stdout-path = "serial0:115200n8";
> diff --git a/board/Marvell/mvebu_armada-37xx/board.c b/board/Marvell/mvebu_armada-37xx/board.c
> index 2bfc7171c4..73d69e0388 100644
> --- a/board/Marvell/mvebu_armada-37xx/board.c
> +++ b/board/Marvell/mvebu_armada-37xx/board.c
> @@ -88,14 +88,14 @@ int board_late_init(void)
>   	if (env_get("fdtfile"))
>   		return 0;
>   
> -	if (!of_machine_is_compatible("marvell,armada-3720-espressobin"))
> +	if (!of_machine_is_compatible("globalscale,espressobin"))
>   		return 0;
>   
>   	/* If the memory controller has been configured for DDR4, we're running on v7 */
>   	ddr4 = ((readl(A3700_CH0_MC_CTRL2_REG) >> A3700_MC_CTRL2_SDRAM_TYPE_OFFS)
>   		& A3700_MC_CTRL2_SDRAM_TYPE_MASK) == A3700_MC_CTRL2_SDRAM_TYPE_DDR4;
>   
> -	emmc = of_machine_is_compatible("marvell,armada-3720-espressobin-emmc");
> +	emmc = of_machine_is_compatible("globalscale,espressobin-emmc");
>   
>   	if (ddr4 && emmc)
>   		env_set("fdtfile", "marvell/armada-3720-espressobin-v7-emmc.dtb");
> @@ -248,7 +248,7 @@ static int mii_multi_chip_mode_write(struct mii_dev *bus, int dev_smi_addr,
>   /* Bring-up board-specific network stuff */
>   int board_network_enable(struct mii_dev *bus)
>   {
> -	if (!of_machine_is_compatible("marvell,armada-3720-espressobin"))
> +	if (!of_machine_is_compatible("globalscale,espressobin"))
>   		return 0;
>   
>   	/*
> @@ -300,7 +300,7 @@ int ft_board_setup(void *blob, struct bd_info *bd)
>   	int part_off;
>   
>   	/* Fill SPI MTD partitions for Linux kernel on Espressobin */
> -	if (!of_machine_is_compatible("marvell,armada-3720-espressobin"))
> +	if (!of_machine_is_compatible("globalscale,espressobin"))
>   		return 0;
>   
>   	spi_off = fdt_node_offset_by_compatible(blob, -1, "jedec,spi-nor");
> 


Viele Gr??e,
Stefan

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v2 2/3] arm64: dts: armada-3720-espressobin: split common parts to .dtsi
  2020-09-04 15:33 ` [PATCH v2 2/3] arm64: dts: armada-3720-espressobin: split common parts to .dtsi Andre Heider
@ 2020-10-14  8:17   ` Stefan Roese
  0 siblings, 0 replies; 16+ messages in thread
From: Stefan Roese @ 2020-10-14  8:17 UTC (permalink / raw)
  To: u-boot

On 04.09.20 17:33, Andre Heider wrote:
> Move most of the dts to the new common armada-3720-espressobin.dtsi
> file, just like Linux, but keep the current, downstream based, version.
> 
> The dts itself is imported from Linux.
> 
> Signed-off-by: Andre Heider <a.heider@gmail.com>

Applied to u-boot-marvell/master

Thanks,
Stefan

> ---
>   arch/arm/dts/armada-3720-espressobin.dts      | 190 ++----------------
>   ...sobin.dts => armada-3720-espressobin.dtsi} |   3 -
>   2 files changed, 20 insertions(+), 173 deletions(-)
>   rewrite arch/arm/dts/armada-3720-espressobin.dts (95%)
>   copy arch/arm/dts/{armada-3720-espressobin.dts => armada-3720-espressobin.dtsi} (96%)
> 
> diff --git a/arch/arm/dts/armada-3720-espressobin.dts b/arch/arm/dts/armada-3720-espressobin.dts
> dissimilarity index 95%
> index be67a45870..1542d836c0 100644
> --- a/arch/arm/dts/armada-3720-espressobin.dts
> +++ b/arch/arm/dts/armada-3720-espressobin.dts
> @@ -1,170 +1,20 @@
> -/*
> - * Device Tree file for Marvell Armada 3720 community board
> - * (ESPRESSOBin)
> - * Copyright (C) 2016 Marvell
> - *
> - * Gregory CLEMENT <gregory.clement@free-electrons.com>
> - * Konstantin Porotchkin <kostap@marvell.com>
> - *
> - * This file is dual-licensed: you can use it either under the terms
> - * of the GPL or the X11 license, at your option. Note that this dual
> - * licensing only applies to this file, and not this project as a
> - * whole.
> - *
> - *  a) This file is free software; you can redistribute it and/or
> - *     modify it under the terms of the GNU General Public License as
> - *     published by the Free Software Foundation; either version 2 of the
> - *     License, or (at your option) any later version.
> - *
> - *     This file is distributed in the hope that it will be useful
> - *     but WITHOUT ANY WARRANTY; without even the implied warranty of
> - *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> - *     GNU General Public License for more details.
> - *
> - * Or, alternatively
> - *
> - *  b) Permission is hereby granted, free of charge, to any person
> - *     obtaining a copy of this software and associated documentation
> - *     files (the "Software"), to deal in the Software without
> - *     restriction, including without limitation the rights to use
> - *     copy, modify, merge, publish, distribute, sublicense, and/or
> - *     sell copies of the Software, and to permit persons to whom the
> - *     Software is furnished to do so, subject to the following
> - *     conditions:
> - *
> - *     The above copyright notice and this permission notice shall be
> - *     included in all copies or substantial portions of the Software.
> - *
> - *     THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
> - *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
> - *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> - *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
> - *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
> - *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> - *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> - *     OTHER DEALINGS IN THE SOFTWARE.
> - */
> -
> -/dts-v1/;
> -
> -#include "armada-372x.dtsi"
> -
> -/ {
> -	model = "Globalscale Marvell ESPRESSOBin Board";
> -	compatible = "globalscale,espressobin", "marvell,armada3720", "marvell,armada3710";
> -
> -	chosen {
> -		stdout-path = "serial0:115200n8";
> -	};
> -
> -	aliases {
> -		ethernet0 = &eth0;
> -		i2c0 = &i2c0;
> -		spi0 = &spi0;
> -	};
> -
> -	memory {
> -		device_type = "memory";
> -		reg = <0x00000000 0x00000000 0x00000000 0x20000000>;
> -	};
> -
> -	vcc_sd_reg0: regulator at 0 {
> -		compatible = "regulator-gpio";
> -		regulator-name = "vcc_sd0";
> -		regulator-min-microvolt = <1800000>;
> -		regulator-max-microvolt = <3300000>;
> -		regulator-type = "voltage";
> -		states = <1800000 0x1
> -			  3300000 0x0>;
> -		gpios = <&gpionb 4 GPIO_ACTIVE_HIGH>;
> -	};
> -};
> -
> -&comphy {
> -	max-lanes = <3>;
> -	phy0 {
> -		phy-type = <PHY_TYPE_USB3_HOST0>;
> -		phy-speed = <PHY_SPEED_5G>;
> -	};
> -
> -	phy1 {
> -		phy-type = <PHY_TYPE_PEX0>;
> -		phy-speed = <PHY_SPEED_2_5G>;
> -	};
> -
> -	phy2 {
> -		phy-type = <PHY_TYPE_SATA0>;
> -		phy-speed = <PHY_SPEED_5G>;
> -	};
> -};
> -
> -&eth0 {
> -	status = "okay";
> -	pinctrl-names = "default";
> -	pinctrl-0 = <&rgmii_pins>, <&smi_pins>;
> -	phy-mode = "rgmii";
> -	phy_addr = <0x1>;
> -	fixed-link {
> -		speed = <1000>;
> -		full-duplex;
> -	};
> -};
> -
> -&i2c0 {
> -	pinctrl-names = "default";
> -	pinctrl-0 = <&i2c1_pins>;
> -	status = "okay";
> -};
> -
> -/* CON3 */
> -&sata {
> -	status = "okay";
> -};
> -
> -&sdhci0 {
> -	pinctrl-names = "default";
> -	pinctrl-0 = <&sdio_pins>;
> -	bus-width = <4>;
> -	cd-gpios = <&gpionb 3 GPIO_ACTIVE_LOW>;
> -	vqmmc-supply = <&vcc_sd_reg0>;
> -	status = "okay";
> -};
> -
> -&spi0 {
> -	status = "okay";
> -	pinctrl-names = "default";
> -	pinctrl-0 = <&spi_quad_pins>;
> -
> -	spi-flash at 0 {
> -		#address-cells = <1>;
> -		#size-cells = <1>;
> -		compatible = "st,m25p128", "jedec,spi-nor";
> -		reg = <0>; /* Chip select 0 */
> -		spi-max-frequency = <50000000>;
> -		m25p,fast-read;
> -	};
> -};
> -
> -/* Exported on the micro USB connector CON32 through an FTDI */
> -&uart0 {
> -	pinctrl-names = "default";
> -	pinctrl-0 = <&uart1_pins>;
> -	status = "okay";
> -};
> -
> -/* CON29 */
> -&usb2 {
> -	status = "okay";
> -};
> -
> -/* CON31 */
> -&usb3 {
> -	status = "okay";
> -};
> -
> -&pcie0 {
> -	pinctrl-names = "default";
> -	pinctrl-0 = <&pcie_pins>;
> -	reset-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>;
> -	status = "okay";
> -};
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * Device Tree file for Globalscale Marvell ESPRESSOBin Board
> + * Copyright (C) 2016 Marvell
> + *
> + * Romain Perier <romain.perier@free-electrons.com>
> + *
> + */
> +/*
> + * Schematic available at http://espressobin.net/wp-content/uploads/2017/08/ESPRESSObin_V5_Schematics.pdf
> + */
> +
> +/dts-v1/;
> +
> +#include "armada-3720-espressobin.dtsi"
> +
> +/ {
> +	model = "Globalscale Marvell ESPRESSOBin Board";
> +	compatible = "globalscale,espressobin", "marvell,armada3720", "marvell,armada3710";
> +};
> diff --git a/arch/arm/dts/armada-3720-espressobin.dts b/arch/arm/dts/armada-3720-espressobin.dtsi
> similarity index 96%
> copy from arch/arm/dts/armada-3720-espressobin.dts
> copy to arch/arm/dts/armada-3720-espressobin.dtsi
> index be67a45870..05dec89834 100644
> --- a/arch/arm/dts/armada-3720-espressobin.dts
> +++ b/arch/arm/dts/armada-3720-espressobin.dtsi
> @@ -50,9 +50,6 @@
>   #include "armada-372x.dtsi"
>   
>   / {
> -	model = "Globalscale Marvell ESPRESSOBin Board";
> -	compatible = "globalscale,espressobin", "marvell,armada3720", "marvell,armada3710";
> -
>   	chosen {
>   		stdout-path = "serial0:115200n8";
>   	};
> 


Viele Gr??e,
Stefan

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v2 3/3] arm64: dts: a3720: add support for espressobin with populated emmc
  2020-09-04 15:33 ` [PATCH v2 3/3] arm64: dts: a3720: add support for espressobin with populated emmc Andre Heider
  2020-09-09  9:16   ` Andre Heider
@ 2020-10-14  8:17   ` Stefan Roese
  2020-10-14  8:21     ` Pali Rohár
  1 sibling, 1 reply; 16+ messages in thread
From: Stefan Roese @ 2020-10-14  8:17 UTC (permalink / raw)
  To: u-boot

On 04.09.20 17:33, Andre Heider wrote:
> Import armada-3720-espressobin-emmc.dts from Linux, but use sdhc1 for
> emmc, since our dtsi is still based on downstream and sdhc0 is used for
> the sd card.
> 
> Signed-off-by: Andre Heider <a.heider@gmail.com>

Applied to u-boot-marvell/master

Thanks,
Stefan

> ---
>   arch/arm/dts/Makefile                         |  1 +
>   arch/arm/dts/armada-3720-espressobin-emmc.dts | 44 +++++++++++++++++++
>   doc/README.marvell                            |  7 ++-
>   3 files changed, 50 insertions(+), 2 deletions(-)
>   create mode 100644 arch/arm/dts/armada-3720-espressobin-emmc.dts
> 
> diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
> index 5e34192be6..8f1958b5a7 100644
> --- a/arch/arm/dts/Makefile
> +++ b/arch/arm/dts/Makefile
> @@ -202,6 +202,7 @@ dtb-$(CONFIG_ARCH_TEGRA) += tegra20-harmony.dtb \
>   dtb-$(CONFIG_ARCH_MVEBU) +=			\
>   	armada-3720-db.dtb			\
>   	armada-3720-espressobin.dtb		\
> +	armada-3720-espressobin-emmc.dtb	\
>   	armada-3720-turris-mox.dtb		\
>   	armada-3720-uDPU.dtb			\
>   	armada-375-db.dtb			\
> diff --git a/arch/arm/dts/armada-3720-espressobin-emmc.dts b/arch/arm/dts/armada-3720-espressobin-emmc.dts
> new file mode 100644
> index 0000000000..29ccb6a573
> --- /dev/null
> +++ b/arch/arm/dts/armada-3720-espressobin-emmc.dts
> @@ -0,0 +1,44 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * Device Tree file for Globalscale Marvell ESPRESSOBin Board with eMMC
> + * Copyright (C) 2018 Marvell
> + *
> + * Romain Perier <romain.perier@free-electrons.com>
> + * Konstantin Porotchkin <kostap@marvell.com>
> + *
> + */
> +/*
> + * Schematic available at http://espressobin.net/wp-content/uploads/2017/08/ESPRESSObin_V5_Schematics.pdf
> + */
> +
> +/dts-v1/;
> +
> +#include "armada-3720-espressobin.dtsi"
> +
> +/ {
> +	model = "Globalscale Marvell ESPRESSOBin Board (eMMC)";
> +	compatible = "globalscale,espressobin-emmc", "globalscale,espressobin",
> +		     "marvell,armada3720", "marvell,armada3710";
> +};
> +
> +/* U11 */
> +&sdhci1 {
> +	non-removable;
> +	bus-width = <8>;
> +	mmc-ddr-1_8v;
> +	mmc-hs400-1_8v;
> +	marvell,xenon-emmc;
> +	marvell,xenon-tun-count = <9>;
> +	marvell,pad-type = "fixed-1-8v";
> +
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&mmc_pins>;
> +	status = "okay";
> +
> +	#address-cells = <1>;
> +	#size-cells = <0>;
> +	mmccard: mmccard at 0 {
> +		compatible = "mmc-card";
> +		reg = <0>;
> +	};
> +};
> diff --git a/doc/README.marvell b/doc/README.marvell
> index 5416bc3035..be07f31f8c 100644
> --- a/doc/README.marvell
> +++ b/doc/README.marvell
> @@ -43,8 +43,11 @@ Build Procedure
>           In order to prevent this, the required device-tree MUST be set during compilation.
>           All device-tree files are located in ./arch/arm/dts/ folder.
>   
> -	For other DB boards (MacchiatoBin, EspressoBin and 3700 DB board) compile u-boot with
> -	just default device-tree from defconfig using:
> +	For the EspressoBin board with populated eMMC device use
> +		# make DEVICE_TREE=armada-3720-espressobin-emmc
> +
> +	For other DB boards (MacchiatoBin, EspressoBin without soldered eMMC and 3700 DB board)
> +	compile u-boot with just default device-tree from defconfig using:
>   
>   		# make
>   
> 


Viele Gr??e,
Stefan

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v2 3/3] arm64: dts: a3720: add support for espressobin with populated emmc
  2020-10-14  8:17   ` Stefan Roese
@ 2020-10-14  8:21     ` Pali Rohár
  2020-10-14  8:37       ` Andre Heider
  0 siblings, 1 reply; 16+ messages in thread
From: Pali Rohár @ 2020-10-14  8:21 UTC (permalink / raw)
  To: u-boot

On Wednesday 14 October 2020 10:17:45 Stefan Roese wrote:
> On 04.09.20 17:33, Andre Heider wrote:
> > Import armada-3720-espressobin-emmc.dts from Linux, but use sdhc1 for
> > emmc, since our dtsi is still based on downstream and sdhc0 is used for
> > the sd card.
> > 
> > Signed-off-by: Andre Heider <a.heider@gmail.com>
> 
> Applied to u-boot-marvell/master
> 
> Thanks,
> Stefan
> 
> > ---
> >   arch/arm/dts/Makefile                         |  1 +
> >   arch/arm/dts/armada-3720-espressobin-emmc.dts | 44 +++++++++++++++++++
> >   doc/README.marvell                            |  7 ++-
> >   3 files changed, 50 insertions(+), 2 deletions(-)
> >   create mode 100644 arch/arm/dts/armada-3720-espressobin-emmc.dts
> > 
> > diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
> > index 5e34192be6..8f1958b5a7 100644
> > --- a/arch/arm/dts/Makefile
> > +++ b/arch/arm/dts/Makefile
> > @@ -202,6 +202,7 @@ dtb-$(CONFIG_ARCH_TEGRA) += tegra20-harmony.dtb \
> >   dtb-$(CONFIG_ARCH_MVEBU) +=			\
> >   	armada-3720-db.dtb			\
> >   	armada-3720-espressobin.dtb		\
> > +	armada-3720-espressobin-emmc.dtb	\
> >   	armada-3720-turris-mox.dtb		\
> >   	armada-3720-uDPU.dtb			\
> >   	armada-375-db.dtb			\
> > diff --git a/arch/arm/dts/armada-3720-espressobin-emmc.dts b/arch/arm/dts/armada-3720-espressobin-emmc.dts
> > new file mode 100644
> > index 0000000000..29ccb6a573
> > --- /dev/null
> > +++ b/arch/arm/dts/armada-3720-espressobin-emmc.dts
> > @@ -0,0 +1,44 @@
> > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> > +/*
> > + * Device Tree file for Globalscale Marvell ESPRESSOBin Board with eMMC
> > + * Copyright (C) 2018 Marvell
> > + *
> > + * Romain Perier <romain.perier@free-electrons.com>
> > + * Konstantin Porotchkin <kostap@marvell.com>
> > + *
> > + */
> > +/*
> > + * Schematic available at http://espressobin.net/wp-content/uploads/2017/08/ESPRESSObin_V5_Schematics.pdf
> > + */
> > +
> > +/dts-v1/;
> > +
> > +#include "armada-3720-espressobin.dtsi"
> > +
> > +/ {
> > +	model = "Globalscale Marvell ESPRESSOBin Board (eMMC)";
> > +	compatible = "globalscale,espressobin-emmc", "globalscale,espressobin",
> > +		     "marvell,armada3720", "marvell,armada3710";
> > +};
> > +
> > +/* U11 */
> > +&sdhci1 {
> > +	non-removable;
> > +	bus-width = <8>;
> > +	mmc-ddr-1_8v;
> > +	mmc-hs400-1_8v;
> > +	marvell,xenon-emmc;
> > +	marvell,xenon-tun-count = <9>;
> > +	marvell,pad-type = "fixed-1-8v";
> > +
> > +	pinctrl-names = "default";
> > +	pinctrl-0 = <&mmc_pins>;
> > +	status = "okay";
> > +
> > +	#address-cells = <1>;
> > +	#size-cells = <0>;
> > +	mmccard: mmccard at 0 {
> > +		compatible = "mmc-card";
> > +		reg = <0>;
> > +	};
> > +};
> > diff --git a/doc/README.marvell b/doc/README.marvell
> > index 5416bc3035..be07f31f8c 100644
> > --- a/doc/README.marvell
> > +++ b/doc/README.marvell
> > @@ -43,8 +43,11 @@ Build Procedure
> >           In order to prevent this, the required device-tree MUST be set during compilation.
> >           All device-tree files are located in ./arch/arm/dts/ folder.
> > -	For other DB boards (MacchiatoBin, EspressoBin and 3700 DB board) compile u-boot with
> > -	just default device-tree from defconfig using:
> > +	For the EspressoBin board with populated eMMC device use
> > +		# make DEVICE_TREE=armada-3720-espressobin-emmc
> > +
> > +	For other DB boards (MacchiatoBin, EspressoBin without soldered eMMC and 3700 DB board)
> > +	compile u-boot with just default device-tree from defconfig using:

Hello! Does not it really make sense to do autodetection of eMMC
presence and enable it in U-Boot code only when needed and therefore
avoid having two DTS files and needs for specifying DEVICE_TREE variable
and therefore variant of Espressobin, as I stated in previous emails?

I think this just complicates build process... E.g. we already have a
code in U-Boot which detects V5 vs V7 variant.

> >   		# make
> > 
> 
> 
> Viele Gr??e,
> Stefan
> 
> -- 
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v2 3/3] arm64: dts: a3720: add support for espressobin with populated emmc
  2020-10-14  8:21     ` Pali Rohár
@ 2020-10-14  8:37       ` Andre Heider
  2020-10-14  8:45         ` Pali Rohár
  0 siblings, 1 reply; 16+ messages in thread
From: Andre Heider @ 2020-10-14  8:37 UTC (permalink / raw)
  To: u-boot

On 14/10/2020 10:21, Pali Roh?r wrote:

<snip>

>>> diff --git a/doc/README.marvell b/doc/README.marvell
>>> index 5416bc3035..be07f31f8c 100644
>>> --- a/doc/README.marvell
>>> +++ b/doc/README.marvell
>>> @@ -43,8 +43,11 @@ Build Procedure
>>>            In order to prevent this, the required device-tree MUST be set during compilation.
>>>            All device-tree files are located in ./arch/arm/dts/ folder.
>>> -	For other DB boards (MacchiatoBin, EspressoBin and 3700 DB board) compile u-boot with
>>> -	just default device-tree from defconfig using:
>>> +	For the EspressoBin board with populated eMMC device use
>>> +		# make DEVICE_TREE=armada-3720-espressobin-emmc
>>> +
>>> +	For other DB boards (MacchiatoBin, EspressoBin without soldered eMMC and 3700 DB board)
>>> +	compile u-boot with just default device-tree from defconfig using:
> 
> Hello! Does not it really make sense to do autodetection of eMMC
> presence and enable it in U-Boot code only when needed and therefore
> avoid having two DTS files and needs for specifying DEVICE_TREE variable
> and therefore variant of Espressobin, as I stated in previous emails?
> 
> I think this just complicates build process... E.g. we already have a
> code in U-Boot which detects V5 vs V7 variant.

I still like the idea, but I'm still hesitating to just enable the emmc 
everywhere. There's the issue with powering down the emmc block if it's 
not populated. How would that work once we switch to atf for comphy control?

 From a different angle: If we could just do that, why does Linux have 
different devicetrees?

Regards,
Andre

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v2 3/3] arm64: dts: a3720: add support for espressobin with populated emmc
  2020-10-14  8:37       ` Andre Heider
@ 2020-10-14  8:45         ` Pali Rohár
  2020-10-14 13:20           ` Pali Rohár
  0 siblings, 1 reply; 16+ messages in thread
From: Pali Rohár @ 2020-10-14  8:45 UTC (permalink / raw)
  To: u-boot

On Wednesday 14 October 2020 10:37:57 Andre Heider wrote:
> On 14/10/2020 10:21, Pali Roh?r wrote:
> 
> <snip>
> 
> > > > diff --git a/doc/README.marvell b/doc/README.marvell
> > > > index 5416bc3035..be07f31f8c 100644
> > > > --- a/doc/README.marvell
> > > > +++ b/doc/README.marvell
> > > > @@ -43,8 +43,11 @@ Build Procedure
> > > >            In order to prevent this, the required device-tree MUST be set during compilation.
> > > >            All device-tree files are located in ./arch/arm/dts/ folder.
> > > > -	For other DB boards (MacchiatoBin, EspressoBin and 3700 DB board) compile u-boot with
> > > > -	just default device-tree from defconfig using:
> > > > +	For the EspressoBin board with populated eMMC device use
> > > > +		# make DEVICE_TREE=armada-3720-espressobin-emmc
> > > > +
> > > > +	For other DB boards (MacchiatoBin, EspressoBin without soldered eMMC and 3700 DB board)
> > > > +	compile u-boot with just default device-tree from defconfig using:
> > 
> > Hello! Does not it really make sense to do autodetection of eMMC
> > presence and enable it in U-Boot code only when needed and therefore
> > avoid having two DTS files and needs for specifying DEVICE_TREE variable
> > and therefore variant of Espressobin, as I stated in previous emails?
> > 
> > I think this just complicates build process... E.g. we already have a
> > code in U-Boot which detects V5 vs V7 variant.
> 
> I still like the idea, but I'm still hesitating to just enable the emmc
> everywhere. There's the issue with powering down the emmc block if it's not
> populated. How would that work once we switch to atf for comphy control?

Is there issue with powering it down? I just do not know about it. And
could we fix it?

> From a different angle: If we could just do that, why does Linux have
> different devicetrees?

I do not know exact answer, so I just guess two reasons:

1) historic, nobody wanted to think about it, so rather created
secondary DTS

2) linux driver model does not have API and solution how to do this
auto-detection and in case of absence, turn blocks off and reconfigure
it.

IIRC similar problem was with MOX (also based on A3720) and final
solution is that kernel has only one DTB and U-Boot "modifies" it prior
booting kernel, based on autodetection which U-Boot did. Similarly like
MAC address of MTD partitions are put into espressobin DTB prior booting
kernel.

> 
> Regards,
> Andre

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v2 3/3] arm64: dts: a3720: add support for espressobin with populated emmc
  2020-10-14  8:45         ` Pali Rohár
@ 2020-10-14 13:20           ` Pali Rohár
  0 siblings, 0 replies; 16+ messages in thread
From: Pali Rohár @ 2020-10-14 13:20 UTC (permalink / raw)
  To: u-boot

On Wednesday 14 October 2020 10:45:33 Pali Roh?r wrote:
> On Wednesday 14 October 2020 10:37:57 Andre Heider wrote:
> > On 14/10/2020 10:21, Pali Roh?r wrote:
> > 
> > <snip>
> > 
> > > > > diff --git a/doc/README.marvell b/doc/README.marvell
> > > > > index 5416bc3035..be07f31f8c 100644
> > > > > --- a/doc/README.marvell
> > > > > +++ b/doc/README.marvell
> > > > > @@ -43,8 +43,11 @@ Build Procedure
> > > > >            In order to prevent this, the required device-tree MUST be set during compilation.
> > > > >            All device-tree files are located in ./arch/arm/dts/ folder.
> > > > > -	For other DB boards (MacchiatoBin, EspressoBin and 3700 DB board) compile u-boot with
> > > > > -	just default device-tree from defconfig using:
> > > > > +	For the EspressoBin board with populated eMMC device use
> > > > > +		# make DEVICE_TREE=armada-3720-espressobin-emmc
> > > > > +
> > > > > +	For other DB boards (MacchiatoBin, EspressoBin without soldered eMMC and 3700 DB board)
> > > > > +	compile u-boot with just default device-tree from defconfig using:
> > > 
> > > Hello! Does not it really make sense to do autodetection of eMMC
> > > presence and enable it in U-Boot code only when needed and therefore
> > > avoid having two DTS files and needs for specifying DEVICE_TREE variable
> > > and therefore variant of Espressobin, as I stated in previous emails?
> > > 
> > > I think this just complicates build process... E.g. we already have a
> > > code in U-Boot which detects V5 vs V7 variant.
> > 
> > I still like the idea, but I'm still hesitating to just enable the emmc
> > everywhere. There's the issue with powering down the emmc block if it's not
> > populated. How would that work once we switch to atf for comphy control?
> 
> Is there issue with powering it down? I just do not know about it. And
> could we fix it?
> 
> > From a different angle: If we could just do that, why does Linux have
> > different devicetrees?
> 
> I do not know exact answer, so I just guess two reasons:
> 
> 1) historic, nobody wanted to think about it, so rather created
> secondary DTS
> 
> 2) linux driver model does not have API and solution how to do this
> auto-detection and in case of absence, turn blocks off and reconfigure
> it.
> 
> IIRC similar problem was with MOX (also based on A3720) and final
> solution is that kernel has only one DTB and U-Boot "modifies" it prior
> booting kernel, based on autodetection which U-Boot did. Similarly like
> MAC address of MTD partitions are put into espressobin DTB prior booting
> kernel.

MOX has uSD slot for uSD card and SDIO slot for SDIO wifi card, both
removable. Standard product configuration does not contain SDIO wifi
card, but kernel's DTS file have it enabled by default:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts

So it is really problem to enable eMMC by default on espressobin?

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v3] arm64: dts: armada-3720-espressobin: use Linux model/compatible strings
@ 2020-10-02  5:50 Andre Heider
  0 siblings, 0 replies; 16+ messages in thread
From: Andre Heider @ 2020-10-02  5:50 UTC (permalink / raw)
  To: u-boot

Fix the actual board vendor and ease synching dts files from Linux.

Signed-off-by: Andre Heider <a.heider@gmail.com>
---
v3: rebase on master

 arch/arm/dts/armada-3720-espressobin.dts | 4 ++--
 board/Marvell/mvebu_armada-37xx/board.c  | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/dts/armada-3720-espressobin.dts b/arch/arm/dts/armada-3720-espressobin.dts
index 4534f5ff29..be67a45870 100644
--- a/arch/arm/dts/armada-3720-espressobin.dts
+++ b/arch/arm/dts/armada-3720-espressobin.dts
@@ -50,8 +50,8 @@
 #include "armada-372x.dtsi"
 
 / {
-	model = "Marvell Armada 3720 Community Board ESPRESSOBin";
-	compatible = "marvell,armada-3720-espressobin", "marvell,armada3720", "marvell,armada3710";
+	model = "Globalscale Marvell ESPRESSOBin Board";
+	compatible = "globalscale,espressobin", "marvell,armada3720", "marvell,armada3710";
 
 	chosen {
 		stdout-path = "serial0:115200n8";
diff --git a/board/Marvell/mvebu_armada-37xx/board.c b/board/Marvell/mvebu_armada-37xx/board.c
index 2bfc7171c4..73d69e0388 100644
--- a/board/Marvell/mvebu_armada-37xx/board.c
+++ b/board/Marvell/mvebu_armada-37xx/board.c
@@ -88,14 +88,14 @@ int board_late_init(void)
 	if (env_get("fdtfile"))
 		return 0;
 
-	if (!of_machine_is_compatible("marvell,armada-3720-espressobin"))
+	if (!of_machine_is_compatible("globalscale,espressobin"))
 		return 0;
 
 	/* If the memory controller has been configured for DDR4, we're running on v7 */
 	ddr4 = ((readl(A3700_CH0_MC_CTRL2_REG) >> A3700_MC_CTRL2_SDRAM_TYPE_OFFS)
 		& A3700_MC_CTRL2_SDRAM_TYPE_MASK) == A3700_MC_CTRL2_SDRAM_TYPE_DDR4;
 
-	emmc = of_machine_is_compatible("marvell,armada-3720-espressobin-emmc");
+	emmc = of_machine_is_compatible("globalscale,espressobin-emmc");
 
 	if (ddr4 && emmc)
 		env_set("fdtfile", "marvell/armada-3720-espressobin-v7-emmc.dtb");
@@ -248,7 +248,7 @@ static int mii_multi_chip_mode_write(struct mii_dev *bus, int dev_smi_addr,
 /* Bring-up board-specific network stuff */
 int board_network_enable(struct mii_dev *bus)
 {
-	if (!of_machine_is_compatible("marvell,armada-3720-espressobin"))
+	if (!of_machine_is_compatible("globalscale,espressobin"))
 		return 0;
 
 	/*
@@ -300,7 +300,7 @@ int ft_board_setup(void *blob, struct bd_info *bd)
 	int part_off;
 
 	/* Fill SPI MTD partitions for Linux kernel on Espressobin */
-	if (!of_machine_is_compatible("marvell,armada-3720-espressobin"))
+	if (!of_machine_is_compatible("globalscale,espressobin"))
 		return 0;
 
 	spi_off = fdt_node_offset_by_compatible(blob, -1, "jedec,spi-nor");
-- 
2.28.0

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2020-10-14 13:20 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-04 15:33 [PATCH v2 1/3] arm64: dts: armada-3720-espressobin: use Linux model/compatible strings Andre Heider
2020-09-04 15:33 ` [PATCH v2 2/3] arm64: dts: armada-3720-espressobin: split common parts to .dtsi Andre Heider
2020-10-14  8:17   ` Stefan Roese
2020-09-04 15:33 ` [PATCH v2 3/3] arm64: dts: a3720: add support for espressobin with populated emmc Andre Heider
2020-09-09  9:16   ` Andre Heider
2020-09-10 18:04     ` Andre Heider
2020-10-14  8:17   ` Stefan Roese
2020-10-14  8:21     ` Pali Rohár
2020-10-14  8:37       ` Andre Heider
2020-10-14  8:45         ` Pali Rohár
2020-10-14 13:20           ` Pali Rohár
2020-10-02  5:51 ` [PATCH v3] arm64: dts: armada-3720-espressobin: use Linux model/compatible strings Andre Heider
2020-10-02 10:56   ` Pali Rohár
2020-10-07  4:57   ` Stefan Roese
2020-10-14  8:16   ` Stefan Roese
2020-10-02  5:50 Andre Heider

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.