Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751202AbdFBUJo (ORCPT ); Fri, 2 Jun 2017 16:09:44 -0400 Received: from mail-eopbgr50089.outbound.protection.outlook.com ([40.107.5.89]:63440 "EHLO EUR03-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750966AbdFBUJm (ORCPT ); Fri, 2 Jun 2017 16:09:42 -0400 From: Han Xu To: Stefan Agner CC: "shawnguo@kernel.org" , "kernel@pengutronix.de" , "dwmw2@infradead.org" , "computersforpeace@gmail.com" , "boris.brezillon@free-electrons.com" , "marek.vasut@gmail.com" , "richard@nod.at" , "cyrille.pitchen@atmel.com" , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "fabio.estevam@freescale.com" , "LW@KARO-electronics.de" , "linux-mtd@lists.infradead.org" , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v3 0/2] ARM: dts: imx7: add NAND support Thread-Topic: [PATCH v3 0/2] ARM: dts: imx7: add NAND support Thread-Index: AQHS2wwzmgrSToCjrEmtu4gBRPmgRqIQgSGAgABNcgCAATJygA== Date: Fri, 2 Jun 2017 20:09:38 +0000 Message-ID: <1dd0abe0-81a3-d4ea-69c1-98fe354f91f4@nxp.com> References: <20170601192044.6548-1-stefan@agner.ch> <3c086d95-96e5-71ec-b44f-12ed41903fcf@nxp.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: agner.ch; dkim=none (message not signed) header.d=none;agner.ch; dmarc=none action=none header.from=nxp.com; x-originating-ip: [192.88.168.49] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DBXPR04MB078;7:yhuSDKBQR4hDy6MzEYKAHQZ2HszpgrrJM+f+ak3fbQfcoaoq19L241xLV2NOLwLeqOoAjxWRv07QWCu19tTORuwtlrybQwUblfQaJhktha7zmrwSlukkvnPn1h5eJpADwU0vwy5Dc0uylqBsPSuy8klbZmsWjlyq+3cZF4zEKWRpgtWNpbPGNeveRaLAzQqxh0fPSoq+nEw/wY5eBol323vA4XFedYGhWpfwImgSYzdvkg47D8DxOLX+Pk/HUcnmul7djlEenqATUXQl4MHd+f/iA8GIsniKSsGz5ucPKrSvSH/1eWkjB51dhhbubLgha9DmrxLlswutRYHDkLgtvQ== x-ms-traffictypediagnostic: DBXPR04MB078: x-ms-office365-filtering-correlation-id: 7a353d30-edab-434f-d9b5-08d4a9f34beb x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254075)(48565401081)(201703131423075)(201703031133081)(201702281549075);SRVR:DBXPR04MB078; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(72170088055959)(189930954265078)(45079756050767); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(3002001)(93006095)(93001095)(10201501046)(6055026)(6041248)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123562025)(20161123560025)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:DBXPR04MB078;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:DBXPR04MB078; x-forefront-prvs: 03264AEA72 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(39410400002)(39400400002)(39850400002)(39860400002)(39450400003)(39840400002)(24454002)(377454003)(377424004)(36756003)(2900100001)(53936002)(6512007)(2906002)(54906002)(8676002)(14454004)(81166006)(81156014)(229853002)(66066001)(6486002)(6436002)(3660700001)(6506006)(33646002)(6306002)(99286003)(8936002)(3280700002)(6916009)(5250100002)(53546009)(25786009)(4326008)(76176999)(50986999)(54356999)(39060400002)(6246003)(7736002)(305945005)(110136004)(38730400002)(5660300001)(2950100002)(31686004)(3846002)(7416002)(189998001)(31696002)(86362001)(575784001)(478600001)(6116002)(102836003)(45080400002)(966005);DIR:OUT;SFP:1101;SCL:1;SRVR:DBXPR04MB078;H:DBXPR04MB080.eurprd04.prod.outlook.com;FPR:;SPF:None;MLV:ovrnspm;PTR:InfoNoRecords;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="Windows-1252" Content-ID: <04C6D6B187BD5F4AB360BAA5C8138663@eurprd04.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Jun 2017 20:09:38.0729 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBXPR04MB078 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v52K9m7x019665 Content-Length: 2465 Lines: 68 On 06/01/2017 08:48 PM, Stefan Agner wrote: > Hi Han, > > On 2017-06-01 14:14, Han Xu wrote: >> On 06/01/2017 02:20 PM, Stefan Agner wrote: >>> This are the missing device tree parts to add NAND support for i.MX 7. >>> See previous patchset: >>> https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flkml.org%2Flkml%2F2017%2F4%2F21%2F832&data=01%7C01%7Chan.xu%40nxp.com%7C3b9081a68c94476c4a2108d4a9235512%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0&sdata=mQ2aq5rW%2B9uADY5mSzFxk8P6bAVq%2BosPJQAi0PL9SQg%3D&reserved=0 >>> >>> The previous version also included driver changes, which are already >>> merged. >>> >>> -- >>> Stefan >>> >>> Changes since v2: >>> - Only specify IMX7D_NAND_USDHC_BUS_ROOT_CLK which seems to be sufficent >> Hi Stefan, sorry I didn't reply your last patch. I was unable to fully >> test on i.MX7 since the work bandwidth, but the quick test shows DMA >> cannot work WITHOUT IMX7D_NAND_ROOT_CLK on my side, I will fully check >> it tomorrow morning and let you know the result. > How did you test that? > > Since DMA can only use NAND in i.MX 7, testing is somewhat hard. > > Fact is, I can access DMA registers using just NAND_USDHC_BUS_CLK_ROOT > > mw.l 0x30388980 0x11000000 # Enable NAND_USDHC_BUS_CLK_ROOT > mw.l 0x3038aa00 0x00000000 # Enable NAND_CLK_ROOT NAND_ROOT_CLK offset is 0x4140 which control the CCGR20 to gate on/off the rawnand module, including APBH/GPMI/BCH. Without enabling it, the mxs-dma hangs during initialization. I guess this bit was enabled in some early stage. > md.l 0x33000100 0 # Access APBH_CH0_CURCMDAR > > This works for me. > > I can *boot* from a UBIFS using this driver and Linux 4.12-rc1 with my > patchset applied... > > Monitoring clocks in /sys/kernel/debug/clk/clk_summary show that > NAND_ROOT_CLK gets turned off and back on if NAND access happens, the > system seems stable. > > All that said, this patchset v3 actually does not remove the > NAND_ROOT_CLK as intended to. Will send a v4. > > -- > Stefan > >>> - Dropped driver changes, alreay merged >>> >>> Changes since v1: >>> - Make clks_count const >>> - Introduce IS_IMX7D for i.MX 7 SoC's and make it part of GPMI_IS_MX6 >>> >>> Stefan Agner (2): >>> ARM: dts: imx7: add GPMI NAND >>> ARM: dts: imx7-colibri: add NAND support >>> >>> arch/arm/boot/dts/imx7-colibri.dtsi | 9 +++++++++ >>> arch/arm/boot/dts/imx7s.dtsi | 31 +++++++++++++++++++++++++++++++ >>> 2 files changed, 40 insertions(+) >>>