From patchwork Fri Mar 27 04:41:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen-Yu Tsai X-Patchwork-Id: 1262543 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=default header.b=c59OAhfh; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48pTjV52FWz9sR4 for ; Fri, 27 Mar 2020 15:42:22 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 90AB88185A; Fri, 27 Mar 2020 05:42:19 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="c59OAhfh"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0A9C5818B8; Fri, 27 Mar 2020 05:41:54 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 521958188C for ; Fri, 27 Mar 2020 05:41:45 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=wens@kernel.org Received: from wens.tw (mirror2.csie.ntu.edu.tw [140.112.30.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 571AA2071B; Fri, 27 Mar 2020 04:41:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585284103; bh=sgqODdEQ64mhZ+EmUK/Ah0OxRLE41iAXVQndAxhQpnM=; h=From:To:Cc:Subject:Date:From; b=c59OAhfhTChEUK+CRY8YhoozrVV+yaM2jnTZLQkT2Br1f/DeEeuPBy/8xmMZ6tvLN CsXXamPDP26uGBbJfBhpwfvbT84b3Wj0e9aGtI/603d7jcQTFUJkwu9y8Uw4KDLQux pij12WCQ6nuIK9CHB14xYy3lUh2K1YVtMScQ2RxQ= Received: by wens.tw (Postfix, from userid 1000) id C61235FD2A; Fri, 27 Mar 2020 12:41:39 +0800 (CST) From: Chen-Yu Tsai To: u-boot@lists.denx.de, Kever Yang , Simon Glass , Philipp Tomsich Cc: Chen-Yu Tsai , Kurt Miller , Loic Devulder , Peter Geis Subject: [PATCH 0/6] rockchip: rk3328: sync dts and add ROC-RK3328-CC board Date: Fri, 27 Mar 2020 12:41:24 +0800 Message-Id: <20200327044130.8763-1-wens@kernel.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean From: Chen-Yu Tsai Hi everyone, This series adds proper support for Firefly / Libre Computer ROC-RK3328-CC single board computer. The ROC-RK3328-CC from Firefly and Libre Computer Project is a credit card size development board based on the Rockchip RK3328 SoC, with: - 1/2/4 GB DDR4 DRAM - eMMC connector for optional module - micro SD card slot - 1 x USB 3.0 host port - 2 x USB 2.0 host port - 1 x USB 2.0 OTG port - HDMI video output - TRRS connector with audio and composite video output - gigabit Ethernet - consumer IR receiver - debug UART pins Originally I started with Loic's patches, and syncing the device tree files from Linux. That didn't get very far, with SPL failing to detect the SD card. Examining the schematics and internal state of GRF and GPIOs, I realized that the logic for the SD card power enable switch is opposite that of what the SD card controller's SDMMC0_PWREN pin would use. Instead, directly using the GPIO is required. Thus this series creates a special target for this board to handle muxing this specific pin to GPIO state. The GPIO is left in input mode, letting the external pull-down work its magic. Along the way, there are some clean-ups of existing dts files, moving U-boot only features to -u-boot.dtsi files, and then a wholesale sync from Linux. Only boards already existing in U-boot are synced. DT binding header files are synced separately as there is already one patch floating around. The DT sync also includes clean-up changes only recently posted, and likely won't make it in for at least a few weeks. Please have a look, and test if possible. I cc-ed a couple people that showed interest in this board on mailing lists recently. Regards ChenYu Chen-Yu Tsai (6): rockchip: dts: rk3328-evb: Move vcc5v0-host-xhci-drv to -u-boot.dtsi rockchip: dts: rk3328-evb: Move gmac2io related nodes to -u-boot.dtsi dt-bindings: clock: rk3328: sync from upstream Linux kernel dt-bindings: power: rk3328-power: sync from upstream Linux kernel rockchip: dts: rk3328: Sync device tree files from Linux rockchip: rk3328: Add support for ROC-RK3328-CC board arch/arm/dts/Makefile | 1 + arch/arm/dts/rk3328-evb-u-boot.dtsi | 39 + arch/arm/dts/rk3328-evb.dts | 220 +-- arch/arm/dts/rk3328-roc-cc-u-boot.dtsi | 17 + .../{rk3328-rock64.dts => rk3328-roc-cc.dts} | 135 +- arch/arm/dts/rk3328-rock64.dts | 132 +- arch/arm/dts/rk3328.dtsi | 1420 +++++++++++------ arch/arm/mach-rockchip/rk3328/Kconfig | 8 + board/firefly/roc-cc-rk3328/Kconfig | 24 + board/firefly/roc-cc-rk3328/MAINTAINERS | 7 + board/firefly/roc-cc-rk3328/Makefile | 1 + board/firefly/roc-cc-rk3328/board.c | 38 + configs/roc-cc-rk3328_defconfig | 97 ++ doc/README.rockchip | 4 +- include/dt-bindings/clock/rk3328-cru.h | 212 +-- include/dt-bindings/power/rk3328-power.h | 19 + 16 files changed, 1622 insertions(+), 752 deletions(-) create mode 100644 arch/arm/dts/rk3328-roc-cc-u-boot.dtsi copy arch/arm/dts/{rk3328-rock64.dts => rk3328-roc-cc.dts} (68%) create mode 100644 board/firefly/roc-cc-rk3328/Kconfig create mode 100644 board/firefly/roc-cc-rk3328/MAINTAINERS create mode 100644 board/firefly/roc-cc-rk3328/Makefile create mode 100644 board/firefly/roc-cc-rk3328/board.c create mode 100644 configs/roc-cc-rk3328_defconfig create mode 100644 include/dt-bindings/power/rk3328-power.h