From patchwork Tue May 29 21:13:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Walle X-Patchwork-Id: 922392 X-Patchwork-Delegate: sr@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=walle.cc Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=walle.cc header.i=@walle.cc header.b="ux0zKP/Q"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40wRLN3JCYz9s0q for ; Wed, 30 May 2018 07:14:20 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id B90EBC21DB5; Tue, 29 May 2018 21:13:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 94DCAC21DB5; Tue, 29 May 2018 21:13:30 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 22D63C21BE5; Tue, 29 May 2018 21:13:29 +0000 (UTC) Received: from ssl.serverraum.org (ssl.serverraum.org [213.133.101.245]) by lists.denx.de (Postfix) with ESMTPS id B0A74C21C27 for ; Tue, 29 May 2018 21:13:28 +0000 (UTC) Received: from thanatos.fritz.box (unknown [IPv6:2a02:810c:c200:2e91:56be:f7ff:fe37:9af7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id 3E8BA22DE6; Tue, 29 May 2018 23:13:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1527628408; bh=uy/IqVu5OkXbHJtInDVkyTChDTLNBE12w7irtnT2Wxc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ux0zKP/QFZFknUsXhRx9S/Q2iFh21525IH+ml4D8RfIFhwd+yOrj+G+iX9ScXBbgN g3glMUIR8SSNpXlY+06Isu1pqcK07FtlsPAXQJ7TprOyk0bEyM4PuLxVMnN0cjb1Wb lezea3uhJtXyS/zN4mmjyhnAK7x/OP1hyVAobPr4= From: Michael Walle To: u-boot@lists.denx.de Date: Tue, 29 May 2018 23:13:20 +0200 Message-Id: <20180529211320.10257-2-michael@walle.cc> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180529211320.10257-1-michael@walle.cc> References: <20180529211320.10257-1-michael@walle.cc> X-Virus-Scanned: clamav-milter 0.99.4 at web X-Virus-Status: Clean Cc: Stefan Roese , Prafulla Wadaskar , Luka Perkov Subject: [U-Boot] [RFC PATCH 2/2] arm: kirkwood: lsxl: Add SPI driver model support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This patch shows how to enable driver model support for the LS-CHLv2 and LS-XHL boards. There are a couple of open questions: - do I need the u-boot,dm-pre-reloc tags in the device tree? - should mach/config.h define CONFIG_DM_SEQ_ALIAS? - how can we split this patch or are there any other pending patches which does the same and I didn't catch these. This patch is based on the http://git.denx.de/u-boot-marvell.git (master branch) and needs the following patches, which are still pending: https://patchwork.ozlabs.org/patch/909618/ https://patchwork.ozlabs.org/patch/909617/ https://patchwork.ozlabs.org/patch/909973/ Signed-off-by: Michael Walle Tested-by: Michael Walle --- arch/arm/dts/kirkwood-lsxl.dtsi | 4 ++++ arch/arm/mach-kirkwood/include/mach/config.h | 1 - configs/lschlv2_defconfig | 3 +++ configs/lsxhl_defconfig | 3 +++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/arch/arm/dts/kirkwood-lsxl.dtsi b/arch/arm/dts/kirkwood-lsxl.dtsi index 92b11c75b8..479a750d1d 100644 --- a/arch/arm/dts/kirkwood-lsxl.dtsi +++ b/arch/arm/dts/kirkwood-lsxl.dtsi @@ -8,6 +8,10 @@ stdout-path = &uart0; }; + aliases { + spi0 = &spi0; + }; + ocp@f1000000 { pinctrl: pin-controller@10000 { pmx_power_hdd: pmx-power-hdd { diff --git a/arch/arm/mach-kirkwood/include/mach/config.h b/arch/arm/mach-kirkwood/include/mach/config.h index 98639114db..d2dc1c2e68 100644 --- a/arch/arm/mach-kirkwood/include/mach/config.h +++ b/arch/arm/mach-kirkwood/include/mach/config.h @@ -59,7 +59,6 @@ * SPI Flash configuration */ #ifdef CONFIG_CMD_SF -#define CONFIG_HARD_SPI 1 #ifndef CONFIG_ENV_SPI_BUS # define CONFIG_ENV_SPI_BUS 0 #endif diff --git a/configs/lschlv2_defconfig b/configs/lschlv2_defconfig index f2763221a1..23e57e61c5 100644 --- a/configs/lschlv2_defconfig +++ b/configs/lschlv2_defconfig @@ -23,14 +23,17 @@ CONFIG_CMD_USB=y CONFIG_OF_CONTROL=y CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_NET_RANDOM_ETHADDR=y +CONFIG_DM=y CONFIG_MVSATA_IDE=y # CONFIG_MMC is not set +CONFIG_DM_SPI_FLASH=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_NETDEVICES=y CONFIG_MVGBE=y CONFIG_SYS_NS16550=y CONFIG_SPI=y +CONFIG_DM_SPI=y CONFIG_KIRKWOOD_SPI=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y diff --git a/configs/lsxhl_defconfig b/configs/lsxhl_defconfig index b523b68284..73e13d0880 100644 --- a/configs/lsxhl_defconfig +++ b/configs/lsxhl_defconfig @@ -23,14 +23,17 @@ CONFIG_CMD_USB=y CONFIG_OF_CONTROL=y CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_NET_RANDOM_ETHADDR=y +CONFIG_DM=y CONFIG_MVSATA_IDE=y # CONFIG_MMC is not set +CONFIG_DM_SPI_FLASH=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_NETDEVICES=y CONFIG_MVGBE=y CONFIG_SYS_NS16550=y CONFIG_SPI=y +CONFIG_DM_SPI=y CONFIG_KIRKWOOD_SPI=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y