From patchwork Mon May 4 06:08:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Vollmer X-Patchwork-Id: 244975 List-Id: U-Boot discussion From: peter.vollmer at gmail.com (Peter Vollmer) Date: Mon, 4 May 2020 08:08:25 +0200 Subject: [PATCH 1/2] arm64: armada-37xx: dts: sync armada-3720-espressobin.dts with u-boot-marvell Message-ID: from https://github.com/MarvellEmbeddedProcessors/u-boot-marvell/blob/u-boot-2018.03-armada-18.12/arch/arm/dts/armada-3720-espressobin.dts fix comphy mode settings for USB3 (working) fix comphy mode setting for network (working) fix comphy mode setting for SATA (not yet working) add config for SD card (working) add voltage regulator for SDHC/SDXC SD cards (not yet tested) add config for EMMC flash (working) Signed-off-by: Peter Vollmer --- arch/arm/dts/armada-3720-espressobin.dts | 49 +++++++++++++++++++++--- 1 file changed, 44 insertions(+), 5 deletions(-) -- 2.20.1 diff --git a/arch/arm/dts/armada-3720-espressobin.dts b/arch/arm/dts/armada-3720-espressobin.dts index 84e2c2adba..393feb0c23 100644 --- a/arch/arm/dts/armada-3720-espressobin.dts +++ b/arch/arm/dts/armada-3720-espressobin.dts @@ -67,23 +67,34 @@ 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-speed = ; + phy-type = ; + phy-speed = ; }; phy1 { - phy-type = ; - phy-speed = ; + phy-type = ; + phy-speed = ; }; phy2 { phy-type = ; - phy-speed = ; + phy-speed = ; }; }; @@ -110,6 +121,34 @@ status = "okay"; }; +/* SD card */ +&sdhci0 { + pinctrl-names = "default"; + pinctrl-0 = <&sdio_pins>; + bus-width = <4>; + vqmmc-supply = <&vcc_sd_reg0>; + status = "okay"; +}; + +/* enable if EMMC present on board */ +&sdhci1 { + non-removable; + bus-width = <8>; + mmc-ddr-1_8v; + mmc-hs400-1_8v; + 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>; + }; +}; + &spi0 { status = "okay"; pinctrl-names = "default"; From patchwork Mon May 4 06:08:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Vollmer X-Patchwork-Id: 244976 List-Id: U-Boot discussion From: peter.vollmer at gmail.com (Peter Vollmer) Date: Mon, 4 May 2020 08:08:49 +0200 Subject: [PATCH 2/2] arm64: armada-37xx: espressobin: enable SD card and network Message-ID: activate MMC_BROKEN_CD because drivers/mmc/mvebu_mmc.c does not yet follow the driver model, so the card detection GPIO is not polled. activate network switch, tested with bootp and random MAC generation Signed-off-by: Peter Vollmer --- configs/mvebu_espressobin-88f3720_defconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.20.1 diff --git a/configs/mvebu_espressobin-88f3720_defconfig b/configs/mvebu_espressobin-88f3720_defconfig index 01b6120149..71ff2cee99 100644 --- a/configs/mvebu_espressobin-88f3720_defconfig +++ b/configs/mvebu_espressobin-88f3720_defconfig @@ -48,14 +48,16 @@ CONFIG_DM_MMC=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_SDMA=y CONFIG_MMC_SDHCI_XENON=y +CONFIG_MMC_BROKEN_CD=y CONFIG_MTD=y CONFIG_SF_DEFAULT_MODE=0 CONFIG_SPI_FLASH_MACRONIX=y CONFIG_SPI_FLASH_SPANSION=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_SPI_FLASH_WINBOND=y +CONFIG_MVNETA=y +CONFIG_NET_RANDOM_ETHADDR=y CONFIG_PHYLIB=y -CONFIG_PHY_MARVELL=y CONFIG_PHY_GIGE=y CONFIG_E1000=y CONFIG_PCI=y