arm64: dts: armada-3720-espressobin: use Linux model/compatible strings
PATCH v2 1/3 arm64: dts: armada-3720-espressobin: use Linux model/compatible strings
Fix the actual board vendor and ease synching dts files from Linux.
--- arch/arm/dts/armada-3720-espressobin.dts | 4 ++-- board/Marvell/mvebu_armada-37xx/board.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
arch/arm/dts/armada-3720-espressobin.dts +2 -2
@@ -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";
board/Marvell/mvebu_armada-37xx/board.c +2 -2
@@ -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" );
Signature · 1 line
2.28.0
PATCH v2 2/3 arm64: dts: armada-3720-espressobin: split common parts to .dtsi
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.
---
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%)arch/arm/dts/armada-3720-espressobin.dts +20 -170
@@ -1,170 +1,20 @@ -/* - * Device Tree file for Marvell Armada 3720 community board - * (ESPRESSOBin) - * Copyright (C) 2016 Marvell - * - * Gregory CLEMENT <[email protected]> - * Konstantin Porotchkin <[email protected]> - * - * 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 = ð0; - 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>; - }; -}; - -ð0 { - 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 <[email protected]> + * + */ +/* + * 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"; +};
arch/arm/dts/armada-3720-espressobin.dtsi renamed from arch/arm/dts/armada-3720-espressobin.dts +0 -3
@@ -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"; };
Signature · 1 line
2.28.0
PATCH v2 2/3 arm64: dts: armada-3720-espressobin: split common parts to .dtsi
Quoted 6 lines · Andre Heider
Move most of the dts to the new common
armada-3720-espressobin.dtsifile, just like Linux, but keep the current, downstream based, version.The dts itself is imported from Linux.
Signed-off-by Andre Heider <[email protected]>
Applied to u-boot-marvell/master
Thanks,
Stefan
Quoted 212 lines
--- 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%)
copyarch/arm/dts/{armada-3720-espressobin.dts=>armada-3720-espressobin.dtsi} (96%)arch/arm/dts/armada-3720-espressobin.dts +20
-170@@ -1,170 +1,20 @@ -/* - * Device Tree file for Marvell Armada 3720 community board - * (ESPRESSOBin) - * Copyright (C) 2016 Marvell - * - * Gregory CLEMENT <[email protected]> - * Konstantin Porotchkin <[email protected]> - * - * 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 = ð0; - 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>; - }; -}; - -ð0 { - 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 <[email protected]> + * + */ +/* + * 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"; +};arch/arm/dts/armada-3720-espressobin.dtsi renamed from arch/arm/dts/armada-3720-espressobin.dts +0
-0
arch/arm/dts/armada-3720-espressobin.dtsi line 55
Quoted 9 lines
arch/arm/dts/armada-3720-espressobin.dtsi renamed from arch/arm/dts/armada-3720-espressobin.dts +0
-3@@ -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
Signature · 3 lines
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
PATCH v2 3/3 arm64: dts: a3720: add support for espressobin with populated emmc
In reply to Andre HeiderImport 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.
--- 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
arch/arm/dts/Makefile +1 -0
@@ -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 \
arch/arm/dts/armada-3720-espressobin-emmc.dts new file +44 -0
44 lines not on this page · raw message
doc/README.marvell +5 -2
@@ -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
Signature · 1 line
2.28.0
PATCH v2 3/3 arm64: dts: a3720: add support for espressobin with populated emmc
Quoted 5 lines · Andre Heider
Import
armada-3720-espressobin-emmc.dtsfrom 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 <[email protected]>
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
PATCH v2 3/3 arm64: dts: a3720: add support for espressobin with populated emmc
Quoted 7 lines · Andre Heider
Quoted 5 lines · Andre Heider
Import
armada-3720-espressobin-emmc.dtsfrom 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 <[email protected]>
Quoted 7 lines
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/
PATCH v2 3/3 arm64: dts: a3720: add support for espressobin with populated emmc
In reply to Andre HeiderQuoted 5 lines · Andre Heider
Import
armada-3720-espressobin-emmc.dtsfrom 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 <[email protected]>
Applied to u-boot-marvell/master
Thanks,
Stefan
Quoted 78 lines
--- 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.dtsarch/arm/dts/Makefile +1
-0@@ -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 \arch/arm/dts/armada-3720-espressobin-emmc.dts new file +44
-0@@ -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 <[email protected]> + * Konstantin Porotchkin <[email protected]> + * + */ +/* + * 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>; + }; +};doc/README.marvell +0
-0@@ -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.
doc/README.marvell Build Procedure · line 53
Quoted 10 lines
doc/README.marvell +5
-2- 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
Signature · 3 lines
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
PATCH v2 3/3 arm64: dts: a3720: add support for espressobin with populated emmc
Quoted 87 lines · On Wednesday 14 October 2020 10:17:45 Stefan Roese wrote:
Quoted 5 lines · Andre Heider
Import
armada-3720-espressobin-emmc.dtsfrom 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 <[email protected]>Applied to u-boot-marvell/master
Thanks,
StefanQuoted 75 lines
--- 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.dtsarch/arm/dts/Makefile +1
-0@@ -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 \arch/arm/dts/armada-3720-espressobin-emmc.dts new file +44
-0@@ -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 <[email protected]> + * Konstantin Porotchkin <[email protected]> + * + */ +/* + * 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>; + }; +};doc/README.marvell +0
-0@@ -43,8 +43,11 @@ Build Procedure In order to prevent this, the required device-tree MUST be set during compilation.
Quoted 8 lines
doc/README.marvell Build Procedure · line 50
Quoted 8 lines
doc/README.marvell +5
-2All 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.
Quoted 11 lines
doc/README.marvell Build Procedure · line 51
Quoted 2 lines
doc/README.marvell +0
-0# makeViele Gr??e,
StefanSignature · 3 lines
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
PATCH v2 3/3 arm64: dts: a3720: add support for espressobin with populated emmc
On 14/10/2020 10:21, Pali Roh?r wrote:
<snip>
Quoted 20 lines
Quoted 6 lines
Quoted 6 lines
doc/README.marvell +0
-0@@ -43,8 +43,11 @@ Build Procedure In order to prevent this, the required device-tree MUST be set during compilation.Quoted 8 lines
doc/README.marvell Build Procedure · line 50
Quoted 8 lines
doc/README.marvell +5
-2All 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_TREEvariable and therefore variant of Espressobin, as I stated in previous emails?
Quoted 2 lines
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
PATCH v2 3/3 arm64: dts: a3720: add support for espressobin with populated emmc
Quoted 24 lines · On Wednesday 14 October 2020 10:37:57 Andre Heider wrote:
On 14/10/2020 10:21, Pali Roh?r wrote:
<snip>
Quoted 20 lines
Quoted 6 lines
Quoted 6 lines
doc/README.marvell +0
-0@@ -43,8 +43,11 @@ Build Procedure In order to prevent this, the required device-tree MUST be set during compilation.Quoted 8 lines
doc/README.marvell Build Procedure · line 50
Quoted 8 lines
doc/README.marvell +5
-2All 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_TREEvariable and therefore variant of Espressobin, as I stated in previous emails?
Quoted 6 lines
Quoted 2 lines
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?
Quoted 2 lines
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.
Quoted 3 lines
Regards,
Andre
PATCH v2 3/3 arm64: dts: a3720: add support for espressobin with populated emmc
Quoted 47 lines · On Wednesday 14 October 2020 10:45:33 Pali Roh?r wrote:
Quoted 24 lines · On Wednesday 14 October 2020 10:37:57 Andre Heider wrote:
On 14/10/2020 10:21, Pali Roh?r wrote:
<snip>
Quoted 20 lines
Quoted 6 lines
Quoted 6 lines
doc/README.marvell +0
-0@@ -43,8 +43,11 @@ Build Procedure In order to prevent this, the required device-tree MUST be set during compilation.Quoted 8 lines
doc/README.marvell Build Procedure · line 50
Quoted 8 lines
doc/README.marvell +5
-2All 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_TREEvariable and therefore variant of Espressobin, as I stated in previous emails?Quoted 6 lines
Quoted 2 lines
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?
Quoted 2 lines
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.
Quoted 5 lines
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?
PATCH v3 1/1 arm64: dts: armada-3720-espressobin: use Linux model/compatible strings
In reply to Andre HeiderFix the actual board vendor and ease synching dts files from Linux.
---
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(-)
arch/arm/dts/armada-3720-espressobin.dts +2 -2
@@ -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";
board/Marvell/mvebu_armada-37xx/board.c +4 -4
@@ -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" );
Signature · 1 line
2.28.0
PATCH v3 1/1 arm64: dts: armada-3720-espressobin: use Linux model/compatible strings
CCing Heinrich, I think you should be interested in this patch.
Quoted 3 lines · 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 <[email protected]>
Quoted 64 lines
---
v3: rebase on masterarch/arm/dts/armada-3720-espressobin.dts | 4 ++-- board/Marvell/mvebu_armada-37xx/board.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-)arch/arm/dts/armada-3720-espressobin.dts +2
-2@@ -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";board/Marvell/mvebu_armada-37xx/board.c +4
-4@@ -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" );Signature · 1 line
2.28.0
PATCH v3 1/1 arm64: dts: armada-3720-espressobin: use Linux model/compatible strings
In reply to Andre HeiderQuoted 3 lines · Andre Heider
Fix the actual board vendor and ease synching dts files from Linux.
Signed-off-by Andre Heider <[email protected]>
Thanks,
Stefan
Quoted 54 lines
---
v3: rebase on masterarch/arm/dts/armada-3720-espressobin.dts | 4 ++-- board/Marvell/mvebu_armada-37xx/board.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-)arch/arm/dts/armada-3720-espressobin.dts +2
-2@@ -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";board/Marvell/mvebu_armada-37xx/board.c +3
-3@@ -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 ;/*
board/Marvell/mvebu_armada-37xx/board.c int ft_board_setup(void *blob, struct bd_info *bd) · line 306
Quoted 8 lines
board/Marvell/mvebu_armada-37xx/board.c +1
-1@@ -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
Signature · 3 lines
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
PATCH v3 1/1 arm64: dts: armada-3720-espressobin: use Linux model/compatible strings
In reply to Andre HeiderQuoted 5 lines · Andre Heider
Fix the actual board vendor and ease synching dts files from Linux.
Signed-off-by Andre Heider <[email protected]>---
v3: rebase on master
Applied to u-boot-marvell/master
Thanks,
Stefan
Quoted 51 lines
arch/arm/dts/armada-3720-espressobin.dts | 4 ++-- board/Marvell/mvebu_armada-37xx/board.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-)arch/arm/dts/armada-3720-espressobin.dts +2
-2@@ -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";board/Marvell/mvebu_armada-37xx/board.c +3
-3@@ -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 ;/*
board/Marvell/mvebu_armada-37xx/board.c int ft_board_setup(void *blob, struct bd_info *bd) · line 306
Quoted 8 lines
board/Marvell/mvebu_armada-37xx/board.c +1
-1@@ -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
Signature · 3 lines
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