Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1791907ybn; Thu, 26 Sep 2019 02:14:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqybNQiQzTwKJtcaoJqzvjsK8MwiHDW3pF/2Btk1Pt3r5oRfRHbHQaQO+UeN1BbYtXtO4bQQ X-Received: by 2002:aa7:c34b:: with SMTP id j11mr2375753edr.245.1569489246114; Thu, 26 Sep 2019 02:14:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1569489246; cv=pass; d=google.com; s=arc-20160816; b=bNAIHTc/l2XlxPOrWVj5xjLWSvVLcKN4VV6KpsVG07naRzAtM2igw0FJcYw4LX6zXX evCtUmiRkVYQlS2DTITWzfteITrneoRe3J7PCDLVAx9yp+sxqUaZ4lD5P3sDzHocrrAX vnLkaateReAuhdzuKr/ktmZYIIjKguCjiKIoFC4L+lJM93Qcv42vQ12CTumRQdF7ZULH byrTAIHiTv1weJj/3ELf1F00DsvxoIjz8U8tqaoIGf5H/gWV+59Fa6yj/yUK1urhrIx0 Iyw1NyvARk6RV1CbN6okvEqkgxEPFcLWxaokSMN8G/fgd8/ojB3PDHrFY2Vy0SLSsfuN 33tw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=7bNViU+H4OT41P5xc4/eS9rZMyylBGXYUnt0p+fNMaM=; b=iTZqsMQEA8ORL+kVvYoPaJyEGRi/ozlYgKZIKwmXrBq2wM9yL6o/GHrThQoZ7sq+bh E3o+q85JDHHpFN2cUxhVK3qVuSC6OW97tJINu5jD5yb5wS3Wjt034LQO91le5vCtR1cD NueGFP8N3xhKxboL/k/NeJ17XyqDXKhKtwDS2Tzgbpt/PXeUxNtssUH0bNYuCFw7Z/cX tiUqpMbSA3E4hkynRMGf82MvfHJl/4C3lSP2EeNmVwywpeIj+ELo6DryDSgmBYEFgPiA ImTc9ucmwQDRyU/e/NLlusgRTqDWDuOD5hqiC4U8MqV22PzOgY+LBZn+0iXUaEtyTpB4 D1DA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=qmAZ0rtw; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k1si693672ejj.174.2019.09.26.02.13.42; Thu, 26 Sep 2019 02:14:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=qmAZ0rtw; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2633920AbfIYEVG (ORCPT + 99 others); Wed, 25 Sep 2019 00:21:06 -0400 Received: from mail-eopbgr40087.outbound.protection.outlook.com ([40.107.4.87]:38907 "EHLO EUR03-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2393276AbfIYEVF (ORCPT ); Wed, 25 Sep 2019 00:21:05 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=E1t+EWkSuOQNyJu+gTesN+AA092Mj2qMuYFxEpTmYhzQ6FyqZQii0teQ5WKY9YU8YfdvRFRSPqCqwy6iUo3W9PK3arIxqAJvkcAWx51Q/Jqjq2OZrKQ61YKkmX5Q6eaKh0WQ6EjK9VK2hNIsEyUQ8D+0y9rhnF9xVoGppDuo2o6ABBEcqA22XWunG5bWb0IKzx8hiv10dLRPqJWbGZI9d9q2gaGXLw7sBFZXE96kkegwNnyK5JHU9d1gmjVS6qirqlCzXZ2lAJctQuteey/0574DcjnnTZMLXDuzcWdBhJIIJj29xfXEm9JdlwxrNXMhnB2gITEjr5jzzstHr2T0EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7bNViU+H4OT41P5xc4/eS9rZMyylBGXYUnt0p+fNMaM=; b=WFd77ANpSopNXs2nWWQu0AD2qvyN004VLbTgHgDLUNuSPt/tJLbXDoIr19VOh6G1rHOk3pHzqLFaitJkMf8FukCQNXKxwXuBA21LmZe2S8d5wz2YoANIWFA7XI/nG7Wr/cfDTGmy4anoVt9WEKhcxXq5ffl79gtaZYpo1r5ZC6QjhZqZZdzO1mYYDoVVwEngsoYrkomGgYunkSIXXaBNkvoj3fmK7lEeuyuwmIuF1//je2UEsVYaXAx3576XJkTmkijHKxnCaAXH6X+jHxvJBiVfnJfCZgKBiWGLI5XR6ykmXB6jLiFtt/TjZL6FvpatJ7hBpn3kydJKnSbzvHfs+w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7bNViU+H4OT41P5xc4/eS9rZMyylBGXYUnt0p+fNMaM=; b=qmAZ0rtwE3EBZcabCJpiBIgv7XFcgUoKZRwu1vcfA5sKlwIDEYjvpvsr6VlBXC3/FUTT/VPsageMPIB3EicF+iWgKzr/crxOOhd0sE7do6vUhzmYUXHCfiEaA8UMVGZ/5oVQk3JeKZGofymxLFMi9C+WcZyTISkvwr0QRGzzB78= Received: from DB7PR04MB4490.eurprd04.prod.outlook.com (52.135.138.150) by DB7PR04MB4220.eurprd04.prod.outlook.com (52.135.131.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2284.20; Wed, 25 Sep 2019 04:21:01 +0000 Received: from DB7PR04MB4490.eurprd04.prod.outlook.com ([fe80::4427:96f2:f651:6dfa]) by DB7PR04MB4490.eurprd04.prod.outlook.com ([fe80::4427:96f2:f651:6dfa%5]) with mapi id 15.20.2284.023; Wed, 25 Sep 2019 04:21:00 +0000 From: Biwen Li To: Leo Li , "shawnguo@kernel.org" , "robh+dt@kernel.org" , "mark.rutland@arm.com" , Ran Wang CC: "linuxppc-dev@lists.ozlabs.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" Subject: RE: [v3,3/3] Documentation: dt: binding: fsl: Add 'fsl,ippdexpcr-alt-addr' property Thread-Topic: [v3,3/3] Documentation: dt: binding: fsl: Add 'fsl,ippdexpcr-alt-addr' property Thread-Index: AQHVcoOnab7d5ysBNkWsXmY0PrfSuKc6/L+AgAC3JZCAAAkFAIAAANMggAABmICAAAIKMIAAAb8AgAACHkCAAAZAMA== Date: Wed, 25 Sep 2019 04:21:00 +0000 Message-ID: References: <20190924024548.4356-1-biwen.li@nxp.com> <20190924024548.4356-3-biwen.li@nxp.com> In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=biwen.li@nxp.com; x-originating-ip: [119.31.174.73] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4dddadb6-cadb-4864-3d9c-08d7416fc5ae x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600167)(711020)(4605104)(1401327)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020);SRVR:DB7PR04MB4220; x-ms-traffictypediagnostic: DB7PR04MB4220:|DB7PR04MB4220: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6790; x-forefront-prvs: 01713B2841 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(4636009)(346002)(396003)(136003)(366004)(39860400002)(376002)(189003)(199004)(74316002)(26005)(305945005)(52536014)(7736002)(33656002)(66476007)(229853002)(64756008)(3846002)(66446008)(2906002)(86362001)(76116006)(66946007)(14444005)(5660300002)(25786009)(478600001)(6116002)(256004)(110136005)(14454004)(66066001)(476003)(71190400001)(55016002)(11346002)(9686003)(71200400001)(4326008)(99286004)(486006)(54906003)(2940100002)(81156014)(44832011)(6506007)(2501003)(6246003)(316002)(186003)(102836004)(446003)(8676002)(7696005)(8936002)(66556008)(6636002)(6436002)(81166006)(76176011)(142933001);DIR:OUT;SFP:1101;SCL:1;SRVR:DB7PR04MB4220;H:DB7PR04MB4490.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: GC8hJbU44SOz2jrg8HjT4lOVgwasMQGrqN1cktwoQuRJLQ0lCkNzdNz10cvkGabzFIKbqLT/C7T2p9CPFNnuQrs1FSybz4UnN5RrcDfPho41gT/DrPmNCMnTsiTFZTyp5r7ddhTD7+Pwbmf5tbZu+LFcy/0rlfDb7OxzxDFnD/3lYK0xzPmjBHcBpAlk7+f2w1i8lyUmQ0xn2gSWPbQfET4w6/oIg0lQmr1/E06CIkeM4Aih73fLf6QrhO6RJDdFYr0UvrShMwJvfN4iC3wNDvWAizyC2cqY55O1FHKmBC+buKe+7/ozDT4Xe7uwnWwSXVkzD3MkdAunAkcdr7Z8Nk5Pnxc0jLItTbWaTN4OWkvRd8GLzxm9Bj4qlTqhrwmLSOryHe5scg/oXC+OZ0PtmYyCfwwQBKGJZ6VJ8oCIJvI= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4dddadb6-cadb-4864-3d9c-08d7416fc5ae X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Sep 2019 04:21:00.8411 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: a+1pcrM7oEO4ET9TkuPrI3cCiFdkMCe5PXaMfVtKn6Ae2vYbGrX4/C9zWkPrZWueFxBXb1YCQzufeV+CYH6rqA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4220 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > > > > > > > > > > > > > > > > > > > > The 'fsl,ippdexpcr-alt-addr' property is used to handle > > > > > > > > > an errata > > > > > > > > > A-008646 on LS1021A > > > > > > > > > > > > > > > > > > Signed-off-by: Biwen Li > > > > > > > > > --- > > > > > > > > > Change in v3: > > > > > > > > > - rename property name > > > > > > > > > fsl,rcpm-scfg -> fsl,ippdexpcr-alt-addr > > > > > > > > > > > > > > > > > > Change in v2: > > > > > > > > > - update desc of the property 'fsl,rcpm-scfg' > > > > > > > > > > > > > > > > > > Documentation/devicetree/bindings/soc/fsl/rcpm.txt | 14 > > > > > > > > > ++++++++++++++ > > > > > > > > > 1 file changed, 14 insertions(+) > > > > > > > > > > > > > > > > > > diff --git > > > > > > > > > a/Documentation/devicetree/bindings/soc/fsl/rcpm.txt > > > > > > > > > b/Documentation/devicetree/bindings/soc/fsl/rcpm.txt > > > > > > > > > index 5a33619d881d..157dcf6da17c 100644 > > > > > > > > > --- a/Documentation/devicetree/bindings/soc/fsl/rcpm.txt > > > > > > > > > +++ b/Documentation/devicetree/bindings/soc/fsl/rcpm.txt > > > > > > > > > @@ -34,6 +34,11 @@ Chassis Version Example > > > Chips > > > > > > > > > Optional properties: > > > > > > > > > - little-endian : RCPM register block is Little Endian. > > > > > > > > > Without it > > > > RCPM > > > > > > > > > will be Big Endian (default case). > > > > > > > > > + - fsl,ippdexpcr-alt-addr : Must add the property for > > > > > > > > > + SoC LS1021A, > > > > > > > > > > > > > > > > You probably should mention this is related to a hardware > > > > > > > > issue on LS1021a and only needed on LS1021a. > > > > > > > Okay, got it, thanks, I will add this in v4. > > > > > > > > > > > > > > > > > + Must include n + 1 entries (n =3D > > > > > > > > > + #fsl,rcpm-wakeup-cells, such > > as: > > > > > > > > > + #fsl,rcpm-wakeup-cells equal to 2, then must include > > > > > > > > > + 2 > > > > > > > > > + + > > > > > > > > > + 1 > > > > entries). > > > > > > > > > > > > > > > > #fsl,rcpm-wakeup-cells is the number of IPPDEXPCR > > > > > > > > registers on an > > > > SoC. > > > > > > > > However you are defining an offset to scfg registers here. > > > > > > > > Why these two are related? The length here should > > > > > > > > actually be related to the #address-cells of the soc/. > > > > > > > > But since this is only needed for LS1021, you can > > > > > > > just make it 3. > > > > > > > I need set the value of IPPDEXPCR resgiters from ftm_alarm0 > > > > > > > device node(fsl,rcpm-wakeup =3D <&rcpm 0x0 0x20000000>; > > > > > > > 0x0 is a value for IPPDEXPCR0, 0x20000000 is a value for > > > > IPPDEXPCR1). > > > > > > > But because of the hardware issue on LS1021A, I need store > > > > > > > the value of IPPDEXPCR registers to an alt address. So I > > > > > > > defining an offset to scfg registers, then RCPM driver get > > > > > > > an abosolute address from offset, RCPM driver write the > > > > > > > value of IPPDEXPCR registers to these abosolute > > > > > > > addresses(backup the value of IPPDEXPCR > > > > registers). > > > > > > > > > > > > I understand what you are trying to do. The problem is that > > > > > > the new fsl,ippdexpcr-alt-addr property contains a phandle and = an > offset. > > > > > > The size of it shouldn't be related to #fsl,rcpm-wakeup-cells. > > > > > You maybe like this: fsl,ippdexpcr-alt-addr =3D <&scfg 0x51c>;/* > > > > > SCFG_SPARECR8 */ > > > > > > > > No. The #address-cell for the soc/ is 2, so the offset to scfg > > > > should be 0x0 0x51c. The total size should be 3, but it shouldn't > > > > be coming from #fsl,rcpm-wakeup-cells like you mentioned in the > binding. > > > Oh, I got it. You want that fsl,ippdexpcr-alt-add is relative with > > > #address-cells instead of #fsl,rcpm-wakeup-cells. > > > > Yes. > I got an example from drivers/pci/controller/dwc/pci-layerscape.c > and arch/arm/boot/dts/ls1021a.dtsi as follows: > fsl,pcie-scfg =3D <&scfg 0>, 0 is an index >=20 > In my fsl,ippdexpcr-alt-addr =3D <&scfg 0x0 0x51c>, It means that 0x0 is = an alt > offset address for IPPDEXPCR0, 0x51c is an alt offset address For > IPPDEXPCR1 instead of 0x0 and 0x51c compose to an alt address of > SCFG_SPARECR8. Maybe I need write it as: fsl,ippdexpcr-alt-addr =3D <&scfg 0x0 0x0 0x0 0x51c>; first two 0x0 compose an alt offset address for IPPDEXPCR0, last 0x0 and 0x51c compose an alt address for IPPDEXPCR1, Best Regards, Biwen Li=20 > > > > Regards, > > Leo > > > > > > > > > > > > > > > > > > > > > > > > > > > + The first entry must be a link to the SCFG device nod= e. > > > > > > > > > + The non-first entry must be offset of registers of SC= FG. > > > > > > > > > > > > > > > > > > Example: > > > > > > > > > The RCPM node for T4240: > > > > > > > > > @@ -43,6 +48,15 @@ The RCPM node for T4240: > > > > > > > > > #fsl,rcpm-wakeup-cells =3D <2>; > > > > > > > > > }; > > > > > > > > > > > > > > > > > > +The RCPM node for LS1021A: > > > > > > > > > + rcpm: rcpm@1ee2140 { > > > > > > > > > + compatible =3D "fsl,ls1021a-rcpm", "fsl,qoriq-rcpm- > > > > > 2.1+"; > > > > > > > > > + reg =3D <0x0 0x1ee2140 0x0 0x8>; > > > > > > > > > + #fsl,rcpm-wakeup-cells =3D <2>; > > > > > > > > > + fsl,ippdexpcr-alt-addr =3D <&scfg 0x0 0x51c>; /* > > > > > > > > > SCFG_SPARECR8 */ > > > > > > > > > + }; > > > > > > > > > + > > > > > > > > > + > > > > > > > > > * Freescale RCPM Wakeup Source Device Tree Bindings > > > > > > > > > ------------------------------------------- > > > > > > > > > Required fsl,rcpm-wakeup property should be added to a > > > > > > > > > device node if the device > > > > > > > > > -- > > > > > > > > > 2.17.1