From patchwork Fri Jul 10 07:18:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: miaoqing pan X-Patchwork-Id: 493666 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 9925C1402B8 for ; Fri, 10 Jul 2015 17:25:13 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=qti.qualcomm.com header.i=@qti.qualcomm.com header.b=yi1FaV0M; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 2BB1528A676; Fri, 10 Jul 2015 09:20:53 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,T_DKIM_INVALID, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 014EA2848D8 for ; Fri, 10 Jul 2015 09:18:50 +0200 (CEST) X-policyd-weight: using cached result; rate: -8.5 Received: from sabertooth01.qualcomm.com (sabertooth01.qualcomm.com [65.197.215.72]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Fri, 10 Jul 2015 09:18:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qti.qualcomm.com; i=@qti.qualcomm.com; q=dns/txt; s=qcdkim; t=1436512749; x=1468048749; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=ixRTA6X1EjuC9MC+wIZIQImSwSJ+IQaoTzdFCbalOoA=; b=yi1FaV0MV7YSxBoQe8tuBgE1bCir6IVwgNgLlydvF/TPy+cpxlCBleZ/ AZLVle5QMqNgOEl/s5UtkI0pteS2x2A+veygc2+Ks3BB2UCWK1HvaMYyj JgbMVmah0tGFzjuHjnN5P6KOfelZW5uZy3hVTd4fDhCZ/HQyR2RurquFs E=; X-IronPort-AV: E=McAfee;i="5700,7163,7857"; a="92419222" Received: from ironmsg03-l.qualcomm.com ([172.30.48.18]) by sabertooth01.qualcomm.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 10 Jul 2015 00:19:07 -0700 X-IronPort-AV: E=Sophos;i="5.15,445,1432623600"; d="scan'208";a="957583298" Received: from nasanexm01e.na.qualcomm.com ([10.85.0.31]) by Ironmsg03-L.qualcomm.com with ESMTP/TLS/RC4-SHA; 10 Jul 2015 00:19:00 -0700 Received: from qcmail1.qualcomm.com (10.80.80.8) by NASANEXM01E.na.qualcomm.com (10.85.0.31) with Microsoft SMTP Server (TLS) id 15.0.1076.9; Fri, 10 Jul 2015 00:18:58 -0700 Received: by qcmail1.qualcomm.com (sSMTP sendmail emulation); Fri, 10 Jul 2015 15:18:53 +0800 From: To: Date: Fri, 10 Jul 2015 15:18:45 +0800 Message-ID: <1436512726-6347-2-git-send-email-miaoqing@qti.qualcomm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1436512726-6347-1-git-send-email-miaoqing@qti.qualcomm.com> References: <1436512726-6347-1-git-send-email-miaoqing@qti.qualcomm.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01C.na.qualcomm.com (10.85.0.83) To NASANEXM01E.na.qualcomm.com (10.85.0.31) Subject: [OpenWrt-Devel] [PATCH 2/3] ar71xx: add support for the Giga Device spi nand chips X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" From: Miaoqing Pan Signed-off-by: Miaoqing Pan --- ...PS-ath79-add-giga-device-spi-nand-support.patch | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 target/linux/ar71xx/patches-3.18/916-MIPS-ath79-add-giga-device-spi-nand-support.patch diff --git a/target/linux/ar71xx/patches-3.18/916-MIPS-ath79-add-giga-device-spi-nand-support.patch b/target/linux/ar71xx/patches-3.18/916-MIPS-ath79-add-giga-device-spi-nand-support.patch new file mode 100644 index 0000000..ff366cc --- /dev/null +++ b/target/linux/ar71xx/patches-3.18/916-MIPS-ath79-add-giga-device-spi-nand-support.patch @@ -0,0 +1,40 @@ +--- a/drivers/mtd/nand/nand_ids.c ++++ b/drivers/mtd/nand/nand_ids.c +@@ -51,6 +51,19 @@ struct nand_flash_dev nand_flash_ids[] = { + SZ_8K, SZ_8K, SZ_2M, 0, 6, 640, NAND_ECC_INFO(40, SZ_1K), + 4 }, + ++ {"GD5F1GQ4U 1G 3.3V 8-bit", ++ { .id = {0xc8, 0xb1} }, ++ SZ_2K, SZ_128, SZ_128K, 0, 2, 128, NAND_ECC_INFO(4, SZ_512) }, ++ {"GD5F2GQ4U 2G 3.3V 8-bit", ++ { .id = {0xc8, 0xb2} }, ++ SZ_2K, SZ_256, SZ_128K, 0, 2, 128, NAND_ECC_INFO(4, SZ_512) }, ++ {"GD5F1GQ4R 1G 1.8V 8-bit", ++ { .id = {0xc8, 0xa1} }, ++ SZ_2K, SZ_128, SZ_128K, 0, 2, 128, NAND_ECC_INFO(4, SZ_512) }, ++ {"GD5F2GQ4R 2G 1.8V 8-bit", ++ { .id = {0xc8, 0xa2} }, ++ SZ_2K, SZ_256, SZ_128K, 0, 2, 128, NAND_ECC_INFO(4, SZ_512) }, ++ + LEGACY_ID_NAND("NAND 4MiB 5V 8-bit", 0x6B, 4, SZ_8K, SP_OPTIONS), + LEGACY_ID_NAND("NAND 4MiB 3,3V 8-bit", 0xE3, 4, SZ_8K, SP_OPTIONS), + LEGACY_ID_NAND("NAND 4MiB 3,3V 8-bit", 0xE5, 4, SZ_8K, SP_OPTIONS), +@@ -178,6 +191,7 @@ struct nand_manufacturers nand_manuf_ids[] = { + {NAND_MFR_EON, "Eon"}, + {NAND_MFR_SANDISK, "SanDisk"}, + {NAND_MFR_INTEL, "Intel"}, ++ {NAND_MFR_GIGADEVICE, "Giga Device"}, + {0x0, "Unknown"} + }; + +--- a/include/linux/mtd/nand.h ++++ b/include/linux/mtd/nand.h +@@ -720,6 +720,7 @@ struct nand_chip { + #define NAND_MFR_MICRON 0x2c + #define NAND_MFR_AMD 0x01 + #define NAND_MFR_MACRONIX 0xc2 ++#define NAND_MFR_GIGADEVICE 0xc8 + #define NAND_MFR_EON 0x92 + #define NAND_MFR_SANDISK 0x45 + #define NAND_MFR_INTEL 0x89