From patchwork Tue Feb 5 10:14:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pankaj Bansal X-Patchwork-Id: 10797225 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 406611669 for ; Tue, 5 Feb 2019 10:15:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D2202AA09 for ; Tue, 5 Feb 2019 10:15:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 20CDA2AAF4; Tue, 5 Feb 2019 10:15:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A6F542AA09 for ; Tue, 5 Feb 2019 10:15:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-ID:In-Reply-To: References:Message-ID:Date:Subject:To:From:Reply-To:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=OOeV9gdBSmuzFyCwQxh/iGtrX15xgeiL45H0gtfjLY8=; b=Cohnu8x8NiibRZ GF3hDqFDhW2F/367RmW4KVxG2Ivc+ytZBuGsRWN/HV90Z3HYlPtvvlEa9TjfIHyo9I3CRZ3bBV1cq uOBB6kEGMuOdgtivxFJHGWyhC+2MJZb6ayb5AdVyAjtHYqUZ6ImbzDc4EeYeL5hNh43zHwl+EKSsf 1n/HpWsKXCvFhq0txbQbGGyCwCPCa1SEO+MsAXl+mgkuGICmPLXmrzOdUy1TbLrFwSwMZUfAnZMF0 A1N9WC8qhjJ8tsKcei7z9iEQbeLsFXGyJaysbM/zmRjuZuthFEU9RdfTyas0KwrS+HSJD3UbUps+n yPfFjCOilQWXCYiHvyoA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gqxky-0001Qg-Fw; Tue, 05 Feb 2019 10:15:08 +0000 Received: from mail-eopbgr140040.outbound.protection.outlook.com ([40.107.14.40] helo=EUR01-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gqxkd-0000zW-AM for linux-arm-kernel@lists.infradead.org; Tue, 05 Feb 2019 10:14:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TjwTns9PSUkWQ5GbgWcUqonl9TZv6OTmqVQEXAMkPzY=; b=DZh6arsrl0R0MkBi6XXN4vp+q7S4nyQ5SxSHa7xQ6VeMUskOexVEFSZnMQKrsth53pMjVVQpDoQKwNKg5kX2XbGLfijUIhoeSrFhum1UfkvtysEAksyDOdxgaBoE7n5p4Ki6IvAZMIfukjYsoskqFv3xpafBpGqOQSoV2tfKqb8= Received: from VI1PR0401MB2496.eurprd04.prod.outlook.com (10.168.65.10) by VI1PR0401MB2030.eurprd04.prod.outlook.com (10.166.141.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1601.17; Tue, 5 Feb 2019 10:14:41 +0000 Received: from VI1PR0401MB2496.eurprd04.prod.outlook.com ([fe80::208f:755e:b057:2cfe]) by VI1PR0401MB2496.eurprd04.prod.outlook.com ([fe80::208f:755e:b057:2cfe%8]) with mapi id 15.20.1580.019; Tue, 5 Feb 2019 10:14:41 +0000 From: Pankaj Bansal To: Leo Li , Rob Herring , Mark Rutland Subject: [PATCH v4 1/2] dt-bindings: soc: fsl: Document Qixis FPGA usage Thread-Topic: [PATCH v4 1/2] dt-bindings: soc: fsl: Document Qixis FPGA usage Thread-Index: AQHUvTubgJLDSKArS0iRP7YRYODBng== Date: Tue, 5 Feb 2019 10:14:40 +0000 Message-ID: <20190205153924.7204-2-pankaj.bansal@nxp.com> References: <20190205153924.7204-1-pankaj.bansal@nxp.com> In-Reply-To: <20190205153924.7204-1-pankaj.bansal@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BMXPR01CA0019.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:d::29) To VI1PR0401MB2496.eurprd04.prod.outlook.com (2603:10a6:800:56::10) authentication-results: spf=none (sender IP is ) smtp.mailfrom=pankaj.bansal@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-originating-ip: [92.120.1.69] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR0401MB2030; 6:b4+N70u3CFVBQEF9m2hE3ZiPBDBHf0CT+abwfCjFhzzL6zXDQ2JbcqpsEPfWwRvYoPZXX4mzxVrKF0GVJaLGH6sWgVLKMYRkPgFTJvJiK/0RoSkC5YWuBDlYAZidyveG1Ktdws7ll/P8eyGGSTB5iG4GJm9bopQcg5ALWd4ckx7MwzjbpVNFW/FVVSku7KVctUydb8QAz0AVZE3BgXrYudqMxwaFbepPKmjGmDQownuj9i9273ayIifmrOl74tcCWcATqjwIsgKOST9PbM/xBp86idpdrnRH/CCsWOFj6sCkG8tihFVuS3b8BLdFrLtO4LwQE0IKeXuoImbrRLucMKfzCS9KgfGtNOAzKFUuwzXPuyL3GYSkdzqqpX1kF8g6ecA3i4isg1IME4VlS1Dw7VQNWQWUpzc+SChfZr66p1kWuaQmFrjspNCwlcDjTP3pXhMsTlU8kJPy5PTCD3LaTw==; 5:KM52afWS5EpTsL+kuI5IxnN2sw3TUKj0mg4PDSbooY4qB96D3R5/E/7Gh6u0PI+FHR+DtH8zTaesO4WiF3EhV3TOi7/yf1Iud6m8CLIsl9vHmPAK8Xd70pm8chwR32XAhUKJ6xu89zMtnWIuU+Pw3cEdQqTLVLpNt3OaRB/wiIzphVXwqYGQjGklw4J5I6tmNV9s53px3mQpsr+KY7J2wA==; 7:lJaT8baSTzHrgiqrt0H4TB64MaGx9y+ZhkCfPNcpyl7qOCTGDLXwnYzv5AY6DZgY1rTVRyTPdC2rYsqQYm98aXeXRo6BxDWkCk7hdTYLBgsrZsQt5FDIwFufqTKhqIrGOEV3kE+Bh3/ifm4I1PgaJQ== x-ms-office365-filtering-correlation-id: 4abe4320-32ed-40cc-4051-08d68b52bdc9 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600110)(711020)(4605077)(4618075)(2017052603328)(7153060)(7193020); SRVR:VI1PR0401MB2030; x-ms-traffictypediagnostic: VI1PR0401MB2030: x-microsoft-antispam-prvs: x-forefront-prvs: 0939529DE2 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(396003)(376002)(366004)(136003)(346002)(199004)(189003)(25786009)(8676002)(2906002)(26005)(14454004)(102836004)(386003)(6506007)(99286004)(6436002)(6486002)(6512007)(4326008)(8936002)(71190400001)(81166006)(81156014)(71200400001)(256004)(105586002)(76176011)(36756003)(106356001)(52116002)(486006)(6116002)(3846002)(44832011)(446003)(7736002)(110136005)(11346002)(476003)(2616005)(68736007)(316002)(86362001)(53936002)(186003)(1076003)(50226002)(305945005)(478600001)(97736004)(54906003)(66066001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0401MB2030; H:VI1PR0401MB2496.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX: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: 7yvEOBh9QCi3nWo69VZKn7pQkYO3rW7SdC54hELr4CL00yqz9tGkuyDulGS9c61N9vUqEEjSPfdH6iTIdscStsX3ddvDkMK3s5C8x1pN/umpCJ61lfhj7fjcEh+hl/377RIdibeXLiwJdFj6dyeobKTeQeIy4cN/CtGyJqmDX0P44/fVCFivhlCCgEvLyX6lDsWPHtaOgalSSZnfp+eTn7RJBm41ko+ruh6kd/RF5le73Pcpl+Y9iVw0Ezmft5kubBZgs44mJbVbEkQn5au6pDhTppgyflIAVlOxt3a/gwEdo2ikJyznivuDIjLhLTweRG/KmdYPcv8MTWEtlLG21Dgbslm+9vGflBq2NJuOyCku555CWPU+pSQcQD87AOYxeMoCmzdBqVgXegSJm/OLqCawRfx+iPpCmbKCgLXZWAQ= Content-ID: <31172365421942458B85A799827935AC@eurprd04.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4abe4320-32ed-40cc-4051-08d68b52bdc9 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Feb 2019 10:14:39.3594 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2030 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190205_021447_356405_825AF265 X-CRM114-Status: GOOD ( 13.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "open list : OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Pankaj Bansal , "linuxppc-dev@lists.ozlabs.org" , "linux-arm-kernel@lists.infradead.org" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP an FPGA-based system controller, called “Qixis”, which manages several critical system features, including: • Reset sequencing • Power supply configuration • Board configuration • hardware configuration The qixis registers are accessible over one or more system-specific interfaces, typically I2C, JTAG or an embedded processor. Signed-off-by: Pankaj Bansal --- Notes: V4: - No Change V3: - Added boardname based compatible field in bindings - Added bindings for MMIO based FPGA V2: - No change .../bindings/soc/fsl/qixis_ctrl.txt | 53 ++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/Documentation/devicetree/bindings/soc/fsl/qixis_ctrl.txt b/Documentation/devicetree/bindings/soc/fsl/qixis_ctrl.txt new file mode 100644 index 000000000000..5d510df14be8 --- /dev/null +++ b/Documentation/devicetree/bindings/soc/fsl/qixis_ctrl.txt @@ -0,0 +1,53 @@ +* QIXIS FPGA block + +an FPGA-based system controller, called “Qixis”, which +manages several critical system features, including: +• Configuration switch monitoring +• Power on/off sequencing +• Reset sequencing +• Power supply configuration +• Board configuration +• hardware configuration +• Background power data collection (DCM) +• Fault monitoring +• RCW bypass SRAM (replace flash RCW with internal RCW) (NOR only) +• Dedicated functional validation blocks (POSt/IRS, triggered event, and so on) +• I2C master for remote board control even with no DUT available + +The qixis registers are accessible over one or more system-specific interfaces, +typically I2C, JTAG or an embedded processor. + +FPGA connected to I2C: +Required properties: + + - compatible: should be a board-specific string followed by a string + indicating the type of FPGA. Example: + "fsl,-fpga", "fsl,fpga-qixis-i2c" + - reg : i2c address of the qixis device. + +Example (LX2160A-QDS): + /* The FPGA node */ + fpga@66 { + compatible = "fsl,lx2160aqds-fpga", "fsl,fpga-qixis-i2c"; + reg = <0x66>; + #address-cells = <1>; + #size-cells = <0>; + } + +* Freescale on-board FPGA + +This is the memory-mapped registers for on board FPGA. + +Required properties: +- compatible: should be a board-specific string followed by a string + indicating the type of FPGA. Example: + "fsl,-fpga", "fsl,fpga-qixis" +- reg: should contain the address and the length of the FPGA register set. + +Example (LS2080A-RDB): + + cpld@3,0 { + compatible = "fsl,ls2080ardb-fpga", "fsl,fpga-qixis"; + reg = <0x3 0 0x10000>; + }; + From patchwork Tue Feb 5 10:14:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Bansal X-Patchwork-Id: 10797227 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AB4C01669 for ; Tue, 5 Feb 2019 10:15:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9713F2A9DE for ; Tue, 5 Feb 2019 10:15:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8B3C42AA83; Tue, 5 Feb 2019 10:15:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D51AD2A9DE for ; Tue, 5 Feb 2019 10:15:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=F3eb8EcRBW1o6JG2korou2Glo8vJlI0DA0QaAi6Lb6A=; b=GNpyoixmzf8hn8 nKJYlAblhmQhwQcfV/8/P8h5/3i5EqlBHcbNIBc38Tma/MTBdrfwGUEMOfx+lnm7TdajzN071sCum WzpCYY+6hP9OuZh3s5IzA2Fyv5ncUnBHBqpzUusTVM6VX3p2FHsMdigwWA/r0rScnUoR7Xz8uqvav 0yGQGymBLPNBmCNgRtRUYdPG+Wj0FXf+8HPYYvONyExQKJnt+ejayy8gzahETntfDwAZDjnioGQwp wyh0OWSA0GGgyTarZlzXWcPEEFYDRBs3GZNfxlgrCg70y5/ioKb73XitZ39ajzk0GLVSxl25jq4ie s6r6N7vAmpphAXnXi5eA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gqxlK-0002o1-7d; Tue, 05 Feb 2019 10:15:30 +0000 Received: from mail-eopbgr140040.outbound.protection.outlook.com ([40.107.14.40] helo=EUR01-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gqxkf-0000zW-Ek for linux-arm-kernel@lists.infradead.org; Tue, 05 Feb 2019 10:14:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pEeCugRCEzwda8+ww8BQ87phkWrfvHjrH4KOQhdI4ok=; b=uS4dV5IOvJOsOSJ1oDEJlsQJ+tsTYEvo9oVN76Il44ZwFZTW5ZgevrbDLL2P2bjnXlF/y38VmC7254XmJ0G/hTpI7ylPIF3hJqNjZBSwygqT6TD3QyrrKs1gzFaaUy5TtftF485x/i1uUAIclsU3qMsY2BjaHNaCZ9GpebXaZmw= Received: from VI1PR0401MB2496.eurprd04.prod.outlook.com (10.168.65.10) by VI1PR0401MB2030.eurprd04.prod.outlook.com (10.166.141.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1601.17; Tue, 5 Feb 2019 10:14:43 +0000 Received: from VI1PR0401MB2496.eurprd04.prod.outlook.com ([fe80::208f:755e:b057:2cfe]) by VI1PR0401MB2496.eurprd04.prod.outlook.com ([fe80::208f:755e:b057:2cfe%8]) with mapi id 15.20.1580.019; Tue, 5 Feb 2019 10:14:43 +0000 From: Pankaj Bansal To: Leo Li , Rob Herring , Mark Rutland Subject: [PATCH v4 2/2] drivers: soc: fsl: add qixis driver Thread-Topic: [PATCH v4 2/2] drivers: soc: fsl: add qixis driver Thread-Index: AQHUvTucmPc6ljT2C0iw7LN0XZriZw== Date: Tue, 5 Feb 2019 10:14:42 +0000 Message-ID: <20190205153924.7204-3-pankaj.bansal@nxp.com> References: <20190205153924.7204-1-pankaj.bansal@nxp.com> In-Reply-To: <20190205153924.7204-1-pankaj.bansal@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BMXPR01CA0019.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:d::29) To VI1PR0401MB2496.eurprd04.prod.outlook.com (2603:10a6:800:56::10) authentication-results: spf=none (sender IP is ) smtp.mailfrom=pankaj.bansal@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-originating-ip: [92.120.1.69] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR0401MB2030; 6:bU0F4L/k3aDHwn/een25uXgVLp6WRPDGsr1Hg6OL1cAfR3V08oOvxbZacUxx24DtIZAW3uzjoEIElkstMPWgPHmsYkbDotgOMKH9dwPeHw7lOKlDwRf7oFY8Q733RWF/IinUr+xsblivv/C4AHbPYtSaPV8yPfnnqntII90nx2BKhZJA1XsZYidRYWi4izUKLzSsqQ8PeJ0TbBf+7LF58/pGVLTrScK21dJeTG77Pp5LE0Qd4Sc3aWxSmSIiPVG+OPEDgOW7NLg16VpZDwPcycXz6AJDrLf0EMH9SKrnmvW9P95bVmrq9RUDWoRHI7pAYg5Dd8lDeNxgaAHwdgjEtYU9rbF2WiYwj/fOBveHSDrPYqWlmgimOQKw1o7+FIXsIcmcR4sTM7xPAlGGzI0NJsbSVb4ufNHvW/1GWlGM+x1D+SxyBS86L1Uz71u7NwlbkvnWTlDSQuqupeuxg+UaSg==; 5:n77AcTiGsCArUuNHv3wzQ9L/ukTYgROmvStEPQnUkZibcxV3GcE33olFgBNux+/AVaky/jz5ML3XO5qFfA2J0kPuR6fm5+2jqJWu4Atln1+jow7hmP88pOZJ6rrdcRhtPy7q8910orkab4rDBVR0/3Em38DJFoV94yyJIIsqflPFrM7xzmoB8B8C6JApI9F4yOW2+ph4cdZ8YZ5c2B2L1w==; 7:QtiJfoaC2Gyur88wuBLCixnhdy9ZtvJ+kg/2STyTAneImGFpIWfn1+Nt5tATzO3FOgQc5VAI5QGDsupdX/BvrNx5D1V5rqAbv1pu/AFbPkK5AuctXnxGzqWMpOHKqycFhnkAf/cF49ypdUxqJbzn9Q== x-ms-office365-filtering-correlation-id: 0bcf9609-9048-49ce-2b8e-08d68b52bef7 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600110)(711020)(4605077)(4618075)(2017052603328)(7153060)(7193020); SRVR:VI1PR0401MB2030; x-ms-traffictypediagnostic: VI1PR0401MB2030: x-microsoft-antispam-prvs: x-forefront-prvs: 0939529DE2 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(396003)(376002)(366004)(136003)(346002)(199004)(189003)(25786009)(8676002)(2906002)(26005)(14454004)(102836004)(107886003)(386003)(6506007)(99286004)(6436002)(6486002)(6512007)(4326008)(8936002)(71190400001)(81166006)(81156014)(71200400001)(256004)(6306002)(105586002)(76176011)(36756003)(106356001)(52116002)(486006)(6116002)(3846002)(44832011)(446003)(7736002)(110136005)(11346002)(476003)(2616005)(966005)(68736007)(316002)(86362001)(53936002)(186003)(1076003)(50226002)(305945005)(478600001)(97736004)(54906003)(66066001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0401MB2030; H:VI1PR0401MB2496.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX: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: +XqmeUdkOevlZQ7LvgvgMzg1ICnh/JlFO0pOYd8WS6cwr+LNBsOB0tC/u0yz5ugnR17f0/MldkyEgZw5oqEybyf0+b2zbM+HrPYLQ1DcdxnGFKCYsk7d9VtL+Di47IeFK5lJ7JnqI93Hg2/D6VQgUI4Yi70kmiYFLpPJ5VQN+ekPqU5ATNwm2zF6hWMnYUi/txlZ1aSpBvmX37yKoZsAdPxQP3BXb6T41QAhyKE3uF3uNsKJLJ345rfe2QM5iirvAPSoNdu6KAjPyJmUqBYoBy2CV+cs8nPOnJqM642v6kqN0+jO8GA622VLe2b3Una2D8I/i63HvolY1hqU2K2kKtcBHV70J75Y6Ldbwtcv4hvX41rge2wn3j1C2VNtU5HFhXIJZ8Zlg0MexSA3zRHhGrLV8HymBLURPQR+kQBhKfU= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0bcf9609-9048-49ce-2b8e-08d68b52bef7 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Feb 2019 10:14:41.1851 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2030 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190205_021449_736360_8B2EC687 X-CRM114-Status: GOOD ( 17.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "open list : OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Pankaj Bansal , "linuxppc-dev@lists.ozlabs.org" , Wang Dongsheng , "linux-arm-kernel@lists.infradead.org" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP FPGA on LX2160AQDS/LX2160ARDB connected on I2C bus, so add qixis driver which is basically an i2c client driver to control FPGA. Also added platform driver for MMIO based FPGA, like the one available on LS2088ARDB/LS2088AQDS. Signed-off-by: Wang Dongsheng Signed-off-by: Pankaj Bansal --- Notes: V4: - Fix compilation error when qixis_ctrl is built as standalone module. V3: - Add MMIO based FPGA driver V2: - Modify the driver to not create platform devices corresponding to subnodes. because the subnodes are not actual devices. - Use mdio_mux_regmap_init/mdio_mux_regmap_uninit - Remove header file from include folder, as no qixis api is called from outside - Add regmap_exit in driver's remove function Dendencies: - https://www.mail-archive.com/netdev@vger.kernel.org/msg281274.html drivers/soc/fsl/Kconfig | 11 ++ drivers/soc/fsl/Makefile | 1 + drivers/soc/fsl/qixis_ctrl.c | 222 +++++++++++++++++++++++++++++++++ 3 files changed, 234 insertions(+) diff --git a/drivers/soc/fsl/Kconfig b/drivers/soc/fsl/Kconfig index 8f80e8bbf29e..75993be04e42 100644 --- a/drivers/soc/fsl/Kconfig +++ b/drivers/soc/fsl/Kconfig @@ -28,4 +28,15 @@ config FSL_MC_DPIO other DPAA2 objects. This driver does not expose the DPIO objects individually, but groups them under a service layer API. + +config FSL_QIXIS + tristate "QIXIS system controller driver" + depends on OF + select REGMAP_I2C + select REGMAP_MMIO + default n + help + Say y here to enable QIXIS system controller api. The qixis driver + provides FPGA functions to control system. + endmenu diff --git a/drivers/soc/fsl/Makefile b/drivers/soc/fsl/Makefile index 803ef1bfb5ff..47e0cfc66ca4 100644 --- a/drivers/soc/fsl/Makefile +++ b/drivers/soc/fsl/Makefile @@ -5,5 +5,6 @@ obj-$(CONFIG_FSL_DPAA) += qbman/ obj-$(CONFIG_QUICC_ENGINE) += qe/ obj-$(CONFIG_CPM) += qe/ +obj-$(CONFIG_FSL_QIXIS) += qixis_ctrl.o obj-$(CONFIG_FSL_GUTS) += guts.o obj-$(CONFIG_FSL_MC_DPIO) += dpio/ diff --git a/drivers/soc/fsl/qixis_ctrl.c b/drivers/soc/fsl/qixis_ctrl.c new file mode 100644 index 000000000000..a8108bfd5195 --- /dev/null +++ b/drivers/soc/fsl/qixis_ctrl.c @@ -0,0 +1,222 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/* Freescale QIXIS system controller driver. + * + * Copyright 2015 Freescale Semiconductor, Inc. + * Copyright 2018-2019 NXP + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* QIXIS MAP */ +struct fsl_qixis_regs { + u8 id; /* Identification Registers */ + u8 version; /* Version Register */ + u8 qixis_ver; /* QIXIS Version Register */ + u8 reserved1[0x1f]; +}; + +struct mdio_mux_data { + void *data; + struct list_head link; +}; + +struct qixis_priv { + struct regmap *regmap; + struct list_head mdio_mux_list; +}; + +static struct regmap_config qixis_regmap_config = { + .reg_bits = 8, + .val_bits = 8, +}; + +static int fsl_qixis_mdio_mux_init(struct device *dev, struct qixis_priv *priv) +{ + struct device_node *child; + struct mdio_mux_data *mux_data; + int ret; + + INIT_LIST_HEAD(&priv->mdio_mux_list); + for_each_child_of_node(dev->of_node, child) { + if (!of_node_name_prefix(child, "mdio-mux")) + continue; + + mux_data = devm_kzalloc(dev, sizeof(struct mdio_mux_data), + GFP_KERNEL); + if (!mux_data) + return -ENOMEM; + ret = mdio_mux_regmap_init(dev, child, &mux_data->data); + if (ret) + return ret; + list_add(&mux_data->link, &priv->mdio_mux_list); + } + + return 0; +} + +static int fsl_qixis_mdio_mux_uninit(struct qixis_priv *priv) +{ + struct list_head *pos; + struct mdio_mux_data *mux_data; + + list_for_each(pos, &priv->mdio_mux_list) { + mux_data = list_entry(pos, struct mdio_mux_data, link); + mdio_mux_regmap_uninit(mux_data->data); + } + + return 0; +} + +static int fsl_qixis_probe(struct platform_device *pdev) +{ + static struct fsl_qixis_regs __iomem *qixis; + struct qixis_priv *priv; + int ret; + u32 qver; + + qixis = of_iomap(pdev->dev.of_node, 0); + if (IS_ERR_OR_NULL(qixis)) { + pr_err("%s: Could not map qixis registers\n", __func__); + return -ENODEV; + } + + priv = devm_kzalloc(&pdev->dev, sizeof(struct qixis_priv), GFP_KERNEL); + if (!priv) + return -ENOMEM; + + priv->regmap = devm_regmap_init_mmio(&pdev->dev, qixis, + &qixis_regmap_config); + regmap_read(priv->regmap, offsetof(struct fsl_qixis_regs, qixis_ver), + &qver); + pr_info("Freescale QIXIS Version: 0x%08x\n", qver); + + ret = fsl_qixis_mdio_mux_init(&pdev->dev, priv); + if (ret) + goto error; + + platform_set_drvdata(pdev, priv); + + return 0; +error: + regmap_exit(priv->regmap); + + return ret; +} + +static int fsl_qixis_remove(struct platform_device *pdev) +{ + struct qixis_priv *priv; + + priv = platform_get_drvdata(pdev); + fsl_qixis_mdio_mux_uninit(priv); + regmap_exit(priv->regmap); + + return 0; +} + +static const struct of_device_id fsl_qixis_of_match[] = { + { .compatible = "fsl,fpga-qixis", }, + {}, +}; +MODULE_DEVICE_TABLE(of, fsl_qixis_of_match); + +static struct platform_driver fsl_qixis_driver = { + .driver = { + .name = "qixis_ctrl", + .owner = THIS_MODULE, + .of_match_table = of_match_ptr(fsl_qixis_of_match), + }, + .probe = fsl_qixis_probe, + .remove = fsl_qixis_remove, +}; + +static int fsl_qixis_i2c_probe(struct i2c_client *client) +{ + struct qixis_priv *priv; + int ret; + u32 qver; + + if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA)) + return -EOPNOTSUPP; + + priv = devm_kzalloc(&client->dev, sizeof(struct qixis_priv), + GFP_KERNEL); + if (!priv) + return -ENOMEM; + + priv->regmap = regmap_init_i2c(client, &qixis_regmap_config); + regmap_read(priv->regmap, offsetof(struct fsl_qixis_regs, qixis_ver), + &qver); + pr_info("Freescale QIXIS Version: 0x%08x\n", qver); + + ret = fsl_qixis_mdio_mux_init(&client->dev, priv); + if (ret) + goto error; + + i2c_set_clientdata(client, priv); + + return 0; +error: + regmap_exit(priv->regmap); + + return ret; +} + +static int fsl_qixis_i2c_remove(struct i2c_client *client) +{ + struct qixis_priv *priv; + + priv = i2c_get_clientdata(client); + fsl_qixis_mdio_mux_uninit(priv); + regmap_exit(priv->regmap); + + return 0; +} + +static const struct of_device_id fsl_qixis_i2c_of_match[] = { + { .compatible = "fsl,fpga-qixis-i2c" }, + {} +}; +MODULE_DEVICE_TABLE(of, fsl_qixis_i2c_of_match); + +static struct i2c_driver fsl_qixis_i2c_driver = { + .driver = { + .name = "qixis_ctrl_i2c", + .owner = THIS_MODULE, + .of_match_table = of_match_ptr(fsl_qixis_i2c_of_match), + }, + .probe_new = fsl_qixis_i2c_probe, + .remove = fsl_qixis_i2c_remove, +}; + +static int __init fsl_qixis_init(void) +{ + pr_info("FSL: Qixis Control driver\n"); + + if (platform_driver_register(&fsl_qixis_driver)) + pr_warn("could not register Qixis Control platform driver\n"); + return i2c_add_driver(&fsl_qixis_i2c_driver); +} +module_init(fsl_qixis_init); + +static void __exit fsl_qixis_exit(void) +{ + platform_driver_unregister(&fsl_qixis_driver); + i2c_del_driver(&fsl_qixis_i2c_driver); +} +module_exit(fsl_qixis_exit); + +MODULE_AUTHOR("Wang Dongsheng "); +MODULE_DESCRIPTION("Freescale QIXIS system controller driver"); +MODULE_LICENSE("GPL"); +