From patchwork Mon Aug 10 17:52:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 1343018 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=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=fw-web.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=mailerdienst.de header.i=@mailerdienst.de header.a=rsa-sha256 header.s=20200217 header.b=dRL7+InB; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BQNq80pHtz9sPB for ; Tue, 11 Aug 2020 03:53:05 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5B808821F3; Mon, 10 Aug 2020 19:52:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=fw-web.de 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=mailerdienst.de header.i=@mailerdienst.de header.b="dRL7+InB"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DBC7A821D0; Mon, 10 Aug 2020 19:52:53 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mxwww.masterlogin.de (mxwww.masterlogin.de [IPv6:2a03:2900:1:1::b]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id CCDD981B50 for ; Mon, 10 Aug 2020 19:52:50 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=fw-web.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=linux@fw-web.de Received: from mxout1.routing.net (unknown [192.168.10.81]) by forward.mxwww.masterlogin.de (Postfix) with ESMTPS id 342BD963F8; Mon, 10 Aug 2020 17:52:50 +0000 (UTC) Received: from mxbox1.masterlogin.de (unknown [192.168.10.88]) by mxout1.routing.net (Postfix) with ESMTP id 084A83FF80; Mon, 10 Aug 2020 17:52:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1597081970; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=8OUT9QKWTM+1s/rvWZCfVYD9cCHyIwWe6CNqXRy8obc=; b=dRL7+InBlmF2OFwk8raNppdZJttlVhKl7jCZR38GBwv9fSjMbUg0WDzVam2fy7y5DImZf9 ukyJc3CsKgFaVW/NIRfAvFckwgwjcmfGYmnesOe1YT+qDsOr0HYiafx9z+dVlLCjmPNkH2 GtA22aSQQIvDgRSGhj06Qe9ShK41agQ= Received: from localhost.localdomain (fttx-pool-217.61.151.249.bambit.de [217.61.151.249]) by mxbox1.masterlogin.de (Postfix) with ESMTPSA id 43C9C40249; Mon, 10 Aug 2020 17:52:49 +0000 (UTC) From: Frank Wunderlich To: u-boot@lists.denx.de Cc: Frank Wunderlich , GSS_MTK_Uboot_upstream , Ryder Lee , Weijie Gao , Lukasz Majewski Subject: [PATCH v2 0/5] add SATA/AHCI support for BananaPi R64 Date: Mon, 10 Aug 2020 19:52:34 +0200 Message-Id: <20200810175239.8564-1-linux@fw-web.de> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.3 at phobos.denx.de X-Virus-Status: Clean From: Frank Wunderlich BananaPi R64 has an SATA socket where an HDD can be connected. I have ported Linux Driver to Uboot and can access my harddrive BPI-R64> scsi scan scanning bus for devices... Target spinup took 0 ms. AHCI 0001.0300 32 slots 1 ports 6 Gbps 0x1 impl SATA mode flags: ncq stag pm clo only pmp pio slum part ccc apst Device 0: (0:0) Vendor: ATA Prod.: ST750LM022 HN-M7 Rev: 2AR1 Type: Hard Disk Capacity: 715404.8 MB = 698.6 GB (1465149168 x 512) BPI-R64> ls scsi 0:1 EFI/ 512 BOOTSECT.BAK 1 file(s), 1 dir(s) BPI-R64> this Series is based on 2020.10-rc1 + mt7622 PCIe series [1] + R64 DTS [2] [1] https://patchwork.ozlabs.org/project/uboot/list/?series=194888 [2] https://patchwork.ozlabs.org/project/uboot/list/?series=194922 v1->v2: fix coding styles reported by checkpatch.pl Frank Wunderlich (5): arm: dts: mt7622: add SATA reset constants phy: mtk-tphy: add PHY_TYPE_SATA reset: add basic reset controller for pciesys ahci: mediatek: add ahci driver dts: r64: add sata- and asm_sel nodes arch/arm/dts/mt7622-bpi-r64.dts | 9 ++ arch/arm/dts/mt7622.dtsi | 32 ++++ drivers/ata/Kconfig | 8 + drivers/ata/Makefile | 1 + drivers/ata/mtk_ahci.c | 196 +++++++++++++++++++++++ drivers/clk/mediatek/clk-mt7622.c | 15 ++ drivers/phy/phy-mtk-tphy.c | 105 ++++++++++++ include/dt-bindings/reset/mt7629-reset.h | 5 +- 8 files changed, 370 insertions(+), 1 deletion(-) create mode 100644 drivers/ata/mtk_ahci.c